@servicetitan/docs-anvil-uikit-contrib 27.3.0 → 27.5.0
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.
|
@@ -9,7 +9,7 @@ When it isn't practical to [mock the API service classes](frontend/unit-testing#
|
|
|
9
9
|
```ts
|
|
10
10
|
describe('[admin] AppRoutes', () => {
|
|
11
11
|
// Create helper to mock API calls
|
|
12
|
-
const apiResponses = MockApiCalls();
|
|
12
|
+
const apiResponses = new MockApiCalls();
|
|
13
13
|
|
|
14
14
|
beforeEach(() => {
|
|
15
15
|
apiResponses.reset();
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Time Zones
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
TimePickerExtendedDemo,
|
|
7
|
+
TimeZoneSelectDemo,
|
|
8
|
+
TimePickerWithTimeZonesDemo
|
|
9
|
+
} from '@servicetitan/time-zones/dist/demo';
|
|
10
|
+
|
|
11
|
+
import { CodeDemo } from '@site/src/components/code-demo';
|
|
12
|
+
|
|
13
|
+
`@servicetitan/time-zones` contains a few UI components for dealing with time zones.
|
|
14
|
+
|
|
15
|
+
## Time Zone Select
|
|
16
|
+
|
|
17
|
+
AnvilSelect component with built-in customizable list of time zone options.
|
|
18
|
+
|
|
19
|
+
<CodeDemo example={TimeZoneSelectDemo} srcPath="time-zones/src/demo/time-zone-select.tsx" />
|
|
20
|
+
|
|
21
|
+
## Extended Time Picker
|
|
22
|
+
|
|
23
|
+
Standard Anvil TimePicker with added options for displaying the time zone that's provided via TimeZoneProvider, and customizing options content.
|
|
24
|
+
|
|
25
|
+
<CodeDemo example={TimePickerExtendedDemo} srcPath="time-zones/src/demo/time-picker-extended.tsx" />
|
|
26
|
+
|
|
27
|
+
## Time Picker With Time Zones
|
|
28
|
+
|
|
29
|
+
It is a version of extended time picker that can be used to show more context to users that have to perform business actions across multiple time zones.
|
|
30
|
+
|
|
31
|
+
In the example below, a user has to book a job for a customer. The user, the customer and the office might all be located in different time zones.
|
|
32
|
+
The job has to be booked in customer's time, but the user will see the it converted into other relevant time zones on the fly.
|
|
33
|
+
|
|
34
|
+
<CodeDemo example={TimePickerWithTimeZonesDemo} srcPath="time-zones/src/demo/time-picker-with-zones.tsx" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/docs-anvil-uikit-contrib",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.5.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"cli": {
|
|
17
17
|
"webpack": false
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "88d27ed8f8772c7ae7314b2d66076ff83598405c"
|
|
20
20
|
}
|