@timum/booking 1.5.0 → 1.5.2

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 CHANGED
@@ -259,9 +259,37 @@ This object's options directly affect timum's behaviour or allow you to react to
259
259
  </tr>
260
260
  <tr>
261
261
  <td>ref</td>
262
- <td>string/array, Reference of the resource to show the appointments of. <br><em> This is the only prop that is mandatory.</em><br> Everything else is optional. <br>Can also be a url parameter.
262
+ <td>string/array, Reference of the resource to show the appointments of. <br><em> Either this or tslRefs (see below) must be defined.</em><br> Everything else is optional. <br>Can also be a url parameter.
263
263
  <br>You can also provide a list of string references. Booking.js will then allow your customer to choose for which resource appointments should be displayed.</td>
264
264
  </tr>
265
+ <tr>
266
+ <td>tslRefs</td>
267
+ <td>string/array, Reference(s) of specific appointments. For when you only want to share a selection of a resource's appointments.<br><em>Either this or refs (see above) must be defined.</em><br> Everything else is optional. <br>Can also be a url parameter.
268
+ <br>You can also provide a list of string references. Booking.js will then load all appointments and corresponding resource information. If they belong to different resources, then bookingjs allows your customer to choose for which resource appointments should be displayed.
269
+ <blockquote>
270
+ Note: If this and ref are defined in conjunction:
271
+ The following behaviour is not yet set in stone and may<b> change in the future. </b><br>
272
+ First, bookingjs will load all appointments of the given resources. It then loads all the appointments defined in tslRefs. It then tries to match both results in the following way:<br><br>
273
+ If a ref has none of it's appointments referenced in tslRef: <br>
274
+ <ul>
275
+ <li>allow the corresponding resource to be selected by the customer.</li>
276
+ <li>show all free and bookable appointments of that resource.</li>
277
+ </ul>
278
+ <br>
279
+ If a tslRef belongs to a resource also defined in ref:
280
+ <ul>
281
+ <li>allow the corresponding resource to be selected by the customer.</li>
282
+ <li>show only the appointments defined in tslRefs. Discard all other appointments which would have otherwise been bookable.</li>
283
+ </ul>
284
+ <br>
285
+ If a tslRef belongs to no resource defined in ref:
286
+ <ul>
287
+ <li>allow the corresponding resource to be selected by the customer.</li>
288
+ <li>show (and load) only the corresponding appointment.</li>
289
+ </ul>
290
+ </blockquote>
291
+ </td>
292
+ </tr>
265
293
  <tr>
266
294
  <td>platform</td>
267
295
  <td>string, A fully qualified reference (<code>id@someUuid@platform</code>) can be unwieldy especially if used as a url param. This prop allows you to hardcode the <code>platform</code> part.
@@ -338,7 +366,7 @@ This object's options directly affect timum's behaviour or allow you to react to
338
366
  </tr>
339
367
  <tr>
340
368
  <td>localization</td>
341
- <td>object. Contains all localization variables and their standard texts. timum nativly supports English and German. Use this to override the standard text and/or add translations for your custom field labels and input validations (see the localisation guide for mor info.)
369
+ <td>object. Contains all localization variables and their standard texts. timum nativly supports English, German, French, Spanish and Italian. Use this to override the standard text and/or add translations for e.g your custom field labels and input validations (see the localisation guide for more info.)
342
370
  <br>
343
371
  Needs professional plan.
344
372
  </td>
@@ -666,6 +694,10 @@ The standard configuration can be overridden except for the aforementioned field
666
694
  (value) => value === true
667
695
  ),
668
696
  },
697
+ locale: {
698
+ index: 6,
699
+ preventRendering: true,
700
+ },
669
701
  },
670
702
  ```
671
703
 
@@ -681,11 +713,15 @@ Anatomy of a custom booking form field:
681
713
 
682
714
  ```
683
715
  <fieldName> : {
716
+ index: number, index defines the order in which the fields get displayed.
717
+ (If you want to reorder the default fields or
718
+ want to inject a custom field between them,
719
+ you must redefine them as custom fields and manually change their indexes.)
684
720
  title: string or JSXElement;
685
721
  validation: yup based validation. See https://github.com/jquense/yup. Re-exported and accessible via timum.yup
686
722
  type: string; either 'text' (default), 'phoneNumber', 'textarea', 'checkbox' or 'select',
687
- prefilled: string; value a fiels is initiated with.
688
- Note that for fields of type 'select' you must use the 'key' of on of it's options.
723
+ prefilled: string; value a field is initiated with.
724
+ Note that for fields of type 'select' you must use the 'key' of one of it's options.
689
725
  preventRendering: boolean, default false;
690
726
  if true the field is not visible to the user.
691
727
  Useful in conjunction with sendCustomValuesInMessage allowing you to
package/build/booking.js CHANGED
@@ -1,4 +1,4 @@
1
- import { R as s, I as t, K as e, G as n, H as o, J as m } from "./index-58c1500e.js";
1
+ import { R as s, I as t, K as e, G as n, H as o, J as m } from "./index-63dd2af1.js";
2
2
  export {
3
3
  s as React,
4
4
  t as TimumBooking,