@jsb188/calendar 1.1.10 → 1.1.11
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/package.json +8 -6
- package/src/constants/calendar.ts +8 -1
- package/src/libs/calendar-geometry.ts +167 -91
- package/src/libs/calendar-gesture.ts +58 -15
- package/src/libs/calendar-now.ts +39 -0
- package/src/libs/calendar-range.ts +86 -27
- package/src/libs/calendar-state.ts +10 -3
- package/src/libs/calendar-url.ts +31 -8
- package/src/main.ts +3 -0
- package/src/modules/Calendar.tsx +369 -275
- package/src/modules/MiniCalendar.tsx +370 -0
- package/src/ui/CalendarAgendaUI.tsx +31 -11
- package/src/ui/CalendarCoverageUI.tsx +66 -23
- package/src/ui/CalendarEventDetailUI.tsx +122 -117
- package/src/ui/CalendarEventFormUI.tsx +86 -59
- package/src/ui/CalendarMonthUI.tsx +25 -21
- package/src/ui/CalendarRailUI.tsx +199 -139
- package/src/ui/CalendarRequestUI.tsx +216 -177
- package/src/ui/CalendarToolbarUI.tsx +27 -18
- package/src/ui/CalendarUI.tsx +255 -229
- package/src/ui/CalendarViolationUI.tsx +53 -30
- package/src/ui/CalendarYearUI.tsx +36 -50
- package/tests/calendar-geometry.test.ts +226 -78
- package/tests/calendar-gesture.test.ts +43 -12
- package/tests/calendar-range.test.ts +159 -33
- package/tests/calendar-url.test.ts +55 -12
|
@@ -58,16 +58,19 @@ export interface CalendarEventDetailUIProps {
|
|
|
58
58
|
* with no location leaves no empty line behind.
|
|
59
59
|
*/
|
|
60
60
|
|
|
61
|
-
function CalendarEventDetailRow(p: {
|
|
61
|
+
function CalendarEventDetailRow(p: {
|
|
62
|
+
iconName: string;
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
}) {
|
|
62
65
|
const { iconName, children } = p;
|
|
63
66
|
|
|
64
67
|
return (
|
|
65
|
-
<div className=
|
|
66
|
-
<span className=
|
|
68
|
+
<div className="h_item gap_sm" style={{ paddingTop: 3, paddingBottom: 3 }}>
|
|
69
|
+
<span className="no_shrink cl_lt h_center" style={{ width: 18 }}>
|
|
67
70
|
<Icon name={iconName} />
|
|
68
71
|
</span>
|
|
69
72
|
|
|
70
|
-
<span className=
|
|
73
|
+
<span className="f ft_sm cl_df">{children}</span>
|
|
71
74
|
</div>
|
|
72
75
|
);
|
|
73
76
|
}
|
|
@@ -103,8 +106,13 @@ export const CalendarEventDetailUI = memo((p: CalendarEventDetailUIProps) => {
|
|
|
103
106
|
return (
|
|
104
107
|
<div className={cn('bg bd_1 bd_bd r_df of', className)}>
|
|
105
108
|
<div
|
|
106
|
-
className=
|
|
107
|
-
style={{
|
|
109
|
+
className="h_item gap_sm bd_b_1 bd_b_bd"
|
|
110
|
+
style={{
|
|
111
|
+
paddingLeft: 12,
|
|
112
|
+
paddingRight: 8,
|
|
113
|
+
paddingTop: 8,
|
|
114
|
+
paddingBottom: 8,
|
|
115
|
+
}}
|
|
108
116
|
>
|
|
109
117
|
<span
|
|
110
118
|
className={cn(
|
|
@@ -116,8 +124,8 @@ export const CalendarEventDetailUI = memo((p: CalendarEventDetailUIProps) => {
|
|
|
116
124
|
</span>
|
|
117
125
|
|
|
118
126
|
<SimpleLabel
|
|
119
|
-
className=
|
|
120
|
-
preset=
|
|
127
|
+
className="no_shrink"
|
|
128
|
+
preset="outline"
|
|
121
129
|
color={statusColor || 'medium'}
|
|
122
130
|
text={statusText}
|
|
123
131
|
/>
|
|
@@ -125,136 +133,133 @@ export const CalendarEventDetailUI = memo((p: CalendarEventDetailUIProps) => {
|
|
|
125
133
|
{/* No IconButton exists in the kit, so this is the documented raw
|
|
126
134
|
pattern: a bare button wrapping an Icon */}
|
|
127
135
|
<button
|
|
128
|
-
type=
|
|
129
|
-
className=
|
|
136
|
+
type="button"
|
|
137
|
+
className="av_sm h_center no_shrink cl_lt"
|
|
130
138
|
aria-label={closeText}
|
|
131
139
|
title={closeText}
|
|
132
140
|
onClick={onClose}
|
|
133
141
|
>
|
|
134
|
-
<Icon name=
|
|
142
|
+
<Icon name="x" />
|
|
135
143
|
</button>
|
|
136
144
|
</div>
|
|
137
145
|
|
|
138
|
-
<div
|
|
139
|
-
|
|
140
|
-
|
|
146
|
+
<div
|
|
147
|
+
style={{
|
|
148
|
+
paddingLeft: 12,
|
|
149
|
+
paddingRight: 12,
|
|
150
|
+
paddingTop: 8,
|
|
151
|
+
paddingBottom: 8,
|
|
152
|
+
}}
|
|
153
|
+
>
|
|
154
|
+
<CalendarEventDetailRow iconName="clock-hour-4">
|
|
155
|
+
<span
|
|
156
|
+
className={cn(
|
|
157
|
+
status === 'DRAFT' ? CALENDAR_DRAFT_PATTERN_CLASS_NAME : '',
|
|
158
|
+
)}
|
|
159
|
+
>
|
|
141
160
|
{timeRangeText}
|
|
142
161
|
</span>
|
|
143
162
|
</CalendarEventDetailRow>
|
|
144
163
|
|
|
145
|
-
{location
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
)
|
|
151
|
-
: null}
|
|
164
|
+
{location ? (
|
|
165
|
+
<CalendarEventDetailRow iconName="pin-location-1">
|
|
166
|
+
{location}
|
|
167
|
+
</CalendarEventDetailRow>
|
|
168
|
+
) : null}
|
|
152
169
|
|
|
153
|
-
{assigneeNames.length
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
{/* Wrapping is structural here: the chip count is data, so the
|
|
170
|
+
{assigneeNames.length ? (
|
|
171
|
+
<CalendarEventDetailRow iconName="multiple-neutral-circle">
|
|
172
|
+
{/* Wrapping is structural here: the chip count is data, so the
|
|
157
173
|
row has to be able to run onto a second line */}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
: null}
|
|
174
|
+
<span className="h_item gap_sm" style={{ flexWrap: 'wrap' }}>
|
|
175
|
+
{assigneeNames.map((name) => (
|
|
176
|
+
<span key={name} className="h_item gap_xs no_shrink">
|
|
177
|
+
<AvatarImg size="tiny" displayName={name} />
|
|
178
|
+
<span className="ellip">{name}</span>
|
|
179
|
+
</span>
|
|
180
|
+
))}
|
|
181
|
+
</span>
|
|
182
|
+
</CalendarEventDetailRow>
|
|
183
|
+
) : null}
|
|
169
184
|
|
|
170
|
-
{openCountText
|
|
171
|
-
|
|
172
|
-
<
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
)
|
|
176
|
-
: null}
|
|
185
|
+
{openCountText ? (
|
|
186
|
+
<CalendarEventDetailRow iconName="single-neutral-actions-add">
|
|
187
|
+
<span className="cl_md">{openCountText}</span>
|
|
188
|
+
</CalendarEventDetailRow>
|
|
189
|
+
) : null}
|
|
177
190
|
|
|
178
|
-
{note
|
|
179
|
-
|
|
180
|
-
<
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
)
|
|
184
|
-
: null}
|
|
191
|
+
{note ? (
|
|
192
|
+
<CalendarEventDetailRow iconName="notes-paper-text">
|
|
193
|
+
<span className="cl_md">{note}</span>
|
|
194
|
+
</CalendarEventDetailRow>
|
|
195
|
+
) : null}
|
|
185
196
|
</div>
|
|
186
197
|
|
|
187
|
-
{errorText
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
)
|
|
196
|
-
: null}
|
|
198
|
+
{errorText ? (
|
|
199
|
+
<div
|
|
200
|
+
className="ft_xs cl_err"
|
|
201
|
+
style={{ paddingLeft: 12, paddingRight: 12, paddingBottom: 8 }}
|
|
202
|
+
>
|
|
203
|
+
{errorText}
|
|
204
|
+
</div>
|
|
205
|
+
) : null}
|
|
197
206
|
|
|
198
|
-
{hasActions
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
207
|
+
{hasActions ? (
|
|
208
|
+
<div
|
|
209
|
+
className="h_item gap_sm bd_t_1 bd_t_bd"
|
|
210
|
+
style={{
|
|
211
|
+
paddingLeft: 8,
|
|
212
|
+
paddingRight: 8,
|
|
213
|
+
paddingTop: 8,
|
|
214
|
+
paddingBottom: 8,
|
|
215
|
+
flexWrap: 'wrap',
|
|
216
|
+
}}
|
|
217
|
+
>
|
|
218
|
+
{onEdit ? (
|
|
219
|
+
<Button
|
|
220
|
+
preset="bg_secondary"
|
|
221
|
+
size="sm"
|
|
222
|
+
disabled={busy}
|
|
223
|
+
leftIconName="pencil-write-2"
|
|
224
|
+
text={editText}
|
|
225
|
+
onClick={onEdit}
|
|
226
|
+
/>
|
|
227
|
+
) : null}
|
|
216
228
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
)
|
|
228
|
-
: null}
|
|
229
|
+
{onRelease ? (
|
|
230
|
+
<Button
|
|
231
|
+
preset="bg"
|
|
232
|
+
size="sm"
|
|
233
|
+
disabled={busy}
|
|
234
|
+
leftIconName="switch-account-1"
|
|
235
|
+
text={releaseText}
|
|
236
|
+
onClick={onRelease}
|
|
237
|
+
/>
|
|
238
|
+
) : null}
|
|
229
239
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
)
|
|
241
|
-
: null}
|
|
240
|
+
{onCancelOccurrence ? (
|
|
241
|
+
<Button
|
|
242
|
+
preset="outline_subtle"
|
|
243
|
+
size="sm"
|
|
244
|
+
disabled={busy}
|
|
245
|
+
leftIconName="cancel"
|
|
246
|
+
text={cancelOccurrenceText}
|
|
247
|
+
onClick={onCancelOccurrence}
|
|
248
|
+
/>
|
|
249
|
+
) : null}
|
|
242
250
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
</div>
|
|
256
|
-
)
|
|
257
|
-
: null}
|
|
251
|
+
{onDelete ? (
|
|
252
|
+
<Button
|
|
253
|
+
preset="cl_err"
|
|
254
|
+
size="sm"
|
|
255
|
+
disabled={busy}
|
|
256
|
+
leftIconName="bin"
|
|
257
|
+
text={deleteText}
|
|
258
|
+
onClick={onDelete}
|
|
259
|
+
/>
|
|
260
|
+
) : null}
|
|
261
|
+
</div>
|
|
262
|
+
) : null}
|
|
258
263
|
</div>
|
|
259
264
|
);
|
|
260
265
|
});
|
|
@@ -58,7 +58,10 @@ export interface CalendarEventFormUIProps {
|
|
|
58
58
|
// Lets the caller veto a save the form cannot see is wrong — an end before
|
|
59
59
|
// its start, a slot that violates a rule
|
|
60
60
|
disableSave?: boolean;
|
|
61
|
-
onChangeValue: (
|
|
61
|
+
onChangeValue: (
|
|
62
|
+
field: CalendarEventFormFieldEnum,
|
|
63
|
+
value: string | boolean,
|
|
64
|
+
) => void;
|
|
62
65
|
onSubmit: () => void;
|
|
63
66
|
onCancel: () => void;
|
|
64
67
|
}
|
|
@@ -95,21 +98,31 @@ export const CalendarEventFormUI = memo((p: CalendarEventFormUIProps) => {
|
|
|
95
98
|
return (
|
|
96
99
|
<div className={cn('v_stretch of', className)}>
|
|
97
100
|
<div
|
|
98
|
-
className=
|
|
99
|
-
style={{
|
|
101
|
+
className="no_shrink ft_md ft_bold bd_b_1 bd_b_bd"
|
|
102
|
+
style={{
|
|
103
|
+
paddingLeft: 12,
|
|
104
|
+
paddingRight: 12,
|
|
105
|
+
paddingTop: 8,
|
|
106
|
+
paddingBottom: 8,
|
|
107
|
+
}}
|
|
100
108
|
>
|
|
101
109
|
{headingText}
|
|
102
110
|
</div>
|
|
103
111
|
|
|
104
112
|
<div
|
|
105
|
-
className=
|
|
106
|
-
style={{
|
|
113
|
+
className="f h_0 app_scr auto_y"
|
|
114
|
+
style={{
|
|
115
|
+
paddingLeft: 12,
|
|
116
|
+
paddingRight: 12,
|
|
117
|
+
paddingTop: 8,
|
|
118
|
+
paddingBottom: 8,
|
|
119
|
+
}}
|
|
107
120
|
>
|
|
108
121
|
<Input
|
|
109
122
|
fullWidth
|
|
110
123
|
autoFocus
|
|
111
|
-
preset=
|
|
112
|
-
name=
|
|
124
|
+
preset="fill"
|
|
125
|
+
name="title"
|
|
113
126
|
label={titleLabel}
|
|
114
127
|
placeholder={titlePlaceholder}
|
|
115
128
|
disabled={saving}
|
|
@@ -117,80 +130,87 @@ export const CalendarEventFormUI = memo((p: CalendarEventFormUIProps) => {
|
|
|
117
130
|
onChange={(e) => onChangeValue('title', e.currentTarget.value)}
|
|
118
131
|
/>
|
|
119
132
|
|
|
120
|
-
<label
|
|
133
|
+
<label
|
|
134
|
+
className="h_item gap_sm pointer unsel"
|
|
135
|
+
style={{ paddingTop: 10, paddingBottom: 6 }}
|
|
136
|
+
>
|
|
121
137
|
<ToggleSwitch
|
|
122
|
-
size=
|
|
138
|
+
size="sm"
|
|
123
139
|
disabled={saving}
|
|
124
140
|
checked={values.allDay}
|
|
125
141
|
onChange={(e) => onChangeValue('allDay', e.currentTarget.checked)}
|
|
126
142
|
/>
|
|
127
|
-
<span className=
|
|
143
|
+
<span className="ft_sm">{allDayText}</span>
|
|
128
144
|
</label>
|
|
129
145
|
|
|
130
146
|
{/* The kit has no datetime control, so a row is a native date input
|
|
131
147
|
plus a native time input; the time half disappears for an all-day
|
|
132
148
|
entry rather than being disabled, because there is no time to edit */}
|
|
133
|
-
<div
|
|
149
|
+
<div
|
|
150
|
+
className="h_item gap_sm"
|
|
151
|
+
style={{ paddingTop: 4, paddingBottom: 4 }}
|
|
152
|
+
>
|
|
134
153
|
<Input
|
|
135
154
|
fullWidth
|
|
136
|
-
className=
|
|
137
|
-
preset=
|
|
138
|
-
type=
|
|
139
|
-
name=
|
|
155
|
+
className="f"
|
|
156
|
+
preset="fill"
|
|
157
|
+
type="date"
|
|
158
|
+
name="startDate"
|
|
140
159
|
label={startLabel}
|
|
141
160
|
disabled={saving}
|
|
142
161
|
value={values.startDate}
|
|
143
162
|
onChange={(e) => onChangeValue('startDate', e.currentTarget.value)}
|
|
144
163
|
/>
|
|
145
164
|
|
|
146
|
-
{values.allDay
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
value
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
165
|
+
{values.allDay ? null : (
|
|
166
|
+
<Input
|
|
167
|
+
className="no_shrink"
|
|
168
|
+
preset="fill"
|
|
169
|
+
type="time"
|
|
170
|
+
name="startTime"
|
|
171
|
+
disabled={saving}
|
|
172
|
+
value={values.startTime}
|
|
173
|
+
onChange={(e) =>
|
|
174
|
+
onChangeValue('startTime', e.currentTarget.value)
|
|
175
|
+
}
|
|
176
|
+
/>
|
|
177
|
+
)}
|
|
159
178
|
</div>
|
|
160
179
|
|
|
161
|
-
<div
|
|
180
|
+
<div
|
|
181
|
+
className="h_item gap_sm"
|
|
182
|
+
style={{ paddingTop: 4, paddingBottom: 4 }}
|
|
183
|
+
>
|
|
162
184
|
<Input
|
|
163
185
|
fullWidth
|
|
164
|
-
className=
|
|
165
|
-
preset=
|
|
166
|
-
type=
|
|
167
|
-
name=
|
|
186
|
+
className="f"
|
|
187
|
+
preset="fill"
|
|
188
|
+
type="date"
|
|
189
|
+
name="endDate"
|
|
168
190
|
label={endLabel}
|
|
169
191
|
disabled={saving}
|
|
170
192
|
value={values.endDate}
|
|
171
193
|
onChange={(e) => onChangeValue('endDate', e.currentTarget.value)}
|
|
172
194
|
/>
|
|
173
195
|
|
|
174
|
-
{values.allDay
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
/>
|
|
186
|
-
)}
|
|
196
|
+
{values.allDay ? null : (
|
|
197
|
+
<Input
|
|
198
|
+
className="no_shrink"
|
|
199
|
+
preset="fill"
|
|
200
|
+
type="time"
|
|
201
|
+
name="endTime"
|
|
202
|
+
disabled={saving}
|
|
203
|
+
value={values.endTime}
|
|
204
|
+
onChange={(e) => onChangeValue('endTime', e.currentTarget.value)}
|
|
205
|
+
/>
|
|
206
|
+
)}
|
|
187
207
|
</div>
|
|
188
208
|
|
|
189
209
|
<Input
|
|
190
210
|
fullWidth
|
|
191
|
-
className=
|
|
192
|
-
preset=
|
|
193
|
-
name=
|
|
211
|
+
className="mt_xs"
|
|
212
|
+
preset="fill"
|
|
213
|
+
name="location"
|
|
194
214
|
label={locationLabel}
|
|
195
215
|
placeholder={locationPlaceholder}
|
|
196
216
|
disabled={saving}
|
|
@@ -200,9 +220,9 @@ export const CalendarEventFormUI = memo((p: CalendarEventFormUIProps) => {
|
|
|
200
220
|
|
|
201
221
|
<Textarea
|
|
202
222
|
fullWidth
|
|
203
|
-
className=
|
|
204
|
-
preset=
|
|
205
|
-
name=
|
|
223
|
+
className="mt_xs"
|
|
224
|
+
preset="fill"
|
|
225
|
+
name="note"
|
|
206
226
|
label={noteLabel}
|
|
207
227
|
placeholder={notePlaceholder}
|
|
208
228
|
minHeight={80}
|
|
@@ -211,24 +231,31 @@ export const CalendarEventFormUI = memo((p: CalendarEventFormUIProps) => {
|
|
|
211
231
|
onChange={(e) => onChangeValue('note', e.currentTarget.value)}
|
|
212
232
|
/>
|
|
213
233
|
|
|
214
|
-
{errorText ?
|
|
234
|
+
{errorText ? (
|
|
235
|
+
<div className="ft_xs cl_err mt_xs">{errorText}</div>
|
|
236
|
+
) : null}
|
|
215
237
|
</div>
|
|
216
238
|
|
|
217
239
|
<div
|
|
218
|
-
className=
|
|
219
|
-
style={{
|
|
240
|
+
className="no_shrink h_right gap_sm bd_t_1 bd_t_bd"
|
|
241
|
+
style={{
|
|
242
|
+
paddingLeft: 12,
|
|
243
|
+
paddingRight: 12,
|
|
244
|
+
paddingTop: 8,
|
|
245
|
+
paddingBottom: 8,
|
|
246
|
+
}}
|
|
220
247
|
>
|
|
221
248
|
<Button
|
|
222
|
-
preset=
|
|
223
|
-
size=
|
|
249
|
+
preset="bg"
|
|
250
|
+
size="sm"
|
|
224
251
|
disabled={saving}
|
|
225
252
|
text={cancelText}
|
|
226
253
|
onClick={onCancel}
|
|
227
254
|
/>
|
|
228
255
|
|
|
229
256
|
<Button
|
|
230
|
-
preset=
|
|
231
|
-
size=
|
|
257
|
+
preset="bg_secondary"
|
|
258
|
+
size="sm"
|
|
232
259
|
disabled={saveDisabled}
|
|
233
260
|
text={saving && savingText ? savingText : saveText}
|
|
234
261
|
onClick={onSubmit}
|
|
@@ -42,20 +42,24 @@ export const CalendarMonthUI = memo((p: CalendarMonthUIProps) => {
|
|
|
42
42
|
} = p;
|
|
43
43
|
|
|
44
44
|
return (
|
|
45
|
-
<div className=
|
|
46
|
-
<div className=
|
|
45
|
+
<div className="v_stretch h_f w_f of">
|
|
46
|
+
<div className="no_shrink h_stretch bd_b_1 bd_b_bd">
|
|
47
47
|
{weekdayLabels.map((label) => (
|
|
48
|
-
<div
|
|
48
|
+
<div
|
|
49
|
+
key={label}
|
|
50
|
+
className="f a_c ft_tn cl_lt"
|
|
51
|
+
style={{ paddingTop: 4, paddingBottom: 4 }}
|
|
52
|
+
>
|
|
49
53
|
{label}
|
|
50
54
|
</div>
|
|
51
55
|
))}
|
|
52
56
|
</div>
|
|
53
57
|
|
|
54
|
-
<div className=
|
|
58
|
+
<div className="f h_0 app_scr auto_y">
|
|
55
59
|
{/* Six rows of seven; the grid is the layout, so the cells need no
|
|
56
60
|
per-row wrapper */}
|
|
57
61
|
<div
|
|
58
|
-
className=
|
|
62
|
+
className="h_f"
|
|
59
63
|
style={{
|
|
60
64
|
display: 'grid',
|
|
61
65
|
gridTemplateColumns: 'repeat(7, minmax(0, 1fr))',
|
|
@@ -71,8 +75,8 @@ export const CalendarMonthUI = memo((p: CalendarMonthUIProps) => {
|
|
|
71
75
|
)}
|
|
72
76
|
>
|
|
73
77
|
<button
|
|
74
|
-
type=
|
|
75
|
-
className=
|
|
78
|
+
type="button"
|
|
79
|
+
className="w_f a_l"
|
|
76
80
|
style={{ paddingLeft: 4, paddingRight: 4, paddingTop: 2 }}
|
|
77
81
|
onClick={() => onSelectDay(cell.day.dateKey)}
|
|
78
82
|
>
|
|
@@ -93,10 +97,12 @@ export const CalendarMonthUI = memo((p: CalendarMonthUIProps) => {
|
|
|
93
97
|
{cell.events.map((event) => (
|
|
94
98
|
<button
|
|
95
99
|
key={event.id}
|
|
96
|
-
type=
|
|
100
|
+
type="button"
|
|
97
101
|
className={cn(
|
|
98
102
|
'w_f a_l ellip ft_tn r_xs rel of',
|
|
99
|
-
event.status === 'DRAFT'
|
|
103
|
+
event.status === 'DRAFT'
|
|
104
|
+
? CALENDAR_DRAFT_PATTERN_CLASS_NAME
|
|
105
|
+
: '',
|
|
100
106
|
event.status === 'CANCELED' ? 'strikethrough' : '',
|
|
101
107
|
event.isMine ? 'bg_active' : 'bg_alt',
|
|
102
108
|
selectedEventId === event.id ? 'bd_1 bd_bd' : '',
|
|
@@ -108,18 +114,16 @@ export const CalendarMonthUI = memo((p: CalendarMonthUIProps) => {
|
|
|
108
114
|
</button>
|
|
109
115
|
))}
|
|
110
116
|
|
|
111
|
-
{cell.overflowCount > 0
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
)
|
|
122
|
-
: null}
|
|
117
|
+
{cell.overflowCount > 0 ? (
|
|
118
|
+
<button
|
|
119
|
+
type="button"
|
|
120
|
+
className="w_f a_l ellip ft_tn cl_lt"
|
|
121
|
+
style={{ paddingLeft: 3, paddingRight: 3 }}
|
|
122
|
+
onClick={() => onSelectOverflow(cell.day.dateKey)}
|
|
123
|
+
>
|
|
124
|
+
{moreLabel(cell.overflowCount)}
|
|
125
|
+
</button>
|
|
126
|
+
) : null}
|
|
123
127
|
</div>
|
|
124
128
|
</div>
|
|
125
129
|
))}
|