mig-schema-table 3.0.65 → 3.0.67
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/SchemaTable/SchemaTableTh/index.d.ts +0 -1
- package/dist/SchemaTable/SchemaTableTh/index.js +0 -1
- package/dist/SchemaTable/SchemaTableThMenu/index.d.ts +0 -1
- package/dist/SchemaTable/SchemaTableThMenu/index.js +0 -1
- package/dist/SchemaTable/index.js +4 -1
- package/dist/index.css +98 -0
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { oas31 } from "openapi3-ts";
|
|
2
2
|
import React, { CSSProperties, Dispatch, SetStateAction } from "react";
|
|
3
3
|
import { IColumnConfig } from "../../types";
|
|
4
|
-
import "./index.scss";
|
|
5
4
|
import { ISchemaTableThMenuConfig } from "../SchemaTableThMenu";
|
|
6
5
|
export declare enum EColumnFilterStatus {
|
|
7
6
|
UNAVAILABLE = "UNAVAILABLE",
|
|
@@ -3,7 +3,6 @@ import React from "react";
|
|
|
3
3
|
import { t, uncamel } from "../../inc/string";
|
|
4
4
|
import { SELECT_ALL_COLUMN_NAME } from "../constants";
|
|
5
5
|
import { timeZone } from "../../inc/date";
|
|
6
|
-
import "./index.scss";
|
|
7
6
|
export var EColumnFilterStatus;
|
|
8
7
|
(function (EColumnFilterStatus) {
|
|
9
8
|
EColumnFilterStatus["UNAVAILABLE"] = "UNAVAILABLE";
|
|
@@ -2,7 +2,6 @@ import React, { Dispatch, SetStateAction } from "react";
|
|
|
2
2
|
import { oas31 } from "openapi3-ts";
|
|
3
3
|
import { TColumnFilterValue } from "../index";
|
|
4
4
|
import { IColumnConfig } from "../../types";
|
|
5
|
-
import "./index.scss";
|
|
6
5
|
export interface ISchemaTableThMenuConfig {
|
|
7
6
|
referenceElement: HTMLElement;
|
|
8
7
|
propName: string;
|
|
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import FilterMenuComponent from "./FilterMenuComponent";
|
|
4
4
|
import { usePopper } from "react-popper";
|
|
5
|
-
import "./index.scss";
|
|
6
5
|
const SchemaTableThMenu = ({ onChange, onClose, onInputKeyDown, propConfig, propIsRequired, propName, propSchema, referenceElement, setSortAsc, setSortColumn, value, }) => {
|
|
7
6
|
const [menu, setMenu] = React.useState(null);
|
|
8
7
|
const [subMenu, setSubMenu] = React.useState(null);
|
|
@@ -513,7 +513,10 @@ function SchemaTable({ Heading = VariableSizeList, checkedIndexes, config, custo
|
|
|
513
513
|
setSearchQuery("");
|
|
514
514
|
}, [useFilterStateHash]);
|
|
515
515
|
const onSearchBlur = React.useCallback(() => {
|
|
516
|
-
if (useFilterStateHash &&
|
|
516
|
+
if (useFilterStateHash &&
|
|
517
|
+
// prevent hash change for undefined vs empty string compare
|
|
518
|
+
(searchQuery || locationHash.searchQuery) &&
|
|
519
|
+
searchQuery !== locationHash.searchQuery) {
|
|
517
520
|
window.location.hash = serializeLocationHash(Object.assign(Object.assign({}, locationHash), { searchQuery }));
|
|
518
521
|
}
|
|
519
522
|
}, [locationHash, searchQuery, useFilterStateHash]);
|
package/dist/index.css
CHANGED
|
@@ -64,3 +64,101 @@
|
|
|
64
64
|
flex-direction: row;
|
|
65
65
|
padding-bottom: 1rem;
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
.schema-table-th {
|
|
69
|
+
border-right: 1px solid #ddd;
|
|
70
|
+
border-top: 1px solid #ddd;
|
|
71
|
+
border-bottom: 1px solid #ddd;
|
|
72
|
+
color: #666;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
padding-left: 8px;
|
|
76
|
+
padding-right: 8px;
|
|
77
|
+
user-select: none;
|
|
78
|
+
}
|
|
79
|
+
.schema-table-th:first-child {
|
|
80
|
+
border-left: 1px solid #ddd;
|
|
81
|
+
}
|
|
82
|
+
.schema-table-th div {
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
white-space: nowrap;
|
|
85
|
+
text-overflow: ellipsis;
|
|
86
|
+
}
|
|
87
|
+
.schema-table-th--sorted {
|
|
88
|
+
background-color: #eff6fb;
|
|
89
|
+
}
|
|
90
|
+
.schema-table-th--filter-ACTIVE .schema-table-th__label-body-text {
|
|
91
|
+
text-decoration: underline;
|
|
92
|
+
font-style: italic;
|
|
93
|
+
}
|
|
94
|
+
.schema-table-th__label-body {
|
|
95
|
+
display: flex;
|
|
96
|
+
flex: 1;
|
|
97
|
+
font-size: 14px;
|
|
98
|
+
align-items: center;
|
|
99
|
+
}
|
|
100
|
+
.schema-table-th__trigger-el {
|
|
101
|
+
display: none;
|
|
102
|
+
position: absolute;
|
|
103
|
+
border: 1px solid #ddd;
|
|
104
|
+
top: 0;
|
|
105
|
+
right: 0;
|
|
106
|
+
bottom: 0;
|
|
107
|
+
width: 24px;
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
background-color: #eff6fb;
|
|
110
|
+
color: #666;
|
|
111
|
+
font-size: 28px;
|
|
112
|
+
text-align: center;
|
|
113
|
+
padding: 0 0 5px !important;
|
|
114
|
+
}
|
|
115
|
+
.schema-table-th__sort-icon {
|
|
116
|
+
font-size: 24px;
|
|
117
|
+
width: 32px;
|
|
118
|
+
display: block;
|
|
119
|
+
text-align: center;
|
|
120
|
+
}
|
|
121
|
+
.schema-table-th:hover {
|
|
122
|
+
background-color: #eff6fb;
|
|
123
|
+
}
|
|
124
|
+
.schema-table-th:hover .schema-table-th__trigger-el {
|
|
125
|
+
display: block !important;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.schema-table-th-menu {
|
|
129
|
+
background-color: white;
|
|
130
|
+
}
|
|
131
|
+
.schema-table-th-menu label {
|
|
132
|
+
flex: 1;
|
|
133
|
+
}
|
|
134
|
+
.schema-table-th-menu .schema-table-th-menu__sub-menu-indicator {
|
|
135
|
+
padding-left: 8px;
|
|
136
|
+
margin-left: 8px;
|
|
137
|
+
}
|
|
138
|
+
.schema-table-th-menu__icon {
|
|
139
|
+
display: block;
|
|
140
|
+
width: 24px;
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
text-align: center;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.schema-table-th-menu__sub-menu {
|
|
146
|
+
background-color: white;
|
|
147
|
+
border: 1px solid #ddd;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.schema-table-menu {
|
|
151
|
+
font-size: 14px;
|
|
152
|
+
list-style: none outside;
|
|
153
|
+
padding: 0;
|
|
154
|
+
margin: 0;
|
|
155
|
+
}
|
|
156
|
+
.schema-table-menu li {
|
|
157
|
+
display: flex;
|
|
158
|
+
border: 1px solid #ddd;
|
|
159
|
+
align-items: center;
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
}
|
|
162
|
+
.schema-table-menu li:hover {
|
|
163
|
+
background-color: #eff6fb;
|
|
164
|
+
}
|