@planningcenter/tapestry 3.2.1-rc.2 → 3.2.1-rc.4
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/combo-box/ComboBox.d.ts +65 -0
- package/dist/components/combo-box/ComboBox.d.ts.map +1 -0
- package/dist/components/combo-box/ComboBox.js +30 -0
- package/dist/components/combo-box/ComboBox.js.map +1 -0
- package/dist/components/combo-box/index.d.ts +4 -0
- package/dist/components/combo-box/index.d.ts.map +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +8 -7
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.js +15 -1
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/date-picker/index.d.ts +1 -1
- package/dist/components/date-picker/index.d.ts.map +1 -1
- package/dist/components/page-header/index.js +3 -3
- package/dist/components/sidenav/index.js +5 -5
- package/dist/ext/@internationalized/date/dist/CalendarDate.js +153 -0
- package/dist/ext/@internationalized/date/dist/CalendarDate.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/GregorianCalendar.js +139 -0
- package/dist/ext/@internationalized/date/dist/GregorianCalendar.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/conversion.js +156 -0
- package/dist/ext/@internationalized/date/dist/conversion.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/manipulation.js +219 -0
- package/dist/ext/@internationalized/date/dist/manipulation.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/queries.js +26 -0
- package/dist/ext/@internationalized/date/dist/queries.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/string.js +38 -0
- package/dist/ext/@internationalized/date/dist/string.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/utils.js +16 -0
- package/dist/ext/@internationalized/date/dist/utils.js.map +1 -0
- package/dist/ext/@swc/helpers/esm/_check_private_redeclaration.js +8 -0
- package/dist/ext/@swc/helpers/esm/_check_private_redeclaration.js.map +1 -0
- package/dist/ext/@swc/helpers/esm/_class_private_field_init.js +9 -0
- package/dist/ext/@swc/helpers/esm/_class_private_field_init.js.map +1 -0
- package/dist/index.css +2 -3
- package/dist/index.css.map +1 -1
- package/dist/packages/tapestry-wc/dist/components/p-Bc3D1UhE.js +41 -0
- package/dist/packages/tapestry-wc/dist/components/p-Bc3D1UhE.js.map +1 -0
- package/dist/packages/tapestry-wc/dist/components/p-CNhTorvM.js +51 -0
- package/dist/packages/tapestry-wc/dist/components/p-CNhTorvM.js.map +1 -0
- package/dist/packages/tapestry-wc/dist/components/p-D8qDXp6N.js +1736 -0
- package/dist/packages/tapestry-wc/dist/components/p-D8qDXp6N.js.map +1 -0
- package/dist/packages/tapestry-wc/dist/components/p-DT6EbtzB.js +22 -0
- package/dist/packages/tapestry-wc/dist/components/p-DT6EbtzB.js.map +1 -0
- package/dist/packages/tapestry-wc/dist/components/p-asSY9hZ8.js +886 -0
- package/dist/packages/tapestry-wc/dist/components/p-asSY9hZ8.js.map +1 -0
- package/dist/packages/tapestry-wc/dist/components/tds-page-header-nav.js +10 -0
- package/dist/packages/tapestry-wc/dist/components/tds-page-header-nav.js.map +1 -0
- package/dist/packages/tapestry-wc/dist/components/tds-page-header.js +63 -0
- package/dist/packages/tapestry-wc/dist/components/tds-page-header.js.map +1 -0
- package/dist/packages/tapestry-wc/dist/components/tds-sidenav-item.js +96 -0
- package/dist/packages/tapestry-wc/dist/components/tds-sidenav-item.js.map +1 -0
- package/dist/packages/tapestry-wc/dist/components/tds-sidenav-responsive-header.js +10 -0
- package/dist/packages/tapestry-wc/dist/components/tds-sidenav-responsive-header.js.map +1 -0
- package/dist/packages/tapestry-wc/dist/components/tds-sidenav-section.js +52 -0
- package/dist/packages/tapestry-wc/dist/components/tds-sidenav-section.js.map +1 -0
- package/dist/packages/tapestry-wc/dist/components/tds-sidenav.js +74 -0
- package/dist/packages/tapestry-wc/dist/components/tds-sidenav.js.map +1 -0
- package/dist/reactRender.css +837 -555
- package/dist/reactRender.css.map +1 -1
- package/dist/reactRenderLegacy.css +837 -555
- package/dist/reactRenderLegacy.css.map +1 -1
- package/dist/unstable.css +285 -3
- package/dist/unstable.css.map +1 -1
- package/dist/unstable.d.ts +1 -0
- package/dist/unstable.d.ts.map +1 -1
- package/dist/unstable.js +1 -0
- package/dist/unstable.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import "./index.css";
|
|
2
|
+
import React, { type AriaAttributes, type ReactNode } from "react";
|
|
3
|
+
import type { Key, ListBoxItemProps, ListBoxSectionProps } from "react-aria-components";
|
|
4
|
+
export type ComboBoxSize = "md" | "lg";
|
|
5
|
+
export interface ComboBoxProps<T extends object = object> {
|
|
6
|
+
/** Whether the combo box allows the menu to be open when the collection is empty. */
|
|
7
|
+
allowsEmptyCollection?: boolean;
|
|
8
|
+
/** The children of the combo box (ComboBoxItem elements or a render function). */
|
|
9
|
+
children: ReactNode | ((item: T) => ReactNode);
|
|
10
|
+
/** The default uncontrolled value of the text input. */
|
|
11
|
+
defaultInputValue?: string;
|
|
12
|
+
/** The default list of items (uncontrolled dynamic collection). */
|
|
13
|
+
defaultItems?: Iterable<T>;
|
|
14
|
+
/** The default uncontrolled selected value. */
|
|
15
|
+
defaultValue?: Key | null;
|
|
16
|
+
/** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */
|
|
17
|
+
description?: string;
|
|
18
|
+
/** Disables the field and trigger button. */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Item keys that are disabled and cannot be selected or focused. */
|
|
21
|
+
disabledKeys?: Iterable<Key>;
|
|
22
|
+
/** Custom filter function for determining if an item should appear in the list. */
|
|
23
|
+
filter?: (textValue: string, inputValue: string) => boolean;
|
|
24
|
+
/** If `true`, the `label` text is rendered as an `aria-label` instead of a visible label element. */
|
|
25
|
+
hideLabel?: boolean;
|
|
26
|
+
/** The controlled value of the text input. */
|
|
27
|
+
inputValue?: string;
|
|
28
|
+
/** Whether the input is in an invalid state. */
|
|
29
|
+
invalid?: boolean;
|
|
30
|
+
/** The list of items (controlled dynamic collection). */
|
|
31
|
+
items?: Iterable<T>;
|
|
32
|
+
/** Accessible label for the field. */
|
|
33
|
+
label: string;
|
|
34
|
+
/** Controls when the listbox opens. */
|
|
35
|
+
menuTrigger?: "focus" | "input" | "manual";
|
|
36
|
+
/** Field name for form submission. */
|
|
37
|
+
name?: string;
|
|
38
|
+
/** Called when the selected value changes. */
|
|
39
|
+
onChange?: (value: Key | null) => void;
|
|
40
|
+
/** Called when the input text changes. */
|
|
41
|
+
onInputChange?: (value: string) => void;
|
|
42
|
+
/** Placeholder text for the input. */
|
|
43
|
+
placeholder?: string;
|
|
44
|
+
/** If `true`, allows the value to be read but not changed. */
|
|
45
|
+
readOnly?: boolean;
|
|
46
|
+
/** If `true`, appends an asterisk at the end of the label text. */
|
|
47
|
+
required?: boolean;
|
|
48
|
+
/** The size of the combo box. */
|
|
49
|
+
size?: ComboBoxSize;
|
|
50
|
+
/** The controlled selected value. */
|
|
51
|
+
value?: Key | null;
|
|
52
|
+
}
|
|
53
|
+
export type ComboBoxElementProps<T extends object = object> = ComboBoxProps<T> & Omit<AriaAttributes, keyof ComboBoxProps<T>> & {
|
|
54
|
+
className?: string;
|
|
55
|
+
id?: string;
|
|
56
|
+
};
|
|
57
|
+
export declare function ComboBox<T extends object>({ allowsEmptyCollection, children, className, defaultInputValue, defaultItems, defaultValue, description, disabled, disabledKeys, filter, hideLabel, inputValue, invalid, items, label, menuTrigger, name, onChange, onInputChange, placeholder, readOnly, required, size, value, ...restProps }: ComboBoxElementProps<T>): React.JSX.Element;
|
|
58
|
+
export declare function ComboBoxItem<T extends object>(props: ListBoxItemProps<T>): React.JSX.Element;
|
|
59
|
+
interface ComboBoxSectionProps<T extends object> extends Omit<ListBoxSectionProps<T>, "children"> {
|
|
60
|
+
children: ReactNode;
|
|
61
|
+
title?: string;
|
|
62
|
+
}
|
|
63
|
+
export declare function ComboBoxSection<T extends object>({ children, title, ...props }: ComboBoxSectionProps<T>): React.JSX.Element;
|
|
64
|
+
export {};
|
|
65
|
+
//# sourceMappingURL=ComboBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboBox.d.ts","sourceRoot":"","sources":["../../../src/components/combo-box/ComboBox.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAIpB,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAClE,OAAO,KAAK,EACV,GAAG,EACH,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,uBAAuB,CAAA;AAe9B,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,CAAA;AAEtC,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACtD,qFAAqF;IACrF,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,kFAAkF;IAClF,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,CAAC,CAAA;IAC9C,wDAAwD;IACxD,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,mEAAmE;IACnE,YAAY,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;IAC1B,+CAA+C;IAC/C,YAAY,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;IACzB,gGAAgG;IAChG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qEAAqE;IACrE,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAA;IAC5B,mFAAmF;IACnF,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAA;IAC3D,qGAAqG;IACrG,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAA;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ACX,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,IAAW,EACX,KAAK,EACL,GAAG,SAAS,EACb,EAAE,oBAAoB,CAAC,CAAC,CAAC,qBAoDzB;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,qBAOxE;AAED,UAAU,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAC7C,SAAQ,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC;IAChD,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,EAChD,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,CAAC,qBAYzB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import Icon from '../../utilities/Icon.js';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import { ComboBox as ComboBox$1, Label, Group, Input, Button, Popover, ListBox, Text, ListBoxItem, ListBoxSection, Header } from 'react-aria-components';
|
|
5
|
+
|
|
6
|
+
function ComboBox({ allowsEmptyCollection, children, className, defaultInputValue, defaultItems, defaultValue, description, disabled, disabledKeys, filter, hideLabel, inputValue, invalid, items, label, menuTrigger, name, onChange, onInputChange, placeholder, readOnly, required, size = "md", value, ...restProps }) {
|
|
7
|
+
const combinedClassName = classNames("tds-combo-box", { "tds-combo-box--lg": size === "lg" }, className);
|
|
8
|
+
return (React__default.createElement(ComboBox$1, { ...restProps, allowsEmptyCollection: allowsEmptyCollection, "aria-label": hideLabel ? label : undefined, className: combinedClassName, defaultFilter: filter, defaultInputValue: defaultInputValue, defaultItems: defaultItems, defaultValue: defaultValue, disabledKeys: disabledKeys, inputValue: inputValue, isDisabled: disabled, isInvalid: invalid, isReadOnly: readOnly, isRequired: required, items: items, menuTrigger: menuTrigger, name: name, onChange: onChange ?? undefined, onInputChange: onInputChange, value: value },
|
|
9
|
+
!hideLabel && React__default.createElement(Label, { className: "tds-combo-box-label" }, label),
|
|
10
|
+
React__default.createElement(Group, { className: "tds-combo-box-field" },
|
|
11
|
+
React__default.createElement(Input, { className: "tds-combo-box-input", placeholder: placeholder }),
|
|
12
|
+
React__default.createElement(Button, { className: "tds-combo-box-button" },
|
|
13
|
+
React__default.createElement(Icon, { "aria-hidden": true, symbol: "general#down-caret" }))),
|
|
14
|
+
React__default.createElement(Popover, { className: "tds-combo-box-popover" },
|
|
15
|
+
React__default.createElement(ListBox, { className: "tds-combo-box-list" }, children)),
|
|
16
|
+
description && (React__default.createElement(Text, { className: "tds-combo-box-description", slot: "description" },
|
|
17
|
+
React__default.createElement(Icon, { "aria-hidden": true, className: "tds-combo-box-description-invalid-icon", symbol: "general#exclamation-triangle" }),
|
|
18
|
+
description))));
|
|
19
|
+
}
|
|
20
|
+
function ComboBoxItem(props) {
|
|
21
|
+
return (React__default.createElement(ListBoxItem, { ...props, className: classNames("tds-combo-box-list-item", props.className) }));
|
|
22
|
+
}
|
|
23
|
+
function ComboBoxSection({ children, title, ...props }) {
|
|
24
|
+
return (React__default.createElement(ListBoxSection, { ...props, className: classNames("tds-combo-box-list-section", props.className) },
|
|
25
|
+
title && (React__default.createElement(Header, { className: "tds-combo-box-section-header" }, title)),
|
|
26
|
+
children));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { ComboBox, ComboBoxItem, ComboBoxSection };
|
|
30
|
+
//# sourceMappingURL=ComboBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboBox.js","sources":["../../../src/components/combo-box/ComboBox.tsx"],"sourcesContent":["import \"./index.css\"\n\nimport Icon from \"@utilities/Icon\"\nimport classNames from \"classnames\"\nimport React, { type AriaAttributes, type ReactNode } from \"react\"\nimport type {\n Key,\n ListBoxItemProps,\n ListBoxSectionProps,\n} from \"react-aria-components\"\nimport {\n Button,\n ComboBox as AriaComboBox,\n Group,\n Header,\n Input,\n Label,\n ListBox,\n ListBoxItem,\n ListBoxSection,\n Popover,\n Text,\n} from \"react-aria-components\"\n\nexport type ComboBoxSize = \"md\" | \"lg\"\n\nexport interface ComboBoxProps<T extends object = object> {\n /** Whether the combo box allows the menu to be open when the collection is empty. */\n allowsEmptyCollection?: boolean\n /** The children of the combo box (ComboBoxItem elements or a render function). */\n children: ReactNode | ((item: T) => ReactNode)\n /** The default uncontrolled value of the text input. */\n defaultInputValue?: string\n /** The default list of items (uncontrolled dynamic collection). */\n defaultItems?: Iterable<T>\n /** The default uncontrolled selected value. */\n defaultValue?: Key | null\n /** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */\n description?: string\n /** Disables the field and trigger button. */\n disabled?: boolean\n /** Item keys that are disabled and cannot be selected or focused. */\n disabledKeys?: Iterable<Key>\n /** Custom filter function for determining if an item should appear in the list. */\n filter?: (textValue: string, inputValue: string) => boolean\n /** If `true`, the `label` text is rendered as an `aria-label` instead of a visible label element. */\n hideLabel?: boolean\n /** The controlled value of the text input. */\n inputValue?: string\n /** Whether the input is in an invalid state. */\n invalid?: boolean\n /** The list of items (controlled dynamic collection). */\n items?: Iterable<T>\n /** Accessible label for the field. */\n label: string\n /** Controls when the listbox opens. */\n menuTrigger?: \"focus\" | \"input\" | \"manual\"\n /** Field name for form submission. */\n name?: string\n /** Called when the selected value changes. */\n onChange?: (value: Key | null) => void\n /** Called when the input text changes. */\n onInputChange?: (value: string) => void\n /** Placeholder text for the input. */\n placeholder?: string\n /** If `true`, allows the value to be read but not changed. */\n readOnly?: boolean\n /** If `true`, appends an asterisk at the end of the label text. */\n required?: boolean\n /** The size of the combo box. */\n size?: ComboBoxSize\n /** The controlled selected value. */\n value?: Key | null\n}\n\nexport type ComboBoxElementProps<T extends object = object> = ComboBoxProps<T> &\n Omit<AriaAttributes, keyof ComboBoxProps<T>> & {\n className?: string\n id?: string\n }\n\nexport function ComboBox<T extends object>({\n allowsEmptyCollection,\n children,\n className,\n defaultInputValue,\n defaultItems,\n defaultValue,\n description,\n disabled,\n disabledKeys,\n filter,\n hideLabel,\n inputValue,\n invalid,\n items,\n label,\n menuTrigger,\n name,\n onChange,\n onInputChange,\n placeholder,\n readOnly,\n required,\n size = \"md\",\n value,\n ...restProps\n}: ComboBoxElementProps<T>) {\n const combinedClassName = classNames(\n \"tds-combo-box\",\n { \"tds-combo-box--lg\": size === \"lg\" },\n className\n )\n\n return (\n <AriaComboBox\n {...restProps}\n allowsEmptyCollection={allowsEmptyCollection}\n aria-label={hideLabel ? label : undefined}\n className={combinedClassName}\n defaultFilter={filter}\n defaultInputValue={defaultInputValue}\n defaultItems={defaultItems}\n defaultValue={defaultValue}\n disabledKeys={disabledKeys}\n inputValue={inputValue}\n isDisabled={disabled}\n isInvalid={invalid}\n isReadOnly={readOnly}\n isRequired={required}\n items={items}\n menuTrigger={menuTrigger}\n name={name}\n onChange={onChange ?? undefined}\n onInputChange={onInputChange}\n value={value}\n >\n {!hideLabel && <Label className=\"tds-combo-box-label\">{label}</Label>}\n <Group className=\"tds-combo-box-field\">\n <Input className=\"tds-combo-box-input\" placeholder={placeholder} />\n <Button className=\"tds-combo-box-button\">\n <Icon aria-hidden symbol=\"general#down-caret\" />\n </Button>\n </Group>\n <Popover className=\"tds-combo-box-popover\">\n <ListBox className=\"tds-combo-box-list\">{children}</ListBox>\n </Popover>\n {description && (\n <Text className=\"tds-combo-box-description\" slot=\"description\">\n <Icon\n aria-hidden\n className=\"tds-combo-box-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n />\n {description}\n </Text>\n )}\n </AriaComboBox>\n )\n}\n\nexport function ComboBoxItem<T extends object>(props: ListBoxItemProps<T>) {\n return (\n <ListBoxItem\n {...props}\n className={classNames(\"tds-combo-box-list-item\", props.className)}\n />\n )\n}\n\ninterface ComboBoxSectionProps<T extends object>\n extends Omit<ListBoxSectionProps<T>, \"children\"> {\n children: ReactNode\n title?: string\n}\n\nexport function ComboBoxSection<T extends object>({\n children,\n title,\n ...props\n}: ComboBoxSectionProps<T>) {\n return (\n <ListBoxSection\n {...props}\n className={classNames(\"tds-combo-box-list-section\", props.className)}\n >\n {title && (\n <Header className=\"tds-combo-box-section-header\">{title}</Header>\n )}\n {children}\n </ListBoxSection>\n )\n}\n"],"names":["React","AriaComboBox"],"mappings":";;;;;AAiFM,SAAU,QAAQ,CAAmB,EACzC,qBAAqB,EACrB,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,SAAS,EACT,UAAU,EACV,OAAO,EACP,KAAK,EACL,KAAK,EACL,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,IAAI,GAAG,IAAI,EACX,KAAK,EACL,GAAG,SAAS,EACY,EAAA;AACxB,IAAA,MAAM,iBAAiB,GAAG,UAAU,CAClC,eAAe,EACf,EAAE,mBAAmB,EAAE,IAAI,KAAK,IAAI,EAAE,EACtC,SAAS,CACV;AAED,IAAA,QACEA,cAAA,CAAA,aAAA,CAACC,UAAY,OACP,SAAS,EACb,qBAAqB,EAAE,qBAAqB,gBAChC,SAAS,GAAG,KAAK,GAAG,SAAS,EACzC,SAAS,EAAE,iBAAiB,EAC5B,aAAa,EAAE,MAAM,EACrB,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,QAAQ,EACpB,SAAS,EAAE,OAAO,EAClB,UAAU,EAAE,QAAQ,EACpB,UAAU,EAAE,QAAQ,EACpB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,QAAQ,EAA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AAK,EACL,GAAG,KAAK,EACgB,EAAA;AACxB,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,cAAc,EAAA,EAAA,GACT,KAAK,EACT,SAAS,EAAE,UAAU,CAAC,4BAA4B,EAAE,KAAK,CAAC,SAAS,CAAC,EAAA;QAEnE,KAAK,KACJA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,SAAS,EAAC,8BAA8B,EAAA,EAAE,KAAK,CAAU,CAClE;QACA,QAAQ,CACM;AAErB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/combo-box/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,YAAY,EACV,oBAAoB,EACpB,aAAa,EACb,YAAY,GACb,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
import type
|
|
2
|
+
import { type DateValue } from "@internationalized/date";
|
|
3
3
|
import React, { type AriaAttributes } from "react";
|
|
4
4
|
export type DatePickerSize = "md" | "lg";
|
|
5
|
+
export type DatePickerDateValue = DateValue | string;
|
|
5
6
|
export interface DatePickerProps {
|
|
6
7
|
/** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */
|
|
7
8
|
description?: string;
|
|
@@ -17,10 +18,10 @@ export interface DatePickerProps {
|
|
|
17
18
|
isDateUnavailable?: (date: DateValue) => boolean;
|
|
18
19
|
/** Accessible label for the field. */
|
|
19
20
|
label: string;
|
|
20
|
-
/** Maximum selectable date. */
|
|
21
|
-
max?:
|
|
22
|
-
/** Minimum selectable date. */
|
|
23
|
-
min?:
|
|
21
|
+
/** Maximum selectable date. Accepts a DateValue or ISO date string. */
|
|
22
|
+
max?: DatePickerDateValue;
|
|
23
|
+
/** Minimum selectable date. Accepts a DateValue or ISO date string. */
|
|
24
|
+
min?: DatePickerDateValue;
|
|
24
25
|
/** Called when the selected date changes. */
|
|
25
26
|
onChange?: (value: DateValue | null) => void;
|
|
26
27
|
/** If `true`, allows the value to be read but not changed. */
|
|
@@ -29,8 +30,8 @@ export interface DatePickerProps {
|
|
|
29
30
|
required?: boolean;
|
|
30
31
|
/** The size of the date picker. */
|
|
31
32
|
size?: DatePickerSize;
|
|
32
|
-
/** The controlled value. */
|
|
33
|
-
value?:
|
|
33
|
+
/** The controlled value. Accepts a DateValue or ISO date string. */
|
|
34
|
+
value?: DatePickerDateValue | null;
|
|
34
35
|
}
|
|
35
36
|
export type DatePickerElementProps = DatePickerProps & Omit<AriaAttributes, keyof DatePickerProps> & {
|
|
36
37
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,yBAAyB,CAAA;AAGnE,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAmBlD,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,CAAA;AAExC,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,MAAM,CAAA;AAepD,MAAM,WAAW,eAAe;IAC9B,gGAAgG;IAChG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,4FAA4F;IAC5F,cAAc,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAA;IACtE,qGAAqG;IACrG,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,gDAAgD;IAChD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,OAAO,CAAA;IAChD,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,GAAG,CAAC,EAAE,mBAAmB,CAAA;IACzB,uEAAuE;IACvE,GAAG,CAAC,EAAE,mBAAmB,CAAA;IACzB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAA;IAC5C,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mCAAmC;IACnC,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,oEAAoE;IACpE,KAAK,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;CACnC;AAED,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAClD,IAAI,CAAC,cAAc,EAAE,MAAM,eAAe,CAAC,GAAG;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA;AAEH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,cAAc,EACd,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,KAAK,EACL,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,IAAW,EACX,KAAK,EACL,GAAG,SAAS,EACb,EAAE,sBAAsB,qBA6FxB;yBA9Ge,UAAU"}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
+
import { parseDate as $fae977aafc393c5c$export$6b862160d295c8e } from './../../ext/@internationalized/date/dist/string.js';
|
|
1
2
|
import Icon from '../../utilities/Icon.js';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import React__default from 'react';
|
|
4
5
|
import { DatePicker as DatePicker$1, Label, Group, DateInput, DateSegment, Button, Popover, Calendar, Heading, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, Text } from 'react-aria-components';
|
|
5
6
|
|
|
7
|
+
function toCalendarDate(input) {
|
|
8
|
+
if (input === null)
|
|
9
|
+
return null;
|
|
10
|
+
if (input === undefined)
|
|
11
|
+
return undefined;
|
|
12
|
+
if (typeof input === "object" && "calendar" in input) {
|
|
13
|
+
return input;
|
|
14
|
+
}
|
|
15
|
+
return $fae977aafc393c5c$export$6b862160d295c8e(input);
|
|
16
|
+
}
|
|
6
17
|
function DatePicker({ className, description, disabled, firstDayOfWeek, hideLabel, invalid, isDateUnavailable, label, max, min, onChange, readOnly, required, size = "md", value, ...restProps }) {
|
|
18
|
+
const convertedValue = toCalendarDate(value);
|
|
19
|
+
const convertedMin = toCalendarDate(min) ?? undefined;
|
|
20
|
+
const convertedMax = toCalendarDate(max) ?? undefined;
|
|
7
21
|
const combinedClassName = classNames("tds-date-picker", { "tds-date-picker--lg": size === "lg" }, className);
|
|
8
|
-
return (React__default.createElement(DatePicker$1, { ...restProps, "aria-label": hideLabel ? label : undefined, className: combinedClassName, isDateUnavailable: isDateUnavailable, isDisabled: disabled, isInvalid: invalid, isReadOnly: readOnly, isRequired: required, maxValue:
|
|
22
|
+
return (React__default.createElement(DatePicker$1, { ...restProps, "aria-label": hideLabel ? label : undefined, className: combinedClassName, isDateUnavailable: isDateUnavailable, isDisabled: disabled, isInvalid: invalid, isReadOnly: readOnly, isRequired: required, maxValue: convertedMax, minValue: convertedMin, onChange: onChange ?? undefined, value: convertedValue },
|
|
9
23
|
!hideLabel && React__default.createElement(Label, { className: "tds-date-picker-label" }, label),
|
|
10
24
|
React__default.createElement(Group, { className: "tds-date-picker-field" },
|
|
11
25
|
React__default.createElement(DateInput, { className: "tds-date-picker-input" }, (segment) => (React__default.createElement(DateSegment, { className: segment.type === "literal"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.js","sources":["../../../src/components/date-picker/DatePicker.tsx"],"sourcesContent":["import \"./index.css\"\n\nimport type
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sources":["../../../src/components/date-picker/DatePicker.tsx"],"sourcesContent":["import \"./index.css\"\n\nimport { type DateValue, parseDate } from \"@internationalized/date\"\nimport Icon from \"@utilities/Icon\"\nimport classNames from \"classnames\"\nimport React, { type AriaAttributes } from \"react\"\nimport {\n Button,\n Calendar,\n CalendarCell,\n CalendarGrid,\n CalendarGridBody,\n CalendarGridHeader,\n CalendarHeaderCell,\n DateInput,\n DatePicker as AriaDatePicker,\n DateSegment,\n Group,\n Heading,\n Label,\n Popover,\n Text,\n} from \"react-aria-components\"\n\nexport type DatePickerSize = \"md\" | \"lg\"\n\nexport type DatePickerDateValue = DateValue | string\n\nfunction toCalendarDate(\n input: DatePickerDateValue | null | undefined\n): DateValue | null | undefined {\n if (input === null) return null\n if (input === undefined) return undefined\n\n if (typeof input === \"object\" && \"calendar\" in input) {\n return input\n }\n\n return parseDate(input)\n}\n\nexport interface DatePickerProps {\n /** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */\n description?: string\n /** Disables the input and calendar button. */\n disabled?: boolean\n /** Sets the first day of the week in the calendar. Defaults to locale-appropriate value. */\n firstDayOfWeek?: \"fri\" | \"mon\" | \"sat\" | \"sun\" | \"thu\" | \"tue\" | \"wed\"\n /** If `true`, the `label` text is rendered as an `aria-label` instead of a visible label element. */\n hideLabel?: boolean\n /** Whether the input is in an invalid state. */\n invalid?: boolean\n /** Callback that returns `true` for dates that should be visible but not selectable. */\n isDateUnavailable?: (date: DateValue) => boolean\n /** Accessible label for the field. */\n label: string\n /** Maximum selectable date. Accepts a DateValue or ISO date string. */\n max?: DatePickerDateValue\n /** Minimum selectable date. Accepts a DateValue or ISO date string. */\n min?: DatePickerDateValue\n /** Called when the selected date changes. */\n onChange?: (value: DateValue | null) => void\n /** If `true`, allows the value to be read but not changed. */\n readOnly?: boolean\n /** If `true`, appends an asterisk at the end of the label text. */\n required?: boolean\n /** The size of the date picker. */\n size?: DatePickerSize\n /** The controlled value. Accepts a DateValue or ISO date string. */\n value?: DatePickerDateValue | null\n}\n\nexport type DatePickerElementProps = DatePickerProps &\n Omit<AriaAttributes, keyof DatePickerProps> & {\n className?: string\n id?: string\n }\n\nexport function DatePicker({\n className,\n description,\n disabled,\n firstDayOfWeek,\n hideLabel,\n invalid,\n isDateUnavailable,\n label,\n max,\n min,\n onChange,\n readOnly,\n required,\n size = \"md\",\n value,\n ...restProps\n}: DatePickerElementProps) {\n const convertedValue = toCalendarDate(value)\n const convertedMin = toCalendarDate(min) ?? undefined\n const convertedMax = toCalendarDate(max) ?? undefined\n\n const combinedClassName = classNames(\n \"tds-date-picker\",\n { \"tds-date-picker--lg\": size === \"lg\" },\n className\n )\n\n return (\n <AriaDatePicker\n {...restProps}\n aria-label={hideLabel ? label : undefined}\n className={combinedClassName}\n isDateUnavailable={isDateUnavailable}\n isDisabled={disabled}\n isInvalid={invalid}\n isReadOnly={readOnly}\n isRequired={required}\n maxValue={convertedMax}\n minValue={convertedMin}\n onChange={onChange ?? undefined}\n value={convertedValue}\n >\n {!hideLabel && <Label className=\"tds-date-picker-label\">{label}</Label>}\n <Group className=\"tds-date-picker-field\">\n <DateInput className=\"tds-date-picker-input\">\n {(segment) => (\n <DateSegment\n className={\n segment.type === \"literal\"\n ? \"tds-date-picker-segment-separator\"\n : \"tds-date-picker-segment\"\n }\n segment={segment}\n />\n )}\n </DateInput>\n <Button className=\"tds-date-picker-button\">\n <Icon aria-hidden symbol=\"general#calendar\" />\n </Button>\n </Group>\n <Popover className=\"tds-date-picker-popover\">\n <Calendar\n className=\"tds-date-picker-calendar\"\n firstDayOfWeek={firstDayOfWeek}\n >\n <header className=\"tds-date-picker-calendar-header\">\n <Button className=\"tds-date-picker-calendar-nav\" slot=\"previous\">\n <Icon aria-hidden symbol=\"general#left-chevron\" />\n </Button>\n <Heading className=\"tds-date-picker-calendar-title\" />\n <Button className=\"tds-date-picker-calendar-nav\" slot=\"next\">\n <Icon aria-hidden symbol=\"general#right-chevron\" />\n </Button>\n </header>\n <CalendarGrid className=\"tds-date-picker-calendar-grid\">\n <CalendarGridHeader className=\"tds-date-picker-calendar-grid-header\">\n {(day) => (\n <CalendarHeaderCell className=\"tds-date-picker-calendar-header-cell\">\n {day}\n </CalendarHeaderCell>\n )}\n </CalendarGridHeader>\n <CalendarGridBody className=\"tds-date-picker-calendar-grid-body\">\n {(date) => (\n <CalendarCell\n className=\"tds-date-picker-calendar-cell\"\n date={date}\n />\n )}\n </CalendarGridBody>\n </CalendarGrid>\n </Calendar>\n </Popover>\n {description && (\n <Text\n elementType=\"p\"\n className=\"tds-date-picker-description\"\n slot=\"description\"\n >\n <Icon\n aria-hidden\n className=\"tds-date-picker-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n />\n {description}\n </Text>\n )}\n </AriaDatePicker>\n )\n}\n\nDatePicker.displayName = \"DatePicker\"\n"],"names":["parseDate","React","AriaDatePicker"],"mappings":";;;;;;AA4BA,SAAS,cAAc,CACrB,KAA6C,EAAA;IAE7C,IAAI,KAAK,KAAK,IAAI;AAAE,QAAA,OAAO,IAAI;IAC/B,IAAI,KAAK,KAAK,SAAS;AAAE,QAAA,OAAO,SAAS;IAEzC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,UAAU,IAAI,KAAK,EAAE;AACpD,QAAA,OAAO,KAAK;IACd;AAEA,IAAA,OAAOA,wCAAS,CAAC,KAAK,CAAC;AACzB;SAuCgB,UAAU,CAAC,EACzB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,cAAc,EACd,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,KAAK,EACL,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,IAAI,GAAG,IAAI,EACX,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S,EAAC,oCAAoC,EAAA,EAC7D,CAAC,IAAI,MACJA,cAAA,CAAA,aAAA,CAAC,YAAY,EAAA,EACX,SAAS,EAAC,+BAA+B,EACzC,IAAI,EAAE,IAAI,EAAA,CACV,CACH,CACgB,CACN,CACN,CACH;AACT,QAAA,WAAW,KACVA,cAAA,CAAA,aAAA,CAAC,IAAI,IACH,WAAW,EAAC,GAAG,EACf,SAAS,EAAC,6BAA6B,EACvC,IAAI,EAAC,aAAa,EAAA;YAElBA,cAAA,CAAA,aAAA,CAAC,IAAI,yBAEH,SAAS,EAAC,0CAA0C,EACpD,MAAM,EAAC,8BAA8B,EAAA,CACrC;AACD,YAAA,WAAW,CACP,CACR,CACc;AAErB;AAEA,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
export type { DatePickerElementProps, DatePickerProps, DatePickerSize, } from "./DatePicker";
|
|
2
|
+
export type { DatePickerDateValue, DatePickerElementProps, DatePickerProps, DatePickerSize, } from "./DatePicker";
|
|
3
3
|
export { DatePicker } from "./DatePicker";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,YAAY,EACV,sBAAsB,EACtB,eAAe,EACf,cAAc,GACf,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,cAAc,GACf,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import '../../tapestry-wc/dist/components/p-D8qDXp6N.js';
|
|
2
|
-
import { defineCustomElement } from '../../tapestry-wc/dist/components/tds-page-header.js';
|
|
3
|
-
import { defineCustomElement as defineCustomElement$1 } from '../../tapestry-wc/dist/components/tds-page-header-nav.js';
|
|
1
|
+
import '../../packages/tapestry-wc/dist/components/p-D8qDXp6N.js';
|
|
2
|
+
import { defineCustomElement } from '../../packages/tapestry-wc/dist/components/tds-page-header.js';
|
|
3
|
+
import { defineCustomElement as defineCustomElement$1 } from '../../packages/tapestry-wc/dist/components/tds-page-header-nav.js';
|
|
4
4
|
|
|
5
5
|
defineCustomElement();
|
|
6
6
|
defineCustomElement$1();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import '../../tapestry-wc/dist/components/p-D8qDXp6N.js';
|
|
2
|
-
import { defineCustomElement } from '../../tapestry-wc/dist/components/tds-sidenav.js';
|
|
3
|
-
import { defineCustomElement as defineCustomElement$1 } from '../../tapestry-wc/dist/components/tds-sidenav-item.js';
|
|
4
|
-
import { defineCustomElement as defineCustomElement$3 } from '../../tapestry-wc/dist/components/tds-sidenav-responsive-header.js';
|
|
5
|
-
import { defineCustomElement as defineCustomElement$2 } from '../../tapestry-wc/dist/components/tds-sidenav-section.js';
|
|
1
|
+
import '../../packages/tapestry-wc/dist/components/p-D8qDXp6N.js';
|
|
2
|
+
import { defineCustomElement } from '../../packages/tapestry-wc/dist/components/tds-sidenav.js';
|
|
3
|
+
import { defineCustomElement as defineCustomElement$1 } from '../../packages/tapestry-wc/dist/components/tds-sidenav-item.js';
|
|
4
|
+
import { defineCustomElement as defineCustomElement$3 } from '../../packages/tapestry-wc/dist/components/tds-sidenav-responsive-header.js';
|
|
5
|
+
import { defineCustomElement as defineCustomElement$2 } from '../../packages/tapestry-wc/dist/components/tds-sidenav-section.js';
|
|
6
6
|
|
|
7
7
|
defineCustomElement();
|
|
8
8
|
defineCustomElement$1();
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { add as $735220c2d4774dd3$export$e16d8520af44a096, subtract as $735220c2d4774dd3$export$4e2d2ead65e5f7e3, set as $735220c2d4774dd3$export$adaa4cf7ef1b65be, cycleDate as $735220c2d4774dd3$export$d52ced6badfb9a4c, constrain as $735220c2d4774dd3$export$c4e2ecac49351ef2, setTime as $735220c2d4774dd3$export$e5d5e1c1822b6e56, cycleTime as $735220c2d4774dd3$export$dd02b3e0007dfe28 } from './manipulation.js';
|
|
2
|
+
import { compareDate as $14e0f24ef4ac5c92$export$68781ddf31c0090f, compareTime as $14e0f24ef4ac5c92$export$c19a80a9721b80f6 } from './queries.js';
|
|
3
|
+
import { dateToString as $fae977aafc393c5c$export$60dfd74aa96791bd, dateTimeToString as $fae977aafc393c5c$export$4223de14708adc63 } from './string.js';
|
|
4
|
+
import { GregorianCalendar as $3b62074eb05584b2$export$80ee6245ec4f29ec } from './GregorianCalendar.js';
|
|
5
|
+
import { toDate as $11d87f3f76e88657$export$e67a095c620b86fe, toCalendarDateTime as $11d87f3f76e88657$export$b21e0b124e224484 } from './conversion.js';
|
|
6
|
+
import { _ as _class_private_field_init } from '../../../@swc/helpers/esm/_class_private_field_init.js';
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
10
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
15
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
16
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
17
|
+
* governing permissions and limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
function $35ea8db9cb2ccb90$var$shiftArgs(args) {
|
|
25
|
+
let calendar = typeof args[0] === 'object' ? args.shift() : new ($3b62074eb05584b2$export$80ee6245ec4f29ec)();
|
|
26
|
+
let era;
|
|
27
|
+
if (typeof args[0] === 'string') era = args.shift();
|
|
28
|
+
else {
|
|
29
|
+
let eras = calendar.getEras();
|
|
30
|
+
era = eras[eras.length - 1];
|
|
31
|
+
}
|
|
32
|
+
let year = args.shift();
|
|
33
|
+
let month = args.shift();
|
|
34
|
+
let day = args.shift();
|
|
35
|
+
return [
|
|
36
|
+
calendar,
|
|
37
|
+
era,
|
|
38
|
+
year,
|
|
39
|
+
month,
|
|
40
|
+
day
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
var // This prevents TypeScript from allowing other types with the same fields to match.
|
|
44
|
+
// i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.
|
|
45
|
+
// If that behavior is desired, use the AnyCalendarDate interface instead.
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
$35ea8db9cb2ccb90$var$_type = /*#__PURE__*/ new WeakMap();
|
|
48
|
+
class $35ea8db9cb2ccb90$export$99faa760c7908e4f {
|
|
49
|
+
/** Returns a copy of this date. */ copy() {
|
|
50
|
+
if (this.era) return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);
|
|
51
|
+
else return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);
|
|
52
|
+
}
|
|
53
|
+
/** Returns a new `CalendarDate` with the given duration added to it. */ add(duration) {
|
|
54
|
+
return ($735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
|
|
55
|
+
}
|
|
56
|
+
/** Returns a new `CalendarDate` with the given duration subtracted from it. */ subtract(duration) {
|
|
57
|
+
return ($735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
|
|
58
|
+
}
|
|
59
|
+
/** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
|
|
60
|
+
return ($735220c2d4774dd3$export$adaa4cf7ef1b65be)(this, fields);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
|
|
64
|
+
* When the resulting value reaches the limits of the field, it wraps around.
|
|
65
|
+
*/ cycle(field, amount, options) {
|
|
66
|
+
return ($735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
|
|
67
|
+
}
|
|
68
|
+
/** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */ toDate(timeZone) {
|
|
69
|
+
return ($11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone);
|
|
70
|
+
}
|
|
71
|
+
/** Converts the date to an ISO 8601 formatted string. */ toString() {
|
|
72
|
+
return ($fae977aafc393c5c$export$60dfd74aa96791bd)(this);
|
|
73
|
+
}
|
|
74
|
+
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
|
|
75
|
+
return ($14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
|
|
76
|
+
}
|
|
77
|
+
constructor(...args){
|
|
78
|
+
(_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type, {
|
|
79
|
+
writable: true,
|
|
80
|
+
value: void 0
|
|
81
|
+
});
|
|
82
|
+
let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
|
|
83
|
+
this.calendar = calendar;
|
|
84
|
+
this.era = era;
|
|
85
|
+
this.year = year;
|
|
86
|
+
this.month = month;
|
|
87
|
+
this.day = day;
|
|
88
|
+
($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
var // This prevents TypeScript from allowing other types with the same fields to match.
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
$35ea8db9cb2ccb90$var$_type2 = /*#__PURE__*/ new WeakMap();
|
|
94
|
+
class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
|
|
95
|
+
/** Returns a copy of this date. */ copy() {
|
|
96
|
+
if (this.era) return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
97
|
+
else return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
98
|
+
}
|
|
99
|
+
/** Returns a new `CalendarDateTime` with the given duration added to it. */ add(duration) {
|
|
100
|
+
return ($735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
|
|
101
|
+
}
|
|
102
|
+
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */ subtract(duration) {
|
|
103
|
+
return ($735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
|
|
104
|
+
}
|
|
105
|
+
/** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
|
|
106
|
+
return ($735220c2d4774dd3$export$adaa4cf7ef1b65be)(($735220c2d4774dd3$export$e5d5e1c1822b6e56)(this, fields), fields);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
|
|
110
|
+
* When the resulting value reaches the limits of the field, it wraps around.
|
|
111
|
+
*/ cycle(field, amount, options) {
|
|
112
|
+
switch(field){
|
|
113
|
+
case 'era':
|
|
114
|
+
case 'year':
|
|
115
|
+
case 'month':
|
|
116
|
+
case 'day':
|
|
117
|
+
return ($735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
|
|
118
|
+
default:
|
|
119
|
+
return ($735220c2d4774dd3$export$dd02b3e0007dfe28)(this, field, amount, options);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/** Converts the date to a native JavaScript Date object in the given time zone. */ toDate(timeZone, disambiguation) {
|
|
123
|
+
return ($11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone, disambiguation);
|
|
124
|
+
}
|
|
125
|
+
/** Converts the date to an ISO 8601 formatted string. */ toString() {
|
|
126
|
+
return ($fae977aafc393c5c$export$4223de14708adc63)(this);
|
|
127
|
+
}
|
|
128
|
+
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
|
|
129
|
+
let res = ($14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
|
|
130
|
+
if (res === 0) return ($14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, ($11d87f3f76e88657$export$b21e0b124e224484)(b));
|
|
131
|
+
return res;
|
|
132
|
+
}
|
|
133
|
+
constructor(...args){
|
|
134
|
+
(_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type2, {
|
|
135
|
+
writable: true,
|
|
136
|
+
value: void 0
|
|
137
|
+
});
|
|
138
|
+
let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
|
|
139
|
+
this.calendar = calendar;
|
|
140
|
+
this.era = era;
|
|
141
|
+
this.year = year;
|
|
142
|
+
this.month = month;
|
|
143
|
+
this.day = day;
|
|
144
|
+
this.hour = args.shift() || 0;
|
|
145
|
+
this.minute = args.shift() || 0;
|
|
146
|
+
this.second = args.shift() || 0;
|
|
147
|
+
this.millisecond = args.shift() || 0;
|
|
148
|
+
($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export { $35ea8db9cb2ccb90$export$99faa760c7908e4f as CalendarDate, $35ea8db9cb2ccb90$export$ca871e8dbb80966f as CalendarDateTime };
|
|
153
|
+
//# sourceMappingURL=CalendarDate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarDate.js","sources":["../../../../../../../node_modules/@internationalized/date/dist/CalendarDate.mjs"],"sourcesContent":["import {add as $735220c2d4774dd3$export$e16d8520af44a096, addTime as $735220c2d4774dd3$export$7ed87b6bc2506470, addZoned as $735220c2d4774dd3$export$96b1d28349274637, constrain as $735220c2d4774dd3$export$c4e2ecac49351ef2, constrainTime as $735220c2d4774dd3$export$7555de1e070510cb, cycleDate as $735220c2d4774dd3$export$d52ced6badfb9a4c, cycleTime as $735220c2d4774dd3$export$dd02b3e0007dfe28, cycleZoned as $735220c2d4774dd3$export$9a297d111fc86b79, set as $735220c2d4774dd3$export$adaa4cf7ef1b65be, setTime as $735220c2d4774dd3$export$e5d5e1c1822b6e56, setZoned as $735220c2d4774dd3$export$31b5430eb18be4f8, subtract as $735220c2d4774dd3$export$4e2d2ead65e5f7e3, subtractTime as $735220c2d4774dd3$export$fe34d3a381cd7501, subtractZoned as $735220c2d4774dd3$export$6814caac34ca03c7} from \"./manipulation.mjs\";\nimport {compareDate as $14e0f24ef4ac5c92$export$68781ddf31c0090f, compareTime as $14e0f24ef4ac5c92$export$c19a80a9721b80f6} from \"./queries.mjs\";\nimport {dateTimeToString as $fae977aafc393c5c$export$4223de14708adc63, dateToString as $fae977aafc393c5c$export$60dfd74aa96791bd, timeToString as $fae977aafc393c5c$export$f59dee82248f5ad4, zonedDateTimeToString as $fae977aafc393c5c$export$bf79f1ebf4b18792} from \"./string.mjs\";\nimport {GregorianCalendar as $3b62074eb05584b2$export$80ee6245ec4f29ec} from \"./GregorianCalendar.mjs\";\nimport {toCalendarDateTime as $11d87f3f76e88657$export$b21e0b124e224484, toDate as $11d87f3f76e88657$export$e67a095c620b86fe, toZoned as $11d87f3f76e88657$export$84c95a83c799e074, zonedToDate as $11d87f3f76e88657$export$83aac07b4c37b25} from \"./conversion.mjs\";\nimport {_ as $aksy1$_} from \"@swc/helpers/_/_class_private_field_init\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nfunction $35ea8db9cb2ccb90$var$shiftArgs(args) {\n let calendar = typeof args[0] === 'object' ? args.shift() : new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)();\n let era;\n if (typeof args[0] === 'string') era = args.shift();\n else {\n let eras = calendar.getEras();\n era = eras[eras.length - 1];\n }\n let year = args.shift();\n let month = args.shift();\n let day = args.shift();\n return [\n calendar,\n era,\n year,\n month,\n day\n ];\n}\nvar // This prevents TypeScript from allowing other types with the same fields to match.\n// i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.\n// If that behavior is desired, use the AnyCalendarDate interface instead.\n// @ts-ignore\n$35ea8db9cb2ccb90$var$_type = /*#__PURE__*/ new WeakMap();\nclass $35ea8db9cb2ccb90$export$99faa760c7908e4f {\n /** Returns a copy of this date. */ copy() {\n if (this.era) return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);\n else return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);\n }\n /** Returns a new `CalendarDate` with the given duration added to it. */ add(duration) {\n return (0, $735220c2d4774dd3$export$e16d8520af44a096)(this, duration);\n }\n /** Returns a new `CalendarDate` with the given duration subtracted from it. */ subtract(duration) {\n return (0, $735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);\n }\n /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {\n return (0, $735220c2d4774dd3$export$adaa4cf7ef1b65be)(this, fields);\n }\n /**\n * Returns a new `CalendarDate` with the given field adjusted by a specified amount.\n * When the resulting value reaches the limits of the field, it wraps around.\n */ cycle(field, amount, options) {\n return (0, $735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);\n }\n /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */ toDate(timeZone) {\n return (0, $11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone);\n }\n /** Converts the date to an ISO 8601 formatted string. */ toString() {\n return (0, $fae977aafc393c5c$export$60dfd74aa96791bd)(this);\n }\n /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {\n return (0, $14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);\n }\n constructor(...args){\n (0, $aksy1$_)(this, $35ea8db9cb2ccb90$var$_type, {\n writable: true,\n value: void 0\n });\n let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);\n this.calendar = calendar;\n this.era = era;\n this.year = year;\n this.month = month;\n this.day = day;\n (0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(this);\n }\n}\nvar // This prevents TypeScript from allowing other types with the same fields to match.\n// @ts-ignore\n$35ea8db9cb2ccb90$var$_type1 = /*#__PURE__*/ new WeakMap();\nclass $35ea8db9cb2ccb90$export$680ea196effce5f {\n /** Returns a copy of this time. */ copy() {\n return new $35ea8db9cb2ccb90$export$680ea196effce5f(this.hour, this.minute, this.second, this.millisecond);\n }\n /** Returns a new `Time` with the given duration added to it. */ add(duration) {\n return (0, $735220c2d4774dd3$export$7ed87b6bc2506470)(this, duration);\n }\n /** Returns a new `Time` with the given duration subtracted from it. */ subtract(duration) {\n return (0, $735220c2d4774dd3$export$fe34d3a381cd7501)(this, duration);\n }\n /** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {\n return (0, $735220c2d4774dd3$export$e5d5e1c1822b6e56)(this, fields);\n }\n /**\n * Returns a new `Time` with the given field adjusted by a specified amount.\n * When the resulting value reaches the limits of the field, it wraps around.\n */ cycle(field, amount, options) {\n return (0, $735220c2d4774dd3$export$dd02b3e0007dfe28)(this, field, amount, options);\n }\n /** Converts the time to an ISO 8601 formatted string. */ toString() {\n return (0, $fae977aafc393c5c$export$f59dee82248f5ad4)(this);\n }\n /** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */ compare(b) {\n return (0, $14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, b);\n }\n constructor(hour = 0, minute = 0, second = 0, millisecond = 0){\n (0, $aksy1$_)(this, $35ea8db9cb2ccb90$var$_type1, {\n writable: true,\n value: void 0\n });\n this.hour = hour;\n this.minute = minute;\n this.second = second;\n this.millisecond = millisecond;\n (0, $735220c2d4774dd3$export$7555de1e070510cb)(this);\n }\n}\nvar // This prevents TypeScript from allowing other types with the same fields to match.\n// @ts-ignore\n$35ea8db9cb2ccb90$var$_type2 = /*#__PURE__*/ new WeakMap();\nclass $35ea8db9cb2ccb90$export$ca871e8dbb80966f {\n /** Returns a copy of this date. */ copy() {\n if (this.era) return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);\n else return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);\n }\n /** Returns a new `CalendarDateTime` with the given duration added to it. */ add(duration) {\n return (0, $735220c2d4774dd3$export$e16d8520af44a096)(this, duration);\n }\n /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */ subtract(duration) {\n return (0, $735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);\n }\n /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {\n return (0, $735220c2d4774dd3$export$adaa4cf7ef1b65be)((0, $735220c2d4774dd3$export$e5d5e1c1822b6e56)(this, fields), fields);\n }\n /**\n * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.\n * When the resulting value reaches the limits of the field, it wraps around.\n */ cycle(field, amount, options) {\n switch(field){\n case 'era':\n case 'year':\n case 'month':\n case 'day':\n return (0, $735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);\n default:\n return (0, $735220c2d4774dd3$export$dd02b3e0007dfe28)(this, field, amount, options);\n }\n }\n /** Converts the date to a native JavaScript Date object in the given time zone. */ toDate(timeZone, disambiguation) {\n return (0, $11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone, disambiguation);\n }\n /** Converts the date to an ISO 8601 formatted string. */ toString() {\n return (0, $fae977aafc393c5c$export$4223de14708adc63)(this);\n }\n /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {\n let res = (0, $14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);\n if (res === 0) return (0, $14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, (0, $11d87f3f76e88657$export$b21e0b124e224484)(b));\n return res;\n }\n constructor(...args){\n (0, $aksy1$_)(this, $35ea8db9cb2ccb90$var$_type2, {\n writable: true,\n value: void 0\n });\n let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);\n this.calendar = calendar;\n this.era = era;\n this.year = year;\n this.month = month;\n this.day = day;\n this.hour = args.shift() || 0;\n this.minute = args.shift() || 0;\n this.second = args.shift() || 0;\n this.millisecond = args.shift() || 0;\n (0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(this);\n }\n}\nvar // This prevents TypeScript from allowing other types with the same fields to match.\n// @ts-ignore\n$35ea8db9cb2ccb90$var$_type3 = /*#__PURE__*/ new WeakMap();\nclass $35ea8db9cb2ccb90$export$d3b7288e7994edea {\n /** Returns a copy of this date. */ copy() {\n if (this.era) return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);\n else return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);\n }\n /** Returns a new `ZonedDateTime` with the given duration added to it. */ add(duration) {\n return (0, $735220c2d4774dd3$export$96b1d28349274637)(this, duration);\n }\n /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */ subtract(duration) {\n return (0, $735220c2d4774dd3$export$6814caac34ca03c7)(this, duration);\n }\n /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields, disambiguation) {\n return (0, $735220c2d4774dd3$export$31b5430eb18be4f8)(this, fields, disambiguation);\n }\n /**\n * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.\n * When the resulting value reaches the limits of the field, it wraps around.\n */ cycle(field, amount, options) {\n return (0, $735220c2d4774dd3$export$9a297d111fc86b79)(this, field, amount, options);\n }\n /** Converts the date to a native JavaScript Date object. */ toDate() {\n return (0, $11d87f3f76e88657$export$83aac07b4c37b25)(this);\n }\n /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */ toString() {\n return (0, $fae977aafc393c5c$export$bf79f1ebf4b18792)(this);\n }\n /** Converts the date to an ISO 8601 formatted string in UTC. */ toAbsoluteString() {\n return this.toDate().toISOString();\n }\n /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {\n // TODO: Is this a bad idea??\n return this.toDate().getTime() - (0, $11d87f3f76e88657$export$84c95a83c799e074)(b, this.timeZone).toDate().getTime();\n }\n constructor(...args){\n (0, $aksy1$_)(this, $35ea8db9cb2ccb90$var$_type3, {\n writable: true,\n value: void 0\n });\n let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);\n let timeZone = args.shift();\n let offset = args.shift();\n this.calendar = calendar;\n this.era = era;\n this.year = year;\n this.month = month;\n this.day = day;\n this.timeZone = timeZone;\n this.offset = offset;\n this.hour = args.shift() || 0;\n this.minute = args.shift() || 0;\n this.second = args.shift() || 0;\n this.millisecond = args.shift() || 0;\n (0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(this);\n }\n}\n\n\nexport {$35ea8db9cb2ccb90$export$99faa760c7908e4f as CalendarDate, $35ea8db9cb2ccb90$export$680ea196effce5f as Time, $35ea8db9cb2ccb90$export$ca871e8dbb80966f as CalendarDateTime, $35ea8db9cb2ccb90$export$d3b7288e7994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