mig-schema-table 3.0.27 → 3.0.28

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.
@@ -1,17 +1,21 @@
1
+ import { Dispatch, SetStateAction } from "react";
1
2
  import { IColumnConfig } from "../../types";
2
3
  import { oas31 } from "openapi3-ts";
3
4
  import "react-datepicker/dist/react-datepicker.css";
5
+ import { tColumnSearchValue } from "../index";
4
6
  interface IColumnFilterRowProps {
5
7
  columnNames: string[];
6
8
  getWidth: (index: number) => number;
7
9
  config?: {
8
10
  [propName: string]: IColumnConfig<any>;
9
11
  };
10
- columnSearchHandler: (propName: string, value: string | number | boolean) => void;
12
+ columnSearchHandler: (propName: string, value: tColumnSearchValue) => void;
11
13
  value: {
12
- [propName: string]: string | number | boolean;
14
+ [propName: string]: tColumnSearchValue;
13
15
  };
14
16
  schema: oas31.SchemaObject;
17
+ columnFilterDropdown?: string;
18
+ setColumnFilterDropdown?: Dispatch<SetStateAction<string | undefined>>;
15
19
  }
16
- export default function ColumnFilterRow({ columnNames, getWidth, config, value, columnSearchHandler, schema, }: IColumnFilterRowProps): import("react/jsx-runtime").JSX.Element;
20
+ export default function ColumnFilterRow({ columnNames, getWidth, config, value, columnSearchHandler, schema, columnFilterDropdown, setColumnFilterDropdown, }: IColumnFilterRowProps): import("react/jsx-runtime").JSX.Element;
17
21
  export {};
@@ -4,15 +4,15 @@ import { SELECT_ALL_COLUMN_NAME } from "../constants";
4
4
  import DatePicker from "react-datepicker";
5
5
  import nl from "date-fns/locale/nl";
6
6
  import "react-datepicker/dist/react-datepicker.css";
7
- import { localeFormat } from "../../inc/date";
8
7
  import { DEFAULT_DATE_FORMAT, DEFAULT_DATE_TIME_FORMAT, } from "../../inc/constant";
