mautourco-components 0.2.33 → 0.2.35

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.
Files changed (37) hide show
  1. package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.js +1 -1
  2. package/dist/components/molecules/Toast/Toast.d.ts +2 -0
  3. package/dist/components/molecules/Toast/Toast.js +2 -2
  4. package/dist/components/organisms/DialogBookingAddItem/AddItemNewService.js +6 -1
  5. package/dist/components/organisms/DialogDeleteConfirm/DialogDeleteConfirm.d.ts +9 -8
  6. package/dist/components/organisms/DialogDeleteConfirm/DialogDeleteConfirm.js +12 -7
  7. package/dist/components/organisms/DialogDeleteConfirm/DialogDeleteConfirmMultiple/DialogDeleteConfirmMultiple.css +2103 -0
  8. package/dist/components/organisms/DialogDeleteConfirm/DialogDeleteConfirmMultiple/DialogDeleteConfirmMultiple.d.ts +12 -0
  9. package/dist/components/organisms/DialogDeleteConfirm/DialogDeleteConfirmMultiple/DialogDeleteConfirmMultiple.js +44 -0
  10. package/dist/components/organisms/DialogDeleteConfirm/DialogDeleteConfirmWrapper.d.ts +10 -0
  11. package/dist/components/organisms/DialogDeleteConfirm/DialogDeleteConfirmWrapper.js +6 -0
  12. package/dist/components/organisms/DialogDeleteConfirm/index.d.ts +3 -0
  13. package/dist/components/organisms/DialogDeleteConfirm/index.js +1 -0
  14. package/dist/components/organisms/DialogQuoteRename/DialogQuoteRename.d.ts +7 -0
  15. package/dist/components/organisms/DialogQuoteRename/DialogQuoteRename.js +14 -0
  16. package/dist/components/organisms/DialogSendingMail/DialogSendingMailContent.js +1 -1
  17. package/dist/components/organisms/DialogSendingMail/DialogSendingMailMultiple/DialogSendingMailMultiple.d.ts +30 -1
  18. package/dist/components/organisms/DialogSendingMail/DialogSendingMailMultiple/DialogSendingMailMultiple.js +36 -7
  19. package/dist/components/organisms/DialogSendingMail/index.d.ts +1 -0
  20. package/dist/components/organisms/QuoteHeader/QuoteHeader.d.ts +4 -2
  21. package/dist/components/organisms/QuoteHeader/QuoteHeader.js +1 -0
  22. package/dist/index.d.ts +3 -0
  23. package/dist/index.js +2 -0
  24. package/package.json +1 -1
  25. package/src/components/molecules/DialogContentPolicy/DialogCancellationAccom.tsx +2 -2
  26. package/src/components/molecules/Toast/Toast.tsx +8 -3
  27. package/src/components/organisms/DialogBookingAddItem/AddItemNewService.tsx +7 -1
  28. package/src/components/organisms/DialogDeleteConfirm/DialogDeleteConfirm.tsx +19 -37
  29. package/src/components/organisms/DialogDeleteConfirm/DialogDeleteConfirmMultiple/DialogDeleteConfirmMultiple.css +20 -0
  30. package/src/components/organisms/DialogDeleteConfirm/DialogDeleteConfirmMultiple/DialogDeleteConfirmMultiple.tsx +84 -0
  31. package/src/components/organisms/DialogDeleteConfirm/DialogDeleteConfirmWrapper.tsx +34 -0
  32. package/src/components/organisms/DialogDeleteConfirm/index.ts +4 -0
  33. package/src/components/organisms/DialogQuoteRename/DialogQuoteRename.tsx +48 -0
  34. package/src/components/organisms/DialogSendingMail/DialogSendingMailContent.tsx +1 -0
  35. package/src/components/organisms/DialogSendingMail/DialogSendingMailMultiple/DialogSendingMailMultiple.tsx +49 -7
  36. package/src/components/organisms/DialogSendingMail/index.ts +1 -0
  37. package/src/components/organisms/QuoteHeader/QuoteHeader.tsx +3 -2
