@reservi/calendar 1.4.1 → 1.6.0
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/README.md +33 -4
- package/dist/index.cjs +22 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +41 -6
- package/dist/index.js +5931 -4234
- package/dist/index.js.map +1 -1
- package/dist/styles.css +56 -2
- package/dist/themes.css +3 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -298,18 +298,44 @@ export declare interface CalendarOptions {
|
|
|
298
298
|
scrollTime?: string;
|
|
299
299
|
/** Permite arrastrar/redimensionar eventos (def. false). */
|
|
300
300
|
editable?: boolean;
|
|
301
|
+
/**
|
|
302
|
+
* Permite arrastrar eventos para moverlos. **Desactivado por defecto.**
|
|
303
|
+
*
|
|
304
|
+
* editable -> solo redimensiona
|
|
305
|
+
* editable + eventDraggable: true -> arrastra y redimensiona
|
|
306
|
+
* editable: false -> nada
|
|
307
|
+
*
|
|
308
|
+
* Es opt-in a proposito: arrastrar mueve citas reales, y activar `editable`
|
|
309
|
+
* para poder estirar por los bordes no deberia habilitar tambien ese gesto
|
|
310
|
+
* sin haberlo pedido. `editable` sigue siendo el maestro: sin el no hay
|
|
311
|
+
* arrastre aunque se pida.
|
|
312
|
+
*
|
|
313
|
+
* FullCalendar llama a esto `eventStartEditable` y por defecto sigue a
|
|
314
|
+
* `editable`. Aqui se prefiere un nombre legible y un default seguro, a costa
|
|
315
|
+
* de perder la paridad en este punto.
|
|
316
|
+
*/
|
|
317
|
+
eventDraggable?: boolean;
|
|
301
318
|
/** Permite seleccionar rangos por arrastre (def. false). */
|
|
302
319
|
selectable?: boolean;
|
|
303
320
|
/** Dibuja un "fantasma" del rango mientras se arrastra la selección (def. false). */
|
|
304
321
|
selectMirror?: boolean;
|
|
305
322
|
/** Resolución de ajuste al arrastrar, "HH:mm" (def. "00:15"). */
|
|
306
323
|
snapDuration?: string;
|
|
307
|
-
/**
|
|
308
|
-
|
|
324
|
+
/**
|
|
325
|
+
* Horas laborables: sombreado y, con `eventConstraint`/`selectConstraint`,
|
|
326
|
+
* restricción. Un array permite un horario distinto por día.
|
|
327
|
+
*/
|
|
328
|
+
businessHours?: boolean | BusinessHoursInput | BusinessHoursInput[];
|
|
309
329
|
/** Permitir solapamiento de eventos al mover/redimensionar (def. true). */
|
|
310
330
|
eventOverlap?: boolean;
|
|
311
331
|
/** Restringe eventos a las horas laborables. */
|
|
312
332
|
eventConstraint?: "businessHours";
|
|
333
|
+
/**
|
|
334
|
+
* Restringe a las horas laborables lo que el usuario CREA: el click sobre la
|
|
335
|
+
* rejilla y la selección por arrastre. `eventConstraint` cubre el otro lado,
|
|
336
|
+
* mover un evento que ya existe.
|
|
337
|
+
*/
|
|
338
|
+
selectConstraint?: "businessHours";
|
|
313
339
|
/** Veto programático al mover/redimensionar un evento. */
|
|
314
340
|
eventAllow?: (info: EventAllowInfo) => boolean;
|
|
315
341
|
/** Nombre de un theme pre-hecho (se aplica como data-rsv-theme en el root). */
|
|
@@ -1263,11 +1289,20 @@ declare interface TimeGridDay {
|
|
|
1263
1289
|
readonly isWeekend: boolean;
|
|
1264
1290
|
readonly allDayEvents: EventDef[];
|
|
1265
1291
|
readonly timedSegs: TimeGridSeg[];
|
|
1266
|
-
/**
|
|
1267
|
-
readonly
|
|
1292
|
+
/** ¿Abre algún rato este día? Con `businessHours` sin definir, siempre true. */
|
|
1293
|
+
readonly isBusiness: boolean;
|
|
1294
|
+
/**
|
|
1295
|
+
* Bandas CERRADAS en % [top, height], para sombrear. Vacío si el día está
|
|
1296
|
+
* abierto de punta a punta o si no hay horario configurado.
|
|
1297
|
+
*
|
|
1298
|
+
* El modelo devuelve lo cerrado y no lo abierto porque es justo lo que se
|
|
1299
|
+
* pinta: así el día cerrado entero es una banda de 0 a 100 en vez de un caso
|
|
1300
|
+
* especial de la vista.
|
|
1301
|
+
*/
|
|
1302
|
+
readonly nonBusinessPct: {
|
|
1268
1303
|
topPct: number;
|
|
1269
|
-
|
|
1270
|
-
}
|
|
1304
|
+
heightPct: number;
|
|
1305
|
+
}[];
|
|
1271
1306
|
}
|
|
1272
1307
|
|
|
1273
1308
|
declare interface TimeGridModel {
|