diff --git a/.gitattributes b/.gitattributes index 101e72b..0899b91 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ * text eol=crlf -*.png binary +*.png binary \ No newline at end of file diff --git a/README.md b/README.md index 820fc5a..9b674ed 100644 --- a/README.md +++ b/README.md @@ -1,67 +1,40 @@ -## ---Template info--- - ----This section contains general information about the repository template and is to be deleted before submitting a pull request with the final documentation.--- - ----Lines enclosed by three dashes (like this one) are placeholders and comments to be replaced with specific information or deleted completely.--- - -### ---Library naming conventions--- - ----Repository name – use "xperience-by-kentico-\" for projects aimed for Xperience by Kentico and "xperience-\" for projects aimed for Kentico Xperience 13--- - ----Package Name – use "Xperience by Kentico: \" for projects aimed for Xperience by Kentico and "Xperience: \" for projects aimed for Kentico Xperience 13--- - -# ---Package Name--- - ----Select the correct badge for the support policy and update the GitHub Action pipeline badge to point to this repository (replace `repo-template`)--- - -[![7-day bug-fix policy](https://img.shields.io/badge/-7--days_bug--fixing_policy-grey?labelColor=orange&logo=data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3ZnLWljb24iIHN0eWxlPSJ3aWR0aDogMWVtOyBoZWlnaHQ6IDFlbTt2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO2ZpbGw6IGN1cnJlbnRDb2xvcjtvdmVyZmxvdzogaGlkZGVuOyIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04ODguNDkgMjIyLjY4NnYtMzEuNTRsLTY1LjY3Mi0wLjk1NWgtMC4yMDVhNDY1LjcxNSA0NjUuNzE1IDAgMCAxLTE0NC4zMTUtMzEuMzM0Yy03Ny4wMDUtMzEuMTk4LTEyNi4yOTQtNjYuNzY1LTEyNi43MDMtNjcuMTA3bC0zOS44LTI4LjY3Mi0zOS4xODUgMjguNDY4Yy0yLjA0OCAxLjUwMS00OS45MDMgMzYuMDQ0L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03NC42MTV2LTAuMDY5eiIgIC8+PHBhdGggZD0iTTcxMy4zMTggMzY4LjY0YTMyLjIyMiAzMi4yMjIgMCAwIDAtNDUuMzI5IDBMNDQ5LjE5NSA1ODcuNDM1bC05My4xODQtOTMuMTE2YTMyLjIyMiAzMi4yMjIgMCAwIDAtNDUuMzMgMCAzMi4yMjIgMzIuMjIyIDAgMCAwIDAgNDUuMjZsMTE1Ljg1IDExNS44NWEzMi4yOSAzMi4yOSAwIDAgMCA0NS4zMjggMEw3MTMuMzIgNDEzLjlhMzIuMjIyIDMyLjIyMiAwIDAgMCAwLTQ1LjMzeiIgIC8+PC9zdmc+)](https://github.com/Kentico/.github/blob/main/SUPPORT.md#full-support) [![Kentico Labs](https://img.shields.io/badge/Kentico_Labs-grey?labelColor=orange&logo=data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3ZnLWljb24iIHN0eWxlPSJ3aWR0aDogMWVtOyBoZWlnaHQ6IDFlbTt2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO2ZpbGw6IGN1cnJlbnRDb2xvcjtvdmVyZmxvdzogaGlkZGVuOyIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NTYuMjg4IDgwNC40OEw2NDAgMjc3LjQ0VjY0aDMyYzE3LjYgMCAzMi0xNC40IDMyLTMycy0xNC40LTMyLTMyLTMyaC0zMjBjLTE3LjYgMC0zMiAxNC40LTMyIDMyczE0LjQgMzIgMzIgMzJIMzg0djIxMy40NEw2Ny43MTIgODA0LjQ4Qy00LjczNiA5MjUuMTg0IDUxLjIgMTAyNCAxOTIgMTAyNGg2NDBjMTQwLjggMCAxOTYuNzM2LTk4Ljc1MiAxMjQuMjg4LTIxOS41MnpNMjQxLjAyNCA2NDBMNDQ4IDI5NS4wNFY2NGgxMjh2MjMxLjA0TDc4Mi45NzYgNjQwSDI0MS4wMjR6IiAgLz48L3N2Zz4=)](https://github.com/Kentico/.github/blob/main/SUPPORT.md#labs-limited-support) [![CI: Build and Test](https://github.com/Kentico/repo-template/actions/workflows/ci.yml/badge.svg)](https://github.com/Kentico/repo-template/actions/workflows/ci.yml) +# Kentico Xperience 13 Calendar Form Component ## Description ----A short description of the functionality – what scenarios are fulfilled by the Intergration / App / Solution. Include screenshots displaying the functionality.--- - ----Also list any limitations of the functionality that may result in unexpected behavior for the end user. These can be caused, e.g., by scope cuts or unexpected issues during implementation.--- +Calendar form component integration enabling to add a calendar form component. This integration allows you to select a date, date and time, range of days, or multiple days. It also provides a simple programmatic exclusion of the excluded date and time values. -## Requirements - -### Library Version Matrix - ----This matrix explains which versions of the library are compatible with different versions of Xperience by Kentico / Kentico Xperience 13--- +## Library Version Matrix | Xperience Version | Library Version | | ----------------- | --------------- | -| >= 28.1.0 | 1.0.0 | +| >= 13.0.152 | 1.0.0 | ### Dependencies ----These are all the dependencies required to use (not build) the library--- - -- [ASP.NET Core 8.0](https://dotnet.microsoft.com/en-us/download) -- [Xperience by Kentico](https://docs.kentico.com) - -### Other requirements - ----A list of other requirements and prerequisites needed to use the library. If there are none, don't include this section in the readme.--- +- [ASP.NET Core 6.0](https://dotnet.microsoft.com/en-us/download) +- [Kentico Xperience 13](https://docs.kentico.com/changelog) +- [Flatpickr v4](https://flatpickr.js.org/) ## Package Installation ----This details the steps required to add the library to a solution. This could include multiple packages (NuGet and/or npm)--- - -Add the package to your application using the .NET CLI +Add the package to your application using the .NET CLI. ```powershell -dotnet add package +dotnet add package Kentico.Xperience.CalendarComponent ``` ## Quick Start ----Minimal steps to get started with the library. Support the steps with helpful screenshots.--- - ----You can completely omit this section if the setup is complicated and cannot be realistically condensed into a few steps. Instead, describe everything in detail in *Usage-Guide.md*.--- +1. In the administration, head to Forms and create or edit a form. +2. In the Form builder, add a new form component and select Calendar or Multi-Calendar. +3. Configure the Properties of your selected calendar form component. +4. View the [Single Value Calendar Guide](./docs/Single-Value-Calendar-Component.md) or the [Multi-Value Calendar Guide](./docs/Multi-Value-Calendar-Component.md) for more information about each component's properties. +5. Optionally, create and add a dynamic calendar data provider. View more about the provider in the [Dynamic Data Provider](./docs/Dynamic-Calendar-Data-Provider.md). ## Full Instructions ----Add the full instructions, guidance, and tips to the *Usage-Guide.md* file--- +View how to configure the [Single Value Calendar](./docs/Single-Value-Calendar-Component.md) or the [Multi-Value Calendar](./docs/Multi-Value-Calendar-Component.md). View the [Usage Guide](./docs/Usage-Guide.md) for more detailed instructions. @@ -77,12 +50,8 @@ Distributed under the MIT License. See [`LICENSE.md`](./LICENSE.md) for more inf ## Support ----Select the correct badge for the support policy--- - [![7-day bug-fix policy](https://img.shields.io/badge/-7--days_bug--fixing_policy-grey?labelColor=orange&logo=data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3ZnLWljb24iIHN0eWxlPSJ3aWR0aDogMWVtOyBoZWlnaHQ6IDFlbTt2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO2ZpbGw6IGN1cnJlbnRDb2xvcjtvdmVyZmxvdzogaGlkZGVuOyIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04ODguNDkgMjIyLjY4NnYtMzEuNTRsLTY1LjY3Mi0wLjk1NWgtMC4yMDVhNDY1LjcxNSA0NjUuNzE1IDAgMCAxLTE0NC4zMTUtMzEuMzM0Yy03Ny4wMDUtMzEuMTk4LTEyNi4yOTQtNjYuNzY1LTEyNi43MDMtNjcuMTA3bC0zOS44LTI4LjY3Mi0zOS4xODUgMjguNDY4Yy0yLjA0OCAxLjUwMS00OS45MDMgMzYuMDQ0LTEyNi45MDggNjcuMzFhNDQ3LjQyIDQ0Ny40MiAwIDAgMS0xNDQuNTIgMzEuMzM1bC02NS44NzcgMC45NTZ2Mzc4Ljg4YzAgODcuMDQgNDkuODM0IDE4N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1bC05My4xODQtOTMuMTE2YTMyLjIyMiAzMi4yMjIgMCAwIDAtNDUuMzMgMCAzMi4yMjIgMzIuMjIyIDAgMCAwIDAgNDUuMjZsMTE1Ljg1IDExNS44NWEzMi4yOSAzMi4yOSAwIDAgMCA0NS4zMjggMEw3MTMuMzIgNDEzLjlhMzIuMjIyIDMyLjIyMiAwIDAgMCAwLTQ1LjMzeiIgIC8+PC9zdmc+)](https://github.com/Kentico/.github/blob/main/SUPPORT.md#full-support) [![Kentico Labs](https://img.shields.io/badge/Kentico_Labs-grey?labelColor=orange&logo=data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3ZnLWljb24iIHN0eWxlPSJ3aWR0aDogMWVtOyBoZWlnaHQ6IDFlbTt2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO2ZpbGw6IGN1cnJlbnRDb2xvcjtvdmVyZmxvdzogaGlkZGVuOyIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NTYuMjg4IDgwNC40OEw2NDAgMjc3LjQ0VjY0aDMyYzE3LjYgMCAzMi0xNC40IDMyLTMycy0xNC40LTMyLTMyLTMyaC0zMjBjLTE3LjYgMC0zMiAxNC40LTMyIDMyczE0LjQgMzIgMzIgMzJIMzg0djIxMy40NEw2Ny43MTIgODA0LjQ4Qy00LjczNiA5MjUuMTg0IDUxLjIgMTAyNCAxOTIgMTAyNGg2NDBjMTQwLjggMCAxOTYuNzM2LTk4Ljc1MiAxMjQuMjg4LTIxOS41MnpNMjQxLjAyNCA2NDBMNDQ4IDI5NS4wNFY2NGgxMjh2MjMxLjA0TDc4Mi45NzYgNjQwSDI0MS4wMjR6IiAgLz48L3N2Zz4=)](https://github.com/Kentico/.github/blob/main/SUPPORT.md#labs-limited-support) ----Select the correct name for the support policy--- - This project has **Full support by 7-day bug-fix policy** / **Kentico Labs limited support**. See [`SUPPORT.md`](https://github.com/Kentico/.github/blob/main/SUPPORT.md#full-support) for more information. diff --git a/docs/Contributing-Setup.md b/docs/Contributing-Setup.md new file mode 100644 index 0000000..1247671 --- /dev/null +++ b/docs/Contributing-Setup.md @@ -0,0 +1,52 @@ +# Contributing Setup + +## Required Software + +The requirements to setup, develop, and build this project are listed below. + +### .NET Runtime + +.NET SDK 7.0 or newer + +- +- See `global.json` file for specific SDK requirements. + +### Node.js Runtime + +- [Node.js](https://nodejs.org/en/download) 20.11.0 or newer. +- [NVM for Windows](https://github.com/coreybutler/nvm-windows) to manage multiple installed versions of Node.js. +- See `engines` in the solution `package.json` for specific version requirements. + +## Development environment setup + +1. Download/clone this repository. +2. Run `npm run build` in the `/src/Kentico.Xperience.CalendarComponent/Client/`. +3. Create an instance of [Kentico Xperience 13 administration](https://docs.kentico.com/13/installation/installing-xperience). +4. [Create a database](https://docs.kentico.com/13/installation/additional-database-installation). +5. Start the DancingGoatCore site. +6. Open `WebApp.sln` of your administration project. +7. Start the *CMSApp* project in IIS Express. +8. Go to the *Forms* application. +9. Edit a form. +10. Open Form builder and add the Calendar form component. +11. Configure the properties of the component. + +## Development Workflow + +1. Create a new branch with one of the following prefixes. + + - `feat/` - for new functionality. + - `refactor/` - for restructuring of existing features. + - `fix/` - for bugfixes. + +2. Run `dotnet format` against the `Kentico.Xperience.RepoTemplate` solution. + + > use `dotnet: format` VS Code task. + +3. Commit changes, with a commit message preferably following the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) convention. + +4. Once ready, create a PR on GitHub. The PR will need to have all comments resolved and all tests passing before it will be merged. + + - The PR should have a helpful description of the scope of changes being contributed. + - Include screenshots or video to reflect UX or UI updates. + - Indicate if new settings need to be applied when the changes are merged - locally or in other environments. diff --git a/docs/Multi-Value-Calendar-Component.md b/docs/Multi-Value-Calendar-Component.md new file mode 100644 index 0000000..cf4628d --- /dev/null +++ b/docs/Multi-Value-Calendar-Component.md @@ -0,0 +1,10 @@ +# Configure a multi-value Calendar form component + +![Component](../images/calendar-component-multi-value.png) + +The following properties are configurable in the Kentico Form builder: +1. Is Multi-Date Selection - Configures the calendar component to allow for range selection or multiple dates. + +2. Date Format - Configures the displayed date format. + +3. Excluded Date Time Data Provider - Here you can select the [Calendar dynamic data provider](./Dynamic-Calendar-Data-Provider.md). Note that setting the minimal/maximal time values in the provider is not relevant when using the multi-value calendar component. \ No newline at end of file diff --git a/docs/Single-Value-Calendar-Component.md b/docs/Single-Value-Calendar-Component.md new file mode 100644 index 0000000..c5f2d0f --- /dev/null +++ b/docs/Single-Value-Calendar-Component.md @@ -0,0 +1,22 @@ +# Configure a single value Calendar form component + +![Component](../images/calendar-component-single-value.png) + +The following properties are configurable in the Kentico Form builder: + +![Form builder UI calendar form component configuration](../images/calendar-component-form-builder.png) + +1. Show Date Only - Configures the calendar component to use date or date and time format. + +2. Time Frame - Sets the number of minutes of each time interval selectable via the time setting arrows. + +3. Display in 24-Hour format - Configures whether time should be displayed in the 24-hour format or the 12-hour format with AM/PM. + +4. Date Format - Configures the displayed date format. + +5. Display time in client's time zone - Configures whether the value should be automatically shown in the client's time zone. If true, +offset is added to the selected time according to user's time zone. +Time is always saved in the server's time zone. +Only Date Time uses the offset. Date only does not convert the time. + +6. Excluded Date Time Data Provider - Here you can select the [Calendar dynamic data provider](./Dynamic-Calendar-Data-Provider.md). \ No newline at end of file diff --git a/docs/Usage-Guide.md b/docs/Usage-Guide.md new file mode 100644 index 0000000..d2f942f --- /dev/null +++ b/docs/Usage-Guide.md @@ -0,0 +1,17 @@ +# Usage Guide + +This library supports using a calendar component in Kentico Xperience 13 administration form builder. + +Below are the steps to integrate the library into your solution. + +## Single value calendar component + +See [Single value calendar component](Single-Value-Calendar-Component.md) to use the calendar as a single value configurable Date Time picker. + +## Multi-value calendar component + +See [Multi-value calendar component](Multi-Value-Calendar-Component.md) to use the calendar as a date picker of multiple values or range of dates. + +## Dynamic calendar data provider + +See [Dynamic calendar data provider](Dynamic-Calendar-Data-Provider.md) to set restrictions for allowed values. \ No newline at end of file diff --git a/images/calendar-component-form-builder.png b/images/calendar-component-form-builder.png new file mode 100644 index 0000000..ac67be4 Binary files /dev/null and b/images/calendar-component-form-builder.png differ diff --git a/images/calendar-component-multi-value.png b/images/calendar-component-multi-value.png new file mode 100644 index 0000000..70a1b42 Binary files /dev/null and b/images/calendar-component-multi-value.png differ diff --git a/images/calendar-component-single-value.png b/images/calendar-component-single-value.png new file mode 100644 index 0000000..25ada02 Binary files /dev/null and b/images/calendar-component-single-value.png differ diff --git a/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/Configurators/MultiCalendarDefaultValueConfigurator.cs b/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/Configurators/MultiCalendarDefaultValueConfigurator.cs index 886ad7d..02621b7 100644 --- a/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/Configurators/MultiCalendarDefaultValueConfigurator.cs +++ b/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/Configurators/MultiCalendarDefaultValueConfigurator.cs @@ -8,12 +8,12 @@ public override void Configure(MultiCalendarFormComponent formComponent, IFormFi { formFieldValueProvider.TryGet(nameof(MultiCalendarFormComponentProperties.DateFormat), out string dateTimeFormat); formFieldValueProvider.TryGet(nameof(MultiCalendarFormComponentProperties.ExcludedDateTimeDataProvider), out string dateTimeDataProvider); - formFieldValueProvider.TryGet(nameof(MultiCalendarFormComponentProperties.IsMulti), out bool isMulti); + formFieldValueProvider.TryGet(nameof(MultiCalendarFormComponentProperties.IsMultiDate), out bool isMulti); formFieldValueProvider.TryGet(nameof(MultiCalendarFormComponentProperties.DefaultValue), out string defaultValue); formComponent.Properties.DateFormat = dateTimeFormat; formComponent.Properties.DefaultValue = defaultValue; - formComponent.Properties.IsMulti = isMulti; + formComponent.Properties.IsMultiDate = isMulti; formComponent.Properties.ExcludedDateTimeDataProvider = dateTimeDataProvider; } } diff --git a/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/MultiCalendarFormComponent.cs b/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/MultiCalendarFormComponent.cs index 0fa3ddd..8739ad7 100644 --- a/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/MultiCalendarFormComponent.cs +++ b/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/MultiCalendarFormComponent.cs @@ -6,7 +6,7 @@ [assembly: RegisterFormComponent( identifier: MultiCalendarFormComponent.IDENTIFIER, formComponentType: typeof(MultiCalendarFormComponent), - name: "Multi Calendar", + name: "Multi-Value Calendar", Description = "Pick date range from calendar", IconClass = "icon-calendar", ViewName = "~/Components/MultiCalendarFormComponent/_MultiCalendarFormComponent.cshtml")] diff --git a/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/MultiCalendarFormComponentProperties.cs b/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/MultiCalendarFormComponentProperties.cs index 0c5f08a..d9355aa 100644 --- a/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/MultiCalendarFormComponentProperties.cs +++ b/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/MultiCalendarFormComponentProperties.cs @@ -25,11 +25,11 @@ public MultiCalendarFormComponentProperties() : base(FieldDataType.Text, size: 2 /// Configures whether the component should set multiple dates or a range of dates. /// [EditingComponent(CheckBoxComponent.IDENTIFIER, - Label = "Is multi date selection", + Label = "Is Multi-Date Selection", DefaultValue = false, - ExplanationText = "Check for multi value selection. Uncheck for Range selection.", + ExplanationText = "Check for multi-value selection. Uncheck for Range selection.", Order = 1)] - public bool IsMulti { get; set; } + public bool IsMultiDate { get; set; } /// /// Configures displayed date format. diff --git a/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/_MultiCalendarFormComponent.cshtml b/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/_MultiCalendarFormComponent.cshtml index a88181e..1c8462e 100644 --- a/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/_MultiCalendarFormComponent.cshtml +++ b/src/Kentico.Xperience.CalendarComponent/Components/MultiCalendarFormComponent/_MultiCalendarFormComponent.cshtml @@ -13,7 +13,7 @@ if (!string.IsNullOrEmpty(Model.SelectedValue)) { defaultDate = Model.SelectedValue.Split(';').ToList(); - if (!Model.Properties.IsMulti) + if (!Model.Properties.IsMultiDate) { defaultDate = defaultDate.Take(2).ToList(); } @@ -25,7 +25,7 @@ altInput = true, altFormat = Model.Properties.DateFormat.Replace('M', 'm'), defaultDate = defaultDate, - mode = Model.Properties.IsMulti ? "multiple" : "range" + mode = Model.Properties.IsMultiDate ? "multiple" : "range" }; var configuration = new