@constructor-io/constructorio-ui-pia 2.2.0 → 2.3.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 +8 -0
- package/dist/constructorio-ui-pia-bundled.js +16 -16
- package/lib/cjs/components/CioPia/CioPia.js +6 -3
- package/lib/cjs/components/ConversationHistory/ConversationHistory.js +4 -2
- package/lib/cjs/components/ConversationHistory/ConversationHistoryStyles.css +1 -0
- package/lib/cjs/components/PiaConversation/PiaConversation.js +2 -2
- package/lib/cjs/components/PiaConversation/PiaModal.js +3 -2
- package/lib/cjs/hooks/useConversation.js +4 -2
- package/lib/cjs/version.js +1 -1
- package/lib/mjs/components/CioPia/CioPia.js +6 -3
- package/lib/mjs/components/ConversationHistory/ConversationHistory.js +4 -2
- package/lib/mjs/components/ConversationHistory/ConversationHistoryStyles.css +1 -0
- package/lib/mjs/components/PiaConversation/PiaConversation.js +2 -2
- package/lib/mjs/components/PiaConversation/PiaModal.js +3 -2
- package/lib/mjs/hooks/useConversation.js +3 -2
- package/lib/mjs/version.js +1 -1
- package/lib/types/components/CioPia/CioPia.d.ts +12 -0
- package/lib/types/components/ConversationHistory/ConversationHistory.d.ts +3 -2
- package/lib/types/components/PiaConversation/PiaConversation.d.ts +1 -1
- package/lib/types/hooks/useConversation.d.ts +3 -2
- package/lib/types/types.d.ts +13 -0
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,6 +99,14 @@ The component supports multiple display modes via the `displayConfigs` prop:
|
|
|
99
99
|
| `showPreviousItems` | `boolean` | `true` | Show product carousels from previous conversation entries |
|
|
100
100
|
| `learnMoreUrl` | `string` | - | URL for the "Learn More" disclaimer link |
|
|
101
101
|
|
|
102
|
+
**Callbacks:**
|
|
103
|
+
|
|
104
|
+
| Option | Type | Description |
|
|
105
|
+
|--------|------|-------------|
|
|
106
|
+
| `onQuestionSubmit` | `(question: string) => void` | Called when a question is submitted (via Enter key, Send button, or suggested question click) |
|
|
107
|
+
| `onProductCardClick` | `(item: Item) => void` | Called when a product card in the carousel is clicked |
|
|
108
|
+
| `onFeedback` | `(type: 'up' \| 'down') => void` | Called when the user submits positive or negative feedback on an answer |
|
|
109
|
+
|
|
102
110
|
### Using the JavaScript Bundle
|
|
103
111
|
|
|
104
112
|
This is a framework-agnostic method that can be used in any JavaScript project. The `CioPia` function provides a simple interface to inject the PIA component into the provided `selector`.
|