@leapdevuk/component-toolbox 0.0.126 → 0.0.128

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/dist/CHANGELOG.md CHANGED
@@ -1,11 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.128 (2025-07-16)
4
+
5
+ ### Documentation
6
+
7
+ - Developer documentation add to date and time based Utility functions
8
+
9
+ ## 0.0.127 (2025-07-16)
10
+
11
+ ### Features
12
+
13
+ - Utility function to format date as regional local time getFormattedLocalDateTime
14
+
3
15
  ## 0.0.126 (2025-07-09)
4
16
 
5
17
  ### Features
6
18
 
7
- - Utility function formatReportDate now accepts an undefined locale object for when creating state date objects when the locale is not yet available.
8
- Will return a console warn and an empty string
19
+ - Utility function formatReportDate now accepts an undefined locale object when creating state data objects when the locale is not yet available.
20
+ If not present, it will return a console warning and an empty string.
9
21
 
10
22
  ## 0.0.125 (2025-07-09)
11
23
 
@@ -19,45 +31,51 @@
19
31
 
20
32
  - Added utility function formatReportDate to regionally format dates for reporting
21
33
 
22
- ## 0.0.112 (2025-04-15)
34
+ ## 0.0.122 (2025-06-20)
23
35
 
24
- ### Release
36
+ ### Bug Fixes
25
37
 
26
- - Test verions release 0.0.111-test.5
38
+ - Updated size of the preview icon
27
39
 
28
- ## 0.0.111-test.5 (2025-04-15)
40
+ ## 0.0.121 (2025-04-15)
41
+
42
+ ### Release 0.0.121
43
+
44
+ - Release of Test verion 0.0.121-test.1
45
+
46
+ ## 0.0.120 (2025-05-30)
29
47
 
30
48
  ### Features
31
49
 
32
- - Added support for change log.
50
+ - Updated DateRangePicker to use sdk alerts for validation
33
51
 
34
- ### Bug Fixes
52
+ ## 0.0.120 (2025-05-29)
35
53
 
36
- - DateRangePicker: Split update property to fromDate and toDate (was initially a combined function)
37
- - DateRangePicker: Fixed dateTime when region is summer/winter time (checking against local dateTime)
38
- - DatePicker: Fixed dateTime when region is summer/winter time (checking against local dateTime)
54
+ ### Bug Fixes
39
55
 
40
- ## 0.0.113 (2025-05-14)
56
+ - Fixed issue with revert being called early on calendar selection
41
57
 
42
- ### Features
58
+ ## 0.0.119 (2025-05-29)
43
59
 
44
- - Added property on AccordionTable to support component props on grid (row: onMouseOver, onMouseLeave ect.)
60
+ ### Bug Fixes
45
61
 
46
- ## 0.0.114 (2025-05-21)
62
+ - Fixed Calendar reverting to the original year instead of the selected one
47
63
 
48
64
  ### Features
49
65
 
50
- - Added parameter on getLocalDisplayFormattedDateTime to specify if time should be adjusted on local time zone
66
+ - Updated DatePicker to use sdk alerts for validation
51
67
 
52
- ## 0.0.115 (2025-05-22)
68
+ ## 0.0.118 (2025-05-23)
53
69
 
54
- ### Removed
70
+ ### Bug Fixes
55
71
 
56
- - getLocalDisplayFormattedDateTime
72
+ - Updated DatePicker to not show calendar icon when disabled
73
+
74
+ ## 0.0.117 (2025-05-23)
57
75
 
58
76
  ### Added
59
77
 
60
- - lctFormatDateTime supporting 24 hours, UTC & DateOnly
78
+ - Added formatAsDBDate for use in apps (accepts Date, returns string formatted "yyyy-MM-dd")
61
79
 
62
80
  ## 0.0.116 (2025-05-22)
63
81
 
@@ -65,48 +83,42 @@
65
83
 
66
84
  - Added property on NumberDisplay 'noValueText' to work alongside 'hideNoValue' to display an alternative character on zero values
67
85
 
68
- ## 0.0.117 (2025-05-23)
86
+ ## 0.0.115 (2025-05-22)
69
87
 
70
- ### Added
88
+ ### Removed
71
89
 
72
- - Added formatAsDBDate for use in apps (accepts Date, returns string formatted "yyyy-MM-dd")
90
+ - getLocalDisplayFormattedDateTime
73
91
 
74
- ## 0.0.118 (2025-05-23)
92
+ ### Added
75
93
 
