@timum/booking 0.7.5 → 0.8.1

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
@@ -23,19 +23,28 @@
23
23
 
24
24
  <a name=”features”></a>
25
25
 
26
+ ## Introduction
27
+
28
+ timum BookingJs is a fully customizable appointment booking frontend app, intended to be integrated into every web page or web app or mobile app. It is ready to use out-of-the-box. And it provides the ability to customize it.
29
+ This documentation guides you through all the customization capabilities.
30
+
26
31
  ## Features
27
32
 
28
- - Direct booking or appointment requests for public appointments
29
- - Approval required for requested appointments
30
- - Option to show/hide fully booked appointments
31
- - Option to prevent booking if appointment is too close to current time
32
- - Customer ability to cancel appointments with proper authentication
33
- - Customizable wording across languages
34
- - Support for multiple languages (English and German included)
35
- - Callbacks for custom code execution and event response (e.g. booking created, appointments loaded, booking canceled)
36
- - Customizable look and feel with mui theming (available with professional plan)
37
- - Dynamic definition of input fields with localized labels and validation
33
+ - Real time availability and booking
34
+ - Booking requests for public appointments - approval required
35
+ - Multiple participant appointments
36
+ - Visitor ligitimation - only invited visitors see the booking widget on public pages, listings, exposés
37
+ - Visitor identification - via customer ID from CRM
38
+ - Show/hide fully booked appointments option
39
+ - Prebooking period option - prevents booking if appointment is too soon from now
40
+ - Double booking prevention
41
+ - Cancelling appointment by customer with proper authentication
42
+ - Fully customizable look and feel with mui theming (available with premium plans)
43
+ - Customizable wording across languages (availabe with premium plans)
44
+ - Dynamic definition of input fields with localized labels and validation (available with premium plans)
38
45
  - Therefore, ability to request additional information from customers during booking process
46
+ - Support for multiple languages (English and German included) - add your own language
47
+ - Callbacks for custom code execution and event response (e.g. booking created, appointments loaded, booking canceled)
39
48
 
40
49
  <a name=”basic_usage”></a>
41
50
 
@@ -50,7 +59,7 @@ Add the following code to your webpage:
50
59
  ```html
51
60
  <div id="bookingjs" style="margin: 32px"></div>
52
61
  <script type="module">
53
- import * as timum from 'https://cdn.jsdelivr.net/npm/@timum/booking@0.7.4/build/timum-booking.js';
62
+ import * as timum from 'https://cdn.jsdelivr.net/npm/@timum/booking@0.8.0/build/timum-booking.js';
54
63
 
55
64
  timum.init({ ref: 'booking-widget-demo-resource@timum' });
56
65
  </script>
@@ -65,7 +74,7 @@ Alternatively, you can add `ref` to your url as a parameter. This allows you to
65
74
  ```html
66
75
  <div id="bookingjs" style="margin: 32px"></div>
67
76
  <script type="module">
68
- import * as timum from 'https://cdn.jsdelivr.net/npm/@timum/booking@0.7.4/build/timum-booking.js';
77
+ import * as timum from 'https://cdn.jsdelivr.net/npm/@timum/booking@0.8.0/build/timum-booking.js';
69
78
 
70
79
  timum.init(); //<- no need for the reference here
71
80
  </script>
@@ -269,7 +278,9 @@ In order to display public appointments, resource and calendar information timum
269
278
  provider: {
270
279
  name: 'string',
271
280
  description: 'string',
272
- isBrandingAllowed: 'boolean',
281
+ isThemingAllowed: 'boolean',
282
+ isLocalisationAllowed: 'boolean',
283
+ areCustomFieldsAllowed: 'boolean'
273
284
  },
