@cratis/components 4.35.0 → 4.36.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/compat-manifest.json +11 -11
- package/dist/esm/CommandDialog/CommandDialog.d.ts.map +1 -1
- package/dist/esm/CommandDialog/CommandDialog.js +4 -1
- package/dist/esm/CommandDialog/CommandDialog.js.map +1 -1
- package/dist/esm/Common/DatePickerInput.d.ts +5 -0
- package/dist/esm/Common/DatePickerInput.d.ts.map +1 -1
- package/dist/esm/Common/DatePickerInput.js.map +1 -1
- package/dist/esm/Common/DatePickerInputImplementation.d.ts +1 -1
- package/dist/esm/Common/DatePickerInputImplementation.d.ts.map +1 -1
- package/dist/esm/Common/DatePickerInputImplementation.js +2 -2
- package/dist/esm/Common/DatePickerInputImplementation.js.map +1 -1
- package/dist/esm/DataPage/DataPage.d.ts +3 -1
- package/dist/esm/DataPage/DataPage.d.ts.map +1 -1
- package/dist/esm/DataPage/DataPage.js.map +1 -1
- package/dist/esm/DataTables/DataTableForObservableQuery.d.ts +2 -1
- package/dist/esm/DataTables/DataTableForObservableQuery.d.ts.map +1 -1
- package/dist/esm/DataTables/DataTableForObservableQuery.js +3 -0
- package/dist/esm/DataTables/DataTableForObservableQuery.js.map +1 -1
- package/dist/esm/DataTables/DataTableForQuery.d.ts +2 -1
- package/dist/esm/DataTables/DataTableForQuery.d.ts.map +1 -1
- package/dist/esm/DataTables/DataTableForQuery.js +3 -0
- package/dist/esm/DataTables/DataTableForQuery.js.map +1 -1
- package/dist/esm/DataTables/useReconciledQuerySelection.d.ts +3 -0
- package/dist/esm/DataTables/useReconciledQuerySelection.d.ts.map +1 -0
- package/dist/esm/DataTables/useReconciledQuerySelection.js +23 -0
- package/dist/esm/DataTables/useReconciledQuerySelection.js.map +1 -0
- package/dist/esm/Dialogs/Dialog.d.ts +10 -1
- package/dist/esm/Dialogs/Dialog.d.ts.map +1 -1
- package/dist/esm/Dialogs/Dialog.js.map +1 -1
- package/dist/esm/Dialogs/DialogImplementation.d.ts +1 -1
- package/dist/esm/Dialogs/DialogImplementation.d.ts.map +1 -1
- package/dist/esm/Dialogs/DialogImplementation.js +7 -5
- package/dist/esm/Dialogs/DialogImplementation.js.map +1 -1
- package/dist/esm/Dialogs/resolveDialogDismissal.d.ts +8 -0
- package/dist/esm/Dialogs/resolveDialogDismissal.d.ts.map +1 -0
- package/dist/esm/Dialogs/resolveDialogDismissal.js +11 -0
- package/dist/esm/Dialogs/resolveDialogDismissal.js.map +1 -0
- package/package.json +3 -2
package/compat-manifest.json
CHANGED
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
{
|
|
69
69
|
"name": "@cratis/components",
|
|
70
70
|
"role": "core",
|
|
71
|
-
"version": "4.
|
|
71
|
+
"version": "4.36.0",
|
|
72
72
|
"releaseMajorRange": ">=4 <5",
|
|
73
73
|
"independentRelease": false,
|
|
74
74
|
"private": false,
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
{
|
|
93
93
|
"name": "@cratis/eslint-plugin-components",
|
|
94
94
|
"role": "eslint",
|
|
95
|
-
"version": "4.
|
|
95
|
+
"version": "4.36.0",
|
|
96
96
|
"releaseMajorRange": ">=4 <5",
|
|
97
97
|
"independentRelease": false,
|
|
98
98
|
"private": false,
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
{
|
|
106
106
|
"name": "@cratis/components.migrator",
|
|
107
107
|
"role": "migrator",
|
|
108
|
-
"version": "4.
|
|
108
|
+
"version": "4.36.0",
|
|
109
109
|
"releaseMajorRange": ">=4 <5",
|
|
110
110
|
"independentRelease": false,
|
|
111
111
|
"private": false,
|
|
@@ -116,13 +116,13 @@
|
|
|
116
116
|
{
|
|
117
117
|
"name": "@cratis/components.conformance",
|
|
118
118
|
"role": "conformance",
|
|
119
|
-
"version": "4.
|
|
119
|
+
"version": "4.36.0",
|
|
120
120
|
"releaseMajorRange": ">=4 <5",
|
|
121
121
|
"independentRelease": false,
|
|
122
122
|
"private": false,
|
|
123
123
|
"packageAccess": "public",
|
|
124
124
|
"peerDependencies": {
|
|
125
|
-
"@cratis/components": "4.
|
|
125
|
+
"@cratis/components": "4.36.0",
|
|
126
126
|
"react": "^19.0.0",
|
|
127
127
|
"react-dom": "^19.0.0"
|
|
128
128
|
},
|
|
@@ -132,13 +132,13 @@
|
|
|
132
132
|
{
|
|
133
133
|
"name": "@cratis/components.mui",
|
|
134
134
|
"role": "renderer-adapter",
|
|
135
|
-
"version": "4.
|
|
135
|
+
"version": "4.36.0",
|
|
136
136
|
"releaseMajorRange": ">=4 <5",
|
|
137
137
|
"independentRelease": false,
|
|
138
138
|
"private": false,
|
|
139
139
|
"packageAccess": "public",
|
|
140
140
|
"peerDependencies": {
|
|
141
|
-
"@cratis/components": "4.
|
|
141
|
+
"@cratis/components": "4.36.0",
|
|
142
142
|
"@emotion/react": ">=11.5 <12",
|
|
143
143
|
"@emotion/styled": ">=11.11 <12",
|
|
144
144
|
"@mui/material": ">=9 <10",
|
|
@@ -188,13 +188,13 @@
|
|
|
188
188
|
{
|
|
189
189
|
"name": "@cratis/components.primereact",
|
|
190
190
|
"role": "renderer-adapter",
|
|
191
|
-
"version": "4.
|
|
191
|
+
"version": "4.36.0",
|
|
192
192
|
"releaseMajorRange": ">=4 <5",
|
|
193
193
|
"independentRelease": false,
|
|
194
194
|
"private": false,
|
|
195
195
|
"packageAccess": "public",
|
|
196
196
|
"peerDependencies": {
|
|
197
|
-
"@cratis/components": "4.
|
|
197
|
+
"@cratis/components": "4.36.0",
|
|
198
198
|
"@primereact/core": ">=11 <12",
|
|
199
199
|
"@primereact/ui": ">=11 <12",
|
|
200
200
|
"@primeuix/themes": ">=3 <4",
|
|
@@ -256,13 +256,13 @@
|
|
|
256
256
|
{
|
|
257
257
|
"name": "@cratis/components.primereact10",
|
|
258
258
|
"role": "renderer-adapter",
|
|
259
|
-
"version": "4.
|
|
259
|
+
"version": "4.36.0",
|
|
260
260
|
"releaseMajorRange": ">=4 <5",
|
|
261
261
|
"independentRelease": false,
|
|
262
262
|
"private": false,
|
|
263
263
|
"packageAccess": "public",
|
|
264
264
|
"peerDependencies": {
|
|
265
|
-
"@cratis/components": "4.
|
|
265
|
+
"@cratis/components": "4.36.0",
|
|
266
266
|
"primereact": ">=10.9.9 <11",
|
|
267
267
|
"react": "^19.0.0",
|
|
268
268
|
"react-dom": "^19.0.0"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandDialog.d.ts","sourceRoot":"","sources":["../../../CommandDialog/CommandDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,sBAAmB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAKH,KAAK,gBAAgB,EACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAAwB,CAAC;AAOnE;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB,CAAC,QAAQ,SAAS,MAAM,EAAE,SAAS,GAAG,MAAM,CAC3E,SACI,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,UAAU,GAAG,iBAAiB,CAAC,EAC3E,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC5C;;;;;;;;;;;;OAYG;IACH,eAAe,CAAC,EAAE,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IAElD;;;;;;;OAOG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAEtD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAoHD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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SAAS,CAAC;;CAoFjD,CAAC;AAEF,QAAA,MAAM,0BAA0B,iBAAkB;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,sBAE9E,CAAC;AAKF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,+BAAyB,CAAC"}
|
|
@@ -61,7 +61,7 @@ const CommandDialogWrapper = ({ isValid, onClose, onConfirm, onSuccess, onValida
|
|
|
61
61
|
return (jsx(Dialog, { ...dialogProps, onClose: onClose, onConfirm: handleConfirm, isValid: isDialogValid, isBusy: submission.isSubmitting, children: jsx("div", { style: { display: 'flex', flexDirection: 'column', width: '100%' }, children: processedChildren }) }));
|
|
62
62
|
};
|
|
63
63
|
const CommandDialogComponent = (props) => {
|
|
64
|
-
const { title, subtitle, placement, closeIcon, visible, width, style, contentStyle, resizable, buttons = DialogButtons.OkCancel, initialFocus, okLabel, cancelLabel, yesLabel, noLabel, dismissable, closeAriaLabel, isValid, onClose, onConfirm, onCancel, onBeforeExecute, confirmBeforeExecute, className, pt, ptOptions, unstyled, children, ...commandFormProps } = props;
|
|
64
|
+
const { title, subtitle, placement, closeIcon, visible, width, style, contentStyle, resizable, buttons = DialogButtons.OkCancel, initialFocus, okLabel, cancelLabel, yesLabel, noLabel, dismissable, dismissOnOutsideClick, closeOnEscape, showCloseButton, closeAriaLabel, isValid, onClose, onConfirm, onCancel, onBeforeExecute, confirmBeforeExecute, className, pt, ptOptions, unstyled, children, ...commandFormProps } = props;
|
|
65
65
|
const dialogProps = {
|
|
66
66
|
title,
|
|
67
67
|
subtitle,
|
|
@@ -79,6 +79,9 @@ const CommandDialogComponent = (props) => {
|
|
|
79
79
|
yesLabel,
|
|
80
80
|
noLabel,
|
|
81
81
|
dismissable,
|
|
82
|
+
dismissOnOutsideClick,
|
|
83
|
+
closeOnEscape,
|
|
84
|
+
showCloseButton,
|
|
82
85
|
closeAriaLabel,
|
|
83
86
|
isValid,
|
|
84
87
|
onClose,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandDialog.js","sources":["../../../CommandDialog/CommandDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DialogButtons, DialogResult } from '@cratis/arc.react/dialogs';\nimport { Dialog, type DialogProps } from '../Dialogs/Dialog';\nimport React from 'react';\nimport {\n CommandForm,\n CommandFormFieldWrapper,\n useCommandFormContext,\n useCommandInstance,\n type CommandFormProps,\n} from '@cratis/arc.react/commands';\nimport type { BeforeExecuteCallback } from './applyBeforeExecute';\nimport type { ConfirmBeforeExecute } from './confirmBeforeExecute';\nimport { useCommandExecution } from './useCommandExecution';\nimport {\n isCommandFormField,\n markAsCommandFormColumn,\n} from '../CommandForm/commandFormMarkers';\n\n/**\n * Props for {@link CommandDialog}. Combines the props of a `CommandForm`\n * (`command`, `initialValues`, `onSuccess`, `onValidationFailure`, `onFailed`,\n * `onBeforeExecute`, etc.) with the props of a {@link Dialog} (`title`,\n * `buttons`, `width`, `pt`, `unstyled`, …). Dialog presentation props\n * such as `subtitle`, `placement`, and `closeIcon` are forwarded to the dialog.\n *\n * @typeParam TCommand - The command record type (must extend `object`).\n * @typeParam TResponse - The response payload type returned by a successful command. Defaults to `object`.\n */\nexport interface CommandDialogProps<TCommand extends object, TResponse = object>\n extends\n Omit<CommandFormProps<TCommand, TResponse>, 'children' | 'onBeforeExecute'>,\n Omit<DialogProps, 'children' | 'isBusy'> {\n /**\n * A transformer invoked with the current command values immediately before\n * the command executes on confirm. It **must return** the values to run with\n * (mutated or not) — a callback that returns nothing does not execute the\n * command with `undefined`; the current values are kept and a warning is\n * logged. May be async.\n *\n * ⚠️ It runs **only on submit**, after the form has already been validated,\n * so a value produced here can never satisfy required-field validation — the\n * submit button stays disabled if a required value is only seeded here. Seed\n * required values through `initialValues`; reserve `onBeforeExecute` for\n * transforms that do not affect validity (for example a generated id).\n */\n onBeforeExecute?: BeforeExecuteCallback<TCommand>;\n\n /**\n * Ask whether to run the command after validation and `onBeforeExecute`.\n * Receives the transformed values. Only `true` executes; all other outcomes\n * keep the dialog open. May return a promise (for example from a confirmation dialog).\n * If command values change while confirmation is pending, execution is skipped\n * and the dialog stays open; confirm the new values again.\n * Unlike `onConfirm`, this runs before execution, not after success.\n */\n confirmBeforeExecute?: ConfirmBeforeExecute<TCommand>;\n\n /**\n * Form fields and arbitrary content for the dialog body. Children that are\n * `CommandFormField` instances are automatically wrapped so they bind to\n * the command instance.\n */\n children?: React.ReactNode;\n}\n\n// Requiring each key here makes a newly added Dialog prop fail compilation until it is routed.\ntype ForwardedDialogProps = Omit<DialogProps, 'children' | 'isBusy'> &\n Record<keyof Omit<DialogProps, 'children' | 'isBusy'>, unknown>;\n\nconst CommandDialogWrapper = <TCommand extends object, TResponse = object>({\n isValid,\n onClose,\n onConfirm,\n onSuccess,\n onValidationFailure,\n onFailed,\n onException,\n onUnauthorized,\n onBeforeExecute,\n confirmBeforeExecute,\n children,\n ...dialogProps\n}: Omit<DialogProps, 'isBusy'> & {\n onSuccess?: CommandFormProps<TCommand, TResponse>['onSuccess'];\n onValidationFailure?: CommandFormProps<TCommand, TResponse>['onValidationFailure'];\n onFailed?: CommandFormProps<TCommand, TResponse>['onFailed'];\n onException?: CommandFormProps<TCommand, TResponse>['onException'];\n onUnauthorized?: CommandFormProps<TCommand, TResponse>['onUnauthorized'];\n onBeforeExecute?: BeforeExecuteCallback<TCommand>;\n confirmBeforeExecute?: ConfirmBeforeExecute<TCommand>;\n}) => {\n const {\n setCommandValues,\n setCommandResult,\n isValid: isCommandFormValid,\n } = useCommandFormContext<TCommand>();\n const commandInstance = useCommandInstance<TCommand>();\n const submission = useCommandExecution<TCommand, TResponse>(\n commandInstance, setCommandValues, onBeforeExecute, confirmBeforeExecute, onException,\n );\n\n const handleConfirm = async () => {\n const result = await submission.run();\n if (!result) return false;\n\n if (!result.isSuccess) {\n await onFailed?.(result);\n if (result.hasExceptions) {\n await onException?.(result.exceptionMessages, result.exceptionStackTrace);\n }\n if (!result.isAuthorized) await onUnauthorized?.();\n if (!result.isValid) {\n await onValidationFailure?.(result.validationResults);\n }\n if (submission.isMounted()) setCommandResult(result);\n return false;\n }\n\n await onSuccess?.(result.response as TResponse);\n if (onConfirm) {\n const closeResult = await onConfirm();\n return closeResult === true;\n }\n if (onClose) {\n const closeResult = await onClose(DialogResult.Ok);\n return closeResult !== false;\n }\n return true;\n };\n\n const processChildren = (nodes: React.ReactNode): React.ReactNode => {\n return React.Children.map(nodes, (child) => {\n if (!React.isValidElement(child)) return child;\n\n const component = child.type as React.ComponentType<unknown>;\n if (isCommandFormField(component)) {\n type FieldElement = Parameters<\n typeof CommandFormFieldWrapper\n >[0]['field'];\n // SAFETY: isCommandFormField guards that child.type is a command form field component.\n return (\n <CommandFormFieldWrapper field={child as unknown as FieldElement} />\n );\n }\n\n const childProps = child.props as Record<string, unknown>;\n // A function child is a render prop, not a node: mapping it would replace the\n // function with its mapped result and break the component that calls it.\n if (childProps.children != null && typeof childProps.children !== 'function') {\n return React.cloneElement(\n child as React.ReactElement<Record<string, unknown>>,\n {\n children: processChildren(childProps.children as React.ReactNode),\n },\n );\n }\n\n return child;\n });\n };\n\n const processedChildren = processChildren(children);\n const isDialogValid = isValid !== false && isCommandFormValid;\n\n return (\n <Dialog\n {...dialogProps}\n onClose={onClose}\n onConfirm={handleConfirm}\n isValid={isDialogValid}\n isBusy={submission.isSubmitting}\n >\n <div style={{ display: 'flex', flexDirection: 'column', width: '100%' }}>\n {processedChildren}\n </div>\n </Dialog>\n );\n};\n\n/**\n * A {@link Dialog} that hosts a Cratis Arc `CommandForm`, runs the bound\n * command on confirm, and only closes when the command succeeds. This is\n * the standard pattern for \"user fills in a form, clicks OK, command runs\n * server-side, dialog dismisses\" — `CommandDialog` collapses about thirty\n * lines of orchestration into the props on a single component.\n *\n * ## Where `TCommand` comes from\n *\n * `TCommand` is an auto-generated TypeScript class produced by the Arc proxy\n * generator from a C# `[Command]` record. `dotnet build` writes a `.ts` file\n * per command with the right property types and a typed `execute()` method;\n * importing the class is all the connection-to-the-backend you need. The\n * class also exposes a `.use()` hook for direct (non-dialog) usage and a\n * `useWithChangeTracking()` variant.\n *\n * ## What happens on confirm\n *\n * 1. If `onBeforeExecute` is supplied, it transforms the command values.\n * Used for generated IDs (`Guid.create()`) that the user did not type in.\n * 2. The command's `execute()` runs through Arc's command pipeline. The\n * backend handler returns either a typed response (mapped to `TResponse`)\n * or a `ValidationResult[]`.\n * 3. On `IsSuccess: true`, `onSuccess(response)` fires and the dialog closes\n * through the dialog host context.\n * 4. On a validation failure, `onValidationFailure(errors)` fires and the\n * form's per-field error display is updated. The dialog stays open.\n * 5. On a domain or transport failure, `onFailed(result)` fires. The dialog\n * stays open and the `CommandResult` is set on the form context so the\n * UI can surface the error to the user.\n *\n * Throughout, the dialog is in the `isBusy` state — the confirm button keeps\n * focus but is `aria-disabled` and ignores activation, the other action\n * buttons are disabled, and the confirm button shows a spinner.\n *\n * ## Destructive commands and initial focus\n *\n * The confirm button is focused when the dialog opens, and a focused native\n * button fires `click` from the `keydown` of `Enter`. A command whose form\n * has required fields is protected from a held or double-tapped `Enter` for\n * free, because `isCommandFormValid` keeps confirm disabled until something\n * is filled in. A command that takes **no** input — the typical \"delete\n * this, permanently\" command — has no such gate, so its confirm button is\n * armed the instant the dialog appears.\n *\n * Pass `initialFocus` (forwarded straight to {@link Dialog}) for those:\n *\n * ```tsx\n * <CommandDialog<DeletePerson>\n * command={DeletePerson}\n * title=\"Delete personal data?\"\n * okLabel=\"Delete\"\n * initialFocus={DialogInitialFocus.Cancel}\n * onSuccess={() => closeDialog(DialogResult.Ok)}>\n * This cannot be undone.\n * </CommandDialog>\n * ```\n *\n * Everything else — the footer, the close (X), `Escape`, and the confirm\n * wiring that runs the command — is untouched.\n *\n * ## Field binding\n *\n * Children that are `CommandFormField` instances (`InputTextField`,\n * `NumberField`, `DropdownField`, every `@cratis/components/CommandForm/fields`\n * widget) bind to a property on the command via the `value` accessor:\n *\n * ```tsx\n * <InputTextField value={c => c.name} title=\"Name\" />\n * ```\n *\n * The accessor's argument is the command instance — TypeScript infers\n * `c.name` is a string and the field type-checks against that. Arbitrary\n * non-field children (custom layout, additional text, decorative elements)\n * are rendered as plain content.\n *\n * ## Typed dialog host usage\n *\n * Combine with `useDialog<CommandResult<TResponse>>()` from\n * `@cratis/arc.react/dialogs` to get a fully-typed result at the call site:\n *\n * ```tsx\n * import { useDialog, DialogResult } from '@cratis/arc.react/dialogs';\n * import { CommandDialog } from '@cratis/components/CommandDialog';\n * import { RegisterAuthor } from './RegisterAuthor'; // proxy from C#\n *\n * type RegisterAuthorResponse = { authorId: string };\n *\n * const RegisterAuthorDialog = () => {\n * const { closeDialog } = useDialogContext<CommandResult<RegisterAuthorResponse>>();\n * return (\n * <CommandDialog<RegisterAuthor, RegisterAuthorResponse>\n * command={RegisterAuthor}\n * title=\"Register author\"\n * okLabel=\"Register\"\n * onSuccess={(response) => closeDialog(DialogResult.Ok)}\n * onCancel={() => closeDialog(DialogResult.Cancelled)}>\n * <InputTextField value={c => c.name} title=\"Name\" />\n * <InputTextField value={c => c.email} title=\"Email\" />\n * </CommandDialog>\n * );\n * };\n * ```\n *\n * ## What's special vs. raw Dialog + CommandForm\n *\n * - Confirm wiring (`onConfirm` → `commandInstance.execute()`) is handled\n * internally; you only supply `onSuccess` / `onValidationFailure` / `onFailed`.\n * - The dialog's `isBusy` state tracks the in-flight command without manual\n * `useState`.\n * - Field error propagation from `CommandResult.validationResults` to the\n * form context is automatic.\n *\n * @typeParam TCommand - The command class (proxy generated from C# `[Command]`).\n * @typeParam TResponse - The success payload type returned by the command's `Handle()` method on the backend.\n * @param props - {@link CommandDialogProps}.\n */\nconst CommandDialogComponent = <TCommand extends object = object, TResponse = object>(\n props: CommandDialogProps<TCommand, TResponse>,\n) => {\n const {\n title,\n subtitle,\n placement,\n closeIcon,\n visible,\n width,\n style,\n contentStyle,\n resizable,\n buttons = DialogButtons.OkCancel,\n initialFocus,\n okLabel,\n cancelLabel,\n yesLabel,\n noLabel,\n dismissable,\n closeAriaLabel,\n isValid,\n onClose,\n onConfirm,\n onCancel,\n onBeforeExecute,\n confirmBeforeExecute,\n className,\n pt,\n ptOptions,\n unstyled,\n children,\n ...commandFormProps\n } = props;\n\n const dialogProps = {\n title,\n subtitle,\n placement,\n closeIcon,\n visible,\n width,\n style,\n contentStyle,\n resizable,\n buttons,\n initialFocus,\n okLabel,\n cancelLabel,\n yesLabel,\n noLabel,\n dismissable,\n closeAriaLabel,\n isValid,\n onClose,\n onConfirm,\n onCancel,\n className,\n pt,\n ptOptions,\n unstyled,\n } satisfies ForwardedDialogProps;\n\n return (\n <CommandForm<TCommand, TResponse> {...commandFormProps}>\n <CommandDialogWrapper<TCommand, TResponse>\n {...dialogProps}\n onSuccess={props.onSuccess}\n onValidationFailure={props.onValidationFailure}\n onFailed={props.onFailed}\n onException={props.onException}\n onUnauthorized={props.onUnauthorized}\n onBeforeExecute={onBeforeExecute}\n confirmBeforeExecute={confirmBeforeExecute}\n >\n {children}\n </CommandDialogWrapper>\n </CommandForm>\n );\n};\n\nconst CommandDialogColumnWrapper = ({ children }: { children: React.ReactNode }) => (\n <CommandForm.Column>{children}</CommandForm.Column>\n);\nmarkAsCommandFormColumn(CommandDialogColumnWrapper);\n\nCommandDialogComponent.Column = CommandDialogColumnWrapper;\n\n/**\n * A {@link Dialog} that hosts a Cratis Arc `CommandForm`, runs the bound\n * command on confirm, and only closes when the command succeeds. This is\n * the standard pattern for \"user fills in a form, clicks OK, command runs\n * server-side, dialog dismisses\" — `CommandDialog` collapses about thirty\n * lines of orchestration into the props on a single component.\n *\n * See {@link CommandDialogComponent} for full documentation.\n *\n * @typeParam TCommand - The command class (proxy generated from C# `[Command]`).\n * @typeParam TResponse - The success payload type returned by the command's `Handle()` method on the backend.\n */\nexport const CommandDialog = CommandDialogComponent;\n"],"names":["_jsx"],"mappings":";;;;;;;;AAwEA,MAAM,oBAAoB,GAAG,CAA8C,E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AoB,EAAE,oBAAoB,EAAA,QAAA,EAEzC,QAAQ,EAAA,CACU,EAAA,CACb;AAEtB,CAAC;AAED,MAAM,0BAA0B,GAAG,CAAC,EAAE,QAAQ,EAAiC,MAC3EA,GAAA,CAAC,WAAW,CAAC,MAAM,cAAE,QAAQ,EAAA,CAAsB,CACtD;AACD,uBAAuB,CAAC,0BAA0B,CAAC;AAEnD,sBAAsB,CAAC,MAAM,GAAG,0BAA0B;AAcnD,MAAM,aAAa,GAAG;;"}
|
|
1
|
+
{"version":3,"file":"CommandDialog.js","sources":["../../../CommandDialog/CommandDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DialogButtons, DialogResult } from '@cratis/arc.react/dialogs';\nimport { Dialog, type DialogProps } from '../Dialogs/Dialog';\nimport React from 'react';\nimport {\n CommandForm,\n CommandFormFieldWrapper,\n useCommandFormContext,\n useCommandInstance,\n type CommandFormProps,\n} from '@cratis/arc.react/commands';\nimport type { BeforeExecuteCallback } from './applyBeforeExecute';\nimport type { ConfirmBeforeExecute } from './confirmBeforeExecute';\nimport { useCommandExecution } from './useCommandExecution';\nimport {\n isCommandFormField,\n markAsCommandFormColumn,\n} from '../CommandForm/commandFormMarkers';\n\n/**\n * Props for {@link CommandDialog}. Combines the props of a `CommandForm`\n * (`command`, `initialValues`, `onSuccess`, `onValidationFailure`, `onFailed`,\n * `onBeforeExecute`, etc.) with the props of a {@link Dialog} (`title`,\n * `buttons`, `width`, `pt`, `unstyled`, …). Dialog presentation props\n * such as `subtitle`, `placement`, and `closeIcon` are forwarded to the dialog.\n *\n * @typeParam TCommand - The command record type (must extend `object`).\n * @typeParam TResponse - The response payload type returned by a successful command. Defaults to `object`.\n */\nexport interface CommandDialogProps<TCommand extends object, TResponse = object>\n extends\n Omit<CommandFormProps<TCommand, TResponse>, 'children' | 'onBeforeExecute'>,\n Omit<DialogProps, 'children' | 'isBusy'> {\n /**\n * A transformer invoked with the current command values immediately before\n * the command executes on confirm. It **must return** the values to run with\n * (mutated or not) — a callback that returns nothing does not execute the\n * command with `undefined`; the current values are kept and a warning is\n * logged. May be async.\n *\n * ⚠️ It runs **only on submit**, after the form has already been validated,\n * so a value produced here can never satisfy required-field validation — the\n * submit button stays disabled if a required value is only seeded here. Seed\n * required values through `initialValues`; reserve `onBeforeExecute` for\n * transforms that do not affect validity (for example a generated id).\n */\n onBeforeExecute?: BeforeExecuteCallback<TCommand>;\n\n /**\n * Ask whether to run the command after validation and `onBeforeExecute`.\n * Receives the transformed values. Only `true` executes; all other outcomes\n * keep the dialog open. May return a promise (for example from a confirmation dialog).\n * If command values change while confirmation is pending, execution is skipped\n * and the dialog stays open; confirm the new values again.\n * Unlike `onConfirm`, this runs before execution, not after success.\n */\n confirmBeforeExecute?: ConfirmBeforeExecute<TCommand>;\n\n /**\n * Form fields and arbitrary content for the dialog body. Children that are\n * `CommandFormField` instances are automatically wrapped so they bind to\n * the command instance.\n */\n children?: React.ReactNode;\n}\n\n// Requiring each key here makes a newly added Dialog prop fail compilation until it is routed.\ntype ForwardedDialogProps = Omit<DialogProps, 'children' | 'isBusy'> &\n Record<keyof Omit<DialogProps, 'children' | 'isBusy'>, unknown>;\n\nconst CommandDialogWrapper = <TCommand extends object, TResponse = object>({\n isValid,\n onClose,\n onConfirm,\n onSuccess,\n onValidationFailure,\n onFailed,\n onException,\n onUnauthorized,\n onBeforeExecute,\n confirmBeforeExecute,\n children,\n ...dialogProps\n}: Omit<DialogProps, 'isBusy'> & {\n onSuccess?: CommandFormProps<TCommand, TResponse>['onSuccess'];\n onValidationFailure?: CommandFormProps<TCommand, TResponse>['onValidationFailure'];\n onFailed?: CommandFormProps<TCommand, TResponse>['onFailed'];\n onException?: CommandFormProps<TCommand, TResponse>['onException'];\n onUnauthorized?: CommandFormProps<TCommand, TResponse>['onUnauthorized'];\n onBeforeExecute?: BeforeExecuteCallback<TCommand>;\n confirmBeforeExecute?: ConfirmBeforeExecute<TCommand>;\n}) => {\n const {\n setCommandValues,\n setCommandResult,\n isValid: isCommandFormValid,\n } = useCommandFormContext<TCommand>();\n const commandInstance = useCommandInstance<TCommand>();\n const submission = useCommandExecution<TCommand, TResponse>(\n commandInstance, setCommandValues, onBeforeExecute, confirmBeforeExecute, onException,\n );\n\n const handleConfirm = async () => {\n const result = await submission.run();\n if (!result) return false;\n\n if (!result.isSuccess) {\n await onFailed?.(result);\n if (result.hasExceptions) {\n await onException?.(result.exceptionMessages, result.exceptionStackTrace);\n }\n if (!result.isAuthorized) await onUnauthorized?.();\n if (!result.isValid) {\n await onValidationFailure?.(result.validationResults);\n }\n if (submission.isMounted()) setCommandResult(result);\n return false;\n }\n\n await onSuccess?.(result.response as TResponse);\n if (onConfirm) {\n const closeResult = await onConfirm();\n return closeResult === true;\n }\n if (onClose) {\n const closeResult = await onClose(DialogResult.Ok);\n return closeResult !== false;\n }\n return true;\n };\n\n const processChildren = (nodes: React.ReactNode): React.ReactNode => {\n return React.Children.map(nodes, (child) => {\n if (!React.isValidElement(child)) return child;\n\n const component = child.type as React.ComponentType<unknown>;\n if (isCommandFormField(component)) {\n type FieldElement = Parameters<\n typeof CommandFormFieldWrapper\n >[0]['field'];\n // SAFETY: isCommandFormField guards that child.type is a command form field component.\n return (\n <CommandFormFieldWrapper field={child as unknown as FieldElement} />\n );\n }\n\n const childProps = child.props as Record<string, unknown>;\n // A function child is a render prop, not a node: mapping it would replace the\n // function with its mapped result and break the component that calls it.\n if (childProps.children != null && typeof childProps.children !== 'function') {\n return React.cloneElement(\n child as React.ReactElement<Record<string, unknown>>,\n {\n children: processChildren(childProps.children as React.ReactNode),\n },\n );\n }\n\n return child;\n });\n };\n\n const processedChildren = processChildren(children);\n const isDialogValid = isValid !== false && isCommandFormValid;\n\n return (\n <Dialog\n {...dialogProps}\n onClose={onClose}\n onConfirm={handleConfirm}\n isValid={isDialogValid}\n isBusy={submission.isSubmitting}\n >\n <div style={{ display: 'flex', flexDirection: 'column', width: '100%' }}>\n {processedChildren}\n </div>\n </Dialog>\n );\n};\n\n/**\n * A {@link Dialog} that hosts a Cratis Arc `CommandForm`, runs the bound\n * command on confirm, and only closes when the command succeeds. This is\n * the standard pattern for \"user fills in a form, clicks OK, command runs\n * server-side, dialog dismisses\" — `CommandDialog` collapses about thirty\n * lines of orchestration into the props on a single component.\n *\n * ## Where `TCommand` comes from\n *\n * `TCommand` is an auto-generated TypeScript class produced by the Arc proxy\n * generator from a C# `[Command]` record. `dotnet build` writes a `.ts` file\n * per command with the right property types and a typed `execute()` method;\n * importing the class is all the connection-to-the-backend you need. The\n * class also exposes a `.use()` hook for direct (non-dialog) usage and a\n * `useWithChangeTracking()` variant.\n *\n * ## What happens on confirm\n *\n * 1. If `onBeforeExecute` is supplied, it transforms the command values.\n * Used for generated IDs (`Guid.create()`) that the user did not type in.\n * 2. The command's `execute()` runs through Arc's command pipeline. The\n * backend handler returns either a typed response (mapped to `TResponse`)\n * or a `ValidationResult[]`.\n * 3. On `IsSuccess: true`, `onSuccess(response)` fires and the dialog closes\n * through the dialog host context.\n * 4. On a validation failure, `onValidationFailure(errors)` fires and the\n * form's per-field error display is updated. The dialog stays open.\n * 5. On a domain or transport failure, `onFailed(result)` fires. The dialog\n * stays open and the `CommandResult` is set on the form context so the\n * UI can surface the error to the user.\n *\n * Throughout, the dialog is in the `isBusy` state — the confirm button keeps\n * focus but is `aria-disabled` and ignores activation, the other action\n * buttons are disabled, and the confirm button shows a spinner.\n *\n * ## Destructive commands and initial focus\n *\n * The confirm button is focused when the dialog opens, and a focused native\n * button fires `click` from the `keydown` of `Enter`. A command whose form\n * has required fields is protected from a held or double-tapped `Enter` for\n * free, because `isCommandFormValid` keeps confirm disabled until something\n * is filled in. A command that takes **no** input — the typical \"delete\n * this, permanently\" command — has no such gate, so its confirm button is\n * armed the instant the dialog appears.\n *\n * Pass `initialFocus` (forwarded straight to {@link Dialog}) for those:\n *\n * ```tsx\n * <CommandDialog<DeletePerson>\n * command={DeletePerson}\n * title=\"Delete personal data?\"\n * okLabel=\"Delete\"\n * initialFocus={DialogInitialFocus.Cancel}\n * onSuccess={() => closeDialog(DialogResult.Ok)}>\n * This cannot be undone.\n * </CommandDialog>\n * ```\n *\n * Everything else — the footer, the close (X), `Escape`, and the confirm\n * wiring that runs the command — is untouched.\n *\n * ## Field binding\n *\n * Children that are `CommandFormField` instances (`InputTextField`,\n * `NumberField`, `DropdownField`, every `@cratis/components/CommandForm/fields`\n * widget) bind to a property on the command via the `value` accessor:\n *\n * ```tsx\n * <InputTextField value={c => c.name} title=\"Name\" />\n * ```\n *\n * The accessor's argument is the command instance — TypeScript infers\n * `c.name` is a string and the field type-checks against that. Arbitrary\n * non-field children (custom layout, additional text, decorative elements)\n * are rendered as plain content.\n *\n * ## Typed dialog host usage\n *\n * Combine with `useDialog<CommandResult<TResponse>>()` from\n * `@cratis/arc.react/dialogs` to get a fully-typed result at the call site:\n *\n * ```tsx\n * import { useDialog, DialogResult } from '@cratis/arc.react/dialogs';\n * import { CommandDialog } from '@cratis/components/CommandDialog';\n * import { RegisterAuthor } from './RegisterAuthor'; // proxy from C#\n *\n * type RegisterAuthorResponse = { authorId: string };\n *\n * const RegisterAuthorDialog = () => {\n * const { closeDialog } = useDialogContext<CommandResult<RegisterAuthorResponse>>();\n * return (\n * <CommandDialog<RegisterAuthor, RegisterAuthorResponse>\n * command={RegisterAuthor}\n * title=\"Register author\"\n * okLabel=\"Register\"\n * onSuccess={(response) => closeDialog(DialogResult.Ok)}\n * onCancel={() => closeDialog(DialogResult.Cancelled)}>\n * <InputTextField value={c => c.name} title=\"Name\" />\n * <InputTextField value={c => c.email} title=\"Email\" />\n * </CommandDialog>\n * );\n * };\n * ```\n *\n * ## What's special vs. raw Dialog + CommandForm\n *\n * - Confirm wiring (`onConfirm` → `commandInstance.execute()`) is handled\n * internally; you only supply `onSuccess` / `onValidationFailure` / `onFailed`.\n * - The dialog's `isBusy` state tracks the in-flight command without manual\n * `useState`.\n * - Field error propagation from `CommandResult.validationResults` to the\n * form context is automatic.\n *\n * @typeParam TCommand - The command class (proxy generated from C# `[Command]`).\n * @typeParam TResponse - The success payload type returned by the command's `Handle()` method on the backend.\n * @param props - {@link CommandDialogProps}.\n */\nconst CommandDialogComponent = <TCommand extends object = object, TResponse = object>(\n props: CommandDialogProps<TCommand, TResponse>,\n) => {\n const {\n title,\n subtitle,\n placement,\n closeIcon,\n visible,\n width,\n style,\n contentStyle,\n resizable,\n buttons = DialogButtons.OkCancel,\n initialFocus,\n okLabel,\n cancelLabel,\n yesLabel,\n noLabel,\n dismissable,\n dismissOnOutsideClick,\n closeOnEscape,\n showCloseButton,\n closeAriaLabel,\n isValid,\n onClose,\n onConfirm,\n onCancel,\n onBeforeExecute,\n confirmBeforeExecute,\n className,\n pt,\n ptOptions,\n unstyled,\n children,\n ...commandFormProps\n } = props;\n\n const dialogProps = {\n title,\n subtitle,\n placement,\n closeIcon,\n visible,\n width,\n style,\n contentStyle,\n resizable,\n buttons,\n initialFocus,\n okLabel,\n cancelLabel,\n yesLabel,\n noLabel,\n dismissable,\n dismissOnOutsideClick,\n closeOnEscape,\n showCloseButton,\n closeAriaLabel,\n isValid,\n onClose,\n onConfirm,\n onCancel,\n className,\n pt,\n ptOptions,\n unstyled,\n } satisfies ForwardedDialogProps;\n\n return (\n <CommandForm<TCommand, TResponse> {...commandFormProps}>\n <CommandDialogWrapper<TCommand, TResponse>\n {...dialogProps}\n onSuccess={props.onSuccess}\n onValidationFailure={props.onValidationFailure}\n onFailed={props.onFailed}\n onException={props.onException}\n onUnauthorized={props.onUnauthorized}\n onBeforeExecute={onBeforeExecute}\n confirmBeforeExecute={confirmBeforeExecute}\n >\n {children}\n </CommandDialogWrapper>\n </CommandForm>\n );\n};\n\nconst CommandDialogColumnWrapper = ({ children }: { children: React.ReactNode }) => (\n <CommandForm.Column>{children}</CommandForm.Column>\n);\nmarkAsCommandFormColumn(CommandDialogColumnWrapper);\n\nCommandDialogComponent.Column = CommandDialogColumnWrapper;\n\n/**\n * A {@link Dialog} that hosts a Cratis Arc `CommandForm`, runs the bound\n * command on confirm, and only closes when the command succeeds. This is\n * the standard pattern for \"user fills in a form, clicks OK, command runs\n * server-side, dialog dismisses\" — `CommandDialog` collapses about thirty\n * lines of orchestration into the props on a single component.\n *\n * See {@link CommandDialogComponent} for full documentation.\n *\n * @typeParam TCommand - The command class (proxy generated from C# `[Command]`).\n * @typeParam TResponse - The success payload type returned by the command's `Handle()` method on the backend.\n */\nexport const CommandDialog = CommandDialogComponent;\n"],"names":["_jsx"],"mappings":";;;;;;;;AAwEA,MAAM,oBAAoB,GAAG,CAA8C,EACvE,OAAO,EACP,OAAO,EACP,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,QAAQ,EACR,GAAG,WAAW,EASjB,KAAI;AACD,IAAA,MAAM,EACF,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,EAAE,kBAAkB,GAC9B,GAAG,qBAAqB,EAAY;AACrC,IAAA,MAAM,eAAe,GAAG,kBAAkB,EAAY;AACtD,IAAA,MAAM,UAAU,GAAG,mBAAmB,CAClC,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,WAAW,CACxF;AAED,IAAA,MAAM,aAAa,GAAG,YAAW;AAC7B,QAAA,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,GAAG,EAAE;AACrC,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,KAAK;AAEzB,QAAA,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;AACnB,YAAA,MAAM,QAAQ,GAAG,MAAM,CAAC;AACxB,YAAA,IAAI,MAAM,CAAC,aAAa,EAAE;gBACtB,MAAM,WAAW,GAAG,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC;YAC7E;YACA,IAAI,CAAC,MAAM,CAAC,YAAY;gBAAE,MAAM,cAAc,IAAI;AACl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rB,aAAa;QACb,eAAe;QACf,cAAc;QACd,OAAO;QACP,OAAO;QACP,SAAS;QACT,QAAQ;QACR,SAAS;QACT,EAAE;QACF,SAAS;QACT,QAAQ;KACoB;IAEhC,QACIA,GAAA,CAAC,WAAW,EAAA,EAAA,GAA0B,gBAAgB,YAClDA,GAAA,CAAC,oBAAoB,EAAA,EAAA,GACb,WAAW,EACf,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAC9C,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,oBAAoB,EAAA,QAAA,EAEzC,QAAQ,EAAA,CACU,EAAA,CACb;AAEtB,CAAC;AAED,MAAM,0BAA0B,GAAG,CAAC,EAAE,QAAQ,EAAiC,MAC3EA,GAAA,CAAC,WAAW,CAAC,MAAM,cAAE,QAAQ,EAAA,CAAsB,CACtD;AACD,uBAAuB,CAAC,0BAA0B,CAAC;AAEnD,sBAAsB,CAAC,MAAM,GAAG,0BAA0B;AAcnD,MAAM,aAAa,GAAG;;"}
|
|
@@ -71,6 +71,11 @@ export interface DatePickerInputProps {
|
|
|
71
71
|
id?: string;
|
|
72
72
|
/** Shows Today and Clear actions. */
|
|
73
73
|
showButtonBar?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Keep outside controls interactive while the calendar is open. An outside
|
|
76
|
+
* click dismisses the popover and reaches its target. Defaults to false.
|
|
77
|
+
*/
|
|
78
|
+
isNonModal?: boolean;
|
|
74
79
|
/** Visible text while no date is selected. */
|
|
75
80
|
placeholder?: string;
|
|
76
81
|
/** Deprecated renderer mask; locale controls formatting now. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerInput.d.ts","sourceRoot":"","sources":["../../../Common/DatePickerInput.tsx"],"names":[],"mapp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;IACf,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,wCAAwC;IACxC,EAAE,CAAC,EAAE,0BAA0B,CAAC;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mDAAmD;IACnD,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAQD;;;GAGG;AACH,eAAO,MAAM,eAAe,UAAW,oBAAoB,+FAG1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerInput.js","sources":["../../../Common/DatePickerInput.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type {\n ButtonHTMLAttributes,\n CSSProperties,\n FocusEventHandler,\n HTMLAttributes,\n} from 'react';\nimport type { ChangeHandler } from '../types/ChangeHandler';\nimport { unstable_useSlot } from '../renderer/RendererContext';\nimport { renderSlot } from '../renderer/renderSlot';\nimport type { unstable_SlotDeclaration } from '../renderer/slots';\nimport { DatePickerInputImplementation } from './DatePickerInputImplementation';\n\ninterface DatePickerPartAttributes extends Omit<\n HTMLAttributes<HTMLElement>,\n 'defaultValue' | 'onChange' | 'role'\n> {\n id?: string;\n className?: string;\n style?: CSSProperties;\n disabled?: boolean;\n readOnly?: boolean;\n placeholder?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-invalid'?: boolean;\n [attribute: `data-${string}`]: string | number | boolean | undefined;\n}\n\ntype DatePickerButtonAttributes = Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'onClick' | 'value'\n>;\n\n/** Stable Cratis-owned parts for styling a {@link DatePickerInput}. */\nexport interface DatePickerInputPassThrough {\n /** Outer wrapper. */\n root?: DatePickerPartAttributes;\n /** Focusable segmented-input group. */\n group?: DatePickerPartAttributes;\n /** Segmented date input. */\n input?: DatePickerPartAttributes;\n /** Visible empty-value placeholder. */\n placeholder?: DatePickerPartAttributes;\n /** Individual editable date/time segment. */\n segment?: DatePickerPartAttributes;\n /** Calendar popup trigger. */\n trigger?: DatePickerButtonAttributes;\n /** Portaled calendar popover. */\n popover?: DatePickerPartAttributes;\n /** Calendar dialog. */\n dialog?: DatePickerPartAttributes;\n /** Calendar root. */\n calendar?: DatePickerPartAttributes;\n /** Calendar navigation header. */\n header?: DatePickerPartAttributes;\n /** Current month/year heading. */\n heading?: DatePickerPartAttributes;\n /** Previous-month action. */\n previous?: DatePickerButtonAttributes;\n /** Next-month action. */\n next?: DatePickerButtonAttributes;\n /** Calendar grid. */\n grid?: DatePickerPartAttributes;\n /** One calendar cell. */\n cell?: DatePickerPartAttributes;\n /** Today/clear action row. */\n buttonBar?: DatePickerPartAttributes;\n /** Today action; disabled and non-interactive when today falls outside `minDate`/`maxDate`. */\n today?: DatePickerButtonAttributes;\n /** Clear action. */\n clear?: DatePickerButtonAttributes;\n}\n\n/** Props for {@link DatePickerInput}. */\nexport interface DatePickerInputProps {\n /** Controlled JavaScript date value. */\n value: Date | null;\n /** Invoked with the selected JavaScript date or `null` and optional change-origin metadata. */\n onChange: ChangeHandler<Date | null>;\n /** Invoked when focus leaves the picker wrapper. */\n onBlur?: FocusEventHandler<HTMLElement>;\n /** Marks the picker invalid. */\n invalid?: boolean;\n /** Disables every picker control. */\n disabled?: boolean;\n /** Prevents editing while retaining focus semantics. */\n readOnly?: boolean;\n /** DOM id for the segmented-input group. */\n id?: string;\n /** Shows Today and Clear actions. */\n showButtonBar?: boolean;\n /** Visible text while no date is selected. */\n placeholder?: string;\n /** Deprecated renderer mask; locale controls formatting now. */\n dateFormat?: string;\n /** Shows the calendar trigger button. Defaults to `true`. */\n showIcon?: boolean;\n /** Adds hour/minute segments. */\n showTime?: boolean;\n /** Preferred 12- or 24-hour cycle. */\n hourFormat?: '12' | '24';\n /** Earliest selectable date. */\n minDate?: Date;\n /** Latest selectable date. */\n maxDate?: Date;\n /** Extra class name for the outer wrapper. */\n className?: string;\n /** Inline style for the outer wrapper. */\n style?: CSSProperties;\n /** Cratis-owned per-part attributes. */\n pt?: DatePickerInputPassThrough;\n /**\n * @deprecated Cratis parts always merge. Remove this renderer-era option.\n */\n ptOptions?: object;\n /**\n * @deprecated Components always uses consumer-owned CSS. Customize through `pt` and CSS instead.\n */\n unstyled?: boolean;\n /** Localized label for the Today action. */\n todayLabel?: string;\n /** Localized label for the Clear action. */\n clearLabel?: string;\n /** Accessible name when no external label is supplied. */\n 'aria-label'?: string;\n /** Id of the element that labels the picker. */\n 'aria-labelledby'?: string;\n /** Id of the element that describes the picker. */\n 'aria-describedby'?: string;\n}\n\nconst coreDatePickerDeclaration = Object.freeze({\n mode: 'atomic',\n fidelity: 'native',\n render: DatePickerInputImplementation,\n}) satisfies unstable_SlotDeclaration<'display.datePicker'>;\n\n/**\n * An internationalized date or date-time picker with Cratis-owned markup parts.\n * The public boundary remains `Date | null`; React Aria's calendar values stay internal.\n */\nexport const DatePickerInput = (props: DatePickerInputProps) => {\n const declaration = unstable_useSlot('display.datePicker', coreDatePickerDeclaration);\n return renderSlot(declaration, props);\n};\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"DatePickerInput.js","sources":["../../../Common/DatePickerInput.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type {\n ButtonHTMLAttributes,\n CSSProperties,\n FocusEventHandler,\n HTMLAttributes,\n} from 'react';\nimport type { ChangeHandler } from '../types/ChangeHandler';\nimport { unstable_useSlot } from '../renderer/RendererContext';\nimport { renderSlot } from '../renderer/renderSlot';\nimport type { unstable_SlotDeclaration } from '../renderer/slots';\nimport { DatePickerInputImplementation } from './DatePickerInputImplementation';\n\ninterface DatePickerPartAttributes extends Omit<\n HTMLAttributes<HTMLElement>,\n 'defaultValue' | 'onChange' | 'role'\n> {\n id?: string;\n className?: string;\n style?: CSSProperties;\n disabled?: boolean;\n readOnly?: boolean;\n placeholder?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-invalid'?: boolean;\n [attribute: `data-${string}`]: string | number | boolean | undefined;\n}\n\ntype DatePickerButtonAttributes = Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'onClick' | 'value'\n>;\n\n/** Stable Cratis-owned parts for styling a {@link DatePickerInput}. */\nexport interface DatePickerInputPassThrough {\n /** Outer wrapper. */\n root?: DatePickerPartAttributes;\n /** Focusable segmented-input group. */\n group?: DatePickerPartAttributes;\n /** Segmented date input. */\n input?: DatePickerPartAttributes;\n /** Visible empty-value placeholder. */\n placeholder?: DatePickerPartAttributes;\n /** Individual editable date/time segment. */\n segment?: DatePickerPartAttributes;\n /** Calendar popup trigger. */\n trigger?: DatePickerButtonAttributes;\n /** Portaled calendar popover. */\n popover?: DatePickerPartAttributes;\n /** Calendar dialog. */\n dialog?: DatePickerPartAttributes;\n /** Calendar root. */\n calendar?: DatePickerPartAttributes;\n /** Calendar navigation header. */\n header?: DatePickerPartAttributes;\n /** Current month/year heading. */\n heading?: DatePickerPartAttributes;\n /** Previous-month action. */\n previous?: DatePickerButtonAttributes;\n /** Next-month action. */\n next?: DatePickerButtonAttributes;\n /** Calendar grid. */\n grid?: DatePickerPartAttributes;\n /** One calendar cell. */\n cell?: DatePickerPartAttributes;\n /** Today/clear action row. */\n buttonBar?: DatePickerPartAttributes;\n /** Today action; disabled and non-interactive when today falls outside `minDate`/`maxDate`. */\n today?: DatePickerButtonAttributes;\n /** Clear action. */\n clear?: DatePickerButtonAttributes;\n}\n\n/** Props for {@link DatePickerInput}. */\nexport interface DatePickerInputProps {\n /** Controlled JavaScript date value. */\n value: Date | null;\n /** Invoked with the selected JavaScript date or `null` and optional change-origin metadata. */\n onChange: ChangeHandler<Date | null>;\n /** Invoked when focus leaves the picker wrapper. */\n onBlur?: FocusEventHandler<HTMLElement>;\n /** Marks the picker invalid. */\n invalid?: boolean;\n /** Disables every picker control. */\n disabled?: boolean;\n /** Prevents editing while retaining focus semantics. */\n readOnly?: boolean;\n /** DOM id for the segmented-input group. */\n id?: string;\n /** Shows Today and Clear actions. */\n showButtonBar?: boolean;\n /**\n * Keep outside controls interactive while the calendar is open. An outside\n * click dismisses the popover and reaches its target. Defaults to false.\n */\n isNonModal?: boolean;\n /** Visible text while no date is selected. */\n placeholder?: string;\n /** Deprecated renderer mask; locale controls formatting now. */\n dateFormat?: string;\n /** Shows the calendar trigger button. Defaults to `true`. */\n showIcon?: boolean;\n /** Adds hour/minute segments. */\n showTime?: boolean;\n /** Preferred 12- or 24-hour cycle. */\n hourFormat?: '12' | '24';\n /** Earliest selectable date. */\n minDate?: Date;\n /** Latest selectable date. */\n maxDate?: Date;\n /** Extra class name for the outer wrapper. */\n className?: string;\n /** Inline style for the outer wrapper. */\n style?: CSSProperties;\n /** Cratis-owned per-part attributes. */\n pt?: DatePickerInputPassThrough;\n /**\n * @deprecated Cratis parts always merge. Remove this renderer-era option.\n */\n ptOptions?: object;\n /**\n * @deprecated Components always uses consumer-owned CSS. Customize through `pt` and CSS instead.\n */\n unstyled?: boolean;\n /** Localized label for the Today action. */\n todayLabel?: string;\n /** Localized label for the Clear action. */\n clearLabel?: string;\n /** Accessible name when no external label is supplied. */\n 'aria-label'?: string;\n /** Id of the element that labels the picker. */\n 'aria-labelledby'?: string;\n /** Id of the element that describes the picker. */\n 'aria-describedby'?: string;\n}\n\nconst coreDatePickerDeclaration = Object.freeze({\n mode: 'atomic',\n fidelity: 'native',\n render: DatePickerInputImplementation,\n}) satisfies unstable_SlotDeclaration<'display.datePicker'>;\n\n/**\n * An internationalized date or date-time picker with Cratis-owned markup parts.\n * The public boundary remains `Date | null`; React Aria's calendar values stay internal.\n */\nexport const DatePickerInput = (props: DatePickerInputProps) => {\n const declaration = unstable_useSlot('display.datePicker', coreDatePickerDeclaration);\n return renderSlot(declaration, props);\n};\n"],"names":[],"mappings":";;;;AA4IA,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC;AAC5C,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,QAAQ,EAAE,QAAQ;AAClB,IAAA,MAAM,EAAE,6BAA6B;AACxC,CAAA,CAA0D;AAMpD,MAAM,eAAe,GAAG,CAAC,KAA2B,KAAI;IAC3D,MAAM,WAAW,GAAG,gBAAgB,CAAC,oBAAoB,EAAE,yBAAyB,CAAC;AACrF,IAAA,OAAO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC;AACzC;;"}
|
|
@@ -3,5 +3,5 @@ import type { DatePickerInputProps } from './DatePickerInput.js';
|
|
|
3
3
|
* An internationalized date or date-time picker with Cratis-owned markup parts.
|
|
4
4
|
* The public boundary remains `Date | null`; React Aria's calendar values stay internal.
|
|
5
5
|
*/
|
|
6
|
-
export declare const DatePickerInputImplementation: ({ value, onChange, onBlur, invalid, disabled, readOnly, id, showButtonBar, placeholder, showIcon, showTime, hourFormat, minDate, maxDate, className, style, pt, todayLabel, clearLabel, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, }: DatePickerInputProps) => import("react").JSX.Element;
|
|
6
|
+
export declare const DatePickerInputImplementation: ({ value, onChange, onBlur, invalid, disabled, readOnly, id, showButtonBar, isNonModal, placeholder, showIcon, showTime, hourFormat, minDate, maxDate, className, style, pt, todayLabel, clearLabel, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, }: DatePickerInputProps) => import("react").JSX.Element;
|
|
7
7
|
//# sourceMappingURL=DatePickerInputImplementation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerInputImplementation.d.ts","sourceRoot":"","sources":["../../../Common/DatePickerInputImplementation.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAmB,CAAC;AAe9D;;;GAGG;AACH,eAAO,MAAM,6BAA6B
|
|
1
|
+
{"version":3,"file":"DatePickerInputImplementation.d.ts","sourceRoot":"","sources":["../../../Common/DatePickerInputImplementation.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAmB,CAAC;AAe9D;;;GAGG;AACH,eAAO,MAAM,6BAA6B,2SAwBvC,oBAAoB,gCA6YtB,CAAC"}
|
|
@@ -24,7 +24,7 @@ const asDateValue = (value, showTime) => {
|
|
|
24
24
|
return showTime ? zoned : toCalendarDate(zoned);
|
|
25
25
|
};
|
|
26
26
|
const asDate = (value) => value ? value.toDate(getLocalTimeZone()) : null;
|
|
27
|
-
const DatePickerInputImplementation = ({ value, onChange, onBlur, invalid, disabled, readOnly, id, showButtonBar, placeholder, showIcon = true, showTime, hourFormat, minDate, maxDate, className, style, pt, todayLabel, clearLabel, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, }) => {
|
|
27
|
+
const DatePickerInputImplementation = ({ value, onChange, onBlur, invalid, disabled, readOnly, id, showButtonBar, isNonModal = false, placeholder, showIcon = true, showTime, hourFormat, minDate, maxDate, className, style, pt, todayLabel, clearLabel, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, }) => {
|
|
28
28
|
const [isPickerOpen, setIsPickerOpen] = useState(false);
|
|
29
29
|
const overlayEnvironment = unstable_useOverlayEnvironment();
|
|
30
30
|
const nearestDialogZIndex = useNearestDialogZIndex();
|
|
@@ -78,7 +78,7 @@ const DatePickerInputImplementation = ({ value, onChange, onBlur, invalid, disab
|
|
|
78
78
|
effectiveReadOnly ||
|
|
79
79
|
undefined, "data-readonly": effectiveReadOnly || undefined, "data-selected": value !== null || undefined })), "aria-label": pt?.trigger?.['aria-label'] ??
|
|
80
80
|
datePickerMessages?.openCalendar ??
|
|
81
|
-
'Open calendar', children: jsx("span", { "aria-hidden": 'true', children: "\u25A6" }) }))] }), jsx(Popover, { ...pt?.popover, className: classNames('cratis-date-picker__popover', pt?.popover?.className), style: {
|
|
81
|
+
'Open calendar', children: jsx("span", { "aria-hidden": 'true', children: "\u25A6" }) }))] }), jsx(Popover, { ...pt?.popover, isNonModal: isNonModal, className: classNames('cratis-date-picker__popover', pt?.popover?.className), style: {
|
|
82
82
|
zIndex: resolvedPopoverZIndex,
|
|
83
83
|
...pt?.popover?.style,
|
|
84
84
|
}, "data-cratis-part": 'popover', "data-open": true, placement: 'bottom start', children: jsxs(Dialog, { ...pt?.dialog, className: classNames('cratis-date-picker__dialog', pt?.dialog?.className), "data-cratis-part": 'dialog', "data-open": true, children: [jsxs(Calendar, { ...pt?.calendar, className: classNames('cratis-date-picker__calendar', pt?.calendar?.className), "data-cratis-part": 'calendar', "data-open": true, children: [jsxs("header", { ...pt?.header, className: classNames('cratis-date-picker__header', pt?.header?.className), "data-cratis-part": 'header', children: [jsx(Button, { ...asReactAriaButtonProps(pt?.previous), slot: 'previous', className: classNames('cratis-date-picker__nav', pt?.previous?.className), "data-cratis-part": 'previous', "aria-label": pt?.previous?.['aria-label'] ??
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerInputImplementation.js","sources":["../../../Common/DatePickerInputImplementation.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } 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 Popover,\n type DateValue,\n} from 'react-aria-components/DatePicker';\nimport { Dialog } from 'react-aria-components/Dialog';\nimport { Heading } from 'react-aria-components/Heading';\nimport { UNSAFE_PortalProvider } from 'react-aria';\nimport { unstable_useOverlayEnvironment } from '../renderer/RendererContext';\nimport { useCratisComponentsConfig } from './CratisComponentsProvider';\nimport { useCratisIcon } from '../configuration/useCratisIcon';\nimport { OVERLAY_OFFSET, zIndexAboveDialog } from '../renderer/dialogStack';\nimport { useNearestDialogZIndex } from '../renderer/DialogStackContext';\nimport { asReactAriaButtonProps } from './reactAriaProps';\nimport {\n fromDate,\n getLocalTimeZone,\n today,\n toCalendarDate,\n} from '@internationalized/date';\nimport type { DatePickerInputProps } from './DatePickerInput';\nimport { classNames } from '../ClassNames/classNames';\n\nconst asDateValue = (\n value: Date | null,\n showTime: boolean | undefined,\n): DateValue | null => {\n if (!value) return null;\n const zoned = fromDate(value, getLocalTimeZone());\n return showTime ? zoned : toCalendarDate(zoned);\n};\n\nconst asDate = (value: DateValue | null): Date | null =>\n value ? value.toDate(getLocalTimeZone()) : null;\n\n/**\n * An internationalized date or date-time picker with Cratis-owned markup parts.\n * The public boundary remains `Date | null`; React Aria's calendar values stay internal.\n */\nexport const DatePickerInputImplementation = ({\n value,\n onChange,\n onBlur,\n invalid,\n disabled,\n readOnly,\n id,\n showButtonBar,\n placeholder,\n showIcon = true,\n showTime,\n hourFormat,\n minDate,\n maxDate,\n className,\n style,\n pt,\n todayLabel,\n clearLabel,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n}: DatePickerInputProps) => {\n const [isPickerOpen, setIsPickerOpen] = useState(false);\n const overlayEnvironment = unstable_useOverlayEnvironment();\n const nearestDialogZIndex = useNearestDialogZIndex();\n const resolvedPopoverZIndex =\n nearestDialogZIndex === null\n ? 'var(--cratis-z-index-overlay)'\n : zIndexAboveDialog(nearestDialogZIndex, OVERLAY_OFFSET);\n const { messages } = useCratisComponentsConfig();\n const datePickerMessages = messages?.datePicker;\n const icon = useCratisIcon();\n const resolvedTodayLabel = todayLabel ?? datePickerMessages?.today ?? 'Today';\n const resolvedClearLabel = clearLabel ?? datePickerMessages?.clear ?? 'Clear';\n const timeZone = getLocalTimeZone();\n const minValue = asDateValue(minDate ?? null, showTime) ?? undefined;\n const maxValue = asDateValue(maxDate ?? null, showTime) ?? undefined;\n const todayDate = today(timeZone).toDate(timeZone);\n // Compare the same granularity that the action emits. In date-time mode the Today action\n // retains its existing local-midnight value, which can legitimately fall before a same-day\n // minDate carrying a later time.\n const todayValue = asDateValue(todayDate, showTime)!;\n const isTodayOutOfBounds =\n (minValue !== undefined && todayValue.compare(minValue) < 0) ||\n (maxValue !== undefined && todayValue.compare(maxValue) > 0);\n const rootClassName = classNames(\n 'cratis-date-picker',\n pt?.root?.className,\n className,\n );\n const inputId = id ?? pt?.input?.id;\n const effectiveDisabled = disabled ?? pt?.input?.disabled ?? false;\n const effectiveReadOnly = readOnly ?? pt?.input?.readOnly ?? false;\n const effectiveInvalid = invalid ?? pt?.input?.['aria-invalid'] ?? false;\n const actionsDisabled = effectiveDisabled || effectiveReadOnly;\n const clearDisabled = actionsDisabled || pt?.clear?.disabled || false;\n const effectivePlaceholder = placeholder ?? pt?.input?.placeholder;\n const effectiveAriaLabel =\n ariaLabel ??\n pt?.input?.['aria-label'] ??\n effectivePlaceholder ??\n datePickerMessages?.label ??\n 'Date';\n const effectiveAriaLabelledby = ariaLabelledby ?? pt?.input?.['aria-labelledby'];\n const effectiveAriaDescribedby = ariaDescribedby ?? pt?.input?.['aria-describedby'];\n const inputPartAttributes = {\n ...pt?.input,\n id: undefined,\n className: undefined,\n style: undefined,\n disabled: undefined,\n readOnly: undefined,\n placeholder: undefined,\n 'aria-label': undefined,\n 'aria-labelledby': undefined,\n 'aria-describedby': undefined,\n 'aria-invalid': undefined,\n };\n\n return (\n <div\n {...pt?.root}\n className={rootClassName}\n style={{ ...pt?.root?.style, ...style }}\n data-cratis-part='root'\n data-invalid={effectiveInvalid || undefined}\n data-disabled={effectiveDisabled || undefined}\n data-readonly={effectiveReadOnly || undefined}\n data-open={isPickerOpen || undefined}\n data-selected={value !== null || undefined}\n onBlur={onBlur}\n >\n <UNSAFE_PortalProvider getContainer={overlayEnvironment.getContainer}>\n <AriaDatePicker\n value={asDateValue(value, showTime)}\n onChange={(next) => onChange(asDate(next), { source: 'user' })}\n isDisabled={effectiveDisabled}\n isReadOnly={effectiveReadOnly}\n isInvalid={effectiveInvalid}\n isOpen={isPickerOpen}\n onOpenChange={(nextIsOpen) => {\n if (!nextIsOpen || !effectiveReadOnly) setIsPickerOpen(nextIsOpen);\n }}\n minValue={minValue}\n maxValue={maxValue}\n granularity={showTime ? 'minute' : 'day'}\n hourCycle={\n hourFormat === '12' ? 12 : hourFormat === '24' ? 24 : undefined\n }\n aria-label={effectiveAriaLabel}\n aria-labelledby={effectiveAriaLabelledby}\n aria-describedby={effectiveAriaDescribedby}\n className='cratis-date-picker__picker'\n >\n {({ isOpen }) => (\n <>\n <Group\n {...pt?.group}\n id={inputId}\n aria-invalid={effectiveInvalid || undefined}\n className={classNames(\n 'cratis-date-picker__group',\n pt?.group?.className,\n )}\n data-cratis-part='group'\n data-empty={value === null || undefined}\n render={(groupProps) => (\n <div\n {...groupProps}\n data-open={isOpen || undefined}\n data-invalid={effectiveInvalid || undefined}\n data-disabled={effectiveDisabled || undefined}\n data-readonly={effectiveReadOnly || undefined}\n data-selected={value !== null || undefined}\n />\n )}\n >\n <DateInput\n {...inputPartAttributes}\n className={classNames(\n 'cratis-date-picker__input',\n pt?.input?.className,\n )}\n style={pt?.input?.style}\n data-cratis-part='input'\n data-placeholder={effectivePlaceholder}\n render={(inputProps) => (\n <div\n {...inputProps}\n data-open={isOpen || undefined}\n data-invalid={effectiveInvalid || undefined}\n data-disabled={effectiveDisabled || undefined}\n data-readonly={effectiveReadOnly || undefined}\n data-selected={value !== null || undefined}\n />\n )}\n >\n {(segment) => (\n <DateSegment\n {...pt?.segment}\n segment={segment}\n className={classNames(\n 'cratis-date-picker__segment',\n pt?.segment?.className,\n )}\n data-cratis-part='segment'\n render={(segmentProps) => (\n <span\n {...segmentProps}\n data-invalid={\n effectiveInvalid || undefined\n }\n data-disabled={\n effectiveDisabled || undefined\n }\n data-readonly={\n effectiveReadOnly || undefined\n }\n />\n )}\n />\n )}\n </DateInput>\n {value === null && effectivePlaceholder && (\n <span\n {...pt?.placeholder}\n className={classNames(\n 'cratis-date-picker__placeholder',\n pt?.placeholder?.className,\n )}\n data-cratis-part='placeholder'\n aria-hidden='true'\n >\n {effectivePlaceholder}\n </span>\n )}\n {showIcon && (\n <Button\n {...asReactAriaButtonProps(pt?.trigger)}\n isDisabled={\n effectiveDisabled || effectiveReadOnly\n }\n className={classNames(\n 'cratis-date-picker__trigger',\n pt?.trigger?.className,\n )}\n data-cratis-part='trigger'\n render={(triggerProps) => (\n <button\n {...triggerProps}\n data-open={isOpen || undefined}\n data-invalid={\n effectiveInvalid || undefined\n }\n data-disabled={\n effectiveDisabled ||\n effectiveReadOnly ||\n undefined\n }\n data-readonly={\n effectiveReadOnly || undefined\n }\n data-selected={\n value !== null || undefined\n }\n />\n )}\n aria-label={\n pt?.trigger?.['aria-label'] ??\n datePickerMessages?.openCalendar ??\n 'Open calendar'\n }\n >\n <span aria-hidden='true'>▦</span>\n </Button>\n )}\n </Group>\n <Popover\n {...pt?.popover}\n className={classNames(\n 'cratis-date-picker__popover',\n pt?.popover?.className,\n )}\n style={{\n zIndex: resolvedPopoverZIndex,\n ...pt?.popover?.style,\n }}\n data-cratis-part='popover'\n data-open\n placement='bottom start'\n >\n <Dialog\n {...pt?.dialog}\n className={classNames(\n 'cratis-date-picker__dialog',\n pt?.dialog?.className,\n )}\n data-cratis-part='dialog'\n data-open\n >\n <Calendar\n {...pt?.calendar}\n className={classNames(\n 'cratis-date-picker__calendar',\n pt?.calendar?.className,\n )}\n data-cratis-part='calendar'\n data-open\n >\n <header\n {...pt?.header}\n className={classNames(\n 'cratis-date-picker__header',\n pt?.header?.className,\n )}\n data-cratis-part='header'\n >\n <Button\n {...asReactAriaButtonProps(pt?.previous)}\n slot='previous'\n className={classNames(\n 'cratis-date-picker__nav',\n pt?.previous?.className,\n )}\n data-cratis-part='previous'\n aria-label={\n pt?.previous?.['aria-label'] ??\n datePickerMessages?.previousMonth ??\n 'Previous month'\n }\n >\n <span aria-hidden='true'>\n {icon('previous', '‹')}\n </span>\n </Button>\n <Heading\n {...pt?.heading}\n className={classNames(\n 'cratis-date-picker__heading',\n pt?.heading?.className,\n )}\n data-cratis-part='heading'\n />\n <Button\n {...asReactAriaButtonProps(pt?.next)}\n slot='next'\n className={classNames(\n 'cratis-date-picker__nav',\n pt?.next?.className,\n )}\n data-cratis-part='next'\n aria-label={\n pt?.next?.['aria-label'] ??\n datePickerMessages?.nextMonth ??\n 'Next month'\n }\n >\n <span aria-hidden='true'>\n {icon('next', '›')}\n </span>\n </Button>\n </header>\n <CalendarGrid\n {...pt?.grid}\n className={classNames(\n 'cratis-date-picker__grid',\n pt?.grid?.className,\n )}\n data-cratis-part='grid'\n >\n <CalendarGridHeader>\n {(day) => (\n <CalendarHeaderCell>\n {day}\n </CalendarHeaderCell>\n )}\n </CalendarGridHeader>\n <CalendarGridBody>\n {(date) => (\n <CalendarCell\n {...pt?.cell}\n date={date}\n className={classNames(\n 'cratis-date-picker__cell',\n pt?.cell?.className,\n )}\n data-cratis-part='cell'\n />\n )}\n </CalendarGridBody>\n </CalendarGrid>\n </Calendar>\n {showButtonBar && (\n <div\n {...pt?.buttonBar}\n className={classNames(\n 'cratis-date-picker__button-bar',\n pt?.buttonBar?.className,\n )}\n data-cratis-part='button-bar'\n >\n <button\n {...pt?.today}\n type='button'\n className={classNames(\n 'cratis-date-picker__action',\n pt?.today?.className,\n )}\n data-cratis-part='today'\n data-disabled={\n actionsDisabled || isTodayOutOfBounds || undefined\n }\n disabled={actionsDisabled || isTodayOutOfBounds}\n aria-disabled={\n actionsDisabled || isTodayOutOfBounds || undefined\n }\n onClick={(event) => {\n if (actionsDisabled || isTodayOutOfBounds) return;\n onChange(todayDate, {\n source: 'user',\n nativeEvent: event.nativeEvent,\n });\n }}\n >\n {resolvedTodayLabel}\n </button>\n <button\n {...pt?.clear}\n type='button'\n className={classNames(\n 'cratis-date-picker__action',\n pt?.clear?.className,\n )}\n data-cratis-part='clear'\n data-disabled={clearDisabled || undefined}\n disabled={clearDisabled}\n aria-disabled={clearDisabled || pt?.clear?.['aria-disabled'] || undefined}\n onClick={(event) => {\n if (clearDisabled) return;\n onChange(null, {\n source: 'user',\n nativeEvent: event.nativeEvent,\n });\n }}\n >\n {resolvedClearLabel}\n </button>\n </div>\n )}\n </Dialog>\n </Popover>\n </>\n )}\n </AriaDatePicker>\n </UNSAFE_PortalProvider>\n </div>\n );\n};\n"],"names":["_jsx","AriaDatePicker","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;AAqCA,MAAM,WAAW,GAAG,CAChB,KAAkB,EAClB,QAA6B,KACX;AAClB,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,IAAI;IACvB,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAAE,CAAC;AACjD,IAAA,OAAO,QAAQ,GAAG,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC;AACnD,CAAC;AAED,MAAM,MAAM,GAAG,CAAC,KAAuB,KACnC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,GAAG,IAAI;AAM5C,MAAM,6BAA6B,GAAG,CAAC,EAC1C,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,EAAE,EACF,aAAa,EACb,WAAW,EACX,QAAQ,GAAG,IAAI,EACf,QAAQ,EACR,UAAU,EACV,OAAO,EACP,OAAO,EACP,SAAS,EACT,KAAK,EACL,EAAE,EACF,UAAU,EACV,U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AK,EAAE,SAAS,CACvB,EAAA,kBAAA,EACgB,OAAO,EAAA,eAAA,EACT,aAAa,IAAI,SAAS,EACzC,QAAQ,EAAE,aAAa,EAAA,eAAA,EACR,aAAa,IAAI,EAAE,EAAE,KAAK,GAAG,eAAe,CAAC,IAAI,SAAS,EACzE,OAAO,EAAE,CAAC,KAAK,KAAI;AACf,oDAAA,IAAI,aAAa;wDAAE;oDACnB,QAAQ,CAAC,IAAI,EAAE;AACX,wDAAA,MAAM,EAAE,MAAM;wDACd,WAAW,EAAE,KAAK,CAAC,WAAW;AACjC,qDAAA,CAAC;AACN,gDAAA,CAAC,EAAA,QAAA,EAEA,kBAAkB,EAAA,CACd,CAAA,EAAA,CACP,CACT,CAAA,EAAA,CACI,EAAA,CACH,CAAA,EAAA,CACX,CACN,EAAA,CACY,EAAA,CACG,EAAA,CACtB;AAEd;;"}
|
|
1
|
+
{"version":3,"file":"DatePickerInputImplementation.js","sources":["../../../Common/DatePickerInputImplementation.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } 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 Popover,\n type DateValue,\n} from 'react-aria-components/DatePicker';\nimport { Dialog } from 'react-aria-components/Dialog';\nimport { Heading } from 'react-aria-components/Heading';\nimport { UNSAFE_PortalProvider } from 'react-aria';\nimport { unstable_useOverlayEnvironment } from '../renderer/RendererContext';\nimport { useCratisComponentsConfig } from './CratisComponentsProvider';\nimport { useCratisIcon } from '../configuration/useCratisIcon';\nimport { OVERLAY_OFFSET, zIndexAboveDialog } from '../renderer/dialogStack';\nimport { useNearestDialogZIndex } from '../renderer/DialogStackContext';\nimport { asReactAriaButtonProps } from './reactAriaProps';\nimport {\n fromDate,\n getLocalTimeZone,\n today,\n toCalendarDate,\n} from '@internationalized/date';\nimport type { DatePickerInputProps } from './DatePickerInput';\nimport { classNames } from '../ClassNames/classNames';\n\nconst asDateValue = (\n value: Date | null,\n showTime: boolean | undefined,\n): DateValue | null => {\n if (!value) return null;\n const zoned = fromDate(value, getLocalTimeZone());\n return showTime ? zoned : toCalendarDate(zoned);\n};\n\nconst asDate = (value: DateValue | null): Date | null =>\n value ? value.toDate(getLocalTimeZone()) : null;\n\n/**\n * An internationalized date or date-time picker with Cratis-owned markup parts.\n * The public boundary remains `Date | null`; React Aria's calendar values stay internal.\n */\nexport const DatePickerInputImplementation = ({\n value,\n onChange,\n onBlur,\n invalid,\n disabled,\n readOnly,\n id,\n showButtonBar,\n isNonModal = false,\n placeholder,\n showIcon = true,\n showTime,\n hourFormat,\n minDate,\n maxDate,\n className,\n style,\n pt,\n todayLabel,\n clearLabel,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n}: DatePickerInputProps) => {\n const [isPickerOpen, setIsPickerOpen] = useState(false);\n const overlayEnvironment = unstable_useOverlayEnvironment();\n const nearestDialogZIndex = useNearestDialogZIndex();\n const resolvedPopoverZIndex =\n nearestDialogZIndex === null\n ? 'var(--cratis-z-index-overlay)'\n : zIndexAboveDialog(nearestDialogZIndex, OVERLAY_OFFSET);\n const { messages } = useCratisComponentsConfig();\n const datePickerMessages = messages?.datePicker;\n const icon = useCratisIcon();\n const resolvedTodayLabel = todayLabel ?? datePickerMessages?.today ?? 'Today';\n const resolvedClearLabel = clearLabel ?? datePickerMessages?.clear ?? 'Clear';\n const timeZone = getLocalTimeZone();\n const minValue = asDateValue(minDate ?? null, showTime) ?? undefined;\n const maxValue = asDateValue(maxDate ?? null, showTime) ?? undefined;\n const todayDate = today(timeZone).toDate(timeZone);\n // Compare the same granularity that the action emits. In date-time mode the Today action\n // retains its existing local-midnight value, which can legitimately fall before a same-day\n // minDate carrying a later time.\n const todayValue = asDateValue(todayDate, showTime)!;\n const isTodayOutOfBounds =\n (minValue !== undefined && todayValue.compare(minValue) < 0) ||\n (maxValue !== undefined && todayValue.compare(maxValue) > 0);\n const rootClassName = classNames(\n 'cratis-date-picker',\n pt?.root?.className,\n className,\n );\n const inputId = id ?? pt?.input?.id;\n const effectiveDisabled = disabled ?? pt?.input?.disabled ?? false;\n const effectiveReadOnly = readOnly ?? pt?.input?.readOnly ?? false;\n const effectiveInvalid = invalid ?? pt?.input?.['aria-invalid'] ?? false;\n const actionsDisabled = effectiveDisabled || effectiveReadOnly;\n const clearDisabled = actionsDisabled || pt?.clear?.disabled || false;\n const effectivePlaceholder = placeholder ?? pt?.input?.placeholder;\n const effectiveAriaLabel =\n ariaLabel ??\n pt?.input?.['aria-label'] ??\n effectivePlaceholder ??\n datePickerMessages?.label ??\n 'Date';\n const effectiveAriaLabelledby = ariaLabelledby ?? pt?.input?.['aria-labelledby'];\n const effectiveAriaDescribedby = ariaDescribedby ?? pt?.input?.['aria-describedby'];\n const inputPartAttributes = {\n ...pt?.input,\n id: undefined,\n className: undefined,\n style: undefined,\n disabled: undefined,\n readOnly: undefined,\n placeholder: undefined,\n 'aria-label': undefined,\n 'aria-labelledby': undefined,\n 'aria-describedby': undefined,\n 'aria-invalid': undefined,\n };\n\n return (\n <div\n {...pt?.root}\n className={rootClassName}\n style={{ ...pt?.root?.style, ...style }}\n data-cratis-part='root'\n data-invalid={effectiveInvalid || undefined}\n data-disabled={effectiveDisabled || undefined}\n data-readonly={effectiveReadOnly || undefined}\n data-open={isPickerOpen || undefined}\n data-selected={value !== null || undefined}\n onBlur={onBlur}\n >\n <UNSAFE_PortalProvider getContainer={overlayEnvironment.getContainer}>\n <AriaDatePicker\n value={asDateValue(value, showTime)}\n onChange={(next) => onChange(asDate(next), { source: 'user' })}\n isDisabled={effectiveDisabled}\n isReadOnly={effectiveReadOnly}\n isInvalid={effectiveInvalid}\n isOpen={isPickerOpen}\n onOpenChange={(nextIsOpen) => {\n if (!nextIsOpen || !effectiveReadOnly) setIsPickerOpen(nextIsOpen);\n }}\n minValue={minValue}\n maxValue={maxValue}\n granularity={showTime ? 'minute' : 'day'}\n hourCycle={\n hourFormat === '12' ? 12 : hourFormat === '24' ? 24 : undefined\n }\n aria-label={effectiveAriaLabel}\n aria-labelledby={effectiveAriaLabelledby}\n aria-describedby={effectiveAriaDescribedby}\n className='cratis-date-picker__picker'\n >\n {({ isOpen }) => (\n <>\n <Group\n {...pt?.group}\n id={inputId}\n aria-invalid={effectiveInvalid || undefined}\n className={classNames(\n 'cratis-date-picker__group',\n pt?.group?.className,\n )}\n data-cratis-part='group'\n data-empty={value === null || undefined}\n render={(groupProps) => (\n <div\n {...groupProps}\n data-open={isOpen || undefined}\n data-invalid={effectiveInvalid || undefined}\n data-disabled={effectiveDisabled || undefined}\n data-readonly={effectiveReadOnly || undefined}\n data-selected={value !== null || undefined}\n />\n )}\n >\n <DateInput\n {...inputPartAttributes}\n className={classNames(\n 'cratis-date-picker__input',\n pt?.input?.className,\n )}\n style={pt?.input?.style}\n data-cratis-part='input'\n data-placeholder={effectivePlaceholder}\n render={(inputProps) => (\n <div\n {...inputProps}\n data-open={isOpen || undefined}\n data-invalid={effectiveInvalid || undefined}\n data-disabled={effectiveDisabled || undefined}\n data-readonly={effectiveReadOnly || undefined}\n data-selected={value !== null || undefined}\n />\n )}\n >\n {(segment) => (\n <DateSegment\n {...pt?.segment}\n segment={segment}\n className={classNames(\n 'cratis-date-picker__segment',\n pt?.segment?.className,\n )}\n data-cratis-part='segment'\n render={(segmentProps) => (\n <span\n {...segmentProps}\n data-invalid={\n effectiveInvalid || undefined\n }\n data-disabled={\n effectiveDisabled || undefined\n }\n data-readonly={\n effectiveReadOnly || undefined\n }\n />\n )}\n />\n )}\n </DateInput>\n {value === null && effectivePlaceholder && (\n <span\n {...pt?.placeholder}\n className={classNames(\n 'cratis-date-picker__placeholder',\n pt?.placeholder?.className,\n )}\n data-cratis-part='placeholder'\n aria-hidden='true'\n >\n {effectivePlaceholder}\n </span>\n )}\n {showIcon && (\n <Button\n {...asReactAriaButtonProps(pt?.trigger)}\n isDisabled={\n effectiveDisabled || effectiveReadOnly\n }\n className={classNames(\n 'cratis-date-picker__trigger',\n pt?.trigger?.className,\n )}\n data-cratis-part='trigger'\n render={(triggerProps) => (\n <button\n {...triggerProps}\n data-open={isOpen || undefined}\n data-invalid={\n effectiveInvalid || undefined\n }\n data-disabled={\n effectiveDisabled ||\n effectiveReadOnly ||\n undefined\n }\n data-readonly={\n effectiveReadOnly || undefined\n }\n data-selected={\n value !== null || undefined\n }\n />\n )}\n aria-label={\n pt?.trigger?.['aria-label'] ??\n datePickerMessages?.openCalendar ??\n 'Open calendar'\n }\n >\n <span aria-hidden='true'>▦</span>\n </Button>\n )}\n </Group>\n <Popover\n {...pt?.popover}\n isNonModal={isNonModal}\n className={classNames(\n 'cratis-date-picker__popover',\n pt?.popover?.className,\n )}\n style={{\n zIndex: resolvedPopoverZIndex,\n ...pt?.popover?.style,\n }}\n data-cratis-part='popover'\n data-open\n placement='bottom start'\n >\n <Dialog\n {...pt?.dialog}\n className={classNames(\n 'cratis-date-picker__dialog',\n pt?.dialog?.className,\n )}\n data-cratis-part='dialog'\n data-open\n >\n <Calendar\n {...pt?.calendar}\n className={classNames(\n 'cratis-date-picker__calendar',\n pt?.calendar?.className,\n )}\n data-cratis-part='calendar'\n data-open\n >\n <header\n {...pt?.header}\n className={classNames(\n 'cratis-date-picker__header',\n pt?.header?.className,\n )}\n data-cratis-part='header'\n >\n <Button\n {...asReactAriaButtonProps(pt?.previous)}\n slot='previous'\n className={classNames(\n 'cratis-date-picker__nav',\n pt?.previous?.className,\n )}\n data-cratis-part='previous'\n aria-label={\n pt?.previous?.['aria-label'] ??\n datePickerMessages?.previousMonth ??\n 'Previous month'\n }\n >\n <span aria-hidden='true'>\n {icon('previous', '‹')}\n </span>\n </Button>\n <Heading\n {...pt?.heading}\n className={classNames(\n 'cratis-date-picker__heading',\n pt?.heading?.className,\n )}\n data-cratis-part='heading'\n />\n <Button\n {...asReactAriaButtonProps(pt?.next)}\n slot='next'\n className={classNames(\n 'cratis-date-picker__nav',\n pt?.next?.className,\n )}\n data-cratis-part='next'\n aria-label={\n pt?.next?.['aria-label'] ??\n datePickerMessages?.nextMonth ??\n 'Next month'\n }\n >\n <span aria-hidden='true'>\n {icon('next', '›')}\n </span>\n </Button>\n </header>\n <CalendarGrid\n {...pt?.grid}\n className={classNames(\n 'cratis-date-picker__grid',\n pt?.grid?.className,\n )}\n data-cratis-part='grid'\n >\n <CalendarGridHeader>\n {(day) => (\n <CalendarHeaderCell>\n {day}\n </CalendarHeaderCell>\n )}\n </CalendarGridHeader>\n <CalendarGridBody>\n {(date) => (\n <CalendarCell\n {...pt?.cell}\n date={date}\n className={classNames(\n 'cratis-date-picker__cell',\n pt?.cell?.className,\n )}\n data-cratis-part='cell'\n />\n )}\n </CalendarGridBody>\n </CalendarGrid>\n </Calendar>\n {showButtonBar && (\n <div\n {...pt?.buttonBar}\n className={classNames(\n 'cratis-date-picker__button-bar',\n pt?.buttonBar?.className,\n )}\n data-cratis-part='button-bar'\n >\n <button\n {...pt?.today}\n type='button'\n className={classNames(\n 'cratis-date-picker__action',\n pt?.today?.className,\n )}\n data-cratis-part='today'\n data-disabled={\n actionsDisabled || isTodayOutOfBounds || undefined\n }\n disabled={actionsDisabled || isTodayOutOfBounds}\n aria-disabled={\n actionsDisabled || isTodayOutOfBounds || undefined\n }\n onClick={(event) => {\n if (actionsDisabled || isTodayOutOfBounds) return;\n onChange(todayDate, {\n source: 'user',\n nativeEvent: event.nativeEvent,\n });\n }}\n >\n {resolvedTodayLabel}\n </button>\n <button\n {...pt?.clear}\n type='button'\n className={classNames(\n 'cratis-date-picker__action',\n pt?.clear?.className,\n )}\n data-cratis-part='clear'\n data-disabled={clearDisabled || undefined}\n disabled={clearDisabled}\n aria-disabled={clearDisabled || pt?.clear?.['aria-disabled'] || undefined}\n onClick={(event) => {\n if (clearDisabled) return;\n onChange(null, {\n source: 'user',\n nativeEvent: event.nativeEvent,\n });\n }}\n >\n {resolvedClearLabel}\n </button>\n </div>\n )}\n </Dialog>\n </Popover>\n </>\n )}\n </AriaDatePicker>\n </UNSAFE_PortalProvider>\n </div>\n );\n};\n"],"names":["_jsx","AriaDatePicker","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;AAqCA,MAAM,WAAW,GAAG,CAChB,KAAkB,EAClB,QAA6B,KACX;AAClB,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,IAAI;IACvB,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAAE,CAAC;AACjD,IAAA,OAAO,QAAQ,GAAG,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC;AACnD,CAAC;AAED,MAAM,MAAM,GAAG,CAAC,KAAuB,KACnC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,GAAG,IAAI;AAM5C,MAAM,6BAA6B,GAAG,CAAC,EAC1C,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,EAAE,EACF,aAAa,EACb,UAAU,GAAG,KAAK,EAClB,WAAW,EACX,QAAQ,GAAG,IAAI,EACf,QAAQ,EACR,UAAU,EACV,OAAO,EACP,OAAO,EACP,SAAS,EACT,KAAK,EACL,EAAE,EACF,UAAU,EACV,UAAU,EACV,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,kBAAkB,EAAE,eAAe,GAChB,KAAI;IACvB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AACvD,IAAA,MAAM,kBAAkB,GAAG,8BAA8B,EAAE;AAC3D,IAAA,MAAM,mBAAmB,GAAG,sBAAsB,EAAE;AACpD,IAAA,MAAM,qBAAqB,GACvB,mBAAmB,KAAK;AACpB,UAAE;AACF,UAAE,iBAAiB,CAAC,mBAAmB,EAAE,cAAc,CAA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ACjC,qDAAA,CAAC;AACN,gDAAA,CAAC,EAAA,QAAA,EAEA,kBAAkB,EAAA,CACd,CAAA,EAAA,CACP,CACT,CAAA,EAAA,CACI,EAAA,CACH,CAAA,EAAA,CACX,CACN,EAAA,CACY,EAAA,CACG,EAAA,CACtB;AAEd;;"}
|
|
@@ -138,7 +138,9 @@ export interface DataPageProps<TQuery extends IQueryFor<TDataType, TArguments> |
|
|
|
138
138
|
*/
|
|
139
139
|
selection?: TDataType | undefined | null;
|
|
140
140
|
/**
|
|
141
|
-
* Callback for when the selection changes
|
|
141
|
+
* Callback for when the selection changes, including replacement or removal of its query row.
|
|
142
|
+
* With a controlled selection, the consumer must accept the new value. Without a callback,
|
|
143
|
+
* the controlled value and its details remain unchanged even if the query row disappears.
|
|
142
144
|
*/
|
|
143
145
|
onSelectionChange?(event: DataTableSelectionChangeEvent<TDataType>): void;
|
|
144
146
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataPage.d.ts","sourceRoot":"","sources":["../../../DataPage/DataPage.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAsB,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAEpE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAkB,CAAC;AACpD,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAY,MAAM,qBAAqB,CAAC;AAEzF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAA6B,CAAC;AAElE,OAAO,KAAK,EACR,mBAAmB,EACnB,mBAAmB,EACtB,MAAM,iCAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gDAA6C,CAAC;AACjG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAoC,CAAC;AAE/E,OAAO,KAAK,EAAE,WA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