@patternfly/chatbot 6.4.0 → 6.5.0-prerelease.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.
@@ -1,8 +1,5 @@
1
1
  import type { FunctionComponent } from 'react';
2
- import { DropdownProps, DropdownToggleProps, DropdownPopperProps } from '@patternfly/react-core';
3
- export interface ExtendedDropdownPopperProps extends DropdownPopperProps {
4
- distance: string;
5
- }
2
+ import { DropdownProps, DropdownToggleProps, PopperOptions } from '@patternfly/react-core';
6
3
  export interface AttachMenuProps extends DropdownProps {
7
4
  /** Items in menu */
8
5
  filteredItems: React.ReactNode;
@@ -11,7 +8,7 @@ export interface AttachMenuProps extends DropdownProps {
11
8
  /** Flag to indicate if menu is opened. */
12
9
  isOpen: boolean;
13
10
  /** Additional properties to pass to the Popper */
14
- popperProps?: ExtendedDropdownPopperProps;
11
+ popperProps?: PopperOptions;
15
12
  /** Callback to change the open state of the menu. Triggered by clicking outside of the menu. */
16
13
  onOpenChange: (isOpen: boolean) => void;
17
14
  /** Keys that trigger onOpenChange, defaults to tab and escape. It is highly recommended to include Escape in the array, while Tab may be omitted if the menu contains non-menu items that are focusable. */
@@ -206,7 +206,7 @@ const MessageBarBase = (_a) => {
206
206
  (_a = attachButtonRef.current) === null || _a === void 0 ? void 0 : _a.focus();
207
207
  attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.setIsAttachMenuOpen(isAttachMenuOpen);
208
208
  (attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuOpenChange) && (attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuOpenChange(isAttachMenuOpen));
209
- }, onOpenChangeKeys: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuOnOpenChangeKeys, onSelect: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuSelect }, (attachMenuProps && { handleTextInputChange: attachMenuProps.onAttachMenuInputChange }), { popperProps: { direction: 'up', distance: '8' }, searchInputPlaceholder: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.attachMenuInputPlaceholder })));
209
+ }, onOpenChangeKeys: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuOnOpenChangeKeys, onSelect: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuSelect }, (attachMenuProps && { handleTextInputChange: attachMenuProps.onAttachMenuInputChange }), { popperProps: { direction: 'up', distance: 8 }, searchInputPlaceholder: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.attachMenuInputPlaceholder })));
210
210
  }
211
211
  return (0, jsx_runtime_1.jsx)("div", { className: `pf-chatbot__message-bar ${className !== null && className !== void 0 ? className : ''}`, children: messageBarContents });
212
212
  };
@@ -1,8 +1,5 @@
1
1
  import type { FunctionComponent } from 'react';
2
- import { DropdownProps, DropdownToggleProps, DropdownPopperProps } from '@patternfly/react-core';
3
- export interface ExtendedDropdownPopperProps extends DropdownPopperProps {
4
- distance: string;
5
- }
2
+ import { DropdownProps, DropdownToggleProps, PopperOptions } from '@patternfly/react-core';
6
3
  export interface AttachMenuProps extends DropdownProps {
7
4
  /** Items in menu */
8
5
  filteredItems: React.ReactNode;
@@ -11,7 +8,7 @@ export interface AttachMenuProps extends DropdownProps {
11
8
  /** Flag to indicate if menu is opened. */
12
9
  isOpen: boolean;
13
10
  /** Additional properties to pass to the Popper */
14
- popperProps?: ExtendedDropdownPopperProps;
11
+ popperProps?: PopperOptions;
15
12
  /** Callback to change the open state of the menu. Triggered by clicking outside of the menu. */
16
13
  onOpenChange: (isOpen: boolean) => void;
17
14
  /** Keys that trigger onOpenChange, defaults to tab and escape. It is highly recommended to include Escape in the array, while Tab may be omitted if the menu contains non-menu items that are focusable. */
@@ -200,7 +200,7 @@ export const MessageBarBase = (_a) => {
200
200
  (_a = attachButtonRef.current) === null || _a === void 0 ? void 0 : _a.focus();
201
201
  attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.setIsAttachMenuOpen(isAttachMenuOpen);
202
202
  (attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuOpenChange) && (attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuOpenChange(isAttachMenuOpen));
203
- }, onOpenChangeKeys: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuOnOpenChangeKeys, onSelect: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuSelect }, (attachMenuProps && { handleTextInputChange: attachMenuProps.onAttachMenuInputChange }), { popperProps: { direction: 'up', distance: '8' }, searchInputPlaceholder: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.attachMenuInputPlaceholder })));
203
+ }, onOpenChangeKeys: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuOnOpenChangeKeys, onSelect: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuSelect }, (attachMenuProps && { handleTextInputChange: attachMenuProps.onAttachMenuInputChange }), { popperProps: { direction: 'up', distance: 8 }, searchInputPlaceholder: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.attachMenuInputPlaceholder })));
204
204
  }
205
205
  return _jsx("div", { className: `pf-chatbot__message-bar ${className !== null && className !== void 0 ? className : ''}`, children: messageBarContents });
206
206
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/chatbot",
3
- "version": "6.4.0",
3
+ "version": "6.5.0-prerelease.1",
4
4
  "description": "This library provides React components based on PatternFly 6 that can be used to build chatbots.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -33,19 +33,19 @@
33
33
  "tag": "prerelease"
34
34
  },