274
285
  channel: {
275
286
  bookingProcess: 'string' // One of 'IMMEDIATE' or 'REQUESTED',
@@ -372,7 +383,7 @@ localization: {
372
383
  'Sie müssen die Datenschutzbestimmungen akzeptieren bevor Sie buchen können.',
373
384
  email_field_must_be_valid: 'Geben Sie eine valide E-Mail Adresse ein',
374
385
  },
375
- fields: {
386
+ fields: { // field labels are markdown capable. That's why you can use basic html as well.
376
387
  firstName: 'Vorname',
377
388
  lastName: 'Nachname',
378
389
  name: 'Name',
@@ -380,7 +391,8 @@ localization: {
380
391
  mobile: 'Mobil',
381
392
  message: 'Ihre Nachricht',
382
393
  accept_timum_privacy:
383
- 'Datenschutzbestimmungen gelesen und akzeptiert',
394
+ '<a href="https://info.timum.de/datenschutz" target="_blank">Datenschutzbestimmungen</a> gelesen und akzeptiert',
395
+
384
396
  },
385
397
  },
386
398
  // the same for english.
@@ -422,14 +434,16 @@ localization: {
422
434
  'You must accept the privacy policy prior to booking.',
423
435
  email_field_must_be_valid: 'Enter a valid email address',
424
436
  },
425
- fields: {
437
+ fields: { // field labels are markdown capable. That's why you can use basic html as well.
426
438
  firstName: 'First name',
427
439
  lastName: 'Last name',
428
440
  name: 'name',
429
441
  email: 'E-mail',
430
442
  mobile: 'Mobile',
431
443
  message: 'Your Message',
432
- accept_timum_privacy: '<0>Privacy policy</0> read and accepted.',
444
+ accept_timum_privacy:
445
+ '<a href="https://info.timum.de/datenschutz" target="_blank">Privacy policy</a> read and accepted.',
446
+
433
447
  },
434
448
  },
435
449
  },
@@ -439,7 +453,7 @@ localization: {
439
453
 
440
454
  #### How to define fields
441
455
 
442
- You can customize the information required from customers before booking by defining fields. The minimum required fields for timum are firstName, lastName, email, and agbs. By default, timum also requests mobile and message fields, but you can add your own fields as well.
456
+ You can customize the information you request from customers before booking by defining fields. The minimum required fields for timum are firstName, lastName, email, and agbs. By default, timum also requests mobile and message fields, but you can add your own fields as well.
443
457
 
444
458
  Fields, including custom ones, support validation and localization.
445
459
  Validation is realized using the yup library, which is included with timum. You can import it using the following code:
@@ -539,16 +553,14 @@ Type `select`:
539
553
 
540
554
  ### An Example
541
555
 
542
- Here is an example Tying all of the aforementioned concepts together.
556
+ Here is an example tying all of the aforementioned concepts together.
557
+ And [here](https://jsfiddle.net/timum/wov6pLk7/) is a fiddle containing the very example detailed in this chapter.
543
558
 
544
559
  <a name=”the_scenario”></a>
545
560
 
546
561
  #### The Scenario
547
562
 
548
- For whatever reason it is important to know the gender of customers.
549
- On the other side the optional fields `mobile` and `message` aren't important for you and you wish to remove them.
550
- This new gender field must be filled, therefore a validation is required.
551
- Both the title of the field and it's validations must be localized.
563
+ It is necessary to determine the gender of customers for a specific purpose. The `mobile` and `message` fields are not necessary and will be removed. The new `gender` field must be filled, therefore a validation check is required to ensure it is completed. Both the name of the `gender` field and the validation messages must be translated into different languages.
552
564
 
553
565
  <a name=”the_implementation”></a>
554
566
 
@@ -559,7 +571,7 @@ This is the base configuration. As it is it uses the standard field configuratio
559
571
  ```html
560
572
  <div id="bookingjs" style="margin: 32px"></div>
561
573
  <script type="module">
562
- import * as timum from 'https://cdn.jsdelivr.net/npm/@timum/booking@0.7.4/build/timum-booking.js';
574
+ import * as timum from 'https://cdn.jsdelivr.net/npm/@timum/booking@0.8.0/build/timum-booking.js';
563
575
 
564
576
  timum.init({ ref: 'booking-widget-demo-resource@timum' });
565
577
  </script>
@@ -570,7 +582,7 @@ Let's add the necessary changes:
570
582
  ```html
571
583
  <div id="bookingjs" style="margin: 32px"></div>
572
584
  <script type="module">
573
- import * as timum from 'https://cdn.jsdelivr.net/npm/@timum/booking@0.7.4/build/timum-booking.js';
585
+ import * as timum from 'https://cdn.jsdelivr.net/npm/@timum/booking@0.8.0/build/timum-booking.js';
574
586
 
575
587
  timum.init(
576
588
  {
@@ -1,4 +1,4 @@
1
- import { r as b, s as f, u as m, v as F, w as d, _ as C, x as l, y as n, z as T, A as v, C as x } from "./index-e0658644.js";
1
+ import { r as b, s as f, u as m, v as F, w as d, _ as C, x as l, y as n, z as T, A as v, C as x } from "./index-553c5952.js";
2
2
  function y(o) {
3
3
  return b("MuiTableFooter", o);
4
4
  }
@@ -1,4 +1,4 @@
1
- import { c as e, e as a, d as l } from "./index-e0658644.js";
1
+ import { c as e, e as a, d as l } from "./index-553c5952.js";
2
2
  export {
3
3
  e as default,
4
4
  a as getListItemTextUtilityClass,
@@ -1,4 +1,4 @@
1
- import { o as e, q as s, p as t } from "./index-e0658644.js";
1
+ import { o as e, q as s, p as t } from "./index-553c5952.js";
2
2
  export {
3
3
  e as default,
4
4
  s as getTableCellUtilityClass,
@@ -1,4 +1,4 @@
1
- import { L as l, a as t, l as e } from "./index-e0658644.js";
1
+ import { L as l, a as t, l as e } from "./index-553c5952.js";
2
2
  export {
3
3
  l as default,
4
4
  t as getLinkUtilityClass,