@panneau/actions 5.0.0-alpha.7 → 5.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionRunnerProvider.d.ts +1 -1
- package/dist/ParametersDialog.d.ts +1 -1
- package/dist/context.d.ts +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/preview.d.ts +1 -1
- package/dist/request.d.ts +1 -1
- package/dist/useActionRunner.d.ts +2 -2
- package/package.json +10 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import type { ActionResult, RouteReference } from '@panneau/protocol';
|
|
3
|
-
import type { ActionAdapter, ActionDownload, ActionResultContext, ClientActionHandler } from './types';
|
|
3
|
+
import type { ActionAdapter, ActionDownload, ActionResultContext, ClientActionHandler } from './types.js';
|
|
4
4
|
export interface ActionRunnerProviderProps {
|
|
5
5
|
/** Runs the actions: a `DataAdapter`, or any object with its action methods. */
|
|
6
6
|
adapter: ActionAdapter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Action } from '@panneau/protocol';
|
|
2
|
-
import type { ActionOutcome } from './types';
|
|
2
|
+
import type { ActionOutcome } from './types.js';
|
|
3
3
|
export interface ParametersDialogProps {
|
|
4
4
|
action: Action;
|
|
5
5
|
/** How many items the action applies to, for the confirm label. */
|
package/dist/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActionAdapter, ActionOutcome, ActionTarget, FollowedRun } from './types';
|
|
1
|
+
import type { ActionAdapter, ActionOutcome, ActionTarget, FollowedRun } from './types.js';
|
|
2
2
|
export interface ActionRunnerContextValue {
|
|
3
3
|
adapter: ActionAdapter;
|
|
4
4
|
run: (resource: string, target: ActionTarget) => Promise<ActionOutcome | false>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { ActionRunnerProvider, type ActionRunnerProviderProps } from './ActionRunnerProvider';
|
|
2
|
-
export { ActionRuns, type ActionRunsProps } from './ActionRuns';
|
|
3
|
-
export { ParametersDialog, type ParametersDialogProps } from './ParametersDialog';
|
|
4
|
-
export { ResultsDialog, type ResultsDialogProps } from './ResultsDialog';
|
|
5
|
-
export { describeItemResult, describeResult } from './describe';
|
|
6
|
-
export { type ActionPreview, canPreviewAction, previewAction } from './preview';
|
|
7
|
-
export { buildActionRequest, getLinkTarget, getResultCounts } from './request';
|
|
8
|
-
export type { ActionAdapter, ActionDownload, ActionOutcome, ActionResultContext, ActionTarget, ClientActionHandler, ClientActionProps, FollowedRun, } from './types';
|
|
9
|
-
export { useActionPreview, useActionRunner, useActionRuns } from './useActionRunner';
|
|
1
|
+
export { ActionRunnerProvider, type ActionRunnerProviderProps } from './ActionRunnerProvider.js';
|
|
2
|
+
export { ActionRuns, type ActionRunsProps } from './ActionRuns.js';
|
|
3
|
+
export { ParametersDialog, type ParametersDialogProps } from './ParametersDialog.js';
|
|
4
|
+
export { ResultsDialog, type ResultsDialogProps } from './ResultsDialog.js';
|
|
5
|
+
export { describeItemResult, describeResult } from './describe.js';
|
|
6
|
+
export { type ActionPreview, canPreviewAction, previewAction } from './preview.js';
|
|
7
|
+
export { buildActionRequest, getLinkTarget, getResultCounts } from './request.js';
|
|
8
|
+
export type { ActionAdapter, ActionDownload, ActionOutcome, ActionResultContext, ActionTarget, ClientActionHandler, ClientActionProps, FollowedRun, } from './types.js';
|
|
9
|
+
export { useActionPreview, useActionRunner, useActionRuns } from './useActionRunner.js';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/preview.d.ts
CHANGED
package/dist/request.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ActionRequest, ActionResult, RouteReference } from '@panneau/protocol';
|
|
2
|
-
import type { ActionTarget } from './types';
|
|
2
|
+
import type { ActionTarget } from './types.js';
|
|
3
3
|
/** The request of an action: its selection (none for the resource), and its parameter values. */
|
|
4
4
|
export declare function buildActionRequest(target: ActionTarget, values?: Record<string, unknown>): ActionRequest;
|
|
5
5
|
/** Where a `link` action goes: its `url` with `{id}` replaced, or its `route` with the item's id. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ActionPreview } from './preview';
|
|
2
|
-
import type { ActionOutcome, ActionTarget, FollowedRun } from './types';
|
|
1
|
+
import { type ActionPreview } from './preview.js';
|
|
2
|
+
import type { ActionOutcome, ActionTarget, FollowedRun } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Runs the actions of a resource through the closest `ActionRunnerProvider`. The function takes a
|
|
5
5
|
* list's `ListActionEvent`, so it is the `onAction` of a list:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/actions",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.9",
|
|
4
4
|
"description": "Runs the actions of lists and forms: parameters in a dialog, the action through a data adapter, its result, and queued runs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "vite build &&
|
|
27
|
+
"build": "vite build && node ../../scripts/declarations.js",
|
|
28
28
|
"typecheck": "tsc --noEmit",
|
|
29
|
-
"api": "
|
|
29
|
+
"api": "node ../../scripts/declarations.js && node ../../scripts/api-report.js"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"react-intl": "^12.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@panneau/core": "5.0.0-alpha.
|
|
41
|
-
"@panneau/data": "5.0.0-alpha.
|
|
42
|
-
"@panneau/forms": "5.0.0-alpha.
|
|
43
|
-
"@panneau/intl": "5.0.0-alpha.
|
|
44
|
-
"@panneau/protocol": "5.0.0-alpha.
|
|
45
|
-
"@panneau/ui": "5.0.0-alpha.
|
|
40
|
+
"@panneau/core": "5.0.0-alpha.9",
|
|
41
|
+
"@panneau/data": "5.0.0-alpha.9",
|
|
42
|
+
"@panneau/forms": "5.0.0-alpha.9",
|
|
43
|
+
"@panneau/intl": "5.0.0-alpha.9",
|
|
44
|
+
"@panneau/protocol": "5.0.0-alpha.9",
|
|
45
|
+
"@panneau/ui": "5.0.0-alpha.9",
|
|
46
46
|
"lucide-react": "^1.57.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@panneau/lists": "5.0.0-alpha.
|
|
49
|
+
"@panneau/lists": "5.0.0-alpha.9"
|
|
50
50
|
}
|
|
51
51
|
}
|