photon-grid-core 0.0.1
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/LICENSE +1 -0
- package/README.md +0 -0
- package/cell-selection/active-grid-registry.d.ts +37 -0
- package/cell-selection/active-grid-registry.d.ts.map +1 -0
- package/cell-selection/active-grid-registry.js +25 -0
- package/cell-selection/active-grid-registry.js.map +1 -0
- package/cell-selection/cell-selection-engine.d.ts +336 -0
- package/cell-selection/cell-selection-engine.d.ts.map +1 -0
- package/cell-selection/cell-selection-engine.js +1534 -0
- package/cell-selection/cell-selection-engine.js.map +1 -0
- package/cell-selection/selection-range.d.ts +16 -0
- package/cell-selection/selection-range.d.ts.map +1 -0
- package/cell-selection/selection-range.js +48 -0
- package/cell-selection/selection-range.js.map +1 -0
- package/cell-selection/selection-renderer.d.ts +24 -0
- package/cell-selection/selection-renderer.d.ts.map +1 -0
- package/cell-selection/selection-renderer.js +107 -0
- package/cell-selection/selection-renderer.js.map +1 -0
- package/chart/chart-analyzer/aggregation-analyzer.d.ts +18 -0
- package/chart/chart-analyzer/aggregation-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/aggregation-analyzer.js +63 -0
- package/chart/chart-analyzer/aggregation-analyzer.js.map +1 -0
- package/chart/chart-analyzer/bar-analyzer.d.ts +19 -0
- package/chart/chart-analyzer/bar-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/bar-analyzer.js +56 -0
- package/chart/chart-analyzer/bar-analyzer.js.map +1 -0
- package/chart/chart-analyzer/bubble-analyzer.d.ts +16 -0
- package/chart/chart-analyzer/bubble-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/bubble-analyzer.js +61 -0
- package/chart/chart-analyzer/bubble-analyzer.js.map +1 -0
- package/chart/chart-analyzer/cardinality-analyzer.d.ts +13 -0
- package/chart/chart-analyzer/cardinality-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/cardinality-analyzer.js +28 -0
- package/chart/chart-analyzer/cardinality-analyzer.js.map +1 -0
- package/chart/chart-analyzer/dimension-analyzer.d.ts +12 -0
- package/chart/chart-analyzer/dimension-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/dimension-analyzer.js +33 -0
- package/chart/chart-analyzer/dimension-analyzer.js.map +1 -0
- package/chart/chart-analyzer/histogram-analyzer.d.ts +11 -0
- package/chart/chart-analyzer/histogram-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/histogram-analyzer.js +43 -0
- package/chart/chart-analyzer/histogram-analyzer.js.map +1 -0
- package/chart/chart-analyzer/index.d.ts +58 -0
- package/chart/chart-analyzer/index.d.ts.map +1 -0
- package/chart/chart-analyzer/index.js +130 -0
- package/chart/chart-analyzer/index.js.map +1 -0
- package/chart/chart-analyzer/line-analyzer.d.ts +23 -0
- package/chart/chart-analyzer/line-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/line-analyzer.js +61 -0
- package/chart/chart-analyzer/line-analyzer.js.map +1 -0
- package/chart/chart-analyzer/measure-analyzer.d.ts +11 -0
- package/chart/chart-analyzer/measure-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/measure-analyzer.js +44 -0
- package/chart/chart-analyzer/measure-analyzer.js.map +1 -0
- package/chart/chart-analyzer/pie-analyzer.d.ts +19 -0
- package/chart/chart-analyzer/pie-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/pie-analyzer.js +64 -0
- package/chart/chart-analyzer/pie-analyzer.js.map +1 -0
- package/chart/chart-analyzer/recommendation-engine.d.ts +18 -0
- package/chart/chart-analyzer/recommendation-engine.d.ts.map +1 -0
- package/chart/chart-analyzer/recommendation-engine.js +82 -0
- package/chart/chart-analyzer/recommendation-engine.js.map +1 -0
- package/chart/chart-analyzer/scatter-analyzer.d.ts +16 -0
- package/chart/chart-analyzer/scatter-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer/scatter-analyzer.js +70 -0
- package/chart/chart-analyzer/scatter-analyzer.js.map +1 -0
- package/chart/chart-analyzer/types.d.ts +52 -0
- package/chart/chart-analyzer/types.d.ts.map +1 -0
- package/chart/chart-analyzer/types.js +10 -0
- package/chart/chart-analyzer/types.js.map +1 -0
- package/chart/chart-analyzer.d.ts +12 -0
- package/chart/chart-analyzer.d.ts.map +1 -0
- package/chart/chart-analyzer.js +77 -0
- package/chart/chart-analyzer.js.map +1 -0
- package/chart/chart-data-transformer.d.ts +26 -0
- package/chart/chart-data-transformer.d.ts.map +1 -0
- package/chart/chart-data-transformer.js +93 -0
- package/chart/chart-data-transformer.js.map +1 -0
- package/chart/chart-engine.d.ts +38 -0
- package/chart/chart-engine.d.ts.map +1 -0
- package/chart/chart-engine.js +96 -0
- package/chart/chart-engine.js.map +1 -0
- package/chart/chart-panel.d.ts +54 -0
- package/chart/chart-panel.d.ts.map +1 -0
- package/chart/chart-panel.js +350 -0
- package/chart/chart-panel.js.map +1 -0
- package/chart/chart-renderer.d.ts +93 -0
- package/chart/chart-renderer.d.ts.map +1 -0
- package/chart/chart-renderer.js +1330 -0
- package/chart/chart-renderer.js.map +1 -0
- package/chart/sparkline/sparkline-renderer.d.ts +269 -0
- package/chart/sparkline/sparkline-renderer.d.ts.map +1 -0
- package/chart/sparkline/sparkline-renderer.js +875 -0
- package/chart/sparkline/sparkline-renderer.js.map +1 -0
- package/chart/sparkline/sparkline.types.d.ts +214 -0
- package/chart/sparkline/sparkline.types.d.ts.map +1 -0
- package/chart/sparkline/sparkline.types.js +8 -0
- package/chart/sparkline/sparkline.types.js.map +1 -0
- package/column-groups/column-group-drag-handler.d.ts +169 -0
- package/column-groups/column-group-drag-handler.d.ts.map +1 -0
- package/column-groups/column-group-drag-handler.js +517 -0
- package/column-groups/column-group-drag-handler.js.map +1 -0
- package/column-groups/column-group-header-builder.d.ts +106 -0
- package/column-groups/column-group-header-builder.d.ts.map +1 -0
- package/column-groups/column-group-header-builder.js +311 -0
- package/column-groups/column-group-header-builder.js.map +1 -0
- package/column-groups/column-group-model.d.ts +248 -0
- package/column-groups/column-group-model.d.ts.map +1 -0
- package/column-groups/column-group-model.js +668 -0
- package/column-groups/column-group-model.js.map +1 -0
- package/column-groups/column-group-state-manager.d.ts +110 -0
- package/column-groups/column-group-state-manager.d.ts.map +1 -0
- package/column-groups/column-group-state-manager.js +153 -0
- package/column-groups/column-group-state-manager.js.map +1 -0
- package/column-groups/column-group.types.d.ts +250 -0
- package/column-groups/column-group.types.d.ts.map +1 -0
- package/column-groups/column-group.types.js +20 -0
- package/column-groups/column-group.types.js.map +1 -0
- package/column-groups/display-group-builder.d.ts +91 -0
- package/column-groups/display-group-builder.d.ts.map +1 -0
- package/column-groups/display-group-builder.js +225 -0
- package/column-groups/display-group-builder.js.map +1 -0
- package/column-groups/display-group-drag-handler.d.ts +205 -0
- package/column-groups/display-group-drag-handler.d.ts.map +1 -0
- package/column-groups/display-group-drag-handler.js +536 -0
- package/column-groups/display-group-drag-handler.js.map +1 -0
- package/column-groups/display-group-engine.d.ts +310 -0
- package/column-groups/display-group-engine.d.ts.map +1 -0
- package/column-groups/display-group-engine.js +549 -0
- package/column-groups/display-group-engine.js.map +1 -0
- package/column-groups/display-group-header-builder.d.ts +94 -0
- package/column-groups/display-group-header-builder.d.ts.map +1 -0
- package/column-groups/display-group-header-builder.js +224 -0
- package/column-groups/display-group-header-builder.js.map +1 -0
- package/column-groups/display-group.types.d.ts +140 -0
- package/column-groups/display-group.types.d.ts.map +1 -0
- package/column-groups/display-group.types.js +2 -0
- package/column-groups/display-group.types.js.map +1 -0
- package/column-groups/index.d.ts +25 -0
- package/column-groups/index.d.ts.map +1 -0
- package/column-groups/index.js +26 -0
- package/column-groups/index.js.map +1 -0
- package/column-groups/logical-group-registry.d.ts +77 -0
- package/column-groups/logical-group-registry.d.ts.map +1 -0
- package/column-groups/logical-group-registry.js +118 -0
- package/column-groups/logical-group-registry.js.map +1 -0
- package/core/column-model.d.ts +30 -0
- package/core/column-model.d.ts.map +1 -0
- package/core/column-model.js +203 -0
- package/core/column-model.js.map +1 -0
- package/core/grid-api.d.ts +187 -0
- package/core/grid-api.d.ts.map +1 -0
- package/core/grid-api.js +569 -0
- package/core/grid-api.js.map +1 -0
- package/core/grid-context.d.ts +61 -0
- package/core/grid-context.d.ts.map +1 -0
- package/core/grid-context.js +2 -0
- package/core/grid-context.js.map +1 -0
- package/core/grid-core.d.ts +49 -0
- package/core/grid-core.d.ts.map +1 -0
- package/core/grid-core.js +675 -0
- package/core/grid-core.js.map +1 -0
- package/core/grid-store.d.ts +62 -0
- package/core/grid-store.d.ts.map +1 -0
- package/core/grid-store.js +104 -0
- package/core/grid-store.js.map +1 -0
- package/core/row-model.d.ts +32 -0
- package/core/row-model.d.ts.map +1 -0
- package/core/row-model.js +150 -0
- package/core/row-model.js.map +1 -0
- package/drag-drop/drag-autoscroll.d.ts +14 -0
- package/drag-drop/drag-autoscroll.d.ts.map +1 -0
- package/drag-drop/drag-autoscroll.js +66 -0
- package/drag-drop/drag-autoscroll.js.map +1 -0
- package/drag-drop/drag-drop-engine.d.ts +55 -0
- package/drag-drop/drag-drop-engine.d.ts.map +1 -0
- package/drag-drop/drag-drop-engine.js +179 -0
- package/drag-drop/drag-drop-engine.js.map +1 -0
- package/drag-drop/drag-preview.d.ts +32 -0
- package/drag-drop/drag-preview.d.ts.map +1 -0
- package/drag-drop/drag-preview.js +74 -0
- package/drag-drop/drag-preview.js.map +1 -0
- package/engines/aggregation/aggregation-engine.d.ts +66 -0
- package/engines/aggregation/aggregation-engine.d.ts.map +1 -0
- package/engines/aggregation/aggregation-engine.js +149 -0
- package/engines/aggregation/aggregation-engine.js.map +1 -0
- package/engines/clipboard/clipboard-engine.d.ts +89 -0
- package/engines/clipboard/clipboard-engine.d.ts.map +1 -0
- package/engines/clipboard/clipboard-engine.js +323 -0
- package/engines/clipboard/clipboard-engine.js.map +1 -0
- package/engines/editing/cell-editor-engine.d.ts +62 -0
- package/engines/editing/cell-editor-engine.d.ts.map +1 -0
- package/engines/editing/cell-editor-engine.js +359 -0
- package/engines/editing/cell-editor-engine.js.map +1 -0
- package/engines/editing/custom-dropdown-editor.d.ts +99 -0
- package/engines/editing/custom-dropdown-editor.d.ts.map +1 -0
- package/engines/editing/custom-dropdown-editor.js +355 -0
- package/engines/editing/custom-dropdown-editor.js.map +1 -0
- package/engines/editing/value-parser.d.ts +12 -0
- package/engines/editing/value-parser.d.ts.map +1 -0
- package/engines/editing/value-parser.js +125 -0
- package/engines/editing/value-parser.js.map +1 -0
- package/engines/export/export-engine.d.ts +16 -0
- package/engines/export/export-engine.d.ts.map +1 -0
- package/engines/export/export-engine.js +99 -0
- package/engines/export/export-engine.js.map +1 -0
- package/engines/filter/filter-condition.d.ts +7 -0
- package/engines/filter/filter-condition.d.ts.map +1 -0
- package/engines/filter/filter-condition.js +126 -0
- package/engines/filter/filter-condition.js.map +1 -0
- package/engines/filter/filter-engine.d.ts +35 -0
- package/engines/filter/filter-engine.d.ts.map +1 -0
- package/engines/filter/filter-engine.js +150 -0
- package/engines/filter/filter-engine.js.map +1 -0
- package/engines/filter/filter-panel.d.ts +103 -0
- package/engines/filter/filter-panel.d.ts.map +1 -0
- package/engines/filter/filter-panel.js +645 -0
- package/engines/filter/filter-panel.js.map +1 -0
- package/engines/grouping/group-node.d.ts +21 -0
- package/engines/grouping/group-node.d.ts.map +1 -0
- package/engines/grouping/group-node.js +96 -0
- package/engines/grouping/group-node.js.map +1 -0
- package/engines/grouping/grouping-engine.d.ts +33 -0
- package/engines/grouping/grouping-engine.d.ts.map +1 -0
- package/engines/grouping/grouping-engine.js +118 -0
- package/engines/grouping/grouping-engine.js.map +1 -0
- package/engines/master-detail/master-detail-engine.d.ts +77 -0
- package/engines/master-detail/master-detail-engine.d.ts.map +1 -0
- package/engines/master-detail/master-detail-engine.js +199 -0
- package/engines/master-detail/master-detail-engine.js.map +1 -0
- package/engines/pagination/pagination-engine.d.ts +33 -0
- package/engines/pagination/pagination-engine.d.ts.map +1 -0
- package/engines/pagination/pagination-engine.js +110 -0
- package/engines/pagination/pagination-engine.js.map +1 -0
- package/engines/selection/row-selection-engine.d.ts +26 -0
- package/engines/selection/row-selection-engine.d.ts.map +1 -0
- package/engines/selection/row-selection-engine.js +145 -0
- package/engines/selection/row-selection-engine.js.map +1 -0
- package/engines/sort/sort-comparator.d.ts +43 -0
- package/engines/sort/sort-comparator.d.ts.map +1 -0
- package/engines/sort/sort-comparator.js +113 -0
- package/engines/sort/sort-comparator.js.map +1 -0
- package/engines/sort/sort-engine.d.ts +67 -0
- package/engines/sort/sort-engine.d.ts.map +1 -0
- package/engines/sort/sort-engine.js +178 -0
- package/engines/sort/sort-engine.js.map +1 -0
- package/engines/summary/summary-engine.d.ts +17 -0
- package/engines/summary/summary-engine.d.ts.map +1 -0
- package/engines/summary/summary-engine.js +72 -0
- package/engines/summary/summary-engine.js.map +1 -0
- package/engines/tree/tree-data-service.d.ts +117 -0
- package/engines/tree/tree-data-service.d.ts.map +1 -0
- package/engines/tree/tree-data-service.js +296 -0
- package/engines/tree/tree-data-service.js.map +1 -0
- package/engines/tree/tree-expansion-service.d.ts +35 -0
- package/engines/tree/tree-expansion-service.d.ts.map +1 -0
- package/engines/tree/tree-expansion-service.js +84 -0
- package/engines/tree/tree-expansion-service.js.map +1 -0
- package/engines/tree/tree-node.d.ts +40 -0
- package/engines/tree/tree-node.d.ts.map +1 -0
- package/engines/tree/tree-node.js +199 -0
- package/engines/tree/tree-node.js.map +1 -0
- package/engines/tree/tree-selection-service.d.ts +35 -0
- package/engines/tree/tree-selection-service.d.ts.map +1 -0
- package/engines/tree/tree-selection-service.js +72 -0
- package/engines/tree/tree-selection-service.js.map +1 -0
- package/engines/undo-redo/undo-redo-engine.d.ts +114 -0
- package/engines/undo-redo/undo-redo-engine.d.ts.map +1 -0
- package/engines/undo-redo/undo-redo-engine.js +165 -0
- package/engines/undo-redo/undo-redo-engine.js.map +1 -0
- package/event-bus/event-bus.d.ts +21 -0
- package/event-bus/event-bus.d.ts.map +1 -0
- package/event-bus/event-bus.js +106 -0
- package/event-bus/event-bus.js.map +1 -0
- package/icons/icon-registry.d.ts +19 -0
- package/icons/icon-registry.d.ts.map +1 -0
- package/icons/icon-registry.js +37 -0
- package/icons/icon-registry.js.map +1 -0
- package/icons/icon-renderer.d.ts +18 -0
- package/icons/icon-renderer.d.ts.map +1 -0
- package/icons/icon-renderer.js +75 -0
- package/icons/icon-renderer.js.map +1 -0
- package/icons/icon-sets/core-icons.d.ts +2 -0
- package/icons/icon-sets/core-icons.d.ts.map +1 -0
- package/icons/icon-sets/core-icons.js +48 -0
- package/icons/icon-sets/core-icons.js.map +1 -0
- package/index.d.ts +72 -0
- package/index.d.ts.map +1 -0
- package/index.js +54 -0
- package/index.js.map +1 -0
- package/package.json +64 -0
- package/photon-ai/builtins/filter.commands.d.ts +4 -0
- package/photon-ai/builtins/filter.commands.d.ts.map +1 -0
- package/photon-ai/builtins/filter.commands.js +189 -0
- package/photon-ai/builtins/filter.commands.js.map +1 -0
- package/photon-ai/builtins/grouping.commands.d.ts +4 -0
- package/photon-ai/builtins/grouping.commands.d.ts.map +1 -0
- package/photon-ai/builtins/grouping.commands.js +115 -0
- package/photon-ai/builtins/grouping.commands.js.map +1 -0
- package/photon-ai/builtins/index.d.ts +10 -0
- package/photon-ai/builtins/index.d.ts.map +1 -0
- package/photon-ai/builtins/index.js +26 -0
- package/photon-ai/builtins/index.js.map +1 -0
- package/photon-ai/builtins/info.commands.d.ts +4 -0
- package/photon-ai/builtins/info.commands.d.ts.map +1 -0
- package/photon-ai/builtins/info.commands.js +201 -0
- package/photon-ai/builtins/info.commands.js.map +1 -0
- package/photon-ai/builtins/move.commands.d.ts +4 -0
- package/photon-ai/builtins/move.commands.d.ts.map +1 -0
- package/photon-ai/builtins/move.commands.js +53 -0
- package/photon-ai/builtins/move.commands.js.map +1 -0
- package/photon-ai/builtins/pin.commands.d.ts +4 -0
- package/photon-ai/builtins/pin.commands.d.ts.map +1 -0
- package/photon-ai/builtins/pin.commands.js +106 -0
- package/photon-ai/builtins/pin.commands.js.map +1 -0
- package/photon-ai/builtins/selection.commands.d.ts +4 -0
- package/photon-ai/builtins/selection.commands.d.ts.map +1 -0
- package/photon-ai/builtins/selection.commands.js +102 -0
- package/photon-ai/builtins/selection.commands.js.map +1 -0
- package/photon-ai/builtins/sort.commands.d.ts +4 -0
- package/photon-ai/builtins/sort.commands.d.ts.map +1 -0
- package/photon-ai/builtins/sort.commands.js +67 -0
- package/photon-ai/builtins/sort.commands.js.map +1 -0
- package/photon-ai/builtins/visibility.commands.d.ts +4 -0
- package/photon-ai/builtins/visibility.commands.d.ts.map +1 -0
- package/photon-ai/builtins/visibility.commands.js +75 -0
- package/photon-ai/builtins/visibility.commands.js.map +1 -0
- package/photon-ai/command-builder.d.ts +21 -0
- package/photon-ai/command-builder.d.ts.map +1 -0
- package/photon-ai/command-builder.js +18 -0
- package/photon-ai/command-builder.js.map +1 -0
- package/photon-ai/command-executor.d.ts +15 -0
- package/photon-ai/command-executor.d.ts.map +1 -0
- package/photon-ai/command-executor.js +26 -0
- package/photon-ai/command-executor.js.map +1 -0
- package/photon-ai/entity-resolver.d.ts +121 -0
- package/photon-ai/entity-resolver.d.ts.map +1 -0
- package/photon-ai/entity-resolver.js +393 -0
- package/photon-ai/entity-resolver.js.map +1 -0
- package/photon-ai/fuzzy-match.d.ts +12 -0
- package/photon-ai/fuzzy-match.d.ts.map +1 -0
- package/photon-ai/fuzzy-match.js +37 -0
- package/photon-ai/fuzzy-match.js.map +1 -0
- package/photon-ai/index.d.ts +15 -0
- package/photon-ai/index.d.ts.map +1 -0
- package/photon-ai/index.js +13 -0
- package/photon-ai/index.js.map +1 -0
- package/photon-ai/intent-parser.d.ts +20 -0
- package/photon-ai/intent-parser.d.ts.map +1 -0
- package/photon-ai/intent-parser.js +52 -0
- package/photon-ai/intent-parser.js.map +1 -0
- package/photon-ai/photon-ai-memory.d.ts +42 -0
- package/photon-ai/photon-ai-memory.d.ts.map +1 -0
- package/photon-ai/photon-ai-memory.js +86 -0
- package/photon-ai/photon-ai-memory.js.map +1 -0
- package/photon-ai/photon-ai-panel.d.ts +54 -0
- package/photon-ai/photon-ai-panel.d.ts.map +1 -0
- package/photon-ai/photon-ai-panel.js +191 -0
- package/photon-ai/photon-ai-panel.js.map +1 -0
- package/photon-ai/photon-ai-registry.d.ts +25 -0
- package/photon-ai/photon-ai-registry.d.ts.map +1 -0
- package/photon-ai/photon-ai-registry.js +41 -0
- package/photon-ai/photon-ai-registry.js.map +1 -0
- package/photon-ai/photon-ai-service.d.ts +71 -0
- package/photon-ai/photon-ai-service.d.ts.map +1 -0
- package/photon-ai/photon-ai-service.js +165 -0
- package/photon-ai/photon-ai-service.js.map +1 -0
- package/photon-ai/photon-ai.types.d.ts +100 -0
- package/photon-ai/photon-ai.types.d.ts.map +1 -0
- package/photon-ai/photon-ai.types.js +2 -0
- package/photon-ai/photon-ai.types.js.map +1 -0
- package/photon-ai/query-splitter.d.ts +22 -0
- package/photon-ai/query-splitter.d.ts.map +1 -0
- package/photon-ai/query-splitter.js +81 -0
- package/photon-ai/query-splitter.js.map +1 -0
- package/photon-ai/text-normalizer.d.ts +33 -0
- package/photon-ai/text-normalizer.d.ts.map +1 -0
- package/photon-ai/text-normalizer.js +132 -0
- package/photon-ai/text-normalizer.js.map +1 -0
- package/renderer/auto-scroller.d.ts +78 -0
- package/renderer/auto-scroller.d.ts.map +1 -0
- package/renderer/auto-scroller.js +141 -0
- package/renderer/auto-scroller.js.map +1 -0
- package/renderer/body-renderer.d.ts +191 -0
- package/renderer/body-renderer.d.ts.map +1 -0
- package/renderer/body-renderer.js +806 -0
- package/renderer/body-renderer.js.map +1 -0
- package/renderer/cell-renderer.d.ts +26 -0
- package/renderer/cell-renderer.d.ts.map +1 -0
- package/renderer/cell-renderer.js +201 -0
- package/renderer/cell-renderer.js.map +1 -0
- package/renderer/column-menu.d.ts +285 -0
- package/renderer/column-menu.d.ts.map +1 -0
- package/renderer/column-menu.js +873 -0
- package/renderer/column-menu.js.map +1 -0
- package/renderer/column-style-manager.d.ts +38 -0
- package/renderer/column-style-manager.d.ts.map +1 -0
- package/renderer/column-style-manager.js +110 -0
- package/renderer/column-style-manager.js.map +1 -0
- package/renderer/detail-row-renderer.d.ts +153 -0
- package/renderer/detail-row-renderer.d.ts.map +1 -0
- package/renderer/detail-row-renderer.js +388 -0
- package/renderer/detail-row-renderer.js.map +1 -0
- package/renderer/dom-utils.d.ts +22 -0
- package/renderer/dom-utils.d.ts.map +1 -0
- package/renderer/dom-utils.js +132 -0
- package/renderer/dom-utils.js.map +1 -0
- package/renderer/footer-renderer.d.ts +25 -0
- package/renderer/footer-renderer.d.ts.map +1 -0
- package/renderer/footer-renderer.js +168 -0
- package/renderer/footer-renderer.js.map +1 -0
- package/renderer/grid-renderer.d.ts +295 -0
- package/renderer/grid-renderer.d.ts.map +1 -0
- package/renderer/grid-renderer.js +1456 -0
- package/renderer/grid-renderer.js.map +1 -0
- package/renderer/group-context-menu.d.ts +79 -0
- package/renderer/group-context-menu.d.ts.map +1 -0
- package/renderer/group-context-menu.js +238 -0
- package/renderer/group-context-menu.js.map +1 -0
- package/renderer/group-drop-zone.d.ts +56 -0
- package/renderer/group-drop-zone.d.ts.map +1 -0
- package/renderer/group-drop-zone.js +376 -0
- package/renderer/group-drop-zone.js.map +1 -0
- package/renderer/header-renderer.d.ts +264 -0
- package/renderer/header-renderer.d.ts.map +1 -0
- package/renderer/header-renderer.js +1321 -0
- package/renderer/header-renderer.js.map +1 -0
- package/renderer/overlay-renderer.d.ts +16 -0
- package/renderer/overlay-renderer.d.ts.map +1 -0
- package/renderer/overlay-renderer.js +64 -0
- package/renderer/overlay-renderer.js.map +1 -0
- package/renderer/renderer-resolver.d.ts +18 -0
- package/renderer/renderer-resolver.d.ts.map +1 -0
- package/renderer/renderer-resolver.js +18 -0
- package/renderer/renderer-resolver.js.map +1 -0
- package/renderer/row-animator.d.ts +72 -0
- package/renderer/row-animator.d.ts.map +1 -0
- package/renderer/row-animator.js +175 -0
- package/renderer/row-animator.js.map +1 -0
- package/renderer/row-drag-renderer.d.ts +58 -0
- package/renderer/row-drag-renderer.d.ts.map +1 -0
- package/renderer/row-drag-renderer.js +395 -0
- package/renderer/row-drag-renderer.js.map +1 -0
- package/renderer/row-offset-search.d.ts +17 -0
- package/renderer/row-offset-search.d.ts.map +1 -0
- package/renderer/row-offset-search.js +31 -0
- package/renderer/row-offset-search.js.map +1 -0
- package/renderer/row-position-sheet.d.ts +11 -0
- package/renderer/row-position-sheet.d.ts.map +1 -0
- package/renderer/row-position-sheet.js +29 -0
- package/renderer/row-position-sheet.js.map +1 -0
- package/renderer/scroll-controller.d.ts +58 -0
- package/renderer/scroll-controller.d.ts.map +1 -0
- package/renderer/scroll-controller.js +200 -0
- package/renderer/scroll-controller.js.map +1 -0
- package/renderer/sticky-row-tracker.d.ts +40 -0
- package/renderer/sticky-row-tracker.d.ts.map +1 -0
- package/renderer/sticky-row-tracker.js +63 -0
- package/renderer/sticky-row-tracker.js.map +1 -0
- package/renderer/tooltip-renderer.d.ts +36 -0
- package/renderer/tooltip-renderer.d.ts.map +1 -0
- package/renderer/tooltip-renderer.js +133 -0
- package/renderer/tooltip-renderer.js.map +1 -0
- package/renderer/tree-cell-renderer.d.ts +37 -0
- package/renderer/tree-cell-renderer.d.ts.map +1 -0
- package/renderer/tree-cell-renderer.js +75 -0
- package/renderer/tree-cell-renderer.js.map +1 -0
- package/renderer/tree-sticky-row-tracker.d.ts +62 -0
- package/renderer/tree-sticky-row-tracker.d.ts.map +1 -0
- package/renderer/tree-sticky-row-tracker.js +120 -0
- package/renderer/tree-sticky-row-tracker.js.map +1 -0
- package/renderer/virtual-scroll-renderer.d.ts +37 -0
- package/renderer/virtual-scroll-renderer.d.ts.map +1 -0
- package/renderer/virtual-scroll-renderer.js +133 -0
- package/renderer/virtual-scroll-renderer.js.map +1 -0
- package/styles/base-styles.d.ts +3 -0
- package/styles/base-styles.d.ts.map +1 -0
- package/styles/base-styles.js +3045 -0
- package/styles/base-styles.js.map +1 -0
- package/styles/themes/theme-alpine.d.ts +2 -0
- package/styles/themes/theme-alpine.d.ts.map +1 -0
- package/styles/themes/theme-alpine.js +120 -0
- package/styles/themes/theme-alpine.js.map +1 -0
- package/styles/themes/theme-balham.d.ts +2 -0
- package/styles/themes/theme-balham.d.ts.map +1 -0
- package/styles/themes/theme-balham.js +120 -0
- package/styles/themes/theme-balham.js.map +1 -0
- package/styles/themes/theme-dark.d.ts +2 -0
- package/styles/themes/theme-dark.d.ts.map +1 -0
- package/styles/themes/theme-dark.js +216 -0
- package/styles/themes/theme-dark.js.map +1 -0
- package/styles/themes/theme-material.d.ts +2 -0
- package/styles/themes/theme-material.d.ts.map +1 -0
- package/styles/themes/theme-material.js +134 -0
- package/styles/themes/theme-material.js.map +1 -0
- package/styles/themes/theme-quartz.d.ts +2 -0
- package/styles/themes/theme-quartz.d.ts.map +1 -0
- package/styles/themes/theme-quartz.js +120 -0
- package/styles/themes/theme-quartz.js.map +1 -0
- package/theme/css-var-injector.d.ts +10 -0
- package/theme/css-var-injector.d.ts.map +1 -0
- package/theme/css-var-injector.js +63 -0
- package/theme/css-var-injector.js.map +1 -0
- package/theme/theme-manager.d.ts +20 -0
- package/theme/theme-manager.d.ts.map +1 -0
- package/theme/theme-manager.js +79 -0
- package/theme/theme-manager.js.map +1 -0
- package/theme/themes/dark-theme.d.ts +3 -0
- package/theme/themes/dark-theme.d.ts.map +1 -0
- package/theme/themes/dark-theme.js +149 -0
- package/theme/themes/dark-theme.js.map +1 -0
- package/theme/themes/light-theme.d.ts +3 -0
- package/theme/themes/light-theme.d.ts.map +1 -0
- package/theme/themes/light-theme.js +149 -0
- package/theme/themes/light-theme.js.map +1 -0
- package/types/column.types.d.ts +195 -0
- package/types/column.types.d.ts.map +1 -0
- package/types/column.types.js +2 -0
- package/types/column.types.js.map +1 -0
- package/types/event.types.d.ts +213 -0
- package/types/event.types.d.ts.map +1 -0
- package/types/event.types.js +67 -0
- package/types/event.types.js.map +1 -0
- package/types/filter.types.d.ts +42 -0
- package/types/filter.types.d.ts.map +1 -0
- package/types/filter.types.js +2 -0
- package/types/filter.types.js.map +1 -0
- package/types/grid.types.d.ts +214 -0
- package/types/grid.types.d.ts.map +1 -0
- package/types/grid.types.js +2 -0
- package/types/grid.types.js.map +1 -0
- package/types/master-detail.types.d.ts +112 -0
- package/types/master-detail.types.d.ts.map +1 -0
- package/types/master-detail.types.js +2 -0
- package/types/master-detail.types.js.map +1 -0
- package/types/photon-ai.types.d.ts +19 -0
- package/types/photon-ai.types.d.ts.map +1 -0
- package/types/photon-ai.types.js +2 -0
- package/types/photon-ai.types.js.map +1 -0
- package/types/renderer.types.d.ts +156 -0
- package/types/renderer.types.d.ts.map +1 -0
- package/types/renderer.types.js +19 -0
- package/types/renderer.types.js.map +1 -0
- package/types/row.types.d.ts +127 -0
- package/types/row.types.d.ts.map +1 -0
- package/types/row.types.js +9 -0
- package/types/row.types.js.map +1 -0
- package/types/theme.types.d.ts +159 -0
- package/types/theme.types.d.ts.map +1 -0
- package/types/theme.types.js +2 -0
- package/types/theme.types.js.map +1 -0
- package/types/tree-data.types.d.ts +94 -0
- package/types/tree-data.types.d.ts.map +1 -0
- package/types/tree-data.types.js +2 -0
- package/types/tree-data.types.js.map +1 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { normalizeInput, tokenize, canonicalizeWord } from './text-normalizer';
|
|
2
|
+
import { splitClauses } from './query-splitter';
|
|
3
|
+
import { IntentParser } from './intent-parser';
|
|
4
|
+
import { EntityResolver } from './entity-resolver';
|
|
5
|
+
import { CommandBuilder } from './command-builder';
|
|
6
|
+
import { CommandExecutor } from './command-executor';
|
|
7
|
+
import { PhotonAICommandRegistry } from './photon-ai-registry';
|
|
8
|
+
import { PhotonAIMemoryStore, columnSignature } from './photon-ai-memory';
|
|
9
|
+
import { registerBuiltinCommands } from './builtins';
|
|
10
|
+
/**
|
|
11
|
+
* Pure conversational openers — no command content, so `normalizeInput`
|
|
12
|
+
* strips every word away (they're all in its filler list) and the clause
|
|
13
|
+
* would otherwise fall through to a confusing "I couldn't parse" error.
|
|
14
|
+
* Recognized straight off the raw clause, before normalization runs.
|
|
15
|
+
*/
|
|
16
|
+
const GREETING_WORDS = new Set(['hi', 'hello', 'hey', 'hiya', 'howdy', 'yo', 'greetings']);
|
|
17
|
+
/** Same idea as {@link GREETING_WORDS}, for conversational closers ("thanks", "thank you"). */
|
|
18
|
+
const THANKS_WORDS = new Set(['thanks', 'thank', 'thankyou', 'thx', 'ty']);
|
|
19
|
+
const GREETING_REPLY = 'Hi! Tell me what to do — sort, filter, pin, group, hide/show columns, move columns, selection, and more — or ask me a question about the grid\'s current state (try "help" to see everything I understand).';
|
|
20
|
+
const THANKS_REPLY = "You're welcome! Let me know if there's anything else you'd like to do with the grid.";
|
|
21
|
+
/**
|
|
22
|
+
* The only public entry point into Photon AI. Runs the full deterministic
|
|
23
|
+
* pipeline for one prompt:
|
|
24
|
+
*
|
|
25
|
+
* ```
|
|
26
|
+
* split into clauses → (learned-phrase replay | normalize → parse intent →
|
|
27
|
+
* resolve entities → build command) → execute → learn
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* A compound sentence ("hide the id column and sort by price descending")
|
|
31
|
+
* is split into independent clauses by {@link splitClauses} and each is run
|
|
32
|
+
* through the pipeline in order, so multi-step natural-language requests
|
|
33
|
+
* work without any single intent needing to know about the others.
|
|
34
|
+
*
|
|
35
|
+
* Every successfully-executed clause is remembered by a
|
|
36
|
+
* {@link PhotonAIMemoryStore}, namespaced to this grid's current columns:
|
|
37
|
+
* the *next* time the same clause is typed, it replays the learned command
|
|
38
|
+
* directly (skipping intent matching and entity resolution entirely) as
|
|
39
|
+
* long as the column it refers to still exists — this is what makes Photon
|
|
40
|
+
* AI "learn" a user's phrasing over time, including phrasings that only
|
|
41
|
+
* resolved on the first try via fuzzy/implicit matching.
|
|
42
|
+
*
|
|
43
|
+
* Every stage past clause-splitting is a small, independent, replaceable
|
|
44
|
+
* collaborator (`IntentParser`, `EntityResolver`, `CommandBuilder`,
|
|
45
|
+
* `CommandExecutor`); this class only sequences them and never contains
|
|
46
|
+
* matching or execution logic itself.
|
|
47
|
+
*/
|
|
48
|
+
export class PhotonAIService {
|
|
49
|
+
/**
|
|
50
|
+
* @param api - The grid's own `GridApi` — every command runs through it, never around it.
|
|
51
|
+
* @param registry - Supply a custom registry to fully replace the built-ins, or omit to get sort/filter/pin/visibility/grouping/selection out of the box.
|
|
52
|
+
*/
|
|
53
|
+
constructor(api, registry) {
|
|
54
|
+
this.api = api;
|
|
55
|
+
this.parser = new IntentParser();
|
|
56
|
+
this.builder = new CommandBuilder();
|
|
57
|
+
this.registry = registry ?? PhotonAIService.createDefaultRegistry();
|
|
58
|
+
this.executor = new CommandExecutor(this.registry);
|
|
59
|
+
this.memory = new PhotonAIMemoryStore(columnSignature(api.getAllColumns().map((c) => c.colId)));
|
|
60
|
+
this.resolver = new EntityResolver(this.memory);
|
|
61
|
+
}
|
|
62
|
+
/** A registry pre-populated with every built-in intent — the default `PhotonAIService` uses when none is supplied. */
|
|
63
|
+
static createDefaultRegistry() {
|
|
64
|
+
const registry = new PhotonAICommandRegistry();
|
|
65
|
+
registerBuiltinCommands(registry);
|
|
66
|
+
return registry;
|
|
67
|
+
}
|
|
68
|
+
/** Registers additional custom intents at runtime (e.g. a third-party feature's own `registerAI()`). */
|
|
69
|
+
getRegistry() {
|
|
70
|
+
return this.registry;
|
|
71
|
+
}
|
|
72
|
+
/** Forgets every column alias and phrase this service has learned for the current grid — useful after a large schema change or for testing. */
|
|
73
|
+
forgetLearnedMemory() {
|
|
74
|
+
this.memory.clear();
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Runs one prompt through the full pipeline. Always resolves —
|
|
78
|
+
* parsing/resolution failures come back as `{ success: false }`, never a
|
|
79
|
+
* thrown error. A compound sentence runs each clause independently and
|
|
80
|
+
* aggregates their results.
|
|
81
|
+
*/
|
|
82
|
+
submit(rawInput) {
|
|
83
|
+
const trimmed = rawInput.trim();
|
|
84
|
+
if (!trimmed)
|
|
85
|
+
return { success: false, message: 'Type a command first.' };
|
|
86
|
+
const clauses = splitClauses(trimmed, this.clauseVerbs());
|
|
87
|
+
const results = clauses.map((clause) => this.runClause(clause));
|
|
88
|
+
if (results.length === 1)
|
|
89
|
+
return results[0];
|
|
90
|
+
return {
|
|
91
|
+
success: results.every((r) => r.success),
|
|
92
|
+
message: results.map((r, i) => `${i + 1}) ${r.message}`).join(' '),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
runClause(clause) {
|
|
96
|
+
const normalized = normalizeInput(clause);
|
|
97
|
+
if (!normalized)
|
|
98
|
+
return this.replyToSmallTalk(clause);
|
|
99
|
+
const learned = this.memory.getPhraseCommands(normalized);
|
|
100
|
+
if (learned && learned.every((cmd) => this.commandStillValid(cmd))) {
|
|
101
|
+
return this.runCommands(learned);
|
|
102
|
+
}
|
|
103
|
+
const tokens = tokenize(normalized);
|
|
104
|
+
if (tokens.length === 0)
|
|
105
|
+
return { success: false, message: `I couldn't parse "${clause}" — try rephrasing.` };
|
|
106
|
+
const match = this.parser.parse(tokens, this.registry);
|
|
107
|
+
if (!match)
|
|
108
|
+
return { success: false, message: `I don't know how to "${clause}" yet.` };
|
|
109
|
+
const columns = this.api.getAllColumns();
|
|
110
|
+
const { command, error } = this.builder.build(match.intent, match.remainingTokens, this.resolver, columns, this.api);
|
|
111
|
+
if (error || !command)
|
|
112
|
+
return { success: false, message: error ?? 'Something went wrong building that command.' };
|
|
113
|
+
const result = this.executor.execute(command, this.api);
|
|
114
|
+
if (result.success)
|
|
115
|
+
this.memory.learnPhrase(normalized, [command]);
|
|
116
|
+
return result;
|
|
117
|
+
}
|
|
118
|
+
runCommands(commands) {
|
|
119
|
+
const messages = [];
|
|
120
|
+
for (const command of commands) {
|
|
121
|
+
const result = this.executor.execute(command, this.api);
|
|
122
|
+
messages.push(result.message);
|
|
123
|
+
if (!result.success)
|
|
124
|
+
return { success: false, message: messages.join(' ') };
|
|
125
|
+
}
|
|
126
|
+
return { success: true, message: messages.join(' ') };
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Handles a clause that normalized away to nothing — every one of its
|
|
130
|
+
* words was filler. Rather than a blanket parse error, greetings and
|
|
131
|
+
* thanks get a friendly, on-brand reply; anything else (stray filler with
|
|
132
|
+
* no real words at all) still reports that it couldn't be parsed.
|
|
133
|
+
*/
|
|
134
|
+
replyToSmallTalk(clause) {
|
|
135
|
+
const words = clause
|
|
136
|
+
.toLowerCase()
|
|
137
|
+
.replace(/[^\p{L}\s]/gu, ' ')
|
|
138
|
+
.split(/\s+/)
|
|
139
|
+
.filter((w) => w.length > 0);
|
|
140
|
+
if (words.length > 0 && words.every((w) => GREETING_WORDS.has(w))) {
|
|
141
|
+
return { success: true, message: GREETING_REPLY };
|
|
142
|
+
}
|
|
143
|
+
if (words.length > 0 && words.every((w) => THANKS_WORDS.has(w))) {
|
|
144
|
+
return { success: true, message: THANKS_REPLY };
|
|
145
|
+
}
|
|
146
|
+
return { success: false, message: `I couldn't parse "${clause}" — try rephrasing.` };
|
|
147
|
+
}
|
|
148
|
+
/** A learned command referencing a column that's since been removed/renamed can't be safely replayed — falls back to re-parsing the clause instead. */
|
|
149
|
+
commandStillValid(command) {
|
|
150
|
+
const colId = command.params.colId;
|
|
151
|
+
return typeof colId !== 'string' || !!this.api.getColumn(colId);
|
|
152
|
+
}
|
|
153
|
+
/** The set of verbs `splitClauses` treats as "this starts a new command" — every registered intent's leading alias word, recomputed per call so custom intents registered at runtime are picked up immediately. */
|
|
154
|
+
clauseVerbs() {
|
|
155
|
+
const verbs = new Set();
|
|
156
|
+
for (const intent of this.registry.getAll()) {
|
|
157
|
+
for (const alias of intent.aliases) {
|
|
158
|
+
if (alias[0])
|
|
159
|
+
verbs.add(canonicalizeWord(alias[0]));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return verbs;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=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AE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACtD,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { ColumnDef } from '../types/column.types';
|
|
2
|
+
import type { FilterOperator } from '../types/filter.types';
|
|
3
|
+
import type { GridApi } from '../core/grid-api';
|
|
4
|
+
import type { EntityResolver } from './entity-resolver';
|
|
5
|
+
/**
|
|
6
|
+
* A resolved, ready-to-execute grid instruction produced by the
|
|
7
|
+
* {@link CommandBuilder}. `type` is the stable machine key of the
|
|
8
|
+
* {@link IntentDefinition} that produced it (by convention, identical to
|
|
9
|
+
* `IntentDefinition.key`); `params` carries whatever that intent's
|
|
10
|
+
* `buildCommand` decided the {@link CommandExecutor} needs.
|
|
11
|
+
*
|
|
12
|
+
* Commands are plain data — never executable code — so they can be logged,
|
|
13
|
+
* previewed, replayed, or handed to a different executor without any
|
|
14
|
+
* knowledge of how they were produced.
|
|
15
|
+
*/
|
|
16
|
+
export interface PhotonCommand {
|
|
17
|
+
readonly type: string;
|
|
18
|
+
readonly params: Readonly<Record<string, unknown>>;
|
|
19
|
+
}
|
|
20
|
+
/** Outcome of {@link PhotonAIService.submit} — always resolves, never throws. */
|
|
21
|
+
export interface PhotonCommandResult {
|
|
22
|
+
readonly success: boolean;
|
|
23
|
+
/** Short, human-readable summary shown in the command bar (e.g. "Sorted Salary descending."). */
|
|
24
|
+
readonly message: string;
|
|
25
|
+
/** The command that was executed, when parsing/resolution/execution succeeded. */
|
|
26
|
+
readonly command?: PhotonCommand;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Entities extracted from the user's tokens for one matched intent —
|
|
30
|
+
* resolved dynamically against the grid's *current* columns, never
|
|
31
|
+
* hardcoded. Every field is optional: which ones are populated depends on
|
|
32
|
+
* what the owning {@link IntentDefinition.resolveEntities} looked for.
|
|
33
|
+
*/
|
|
34
|
+
export interface ResolvedEntities {
|
|
35
|
+
column?: ColumnDef;
|
|
36
|
+
columns?: ColumnDef[];
|
|
37
|
+
direction?: 'asc' | 'desc';
|
|
38
|
+
side?: 'left' | 'right' | null;
|
|
39
|
+
visible?: boolean;
|
|
40
|
+
/** Free-text value left over after intent keywords and the column name were consumed (e.g. a filter value). */
|
|
41
|
+
value?: string;
|
|
42
|
+
/** A bare integer found in the input (e.g. "select row 5"). */
|
|
43
|
+
index?: number;
|
|
44
|
+
/** Comparison operator detected from phrases like "greater than", "before", "contains" — defaults to a type-appropriate operator when absent. */
|
|
45
|
+
operator?: FilterOperator;
|
|
46
|
+
/** The coerced (typed) filter value — a `number`, `boolean`, `Date`, or `string` depending on the resolved column's data type. */
|
|
47
|
+
coercedValue?: unknown;
|
|
48
|
+
/** The upper bound for a `between`/`inRange` filter. */
|
|
49
|
+
coercedValueTo?: unknown;
|
|
50
|
+
/** `true` when the user referred to "all"/"every" columns rather than a single named one (e.g. "hide all columns"). */
|
|
51
|
+
allColumns?: boolean;
|
|
52
|
+
/** Every pin side mentioned in the sentence — e.g. `["left", "right"]` for "pin half to the left and half to the right". */
|
|
53
|
+
sides?: readonly ('left' | 'right')[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A single grid feature's contribution to the Photon AI registry — the unit
|
|
57
|
+
* `PhotonAICommandRegistry.register` accepts. Each feature module owns its
|
|
58
|
+
* own intent definitions end to end (matching phrases, entity extraction,
|
|
59
|
+
* validation, command shape, and execution), so the engine classes
|
|
60
|
+
* (`IntentParser`, `EntityResolver`, `CommandBuilder`, `CommandExecutor`)
|
|
61
|
+
* never need to know about any specific feature.
|
|
62
|
+
*/
|
|
63
|
+
export interface IntentDefinition {
|
|
64
|
+
/** Stable machine key, e.g. `"sortAscending"`. Becomes `PhotonCommand.type`. */
|
|
65
|
+
readonly key: string;
|
|
66
|
+
/**
|
|
67
|
+
* Sets of keywords that indicate this intent. Each inner array is one
|
|
68
|
+
* *phrase*: every word in it must appear somewhere in the input's token
|
|
69
|
+
* set (order-independent — other words, like a column name, may sit
|
|
70
|
+
* between them) for that phrase to count as matched. An intent matches
|
|
71
|
+
* when any one of its phrases is fully covered; ties are broken by
|
|
72
|
+
* preferring the phrase with the most words (the more specific match).
|
|
73
|
+
*
|
|
74
|
+
* @example `[['sort', 'ascending'], ['sort', 'asc'], ['ascending']]`
|
|
75
|
+
*/
|
|
76
|
+
readonly aliases: readonly (readonly string[])[];
|
|
77
|
+
/** Optional short human description — surfaced later by help/autocomplete UI. */
|
|
78
|
+
readonly description?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Extracts whatever entities this intent needs from the matched input's
|
|
81
|
+
* tokens (with the matched alias words removed, see `IntentParser`).
|
|
82
|
+
* Delegates all column/value lookup to the shared {@link EntityResolver}
|
|
83
|
+
* rather than inspecting `columns` directly, so resolution logic (fuzzy
|
|
84
|
+
* matching, etc.) lives in exactly one place.
|
|
85
|
+
*/
|
|
86
|
+
resolveEntities(tokens: string[], resolver: EntityResolver, columns: ColumnDef[], api: GridApi): ResolvedEntities;
|
|
87
|
+
/** Rejects entities that don't make sense for this intent (e.g. no column found). Return an error message to reject, `null` to proceed. */
|
|
88
|
+
validate?(entities: ResolvedEntities): string | null;
|
|
89
|
+
/** Builds the final command from validated entities. */
|
|
90
|
+
buildCommand(entities: ResolvedEntities): PhotonCommand;
|
|
91
|
+
/** Executes the command against the live `GridApi`, returning a short human-readable result message. */
|
|
92
|
+
execute(command: PhotonCommand, api: GridApi): string;
|
|
93
|
+
}
|
|
94
|
+
/** What {@link IntentParser.parse} returns for the best-matching intent. */
|
|
95
|
+
export interface ParsedIntentMatch {
|
|
96
|
+
readonly intent: IntentDefinition;
|
|
97
|
+
/** The input tokens with the matched alias's words removed — what's left to resolve entities from. */
|
|
98
|
+
readonly remainingTokens: string[];
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=photon-ai.types.d.ts.map
|
|
@@ -0,0 +1 @@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,EAAE,OAAO,CAAC;IACzB,uHAAuH;IACvH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4HAA4H;IAC5H,KAAK,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;CACvC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gFAAgF;IAChF,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;IACjD,iFAAiF;IACjF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;;OAMG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,OAAO,GAAG,gBAAgB,CAAC;IAClH,2IAA2I;IAC3I,QAAQ,CAAC,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAAC;IACrD,wDAAwD;IACxD,YAAY,CAAC,QAAQ,EAAE,gBAAgB,GAAG,aAAa,CAAC;IACxD,wGAAwG;IACxG,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC;CACvD;AAED,4EAA4E;AAC5E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,sGAAsG;IACtG,QAAQ,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"photon-ai.types.js","sourceRoot":"","sources":["../../src/photon-ai/photon-ai.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Splits one raw prompt into independently-executable clauses so a single
|
|
3
|
+
* compound sentence can drive multiple grid commands in one submission
|
|
4
|
+
* (e.g. *"hide the id column, sort by price descending and group by
|
|
5
|
+
* category"* → three clauses). Punctuation (`,`/`;`) and connector words
|
|
6
|
+
* ("and", "then", "also", "plus") are only treated as a split point when the
|
|
7
|
+
* word(s) immediately following are recognized as a *different* command's
|
|
8
|
+
* verb (from `verbs`, typically every registered intent's leading alias
|
|
9
|
+
* word) — otherwise they're kept as part of the current clause, since they
|
|
10
|
+
* more likely mean "and also this column" (e.g. "pin price and income", or
|
|
11
|
+
* "unpin status, income and year") rather than "and now do something else".
|
|
12
|
+
*
|
|
13
|
+
* Two additional guards keep genuinely ambiguous cases from mis-splitting:
|
|
14
|
+
* a connector inside a "between X and Y" range is never a split point, and
|
|
15
|
+
* "select and copy/cut ..." is always kept whole (see
|
|
16
|
+
* {@link NEVER_SPLIT_AFTER}), since those verbs share one implicit target
|
|
17
|
+
* rather than describing two unrelated actions.
|
|
18
|
+
*
|
|
19
|
+
* @param verbs - Canonicalized (see {@link canonicalizeWord}) leading verb words for every registered intent, e.g. `{"pin", "sort", "filter", "group", ...}`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function splitClauses(raw: string, verbs: ReadonlySet<string>): string[];
|
|
22
|
+
//# sourceMappingURL=query-splitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-splitter.d.ts","sourceRoot":"","sources":["../../src/photon-ai/query-splitter.ts"],"names":[],"mappings":"AAmCA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CA+B9E"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { canonicalizeWord } from './text-normalizer';
|
|
2
|
+
/** Words that *can* introduce a new clause in a compound sentence — but only when what follows is actually a new action (see {@link splitClauses}). */
|
|
3
|
+
const SOFT_CONNECTORS = new Set([',', 'and', 'then', 'also', 'plus']);
|
|
4
|
+
/**
|
|
5
|
+
* A connector is *not* a split point when the clause-so-far already contains
|
|
6
|
+
* a range word ("between"/"from") — e.g. "filter salary between 4000 and
|
|
7
|
+
* 8000" must keep "and" as part of the range, not split it in half.
|
|
8
|
+
*/
|
|
9
|
+
const RANGE_PREFIXES = new Set(['between', 'from']);
|
|
10
|
+
/**
|
|
11
|
+
* "select and copy/cut" is idiomatically one action ("select, then copy
|
|
12
|
+
* what's selected"), not two independent commands sharing no context — so a
|
|
13
|
+
* bare "select"/"deselect" clause-so-far never splits, regardless of what
|
|
14
|
+
* verb follows. Every other verb pairing splits normally.
|
|
15
|
+
*/
|
|
16
|
+
const NEVER_SPLIT_AFTER = new Set(['select', 'deselect']);
|
|
17
|
+
/**
|
|
18
|
+
* Only the word *immediately* after a connector is checked — not a wider
|
|
19
|
+
* window. A 2+ word lookahead sounds like it'd also catch "and then group by
|
|
20
|
+
* X", but with the built-in Q&A intents' generic leading alias words ("row",
|
|
21
|
+
* "column", "count", "which", "what", …) in `verbs`, a wider window false-
|
|
22
|
+
* -positives constantly: "unpin status, income and year columns" would spot
|
|
23
|
+
* "columns" two words after "and" and wrongly split before "year". "and
|
|
24
|
+
* then X" still splits correctly with a 1-word window — "then" is itself a
|
|
25
|
+
* connector, so it gets its own immediate-next-word check on the following
|
|
26
|
+
* loop iteration.
|
|
27
|
+
*/
|
|
28
|
+
function isUpcomingVerb(words, atIndex, verbs) {
|
|
29
|
+
return atIndex < words.length && verbs.has(canonicalizeWord(words[atIndex]));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Splits one raw prompt into independently-executable clauses so a single
|
|
33
|
+
* compound sentence can drive multiple grid commands in one submission
|
|
34
|
+
* (e.g. *"hide the id column, sort by price descending and group by
|
|
35
|
+
* category"* → three clauses). Punctuation (`,`/`;`) and connector words
|
|
36
|
+
* ("and", "then", "also", "plus") are only treated as a split point when the
|
|
37
|
+
* word(s) immediately following are recognized as a *different* command's
|
|
38
|
+
* verb (from `verbs`, typically every registered intent's leading alias
|
|
39
|
+
* word) — otherwise they're kept as part of the current clause, since they
|
|
40
|
+
* more likely mean "and also this column" (e.g. "pin price and income", or
|
|
41
|
+
* "unpin status, income and year") rather than "and now do something else".
|
|
42
|
+
*
|
|
43
|
+
* Two additional guards keep genuinely ambiguous cases from mis-splitting:
|
|
44
|
+
* a connector inside a "between X and Y" range is never a split point, and
|
|
45
|
+
* "select and copy/cut ..." is always kept whole (see
|
|
46
|
+
* {@link NEVER_SPLIT_AFTER}), since those verbs share one implicit target
|
|
47
|
+
* rather than describing two unrelated actions.
|
|
48
|
+
*
|
|
49
|
+
* @param verbs - Canonicalized (see {@link canonicalizeWord}) leading verb words for every registered intent, e.g. `{"pin", "sort", "filter", "group", ...}`.
|
|
50
|
+
*/
|
|
51
|
+
export function splitClauses(raw, verbs) {
|
|
52
|
+
const spaced = raw.replace(/[,;]+/g, ' , ');
|
|
53
|
+
const words = spaced.trim().split(/\s+/).filter((w) => w.length > 0);
|
|
54
|
+
if (words.length === 0)
|
|
55
|
+
return [];
|
|
56
|
+
const clauses = [];
|
|
57
|
+
let current = [];
|
|
58
|
+
for (let i = 0; i < words.length; i++) {
|
|
59
|
+
const word = words[i];
|
|
60
|
+
const lower = word.toLowerCase();
|
|
61
|
+
const isComma = lower === ',';
|
|
62
|
+
if (!isComma && !SOFT_CONNECTORS.has(lower)) {
|
|
63
|
+
current.push(word);
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
const inRangeContext = current.some((w) => RANGE_PREFIXES.has(w.toLowerCase()));
|
|
67
|
+
const currentIsNeverSplit = current.length === 1 && NEVER_SPLIT_AFTER.has(canonicalizeWord(current[0]));
|
|
68
|
+
const nextIsVerb = isUpcomingVerb(words, i + 1, verbs);
|
|
69
|
+
if (current.length > 0 && !inRangeContext && !currentIsNeverSplit && nextIsVerb) {
|
|
70
|
+
clauses.push(current.join(' '));
|
|
71
|
+
current = [];
|
|
72
|
+
}
|
|
73
|
+
else if (!isComma) {
|
|
74
|
+
current.push(word);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (current.length > 0)
|
|
78
|
+
clauses.push(current.join(' '));
|
|
79
|
+
return clauses.length > 0 ? clauses : [raw.trim()];
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=query-splitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-splitter.js","sourceRoot":"","sources":["../../src/photon-ai/query-splitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,uJAAuJ;AACvJ,MAAM,eAAe,GAAwB,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAE3F;;;;GAIG;AACH,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;AAE/E;;;;;;;;;;GAUG;AACH,SAAS,cAAc,CAAC,KAAwB,EAAE,OAAe,EAAE,KAA0B;IAC3F,OAAO,OAAO,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,KAA0B;IAClE,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CA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AAC;YACpB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACxD,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reduces a plural English noun to its singular form using a small set of
|
|
3
|
+
* common suffix rules — not a full stemmer, just enough to make alias
|
|
4
|
+
* matching plural-insensitive (e.g. "columns"/"filters"/"rows" all reduce to
|
|
5
|
+
* the singular form every built-in alias is written against). Never touches
|
|
6
|
+
* pure numbers or short/exception words where stripping "s" would be wrong.
|
|
7
|
+
*/
|
|
8
|
+
export declare function stemWord(word: string): string;
|
|
9
|
+
/** Splits already-normalized (lowercase, punctuation-free) text into words. */
|
|
10
|
+
export declare function tokenize(text: string): string[];
|
|
11
|
+
/**
|
|
12
|
+
* Reduces one raw word to the canonical form every alias/filler check is
|
|
13
|
+
* written against: lowercased, singularized, then synonym-mapped (e.g.
|
|
14
|
+
* "Resetting" → "reset" → "clear"). Exposed separately from
|
|
15
|
+
* {@link normalizeInput} so callers that need to test a *single* word
|
|
16
|
+
* against a keyword set (e.g. `query-splitter`'s clause-boundary detector)
|
|
17
|
+
* get identical canonicalization without re-tokenizing a whole sentence.
|
|
18
|
+
*/
|
|
19
|
+
export declare function canonicalizeWord(raw: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Normalizes a raw prompt for intent matching: lowercase, strip punctuation
|
|
22
|
+
* (while preserving `.`/`-`/`:`/`/` inside numbers and dates), singularize
|
|
23
|
+
* plurals, canonicalize synonyms, collapse whitespace, and drop filler
|
|
24
|
+
* words. `EntityResolver` still receives the *original* remaining words
|
|
25
|
+
* (this never reorders anything), so column names and values downstream are
|
|
26
|
+
* unaffected beyond casing/punctuation/pluralization.
|
|
27
|
+
*
|
|
28
|
+
* @example normalizeInput("Hey Photon, please pin the salary column to the left side.")
|
|
29
|
+
* // => "pin salary column left"
|
|
30
|
+
* @example normalizeInput("reset all filters") // => "clear all filter"
|
|
31
|
+
*/
|
|
32
|
+
export declare function normalizeInput(raw: string): string;
|
|
33
|
+
//# sourceMappingURL=text-normalizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-normalizer.d.ts","sourceRoot":"","sources":["../../src/photon-ai/text-normalizer.ts"],"names":[],"mappings":"AAuEA;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO7C;AAED,+EAA+E;AAC/E,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAE/C;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAalD"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Words stripped before intent matching: conversational filler ("hey",
|
|
3
|
+
* "please"), the assistant's own name, common function/linking words, and
|
|
4
|
+
* connector words that natural sentences use but that carry no command
|
|
5
|
+
* meaning on their own (e.g. "whose", "who", "is", "are"). Intentionally
|
|
6
|
+
* broad — `IntentParser`'s alias matching only requires a phrase's *own*
|
|
7
|
+
* keywords to be present, so over-stripping here is safe; it can never
|
|
8
|
+
* remove a word an alias needs, since alias keywords (e.g. "sort", "left",
|
|
9
|
+
* "hide") are never in this list.
|
|
10
|
+
*/
|
|
11
|
+
const FILLER_WORDS = new Set([
|
|
12
|
+
'hi', 'hello', 'hey', 'please', 'can', 'could', 'would', 'you', 'quickly', 'thanks', 'thank',
|
|
13
|
+
'photon', 'ai', 'assistant',
|
|
14
|
+
// Deliberately NOT "of" — it's stripped everywhere else, but it's also a
|
|
15
|
+
// real word inside dropdown/enum option labels ("Out of Stock", "Point of
|
|
16
|
+
// Sale"); stripping it from the user's query but not from the option
|
|
17
|
+
// label being matched against would make those options unmatchable.
|
|
18
|
+
'to', 'the', 'a', 'an', 'in', 'on', 'at', 'is', 'are', 'was', 'were', 'be', 'me', 'my',
|
|
19
|
+
'side', 'now', 'just',
|
|
20
|
+
'them', 'it', 'their', 'order', 'whose', 'who', 'that', 'with', 'having',
|
|
21
|
+
'value', 'currently', 'kindly', 'want', 'need', 'like', 'this', 'these',
|
|
22
|
+
]);
|
|
23
|
+
/**
|
|
24
|
+
* Canonicalizes synonyms down to the single keyword every `IntentDefinition`
|
|
25
|
+
* alias is actually written against, so a feature only has to declare one
|
|
26
|
+
* spelling (e.g. `"clear"`) while users can type any of several equivalent
|
|
27
|
+
* words (e.g. "reset", "erase", "wipe"). Applied per-word, after stemming.
|
|
28
|
+
*/
|
|
29
|
+
const SYNONYMS = new Map([
|
|
30
|
+
['reset', 'clear'],
|
|
31
|
+
['erase', 'clear'],
|
|
32
|
+
['wipe', 'clear'],
|
|
33
|
+
['delete', 'remove'],
|
|
34
|
+
['drop', 'remove'],
|
|
35
|
+
['freeze', 'pin'],
|
|
36
|
+
['unfreeze', 'unpin'],
|
|
37
|
+
['display', 'show'],
|
|
38
|
+
['reveal', 'show'],
|
|
39
|
+
['everything', 'all'],
|
|
40
|
+
['every', 'all'],
|
|
41
|
+
['entire', 'all'],
|
|
42
|
+
['ascend', 'ascending'],
|
|
43
|
+
['descend', 'descending'],
|
|
44
|
+
['increasing', 'ascending'],
|
|
45
|
+
['decreasing', 'descending'],
|
|
46
|
+
['newest', 'descending'],
|
|
47
|
+
['oldest', 'ascending'],
|
|
48
|
+
['biggest', 'largest'],
|
|
49
|
+
['smaller', 'smallest'],
|
|
50
|
+
['bigger', 'largest'],
|
|
51
|
+
['grouping', 'group'],
|
|
52
|
+
['filtering', 'filter'],
|
|
53
|
+
['sorting', 'sort'],
|
|
54
|
+
['hiding', 'hide'],
|
|
55
|
+
['showing', 'show'],
|
|
56
|
+
['pinning', 'pin'],
|
|
57
|
+
// Past-participle forms used in questions ("what's currently sorted?", "which columns are hidden?").
|
|
58
|
+
['pinned', 'pin'],
|
|
59
|
+
['hidden', 'hide'],
|
|
60
|
+
['filtered', 'filter'],
|
|
61
|
+
['sorted', 'sort'],
|
|
62
|
+
['grouped', 'group'],
|
|
63
|
+
['selected', 'select'],
|
|
64
|
+
]);
|
|
65
|
+
/** Word endings that must never be singularized — stripping their trailing "s" would corrupt the word. */
|
|
66
|
+
const STEM_EXCEPTIONS = new Set([
|
|
67
|
+
'status', 'address', 'series', 'analysis', 'this', 'his', 'is', 'was', 'has', 'as', 'gas',
|
|
68
|
+
]);
|
|
69
|
+
/**
|
|
70
|
+
* Reduces a plural English noun to its singular form using a small set of
|
|
71
|
+
* common suffix rules — not a full stemmer, just enough to make alias
|
|
72
|
+
* matching plural-insensitive (e.g. "columns"/"filters"/"rows" all reduce to
|
|
73
|
+
* the singular form every built-in alias is written against). Never touches
|
|
74
|
+
* pure numbers or short/exception words where stripping "s" would be wrong.
|
|
75
|
+
*/
|
|
76
|
+
export function stemWord(word) {
|
|
77
|
+
if (word.length <= 3 || /^\d+$/.test(word) || STEM_EXCEPTIONS.has(word))
|
|
78
|
+
return word;
|
|
79
|
+
if (word.endsWith('ies'))
|
|
80
|
+
return `${word.slice(0, -3)}y`;
|
|
81
|
+
if (/(?:s|x|z|ch|sh)es$/.test(word))
|
|
82
|
+
return word.slice(0, -2);
|
|
83
|
+
if (word.endsWith('ss'))
|
|
84
|
+
return word;
|
|
85
|
+
if (word.endsWith('s'))
|
|
86
|
+
return word.slice(0, -1);
|
|
87
|
+
return word;
|
|
88
|
+
}
|
|
89
|
+
/** Splits already-normalized (lowercase, punctuation-free) text into words. */
|
|
90
|
+
export function tokenize(text) {
|
|
91
|
+
return text.split(' ').filter((w) => w.length > 0);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Reduces one raw word to the canonical form every alias/filler check is
|
|
95
|
+
* written against: lowercased, singularized, then synonym-mapped (e.g.
|
|
96
|
+
* "Resetting" → "reset" → "clear"). Exposed separately from
|
|
97
|
+
* {@link normalizeInput} so callers that need to test a *single* word
|
|
98
|
+
* against a keyword set (e.g. `query-splitter`'s clause-boundary detector)
|
|
99
|
+
* get identical canonicalization without re-tokenizing a whole sentence.
|
|
100
|
+
*/
|
|
101
|
+
export function canonicalizeWord(raw) {
|
|
102
|
+
const stemmed = stemWord(raw.toLowerCase());
|
|
103
|
+
return SYNONYMS.get(stemmed) ?? stemmed;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Normalizes a raw prompt for intent matching: lowercase, strip punctuation
|
|
107
|
+
* (while preserving `.`/`-`/`:`/`/` inside numbers and dates), singularize
|
|
108
|
+
* plurals, canonicalize synonyms, collapse whitespace, and drop filler
|
|
109
|
+
* words. `EntityResolver` still receives the *original* remaining words
|
|
110
|
+
* (this never reorders anything), so column names and values downstream are
|
|
111
|
+
* unaffected beyond casing/punctuation/pluralization.
|
|
112
|
+
*
|
|
113
|
+
* @example normalizeInput("Hey Photon, please pin the salary column to the left side.")
|
|
114
|
+
* // => "pin salary column left"
|
|
115
|
+
* @example normalizeInput("reset all filters") // => "clear all filter"
|
|
116
|
+
*/
|
|
117
|
+
export function normalizeInput(raw) {
|
|
118
|
+
const lowered = raw.toLowerCase();
|
|
119
|
+
// Keep '.', '-', ':', '/' so decimals ("12.5"), negative numbers ("-5"),
|
|
120
|
+
// and dates ("2024-01-15", "01/15/2024") survive as single tokens.
|
|
121
|
+
const noPunctuation = lowered.replace(/[^\p{L}\p{N}\s.\-:/]/gu, ' ');
|
|
122
|
+
const words = noPunctuation.split(/\s+/).filter((w) => w.length > 0);
|
|
123
|
+
const kept = [];
|
|
124
|
+
for (const word of words) {
|
|
125
|
+
const canonical = canonicalizeWord(word);
|
|
126
|
+
if (FILLER_WORDS.has(canonical))
|
|
127
|
+
continue;
|
|
128
|
+
kept.push(canonical);
|
|
129
|
+
}
|
|
130
|
+
return kept.join(' ');
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=text-normalizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-normalizer.js","sourceRoot":"","sources":["../../src/photon-ai/text-normalizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,YAAY,GAAwB,IAAI,GAAG,CAAC;IAChD,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO;IAC5F,QAAQ,EAAE,IAAI,EAAE,WAAW;IAC3B,yEAAyE;IACzE,0EAA0E;IAC1E,qEAAqE;IACrE,oEAAoE;IACpE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACtF,MAAM,EAAE,KAAK,EAAE,MAAM;IACrB,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ;IACxE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO;CACxE,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,QAAQ,GAAgC,IAAI,GAAG,CAAC;IACpD,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,MAAM,EAAE,OAAO,CAAC;IACjB,CAAC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