76
- ### Bug Fixes
94
+ - lctFormatDateTime supporting 24 hours, UTC & DateOnly
77
95
 
78
- - Updated DatePicker to not show calendar icon when disabled
96
+ ## 0.0.114 (2025-05-21)
79
97
 
80
- ## 0.0.119 (2025-05-29)
98
+ ### Features
81
99
 
82
- ### Bug Fixes
100
+ - Added parameter on getLocalDisplayFormattedDateTime to specify if time should be adjusted on local time zone
83
101
 
84
- - Fixed Calendar reverting to the original year instead of the selected one
102
+ ## 0.0.113 (2025-05-14)
85
103
 
86
104
  ### Features
87
105
 
88
- - Updated DatePicker to use sdk alerts for validation
106
+ - Added property on AccordionTable to support component props on grid (row: onMouseOver, onMouseLeave ect.)
89
107
 
90
- ## 0.0.120 (2025-05-29)
108
+ ## 0.0.112 (2025-04-15)
91
109
 
92
- ### Bug Fixes
110
+ ### Release
93
111
 
94
- - Fixed issue with revert being called early on calendar selection
112
+ - Test verions release 0.0.111-test.5
95
113
 
96
- ## 0.0.120 (2025-05-30)
114
+ ## 0.0.111-test.5 (2025-04-15)
97
115
 
98
116
  ### Features
99
117
 
100
- - Updated DateRangePicker to use sdk alerts for validation
101
-
102
- ## 0.0.121 (2025-04-15)
103
-
104
- ### Release 0.0.121
105
-
106
- - Release of Test verion 0.0.121-test.1
107
-
108
- ## 0.0.122 (2025-06-20)
118
+ - Added support for change log.
109
119
 
110
120
  ### Bug Fixes
111
121
 
112
- - Updated size of the preview icon
122
+ - DateRangePicker: Split update property to fromDate and toDate (was initially a combined function)
123
+ - DateRangePicker: Fixed dateTime when region is summer/winter time (checking against local dateTime)
124
+ - DatePicker: Fixed dateTime when region is summer/winter time (checking against local dateTime)
@@ -1,9 +1,10 @@
1
1
  export { default as LCTDatePicker } from './DatePicker';
2
+ export { dbDateOnlyFormat as lctDbDateOnlyFormat } from './utils';
3
+ export { formatAsDBDate as lctFormatAsDBDate } from './utils';
2
4
  export { formatDate as lctFormatDate } from './utils';
3
- export { lctFormatDateTime as lctFormatDateTime } from '../datepicker/utils';
5
+ export { formatDateTime as lctFormatDateTime } from './utils';
4
6
  export { formatReportDate as lctFormatReportDate } from './utils';
7
+ export { getFormattedLocalDateTime as lctGetFormattedLocalDateTime } from './utils';
5
8
  export { getLocale as lctGetLocale } from './utils';
6
9
  export { parseDate as lctParseDate } from './utils';
7
10
  export { utcFormat as lctUTCFormat } from './utils';
8
- export { dbDateOnlyFormat as lctDbDateOnlyFormat } from './utils';
9
- export { formatAsDBDate as lctFormatAsDBDate } from './utils';
@@ -1,31 +1,291 @@
1
1
  import { Api, LeapContext } from '@leapdev/leap-host';
2
2
  import { Locale } from 'date-fns';
3
+ /**
4
+ * This constant defines the date format used for database storage.
5
+ * It is used to ensure consistent date formatting across the application,
6
+ * especially when interacting with databases or APIs that require a specific date format.
7
+ */
8
+ export declare const dbDateOnlyFormat = "yyyy-MM-dd";
9
+ /**
10
+ * This constant defines the default date format used in the application.
11
+ * It is used for displaying dates in the user interface and for formatting dates in various components.
12
+ */
3
13
  export declare const defaultDateFormat = "dd/MM/yyyy";
14
+ /**
15
+ * This constant defines the default date and time format used in the application.
16
+ * It is used for displaying both date and time in the user interface and for formatting datetime values
17
+ */
4
18
  export declare const defaultDateTimeFormat = "yyyy-MM-dd HH:mm:ss";
19
+ /**
20
+ * This constant defines the minimum date that can be used in the application.
21
+ * It is set to January 1, 1900, and is used to ensure that date inputs do not go below this value.
22
+ * It is useful for setting a minimum date in date pickers or other date-related components.
23
+ */
5
24
  export declare const minDateAsObject: Date;
