@equinor/apollo-components 3.1.4 → 3.1.5
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 +58 -2
- package/dist/index.js +5914 -14
- package/dist/index.mjs +5913 -6
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ interface PopoverCellProps {
|
|
|
50
50
|
value: string;
|
|
51
51
|
title?: string | JSX.Element | ReactNode;
|
|
52
52
|
}
|
|
53
|
-
declare
|
|
53
|
+
declare function PopoverCell(props: PopoverCellProps): JSX.Element;
|
|
54
54
|
|
|
55
55
|
interface ColumnSelectProps<T> {
|
|
56
56
|
table: Table<T>;
|
|
@@ -192,6 +192,7 @@ declare const StickyHeaderCell: styled_components.StyledComponent<react.ForwardR
|
|
|
192
192
|
|
|
193
193
|
declare type TypographyProps = {
|
|
194
194
|
truncate?: boolean;
|
|
195
|
+
enableShowAllOnHover?: boolean;
|
|
195
196
|
} & TypographyProps$1;
|
|
196
197
|
declare const TypographyCustom: (props: TypographyProps) => JSX.Element;
|
|
197
198
|
|
|
@@ -205,4 +206,59 @@ declare function stringToHslColor(str: string, s?: number, l?: number): string;
|
|
|
205
206
|
/** Wrap an event handler and stop event propagation */
|
|
206
207
|
declare function stopPropagation<T extends HTMLElement>(handler: (e: SyntheticEvent<T>) => void): (e: SyntheticEvent<T>) => void;
|
|
207
208
|
|
|
208
|
-
|
|
209
|
+
declare type FormMeta = {
|
|
210
|
+
_isNew?: boolean;
|
|
211
|
+
_editMode?: boolean;
|
|
212
|
+
_hasRemoteChange?: boolean;
|
|
213
|
+
};
|
|
214
|
+
declare type WithoutFormMeta<T extends FormMeta> = Omit<T, keyof FormMeta>;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Subscribes to the `_editMode` field in a `react-hook-form` context.
|
|
218
|
+
*
|
|
219
|
+
* @returns edit mode value
|
|
220
|
+
*/
|
|
221
|
+
declare function useEditMode(): boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Subscribes to the `_hasRemoteChange` field in a `react-hook-form` context.
|
|
224
|
+
*
|
|
225
|
+
* @returns edit mode value
|
|
226
|
+
*/
|
|
227
|
+
declare function useHasRemoteChange(): boolean;
|
|
228
|
+
/**
|
|
229
|
+
* @returns function getting is new meta
|
|
230
|
+
*/
|
|
231
|
+
declare function useGetIsNew(): () => boolean;
|
|
232
|
+
declare function useSetFormMeta<T extends FormMeta>(): (newValues: Partial<T>) => void;
|
|
233
|
+
declare function removeFormMeta<T extends FormMeta>(withFormMeta: T): Omit<T, keyof FormMeta>;
|
|
234
|
+
declare function addFormMeta<T>(withoutFormMeta: T): T & FormMeta;
|
|
235
|
+
|
|
236
|
+
declare function EditableCheckboxCell<T extends FormMeta>(context: CellContext<T, boolean>): JSX.Element;
|
|
237
|
+
|
|
238
|
+
interface EditableDateCellProps<T extends FormMeta> extends CellContext<T, unknown> {
|
|
239
|
+
dateStringFormatter?: (date: string) => string;
|
|
240
|
+
}
|
|
241
|
+
declare function EditableDateCell<T extends FormMeta>(props: EditableDateCellProps<T>): JSX.Element;
|
|
242
|
+
|
|
243
|
+
interface Option {
|
|
244
|
+
label: string;
|
|
245
|
+
value: string;
|
|
246
|
+
}
|
|
247
|
+
interface EditableDropdownSingleCellProps<T extends FormMeta> extends CellContext<T, unknown> {
|
|
248
|
+
/**
|
|
249
|
+
* `Option.value` is used internally to get and update selection state. `Option.label` is *only* for visual purposes.
|
|
250
|
+
*/
|
|
251
|
+
options: Option[];
|
|
252
|
+
}
|
|
253
|
+
declare function EditableDropdownSingleCell<T extends FormMeta>(props: EditableDropdownSingleCellProps<T>): JSX.Element;
|
|
254
|
+
|
|
255
|
+
declare function EditableNumberCell<T extends FormMeta>(context: CellContext<T, number>): JSX.Element;
|
|
256
|
+
|
|
257
|
+
interface EdtiableTextAreaProps<T extends FormMeta> extends CellContext<T, string> {
|
|
258
|
+
title: string;
|
|
259
|
+
}
|
|
260
|
+
declare function EditableTextAreaCell<T extends FormMeta>(props: EdtiableTextAreaProps<T>): JSX.Element;
|
|
261
|
+
|
|
262
|
+
declare function EditableTextFieldCell<T extends FormMeta>(context: CellContext<T, unknown>): JSX.Element;
|
|
263
|
+
|
|
264
|
+
export { AppShell, AppSidebar, CellConfig, ChipsCell, ColumnSelect, DataTable, DataTableProps, DynamicCell, EditableCheckboxCell, EditableDateCell, EditableDateCellProps, EditableDropdownSingleCell, EditableDropdownSingleCellProps, EditableNumberCell, EditableTextAreaCell, EditableTextFieldCell, FormMeta, HTMLPropsRef, HeaderCell, HierarchyCell, InfiniteScrollConfig, Option, PopoverCell, RowConfig, RowSelectionMode, SelectColumnDef, SortConfig, StickyCell, StickyHeaderCell, StyledStickyCell, TableHeader, TableLayout, TableRowWrapper, TableRowWrapperProps, TruncateMode, TypographyCustom, TypographyProps, WithoutFormMeta, addFormMeta, capitalizeHeader, leftCellShadow, prependSelectColumn, removeFormMeta, stopPropagation, stringToHslColor, useEditMode, useGetIsNew, useHasRemoteChange, useSetFormMeta };
|