@michelangelo-ai/core 0.2.1 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/actions/__fixtures__/use-success-operations-test-harness.d.ts +8 -0
- package/dist/components/actions/__fixtures__/use-success-operations-test-harness.d.ts.map +1 -0
- package/dist/components/actions/__tests__/use-success-operations.test.d.ts +2 -0
- package/dist/components/actions/__tests__/use-success-operations.test.d.ts.map +1 -0
- package/dist/components/actions/action-dispatcher.d.ts +9 -0
- package/dist/components/actions/action-dispatcher.d.ts.map +1 -0
- package/dist/components/actions/action-menu/action-menu-item.d.ts +6 -13
- package/dist/components/actions/action-menu/action-menu-item.d.ts.map +1 -1
- package/dist/components/actions/action-menu/action-menu.d.ts +4 -5
- package/dist/components/actions/action-menu/action-menu.d.ts.map +1 -1
- package/dist/components/actions/actions-buttons/actions-buttons.d.ts.map +1 -1
- package/dist/components/actions/actions-popover.d.ts.map +1 -1
- package/dist/components/actions/confirm-dispatcher.d.ts +12 -0
- package/dist/components/actions/confirm-dispatcher.d.ts.map +1 -0
- package/dist/components/actions/types.d.ts +109 -26
- package/dist/components/actions/types.d.ts.map +1 -1
- package/dist/components/actions/use-resolved-action-items.d.ts +4 -0
- package/dist/components/actions/use-resolved-action-items.d.ts.map +1 -0
- package/dist/components/actions/use-success-operations.d.ts +9 -0
- package/dist/components/actions/use-success-operations.d.ts.map +1 -0
- package/dist/components/breadcrumb-bar/__tests__/use-scrolling-navbar-shadow.test.d.ts +2 -0
- package/dist/components/breadcrumb-bar/__tests__/use-scrolling-navbar-shadow.test.d.ts.map +1 -0
- package/dist/components/breadcrumb-bar/breadcrumb-bar.d.ts.map +1 -1
- package/dist/components/breadcrumb-bar/styled-components.d.ts +3 -1
- package/dist/components/breadcrumb-bar/styled-components.d.ts.map +1 -1
- package/dist/components/breadcrumb-bar/use-scrolling-navbar-shadow.d.ts +4 -0
- package/dist/components/breadcrumb-bar/use-scrolling-navbar-shadow.d.ts.map +1 -0
- package/dist/components/cell/renderers/description/types.d.ts +1 -1
- package/dist/components/cell/renderers/description/types.d.ts.map +1 -1
- package/dist/components/cell/renderers/link/types.d.ts +1 -1
- package/dist/components/cell/renderers/link/types.d.ts.map +1 -1
- package/dist/components/cell/renderers/multi/types.d.ts +1 -1
- package/dist/components/cell/renderers/multi/types.d.ts.map +1 -1
- package/dist/components/cell/renderers/state/types.d.ts +1 -1
- package/dist/components/cell/renderers/state/types.d.ts.map +1 -1
- package/dist/components/cell/renderers/tag/types.d.ts +1 -1
- package/dist/components/cell/renderers/tag/types.d.ts.map +1 -1
- package/dist/components/cell/renderers/type/types.d.ts +1 -1
- package/dist/components/cell/renderers/type/types.d.ts.map +1 -1
- package/dist/components/cell/types.d.ts +6 -6
- package/dist/components/cell/types.d.ts.map +1 -1
- package/dist/components/form/components/form-error-banner/use-form-error-list.d.ts.map +1 -1
- package/dist/components/form/fields/date/use-date-formatters.d.ts +4 -6
- package/dist/components/form/fields/date/use-date-formatters.d.ts.map +1 -1
- package/dist/components/views/detail-view/components/detail-view-header/detail-view-header.d.ts +1 -1
- package/dist/components/views/detail-view/components/detail-view-header/detail-view-header.d.ts.map +1 -1
- package/dist/components/views/detail-view/detail-view.d.ts +1 -1
- package/dist/components/views/detail-view/detail-view.d.ts.map +1 -1
- package/dist/components/views/detail-view/types/detail-view-component-types.d.ts +4 -0
- package/dist/components/views/detail-view/types/detail-view-component-types.d.ts.map +1 -1
- package/dist/components/views/execution/components/task-details/renderers/types.d.ts +2 -2
- package/dist/components/views/execution/components/task-details/renderers/types.d.ts.map +1 -1
- package/dist/components/views/execution/types.d.ts +3 -3
- package/dist/components/views/execution/types.d.ts.map +1 -1
- package/dist/config/entities/deployment/__tests__/deployment-page.test.d.ts +2 -0
- package/dist/config/entities/deployment/__tests__/deployment-page.test.d.ts.map +1 -0
- package/dist/config/entities/deployment/deployment.d.ts +3 -0
- package/dist/config/entities/deployment/deployment.d.ts.map +1 -0
- package/dist/config/entities/deployment/detail.d.ts +3 -0
- package/dist/config/entities/deployment/detail.d.ts.map +1 -0
- package/dist/config/entities/deployment/list.d.ts +3 -0
- package/dist/config/entities/deployment/list.d.ts.map +1 -0
- package/dist/config/entities/deployment/shared.d.ts +30 -0
- package/dist/config/entities/deployment/shared.d.ts.map +1 -0
- package/dist/config/entities/pipeline/create-pipeline-run-form.d.ts +1 -1
- package/dist/config/entities/pipeline/create-pipeline-run-form.d.ts.map +1 -1
- package/dist/config/entities/targets/__tests__/target-page.test.d.ts +2 -0
- package/dist/config/entities/targets/__tests__/target-page.test.d.ts.map +1 -0
- package/dist/config/entities/targets/detail.d.ts +3 -0
- package/dist/config/entities/targets/detail.d.ts.map +1 -0
- package/dist/config/entities/targets/list.d.ts +3 -0
- package/dist/config/entities/targets/list.d.ts.map +1 -0
- package/dist/config/entities/targets/shared.d.ts +19 -0
- package/dist/config/entities/targets/shared.d.ts.map +1 -0
- package/dist/config/entities/targets/target.d.ts +3 -0
- package/dist/config/entities/targets/target.d.ts.map +1 -0
- package/dist/config/entities/trigger/trigger-run-action-form.d.ts.map +1 -1
- package/dist/config/phases/deploy.d.ts.map +1 -1
- package/dist/config/phases/train.d.ts.map +1 -1
- package/dist/hooks/use-schema-middleware/__tests__/use-schema-middleware.test.d.ts +2 -0
- package/dist/hooks/use-schema-middleware/__tests__/use-schema-middleware.test.d.ts.map +1 -0
- package/dist/hooks/use-schema-middleware/apply-middleware.d.ts +4 -0
- package/dist/hooks/use-schema-middleware/apply-middleware.d.ts.map +1 -0
- package/dist/hooks/use-schema-middleware/apply-scaffold.d.ts +3 -0
- package/dist/hooks/use-schema-middleware/apply-scaffold.d.ts.map +1 -0
- package/dist/hooks/use-schema-middleware/types.d.ts +42 -0
- package/dist/hooks/use-schema-middleware/types.d.ts.map +1 -0
- package/dist/hooks/use-schema-middleware/use-schema-middleware.d.ts +5 -0
- package/dist/hooks/use-schema-middleware/use-schema-middleware.d.ts.map +1 -0
- package/dist/hooks/use-studio-mutation.d.ts +2 -5
- package/dist/hooks/use-studio-mutation.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/michelangelo-core.cjs +304 -76
- package/dist/michelangelo-core.js +45158 -37620
- package/dist/providers/icon-provider/icon-provider.d.ts +3 -0
- package/dist/providers/icon-provider/icon-provider.d.ts.map +1 -1
- package/dist/providers/user-provider/user-provider.d.ts +3 -0
- package/dist/providers/user-provider/user-provider.d.ts.map +1 -1
- package/dist/test/wrappers/get-router-wrapper.d.ts +16 -9
- package/dist/test/wrappers/get-router-wrapper.d.ts.map +1 -1
- package/dist/test/wrappers/get-service-provider-wrapper.d.ts +9 -1
- package/dist/test/wrappers/get-service-provider-wrapper.d.ts.map +1 -1
- package/dist/test/wrappers/get-snackbar-provider-wrapper.d.ts +8 -0
- package/dist/test/wrappers/get-snackbar-provider-wrapper.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/common/studio-types.d.ts +3 -3
- package/dist/types/common/studio-types.d.ts.map +1 -1
- package/dist/types/query-types.d.ts +17 -3
- package/dist/types/query-types.d.ts.map +1 -1
- package/dist/utils/object-utils.d.ts +13 -1
- package/dist/utils/object-utils.d.ts.map +1 -1
- package/dist/utils/string-utils.d.ts +13 -0
- package/dist/utils/string-utils.d.ts.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SuccessOperation } from '../../../components/actions/types';
|
|
2
|
+
type HarnessProps = {
|
|
3
|
+
operations?: SuccessOperation[];
|
|
4
|
+
response?: unknown;
|
|
5
|
+
};
|
|
6
|
+
export declare function UseSuccessOperationsTestHarness({ operations, response }: HarnessProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=use-success-operations-test-harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-success-operations-test-harness.d.ts","sourceRoot":"","sources":["../../../../components/actions/__fixtures__/use-success-operations-test-harness.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,KAAK,YAAY,GAAG;IAClB,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,+BAA+B,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,YAAY,2CAIrF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-success-operations.test.d.ts","sourceRoot":"","sources":["../../../../components/actions/__tests__/use-success-operations.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ActionConfig, Data } from './types';
|
|
2
|
+
type Props<T extends Data> = {
|
|
3
|
+
action: ActionConfig<T>;
|
|
4
|
+
record: T;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function ActionDispatcher<T extends Data>({ action, record, onClose }: Props<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=action-dispatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-dispatcher.d.ts","sourceRoot":"","sources":["../../../components/actions/action-dispatcher.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EAEZ,IAAI,EAGL,MAAM,SAAS,CAAC;AAEjB,KAAK,KAAK,CAAC,CAAC,SAAS,IAAI,IAAI;IAC3B,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACxB,MAAM,EAAE,CAAC,CAAC;IACV,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,kDASrF"}
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import type { MenuAdapterProps } from 'baseui/list';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ResolvedActionItem } from '../../../components/actions/types';
|
|
3
3
|
export declare const ActionMenuItem: import("react").ForwardRefExoticComponent<{
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
item: Omit<ComponentActionConfig, "disabled"> & {
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
disabledMessage: string | undefined;
|
|
11
|
-
};
|
|
12
|
-
record: Data;
|
|
13
|
-
onSelectAction: (action: SelectedAction) => void;
|
|
4
|
+
/** Named `item` to match BaseUI's MenuAdapter injection. */
|
|
5
|
+
item: ResolvedActionItem;
|
|
6
|
+
onSelectAction: (action: ResolvedActionItem) => void;
|
|
14
7
|
onClose?: () => void;
|
|
15
8
|
/**
|
|
16
|
-
* The
|
|
17
|
-
* Compared by object identity against `
|
|
9
|
+
* The item currently under the mouse cursor, or null.
|
|
10
|
+
* Compared by object identity against `item` to derive `isHovered`.
|
|
18
11
|
*/
|
|
19
12
|
hoveredItem: object | null;
|
|
20
13
|
setHoveredItem: (item: object | null) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-menu-item.d.ts","sourceRoot":"","sources":["../../../../components/actions/action-menu/action-menu-item.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"action-menu-item.d.ts","sourceRoot":"","sources":["../../../../components/actions/action-menu/action-menu-item.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AA8BzE,eAAO,MAAM,cAAc;IAnBzB,4DAA4D;UACtD,kBAAkB;oBACR,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI;cAC1C,MAAM,IAAI;IACpB;;;OAGG;iBACU,MAAM,GAAG,IAAI;oBACV,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;IAC7C;;;;OAIG;oBACa,OAAO;uBACJ,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI;+FAyE5C,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResolvedActionItem } from '../../../components/actions/types';
|
|
2
2
|
type ActionMenuProps = {
|
|
3
|
-
actions:
|
|
4
|
-
|
|
5
|
-
onSelectAction: (action: SelectedAction) => void;
|
|
3
|
+
actions: ResolvedActionItem[];
|
|
4
|
+
onSelectAction: (action: ResolvedActionItem) => void;
|
|
6
5
|
onClose?: () => void;
|
|
7
6
|
};
|
|
8
7
|
/**
|
|
@@ -19,6 +18,6 @@ type ActionMenuProps = {
|
|
|
19
18
|
* the auto-highlight on focus. Set to `true` on any keydown inside the
|
|
20
19
|
* menu, reset to `false` on mouse enter.
|
|
21
20
|
*/
|
|
22
|
-
export declare function ActionMenu(
|
|
21
|
+
export declare function ActionMenu({ actions, onSelectAction, onClose }: ActionMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
23
22
|
export {};
|
|
24
23
|
//# sourceMappingURL=action-menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-menu.d.ts","sourceRoot":"","sources":["../../../../components/actions/action-menu/action-menu.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"action-menu.d.ts","sourceRoot":"","sources":["../../../../components/actions/action-menu/action-menu.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,cAAc,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACrD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,EAAE,eAAe,2CAsC/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions-buttons.d.ts","sourceRoot":"","sources":["../../../../components/actions/actions-buttons/actions-buttons.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"actions-buttons.d.ts","sourceRoot":"","sources":["../../../../components/actions/actions-buttons/actions-buttons.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AAEzE,KAAK,mBAAmB,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI;IAChD,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,MAAM,EAAE,CAAC,CAAC;IACV,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,IAAI,EAAE,EAC7C,OAAO,EACP,MAAM,EACN,OAAO,GACR,EAAE,mBAAmB,CAAC,CAAC,CAAC,kDA8ExB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions-popover.d.ts","sourceRoot":"","sources":["../../../components/actions/actions-popover.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"actions-popover.d.ts","sourceRoot":"","sources":["../../../components/actions/actions-popover.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAElD,KAAK,mBAAmB,CAAC,CAAC,SAAS,IAAI,IAAI;IACzC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,MAAM,EAAE,CAAC,CAAC;IACV,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF,wBAAgB,cAAc,CAAC,CAAC,SAAS,IAAI,EAAE,EAC7C,OAAO,EACP,WAAW,EACX,MAAM,EACN,YAAY,GACb,EAAE,mBAAmB,CAAC,CAAC,CAAC,2CAiFxB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ActionConfig, ConfirmModalConfig, Data, MutationActionConfig, RouteActionConfig } from './types';
|
|
2
|
+
type Props<T extends Data> = {
|
|
3
|
+
action: ActionConfig<T> & {
|
|
4
|
+
operation: MutationActionConfig | RouteActionConfig;
|
|
5
|
+
modal: ConfirmModalConfig;
|
|
6
|
+
};
|
|
7
|
+
record: T;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function ConfirmDispatcher<T extends Data>({ action, record, onClose }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=confirm-dispatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm-dispatcher.d.ts","sourceRoot":"","sources":["../../../components/actions/confirm-dispatcher.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,IAAI,EACJ,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAEjB,KAAK,KAAK,CAAC,CAAC,SAAS,IAAI,IAAI;IAC3B,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG;QACxB,SAAS,EAAE,oBAAoB,GAAG,iBAAiB,CAAC;QACpD,KAAK,EAAE,kBAAkB,CAAC;KAC3B,CAAC;IACF,MAAM,EAAE,CAAC,CAAC;IACV,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,2CA+CtF"}
|
|
@@ -1,17 +1,29 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BannerProps } from 'baseui/banner';
|
|
2
|
+
import type { Size as DialogSize } from 'baseui/dialog';
|
|
3
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
4
|
+
import type { MiddlewareSchema } from '../../hooks/use-schema-middleware/types';
|
|
2
5
|
import type { DeepInterpolatable } from '../../interpolation/types';
|
|
3
|
-
|
|
6
|
+
import type { MutationConfig } from '../../types/query-types';
|
|
7
|
+
export type Data = Record<string, unknown>;
|
|
4
8
|
/**
|
|
5
|
-
*
|
|
9
|
+
* An action exposed on an entity (e.g. a row's overflow menu, a header button).
|
|
6
10
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* component
|
|
12
|
-
* };
|
|
13
|
-
* ```
|
|
11
|
+
* Two shapes:
|
|
12
|
+
* - **Action + optional confirm modal** — dispatches a mutation or route, optionally
|
|
13
|
+
* gated by a confirm dialog.
|
|
14
|
+
* - **Custom modal** — opens a custom React component (a form, a wizard, etc.).
|
|
15
|
+
* Cannot pair with `action`; the component owns its own submit flow.
|
|
14
16
|
*/
|
|
17
|
+
export type ActionConfig<T = Data> = ActionConfigBase & ({
|
|
18
|
+
operation: MutationActionConfig | RouteActionConfig;
|
|
19
|
+
modal: ConfirmModalConfig;
|
|
20
|
+
} | {
|
|
21
|
+
operation: MutationActionConfig | RouteActionConfig;
|
|
22
|
+
modal?: never;
|
|
23
|
+
} | {
|
|
24
|
+
modal: CustomModalConfig<T>;
|
|
25
|
+
operation?: never;
|
|
26
|
+
});
|
|
15
27
|
export type ActionConfigBase = {
|
|
16
28
|
/**
|
|
17
29
|
* Controls how the action's trigger button is displayed to the user.
|
|
@@ -34,33 +46,78 @@ export type ActionConfigBase = {
|
|
|
34
46
|
*/
|
|
35
47
|
disabled?: DisabledRule[];
|
|
36
48
|
};
|
|
49
|
+
/** Action that fires a mutation against the API, with optional middleware to shape the record first. */
|
|
50
|
+
export type MutationActionConfig = {
|
|
51
|
+
type: 'mutation';
|
|
52
|
+
mutation: MutationConfig;
|
|
53
|
+
middleware?: MiddlewareSchema;
|
|
54
|
+
/** Side-effects to run after the mutation succeeds (in order). */
|
|
55
|
+
successOperations?: SuccessOperation[];
|
|
56
|
+
};
|
|
37
57
|
/**
|
|
38
|
-
*
|
|
58
|
+
* Side-effect to run after a mutation succeeds.
|
|
39
59
|
*
|
|
40
|
-
*
|
|
60
|
+
* Use `invalidate` to refresh related queries explicitly after a mutation
|
|
61
|
+
* succeeds, either broadly by query name or narrowly by name + args.
|
|
41
62
|
*/
|
|
42
|
-
type
|
|
43
|
-
|
|
63
|
+
export type SuccessOperation = InvalidateOperation | ToastOperation;
|
|
64
|
+
export type InvalidateOperation = {
|
|
65
|
+
type: 'invalidate';
|
|
66
|
+
/** Each target invalidates queries by name only (broad) or by name+args (specific). */
|
|
67
|
+
targets: InvalidationTarget[];
|
|
68
|
+
};
|
|
69
|
+
export type InvalidationTarget = string | {
|
|
70
|
+
name: string;
|
|
71
|
+
serviceOptions: Record<string, unknown>;
|
|
72
|
+
};
|
|
73
|
+
export type ToastOperation = {
|
|
74
|
+
type: 'toast';
|
|
75
|
+
message: string;
|
|
76
|
+
/** Icon registered in the IconProvider. Defaults to 'checkCircle'. */
|
|
44
77
|
icon?: string;
|
|
78
|
+
/** Optional action button rendered inside the toast. */
|
|
79
|
+
action?: {
|
|
80
|
+
label: string;
|
|
81
|
+
/** If set, clicking the action navigates to this route; otherwise it dismisses the toast. */
|
|
82
|
+
route?: string;
|
|
83
|
+
};
|
|
45
84
|
};
|
|
46
|
-
export
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
export type
|
|
52
|
-
|
|
85
|
+
export type RouteActionConfig = {
|
|
86
|
+
type: 'route';
|
|
87
|
+
route: string;
|
|
88
|
+
};
|
|
89
|
+
/** Confirm dialog gating a mutation or route action. */
|
|
90
|
+
export type ConfirmModalConfig = {
|
|
91
|
+
type: 'confirm';
|
|
92
|
+
header: {
|
|
93
|
+
title: string;
|
|
94
|
+
};
|
|
95
|
+
body?: ReactNode;
|
|
96
|
+
banner?: BannerConfig;
|
|
97
|
+
button: {
|
|
98
|
+
label: string;
|
|
99
|
+
icon?: string;
|
|
100
|
+
};
|
|
101
|
+
/** Renders the confirm button in red. Use for irreversible actions (e.g. delete). */
|
|
102
|
+
destructive?: boolean;
|
|
103
|
+
size?: DialogSize;
|
|
104
|
+
};
|
|
105
|
+
/** Custom React component opened in a modal — owns its own submit flow. */
|
|
106
|
+
export type CustomModalConfig<T> = {
|
|
107
|
+
type: 'custom';
|
|
53
108
|
component: ComponentType<ActionComponentProps<T>>;
|
|
54
109
|
};
|
|
110
|
+
export type BannerConfig = {
|
|
111
|
+
content: ReactNode;
|
|
112
|
+
kind?: BannerProps['kind'];
|
|
113
|
+
/** Registered icon name from the icon provider. */
|
|
114
|
+
icon?: string;
|
|
115
|
+
};
|
|
116
|
+
/** Props passed to a component rendered by {@link CustomModalConfig}. */
|
|
55
117
|
export type ActionComponentProps<T = Data> = {
|
|
56
118
|
record: T;
|
|
57
|
-
isOpen: boolean;
|
|
58
119
|
onClose: () => void;
|
|
59
120
|
};
|
|
60
|
-
export type SelectedAction = {
|
|
61
|
-
component: ComponentType<ActionComponentProps>;
|
|
62
|
-
record: Data;
|
|
63
|
-
};
|
|
64
121
|
/**
|
|
65
122
|
* Schema version of {@link ActionConfig} — what config authors write.
|
|
66
123
|
* All leaf fields accept interpolated values via {@link DeepInterpolatable}.
|
|
@@ -69,6 +126,32 @@ export type SelectedAction = {
|
|
|
69
126
|
* is resolved at the per-row boundary before reaching any rendering code.
|
|
70
127
|
*/
|
|
71
128
|
export type ActionConfigSchema<T = Data> = DeepInterpolatable<ActionConfig<T>>;
|
|
129
|
+
export declare enum ActionHierarchy {
|
|
130
|
+
PRIMARY = "primary",
|
|
131
|
+
SECONDARY = "secondary",
|
|
132
|
+
TERTIARY = "tertiary"
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Item shape consumed by action renderers — display + `onClick` with no
|
|
136
|
+
* action-type knowledge. The `onClick` is pre-bound by whoever resolved the items.
|
|
137
|
+
*/
|
|
138
|
+
export type ResolvedActionItem = {
|
|
139
|
+
display: ActionTriggerDisplay;
|
|
140
|
+
hierarchy?: ActionHierarchy;
|
|
141
|
+
disabled: boolean;
|
|
142
|
+
/** Tooltip shown on hover/keyboard navigation when `disabled` is true. */
|
|
143
|
+
disabledMessage?: string;
|
|
144
|
+
onClick: () => void;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* How the action's trigger button is displayed to the user
|
|
148
|
+
*
|
|
149
|
+
* @note icon is a string reference to an icon in the icon provider
|
|
150
|
+
*/
|
|
151
|
+
type ActionTriggerDisplay = {
|
|
152
|
+
label: string;
|
|
153
|
+
icon?: string;
|
|
154
|
+
};
|
|
72
155
|
/** A condition that disables an action for a specific record, with an optional hover tooltip. */
|
|
73
156
|
type DisabledRule = {
|
|
74
157
|
condition: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../components/actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../components/actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,aAA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AAS,CAAC;IACnB,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,yEAAyE;AACzE,MAAM,MAAM,oBAAoB,CAAC,CAAC,GAAG,IAAI,IAAI;IAC3C,MAAM,EAAE,CAAC,CAAC;IACV,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,IAAI,IAAI,kBAAkB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E,oBAAY,eAAe;IACzB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,0EAA0E;IAC1E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,iGAAiG;AACjG,KAAK,YAAY,GAAG;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ActionConfig, Data, ResolvedActionItem } from './types';
|
|
2
|
+
/** Memoized on actions/onSelect so returned items have stable identity for reference comparisons (e.g. hover tracking). */
|
|
3
|
+
export declare function useResolvedActionItems<T extends Data>(actions: ActionConfig<T>[], onSelect: (action: ActionConfig<T>) => void): ResolvedActionItem[];
|
|
4
|
+
//# sourceMappingURL=use-resolved-action-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-resolved-action-items.d.ts","sourceRoot":"","sources":["../../../components/actions/use-resolved-action-items.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEtE,2HAA2H;AAC3H,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,IAAI,EACnD,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,EAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,GAC1C,kBAAkB,EAAE,CAetB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SuccessOperation } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a runner function that processes a mutation's `successOperations`.
|
|
4
|
+
*
|
|
5
|
+
* The runner resolves response interpolation (e.g. `${response.metadata.name}`)
|
|
6
|
+
* against the mutation result, then applies each operation in order.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useSuccessOperations(operations?: SuccessOperation[]): (response: unknown) => void;
|
|
9
|
+
//# sourceMappingURL=use-success-operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-success-operations.d.ts","sourceRoot":"","sources":["../../../components/actions/use-success-operations.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAkB,MAAM,SAAS,CAAC;AAIhE;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,CAAC,EAAE,gBAAgB,EAAE,cAOrD,OAAO,UAiBrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-scrolling-navbar-shadow.test.d.ts","sourceRoot":"","sources":["../../../../components/breadcrumb-bar/__tests__/use-scrolling-navbar-shadow.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-bar.d.ts","sourceRoot":"","sources":["../../../components/breadcrumb-bar/breadcrumb-bar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"breadcrumb-bar.d.ts","sourceRoot":"","sources":["../../../components/breadcrumb-bar/breadcrumb-bar.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,aAAa,GACd,EAAE;IACD,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC;CAC3B,2CAqCA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const PlainLink: import("styletron-react").StyletronComponent<import("react").ForwardRefExoticComponent<import("react-router-dom-v5-compat").LinkProps & import("react").RefAttributes<HTMLAnchorElement>>, {}>;
|
|
2
2
|
export declare const TopLevelNavLink: import("styletron-react").StyletronComponent<import("react").ForwardRefExoticComponent<import("react-router-dom-v5-compat").LinkProps & import("react").RefAttributes<HTMLAnchorElement>>, {}>;
|
|
3
|
-
export declare const BreadcrumbContainer: import("styletron-react").StyletronComponent<"div", {
|
|
3
|
+
export declare const BreadcrumbContainer: import("styletron-react").StyletronComponent<"div", {
|
|
4
|
+
$scrolled: boolean;
|
|
5
|
+
}>;
|
|
4
6
|
export declare const PhaseHeader: import("styletron-react").StyletronComponent<"li", {
|
|
5
7
|
$disabled?: boolean;
|
|
6
8
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled-components.d.ts","sourceRoot":"","sources":["../../../components/breadcrumb-bar/styled-components.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,gMAKnB,CAAC;AAEJ,eAAO,MAAM,eAAe,gMAYzB,CAAC;AAEJ,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"styled-components.d.ts","sourceRoot":"","sources":["../../../components/breadcrumb-bar/styled-components.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,gMAKnB,CAAC;AAEJ,eAAO,MAAM,eAAe,gMAYzB,CAAC;AAEJ,eAAO,MAAM,mBAAmB;eAA8B,OAAO;EAgBpE,CAAC;AAEF,eAAO,MAAM,WAAW;gBAA8B,OAAO;EAe3D,CAAC;AAEH,eAAO,MAAM,UAAU;gBAA8B,OAAO;EAYzD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-scrolling-navbar-shadow.d.ts","sourceRoot":"","sources":["../../../components/breadcrumb-bar/use-scrolling-navbar-shadow.ts"],"names":[],"mappings":"AAEA,wBAAgB,wBAAwB;;EAgBvC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SharedCell } from '../../../../components/cell/types';
|
|
2
2
|
import type { DescriptionHierarchy } from './constants';
|
|
3
|
-
export type DescriptionCellConfig = SharedCell & {
|
|
3
|
+
export type DescriptionCellConfig<TRecord = unknown> = SharedCell<TRecord> & {
|
|
4
4
|
/**
|
|
5
5
|
* @description Used to control cell styling – e.g. color, font-size, etc.
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../components/cell/renderers/description/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../components/cell/renderers/description/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,qBAAqB,CAAC,OAAO,GAAG,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG;IAC3E;;OAEG;IACH,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SharedCell } from '../../../../components/cell/types';
|
|
2
|
-
export type LinkCellConfig = SharedCell<string> & {
|
|
2
|
+
export type LinkCellConfig<TRecord = unknown> = SharedCell<TRecord, string> & {
|
|
3
3
|
/**
|
|
4
4
|
* @description When provided, the cell will display a link to the provided url
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../components/cell/renderers/link/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../components/cell/renderers/link/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,MAAM,cAAc,CAAC,OAAO,GAAG,OAAO,IAAI,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG;IAC5E;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Cell, SharedCell } from '../../../../components/cell/types';
|
|
2
|
-
export type MultiCellConfig = SharedCell
|
|
2
|
+
export type MultiCellConfig = SharedCell & {
|
|
3
3
|
/**
|
|
4
4
|
* @description Used to render the cell with multiple lines with different values
|
|
5
5
|
* e.g. First line with Pipeline name and second line with revision identifier
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../components/cell/renderers/multi/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEpE,MAAM,MAAM,eAAe,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../components/cell/renderers/multi/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEpE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG;IACzC;;;;;;;;;;;;;OAaG;IACH,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACpB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SharedCell } from '../../../../components/cell/types';
|
|
2
2
|
import type { TagColor } from '../../../../components/tag/types';
|
|
3
|
-
export type StateCellConfig = SharedCell<string> & {
|
|
3
|
+
export type StateCellConfig<TRecord = unknown> = SharedCell<TRecord, string> & {
|
|
4
4
|
/**
|
|
5
5
|
* @description A map of state values to their display text
|
|
6
6
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../components/cell/renderers/state/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../components/cell/renderers/state/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,MAAM,eAAe,CAAC,OAAO,GAAG,OAAO,IAAI,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG;IAC7E;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEtC;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;CAC1C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SharedCell } from '../../../../components/cell/types';
|
|
2
2
|
import type { TagColor } from '../../../../components/tag/types';
|
|
3
|
-
export type TagCellConfig = SharedCell<string> & {
|
|
3
|
+
export type TagCellConfig<TRecord = unknown> = SharedCell<TRecord, string> & {
|
|
4
4
|
/**
|
|
5
5
|
* @description The color of the tag
|
|
6
6
|
* @default COLOR.gray
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../components/cell/renderers/tag/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../components/cell/renderers/tag/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,MAAM,aAAa,CAAC,OAAO,GAAG,OAAO,IAAI,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG;IAC3E;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SharedCell } from '../../../../components/cell/types';
|
|
2
|
-
export type TypeCellConfig = SharedCell<string> & {
|
|
2
|
+
export type TypeCellConfig<TRecord = unknown> = SharedCell<TRecord, string> & {
|
|
3
3
|
/**
|
|
4
4
|
* @description A map of type values to their display text
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../components/cell/renderers/type/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../components/cell/renderers/type/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,MAAM,cAAc,CAAC,OAAO,GAAG,OAAO,IAAI,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG;IAC5E;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC,CAAC"}
|
|
@@ -17,8 +17,8 @@ import type { TypeCellConfig } from './renderers/type/types';
|
|
|
17
17
|
* @see {@link LinkCellConfig}
|
|
18
18
|
* @see {@link MultiCellConfig}
|
|
19
19
|
*/
|
|
20
|
-
export type Cell<
|
|
21
|
-
export interface SharedCell<
|
|
20
|
+
export type Cell<TRecord = unknown, TValue = unknown> = SharedCell<TRecord, TValue> & (DescriptionCellConfig<TRecord> | LinkCellConfig<TRecord> | MultiCellConfig | StateCellConfig<TRecord> | TypeCellConfig<TRecord>);
|
|
21
|
+
export interface SharedCell<TRecord = unknown, TValue = unknown> {
|
|
22
22
|
/**
|
|
23
23
|
* @description Unique identifier for the column
|
|
24
24
|
* If no accessor is provided, this id will be used to access the data
|
|
@@ -30,7 +30,7 @@ export interface SharedCell<T = unknown> {
|
|
|
30
30
|
* @example 'spec.content.metadata.name'
|
|
31
31
|
* @example (row) => `Revision ${row?.spec?.revisionId}`,
|
|
32
32
|
*/
|
|
33
|
-
accessor?: Accessor<
|
|
33
|
+
accessor?: Accessor<TRecord, TValue>;
|
|
34
34
|
/**
|
|
35
35
|
* @description Label to be displayed in the table header
|
|
36
36
|
*/
|
|
@@ -74,7 +74,7 @@ export interface SharedCell<T = unknown> {
|
|
|
74
74
|
* @default
|
|
75
75
|
* @see src/components/cell/renderers/default/column-renderer.tsx
|
|
76
76
|
*/
|
|
77
|
-
Cell?: CellRenderer<
|
|
77
|
+
Cell?: CellRenderer<TValue>;
|
|
78
78
|
/**
|
|
79
79
|
* @description Style overrides to be applied to each cell
|
|
80
80
|
*
|
|
@@ -112,7 +112,7 @@ export type CellStyleFunction = (args: {
|
|
|
112
112
|
record: unknown;
|
|
113
113
|
theme: Theme;
|
|
114
114
|
}) => StyleObject;
|
|
115
|
-
export type CellRenderer<T, CellConfig = SharedCell<T>> = {
|
|
115
|
+
export type CellRenderer<T, CellConfig = SharedCell<unknown, T>> = {
|
|
116
116
|
(props: CellRendererProps<T, CellConfig>): ReactNode | null;
|
|
117
117
|
/**
|
|
118
118
|
* @description
|
|
@@ -120,7 +120,7 @@ export type CellRenderer<T, CellConfig = SharedCell<T>> = {
|
|
|
120
120
|
*/
|
|
121
121
|
toString?: (props: CellRendererProps<T, CellConfig>) => string;
|
|
122
122
|
};
|
|
123
|
-
export interface CellRendererProps<T = unknown, CellConfig = SharedCell<T>> {
|
|
123
|
+
export interface CellRendererProps<T = unknown, CellConfig = SharedCell<unknown, T>> {
|
|
124
124
|
column: CellConfig;
|
|
125
125
|
/**
|
|
126
126
|
* @description
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../components/cell/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAA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O,EAAE,CAAC,CAAC,IAAI;IACjE,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;IAE5D;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,EAAE,UAAU,CAAC,KAAK,MAAM,CAAC;CAChE,CAAC;AAEF,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,OAAO,EAAE,UAAU,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;IACjF,MAAM,EAAE,UAAU,CAAC;IAEnB;;;;;;;OAOG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;;OAMG;IACH,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC;IAErB;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;CACjC;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,OAAO,EAAE,UAAU,GAAG,UAAU,IAAI,IAAI,CACzE,iBAAiB,CAAC,CAAC,EAAE,UAAU,CAAC,EAChC,QAAQ,GAAG,OAAO,CACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-form-error-list.d.ts","sourceRoot":"","sources":["../../../../../components/form/components/form-error-banner/use-form-error-list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-form-error-list.d.ts","sourceRoot":"","sources":["../../../../../components/form/components/form-error-banner/use-form-error-list.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,UAAU,EAAE,CAkC/C"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { DateFormat } from './types';
|
|
2
|
-
type UseDateFormattersReturn = {
|
|
3
|
-
format: (value: string) => Date | null;
|
|
4
|
-
parse: (value: Date | null) => string;
|
|
5
|
-
};
|
|
6
2
|
/**
|
|
7
3
|
* Returns `format` and `parse` functions that translate between date formats
|
|
8
4
|
* (epoch seconds string or ISO string) and the Date objects expected by BaseUI's DatePicker.
|
|
@@ -15,6 +11,8 @@ type UseDateFormattersReturn = {
|
|
|
15
11
|
*
|
|
16
12
|
* @param dateFormat - Controls the persisted date format (epoch or ISO).
|
|
17
13
|
*/
|
|
18
|
-
export declare function useDateFormatters(dateFormat?: DateFormat):
|
|
19
|
-
|
|
14
|
+
export declare function useDateFormatters(dateFormat?: DateFormat): {
|
|
15
|
+
format: (value: string) => Date | null;
|
|
16
|
+
parse: (value: Date | null) => string;
|
|
17
|
+
};
|
|
20
18
|
//# sourceMappingURL=use-date-formatters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-date-formatters.d.ts","sourceRoot":"","sources":["../../../../../components/form/fields/date/use-date-formatters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,
|
|
1
|
+
{"version":3,"file":"use-date-formatters.d.ts","sourceRoot":"","sources":["../../../../../components/form/fields/date/use-date-formatters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,GAAE,UAAuC,GAAG;IACtF,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;IACvC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,KAAK,MAAM,CAAC;CACvC,CAeA"}
|
package/dist/components/views/detail-view/components/detail-view-header/detail-view-header.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { DetailViewHeaderProps } from './types';
|
|
2
|
-
export declare function DetailViewHeader({ subtitle, title, onGoBack, children, actions, record, loading, }: DetailViewHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function DetailViewHeader({ subtitle, title, titleEnhancer, onGoBack, children, actions, record, loading, }: DetailViewHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=detail-view-header.d.ts.map
|
package/dist/components/views/detail-view/components/detail-view-header/detail-view-header.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detail-view-header.d.ts","sourceRoot":"","sources":["../../../../../../components/views/detail-view/components/detail-view-header/detail-view-header.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,MAAM,EACN,OAAO,GACR,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"detail-view-header.d.ts","sourceRoot":"","sources":["../../../../../../components/views/detail-view/components/detail-view-header/detail-view-header.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,KAAK,EACL,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,MAAM,EACN,OAAO,GACR,EAAE,qBAAqB,2CAuEvB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { DetailViewProps } from './types/detail-view-component-types';
|
|
2
|
-
export declare function DetailView({ title, subtitle, onGoBack, headerContent, children, actions, record, loading, }: DetailViewProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function DetailView({ title, subtitle, onGoBack, headerContent, children, actions, record, loading, titleEnhancer, }: DetailViewProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=detail-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detail-view.d.ts","sourceRoot":"","sources":["../../../../components/views/detail-view/detail-view.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAE3E,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,OAAO,EACP,MAAM,EACN,OAAO,
|
|
1
|
+
{"version":3,"file":"detail-view.d.ts","sourceRoot":"","sources":["../../../../components/views/detail-view/detail-view.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAE3E,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,OAAO,EACP,MAAM,EACN,OAAO,EACP,aAAa,GACd,EAAE,eAAe,2CAoBjB"}
|
|
@@ -15,6 +15,10 @@ export interface DetailHeaderBaseProps {
|
|
|
15
15
|
* Main heading displayed next to the back button
|
|
16
16
|
*/
|
|
17
17
|
title?: string;
|
|
18
|
+
/**
|
|
19
|
+
* ReactNode to be rendered next to the title in the header
|
|
20
|
+
*/
|
|
21
|
+
titleEnhancer?: React.ReactNode;
|
|
18
22
|
onGoBack?: () => void;
|
|
19
23
|
/**
|
|
20
24
|
* Configuration for set of action buttons that render within the header. These actions
|