@perspective-dev/viewer 5.6.1 → 5.8.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 +4 -4
- package/dist/cdn/perspective-viewer.js +10 -9
- package/dist/cdn/perspective-viewer.js.map +4 -4
- package/dist/custom-elements.json +3955 -0
- package/dist/docs/perspective-docs.json +1 -1
- package/dist/esm/bootstrap.d.ts +48 -1
- package/dist/esm/column-format.d.ts +27 -18
- package/dist/esm/column-format.js +1 -1
- package/dist/esm/column-format.js.map +3 -3
- package/dist/esm/extensions.d.ts +127 -10
- package/dist/esm/perspective-viewer.d.ts +30 -25
- package/dist/esm/perspective-viewer.js +869 -9
- package/dist/esm/perspective-viewer.js.map +4 -4
- package/dist/esm/plugin.d.ts +1 -1
- package/dist/ts-rs/ColumnConfigDefaultsOptions.d.ts +15 -0
- package/dist/ts-rs/ColumnType.d.ts +6 -0
- package/dist/ts-rs/ConfigDefaultsOptions.d.ts +10 -0
- package/{src/ts/ts-rs/CurrencyNumberFormatStyle.ts → dist/ts-rs/CurrencyNumberFormatStyle.d.ts} +3 -3
- package/{src/ts/ts-rs/CustomNumberFormatConfig.ts → dist/ts-rs/CustomNumberFormatConfig.d.ts} +5 -5
- package/dist/ts-rs/DatetimeFormat.d.ts +61 -0
- package/dist/ts-rs/DatetimeMonthPart.d.ts +6 -0
- package/dist/ts-rs/DatetimeNumericPart.d.ts +6 -0
- package/dist/ts-rs/DatetimeTextPart.d.ts +6 -0
- package/{src/ts/ts-rs/DerivedTableConfig.ts → dist/ts-rs/DerivedTableConfig.d.ts} +8 -8
- package/{src/ts/ts-rs/ExportOptions.ts → dist/ts-rs/ExportOptions.d.ts} +1 -1
- package/{src/ts/ts-rs/Filter.ts → dist/ts-rs/Filter.d.ts} +1 -1
- package/{src/ts/ts-rs/FilterTerm.ts → dist/ts-rs/FilterTerm.d.ts} +1 -1
- package/dist/ts-rs/FractionalSecondDigits.d.ts +6 -0
- package/{src/ts/ts-rs/GetViewOptions.ts → dist/ts-rs/GetViewOptions.d.ts} +1 -1
- package/{src/ts/ts-rs/Layout.ts → dist/ts-rs/Layout.d.ts} +2 -2
- package/{src/ts/ts-rs/Notation.ts → dist/ts-rs/Notation.d.ts} +1 -1
- package/{src/ts/ts-rs/NumberFormatStyle.ts → dist/ts-rs/NumberFormatStyle.d.ts} +2 -2
- package/{src/ts/ts-rs/OnUpdateData.ts → dist/ts-rs/OnUpdateData.d.ts} +1 -1
- package/{src/ts/ts-rs/PanelViewerConfig.ts → dist/ts-rs/PanelViewerConfig.d.ts} +12 -12
- package/{src/ts/ts-rs/PluginStaticConfig.ts → dist/ts-rs/PluginStaticConfig.d.ts} +3 -3
- package/{src/ts/ts-rs/SimpleDatetimeFormat.ts → dist/ts-rs/SimpleDatetimeFormat.d.ts} +4 -1
- package/{src/ts/ts-rs/Sort.ts → dist/ts-rs/Sort.d.ts} +1 -1
- package/{src/ts/ts-rs/SplitLayout.ts → dist/ts-rs/SplitLayout.d.ts} +2 -2
- package/{src/ts/ts-rs/TableRef.ts → dist/ts-rs/TableRef.d.ts} +1 -1
- package/{src/ts/ts-rs/Unit.ts → dist/ts-rs/Unit.d.ts} +1 -1
- package/{src/ts/ts-rs/UnitNumberFormatStyle.ts → dist/ts-rs/UnitNumberFormatStyle.d.ts} +2 -2
- package/{src/ts/ts-rs/ViewOnUpdateResp.ts → dist/ts-rs/ViewOnUpdateResp.d.ts} +1 -1
- package/{src/ts/ts-rs/ViewerConfig.ts → dist/ts-rs/ViewerConfig.d.ts} +12 -12
- package/{src/ts/ts-rs/ViewerConfigInitial.ts → dist/ts-rs/ViewerConfigInitial.d.ts} +11 -11
- package/{src/ts/ts-rs/ViewerConfigUpdate.ts → dist/ts-rs/ViewerConfigUpdate.d.ts} +13 -13
- package/{src/ts/ts-rs/WindowSort.ts → dist/ts-rs/WindowSort.d.ts} +1 -1
- package/{src/ts/ts-rs/WindowSpec.ts → dist/ts-rs/WindowSpec.d.ts} +1 -1
- package/{src/ts/ts-rs/Windows.ts → dist/ts-rs/Windows.d.ts} +1 -1
- package/{src/ts/ts-rs/WorkspaceConfig.ts → dist/ts-rs/WorkspaceConfig.d.ts} +5 -5
- package/{src/ts/ts-rs/WorkspaceConfigUpdate.ts → dist/ts-rs/WorkspaceConfigUpdate.d.ts} +10 -5
- package/dist/wasm/perspective-viewer.d.ts +207 -69
- package/dist/wasm/perspective-viewer.js +388 -122
- package/dist/wasm/perspective-viewer.wasm +0 -0
- package/dist/wasm/perspective-viewer.wasm.d.ts +28 -18
- package/dist/wasm/snippets/{perspective-viewer-7fc45549159e01e4 → perspective-viewer-941ba6dae7521dbe}/inline4.js +0 -6
- package/package.json +11 -15
- package/dist/esm/ts-rs/AddPanelOptions.d.ts +0 -9
- package/dist/esm/ts-rs/Aggregate.d.ts +0 -1
- package/dist/esm/ts-rs/ClientOptions.d.ts +0 -7
- package/dist/esm/ts-rs/ColumnSelectMode.d.ts +0 -1
- package/dist/esm/ts-rs/CompactDisplay.d.ts +0 -5
- package/dist/esm/ts-rs/CurrencyCode.d.ts +0 -1
- package/dist/esm/ts-rs/CurrencyDisplay.d.ts +0 -1
- package/dist/esm/ts-rs/CurrencyNumberFormatStyle.d.ts +0 -8
- package/dist/esm/ts-rs/CurrencySign.d.ts +0 -1
- package/dist/esm/ts-rs/CustomDatetimeFormat.d.ts +0 -1
- package/dist/esm/ts-rs/CustomDatetimeStyleConfig.d.ts +0 -54
- package/dist/esm/ts-rs/CustomNumberFormatConfig.d.ts +0 -34
- package/dist/esm/ts-rs/DatetimeFormatType.d.ts +0 -6
- package/dist/esm/ts-rs/DerivedTableConfig.d.ts +0 -35
- package/dist/esm/ts-rs/ExportMethod.d.ts +0 -1
- package/dist/esm/ts-rs/ExportOptions.d.ts +0 -9
- package/dist/esm/ts-rs/Expressions.d.ts +0 -3
- package/dist/esm/ts-rs/Filter.d.ts +0 -2
- package/dist/esm/ts-rs/FilterReducer.d.ts +0 -1
- package/dist/esm/ts-rs/FilterTerm.d.ts +0 -2
- package/dist/esm/ts-rs/FormatUnit.d.ts +0 -1
- package/dist/esm/ts-rs/GetClientOptions.d.ts +0 -8
- package/dist/esm/ts-rs/GetTableOptions.d.ts +0 -8
- package/dist/esm/ts-rs/GetViewMode.d.ts +0 -4
- package/dist/esm/ts-rs/GetViewOptions.d.ts +0 -8
- package/dist/esm/ts-rs/GroupRollupMode.d.ts +0 -1
- package/dist/esm/ts-rs/Layout.d.ts +0 -11
- package/dist/esm/ts-rs/Notation.d.ts +0 -17
- package/dist/esm/ts-rs/NumberFormatStyle.d.ts +0 -18
- package/dist/esm/ts-rs/OnUpdateData.d.ts +0 -6
- package/dist/esm/ts-rs/OptionalUpdate.d.ts +0 -1
- package/dist/esm/ts-rs/Orientation.d.ts +0 -5
- package/dist/esm/ts-rs/PanelOptions.d.ts +0 -7
- package/dist/esm/ts-rs/PanelViewerConfig.d.ts +0 -82
- package/dist/esm/ts-rs/PluginStaticConfig.d.ts +0 -112
- package/dist/esm/ts-rs/RestoreOptions.d.ts +0 -21
- package/dist/esm/ts-rs/RestoreWorkspaceOptions.d.ts +0 -9
- package/dist/esm/ts-rs/RoundingMode.d.ts +0 -1
- package/dist/esm/ts-rs/RoundingPriority.d.ts +0 -1
- package/dist/esm/ts-rs/SaveWorkspaceOptions.d.ts +0 -10
- package/dist/esm/ts-rs/Scalar.d.ts +0 -5
- package/dist/esm/ts-rs/SignDisplay.d.ts +0 -1
- package/dist/esm/ts-rs/SimpleDatetimeFormat.d.ts +0 -1
- package/dist/esm/ts-rs/SimpleDatetimeStyleConfig.d.ts +0 -24
- package/dist/esm/ts-rs/Sort.d.ts +0 -2
- package/dist/esm/ts-rs/SortDir.d.ts +0 -1
- package/dist/esm/ts-rs/SplitLayout.d.ts +0 -20
- package/dist/esm/ts-rs/SplitRollupMode.d.ts +0 -9
- package/dist/esm/ts-rs/TabLayout.d.ts +0 -13
- package/dist/esm/ts-rs/TableRef.d.ts +0 -9
- package/dist/esm/ts-rs/TrailingZeroDisplay.d.ts +0 -1
- package/dist/esm/ts-rs/Unit.d.ts +0 -1
- package/dist/esm/ts-rs/UnitDisplay.d.ts +0 -1
- package/dist/esm/ts-rs/UnitNumberFormatStyle.d.ts +0 -6
- package/dist/esm/ts-rs/UseGrouping.d.ts +0 -1
- package/dist/esm/ts-rs/ViewOnUpdateResp.d.ts +0 -4
- package/dist/esm/ts-rs/ViewerConfig.d.ts +0 -86
- package/dist/esm/ts-rs/ViewerConfigInitial.d.ts +0 -175
- package/dist/esm/ts-rs/ViewerConfigUpdate.d.ts +0 -182
- package/dist/esm/ts-rs/WindowSort.d.ts +0 -7
- package/dist/esm/ts-rs/WindowSortDir.d.ts +0 -6
- package/dist/esm/ts-rs/WindowSpec.d.ts +0 -47
- package/dist/esm/ts-rs/Windows.d.ts +0 -10
- package/dist/esm/ts-rs/WorkspaceConfig.d.ts +0 -56
- package/dist/esm/ts-rs/WorkspaceConfigUpdate.d.ts +0 -57
- package/dist/esm/ts-rs/serde_json/JsonValue.d.ts +0 -3
- package/src/css/_column_dropdown.css +0 -14
- package/src/css/_context_menu.css +0 -14
- package/src/css/_dropdown_menu.css +0 -14
- package/src/css/_filter_dropdown.css +0 -14
- package/src/css/_function_dropdown.css +0 -14
- package/src/css/_viewer_bundle.css +0 -41
- package/src/css/aggregate-selector.css +0 -75
- package/src/css/column-dropdown.css +0 -106
- package/src/css/column-selector.css +0 -729
- package/src/css/column-settings-panel.css +0 -164
- package/src/css/column-style.css +0 -774
- package/src/css/column-symbol-attributes.css +0 -74
- package/src/css/config-selector.css +0 -505
- package/src/css/containers/pairs-list.css +0 -47
- package/src/css/empty-column.css +0 -73
- package/src/css/expression-editor.css +0 -153
- package/src/css/filter-dropdown.css +0 -54
- package/src/css/filter-item.css +0 -127
- package/src/css/form/code-editor.css +0 -133
- package/src/css/form/debug.css +0 -115
- package/src/css/function-dropdown.css +0 -46
- package/src/css/panel-tab.css +0 -216
- package/src/css/plugin-selector.css +0 -292
- package/src/css/render-warning.css +0 -82
- package/src/css/status-bar.css +0 -647
- package/src/css/type-icon.css +0 -114
- package/src/css/ui/containers/context-menu.css +0 -124
- package/src/css/ui/containers/dropdown-menu-items.css +0 -95
- package/src/css/ui/containers/dropdown-menu.css +0 -50
- package/src/css/ui/containers/scroll-panel.css +0 -31
- package/src/css/ui/containers/split-panel.css +0 -81
- package/src/css/ui/containers/tabs.css +0 -55
- package/src/css/ui/dom/checkbox.css +0 -98
- package/src/css/ui/dom/scrollbar.css +0 -35
- package/src/css/ui/dom/select.css +0 -74
- package/src/css/ui/form/mirrored-textarea.css +0 -81
- package/src/css/viewer.css +0 -1003
- package/src/rust/agent/client/mod.rs +0 -19
- package/src/rust/agent/client/protocol.rs +0 -231
- package/src/rust/agent/client/transport.rs +0 -287
- package/src/rust/agent/client/turn.rs +0 -174
- package/src/rust/agent/config.rs +0 -159
- package/src/rust/agent/docs.rs +0 -293
- package/src/rust/agent/markdown/block.rs +0 -509
- package/src/rust/agent/markdown/entity.rs +0 -52
- package/src/rust/agent/markdown/events.rs +0 -71
- package/src/rust/agent/markdown/inline.rs +0 -497
- package/src/rust/agent/markdown/mod.rs +0 -228
- package/src/rust/agent/mod.rs +0 -23
- package/src/rust/agent/preamble.md +0 -19
- package/src/rust/agent/runtime.rs +0 -201
- package/src/rust/agent/slot.rs +0 -236
- package/src/rust/agent/tools.rs +0 -1482
- package/src/rust/components/chat_panel.rs +0 -289
- package/src/rust/components/code_editor/highlight.rs +0 -52
- package/src/rust/components/code_editor.rs +0 -302
- package/src/rust/components/column_dropdown.rs +0 -284
- package/src/rust/components/column_selector/active_column.rs +0 -497
- package/src/rust/components/column_selector/add_expression_button.rs +0 -48
- package/src/rust/components/column_selector/aggregate_selector.rs +0 -193
- package/src/rust/components/column_selector/column_selector_column_row.rs +0 -73
- package/src/rust/components/column_selector/config_selector.rs +0 -932
- package/src/rust/components/column_selector/derived_control.rs +0 -229
- package/src/rust/components/column_selector/empty_column.rs +0 -136
- package/src/rust/components/column_selector/expr_edit_button.rs +0 -59
- package/src/rust/components/column_selector/filter_column.rs +0 -530
- package/src/rust/components/column_selector/inactive_column.rs +0 -246
- package/src/rust/components/column_selector/invalid_column.rs +0 -22
- package/src/rust/components/column_selector/pivot_column.rs +0 -130
- package/src/rust/components/column_selector/sort_column.rs +0 -148
- package/src/rust/components/column_selector.rs +0 -628
- package/src/rust/components/column_settings_sidebar/attributes_tab.rs +0 -34
- package/src/rust/components/column_settings_sidebar/save_settings.rs +0 -72
- package/src/rust/components/column_settings_sidebar/style_tab/agg_depth_selector.rs +0 -66
- package/src/rust/components/column_settings_sidebar/style_tab/alignment_field.rs +0 -90
- package/src/rust/components/column_settings_sidebar/style_tab/font_field.rs +0 -267
- package/src/rust/components/column_settings_sidebar/style_tab/primitive_field.rs +0 -560
- package/src/rust/components/column_settings_sidebar/style_tab/symbol/row_selector.rs +0 -101
- package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_pairs.rs +0 -91
- package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_pairs_item.rs +0 -112
- package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_selector.rs +0 -54
- package/src/rust/components/column_settings_sidebar/style_tab/symbol.rs +0 -143
- package/src/rust/components/column_settings_sidebar/style_tab.rs +0 -499
- package/src/rust/components/column_settings_sidebar/window_tab.rs +0 -34
- package/src/rust/components/column_settings_sidebar.rs +0 -622
- package/src/rust/components/copy_dropdown.rs +0 -111
- package/src/rust/components/datetime_column_style/custom.rs +0 -220
- package/src/rust/components/datetime_column_style/simple.rs +0 -131
- package/src/rust/components/datetime_column_style.rs +0 -259
- package/src/rust/components/debug_panel.rs +0 -350
- package/src/rust/components/dragdrop_list.rs +0 -473
- package/src/rust/components/editable_header.rs +0 -147
- package/src/rust/components/empty_row.rs +0 -166
- package/src/rust/components/export_dropdown.rs +0 -132
- package/src/rust/components/expression_editor.rs +0 -172
- package/src/rust/components/filter_dropdown.rs +0 -288
- package/src/rust/components/function_dropdown.rs +0 -224
- package/src/rust/components/global_filter_bar.rs +0 -76
- package/src/rust/components/main_panel/frame_theme.rs +0 -130
- package/src/rust/components/main_panel/msg.rs +0 -68
- package/src/rust/components/main_panel/presize.rs +0 -220
- package/src/rust/components/main_panel/reconcile.rs +0 -271
- package/src/rust/components/main_panel/render.rs +0 -455
- package/src/rust/components/main_panel/update.rs +0 -212
- package/src/rust/components/main_panel.rs +0 -470
- package/src/rust/components/mod.rs +0 -50
- package/src/rust/components/new_panel_menu.rs +0 -165
- package/src/rust/components/number_series_style.rs +0 -157
- package/src/rust/components/panel_menu.rs +0 -518
- package/src/rust/components/panel_tab.rs +0 -567
- package/src/rust/components/plugin_selector.rs +0 -132
- package/src/rust/components/plugin_tab.rs +0 -285
- package/src/rust/components/render_warning.rs +0 -128
- package/src/rust/components/rows_counter.rs +0 -124
- package/src/rust/components/settings_panel.rs +0 -406
- package/src/rust/components/status_bar.rs +0 -595
- package/src/rust/components/status_indicator.rs +0 -125
- package/src/rust/components/style.rs +0 -107
- package/src/rust/components/style_controls/mod.rs +0 -15
- package/src/rust/components/style_controls/number_string_format/digits_section.rs +0 -150
- package/src/rust/components/style_controls/number_string_format/misc_section.rs +0 -60
- package/src/rust/components/style_controls/number_string_format/style_section.rs +0 -70
- package/src/rust/components/style_controls/number_string_format/types.rs +0 -55
- package/src/rust/components/style_controls/number_string_format.rs +0 -258
- package/src/rust/components/type_icon.rs +0 -53
- package/src/rust/components/viewer/filters.rs +0 -145
- package/src/rust/components/viewer/msg.rs +0 -242
- package/src/rust/components/viewer/panels.rs +0 -397
- package/src/rust/components/viewer/render.rs +0 -266
- package/src/rust/components/viewer/settings.rs +0 -621
- package/src/rust/components/viewer/snapshots.rs +0 -154
- package/src/rust/components/viewer/wiring.rs +0 -500
- package/src/rust/components/viewer.rs +0 -429
- package/src/rust/components/window_editor.rs +0 -985
- package/src/rust/config/column_config_schema.rs +0 -525
- package/src/rust/config/columns_config.rs +0 -39
- package/src/rust/config/datetime_column_style/custom.rs +0 -138
- package/src/rust/config/datetime_column_style/custom_format.rs +0 -90
- package/src/rust/config/datetime_column_style/simple.rs +0 -65
- package/src/rust/config/datetime_column_style/simple_format.rs +0 -86
- package/src/rust/config/datetime_column_style.rs +0 -66
- package/src/rust/config/export_method.rs +0 -175
- package/src/rust/config/kvpair.rs +0 -47
- package/src/rust/config/mod.rs +0 -39
- package/src/rust/config/number_series_style.rs +0 -79
- package/src/rust/config/number_string_format/enums.rs +0 -298
- package/src/rust/config/number_string_format.rs +0 -424
- package/src/rust/config/options.rs +0 -145
- package/src/rust/config/plugin_static_config.rs +0 -217
- package/src/rust/config/view_config.rs +0 -24
- package/src/rust/config/viewer_config.rs +0 -461
- package/src/rust/config/workspace_config.rs +0 -297
- package/src/rust/custom_elements/debug_plugin.rs +0 -122
- package/src/rust/custom_elements/mod.rs +0 -17
- package/src/rust/custom_elements/viewer.rs +0 -2255
- package/src/rust/custom_events.rs +0 -423
- package/src/rust/derived.rs +0 -266
- package/src/rust/exprtk/cursor.rs +0 -90
- package/src/rust/exprtk/mod.rs +0 -19
- package/src/rust/exprtk/tokenize/comment.rs +0 -21
- package/src/rust/exprtk/tokenize/number.rs +0 -44
- package/src/rust/exprtk/tokenize/string.rs +0 -98
- package/src/rust/exprtk/tokenize/symbol.rs +0 -26
- package/src/rust/exprtk/tokenize.rs +0 -153
- package/src/rust/js/clipboard.rs +0 -77
- package/src/rust/js/clipboard_item.rs +0 -21
- package/src/rust/js/intersection_observer.rs +0 -32
- package/src/rust/js/mimetype.rs +0 -37
- package/src/rust/js/mod.rs +0 -30
- package/src/rust/js/plugin.rs +0 -324
- package/src/rust/js/regular_layout.rs +0 -480
- package/src/rust/js/resize_observer.rs +0 -37
- package/src/rust/lib.rs +0 -204
- package/src/rust/presentation/column_locator.rs +0 -115
- package/src/rust/presentation/props.rs +0 -47
- package/src/rust/presentation/sheets.rs +0 -78
- package/src/rust/presentation.rs +0 -825
- package/src/rust/queries/column_locator.rs +0 -114
- package/src/rust/queries/column_values.rs +0 -59
- package/src/rust/queries/columns_iter_set.rs +0 -331
- package/src/rust/queries/export_app.rs +0 -59
- package/src/rust/queries/exports.rs +0 -96
- package/src/rust/queries/fetch_column_stats.rs +0 -94
- package/src/rust/queries/get_viewer_config.rs +0 -73
- package/src/rust/queries/hosted_tables.rs +0 -38
- package/src/rust/queries/is_invalid_drop.rs +0 -36
- package/src/rust/queries/mod.rs +0 -48
- package/src/rust/queries/palette_set.rs +0 -82
- package/src/rust/queries/plugin_column_styles.rs +0 -105
- package/src/rust/queries/validate_expression.rs +0 -39
- package/src/rust/renderer/activate.rs +0 -90
- package/src/rust/renderer/dispatch.rs +0 -564
- package/src/rust/renderer/limits.rs +0 -104
- package/src/rust/renderer/plugin_config.rs +0 -1129
- package/src/rust/renderer/plugin_store.rs +0 -58
- package/src/rust/renderer/props.rs +0 -69
- package/src/rust/renderer/registry.rs +0 -175
- package/src/rust/renderer/render_timer.rs +0 -204
- package/src/rust/renderer/state.rs +0 -205
- package/src/rust/renderer.rs +0 -868
- package/src/rust/root.rs +0 -50
- package/src/rust/session/column_defaults_update.rs +0 -194
- package/src/rust/session/drag_drop_update.rs +0 -197
- package/src/rust/session/metadata.rs +0 -415
- package/src/rust/session/op_queue.rs +0 -430
- package/src/rust/session/panel_state.rs +0 -327
- package/src/rust/session/props.rs +0 -193
- package/src/rust/session/replace_expression_update.rs +0 -133
- package/src/rust/session/view_subscription.rs +0 -266
- package/src/rust/session.rs +0 -1901
- package/src/rust/tasks/apply_global_filters.rs +0 -103
- package/src/rust/tasks/auto_pause.rs +0 -181
- package/src/rust/tasks/copy_export.rs +0 -296
- package/src/rust/tasks/create_panel.rs +0 -268
- package/src/rust/tasks/derive.rs +0 -312
- package/src/rust/tasks/dismiss_render_warning.rs +0 -35
- package/src/rust/tasks/edit_expression.rs +0 -92
- package/src/rust/tasks/edit_window.rs +0 -153
- package/src/rust/tasks/eject.rs +0 -89
- package/src/rust/tasks/mod.rs +0 -80
- package/src/rust/tasks/pipeline.rs +0 -425
- package/src/rust/tasks/presize_panels.rs +0 -386
- package/src/rust/tasks/reset_all.rs +0 -119
- package/src/rust/tasks/resize_observer.rs +0 -173
- package/src/rust/tasks/restore_derived.rs +0 -200
- package/src/rust/tasks/restore_panel.rs +0 -271
- package/src/rust/tasks/send_column_config.rs +0 -87
- package/src/rust/tasks/send_plugin_config.rs +0 -83
- package/src/rust/tasks/set_edit_mode.rs +0 -69
- package/src/rust/tasks/sync_update_panels.rs +0 -244
- package/src/rust/tasks/table_lifecycle.rs +0 -200
- package/src/rust/tasks/transactional_restore.rs +0 -387
- package/src/rust/tasks/update_theme.rs +0 -139
- package/src/rust/tasks/validate_expression.rs +0 -61
- package/src/rust/ui/containers/control_group.rs +0 -113
- package/src/rust/ui/containers/dropdown_menu.rs +0 -103
- package/src/rust/ui/containers/mod.rs +0 -21
- package/src/rust/ui/containers/scroll_panel.rs +0 -315
- package/src/rust/ui/containers/scroll_panel_item.rs +0 -98
- package/src/rust/ui/containers/select.rs +0 -271
- package/src/rust/ui/containers/sidebar.rs +0 -125
- package/src/rust/ui/containers/sidebar_close_button.rs +0 -30
- package/src/rust/ui/containers/split_panel.rs +0 -498
- package/src/rust/ui/containers/tab_list.rs +0 -101
- package/src/rust/ui/context_menu.rs +0 -264
- package/src/rust/ui/dragdrop.rs +0 -201
- package/src/rust/ui/font_loader.rs +0 -201
- package/src/rust/ui/form/color_selector.rs +0 -58
- package/src/rust/ui/form/intl_label.rs +0 -62
- package/src/rust/ui/form/mirrored_textarea.rs +0 -100
- package/src/rust/ui/form/mod.rs +0 -24
- package/src/rust/ui/form/multi_stop_gradient_selector.rs +0 -386
- package/src/rust/ui/form/named_value_picker.rs +0 -81
- package/src/rust/ui/form/number_field.rs +0 -72
- package/src/rust/ui/form/number_input.rs +0 -45
- package/src/rust/ui/form/number_range_field.rs +0 -77
- package/src/rust/ui/form/optional_field.rs +0 -55
- package/src/rust/ui/form/palette_selector.rs +0 -388
- package/src/rust/ui/form/select_enum_field.rs +0 -59
- package/src/rust/ui/form/select_value_field.rs +0 -64
- package/src/rust/ui/mod.rs +0 -56
- package/src/rust/ui/modal.rs +0 -61
- package/src/rust/ui/portal.rs +0 -374
- package/src/rust/ui/style.rs +0 -56
- package/src/rust/utils/browser/blob.rs +0 -63
- package/src/rust/utils/browser/download.rs +0 -27
- package/src/rust/utils/browser/dragdrop.rs +0 -38
- package/src/rust/utils/browser/mod.rs +0 -27
- package/src/rust/utils/browser/mouse.rs +0 -24
- package/src/rust/utils/browser/request_animation_frame.rs +0 -95
- package/src/rust/utils/browser/selection.rs +0 -84
- package/src/rust/utils/completion.rs +0 -50
- package/src/rust/utils/css.rs +0 -525
- package/src/rust/utils/css_vars.rs +0 -39
- package/src/rust/utils/custom_element.rs +0 -105
- package/src/rust/utils/datetime.rs +0 -54
- package/src/rust/utils/debounce.rs +0 -232
- package/src/rust/utils/hooks/mod.rs +0 -15
- package/src/rust/utils/hooks/use_async_callback.rs +0 -43
- package/src/rust/utils/in_flight.rs +0 -74
- package/src/rust/utils/local_fonts.rs +0 -359
- package/src/rust/utils/mod.rs +0 -56
- package/src/rust/utils/modal_position.rs +0 -104
- package/src/rust/utils/number_format.rs +0 -49
- package/src/rust/utils/pending_effects.rs +0 -38
- package/src/rust/utils/plugin_host_state.rs +0 -43
- package/src/rust/utils/ptr_eq_rc.rs +0 -74
- package/src/rust/utils/pubsub.rs +0 -236
- package/src/rust/utils/spawn.rs +0 -33
- package/src/rust/utils/weak_scope.rs +0 -39
- package/src/rust/workspace.rs +0 -1195
- package/src/svg/active-indicator.svg +0 -3
- package/src/svg/align-scroll-icon.svg +0 -7
- package/src/svg/bg-pattern.png +0 -0
- package/src/svg/bookmark-icon.svg +0 -4
- package/src/svg/boolean-type.svg +0 -4
- package/src/svg/checkbox-checked-icon.svg +0 -4
- package/src/svg/checkbox-hover.svg +0 -4
- package/src/svg/checkbox-off.svg +0 -3
- package/src/svg/checkbox-on.svg +0 -4
- package/src/svg/checkbox-unchecked-icon.svg +0 -3
- package/src/svg/close-icon.svg +0 -6
- package/src/svg/column-settings-icon.svg +0 -6
- package/src/svg/datagrid-select-column.svg +0 -8
- package/src/svg/datagrid-select-region.svg +0 -8
- package/src/svg/datagrid-select-row-tree.svg +0 -8
- package/src/svg/datagrid-select-row.svg +0 -8
- package/src/svg/datagrid.svg +0 -13
- package/src/svg/date-type.svg +0 -4
- package/src/svg/derived.svg +0 -6
- package/src/svg/downloading.gif +0 -0
- package/src/svg/drag-handle copy.svg +0 -10
- package/src/svg/drag-handle.svg +0 -10
- package/src/svg/drawer-bg-pattern-hidpi.png +0 -0
- package/src/svg/drawer-tab-hover.svg +0 -4
- package/src/svg/drawer-tab-invert-hover.svg +0 -5
- package/src/svg/drawer-tab-invert.svg +0 -3
- package/src/svg/drawer-tab.svg +0 -5
- package/src/svg/dropdown-selector.svg +0 -3
- package/src/svg/duplicate-icon.svg +0 -4
- package/src/svg/editable-icon.svg +0 -5
- package/src/svg/export-icon.svg +0 -4
- package/src/svg/expression.svg +0 -10
- package/src/svg/free-scroll-icon.svg +0 -5
- package/src/svg/inactive-mouseover.svg +0 -4
- package/src/svg/lock.svg +0 -7
- package/src/svg/mega-menu-icons-candlestick.svg +0 -6
- package/src/svg/mega-menu-icons-datagrid.svg +0 -37
- package/src/svg/mega-menu-icons-density.svg +0 -23
- package/src/svg/mega-menu-icons-heatmap.svg +0 -60
- package/src/svg/mega-menu-icons-map-density.svg +0 -24
- package/src/svg/mega-menu-icons-map-line.svg +0 -19
- package/src/svg/mega-menu-icons-map-scatter.svg +0 -43
- package/src/svg/mega-menu-icons-ohlc.svg +0 -5
- package/src/svg/mega-menu-icons-sunburst.svg +0 -5
- package/src/svg/mega-menu-icons-treemap.svg +0 -4
- package/src/svg/mega-menu-icons-x-bar.svg +0 -36
- package/src/svg/mega-menu-icons-x-y-line.svg +0 -38
- package/src/svg/mega-menu-icons-x-y-scatter.svg +0 -72
- package/src/svg/mega-menu-icons-y-area.svg +0 -73
- package/src/svg/mega-menu-icons-y-bar.svg +0 -36
- package/src/svg/mega-menu-icons-y-line.svg +0 -36
- package/src/svg/mega-menu-icons-y-scatter.svg +0 -12
- package/src/svg/new-panel-icon.svg +0 -4
- package/src/svg/number-type.svg +0 -4
- package/src/svg/pin-icon.svg +0 -5
- package/src/svg/radio-hover.svg +0 -4
- package/src/svg/radio-off.svg +0 -3
- package/src/svg/radio-on.svg +0 -4
- package/src/svg/read-only-icon.svg +0 -6
- package/src/svg/revert-icon.svg +0 -4
- package/src/svg/sort-abs-asc-icon.svg +0 -3
- package/src/svg/sort-abs-col-asc-icon.svg +0 -3
- package/src/svg/sort-abs-col-desc-icon.svg +0 -3
- package/src/svg/sort-abs-desc-icon.svg +0 -3
- package/src/svg/sort-asc-icon.svg +0 -4
- package/src/svg/sort-col-asc-icon.svg +0 -4
- package/src/svg/sort-col-desc-icon.svg +0 -4
- package/src/svg/sort-desc-icon.svg +0 -4
- package/src/svg/sort-none-icon.svg +0 -3
- package/src/svg/status_error.svg +0 -70
- package/src/svg/status_ok.svg +0 -3
- package/src/svg/status_pending.svg +0 -3
- package/src/svg/string-type.svg +0 -4
- package/src/svg/theme-icon.svg +0 -5
- package/src/svg/updating.gif +0 -0
- package/src/themes/blueprint.css +0 -133
- package/src/themes/botanical.css +0 -97
- package/src/themes/defaults.css +0 -68
- package/src/themes/dracula.css +0 -167
- package/src/themes/eggplant.css +0 -131
- package/src/themes/gruvbox-dark.css +0 -183
- package/src/themes/gruvbox.css +0 -97
- package/src/themes/icons.css +0 -110
- package/src/themes/intl/ar.css +0 -209
- package/src/themes/intl/de.css +0 -218
- package/src/themes/intl/es.css +0 -218
- package/src/themes/intl/fr.css +0 -218
- package/src/themes/intl/ja.css +0 -218
- package/src/themes/intl/pt.css +0 -218
- package/src/themes/intl/zh.css +0 -218
- package/src/themes/intl.css +0 -220
- package/src/themes/ledger.css +0 -137
- package/src/themes/monokai.css +0 -181
- package/src/themes/nord.css +0 -131
- package/src/themes/phosphor.css +0 -125
- package/src/themes/pro-dark.css +0 -113
- package/src/themes/pro.css +0 -117
- package/src/themes/solarized-dark.css +0 -85
- package/src/themes/solarized.css +0 -72
- package/src/themes/themes.css +0 -28
- package/src/themes/vaporwave.css +0 -191
- package/src/themes/velvet.css +0 -132
- package/src/ts/bootstrap.ts +0 -38
- package/src/ts/column-format.ts +0 -233
- package/src/ts/extensions.ts +0 -236
- package/src/ts/perspective-viewer.cdn.ts +0 -19
- package/src/ts/perspective-viewer.ts +0 -72
- package/src/ts/perspective-viewer.worker.ts +0 -14
- package/src/ts/plugin.ts +0 -296
- package/src/ts/providers.ts +0 -96
- package/src/ts/select-detail.ts +0 -48
- package/src/ts/ts-rs/CustomDatetimeFormat.ts +0 -3
- package/src/ts/ts-rs/CustomDatetimeStyleConfig.ts +0 -54
- package/src/ts/ts-rs/DatetimeFormatType.ts +0 -8
- package/src/ts/ts-rs/FormatUnit.ts +0 -3
- package/src/ts/ts-rs/SimpleDatetimeStyleConfig.ts +0 -25
- package/tsconfig.json +0 -16
- /package/{src/ts/ts-rs/AddPanelOptions.ts → dist/ts-rs/AddPanelOptions.d.ts} +0 -0
- /package/{src/ts/ts-rs/Aggregate.ts → dist/ts-rs/Aggregate.d.ts} +0 -0
- /package/{src/ts/ts-rs/ClientOptions.ts → dist/ts-rs/ClientOptions.d.ts} +0 -0
- /package/{src/ts/ts-rs/ColumnSelectMode.ts → dist/ts-rs/ColumnSelectMode.d.ts} +0 -0
- /package/{src/ts/ts-rs/CompactDisplay.ts → dist/ts-rs/CompactDisplay.d.ts} +0 -0
- /package/{src/ts/ts-rs/CurrencyCode.ts → dist/ts-rs/CurrencyCode.d.ts} +0 -0
- /package/{src/ts/ts-rs/CurrencyDisplay.ts → dist/ts-rs/CurrencyDisplay.d.ts} +0 -0
- /package/{src/ts/ts-rs/CurrencySign.ts → dist/ts-rs/CurrencySign.d.ts} +0 -0
- /package/{src/ts/ts-rs/ExportMethod.ts → dist/ts-rs/ExportMethod.d.ts} +0 -0
- /package/{src/ts/ts-rs/Expressions.ts → dist/ts-rs/Expressions.d.ts} +0 -0
- /package/{src/ts/ts-rs/FilterReducer.ts → dist/ts-rs/FilterReducer.d.ts} +0 -0
- /package/{src/ts/ts-rs/GetClientOptions.ts → dist/ts-rs/GetClientOptions.d.ts} +0 -0
- /package/{src/ts/ts-rs/GetTableOptions.ts → dist/ts-rs/GetTableOptions.d.ts} +0 -0
- /package/{src/ts/ts-rs/GetViewMode.ts → dist/ts-rs/GetViewMode.d.ts} +0 -0
- /package/{src/ts/ts-rs/GroupRollupMode.ts → dist/ts-rs/GroupRollupMode.d.ts} +0 -0
- /package/{src/ts/ts-rs/OptionalUpdate.ts → dist/ts-rs/OptionalUpdate.d.ts} +0 -0
- /package/{src/ts/ts-rs/Orientation.ts → dist/ts-rs/Orientation.d.ts} +0 -0
- /package/{src/ts/ts-rs/PanelOptions.ts → dist/ts-rs/PanelOptions.d.ts} +0 -0
- /package/{src/ts/ts-rs/RestoreOptions.ts → dist/ts-rs/RestoreOptions.d.ts} +0 -0
- /package/{src/ts/ts-rs/RestoreWorkspaceOptions.ts → dist/ts-rs/RestoreWorkspaceOptions.d.ts} +0 -0
- /package/{src/ts/ts-rs/RoundingMode.ts → dist/ts-rs/RoundingMode.d.ts} +0 -0
- /package/{src/ts/ts-rs/RoundingPriority.ts → dist/ts-rs/RoundingPriority.d.ts} +0 -0
- /package/{src/ts/ts-rs/SaveWorkspaceOptions.ts → dist/ts-rs/SaveWorkspaceOptions.d.ts} +0 -0
- /package/{src/ts/ts-rs/Scalar.ts → dist/ts-rs/Scalar.d.ts} +0 -0
- /package/{src/ts/ts-rs/SignDisplay.ts → dist/ts-rs/SignDisplay.d.ts} +0 -0
- /package/{src/ts/ts-rs/SortDir.ts → dist/ts-rs/SortDir.d.ts} +0 -0
- /package/{src/ts/ts-rs/SplitRollupMode.ts → dist/ts-rs/SplitRollupMode.d.ts} +0 -0
- /package/{src/ts/ts-rs/TabLayout.ts → dist/ts-rs/TabLayout.d.ts} +0 -0
- /package/{src/ts/ts-rs/TrailingZeroDisplay.ts → dist/ts-rs/TrailingZeroDisplay.d.ts} +0 -0
- /package/{src/ts/ts-rs/UnitDisplay.ts → dist/ts-rs/UnitDisplay.d.ts} +0 -0
- /package/{src/ts/ts-rs/UseGrouping.ts → dist/ts-rs/UseGrouping.d.ts} +0 -0
- /package/{src/ts/ts-rs/WindowSortDir.ts → dist/ts-rs/WindowSortDir.d.ts} +0 -0
- /package/{src/ts/ts-rs/serde_json/JsonValue.ts → dist/ts-rs/serde_json/JsonValue.d.ts} +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-7fc45549159e01e4 → perspective-viewer-941ba6dae7521dbe}/inline0.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-7fc45549159e01e4 → perspective-viewer-941ba6dae7521dbe}/inline1.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-7fc45549159e01e4 → perspective-viewer-941ba6dae7521dbe}/inline2.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-7fc45549159e01e4 → perspective-viewer-941ba6dae7521dbe}/inline3.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-7fc45549159e01e4 → perspective-viewer-941ba6dae7521dbe}/inline5.js +0 -0
package/dist/esm/bootstrap.d.ts
CHANGED
|
@@ -1,2 +1,49 @@
|
|
|
1
1
|
import type * as wasm_module_type from "../../dist/wasm/perspective-viewer.js";
|
|
2
|
-
|
|
2
|
+
import type { InitOptions, MigrateKind, MigrateResult, WasmRegistration } from "@perspective-dev/client/registry";
|
|
3
|
+
export type { InitOptions, WasmBinary, WasmRegistration, WasmSource, } from "@perspective-dev/client/registry";
|
|
4
|
+
/**
|
|
5
|
+
* Register Perspective's WebAssembly binaries for this page; the same function
|
|
6
|
+
* as `@perspective-dev/client`'s `init()`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function init(wasm: WasmRegistration, options?: InitOptions): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* A WebAssembly binary in any form `init_client` accepts; thunks are only
|
|
11
|
+
* invoked when the binary is needed.
|
|
12
|
+
*/
|
|
13
|
+
export type ViewerWasmSource = Promise<Response | ArrayBuffer | Uint8Array> | Response | ArrayBuffer | Uint8Array | (() => Promise<Response | ArrayBuffer | Uint8Array>);
|
|
14
|
+
/**
|
|
15
|
+
* The `<perspective-viewer>` binary, and the `perspective-migrate` binary
|
|
16
|
+
* behind `migrate()`.
|
|
17
|
+
*/
|
|
18
|
+
export interface ViewerWasmRegistration {
|
|
19
|
+
viewer?: ViewerWasmSource;
|
|
20
|
+
migrate?: ViewerWasmSource;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Initialize `<perspective-viewer>` from its WebAssembly binary, and register
|
|
24
|
+
* the `perspective-migrate` binary which `migrate()` downloads on first use;
|
|
25
|
+
* a wrapper over `init()`'s `viewer` and `migrate` roles.
|
|
26
|
+
*
|
|
27
|
+
* # Examples
|
|
28
|
+
*
|
|
29
|
+
* ```javascript
|
|
30
|
+
* await init_client({
|
|
31
|
+
* viewer: () => fetch("perspective-viewer.wasm"),
|
|
32
|
+
* migrate: () => fetch("perspective-migrate.wasm"),
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare function init_client(wasm: ViewerWasmSource | ViewerWasmRegistration, wasm_module?: typeof wasm_module_type): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Upgrade a persisted config written by any Perspective release since 2.0.0
|
|
39
|
+
* to the current schema, using the `migrate` binary registered with `init()`.
|
|
40
|
+
*
|
|
41
|
+
* # Arguments
|
|
42
|
+
*
|
|
43
|
+
* - `kind` - `"view"` for a `ViewConfig`, `"viewer"` for a `save()` token, or
|
|
44
|
+
* `"workspace"` for a `saveWorkspace()` token.
|
|
45
|
+
* - `config` - The config to upgrade.
|
|
46
|
+
* - `from_version` - The release which wrote `config`, used only when it has
|
|
47
|
+
* no `version` field.
|
|
48
|
+
*/
|
|
49
|
+
export declare function migrate<T = Record<string, unknown>>(kind: MigrateKind, config: unknown, from_version?: string): Promise<MigrateResult<T>>;
|
|
@@ -6,15 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
* The format configs mirror the `Intl.NumberFormatOptions` /
|
|
8
8
|
* `Intl.DateTimeFormatOptions` shapes one-for-one — they're written
|
|
9
|
-
* straight into the respective constructors.
|
|
10
|
-
* discriminator ("simple" | "custom") selects between two derivation
|
|
11
|
-
* paths: simple uses `dateStyle` / `timeStyle`, custom uses the
|
|
12
|
-
* per-field overrides (year / month / day / ...).
|
|
9
|
+
* straight into the respective constructors.
|
|
13
10
|
*/
|
|
14
|
-
import type { CustomNumberFormatConfig } from "
|
|
15
|
-
import type { NumberFormatStyle } from "
|
|
16
|
-
import type { Notation } from "
|
|
17
|
-
import type {
|
|
11
|
+
import type { CustomNumberFormatConfig } from "../../dist/ts-rs/CustomNumberFormatConfig.d.ts";
|
|
12
|
+
import type { NumberFormatStyle } from "../../dist/ts-rs/NumberFormatStyle.d.ts";
|
|
13
|
+
import type { Notation } from "../../dist/ts-rs/Notation.d.ts";
|
|
14
|
+
import type { DatetimeFormat } from "../../dist/ts-rs/DatetimeFormat.d.ts";
|
|
18
15
|
/**
|
|
19
16
|
* A numeric column's `number_format` (`columns_config` value), exactly as
|
|
20
17
|
* the Style tab's editor WRITES it — the ts-rs projection of the Rust
|
|
@@ -24,26 +21,38 @@ import type { DatetimeFormatType } from "./ts-rs/DatetimeFormatType.d.ts";
|
|
|
24
21
|
*/
|
|
25
22
|
export type NumberFormatConfig = CustomNumberFormatConfig & Partial<NumberFormatStyle> & Partial<Notation>;
|
|
26
23
|
/**
|
|
27
|
-
* A datetime column's `date_format` (`columns_config` value)
|
|
28
|
-
* `
|
|
29
|
-
* `timeStyle`), or per-part custom fields discriminated by
|
|
30
|
-
* `format: "custom"`.
|
|
24
|
+
* A datetime column's `date_format` (`columns_config` value), a subset of
|
|
25
|
+
* `Intl.DateTimeFormatOptions`.
|
|
31
26
|
*/
|
|
32
|
-
export type DateFormatConfig =
|
|
27
|
+
export type DateFormatConfig = DatetimeFormat;
|
|
28
|
+
/** The `date_format` keys that apply as one group. */
|
|
29
|
+
export declare const DATE_FORMAT_SHAPE_KEYS: readonly ["dateStyle", "timeStyle", "weekday", "year", "month", "day", "hour", "minute", "second", "fractionalSecondDigits"];
|
|
30
|
+
/** The `date_format` keys that apply individually. */
|
|
31
|
+
export declare const DATE_FORMAT_MODIFIER_KEYS: readonly ["timeZone", "hour12"];
|
|
32
|
+
/** Whether `cfg` sets any of the `date_format` keys that apply as one group. */
|
|
33
|
+
export declare function hasDateFormatShape(cfg: DateFormatConfig | undefined): cfg is DateFormatConfig;
|
|
34
|
+
/** The `date_format` options that apply individually. */
|
|
35
|
+
export type DateFormatModifiers = Pick<Intl.DateTimeFormatOptions, "timeZone" | "hour12">;
|
|
36
|
+
/** The `date_format` keys of `cfg` that apply individually, if it sets any. */
|
|
37
|
+
export declare function dateFormatModifiers(cfg: DateFormatConfig | undefined): DateFormatModifiers | undefined;
|
|
33
38
|
/**
|
|
34
39
|
* `defaults` is the calling plugin's declared default format, filling in
|
|
35
40
|
* the fields `cfg` leaves unset.
|
|
36
41
|
*/
|
|
37
42
|
export declare function createNumberFormatter(type: string, cfg?: NumberFormatConfig, defaults?: NumberFormatConfig): Intl.NumberFormat;
|
|
38
43
|
/**
|
|
39
|
-
* `
|
|
40
|
-
*
|
|
44
|
+
* `cfg` layered over `defaults`, then over `base`, by the `date_format`
|
|
45
|
+
* group rule, as `Intl.DateTimeFormat` options.
|
|
46
|
+
*/
|
|
47
|
+
export declare function resolveDateFormat(cfg: DateFormatConfig | undefined, defaults: DateFormatConfig | undefined, base: DateFormatConfig): Intl.DateTimeFormatOptions;
|
|
48
|
+
/**
|
|
49
|
+
* `defaults` is the calling plugin's declared default `date_format`, which
|
|
50
|
+
* `cfg` overrides by the `date_format` group rule.
|
|
41
51
|
*/
|
|
42
52
|
export declare function createDatetimeFormatter(cfg?: DateFormatConfig, defaults?: DateFormatConfig): Intl.DateTimeFormat;
|
|
43
53
|
/**
|
|
44
|
-
* `defaults` follows the same contract as
|
|
45
|
-
*
|
|
46
|
-
* `date_format`, applied only when `cfg` is wholly absent.
|
|
54
|
+
* `defaults` follows the same contract as [`createDatetimeFormatter`];
|
|
55
|
+
* only `dateStyle` applies, in UTC.
|
|
47
56
|
*/
|
|
48
57
|
export declare function createDateFormatter(cfg?: DateFormatConfig, defaults?: DateFormatConfig): Intl.DateTimeFormat;
|
|
49
58
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
1
|
+
var f=["dateStyle","timeStyle","weekday","year","month","day","hour","minute","second","fractionalSecondDigits"],F=["timeZone","hour12"];function c(t){return f.some(e=>t?.[e]!==void 0)}function y(t){let e={};return t?.timeZone!==void 0&&(e.timeZone=t.timeZone),t?.hour12!==void 0&&(e.hour12=t.hour12),Object.keys(e).length>0?e:void 0}var g={float:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}},l={dateStyle:"short",timeStyle:"medium"},u={dateStyle:"short"},D=[["style","currency","currencyDisplay","currencySign","unit","unitDisplay"],["notation","compactDisplay"],["minimumFractionDigits","maximumFractionDigits"],["minimumSignificantDigits","maximumSignificantDigits"]];function p(t,e){let n={};for(let[i,o]of Object.entries(e??{}))o!=null&&(n[i]=o);let r={...t};for(let i of D)if(i.some(o=>o in n))for(let o of i)delete r[o];return Object.assign(r,n)}function C(t,e,n){let r=n??g[t]??{},i=e?p(r,e):r;return new Intl.NumberFormat(navigator.languages,i)}function d(t,e,n){let r=[t,e,n],i=r.find(c)??{},o={},s=(a,m)=>{m!==void 0&&m[a]!==void 0&&(o[a]=m[a])};for(let a of f)s(a,i);for(let a of F)s(a,r.find(m=>m?.[a]!==void 0));return o}function N(t,e){return new Intl.DateTimeFormat(navigator.languages,d(t,e,l))}function b(t,e){let{dateStyle:n}=d(t,e,u);return new Intl.DateTimeFormat(navigator.languages,{timeZone:"utc",dateStyle:n??u.dateStyle})}function S(t){return t.split("|").at(-1)??t}export{F as DATE_FORMAT_MODIFIER_KEYS,f as DATE_FORMAT_SHAPE_KEYS,b as createDateFormatter,N as createDatetimeFormatter,C as createNumberFormatter,y as dateFormatModifiers,c as hasDateFormatShape,d as resolveDateFormat,S as sourceColumn};
|
|
2
2
|
//# sourceMappingURL=column-format.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ts/column-format.ts"],
|
|
4
|
-
"sourcesContent": ["// \u250F\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n// \u2503 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2584 \u2580\u2588\u2588\u2588 \u2588 \u2503\n// \u2503 \u2584\u2584\u2584\u2584\u2584\u2588 \u2588\u2584\u2584\u2584\u2584\u2584 \u2584\u2584\u2584\u2584\u2584\u2588 \u2580\u2580\u2580\u2580\u2580\u2588\u2580\u2580\u2580\u2580\u2580 \u2588 \u2580\u2580\u2580\u2580\u2580\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258C\u2590\u2588\u2588\u2588 \u2588\u2588\u2588\u2584 \u2580\u2588 \u2588 \u2580\u2580\u2580\u2580\u2580 \u2503\n// \u2503 \u2588\u2580\u2580\u2580\u2580\u2580 \u2588\u2580\u2580\u2580\u2580\u2580 \u2588\u2580\u2588\u2588\u2580\u2580 \u2584\u2584\u2584\u2584\u2584 \u2588 \u2584\u2584\u2584\u2584\u2584\u2588 \u2584\u2584\u2584\u2584\u2584\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258C\u2590\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2584 \u2588 \u2584\u2584\u2584\u2584\u2584 \u2503\n// \u2503 \u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588 \u2580\u2588\u2584 \u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588 \u2588\u2588\u2588\u258C\u2590\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2584 \u2588 \u2503\n// \u2523\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u252B\n// \u2503 Copyright (c) 2017, the Perspective Authors. \u2503\n// \u2503 \u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C \u2503\n// \u2503 This file is part of the Perspective library, distributed under the terms \u2503\n// \u2503 of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). \u2503\n// \u2517\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u251B\n\n/**\n * Cross-package helpers for per-column value formatting. Used by both\n * `viewer-datagrid` (cell formatting) and `viewer-charts` (axis ticks,\n * tooltips, legends) so a column's `number_format` / `date_format`\n * configuration produces identical output across plugins.\n *\n * The format configs mirror the `Intl.NumberFormatOptions` /\n * `Intl.DateTimeFormatOptions` shapes one-for-one \u2014 they're written\n * straight into the respective constructors. The `date_format.format`\n * discriminator (\"simple\" | \"custom\") selects between two derivation\n * paths: simple uses `dateStyle` / `timeStyle`, custom uses the\n * per-field overrides (year / month / day / ...).\n */\n\nimport type { CustomNumberFormatConfig } from \"./ts-rs/CustomNumberFormatConfig.d.ts\";\nimport type { NumberFormatStyle } from \"./ts-rs/NumberFormatStyle.d.ts\";\nimport type { Notation } from \"./ts-rs/Notation.d.ts\";\nimport type { DatetimeFormatType } from \"./ts-rs/DatetimeFormatType.d.ts\";\nimport type { SimpleDatetimeStyleConfig } from \"./ts-rs/SimpleDatetimeStyleConfig.d.ts\";\n\n/**\n * A numeric column's `number_format` (`columns_config` value), exactly as\n * the Style tab's editor WRITES it \u2014 the ts-rs projection of the Rust\n * `CustomNumberFormatConfig`, re-composed with its serde-flattened\n * `style` and `notation` families (ts-rs cannot flatten `Option<enum>`,\n * so the Rust type `#[ts(skip)]`s them and they export separately).\n */\nexport type NumberFormatConfig = CustomNumberFormatConfig &\n Partial<NumberFormatStyle> &\n Partial<Notation>;\n\n/**\n * A datetime column's `date_format` (`columns_config` value) \u2014 the Rust\n * `DatetimeFormatType` union: a `Simple` preset (`dateStyle` /\n * `timeStyle`), or per-part custom fields discriminated by\n * `format: \"custom\"`.\n */\nexport type DateFormatConfig = DatetimeFormatType;\n\n/** Narrow a [`DateFormatConfig`] to its `Simple` arm, if it is one. */\nfunction simple_config(\n cfg?: DateFormatConfig,\n): SimpleDatetimeStyleConfig | undefined {\n return cfg && !(\"format\" in cfg) ? cfg : undefined;\n}\n\n/**\n * Default `Intl.NumberFormatOptions` applied when a numeric column has no\n * `number_format` configured. Float columns get two fractional digits to\n * match the legacy datagrid behavior; integer columns get an empty\n * options bag (locale-default integer rendering).\n */\nconst NUMERIC_LEGACY_DEFAULTS: Record<string, Intl.NumberFormatOptions> = {\n float: {\n style: \"decimal\",\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n },\n};\n\n/**\n * Default `Intl.DateTimeFormatOptions` applied when a datetime column has\n * no `date_format` configured.\n */\nconst DATETIME_LEGACY_DEFAULTS: Intl.DateTimeFormatOptions = {\n dateStyle: \"short\",\n timeStyle: \"medium\",\n};\n\nconst DATE_LEGACY_DEFAULTS: Intl.DateTimeFormatOptions = {\n dateStyle: \"short\",\n};\n\nfunction mergeNumberOptions(\n base: Intl.NumberFormatOptions,\n cfg?: NumberFormatConfig,\n): Intl.NumberFormatOptions {\n const explicit: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(cfg ?? {})) {\n if (v !== undefined && v !== null) {\n explicit[k] = v;\n }\n }\n\n const merged: Record<string, unknown> = { ...base };\n if (\n \"minimumFractionDigits\" in explicit ||\n \"maximumFractionDigits\" in explicit\n ) {\n delete merged.minimumFractionDigits;\n delete merged.maximumFractionDigits;\n }\n\n if (\n \"minimumSignificantDigits\" in explicit ||\n \"maximumSignificantDigits\" in explicit\n ) {\n delete merged.minimumSignificantDigits;\n delete merged.maximumSignificantDigits;\n }\n\n return Object.assign(merged, explicit) as Intl.NumberFormatOptions;\n}\n\n/**\n * `defaults` is the calling plugin's declared default format, filling in\n * the fields `cfg` leaves unset.\n */\nexport function createNumberFormatter(\n type: string,\n cfg?: NumberFormatConfig,\n defaults?: NumberFormatConfig,\n): Intl.NumberFormat {\n // ts-rs renders serde-absent keys as `T | null`; the wire never\n // carries an explicit `null` (`skip_serializing_if`), and\n // `Intl.NumberFormat` treats both absent and `undefined` the same, so\n // the cast is presentation-only.\n const base = ((defaults as Intl.NumberFormatOptions | undefined) ??\n NUMERIC_LEGACY_DEFAULTS[type] ??\n {}) as Intl.NumberFormatOptions;\n\n const opts = cfg ? mergeNumberOptions(base, cfg) : base;\n return new Intl.NumberFormat(navigator.languages as string[], opts);\n}\n\n/**\n * `defaults` is the calling plugin's declared default `date_format`,\n * applied only when `cfg` is wholly absent.\n */\nexport function createDatetimeFormatter(\n cfg?: DateFormatConfig,\n defaults?: DateFormatConfig,\n): Intl.DateTimeFormat {\n cfg = cfg ?? defaults;\n if (!cfg || !(\"format\" in cfg)) {\n const preset = simple_config(cfg);\n const opts: Intl.DateTimeFormatOptions = {\n timeZone: preset?.timeZone ?? undefined,\n dateStyle:\n preset?.dateStyle === \"disabled\"\n ? undefined\n : (preset?.dateStyle ?? DATETIME_LEGACY_DEFAULTS.dateStyle),\n timeStyle:\n preset?.timeStyle === \"disabled\"\n ? undefined\n : (preset?.timeStyle ?? DATETIME_LEGACY_DEFAULTS.timeStyle),\n };\n\n return new Intl.DateTimeFormat(navigator.languages as string[], opts);\n }\n\n // Per-part fields are the shared `CustomDatetimeFormat` enum; the\n // editor only writes each part's `Intl`-valid subset, so the\n // narrowing casts below are presentation-only.\n const opts: Intl.DateTimeFormatOptions = {\n timeZone: cfg.timeZone ?? undefined,\n hour12: cfg.hour12 ?? true,\n fractionalSecondDigits: cfg.fractionalSecondDigits as\n | 1\n | 2\n | 3\n | undefined,\n };\n if (cfg.year !== \"disabled\") {\n opts.year = (cfg.year ??\n \"2-digit\") as Intl.DateTimeFormatOptions[\"year\"];\n }\n if (cfg.month !== \"disabled\") {\n opts.month = (cfg.month ??\n \"numeric\") as Intl.DateTimeFormatOptions[\"month\"];\n }\n if (cfg.day !== \"disabled\") {\n opts.day = (cfg.day ?? \"numeric\") as Intl.DateTimeFormatOptions[\"day\"];\n }\n if (cfg.weekday && cfg.weekday !== \"disabled\") {\n opts.weekday = cfg.weekday as Intl.DateTimeFormatOptions[\"weekday\"];\n }\n if (cfg.hour !== \"disabled\") {\n opts.hour = (cfg.hour ??\n \"numeric\") as Intl.DateTimeFormatOptions[\"hour\"];\n }\n if (cfg.minute !== \"disabled\") {\n opts.minute = (cfg.minute ??\n \"numeric\") as Intl.DateTimeFormatOptions[\"minute\"];\n }\n if (cfg.second !== \"disabled\") {\n opts.second = (cfg.second ??\n \"numeric\") as Intl.DateTimeFormatOptions[\"second\"];\n }\n return new Intl.DateTimeFormat(navigator.languages as string[], opts);\n}\n\n/**\n * `defaults` follows the same contract as\n * [`createDatetimeFormatter`]: the plugin's declared default\n * `date_format`, applied only when `cfg` is wholly absent.\n */\nexport function createDateFormatter(\n cfg?: DateFormatConfig,\n defaults?: DateFormatConfig,\n): Intl.DateTimeFormat {\n const preset = simple_config(cfg ?? defaults);\n const opts: Intl.DateTimeFormatOptions = {\n timeZone: \"utc\",\n dateStyle:\n preset?.dateStyle === \"disabled\"\n ? undefined\n : (preset?.dateStyle ?? DATE_LEGACY_DEFAULTS.dateStyle),\n };\n return new Intl.DateTimeFormat(navigator.languages as string[], opts);\n}\n\n/**\n * Recover the source column name from a synthetic split-by path. Split\n * pivoting produces paths of the form `<split_val_1>|...|<source_col>`;\n * per-column config (formatters, aggregate styling, \u2026) is always keyed\n * on the trailing source column.\n */\nexport function sourceColumn(path: string): string {\n return path.split(\"|\").at(-1) ?? path;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["// \u250F\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n// \u2503 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2584 \u2580\u2588\u2588\u2588 \u2588 \u2503\n// \u2503 \u2584\u2584\u2584\u2584\u2584\u2588 \u2588\u2584\u2584\u2584\u2584\u2584 \u2584\u2584\u2584\u2584\u2584\u2588 \u2580\u2580\u2580\u2580\u2580\u2588\u2580\u2580\u2580\u2580\u2580 \u2588 \u2580\u2580\u2580\u2580\u2580\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258C\u2590\u2588\u2588\u2588 \u2588\u2588\u2588\u2584 \u2580\u2588 \u2588 \u2580\u2580\u2580\u2580\u2580 \u2503\n// \u2503 \u2588\u2580\u2580\u2580\u2580\u2580 \u2588\u2580\u2580\u2580\u2580\u2580 \u2588\u2580\u2588\u2588\u2580\u2580 \u2584\u2584\u2584\u2584\u2584 \u2588 \u2584\u2584\u2584\u2584\u2584\u2588 \u2584\u2584\u2584\u2584\u2584\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258C\u2590\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2584 \u2588 \u2584\u2584\u2584\u2584\u2584 \u2503\n// \u2503 \u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588 \u2580\u2588\u2584 \u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588 \u2588\u2588\u2588\u258C\u2590\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2584 \u2588 \u2503\n// \u2523\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u252B\n// \u2503 Copyright (c) 2017, the Perspective Authors. \u2503\n// \u2503 \u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C \u2503\n// \u2503 This file is part of the Perspective library, distributed under the terms \u2503\n// \u2503 of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). \u2503\n// \u2517\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u251B\n\n/**\n * Cross-package helpers for per-column value formatting. Used by both\n * `viewer-datagrid` (cell formatting) and `viewer-charts` (axis ticks,\n * tooltips, legends) so a column's `number_format` / `date_format`\n * configuration produces identical output across plugins.\n *\n * The format configs mirror the `Intl.NumberFormatOptions` /\n * `Intl.DateTimeFormatOptions` shapes one-for-one \u2014 they're written\n * straight into the respective constructors.\n */\n\nimport type { CustomNumberFormatConfig } from \"../../dist/ts-rs/CustomNumberFormatConfig.d.ts\";\nimport type { NumberFormatStyle } from \"../../dist/ts-rs/NumberFormatStyle.d.ts\";\nimport type { Notation } from \"../../dist/ts-rs/Notation.d.ts\";\nimport type { DatetimeFormat } from \"../../dist/ts-rs/DatetimeFormat.d.ts\";\n\n/**\n * A numeric column's `number_format` (`columns_config` value), exactly as\n * the Style tab's editor WRITES it \u2014 the ts-rs projection of the Rust\n * `CustomNumberFormatConfig`, re-composed with its serde-flattened\n * `style` and `notation` families (ts-rs cannot flatten `Option<enum>`,\n * so the Rust type `#[ts(skip)]`s them and they export separately).\n */\nexport type NumberFormatConfig = CustomNumberFormatConfig &\n Partial<NumberFormatStyle> &\n Partial<Notation>;\n\n/**\n * A datetime column's `date_format` (`columns_config` value), a subset of\n * `Intl.DateTimeFormatOptions`.\n */\nexport type DateFormatConfig = DatetimeFormat;\n\n/** The `date_format` keys that apply as one group. */\nexport const DATE_FORMAT_SHAPE_KEYS = [\n \"dateStyle\",\n \"timeStyle\",\n \"weekday\",\n \"year\",\n \"month\",\n \"day\",\n \"hour\",\n \"minute\",\n \"second\",\n \"fractionalSecondDigits\",\n] as const satisfies readonly (keyof DateFormatConfig)[];\n\n/** The `date_format` keys that apply individually. */\nexport const DATE_FORMAT_MODIFIER_KEYS = [\n \"timeZone\",\n \"hour12\",\n] as const satisfies readonly (keyof DateFormatConfig)[];\n\n/** Whether `cfg` sets any of the `date_format` keys that apply as one group. */\nexport function hasDateFormatShape(\n cfg: DateFormatConfig | undefined,\n): cfg is DateFormatConfig {\n return DATE_FORMAT_SHAPE_KEYS.some((key) => cfg?.[key] !== undefined);\n}\n\n/** The `date_format` options that apply individually. */\nexport type DateFormatModifiers = Pick<\n Intl.DateTimeFormatOptions,\n \"timeZone\" | \"hour12\"\n>;\n\n/** The `date_format` keys of `cfg` that apply individually, if it sets any. */\nexport function dateFormatModifiers(\n cfg: DateFormatConfig | undefined,\n): DateFormatModifiers | undefined {\n const out: DateFormatModifiers = {};\n if (cfg?.timeZone !== undefined) {\n out.timeZone = cfg.timeZone;\n }\n\n if (cfg?.hour12 !== undefined) {\n out.hour12 = cfg.hour12;\n }\n\n return Object.keys(out).length > 0 ? out : undefined;\n}\n\n/**\n * Default `Intl.NumberFormatOptions` applied when a numeric column has no\n * `number_format` configured. Float columns get two fractional digits to\n * match the legacy datagrid behavior; integer columns get an empty\n * options bag (locale-default integer rendering).\n */\nconst NUMERIC_LEGACY_DEFAULTS: Record<string, Intl.NumberFormatOptions> = {\n float: {\n style: \"decimal\",\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n },\n};\n\n/**\n * The viewer's own `date_format` for a datetime column, below every plugin\n * and override layer.\n */\nconst DATETIME_BASE: DateFormatConfig = {\n dateStyle: \"short\",\n timeStyle: \"medium\",\n};\n\nconst DATE_BASE: DateFormatConfig & { dateStyle: \"short\" } = {\n dateStyle: \"short\",\n};\n\nconst NUMBER_FORMAT_GROUPS: readonly (readonly string[])[] = [\n [\n \"style\",\n \"currency\",\n \"currencyDisplay\",\n \"currencySign\",\n \"unit\",\n \"unitDisplay\",\n ],\n [\"notation\", \"compactDisplay\"],\n [\"minimumFractionDigits\", \"maximumFractionDigits\"],\n [\"minimumSignificantDigits\", \"maximumSignificantDigits\"],\n];\n\nfunction mergeNumberOptions(\n base: Intl.NumberFormatOptions,\n cfg?: NumberFormatConfig,\n): Intl.NumberFormatOptions {\n const explicit: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(cfg ?? {})) {\n if (v !== undefined && v !== null) {\n explicit[k] = v;\n }\n }\n\n const merged: Record<string, unknown> = { ...base };\n for (const group of NUMBER_FORMAT_GROUPS) {\n if (group.some((key) => key in explicit)) {\n for (const key of group) {\n delete merged[key];\n }\n }\n }\n\n return Object.assign(merged, explicit) as Intl.NumberFormatOptions;\n}\n\n/**\n * `defaults` is the calling plugin's declared default format, filling in\n * the fields `cfg` leaves unset.\n */\nexport function createNumberFormatter(\n type: string,\n cfg?: NumberFormatConfig,\n defaults?: NumberFormatConfig,\n): Intl.NumberFormat {\n // ts-rs renders serde-absent keys as `T | null`; the wire never\n // carries an explicit `null` (`skip_serializing_if`), and\n // `Intl.NumberFormat` treats both absent and `undefined` the same, so\n // the cast is presentation-only.\n const base = ((defaults as Intl.NumberFormatOptions | undefined) ??\n NUMERIC_LEGACY_DEFAULTS[type] ??\n {}) as Intl.NumberFormatOptions;\n\n const opts = cfg ? mergeNumberOptions(base, cfg) : base;\n return new Intl.NumberFormat(navigator.languages as string[], opts);\n}\n\n/**\n * `cfg` layered over `defaults`, then over `base`, by the `date_format`\n * group rule, as `Intl.DateTimeFormat` options.\n */\nexport function resolveDateFormat(\n cfg: DateFormatConfig | undefined,\n defaults: DateFormatConfig | undefined,\n base: DateFormatConfig,\n): Intl.DateTimeFormatOptions {\n const layers = [cfg, defaults, base];\n const shape: DateFormatConfig = layers.find(hasDateFormatShape) ?? {};\n const opts: DateFormatConfig = {};\n const copy = <K extends keyof DateFormatConfig>(\n key: K,\n from: DateFormatConfig | undefined,\n ) => {\n if (from !== undefined && from[key] !== undefined) {\n opts[key] = from[key];\n }\n };\n\n for (const key of DATE_FORMAT_SHAPE_KEYS) {\n copy(key, shape);\n }\n\n for (const key of DATE_FORMAT_MODIFIER_KEYS) {\n copy(\n key,\n layers.find((layer) => layer?.[key] !== undefined),\n );\n }\n\n return opts;\n}\n\n/**\n * `defaults` is the calling plugin's declared default `date_format`, which\n * `cfg` overrides by the `date_format` group rule.\n */\nexport function createDatetimeFormatter(\n cfg?: DateFormatConfig,\n defaults?: DateFormatConfig,\n): Intl.DateTimeFormat {\n return new Intl.DateTimeFormat(\n navigator.languages as string[],\n resolveDateFormat(cfg, defaults, DATETIME_BASE),\n );\n}\n\n/**\n * `defaults` follows the same contract as [`createDatetimeFormatter`];\n * only `dateStyle` applies, in UTC.\n */\nexport function createDateFormatter(\n cfg?: DateFormatConfig,\n defaults?: DateFormatConfig,\n): Intl.DateTimeFormat {\n const { dateStyle } = resolveDateFormat(cfg, defaults, DATE_BASE);\n return new Intl.DateTimeFormat(navigator.languages as string[], {\n timeZone: \"utc\",\n dateStyle: dateStyle ?? DATE_BASE.dateStyle,\n });\n}\n\n/**\n * Recover the source column name from a synthetic split-by path. Split\n * pivoting produces paths of the form `<split_val_1>|...|<source_col>`;\n * per-column config (formatters, aggregate styling, \u2026) is always keyed\n * on the trailing source column.\n */\nexport function sourceColumn(path: string): string {\n return path.split(\"|\").at(-1) ?? path;\n}\n"],
|
|
5
|
+
"mappings": "AA8CO,IAAMA,EAAyB,CAClC,YACA,YACA,UACA,OACA,QACA,MACA,OACA,SACA,SACA,wBACJ,EAGaC,EAA4B,CACrC,WACA,QACJ,EAGO,SAASC,EACZC,EACuB,CACvB,OAAOH,EAAuB,KAAMI,GAAQD,IAAMC,CAAG,IAAM,MAAS,CACxE,CASO,SAASC,EACZF,EAC+B,CAC/B,IAAMG,EAA2B,CAAC,EAClC,OAAIH,GAAK,WAAa,SAClBG,EAAI,SAAWH,EAAI,UAGnBA,GAAK,SAAW,SAChBG,EAAI,OAASH,EAAI,QAGd,OAAO,KAAKG,CAAG,EAAE,OAAS,EAAIA,EAAM,MAC/C,CAQA,IAAMC,EAAoE,CACtE,MAAO,CACH,MAAO,UACP,sBAAuB,EACvB,sBAAuB,CAC3B,CACJ,EAMMC,EAAkC,CACpC,UAAW,QACX,UAAW,QACf,EAEMC,EAAuD,CACzD,UAAW,OACf,EAEMC,EAAuD,CACzD,CACI,QACA,WACA,kBACA,eACA,OACA,aACJ,EACA,CAAC,WAAY,gBAAgB,EAC7B,CAAC,wBAAyB,uBAAuB,EACjD,CAAC,2BAA4B,0BAA0B,CAC3D,EAEA,SAASC,EACLC,EACAT,EACwB,CACxB,IAAMU,EAAoC,CAAC,EAC3C,OAAW,CAACC,EAAGC,CAAC,IAAK,OAAO,QAAQZ,GAAO,CAAC,CAAC,EAClBY,GAAM,OACzBF,EAASC,CAAC,EAAIC,GAItB,IAAMC,EAAkC,CAAE,GAAGJ,CAAK,EAClD,QAAWK,KAASP,EAChB,GAAIO,EAAM,KAAMb,GAAQA,KAAOS,CAAQ,EACnC,QAAWT,KAAOa,EACd,OAAOD,EAAOZ,CAAG,EAK7B,OAAO,OAAO,OAAOY,EAAQH,CAAQ,CACzC,CAMO,SAASK,EACZC,EACAhB,EACAiB,EACiB,CAKjB,IAAMR,EAASQ,GACXb,EAAwBY,CAAI,GAC5B,CAAC,EAECE,EAAOlB,EAAMQ,EAAmBC,EAAMT,CAAG,EAAIS,EACnD,OAAO,IAAI,KAAK,aAAa,UAAU,UAAuBS,CAAI,CACtE,CAMO,SAASC,EACZnB,EACAiB,EACAR,EAC0B,CAC1B,IAAMW,EAAS,CAACpB,EAAKiB,EAAUR,CAAI,EAC7BY,EAA0BD,EAAO,KAAKrB,CAAkB,GAAK,CAAC,EAC9DmB,EAAyB,CAAC,EAC1BI,EAAO,CACTrB,EACAsB,IACC,CACGA,IAAS,QAAaA,EAAKtB,CAAG,IAAM,SACpCiB,EAAKjB,CAAG,EAAIsB,EAAKtB,CAAG,EAE5B,EAEA,QAAWA,KAAOJ,EACdyB,EAAKrB,EAAKoB,CAAK,EAGnB,QAAWpB,KAAOH,EACdwB,EACIrB,EACAmB,EAAO,KAAMI,GAAUA,IAAQvB,CAAG,IAAM,MAAS,CACrD,EAGJ,OAAOiB,CACX,CAMO,SAASO,EACZzB,EACAiB,EACmB,CACnB,OAAO,IAAI,KAAK,eACZ,UAAU,UACVE,EAAkBnB,EAAKiB,EAAUZ,CAAa,CAClD,CACJ,CAMO,SAASqB,EACZ1B,EACAiB,EACmB,CACnB,GAAM,CAAE,UAAAU,CAAU,EAAIR,EAAkBnB,EAAKiB,EAAUX,CAAS,EAChE,OAAO,IAAI,KAAK,eAAe,UAAU,UAAuB,CAC5D,SAAU,MACV,UAAWqB,GAAarB,EAAU,SACtC,CAAC,CACL,CAQO,SAASsB,EAAaC,EAAsB,CAC/C,OAAOA,EAAK,MAAM,GAAG,EAAE,GAAG,EAAE,GAAKA,CACrC",
|
|
6
|
+
"names": ["DATE_FORMAT_SHAPE_KEYS", "DATE_FORMAT_MODIFIER_KEYS", "hasDateFormatShape", "cfg", "key", "dateFormatModifiers", "out", "NUMERIC_LEGACY_DEFAULTS", "DATETIME_BASE", "DATE_BASE", "NUMBER_FORMAT_GROUPS", "mergeNumberOptions", "base", "explicit", "k", "v", "merged", "group", "createNumberFormatter", "type", "defaults", "opts", "resolveDateFormat", "layers", "shape", "copy", "from", "layer", "createDatetimeFormatter", "createDateFormatter", "dateStyle", "sourceColumn", "path"]
|
|
7
7
|
}
|
package/dist/esm/extensions.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type { HTMLPerspectiveViewerPluginElement } from "./plugin";
|
|
1
|
+
import type { HTMLPerspectiveViewerPluginElement } from "./plugin.ts";
|
|
2
2
|
import type { PerspectiveViewerElement } from "../../dist/wasm/perspective-viewer.js";
|
|
3
3
|
import type React from "react";
|
|
4
|
-
import type { ViewerConfigUpdate } from "
|
|
5
|
-
import type { ViewWindow, Filter } from "@perspective-dev/client";
|
|
4
|
+
import type { ViewerConfigUpdate } from "../../dist/ts-rs/ViewerConfigUpdate.d.ts";
|
|
5
|
+
import type { ColumnType, ViewWindow, Filter } from "@perspective-dev/client";
|
|
6
|
+
import type { ConfigDefaultsOptions } from "../../dist/ts-rs/ConfigDefaultsOptions.d.ts";
|
|
7
|
+
import type { ColumnConfigDefaultsOptions } from "../../dist/ts-rs/ColumnConfigDefaultsOptions.d.ts";
|
|
6
8
|
import type { PerspectiveSelectDetail } from "./select-detail.ts";
|
|
7
9
|
export { PerspectiveSelectDetail } from "./select-detail.ts";
|
|
8
10
|
export type HTMLPerspectiveViewerElement = PerspectiveViewerElement & PerspectiveViewerElementExt & HTMLElement;
|
|
@@ -15,6 +17,19 @@ export type PerspectiveClickEventDetail = {
|
|
|
15
17
|
export type PerspectiveSelectEventDetail = {
|
|
16
18
|
view_window: ViewWindow;
|
|
17
19
|
};
|
|
20
|
+
export type PerspectiveLayoutUpdateEventDetail = {
|
|
21
|
+
panels: string[];
|
|
22
|
+
};
|
|
23
|
+
export type PerspectiveActivePanelUpdateEventDetail = {
|
|
24
|
+
panel: string | null;
|
|
25
|
+
};
|
|
26
|
+
export type PerspectiveColumnStyleChangeEventDetail = Record<string, Record<string, unknown>> & {
|
|
27
|
+
panel?: string;
|
|
28
|
+
};
|
|
29
|
+
export type PerspectiveToggleColumnSettingsEventDetail = {
|
|
30
|
+
open: boolean;
|
|
31
|
+
column_name: string | null;
|
|
32
|
+
};
|
|
18
33
|
export type PerspectiveConfigUpdateEventDetail = {
|
|
19
34
|
/**
|
|
20
35
|
* Serialize the panel config that triggered this event, ON DEMAND. The
|
|
@@ -87,36 +102,131 @@ export interface PerspectiveViewerElementExt {
|
|
|
87
102
|
* ```
|
|
88
103
|
*/
|
|
89
104
|
registerPlugin(name: string): Promise<void>;
|
|
105
|
+
/**
|
|
106
|
+
* Merge `defaults` into the `plugin_config` defaults every
|
|
107
|
+
* `<perspective-viewer>` on the page applies.
|
|
108
|
+
*
|
|
109
|
+
* @category Plugin
|
|
110
|
+
* @param defaults Values keyed like `plugin_config`, where `null` removes
|
|
111
|
+
* a default, or `null` to clear the slot.
|
|
112
|
+
* @param options `plugin` limits the defaults to one plugin.
|
|
113
|
+
* @example
|
|
114
|
+
* ```javascript
|
|
115
|
+
* customElements
|
|
116
|
+
* .get("perspective-viewer")
|
|
117
|
+
* .setPluginConfigDefaults({ group_pad: 10 });
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
setPluginConfigDefaults(defaults: Record<string, unknown> | null, options?: ConfigDefaultsOptions): void;
|
|
121
|
+
/**
|
|
122
|
+
* Merge `defaults` into the `columns_config` defaults every
|
|
123
|
+
* `<perspective-viewer>` on the page applies.
|
|
124
|
+
*
|
|
125
|
+
* @category Plugin
|
|
126
|
+
* @param defaults Values keyed like one `columns_config` entry, where
|
|
127
|
+
* `null` removes a default, or `null` to clear the slot.
|
|
128
|
+
* @param options `plugin` limits the defaults to one plugin, `type` to
|
|
129
|
+
* columns of one view type.
|
|
130
|
+
* @example
|
|
131
|
+
* ```javascript
|
|
132
|
+
* customElements
|
|
133
|
+
* .get("perspective-viewer")
|
|
134
|
+
* .setColumnConfigDefaults(
|
|
135
|
+
* { date_format: { timeZone: "UTC" } },
|
|
136
|
+
* { type: "datetime" },
|
|
137
|
+
* );
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
setColumnConfigDefaults(defaults: Record<string, unknown> | null, options?: ColumnConfigDefaultsOptions): void;
|
|
141
|
+
/**
|
|
142
|
+
* The `plugin_config` defaults set by `setPluginConfigDefaults()`, one
|
|
143
|
+
* entry per slot.
|
|
144
|
+
*
|
|
145
|
+
* @category Plugin
|
|
146
|
+
*/
|
|
147
|
+
getPluginConfigDefaults(): Array<{
|
|
148
|
+
plugin?: string;
|
|
149
|
+
defaults: Record<string, unknown>;
|
|
150
|
+
}>;
|
|
151
|
+
/**
|
|
152
|
+
* The `columns_config` defaults set by `setColumnConfigDefaults()`, one
|
|
153
|
+
* entry per slot.
|
|
154
|
+
*
|
|
155
|
+
* @category Plugin
|
|
156
|
+
*/
|
|
157
|
+
getColumnConfigDefaults(): Array<{
|
|
158
|
+
plugin?: string;
|
|
159
|
+
type?: ColumnType;
|
|
160
|
+
defaults: Record<string, unknown>;
|
|
161
|
+
}>;
|
|
90
162
|
get_wasm_module(): WebAssembly.Module;
|
|
91
163
|
get_worker_url(): URL;
|
|
92
|
-
|
|
164
|
+
/** Fires when a plugin's grid or chart is clicked, with the clicked row and a `config` whose filters reproduce it. */
|
|
165
|
+
addEventListener(name: "perspective-click", cb: (e: CustomEvent<PerspectiveClickEventDetail>) => void, options?: {
|
|
93
166
|
signal: AbortSignal;
|
|
94
167
|
}): void;
|
|
95
|
-
|
|
168
|
+
/** Fires when a plugin's selection changes, with the configs whose filters to insert and remove. */
|
|
169
|
+
addEventListener(name: "perspective-select", cb: (e: CustomEvent<PerspectiveSelectDetail>) => void, options?: {
|
|
96
170
|
signal: AbortSignal;
|
|
97
171
|
}): void;
|
|
172
|
+
/** Fires on a master panel's selection, before it is applied to the global filter set. */
|
|
98
173
|
addEventListener(name: "perspective-global-filter", cb: (e: CustomEvent<PerspectiveSelectDetail>) => void, options?: {
|
|
99
174
|
signal: AbortSignal;
|
|
100
175
|
}): void;
|
|
176
|
+
/** Fires whenever the global filter set changes, with the new `Filter[]`. */
|
|
101
177
|
addEventListener(name: "perspective-global-filter-update", cb: (e: CustomEvent<Filter[]>) => void, options?: {
|
|
102
178
|
signal: AbortSignal;
|
|
103
179
|
}): void;
|
|
104
|
-
|
|
180
|
+
/** Fires after the settings sidebar opens or closes, with the new open state. */
|
|
181
|
+
addEventListener(name: "perspective-toggle-settings", cb: (e: CustomEvent<boolean>) => void, options?: {
|
|
182
|
+
signal: AbortSignal;
|
|
183
|
+
}): void;
|
|
184
|
+
/** Fires before the settings sidebar opens or closes, with the pending open state. */
|
|
185
|
+
addEventListener(name: "perspective-toggle-settings-before", cb: (e: CustomEvent<boolean>) => void, options?: {
|
|
105
186
|
signal: AbortSignal;
|
|
106
187
|
}): void;
|
|
107
|
-
|
|
188
|
+
/** Fires when the column settings sidebar opens or closes, with the column it shows. */
|
|
189
|
+
addEventListener(name: "perspective-toggle-column-settings", cb: (e: CustomEvent<PerspectiveToggleColumnSettingsEventDetail>) => void, options?: {
|
|
108
190
|
signal: AbortSignal;
|
|
109
191
|
}): void;
|
|
192
|
+
/** Fires after a panel's view config changes, with a deferred `getConfig()` accessor valid only during dispatch. */
|
|
110
193
|
addEventListener(name: "perspective-config-update", cb: (e: CustomEvent<PerspectiveConfigUpdateEventDetail>) => void, options?: {
|
|
111
194
|
signal: AbortSignal;
|
|
112
195
|
}): void;
|
|
113
|
-
|
|
196
|
+
/** Fires when a panel's active plugin changes, with the new plugin element as its detail. */
|
|
197
|
+
addEventListener(name: "perspective-plugin-update", cb: (e: CustomEvent<HTMLPerspectiveViewerPluginElement>) => void, options?: {
|
|
198
|
+
signal: AbortSignal;
|
|
199
|
+
}): void;
|
|
200
|
+
/** Fires when a panel's per-column style config changes, keyed by column name. */
|
|
201
|
+
addEventListener(name: "perspective-column-style-change", cb: (e: CustomEvent<PerspectiveColumnStyleChangeEventDetail>) => void, options?: {
|
|
202
|
+
signal: AbortSignal;
|
|
203
|
+
}): void;
|
|
204
|
+
/** Fires when a panel is added to or removed from the layout, with the placed panel ids in order. */
|
|
205
|
+
addEventListener(name: "perspective-layout-update", cb: (e: CustomEvent<PerspectiveLayoutUpdateEventDetail>) => void, options?: {
|
|
206
|
+
signal: AbortSignal;
|
|
207
|
+
}): void;
|
|
208
|
+
/** Fires when the active panel changes, with its id or `null` at zero panels. */
|
|
209
|
+
addEventListener(name: "perspective-active-panel-update", cb: (e: CustomEvent<PerspectiveActivePanelUpdateEventDetail>) => void, options?: {
|
|
210
|
+
signal: AbortSignal;
|
|
211
|
+
}): void;
|
|
212
|
+
/** Fires with the original `pointerdown` as its detail when the status bar is pressed. */
|
|
213
|
+
addEventListener(name: "perspective-statusbar-pointerdown", cb: (e: CustomEvent<PointerEvent>) => void, options?: {
|
|
214
|
+
signal: AbortSignal;
|
|
215
|
+
}): void;
|
|
216
|
+
/** Fires when a panel's status indicator is clicked. */
|
|
217
|
+
addEventListener(name: "perspective-status-indicator-click", cb: (e: CustomEvent<undefined>) => void, options?: {
|
|
218
|
+
signal: AbortSignal;
|
|
219
|
+
}): void;
|
|
220
|
+
/** Fires when the agent invokes a tool, with a JSON string of `{name, args}` as its detail. */
|
|
221
|
+
addEventListener(name: "perspective-agent-tool", cb: (e: CustomEvent<string>) => void, options?: {
|
|
114
222
|
signal: AbortSignal;
|
|
115
223
|
}): void;
|
|
116
|
-
|
|
224
|
+
/** Fires after a panel's `Table` is deleted and the panel unloaded. */
|
|
225
|
+
addEventListener(name: "perspective-table-delete", cb: (e: CustomEvent<undefined>) => void, options?: {
|
|
117
226
|
signal: AbortSignal;
|
|
118
227
|
}): void;
|
|
119
|
-
|
|
228
|
+
/** Fires before a panel's `Table` is deleted, while its `View` is still live. */
|
|
229
|
+
addEventListener(name: "perspective-table-delete-before", cb: (e: CustomEvent<undefined>) => void, options?: {
|
|
120
230
|
signal: AbortSignal;
|
|
121
231
|
}): void;
|
|
122
232
|
removeEventListener(name: "perspective-click", cb: any): void;
|
|
@@ -125,8 +235,15 @@ export interface PerspectiveViewerElementExt {
|
|
|
125
235
|
removeEventListener(name: "perspective-global-filter-update", cb: any): void;
|
|
126
236
|
removeEventListener(name: "perspective-toggle-settings", cb: any): void;
|
|
127
237
|
removeEventListener(name: "perspective-toggle-settings-before", cb: any): void;
|
|
238
|
+
removeEventListener(name: "perspective-toggle-column-settings", cb: any): void;
|
|
128
239
|
removeEventListener(name: "perspective-config-update", cb: any): void;
|
|
240
|
+
removeEventListener(name: "perspective-plugin-update", cb: any): void;
|
|
241
|
+
removeEventListener(name: "perspective-column-style-change", cb: any): void;
|
|
242
|
+
removeEventListener(name: "perspective-layout-update", cb: any): void;
|
|
243
|
+
removeEventListener(name: "perspective-active-panel-update", cb: any): void;
|
|
129
244
|
removeEventListener(name: "perspective-statusbar-pointerdown", cb: any): void;
|
|
245
|
+
removeEventListener(name: "perspective-status-indicator-click", cb: any): void;
|
|
246
|
+
removeEventListener(name: "perspective-agent-tool", cb: any): void;
|
|
130
247
|
removeEventListener(name: "perspective-table-delete", cb: any): void;
|
|
131
248
|
removeEventListener(name: "perspective-table-delete-before", cb: any): void;
|
|
132
249
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference lib="esnext.disposable" preserve="true" />
|
|
1
2
|
/**
|
|
2
3
|
* Module for the `<perspective-viewer>` custom element. This module has no
|
|
3
4
|
* (real) exports, but importing it has a side effect: the
|
|
@@ -19,34 +20,38 @@
|
|
|
19
20
|
* @module perspective-viewer
|
|
20
21
|
*/
|
|
21
22
|
import "regular-layout";
|
|
22
|
-
export { IPerspectiveViewerPlugin } from "./plugin";
|
|
23
|
-
export { HTMLPerspectiveViewerPluginElement } from "./plugin";
|
|
24
|
-
export { providers } from "./providers";
|
|
25
|
-
export type { AgentProviderPreset } from "./providers";
|
|
26
|
-
export { createNumberFormatter, createDatetimeFormatter, createDateFormatter, sourceColumn, } from "./column-format";
|
|
27
|
-
export type { NumberFormatConfig, DateFormatConfig } from "./column-format";
|
|
23
|
+
export type { IPerspectiveViewerPlugin } from "./plugin.ts";
|
|
24
|
+
export { HTMLPerspectiveViewerPluginElement } from "./plugin.ts";
|
|
25
|
+
export { providers } from "./providers.ts";
|
|
26
|
+
export type { AgentProviderPreset } from "./providers.ts";
|
|
27
|
+
export { createNumberFormatter, createDatetimeFormatter, createDateFormatter, sourceColumn, } from "./column-format.ts";
|
|
28
|
+
export type { NumberFormatConfig, DateFormatConfig } from "./column-format.ts";
|
|
28
29
|
export type * from "./extensions.ts";
|
|
29
30
|
export { PerspectiveSelectDetail } from "./select-detail.ts";
|
|
30
|
-
export type * from "
|
|
31
|
-
export type * from "
|
|
32
|
-
export type * from "
|
|
33
|
-
export type * from "
|
|
34
|
-
export type * from "
|
|
35
|
-
export type * from "
|
|
36
|
-
export type * from "
|
|
37
|
-
export type * from "
|
|
38
|
-
export type * from "
|
|
39
|
-
export type * from "
|
|
40
|
-
export type * from "
|
|
41
|
-
export type * from "
|
|
42
|
-
export type * from "
|
|
43
|
-
export type * from "
|
|
44
|
-
export type * from "
|
|
45
|
-
export type * from "
|
|
46
|
-
export type * from "
|
|
47
|
-
export { init_client } from "./bootstrap";
|
|
48
|
-
|
|
31
|
+
export type * from "../../dist/ts-rs/ViewerConfigUpdate.d.ts";
|
|
32
|
+
export type * from "../../dist/ts-rs/ViewerConfig.d.ts";
|
|
33
|
+
export type * from "../../dist/ts-rs/WorkspaceConfigUpdate.d.ts";
|
|
34
|
+
export type * from "../../dist/ts-rs/WorkspaceConfig.d.ts";
|
|
35
|
+
export type * from "../../dist/ts-rs/Filter.d.ts";
|
|
36
|
+
export type * from "../../dist/ts-rs/FilterTerm.d.ts";
|
|
37
|
+
export type * from "../../dist/ts-rs/FilterReducer.d.ts";
|
|
38
|
+
export type * from "../../dist/ts-rs/PluginStaticConfig.d.ts";
|
|
39
|
+
export type * from "../../dist/ts-rs/ExportMethod.d.ts";
|
|
40
|
+
export type * from "../../dist/ts-rs/PanelOptions.d.ts";
|
|
41
|
+
export type * from "../../dist/ts-rs/SaveWorkspaceOptions.d.ts";
|
|
42
|
+
export type * from "../../dist/ts-rs/ClientOptions.d.ts";
|
|
43
|
+
export type * from "../../dist/ts-rs/ExportOptions.d.ts";
|
|
44
|
+
export type * from "../../dist/ts-rs/GetTableOptions.d.ts";
|
|
45
|
+
export type * from "../../dist/ts-rs/GetClientOptions.d.ts";
|
|
46
|
+
export type * from "../../dist/ts-rs/GetViewOptions.d.ts";
|
|
47
|
+
export type * from "../../dist/ts-rs/GetViewMode.d.ts";
|
|
48
|
+
export { init, init_client, migrate } from "./bootstrap.ts";
|
|
49
|
+
export type { InitOptions, ViewerWasmRegistration, ViewerWasmSource, WasmBinary, WasmRegistration, WasmSource, } from "./bootstrap.ts";
|
|
50
|
+
export type { MigrateKind, MigrateNotice, MigrateResult, } from "@perspective-dev/client";
|
|
51
|
+
import { init, init_client, migrate } from "./bootstrap.ts";
|
|
49
52
|
declare const _default: {
|
|
53
|
+
init: typeof init;
|
|
50
54
|
init_client: typeof init_client;
|
|
55
|
+
migrate: typeof migrate;
|
|
51
56
|
};
|
|
52
57
|
export default _default;
|