25
+ /**
26
+ * This constant defines the timezone used in the application.
27
+ * It is derived from the user's system settings and is used for formatting dates and times in the user's local timezone.
28
+ * It ensures that date and time values are displayed correctly based on the user's timezone.
29
+ */
6
30
  export declare const timezone: string;
31
+ /**
32
+ * This constant defines the UTC format used for date and time values in the application.
33
+ * It is used to ensure that date and time values are stored and displayed in a consistent UTC format.
34
+ */
7
35
  export declare const utcFormat = "yyyy-MM-dd HH:mm:ss";
8
- export declare const dbDateOnlyFormat = "yyyy-MM-dd";
36
+ /**
37
+ * This function returns the minimum date as a string formatted in the default date format.
38
+ * It is useful for setting a minimum date in date pickers or other date-related components.
39
+ * @returns (string): The minimum date formatted as a string in the default date format.
40
+ * @example
41
+ * ```typescript
42
+ * const minDate = getMinDate(); // Returns "01/01/1900"
43
+ * ```
44
+ */
9
45
  export declare const minDate: string;
46
+ /**
47
+ * This function returns a date that is one week from today, formatted as a string.
48
+ * It is useful for scenarios where you need to calculate a date one week in the future,
49
+ * such as setting deadlines or reminders.
50
+ * @returns (string): A formatted date string representing one week from today.
51
+ * It can be used in various contexts, such as displaying future dates in a user interface or calculating due dates.
52
+ * @example
53
+ * ```typescript
54
+ * const oneWeekFromToday = getOneWeekFromToday(); // Returns "dd/MM/yyyy" format of the date one week from today
55
+ * ```
56
+ */
10
57
  export declare const oneWeek: string;
58
+ /**
59
+ * This function returns today's date formatted as a string in the default date format.
60
+ * It is useful for displaying the current date in a user interface or for date calculations.
61
+ * @returns (string): Today's date formatted as a string in the default date format.
62
+ * It can be used in various contexts, such as displaying the current date in a user interface or calculating date differences.
63
+ * @example
64
+ * ```typescript
65
+ * const todayDate = getTodayDate(); // Returns "dd/MM/yyyy" format of today's date
66
+ * ```
67
+ */
11
68
  export declare const today: string;
69
+ /**
70
+ * This function returns a date that is one day from today, formatted as a string.
71
+ * It is useful for scenarios where you need to calculate a date one day in the future,
72
+ * such as setting deadlines or reminders.
73
+ * @returns (string): A formatted date string representing tomorrow's date.
74
+ * It can be used in various contexts, such as displaying future dates in a user interface or calculating due dates.
75
+ * @example
76
+ * ```typescript
77
+ * const tomorrowDate = getTomorrowDate(); // Returns "dd/MM/yyyy" format of the date tomorrow
78
+ * ```
79
+ */
12
80
  export declare const tomorrow: string;
81
+ /**
82
+ * This function returns a date that is two weeks from today, formatted as a string.
83
+ * It is useful for scenarios where you need to calculate a date two weeks in the future,
84
+ * such as setting deadlines or reminders.
85
+ * @returns (string): A formatted date string representing two weeks from today.
86
+ * It can be used in various contexts, such as displaying future dates in a user interface or calculating due dates.
87
+ * @example
88
+ * ```typescript
89
+ * const twoWeeksFromToday = getTwoWeeksFromToday(); // Returns "dd/MM/yyyy" format of the date two weeks from today
90
+ * ```
91
+ */
13
92
  export declare const twoWeeks: string;
93
+ /**
94
+ * This function returns the current date formatted as a string based on the provided format.
95
+ * @param formatString (optional) The format string to use for the date. Defaults to "dd/MM/yyyy".
96
+ * It is useful for getting the current date in a specific format, such as "dd/MM/yyyy" or "MM/dd/yyyy".
97
+ * If no format string is provided, it defaults to "dd/MM/yyyy".
98
+ * @returns (string): The current date formatted as a string.
99
+ * It can be used in various contexts, such as displaying the current date in a user interface or storing it in a database.
100
+ * @example
101
+ * ```typescript
102
+ * const formattedDate = defaultDate(); // Returns the current date in "dd/MM/yyyy" format
103
+ * const formattedDateUS = defaultDate("MM/dd/yyyy"); // Returns the current date in "MM/dd/yyyy" format
104
+ * ```
105
+ */
14
106
  export declare const defaultDate: (formatString?: string) => string;
