@epam/statgpt-conversation-view 0.1.0-rc.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/LICENSE +21 -0
- package/README.md +80 -0
- package/constants/charting-default-colors.d.ts +2 -0
- package/constants/filter-display-mode.d.ts +4 -0
- package/constants/grid.d.ts +17 -0
- package/constants/message-stages.d.ts +3 -0
- package/index.css +1 -0
- package/index.d.ts +10 -0
- package/index.js +41 -0
- package/index.mjs +11586 -0
- package/models/actions.d.ts +24 -0
- package/models/advance-view-styles.d.ts +4 -0
- package/models/attachments-styles.d.ts +26 -0
- package/models/attachments.d.ts +22 -0
- package/models/charting.d.ts +18 -0
- package/models/filters.d.ts +73 -0
- package/models/message.d.ts +12 -0
- package/models/metadata.d.ts +3 -0
- package/models/periods.d.ts +8 -0
- package/models/structure-component.d.ts +6 -0
- package/models/titles.d.ts +49 -0
- package/package.json +39 -0
- package/types/actions.d.ts +18 -0
- package/types/charting-icon.d.ts +4 -0
- package/types/data-grid/grid-data.d.ts +1 -0
- package/types/data-grid/obs-col-getter.d.ts +2 -0
- package/utils/attachments/attachment-parser.d.ts +11 -0
- package/utils/attachments/attachment-utils.d.ts +2 -0
- package/utils/attachments/charting/chart-config-building.d.ts +3 -0
- package/utils/attachments/charting/chart-data.d.ts +9 -0
- package/utils/attachments/charting/data-uniqueness.d.ts +4 -0
- package/utils/attachments/charting/serie-title.d.ts +3 -0
- package/utils/attachments/charting/sort-dimensions.d.ts +3 -0
- package/utils/attachments/charting/split-for-units.d.ts +4 -0
- package/utils/attachments/convert-to-grid-data.d.ts +6 -0
- package/utils/attachments/data-grid/columns.d.ts +9 -0
- package/utils/attachments/data-grid/data-grid.d.ts +13 -0
- package/utils/attachments/data-grid/get-converted-data.d.ts +5 -0
- package/utils/attachments/data-grid/grid-height.d.ts +1 -0
- package/utils/attachments/data-grid/rows-data.d.ts +6 -0
- package/utils/attachments/group-attributes.d.ts +7 -0
- package/utils/attachments/localized-value.d.ts +10 -0
- package/utils/attachments/markdown-validator.d.ts +2 -0
- package/utils/attachments/metadata.d.ts +42 -0
- package/utils/attachments/parse-data-query.d.ts +3 -0
- package/utils/attachments/time-period.d.ts +12 -0
- package/utils/conversation-request.d.ts +6 -0
- package/utils/date-format.d.ts +1 -0
- package/utils/extract-partial-message.d.ts +3 -0
- package/utils/filters.d.ts +36 -0
- package/utils/generate-conversation.d.ts +2 -0
- package/utils/generate-downloaded-document.d.ts +1 -0
- package/utils/get-conversation-path.d.ts +2 -0
- package/utils/get-filled-filters.d.ts +30 -0
- package/utils/get-series-filters.d.ts +7 -0
- package/utils/is-read-only-conversation.d.ts +5 -0
- package/utils/messages.d.ts +3 -0
- package/utils/query-filters-details.d.ts +6 -0
- package/utils/query-filters.d.ts +8 -0
- package/utils/system-message.d.ts +4 -0
- package/utils/transform-message-api.d.ts +3 -0
- package/utils/validate-message.d.ts +10 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 EPAM Systems
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Conversation View
|
|
2
|
+
|
|
3
|
+
This is StatGpt portals library, provides reusable React components, context, and utilities
|
|
4
|
+
for managing and displaying advanced conversation views within the StatGPT portals.
|
|
5
|
+
It includes logic for representing conversations, chating, handling stream-messages, showing attachments, advanced UI and welcome-page.
|
|
6
|
+
|
|
7
|
+
[](https://opensource.org/licenses/mit)
|
|
8
|
+
[](https://reactjs.org/)
|
|
9
|
+
[](https://www.typescriptlang.org/)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Table of Contents
|
|
13
|
+
|
|
14
|
+
- [Features](#features)
|
|
15
|
+
- [Installation](#installation)
|
|
16
|
+
- [Usage](#usage)
|
|
17
|
+
- [Styling & Customization](#styling--customization)
|
|
18
|
+
- [Localization](#localization)
|
|
19
|
+
- [Contributing](#contributing)
|
|
20
|
+
- [Security](#security)
|
|
21
|
+
- [License](#license)
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
- Base conversation view component
|
|
26
|
+
- Advanced UI components for displaying conversation views
|
|
27
|
+
- Context and utilities for managing chat state
|
|
28
|
+
- Support for streaming messages
|
|
29
|
+
- Handling and displaying attachments
|
|
30
|
+
- Welcome page integration with suggested prompts
|
|
31
|
+
- Customizable styles and icons
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install @epam/statgpt-conversation-view
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import { ConversationView } from '@epam/statgpt-conversation-view';
|
|
43
|
+
|
|
44
|
+
// Example usage
|
|
45
|
+
<ConversationView
|
|
46
|
+
conversation={conversation}
|
|
47
|
+
actions={conversationViewActions}
|
|
48
|
+
locale={locale}
|
|
49
|
+
titles={conversationViewTitles}
|
|
50
|
+
messageStyles={messageStyles}
|
|
51
|
+
attachmentsStyles={attachmentsStyles}
|
|
52
|
+
...
|
|
53
|
+
/>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## Styling & Customization
|
|
58
|
+
|
|
59
|
+
You can customize the conversation view and it's components by using the `...Styles` (ex. `messageStyles`) prop. This allows you to override icons & default styles with your own CSS styles.
|
|
60
|
+
|
|
61
|
+
## Localization
|
|
62
|
+
|
|
63
|
+
The component supports localization of used chat-model through the `locale` prop. You can also provide translations for various UI elements using the `titles` prop.
|
|
64
|
+
|
|
65
|
+
## Contributing
|
|
66
|
+
|
|
67
|
+
We welcome contributions! Please see our [Contributing Guide](https://github.com/epam/statgpt-portal-frontend/blob/development/CONTRIBUTING.md) for details on:
|
|
68
|
+
|
|
69
|
+
- Code style guidelines
|
|
70
|
+
- Testing requirements
|
|
71
|
+
- Pull request process
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## Security
|
|
75
|
+
|
|
76
|
+
If you discover a security vulnerability, please refer to our [Security Policy](https://github.com/epam/statgpt-portal-frontend/blob/development/SECURITY.md).
|
|
77
|
+
|
|
78
|
+
## License
|
|
79
|
+
|
|
80
|
+
[MIT](https://github.com/epam/statgpt-portal-frontend/blob/development/LICENSE) - see the [LICENSE](https://github.com/epam/statgpt-portal-frontend/blob/development/LICENSE) file for details.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ColDef } from 'ag-grid-community';
|
|
2
|
+
import { StructuralData } from '../../../sdmx-toolkit/src/models/structural-metadata';
|
|
3
|
+
import { MetadataSettings } from '../models/metadata';
|
|
4
|
+
import { Data } from '../../../sdmx-toolkit/src/models/data/data-message';
|
|
5
|
+
import { ConversationViewTitles } from '../models/titles';
|
|
6
|
+
export declare const GRID_HEADER_HEIGHT = 32;
|
|
7
|
+
export declare const GRID_ROW_HEIGHT = 32;
|
|
8
|
+
export declare const GRID_HORIZONTAL_SCROLL_GAP = 16;
|
|
9
|
+
export declare const CELL_PADDING_0 = "padding-0";
|
|
10
|
+
export declare const DEFAULT_GRID_COLUMN_WITH = 200;
|
|
11
|
+
export declare const CHART_COLUMN_WIDTH = 32;
|
|
12
|
+
export declare const OBSERVATION_VALUE_CELL_RENDER = "observationValueCell";
|
|
13
|
+
export declare const METADATA_CELL_RENDER = "metadataCell";
|
|
14
|
+
export declare const CHART_CELL_RENDER = "chartCell";
|
|
15
|
+
export declare const CHART_COLUMN_ID = "Chart_column";
|
|
16
|
+
export declare const getMetaDataColumn: (dataSetData?: StructuralData, data?: Data, locale?: string, metadataSettings?: MetadataSettings, titles?: ConversationViewTitles) => ColDef;
|
|
17
|
+
export declare function getChartColumn(dataSetData?: StructuralData, data?: Data, locale?: string, width?: number, titles?: ConversationViewTitles): ColDef;
|
package/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@tailwind base;@tailwind components;@tailwind utilities;
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { AdvancedViewProvider, useAdvancedView, } from './context/AdvancedViewContext';
|
|
2
|
+
export * from './models/actions';
|
|
3
|
+
export * from './models/titles';
|
|
4
|
+
export * from './models/attachments-styles';
|
|
5
|
+
export * from './models/structure-component';
|
|
6
|
+
export * from './types/charting-icon';
|
|
7
|
+
export { ConversationWelcome } from './components/ConversationWelcome/ConversationWelcome';
|
|
8
|
+
export { AdvancedView } from './components/AdvancedView/AdvancedView';
|
|
9
|
+
export { ConversationView } from './components/ConversationView/ConversationView';
|
|
10
|
+
export type { ShareConversationProps } from '../../share-conversation/src/models/share-conversation';
|