35
35
  "dependencies": {
36
- "@patternfly/react-core": "^6.1.0",
37
36
  "@patternfly/react-code-editor": "^6.1.0",
37
+ "@patternfly/react-core": "^6.1.0",
38
38
  "@patternfly/react-icons": "^6.1.0",
39
39
  "@patternfly/react-table": "^6.1.0",
40
40
  "@segment/analytics-next": "^1.76.0",
41
- "posthog-js": "^1.194.4",
42
41
  "clsx": "^2.1.0",
42
+ "path-browserify": "^1.0.1",
43
+ "posthog-js": "^1.194.4",
43
44
  "react-markdown": "^9.0.1",
44
- "remark-gfm": "^4.0.0",
45
- "rehype-unwrap-images": "^1.0.0",
46
45
  "rehype-external-links": "^3.0.0",
47
46
  "rehype-sanitize": "^6.0.0",
48
- "path-browserify": "^1.0.1",
47
+ "rehype-unwrap-images": "^1.0.0",
48
+ "remark-gfm": "^4.0.0",
49
49
  "unist-util-visit": "^5.0.0"
50
50
  },
51
51
  "peerDependencies": {
@@ -53,29 +53,29 @@
53
53
  "react-dom": "^18 || ^19"
54
54
  },
55
55
  "devDependencies": {
56
- "@patternfly/documentation-framework": "6.22.7",
56
+ "@octokit/rest": "^18.0.0",
57
+ "@patternfly/documentation-framework": "6.28.6",
57
58
  "@patternfly/patternfly": "^6.1.0",
58
59
  "@patternfly/patternfly-a11y": "^5.0.0",
59
60
  "@types/dom-speech-recognition": "^0.0.4",
60
61
  "@types/react": "^18.2.61",
62
+ "estree-util-is-identifier-name": "^3.0.0",
63
+ "file-saver": "^2.0.5",
61
64
  "rimraf": "^2.7.1",
62
65
  "typescript": "^5.3.3",
63
- "@octokit/rest": "^18.0.0",
66
+ "unified": "^11.0.5",
67
+ "victory-bar": "^37.1.1",
64
68
  "victory-core": "^37.1.1",
65
- "victory-scatter": "^37.1.1",
66
- "victory-pie": "^37.1.1",
67
- "victory-stack": "^37.1.1",
68
- "victory-legend": "^37.1.1",
69
- "victory-line": "^37.1.1",
70
- "victory-group": "^37.1.1",
71
- "victory-voronoi-container": "^37.1.1",
72
69
  "victory-create-container": "^37.1.1",
73
70
  "victory-cursor-container": "^37.1.1",
71
+ "victory-group": "^37.1.1",
72
+ "victory-legend": "^37.1.1",
73
+ "victory-line": "^37.1.1",
74
+ "victory-pie": "^37.1.1",
75
+ "victory-scatter": "^37.1.1",
76
+ "victory-stack": "^37.1.1",
74
77
  "victory-tooltip": "^37.1.1",
75
- "victory-bar": "^37.1.1",
76
- "file-saver": "^2.0.5",
77
- "unified": "^11.0.5",
78
- "estree-util-is-identifier-name": "^3.0.0"
78
+ "victory-voronoi-container": "^37.1.1"
79
79
  },
80
80
  "overrides": {
81
81
  "puppeteer": "^23.6.1",
@@ -125,7 +125,7 @@ export const AttachmentMenuExample: FunctionComponent = () => {
125
125
  // eslint-disable-next-line no-console
126
126
  onSelect={(_ev, value) => console.log('selected', value)}
127
127
  handleTextInputChange={onTextChange}
128
- popperProps={{ direction: 'up', distance: '8' }}
128
+ popperProps={{ direction: 'up', distance: 8 }}
129
129
  searchInputPlaceholder="Search cluster resources..."
130
130
  toggle={(toggleRef) => (
131
131
  <Button
@@ -11,13 +11,9 @@ import {
11
11
  DropdownProps,
12
12
  Dropdown,
13
13
  DropdownToggleProps,
14
- DropdownPopperProps
14
+ PopperOptions
15
15
  } from '@patternfly/react-core';
16
16
 
17
- export interface ExtendedDropdownPopperProps extends DropdownPopperProps {
18
- distance: string;
19
- }
20
-
21
17
  export interface AttachMenuProps extends DropdownProps {
22
18
  /** Items in menu */
23
19
  filteredItems: React.ReactNode;
@@ -26,7 +22,7 @@ export interface AttachMenuProps extends DropdownProps {
26
22
  /** Flag to indicate if menu is opened. */
27
23
  isOpen: boolean;
28
24
  /** Additional properties to pass to the Popper */
29
- popperProps?: ExtendedDropdownPopperProps;
25
+ popperProps?: PopperOptions;
30
26
  /** Callback to change the open state of the menu. Triggered by clicking outside of the menu. */
31
27
  onOpenChange: (isOpen: boolean) => void;
32
28
  /** Keys that trigger onOpenChange, defaults to tab and escape. It is highly recommended to include Escape in the array, while Tab may be omitted if the menu contains non-menu items that are focusable. */
@@ -447,7 +447,7 @@ export const MessageBarBase: FunctionComponent<MessageBarProps> = ({
447
447
  onOpenChangeKeys={attachMenuProps?.onAttachMenuOnOpenChangeKeys}
448
448
  onSelect={attachMenuProps?.onAttachMenuSelect}
449
449
  {...(attachMenuProps && { handleTextInputChange: attachMenuProps.onAttachMenuInputChange })}
450
- popperProps={{ direction: 'up', distance: '8' }}
450
+ popperProps={{ direction: 'up', distance: 8 }}
451
451
  searchInputPlaceholder={attachMenuProps?.attachMenuInputPlaceholder}
452
452
  />
453
453
  );