@uipath/apollo-wind 2.80.1 → 2.81.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.
- package/dist/components/ui/calendar.cjs +5 -2
- package/dist/components/ui/calendar.d.ts +1 -1
- package/dist/components/ui/calendar.js +5 -2
- package/dist/components/ui/date-picker.cjs +27 -14
- package/dist/components/ui/date-picker.d.ts +16 -0
- package/dist/components/ui/date-picker.js +28 -15
- package/dist/components/ui/datetime-picker.cjs +41 -28
- package/dist/components/ui/datetime-picker.d.ts +13 -0
- package/dist/components/ui/datetime-picker.js +42 -29
- package/dist/components/ui/editable-cell.cjs +5 -1
- package/dist/components/ui/editable-cell.js +5 -1
- package/dist/components/ui/index.cjs +179 -166
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.js +1 -0
- package/dist/components/ui/locale-provider.cjs +124 -0
- package/dist/components/ui/locale-provider.d.ts +57 -0
- package/dist/components/ui/locale-provider.js +78 -0
- package/dist/components/ui/quick-form-field/quick-form-field.cjs +3 -1
- package/dist/components/ui/quick-form-field/quick-form-field.js +3 -1
- package/dist/components/ui/quick-form-field/utils.cjs +2 -2
- package/dist/components/ui/quick-form-field/utils.d.ts +2 -1
- package/dist/components/ui/quick-form-field/utils.js +2 -2
- package/dist/components/ui/time-field.cjs +191 -0
- package/dist/components/ui/time-field.d.ts +24 -0
- package/dist/components/ui/time-field.js +157 -0
- package/dist/index.cjs +18 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -1
- package/dist/lib/date-locale.cjs +184 -0
- package/dist/lib/date-locale.d.ts +31 -0
- package/dist/lib/date-locale.js +129 -0
- package/dist/styles.css +23 -0
- package/package.json +8 -8
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { format } from "date-fns";
|
|
4
|
+
import { forwardRef, useRef, useState } from "react";
|
|
5
|
+
import { cn } from "../../lib/index.js";
|
|
6
|
+
import { localeTimePattern } from "../../lib/date-locale.js";
|
|
7
|
+
import { ToggleGroup, ToggleGroupItem } from "./toggle-group.js";
|
|
8
|
+
function timeLayout(locale, use12Hour) {
|
|
9
|
+
const pattern = localeTimePattern(locale) ?? '';
|
|
10
|
+
const bare = pattern.replace(/'[^']*'/g, '');
|
|
11
|
+
const hourAt = bare.search(/[hHkK]/);
|
|
12
|
+
const periodAt = bare.search(/[aBb]/);
|
|
13
|
+
const separator = /[hHkK]+([^hHkKm]*)m/.exec(pattern)?.[1].replace(/'/g, '').trim() || ':';
|
|
14
|
+
return {
|
|
15
|
+
periodFirst: use12Hour && -1 !== periodAt && periodAt < hourAt,
|
|
16
|
+
separator
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const time_field_TimeSegment = /*#__PURE__*/ forwardRef(function({ value, min, max, label, disabled, onCommit, onFilled }, ref) {
|
|
20
|
+
const [draft, setDraft] = useState(null);
|
|
21
|
+
const text = draft ?? (void 0 === value ? '' : String(value).padStart(2, '0'));
|
|
22
|
+
const enter = (digits)=>{
|
|
23
|
+
setDraft(digits);
|
|
24
|
+
if (!digits) return;
|
|
25
|
+
const typed = Number(digits);
|
|
26
|
+
if (typed >= min && typed <= max) onCommit(typed);
|
|
27
|
+
else if (2 === digits.length) onCommit(Math.min(Math.max(typed, min), max));
|
|
28
|
+
if (2 === digits.length || 10 * typed > max) onFilled?.();
|
|
29
|
+
};
|
|
30
|
+
const step = (delta)=>{
|
|
31
|
+
const span = max - min + 1;
|
|
32
|
+
const from = value ?? (delta > 0 ? min - 1 : max + 1);
|
|
33
|
+
setDraft(null);
|
|
34
|
+
onCommit(((from - min + delta) % span + span) % span + min);
|
|
35
|
+
};
|
|
36
|
+
return /*#__PURE__*/ jsx("input", {
|
|
37
|
+
ref: ref,
|
|
38
|
+
type: "text",
|
|
39
|
+
inputMode: "numeric",
|
|
40
|
+
role: "spinbutton",
|
|
41
|
+
autoComplete: "off",
|
|
42
|
+
"aria-label": label,
|
|
43
|
+
"aria-valuemin": min,
|
|
44
|
+
"aria-valuemax": max,
|
|
45
|
+
"aria-valuenow": value,
|
|
46
|
+
placeholder: "--",
|
|
47
|
+
disabled: disabled,
|
|
48
|
+
value: text,
|
|
49
|
+
onBlur: ()=>setDraft(null),
|
|
50
|
+
onKeyDown: (e)=>{
|
|
51
|
+
if (/^\d$/.test(e.key)) {
|
|
52
|
+
e.preventDefault();
|
|
53
|
+
const next = (draft ?? '') + e.key;
|
|
54
|
+
enter(next.length > 2 ? e.key : next);
|
|
55
|
+
} else if ('ArrowUp' === e.key || 'ArrowDown' === e.key) {
|
|
56
|
+
e.preventDefault();
|
|
57
|
+
step('ArrowUp' === e.key ? 1 : -1);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
onChange: (e)=>enter(e.target.value.replace(/\D/g, '').slice(-2)),
|
|
61
|
+
className: "w-[2.5ch] rounded-sm bg-transparent text-center tabular-nums caret-transparent outline-none placeholder:text-muted-foreground focus:bg-accent focus:text-accent-foreground disabled:cursor-not-allowed"
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
function TimeField({ value, onValueChange, use12Hour, locale, strings, 'aria-labelledby': ariaLabelledBy, disabled, className }) {
|
|
65
|
+
const minuteRef = useRef(null);
|
|
66
|
+
const { periodFirst, separator } = timeLayout(locale, use12Hour);
|
|
67
|
+
const hours = value?.hours;
|
|
68
|
+
const [pendingPm, setPendingPm] = useState(false);
|
|
69
|
+
const pm = void 0 === hours ? pendingPm : hours >= 12;
|
|
70
|
+
const commit = (next)=>onValueChange({
|
|
71
|
+
hours: next.hours ?? hours ?? (use12Hour && pm ? 12 : 0),
|
|
72
|
+
minutes: next.minutes ?? value?.minutes ?? 0
|
|
73
|
+
});
|
|
74
|
+
const setPm = (nextPm)=>{
|
|
75
|
+
setPendingPm(nextPm);
|
|
76
|
+
if (void 0 !== hours) commit({
|
|
77
|
+
hours: hours % 12 + (nextPm ? 12 : 0)
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
const period = use12Hour && /*#__PURE__*/ jsxs(ToggleGroup, {
|
|
81
|
+
type: "single",
|
|
82
|
+
variant: "outline",
|
|
83
|
+
size: "sm",
|
|
84
|
+
"aria-label": strings.dayPeriod,
|
|
85
|
+
value: pm ? 'pm' : 'am',
|
|
86
|
+
onValueChange: (next)=>next && setPm('pm' === next),
|
|
87
|
+
disabled: disabled,
|
|
88
|
+
children: [
|
|
89
|
+
/*#__PURE__*/ jsx(ToggleGroupItem, {
|
|
90
|
+
value: "am",
|
|
91
|
+
className: "future:h-10",
|
|
92
|
+
children: format(new Date(2000, 0, 1, 9), 'a', {
|
|
93
|
+
locale
|
|
94
|
+
})
|
|
95
|
+
}),
|
|
96
|
+
/*#__PURE__*/ jsx(ToggleGroupItem, {
|
|
97
|
+
value: "pm",
|
|
98
|
+
className: "future:h-10",
|
|
99
|
+
children: format(new Date(2000, 0, 1, 21), 'a', {
|
|
100
|
+
locale
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
});
|
|
105
|
+
return /*#__PURE__*/ jsxs("fieldset", {
|
|
106
|
+
"aria-labelledby": ariaLabelledBy,
|
|
107
|
+
"data-slot": "time-field",
|
|
108
|
+
className: cn('m-0 flex min-w-0 items-center gap-2 border-0 p-0', className),
|
|
109
|
+
children: [
|
|
110
|
+
periodFirst && period,
|
|
111
|
+
/*#__PURE__*/ jsxs("div", {
|
|
112
|
+
className: cn('flex h-9 flex-1 items-center gap-0.5 rounded-md border border-input bg-transparent px-3 text-base transition-colors focus-within:ring-2 focus-within:ring-ring has-disabled:cursor-not-allowed has-disabled:opacity-50 md:text-sm', 'future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:text-sm future:focus-within:ring-primary future:focus-within:ring-offset-2 future:focus-within:ring-offset-background'),
|
|
113
|
+
children: [
|
|
114
|
+
use12Hour ? /*#__PURE__*/ jsx(time_field_TimeSegment, {
|
|
115
|
+
label: strings.hours,
|
|
116
|
+
value: void 0 === hours ? void 0 : hours % 12 || 12,
|
|
117
|
+
min: 1,
|
|
118
|
+
max: 12,
|
|
119
|
+
disabled: disabled,
|
|
120
|
+
onCommit: (shown)=>commit({
|
|
121
|
+
hours: shown % 12 + (pm ? 12 : 0)
|
|
122
|
+
}),
|
|
123
|
+
onFilled: ()=>minuteRef.current?.focus()
|
|
124
|
+
}) : /*#__PURE__*/ jsx(time_field_TimeSegment, {
|
|
125
|
+
label: strings.hours,
|
|
126
|
+
value: hours,
|
|
127
|
+
min: 0,
|
|
128
|
+
max: 23,
|
|
129
|
+
disabled: disabled,
|
|
130
|
+
onCommit: (next)=>commit({
|
|
131
|
+
hours: next
|
|
132
|
+
}),
|
|
133
|
+
onFilled: ()=>minuteRef.current?.focus()
|
|
134
|
+
}),
|
|
135
|
+
/*#__PURE__*/ jsx("span", {
|
|
136
|
+
"aria-hidden": "true",
|
|
137
|
+
className: "text-muted-foreground",
|
|
138
|
+
children: separator
|
|
139
|
+
}),
|
|
140
|
+
/*#__PURE__*/ jsx(time_field_TimeSegment, {
|
|
141
|
+
ref: minuteRef,
|
|
142
|
+
label: strings.minutes,
|
|
143
|
+
value: value?.minutes,
|
|
144
|
+
min: 0,
|
|
145
|
+
max: 59,
|
|
146
|
+
disabled: disabled,
|
|
147
|
+
onCommit: (minutes)=>commit({
|
|
148
|
+
minutes
|
|
149
|
+
})
|
|
150
|
+
})
|
|
151
|
+
]
|
|
152
|
+
}),
|
|
153
|
+
!periodFirst && period
|
|
154
|
+
]
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
export { TimeField };
|
package/dist/index.cjs
CHANGED
|
@@ -162,6 +162,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
162
162
|
ContextMenuCheckboxItem: ()=>context_menu_cjs_namespaceObject.ContextMenuCheckboxItem,
|
|
163
163
|
DEFAULT_MESSAGE_ACTIONS_OVERFLOW_STRINGS: ()=>message_actions_cjs_namespaceObject.DEFAULT_MESSAGE_ACTIONS_OVERFLOW_STRINGS,
|
|
164
164
|
isCustomField: ()=>form_schema_cjs_namespaceObject.isCustomField,
|
|
165
|
+
useDatePickerStrings: ()=>locale_provider_cjs_namespaceObject.useDatePickerStrings,
|
|
165
166
|
getPromptEditorTokenTypeLabel: ()=>prompt_editor_index_cjs_namespaceObject.getPromptEditorTokenTypeLabel,
|
|
166
167
|
FormFieldError: ()=>form_field_cjs_namespaceObject.FormFieldError,
|
|
167
168
|
DEFAULT_MESSAGE_ACTION_FEEDBACK_STRINGS: ()=>message_actions_cjs_namespaceObject.DEFAULT_MESSAGE_ACTION_FEEDBACK_STRINGS,
|
|
@@ -196,6 +197,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
196
197
|
MessageHeader: ()=>message_cjs_namespaceObject.MessageHeader,
|
|
197
198
|
BreadcrumbEllipsis: ()=>breadcrumb_cjs_namespaceObject.BreadcrumbEllipsis,
|
|
198
199
|
ModelTagChip: ()=>model_picker_index_cjs_namespaceObject.ModelTagChip,
|
|
200
|
+
LocaleProvider: ()=>locale_provider_cjs_namespaceObject.LocaleProvider,
|
|
199
201
|
AccordionItem: ()=>accordion_cjs_namespaceObject.AccordionItem,
|
|
200
202
|
DEFAULT_LOADING_DOTS_STRINGS: ()=>loading_dots_cjs_namespaceObject.DEFAULT_LOADING_DOTS_STRINGS,
|
|
201
203
|
useModelPickerState: ()=>model_picker_index_cjs_namespaceObject.useModelPickerState,
|
|
@@ -297,6 +299,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
297
299
|
SidebarContent: ()=>sidebar_index_cjs_namespaceObject.SidebarContent,
|
|
298
300
|
Row: ()=>row_cjs_namespaceObject.Row,
|
|
299
301
|
DEFAULT_CHAT_COMPOSER_STRINGS: ()=>chat_composer_cjs_namespaceObject.DEFAULT_CHAT_COMPOSER_STRINGS,
|
|
302
|
+
useDateLocale: ()=>locale_provider_cjs_namespaceObject.useDateLocale,
|
|
300
303
|
PromptValueControl: ()=>prompt_value_control_cjs_namespaceObject.PromptValueControl,
|
|
301
304
|
CommandEmpty: ()=>command_cjs_namespaceObject.CommandEmpty,
|
|
302
305
|
SidebarGroupContent: ()=>sidebar_index_cjs_namespaceObject.SidebarGroupContent,
|
|
@@ -381,8 +384,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
381
384
|
ContextMenuTrigger: ()=>context_menu_cjs_namespaceObject.ContextMenuTrigger,
|
|
382
385
|
Markdown: ()=>markdown_cjs_namespaceObject.Markdown,
|
|
383
386
|
ToolCall: ()=>tool_call_cjs_namespaceObject.ToolCall,
|
|
384
|
-
|
|
387
|
+
DEFAULT_DATE_PICKER_STRINGS: ()=>locale_provider_cjs_namespaceObject.DEFAULT_DATE_PICKER_STRINGS,
|
|
385
388
|
CommandGroup: ()=>command_cjs_namespaceObject.CommandGroup,
|
|
389
|
+
DEFAULT_MESSAGE_ACTION_COPY_STRINGS: ()=>message_actions_cjs_namespaceObject.DEFAULT_MESSAGE_ACTION_COPY_STRINGS,
|
|
386
390
|
InputGroupText: ()=>input_group_cjs_namespaceObject.InputGroupText,
|
|
387
391
|
SidebarRail: ()=>sidebar_index_cjs_namespaceObject.SidebarRail,
|
|
388
392
|
setEditorTokens: ()=>prompt_editor_index_cjs_namespaceObject.setEditorTokens,
|
|
@@ -522,6 +526,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
522
526
|
InsertVariableAction: ()=>index_cjs_namespaceObject.InsertVariableAction,
|
|
523
527
|
SheetPortal: ()=>sheet_cjs_namespaceObject.SheetPortal,
|
|
524
528
|
appendPathSegment: ()=>json_tree_view_index_cjs_namespaceObject.appendPathSegment,
|
|
529
|
+
loadDateLocale: ()=>date_locale_cjs_namespaceObject.loadDateLocale,
|
|
525
530
|
DEFAULT_QUICK_FORM_FIELD_STRINGS: ()=>quick_form_field_index_cjs_namespaceObject.DEFAULT_QUICK_FORM_FIELD_STRINGS,
|
|
526
531
|
CommandInput: ()=>command_cjs_namespaceObject.CommandInput,
|
|
527
532
|
SidebarHeader: ()=>sidebar_index_cjs_namespaceObject.SidebarHeader,
|
|
@@ -593,6 +598,8 @@ const context_menu_cjs_namespaceObject = require("./components/ui/context-menu.c
|
|
|
593
598
|
const data_table_cjs_namespaceObject = require("./components/ui/data-table.cjs");
|
|
594
599
|
const date_picker_cjs_namespaceObject = require("./components/ui/date-picker.cjs");
|
|
595
600
|
const datetime_picker_cjs_namespaceObject = require("./components/ui/datetime-picker.cjs");
|
|
601
|
+
const locale_provider_cjs_namespaceObject = require("./components/ui/locale-provider.cjs");
|
|
602
|
+
const date_locale_cjs_namespaceObject = require("./lib/date-locale.cjs");
|
|
596
603
|
const dialog_cjs_namespaceObject = require("./components/ui/dialog.cjs");
|
|
597
604
|
const disclosure_tree_cjs_namespaceObject = require("./components/ui/disclosure-tree.cjs");
|
|
598
605
|
const drawer_cjs_namespaceObject = require("./components/ui/drawer.cjs");
|
|
@@ -782,6 +789,7 @@ exports.DEFAULT_BOOLEAN_RADIO_GROUP_STRINGS = __webpack_exports__.DEFAULT_BOOLEA
|
|
|
782
789
|
exports.DEFAULT_CHAT_COMPOSER_STRINGS = __webpack_exports__.DEFAULT_CHAT_COMPOSER_STRINGS;
|
|
783
790
|
exports.DEFAULT_CITATION_STRINGS = __webpack_exports__.DEFAULT_CITATION_STRINGS;
|
|
784
791
|
exports.DEFAULT_CODE_BLOCK_STRINGS = __webpack_exports__.DEFAULT_CODE_BLOCK_STRINGS;
|
|
792
|
+
exports.DEFAULT_DATE_PICKER_STRINGS = __webpack_exports__.DEFAULT_DATE_PICKER_STRINGS;
|
|
785
793
|
exports.DEFAULT_DIALOG_STRINGS = __webpack_exports__.DEFAULT_DIALOG_STRINGS;
|
|
786
794
|
exports.DEFAULT_DROPZONE_OVERLAY_STRINGS = __webpack_exports__.DEFAULT_DROPZONE_OVERLAY_STRINGS;
|
|
787
795
|
exports.DEFAULT_INSERT_VARIABLE_ACTION_STRINGS = __webpack_exports__.DEFAULT_INSERT_VARIABLE_ACTION_STRINGS;
|
|
@@ -905,6 +913,7 @@ exports.JsonTypeBadge = __webpack_exports__.JsonTypeBadge;
|
|
|
905
913
|
exports.Label = __webpack_exports__.Label;
|
|
906
914
|
exports.LiveRegion = __webpack_exports__.LiveRegion;
|
|
907
915
|
exports.LoadingDots = __webpack_exports__.LoadingDots;
|
|
916
|
+
exports.LocaleProvider = __webpack_exports__.LocaleProvider;
|
|
908
917
|
exports.LockableValueField = __webpack_exports__.LockableValueField;
|
|
909
918
|
exports.MODEL_BADGES = __webpack_exports__.MODEL_BADGES;
|
|
910
919
|
exports.Markdown = __webpack_exports__.Markdown;
|
|
@@ -1150,6 +1159,7 @@ exports.isTextGenerationModel = __webpack_exports__.isTextGenerationModel;
|
|
|
1150
1159
|
exports.isValueModeEnvelope = __webpack_exports__.isValueModeEnvelope;
|
|
1151
1160
|
exports.keepFolderSearchOnEscape = __webpack_exports__.keepFolderSearchOnEscape;
|
|
1152
1161
|
exports.literalValues = __webpack_exports__.literalValues;
|
|
1162
|
+
exports.loadDateLocale = __webpack_exports__.loadDateLocale;
|
|
1153
1163
|
exports.loadingDotsVariants = __webpack_exports__.loadingDotsVariants;
|
|
1154
1164
|
exports.markerVariants = __webpack_exports__.markerVariants;
|
|
1155
1165
|
exports.messageActionsVariants = __webpack_exports__.messageActionsVariants;
|
|
@@ -1172,6 +1182,8 @@ exports.toast = __webpack_exports__.toast;
|
|
|
1172
1182
|
exports.toggleVariants = __webpack_exports__.toggleVariants;
|
|
1173
1183
|
exports.toolCallVariants = __webpack_exports__.toolCallVariants;
|
|
1174
1184
|
exports.useChatComposer = __webpack_exports__.useChatComposer;
|
|
1185
|
+
exports.useDateLocale = __webpack_exports__.useDateLocale;
|
|
1186
|
+
exports.useDatePickerStrings = __webpack_exports__.useDatePickerStrings;
|
|
1175
1187
|
exports.useInputGroup = __webpack_exports__.useInputGroup;
|
|
1176
1188
|
exports.useJsonTreeViewStrings = __webpack_exports__.useJsonTreeViewStrings;
|
|
1177
1189
|
exports.useMessageScroller = __webpack_exports__.useMessageScroller;
|
|
@@ -1300,6 +1312,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
1300
1312
|
"DEFAULT_CHAT_COMPOSER_STRINGS",
|
|
1301
1313
|
"DEFAULT_CITATION_STRINGS",
|
|
1302
1314
|
"DEFAULT_CODE_BLOCK_STRINGS",
|
|
1315
|
+
"DEFAULT_DATE_PICKER_STRINGS",
|
|
1303
1316
|
"DEFAULT_DIALOG_STRINGS",
|
|
1304
1317
|
"DEFAULT_DROPZONE_OVERLAY_STRINGS",
|
|
1305
1318
|
"DEFAULT_INSERT_VARIABLE_ACTION_STRINGS",
|
|
@@ -1423,6 +1436,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
1423
1436
|
"Label",
|
|
1424
1437
|
"LiveRegion",
|
|
1425
1438
|
"LoadingDots",
|
|
1439
|
+
"LocaleProvider",
|
|
1426
1440
|
"LockableValueField",
|
|
1427
1441
|
"MODEL_BADGES",
|
|
1428
1442
|
"Markdown",
|
|
@@ -1668,6 +1682,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
1668
1682
|
"isValueModeEnvelope",
|
|
1669
1683
|
"keepFolderSearchOnEscape",
|
|
1670
1684
|
"literalValues",
|
|
1685
|
+
"loadDateLocale",
|
|
1671
1686
|
"loadingDotsVariants",
|
|
1672
1687
|
"markerVariants",
|
|
1673
1688
|
"messageActionsVariants",
|
|
@@ -1690,6 +1705,8 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
1690
1705
|
"toggleVariants",
|
|
1691
1706
|
"toolCallVariants",
|
|
1692
1707
|
"useChatComposer",
|
|
1708
|
+
"useDateLocale",
|
|
1709
|
+
"useDatePickerStrings",
|
|
1693
1710
|
"useInputGroup",
|
|
1694
1711
|
"useJsonTreeViewStrings",
|
|
1695
1712
|
"useMessageScroller",
|
package/dist/index.d.ts
CHANGED
|
@@ -65,6 +65,10 @@ export type { DatePickerProps, DateRangePickerProps } from './components/ui/date
|
|
|
65
65
|
export { DatePicker, DateRangePicker } from './components/ui/date-picker';
|
|
66
66
|
export type { DateTimePickerProps } from './components/ui/datetime-picker';
|
|
67
67
|
export { DateTimePicker } from './components/ui/datetime-picker';
|
|
68
|
+
export type { DatePickerStrings, LocaleProviderProps } from './components/ui/locale-provider';
|
|
69
|
+
export { DEFAULT_DATE_PICKER_STRINGS, LocaleProvider, useDateLocale, useDatePickerStrings, } from './components/ui/locale-provider';
|
|
70
|
+
export type { DateLocale } from './lib/date-locale';
|
|
71
|
+
export { loadDateLocale } from './lib/date-locale';
|
|
68
72
|
export type { DialogStrings } from './components/ui/dialog';
|
|
69
73
|
export { DEFAULT_DIALOG_STRINGS, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Modal, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, } from './components/ui/dialog';
|
|
70
74
|
export type { DisclosureTreeItem, DisclosureTreeProps } from './components/ui/disclosure-tree';
|
package/dist/index.js
CHANGED
|
@@ -40,6 +40,8 @@ import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGr
|
|
|
40
40
|
import { DataTable, DataTableColumnHeader, DataTableSelectColumn } from "./components/ui/data-table.js";
|
|
41
41
|
import { DatePicker, DateRangePicker } from "./components/ui/date-picker.js";
|
|
42
42
|
import { DateTimePicker } from "./components/ui/datetime-picker.js";
|
|
43
|
+
import { DEFAULT_DATE_PICKER_STRINGS, LocaleProvider, useDateLocale, useDatePickerStrings } from "./components/ui/locale-provider.js";
|
|
44
|
+
import { loadDateLocale } from "./lib/date-locale.js";
|
|
43
45
|
import { DEFAULT_DIALOG_STRINGS, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Modal, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger } from "./components/ui/dialog.js";
|
|
44
46
|
import { DisclosureTree } from "./components/ui/disclosure-tree.js";
|
|
45
47
|
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from "./components/ui/drawer.js";
|
|
@@ -112,4 +114,4 @@ import tree_view, { TreeView } from "./components/ui/tree-view.js";
|
|
|
112
114
|
import { VariablePicker, VariablePickerContent } from "./components/ui/variable-picker/index.js";
|
|
113
115
|
import { VariableValueControl } from "./components/ui/variable-value-control.js";
|
|
114
116
|
import { cn } from "./lib/utils.js";
|
|
115
|
-
export { $insertTokenAtCursor, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AiAssistAction, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Avatar, AvatarFallback, AvatarImage, BUILTIN_VALUE_MODES, Badge, BooleanRadioGroup, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatComposer, ChatComposerAttachButton, ChatComposerAttachments, ChatComposerError, ChatComposerFooter, ChatComposerInputGroup, ChatComposerSubmit, ChatComposerTextarea, ChatComposerToolbar, ChatHero, ChatHeroDescription, ChatHeroHeader, ChatHeroLogo, ChatHeroTitle, Checkbox, Citation, CodeBlock, CodeBlockHeader, Collapsible, CollapsibleContent, CollapsibleTrigger, Column, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DEFAULT_AI_ASSIST_ACTION_STRINGS, DEFAULT_BOOLEAN_RADIO_GROUP_STRINGS, DEFAULT_CHAT_COMPOSER_STRINGS, DEFAULT_CITATION_STRINGS, DEFAULT_CODE_BLOCK_STRINGS, DEFAULT_DIALOG_STRINGS, DEFAULT_DROPZONE_OVERLAY_STRINGS, DEFAULT_INSERT_VARIABLE_ACTION_STRINGS, DEFAULT_JSON_TREE_VIEW_STRINGS, DEFAULT_LOADING_DOTS_STRINGS, DEFAULT_MARKDOWN_STRINGS, DEFAULT_MESSAGE_ACTIONS_OVERFLOW_STRINGS, DEFAULT_MESSAGE_ACTIONS_STRINGS, DEFAULT_MESSAGE_ACTION_COPY_STRINGS, DEFAULT_MESSAGE_ACTION_FEEDBACK_STRINGS, DEFAULT_MESSAGE_SCROLLER_BUTTON_STRINGS, DEFAULT_MESSAGE_SCROLLER_VIEWPORT_STRINGS, DEFAULT_METADATA_FORM_STRINGS, DEFAULT_MODEL_PICKER_LABELS, DEFAULT_MULTI_SELECT_STRINGS, DEFAULT_PROMPT_EDITOR_STRINGS, DEFAULT_PROMPT_SUGGESTIONS_STRINGS, DEFAULT_QUICK_FORM_FIELD_STRINGS, DEFAULT_SEARCH_STRINGS, DEFAULT_SHEET_STRINGS, DEFAULT_SOURCES_STRINGS, DEFAULT_THINKING_INDICATOR_STRINGS, DEFAULT_TOOL_CALL_STRINGS, DEFAULT_VALUE_MODE_STRINGS, DataFetcher, DataSourceBuilder, DataTable, DataTableColumnHeader, DataTableSelectColumn, DataTransformers, DatePicker, DateRangePicker, DateTimePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisclosureTree, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DropzoneOverlay, EditableCell, EditableText, EmptyState, ExpressionBuilder, FIELD_CONTROL_GEOMETRY, FIELD_TYPE_META, FIELD_TYPE_ORDER, FetchAdapter, FieldControl, FieldMenu, tree_view as FileTreeView, FileUpload, FolderPicker, FolderPickerContent, FolderSwitcher, FormDesigner, FormField, FormFieldDescription, FormFieldError, FormFieldHeader, FormFieldLabel, FormFieldRenderer, FormStateViewer, Grid, GroupHeader, GroupedOptionList, HoverCard, HoverCardContent, HoverCardTrigger, InfoTooltip, Input, InputGroup, InputGroupAddon, InputGroupBody, InputGroupButton, InputGroupInput, InputGroupPopoverTrigger, InputGroupRow, InputGroupText, InputGroupTextarea, InputGroupTrigger, InputTokenNode, InsertVariableAction, JsonContainerEditor, JsonLeafValueEditor, JsonMultilineLeafEditor, JsonTreeToolbar, JsonTreeView, JsonTreeViewProvider, JsonTypeBadge, Label, LiveRegion, LoadingDots, LockableValueField, MODEL_BADGES, Markdown, Marker, MarkerContent, MarkerIcon, Message, MessageAction, MessageActionCopy, MessageActionFeedback, MessageActions, MessageActionsOverflow, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MetadataForm, Modal, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, ModeAwareField, ModelOptionRow, ModelPicker, ModelTagChip, MultiSelect, OutputTokenNode, PROMPT_EDITOR_RICH_TRANSFORMERS, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelTabs, PanelTabsContent, PanelTabsList, PanelTabsStrip, PanelTabsTrigger, PickerPopup, PickerSearchInput, PickerTrigger, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalContainerProvider, Progress, PromptEditor, PromptSuggestions, PromptValueControl, QuickFormField, RadioGroup, RadioGroupItem, ReferenceChip, RequiredIndicator, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResourceTokenNode, Row, RuleBuilder, RulesEngine, ScrollArea, ScrollBar, ScrollableTabsList, Search, SearchWithSuggestions, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, SourceItem, Sources, SourcesList, Spinner, StateTokenNode, StatsCard, Stepper, StringListField, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThinkingIndicator, Toaster, Toggle, ToggleGroup, ToggleGroupItem, TokenPill, TokenPillWithTooltip, ToolCall, ToolCallContent, ToolCallError, ToolCallHeader, ToolCallInput, ToolCallOutput, ToolCallSection, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, TreeView, VALUE_MODE_OPAQUE, VARIABLE_DRAG_MIME, VARIABLE_PATH_REGEX, ValueModeIndicator, ValueModeSwitchDialog, VariablePicker, VariablePickerContent, VariableValueControl, VirtualOptionList, WORD_JOINER, analyticsPlugin, appendPathSegment, attachmentVariants, auditPlugin, autoSavePlugin, badgeVariants, bubbleVariants, buildJsonTree, builtInValueModes, buttonVariants, chatComposerErrorVariants, chatComposerVariants, chatHeroDescriptionVariants, chatHeroTitleVariants, chatHeroVariants, citationVariants, cn, collectContainerPaths, copyTextToClipboard, createAiAssistAction, createClearAction, createEditableColumn, createInputTokenNode, createInsertVariableAction, createOutputTokenNode, createResourceTokenNode, createStateTokenNode, createTokenNodeForOption, createVariableModeControl, defaultCostTier, defaultRowActions, deriveModelTags, envelopeCodec, filterModels, flattenJsonTree, formatContextWindow, formatFileSize, formatLeafValue, formatTemplate, formattingPlugin, getAllPromptTokenNodes, getEditorTokens, getPromptEditorTokenColors, getPromptEditorTokenTypeLabel, getReferenceChipColors, getSubstitutionTarget, getValueAtPath, groupModels, hasMinMaxStep, hasOptions, inferTokenTypeFromPath, inferValueType, inputGroupVariants, isArrayItemTemplateRoot, isCustomField, isEmptyModeValue, isFileField, isFileTypeAccepted, isJsonObject, isPathCollapsed, isPromptTokenNode, isTextGenerationModel, isValueModeEnvelope, keepFolderSearchOnEscape, literalValues, loadingDotsVariants, markerVariants, messageActionsVariants, normalizeRichTextTokens, normalizeVariablePath, optionDomId, promptSuggestionVariants, promptSuggestionsListVariants, removeValueAtPath, resolveHomeGeography, resolveLabels, resolveVariables, schemaDisplayType, setEditorTokens, setValueAtPath, sidebarMenuButtonVariants, spinnerVariants, thinkingIndicatorVariants, toast, toggleVariants, toolCallVariants, useChatComposer, useInputGroup, useJsonTreeViewStrings, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, useModelPickerState, useSidebar, useWatch, validateFiles, validationPlugin, workflowPlugin };
|
|
117
|
+
export { $insertTokenAtCursor, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AiAssistAction, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Avatar, AvatarFallback, AvatarImage, BUILTIN_VALUE_MODES, Badge, BooleanRadioGroup, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatComposer, ChatComposerAttachButton, ChatComposerAttachments, ChatComposerError, ChatComposerFooter, ChatComposerInputGroup, ChatComposerSubmit, ChatComposerTextarea, ChatComposerToolbar, ChatHero, ChatHeroDescription, ChatHeroHeader, ChatHeroLogo, ChatHeroTitle, Checkbox, Citation, CodeBlock, CodeBlockHeader, Collapsible, CollapsibleContent, CollapsibleTrigger, Column, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DEFAULT_AI_ASSIST_ACTION_STRINGS, DEFAULT_BOOLEAN_RADIO_GROUP_STRINGS, DEFAULT_CHAT_COMPOSER_STRINGS, DEFAULT_CITATION_STRINGS, DEFAULT_CODE_BLOCK_STRINGS, DEFAULT_DATE_PICKER_STRINGS, DEFAULT_DIALOG_STRINGS, DEFAULT_DROPZONE_OVERLAY_STRINGS, DEFAULT_INSERT_VARIABLE_ACTION_STRINGS, DEFAULT_JSON_TREE_VIEW_STRINGS, DEFAULT_LOADING_DOTS_STRINGS, DEFAULT_MARKDOWN_STRINGS, DEFAULT_MESSAGE_ACTIONS_OVERFLOW_STRINGS, DEFAULT_MESSAGE_ACTIONS_STRINGS, DEFAULT_MESSAGE_ACTION_COPY_STRINGS, DEFAULT_MESSAGE_ACTION_FEEDBACK_STRINGS, DEFAULT_MESSAGE_SCROLLER_BUTTON_STRINGS, DEFAULT_MESSAGE_SCROLLER_VIEWPORT_STRINGS, DEFAULT_METADATA_FORM_STRINGS, DEFAULT_MODEL_PICKER_LABELS, DEFAULT_MULTI_SELECT_STRINGS, DEFAULT_PROMPT_EDITOR_STRINGS, DEFAULT_PROMPT_SUGGESTIONS_STRINGS, DEFAULT_QUICK_FORM_FIELD_STRINGS, DEFAULT_SEARCH_STRINGS, DEFAULT_SHEET_STRINGS, DEFAULT_SOURCES_STRINGS, DEFAULT_THINKING_INDICATOR_STRINGS, DEFAULT_TOOL_CALL_STRINGS, DEFAULT_VALUE_MODE_STRINGS, DataFetcher, DataSourceBuilder, DataTable, DataTableColumnHeader, DataTableSelectColumn, DataTransformers, DatePicker, DateRangePicker, DateTimePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisclosureTree, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DropzoneOverlay, EditableCell, EditableText, EmptyState, ExpressionBuilder, FIELD_CONTROL_GEOMETRY, FIELD_TYPE_META, FIELD_TYPE_ORDER, FetchAdapter, FieldControl, FieldMenu, tree_view as FileTreeView, FileUpload, FolderPicker, FolderPickerContent, FolderSwitcher, FormDesigner, FormField, FormFieldDescription, FormFieldError, FormFieldHeader, FormFieldLabel, FormFieldRenderer, FormStateViewer, Grid, GroupHeader, GroupedOptionList, HoverCard, HoverCardContent, HoverCardTrigger, InfoTooltip, Input, InputGroup, InputGroupAddon, InputGroupBody, InputGroupButton, InputGroupInput, InputGroupPopoverTrigger, InputGroupRow, InputGroupText, InputGroupTextarea, InputGroupTrigger, InputTokenNode, InsertVariableAction, JsonContainerEditor, JsonLeafValueEditor, JsonMultilineLeafEditor, JsonTreeToolbar, JsonTreeView, JsonTreeViewProvider, JsonTypeBadge, Label, LiveRegion, LoadingDots, LocaleProvider, LockableValueField, MODEL_BADGES, Markdown, Marker, MarkerContent, MarkerIcon, Message, MessageAction, MessageActionCopy, MessageActionFeedback, MessageActions, MessageActionsOverflow, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MetadataForm, Modal, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, ModeAwareField, ModelOptionRow, ModelPicker, ModelTagChip, MultiSelect, OutputTokenNode, PROMPT_EDITOR_RICH_TRANSFORMERS, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelTabs, PanelTabsContent, PanelTabsList, PanelTabsStrip, PanelTabsTrigger, PickerPopup, PickerSearchInput, PickerTrigger, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalContainerProvider, Progress, PromptEditor, PromptSuggestions, PromptValueControl, QuickFormField, RadioGroup, RadioGroupItem, ReferenceChip, RequiredIndicator, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResourceTokenNode, Row, RuleBuilder, RulesEngine, ScrollArea, ScrollBar, ScrollableTabsList, Search, SearchWithSuggestions, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, SourceItem, Sources, SourcesList, Spinner, StateTokenNode, StatsCard, Stepper, StringListField, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThinkingIndicator, Toaster, Toggle, ToggleGroup, ToggleGroupItem, TokenPill, TokenPillWithTooltip, ToolCall, ToolCallContent, ToolCallError, ToolCallHeader, ToolCallInput, ToolCallOutput, ToolCallSection, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, TreeView, VALUE_MODE_OPAQUE, VARIABLE_DRAG_MIME, VARIABLE_PATH_REGEX, ValueModeIndicator, ValueModeSwitchDialog, VariablePicker, VariablePickerContent, VariableValueControl, VirtualOptionList, WORD_JOINER, analyticsPlugin, appendPathSegment, attachmentVariants, auditPlugin, autoSavePlugin, badgeVariants, bubbleVariants, buildJsonTree, builtInValueModes, buttonVariants, chatComposerErrorVariants, chatComposerVariants, chatHeroDescriptionVariants, chatHeroTitleVariants, chatHeroVariants, citationVariants, cn, collectContainerPaths, copyTextToClipboard, createAiAssistAction, createClearAction, createEditableColumn, createInputTokenNode, createInsertVariableAction, createOutputTokenNode, createResourceTokenNode, createStateTokenNode, createTokenNodeForOption, createVariableModeControl, defaultCostTier, defaultRowActions, deriveModelTags, envelopeCodec, filterModels, flattenJsonTree, formatContextWindow, formatFileSize, formatLeafValue, formatTemplate, formattingPlugin, getAllPromptTokenNodes, getEditorTokens, getPromptEditorTokenColors, getPromptEditorTokenTypeLabel, getReferenceChipColors, getSubstitutionTarget, getValueAtPath, groupModels, hasMinMaxStep, hasOptions, inferTokenTypeFromPath, inferValueType, inputGroupVariants, isArrayItemTemplateRoot, isCustomField, isEmptyModeValue, isFileField, isFileTypeAccepted, isJsonObject, isPathCollapsed, isPromptTokenNode, isTextGenerationModel, isValueModeEnvelope, keepFolderSearchOnEscape, literalValues, loadDateLocale, loadingDotsVariants, markerVariants, messageActionsVariants, normalizeRichTextTokens, normalizeVariablePath, optionDomId, promptSuggestionVariants, promptSuggestionsListVariants, removeValueAtPath, resolveHomeGeography, resolveLabels, resolveVariables, schemaDisplayType, setEditorTokens, setValueAtPath, sidebarMenuButtonVariants, spinnerVariants, thinkingIndicatorVariants, toast, toggleVariants, toolCallVariants, useChatComposer, useDateLocale, useDatePickerStrings, useInputGroup, useJsonTreeViewStrings, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, useModelPickerState, useSidebar, useWatch, validateFiles, validationPlugin, workflowPlugin };
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
resolveUse12Hour: ()=>resolveUse12Hour,
|
|
28
|
+
getLoadedDateLocale: ()=>getLoadedDateLocale,
|
|
29
|
+
loadDateLocale: ()=>loadDateLocale,
|
|
30
|
+
isTwelveHourPattern: ()=>isTwelveHourPattern,
|
|
31
|
+
formatLongDate: ()=>formatLongDate,
|
|
32
|
+
formatMediumDate: ()=>formatMediumDate,
|
|
33
|
+
localeTimePattern: ()=>localeTimePattern,
|
|
34
|
+
formatDateTime: ()=>formatDateTime
|
|
35
|
+
});
|
|
36
|
+
const external_date_fns_namespaceObject = require("date-fns");
|
|
37
|
+
const en_US_namespaceObject = require("date-fns/locale/en-US");
|
|
38
|
+
const LOADERS = new Map([
|
|
39
|
+
[
|
|
40
|
+
'en',
|
|
41
|
+
()=>import("react-day-picker/locale/en-US").then((m)=>m.enUS)
|
|
42
|
+
],
|
|
43
|
+
[
|
|
44
|
+
'de',
|
|
45
|
+
()=>import("react-day-picker/locale/de").then((m)=>m.de)
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
'es',
|
|
49
|
+
()=>import("react-day-picker/locale/es").then((m)=>m.es)
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
'fr',
|
|
53
|
+
()=>import("react-day-picker/locale/fr").then((m)=>m.fr)
|
|
54
|
+
],
|
|
55
|
+
[
|
|
56
|
+
'ja',
|
|
57
|
+
()=>import("react-day-picker/locale/ja").then((m)=>m.ja)
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
'ko',
|
|
61
|
+
()=>import("react-day-picker/locale/ko").then((m)=>m.ko)
|
|
62
|
+
],
|
|
63
|
+
[
|
|
64
|
+
'pt',
|
|
65
|
+
()=>import("react-day-picker/locale/pt").then((m)=>m.pt)
|
|
66
|
+
],
|
|
67
|
+
[
|
|
68
|
+
'pt-br',
|
|
69
|
+
()=>import("react-day-picker/locale/pt-BR").then((m)=>m.ptBR)
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
'ro',
|
|
73
|
+
()=>import("react-day-picker/locale/ro").then((m)=>m.ro)
|
|
74
|
+
],
|
|
75
|
+
[
|
|
76
|
+
'ru',
|
|
77
|
+
()=>import("react-day-picker/locale/ru").then((m)=>m.ru)
|
|
78
|
+
],
|
|
79
|
+
[
|
|
80
|
+
'tr',
|
|
81
|
+
()=>import("react-day-picker/locale/tr").then((m)=>m.tr)
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
'zh',
|
|
85
|
+
()=>import("react-day-picker/locale/zh-CN").then((m)=>m.zhCN)
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
'zh-cn',
|
|
89
|
+
()=>import("react-day-picker/locale/zh-CN").then((m)=>m.zhCN)
|
|
90
|
+
],
|
|
91
|
+
[
|
|
92
|
+
'zh-tw',
|
|
93
|
+
()=>import("react-day-picker/locale/zh-TW").then((m)=>m.zhTW)
|
|
94
|
+
]
|
|
95
|
+
]);
|
|
96
|
+
const loaded = new Map();
|
|
97
|
+
const pending = new Map();
|
|
98
|
+
function loaderKey(tag) {
|
|
99
|
+
const normalized = tag.trim().replace(/_/g, '-').toLowerCase();
|
|
100
|
+
if (LOADERS.has(normalized)) return normalized;
|
|
101
|
+
const base = normalized.split('-')[0];
|
|
102
|
+
return LOADERS.has(base) ? base : void 0;
|
|
103
|
+
}
|
|
104
|
+
function getLoadedDateLocale(tag) {
|
|
105
|
+
const key = loaderKey(tag);
|
|
106
|
+
return key ? loaded.get(key) : void 0;
|
|
107
|
+
}
|
|
108
|
+
function loadDateLocale(tag) {
|
|
109
|
+
const key = loaderKey(tag);
|
|
110
|
+
const load = key ? LOADERS.get(key) : void 0;
|
|
111
|
+
if (!key || !load) return Promise.resolve(void 0);
|
|
112
|
+
const done = loaded.get(key);
|
|
113
|
+
if (done) return Promise.resolve(done);
|
|
114
|
+
let promise = pending.get(key);
|
|
115
|
+
if (!promise) {
|
|
116
|
+
promise = load().then((locale)=>{
|
|
117
|
+
loaded.set(key, locale);
|
|
118
|
+
return locale;
|
|
119
|
+
}).catch(()=>void 0).finally(()=>pending.delete(key));
|
|
120
|
+
pending.set(key, promise);
|
|
121
|
+
}
|
|
122
|
+
return promise;
|
|
123
|
+
}
|
|
124
|
+
function patternTokens(pattern) {
|
|
125
|
+
return pattern.replace(/'[^']*'/g, '');
|
|
126
|
+
}
|
|
127
|
+
function localeTimePattern(locale) {
|
|
128
|
+
return locale?.formatLong?.time({
|
|
129
|
+
width: 'short'
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function isTwelveHourPattern(pattern) {
|
|
133
|
+
return /[hK]/.test(patternTokens(pattern));
|
|
134
|
+
}
|
|
135
|
+
function resolveUse12Hour(use12Hour, locale) {
|
|
136
|
+
if (void 0 !== use12Hour) return use12Hour;
|
|
137
|
+
const native = localeTimePattern(locale);
|
|
138
|
+
return native ? isTwelveHourPattern(native) : false;
|
|
139
|
+
}
|
|
140
|
+
function timePattern(locale, use12Hour) {
|
|
141
|
+
const native = localeTimePattern(locale);
|
|
142
|
+
if (native && (void 0 === use12Hour || isTwelveHourPattern(native) === use12Hour)) return native;
|
|
143
|
+
return use12Hour ? 'hh:mm a' : 'HH:mm';
|
|
144
|
+
}
|
|
145
|
+
function formatLongDate(date, locale) {
|
|
146
|
+
return (0, external_date_fns_namespaceObject.format)(date, 'PPP', {
|
|
147
|
+
locale
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function formatMediumDate(date, locale) {
|
|
151
|
+
return (0, external_date_fns_namespaceObject.format)(date, 'PP', {
|
|
152
|
+
locale
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function formatDateTime(date, locale, use12Hour) {
|
|
156
|
+
const join = (locale ?? en_US_namespaceObject.enUS).formatLong.dateTime({
|
|
157
|
+
width: 'long'
|
|
158
|
+
});
|
|
159
|
+
const pattern = join.replace('{{date}}', 'PPP').replace('{{time}}', timePattern(locale, use12Hour));
|
|
160
|
+
return (0, external_date_fns_namespaceObject.format)(date, pattern, {
|
|
161
|
+
locale
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
exports.formatDateTime = __webpack_exports__.formatDateTime;
|
|
165
|
+
exports.formatLongDate = __webpack_exports__.formatLongDate;
|
|
166
|
+
exports.formatMediumDate = __webpack_exports__.formatMediumDate;
|
|
167
|
+
exports.getLoadedDateLocale = __webpack_exports__.getLoadedDateLocale;
|
|
168
|
+
exports.isTwelveHourPattern = __webpack_exports__.isTwelveHourPattern;
|
|
169
|
+
exports.loadDateLocale = __webpack_exports__.loadDateLocale;
|
|
170
|
+
exports.localeTimePattern = __webpack_exports__.localeTimePattern;
|
|
171
|
+
exports.resolveUse12Hour = __webpack_exports__.resolveUse12Hour;
|
|
172
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
173
|
+
"formatDateTime",
|
|
174
|
+
"formatLongDate",
|
|
175
|
+
"formatMediumDate",
|
|
176
|
+
"getLoadedDateLocale",
|
|
177
|
+
"isTwelveHourPattern",
|
|
178
|
+
"loadDateLocale",
|
|
179
|
+
"localeTimePattern",
|
|
180
|
+
"resolveUse12Hour"
|
|
181
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
182
|
+
Object.defineProperty(exports, '__esModule', {
|
|
183
|
+
value: true
|
|
184
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DayPickerLocale } from 'react-day-picker/locale';
|
|
2
|
+
/**
|
|
3
|
+
* A date-fns locale, optionally carrying react-day-picker's translated calendar labels.
|
|
4
|
+
* The locales exported by `react-day-picker/locale` are of this type.
|
|
5
|
+
*/
|
|
6
|
+
export type DateLocale = DayPickerLocale;
|
|
7
|
+
/** The locale for a language tag if it has already loaded, without loading it. */
|
|
8
|
+
export declare function getLoadedDateLocale(tag: string): DateLocale | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Loads the date locale for a platform language tag (`'de'`, `'pt-BR'`, `'zh-TW'`). Resolves
|
|
11
|
+
* to `undefined` for a language with no bundled locale, which renders in English. Await it
|
|
12
|
+
* before the first render to avoid showing English while the language loads.
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadDateLocale(tag: string): Promise<DateLocale | undefined>;
|
|
15
|
+
/** The locale's own short time pattern, e.g. `h:mm a` in English or `HH:mm` in German. */
|
|
16
|
+
export declare function localeTimePattern(locale: DateLocale | undefined): string | undefined;
|
|
17
|
+
export declare function isTwelveHourPattern(pattern: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The hour cycle to show: an explicit choice wins, then the locale's own, then 24-hour,
|
|
20
|
+
* which is what the pickers showed before they took a locale.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveUse12Hour(use12Hour: boolean | undefined, locale?: DateLocale): boolean;
|
|
23
|
+
/** A long date, e.g. "June 15th, 2024" or "15. Juni 2024". */
|
|
24
|
+
export declare function formatLongDate(date: Date, locale?: DateLocale): string;
|
|
25
|
+
/** A medium date, e.g. "Jun 15, 2024" or "15.06.2024". */
|
|
26
|
+
export declare function formatMediumDate(date: Date, locale?: DateLocale): string;
|
|
27
|
+
/**
|
|
28
|
+
* A long date and a time, joined the way the language joins them: "June 15th, 2024 at 14:30",
|
|
29
|
+
* "15. Juni 2024 um 14:30", "2024年6月15日 14:30".
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatDateTime(date: Date, locale: DateLocale | undefined, use12Hour: boolean | undefined): string;
|