@mgamadeus/ddd-admin-ui 0.1.0-rc.5 → 0.1.0-rc.6
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/.claude/skills/ddd-admin-ui-specialist/SKILL.md +31 -4
- package/CHANGELOG.md +63 -0
- package/README.md +18 -10
- package/STANDARDS.md +93 -21
- package/dist/form/DrawerFooter.d.ts +9 -1
- package/dist/form/DrawerFooter.d.ts.map +1 -1
- package/dist/form/DrawerFooter.js +33 -32
- package/dist/form/DrawerFooter.js.map +1 -1
- package/dist/form/FormActions.d.ts +18 -13
- package/dist/form/FormActions.d.ts.map +1 -1
- package/dist/form/FormActions.js +104 -32
- package/dist/form/FormActions.js.map +1 -1
- package/dist/form/FormDialog.d.ts +51 -0
- package/dist/form/FormDialog.d.ts.map +1 -0
- package/dist/form/FormDialog.js +75 -0
- package/dist/form/FormDialog.js.map +1 -0
- package/dist/form/FormHeader.d.ts +6 -1
- package/dist/form/FormHeader.d.ts.map +1 -1
- package/dist/form/FormHeader.js +1 -1
- package/dist/form/FormHeader.js.map +1 -1
- package/dist/form/FormSubmitButton.d.ts +6 -1
- package/dist/form/FormSubmitButton.d.ts.map +1 -1
- package/dist/form/FormSubmitButton.js +5 -2
- package/dist/form/FormSubmitButton.js.map +1 -1
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.d.ts.map +1 -1
- package/dist/form/index.js +1 -0
- package/dist/form/index.js.map +1 -1
- package/dist/form/linkSubmitButtons.d.ts +7 -0
- package/dist/form/linkSubmitButtons.d.ts.map +1 -0
- package/dist/form/linkSubmitButtons.js +27 -0
- package/dist/form/linkSubmitButtons.js.map +1 -0
- package/dist/form/saveShortcut.d.ts +25 -0
- package/dist/form/saveShortcut.d.ts.map +1 -0
- package/dist/form/saveShortcut.js +59 -0
- package/dist/form/saveShortcut.js.map +1 -0
- package/dist/form/useConfirmDialog.d.ts +3 -2
- package/dist/form/useConfirmDialog.d.ts.map +1 -1
- package/dist/form/useConfirmDialog.js +21 -18
- package/dist/form/useConfirmDialog.js.map +1 -1
- package/dist/i18n/hints.json +2 -0
- package/dist/i18n-keys.json +20 -3
- package/dist/list/EntityListBulkBar.d.ts +7 -1
- package/dist/list/EntityListBulkBar.d.ts.map +1 -1
- package/dist/list/EntityListBulkBar.js +5 -1
- package/dist/list/EntityListBulkBar.js.map +1 -1
- package/dist/logic/index.d.ts +7 -0
- package/dist/logic/index.d.ts.map +1 -1
- package/dist/logic/index.js +4 -0
- package/dist/logic/index.js.map +1 -1
- package/dist/logic/pure/confirm.d.ts +12 -0
- package/dist/logic/pure/confirm.d.ts.map +1 -1
- package/dist/logic/pure/confirm.js +12 -0
- package/dist/logic/pure/confirm.js.map +1 -1
- package/dist/logic/pure/confirmQueue.d.ts +27 -0
- package/dist/logic/pure/confirmQueue.d.ts.map +1 -0
- package/dist/logic/pure/confirmQueue.js +52 -0
- package/dist/logic/pure/confirmQueue.js.map +1 -0
- package/dist/logic/pure/writeAccess.d.ts +18 -0
- package/dist/logic/pure/writeAccess.d.ts.map +1 -0
- package/dist/logic/pure/writeAccess.js +14 -0
- package/dist/logic/pure/writeAccess.js.map +1 -0
- package/dist/logic/react/useConfirm.d.ts +14 -0
- package/dist/logic/react/useConfirm.d.ts.map +1 -0
- package/dist/logic/react/useConfirm.js +16 -0
- package/dist/logic/react/useConfirm.js.map +1 -0
- package/dist/logic/react/writeAccess.d.ts +18 -0
- package/dist/logic/react/writeAccess.d.ts.map +1 -0
- package/dist/logic/react/writeAccess.js +18 -0
- package/dist/logic/react/writeAccess.js.map +1 -0
- package/dist/page/DetailHeader.d.ts +6 -1
- package/dist/page/DetailHeader.d.ts.map +1 -1
- package/dist/page/DetailHeader.js +3 -3
- package/dist/page/DetailHeader.js.map +1 -1
- package/dist/page/EntityDetailShell.d.ts +7 -1
- package/dist/page/EntityDetailShell.d.ts.map +1 -1
- package/dist/page/EntityDetailShell.js +4 -3
- package/dist/page/EntityDetailShell.js.map +1 -1
- package/dist/page/PageToolbar.d.ts +2 -1
- package/dist/page/PageToolbar.d.ts.map +1 -1
- package/dist/page/PageToolbar.js +6 -2
- package/dist/page/PageToolbar.js.map +1 -1
- package/dist/primitives/alert.d.ts +1 -1
- package/dist/primitives/badge.d.ts +1 -1
- package/dist/primitives/confirmDialogView.d.ts +29 -0
- package/dist/primitives/confirmDialogView.d.ts.map +1 -0
- package/dist/primitives/confirmDialogView.js +63 -0
- package/dist/primitives/confirmDialogView.js.map +1 -0
- package/dist/primitives/formActionsSlot.d.ts +24 -0
- package/dist/primitives/formActionsSlot.d.ts.map +1 -0
- package/dist/primitives/formActionsSlot.js +51 -0
- package/dist/primitives/formActionsSlot.js.map +1 -0
- package/dist/primitives/index.d.ts +2 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +1 -0
- package/dist/primitives/index.js.map +1 -1
- package/dist/provider/AdminUiProvider.d.ts +4 -3
- package/dist/provider/AdminUiProvider.d.ts.map +1 -1
- package/dist/provider/AdminUiProvider.js +11 -5
- package/dist/provider/AdminUiProvider.js.map +1 -1
- package/dist/provider/ConfirmHost.d.ts +10 -0
- package/dist/provider/ConfirmHost.d.ts.map +1 -0
- package/dist/provider/ConfirmHost.js +19 -0
- package/dist/provider/ConfirmHost.js.map +1 -0
- package/dist/provider/types.d.ts +6 -0
- package/dist/provider/types.d.ts.map +1 -1
- package/dist/showcase/coverage.js +2 -2
- package/dist/showcase/coverage.js.map +1 -1
- package/dist/showcase/sections/FormShowcase.d.ts.map +1 -1
- package/dist/showcase/sections/FormShowcase.js +41 -5
- package/dist/showcase/sections/FormShowcase.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect, useLayoutEffect, useMemo } from 'react';
|
|
3
|
+
import { useEffect, useLayoutEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { setTranslations } from "../i18n/store.js";
|
|
5
|
+
import { createConfirmQueue } from "../logic/pure/confirmQueue.js";
|
|
5
6
|
import { setNotificationAdapter } from "../logic/pure/notify.js";
|
|
7
|
+
import { ConfirmContext } from "../logic/react/useConfirm.js";
|
|
6
8
|
import { LinkComponentProvider } from "../primitives/link.js";
|
|
7
9
|
import { PortalContainerProvider } from "../primitives/portal.js";
|
|
8
10
|
import { TooltipProvider } from "../primitives/tooltip.js";
|
|
9
11
|
import { AdminUiContext } from "./adminUiContext.js";
|
|
12
|
+
import { ConfirmHost } from "./ConfirmHost.js";
|
|
10
13
|
import { defaultStorageKey } from "./storageKey.js";
|
|
11
14
|
/** Keeps the package's translation store on the host store's current snapshot. */
|
|
12
15
|
const TranslationBridge = ({ adapter }) => {
|
|
@@ -23,10 +26,13 @@ const TranslationBridge = ({ adapter }) => {
|
|
|
23
26
|
/**
|
|
24
27
|
* The one provider of the package: registers the host's notification adapter, feeds the translation store from a
|
|
25
28
|
* host store, renders the tooltip provider and the portal container, and hands the host adapters (storage keys,
|
|
26
|
-
* router hooks, upload, markdown editor, AI translation) to packaged screens through `useAdminUi()`,
|
|
27
|
-
* component of every block (`linkComponent`)
|
|
29
|
+
* router hooks, upload, markdown editor, AI translation) to packaged screens through `useAdminUi()`, sets the link
|
|
30
|
+
* component of every block (`linkComponent`), and answers `useConfirm()` (the package dialog, or the host's `confirm`).
|
|
31
|
+
* Blocks never read `useAdminUi()`: they take adapters as props.
|
|
28
32
|
*/
|
|
29
|
-
export const AdminUiProvider = ({ children, translations, notifications, storageKey = defaultStorageKey, useUrlStateAdapter, useDrawerUrlAdapter, portalContainer, tooltipDelayMs, upload, renderMarkdownEditor, aiTranslation, preserveSearchParams, linkComponent, }) => {
|
|
33
|
+
export const AdminUiProvider = ({ children, translations, notifications, storageKey = defaultStorageKey, useUrlStateAdapter, useDrawerUrlAdapter, portalContainer, tooltipDelayMs, upload, renderMarkdownEditor, aiTranslation, preserveSearchParams, linkComponent, confirm: hostConfirm, }) => {
|
|
34
|
+
const [confirmQueue] = useState(() => createConfirmQueue());
|
|
35
|
+
const confirm = hostConfirm ?? confirmQueue.request;
|
|
30
36
|
// A layout effect: registered before any child's ordinary effect can raise a toast.
|
|
31
37
|
useLayoutEffect(() => {
|
|
32
38
|
if (!notifications)
|
|
@@ -43,6 +49,6 @@ export const AdminUiProvider = ({ children, translations, notifications, storage
|
|
|
43
49
|
aiTranslation,
|
|
44
50
|
preserveSearchParams,
|
|
45
51
|
}), [storageKey, useUrlStateAdapter, useDrawerUrlAdapter, upload, renderMarkdownEditor, aiTranslation, preserveSearchParams]);
|
|
46
|
-
return (_jsxs(AdminUiContext.Provider, { value: value, children: [translations && _jsx(TranslationBridge, { adapter: translations }), _jsx(TooltipProvider, { delayDuration: tooltipDelayMs, children: _jsx(PortalContainerProvider, { container: portalContainer, children: linkComponent ? _jsx(LinkComponentProvider, { linkComponent: linkComponent, children: children }) : children }) })] }));
|
|
52
|
+
return (_jsxs(AdminUiContext.Provider, { value: value, children: [translations && _jsx(TranslationBridge, { adapter: translations }), _jsx(TooltipProvider, { delayDuration: tooltipDelayMs, children: _jsx(PortalContainerProvider, { container: portalContainer, children: _jsxs(ConfirmContext.Provider, { value: confirm, children: [linkComponent ? _jsx(LinkComponentProvider, { linkComponent: linkComponent, children: children }) : children, hostConfirm ? null : _jsx(ConfirmHost, { queue: confirmQueue })] }) }) })] }));
|
|
47
53
|
};
|
|
48
54
|
//# sourceMappingURL=AdminUiProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminUiProvider.js","sourceRoot":"","sources":["../../src/provider/AdminUiProvider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AdminUiProvider.js","sourceRoot":"","sources":["../../src/provider/AdminUiProvider.tsx"],"names":[],"mappings":"AAAA,YAAY,CA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AAC,CAAC,CAAC,KAAC,WAAW,IAAC,KAAK,EAAE,YAAY,GAAI,IAClC,GACF,GACV,IACM,CAC3B,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ConfirmQueue } from '../logic/pure/confirmQueue.js';
|
|
2
|
+
import type { ConfirmOptions } from '../logic/pure/confirm.js';
|
|
3
|
+
/**
|
|
4
|
+
* The provider's confirmation dialog: shows the queue's oldest pending call. While mounted the queue takes calls; on
|
|
5
|
+
* unmount every pending call settles with `false` (Strict Mode's second mount takes calls again).
|
|
6
|
+
*/
|
|
7
|
+
export declare const ConfirmHost: ({ queue }: {
|
|
8
|
+
queue: ConfirmQueue<ConfirmOptions>;
|
|
9
|
+
}) => import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=ConfirmHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmHost.d.ts","sourceRoot":"","sources":["../../src/provider/ConfirmHost.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAK/D;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,WAAW;IAAE,KAAK,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;CAAE,gCAQ7E,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useEffect, useSyncExternalStore } from 'react';
|
|
4
|
+
import { ConfirmDialogView } from "../primitives/confirmDialogView.js";
|
|
5
|
+
const NO_ENTRY = () => null;
|
|
6
|
+
/**
|
|
7
|
+
* The provider's confirmation dialog: shows the queue's oldest pending call. While mounted the queue takes calls; on
|
|
8
|
+
* unmount every pending call settles with `false` (Strict Mode's second mount takes calls again).
|
|
9
|
+
*/
|
|
10
|
+
export const ConfirmHost = ({ queue }) => {
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
queue.activate();
|
|
13
|
+
return () => queue.deactivate();
|
|
14
|
+
}, [queue]);
|
|
15
|
+
const entry = useSyncExternalStore(queue.subscribe, queue.current, NO_ENTRY);
|
|
16
|
+
const settle = useCallback((id, confirmed) => void queue.settle(id, confirmed), [queue]);
|
|
17
|
+
return _jsx(ConfirmDialogView, { entry: entry, onSettle: settle });
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=ConfirmHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmHost.js","sourceRoot":"","sources":["../../src/provider/ConfirmHost.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAIrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAqC,CAAC;AAExE,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;AAE5B;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,EAA2C,EAAE,EAAE;IAChF,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IACZ,MAAM,KAAK,GAAG,oBAAoB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC7E,MAAM,MAAM,GAAG,WAAW,CAAC,CAAC,EAAU,EAAE,SAAkB,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1G,OAAO,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,GAAI,CAAC;AAC/D,CAAC,CAAC"}
|
package/dist/provider/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { TranslationsStore } from '@mgamadeus/ddd-web/contract';
|
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import type { WritingStyle } from '../i18n/store.js';
|
|
4
4
|
import type { NotificationAdapter } from '../logic/pure/notify.js';
|
|
5
|
+
import type { ConfirmOptions } from '../logic/pure/confirm.js';
|
|
5
6
|
import type { EntityDrawerUrlAdapter } from '../logic/pure/entityDrawer.js';
|
|
6
7
|
import type { UrlStateAdapter } from '../logic/pure/urlListState.js';
|
|
7
8
|
import type { MediaUploadAdapter } from '../media/types.js';
|
|
@@ -59,6 +60,11 @@ export interface AdminUiProviderProps {
|
|
|
59
60
|
* `linkComponent` prop still wins. Wrap the router link with `withStickyParams` to keep sticky search parameters.
|
|
60
61
|
*/
|
|
61
62
|
linkComponent?: PageLinkComponent;
|
|
63
|
+
/**
|
|
64
|
+
* The host's confirmation service behind `useConfirm()` (`(options) => Promise<boolean>`, a stable function); the
|
|
65
|
+
* package dialog does not render then. Absent: the package dialog, one confirmation after the other.
|
|
66
|
+
*/
|
|
67
|
+
confirm?: (options: ConfirmOptions) => Promise<boolean>;
|
|
62
68
|
}
|
|
63
69
|
export interface AdminUiContextValue extends Required<Pick<AdminUiProviderProps, 'storageKey'>> {
|
|
64
70
|
useUrlStateAdapter?: UseUrlStateAdapter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/provider/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,mBA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,CAAC,EAAE,mBAAmB,CAAC;IACpC,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,2EAA2E;IAC3E,eAAe,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACrC,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,wBAAwB,KAAK,SAAS,CAAC;IACrE,mCAAmC;IACnC,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC;;;OAGG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,mBAAoB,SAAQ,QAAQ,CAAC,IAAI,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;IAC7F,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,oBAAoB,CAAC,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;IACpE,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C"}
|
|
@@ -9,7 +9,7 @@ export const SHOWCASE_COVERAGE = {
|
|
|
9
9
|
'CommandShortcut', 'Dialog', 'DialogClose', 'DialogContent', 'DialogDescription', 'DialogFooter', 'DialogHeader',
|
|
10
10
|
'DialogTitle', 'DialogTrigger', 'DropdownMenu', 'DropdownMenuCheckboxItem', 'DropdownMenuContent', 'DropdownMenuGroup',
|
|
11
11
|
'DropdownMenuItem', 'DropdownMenuLabel', 'DropdownMenuSeparator', 'DropdownMenuSub', 'DropdownMenuSubContent',
|
|
12
|
-
'DropdownMenuSubTrigger', 'DropdownMenuTrigger', 'Input', 'Label', 'Popover', 'PopoverAnchor', 'PopoverContent',
|
|
12
|
+
'DropdownMenuSubTrigger', 'DropdownMenuTrigger', 'FormActionsSlot', 'FormActionsSlotProvider', 'Input', 'Label', 'Popover', 'PopoverAnchor', 'PopoverContent',
|
|
13
13
|
'PopoverDescription', 'PopoverHeader', 'PopoverTitle', 'PopoverTrigger', 'PortalContainerProvider', 'SegmentedControl',
|
|
14
14
|
'Select', 'SelectContent', 'SelectGroup', 'SelectItem', 'SelectLabel', 'SelectSeparator', 'SelectTrigger', 'SelectValue',
|
|
15
15
|
'Separator', 'Sheet', 'SheetClose', 'SheetContent', 'SheetDescription', 'SheetFooter', 'SheetHeader', 'SheetTitle',
|
|
@@ -48,7 +48,7 @@ export const SHOWCASE_COVERAGE = {
|
|
|
48
48
|
},
|
|
49
49
|
form: {
|
|
50
50
|
shown: [
|
|
51
|
-
'DrawerFooter', 'Form', 'FormActions', 'FormDrawer', 'FormErrors', 'FormField', 'FormFieldFrame', 'FormHeader',
|
|
51
|
+
'DrawerFooter', 'Form', 'FormActions', 'FormDialog', 'FormDrawer', 'FormErrors', 'FormField', 'FormFieldFrame', 'FormHeader',
|
|
52
52
|
'FormJumpBar', 'FormSection', 'FormSubmitButton', 'FormWrapper', 'VisibleWhen',
|
|
53
53
|
],
|
|
54
54
|
notShown: { UnsavedChangesContext: 'a context (used by FormDrawer)' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coverage.js","sourceRoot":"","sources":["../../src/showcase/coverage.ts"],"names":[],"mappings":"AAUA,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,YAAY,KAAK,EAAE,CAAC;AAExD,MAAM,CAAC,MAAM,iBAAiB,GAAoD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AAE,gCAAgC,EAAE;KACtE;IACD,YAAY,EAAE;QACZ,KAAK,EAAE;YACL,uBAAuB,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,sBAAsB;YACrH,qBAAqB;SACtB;QACD,QAAQ,EAAE,EAAE;KACb;IACD,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,oBAAoB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,cAAc,CAAC;QACxF,QAAQ,EAAE,EAAE;KACb;IACD,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,kBAAkB,CAAC;QACtF,QAAQ,EAAE,EAAE;KACb;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,EAAE,eAAe,EAAE,uCAAuC,EAAE;KACvE;IACD,eAAe,EAAE;QACf,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,EAAE,OAAO,EAAE,gFAAgF,EAAE;KACxG;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormShowcase.d.ts","sourceRoot":"","sources":["../../../src/showcase/sections/FormShowcase.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormShowcase.d.ts","sourceRoot":"","sources":["../../../src/showcase/sections/FormShowcase.tsx"],"names":[],"mappings":"AAwOA,4BAA4B;AAC5B,eAAO,MAAM,YAAY,mCAqCxB,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { useForm } from 'react-hook-form';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { EntityListBulkBar } from "../../list/index.js";
|
|
6
|
+
import { AddEntityButton } from "../../page/index.js";
|
|
7
|
+
import { DrawerFooter, Form, FORM_PANEL_SCROLL_MARGIN_CLASS, FormActions, FormDialog, FormDrawer, FormErrors, FormField, FormFieldFrame, FormHeader, FormJumpBar, FormSection, FormSubmitButton, FormWrapper, VisibleWhen, } from "../../form/index.js";
|
|
8
|
+
import { fieldEquals, useConfirm, WriteAccessProvider } from "../../logic/index.js";
|
|
9
|
+
import { Button, FormActionsSlotProvider, Input, Label, Switch } from "../../primitives/index.js";
|
|
8
10
|
import { Sample, Samples } from "./PrimitivesShowcase.js";
|
|
9
11
|
const SERVER_ERROR = {
|
|
10
12
|
message: 'Could not save',
|
|
@@ -18,9 +20,43 @@ const ShowcaseFormBody = ({ idPrefix, onClose }) => {
|
|
|
18
20
|
{ id: `${idPrefix}-details`, label: 'Details' },
|
|
19
21
|
] }), _jsx("div", { id: `${idPrefix}-general`, className: FORM_PANEL_SCROLL_MARGIN_CLASS, children: _jsxs(FormSection, { title: "General", description: "The basics.", children: [_jsx(FormField, { name: "name", label: "Name", required: true, description: "Shown in lists.", children: ({ field, control, disabled }) => _jsx(Input, { ...control, ...field, disabled: disabled }) }), _jsx(FormField, { name: "email", label: "Email", children: ({ field, control }) => _jsx(Input, { ...control, ...field, type: "email" }) })] }) }), _jsx("div", { id: `${idPrefix}-details`, className: FORM_PANEL_SCROLL_MARGIN_CLASS, children: _jsxs(FormSection, { title: "Details", children: [_jsx(FormField, { name: "hasNote", label: "Add a note", children: ({ field, control }) => _jsx(Switch, { id: control.id, checked: field.value, onCheckedChange: field.onChange }) }), _jsx(VisibleWhen, { condition: fieldEquals('hasNote', true), children: _jsx(FormField, { name: "note", label: "Note", children: ({ field, control }) => _jsx(Input, { ...control, ...field }) }) }), _jsx(FormFieldFrame, { label: "Unbound field", description: "FormFieldFrame outside a form value.", children: control => _jsx(Input, { ...control, placeholder: "Free input" }) })] }) }), _jsx(FormActions, { sticky: false, secondary: _jsx(Button, { type: "button", variant: "outline", onClick: onClose, children: "Cancel" }), primary: _jsx(FormSubmitButton, { children: "Save" }) })] }));
|
|
20
22
|
};
|
|
23
|
+
const FormDialogSample = () => {
|
|
24
|
+
const [open, setOpen] = useState(false);
|
|
25
|
+
const [plainOpen, setPlainOpen] = useState(false);
|
|
26
|
+
const [plainName, setPlainName] = useState('');
|
|
27
|
+
const [pending, setPending] = useState(false);
|
|
28
|
+
const form = useForm({ defaultValues: { name: 'Sample' } });
|
|
29
|
+
const save = () => {
|
|
30
|
+
setPending(true);
|
|
31
|
+
window.setTimeout(() => {
|
|
32
|
+
setPending(false);
|
|
33
|
+
setOpen(false);
|
|
34
|
+
}, 600);
|
|
35
|
+
};
|
|
36
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "outline", onClick: () => setOpen(true), children: "Open form dialog" }), _jsx(FormDialog, { open: open, onOpenChange: setOpen, title: "Rename item", description: "A react-hook-form instance, so FormField works inside.", form: form, onSubmit: save, submitLabel: "Save", pendingLabel: "Saving\u2026", isPending: pending, isDirty: form.formState.isDirty, children: _jsx(FormField, { name: "name", label: "Name", required: true, children: ({ field, control }) => _jsx(Input, { ...control, ...field }) }) }), _jsx(Button, { variant: "outline", onClick: () => setPlainOpen(true), children: "Open plain form dialog" }), _jsx(FormDialog, { open: plainOpen, onOpenChange: setPlainOpen, title: "Delete item", description: "No form library: plain state.", onSubmit: () => setPlainOpen(false), submitLabel: "Delete", submitVariant: "destructive", submitDisabled: plainName.trim() === '', isPending: false, children: _jsxs("div", { className: "grid gap-2", children: [_jsx(Label, { htmlFor: "showcase-form-dialog-reason", children: "Reason" }), _jsx(Input, { id: "showcase-form-dialog-reason", value: plainName, onChange: event => setPlainName(event.target.value) })] }) })] }));
|
|
37
|
+
};
|
|
38
|
+
const ConfirmSample = () => {
|
|
39
|
+
const confirm = useConfirm();
|
|
40
|
+
const [answer, setAnswer] = useState('–');
|
|
41
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "outline", onClick: async () => setAnswer(String(await confirm({ title: 'Archive item?', description: 'It leaves the active list.', confirmLabel: 'Archive' }))), children: "useConfirm()" }), _jsx(Button, { variant: "outline", onClick: async () => setAnswer(String(await confirm({
|
|
42
|
+
title: 'Delete “Main site”?',
|
|
43
|
+
description: 'This cannot be undone.',
|
|
44
|
+
confirmLabel: 'Delete',
|
|
45
|
+
confirmVariant: 'destructive',
|
|
46
|
+
requirePhrase: 'Main site',
|
|
47
|
+
}))), children: "With a phrase" }), _jsxs("span", { className: "self-center text-sm text-muted-foreground", children: ["Answer: ", answer] })] }));
|
|
48
|
+
};
|
|
49
|
+
const HeaderSlotSample = () => {
|
|
50
|
+
const form = useForm({ defaultValues: { name: 'Sample' } });
|
|
51
|
+
return (_jsx(FormActionsSlotProvider, { children: _jsxs("div", { className: "w-full space-y-4", children: [_jsx(FormHeader, { title: "Edit item", description: "The actions sit in the header.", formActionsSlot: true }), _jsxs(Form, { form: form, onSubmit: () => form.reset(form.getValues()), children: [_jsx(FormSection, { title: "General", children: _jsx(FormField, { name: "name", label: "Name", children: ({ field, control }) => _jsx(Input, { ...control, ...field }) }) }), _jsx(FormActions, { placement: "header", primary: _jsx(FormSubmitButton, { children: "Save" }) })] })] }) }));
|
|
52
|
+
};
|
|
53
|
+
const WriteAccessSample = () => {
|
|
54
|
+
const form = useForm({ defaultValues: { name: 'Sample' } });
|
|
55
|
+
return (_jsx(WriteAccessProvider, { value: { allowed: false, reason: 'This workspace is read-only' }, children: _jsxs("div", { className: "flex w-full flex-col gap-3", children: [_jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(AddEntityButton, { entity: "Item", onClick: () => { } }), _jsx(AddEntityButton, { entity: "Item", href: "#create" })] }), _jsx(EntityListBulkBar, { selection: { count: 2, clear: () => { } }, actions: [{ id: 'export', label: 'Export', onClick: () => { }, ignoreWriteAccess: true }], onDelete: () => { } }), _jsx(Form, { form: form, onSubmit: () => { }, children: _jsxs("div", { className: "flex gap-2", children: [_jsx(FormSubmitButton, { children: "Save" }), _jsx(FormSubmitButton, { ignoreWriteAccess: true, children: "Preview" })] }) })] }) }));
|
|
56
|
+
};
|
|
21
57
|
/** The `./form` section. */
|
|
22
58
|
export const FormShowcase = () => {
|
|
23
59
|
const [open, setOpen] = useState(false);
|
|
24
|
-
return (_jsxs(Samples, { children: [_jsx(Sample, { title: "FormWrapper, FormHeader, Form, FormJumpBar, FormSection, FormField, FormErrors, FormActions", children: _jsxs("div", { className: "w-full", children: [_jsx(FormHeader, { title: "Edit item", description: "A form page." }), _jsx(FormWrapper, { children: _jsx(ShowcaseFormBody, { idPrefix: "showcase-form-page" }) })] }) }), _jsxs(Sample, { title: "FormDrawer, DrawerFooter", children: [_jsx(Button, { variant: "outline", onClick: () => setOpen(true), children: "Open form drawer" }), _jsxs(FormDrawer, { open: open, onClose: () => setOpen(false), title: "Edit item", metadata: { id: 42 }, children: [_jsx(ShowcaseFormBody, { idPrefix: "showcase-form-drawer", onClose: () => setOpen(false) }), _jsx(DrawerFooter, { children: _jsx("span", { className: "text-xs text-muted-foreground", children: "DrawerFooter content" }) })] })] })] }));
|
|
60
|
+
return (_jsxs(Samples, { children: [_jsx(Sample, { title: "FormWrapper, FormHeader, Form, FormJumpBar, FormSection, FormField, FormErrors, FormActions", children: _jsxs("div", { className: "w-full", children: [_jsx(FormHeader, { title: "Edit item", description: "A form page." }), _jsx(FormWrapper, { children: _jsx(ShowcaseFormBody, { idPrefix: "showcase-form-page" }) })] }) }), _jsxs(Sample, { title: "FormDrawer, DrawerFooter", children: [_jsx(Button, { variant: "outline", onClick: () => setOpen(true), children: "Open form drawer" }), _jsxs(FormDrawer, { open: open, onClose: () => setOpen(false), title: "Edit item", metadata: { id: 42 }, children: [_jsx(ShowcaseFormBody, { idPrefix: "showcase-form-drawer", onClose: () => setOpen(false) }), _jsx(DrawerFooter, { children: _jsx("span", { className: "text-xs text-muted-foreground", children: "DrawerFooter content" }) })] })] }), _jsx(Sample, { title: "FormDialog", children: _jsx(FormDialogSample, {}) }), _jsx(Sample, { title: "useConfirm (./logic, drawn by AdminUiProvider)", children: _jsx(ConfirmSample, {}) }), _jsx(Sample, { title: "FormActionsSlotProvider, FormActionsSlot, FormActions placement header", children: _jsx(HeaderSlotSample, {}) }), _jsx(Sample, { title: "WriteAccessProvider (./logic): write controls off, links and reads stay", children: _jsx(WriteAccessSample, {}) })] }));
|
|
25
61
|
};
|
|
26
62
|
//# sourceMappingURL=FormShowcase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormShowcase.js","sourceRoot":"","sources":["../../../src/showcase/sections/FormShowcase.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,8BAA8B,EAC9B,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,UAAU,EACV,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAwB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"FormShowcase.js","sourceRoot":"","sources":["../../../src/showcase/sections/FormShowcase.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,8BAA8B,EAC9B,WAAW,EACX,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,UAAU,EACV,WAAW,EACX,WAAW,EACX,g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C,yEAAyE,YACrF,KAAC,iBAAiB,KAAG,GACd,IACD,CACX,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mgamadeus/ddd-admin-ui",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.6",
|
|
4
4
|
"description": "Admin UI building blocks for React 19 / Next 16 / Tailwind 4 apps on @mgamadeus/ddd-web: entity lists (table and card grid, filters, selection, bulk actions), page frames and detail shells, form shells with conditional fields and server validation, translatable inputs, media pickers, Next adapters, a provider, and the shadcn-style primitives they are drawn with, plus two stylesheets and two JSON manifests.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ddd",
|
|
@@ -155,6 +155,6 @@
|
|
|
155
155
|
"test": "node --experimental-strip-types --no-warnings --test \"src/**/*.test.ts\" \"test/unit/**/*.test.ts\" \"test/check-package/**/*.test.ts\"",
|
|
156
156
|
"check-package": "node scripts/check-package.mjs --dir .",
|
|
157
157
|
"i18n:manifest": "node scripts/build-i18n-manifest.mjs",
|
|
158
|
-
"test:render": "node test/consumer/fixtures/plain/list-snapshot.mjs && node test/consumer/fixtures/plain/status-context.mjs && node test/consumer/fixtures/plain/showcase-render.mjs && node test/consumer/fixtures/plain/sticky-links.mjs"
|
|
158
|
+
"test:render": "node test/consumer/fixtures/plain/list-snapshot.mjs && node test/consumer/fixtures/plain/form-actions-snapshot.mjs && node test/consumer/fixtures/plain/write-access.mjs && node test/consumer/fixtures/plain/status-context.mjs && node test/consumer/fixtures/plain/showcase-render.mjs && node test/consumer/fixtures/plain/sticky-links.mjs"
|
|
159
159
|
}
|
|
160
160
|
}
|