allaw-ui 5.0.4 → 5.0.6

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.
@@ -26,6 +26,15 @@
26
26
  color: var(--Primary-Dark-grey, var(--dark-grey, #456073));
27
27
  }
28
28
 
29
+ .other-status-tag.readonly .icon {
30
+ display: flex;
31
+ width: 16px;
32
+ height: 16px;
33
+ justify-content: center;
34
+ align-items: center;
35
+ font-size: 14px;
36
+ }
37
+
29
38
  .other-status-tag.editable {
30
39
  height: 35px;
31
40
  padding: 8px;
@@ -123,3 +132,9 @@
123
132
  padding: 2.833px;
124
133
  font-size: 10px;
125
134
  }
135
+
136
+ .other-status-tag.readonly.compact .icon {
137
+ width: 14px;
138
+ height: 14px;
139
+ font-size: 12px;
140
+ }
@@ -8,7 +8,7 @@ var OtherStatusTag = function (_a) {
8
8
  return "".concat(text.slice(0, limit), "...");
9
9
  };
10
10
  return (React.createElement("div", { className: "other-status-tag ".concat(type, " ").concat(style, " ").concat(type === "information" ? "information-color-".concat(informationColor) : "") },
11
- type === "information" && startIcon && (React.createElement("span", { className: "icon ".concat(startIconName) })),
11
+ (type === "information" || type === "readonly") && 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" })));
14
14
  };
@@ -86,11 +86,13 @@ declare namespace _default {
86
86
  }
87
87
  export default _default;
88
88
  export const ReadOnly: any;
89
+ export const ReadOnlyWithIcon: any;
89
90
  export const Editable: any;
90
91
  export const Information: any;
91
92
  export const LongLabel: any;
92
93
  export const LongLabelWithoutLimit: any;
93
94
  export const ReadOnlyCompact: any;
95
+ export const ReadOnlyWithIconCompact: any;
94
96
  export const EditableCompact: any;
95
97
  export const InformationCompact: any;
96
98
  export const LongLabelCompact: any;
@@ -85,6 +85,13 @@ ReadOnly.args = {
85
85
  startIcon: false,
86
86
  startIconName: "allaw-icon-pmr",
87
87
  };
88
+ export var ReadOnlyWithIcon = Template.bind({});
89
+ ReadOnlyWithIcon.args = {
90
+ label: "Rue des Ormes",
91
+ type: "readonly",
92
+ startIcon: true,
93
+ startIconName: "allaw-icon-map-pin",
94
+ };
88
95
  export var Editable = Template.bind({});
89
96
  Editable.args = {
90
97
  label: "Tags",
@@ -128,6 +135,8 @@ LongLabelWithoutLimit.parameters = {
128
135
  };
129
136
  export var ReadOnlyCompact = Template.bind({});
130
137
  ReadOnlyCompact.args = __assign(__assign({}, ReadOnly.args), { style: "compact" });
138
+ export var ReadOnlyWithIconCompact = Template.bind({});
139
+ ReadOnlyWithIconCompact.args = __assign(__assign({}, ReadOnlyWithIcon.args), { style: "compact" });
131
140
  export var EditableCompact = Template.bind({});
132
141
  EditableCompact.args = __assign(__assign({}, Editable.args), { style: "compact" });
133
142
  export var InformationCompact = Template.bind({});
@@ -21,6 +21,8 @@ export interface AppointmentSlotProps {
21
21
  isEditable?: boolean;
22
22
  appointmentDetails?: string;
23
23
  style?: AppointmentStyle;
24
+ meetingType?: "INPERSON" | "VISIO" | "CALL" | "IMPORTED";
25
+ location?: string;
24
26
  }
25
27
  declare const AppointmentSlot: React.FC<AppointmentSlotProps>;
26
28
  export default AppointmentSlot;
@@ -5,7 +5,7 @@ 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, _b = _a.style, style = _b === void 0 ? "compact" : _b, isEditable = _a.isEditable;
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, isEditable = _a.isEditable, meetingType = _a.meetingType, location = _a.location;
9
9
  var _c = useState(false), isActive = _c[0], setIsActive = _c[1];
10
10
  // Handlers
11
11
  var handleApprove = useCallback(function () {
@@ -59,8 +59,42 @@ var AppointmentSlot = function (_a) {
59
59
  appointmentContent && (React.createElement("div", { className: styles.appointmentContent }, appointmentContent)),
60
60
  renderTags()),
61
61
  renderActionButtons())); };
62
+ var getMeetingTypeTag = function () {
63
+ if (!meetingType)
64
+ return null;
65
+ var iconName = "";
66
+ var label = "";
67
+ switch (meetingType) {
68
+ case "INPERSON":
69
+ iconName = "allaw-icon-map-pin";
70
+ label = location || "Présentiel";
71
+ break;
72
+ case "VISIO":
73
+ iconName = "allaw-icon-visio";
74
+ label = "Visio";
75
+ break;
76
+ case "CALL":
77
+ iconName = "allaw-icon-phone";
78
+ label = "Téléphone";
79
+ break;
80
+ case "IMPORTED":
81
+ iconName = "allaw-icon-calendar";
82
+ label = "Calendrier connecté";
83
+ break;
84
+ default:
85
+ return null;
86
+ }
87
+ return (React.createElement(OtherStatusTag, { label: label, type: "readonly", startIcon: true, startIconName: iconName, style: style === "compact" ? "compact" : "normal" }));
88
+ };
62
89
  var renderTags = function () {
63
- return tags && (React.createElement("div", { className: styles.tagsContainer }, tags.map(function (tag, index) { return (React.createElement(OtherStatusTag, { key: index, label: tag, style: style === "compact" ? "compact" : "normal" })); })));
90
+ var meetingTag = getMeetingTypeTag();
91
+ var hasTags = tags && tags.length > 0;
92
+ if (!meetingTag && !hasTags)
93
+ return null;
94
+ return (React.createElement("div", { className: styles.tagsContainer },
95
+ meetingTag,
96
+ hasTags &&
97
+ tags.map(function (tag, index) { return (React.createElement(OtherStatusTag, { key: index, label: tag, style: style === "compact" ? "compact" : "normal" })); })));
64
98
  };
65
99
  var renderActionButtons = function () {
66
100
  switch (status) {
@@ -47,6 +47,22 @@ declare namespace _default {
47
47
  let defaultValue_1: boolean;
48
48
  export { defaultValue_1 as defaultValue };
49
49
  }
50
+ namespace meetingType {
51
+ export namespace control_6 {
52
+ let type_3: string;
53
+ export { type_3 as type };
54
+ let options_3: (string | undefined)[];
55
+ export { options_3 as options };
56
+ }
57
+ export { control_6 as control };
58
+ export let description: string;
59
+ }
60
+ namespace location {
61
+ let control_7: string;
62
+ export { control_7 as control };
63
+ let description_1: string;
64
+ export { description_1 as description };
65
+ }
50
66
  }
51
67
  export namespace parameters {
52
68
  namespace actions {
@@ -73,4 +89,7 @@ export const Cancelled: any;
73
89
  export const Refused: any;
74
90
  export const Summary: any;
75
91
  export const SummaryNotEditable: any;
92
+ export const ConfirmedWithMeetingType: any;
93
+ export const ConfirmedWithVisio: any;
94
+ export const SummaryWithMeetingType: any;
76
95
  import AppointmentSlot from "./AppointmentSlot";
@@ -62,6 +62,17 @@ export default {
62
62
  control: "boolean",
63
63
  defaultValue: true,
64
64
  },
65
+ meetingType: {
66
+ control: {
67
+ type: "select",
68
+ options: [undefined, "INPERSON", "VISIO", "CALL", "IMPORTED"],
69
+ },
70
+ description: "Type de rendez-vous",
71
+ },
72
+ location: {
73
+ control: "text",
74
+ description: "Adresse du rendez-vous (pour INPERSON)",
75
+ },
65
76
  },
66
77
  parameters: {
67
78
  actions: {
@@ -185,3 +196,9 @@ Summary.args = {
185
196
  };
186
197
  export var SummaryNotEditable = Template.bind({});
187
198
  SummaryNotEditable.args = __assign(__assign({}, Summary.args), { isEditable: false });
199
+ export var ConfirmedWithMeetingType = Template.bind({});
200
+ ConfirmedWithMeetingType.args = __assign(__assign({}, Confirmed.args), { meetingType: "INPERSON", location: "Rue des Ormes" });
201
+ export var ConfirmedWithVisio = Template.bind({});
202
+ ConfirmedWithVisio.args = __assign(__assign({}, Confirmed.args), { meetingType: "VISIO" });
203
+ export var SummaryWithMeetingType = Template.bind({});
204
+ SummaryWithMeetingType.args = __assign(__assign({}, Summary.args), { meetingType: "INPERSON", location: "Rue des Ormes" });
package/dist/index.d.ts CHANGED
@@ -52,6 +52,7 @@ export { default as BorderRadius } from "./components/atoms/uiVariables/BorderRa
52
52
  export { default as Shadows } from "./components/atoms/uiVariables/Shadows";
53
53
  export { default as Strokes } from "./components/atoms/uiVariables/Strokes";
54
54
  export { default as AppointmentSlot } from "./components/molecules/appointmentSlot/AppointmentSlot";
55
+ export type { AppointmentSlotProps } from "./components/molecules/appointmentSlot/AppointmentSlot";
55
56
  export { default as BillingCount } from "./components/molecules/billingCount/BillingCount";
56
57
  export { default as CaseCard } from "./components/molecules/caseCard/CaseCard";
57
58
  export { default as ContactCard } from "./components/molecules/contactCard/ContactCard";
@@ -134,4 +135,4 @@ export type { AiTextProps } from "./components/molecules/AiText/aiText";
134
135
  export { default as Notification } from "./components/molecules/notification/Notification";
135
136
  export type { NotificationProps } from "./components/molecules/notification/Notification";
136
137
  export { default as Section } from "./components/molecules/section/Section";
137
- export type { SectionProps, SectionAction } from "./components/molecules/section/Section";
138
+ export type { SectionProps, SectionAction, } from "./components/molecules/section/Section";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "5.0.4",
3
+ "version": "5.0.6",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",