107
+ /**
108
+ * This function formats a date based on the provided parameters.
109
+ * It can format the date to the start or end of the day, handle UTC dates,
110
+ * and format it as a date-only string.
111
+ * It is useful for displaying dates in a specific format,
112
+ * such as in a date picker or when saving dates to a database.
113
+ * @param date (Date | null | undefined): The date to format. If null or undefined, it returns null.
114
+ * @param startOfDate (boolean): If true, formats the date to the start of the day.
115
+ * @param endOfDate (boolean): If true, formats the date to the end of the day.
116
+ * @param isUTC (boolean): If true, formats the date in UTC format.
117
+ * @param dateOnly (boolean): If true, formats the date as a date-only string (e.g., "yyyy-MM-dd").
118
+ * This is useful for scenarios where you need to display or store only the date part without the time.
119
+ * It can be used in various contexts, such as displaying dates in a user interface or saving them to a database.
120
+ * @example
121
+ * ```typescript
122
+ * const formattedDate = formatDate(new Date(), true, false, false, true); // Formats the current date to the start of the day as a date-only string
123
+ * const formattedUTCDate = formatDate(new Date(), false, false, true); // Formats the current date in UTC format
124
+ * const formattedEndDate = formatDate(new Date(), false, true); // Formats the current date to the end of the day
125
+ * ```
126
+ * @returns (string | null): A formatted date string based on the provided parameters. If the input date is null or undefined, it returns null.
127
+ */
15
128
  export declare const formatDate: (date?: Date | null, startOfDate?: boolean, endOfDate?: boolean, isUTC?: boolean, dateOnly?: boolean) => string | null;
129
+ /**
130
+ * This function parses a date string into a Date object based on the provided format.
131
+ * It splits the date string into parts (day, month, year) and constructs a Date object.
132
+ * If the date string is invalid or cannot be parsed, it returns null.
133
+ * It also handles two-digit years by converting them to four-digit years.
134
+ * @param date (any): The date string to parse. It can be in various formats (e.g., "dd/MM/yyyy", "MM/dd/yyyy").
135
+ * @param formatString (string): The format string to use for parsing the date.
136
+ * @param localDateformat (string): The local date format to use for parsing. It should match the format of the input date string.
137
+ * @param parseKeyboardVal (boolean): Whether to parse the date from a keyboard input. Defaults to false.
138
+ * @returns (string | null): Returns a formatted date string if parsing is successful, or null if the input is invalid.
139
+ * This function is useful for converting user input or string representations of dates into a Date object.
140
+ * It can handle various date formats and ensures that the resulting Date object is valid.
141
+ * If the input date string is invalid or cannot be parsed, it returns null.
142
+ * It also includes logic to handle two-digit years by converting them to four-digit years.
143
+ * @example
144
+ * ```typescript
145
+ * const parsedDate = parseDate("25/12/2023", "dd/MM/yyyy", "dd/MM/yyyy");
146
+ * console.log(parsedDate); // Returns "2023-12-25" in the "yyyy-MM-dd" format
147
+ * const parsedDateUS = parseDate("12/25/23", "MM/dd/yyyy", "MM/dd/yyyy");
148
+ * console.log(parsedDateUS); // Returns "2023-12-25" in the "yyyy-MM-dd" format
149
+ * const parsedInvalidDate = parseDate("31/02/2023", "dd/MM/yyyy", "dd/MM/yyyy");
150
+ * console.log(parsedInvalidDate); // Returns null, as February 31st is invalid
151
+ * ```
152
+ */
16
153
  export declare const parseDate: (date: any, formatString: string | undefined, localDateformat: string, parseKeyboardVal?: boolean) => string | null;
154
+ /**
155
+ * This function returns a locale object based on the provided LeapContext.
156
+ * It checks the hostInfo.region and returns the corresponding locale with weekStartsOn set to 1.
157
+ * If the region is not recognized, it returns undefined.
158
+ * @param leapContext (LeapContext | undefined): The LeapContext object containing hostInfo with region information.
159
+ * @returns The function supports UK, US, AU (including NZ), and CA regions. If the region is not recognized, it returns undefined.
160
+ * @example
161
+ * ```typescript
162
+ * const locale = getLocale(leapContext); // Returns the appropriate locale based on the region
163
+ * const localeUS = getLocale({ hostInfo: { region: "us" } }); // Returns enUS locale
164
+ * const localeUK = getLocale({ hostInfo: { region: "uk" } }); // Returns enGB locale
165
+ * const localeAU = getLocale({ hostInfo: { region: "au" } }); // Returns enAU locale
166
+ * const localeCA = getLocale({ hostInfo: { region: "ca" } }); // Returns enGB locale
167
+ * ```
168
+ */
17
169
  export declare const getLocale: (leapContext?: LeapContext) => Locale | undefined;
