@equinor/apollo-components 3.3.0-beta.0 → 3.3.0-beta.1
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/index.d.ts +19 -1
- package/dist/index.js +5 -7
- package/dist/index.mjs +3 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { CellProps, TypographyProps as TypographyProps$1 } from '@equinor/eds-co
|
|
|
8
8
|
import { ColumnDef as ColumnDef$1 } from '@tanstack/table-core';
|
|
9
9
|
import { SetRequired } from 'type-fest';
|
|
10
10
|
import { TableOptions } from '@tanstack/table-core/build/lib/types';
|
|
11
|
+
import { Variants } from '@equinor/eds-core-react/dist/types/components/types';
|
|
11
12
|
import { FieldError } from 'react-hook-form';
|
|
12
13
|
|
|
13
14
|
interface AppShellProps {
|
|
@@ -245,6 +246,20 @@ declare function useSetFormMeta<T extends FormMeta>(): (newValues: Partial<T>) =
|
|
|
245
246
|
declare function removeFormMeta<T extends FormMeta>(withFormMeta: T): Omit<T, keyof FormMeta>;
|
|
246
247
|
declare function addFormMeta<T>(withoutFormMeta: T): T & FormMeta;
|
|
247
248
|
|
|
249
|
+
interface GetHelperTextPropsProps {
|
|
250
|
+
error?: {
|
|
251
|
+
message?: string;
|
|
252
|
+
};
|
|
253
|
+
warning?: {
|
|
254
|
+
message: string;
|
|
255
|
+
};
|
|
256
|
+
helperText?: string;
|
|
257
|
+
}
|
|
258
|
+
interface GetHelperTextProps {
|
|
259
|
+
variant?: Variants;
|
|
260
|
+
helperText?: string;
|
|
261
|
+
helperIcon: JSX.Element | null;
|
|
262
|
+
}
|
|
248
263
|
interface EditableCellBaseProps<T extends FormMeta, Value> extends CellContext<T, Value> {
|
|
249
264
|
/**
|
|
250
265
|
* FieldError object used to overwrite react-hook-form validation result. It is prioritized over
|
|
@@ -286,4 +301,7 @@ declare function EditableTextAreaCell<T extends FormMeta>({ title, error: errorF
|
|
|
286
301
|
|
|
287
302
|
declare function EditableTextFieldCell<T extends FormMeta>({ error: errorFromProps, ...context }: EditableCellBaseProps<T, string>): JSX.Element;
|
|
288
303
|
|
|
289
|
-
|
|
304
|
+
declare const WARNING_PREFIX = "WARNING";
|
|
305
|
+
declare function getHelperTextProps({ error, warning, helperText, }: GetHelperTextPropsProps): GetHelperTextProps;
|
|
306
|
+
|
|
307
|
+
export { AppShell, AppSidebar, CellConfig, CheckboxCell, ChipsCell, ColumnSelect, DataTable, DataTableProps, DynamicCell, EditableCellBaseProps, EditableCheckboxCell, EditableDateCell, EditableDateCellProps, EditableDropdownSingleCell, EditableDropdownSingleCellProps, EditableNumberCell, EditableTextAreaCell, EditableTextFieldCell, FormMeta, GetHelperTextProps, GetHelperTextPropsProps, HTMLPropsRef, HeaderCell, HierarchyCell, InfiniteScrollConfig, Option, PopoverCell, RowConfig, RowSelectionMode, SelectColumnDef, SortConfig, StickyCell, StickyHeaderCell, StyledStickyCell, TableHeader, TableLayout, TableRowWrapper, TableRowWrapperProps, TruncateMode, TypographyCustom, TypographyProps, WARNING_PREFIX, WithoutFormMeta, addFormMeta, capitalizeHeader, getHelperTextProps, leftCellShadow, prependSelectColumn, removeFormMeta, stopPropagation, stringToHslColor, useEditMode, useGetIsNew, useHasRemoteChange, useSetFormMeta };
|
package/dist/index.js
CHANGED
|
@@ -2394,8 +2394,10 @@ __export(src_exports, {
|
|
|
2394
2394
|
StyledStickyCell: () => StyledStickyCell,
|
|
2395
2395
|
TableHeader: () => TableHeader,
|
|
2396
2396
|
TypographyCustom: () => TypographyCustom,
|
|
2397
|
+
WARNING_PREFIX: () => WARNING_PREFIX,
|
|
2397
2398
|
addFormMeta: () => addFormMeta,
|
|
2398
2399
|
capitalizeHeader: () => capitalizeHeader,
|
|
2400
|
+
getHelperTextProps: () => getHelperTextProps,
|
|
2399
2401
|
leftCellShadow: () => leftCellShadow,
|
|
2400
2402
|
prependSelectColumn: () => prependSelectColumn,
|
|
2401
2403
|
removeFormMeta: () => removeFormMeta,
|
|
@@ -3626,12 +3628,6 @@ function getHelperTextProps({
|
|
|
3626
3628
|
helperIcon: null
|
|
3627
3629
|
};
|
|
3628
3630
|
}
|
|
3629
|
-
function stopPropagation2(handler) {
|
|
3630
|
-
return (e) => {
|
|
3631
|
-
e.stopPropagation();
|
|
3632
|
-
handler(e);
|
|
3633
|
-
};
|
|
3634
|
-
}
|
|
3635
3631
|
|
|
3636
3632
|
// src/form-cells/EditableDateCell.tsx
|
|
3637
3633
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
@@ -3913,7 +3909,7 @@ function EditableTextAreaCell(_a) {
|
|
|
3913
3909
|
ref
|
|
3914
3910
|
}, field), getHelperTextProps({ error: errorFromProps != null ? errorFromProps : error }))
|
|
3915
3911
|
),
|
|
3916
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { variant: "ghost_icon", onClick:
|
|
3912
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { variant: "ghost_icon", onClick: stopPropagation(openDialog), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_eds_core_react26.Icon, { data: import_eds_icons9.arrow_up, size: 24, style: { transform: "rotateZ(45deg)" } }) })
|
|
3917
3913
|
]
|
|
3918
3914
|
}
|
|
3919
3915
|
),
|
|
@@ -4073,8 +4069,10 @@ var InlineTextField3 = (0, import_styled_components20.default)(import_eds_core_r
|
|
|
4073
4069
|
StyledStickyCell,
|
|
4074
4070
|
TableHeader,
|
|
4075
4071
|
TypographyCustom,
|
|
4072
|
+
WARNING_PREFIX,
|
|
4076
4073
|
addFormMeta,
|
|
4077
4074
|
capitalizeHeader,
|
|
4075
|
+
getHelperTextProps,
|
|
4078
4076
|
leftCellShadow,
|
|
4079
4077
|
prependSelectColumn,
|
|
4080
4078
|
removeFormMeta,
|
package/dist/index.mjs
CHANGED
|
@@ -3589,12 +3589,6 @@ function getHelperTextProps({
|
|
|
3589
3589
|
helperIcon: null
|
|
3590
3590
|
};
|
|
3591
3591
|
}
|
|
3592
|
-
function stopPropagation2(handler) {
|
|
3593
|
-
return (e) => {
|
|
3594
|
-
e.stopPropagation();
|
|
3595
|
-
handler(e);
|
|
3596
|
-
};
|
|
3597
|
-
}
|
|
3598
3592
|
|
|
3599
3593
|
// src/form-cells/EditableDateCell.tsx
|
|
3600
3594
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
@@ -3876,7 +3870,7 @@ function EditableTextAreaCell(_a) {
|
|
|
3876
3870
|
ref
|
|
3877
3871
|
}, field), getHelperTextProps({ error: errorFromProps != null ? errorFromProps : error }))
|
|
3878
3872
|
),
|
|
3879
|
-
/* @__PURE__ */ jsx27(IconButton, { variant: "ghost_icon", onClick:
|
|
3873
|
+
/* @__PURE__ */ jsx27(IconButton, { variant: "ghost_icon", onClick: stopPropagation(openDialog), children: /* @__PURE__ */ jsx27(Icon8, { data: arrow_up, size: 24, style: { transform: "rotateZ(45deg)" } }) })
|
|
3880
3874
|
]
|
|
3881
3875
|
}
|
|
3882
3876
|
),
|
|
@@ -4035,8 +4029,10 @@ export {
|
|
|
4035
4029
|
StyledStickyCell,
|
|
4036
4030
|
TableHeader,
|
|
4037
4031
|
TypographyCustom,
|
|
4032
|
+
WARNING_PREFIX,
|
|
4038
4033
|
addFormMeta,
|
|
4039
4034
|
capitalizeHeader,
|
|
4035
|
+
getHelperTextProps,
|
|
4040
4036
|
leftCellShadow,
|
|
4041
4037
|
prependSelectColumn,
|
|
4042
4038
|
removeFormMeta,
|