@@ -9,5 +9,5 @@ import { CancellationLayout } from './CancellationLayout/CancellationLayout';
9
9
  export var DialogCancellationAccom = function (props) {
10
10
  var image = props.image, hotelName = props.hotelName, dates = props.dates, rooms = props.rooms, cancellationFee = props.cancellationFee, currency = props.currency;
11
11
  var stay = useStays(dates);
12
- return (_jsx(CancellationLayout, { title: "Accommodation", icon: "accom", image: image, cancellationFee: cancellationFee, currency: currency, children: _jsxs("div", { className: "space-y-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Text, { variant: "bold", children: hotelName }), _jsx(DateDisplay, { dates: dates }), _jsxs(TextWithIcon, { icon: "night", textLeading: "4", children: [stay, " Nights"] })] }), _jsx("div", { className: "", children: rooms.map(function (room, index) { return (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs(TextWithIcon, { icon: "accom", textLeading: "4", children: [index + 1, " Room"] }), _jsx(Text, { size: "sm", children: room.RoomName })] }), room.cancellation_policy.map(function (policy) { return (_jsxs(Fragment, { children: [_jsxs(Chip, { type: "outline", color: "brand", isBlackText: true, children: ["Policy period applies", ' ', _jsx(DateDisplay, { dates: [policy.ValidFrom, policy.ValidTo], textSize: "xs" })] }), _jsxs(Text, { variant: "bold", size: "xs", leading: "4", children: [policy.Value, " % of total price"] }), _jsx(Text, { size: "xs", leading: "4", children: policy.Description })] }, "policy-".concat(index))); })] }, "rm-".concat(index))); }) })] }) }));
12
+ return (_jsx(CancellationLayout, { title: "Accommodation", icon: "accom", image: image, cancellationFee: cancellationFee, currency: currency, children: _jsxs("div", { className: "space-y-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Text, { variant: "bold", children: hotelName }), _jsx(DateDisplay, { dates: dates }), _jsxs(TextWithIcon, { icon: "night", textLeading: "4", children: [stay, " Nights"] })] }), _jsx("div", { className: "", children: rooms.map(function (room, index) { return (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs(TextWithIcon, { icon: "accom", textLeading: "4", children: [index + 1, " Room"] }), _jsx(Text, { size: "sm", children: room.RoomName })] }), room.cancellation_policy.map(function (policy, pIndex) { return (_jsxs(Fragment, { children: [_jsxs(Chip, { type: "outline", color: "brand", isBlackText: true, children: ["Policy period applies", ' ', _jsx(DateDisplay, { dates: [policy.ValidFrom, policy.ValidTo], textSize: "xs" })] }), _jsxs(Text, { variant: "bold", size: "xs", leading: "4", children: [policy.Value, " % of total price"] }), _jsx(Text, { size: "xs", leading: "4", children: policy.Description })] }, "policy-".concat(pIndex))); })] }, "rm-".concat(index))); }) })] }) }));
13
13
  };
@@ -11,6 +11,8 @@ export interface ToastProps {
11
11
  className?: string;
12
12
  /** Icon name */
13
13
  iconName?: IconName;
14
+ /** Show icon */
15
+ showIcon?: boolean;
14
16
  }
15
17
  /**
16
18
  * Toast component - A brief, auto-dismissing message that appears to notify the user.
@@ -12,7 +12,7 @@ import { Text } from '../../atoms/Typography/Typography';
12
12
  * @returns
13
13
  */
14
14
  var Toast = function (_a) {
15
- var text = _a.text, _b = _a.type, type = _b === void 0 ? 'informational' : _b, _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.iconName, iconName = _d === void 0 ? 'badge-alert' : _d;
16
- return (_jsx("div", { className: "toast toast--".concat(type, " ").concat(className).trim(), children: _jsxs("div", { className: "toast__container", children: [_jsx("div", { className: "toast__icon-wrapper", children: _jsx(Icon, { name: iconName, size: "md", className: "toast__icon" }) }), _jsx(Text, { size: "sm", variant: "bold", leading: "5", className: "toast__text", children: text })] }) }));
15
+ var text = _a.text, _b = _a.type, type = _b === void 0 ? 'informational' : _b, _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.iconName, iconName = _d === void 0 ? 'badge-alert' : _d, _e = _a.showIcon, showIcon = _e === void 0 ? true : _e;
16
+ return (_jsx("div", { className: "toast toast--".concat(type, " ").concat(className).trim(), children: _jsxs("div", { className: "toast__container", children: [showIcon && (_jsx("div", { className: "toast__icon-wrapper", children: _jsx(Icon, { name: iconName, size: "md", className: "toast__icon" }) })), _jsx(Text, { size: "sm", variant: "bold", leading: "5", className: "toast__text", children: text })] }) }));
17
17
  };
18
18
  export default Toast;
@@ -8,7 +8,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
8
8
  return to.concat(ar || Array.prototype.slice.call(from));
9
9
  };
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
- import { useCallback, useState } from 'react';
11
+ import { useCallback, useEffect, useState } from 'react';
12
12
  import Button from '../../atoms/Button/Button';
13
13
  import Checkbox from '../../atoms/Checkbox/Checkbox';
14
14
  import { Text } from '../../atoms/Typography/Typography';
@@ -34,6 +34,11 @@ export var AddItemNewService = function (props) {
34
34
  setSelectedClients(__spreadArray(__spreadArray([], selectedClients, true), [client], false));
35
35
  }
36
36
  }, [selectedClients]);
37
+ useEffect(function () {
38
+ if (!!date) {
39
+ setDates(date);
40
+ }
41
+ }, [date]);
37
42
  return (_jsxs("div", { className: "space-y-9", children: [_jsxs("div", { className: "flex sm:items-center gap-4 flex-col sm:flex-row", children: [_jsx(ServiceSelector, { className: "sm:basis-[245px] xl:basis-[260px] shrink-0 grow-0", value: service, onChange: handleServiceChange, options: options }), _jsx("div", { className: "sm:basis-[245px] xl:basis-[260px] shrink-0 grow-0", children: _jsx(DateTimePicker, { mode: "calendar", selectionMode: selectionMode, defaultValue: date, placeholder: "Select date", numberOfMonths: numberOfMonths, iconPosition: "left", iconBGFull: false, showChevron: true, onValueChange: setDates }) })] }), _jsxs("div", { className: "space-y-4", children: [_jsx(Text, { variant: "bold", children: "Please select the pax affected by the new service" }), _jsx("ul", { children: clients.map(function (client, index) { return (_jsx("li", { children: _jsx(Checkbox, { id: "cl-".concat(index), label: "".concat(client.firstName, " ").concat(client.lastName, " (").concat(client.clientType).concat(client.clientType !== 'Adult' ? " - ".concat(client.age, " years old") : '', ")"), checked: selectedClients.some(function (c) { return c.clientId === client.clientId; }), onChange: function () { return handleClientChange(client); } }) }, "cl-".concat(index))); }) })] }), _jsxs("div", { className: "flex justify-end gap-x-4 [&>*]:w-[250px] pb-2", children: [_jsx(Button, { variant: "outline-secondary", onClick: onBack, children: "Back" }), _jsx(Button, { variant: "secondary", onClick: function () {
38
43
  return onNext({
39
44
  clients: selectedClients,
@@ -1,14 +1,15 @@
1
1
  import React from 'react';
2
- import { ButtonProps } from '../../atoms/Button/Button';
3
2
  export interface DialogDeleteConfirmProps {
4
3
  open: boolean;
5
4
  setOpen: (open: boolean) => void;
6
- message: string;
7
5
  title: string;
8
- cancelText?: string;
9
- okText?: string;
10
- okVariant?: ButtonProps['variant'];
11
- onOk?: () => void;
12
- onCancel?: () => void;
6
+ children?: React.ReactNode;
13
7
  }
14
- export declare const DialogDeleteConfirm: React.FC<DialogDeleteConfirmProps>;
8
+ export declare const DialogDeleteConfirm: {
9
+ (props: DialogDeleteConfirmProps): import("react/jsx-runtime").JSX.Element;
10
+ Text: (props: {
11
+ children: React.ReactNode;
12
+ }) => import("react/jsx-runtime").JSX.Element;
13
+ Wrapper: (props: import("./DialogDeleteConfirmWrapper").DialogDeleteConfirmWrapperProps) => import("react/jsx-runtime").JSX.Element;
14
+ Multiple: React.FC<import("./DialogDeleteConfirmMultiple/DialogDeleteConfirmMultiple").DialogDeleteConfirmMultipleProps>;
15
+ };
@@ -1,11 +1,16 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Button from '../../atoms/Button/Button';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
3
2
  import { Text } from '../../atoms/Typography/Typography';
4
3
  import { DialogBookingConfirm } from '../DialogBookingConfirm';
4
+ import { DialogDeleteConfirmMultiple } from './DialogDeleteConfirmMultiple/DialogDeleteConfirmMultiple';
5
+ import { DialogDeleteConfirmWrapper } from './DialogDeleteConfirmWrapper';
6
+ var DialogDeleteConfirmText = function (props) {
7
+ var children = props.children;
8
+ return (_jsx(Text, { variant: "medium", size: "sm", leading: "4", children: children }));
9
+ };
5
10
  export var DialogDeleteConfirm = function (props) {
6
- var open = props.open, setOpen = props.setOpen, message = props.message, title = props.title, _a = props.cancelText, cancelText = _a === void 0 ? 'Cancel' : _a, _b = props.okText, okText = _b === void 0 ? 'Delete' : _b, _c = props.okVariant, okVariant = _c === void 0 ? 'destructive' : _c, onOk = props.onOk, onCancel = props.onCancel;
7
- return (_jsx(DialogBookingConfirm, { open: open, setOpen: setOpen, title: title, className: "!max-w-[500px]", closeOnOverlayClick: true, children: _jsxs("div", { className: "space-y-9", children: [_jsx(Text, { variant: "medium", size: "sm", leading: "4", children: _jsx("span", { dangerouslySetInnerHTML: { __html: message } }) }), _jsxs("div", { className: "grid grid-cols-2 gap-x-4", children: [_jsx(Button, { variant: "outline-secondary", onClick: function () {
8
- setOpen(false);
9
- onCancel === null || onCancel === void 0 ? void 0 : onCancel();
10
- }, children: cancelText }), _jsx(Button, { variant: okVariant, onClick: onOk, children: okText })] })] }) }));
11
+ var open = props.open, title = props.title, children = props.children, setOpen = props.setOpen;
12
+ return (_jsx(DialogBookingConfirm, { open: open, setOpen: setOpen, title: title, className: "!max-w-[500px]", closeOnOverlayClick: true, children: children }));
11
13
  };
14
+ DialogDeleteConfirm.Text = DialogDeleteConfirmText;
15
+ DialogDeleteConfirm.Wrapper = DialogDeleteConfirmWrapper;
16
+ DialogDeleteConfirm.Multiple = DialogDeleteConfirmMultiple;