prometeo-design-system 2.6.5 → 2.6.7
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/DrawerDesktop.es.js +133 -84
- package/dist/Header.es.js +10 -10
- package/dist/ProfilePictureUpload.es.js +1 -1
- package/dist/ProgressBar.es.js +31 -16
- package/dist/{Select-B9faRcN1.js → Select-D3aU7dXF.js} +45 -45
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +1 -1
- package/dist/SelectSearch.es.js +1 -1
- package/dist/components/CardProfile/CardProfile.d.ts +8 -1
- package/dist/components/Drawer/DrawerDesktop.d.ts +9 -7
- package/dist/components/Drawer/useDrawerDesktop.d.ts +4 -3
- package/dist/components/Header/Header.d.ts +2 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -0
- package/dist/components/RecurrentDatePicker/CustomFrequencySettings.d.ts +14 -0
- package/dist/components/RecurrentDatePicker/FrequencySettings.d.ts +8 -2
- package/dist/components/RecurrentDatePicker/MonthlyFrequencySettings.d.ts +29 -0
- package/dist/components/RecurrentDatePicker/RecurrentDatePicker.d.ts +6 -1
- package/dist/components/RecurrentDatePicker/WeekdaysSelector.d.ts +3 -2
- package/dist/components/RecurrentDatePicker/WeeklyFrequencySetting.d.ts +8 -0
- package/dist/components/RecurrentDatePicker/YearlyFrequencySettings.d.ts +10 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +22 -22
- package/package.json +9 -9
|
@@ -183,15 +183,15 @@ function Je(e) {
|
|
|
183
183
|
placeholder: E,
|
|
184
184
|
optionValue: N,
|
|
185
185
|
optionLabel: R,
|
|
186
|
-
renderOption:
|
|
187
|
-
renderSelection:
|
|
188
|
-
renderOptionContext:
|
|
186
|
+
renderOption: oe,
|
|
187
|
+
renderSelection: ae,
|
|
188
|
+
renderOptionContext: se,
|
|
189
189
|
buttonClassName: Q,
|
|
190
190
|
dropdownClassName: P,
|
|
191
|
-
containerClassName:
|
|
191
|
+
containerClassName: ie,
|
|
192
192
|
dropdownOptions: y,
|
|
193
193
|
helperComponent: te,
|
|
194
|
-
errorComponent:
|
|
194
|
+
errorComponent: ue,
|
|
195
195
|
onRemoveOption: X,
|
|
196
196
|
onOptionClick: Y,
|
|
197
197
|
onClose: he,
|
|
@@ -201,7 +201,7 @@ function Je(e) {
|
|
|
201
201
|
variant: F = "default",
|
|
202
202
|
isLoading: ge = !1,
|
|
203
203
|
attachToParent: xe = !1,
|
|
204
|
-
displayMode:
|
|
204
|
+
displayMode: ce = "compact",
|
|
205
205
|
labelVariant: W = "default",
|
|
206
206
|
disableOpenOnFocus: be = !1,
|
|
207
207
|
emptyMessage: de = "No hay opciones disponibles"
|
|
@@ -235,7 +235,7 @@ function Je(e) {
|
|
|
235
235
|
const n = [];
|
|
236
236
|
if (e.multiple)
|
|
237
237
|
e.value?.forEach((m) => {
|
|
238
|
-
const w = g?.find((
|
|
238
|
+
const w = g?.find((le) => z(le, N) === m);
|
|
239
239
|
w && n.push(w);
|
|
240
240
|
});
|
|
241
241
|
else {
|
|
@@ -245,12 +245,12 @@ function Je(e) {
|
|
|
245
245
|
return n;
|
|
246
246
|
},
|
|
247
247
|
[e.value, N, g, e.multiple]
|
|
248
|
-
),
|
|
248
|
+
), ne = Z(
|
|
249
249
|
() => I.map(O),
|
|
250
250
|
[I, O]
|
|
251
251
|
), b = Z(
|
|
252
|
-
() => new Set(
|
|
253
|
-
[
|
|
252
|
+
() => new Set(ne.map((n) => n.id)),
|
|
253
|
+
[ne]
|
|
254
254
|
), $ = J(() => {
|
|
255
255
|
o((n) => !n);
|
|
256
256
|
}, []);
|
|
@@ -258,22 +258,22 @@ function Je(e) {
|
|
|
258
258
|
if (!e.multiple)
|
|
259
259
|
e.onChange?.(n, C);
|
|
260
260
|
else {
|
|
261
|
-
const m = e.value || [], w = [],
|
|
261
|
+
const m = e.value || [], w = [], le = m.includes(n.value);
|
|
262
262
|
m.forEach((we) => {
|
|
263
263
|
const ke = T.find(($e) => $e.value === we);
|
|
264
264
|
ke && w.push(ke);
|
|
265
265
|
});
|
|
266
|
-
const Pe =
|
|
266
|
+
const Pe = le ? w.filter((we) => we.value !== n.value) : [...w, n];
|
|
267
267
|
e.onChange?.(Pe, C);
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
|
-
const
|
|
270
|
+
const re = J((n, m = !1) => {
|
|
271
271
|
Y?.(n, C), M.current?.(n), m && (o(!1), he?.());
|
|
272
272
|
}, [Y, he, C]), ze = (n) => {
|
|
273
273
|
n.preventDefault(), n.stopPropagation(), n.target.blur(), B?.(), e.multiple ? e.onChange?.([], C) : e.onChange?.(void 0, C);
|
|
274
274
|
}, Ce = J((n) => {
|
|
275
275
|
e.multiple || e.onChange?.(void 0, C);
|
|
276
|
-
const m = g.find((
|
|
276
|
+
const m = g.find((le) => z(le, N) === n);
|
|
277
277
|
if (!m) return;
|
|
278
278
|
const w = O(m);
|
|
279
279
|
Y?.(w, C), M.current?.(w), X?.(m);
|
|
@@ -312,12 +312,12 @@ function Je(e) {
|
|
|
312
312
|
t && o(!1);
|
|
313
313
|
},
|
|
314
314
|
toggle: () => o((n) => !n),
|
|
315
|
-
handleOptionSelect:
|
|
315
|
+
handleOptionSelect: re,
|
|
316
316
|
subscribeOpenChange: (n) => (h.current.add(n), () => {
|
|
317
317
|
h.current.delete(n);
|
|
318
318
|
}),
|
|
319
319
|
searchInputRef: d
|
|
320
|
-
}), [t,
|
|
320
|
+
}), [t, re]);
|
|
321
321
|
const Te = (n) => {
|
|
322
322
|
n.preventDefault(), n.stopPropagation(), n.target.matches(":focus-visible") && !be && !t && (o(!0), setTimeout(() => {
|
|
323
323
|
d.current?.focus();
|
|
@@ -339,7 +339,7 @@ function Je(e) {
|
|
|
339
339
|
draggable: !1,
|
|
340
340
|
style: r,
|
|
341
341
|
children: [
|
|
342
|
-
/* @__PURE__ */ l.jsxs("div", { className: c("relative bg-inherit ",
|
|
342
|
+
/* @__PURE__ */ l.jsxs("div", { className: c("relative bg-inherit ", ie), children: [
|
|
343
343
|
/* @__PURE__ */ l.jsx(
|
|
344
344
|
"label",
|
|
345
345
|
{
|
|
@@ -371,8 +371,8 @@ function Je(e) {
|
|
|
371
371
|
"w-full px-2 text-left border rounded-lg transition-all duration-200 ease-in-out",
|
|
372
372
|
"flex items-center justify-start bg-inherit ",
|
|
373
373
|
"focus:outline-none",
|
|
374
|
-
|
|
375
|
-
|
|
374
|
+
// displayMode==='chips' && "mt-1.5" ,
|
|
375
|
+
ce === "chips" && e.multiple && G ? "min-h-12 py-2 " : !U && "h-12 min-h-12",
|
|
376
376
|
Se[F].input,
|
|
377
377
|
H && De.input,
|
|
378
378
|
Q
|
|
@@ -389,9 +389,9 @@ function Je(e) {
|
|
|
389
389
|
onPointerLeave: K.onPointerLeave,
|
|
390
390
|
onPointerCancel: K.onPointerCancel,
|
|
391
391
|
onClickCapture: K.onClickCapture,
|
|
392
|
-
children:
|
|
392
|
+
children: ae ? je.createElement(
|
|
393
393
|
q(
|
|
394
|
-
|
|
394
|
+
ae,
|
|
395
395
|
(n, m) => n.disabled === m.disabled && n.multiple === m.multiple
|
|
396
396
|
),
|
|
397
397
|
{
|
|
@@ -404,8 +404,8 @@ function Je(e) {
|
|
|
404
404
|
) : /* @__PURE__ */ l.jsx(
|
|
405
405
|
Ie,
|
|
406
406
|
{
|
|
407
|
-
displayMode:
|
|
408
|
-
selectedOptions:
|
|
407
|
+
displayMode: ce,
|
|
408
|
+
selectedOptions: ne,
|
|
409
409
|
placeholder: a,
|
|
410
410
|
onRemoveOption: Ce,
|
|
411
411
|
multiple: e.multiple || !1,
|
|
@@ -453,20 +453,20 @@ function Je(e) {
|
|
|
453
453
|
optionLabel: R,
|
|
454
454
|
optionValue: N,
|
|
455
455
|
labelVariant: W,
|
|
456
|
-
renderOption:
|
|
457
|
-
renderOptionContext:
|
|
456
|
+
renderOption: oe,
|
|
457
|
+
renderOptionContext: se,
|
|
458
458
|
emptyMessage: de,
|
|
459
459
|
attachToParent: xe,
|
|
460
460
|
filteredOptions: i,
|
|
461
461
|
dropdownClassName: P,
|
|
462
462
|
setFilteredOptions: u,
|
|
463
463
|
selectedOptionsIds: b,
|
|
464
|
-
options:
|
|
464
|
+
options: oe ? g : T,
|
|
465
465
|
selectRef: s,
|
|
466
466
|
dropdownRef: _,
|
|
467
467
|
selectButtonRef: D,
|
|
468
468
|
helperComponentRef: L,
|
|
469
|
-
onOptionClick:
|
|
469
|
+
onOptionClick: re,
|
|
470
470
|
onCloseDropdown: () => o(!1),
|
|
471
471
|
searchValue: f,
|
|
472
472
|
setSearchValue: S,
|
|
@@ -482,13 +482,13 @@ function Je(e) {
|
|
|
482
482
|
inputProps: y?.inputProps
|
|
483
483
|
}
|
|
484
484
|
),
|
|
485
|
-
(
|
|
485
|
+
(ue || te) && /* @__PURE__ */ l.jsx("div", { className: "min-h-6", children: /* @__PURE__ */ l.jsx(
|
|
486
486
|
Ue,
|
|
487
487
|
{
|
|
488
488
|
ref: L,
|
|
489
489
|
variant: F,
|
|
490
490
|
className: "absolute bottom-0 ",
|
|
491
|
-
children:
|
|
491
|
+
children: ue || te
|
|
492
492
|
}
|
|
493
493
|
) })
|
|
494
494
|
]
|
|
@@ -521,22 +521,22 @@ function Xe({
|
|
|
521
521
|
filteredOptions: E,
|
|
522
522
|
selectButtonRef: N,
|
|
523
523
|
onCloseDropdown: R,
|
|
524
|
-
loadingComponent:
|
|
525
|
-
dropdownClassName:
|
|
526
|
-
helperComponentRef:
|
|
524
|
+
loadingComponent: oe,
|
|
525
|
+
dropdownClassName: ae,
|
|
526
|
+
helperComponentRef: se,
|
|
527
527
|
selectedOptionsIds: Q,
|
|
528
528
|
setFilteredOptions: P,
|
|
529
|
-
onSearchValueChange:
|
|
529
|
+
onSearchValueChange: ie,
|
|
530
530
|
isLoading: y = !1,
|
|
531
531
|
hideSearchBar: te = !1,
|
|
532
|
-
inputSearchPlaceholder:
|
|
532
|
+
inputSearchPlaceholder: ue = "Buscar opciones"
|
|
533
533
|
}) {
|
|
534
534
|
const X = e ? 380 : 320, Y = M === "static" ? -20 : 7, B = J(() => j ? j.endsWith("px") ? Number(j.replace("px", "")) : j.endsWith("vh") ? window.innerHeight * Number(j.replace("vh", "")) / 100 : j.endsWith("%") ? window.innerHeight * Number(j.replace("%", "")) / 100 : X : X, [j, X])(), [H, pe] = fe({ direction: "down", height: B }), F = (r) => {
|
|
535
535
|
if (!s.current || !p.current) return;
|
|
536
536
|
const a = p.current.getBoundingClientRect();
|
|
537
537
|
switch (r || H.direction) {
|
|
538
538
|
case "down":
|
|
539
|
-
s.current.style.top = `${a.top + a.height - (
|
|
539
|
+
s.current.style.top = `${a.top + a.height - (se?.current?.offsetHeight ? se?.current?.offsetHeight + 4 : 0)}px`;
|
|
540
540
|
break;
|
|
541
541
|
case "up":
|
|
542
542
|
s.current.style.top = "auto", s.current.style.bottom = `${window.innerHeight - a.top + Y}px`;
|
|
@@ -550,7 +550,7 @@ function Xe({
|
|
|
550
550
|
const r = p.current.getBoundingClientRect(), a = window.innerHeight - (window.innerHeight - r.top), f = window.innerHeight - r.bottom, x = f >= B, O = a >= B;
|
|
551
551
|
let T = "down", I;
|
|
552
552
|
return x ? (T = "down", I = B) : O ? (T = "up", I = B) : f > a ? (T = "down", I = f - 16) : (T = "up", I = a - 16), { direction: T, height: I };
|
|
553
|
-
},
|
|
553
|
+
}, ce = (r) => {
|
|
554
554
|
if (!(!s.current || !p.current)) {
|
|
555
555
|
if (s.current.style.transition = "max-height 0.2s ease,opacity 0.2s ease", !r) {
|
|
556
556
|
s.current.style.maxHeight = "0", s.current.style.opacity = "0", s.current.style.pointerEvents = "none";
|
|
@@ -566,7 +566,7 @@ function Xe({
|
|
|
566
566
|
ee(() => {
|
|
567
567
|
A || !p.current || !t || F();
|
|
568
568
|
}, [Q]), ee(() => {
|
|
569
|
-
|
|
569
|
+
ce(t);
|
|
570
570
|
}, [t]), ee(() => {
|
|
571
571
|
o && P(o);
|
|
572
572
|
}, [o]), ee(() => {
|
|
@@ -576,12 +576,12 @@ function Xe({
|
|
|
576
576
|
}, [o]);
|
|
577
577
|
const W = (r, a) => r.filter((f) => Le(h ? z(f, _) : f.label, a)), be = (r) => {
|
|
578
578
|
const a = W(o, r);
|
|
579
|
-
if (P(a),
|
|
579
|
+
if (P(a), ie) {
|
|
580
580
|
if (r === "") {
|
|
581
581
|
de();
|
|
582
582
|
return;
|
|
583
583
|
}
|
|
584
|
-
|
|
584
|
+
ie(r);
|
|
585
585
|
return;
|
|
586
586
|
}
|
|
587
587
|
g && o && g(r);
|
|
@@ -662,7 +662,7 @@ function Xe({
|
|
|
662
662
|
" overflow-hidden focus-visible:bg-neutral-default-hover ",
|
|
663
663
|
A ? "absolute z-50 " : "fixed z-100 top-0 left-0",
|
|
664
664
|
H.direction === "up" ? "h-auto" : " h-max",
|
|
665
|
-
|
|
665
|
+
ae
|
|
666
666
|
),
|
|
667
667
|
children: /* @__PURE__ */ l.jsxs(
|
|
668
668
|
"div",
|
|
@@ -692,12 +692,12 @@ function Xe({
|
|
|
692
692
|
onKeyDown: ye,
|
|
693
693
|
onClear: de,
|
|
694
694
|
onChange: be,
|
|
695
|
-
placeholder:
|
|
695
|
+
placeholder: ue,
|
|
696
696
|
className: " bg-neutral-medium-pressed",
|
|
697
697
|
...S
|
|
698
698
|
}
|
|
699
699
|
),
|
|
700
|
-
/* @__PURE__ */ l.jsx("div", { className: " overflow-y-auto flex-1 max-h-max ", children: E.length === 0 ? y ? /* @__PURE__ */ l.jsx("div", { className: "flex flex-col gap-1 overflow-hidden w-full", children:
|
|
700
|
+
/* @__PURE__ */ l.jsx("div", { className: " overflow-y-auto flex-1 max-h-max ", children: E.length === 0 ? y ? /* @__PURE__ */ l.jsx("div", { className: "flex flex-col gap-1 overflow-hidden w-full", children: oe || ve }) : /* @__PURE__ */ l.jsx("div", { className: "px-3 py-2 text-neutral-medium-default", children: D ? `No se encontraron resultados para "${D}"` : L }) : E.map((r) => {
|
|
701
701
|
const a = h ? z(r, d) : r.id, f = Q.has(a), x = (b) => h ? {
|
|
702
702
|
id: a,
|
|
703
703
|
label: String(z(b, _)),
|
|
@@ -716,7 +716,7 @@ function Xe({
|
|
|
716
716
|
{
|
|
717
717
|
tabIndex: 0,
|
|
718
718
|
role: "listitem",
|
|
719
|
-
onKeyDown: (
|
|
719
|
+
onKeyDown: (re) => K(re, $),
|
|
720
720
|
className: c(
|
|
721
721
|
"focus-visible:bg-neutral-medium-hover outline-none hover:bg-neutral-medium-hover ",
|
|
722
722
|
f && "bg-neutral-medium-selected"
|
|
@@ -724,7 +724,7 @@ function Xe({
|
|
|
724
724
|
children: b
|
|
725
725
|
}
|
|
726
726
|
)
|
|
727
|
-
),
|
|
727
|
+
), ne = h ? je.createElement(
|
|
728
728
|
q(
|
|
729
729
|
h,
|
|
730
730
|
(b, $) => b.isSelected === $.isSelected && b.option === $.option && b.disabled === $.disabled && b.multiple === $.multiple && b.renderContext === $.renderContext
|
|
@@ -751,7 +751,7 @@ function Xe({
|
|
|
751
751
|
},
|
|
752
752
|
a
|
|
753
753
|
);
|
|
754
|
-
return I(
|
|
754
|
+
return I(ne, x(r));
|
|
755
755
|
}) }),
|
|
756
756
|
e && /* @__PURE__ */ l.jsx("div", { className: "border-t border-neutral-strong-default p-2", children: e })
|
|
757
757
|
]
|
package/dist/Select.es.js
CHANGED
package/dist/SelectFormik.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as d } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { useField as y } from "formik";
|
|
3
|
-
import { S as m } from "./Select-
|
|
3
|
+
import { S as m } from "./Select-D3aU7dXF.js";
|
|
4
4
|
import { useRef as p, useEffect as g } from "react";
|
|
5
5
|
function f(e) {
|
|
6
6
|
return Array.isArray(e) && e.every(
|
package/dist/SelectSearch.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as G } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { g as i, S as H } from "./Select-
|
|
2
|
+
import { g as i, S as H } from "./Select-D3aU7dXF.js";
|
|
3
3
|
import { useState as w, useRef as T, useEffect as h, useMemo as Q, useCallback as X } from "react";
|
|
4
4
|
function te(e) {
|
|
5
5
|
const {
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { IArea, ICompany } from 'shared-dependencies-tickets';
|
|
3
2
|
interface ICardProfile {
|
|
4
3
|
children: ReactNode;
|
|
5
4
|
dropMenu?: ReactNode;
|
|
6
5
|
}
|
|
6
|
+
export interface IArea {
|
|
7
|
+
_id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ICompany {
|
|
11
|
+
_id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
}
|
|
7
14
|
export interface ISessionLocalStorage {
|
|
8
15
|
_id: string;
|
|
9
16
|
name: string;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
export interface DrawerDesktopHandle {
|
|
2
|
-
open: () => void;
|
|
1
|
+
export interface DrawerDesktopHandle<TContext = unknown> {
|
|
2
|
+
open: (context?: TContext) => void;
|
|
3
3
|
close: () => void;
|
|
4
4
|
isOpen: boolean;
|
|
5
|
+
getContext: () => TContext | null;
|
|
5
6
|
}
|
|
6
|
-
export interface DrawerDesktopProps {
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
direction?:
|
|
7
|
+
export interface DrawerDesktopProps<TContext = unknown> {
|
|
8
|
+
children?: React.ReactNode | ((context: TContext | null) => React.ReactNode);
|
|
9
|
+
direction?: "left" | "right";
|
|
9
10
|
modal?: boolean;
|
|
10
11
|
className?: string;
|
|
11
|
-
onClose?: () => void;
|
|
12
|
+
onClose?: (context?: TContext) => void;
|
|
12
13
|
defaultOpen?: boolean;
|
|
13
14
|
attachToParent?: boolean;
|
|
14
15
|
closeOnOverlayClick?: boolean;
|
|
16
|
+
hideCloseButton?: boolean;
|
|
15
17
|
}
|
|
16
|
-
declare const DrawerDesktop: import('react').ForwardRefExoticComponent<DrawerDesktopProps & import('react').RefAttributes<DrawerDesktopHandle
|
|
18
|
+
declare const DrawerDesktop: import('react').ForwardRefExoticComponent<DrawerDesktopProps<any> & import('react').RefAttributes<DrawerDesktopHandle<any>>>;
|
|
17
19
|
export default DrawerDesktop;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DrawerDesktopHandle } from './DrawerDesktop';
|
|
2
|
-
export declare const useDrawerDesktop: () => {
|
|
2
|
+
export declare const useDrawerDesktop: <TContext = unknown>() => {
|
|
3
3
|
isOpen: () => boolean;
|
|
4
|
-
open: () => void;
|
|
4
|
+
open: (context?: TContext) => void;
|
|
5
5
|
close: () => void;
|
|
6
|
-
drawerRef: import('react').RefObject<DrawerDesktopHandle | null>;
|
|
6
|
+
drawerRef: import('react').RefObject<DrawerDesktopHandle<TContext> | null>;
|
|
7
|
+
getContext: () => NonNullable<TContext> | null;
|
|
7
8
|
};
|
|
@@ -4,6 +4,7 @@ export interface IHeader {
|
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
className?: string;
|
|
6
6
|
subtitle?: string;
|
|
7
|
+
subtitleClassName?: string;
|
|
7
8
|
}
|
|
8
|
-
declare const _default: import('react').MemoExoticComponent<({ title, subtitle, children, className }: IHeader) => import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
declare const _default: import('react').MemoExoticComponent<({ title, subtitle, children, className, subtitleClassName }: IHeader) => import("react/jsx-runtime").JSX.Element>;
|
|
9
10
|
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { weekDay } from './WeekdaysSelector';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
type CustomFrequency = "daily" | "weekly" | "monthly";
|
|
4
|
+
export type CustomFrequencySettingsValue = {
|
|
5
|
+
interval: number;
|
|
6
|
+
frequency: CustomFrequency;
|
|
7
|
+
weekdays: weekDay[];
|
|
8
|
+
};
|
|
9
|
+
interface CustomSettingsProps {
|
|
10
|
+
value?: CustomFrequencySettingsValue;
|
|
11
|
+
onChange: (value: CustomFrequencySettingsValue) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const CustomFrequencySettings: React.MemoExoticComponent<({ value, onChange }: CustomSettingsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
14
|
+
export default CustomFrequencySettings;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CustomFrequencySettingsValue } from './CustomFrequencySettings';
|
|
2
|
+
import { MonthlySettingsValue } from './MonthlyFrequencySettings';
|
|
3
|
+
import { FrequencySettingsValue, RecurrenceFrequencyType } from './RecurrentDatePicker';
|
|
4
|
+
import { WeeklyFrequencySettingsValue } from './WeeklyFrequencySetting';
|
|
5
|
+
import { YearlyFrequencySettingsValue } from './YearlyFrequencySettings';
|
|
2
6
|
export interface IFrequencySettingsProps {
|
|
3
7
|
frequency: RecurrenceFrequencyType;
|
|
8
|
+
frequencySettings?: MonthlySettingsValue | WeeklyFrequencySettingsValue | YearlyFrequencySettingsValue | CustomFrequencySettingsValue;
|
|
9
|
+
onChange: (cb: ((pv: FrequencySettingsValue) => FrequencySettingsValue) | FrequencySettingsValue) => void;
|
|
4
10
|
}
|
|
5
|
-
declare const FrequencySettings: (props: IFrequencySettingsProps) => import("react/jsx-runtime").JSX.Element
|
|
11
|
+
declare const FrequencySettings: import('react').MemoExoticComponent<(props: IFrequencySettingsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
6
12
|
export default FrequencySettings;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type dayOrderType = 'first' | 'second' | 'third' | 'fourth' | 'last';
|
|
2
|
+
type weekDay = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
|
|
3
|
+
export type MonthlySettingsValue = {
|
|
4
|
+
type: 'relative';
|
|
5
|
+
dayOrder: dayOrderType;
|
|
6
|
+
weekDay: weekDay;
|
|
7
|
+
} | {
|
|
8
|
+
type: 'absolute';
|
|
9
|
+
dayOfMonth: number;
|
|
10
|
+
};
|
|
11
|
+
export type MonthlySettingsDelta = {
|
|
12
|
+
kind: 'setType';
|
|
13
|
+
newType: 'relative' | 'absolute';
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'setRelativeDayOrder';
|
|
16
|
+
newDayOrder: dayOrderType;
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'setRelativeWeekDay';
|
|
19
|
+
newWeekDay: weekDay;
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'setAbsoluteDayOfMonth';
|
|
22
|
+
newDayOfMonth: number;
|
|
23
|
+
};
|
|
24
|
+
interface MonthlySettingsProps {
|
|
25
|
+
value?: MonthlySettingsValue;
|
|
26
|
+
onChange: (delta: MonthlySettingsDelta) => void;
|
|
27
|
+
}
|
|
28
|
+
declare const MonthlyFrequencySettings: import('react').MemoExoticComponent<({ value, onChange }: MonthlySettingsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
29
|
+
export default MonthlyFrequencySettings;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { WeeklyFrequencySettingsValue } from './WeeklyFrequencySetting';
|
|
2
|
+
import { MonthlySettingsValue } from './MonthlyFrequencySettings';
|
|
3
|
+
import { YearlyFrequencySettingsValue } from './YearlyFrequencySettings';
|
|
4
|
+
import { CustomFrequencySettingsValue } from './CustomFrequencySettings';
|
|
1
5
|
export type RecurrenceFrequencyType = "custom" | "weekly" | "monthly" | "yearly";
|
|
2
6
|
export declare const RecurrenceFrecuencyOptions: {
|
|
3
7
|
label: string;
|
|
4
8
|
value: string;
|
|
5
9
|
}[];
|
|
6
|
-
|
|
10
|
+
export type FrequencySettingsValue = WeeklyFrequencySettingsValue | MonthlySettingsValue | YearlyFrequencySettingsValue | CustomFrequencySettingsValue;
|
|
11
|
+
declare const RecurrentDatePicker: import('react').MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
7
12
|
export default RecurrentDatePicker;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
export type weekDay = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
|
|
2
3
|
type WeekdaySelectorProps = {
|
|
3
4
|
options?: weekDay[];
|
|
4
5
|
labelVariant?: 'short' | 'large';
|
|
5
|
-
value
|
|
6
|
+
value?: weekDay[];
|
|
6
7
|
onChange: (newValue: weekDay[]) => void;
|
|
7
8
|
label?: string;
|
|
8
9
|
required?: boolean;
|
|
9
10
|
};
|
|
10
|
-
declare const WeekdaysSelector: (props: WeekdaySelectorProps) => import("react/jsx-runtime").JSX.Element
|
|
11
|
+
declare const WeekdaysSelector: React.MemoExoticComponent<(props: WeekdaySelectorProps) => import("react/jsx-runtime").JSX.Element>;
|
|
11
12
|
export default WeekdaysSelector;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { weekDay } from './WeekdaysSelector';
|
|
2
|
+
export type WeeklyFrequencySettingsValue = weekDay[];
|
|
3
|
+
interface WeeklyFrequencySettingsProps {
|
|
4
|
+
value?: WeeklyFrequencySettingsValue;
|
|
5
|
+
onChange: (value: WeeklyFrequencySettingsValue) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const WeeklyFrequencySettings: import('react').MemoExoticComponent<({ value, onChange }: WeeklyFrequencySettingsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export default WeeklyFrequencySettings;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface YearlyFrequencySettingsValue {
|
|
2
|
+
month: number;
|
|
3
|
+
day?: number;
|
|
4
|
+
}
|
|
5
|
+
interface YearlyFrequencySettingsProps {
|
|
6
|
+
value?: YearlyFrequencySettingsValue;
|
|
7
|
+
onChange: (value: YearlyFrequencySettingsValue) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const YearlyFrequencySettings: import('react').MemoExoticComponent<({ value, onChange }: YearlyFrequencySettingsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
10
|
+
export default YearlyFrequencySettings;
|