@michelangelo-ai/core 0.2.2 → 0.3.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/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 +115 -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/breadcrumb-bar.d.ts.map +1 -1
- 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/add-button/add-button.d.ts +1 -1
- package/dist/components/form/components/form-control.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/components/label/label-end-enhancer-content.d.ts +9 -0
- package/dist/components/form/components/label/label-end-enhancer-content.d.ts.map +1 -0
- package/dist/components/form/form.d.ts.map +1 -1
- package/dist/components/form/hooks/use-array-field.d.ts +4 -4
- package/dist/components/illustrations/circle-exclamation-mark/circle-exclamation-mark.d.ts.map +1 -1
- package/dist/components/table/components/table-action-bar/components/table-active-filter-tag-list/table-active-filter-tag-list.d.ts +1 -1
- package/dist/components/table/components/table-action-bar/components/table-active-filter-tag-list/table-active-filter-tag-list.d.ts.map +1 -1
- package/dist/components/table/components/table-action-bar/components/table-active-filter-tag-list/table-active-filter-tag.d.ts +1 -1
- package/dist/components/table/components/table-action-bar/components/table-active-filter-tag-list/table-active-filter-tag.d.ts.map +1 -1
- package/dist/components/table/components/table-action-bar/components/table-filter-menu/components/table-filter-option/table-filter-option.d.ts.map +1 -1
- package/dist/components/table/components/table-header/components/table-column-configuration-button/table-column-configuration-button.d.ts.map +1 -1
- package/dist/components/table/components/table-pagination/table-pagination.d.ts +0 -1
- package/dist/components/table/components/table-pagination/table-pagination.d.ts.map +1 -1
- package/dist/components/table/types/column-types.d.ts +1 -1
- package/dist/components/table/types/column-types.d.ts.map +1 -1
- package/dist/components/text-editor/text-editor.d.ts +1 -1
- package/dist/components/text-editor/text-editor.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/components/views/execution/utils/scroll-to-task.d.ts +1 -1
- package/dist/components/views/execution/utils/scroll-to-task.d.ts.map +1 -1
- 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/trigger/__tests__/trigger.test.d.ts +2 -0
- package/dist/config/entities/trigger/__tests__/trigger.test.d.ts.map +1 -0
- package/dist/config/entities/trigger/trigger.d.ts.map +1 -1
- package/dist/config/phases/train.d.ts.map +1 -1
- package/dist/hooks/use-scroll.d.ts +1 -1
- package/dist/hooks/use-scroll.d.ts.map +1 -1
- 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 +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/michelangelo-core.cjs +304 -76
- package/dist/michelangelo-core.js +45949 -38752
- package/dist/providers/cell-provider/cell-provider.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/themes/{provider.d.ts → theme-provider.d.ts} +1 -1
- package/dist/themes/theme-provider.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 +1 -1
- package/dist/utils/object-utils.d.ts.map +1 -1
- package/dist/utils/string-utils.d.ts +10 -0
- package/dist/utils/string-utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/config/entities/trigger/__tests__/trigger-run-action-form.test.d.ts +0 -2
- package/dist/config/entities/trigger/__tests__/trigger-run-action-form.test.d.ts.map +0 -1
- package/dist/config/entities/trigger/trigger-run-action-form.d.ts +0 -4
- package/dist/config/entities/trigger/trigger-run-action-form.d.ts.map +0 -1
- package/dist/themes/provider.d.ts.map +0 -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;+FA0E5C,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":"AAWA,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,84 @@ 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
|
+
* Wait this many milliseconds before invalidating. Useful when the backend
|
|
70
|
+
* processes the mutation asynchronously after responding (e.g. CRD spec
|
|
71
|
+
* changes that a controller reconciles into status). Set only when needed.
|
|
72
|
+
*/
|
|
73
|
+
delayMs?: number;
|
|
74
|
+
};
|
|
75
|
+
export type InvalidationTarget = string | {
|
|
76
|
+
name: string;
|
|
77
|
+
serviceOptions: Record<string, unknown>;
|
|
78
|
+
};
|
|
79
|
+
export type ToastOperation = {
|
|
80
|
+
type: 'toast';
|
|
81
|
+
message: string;
|
|
82
|
+
/** Icon registered in the IconProvider. Defaults to 'checkCircle'. */
|
|
44
83
|
icon?: string;
|
|
84
|
+
/** Optional action button rendered inside the toast. */
|
|
85
|
+
action?: {
|
|
86
|
+
label: string;
|
|
87
|
+
/** If set, clicking the action navigates to this route; otherwise it dismisses the toast. */
|
|
88
|
+
route?: string;
|
|
89
|
+
};
|
|
45
90
|
};
|
|
46
|
-
export
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
export type
|
|
52
|
-
|
|
91
|
+
export type RouteActionConfig = {
|
|
92
|
+
type: 'route';
|
|
93
|
+
route: string;
|
|
94
|
+
};
|
|
95
|
+
/** Confirm dialog gating a mutation or route action. */
|
|
96
|
+
export type ConfirmModalConfig = {
|
|
97
|
+
type: 'confirm';
|
|
98
|
+
header: {
|
|
99
|
+
title: string;
|
|
100
|
+
};
|
|
101
|
+
body?: ReactNode;
|
|
102
|
+
banner?: BannerConfig;
|
|
103
|
+
button: {
|
|
104
|
+
label: string;
|
|
105
|
+
icon?: string;
|
|
106
|
+
};
|
|
107
|
+
/** Renders the confirm button in red. Use for irreversible actions (e.g. delete). */
|
|
108
|
+
destructive?: boolean;
|
|
109
|
+
size?: DialogSize;
|
|
110
|
+
};
|
|
111
|
+
/** Custom React component opened in a modal — owns its own submit flow. */
|
|
112
|
+
export type CustomModalConfig<T> = {
|
|
113
|
+
type: 'custom';
|
|
53
114
|
component: ComponentType<ActionComponentProps<T>>;
|
|
54
115
|
};
|
|
116
|
+
export type BannerConfig = {
|
|
117
|
+
content: ReactNode;
|
|
118
|
+
kind?: BannerProps['kind'];
|
|
119
|
+
/** Registered icon name from the icon provider. */
|
|
120
|
+
icon?: string;
|
|
121
|
+
};
|
|
122
|
+
/** Props passed to a component rendered by {@link CustomModalConfig}. */
|
|
55
123
|
export type ActionComponentProps<T = Data> = {
|
|
56
124
|
record: T;
|
|
57
|
-
isOpen: boolean;
|
|
58
125
|
onClose: () => void;
|
|
59
126
|
};
|
|
60
|
-
export type SelectedAction = {
|
|
61
|
-
component: ComponentType<ActionComponentProps>;
|
|
62
|
-
record: Data;
|
|
63
|
-
};
|
|
64
127
|
/**
|
|
65
128
|
* Schema version of {@link ActionConfig} — what config authors write.
|
|
66
129
|
* All leaf fields accept interpolated values via {@link DeepInterpolatable}.
|
|
@@ -69,6 +132,32 @@ export type SelectedAction = {
|
|
|
69
132
|
* is resolved at the per-row boundary before reaching any rendering code.
|
|
70
133
|
*/
|
|
71
134
|
export type ActionConfigSchema<T = Data> = DeepInterpolatable<ActionConfig<T>>;
|
|
135
|
+
export declare enum ActionHierarchy {
|
|
136
|
+
PRIMARY = "primary",
|
|
137
|
+
SECONDARY = "secondary",
|
|
138
|
+
TERTIARY = "tertiary"
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Item shape consumed by action renderers — display + `onClick` with no
|
|
142
|
+
* action-type knowledge. The `onClick` is pre-bound by whoever resolved the items.
|
|
143
|
+
*/
|
|
144
|
+
export type ResolvedActionItem = {
|
|
145
|
+
display: ActionTriggerDisplay;
|
|
146
|
+
hierarchy?: ActionHierarchy;
|
|
147
|
+
disabled: boolean;
|
|
148
|
+
/** Tooltip shown on hover/keyboard navigation when `disabled` is true. */
|
|
149
|
+
disabledMessage?: string;
|
|
150
|
+
onClick: () => void;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* How the action's trigger button is displayed to the user
|
|
154
|
+
*
|
|
155
|
+
* @note icon is a string reference to an icon in the icon provider
|
|
156
|
+
*/
|
|
157
|
+
type ActionTriggerDisplay = {
|
|
158
|
+
label: string;
|
|
159
|
+
icon?: string;
|
|
160
|
+
};
|
|
72
161
|
/** A condition that disables an action for a specific record, with an optional hover tooltip. */
|
|
73
162
|
type DisabledRule = {
|
|
74
163
|
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,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,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AM,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,UAwBrB"}
|
|
@@ -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":"AAaA,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,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,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,E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AAC,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":"form-control.d.ts","sourceRoot":"","sources":["../../../../components/form/components/form-control.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"form-control.d.ts","sourceRoot":"","sources":["../../../../components/form/components/form-control.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAwDlD,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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FormControlProps } from '../../../../components/form/components/types';
|
|
2
|
+
/**
|
|
3
|
+
* Renders content intended for FormControl's label end enhancer slot. Includes counter
|
|
4
|
+
* display and/or arbitrary enhancer content, side-by-side.
|
|
5
|
+
*
|
|
6
|
+
* **Relies on parent FormControl's LabelEndEnhancer override for flex layout**
|
|
7
|
+
*/
|
|
8
|
+
export declare const LabelEndEnhancerContent: ({ counter, labelEndEnhancer, }: Pick<FormControlProps, "counter" | "labelEndEnhancer">) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=label-end-enhancer-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-end-enhancer-content.d.ts","sourceRoot":"","sources":["../../../../../components/form/components/label/label-end-enhancer-content.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE/E;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,mCAGjC,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,kBAAkB,CAAC,4CAkBxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../components/form/form.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAiB,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIlE,eAAO,MAAM,IAAI,GAAI,WAAW,SAAS,QAAQ,uFAQ9C,SAAS,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../components/form/form.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAiB,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIlE,eAAO,MAAM,IAAI,GAAI,WAAW,SAAS,QAAQ,uFAQ9C,SAAS,CAAC,WAAW,CAAC,4CAqCxB,CAAC"}
|
|
@@ -7,7 +7,7 @@ import type { ArrayFieldOptions } from '../../../components/form/types';
|
|
|
7
7
|
* `key` prop and an `indexedFieldPath` for constructing nested field names. Guaranteed to have at
|
|
8
8
|
* least `minItems` entries after the initial effect runs.
|
|
9
9
|
*
|
|
10
|
-
* - `
|
|
10
|
+
* - `handleItemAdd`: Pushes one new empty item to the array.
|
|
11
11
|
*
|
|
12
12
|
* - `remove`: Removes an item from the array.
|
|
13
13
|
*
|
|
@@ -15,7 +15,7 @@ import type { ArrayFieldOptions } from '../../../components/form/types';
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```tsx
|
|
18
|
-
* const { entries,
|
|
18
|
+
* const { entries, handleItemAdd, remove, isRemovable } = useArrayField('contacts', { minItems: 1 });
|
|
19
19
|
*
|
|
20
20
|
* return (
|
|
21
21
|
* <>
|
|
@@ -25,7 +25,7 @@ import type { ArrayFieldOptions } from '../../../components/form/types';
|
|
|
25
25
|
* {isRemovable && <button onClick={() => remove(index)}>Remove</button>}
|
|
26
26
|
* </div>
|
|
27
27
|
* ))}
|
|
28
|
-
* <button onClick={
|
|
28
|
+
* <button onClick={handleItemAdd}>Add more</button>
|
|
29
29
|
* </>
|
|
30
30
|
* );
|
|
31
31
|
* ```
|
|
@@ -35,7 +35,7 @@ export declare function useArrayField(rootFieldPath: string, { minItems, readOnl
|
|
|
35
35
|
id: string;
|
|
36
36
|
indexedFieldPath: string;
|
|
37
37
|
}[];
|
|
38
|
-
|
|
38
|
+
handleItemAdd: () => void;
|
|
39
39
|
remove: (index: number) => void;
|
|
40
40
|
isRemovable: boolean;
|
|
41
41
|
};
|
package/dist/components/illustrations/circle-exclamation-mark/circle-exclamation-mark.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circle-exclamation-mark.d.ts","sourceRoot":"","sources":["../../../../components/illustrations/circle-exclamation-mark/circle-exclamation-mark.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAE1D,wBAAgB,qBAAqB,CAAC,EACpC,KAAY,EACZ,MAAa,EACb,IAAsC,GACvC,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"circle-exclamation-mark.d.ts","sourceRoot":"","sources":["../../../../components/illustrations/circle-exclamation-mark/circle-exclamation-mark.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAE1D,wBAAgB,qBAAqB,CAAC,EACpC,KAAY,EACZ,MAAa,EACb,IAAsC,GACvC,EAAE,0BAA0B,2CA+B5B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ActiveFilterTagListProps } from './types';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function TableActiveFilterTagList<TData = unknown>(props: ActiveFilterTagListProps<TData>): import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
//# sourceMappingURL=table-active-filter-tag-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-active-filter-tag-list.d.ts","sourceRoot":"","sources":["../../../../../../../components/table/components/table-action-bar/components/table-active-filter-tag-list/table-active-filter-tag-list.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,wBAAgB,
|
|
1
|
+
{"version":3,"file":"table-active-filter-tag-list.d.ts","sourceRoot":"","sources":["../../../../../../../components/table/components/table-action-bar/components/table-active-filter-tag-list/table-active-filter-tag-list.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,wBAAgB,wBAAwB,CAAC,KAAK,GAAG,OAAO,EAAE,KAAK,EAAE,wBAAwB,CAAC,KAAK,CAAC,kDAoB/F"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ActiveFilterTagProps } from './types';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function TableActiveFilterTag<TData = unknown>(props: ActiveFilterTagProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=table-active-filter-tag.d.ts.map
|