@appcorp/app-corp-vista 0.0.23 → 0.0.25
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/data/vista-chat-props.d.ts +3 -17
- package/data/vista-chat-props.js +24 -1
- package/molecules/vista-button-v1/vista-button-v1.js +2 -2
- package/molecules/vista-chat-heading-v1.js +1 -1
- package/molecules/vista-chat-side-bar-v2.d.ts +6 -0
- package/molecules/vista-chat-side-bar-v2.js +17 -0
- package/molecules/vista-text-input-v1.js +1 -1
- package/organisms/vista-chat-v2/vista-chat-v2.d.ts +3 -0
- package/organisms/vista-chat-v2/vista-chat-v2.js +36 -0
- package/package.json +1 -1
- package/templates/vista-dashboard-v1/vista-dashboard-v1.js +1 -1
- package/type/vista-chat-type.d.ts +15 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VISTA_CHAT_BUBBLE_TYPES } from "../type/vista-chat-type";
|
|
1
|
+
import { VISTA_CHAT_BUBBLE_TYPES, VistaChatV1Props, VistaChatV2Props } from "../type/vista-chat-type";
|
|
2
2
|
export declare const chats: {
|
|
3
3
|
avatarUrl: string;
|
|
4
4
|
avatarAlt: string;
|
|
@@ -12,19 +12,5 @@ export declare const messages: {
|
|
|
12
12
|
timestamp: string;
|
|
13
13
|
type: VISTA_CHAT_BUBBLE_TYPES;
|
|
14
14
|
}[];
|
|
15
|
-
export declare const vistaChatV1Props:
|
|
16
|
-
|
|
17
|
-
messages: {
|
|
18
|
-
message: string;
|
|
19
|
-
timestamp: string;
|
|
20
|
-
type: VISTA_CHAT_BUBBLE_TYPES;
|
|
21
|
-
}[];
|
|
22
|
-
chats: {
|
|
23
|
-
avatarUrl: string;
|
|
24
|
-
avatarAlt: string;
|
|
25
|
-
firstName: string;
|
|
26
|
-
lastName: string;
|
|
27
|
-
lastMessage: string;
|
|
28
|
-
timestamp: string;
|
|
29
|
-
}[];
|
|
30
|
-
};
|
|
15
|
+
export declare const vistaChatV1Props: VistaChatV1Props;
|
|
16
|
+
export declare const vistaChatV2Props: VistaChatV2Props;
|
package/data/vista-chat-props.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.vistaChatV1Props = exports.messages = exports.chats = void 0;
|
|
3
|
+
exports.vistaChatV2Props = exports.vistaChatV1Props = exports.messages = exports.chats = void 0;
|
|
4
|
+
var vista_button_type_1 = require("../type/vista-button-type");
|
|
4
5
|
var vista_chat_type_1 = require("../type/vista-chat-type");
|
|
5
6
|
exports.chats = [
|
|
6
7
|
{
|
|
@@ -107,3 +108,25 @@ exports.vistaChatV1Props = {
|
|
|
107
108
|
messages: exports.messages,
|
|
108
109
|
chats: exports.chats,
|
|
109
110
|
};
|
|
111
|
+
exports.vistaChatV2Props = {
|
|
112
|
+
chatId: 'id',
|
|
113
|
+
chatValue: '',
|
|
114
|
+
handleChatOnChange: function () { return void 0; },
|
|
115
|
+
sectionHeading: 'Psychic Tools',
|
|
116
|
+
actionItems: [
|
|
117
|
+
{
|
|
118
|
+
enabled: true,
|
|
119
|
+
order: 1,
|
|
120
|
+
handleOnClick: function () { return void 0; },
|
|
121
|
+
label: 'Send',
|
|
122
|
+
variant: vista_button_type_1.VISTA_BUTTON_VARIANT.PRIMARY,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
enabled: true,
|
|
126
|
+
order: 2,
|
|
127
|
+
handleOnClick: function () { return void 0; },
|
|
128
|
+
label: 'End',
|
|
129
|
+
variant: vista_button_type_1.VISTA_BUTTON_VARIANT.SECONDARY,
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
};
|
|
@@ -16,9 +16,9 @@ var vistaButtonSizeMap = (_a = {},
|
|
|
16
16
|
_a[vista_button_type_1.VISTA_BUTTON_SIZE.XL] = 'px-3.5 py-2.5 text-sm',
|
|
17
17
|
_a);
|
|
18
18
|
var vistaButtonVariantMap = (_b = {},
|
|
19
|
-
_b[vista_button_type_1.VISTA_BUTTON_VARIANT.PRIMARY] = 'bg-
|
|
19
|
+
_b[vista_button_type_1.VISTA_BUTTON_VARIANT.PRIMARY] = 'bg-primary text-white hover:bg-primary/70 focus-visible:outline-primary/50',
|
|
20
20
|
_b[vista_button_type_1.VISTA_BUTTON_VARIANT.SECONDARY] = 'bg-white text-gray-900 hover:bg-gray-50 ring-1 ring-inset ring-gray-300',
|
|
21
|
-
_b[vista_button_type_1.VISTA_BUTTON_VARIANT.ICON] = 'bg-
|
|
21
|
+
_b[vista_button_type_1.VISTA_BUTTON_VARIANT.ICON] = 'bg-primary text-white hover:bg-primary/70 focus-visible:outline-primary/50 px-2 py-2 !rounded-full',
|
|
22
22
|
_b);
|
|
23
23
|
var vistaButtonRoundedMap = (_c = {},
|
|
24
24
|
_c[vista_button_type_1.VISTA_BUTTON_ROUNDED.NONE] = 'rounded-none',
|
|
@@ -7,7 +7,7 @@ exports.VistaChatHeadingV1 = void 0;
|
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var VistaChatHeadingV1 = function (_a) {
|
|
9
9
|
var heading = _a.heading;
|
|
10
|
-
return (react_1.default.createElement("div", { className: "border-b border-gray-
|
|
10
|
+
return (react_1.default.createElement("div", { className: "border-b border-gray-200 p-4 text-black dark:text-white" },
|
|
11
11
|
react_1.default.createElement("p", { className: "text-lg font-semibold" }, heading)));
|
|
12
12
|
};
|
|
13
13
|
exports.VistaChatHeadingV1 = VistaChatHeadingV1;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.VistaChatSideBarV2 = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var vista_chat_heading_v1_1 = require("./vista-chat-heading-v1");
|
|
9
|
+
var VistaChatSideBarV2 = function (_a) {
|
|
10
|
+
var sectionHeading = _a.sectionHeading;
|
|
11
|
+
return (react_1.default.createElement("div", { className: "col-span-3 flex flex-col border-r border-gray-200 shadow-md" },
|
|
12
|
+
react_1.default.createElement(vista_chat_heading_v1_1.VistaChatHeadingV1, { heading: sectionHeading }),
|
|
13
|
+
react_1.default.createElement("div", { className: "divide flex-1 divide-y divide-gray-600 overflow-y-auto" }, new Array(1).map(function (_, i) { return (
|
|
14
|
+
// <VistaChatListItemV1 key={item.firstName} {...item} />
|
|
15
|
+
react_1.default.createElement("div", { key: i }, "Jello")); }))));
|
|
16
|
+
};
|
|
17
|
+
exports.VistaChatSideBarV2 = VistaChatSideBarV2;
|
|
@@ -17,7 +17,7 @@ var VistaTextInputV1 = function (_a) {
|
|
|
17
17
|
react_1.default.createElement("div", { className: "relative" },
|
|
18
18
|
prefix && (react_1.default.createElement("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3" },
|
|
19
19
|
react_1.default.createElement("span", { className: "text-gray-500 sm:text-sm" }, prefix))),
|
|
20
|
-
react_1.default.createElement("input", { autoComplete: id, className: "block w-full rounded-md border-0 bg-white/5 dark:bg-white/5 py-1.5 text-gray-900 dark:text-white shadow-sm ring-1 ring-inset ring-gray-
|
|
20
|
+
react_1.default.createElement("input", { autoComplete: id, className: "block w-full rounded-md border-0 bg-white/5 dark:bg-white/5 py-1.5 text-gray-900 dark:text-white shadow-sm ring-1 ring-inset ring-gray-200 focus:ring-2 focus:ring-inset focus:ring-primary disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-300 disabled:ring-gray-200 sm:text-sm/6 dark:disabled:bg-gray-800 dark:disabled:text-gray-400 dark:disabled:ring-gray-700 placeholder:text-gray-500 ".concat(prefix && 'pl-7', " ").concat(className), id: id, disabled: disabled, name: id, onChange: function (e) {
|
|
21
21
|
return handleOnChange(id, e.target.value);
|
|
22
22
|
}, placeholder: placeholder, readOnly: readOnly, type: type, value: value, autoFocus: autoFocus }),
|
|
23
23
|
suffix && (react_1.default.createElement("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3" },
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.VistaChatV2 = void 0;
|
|
8
|
+
var react_1 = __importDefault(require("react"));
|
|
9
|
+
var vista_chat_heading_v1_1 = require("../../molecules/vista-chat-heading-v1");
|
|
10
|
+
var vista_chat_side_bar_v2_1 = require("../../molecules/vista-chat-side-bar-v2");
|
|
11
|
+
var vista_text_input_v1_1 = require("../../molecules/vista-text-input-v1");
|
|
12
|
+
var vista_button_v1_1 = require("../../molecules/vista-button-v1/vista-button-v1");
|
|
13
|
+
var vista_button_type_1 = require("../../type/vista-button-type");
|
|
14
|
+
var VistaChatV2 = function (_a) {
|
|
15
|
+
var actionItems = _a.actionItems, chatId = _a.chatId, chatValue = _a.chatValue, handleChatOnChange = _a.handleChatOnChange, sectionHeading = _a.sectionHeading;
|
|
16
|
+
return (react_1.default.createElement("div", { className: "relative h-screen grid grid-cols-12 grid-rows-1 overflow-hidden" },
|
|
17
|
+
react_1.default.createElement(vista_chat_side_bar_v2_1.VistaChatSideBarV2, { sectionHeading: sectionHeading }),
|
|
18
|
+
react_1.default.createElement("section", { className: "col-span-9 flex flex-col" },
|
|
19
|
+
react_1.default.createElement(vista_chat_heading_v1_1.VistaChatHeadingV1, { heading: "Doris Brown" }),
|
|
20
|
+
react_1.default.createElement("div", { className: "overflow-hidden h-full" },
|
|
21
|
+
react_1.default.createElement("div", { className: "h-full overflow-y-auto p-4" })),
|
|
22
|
+
react_1.default.createElement("div", { className: "flex flex-row items-center gap-4 border-t border-gray-200 p-4" },
|
|
23
|
+
react_1.default.createElement("div", { className: 'w-full' },
|
|
24
|
+
react_1.default.createElement(vista_text_input_v1_1.VistaTextInputV1, { handleOnChange: handleChatOnChange, id: chatId, placeholder: 'Enter message...', value: chatValue })),
|
|
25
|
+
actionItems
|
|
26
|
+
.filter(function (_a) {
|
|
27
|
+
var enabled = _a.enabled;
|
|
28
|
+
return enabled;
|
|
29
|
+
})
|
|
30
|
+
.sort(function (a, b) { return a.order - b.order; })
|
|
31
|
+
.map(function (_a) {
|
|
32
|
+
var handleOnClick = _a.handleOnClick, label = _a.label, variant = _a.variant;
|
|
33
|
+
return (react_1.default.createElement(vista_button_v1_1.VistaButtonV1, { handleOnClick: handleOnClick, key: label, label: label, size: vista_button_type_1.VISTA_BUTTON_SIZE.LG, variant: variant }));
|
|
34
|
+
})))));
|
|
35
|
+
};
|
|
36
|
+
exports.VistaChatV2 = VistaChatV2;
|
package/package.json
CHANGED
|
@@ -38,6 +38,6 @@ var VistaDashboardV1 = function (_a) {
|
|
|
38
38
|
react_1.default.createElement(vista_dashboard_sidebar_v1_1.VistaDashboardSidebarV1, __assign({}, sideBar))),
|
|
39
39
|
react_1.default.createElement("div", { className: "".concat(!isSideBarOpen ? 'xl:pl-72' : '') },
|
|
40
40
|
react_1.default.createElement(vista_dashboard_topbar_v1_1.VistaDashboardTopBarV1, __assign({}, topBar, { handleOnClick: handleIsSideBarOpen })),
|
|
41
|
-
react_1.default.createElement("div", { className: "overflow-y-auto" }, children))));
|
|
41
|
+
react_1.default.createElement("div", { className: "overflow-y-auto h-full" }, children))));
|
|
42
42
|
};
|
|
43
43
|
exports.VistaDashboardV1 = VistaDashboardV1;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VISTA_BUTTON_VARIANT } from "./vista-button-type";
|
|
1
2
|
export declare enum VISTA_CHAT_BUBBLE_TYPES {
|
|
2
3
|
PSYCHIC = "PSYCHIC",
|
|
3
4
|
USER = "USER"
|
|
@@ -11,3 +12,17 @@ export interface VistaChatV1Props {
|
|
|
11
12
|
messages: any[];
|
|
12
13
|
chats: any;
|
|
13
14
|
}
|
|
15
|
+
export interface VistaChatV2ActionItem {
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
handleOnClick: () => void;
|
|
18
|
+
label: string;
|
|
19
|
+
order: number;
|
|
20
|
+
variant: VISTA_BUTTON_VARIANT;
|
|
21
|
+
}
|
|
22
|
+
export interface VistaChatV2Props {
|
|
23
|
+
actionItems: VistaChatV2ActionItem[];
|
|
24
|
+
chatId: string;
|
|
25
|
+
chatValue: string;
|
|
26
|
+
handleChatOnChange: () => void;
|
|
27
|
+
sectionHeading: string;
|
|
28
|
+
}
|