mozrest-sdk-react-dev 0.3.38 → 0.3.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/mozrest-sdk.es.js CHANGED
@@ -7830,6 +7830,7 @@ const Negative$4 = "Negative";
7830
7830
  const Period$4 = "Period";
7831
7831
  const Year$5 = "Year";
7832
7832
  const Covers$4 = "Covered";
7833
+ const NO_AVAILABLE_CHANNELS$4 = "No available channels";
7833
7834
  const en = {
7834
7835
  errors: errors$4,
7835
7836
  SPECIALCLOSINGDATES: SPECIALCLOSINGDATES$4,
@@ -8374,7 +8375,8 @@ const en = {
8374
8375
  Year: Year$5,
8375
8376
  "No options": "No options",
8376
8377
  Covers: Covers$4,
8377
- "dd/mm/yyyy": "dd/mm/yyyy"
8378
+ "dd/mm/yyyy": "dd/mm/yyyy",
8379
+ NO_AVAILABLE_CHANNELS: NO_AVAILABLE_CHANNELS$4
8378
8380
  };
8379
8381
  const errors$3 = { "required": "Este campo es requerido", "email": "Este correo electrónico no es válido", "phone": "Número de teléfono no válido", "url": "URL no válida" };
8380
8382
  const SPECIALCLOSINGDATES$3 = "Fechas de cierre especiales u horarios de apertura diferentes (días especiales, festivos, eventos privados…)";
@@ -8868,6 +8870,7 @@ const Period$3 = "Período";
8868
8870
  const Year$4 = "Año";
8869
8871
  const Bookings$3 = "Reservas";
8870
8872
  const Covers$3 = "Coberturas";
8873
+ const NO_AVAILABLE_CHANNELS$3 = "No hay canales disponibles";
8871
8874
  const es$2 = {
8872
8875
  errors: errors$3,
8873
8876
  SPECIALCLOSINGDATES: SPECIALCLOSINGDATES$3,
@@ -9413,7 +9416,8 @@ const es$2 = {
9413
9416
  "No options": "No hay opciones",
9414
9417
  Bookings: Bookings$3,
9415
9418
  Covers: Covers$3,
9416
- "dd/mm/yyyy": "dd/mm/yyyy"
9419
+ "dd/mm/yyyy": "dd/mm/yyyy",
9420
+ NO_AVAILABLE_CHANNELS: NO_AVAILABLE_CHANNELS$3
9417
9421
  };
9418
9422
  const errors$2 = { "required": "Ce champ est requis", "email": "Cet e-mail n'est pas valide", "phone": "Numéro de téléphone non valide", "url": "Cette URL n'est pas valide" };
9419
9423
  const SPECIALCLOSINGDATES$2 = "Dates de fermeture spéciales ou horaires différents (jours fériés, événements privés, etc.)";
@@ -9907,6 +9911,7 @@ const Period$2 = "Période";
9907
9911
  const Year$3 = "Année";
9908
9912
  const Bookings$2 = "Réservations";
9909
9913
  const Covers$2 = "Couverts";
9914
+ const NO_AVAILABLE_CHANNELS$2 = "Aucun canal disponible";
9910
9915
  const fr$1 = {
9911
9916
  errors: errors$2,
9912
9917
  SPECIALCLOSINGDATES: SPECIALCLOSINGDATES$2,
@@ -10452,7 +10457,8 @@ const fr$1 = {
10452
10457
  "No options": "Vide",
10453
10458
  Bookings: Bookings$2,
10454
10459
  Covers: Covers$2,
10455
- "dd/mm/yyyy": "jj/mm/aaaa"
10460
+ "dd/mm/yyyy": "jj/mm/aaaa",
10461
+ NO_AVAILABLE_CHANNELS: NO_AVAILABLE_CHANNELS$2
10456
10462
  };
10457
10463
  const errors$1 = { "required": "Dieses Feld ist erforderlich", "email": "Diese E-Mail ist nicht gültig", "phone": "Diese Telefonnummer ist nicht gültig", "url": "Diese URL ist nicht gültig" };
10458
10464
  const SPECIALCLOSINGDATES$1 = "Besondere Schließungstage oder abweichende Öffnungszeiten (besondere Tage, Feiertage, private Veranstaltungen…)";
@@ -10946,6 +10952,7 @@ const Period$1 = "Zeitraum";
10946
10952
  const Year$2 = "Jahr";
10947
10953
  const Bookings$1 = "Buchungen";
10948
10954
  const Covers$1 = "Covered";
10955
+ const NO_AVAILABLE_CHANNELS$1 = "Keine verfügbaren Kanäle";
10949
10956
  const de$1 = {
10950
10957
  errors: errors$1,
10951
10958
  SPECIALCLOSINGDATES: SPECIALCLOSINGDATES$1,
@@ -11491,7 +11498,8 @@ const de$1 = {
11491
11498
  "No options": "Keine Optionen",
11492
11499
  Bookings: Bookings$1,
11493
11500
  Covers: Covers$1,
11494
- "dd/mm/yyyy": "dd/mm/yyyy"
11501
+ "dd/mm/yyyy": "dd/mm/yyyy",
11502
+ NO_AVAILABLE_CHANNELS: NO_AVAILABLE_CHANNELS$1
11495
11503
  };
11496
11504
  const errors = { "required": "Dit veld is verplicht", "email": "Dit e-mailadres is ongeldig", "phone": "Ongeldig telefoonnummer", "url": "Deze URL is ongeldig" };
11497
11505
  const SPECIALCLOSINGDATES = "Speciale sluitingsdagen of afwijkende openingstijden (feestdagen, evenementen, enz.)";
@@ -61444,10 +61452,71 @@ const formatData$i = (values = {}) => {
61444
61452
  }
61445
61453
  };
61446
61454
  };
61455
+ const useOutsideClick = (ref, callback) => {
61456
+ useEffect(() => {
61457
+ function handleClickOutside(event) {
61458
+ if (ref.current && (!ref.current.contains(event.target) && !event.target.className.includes("ant-picker"))) {
61459
+ callback();
61460
+ }
61461
+ }
61462
+ document.addEventListener("mousedown", handleClickOutside);
61463
+ return () => {
61464
+ document.removeEventListener("mousedown", handleClickOutside);
61465
+ };
61466
+ }, [ref]);
61467
+ };
61468
+ const filterButton$1 = "_filterButton_c0yjo_1";
61469
+ const buttonClose$1 = "_buttonClose_c0yjo_21";
61470
+ const toolbar$2 = "_toolbar_c0yjo_38";
61471
+ const styles$1y = {
61472
+ filterButton: filterButton$1,
61473
+ buttonClose: buttonClose$1,
61474
+ toolbar: toolbar$2,
61475
+ "toolbar--hide": "_toolbar--hide_c0yjo_47"
61476
+ };
61477
+ const FiltersWrapper$1 = ({
61478
+ children
61479
+ }) => {
61480
+ const {
61481
+ t: t2
61482
+ } = useTranslation();
61483
+ const [showFilters, setShowFilters] = useState(false);
61484
+ const toogleFilter = () => setShowFilters((current) => !current);
61485
+ const close3 = () => setShowFilters(false);
61486
+ const ref = useRef(null);
61487
+ useOutsideClick(ref, close3);
61488
+ return /* @__PURE__ */ jsxs(Fragment, {
61489
+ children: [/* @__PURE__ */ jsxs("div", {
61490
+ ref,
61491
+ className: classNames$2(styles$1y.toolbar, {
61492
+ [styles$1y["toolbar--hide"]]: !showFilters
61493
+ }),
61494
+ children: [/* @__PURE__ */ jsx$1("div", {
61495
+ className: classNames$2(styles$1y.buttonClose, {
61496
+ [styles$1y.hide]: !showFilters
61497
+ }),
61498
+ children: /* @__PURE__ */ jsx$1(Icon, {
61499
+ icon: "close",
61500
+ size: "small",
61501
+ onClick: close3
61502
+ })
61503
+ }), /* @__PURE__ */ jsx$1("div", {
61504
+ children
61505
+ })]
61506
+ }), /* @__PURE__ */ jsxs("button", {
61507
+ onClick: toogleFilter,
61508
+ className: styles$1y.filterButton,
61509
+ children: [/* @__PURE__ */ jsx$1(Icon, {
61510
+ icon: "descriptionShort",
61511
+ size: "small"
61512
+ }), t2("FILTERS")]
61513
+ })]
61514
+ });
61515
+ };
61447
61516
  const inputWrapper = "_inputWrapper_c5acm_1";
61448
61517
  const input$4 = "_input_c5acm_1";
61449
61518
  const inputIcon = "_inputIcon_c5acm_89";
61450
- const styles$1y = {
61519
+ const styles$1x = {
61451
61520
  inputWrapper,
61452
61521
  input: input$4,
61453
61522
  "input--r-md": "_input--r-md_c5acm_37",
@@ -61509,7 +61578,7 @@ const Input$2 = React__default.forwardRef(({
61509
61578
  },
61510
61579
  children: [/* @__PURE__ */ jsx$1("input", {
61511
61580
  ref,
61512
- className: classNames$2(styles$1y["input"], styles$1y[`input--h-${heigth}`], styles$1y[`input--r-${radius}`], icon2 && styles$1y[`input--with-icon-${iconPosition}`], filled == true ? styles$1y[`input--filled`] : "", borderLess == true ? styles$1y[`input--borderless`] : "", rounded == true ? styles$1y[`input--rounded`] : "", error3 == true ? styles$1y[`input--error`] : "", lineThrough == true ? styles$1y[`input--line-through`] : ""),
61581
+ className: classNames$2(styles$1x["input"], styles$1x[`input--h-${heigth}`], styles$1x[`input--r-${radius}`], icon2 && styles$1x[`input--with-icon-${iconPosition}`], filled == true ? styles$1x[`input--filled`] : "", borderLess == true ? styles$1x[`input--borderless`] : "", rounded == true ? styles$1x[`input--rounded`] : "", error3 == true ? styles$1x[`input--error`] : "", lineThrough == true ? styles$1x[`input--line-through`] : ""),
61513
61582
  style: customStyles2,
61514
61583
  onChange: onChange2,
61515
61584
  id: id2,
@@ -61520,7 +61589,7 @@ const Input$2 = React__default.forwardRef(({
61520
61589
  disabled: disabled2,
61521
61590
  ...props
61522
61591
  }), icon2 && /* @__PURE__ */ jsx$1("div", {
61523
- className: classNames$2(styles$1y["inputIcon"], styles$1y[`inputIcon--p-${iconPosition}`], className ? className : ""),
61592
+ className: classNames$2(styles$1x["inputIcon"], styles$1x[`inputIcon--p-${iconPosition}`], className ? className : ""),
61524
61593
  children: /* @__PURE__ */ jsx$1(Icon, {
61525
61594
  icon: icon2,
61526
61595
  size: iconSize
@@ -61530,7 +61599,7 @@ const Input$2 = React__default.forwardRef(({
61530
61599
  });
61531
61600
  });
61532
61601
  const datePicker$1 = "_datePicker_aezmq_1";
61533
- const styles$1x = {
61602
+ const styles$1w = {
61534
61603
  datePicker: datePicker$1
61535
61604
  };
61536
61605
  function r(e) {
@@ -71970,7 +72039,7 @@ const left = "_left_10sq9_38";
71970
72039
  const datePickerShortcuts = "_datePickerShortcuts_10sq9_48";
71971
72040
  const singleMode = "_singleMode_10sq9_298";
71972
72041
  const rangeMode = "_rangeMode_10sq9_303";
71973
- const styles$1w = {
72042
+ const styles$1v = {
71974
72043
  datePicker,
71975
72044
  inlinePicker,
71976
72045
  visible,
@@ -85540,12 +85609,12 @@ const DatePicker$1 = ({
85540
85609
  return null;
85541
85610
  }
85542
85611
  return /* @__PURE__ */ jsx$1("div", {
85543
- className: styles$1w.datePickerShortcuts,
85612
+ className: styles$1v.datePickerShortcuts,
85544
85613
  children: options2.shortcuts.map((shortcut, index2) => /* @__PURE__ */ jsx$1(Button$1, {
85545
85614
  type: "button",
85546
85615
  mode: "tertiary",
85547
85616
  size: "mini",
85548
- className: styles$1w.datePickerShortcutBtn,
85617
+ className: styles$1v.datePickerShortcutBtn,
85549
85618
  onClick: () => {
85550
85619
  shortcut.onClick({
85551
85620
  setDateRange: (start, end) => {
@@ -85596,7 +85665,7 @@ const DatePicker$1 = ({
85596
85665
  }, [value2, format3, isRangeMode]);
85597
85666
  const selectedDate = isRangeMode ? startDate : singleDate;
85598
85667
  return /* @__PURE__ */ jsxs("div", {
85599
- className: `${styles$1w.inlinePicker} ${show ? styles$1w.visible : ""} ${isRangeMode ? styles$1w.rangeMode : styles$1w.singleMode} ${styles$1w[pickerPosition]}`,
85668
+ className: `${styles$1v.inlinePicker} ${show ? styles$1v.visible : ""} ${isRangeMode ? styles$1v.rangeMode : styles$1v.singleMode} ${styles$1v[pickerPosition]}`,
85600
85669
  children: [/* @__PURE__ */ jsx$1(DatePicker$2, {
85601
85670
  id: id2,
85602
85671
  ref: datePickerRef,
@@ -85663,7 +85732,7 @@ const InputDatePicker = (props) => {
85663
85732
  });
85664
85733
  });
85665
85734
  return /* @__PURE__ */ jsxs("div", {
85666
- className: styles$1x.datePicker,
85735
+ className: styles$1w.datePicker,
85667
85736
  ref: pickerContainerRef,
85668
85737
  children: [/* @__PURE__ */ jsx$1(CustomInput, {}), /* @__PURE__ */ jsx$1(DatePicker$1, {
85669
85738
  id: props.id,
@@ -85687,67 +85756,6 @@ InputDatePicker.defaultProps = {
85687
85756
  },
85688
85757
  mode: "single"
85689
85758
  };
85690
- const useOutsideClick = (ref, callback) => {
85691
- useEffect(() => {
85692
- function handleClickOutside(event) {
85693
- if (ref.current && (!ref.current.contains(event.target) && !event.target.className.includes("ant-picker"))) {
85694
- callback();
85695
- }
85696
- }
85697
- document.addEventListener("mousedown", handleClickOutside);
85698
- return () => {
85699
- document.removeEventListener("mousedown", handleClickOutside);
85700
- };
85701
- }, [ref]);
85702
- };
85703
- const filterButton$1 = "_filterButton_c0yjo_1";
85704
- const buttonClose$1 = "_buttonClose_c0yjo_21";
85705
- const toolbar$2 = "_toolbar_c0yjo_38";
85706
- const styles$1v = {
85707
- filterButton: filterButton$1,
85708
- buttonClose: buttonClose$1,
85709
- toolbar: toolbar$2,
85710
- "toolbar--hide": "_toolbar--hide_c0yjo_47"
85711
- };
85712
- const FiltersWrapper$1 = ({
85713
- children
85714
- }) => {
85715
- const {
85716
- t: t2
85717
- } = useTranslation();
85718
- const [showFilters, setShowFilters] = useState(false);
85719
- const toogleFilter = () => setShowFilters((current) => !current);
85720
- const close3 = () => setShowFilters(false);
85721
- const ref = useRef(null);
85722
- useOutsideClick(ref, close3);
85723
- return /* @__PURE__ */ jsxs(Fragment, {
85724
- children: [/* @__PURE__ */ jsxs("div", {
85725
- ref,
85726
- className: classNames$2(styles$1v.toolbar, {
85727
- [styles$1v["toolbar--hide"]]: !showFilters
85728
- }),
85729
- children: [/* @__PURE__ */ jsx$1("div", {
85730
- className: classNames$2(styles$1v.buttonClose, {
85731
- [styles$1v.hide]: !showFilters
85732
- }),
85733
- children: /* @__PURE__ */ jsx$1(Icon, {
85734
- icon: "close",
85735
- size: "small",
85736
- onClick: close3
85737
- })
85738
- }), /* @__PURE__ */ jsx$1("div", {
85739
- children
85740
- })]
85741
- }), /* @__PURE__ */ jsxs("button", {
85742
- onClick: toogleFilter,
85743
- className: styles$1v.filterButton,
85744
- children: [/* @__PURE__ */ jsx$1(Icon, {
85745
- icon: "descriptionShort",
85746
- size: "small"
85747
- }), t2("FILTERS")]
85748
- })]
85749
- });
85750
- };
85751
85759
  const Header$3 = ({
85752
85760
  onChangeFilter,
85753
85761
  filters: filters2,
@@ -85804,6 +85812,7 @@ const Header$3 = ({
85804
85812
  children: /* @__PURE__ */ jsx$1(InputDatePicker, {
85805
85813
  id: "date",
85806
85814
  label: t2("DATERANGE"),
85815
+ mode: "range",
85807
85816
  value: [new Date(filters2.range.from), new Date(filters2.range.till)],
85808
85817
  onChange: (v2) => {
85809
85818
  if (!v2 || v2.length < 2) return;
@@ -85812,16 +85821,7 @@ const Header$3 = ({
85812
85821
  handleChangeRange([start, end]);
85813
85822
  },
85814
85823
  options: {
85815
- splitView: true,
85816
- singleMode: false,
85817
- numberOfColumns: 2,
85818
- numberOfMonths: 2,
85819
- autoApply: false,
85820
- showWeekNumbers: false,
85821
- lang: i18n.language === "es" ? "es-ES" : "en-EN",
85822
85824
  dropdowns: {
85823
- minYear: 1990,
85824
- maxYear: null,
85825
85825
  months: true,
85826
85826
  years: true
85827
85827
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mozrest-sdk-react-dev",
3
- "version": "0.3.38",
3
+ "version": "0.3.39",
4
4
  "main": "mozrest-sdk.es.js",
5
5
  "keywords": [
6
6
  "mozrest"
package/style.css CHANGED
@@ -1302,6 +1302,71 @@
1302
1302
  position: absolute;
1303
1303
  top: 1rem;
1304
1304
  right: 1rem;
1305
+ }._filterButton_c0yjo_1 {
1306
+ display: flex;
1307
+ background: var(--moz-cta-content-bg);
1308
+ color: var(--moz-text-label);
1309
+ border: 1px solid var(--moz-border);
1310
+ padding: 0.5rem;
1311
+ border-radius: 2px;
1312
+ justify-content: center;
1313
+ align-items: center;
1314
+ gap: 0.5rem;
1315
+ cursor: pointer;
1316
+ margin-left: auto;
1317
+ margin-bottom: 1rem;
1318
+ }
1319
+ @media (min-width: 768px) {
1320
+ ._filterButton_c0yjo_1 {
1321
+ display: none;
1322
+ }
1323
+ }
1324
+
1325
+ ._buttonClose_c0yjo_21 {
1326
+ display: flex;
1327
+ color: var(--moz-text-label);
1328
+ justify-content: flex-end;
1329
+ cursor: pointer;
1330
+ flex: 1;
1331
+ width: 100%;
1332
+ }
1333
+ ._buttonClose--hidden_c0yjo_29 {
1334
+ display: none;
1335
+ }
1336
+ @media (min-width: 768px) {
1337
+ ._buttonClose_c0yjo_21 {
1338
+ display: none;
1339
+ }
1340
+ }
1341
+
1342
+ ._toolbar_c0yjo_38 {
1343
+ background-color: var(--moz-cta-content-bg);
1344
+ box-shadow: var(--moz-input-border) 0px 10px 10px -10px;
1345
+ position: absolute;
1346
+ padding: 1rem;
1347
+ left: 0;
1348
+ right: 0;
1349
+ z-index: 10;
1350
+ }
1351
+ ._toolbar--hide_c0yjo_47 {
1352
+ display: none;
1353
+ }
1354
+ @media (min-width: 768px) {
1355
+ ._toolbar--hide_c0yjo_47 {
1356
+ display: block;
1357
+ }
1358
+ }
1359
+ @media (min-width: 768px) {
1360
+ ._toolbar_c0yjo_38 {
1361
+ background-color: transparent;
1362
+ box-shadow: none;
1363
+ padding: 1rem 0;
1364
+ position: relative;
1365
+ gap: 1rem;
1366
+ }
1367
+ ._toolbar--hidden_c0yjo_63 {
1368
+ display: flex;
1369
+ }
1305
1370
  }._inputWrapper_c5acm_1 {
1306
1371
  position: relative;
1307
1372
  display: flex;
@@ -2525,71 +2590,6 @@ h2.react-datepicker__current-month {
2525
2590
  ._rangeMode_10sq9_303 {
2526
2591
  --picker-width: 540px;
2527
2592
  --picker-mobile-width: 260px;
2528
- }._filterButton_c0yjo_1 {
2529
- display: flex;
2530
- background: var(--moz-cta-content-bg);
2531
- color: var(--moz-text-label);
2532
- border: 1px solid var(--moz-border);
2533
- padding: 0.5rem;
2534
- border-radius: 2px;
2535
- justify-content: center;
2536
- align-items: center;
2537
- gap: 0.5rem;
2538
- cursor: pointer;
2539
- margin-left: auto;
2540
- margin-bottom: 1rem;
2541
- }
2542
- @media (min-width: 768px) {
2543
- ._filterButton_c0yjo_1 {
2544
- display: none;
2545
- }
2546
- }
2547
-
2548
- ._buttonClose_c0yjo_21 {
2549
- display: flex;
2550
- color: var(--moz-text-label);
2551
- justify-content: flex-end;
2552
- cursor: pointer;
2553
- flex: 1;
2554
- width: 100%;
2555
- }
2556
- ._buttonClose--hidden_c0yjo_29 {
2557
- display: none;
2558
- }
2559
- @media (min-width: 768px) {
2560
- ._buttonClose_c0yjo_21 {
2561
- display: none;
2562
- }
2563
- }
2564
-
2565
- ._toolbar_c0yjo_38 {
2566
- background-color: var(--moz-cta-content-bg);
2567
- box-shadow: var(--moz-input-border) 0px 10px 10px -10px;
2568
- position: absolute;
2569
- padding: 1rem;
2570
- left: 0;
2571
- right: 0;
2572
- z-index: 10;
2573
- }
2574
- ._toolbar--hide_c0yjo_47 {
2575
- display: none;
2576
- }
2577
- @media (min-width: 768px) {
2578
- ._toolbar--hide_c0yjo_47 {
2579
- display: block;
2580
- }
2581
- }
2582
- @media (min-width: 768px) {
2583
- ._toolbar_c0yjo_38 {
2584
- background-color: transparent;
2585
- box-shadow: none;
2586
- padding: 1rem 0;
2587
- position: relative;
2588
- gap: 1rem;
2589
- }
2590
- ._toolbar--hidden_c0yjo_63 {
2591
- display: flex;
2592
- }
2593
2593
  }@media (max-width: 768px) {
2594
2594
  ._content_6vryc_2 {
2595
2595
  padding: 0;