@appcorp/app-corp-vista 0.1.90 → 0.1.92
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/molecules/vista-text-input-v1.js +3 -3
- package/organisms/vista-chat-v2/vista-chat-v2.js +2 -2
- package/organisms/vista-table-v1/vista-table-body-v1.js +2 -0
- package/package.json +1 -1
- package/type/vista-chat-type.d.ts +2 -0
- package/type/vista-table-type.d.ts +1 -0
- package/type/vista-table-type.js +1 -0
- package/type/vista-text-input-type.d.ts +2 -0
|
@@ -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, 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;
|
|
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, handleOnBlur = _a.handleOnBlur, handleOnChange = _a.handleOnChange, handleOnFocus = _a.handleOnFocus, 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" },
|
|
@@ -19,9 +19,9 @@ var VistaTextInputV1 = function (_a) {
|
|
|
19
19
|
react_1.default.createElement("div", { className: "relative" },
|
|
20
20
|
prefix && (react_1.default.createElement("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3" },
|
|
21
21
|
react_1.default.createElement("span", { className: "text-gray-500 sm:text-sm" }, prefix))),
|
|
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) {
|
|
22
|
+
react_1.default.createElement("input", { autoComplete: id, autoFocus: autoFocus, 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
|
+
}, max: max, min: min, onBlur: handleOnBlur, onFocus: handleOnFocus, onKeyDown: handleOnKeyDown, placeholder: placeholder, readOnly: readOnly, required: required, type: type, value: value }),
|
|
25
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-blue-500" }, info)),
|
|
@@ -13,7 +13,7 @@ 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
14
|
var vista_chat_bubble_v1_1 = require("../../molecules/vista-chat-bubble-v1/vista-chat-bubble-v1");
|
|
15
15
|
var VistaChatV2 = function (_a) {
|
|
16
|
-
var actionItems = _a.actionItems, buttonDenominations = _a.buttonDenominations, chatId = _a.chatId, chatValue = _a.chatValue, _b = _a.containerClassName, containerClassName = _b === void 0 ? '' : _b, _c = _a.estimatedBalance, estimatedBalance = _c === void 0 ? '' : _c, handleChatOnChange = _a.handleChatOnChange, handlePayment = _a.handlePayment, isBalanceLow = _a.isBalanceLow, messages = _a.messages, name = _a.name, paymentLoading = _a.paymentLoading, psychic = _a.psychic, sideBarHeading = _a.sideBarHeading, sideBarNode = _a.sideBarNode, timer = _a.timer, typing = _a.typing, user = _a.user;
|
|
16
|
+
var actionItems = _a.actionItems, buttonDenominations = _a.buttonDenominations, chatId = _a.chatId, chatValue = _a.chatValue, _b = _a.containerClassName, containerClassName = _b === void 0 ? '' : _b, _c = _a.estimatedBalance, estimatedBalance = _c === void 0 ? '' : _c, handleChatOnChange = _a.handleChatOnChange, handleOnBlur = _a.handleOnBlur, handleOnFocus = _a.handleOnFocus, handlePayment = _a.handlePayment, isBalanceLow = _a.isBalanceLow, messages = _a.messages, name = _a.name, paymentLoading = _a.paymentLoading, psychic = _a.psychic, sideBarHeading = _a.sideBarHeading, sideBarNode = _a.sideBarNode, timer = _a.timer, typing = _a.typing, user = _a.user;
|
|
17
17
|
var renderChatMessages = function () {
|
|
18
18
|
return (react_1.default.createElement("div", { className: 'overflow-y-scroll' }, messages.map((function (_a, ind) {
|
|
19
19
|
var createdAt = _a.createdAt, id = _a.id, isUser = _a.isUser, message = _a.message;
|
|
@@ -40,7 +40,7 @@ var VistaChatV2 = function (_a) {
|
|
|
40
40
|
react_1.default.createElement("div", { className: 'pl-4' }, typing && (react_1.default.createElement("p", { className: 'text-xs italic pb-1 text-primary' }, typing))),
|
|
41
41
|
react_1.default.createElement("div", { className: "flex flex-row items-center gap-4 border-t border-gray-200 p-4" },
|
|
42
42
|
react_1.default.createElement("div", { className: 'w-full' },
|
|
43
|
-
react_1.default.createElement(vista_text_input_v1_1.VistaTextInputV1, { handleOnChange: handleChatOnChange, id: chatId, placeholder: 'Enter message...', value: chatValue
|
|
43
|
+
react_1.default.createElement(vista_text_input_v1_1.VistaTextInputV1, { handleOnBlur: handleOnBlur, handleOnChange: handleChatOnChange, handleOnFocus: handleOnFocus, handleOnKeyDown: handleOnKeyDown, id: chatId, placeholder: 'Enter message...', value: chatValue })),
|
|
44
44
|
actionItems
|
|
45
45
|
.filter(function (_a) {
|
|
46
46
|
var enabled = _a.enabled;
|
|
@@ -44,6 +44,7 @@ var vista_shimmer_v1_1 = require("../../atoms/vista-shimmer-v1/vista-shimmer-v1"
|
|
|
44
44
|
var vista_table_type_1 = require("../../type/vista-table-type");
|
|
45
45
|
var uuid_1 = require("uuid");
|
|
46
46
|
var react_photo_view_1 = require("react-photo-view");
|
|
47
|
+
var solid_1 = require("@heroicons/react/24/solid");
|
|
47
48
|
require("react-photo-view/dist/react-photo-view.css");
|
|
48
49
|
exports.TOOLTIP_OFFSET = -8;
|
|
49
50
|
exports.rowClasses = 'odd:bg-gray-100 even:bg-gray-200 hover:bg-gray-300 dark:odd:bg-gray-800 dark:even:bg-gray-700 dark:hover:bg-gray-600';
|
|
@@ -76,6 +77,7 @@ var componentMap = (_a = {},
|
|
|
76
77
|
var id = (0, uuid_1.v4)();
|
|
77
78
|
return (react_1.default.createElement(vista_table_cell_v1_1.VistaTableCellV1, { key: id, label: v }));
|
|
78
79
|
}))); },
|
|
80
|
+
_a[vista_table_type_1.VISTA_TABLE_CELL_TYPE.PDF] = function (val) { return (react_1.default.createElement("td", { className: exports.dataClasses, onClick: function () { return window.open(val, '_blank'); } }, val && (react_1.default.createElement(solid_1.DocumentIcon, { className: 'size-10' })))); },
|
|
79
81
|
_a);
|
|
80
82
|
var VistaTableBodyV1 = function (_a) {
|
|
81
83
|
var colLength = _a.colLength, loading = _a.loading, pageLimit = _a.pageLimit, tableBodyCols = _a.tableBodyCols, tableBodyRows = _a.tableBodyRows, rowActions = _a.rowActions;
|
package/package.json
CHANGED
|
@@ -46,6 +46,8 @@ export interface VistaChatV2Props {
|
|
|
46
46
|
containerClassName?: string;
|
|
47
47
|
estimatedBalance?: string;
|
|
48
48
|
handleChatOnChange: (k: string, v: string) => void;
|
|
49
|
+
handleOnBlur?: () => void;
|
|
50
|
+
handleOnFocus?: () => void;
|
|
49
51
|
handlePayment: (l: string, v: string) => void;
|
|
50
52
|
isBalanceLow: boolean;
|
|
51
53
|
messages: VistaChatV2Message[];
|
package/type/vista-table-type.js
CHANGED
|
@@ -10,5 +10,6 @@ var VISTA_TABLE_CELL_TYPE;
|
|
|
10
10
|
VISTA_TABLE_CELL_TYPE["IMAGE"] = "IMAGE";
|
|
11
11
|
VISTA_TABLE_CELL_TYPE["MULTIPLE_TEXT_LINES"] = "MULTIPLE_TEXT_LINES";
|
|
12
12
|
VISTA_TABLE_CELL_TYPE["OBJECT"] = "OBJECT";
|
|
13
|
+
VISTA_TABLE_CELL_TYPE["PDF"] = "PDF";
|
|
13
14
|
VISTA_TABLE_CELL_TYPE["TEXT"] = "TEXT";
|
|
14
15
|
})(VISTA_TABLE_CELL_TYPE || (exports.VISTA_TABLE_CELL_TYPE = VISTA_TABLE_CELL_TYPE = {}));
|
|
@@ -4,7 +4,9 @@ export interface VistaTextInputV1Props {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
error?: string;
|
|
7
|
+
handleOnBlur?: () => void;
|
|
7
8
|
handleOnChange: (k: string, v: string) => void;
|
|
9
|
+
handleOnFocus?: () => void;
|
|
8
10
|
handleOnKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
9
11
|
handleSuffixOnClick?: () => void;
|
|
10
12
|
id: string;
|