9
- export default function ColumnFilterRow({ columnNames, getWidth, config, value, columnSearchHandler, schema, }) {
8
+ import { getUnixTimeStamp } from "../../inc/date";
9
+ export default function ColumnFilterRow({ columnNames, getWidth, config, value, columnSearchHandler, schema, columnFilterDropdown, setColumnFilterDropdown, }) {
10
10
  const { properties = {} } = schema;
11
11
  const getSelectComponent = React.useCallback((propSchema, propName, value, inputChangeHandler) => {
12
- const enumItems = propSchema.type === "boolean" ? ["true", "false"] : propSchema.enum;
12
+ const enumItems = propSchema.type === "boolean" ? ["", ""] : propSchema.enum;
13
13
  return (_jsxs("select", Object.assign({ value: value, "data-prop-name": propName, onChange: inputChangeHandler }, { children: [_jsx("option", Object.assign({ value: "" }, { children: "All" }), "all"), enumItems.map((name) => (_jsx("option", Object.assign({ value: name }, { children: name }), `column-filter-select-${name}`)))] })));
14
14
  }, []);
15
- const field = React.useCallback((propSchema, propName, propValue, propConfig) => {
15
+ const field = React.useCallback((propSchema, propName, propValue) => {
16
16
  const { type, format, minimum, maximum } = propSchema;
17
17
  const inputChangeHandler = (event) => {
18
18
  columnSearchHandler(propName, event.target.value);
@@ -24,24 +24,68 @@ export default function ColumnFilterRow({ columnNames, getWidth, config, value,
24
24
  return getSelectComponent(propSchema, propName, strValue, inputChangeHandler);
25
25
  }
26
26
  if (format === "date-time" || format === "date") {
27
- const dateFormat = (propConfig === null || propConfig === void 0 ? void 0 : propConfig.dateFormat) ||
28
- (format === "date"
29
- ? DEFAULT_DATE_FORMAT
30
- : DEFAULT_DATE_TIME_FORMAT);
31
- const dateChangeHandler = (date) => {
32
- columnSearchHandler(propName, date ? localeFormat(date, dateFormat) : "");
27
+ const dateFormat = format === "date"
28
+ ? DEFAULT_DATE_FORMAT
29
+ : DEFAULT_DATE_TIME_FORMAT;
30
+ const dateRangeValue = propValue;
31
+ const startDate = (dateRangeValue === null || dateRangeValue === void 0 ? void 0 : dateRangeValue.from)
32
+ ? new Date(dateRangeValue.from)
33
+ : null;
34
+ const endDate = (dateRangeValue === null || dateRangeValue === void 0 ? void 0 : dateRangeValue.to)
35
+ ? new Date(dateRangeValue.to)
36
+ : null;
37
+ const startDateChangeHandler = (date) => {
38
+ if (endDate && date && date > endDate) {
39
+ return;
40
+ }
41
+ columnSearchHandler(propName, Object.assign(Object.assign({}, dateRangeValue), { from: `${date || ""}`, to: `${date && endDate ? dateRangeValue.to : ""}` }));
33
42
  };
34
- return (_jsx(DatePicker, { id: "filter-date", dateFormat: dateFormat, "data-prop-name": propName, showTimeSelect: format === "date-time", locale: nl, selected: propValue ? new Date(propValue) : null, onChange: dateChangeHandler, value: propValue || undefined, placeholderText: dateFormat, isClearable: true }));
43
+ const endDateChangeHandler = (date) => {
44
+ if (startDate &&
45
+ date &&
46
+ getUnixTimeStamp(`${date}`) < getUnixTimeStamp(`${startDate}`)) {
47
+ return;
48
+ }
49
+ columnSearchHandler(propName, Object.assign(Object.assign({}, dateRangeValue), { to: `${date || ""}` }));
50
+ };
51
+ return (_jsx("div", Object.assign({ "data-bs-toggle": "dropdown-menu-item" }, { children: _jsxs("div", Object.assign({ className: "d-flex p-2" }, { children: [_jsxs("div", Object.assign({ className: "d-flex flex-column m-1" }, { children: [_jsx("label", { children: "Start date-time" }), _jsx(DatePicker, { id: "filter-date", dateFormat: dateFormat, "data-prop-name": propName, locale: nl, selected: startDate, onChange: startDateChangeHandler, placeholderText: dateFormat, isClearable: true, selectsStart: true, startDate: startDate, endDate: endDate, showTimeSelect: format === "date-time", timeIntervals: 15, shouldCloseOnSelect: format === "date" })] })), _jsxs("div", Object.assign({ className: "d-flex flex-column m-1" }, { children: [_jsx("label", { children: "End date-time" }), _jsx(DatePicker, { id: "filter-date", dateFormat: dateFormat, "data-prop-name": propName, locale: nl, selectsEnd: true, selected: endDate, onChange: endDateChangeHandler, placeholderText: dateFormat, isClearable: true, startDate: startDate, endDate: endDate, showTimeSelect: format === "date-time", timeIntervals: 15, shouldCloseOnSelect: format === "date" })] }))] })) })));
35
52
  }
36
- return (_jsx("input", { value: strValue, "data-prop-name": propName, onChange: inputChangeHandler, placeholder: `Search ${propName}` }));
53
+ return (_jsx("div", Object.assign({ className: "p-1" }, { children: _jsx("input", { value: strValue, "data-prop-name": propName, onChange: inputChangeHandler, placeholder: `Search ${propName}` }) })));
37
54
  case "integer":
38
- return (_jsx("input", { type: "number", value: strValue, "data-prop-name": propName, onChange: inputChangeHandler, placeholder: `Search ${propName}`, min: minimum, max: maximum }));
55
+ return (_jsx("div", Object.assign({ className: "d-flex p-1" }, { children: _jsx("input", { type: "number", value: strValue, "data-prop-name": propName, onChange: inputChangeHandler, placeholder: `Search ${propName}`, min: minimum, max: maximum }) })));
39
56
  case "boolean":
40
57
  return getSelectComponent(propSchema, propName, strValue, inputChangeHandler);
41
58
  default:
42
59
  return _jsx(_Fragment, {});
43
60
  }
44
61
  }, [columnSearchHandler, getSelectComponent]);
62
+ const removeDropdown = React.useCallback((e) => {
63
+ if (!columnFilterDropdown) {
64
+ return;
65
+ }
66
+ let columnFilterEl = null;
67
+ let parentNode = e.target;
68
+ while (parentNode && parentNode.nodeName !== "HTML") {
69
+ if (typeof parentNode.className === "string" &&
70
+ parentNode.className.includes("schema-table__column-filter")) {
71
+ columnFilterEl = parentNode;
72
+ break;
73
+ }
74
+ parentNode = parentNode.parentNode;
75
+ }
76
+ if (!columnFilterEl) {
77
+ setColumnFilterDropdown && setColumnFilterDropdown(undefined);
78
+ }
79
+ }, [columnFilterDropdown, setColumnFilterDropdown]);
80
+ React.useEffect(() => {
81
+ if (!columnFilterDropdown) {
82
+ return;
83
+ }
84
+ window.addEventListener("click", removeDropdown, { capture: true });
85
+ return () => {
86
+ window.removeEventListener("click", removeDropdown, { capture: true });
87
+ };
88
+ }, [columnFilterDropdown, removeDropdown]);
45
89
  const SchemaColumnFilter = React.useCallback((index) => {
46
90
  const propName = columnNames[index];
47
91
  const propSchema = properties[propName];
@@ -50,8 +94,14 @@ export default function ColumnFilterRow({ columnNames, getWidth, config, value,
50
94
  if (propName === SELECT_ALL_COLUMN_NAME || !(propConfig === null || propConfig === void 0 ? void 0 : propConfig.isFilterable)) {
51
95
  return _jsx("div", { className: "schema-table__th" });
52
96
  }
53
- return (_jsx("div", Object.assign({ className: "schema-table__th" }, { children: field(propSchema, propName, propValue, propConfig) }), `filter-col-${propName}`));
54
- }, [columnNames, config, field, properties, value]);
97
+ return (_jsx("ul", Object.assign({ id: "test", className: `dropdown-menu dropdown-menu-lg-end ${columnFilterDropdown && columnFilterDropdown === propName
98
+ ? "show"
99
+ : ""}`, style: {
100
+ position: "fixed",
101
+ marginTop: -10,
102
+ minHeight: 100,
103
+ } }, { children: _jsx("div", Object.assign({ id: "filter-dropdown-item", style: { margin: 10 } }, { children: field(propSchema, propName, propValue) })) })));
104
+ }, [columnFilterDropdown, columnNames, config, field, properties, value]);
55
105
  return (_jsx("div", Object.assign({ className: "schema-table__th-row", style: { display: "flex", flex: "row" } }, { children: columnNames.map((columnName, index) => {
56
106
  return (_jsx("div", Object.assign({ className: "schema-table__column-filter", style: {
57
107
  width: getWidth(index),
@@ -2,11 +2,7 @@ import React from "react";
2
2
  import { oas31 } from "openapi3-ts";
3
3
  import { TColumnFilterValue } from "../index";
4
4
  export interface ISchemaColumnFilterPopoverConfig {
5
- anchorPoint: {
6
- x: number;
7
- y: number;
8
- };
9
- anchorPosition?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
5
+ referenceElement: HTMLElement;
10
6
  propName: string;
11
7
  }
12
8
  type TSchemaColumnFilterPopoverProps = ISchemaColumnFilterPopoverConfig & {
@@ -15,5 +11,5 @@ type TSchemaColumnFilterPopoverProps = ISchemaColumnFilterPopoverConfig & {
15
11
  value: TColumnFilterValue;
16
12
  onClose: () => void;
17
13
  };
18
- declare const _default: React.MemoExoticComponent<(props: TSchemaColumnFilterPopoverProps) => import("react/jsx-runtime").JSX.Element>;
14
+ declare const _default: React.MemoExoticComponent<({ onChange, onClose, propName, propSchema, referenceElement, value, }: TSchemaColumnFilterPopoverProps) => import("react/jsx-runtime").JSX.Element>;
19
15
  export default _default;
@@ -1,53 +1,37 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import FilterFormComponent from "./FilterFormComponent";
4
- const SchemaColumnFilterPopover = (props) => {
5
- const { anchorPoint, onClose, onChange, propName, propSchema, value } = props;
6
- const [popoverEl, setPopoverEl] = React.useState();
7
- const rect = React.useMemo(() => {
8
- return popoverEl === null || popoverEl === void 0 ? void 0 : popoverEl.getBoundingClientRect();
9
- }, [popoverEl]);
10
- const ref = React.useCallback((el) => {
11
- if (el) {
12
- setPopoverEl(el);
13
- }
14
- }, []);
15
- const style = React.useMemo(() => {
16
- const result = {};
17
- let anchorPosition = props.anchorPosition;
18
- if (!anchorPosition) {
19
- const anchorPositionVertical = anchorPoint.y > window.innerHeight / 2 ? "bottom" : "top";
20
- const anchorPositionHorizontal = anchorPoint.x > window.innerWidth / 2 ? "Right" : "Left";
21
- anchorPosition = `${anchorPositionVertical}${anchorPositionHorizontal}`;
22
- }
23
- switch (anchorPosition) {
24
- case "bottomLeft":
25
- result.left = (anchorPoint === null || anchorPoint === void 0 ? void 0 : anchorPoint.x) || 0;
26
- result.top = rect ? ((anchorPoint === null || anchorPoint === void 0 ? void 0 : anchorPoint.y) || 0) - rect.height : 0;
27
- break;
28
- case "topLeft":
29
- result.left = (anchorPoint === null || anchorPoint === void 0 ? void 0 : anchorPoint.x) || 0;
30
- result.top = (anchorPoint === null || anchorPoint === void 0 ? void 0 : anchorPoint.y) || 0;
31
- break;
32
- case "bottomRight":
33
- result.left = rect ? ((anchorPoint === null || anchorPoint === void 0 ? void 0 : anchorPoint.x) || 0) - rect.width : 0;
34
- result.top = rect ? ((anchorPoint === null || anchorPoint === void 0 ? void 0 : anchorPoint.y) || 0) - rect.height : 0;
35
- break;
36
- case "topRight":
37
- default:
38
- result.left = rect ? ((anchorPoint === null || anchorPoint === void 0 ? void 0 : anchorPoint.x) || 0) - rect.width : 0;
39
- result.top = anchorPoint === null || anchorPoint === void 0 ? void 0 : anchorPoint.y;
40
- break;
41
- }
42
- result.maxHeight = window.innerHeight - result.top - 10;
43
- return result;
44
- }, [anchorPoint.x, anchorPoint.y, props.anchorPosition, rect]);
45
- const lightboxRef = React.useRef(null);
46
- const onLightboxClick = React.useCallback((e) => {
47
- if (e.target === lightboxRef.current) {
4
+ import { usePopper } from "react-popper";
5
+ const SchemaColumnFilterPopover = ({ onChange, onClose, propName, propSchema, referenceElement, value, }) => {
6
+ const [popperElement, setPopperElement] = React.useState(null);
7
+ const [arrowElement, setArrowElement] = React.useState(null);
8
+ const { styles, attributes } = usePopper(referenceElement, popperElement, {
9
+ modifiers: [{ name: "arrow", options: { element: arrowElement } }],
10
+ });
11
+ React.useEffect(() => {
12
+ const onWindowClick = (e) => {
13
+ if (!popperElement) {
14
+ return;
15
+ }
16
+ let parent = e.target;
17
+ while (parent && popperElement) {
18
+ if (parent === popperElement) {
19
+ return;
20
+ }
21
+ parent =
22
+ parent.parentNode === window.document ? null : parent.parentNode;
23
+ }
48
24
  onClose();
49
- }
50
- }, [onClose]);
51
- return (_jsx("div", Object.assign({ className: `lightbox lightbox--transparent schema-column-filter-popover schema-column-filter-popover__${propSchema.type}${propSchema.format ? `_${propSchema.format}` : ""}`, onClick: onLightboxClick, onContextMenu: onClose, ref: lightboxRef }, { children: _jsx("div", Object.assign({ className: "popover", ref: ref, style: style }, { children: _jsx(FilterFormComponent, { onChange: onChange, propSchema: propSchema, propName: propName, columnFilterValue: value }) })) })));
25
+ };
26
+ window.addEventListener("click", onWindowClick, { capture: true });
27
+ return () => {
28
+ window.removeEventListener("click", onWindowClick, { capture: true });
29
+ };
30
+ }, [onClose, popperElement]);
31
+ const classNames = ["popover"];
32
+ if (attributes.popper) {
33
+ classNames.push(`bs-popover-${attributes.popper["data-popper-placement"]}`);
34
+ }
35
+ return (_jsxs("div", Object.assign({ className: classNames.join(" "), role: "tooltip", ref: setPopperElement, style: styles.popper }, attributes.popper, { children: [_jsx("div", { className: "popover-arrow", ref: setArrowElement, style: styles.arrow }), _jsx("div", Object.assign({ className: "popover-body" }, { children: _jsx(FilterFormComponent, { onChange: onChange, propSchema: propSchema, propName: propName, columnFilterValue: value }) }))] })));
52
36
  };
53
37
  export default React.memo(SchemaColumnFilterPopover);
@@ -36,21 +36,13 @@ const Th = ({ isAllChecked, columnFilterStatus, disableColumnFilter, isSortable,
36
36
  if (!setPopoverConfig) {
37
37
  return;
38
38
  }
39
- const rect = e.currentTarget.getBoundingClientRect();
39
+ const referenceElement = e.currentTarget;
40
40
  setPopoverConfig((popoverConfig) => {
41
41
  if (popoverConfig) {
42
42
  return undefined;
43
43
  }
44
44
  return {
45
- anchorPoint: rect
46
- ? {
47
- x: Math.round(rect.x + rect.width),
48
- y: Math.round(rect.y + rect.height),
49
- }
50
- : {
51
- x: e.clientX,
52
- y: e.clientY,
53
- },
45
+ referenceElement,
54
46
  propName,
55
47
  };
56
48
  });
@@ -324,6 +324,6 @@ function SchemaTable({ Heading = VariableSizeList, checkedIndexes, config, custo
324
324
  }
325
325
  setColumnFilterMap((columnFilterMap) => (Object.assign(Object.assign({}, columnFilterMap), { [popoverConfig.propName]: newColumnFilterValue })));
326
326
  }, [disableColumnFilter, popoverConfig]);
327
- return (_jsxs("div", Object.assign({ className: `schema-table${onRowClick ? " schema-table--clickable-rows" : ""}`, style: Object.assign(Object.assign({}, style), { width: rowWidth }), role: "table" }, { children: [_jsxs("div", Object.assign({ className: "schema-table__action-container" }, { children: [_jsx("div", Object.assign({ style: { flex: 1 } }, { children: isSearchable ? (_jsx("input", { type: "text", placeholder: searchPlaceholder || "Search...", value: searchQuery, onChange: onSearchChange, autoFocus: true })) : null })), customElement] })), _jsx(Heading, Object.assign({ height: 50, itemCount: columnCount, itemSize: getColumnWidth, layout: "horizontal", width: rowWidth, sortAsc: sortAsc, setSortAsc: setSortAsc, setSortColumn: setSortColumn, sortColumn: sortColumn, sortedRenderData: sortedRenderData, className: "schema-table__th-row" }, { children: SchemaTableTh }), `thead_${rowWidth}_${sortColumn}_${sortAsc}_${searchQuery}`), _jsx(VariableSizeGrid, Object.assign({ className: "schema-table__tbody", height: tableBodyHeight, width: rowWidth, columnWidth: getColumnWidth, rowHeight: getRowHeight, columnCount: columnCount, rowCount: rowCount }, { children: SchemaTableTd }), `tbody_${tableBodyHeight}_${rowWidth}_${sortColumn}_${sortAsc}_${searchQuery}_${columnCount}`), popoverConfig ? (_jsx(SchemaColumnFilterPopover, { anchorPoint: popoverConfig.anchorPoint, anchorPosition: popoverConfig.anchorPosition, onClose: onPopoverClose, onChange: onSchemaColumnFilterChange, propName: popoverConfig.propName, propSchema: schema.properties[popoverConfig.propName], value: columnFilterMap[popoverConfig.propName] })) : null] })));
327
+ return (_jsxs("div", Object.assign({ className: `schema-table${onRowClick ? " schema-table--clickable-rows" : ""}`, style: Object.assign(Object.assign({}, style), { width: rowWidth }), role: "table" }, { children: [_jsxs("div", Object.assign({ className: "schema-table__action-container" }, { children: [_jsx("div", Object.assign({ style: { flex: 1 } }, { children: isSearchable ? (_jsx("input", { type: "text", placeholder: searchPlaceholder || "Search...", value: searchQuery, onChange: onSearchChange, autoFocus: true })) : null })), customElement] })), _jsx(Heading, Object.assign({ height: 50, itemCount: columnCount, itemSize: getColumnWidth, layout: "horizontal", width: rowWidth, sortAsc: sortAsc, setSortAsc: setSortAsc, setSortColumn: setSortColumn, sortColumn: sortColumn, sortedRenderData: sortedRenderData, className: "schema-table__th-row" }, { children: SchemaTableTh }), `thead_${rowWidth}_${sortColumn}_${sortAsc}_${searchQuery}`), _jsx(VariableSizeGrid, Object.assign({ className: "schema-table__tbody", height: tableBodyHeight, width: rowWidth, columnWidth: getColumnWidth, rowHeight: getRowHeight, columnCount: columnCount, rowCount: rowCount }, { children: SchemaTableTd }), `tbody_${tableBodyHeight}_${rowWidth}_${sortColumn}_${sortAsc}_${searchQuery}_${columnCount}`), popoverConfig ? (_jsx(SchemaColumnFilterPopover, { referenceElement: popoverConfig.referenceElement, onClose: onPopoverClose, onChange: onSchemaColumnFilterChange, propName: popoverConfig.propName, propSchema: schema.properties[popoverConfig.propName], value: columnFilterMap[popoverConfig.propName] })) : null] })));
328
328
  }
329
329
  export default React.memo(SchemaTable);
package/dist/index.css CHANGED
@@ -2,9 +2,6 @@
2
2
  display: flex;
3
3
  }
4
4
 
5
- .schema-table {
6
- overflow: hidden;
7
- }
8
5
  .schema-table__tbody {
9
6
  overflow-x: hidden !important;
10
7
  border-collapse: collapse;
@@ -31,51 +28,6 @@
31
28
  .schema-table__column-filter .react-datepicker {
32
29
  display: flex;
33
30
  }
34
- .schema-table__column-filter .column-filter-dropdown {
35
- --bs-dropdown-zindex: 1000;
36
- --bs-dropdown-min-width: 10rem;
37
- --bs-dropdown-padding-x: 0;
38
- --bs-dropdown-padding-y: 0.5rem;
39
- --bs-dropdown-spacer: 0.125rem;
40
- --bs-dropdown-font-size: 1rem;
41
- --bs-dropdown-color: #212529;
42
- --bs-dropdown-bg: #fff;
43
- --bs-dropdown-border-color: rgba(0, 0, 0, 0.175);
44
- --bs-dropdown-border-radius: 0.375rem;
45
- --bs-dropdown-border-width: 1px;
46
- --bs-dropdown-inner-border-radius: calc(0.375rem - 1px);
47
- --bs-dropdown-divider-bg: rgba(0, 0, 0, 0.175);
48
- --bs-dropdown-divider-margin-y: 0.5rem;
49
- --bs-dropdown-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
50
- --bs-dropdown-link-color: #212529;
51
- --bs-dropdown-link-hover-color: #1e2125;
52
- --bs-dropdown-link-hover-bg: #e9ecef;
53
- --bs-dropdown-link-active-color: #fff;
54
- --bs-dropdown-link-active-bg: #0d6efd;
55
- --bs-dropdown-link-disabled-color: #adb5bd;
56
- --bs-dropdown-item-padding-x: 1rem;
57
- --bs-dropdown-item-padding-y: 0.25rem;
58
- --bs-dropdown-header-color: #6c757d;
59
- --bs-dropdown-header-padding-x: 1rem;
60
- --bs-dropdown-header-padding-y: 0.5rem;
61
- position: absolute;
62
- z-index: var(--bs-dropdown-zindex);
63
- display: none;
64
- min-width: var(--bs-dropdown-min-width);
65
- padding: var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);
66
- margin: 0;
67
- font-size: var(--bs-dropdown-font-size);
68
- color: var(--bs-dropdown-color);
69
- text-align: left;
70
- list-style: none;
71
- background-color: var(--bs-dropdown-bg);
72
- background-clip: padding-box;
73
- border: var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);
74
- border-radius: var(--bs-dropdown-border-radius);
75
- }
76
- .schema-table__column-filter .column-filter-dropdown--show {
77
- display: block;
78
- }
79
31
  .schema-table__th {
80
32
  background-color: #eee;
81
33
  align-items: center;
@@ -136,32 +88,3 @@
136
88
  border-radius: 8px;
137
89
  padding: 4px 10px;
138
90
  }
139
- .schema-table .schema-column-filter-popover__string_date-time .popover {
140
- width: 500px;
141
- max-width: initial;
142
- }
143
- .schema-table .lightbox {
144
- position: fixed;
145
- top: 0;
146
- bottom: 0;
147
- right: 0;
148
- left: 0;
149
- background-color: rgba(0, 0, 0, 0.5);
150
- z-index: 1;
151
- }
152
- .schema-table .lightbox--transparent {
153
- background-color: transparent;
154
- }
155
- .schema-table .popover {
156
- position: fixed;
157
- border-radius: 2px;
158
- background: #ddd;
159
- box-shadow: 0 2px 10px #999999;
160
- z-index: 1;
161
- padding: 10px;
162
- min-width: 150px;
163
- }
164
- .schema-table .popover select,
165
- .schema-table .popover input {
166
- width: 100%;
167
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mig-schema-table",
3
- "version": "3.0.27",
3
+ "version": "3.0.28",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/"
@@ -19,6 +19,7 @@
19
19
  "react": "^18.2.0",
20
20
  "react-datepicker": "^4.14.0",
21
21
  "react-dom": "^18.2.0",
22
+ "react-popper": "^2.3.0",
22
23
  "react-scripts": "5.0.1",
23
24
  "react-window": "^1.8.9"
24
25
  },
@@ -47,11 +48,11 @@
47
48
  ]
48
49
  },
49
50
  "devDependencies": {
51
+ "@testing-library/jest-dom": "^5.16.5",
52
+ "@testing-library/react": "^13.4.0",
50
53
  "@types/date-fns": "^2.6.0",
51
54
  "@types/lodash": "^4.14.194",
52
55
  "@types/react-window": "^1.8.5",
53
- "@testing-library/jest-dom": "^5.16.5",
54
- "@testing-library/react": "^13.4.0",
55
56
  "axios": "^1.4.0",
56
57
  "prettier": "^2.8.8",
57
58
  "react-router-dom": "^6.11.2",