18
- export declare const lctFormatDateTime: (value?: string | Date, locale?: Locale, isUtc?: boolean, dateOnly?: boolean, show24H?: boolean) => string;
170
+ /**
171
+ * This function formats a date or datetime value into a string based on the provided locale.
172
+ * It supports both date-only and datetime formats, and can handle UTC dates.
173
+ * @param value (string | Date | undefined): The date or datetime value to format.
174
+ * @param locale (Locale | undefined): The locale to use for formatting. If undefined, it will not format the date.
175
+ * @param isUtc (boolean): Whether the date is in UTC format. Defaults to true.
176
+ * @param dateOnly (boolean): Whether to format the value as a date only.
177
+ * @param show24H (boolean): Whether to show the time in 24-hour format. Defaults to false.
178
+ * @returns (string): A formatted date or datetime string. If the input value is invalid or locale is undefined, it returns an empty string.
179
+ * @example
180
+ * ```typescript
181
+ * const formattedDate = lctFormatDateTime(new Date(), enGB, true, false, true); // Returns "01/01/2023 14:30"
182
+ * const formattedDateTime = lctFormatDateTime("2023-01-01T14:30:00Z", enUS, true, false, false); // Returns "01/01/2023 02:30 PM"
183
+ * const formattedDateOnly = lctFormatDateTime("2023-01-01", enAU, false, true); // Returns "01/01/2023"
184
+ * const formattedInvalid = lctFormatDateTime(undefined, enGB); // Returns ""
185
+ * ```
186
+ */
187
+ export declare const formatDateTime: (value?: string | Date, locale?: Locale, isUtc?: boolean, dateOnly?: boolean, show24H?: boolean) => string;
188
+ /**
189
+ * This function formats a date string into a report-friendly format based on the provided locale.
190
+ * It handles both ISO date strings and strings in the format "yyyy-MM-dd".
191
+ *
192
+ * @param date (string | null): The date string to format. It can be in ISO format or "yyyy-MM-dd".
193
+ * @param locale (Locale | undefined): The locale to use for formatting. If undefined, it will not format the date.
194
+ * @returns (string): A formatted date string. If the input date is invalid or locale is undefined, it returns an empty string and logs a warning.
195
+ * @example
196
+ * ```typescript
197
+ * const formattedReportDate = formatReportDate("2023-12-25", enGB); // Returns "25-12-2023"
198
+ * const formattedReportDateISO = formatReportDate("2023-12-25T00:00:00Z", enUS); // Returns "12-25-2023"
199
+ * const formattedReportDateInvalid = formatReportDate("31-02-2023", enGB); // Returns "", logs warning
200
+ * const formattedReportDateNull = formatReportDate(null, enGB); // Returns "", logs warning
201
+ * ```
202
+ */
19
203
  export declare const formatReportDate: (date: string | null, locale?: Locale) => string;
20
204
  /**
21
205
  * @deprecated The method should not be used
22
206
  */
23
207
  export declare const getDateTimeWithOffset: (date: string) => Date;
208
+ /**
209
+ * This function checks if a string is null or undefined.
210
+ * It returns true if the string is null, undefined, or an empty string.
211
+ * @param value (string | null | undefined): The string to check.
212
+ * @returns (boolean): Returns true if the string is null, undefined, or empty; otherwise, false.
213
+ * @example
214
+ * ```typescript
215
+ * const isNullOrUndefined = isStringNullOrUndefined(null); // Returns true
216
+ * const isEmptyString = isStringNullOrUndefined(""); // Returns true
217
+ * const isValidString = isStringNullOrUndefined("Hello"); // Returns false
218
+ * ```
219
+ */
24
220
  export declare const isStringNullOrUndefined: (value?: string | null) => boolean;
221
+ /**
222
+ * This function formats a date as a string in the "yyyy-MM-dd" format, suitable for database storage.
223
+ * It takes a Date object as input and returns the formatted string.
224
+ * @param date (Date): The date to format.
225
+ * @returns (string): A formatted date string in the "yyyy-MM-dd" format.
226
+ * @example
227
+ * ```typescript
228
+ * const dbFormattedDate = formatAsDBDate(new Date()); // Returns "2023-12-25"
229
+ * const dbFormattedDateInvalid = formatAsDBDate(new Date("Invalid Date")); // Returns "Invalid date"
230
+ * ```
231
+ */
25
232
  export declare const formatAsDBDate: (date: Date) => string;
