@appcorp/app-corp-vista 0.1.29 → 0.1.31
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.js +1 -0
- package/molecules/vista-table-header-v1.js +3 -2
- package/molecules/vista-text-input-v1.js +2 -2
- package/organisms/vista-chat-v2/vista-chat-v2.js +1 -1
- package/organisms/vista-table-v1/vista-table-v1.js +2 -2
- package/package.json +1 -1
- package/type/vista-table-header-type.d.ts +1 -0
- package/type/vista-table-type.d.ts +6 -5
- package/type/vista-text-input-type.d.ts +1 -0
package/data/vista-chat-props.js
CHANGED
|
@@ -115,6 +115,7 @@ exports.vistaChatV1Props = {
|
|
|
115
115
|
exports.vistaChatV2Props = {
|
|
116
116
|
chatId: 'id',
|
|
117
117
|
chatValue: '',
|
|
118
|
+
containerClassName: '',
|
|
118
119
|
handleChatOnChange: function () { return void 0; },
|
|
119
120
|
sideBarHeading: 'Psychic Tools',
|
|
120
121
|
sideBarNode: react_1.default.createElement("p", null, "Hello World"),
|
|
@@ -8,14 +8,15 @@ var react_1 = __importDefault(require("react"));
|
|
|
8
8
|
var vista_button_v1_1 = require("./vista-button-v1/vista-button-v1");
|
|
9
9
|
var vista_button_type_1 = require("../type/vista-button-type");
|
|
10
10
|
var vista_text_input_v1_1 = require("./vista-text-input-v1");
|
|
11
|
+
var outline_1 = require("@heroicons/react/24/outline");
|
|
11
12
|
var VistaTableHeaderV1 = function (_a) {
|
|
12
|
-
var handleSearchInput = _a.handleSearchInput, headerActions = _a.headerActions, searchDisabled = _a.searchDisabled, searchEnabled = _a.searchEnabled, searchId = _a.searchId, searchPlaceholder = _a.searchPlaceholder, searchValue = _a.searchValue, tableDescription = _a.tableDescription, tableHeading = _a.tableHeading;
|
|
13
|
+
var handleSearchInput = _a.handleSearchInput, handleSuffixOnClick = _a.handleSuffixOnClick, headerActions = _a.headerActions, searchDisabled = _a.searchDisabled, searchEnabled = _a.searchEnabled, searchId = _a.searchId, searchPlaceholder = _a.searchPlaceholder, searchValue = _a.searchValue, tableDescription = _a.tableDescription, tableHeading = _a.tableHeading;
|
|
13
14
|
return (react_1.default.createElement("div", { className: "sm:flex sm:items-center" },
|
|
14
15
|
react_1.default.createElement("div", { className: "sm:flex-auto" },
|
|
15
16
|
react_1.default.createElement("h1", { className: "text-base font-semibold text-gray-900 dark:text-white" }, tableHeading),
|
|
16
17
|
react_1.default.createElement("p", { className: "mt-2 text-sm text-gray-900 dark:text-white" }, tableDescription)),
|
|
17
18
|
react_1.default.createElement("div", { className: "mt-4 flex gap-4 sm:ml-16 sm:mt-0 sm:flex-none" },
|
|
18
|
-
searchEnabled && (react_1.default.createElement(vista_text_input_v1_1.VistaTextInputV1, { disabled: searchDisabled, handleOnChange: handleSearchInput, id: searchId, placeholder: searchPlaceholder, value: searchValue })),
|
|
19
|
+
searchEnabled && (react_1.default.createElement(vista_text_input_v1_1.VistaTextInputV1, { disabled: searchDisabled, handleOnChange: handleSearchInput, handleSuffixOnClick: handleSuffixOnClick, id: searchId, placeholder: searchPlaceholder, suffix: react_1.default.createElement(outline_1.XMarkIcon, { className: 'size-5' }), value: searchValue })),
|
|
19
20
|
headerActions
|
|
20
21
|
.filter(function (_a) {
|
|
21
22
|
var enabled = _a.enabled;
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.VistaTextInputV1 = void 0;
|
|
8
8
|
var react_1 = __importDefault(require("react"));
|
|
9
9
|
var VistaTextInputV1 = function (_a) {
|
|
10
|
-
var _b = _a.autoFocus, autoFocus = _b === void 0 ? false : _b, _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, error = _a.error, handleOnChange = _a.handleOnChange, handleOnKeyDown = _a.handleOnKeyDown, id = _a.id, info = _a.info, label = _a.label, max = _a.max, min = _a.min, optional = _a.optional, placeholder = _a.placeholder, prefix = _a.prefix, _e = _a.readOnly, readOnly = _e === void 0 ? false : _e, _f = _a.required, required = _f === void 0 ? false : _f, suffix = _a.suffix, _g = _a.type, type = _g === void 0 ? 'text' : _g, value = _a.value;
|
|
10
|
+
var _b = _a.autoFocus, autoFocus = _b === void 0 ? false : _b, _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, error = _a.error, handleOnChange = _a.handleOnChange, handleOnKeyDown = _a.handleOnKeyDown, handleSuffixOnClick = _a.handleSuffixOnClick, id = _a.id, info = _a.info, label = _a.label, max = _a.max, min = _a.min, optional = _a.optional, placeholder = _a.placeholder, prefix = _a.prefix, _e = _a.readOnly, readOnly = _e === void 0 ? false : _e, _f = _a.required, required = _f === void 0 ? false : _f, suffix = _a.suffix, _g = _a.type, type = _g === void 0 ? 'text' : _g, value = _a.value;
|
|
11
11
|
return (react_1.default.createElement("div", null,
|
|
12
12
|
react_1.default.createElement("div", { className: "flex justify-between" },
|
|
13
13
|
label && (react_1.default.createElement("div", { className: "mb-2" },
|
|
@@ -22,7 +22,7 @@ var VistaTextInputV1 = function (_a) {
|
|
|
22
22
|
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), disabled: disabled, id: id, name: id, onChange: function (e) {
|
|
23
23
|
return handleOnChange(id, e.target.value);
|
|
24
24
|
}, autoFocus: autoFocus, max: max, min: min, onKeyDown: handleOnKeyDown, placeholder: placeholder, readOnly: readOnly, required: required, type: type, value: value }),
|
|
25
|
-
suffix && (react_1.default.createElement("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3" },
|
|
25
|
+
suffix && handleSuffixOnClick && (react_1.default.createElement("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3", onClick: handleSuffixOnClick },
|
|
26
26
|
react_1.default.createElement("span", { id: "price-currency", className: "text-gray-500 sm:text-sm" }, suffix)))),
|
|
27
27
|
info && !error && (react_1.default.createElement("p", { id: "".concat(id, "-info"), className: "mt-2 text-sm text-primary" }, info)),
|
|
28
28
|
error && !info && (react_1.default.createElement("p", { id: "".concat(id, "-error"), className: "mt-2 text-sm text-red-500 dark:text-red-500" }, error))));
|
|
@@ -15,7 +15,7 @@ var vista_chat_bubble_v1_1 = require("../../molecules/vista-chat-bubble-v1/vista
|
|
|
15
15
|
var VistaChatV2 = function (_a) {
|
|
16
16
|
var actionItems = _a.actionItems, chatId = _a.chatId, chatValue = _a.chatValue, _b = _a.containerClassName, containerClassName = _b === void 0 ? '' : _b, handleChatOnChange = _a.handleChatOnChange, messages = _a.messages, name = _a.name, psychic = _a.psychic, sideBarHeading = _a.sideBarHeading, sideBarNode = _a.sideBarNode, timer = _a.timer, user = _a.user;
|
|
17
17
|
var renderChatMessages = function () {
|
|
18
|
-
return (react_1.default.createElement(
|
|
18
|
+
return (react_1.default.createElement("div", { className: 'overflow-y-scroll' }, messages.map((function (_a) {
|
|
19
19
|
var createdAt = _a.createdAt, id = _a.id, isUser = _a.isUser, message = _a.message;
|
|
20
20
|
return (react_1.default.createElement(vista_chat_bubble_v1_1.VistaChatBubbleV1, { createdAt: createdAt, isUser: isUser, key: id, message: message, psychic: psychic, user: user }));
|
|
21
21
|
}))));
|
|
@@ -8,9 +8,9 @@ var react_1 = __importDefault(require("react"));
|
|
|
8
8
|
var vista_table_header_v1_1 = require("../../molecules/vista-table-header-v1");
|
|
9
9
|
var vista_table_footer_v1_1 = require("../../molecules/vista-table-footer-v1");
|
|
10
10
|
var VistaTableV1 = function (_a) {
|
|
11
|
-
var currentPage = _a.currentPage, handleNextOnClick = _a.handleNextOnClick, handleOnSelect = _a.handleOnSelect, handlePreviousOnClick = _a.handlePreviousOnClick, handleSearchInput = _a.handleSearchInput, headerActions = _a.headerActions, isNextDisabled = _a.isNextDisabled, isPreviousDisabled = _a.isPreviousDisabled, listOptions = _a.listOptions, nodeSelectedKey = _a.nodeSelectedKey, searchDisabled = _a.searchDisabled, _b = _a.searchEnabled, searchEnabled = _b === void 0 ? false : _b, searchId = _a.searchId, searchPlaceholder = _a.searchPlaceholder, searchValue = _a.searchValue, selectKey1 = _a.selectKey1, selectKey2 = _a.selectKey2, selectedItem = _a.selectedItem, tableBody = _a.tableBody, tableDescription = _a.tableDescription, tableHead = _a.tableHead, tableHeading = _a.tableHeading, totalPages = _a.totalPages;
|
|
11
|
+
var currentPage = _a.currentPage, handleNextOnClick = _a.handleNextOnClick, handleOnSelect = _a.handleOnSelect, handlePreviousOnClick = _a.handlePreviousOnClick, handleSearchInput = _a.handleSearchInput, handleSuffixOnClick = _a.handleSuffixOnClick, headerActions = _a.headerActions, isNextDisabled = _a.isNextDisabled, isPreviousDisabled = _a.isPreviousDisabled, listOptions = _a.listOptions, nodeSelectedKey = _a.nodeSelectedKey, searchDisabled = _a.searchDisabled, _b = _a.searchEnabled, searchEnabled = _b === void 0 ? false : _b, searchId = _a.searchId, searchPlaceholder = _a.searchPlaceholder, searchValue = _a.searchValue, selectKey1 = _a.selectKey1, selectKey2 = _a.selectKey2, selectedItem = _a.selectedItem, tableBody = _a.tableBody, tableDescription = _a.tableDescription, tableHead = _a.tableHead, tableHeading = _a.tableHeading, totalPages = _a.totalPages;
|
|
12
12
|
return (react_1.default.createElement("div", null,
|
|
13
|
-
react_1.default.createElement(vista_table_header_v1_1.VistaTableHeaderV1, { handleSearchInput: handleSearchInput, headerActions: headerActions, searchDisabled: searchDisabled, searchEnabled: searchEnabled, searchId: searchId, searchPlaceholder: searchPlaceholder, searchValue: searchValue, tableDescription: tableDescription, tableHeading: tableHeading }),
|
|
13
|
+
react_1.default.createElement(vista_table_header_v1_1.VistaTableHeaderV1, { handleSearchInput: handleSearchInput, handleSuffixOnClick: handleSuffixOnClick, headerActions: headerActions, searchDisabled: searchDisabled, searchEnabled: searchEnabled, searchId: searchId, searchPlaceholder: searchPlaceholder, searchValue: searchValue, tableDescription: tableDescription, tableHeading: tableHeading }),
|
|
14
14
|
react_1.default.createElement("div", { className: "mt-8 inline-block min-w-full py-2 align-middle" },
|
|
15
15
|
react_1.default.createElement("table", { className: "min-w-full divide-y divide-gray-700" },
|
|
16
16
|
react_1.default.createElement("thead", null, tableHead),
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { VistaTableHeaderActionItem } from "./vista-table-type";
|
|
2
2
|
export interface VistaTableHeaderV1Props {
|
|
3
3
|
handleSearchInput: (k: string, v: string) => void;
|
|
4
|
+
handleSuffixOnClick?: () => void;
|
|
4
5
|
headerActions: VistaTableHeaderActionItem[];
|
|
5
6
|
searchDisabled: boolean;
|
|
6
7
|
searchEnabled?: boolean;
|
|
@@ -12,16 +12,17 @@ export interface VistaTableV1Props {
|
|
|
12
12
|
handleOnSelect: (k: string, v: string) => void;
|
|
13
13
|
handlePreviousOnClick: () => void;
|
|
14
14
|
handleSearchInput: (k: string, v: string) => void;
|
|
15
|
+
handleSuffixOnClick?: () => void;
|
|
15
16
|
headerActions: VistaTableHeaderActionItem[];
|
|
16
|
-
searchEnabled?: boolean;
|
|
17
|
-
searchDisabled: boolean;
|
|
18
|
-
searchId: string;
|
|
19
|
-
searchPlaceholder: string;
|
|
20
|
-
searchValue: string;
|
|
21
17
|
isNextDisabled: boolean;
|
|
22
18
|
isPreviousDisabled: boolean;
|
|
23
19
|
listOptions: Object[];
|
|
24
20
|
nodeSelectedKey: string;
|
|
21
|
+
searchDisabled: boolean;
|
|
22
|
+
searchEnabled?: boolean;
|
|
23
|
+
searchId: string;
|
|
24
|
+
searchPlaceholder: string;
|
|
25
|
+
searchValue: string;
|
|
25
26
|
selectKey1: string;
|
|
26
27
|
selectKey2?: string;
|
|
27
28
|
selectedItem: {
|