@appcorp/app-corp-vista 0.0.38 → 0.0.40

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.
@@ -113,6 +113,7 @@ exports.vistaChatV2Props = {
113
113
  chatValue: '',
114
114
  handleChatOnChange: function () { return void 0; },
115
115
  sectionHeading: 'Psychic Tools',
116
+ messages: [],
116
117
  actionItems: [
117
118
  {
118
119
  enabled: true,
@@ -44,7 +44,7 @@ var VistaComboboxV1 = function (_a) {
44
44
  return query === ''
45
45
  ? listItems
46
46
  : listItems.filter(function (item) { var _a; return (_a = item[selectKey1]) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(query.toLowerCase()); });
47
- }, [listItems, query]);
47
+ }, [listItems, query, selectKey1]);
48
48
  return (react_1.default.createElement(react_2.Combobox, { as: "div", onChange: function (v) { return handleOnChange(nodeSelectKey, v); }, value: selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem[selectKey1] },
49
49
  react_1.default.createElement(react_2.Label, { className: "block text-sm/6 font-medium text-gray-900 dark:text-white" },
50
50
  label,
@@ -33,9 +33,13 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  return result;
34
34
  };
35
35
  })();
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
36
39
  Object.defineProperty(exports, "__esModule", { value: true });
37
40
  exports.VistaDashboardSidebarV1 = void 0;
38
41
  var react_1 = __importStar(require("react"));
42
+ var image_1 = __importDefault(require("next/image"));
39
43
  var class_names_1 = require("../../utils/class-names");
40
44
  var VistaDashboardSidebarV1 = function (_a) {
41
45
  var appName = _a.appName, apps = _a.apps, logo = _a.logo, navigation = _a.navigation;
@@ -47,7 +51,7 @@ var VistaDashboardSidebarV1 = function (_a) {
47
51
  }, [apps]);
48
52
  return (react_1.default.createElement("div", { className: "flex grow flex-col gap-y-5 overflow-y-auto bg-gray-200 dark:bg-gray-900 px-6 ring-1 ring-white/10" },
49
53
  react_1.default.createElement("div", { className: "flex h-16 shrink-0 items-center" },
50
- react_1.default.createElement("img", { alt: appName, src: logo, className: "h-8 w-auto" })),
54
+ react_1.default.createElement(image_1.default, { alt: appName, src: logo, width: 32, height: 32 })),
51
55
  react_1.default.createElement("nav", { className: "flex flex-1 flex-col" },
52
56
  react_1.default.createElement("ul", { role: "list", className: "flex flex-1 flex-col gap-y-7" },
53
57
  react_1.default.createElement("li", null,
@@ -11,14 +11,21 @@ var vista_chat_side_bar_v2_1 = require("../../molecules/vista-chat-side-bar-v2/v
11
11
  var vista_text_input_v1_1 = require("../../molecules/vista-text-input-v1");
12
12
  var vista_button_v1_1 = require("../../molecules/vista-button-v1/vista-button-v1");
13
13
  var vista_button_type_1 = require("../../type/vista-button-type");
14
+ var vista_chat_bubble_v1_1 = require("../../molecules/vista-chat-bubble-v1/vista-chat-bubble-v1");
14
15
  var VistaChatV2 = function (_a) {
15
- var actionItems = _a.actionItems, chatId = _a.chatId, chatValue = _a.chatValue, handleChatOnChange = _a.handleChatOnChange, sectionHeading = _a.sectionHeading;
16
+ var actionItems = _a.actionItems, chatId = _a.chatId, chatValue = _a.chatValue, handleChatOnChange = _a.handleChatOnChange, sectionHeading = _a.sectionHeading, messages = _a.messages;
17
+ var renderChatMessages = function () {
18
+ return (react_1.default.createElement(react_1.default.Fragment, null, messages.map((function (_a, idx) {
19
+ var message = _a.message, timestamp = _a.timestamp, currentUser = _a.currentUser, type = _a.type, status = _a.status;
20
+ return (react_1.default.createElement(vista_chat_bubble_v1_1.VistaChatBubbleV1, { key: idx, message: message, timestamp: timestamp, type: type, currentUser: currentUser, status: status }));
21
+ }))));
22
+ };
16
23
  return (react_1.default.createElement("div", { className: "relative h-screen grid grid-cols-12 grid-rows-1 overflow-hidden" },
17
24
  react_1.default.createElement(vista_chat_side_bar_v2_1.VistaChatSideBarV2, { sectionHeading: sectionHeading }),
18
25
  react_1.default.createElement("section", { className: "col-span-9 flex flex-col" },
19
26
  react_1.default.createElement(vista_chat_heading_v1_1.VistaChatHeadingV1, { heading: "Doris Brown" }),
20
27
  react_1.default.createElement("div", { className: "overflow-hidden h-full" },
21
- react_1.default.createElement("div", { className: "h-full overflow-y-auto p-4" })),
28
+ react_1.default.createElement("div", { className: "h-full overflow-y-auto p-4" }, renderChatMessages())),
22
29
  react_1.default.createElement("div", { className: "flex flex-row items-center gap-4 border-t border-gray-200 p-4" },
23
30
  react_1.default.createElement("div", { className: 'w-full' },
24
31
  react_1.default.createElement(vista_text_input_v1_1.VistaTextInputV1, { handleOnChange: handleChatOnChange, id: chatId, placeholder: 'Enter message...', value: chatValue })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/app-corp-vista",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "scripts": {
5
5
  "build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib",
6
6
  "build:next": "next build",
@@ -16,7 +16,7 @@ var VistaAuthV1 = function (_a) {
16
16
  react_1.default.createElement("div", { className: "flex flex-1 flex-col justify-center px-4 py-12 sm:px-6 lg:flex-none lg:px-20 xl:px-24 ".concat(reverted ? 'order-2' : 'order-1') },
17
17
  react_1.default.createElement("div", { className: "mx-auto w-full max-w-sm lg:w-96" },
18
18
  react_1.default.createElement("div", null,
19
- react_1.default.createElement("img", { alt: logoAlt, src: logo, className: "h-10 w-auto" }),
19
+ react_1.default.createElement(image_1.default, { alt: logoAlt, src: logo, width: 40, height: 40 }),
20
20
  react_1.default.createElement("h2", { className: "mt-8 text-2xl/9 font-bold tracking-tight text-gray-900 dark:text-white" }, heading),
21
21
  react_1.default.createElement("p", { className: "mt-2 text-sm/6 text-gray-500 dark:text-gray-300" },
22
22
  description,
@@ -25,4 +25,5 @@ export interface VistaChatV2Props {
25
25
  chatValue: string;
26
26
  handleChatOnChange: (k: string, v: string) => void;
27
27
  sectionHeading: string;
28
+ messages: any[];
28
29
  }