233
+ /**
234
+ * This function formats a date or datetime value into a string based on the provided locale.
235
+ * It supports both date-only and datetime formats, and can handle UTC dates.
236
+ * It also allows for formatting the start or end of the day.
237
+ * @param value (string | Date | undefined): The date or datetime value to format.
238
+ * @param locale (Locale | undefined): The locale to use for formatting. If undefined, it will not format the date.
239
+ * @param isUtc (boolean): Whether the date is in UTC format. Defaults to true.
240
+ * @param dateOnly (boolean): Whether to format the value as a date only.
241
+ * @param show24H (boolean): Whether to show the time in 24-hour format. Defaults to false.
242
+ * @param formatString (string): The format string to use for formatting the date. If not provided, it defaults to the locale's short date format.
243
+ * @param formatStartOfDay (boolean): If true, formats the date to the start of the day.
244
+ * @param formatEndOfDay (boolean): If true, formats the date to the end of the day.
245
+ * @returns (string): A formatted date or datetime string. If the input value is invalid or locale is undefined, it returns an empty string.
246
+ * @example
247
+ * ```typescript
248
+ * const formattedDate = getFormattedLocalDateTime(new Date(), enGB, true, false, true); // Returns "01/01/2023 14:30"
249
+ * const formattedDateTime = getFormattedLocalDateTime("2023-01-01T14:30:00Z", enUS, true, false, false); // Returns "01/01/2023 02:30 PM"
250
+ * const formattedDateOnly = getFormattedLocalDateTime("2023-01-01", enAU, false, true); // Returns "01/01/2023"
251
+ * const formattedInvalid = getFormattedLocalDateTime(undefined, enGB); // Returns ""
252
+ * const formattedStartOfDay = getFormattedLocalDateTime(new Date(), enGB, true, false, true, undefined, true); // Returns "01/01/2023 00:00"
253
+ * const formattedEndOfDay = getFormattedLocalDateTime(new Date(), enGB, true, false, true, undefined, false, true); // Returns "01/01/2023 23:59"
254
+ * ```
255
+ */
256
+ export declare const getFormattedLocalDateTime: (value?: string | Date, locale?: Locale, isUtc?: boolean, dateOnly?: boolean, show24H?: boolean, formatString?: string, formatStartOfDay?: boolean, formatEndOfDay?: boolean) => string;
257
+ /**
258
+ * This enum defines the types of buttons available in the dialog.
259
+ * It is used to identify which button was clicked by the user.
260
+ */
26
261
  export declare enum DialogButtonType {
27
262
  Confirm = 1,
28
263
  Refuse = 2,
29
264
  Cancel = 3
30
265
  }
266
+ /**
267
+ * This function shows a 3-button alert dialog using the Leap SDK.
268
+ * It allows the user to confirm, refuse, or cancel an action.
269
+ * It takes a message, button texts, and callbacks for each action.
270
+ * @param message (string): The message to display in the dialog.
271
+ * @param confirmButtonText (string): The text for the confirm button.
272
+ * @param confirmCallback (function): The callback function to execute when the confirm button is clicked.
273
+ * @param refuseButtonText (string): The text for the refuse button. Optional.
274
+ * @param refuseCallback (function): The callback function to execute when the refuse button is clicked. Optional.
275
+ * @param cancelButtonText (string): The text for the cancel button. Optional.
276
+ * @param sdkApi (Api): The Leap SDK API instance to use for showing the dialog.
277
+ * @returns A promise that resolves when the dialog is closed.
278
+ * @example
279
+ * ```typescript
280
+ * show3buttonAlert(
281
+ * "Are you sure you want to proceed?",
282
+ * "Yes",
283
+ * () => console.log("Confirmed"),
284
+ * "No",
285
+ * () => console.log("Refused"),
286
+ * "Cancel",
287
+ * sdkApi
288
+ * );
289
+ * ```
290
+ */
31
291
  export declare const show3buttonAlert: (message: string, confirmButtonText: string, confirmCallback: () => void, refuseButtonText?: string, refuseCallback?: () => void, cancelButtonText?: string, sdkApi?: Api) => Promise<void> | undefined;