Skip to content

Commit

Permalink
[update] pages renamed to appropr format
Browse files Browse the repository at this point in the history
  • Loading branch information
tbshag2 committed Aug 15, 2024
1 parent 5034af5 commit ab0f10a
Show file tree
Hide file tree
Showing 29 changed files with 158 additions and 53 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ If several slots objects are created for the same day, make sure that slots time
- `availableSlots` - (optional) an array of timestamps of available slots in milliseconds; if available slots are specified here, all slots from the `slots` array are ignored (i.e., become unavailable); each object in the array has the next parameters:
- `id` - (required) the id of a slot
- `time` - (required) duration in minutes
- `usedSlots` - (optional) an array of timestamps of booked slots in milliseconds;
- `usedSlots` - (optional) an array of timestamps of booked slots in milliseconds;
- `slotSize` - (optional) the duration of a slot in minutes; the value will be applied to all slots of this card if other value is not set inside the `slots` object
- `slotGap` - (optional) the gap between slots in minutes; the value will be applied to all slots of this card if any other value is not specified inside the `slots` object

### Example

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,30 @@ description: You can learn about the filterShape config in the documentation of

### Description

@short: Required?. An object of settings for managing the filter functionality
@short: Optional. An object of settings for managing the filter functionality

### Usage

~~~jsx {}
filterShape:{
text?: boolean | [{
id:string;
suggest?:string;
text?: boolean | [{
id:string,
suggest?:string,
}],
date?: boolean;
time?: boolean | {
from: number | string;
to: number | string;
label: string;
date?: boolean,
time?: boolean | {
from: number | string,
to: number | string,
label: string,
};
};
~~~

### Parameters

- `text` - (optional)
- `text` - (optional) TBD
- `id` - (required)
- `suggest` - (required)
- `suggest` - (required) TBD
- `date` - (optional) shows/hides the date field
- `time` - (optional) shows/hides the time field. If set to **true**, it takes an array of objects with time options for a slot. For each object you can specify the following parameters:
- `from` - (optional) a start time
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ api.exec(
### Events

:::info
The full list of the Booking internal events can be found [**here**](api/api_overview.md/#booking-events)
The full list of the Booking internal events can be found [**here**](api/booking-api-overview.md/#booking-events)
:::

### Example
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
63 changes: 63 additions & 0 deletions docs/api/overview/booking-api-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
sidebar_label: API overview
title: API Overview
description: You can have an API overview of JavaScript Booking in the documentation of the DHTMLX JavaScript Booking library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Booking.
---

# API overview

## Booking constructor

~~~jsx {}
new booking.Booking("#root", {
// initial configuration parameters
});
~~~

**Parameters**:

- an HTML container (the ID of the HTML container)
- an object of the configuration parameters ([check here](#booking-properties))

## Booking methods

| Name | Description |
| -------------------------------------------------- | --------------------------------------------------------- |
| [](../methods/booking_methodname_method.md) | @getshort(../methods/booking-methodname_method.md) |

## Booking internal API

### Event Bus methods

| Name | Description |
| ---------------------------------------- | ----------------------------------------------- |
| [](../internal/booking-exec.md) | @getshort(../internal/booking-exec.md) |
| [](../internal/booking-intercept.md) | @getshort(../internal/booking-intercept.md) |
| [](../internal/booking-on.md) | @getshort(../internal/booking-on.md) |
| [](../internal/booking-setnext.md) | @getshort(../internal/booking-setnext.md) |

### State methods

| Name | Description |
| ----------------------------------------------- | ------------------------------------------------------ |
| [](../internal/booking-getreactivestate.md) | @getshort(../internal/booking-getreactivestate.md) |
| [](../internal/booking-getstate.md) | @getshort(../internal/booking-getstate.md) |

## Booking events

| Name | Description |
| ----------------------------------------- | ------------------------------------------------ |
| [](../events/booking-confirmslot-event.md) | @getshort(../events/booking-confirmslot-event.md) |
| [](../events/booking-selectslot-event.md) | @getshort(../events/booking-selectslot-event.md) |
| [](../events/booking-setfilter-event.md) | @getshort(../events/booking-setfilter-event.md) |

## Booking properties

| Name | Description |
| ----------------------------------------- | ------------------------------------------------ |
| [](../config/booking-data.md) | @getshort(../config/booking-data.md) |
| [](../config/booking-cardshape.md) | @getshort(../config/booking-cardshape.md) |
| [](../config/booking-filteredcards.md)| @getshort(../config/booking-filteredcards.md)|
| [](../config/booking-filtershape.md) | @getshort(../config/booking-filtershape.md) |
| [](../config/booking-formshape.md) | @getshort(../config/booking-formshape.md) |
| [](../config/booking-infoshape.md) | @getshort(../config/booking-infoshape.md) |
16 changes: 16 additions & 0 deletions docs/api/overview/booking-events-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
sidebar_label: API overview
title: API Overview
description: You can have an API overview of JavaScript Booking in the documentation of the DHTMLX JavaScript Booking library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Booking.
---

# Events overview


| Name | Description |
| ----------------------------------------- | ------------------------------------------------ |
| [](api/events/booking-confirmslot-event.md) | @getshort(api/events/booking-confirmslot-event.md) |
| [](api/events/booking-selectslot-event.md) | @getshort(api/events/booking-selectslot-event.md) |
| [](api/events/booking-setfilter-event.md) | @getshort(api/events/booking-setfilter-event.md) |


Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ new booking.Booking("#root", {

| Name | Description |
| ----------------------------------------- | ------------------------------------------------ |
| [](api/events/js_booking_confirmslot.md) | @getshort(api/events/js_booking_confirmslot.md) |
| [](api/events/js_booking_selectslot.md) | @getshort(api/events/js_booking_selectslot.md) |
| [](api/events/js_booking_setfilter.md) | @getshort(api/events/js_booking_setfilter.md) |
| [](api/events/js_booking_confirmslot_event.md) | @getshort(api/events/js_booking_confirmslot_event.md) |
| [](api/events/js_booking_selectslot_event.md) | @getshort(api/events/js_booking_selectslot_event.md) |
| [](api/events/js_booking_setfilter_event.md) | @getshort(api/events/js_booking_setfilter_event.md) |

## Booking properties

| Name | Description |
| ----------------------------------------- | ------------------------------------------------ |
| [](api/config/js_booking_cards.md) | @getshort(api/config/js_booking_cards.md) |
| [](api/config/js_booking_data.md) | @getshort(api/config/js_booking_data.md) |
| [](api/config/js_booking_cardshape.md) | @getshort(api/config/js_booking_cardshape.md) |
| [](api/config/js_booking_filteredcards.md)| @getshort(api/config/js_booking_filteredcards.md)|
| [](api/config/js_booking_filtershape.md) | @getshort(api/config/js_booking_filtershape.md) |
Expand Down
13 changes: 13 additions & 0 deletions docs/api/overview/booking-interval-state-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
sidebar_label: State methods overview
title: State Methods Overview
description: You can have an API overview of JavaScript Booking in the documentation of the DHTMLX JavaScript Booking library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Booking.
---

# State methods overview

| Name | Description |
| ----------------------------------------------- | ------------------------------------------------------ |
| [](api/internal/booking-getreactivestate.md) | @getshort(api/internal/booking-getreactivestate.md) |
| [](api/internal/booking-getstate.md) | @getshort(api/internal/booking-getstate.md) |

16 changes: 16 additions & 0 deletions docs/api/overview/booking-properties-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
sidebar_label: Properties overview
title: Properties Overview
description: You can have an API overview of JavaScript Booking in the documentation of the DHTMLX JavaScript Booking library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Booking.
---

# Properties overview

| Name | Description |
| ----------------------------------------- | ------------------------------------------------ |
| [](api/config/booking-data.md) | @getshort(api/config/booking-data.md) |
| [](api/config/booking-cardshape.md) | @getshort(api/config/booking-cardshape.md) |
| [](api/config/booking-filteredcards.md)| @getshort(api/config/booking-filteredcards.md)|
| [](api/config/booking-filtershape.md) | @getshort(api/config/booking-filtershape.md) |
| [](api/config/booking-formshape.md) | @getshort(api/config/booking-formshape.md) |
| [](api/config/booking-infoshape.md) | @getshort(api/config/booking-infoshape.md) |
10 changes: 5 additions & 5 deletions docs/guides/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: You can learn about the configuration in the documentation of the D

## Adding cards

To add a card with data, you should add an object to the [`data`](/api/config/js_booking_data) array. Using `data` parameters you are enabled to add plenty of information to a card, such as its name, category, rating information, slots for booking (both available and used slots), and more. Please, refer to [`data`](/api/config/js_booking_data) for the description of parameters.
To add a card with data, you should add an object to the [`data`](/api/config/booking-data) array. Using `data` parameters you are enabled to add plenty of information to a card, such as its name, category, rating information, slots for booking (both available and used slots), and more. Please, refer to [`data`](/api/config/booking-data) for the description of parameters.

~~~jsx
const data = [
Expand Down Expand Up @@ -39,7 +39,7 @@ new booking.Booking("#root", {

A slot is a time unit available for booking. Available slots are displayed for the next five days starting from the current day or from the start date from the filter.

To add booking slots to a card, use the `slots` parameter of the [`data`](/api/config/js_booking_data) property. You can apply one common slots rule to all days of the required card and specific rules to selected days or even dates.
To add booking slots to a card, use the `slots` parameter of the [`data`](/api/config/booking-data) property. You can apply one common slots rule to all days of the required card and specific rules to selected days or even dates.

For example, if you want to add booking slots with the same parameters to all days of the selected card, i.e., add slots with the same duration, the same start and end time to all days of the selected card, you should add one object to the `slots` array with the required parameters.

Expand Down Expand Up @@ -142,7 +142,7 @@ In case you have common slots parameters and specific parameters for some days,

## Marking slots as used or available

To mark slots as used (booked) and make them not visible for a user, use the `usedSlots` parameter of the [`data`](/api/config/js_booking_data) property.
To mark slots as used (booked) and make them not visible for a user, use the `usedSlots` parameter of the [`data`](/api/config/booking-data) property.

Example:

Expand Down Expand Up @@ -222,7 +222,7 @@ new booking.Booking("#root", {

## Defining the structure of cards

You can configure what information all cards will display on their left side using the [`cardShape`](/api/config/js_booking_cardshape) property.
You can configure what information all cards will display on their left side using the [`cardShape`](/api/config/booking-cardshape) property.

On the left side of a card the following information items are displayed by default:
- preview: card image
Expand All @@ -233,7 +233,7 @@ On the left side of a card the following information items are displayed by defa
- price: the price of the service
- details: other details of a card

To hide any information block from cards' display, set the appropriate parameter value of the [`cardShape`](/api/config/js_booking_cardshape) property to **false**.
To hide any information block from cards' display, set the appropriate parameter value of the [`cardShape`](/api/config/booking-cardshape) property to **false**.

Example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: You can learn how to load data into Booking in the documentation of

The following information can be loaded into Booking:

- [`data`](/api/properties/sv_booking_data) - an array of objects containing cards data
- [`data`](/api/properties/booking-data) - an array of objects containing cards data

You can prepare data in a separate file. Here is an example of an appropriate data set:

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
55 changes: 25 additions & 30 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
},
{
type: "doc",
id: "how_to_start"
id: "how-to-start"
},
{
type: "doc",
Expand All @@ -17,9 +17,13 @@ module.exports = {
label: "API",
collapsible: true,
collapsed: false,
link: {
type: "doc",
id: "api/overview/booking-api-overview"
},
items: [
"api/api_overview",
// Booking methods


{
type: "category",
label: "Booking methods",
Expand All @@ -43,10 +47,10 @@ module.exports = {
collapsed: true,
items: [
//"api/internal/booking_innermethodname_method",
"api/internal/js_booking_exec",
"api/internal/js_booking_intercept",
"api/internal/js_booking_on",
"api/internal/js_booking_setnext",
"api/internal/booking-exec",
"api/internal/booking-intercept",
"api/internal/booking-on",
"api/internal/booking-setnext",
]
},
{
Expand All @@ -56,19 +60,10 @@ module.exports = {
collapsed: true,
items: [
// "api/internal/booking_innermethodname_method",
"api/internal/js_booking_getreactivestate",
"api/internal/js_booking_getstate",
"api/internal/booking-getreactivestate",
"api/internal/booking-getstate",
]
},
{
type: "category",
label: "REST methods",
collapsible: true,
collapsed: true,
items: [
"api/internal/booking_innermethodname_method",
]
}
]
},
{
Expand All @@ -79,9 +74,9 @@ module.exports = {
items: [
// Booking events
//"api/events/booking_eventname_event",
"api/events/js_booking_confirmslot_event",
"api/events/js_booking_selectslot_event",
"api/events/js_booking_setfilter_event",
"api/events/booking-confirmslot-event",
"api/events/booking-selectslot-event",
"api/events/booking-setfilter-event",
]
},
{
Expand All @@ -92,12 +87,12 @@ module.exports = {
items: [
// Booking properties
// "api/config/booking_configname_config", // To delete before release!
"api/config/js_booking_data",
"api/config/js_booking_cardshape",
"api/config/js_booking_filteredcards",
"api/config/js_booking_filtershape",
"api/config/js_booking_formshape",
"api/config/js_booking_infoshape",
"api/config/booking-data",
"api/config/booking-cardshape",
"api/config/booking-filteredcards",
"api/config/booking-filtershape",
"api/config/booking-formshape",
"api/config/booking-infoshape",
]
}
]
Expand All @@ -112,9 +107,9 @@ module.exports = {
"guides/configuration",
"guides/customization",
"guides/localization",
"guides/loading_data",
"guides/working_with_server",
"guides/working_with_hotkeys",
"guides/loading-data",
"guides/working-with-server",
"guides/working-with-hotkeys",
],
},
]
Expand Down

0 comments on commit ab0f10a

Please sign in to comment.