allaw-ui 1.0.37 → 1.0.39
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/dist/components/atoms/tags/OtherStatusTag.css +27 -0
- package/dist/components/atoms/tags/OtherStatusTag.d.ts +1 -0
- package/dist/components/atoms/tags/OtherStatusTag.js +2 -2
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.css +39 -0
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.d.ts +1 -0
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.js +14 -14
- package/dist/components/molecules/billingCount/BillingCount.js +1 -1
- package/dist/components/molecules/caseLinkCard/CaseLinkCard.js +1 -1
- package/package.json +1 -1
|
@@ -77,3 +77,30 @@
|
|
|
77
77
|
justify-content: center;
|
|
78
78
|
align-items: center;
|
|
79
79
|
}
|
|
80
|
+
|
|
81
|
+
/* Styles pour le mode compact */
|
|
82
|
+
.other-status-tag.compact {
|
|
83
|
+
height: 22px;
|
|
84
|
+
padding: 6px 8px;
|
|
85
|
+
gap: 8px;
|
|
86
|
+
font-size: 12px;
|
|
87
|
+
min-height: 34px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.other-status-tag.compact.editable {
|
|
91
|
+
height: 30px;
|
|
92
|
+
padding: 6px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.other-status-tag.compact.information {
|
|
96
|
+
height: 22px;
|
|
97
|
+
padding: 6px;
|
|
98
|
+
font-size: 11px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.other-status-tag.compact .icon {
|
|
102
|
+
width: 14px;
|
|
103
|
+
height: 14px;
|
|
104
|
+
padding: 2.833px;
|
|
105
|
+
font-size: 10px;
|
|
106
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./OtherStatusTag.css";
|
|
3
3
|
var OtherStatusTag = function (_a) {
|
|
4
|
-
var _b = _a.label, label = _b === void 0 ? "Tags" : _b, _c = _a.type, type = _c === void 0 ? "readonly" : _c, _d = _a.startIcon, startIcon = _d === void 0 ? false : _d, _e = _a.startIconName, startIconName = _e === void 0 ? "allaw-icon-pmr" : _e, labelLimit = _a.labelLimit;
|
|
4
|
+
var _b = _a.label, label = _b === void 0 ? "Tags" : _b, _c = _a.type, type = _c === void 0 ? "readonly" : _c, _d = _a.startIcon, startIcon = _d === void 0 ? false : _d, _e = _a.startIconName, startIconName = _e === void 0 ? "allaw-icon-pmr" : _e, labelLimit = _a.labelLimit, _f = _a.style, style = _f === void 0 ? "normal" : _f;
|
|
5
5
|
var truncateText = function (text, limit) {
|
|
6
6
|
if (!limit || text.length <= limit)
|
|
7
7
|
return text;
|
|
8
8
|
return "".concat(text.slice(0, limit), "...");
|
|
9
9
|
};
|
|
10
|
-
return (React.createElement("div", { className: "other-status-tag ".concat(type) },
|
|
10
|
+
return (React.createElement("div", { className: "other-status-tag ".concat(type, " ").concat(style) },
|
|
11
11
|
type === "information" && startIcon && (React.createElement("span", { className: "icon ".concat(startIconName) })),
|
|
12
12
|
React.createElement("span", { className: "other-status-tag-label", title: label }, truncateText(label, labelLimit)),
|
|
13
13
|
type === "editable" && React.createElement("span", { className: "icon allaw-icon-close" })));
|
|
@@ -364,3 +364,42 @@
|
|
|
364
364
|
align-items: center;
|
|
365
365
|
gap: 8px;
|
|
366
366
|
}
|
|
367
|
+
|
|
368
|
+
/* Styles compacts */
|
|
369
|
+
.appointment-slot.compact .appointment-time {
|
|
370
|
+
font-size: 14px;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.appointment-slot.compact .client-name {
|
|
374
|
+
font-size: 12px;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.appointment-slot.compact .appointment-content {
|
|
378
|
+
font-size: 14px;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.appointment-slot.compact .make-unavailable-text {
|
|
382
|
+
font-size: 12px;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.appointment-slot.compact .document-count,
|
|
386
|
+
.appointment-slot.compact .note-count {
|
|
387
|
+
font-size: 12px;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/* Styles compacts pour le mode summary */
|
|
391
|
+
.appointment-slot-summary.compact .summary-date {
|
|
392
|
+
font-size: 14px;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.appointment-slot-summary.compact .summary-time {
|
|
396
|
+
font-size: 14px;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.appointment-slot-summary.compact .appointment-content {
|
|
400
|
+
font-size: 14px;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.appointment-slot-summary.compact .client-name {
|
|
404
|
+
font-size: 12px;
|
|
405
|
+
}
|
|
@@ -5,8 +5,8 @@ import OtherStatusTag from "../../atoms/tags/OtherStatusTag";
|
|
|
5
5
|
import ActionCircleButton from "../../atoms/buttons/ActionCircleButton";
|
|
6
6
|
import IconButton from "../../atoms/buttons/IconButton";
|
|
7
7
|
var AppointmentSlot = function (_a) {
|
|
8
|
-
var status = _a.status, startTime = _a.startTime, endTime = _a.endTime, date = _a.date, clientName = _a.clientName, appointmentContent = _a.appointmentContent, tags = _a.tags, noteCount = _a.noteCount, documentCount = _a.documentCount, actions = _a.actions;
|
|
9
|
-
var
|
|
8
|
+
var status = _a.status, startTime = _a.startTime, endTime = _a.endTime, date = _a.date, clientName = _a.clientName, appointmentContent = _a.appointmentContent, tags = _a.tags, noteCount = _a.noteCount, documentCount = _a.documentCount, actions = _a.actions, _b = _a.style, style = _b === void 0 ? "compact" : _b;
|
|
9
|
+
var _c = useState(false), isActive = _c[0], setIsActive = _c[1];
|
|
10
10
|
// Handlers
|
|
11
11
|
var handleApprove = useCallback(function () {
|
|
12
12
|
var _a;
|
|
@@ -39,7 +39,7 @@ var AppointmentSlot = function (_a) {
|
|
|
39
39
|
// Render functions
|
|
40
40
|
var renderHeader = function () { return (React.createElement("div", { className: "appointment-header" },
|
|
41
41
|
React.createElement("span", { className: "appointment-time" }, "".concat(startTime, " - ").concat(endTime)),
|
|
42
|
-
status !== "summary" && (React.createElement(AppointementStatusTag, { status: status })))); };
|
|
42
|
+
status !== "summary" && (React.createElement(AppointementStatusTag, { status: status, variant: style === "compact" ? "small" : "default" })))); };
|
|
43
43
|
var renderFooter = function () {
|
|
44
44
|
if (status === "available") {
|
|
45
45
|
return renderAvailableFooter();
|
|
@@ -64,7 +64,7 @@ var AppointmentSlot = function (_a) {
|
|
|
64
64
|
renderTags()),
|
|
65
65
|
renderActionButtons())); };
|
|
66
66
|
var renderTags = function () {
|
|
67
|
-
return tags && (React.createElement("div", { className: "tags-container" }, tags.map(function (tag, index) { return (React.createElement(OtherStatusTag, { key: index, label: tag })); })));
|
|
67
|
+
return tags && (React.createElement("div", { className: "tags-container" }, tags.map(function (tag, index) { return (React.createElement(OtherStatusTag, { key: index, label: tag, style: style === "compact" ? "compact" : "normal" })); })));
|
|
68
68
|
};
|
|
69
69
|
var renderActionButtons = function () {
|
|
70
70
|
switch (status) {
|
|
@@ -72,21 +72,22 @@ var AppointmentSlot = function (_a) {
|
|
|
72
72
|
return (React.createElement("div", { className: "action-button-container" },
|
|
73
73
|
React.createElement(ActionCircleButton, { status: "dual", onApprove: handleApprove, onReject: handleReject })));
|
|
74
74
|
case "confirmed":
|
|
75
|
-
return (React.createElement("div", { className: "document-actions" },
|
|
75
|
+
return documentCount && parseInt(documentCount) > 0 ? (React.createElement("div", { className: "document-actions" },
|
|
76
76
|
React.createElement(IconButton, { style: "smallFilled", iconName: "allaw-icon-document", onClick: actions === null || actions === void 0 ? void 0 : actions.onViewDocument }),
|
|
77
|
-
|
|
77
|
+
React.createElement("span", { className: "document-count" }, documentCount))) : null;
|
|
78
78
|
case "passed":
|
|
79
79
|
return (React.createElement("div", { className: "document-actions" },
|
|
80
80
|
React.createElement(IconButton, { style: "smallFilled", iconName: "allaw-icon-edit-2", onClick: actions === null || actions === void 0 ? void 0 : actions.onEdit }),
|
|
81
81
|
noteCount && React.createElement("span", { className: "note-count" }, noteCount),
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
documentCount && parseInt(documentCount) > 0 && (React.createElement(React.Fragment, null,
|
|
83
|
+
React.createElement(IconButton, { style: "smallFilled", iconName: "allaw-icon-document", onClick: actions === null || actions === void 0 ? void 0 : actions.onViewDocument }),
|
|
84
|
+
React.createElement("span", { className: "document-count" }, documentCount)))));
|
|
84
85
|
default:
|
|
85
86
|
return null;
|
|
86
87
|
}
|
|
87
88
|
};
|
|
88
89
|
if (status === "summary") {
|
|
89
|
-
return (React.createElement("div", { className: "appointment-slot-summary" },
|
|
90
|
+
return (React.createElement("div", { className: "appointment-slot-summary ".concat(style) },
|
|
90
91
|
React.createElement("div", { className: "appointment-header" },
|
|
91
92
|
React.createElement("div", { className: "date-time-container" },
|
|
92
93
|
React.createElement("span", { className: "summary-date" }, date),
|
|
@@ -97,12 +98,11 @@ var AppointmentSlot = function (_a) {
|
|
|
97
98
|
React.createElement("div", { className: "client-name" }, clientName),
|
|
98
99
|
React.createElement("div", { className: "appointment-content" }, appointmentContent),
|
|
99
100
|
renderTags()),
|
|
100
|
-
React.createElement("div", { className: "document-actions-container" },
|
|
101
|
-
React.createElement(
|
|
102
|
-
|
|
103
|
-
documentCount && (React.createElement("span", { className: "document-count" }, documentCount)))))));
|
|
101
|
+
React.createElement("div", { className: "document-actions-container" }, documentCount && parseInt(documentCount) > 0 && (React.createElement("div", { className: "document-actions" },
|
|
102
|
+
React.createElement(IconButton, { style: "smallFilled", iconName: "allaw-icon-document", onClick: actions === null || actions === void 0 ? void 0 : actions.onViewDocument }),
|
|
103
|
+
React.createElement("span", { className: "document-count" }, documentCount)))))));
|
|
104
104
|
}
|
|
105
|
-
return (React.createElement("div", { className: "appointment-slot ".concat(status, " ").concat(isActive ? "active" : ""), onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, onClick: handleClick },
|
|
105
|
+
return (React.createElement("div", { className: "appointment-slot ".concat(status, " ").concat(isActive ? "active" : "", " ").concat(style), onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, onClick: handleClick },
|
|
106
106
|
renderHeader(),
|
|
107
107
|
renderFooter()));
|
|
108
108
|
};
|
|
@@ -63,7 +63,7 @@ function BillingCount(_a) {
|
|
|
63
63
|
return React.createElement("button", { onClick: handleButtonClick, className: "billing-button-wrapper" },
|
|
64
64
|
React.createElement("i", { className: "allaw-icon-clock" }),
|
|
65
65
|
formatTime(time),
|
|
66
|
-
React.createElement("svg", { width: "
|
|
66
|
+
React.createElement("svg", { width: "11px", height: "11px", viewBox: "-0.5 0 7 7", version: "1.1", xmlns: "http://www.w3.org/2000/svg" },
|
|
67
67
|
React.createElement("g", { id: "Page-1", stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" },
|
|
68
68
|
React.createElement("g", { id: "Dribbble-Light-Preview", transform: "translate(-347.000000, -3766.000000)", fill: "#25BEEB" },
|
|
69
69
|
React.createElement("g", { id: "icons", transform: "translate(56.000000, 160.000000)" },
|
|
@@ -30,7 +30,7 @@ function CaseLinkCard(_a) {
|
|
|
30
30
|
React.createElement("i", { className: "allaw-icon-arrow-right" })))))) : React.createElement("div", { className: "case-card-no-folder-wrapper", onClick: function () { return onCaseLinkRequest && onCaseLinkRequest(); } },
|
|
31
31
|
React.createElement("div", { className: "case-card-no-folder-right" },
|
|
32
32
|
React.createElement(SmallTitle, { text: "CE RENDEZ-VOUS N'APPARTIENT A AUNCUN DOSSIER", variant: "semiBold12", color: "dark-grey" }),
|
|
33
|
-
React.createElement(Paragraph, { variant: "bold", size: "default", text: "
|
|
33
|
+
React.createElement(Paragraph, { variant: "bold", size: "default", text: "Ajouter à un dossier", maxLines: 1 })),
|
|
34
34
|
React.createElement("div", { className: "case-card-link-no-folder-icon" },
|
|
35
35
|
React.createElement("i", { className: "allaw-icon-add", style: { fontSize: "18px" } })))) : React.createElement(LoadingBox, { boxHeight: "100px", boxRadius: "8px", boxWidth: "100%" });
|
|
36
36
|
}
|