@performant-software/semantic-components 1.1.6-beta.1 → 1.1.6
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/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/main.css +5 -382
- package/package.json +2 -2
- package/src/components/DataTableColumnSelector.js +42 -38
- package/src/components/FacetSlider.css +2 -0
- package/src/components/FacetSlider.js +0 -4
- package/src/components/ItemsToggle.js +4 -6
- package/src/components/LazyDocument.css +6 -0
- package/src/components/LazyDocument.js +2 -20
- package/src/components/List.js +14 -4
- package/src/components/VideoFrameSelector.js +2 -2
- package/types/components/DataTableColumnSelector.js.flow +42 -38
- package/types/components/FacetSlider.js.flow +0 -4
- package/types/components/ItemsToggle.js.flow +4 -6
- package/types/components/LazyDocument.js.flow +2 -20
- package/types/components/List.js.flow +14 -4
- package/types/components/VideoFrameSelector.js.flow +2 -2
- package/webpack.config.js +4 -0
- package/src/components/AnnotationLayer.css +0 -329
- package/src/components/TextLayer.css +0 -110
- package/src/components/rc-slider.css +0 -267
package/build/main.css
CHANGED
|
@@ -976,388 +976,6 @@ div.react-calendar {
|
|
|
976
976
|
text-align: center;
|
|
977
977
|
}
|
|
978
978
|
|
|
979
|
-
/* Copyright 2014 Mozilla Foundation
|
|
980
|
-
*
|
|
981
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
982
|
-
* you may not use this file except in compliance with the License.
|
|
983
|
-
* You may obtain a copy of the License at
|
|
984
|
-
*
|
|
985
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
986
|
-
*
|
|
987
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
988
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
989
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
990
|
-
* See the License for the specific language governing permissions and
|
|
991
|
-
* limitations under the License.
|
|
992
|
-
*/
|
|
993
|
-
:root {
|
|
994
|
-
--react-pdf-annotation-layer: 1;
|
|
995
|
-
--annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");
|
|
996
|
-
--input-focus-border-color: Highlight;
|
|
997
|
-
--input-focus-outline: 1px solid Canvas;
|
|
998
|
-
--input-unfocused-border-color: transparent;
|
|
999
|
-
--input-disabled-border-color: transparent;
|
|
1000
|
-
--input-hover-border-color: black;
|
|
1001
|
-
--link-outline: none;
|
|
1002
|
-
}
|
|
1003
|
-
@media screen and (forced-colors: active) {
|
|
1004
|
-
:root {
|
|
1005
|
-
--input-focus-border-color: CanvasText;
|
|
1006
|
-
--input-unfocused-border-color: ActiveText;
|
|
1007
|
-
--input-disabled-border-color: GrayText;
|
|
1008
|
-
--input-hover-border-color: Highlight;
|
|
1009
|
-
--link-outline: 1.5px solid LinkText;
|
|
1010
|
-
}
|
|
1011
|
-
.annotationLayer .textWidgetAnnotation :is(input, textarea):required,
|
|
1012
|
-
.annotationLayer .choiceWidgetAnnotation select:required,
|
|
1013
|
-
.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required {
|
|
1014
|
-
outline: 1.5px solid selectedItem;
|
|
1015
|
-
}
|
|
1016
|
-
.annotationLayer .linkAnnotation:hover {
|
|
1017
|
-
backdrop-filter: invert(100%);
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
.annotationLayer {
|
|
1021
|
-
position: absolute;
|
|
1022
|
-
top: 0;
|
|
1023
|
-
left: 0;
|
|
1024
|
-
pointer-events: none;
|
|
1025
|
-
transform-origin: 0 0;
|
|
1026
|
-
z-index: 3;
|
|
1027
|
-
}
|
|
1028
|
-
.annotationLayer[data-main-rotation='90'] .norotate {
|
|
1029
|
-
transform: rotate(270deg) translateX(-100%);
|
|
1030
|
-
}
|
|
1031
|
-
.annotationLayer[data-main-rotation='180'] .norotate {
|
|
1032
|
-
transform: rotate(180deg) translate(-100%, -100%);
|
|
1033
|
-
}
|
|
1034
|
-
.annotationLayer[data-main-rotation='270'] .norotate {
|
|
1035
|
-
transform: rotate(90deg) translateY(-100%);
|
|
1036
|
-
}
|
|
1037
|
-
.annotationLayer canvas {
|
|
1038
|
-
position: absolute;
|
|
1039
|
-
width: 100%;
|
|
1040
|
-
height: 100%;
|
|
1041
|
-
}
|
|
1042
|
-
.annotationLayer section {
|
|
1043
|
-
position: absolute;
|
|
1044
|
-
text-align: initial;
|
|
1045
|
-
pointer-events: auto;
|
|
1046
|
-
box-sizing: border-box;
|
|
1047
|
-
margin: 0;
|
|
1048
|
-
transform-origin: 0 0;
|
|
1049
|
-
}
|
|
1050
|
-
.annotationLayer .linkAnnotation {
|
|
1051
|
-
outline: var(--link-outline);
|
|
1052
|
-
}
|
|
1053
|
-
.annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a {
|
|
1054
|
-
position: absolute;
|
|
1055
|
-
font-size: 1em;
|
|
1056
|
-
top: 0;
|
|
1057
|
-
left: 0;
|
|
1058
|
-
width: 100%;
|
|
1059
|
-
height: 100%;
|
|
1060
|
-
}
|
|
1061
|
-
.annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a:hover {
|
|
1062
|
-
opacity: 0.2;
|
|
1063
|
-
background: #ffff00;
|
|
1064
|
-
box-shadow: 0 2px 10px #ffff00;
|
|
1065
|
-
}
|
|
1066
|
-
.annotationLayer .textAnnotation img {
|
|
1067
|
-
position: absolute;
|
|
1068
|
-
cursor: pointer;
|
|
1069
|
-
width: 100%;
|
|
1070
|
-
height: 100%;
|
|
1071
|
-
top: 0;
|
|
1072
|
-
left: 0;
|
|
1073
|
-
}
|
|
1074
|
-
.annotationLayer .textWidgetAnnotation :is(input, textarea),
|
|
1075
|
-
.annotationLayer .choiceWidgetAnnotation select,
|
|
1076
|
-
.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input {
|
|
1077
|
-
background-image: var(--annotation-unfocused-field-background);
|
|
1078
|
-
border: 2px solid var(--input-unfocused-border-color);
|
|
1079
|
-
box-sizing: border-box;
|
|
1080
|
-
font: calc(9px * var(--scale-factor)) sans-serif;
|
|
1081
|
-
height: 100%;
|
|
1082
|
-
margin: 0;
|
|
1083
|
-
vertical-align: top;
|
|
1084
|
-
width: 100%;
|
|
1085
|
-
}
|
|
1086
|
-
.annotationLayer .textWidgetAnnotation :is(input, textarea):required,
|
|
1087
|
-
.annotationLayer .choiceWidgetAnnotation select:required,
|
|
1088
|
-
.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required {
|
|
1089
|
-
outline: 1.5px solid red;
|
|
1090
|
-
}
|
|
1091
|
-
.annotationLayer .choiceWidgetAnnotation select option {
|
|
1092
|
-
padding: 0;
|
|
1093
|
-
}
|
|
1094
|
-
.annotationLayer .buttonWidgetAnnotation.radioButton input {
|
|
1095
|
-
border-radius: 50%;
|
|
1096
|
-
}
|
|
1097
|
-
.annotationLayer .textWidgetAnnotation textarea {
|
|
1098
|
-
resize: none;
|
|
1099
|
-
}
|
|
1100
|
-
.annotationLayer .textWidgetAnnotation :is(input, textarea)[disabled],
|
|
1101
|
-
.annotationLayer .choiceWidgetAnnotation select[disabled],
|
|
1102
|
-
.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input[disabled] {
|
|
1103
|
-
background: none;
|
|
1104
|
-
border: 2px solid var(--input-disabled-border-color);
|
|
1105
|
-
cursor: not-allowed;
|
|
1106
|
-
}
|
|
1107
|
-
.annotationLayer .textWidgetAnnotation :is(input, textarea):hover,
|
|
1108
|
-
.annotationLayer .choiceWidgetAnnotation select:hover,
|
|
1109
|
-
.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:hover {
|
|
1110
|
-
border: 2px solid var(--input-hover-border-color);
|
|
1111
|
-
}
|
|
1112
|
-
.annotationLayer .textWidgetAnnotation :is(input, textarea):hover,
|
|
1113
|
-
.annotationLayer .choiceWidgetAnnotation select:hover,
|
|
1114
|
-
.annotationLayer .buttonWidgetAnnotation.checkBox input:hover {
|
|
1115
|
-
border-radius: 2px;
|
|
1116
|
-
}
|
|
1117
|
-
.annotationLayer .textWidgetAnnotation :is(input, textarea):focus,
|
|
1118
|
-
.annotationLayer .choiceWidgetAnnotation select:focus {
|
|
1119
|
-
background: none;
|
|
1120
|
-
border: 2px solid var(--input-focus-border-color);
|
|
1121
|
-
border-radius: 2px;
|
|
1122
|
-
outline: var(--input-focus-outline);
|
|
1123
|
-
}
|
|
1124
|
-
.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) :focus {
|
|
1125
|
-
background-image: none;
|
|
1126
|
-
background-color: transparent;
|
|
1127
|
-
}
|
|
1128
|
-
.annotationLayer .buttonWidgetAnnotation.checkBox :focus {
|
|
1129
|
-
border: 2px solid var(--input-focus-border-color);
|
|
1130
|
-
border-radius: 2px;
|
|
1131
|
-
outline: var(--input-focus-outline);
|
|
1132
|
-
}
|
|
1133
|
-
.annotationLayer .buttonWidgetAnnotation.radioButton :focus {
|
|
1134
|
-
border: 2px solid var(--input-focus-border-color);
|
|
1135
|
-
outline: var(--input-focus-outline);
|
|
1136
|
-
}
|
|
1137
|
-
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,
|
|
1138
|
-
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after,
|
|
1139
|
-
.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before {
|
|
1140
|
-
background-color: CanvasText;
|
|
1141
|
-
content: '';
|
|
1142
|
-
display: block;
|
|
1143
|
-
position: absolute;
|
|
1144
|
-
}
|
|
1145
|
-
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,
|
|
1146
|
-
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after {
|
|
1147
|
-
height: 80%;
|
|
1148
|
-
left: 45%;
|
|
1149
|
-
width: 1px;
|
|
1150
|
-
}
|
|
1151
|
-
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before {
|
|
1152
|
-
transform: rotate(45deg);
|
|
1153
|
-
}
|
|
1154
|
-
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after {
|
|
1155
|
-
transform: rotate(-45deg);
|
|
1156
|
-
}
|
|
1157
|
-
.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before {
|
|
1158
|
-
border-radius: 50%;
|
|
1159
|
-
height: 50%;
|
|
1160
|
-
left: 30%;
|
|
1161
|
-
top: 20%;
|
|
1162
|
-
width: 50%;
|
|
1163
|
-
}
|
|
1164
|
-
.annotationLayer .textWidgetAnnotation input.comb {
|
|
1165
|
-
font-family: monospace;
|
|
1166
|
-
padding-left: 2px;
|
|
1167
|
-
padding-right: 0;
|
|
1168
|
-
}
|
|
1169
|
-
.annotationLayer .textWidgetAnnotation input.comb:focus {
|
|
1170
|
-
/*
|
|
1171
|
-
* Letter spacing is placed on the right side of each character. Hence, the
|
|
1172
|
-
* letter spacing of the last character may be placed outside the visible
|
|
1173
|
-
* area, causing horizontal scrolling. We avoid this by extending the width
|
|
1174
|
-
* when the element has focus and revert this when it loses focus.
|
|
1175
|
-
*/
|
|
1176
|
-
width: 103%;
|
|
1177
|
-
}
|
|
1178
|
-
.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input {
|
|
1179
|
-
appearance: none;
|
|
1180
|
-
}
|
|
1181
|
-
.annotationLayer .popupTriggerArea {
|
|
1182
|
-
height: 100%;
|
|
1183
|
-
width: 100%;
|
|
1184
|
-
}
|
|
1185
|
-
.annotationLayer .fileAttachmentAnnotation .popupTriggerArea {
|
|
1186
|
-
position: absolute;
|
|
1187
|
-
}
|
|
1188
|
-
.annotationLayer .popupWrapper {
|
|
1189
|
-
position: absolute;
|
|
1190
|
-
font-size: calc(9px * var(--scale-factor));
|
|
1191
|
-
width: 100%;
|
|
1192
|
-
min-width: calc(180px * var(--scale-factor));
|
|
1193
|
-
pointer-events: none;
|
|
1194
|
-
}
|
|
1195
|
-
.annotationLayer .popup {
|
|
1196
|
-
position: absolute;
|
|
1197
|
-
max-width: calc(180px * var(--scale-factor));
|
|
1198
|
-
background-color: #ffff99;
|
|
1199
|
-
box-shadow: 0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) #888888;
|
|
1200
|
-
border-radius: calc(2px * var(--scale-factor));
|
|
1201
|
-
padding: calc(6px * var(--scale-factor));
|
|
1202
|
-
margin-left: calc(5px * var(--scale-factor));
|
|
1203
|
-
cursor: pointer;
|
|
1204
|
-
font: message-box;
|
|
1205
|
-
white-space: normal;
|
|
1206
|
-
word-wrap: break-word;
|
|
1207
|
-
pointer-events: auto;
|
|
1208
|
-
}
|
|
1209
|
-
.annotationLayer .popup > * {
|
|
1210
|
-
font-size: calc(9px * var(--scale-factor));
|
|
1211
|
-
}
|
|
1212
|
-
.annotationLayer .popup h1 {
|
|
1213
|
-
display: inline-block;
|
|
1214
|
-
}
|
|
1215
|
-
.annotationLayer .popupDate {
|
|
1216
|
-
display: inline-block;
|
|
1217
|
-
margin-left: calc(5px * var(--scale-factor));
|
|
1218
|
-
}
|
|
1219
|
-
.annotationLayer .popupContent {
|
|
1220
|
-
border-top: 1px solid #333333;
|
|
1221
|
-
margin-top: calc(2px * var(--scale-factor));
|
|
1222
|
-
padding-top: calc(2px * var(--scale-factor));
|
|
1223
|
-
}
|
|
1224
|
-
.annotationLayer .richText > * {
|
|
1225
|
-
white-space: pre-wrap;
|
|
1226
|
-
font-size: calc(9px * var(--scale-factor));
|
|
1227
|
-
}
|
|
1228
|
-
.annotationLayer .highlightAnnotation,
|
|
1229
|
-
.annotationLayer .underlineAnnotation,
|
|
1230
|
-
.annotationLayer .squigglyAnnotation,
|
|
1231
|
-
.annotationLayer .strikeoutAnnotation,
|
|
1232
|
-
.annotationLayer .freeTextAnnotation,
|
|
1233
|
-
.annotationLayer .lineAnnotation svg line,
|
|
1234
|
-
.annotationLayer .squareAnnotation svg rect,
|
|
1235
|
-
.annotationLayer .circleAnnotation svg ellipse,
|
|
1236
|
-
.annotationLayer .polylineAnnotation svg polyline,
|
|
1237
|
-
.annotationLayer .polygonAnnotation svg polygon,
|
|
1238
|
-
.annotationLayer .caretAnnotation,
|
|
1239
|
-
.annotationLayer .inkAnnotation svg polyline,
|
|
1240
|
-
.annotationLayer .stampAnnotation,
|
|
1241
|
-
.annotationLayer .fileAttachmentAnnotation {
|
|
1242
|
-
cursor: pointer;
|
|
1243
|
-
}
|
|
1244
|
-
.annotationLayer section svg {
|
|
1245
|
-
position: absolute;
|
|
1246
|
-
width: 100%;
|
|
1247
|
-
height: 100%;
|
|
1248
|
-
top: 0;
|
|
1249
|
-
left: 0;
|
|
1250
|
-
}
|
|
1251
|
-
.annotationLayer .annotationTextContent {
|
|
1252
|
-
position: absolute;
|
|
1253
|
-
width: 100%;
|
|
1254
|
-
height: 100%;
|
|
1255
|
-
opacity: 0;
|
|
1256
|
-
color: transparent;
|
|
1257
|
-
user-select: none;
|
|
1258
|
-
pointer-events: none;
|
|
1259
|
-
}
|
|
1260
|
-
.annotationLayer .annotationTextContent span {
|
|
1261
|
-
width: 100%;
|
|
1262
|
-
display: inline-block;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
/* Copyright 2014 Mozilla Foundation
|
|
1266
|
-
*
|
|
1267
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1268
|
-
* you may not use this file except in compliance with the License.
|
|
1269
|
-
* You may obtain a copy of the License at
|
|
1270
|
-
*
|
|
1271
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1272
|
-
*
|
|
1273
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1274
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1275
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1276
|
-
* See the License for the specific language governing permissions and
|
|
1277
|
-
* limitations under the License.
|
|
1278
|
-
*/
|
|
1279
|
-
:root {
|
|
1280
|
-
--react-pdf-text-layer: 1;
|
|
1281
|
-
--highlight-bg-color: #b400aa;
|
|
1282
|
-
--highlight-selected-bg-color: #006400;
|
|
1283
|
-
}
|
|
1284
|
-
@media screen and (forced-colors: active) {
|
|
1285
|
-
:root {
|
|
1286
|
-
--highlight-bg-color: Highlight;
|
|
1287
|
-
--highlight-selected-bg-color: ButtonText;
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
[data-main-rotation='90'] {
|
|
1291
|
-
transform: rotate(90deg) translateY(-100%);
|
|
1292
|
-
}
|
|
1293
|
-
[data-main-rotation='180'] {
|
|
1294
|
-
transform: rotate(180deg) translate(-100%, -100%);
|
|
1295
|
-
}
|
|
1296
|
-
[data-main-rotation='270'] {
|
|
1297
|
-
transform: rotate(270deg) translateX(-100%);
|
|
1298
|
-
}
|
|
1299
|
-
.textLayer {
|
|
1300
|
-
position: absolute;
|
|
1301
|
-
text-align: initial;
|
|
1302
|
-
inset: 0;
|
|
1303
|
-
overflow: hidden;
|
|
1304
|
-
line-height: 1;
|
|
1305
|
-
text-size-adjust: none;
|
|
1306
|
-
forced-color-adjust: none;
|
|
1307
|
-
transform-origin: 0 0;
|
|
1308
|
-
z-index: 2;
|
|
1309
|
-
}
|
|
1310
|
-
.textLayer :is(span, br) {
|
|
1311
|
-
color: transparent;
|
|
1312
|
-
position: absolute;
|
|
1313
|
-
white-space: pre;
|
|
1314
|
-
cursor: text;
|
|
1315
|
-
margin: 0;
|
|
1316
|
-
transform-origin: 0 0;
|
|
1317
|
-
}
|
|
1318
|
-
/* Only necessary in Google Chrome, see issue 14205, and most unfortunately
|
|
1319
|
-
* the problem doesn't show up in "text" reference tests. */
|
|
1320
|
-
.textLayer span.markedContent {
|
|
1321
|
-
top: 0;
|
|
1322
|
-
height: 0;
|
|
1323
|
-
}
|
|
1324
|
-
.textLayer .highlight {
|
|
1325
|
-
margin: -1px;
|
|
1326
|
-
padding: 1px;
|
|
1327
|
-
background-color: var(--highlight-bg-color);
|
|
1328
|
-
border-radius: 4px;
|
|
1329
|
-
}
|
|
1330
|
-
.textLayer .highlight.appended {
|
|
1331
|
-
position: initial;
|
|
1332
|
-
}
|
|
1333
|
-
.textLayer .highlight.begin {
|
|
1334
|
-
border-radius: 4px 0 0 4px;
|
|
1335
|
-
}
|
|
1336
|
-
.textLayer .highlight.end {
|
|
1337
|
-
border-radius: 0 4px 4px 0;
|
|
1338
|
-
}
|
|
1339
|
-
.textLayer .highlight.middle {
|
|
1340
|
-
border-radius: 0;
|
|
1341
|
-
}
|
|
1342
|
-
.textLayer .highlight.selected {
|
|
1343
|
-
background-color: var(--highlight-selected-bg-color);
|
|
1344
|
-
}
|
|
1345
|
-
/* Avoids https://github.com/mozilla/pdf.js/issues/13840 in Chrome */
|
|
1346
|
-
.textLayer br::selection {
|
|
1347
|
-
background: transparent;
|
|
1348
|
-
}
|
|
1349
|
-
.textLayer .endOfContent {
|
|
1350
|
-
display: block;
|
|
1351
|
-
position: absolute;
|
|
1352
|
-
inset: 100% 0 0;
|
|
1353
|
-
z-index: -1;
|
|
1354
|
-
cursor: default;
|
|
1355
|
-
user-select: none;
|
|
1356
|
-
}
|
|
1357
|
-
.textLayer .endOfContent.active {
|
|
1358
|
-
top: 0;
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
979
|
.lazy-document.ui.segment {
|
|
1362
980
|
display: inline-block !important;
|
|
1363
981
|
max-width: 100%;
|
|
@@ -1366,6 +984,7 @@ div.react-calendar {
|
|
|
1366
984
|
.lazy-document.ui.segment .buttons {
|
|
1367
985
|
display: flex;
|
|
1368
986
|
flex-direction: column;
|
|
987
|
+
z-index: 1000;
|
|
1369
988
|
}
|
|
1370
989
|
.lazy-document.ui.segment .buttons .ui.button {
|
|
1371
990
|
margin-top: 5px;
|
|
@@ -1385,6 +1004,10 @@ div.react-calendar {
|
|
|
1385
1004
|
.lazy-document > .image.hidden {
|
|
1386
1005
|
display: none;
|
|
1387
1006
|
}
|
|
1007
|
+
.pdf-container {
|
|
1008
|
+
width: 200px;
|
|
1009
|
+
height: 300px;
|
|
1010
|
+
}
|
|
1388
1011
|
|
|
1389
1012
|
.photo-viewer {
|
|
1390
1013
|
padding: 30px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@performant-software/semantic-components",
|
|
3
|
-
"version": "1.1.6
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "A package of shared components based on the Semantic UI Framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./build/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"build": "webpack --mode production && flow-copy-source -v src types"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@performant-software/shared-components": "^1.1.6
|
|
15
|
+
"@performant-software/shared-components": "^1.1.6",
|
|
16
16
|
"@react-google-maps/api": "^2.8.1",
|
|
17
17
|
"axios": "^0.26.1",
|
|
18
18
|
"i18next": "^19.4.4",
|
|
@@ -144,9 +144,7 @@ const useColumnSelector = (WrappedComponent: ComponentType<any>) => (
|
|
|
144
144
|
{...this.props}
|
|
145
145
|
className={`data-table-column-selector ${this.props.className}`}
|
|
146
146
|
columns={this.state.columns}
|
|
147
|
-
renderListHeader={this.
|
|
148
|
-
? this.renderHeader.bind(this)
|
|
149
|
-
: undefined}
|
|
147
|
+
renderListHeader={this.renderHeader.bind(this)}
|
|
150
148
|
/>
|
|
151
149
|
);
|
|
152
150
|
}
|
|
@@ -157,45 +155,51 @@ const useColumnSelector = (WrappedComponent: ComponentType<any>) => (
|
|
|
157
155
|
* @returns {*}
|
|
158
156
|
*/
|
|
159
157
|
renderHeader() {
|
|
158
|
+
if (!(this.props.configurable || this.props.renderListHeader)) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
|
|
160
162
|
return (
|
|
161
163
|
<>
|
|
162
164
|
{ this.props.renderListHeader && this.props.renderListHeader() }
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
<Dropdown.Item
|
|
182
|
-
aria-dropeffect='move'
|
|
183
|
-
onClick={(e) => e.stopPropagation()}
|
|
165
|
+
{ this.props.configurable && (
|
|
166
|
+
<Dropdown
|
|
167
|
+
aria-label='Select Columns'
|
|
168
|
+
basic
|
|
169
|
+
button
|
|
170
|
+
icon='cog'
|
|
171
|
+
className='icon configure-button open-right'
|
|
172
|
+
closeOnBlur={false}
|
|
173
|
+
>
|
|
174
|
+
<Dropdown.Menu>
|
|
175
|
+
{ this.state.columns
|
|
176
|
+
.filter((c) => c.label && c.label.length)
|
|
177
|
+
.map((c, index) => (
|
|
178
|
+
<Draggable
|
|
179
|
+
id={c.name}
|
|
180
|
+
index={index}
|
|
181
|
+
key={c.name}
|
|
182
|
+
onDrag={this.onDrag.bind(this)}
|
|
184
183
|
>
|
|
185
|
-
<
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
184
|
+
<Dropdown.Item
|
|
185
|
+
aria-dropeffect='move'
|
|
186
|
+
onClick={(e) => e.stopPropagation()}
|
|
187
|
+
>
|
|
188
|
+
<Icon
|
|
189
|
+
name='bars'
|
|
190
|
+
/>
|
|
191
|
+
<Checkbox
|
|
192
|
+
aria-label='Select Column'
|
|
193
|
+
checked={!c.hidden}
|
|
194
|
+
label={c.label}
|
|
195
|
+
onClick={this.onColumnCheckbox.bind(this, c)}
|
|
196
|
+
/>
|
|
197
|
+
</Dropdown.Item>
|
|
198
|
+
</Draggable>
|
|
199
|
+
))}
|
|
200
|
+
</Dropdown.Menu>
|
|
201
|
+
</Dropdown>
|
|
202
|
+
)}
|
|
199
203
|
</>
|
|
200
204
|
);
|
|
201
205
|
}
|
|
@@ -11,10 +11,6 @@ import { Grid } from 'semantic-ui-react';
|
|
|
11
11
|
import Facet, { type Props as FacetProps } from './Facet';
|
|
12
12
|
import { type RangeSliderProps } from '../types/InstantSearch';
|
|
13
13
|
|
|
14
|
-
// This is copied from the rc-slider node_module. SO update if updating versions
|
|
15
|
-
// See https://nextjs.org/docs/messages/css-npm
|
|
16
|
-
import './rc-slider.css';
|
|
17
|
-
|
|
18
14
|
import './FacetSlider.css';
|
|
19
15
|
|
|
20
16
|
type Props = FacetProps & RangeSliderProps;
|
|
@@ -17,6 +17,7 @@ type Props = {
|
|
|
17
17
|
defaultView?: number,
|
|
18
18
|
hideToggle?: boolean,
|
|
19
19
|
onSort?: (sortColumn: string, sortDirection?: ?string) => void,
|
|
20
|
+
renderListHeader?: () => JSX.Element,
|
|
20
21
|
sort?: Array<Sort>,
|
|
21
22
|
sortColor?: string,
|
|
22
23
|
sortColumn?: string,
|
|
@@ -80,7 +81,7 @@ const useItemsToggle = (WrappedComponent: ComponentType<any>) => (
|
|
|
80
81
|
* @returns {boolean|*}
|
|
81
82
|
*/
|
|
82
83
|
isHidden() {
|
|
83
|
-
return this.props.hideToggle && _.isEmpty(this.props.sort);
|
|
84
|
+
return this.props.hideToggle && _.isEmpty(this.props.sort) && !this.props.renderListHeader;
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
/**
|
|
@@ -110,14 +111,10 @@ const useItemsToggle = (WrappedComponent: ComponentType<any>) => (
|
|
|
110
111
|
* @returns {*}
|
|
111
112
|
*/
|
|
112
113
|
render() {
|
|
113
|
-
const renderListHeader = this.isHidden()
|
|
114
|
-
? undefined
|
|
115
|
-
: this.renderHeader.bind(this);
|
|
116
|
-
|
|
117
114
|
return (
|
|
118
115
|
<WrappedComponent
|
|
119
116
|
{...this.props}
|
|
120
|
-
renderListHeader={
|
|
117
|
+
renderListHeader={this.renderHeader.bind(this)}
|
|
121
118
|
view={this.state.view}
|
|
122
119
|
/>
|
|
123
120
|
);
|
|
@@ -139,6 +136,7 @@ const useItemsToggle = (WrappedComponent: ComponentType<any>) => (
|
|
|
139
136
|
|
|
140
137
|
return (
|
|
141
138
|
<>
|
|
139
|
+
{ this.props.renderListHeader && this.props.renderListHeader() }
|
|
142
140
|
{ !this.props.hideToggle && (
|
|
143
141
|
<>
|
|
144
142
|
<Button
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
.lazy-document.ui.segment .buttons {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
|
+
z-index: 1000;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
.lazy-document.ui.segment .buttons .ui.button {
|
|
@@ -30,3 +31,8 @@
|
|
|
30
31
|
.lazy-document > .image.hidden {
|
|
31
32
|
display: none;
|
|
32
33
|
}
|
|
34
|
+
|
|
35
|
+
.pdf-container {
|
|
36
|
+
width: 200px;
|
|
37
|
+
height: 300px;
|
|
38
|
+
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import React, { useCallback, useState, type Node } from 'react';
|
|
4
4
|
import { pdfjs, Document, Page } from 'react-pdf';
|
|
5
5
|
import {
|
|
6
|
-
Button,
|
|
7
6
|
Dimmer,
|
|
8
7
|
Icon,
|
|
9
8
|
Image,
|
|
@@ -15,13 +14,7 @@ import {
|
|
|
15
14
|
import DownloadButton from './DownloadButton';
|
|
16
15
|
import LazyLoader from './LazyLoader';
|
|
17
16
|
|
|
18
|
-
// These are copied from the react-pdt node_module. This is for NextJS builds
|
|
19
|
-
// see https://nextjs.org/docs/messages/css-npm
|
|
20
|
-
import './AnnotationLayer.css';
|
|
21
|
-
import './TextLayer.css';
|
|
22
|
-
|
|
23
17
|
import './LazyDocument.css';
|
|
24
|
-
import ViewPDFButton from './ViewPDFButton';
|
|
25
18
|
|
|
26
19
|
type Props = {
|
|
27
20
|
children?: Node,
|
|
@@ -31,8 +24,6 @@ type Props = {
|
|
|
31
24
|
image?: any,
|
|
32
25
|
pdf?: boolean,
|
|
33
26
|
preview?: ?string,
|
|
34
|
-
view?: Boolean,
|
|
35
|
-
view_url?: String,
|
|
36
27
|
size?: string,
|
|
37
28
|
src?: string
|
|
38
29
|
};
|
|
@@ -128,21 +119,12 @@ const LazyDocument = (props: Props) => {
|
|
|
128
119
|
>
|
|
129
120
|
<Page
|
|
130
121
|
pageNumber={1}
|
|
122
|
+
renderTextLayer={false}
|
|
123
|
+
renderAnnotationLayer={false}
|
|
131
124
|
/>
|
|
132
125
|
</Document>
|
|
133
126
|
</Image>
|
|
134
127
|
)}
|
|
135
|
-
{!error && loaded && props.view && props.view_url && props.pdf && dimmer && (
|
|
136
|
-
<Dimmer
|
|
137
|
-
active={dimmer}
|
|
138
|
-
>
|
|
139
|
-
<div
|
|
140
|
-
className='buttons'
|
|
141
|
-
>
|
|
142
|
-
<ViewPDFButton url={props.view_url} primary />
|
|
143
|
-
</div>
|
|
144
|
-
</Dimmer>
|
|
145
|
-
)}
|
|
146
128
|
{(error || (!props.preview && !(props.src && props.pdf))) && (
|
|
147
129
|
<Image
|
|
148
130
|
{...props.image}
|
package/src/components/List.js
CHANGED
|
@@ -197,6 +197,11 @@ type Props = {
|
|
|
197
197
|
*/
|
|
198
198
|
renderSearch?: () => Element<any>,
|
|
199
199
|
|
|
200
|
+
/**
|
|
201
|
+
* Returns true if the renderSearch prop should be used to render a search input element.
|
|
202
|
+
*/
|
|
203
|
+
searchable?: boolean,
|
|
204
|
+
|
|
200
205
|
/**
|
|
201
206
|
* If set to <code>true</code>, checkboxes will render as the first table column, allowing each row to be selectable.
|
|
202
207
|
* The consuming component is responsible for tracking the selected items.
|
|
@@ -841,10 +846,15 @@ const useList = (WrappedComponent: ComponentType<any>) => (
|
|
|
841
846
|
filters,
|
|
842
847
|
perPageOptions,
|
|
843
848
|
renderListHeader,
|
|
844
|
-
renderSearch
|
|
849
|
+
renderSearch,
|
|
850
|
+
searchable
|
|
845
851
|
} = this.props;
|
|
846
852
|
|
|
847
|
-
|
|
853
|
+
const hasFilters = filters && filters.component;
|
|
854
|
+
const hasSearch = searchable && renderSearch;
|
|
855
|
+
const headerContent = renderListHeader && renderListHeader();
|
|
856
|
+
|
|
857
|
+
if (hasFilters || perPageOptions || headerContent || hasSearch) {
|
|
848
858
|
renderHeader = true;
|
|
849
859
|
}
|
|
850
860
|
|
|
@@ -879,9 +889,9 @@ const useList = (WrappedComponent: ComponentType<any>) => (
|
|
|
879
889
|
secondary
|
|
880
890
|
className='flex-end-menu'
|
|
881
891
|
>
|
|
882
|
-
{
|
|
892
|
+
{ headerContent && (
|
|
883
893
|
<Menu.Menu className='list-header-menu'>
|
|
884
|
-
{
|
|
894
|
+
{ headerContent }
|
|
885
895
|
</Menu.Menu>
|
|
886
896
|
)}
|
|
887
897
|
<Menu.Menu>
|