@infinite-table/infinite-react 5.0.0 → 5.0.2
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/index.css +116 -72
- package/index.d.ts +11 -4
- package/index.dev.js +111 -22
- package/index.dev.mjs +111 -22
- package/index.js +111 -22
- package/index.mjs +111 -22
- package/package.json +2 -2
package/index.css
CHANGED
|
@@ -1060,171 +1060,215 @@
|
|
|
1060
1060
|
}
|
|
1061
1061
|
}
|
|
1062
1062
|
|
|
1063
|
-
/* vanilla-extract-css-ns:src/components/InfiniteTable/theme-ocean.css.ts.vanilla.css?source=#H4sIAAAAAAAAA+
|
|
1063
|
+
/* vanilla-extract-css-ns:src/components/InfiniteTable/theme-ocean.css.ts.vanilla.css?source=#H4sIAAAAAAAAA+2YwW7iMBCG7zzFSNVKIOEqJLTLppe+imNPiNXEjhwXkFa8e5XAdokTTCApVaUcOM3MP+OJ/f0Sj0LGQgqDxCSYIZE0Q0IUQypDrZSZw+P5DPg7ASDkM4EyhtIQplKlQ3hYRU8sfn6p50SUva21epc8hAe+wFXMrIx/5d7SDwJuBROkHDVhmKZ1qd+cBw2p0+xEbVDXa4JVxOPVmZrDFBuqp/ZsM3vgUv7a/Ejpso1ReQiLfAeFSgWHKp9kYjcVEgq9juZgNJVFTjVKM2+Xh4X3y+5R29OhlRbrxPRvtmw2O+2SYmxCkEqiI+k4yoWsreAmCcHLdy/2PTNic8wVkgtGjdJEyAJNCH6+q854/FmlWm1rd8A64/+QfcayUHFeK25ZoKVXbzebwzYRBsFv7rDMbF5RS6799rdJFZgiM8i7qtmtnZrNObttomUo10oylO+kwJzq6vseX9hgT6SS773sSkUYzEiusSjcG6/J7Cc2WjPFkZC0fBxXhE6A7Ag1QX4i6YK8s3AwzVNXcYjeXOgadHSx0cVGFxtdbHSxAV2MU/3WPdLPw0rFoe2m0uzrDF7gs2V8xhn+PFOP0q7OcNFHWpzB8xdx8PSTneGz82gPP88eRne4uJFhzMH9Sr7fIV4z5ILCNNcYoy4Os5KClbgNoSTtrEKtg9Id/4zqhusuwL6A7GuhfRu2bwH39ei+I7zvjO+OAO+K8I4Q74XxHiD/cpQPCvOvwfm3AP0+SB8K6gNhHWA/2X8A4WhJ/T8YAAA= */
|
|
1064
1064
|
.infinite-theme-name--ocean:root,
|
|
1065
1065
|
.infinite-theme-name--ocean {
|
|
1066
|
-
--infinite-accent-color: #
|
|
1066
|
+
--infinite-accent-color: #8b5cf6;
|
|
1067
|
+
--infinite-background: #d1e8fc;
|
|
1068
|
+
--infinite-color: #04233d;
|
|
1069
|
+
--infinite-header-cell-background: #7dd3fc;
|
|
1070
|
+
--infinite-header-cell-hover-background: #38bdf8;
|
|
1071
|
+
--infinite-header-color: var(--infinite-color);
|
|
1072
|
+
--infinite-cell-color: var(--infinite-color);
|
|
1073
|
+
--infinite-cell-border-top: 1px solid color-mix(in srgb, transparent, var(--infinite-color) 10%);
|
|
1074
|
+
--infinite-header-cell-border-right: 1px solid color-mix(in srgb, transparent, var(--infinite-color) 40%);
|
|
1067
1075
|
--infinite-cell-border-left: none;
|
|
1068
1076
|
--infinite-cell-border-right: none;
|
|
1069
1077
|
--infinite-cell-border-width: 0px;
|
|
1070
1078
|
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1079
|
+
--infinite-row-background: var(--infinite-background);
|
|
1080
|
+
--infinite-row-odd-background: color-mix(in srgb, var(--infinite-row-background), white 20%);
|
|
1081
|
+
--infinite-row-hover-background: var(--infinite-header-cell-background);
|
|
1082
|
+
--infinite-row-selected-background: var(--infinite-header-cell-hover-background);
|
|
1083
|
+
--infinite-row-selected-hover-background: color-mix(in srgb, var(--infinite-row-selected-background), white 20%);
|
|
1084
|
+
--infinite-menu-separator-color: color-mix(in srgb, transparent, var(--infinite-color) 10%);
|
|
1085
|
+
--infinite-menu-background: var(--infinite-header-cell-background);
|
|
1086
|
+
--infinite-menu-item-pressed-background: var(--infinite-background);
|
|
1071
1087
|
}
|
|
1072
1088
|
.infinite-theme-mode--light.infinite-theme-mode--light.infinite-theme-name--ocean.infinite-theme-name--ocean,
|
|
1073
1089
|
.infinite-theme-mode--light .infinite-theme-name--ocean,
|
|
1074
1090
|
.infinite-theme-mode--light.infinite-theme-mode--light .infinite-theme-name--ocean,
|
|
1075
1091
|
.infinite-theme-name--ocean .infinite-theme-mode--light,
|
|
1076
1092
|
.infinite-theme-name--ocean .infinite-theme-mode--light.infinite-theme-mode--light {
|
|
1077
|
-
--infinite-accent-color: #
|
|
1093
|
+
--infinite-accent-color: #8b5cf6;
|
|
1094
|
+
--infinite-background: #d1e8fc;
|
|
1095
|
+
--infinite-color: #04233d;
|
|
1096
|
+
--infinite-header-cell-background: #7dd3fc;
|
|
1097
|
+
--infinite-header-cell-hover-background: #38bdf8;
|
|
1098
|
+
--infinite-header-color: var(--infinite-color);
|
|
1099
|
+
--infinite-cell-color: var(--infinite-color);
|
|
1100
|
+
--infinite-cell-border-top: 1px solid color-mix(in srgb, transparent, var(--infinite-color) 10%);
|
|
1101
|
+
--infinite-header-cell-border-right: 1px solid color-mix(in srgb, transparent, var(--infinite-color) 40%);
|
|
1078
1102
|
--infinite-cell-border-left: none;
|
|
1079
1103
|
--infinite-cell-border-right: none;
|
|
1080
1104
|
--infinite-cell-border-width: 0px;
|
|
1081
1105
|
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1106
|
+
--infinite-row-background: var(--infinite-background);
|
|
1107
|
+
--infinite-row-odd-background: color-mix(in srgb, var(--infinite-row-background), white 20%);
|
|
1108
|
+
--infinite-row-hover-background: var(--infinite-header-cell-background);
|
|
1109
|
+
--infinite-row-selected-background: var(--infinite-header-cell-hover-background);
|
|
1110
|
+
--infinite-row-selected-hover-background: color-mix(in srgb, var(--infinite-row-selected-background), white 20%);
|
|
1111
|
+
--infinite-menu-separator-color: color-mix(in srgb, transparent, var(--infinite-color) 10%);
|
|
1112
|
+
--infinite-menu-background: var(--infinite-header-cell-background);
|
|
1113
|
+
--infinite-menu-item-pressed-background: var(--infinite-background);
|
|
1082
1114
|
}
|
|
1083
1115
|
.infinite-theme-mode--dark.infinite-theme-mode--dark.infinite-theme-name--ocean.infinite-theme-name--ocean,
|
|
1084
1116
|
.infinite-theme-mode--dark .infinite-theme-name--ocean,
|
|
1085
1117
|
.infinite-theme-name--ocean .infinite-theme-mode--dark {
|
|
1086
|
-
--infinite-accent-color: #
|
|
1087
|
-
--infinite-cell-border-left: none;
|
|
1088
|
-
--infinite-cell-border-right: none;
|
|
1089
|
-
--infinite-cell-border-width: 0px;
|
|
1090
|
-
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1118
|
+
--infinite-accent-color: #8b5cf6;
|
|
1091
1119
|
--infinite-background: #032c4f;
|
|
1092
|
-
--infinite-menu-separator-color: color-mix(in srgb, transparent, var(--infinite-cell-color) 10%);
|
|
1093
|
-
--infinite-menu-background: var(--infinite-header-cell-background);
|
|
1094
|
-
--infinite-menu-item-pressed-background: var(--infinite-background);
|
|
1095
1120
|
--infinite-color: #96a0aa;
|
|
1096
|
-
--infinite-cell-color: var(--infinite-color);
|
|
1097
|
-
--infinite-cell-border-top: 1px solid color-mix(in srgb, transparent, var(--infinite-cell-color) 10%);
|
|
1098
1121
|
--infinite-header-cell-background: #04233d;
|
|
1099
1122
|
--infinite-header-cell-hover-background: #021f35;
|
|
1123
|
+
--infinite-header-color: var(--infinite-color);
|
|
1124
|
+
--infinite-cell-color: var(--infinite-color);
|
|
1125
|
+
--infinite-cell-border-top: 1px solid color-mix(in srgb, transparent, var(--infinite-cell-color) 10%);
|
|
1126
|
+
--infinite-header-cell-border-right: 1px solid color-mix(in srgb, transparent, var(--infinite-color) 40%);
|
|
1127
|
+
--infinite-cell-border-left: none;
|
|
1128
|
+
--infinite-cell-border-right: none;
|
|
1129
|
+
--infinite-cell-border-width: 0px;
|
|
1130
|
+
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1100
1131
|
--infinite-row-background: var(--infinite-background);
|
|
1101
1132
|
--infinite-row-odd-background: color-mix(in srgb, var(--infinite-row-background), white 2%);
|
|
1102
1133
|
--infinite-row-hover-background: var(--infinite-header-cell-background);
|
|
1103
1134
|
--infinite-row-selected-background: var(--infinite-header-cell-hover-background);
|
|
1104
1135
|
--infinite-row-selected-hover-background: color-mix(in srgb, var(--infinite-row-selected-background), white 2%);
|
|
1136
|
+
--infinite-menu-separator-color: color-mix(in srgb, transparent, var(--infinite-cell-color) 10%);
|
|
1137
|
+
--infinite-menu-background: var(--infinite-header-cell-background);
|
|
1138
|
+
--infinite-menu-item-pressed-background: var(--infinite-background);
|
|
1105
1139
|
}
|
|
1106
1140
|
@media (prefers-color-scheme: dark) {
|
|
1107
1141
|
.infinite-theme-name--ocean:root,
|
|
1108
1142
|
.infinite-theme-name--ocean {
|
|
1109
|
-
--infinite-accent-color: #
|
|
1110
|
-
--infinite-cell-border-left: none;
|
|
1111
|
-
--infinite-cell-border-right: none;
|
|
1112
|
-
--infinite-cell-border-width: 0px;
|
|
1113
|
-
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1143
|
+
--infinite-accent-color: #8b5cf6;
|
|
1114
1144
|
--infinite-background: #032c4f;
|
|
1115
|
-
--infinite-menu-separator-color: color-mix(in srgb, transparent, var(--infinite-cell-color) 10%);
|
|
1116
|
-
--infinite-menu-background: var(--infinite-header-cell-background);
|
|
1117
|
-
--infinite-menu-item-pressed-background: var(--infinite-background);
|
|
1118
1145
|
--infinite-color: #96a0aa;
|
|
1119
|
-
--infinite-cell-color: var(--infinite-color);
|
|
1120
|
-
--infinite-cell-border-top: 1px solid color-mix(in srgb, transparent, var(--infinite-cell-color) 10%);
|
|
1121
1146
|
--infinite-header-cell-background: #04233d;
|
|
1122
1147
|
--infinite-header-cell-hover-background: #021f35;
|
|
1148
|
+
--infinite-header-color: var(--infinite-color);
|
|
1149
|
+
--infinite-cell-color: var(--infinite-color);
|
|
1150
|
+
--infinite-cell-border-top: 1px solid color-mix(in srgb, transparent, var(--infinite-cell-color) 10%);
|
|
1151
|
+
--infinite-header-cell-border-right: 1px solid color-mix(in srgb, transparent, var(--infinite-color) 40%);
|
|
1152
|
+
--infinite-cell-border-left: none;
|
|
1153
|
+
--infinite-cell-border-right: none;
|
|
1154
|
+
--infinite-cell-border-width: 0px;
|
|
1155
|
+
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1123
1156
|
--infinite-row-background: var(--infinite-background);
|
|
1124
1157
|
--infinite-row-odd-background: color-mix(in srgb, var(--infinite-row-background), white 2%);
|
|
1125
1158
|
--infinite-row-hover-background: var(--infinite-header-cell-background);
|
|
1126
1159
|
--infinite-row-selected-background: var(--infinite-header-cell-hover-background);
|
|
1127
1160
|
--infinite-row-selected-hover-background: color-mix(in srgb, var(--infinite-row-selected-background), white 2%);
|
|
1161
|
+
--infinite-menu-separator-color: color-mix(in srgb, transparent, var(--infinite-cell-color) 10%);
|
|
1162
|
+
--infinite-menu-background: var(--infinite-header-cell-background);
|
|
1163
|
+
--infinite-menu-item-pressed-background: var(--infinite-background);
|
|
1128
1164
|
}
|
|
1129
1165
|
}
|
|
1130
1166
|
|
|
1131
|
-
/* vanilla-extract-css-ns:src/components/InfiniteTable/theme-balsam.css.ts.vanilla.css?source=#H4sIAAAAAAAAA+
|
|
1167
|
+
/* vanilla-extract-css-ns:src/components/InfiniteTable/theme-balsam.css.ts.vanilla.css?source=#H4sIAAAAAAAAA+2Y3YriMBTH732KA7KgYESrjtq52VdJkxMbbJOSZFRYfPel1dmpqVNbHfRiS9ALcz6TnN8fHEslpJIOiYsxRaJoioRENLE0DY3WbgTjGhP40wMg5J8FZQyVI0wn2oTQX0ULJt7eL20iyrYboz8UD2EfS4fe/tk5SijbelsxUo6GMEySizB9sRBLsayxjvUOzYVPkYak8jCQCqzZRCPYUTO4mW04OlUNwa/hNwlPDXjRil99jyJ2W/tImzyN01kI0+wAVieSg9lEdDBdrUcwXS/yr/UIxovVdzWWAhm5iV051JWjcYYqm1GDylXO6VQpzCeVAylnSVC4EJRWlfuulnLDai+5i0OYZId3//k5uTvbSsUlo04bIpVFF0KQHYoezx/P1ej9xfPweizd/xVHzbn3Hpngwm8ht6y+wz4yMRHTK7YWE2QO+a1nW3c35YEcQpBfUV2me8bkm1Jr5iRF9UEsZtQU9/NJi4izGfOHuLC962IKT+kwJZlBa2+fY7vxn19vq0jIpaVR0jqj1+vXCRaTdez5JE41R0KSfGZabJX5XbdXJX8paK0q1Hr+XNALIaoJe79nXa2d8nXK1ylfp3yd8r1M+Tg12+Y7j+peHvPnFaqI+qCW9AM+m898i093schXUz2Zsnz913rSX7B8dfLxAvkI3gIWNJSPGZ8v5+tOPq6/104+vuTjd4pcUhhkBgUaezo4YlnO4RByBA8LBtfxu+m/Yc1I3oTlN2jelucvIPo9TG9P9Tu4/mSyN2R7U7o35PtDhH+A8W0o347zzyT9S1jfjvaP8P4FxH8m8wGOveNfpxMyot0YAAA= */
|
|
1132
1168
|
.infinite-theme-name--balsam:root,
|
|
1133
1169
|
.infinite-theme-name--balsam {
|
|
1134
|
-
--infinite-accent-color: #
|
|
1135
|
-
--infinite-cell-border-left: none;
|
|
1136
|
-
--infinite-cell-border-right: none;
|
|
1137
|
-
--infinite-cell-border-width: 0px;
|
|
1138
|
-
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1139
|
-
--infinite-row-selected-background: color-mix(in srgb, transparent, var(--infinite-accent-color) 20%);
|
|
1170
|
+
--infinite-accent-color: #8b5cf6;
|
|
1140
1171
|
--infinite-background: white;
|
|
1141
|
-
--infinite-menu-separator-color: #bdc3c7;
|
|
1142
|
-
--infinite-menu-background: var(--infinite-background);
|
|
1143
|
-
--infinite-menu-item-disabled-background: color-mix(in srgb, var(--infinite-menu-background), white 20%);
|
|
1144
|
-
--infinite-menu-item-pressed-background: color-mix(in srgb, var(--infinite-header-cell-background), white 4%);
|
|
1145
1172
|
--infinite-color: black;
|
|
1146
|
-
--infinite-cell-color: var(--infinite-color);
|
|
1147
|
-
--infinite-cell-border-top: 1px solid rgba(189, 195, 199, .58);
|
|
1148
1173
|
--infinite-header-cell-background: #f5f7f7;
|
|
1149
1174
|
--infinite-header-cell-hover-background: color-mix(in srgb, var(--infinite-header-cell-background), white 2%);
|
|
1175
|
+
--infinite-header-color: var(--infinite-color);
|
|
1176
|
+
--infinite-cell-color: var(--infinite-color);
|
|
1177
|
+
--infinite-cell-border-top: 1px solid rgba(189, 195, 199, .58);
|
|
1178
|
+
--infinite-header-cell-border-right: 1px solid color-mix(in srgb, transparent, var(--infinite-color) 40%);
|
|
1179
|
+
--infinite-cell-border-left: none;
|
|
1180
|
+
--infinite-cell-border-right: none;
|
|
1181
|
+
--infinite-cell-border-width: 0px;
|
|
1182
|
+
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1150
1183
|
--infinite-row-background: var(--infinite-background);
|
|
1151
1184
|
--infinite-row-odd-background: #fcfdfe;
|
|
1152
1185
|
--infinite-row-hover-background: #ecf0f1;
|
|
1186
|
+
--infinite-row-selected-background: color-mix(in srgb, transparent, var(--infinite-accent-color) 20%);
|
|
1153
1187
|
--infinite-row-selected-hover-background: color-mix(in srgb, var(--infinite-row-selected-background), white 2%);
|
|
1188
|
+
--infinite-menu-separator-color: #bdc3c7;
|
|
1189
|
+
--infinite-menu-background: var(--infinite-background);
|
|
1190
|
+
--infinite-menu-item-pressed-background: color-mix(in srgb, var(--infinite-header-cell-background), white 4%);
|
|
1191
|
+
--infinite-menu-item-disabled-background: color-mix(in srgb, var(--infinite-menu-background), white 20%);
|
|
1154
1192
|
}
|
|
1155
1193
|
.infinite-theme-mode--light.infinite-theme-mode--light.infinite-theme-name--balsam.infinite-theme-name--balsam,
|
|
1156
1194
|
.infinite-theme-mode--light .infinite-theme-name--balsam,
|
|
1157
1195
|
.infinite-theme-mode--light.infinite-theme-mode--light .infinite-theme-name--balsam,
|
|
1158
1196
|
.infinite-theme-name--balsam .infinite-theme-mode--light,
|
|
1159
1197
|
.infinite-theme-name--balsam .infinite-theme-mode--light.infinite-theme-mode--light {
|
|
1160
|
-
--infinite-accent-color: #
|
|
1161
|
-
--infinite-cell-border-left: none;
|
|
1162
|
-
--infinite-cell-border-right: none;
|
|
1163
|
-
--infinite-cell-border-width: 0px;
|
|
1164
|
-
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1165
|
-
--infinite-row-selected-background: color-mix(in srgb, transparent, var(--infinite-accent-color) 20%);
|
|
1198
|
+
--infinite-accent-color: #8b5cf6;
|
|
1166
1199
|
--infinite-background: white;
|
|
1167
|
-
--infinite-menu-separator-color: #bdc3c7;
|
|
1168
|
-
--infinite-menu-background: var(--infinite-background);
|
|
1169
|
-
--infinite-menu-item-disabled-background: color-mix(in srgb, var(--infinite-menu-background), white 20%);
|
|
1170
|
-
--infinite-menu-item-pressed-background: color-mix(in srgb, var(--infinite-header-cell-background), white 4%);
|
|
1171
1200
|
--infinite-color: black;
|
|
1172
|
-
--infinite-cell-color: var(--infinite-color);
|
|
1173
|
-
--infinite-cell-border-top: 1px solid rgba(189, 195, 199, .58);
|
|
1174
1201
|
--infinite-header-cell-background: #f5f7f7;
|
|
1175
1202
|
--infinite-header-cell-hover-background: color-mix(in srgb, var(--infinite-header-cell-background), white 2%);
|
|
1203
|
+
--infinite-header-color: var(--infinite-color);
|
|
1204
|
+
--infinite-cell-color: var(--infinite-color);
|
|
1205
|
+
--infinite-cell-border-top: 1px solid rgba(189, 195, 199, .58);
|
|
1206
|
+
--infinite-header-cell-border-right: 1px solid color-mix(in srgb, transparent, var(--infinite-color) 40%);
|
|
1207
|
+
--infinite-cell-border-left: none;
|
|
1208
|
+
--infinite-cell-border-right: none;
|
|
1209
|
+
--infinite-cell-border-width: 0px;
|
|
1210
|
+
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1176
1211
|
--infinite-row-background: var(--infinite-background);
|
|
1177
1212
|
--infinite-row-odd-background: #fcfdfe;
|
|
1178
1213
|
--infinite-row-hover-background: #ecf0f1;
|
|
1214
|
+
--infinite-row-selected-background: color-mix(in srgb, transparent, var(--infinite-accent-color) 20%);
|
|
1179
1215
|
--infinite-row-selected-hover-background: color-mix(in srgb, var(--infinite-row-selected-background), white 2%);
|
|
1216
|
+
--infinite-menu-separator-color: #bdc3c7;
|
|
1217
|
+
--infinite-menu-background: var(--infinite-background);
|
|
1218
|
+
--infinite-menu-item-pressed-background: color-mix(in srgb, var(--infinite-header-cell-background), white 4%);
|
|
1219
|
+
--infinite-menu-item-disabled-background: color-mix(in srgb, var(--infinite-menu-background), white 20%);
|
|
1180
1220
|
}
|
|
1181
1221
|
.infinite-theme-mode--dark.infinite-theme-mode--dark.infinite-theme-name--balsam.infinite-theme-name--balsam,
|
|
1182
1222
|
.infinite-theme-mode--dark .infinite-theme-name--balsam,
|
|
1183
1223
|
.infinite-theme-name--balsam .infinite-theme-mode--dark {
|
|
1184
|
-
--infinite-accent-color: #
|
|
1185
|
-
--infinite-cell-border-left: none;
|
|
1186
|
-
--infinite-cell-border-right: none;
|
|
1187
|
-
--infinite-cell-border-width: 0px;
|
|
1188
|
-
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1189
|
-
--infinite-row-selected-background: color-mix(in srgb, transparent, var(--infinite-accent-color) 20%);
|
|
1224
|
+
--infinite-accent-color: #8b5cf6;
|
|
1190
1225
|
--infinite-background: #2d3436;
|
|
1191
|
-
--infinite-menu-separator-color: #5c5c5c;
|
|
1192
|
-
--infinite-menu-background: var(--infinite-background);
|
|
1193
|
-
--infinite-menu-item-disabled-background: color-mix(in srgb, var(--infinite-menu-background), white 20%);
|
|
1194
|
-
--infinite-menu-item-pressed-background: color-mix(in srgb, var(--infinite-header-cell-background), white 4%);
|
|
1195
1226
|
--infinite-color: #f5f5f5;
|
|
1196
|
-
--infinite-cell-color: var(--infinite-color);
|
|
1197
|
-
--infinite-cell-border-top: 1px solid #5c5c5c;
|
|
1198
1227
|
--infinite-header-cell-background: #1c1c1c;
|
|
1199
1228
|
--infinite-header-cell-hover-background: color-mix(in srgb, var(--infinite-header-cell-background), white 2%);
|
|
1229
|
+
--infinite-header-color: var(--infinite-color);
|
|
1230
|
+
--infinite-cell-color: var(--infinite-color);
|
|
1231
|
+
--infinite-cell-border-top: 1px solid #5c5c5c;
|
|
1232
|
+
--infinite-header-cell-border-right: 1px solid color-mix(in srgb, transparent, var(--infinite-color) 40%);
|
|
1233
|
+
--infinite-cell-border-left: none;
|
|
1234
|
+
--infinite-cell-border-right: none;
|
|
1235
|
+
--infinite-cell-border-width: 0px;
|
|
1236
|
+
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1200
1237
|
--infinite-row-background: var(--infinite-background);
|
|
1201
1238
|
--infinite-row-odd-background: #262c2e;
|
|
1202
1239
|
--infinite-row-hover-background: #3d4749;
|
|
1240
|
+
--infinite-row-selected-background: color-mix(in srgb, transparent, var(--infinite-accent-color) 20%);
|
|
1203
1241
|
--infinite-row-selected-hover-background: color-mix(in srgb, var(--infinite-row-selected-background), white 2%);
|
|
1242
|
+
--infinite-menu-separator-color: #5c5c5c;
|
|
1243
|
+
--infinite-menu-background: var(--infinite-background);
|
|
1244
|
+
--infinite-menu-item-pressed-background: color-mix(in srgb, var(--infinite-header-cell-background), white 4%);
|
|
1245
|
+
--infinite-menu-item-disabled-background: color-mix(in srgb, var(--infinite-menu-background), white 20%);
|
|
1204
1246
|
}
|
|
1205
1247
|
@media (prefers-color-scheme: dark) {
|
|
1206
1248
|
.infinite-theme-name--balsam:root,
|
|
1207
1249
|
.infinite-theme-name--balsam {
|
|
1208
|
-
--infinite-accent-color: #
|
|
1209
|
-
--infinite-cell-border-left: none;
|
|
1210
|
-
--infinite-cell-border-right: none;
|
|
1211
|
-
--infinite-cell-border-width: 0px;
|
|
1212
|
-
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1213
|
-
--infinite-row-selected-background: color-mix(in srgb, transparent, var(--infinite-accent-color) 20%);
|
|
1250
|
+
--infinite-accent-color: #8b5cf6;
|
|
1214
1251
|
--infinite-background: #2d3436;
|
|
1215
|
-
--infinite-menu-separator-color: #5c5c5c;
|
|
1216
|
-
--infinite-menu-background: var(--infinite-background);
|
|
1217
|
-
--infinite-menu-item-disabled-background: color-mix(in srgb, var(--infinite-menu-background), white 20%);
|
|
1218
|
-
--infinite-menu-item-pressed-background: color-mix(in srgb, var(--infinite-header-cell-background), white 4%);
|
|
1219
1252
|
--infinite-color: #f5f5f5;
|
|
1220
|
-
--infinite-cell-color: var(--infinite-color);
|
|
1221
|
-
--infinite-cell-border-top: 1px solid #5c5c5c;
|
|
1222
1253
|
--infinite-header-cell-background: #1c1c1c;
|
|
1223
1254
|
--infinite-header-cell-hover-background: color-mix(in srgb, var(--infinite-header-cell-background), white 2%);
|
|
1255
|
+
--infinite-header-color: var(--infinite-color);
|
|
1256
|
+
--infinite-cell-color: var(--infinite-color);
|
|
1257
|
+
--infinite-cell-border-top: 1px solid #5c5c5c;
|
|
1258
|
+
--infinite-header-cell-border-right: 1px solid color-mix(in srgb, transparent, var(--infinite-color) 40%);
|
|
1259
|
+
--infinite-cell-border-left: none;
|
|
1260
|
+
--infinite-cell-border-right: none;
|
|
1261
|
+
--infinite-cell-border-width: 0px;
|
|
1262
|
+
--infinite-active-cell-indicator-inset: 2px 1px 1px 1px;
|
|
1224
1263
|
--infinite-row-background: var(--infinite-background);
|
|
1225
1264
|
--infinite-row-odd-background: #262c2e;
|
|
1226
1265
|
--infinite-row-hover-background: #3d4749;
|
|
1266
|
+
--infinite-row-selected-background: color-mix(in srgb, transparent, var(--infinite-accent-color) 20%);
|
|
1227
1267
|
--infinite-row-selected-hover-background: color-mix(in srgb, var(--infinite-row-selected-background), white 2%);
|
|
1268
|
+
--infinite-menu-separator-color: #5c5c5c;
|
|
1269
|
+
--infinite-menu-background: var(--infinite-background);
|
|
1270
|
+
--infinite-menu-item-pressed-background: color-mix(in srgb, var(--infinite-header-cell-background), white 4%);
|
|
1271
|
+
--infinite-menu-item-disabled-background: color-mix(in srgb, var(--infinite-menu-background), white 20%);
|
|
1228
1272
|
}
|
|
1229
1273
|
}
|
|
1230
1274
|
|
package/index.d.ts
CHANGED
|
@@ -936,6 +936,13 @@ declare type CellPositionByIndex = {
|
|
|
936
936
|
rowIndex: number;
|
|
937
937
|
colIndex: number;
|
|
938
938
|
};
|
|
939
|
+
declare type MultiSelectRangeOptions = {
|
|
940
|
+
horizontalLayout: false;
|
|
941
|
+
} | {
|
|
942
|
+
horizontalLayout: true;
|
|
943
|
+
rowsPerPage: number;
|
|
944
|
+
columnsPerSet: number;
|
|
945
|
+
};
|
|
939
946
|
|
|
940
947
|
declare type MultiCellSelectorOptions = {
|
|
941
948
|
getPrimaryKeyByIndex: (rowIndex: number) => string | number;
|
|
@@ -960,10 +967,10 @@ declare class MultiCellSelector {
|
|
|
960
967
|
* @param position CellPosition
|
|
961
968
|
*/
|
|
962
969
|
singleAddClick(position: CellPositionByIndex): void;
|
|
963
|
-
multiSelectClick(position: CellPositionByIndex): void;
|
|
964
|
-
setRangeSelected(startPosition: CellPositionByIndex, endPosition: CellPositionByIndex, selected: boolean): void;
|
|
965
|
-
deselectRange(startPosition: CellPositionByIndex, endPosition: CellPositionByIndex): void;
|
|
966
|
-
selectRange(startPosition: CellPositionByIndex, endPosition: CellPositionByIndex): void;
|
|
970
|
+
multiSelectClick(position: CellPositionByIndex, options: MultiSelectRangeOptions): void;
|
|
971
|
+
setRangeSelected(startPosition: CellPositionByIndex, endPosition: CellPositionByIndex, selected: boolean, options: MultiSelectRangeOptions): void;
|
|
972
|
+
deselectRange(startPosition: CellPositionByIndex, endPosition: CellPositionByIndex, options: MultiSelectRangeOptions): void;
|
|
973
|
+
selectRange(startPosition: CellPositionByIndex, endPosition: CellPositionByIndex, options: MultiSelectRangeOptions): void;
|
|
967
974
|
}
|
|
968
975
|
|
|
969
976
|
declare type RowSelectionStateItem = (any | any[])[];
|
package/index.dev.js
CHANGED
|
@@ -16215,16 +16215,7 @@ function notNullable(value) {
|
|
|
16215
16215
|
return true;
|
|
16216
16216
|
}
|
|
16217
16217
|
|
|
16218
|
-
// src/components/
|
|
16219
|
-
function ensureSortedPerOrder(arr, sortPattern) {
|
|
16220
|
-
const arrSet = new Set(arr);
|
|
16221
|
-
return sortPattern.map((item) => {
|
|
16222
|
-
if (arrSet.has(item)) {
|
|
16223
|
-
return item;
|
|
16224
|
-
}
|
|
16225
|
-
return null;
|
|
16226
|
-
}).filter((x) => x != null);
|
|
16227
|
-
}
|
|
16218
|
+
// src/components/types/CellPositionByIndex.ts
|
|
16228
16219
|
function ensureMinMaxCellPositionByIndex(start, end) {
|
|
16229
16220
|
let { rowIndex: startRowIndex, colIndex: startColIndex } = start;
|
|
16230
16221
|
let { rowIndex: endRowIndex, colIndex: endColIndex } = end;
|
|
@@ -16235,6 +16226,64 @@ function ensureMinMaxCellPositionByIndex(start, end) {
|
|
|
16235
16226
|
{ rowIndex: rowEnd, colIndex: colEnd }
|
|
16236
16227
|
];
|
|
16237
16228
|
}
|
|
16229
|
+
function isSamePage(startPosition, endPosition, options) {
|
|
16230
|
+
const { rowsPerPage } = options;
|
|
16231
|
+
return !rowsPerPage ? true : Math.floor(startPosition.rowIndex / rowsPerPage) === Math.floor(endPosition.rowIndex / rowsPerPage);
|
|
16232
|
+
}
|
|
16233
|
+
function getPositionsArrayForRangeInHorizontaLLayout(startPosition, endPosition, options) {
|
|
16234
|
+
if (isSamePage(startPosition, endPosition, options)) {
|
|
16235
|
+
throw "You should not call this when the positions are in the same page";
|
|
16236
|
+
}
|
|
16237
|
+
const { rowsPerPage, columnsPerSet } = options;
|
|
16238
|
+
if (rowsPerPage === 0) {
|
|
16239
|
+
throw "rowsPerPage cannot be 0";
|
|
16240
|
+
}
|
|
16241
|
+
let start = startPosition;
|
|
16242
|
+
let end = endPosition;
|
|
16243
|
+
if (Math.floor(startPosition.rowIndex / rowsPerPage) > Math.floor(endPosition.rowIndex / rowsPerPage)) {
|
|
16244
|
+
start = endPosition;
|
|
16245
|
+
end = startPosition;
|
|
16246
|
+
}
|
|
16247
|
+
let { rowIndex: startRowIndex, colIndex: startColIndex } = start;
|
|
16248
|
+
let { rowIndex: endRowIndex, colIndex: endColIndex } = end;
|
|
16249
|
+
const pageForStartRowIndex = Math.floor(startRowIndex / rowsPerPage);
|
|
16250
|
+
const pageForEndRowIndex = Math.floor(endRowIndex / rowsPerPage);
|
|
16251
|
+
const offsetForStartRowIndex = startRowIndex % rowsPerPage;
|
|
16252
|
+
const offsetForEndRowIndex = endRowIndex % rowsPerPage;
|
|
16253
|
+
const minOffset = Math.min(offsetForStartRowIndex, offsetForEndRowIndex);
|
|
16254
|
+
const maxOffset = Math.max(offsetForStartRowIndex, offsetForEndRowIndex);
|
|
16255
|
+
const positions = [];
|
|
16256
|
+
for (let page = pageForStartRowIndex; page <= pageForEndRowIndex; page++) {
|
|
16257
|
+
for (let offset = minOffset; offset <= maxOffset; offset++) {
|
|
16258
|
+
const rowIndex = page * rowsPerPage + offset;
|
|
16259
|
+
if (page === pageForStartRowIndex) {
|
|
16260
|
+
for (let colIndex = startColIndex; colIndex < columnsPerSet; colIndex++) {
|
|
16261
|
+
positions.push({ rowIndex, colIndex });
|
|
16262
|
+
}
|
|
16263
|
+
} else if (page === pageForEndRowIndex) {
|
|
16264
|
+
for (let colIndex = 0; colIndex <= endColIndex; colIndex++) {
|
|
16265
|
+
positions.push({ rowIndex, colIndex });
|
|
16266
|
+
}
|
|
16267
|
+
} else {
|
|
16268
|
+
for (let colIndex = 0; colIndex < columnsPerSet; colIndex++) {
|
|
16269
|
+
positions.push({ rowIndex, colIndex });
|
|
16270
|
+
}
|
|
16271
|
+
}
|
|
16272
|
+
}
|
|
16273
|
+
}
|
|
16274
|
+
return positions;
|
|
16275
|
+
}
|
|
16276
|
+
|
|
16277
|
+
// src/components/InfiniteTable/api/getCellSelectionApi.ts
|
|
16278
|
+
function ensureSortedPerOrder(arr, sortPattern) {
|
|
16279
|
+
const arrSet = new Set(arr);
|
|
16280
|
+
return sortPattern.map((item) => {
|
|
16281
|
+
if (arrSet.has(item)) {
|
|
16282
|
+
return item;
|
|
16283
|
+
}
|
|
16284
|
+
return null;
|
|
16285
|
+
}).filter((x) => x != null);
|
|
16286
|
+
}
|
|
16238
16287
|
var InfiniteTableCellSelectionApiImpl = class {
|
|
16239
16288
|
constructor(param) {
|
|
16240
16289
|
this.getCellSelectionPosition = (options) => {
|
|
@@ -18071,7 +18120,7 @@ var MultiCellSelector = class {
|
|
|
18071
18120
|
this.multiSelectEndPosition = void 0;
|
|
18072
18121
|
}
|
|
18073
18122
|
}
|
|
18074
|
-
multiSelectClick(position2) {
|
|
18123
|
+
multiSelectClick(position2, options) {
|
|
18075
18124
|
if (!this.multiSelectStartPosition) {
|
|
18076
18125
|
return;
|
|
18077
18126
|
}
|
|
@@ -18082,13 +18131,39 @@ var MultiCellSelector = class {
|
|
|
18082
18131
|
if (this.multiSelectEndPosition) {
|
|
18083
18132
|
this.deselectRange(
|
|
18084
18133
|
this.multiSelectStartPosition,
|
|
18085
|
-
this.multiSelectEndPosition
|
|
18134
|
+
this.multiSelectEndPosition,
|
|
18135
|
+
options
|
|
18086
18136
|
);
|
|
18087
18137
|
}
|
|
18088
|
-
this.selectRange(this.multiSelectStartPosition, position2);
|
|
18138
|
+
this.selectRange(this.multiSelectStartPosition, position2, options);
|
|
18089
18139
|
this.multiSelectEndPosition = position2;
|
|
18090
18140
|
}
|
|
18091
|
-
setRangeSelected(startPosition, endPosition, selected) {
|
|
18141
|
+
setRangeSelected(startPosition, endPosition, selected, options) {
|
|
18142
|
+
if (options.horizontalLayout && !isSamePage(startPosition, endPosition, options)) {
|
|
18143
|
+
const positions = getPositionsArrayForRangeInHorizontaLLayout(
|
|
18144
|
+
startPosition,
|
|
18145
|
+
endPosition,
|
|
18146
|
+
{
|
|
18147
|
+
rowsPerPage: options.rowsPerPage,
|
|
18148
|
+
columnsPerSet: options.columnsPerSet
|
|
18149
|
+
}
|
|
18150
|
+
);
|
|
18151
|
+
positions.forEach((position2) => {
|
|
18152
|
+
const selectionPosition = this.getCellSelectionPosition({
|
|
18153
|
+
rowIndex: position2.rowIndex,
|
|
18154
|
+
colIndex: position2.colIndex
|
|
18155
|
+
});
|
|
18156
|
+
if (!selectionPosition) {
|
|
18157
|
+
return;
|
|
18158
|
+
}
|
|
18159
|
+
if (selected) {
|
|
18160
|
+
this.cellSelectionState.selectCell(...selectionPosition);
|
|
18161
|
+
} else {
|
|
18162
|
+
this.cellSelectionState.deselectCell(...selectionPosition);
|
|
18163
|
+
}
|
|
18164
|
+
});
|
|
18165
|
+
return;
|
|
18166
|
+
}
|
|
18092
18167
|
const [start, end] = ensureMinMaxCellPositionByIndex(
|
|
18093
18168
|
startPosition,
|
|
18094
18169
|
endPosition
|
|
@@ -18115,11 +18190,11 @@ var MultiCellSelector = class {
|
|
|
18115
18190
|
}
|
|
18116
18191
|
}
|
|
18117
18192
|
}
|
|
18118
|
-
deselectRange(startPosition, endPosition) {
|
|
18119
|
-
this.setRangeSelected(startPosition, endPosition, false);
|
|
18193
|
+
deselectRange(startPosition, endPosition, options) {
|
|
18194
|
+
this.setRangeSelected(startPosition, endPosition, false, options);
|
|
18120
18195
|
}
|
|
18121
|
-
selectRange(startPosition, endPosition) {
|
|
18122
|
-
this.setRangeSelected(startPosition, endPosition, true);
|
|
18196
|
+
selectRange(startPosition, endPosition, options) {
|
|
18197
|
+
this.setRangeSelected(startPosition, endPosition, true, options);
|
|
18123
18198
|
}
|
|
18124
18199
|
};
|
|
18125
18200
|
|
|
@@ -20117,7 +20192,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
20117
20192
|
}
|
|
20118
20193
|
let valid2 = isValidLicense(licenseKey, {
|
|
20119
20194
|
publishedAt: 1624970570587,
|
|
20120
|
-
version: "5.0.
|
|
20195
|
+
version: "5.0.2"
|
|
20121
20196
|
});
|
|
20122
20197
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
20123
20198
|
return true;
|
|
@@ -20229,6 +20304,7 @@ function onCellDoubleClick(context, _event) {
|
|
|
20229
20304
|
function updateCellSelectionOnCellClick(context, event) {
|
|
20230
20305
|
const {
|
|
20231
20306
|
getDataSourceState,
|
|
20307
|
+
getState,
|
|
20232
20308
|
getComputed,
|
|
20233
20309
|
rowIndex,
|
|
20234
20310
|
colIndex,
|
|
@@ -20242,7 +20318,10 @@ function updateCellSelectionOnCellClick(context, event) {
|
|
|
20242
20318
|
if (selectionMode !== "multi-cell") {
|
|
20243
20319
|
return;
|
|
20244
20320
|
}
|
|
20245
|
-
const { multiCellSelector } = getComputed();
|
|
20321
|
+
const { multiCellSelector, computedVisibleColumns } = getComputed();
|
|
20322
|
+
const { brain } = getState();
|
|
20323
|
+
const { rowsPerPage } = brain;
|
|
20324
|
+
const columnsPerSet = computedVisibleColumns.length;
|
|
20246
20325
|
const cellSelection = new CellSelectionState(existingCellSelection);
|
|
20247
20326
|
multiCellSelector.cellSelectionState = cellSelection;
|
|
20248
20327
|
const position2 = {
|
|
@@ -20252,7 +20331,17 @@ function updateCellSelectionOnCellClick(context, event) {
|
|
|
20252
20331
|
if (event.metaKey || event.ctrlKey) {
|
|
20253
20332
|
multiCellSelector.singleAddClick(position2);
|
|
20254
20333
|
} else if (event.shiftKey) {
|
|
20255
|
-
|
|
20334
|
+
const horizontalLayout = !!getState().wrapRowsHorizontally;
|
|
20335
|
+
multiCellSelector.multiSelectClick(
|
|
20336
|
+
position2,
|
|
20337
|
+
horizontalLayout ? {
|
|
20338
|
+
horizontalLayout,
|
|
20339
|
+
rowsPerPage,
|
|
20340
|
+
columnsPerSet
|
|
20341
|
+
} : {
|
|
20342
|
+
horizontalLayout
|
|
20343
|
+
}
|
|
20344
|
+
);
|
|
20256
20345
|
} else {
|
|
20257
20346
|
multiCellSelector.resetClick(position2);
|
|
20258
20347
|
}
|
|
@@ -23827,7 +23916,7 @@ function useHorizontalLayout() {
|
|
|
23827
23916
|
} = getDataSourceState();
|
|
23828
23917
|
let changes = false;
|
|
23829
23918
|
const rowsPerPage = brain.rowsPerPage;
|
|
23830
|
-
const newRowsPerPage = groupBy && groupBy.length > 0 ? rowsPerPage : null;
|
|
23919
|
+
const newRowsPerPage = groupBy && groupBy.length > 0 && rowsPerPage > 0 ? rowsPerPage : null;
|
|
23831
23920
|
if (currentRowsPerPage != newRowsPerPage) {
|
|
23832
23921
|
dataSourceActions.rowsPerPage = newRowsPerPage;
|
|
23833
23922
|
changes = true;
|
package/index.dev.mjs
CHANGED
|
@@ -16177,16 +16177,7 @@ function notNullable(value) {
|
|
|
16177
16177
|
return true;
|
|
16178
16178
|
}
|
|
16179
16179
|
|
|
16180
|
-
// src/components/
|
|
16181
|
-
function ensureSortedPerOrder(arr, sortPattern) {
|
|
16182
|
-
const arrSet = new Set(arr);
|
|
16183
|
-
return sortPattern.map((item) => {
|
|
16184
|
-
if (arrSet.has(item)) {
|
|
16185
|
-
return item;
|
|
16186
|
-
}
|
|
16187
|
-
return null;
|
|
16188
|
-
}).filter((x) => x != null);
|
|
16189
|
-
}
|
|
16180
|
+
// src/components/types/CellPositionByIndex.ts
|
|
16190
16181
|
function ensureMinMaxCellPositionByIndex(start, end) {
|
|
16191
16182
|
let { rowIndex: startRowIndex, colIndex: startColIndex } = start;
|
|
16192
16183
|
let { rowIndex: endRowIndex, colIndex: endColIndex } = end;
|
|
@@ -16197,6 +16188,64 @@ function ensureMinMaxCellPositionByIndex(start, end) {
|
|
|
16197
16188
|
{ rowIndex: rowEnd, colIndex: colEnd }
|
|
16198
16189
|
];
|
|
16199
16190
|
}
|
|
16191
|
+
function isSamePage(startPosition, endPosition, options) {
|
|
16192
|
+
const { rowsPerPage } = options;
|
|
16193
|
+
return !rowsPerPage ? true : Math.floor(startPosition.rowIndex / rowsPerPage) === Math.floor(endPosition.rowIndex / rowsPerPage);
|
|
16194
|
+
}
|
|
16195
|
+
function getPositionsArrayForRangeInHorizontaLLayout(startPosition, endPosition, options) {
|
|
16196
|
+
if (isSamePage(startPosition, endPosition, options)) {
|
|
16197
|
+
throw "You should not call this when the positions are in the same page";
|
|
16198
|
+
}
|
|
16199
|
+
const { rowsPerPage, columnsPerSet } = options;
|
|
16200
|
+
if (rowsPerPage === 0) {
|
|
16201
|
+
throw "rowsPerPage cannot be 0";
|
|
16202
|
+
}
|
|
16203
|
+
let start = startPosition;
|
|
16204
|
+
let end = endPosition;
|
|
16205
|
+
if (Math.floor(startPosition.rowIndex / rowsPerPage) > Math.floor(endPosition.rowIndex / rowsPerPage)) {
|
|
16206
|
+
start = endPosition;
|
|
16207
|
+
end = startPosition;
|
|
16208
|
+
}
|
|
16209
|
+
let { rowIndex: startRowIndex, colIndex: startColIndex } = start;
|
|
16210
|
+
let { rowIndex: endRowIndex, colIndex: endColIndex } = end;
|
|
16211
|
+
const pageForStartRowIndex = Math.floor(startRowIndex / rowsPerPage);
|
|
16212
|
+
const pageForEndRowIndex = Math.floor(endRowIndex / rowsPerPage);
|
|
16213
|
+
const offsetForStartRowIndex = startRowIndex % rowsPerPage;
|
|
16214
|
+
const offsetForEndRowIndex = endRowIndex % rowsPerPage;
|
|
16215
|
+
const minOffset = Math.min(offsetForStartRowIndex, offsetForEndRowIndex);
|
|
16216
|
+
const maxOffset = Math.max(offsetForStartRowIndex, offsetForEndRowIndex);
|
|
16217
|
+
const positions = [];
|
|
16218
|
+
for (let page = pageForStartRowIndex; page <= pageForEndRowIndex; page++) {
|
|
16219
|
+
for (let offset = minOffset; offset <= maxOffset; offset++) {
|
|
16220
|
+
const rowIndex = page * rowsPerPage + offset;
|
|
16221
|
+
if (page === pageForStartRowIndex) {
|
|
16222
|
+
for (let colIndex = startColIndex; colIndex < columnsPerSet; colIndex++) {
|
|
16223
|
+
positions.push({ rowIndex, colIndex });
|
|
16224
|
+
}
|
|
16225
|
+
} else if (page === pageForEndRowIndex) {
|
|
16226
|
+
for (let colIndex = 0; colIndex <= endColIndex; colIndex++) {
|
|
16227
|
+
positions.push({ rowIndex, colIndex });
|
|
16228
|
+
}
|
|
16229
|
+
} else {
|
|
16230
|
+
for (let colIndex = 0; colIndex < columnsPerSet; colIndex++) {
|
|
16231
|
+
positions.push({ rowIndex, colIndex });
|
|
16232
|
+
}
|
|
16233
|
+
}
|
|
16234
|
+
}
|
|
16235
|
+
}
|
|
16236
|
+
return positions;
|
|
16237
|
+
}
|
|
16238
|
+
|
|
16239
|
+
// src/components/InfiniteTable/api/getCellSelectionApi.ts
|
|
16240
|
+
function ensureSortedPerOrder(arr, sortPattern) {
|
|
16241
|
+
const arrSet = new Set(arr);
|
|
16242
|
+
return sortPattern.map((item) => {
|
|
16243
|
+
if (arrSet.has(item)) {
|
|
16244
|
+
return item;
|
|
16245
|
+
}
|
|
16246
|
+
return null;
|
|
16247
|
+
}).filter((x) => x != null);
|
|
16248
|
+
}
|
|
16200
16249
|
var InfiniteTableCellSelectionApiImpl = class {
|
|
16201
16250
|
constructor(param) {
|
|
16202
16251
|
this.getCellSelectionPosition = (options) => {
|
|
@@ -18037,7 +18086,7 @@ var MultiCellSelector = class {
|
|
|
18037
18086
|
this.multiSelectEndPosition = void 0;
|
|
18038
18087
|
}
|
|
18039
18088
|
}
|
|
18040
|
-
multiSelectClick(position2) {
|
|
18089
|
+
multiSelectClick(position2, options) {
|
|
18041
18090
|
if (!this.multiSelectStartPosition) {
|
|
18042
18091
|
return;
|
|
18043
18092
|
}
|
|
@@ -18048,13 +18097,39 @@ var MultiCellSelector = class {
|
|
|
18048
18097
|
if (this.multiSelectEndPosition) {
|
|
18049
18098
|
this.deselectRange(
|
|
18050
18099
|
this.multiSelectStartPosition,
|
|
18051
|
-
this.multiSelectEndPosition
|
|
18100
|
+
this.multiSelectEndPosition,
|
|
18101
|
+
options
|
|
18052
18102
|
);
|
|
18053
18103
|
}
|
|
18054
|
-
this.selectRange(this.multiSelectStartPosition, position2);
|
|
18104
|
+
this.selectRange(this.multiSelectStartPosition, position2, options);
|
|
18055
18105
|
this.multiSelectEndPosition = position2;
|
|
18056
18106
|
}
|
|
18057
|
-
setRangeSelected(startPosition, endPosition, selected) {
|
|
18107
|
+
setRangeSelected(startPosition, endPosition, selected, options) {
|
|
18108
|
+
if (options.horizontalLayout && !isSamePage(startPosition, endPosition, options)) {
|
|
18109
|
+
const positions = getPositionsArrayForRangeInHorizontaLLayout(
|
|
18110
|
+
startPosition,
|
|
18111
|
+
endPosition,
|
|
18112
|
+
{
|
|
18113
|
+
rowsPerPage: options.rowsPerPage,
|
|
18114
|
+
columnsPerSet: options.columnsPerSet
|
|
18115
|
+
}
|
|
18116
|
+
);
|
|
18117
|
+
positions.forEach((position2) => {
|
|
18118
|
+
const selectionPosition = this.getCellSelectionPosition({
|
|
18119
|
+
rowIndex: position2.rowIndex,
|
|
18120
|
+
colIndex: position2.colIndex
|
|
18121
|
+
});
|
|
18122
|
+
if (!selectionPosition) {
|
|
18123
|
+
return;
|
|
18124
|
+
}
|
|
18125
|
+
if (selected) {
|
|
18126
|
+
this.cellSelectionState.selectCell(...selectionPosition);
|
|
18127
|
+
} else {
|
|
18128
|
+
this.cellSelectionState.deselectCell(...selectionPosition);
|
|
18129
|
+
}
|
|
18130
|
+
});
|
|
18131
|
+
return;
|
|
18132
|
+
}
|
|
18058
18133
|
const [start, end] = ensureMinMaxCellPositionByIndex(
|
|
18059
18134
|
startPosition,
|
|
18060
18135
|
endPosition
|
|
@@ -18081,11 +18156,11 @@ var MultiCellSelector = class {
|
|
|
18081
18156
|
}
|
|
18082
18157
|
}
|
|
18083
18158
|
}
|
|
18084
|
-
deselectRange(startPosition, endPosition) {
|
|
18085
|
-
this.setRangeSelected(startPosition, endPosition, false);
|
|
18159
|
+
deselectRange(startPosition, endPosition, options) {
|
|
18160
|
+
this.setRangeSelected(startPosition, endPosition, false, options);
|
|
18086
18161
|
}
|
|
18087
|
-
selectRange(startPosition, endPosition) {
|
|
18088
|
-
this.setRangeSelected(startPosition, endPosition, true);
|
|
18162
|
+
selectRange(startPosition, endPosition, options) {
|
|
18163
|
+
this.setRangeSelected(startPosition, endPosition, true, options);
|
|
18089
18164
|
}
|
|
18090
18165
|
};
|
|
18091
18166
|
|
|
@@ -20083,7 +20158,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
20083
20158
|
}
|
|
20084
20159
|
let valid2 = isValidLicense(licenseKey, {
|
|
20085
20160
|
publishedAt: 1624970570587,
|
|
20086
|
-
version: "5.0.
|
|
20161
|
+
version: "5.0.2"
|
|
20087
20162
|
});
|
|
20088
20163
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
20089
20164
|
return true;
|
|
@@ -20195,6 +20270,7 @@ function onCellDoubleClick(context, _event) {
|
|
|
20195
20270
|
function updateCellSelectionOnCellClick(context, event) {
|
|
20196
20271
|
const {
|
|
20197
20272
|
getDataSourceState,
|
|
20273
|
+
getState,
|
|
20198
20274
|
getComputed,
|
|
20199
20275
|
rowIndex,
|
|
20200
20276
|
colIndex,
|
|
@@ -20208,7 +20284,10 @@ function updateCellSelectionOnCellClick(context, event) {
|
|
|
20208
20284
|
if (selectionMode !== "multi-cell") {
|
|
20209
20285
|
return;
|
|
20210
20286
|
}
|
|
20211
|
-
const { multiCellSelector } = getComputed();
|
|
20287
|
+
const { multiCellSelector, computedVisibleColumns } = getComputed();
|
|
20288
|
+
const { brain } = getState();
|
|
20289
|
+
const { rowsPerPage } = brain;
|
|
20290
|
+
const columnsPerSet = computedVisibleColumns.length;
|
|
20212
20291
|
const cellSelection = new CellSelectionState(existingCellSelection);
|
|
20213
20292
|
multiCellSelector.cellSelectionState = cellSelection;
|
|
20214
20293
|
const position2 = {
|
|
@@ -20218,7 +20297,17 @@ function updateCellSelectionOnCellClick(context, event) {
|
|
|
20218
20297
|
if (event.metaKey || event.ctrlKey) {
|
|
20219
20298
|
multiCellSelector.singleAddClick(position2);
|
|
20220
20299
|
} else if (event.shiftKey) {
|
|
20221
|
-
|
|
20300
|
+
const horizontalLayout = !!getState().wrapRowsHorizontally;
|
|
20301
|
+
multiCellSelector.multiSelectClick(
|
|
20302
|
+
position2,
|
|
20303
|
+
horizontalLayout ? {
|
|
20304
|
+
horizontalLayout,
|
|
20305
|
+
rowsPerPage,
|
|
20306
|
+
columnsPerSet
|
|
20307
|
+
} : {
|
|
20308
|
+
horizontalLayout
|
|
20309
|
+
}
|
|
20310
|
+
);
|
|
20222
20311
|
} else {
|
|
20223
20312
|
multiCellSelector.resetClick(position2);
|
|
20224
20313
|
}
|
|
@@ -23803,7 +23892,7 @@ function useHorizontalLayout() {
|
|
|
23803
23892
|
} = getDataSourceState();
|
|
23804
23893
|
let changes = false;
|
|
23805
23894
|
const rowsPerPage = brain.rowsPerPage;
|
|
23806
|
-
const newRowsPerPage = groupBy && groupBy.length > 0 ? rowsPerPage : null;
|
|
23895
|
+
const newRowsPerPage = groupBy && groupBy.length > 0 && rowsPerPage > 0 ? rowsPerPage : null;
|
|
23807
23896
|
if (currentRowsPerPage != newRowsPerPage) {
|
|
23808
23897
|
dataSourceActions.rowsPerPage = newRowsPerPage;
|
|
23809
23898
|
changes = true;
|
package/index.js
CHANGED
|
@@ -16215,16 +16215,7 @@ function notNullable(value) {
|
|
|
16215
16215
|
return true;
|
|
16216
16216
|
}
|
|
16217
16217
|
|
|
16218
|
-
// src/components/
|
|
16219
|
-
function ensureSortedPerOrder(arr, sortPattern) {
|
|
16220
|
-
const arrSet = new Set(arr);
|
|
16221
|
-
return sortPattern.map((item) => {
|
|
16222
|
-
if (arrSet.has(item)) {
|
|
16223
|
-
return item;
|
|
16224
|
-
}
|
|
16225
|
-
return null;
|
|
16226
|
-
}).filter((x) => x != null);
|
|
16227
|
-
}
|
|
16218
|
+
// src/components/types/CellPositionByIndex.ts
|
|
16228
16219
|
function ensureMinMaxCellPositionByIndex(start, end) {
|
|
16229
16220
|
let { rowIndex: startRowIndex, colIndex: startColIndex } = start;
|
|
16230
16221
|
let { rowIndex: endRowIndex, colIndex: endColIndex } = end;
|
|
@@ -16235,6 +16226,64 @@ function ensureMinMaxCellPositionByIndex(start, end) {
|
|
|
16235
16226
|
{ rowIndex: rowEnd, colIndex: colEnd }
|
|
16236
16227
|
];
|
|
16237
16228
|
}
|
|
16229
|
+
function isSamePage(startPosition, endPosition, options) {
|
|
16230
|
+
const { rowsPerPage } = options;
|
|
16231
|
+
return !rowsPerPage ? true : Math.floor(startPosition.rowIndex / rowsPerPage) === Math.floor(endPosition.rowIndex / rowsPerPage);
|
|
16232
|
+
}
|
|
16233
|
+
function getPositionsArrayForRangeInHorizontaLLayout(startPosition, endPosition, options) {
|
|
16234
|
+
if (isSamePage(startPosition, endPosition, options)) {
|
|
16235
|
+
throw "You should not call this when the positions are in the same page";
|
|
16236
|
+
}
|
|
16237
|
+
const { rowsPerPage, columnsPerSet } = options;
|
|
16238
|
+
if (rowsPerPage === 0) {
|
|
16239
|
+
throw "rowsPerPage cannot be 0";
|
|
16240
|
+
}
|
|
16241
|
+
let start = startPosition;
|
|
16242
|
+
let end = endPosition;
|
|
16243
|
+
if (Math.floor(startPosition.rowIndex / rowsPerPage) > Math.floor(endPosition.rowIndex / rowsPerPage)) {
|
|
16244
|
+
start = endPosition;
|
|
16245
|
+
end = startPosition;
|
|
16246
|
+
}
|
|
16247
|
+
let { rowIndex: startRowIndex, colIndex: startColIndex } = start;
|
|
16248
|
+
let { rowIndex: endRowIndex, colIndex: endColIndex } = end;
|
|
16249
|
+
const pageForStartRowIndex = Math.floor(startRowIndex / rowsPerPage);
|
|
16250
|
+
const pageForEndRowIndex = Math.floor(endRowIndex / rowsPerPage);
|
|
16251
|
+
const offsetForStartRowIndex = startRowIndex % rowsPerPage;
|
|
16252
|
+
const offsetForEndRowIndex = endRowIndex % rowsPerPage;
|
|
16253
|
+
const minOffset = Math.min(offsetForStartRowIndex, offsetForEndRowIndex);
|
|
16254
|
+
const maxOffset = Math.max(offsetForStartRowIndex, offsetForEndRowIndex);
|
|
16255
|
+
const positions = [];
|
|
16256
|
+
for (let page = pageForStartRowIndex; page <= pageForEndRowIndex; page++) {
|
|
16257
|
+
for (let offset = minOffset; offset <= maxOffset; offset++) {
|
|
16258
|
+
const rowIndex = page * rowsPerPage + offset;
|
|
16259
|
+
if (page === pageForStartRowIndex) {
|
|
16260
|
+
for (let colIndex = startColIndex; colIndex < columnsPerSet; colIndex++) {
|
|
16261
|
+
positions.push({ rowIndex, colIndex });
|
|
16262
|
+
}
|
|
16263
|
+
} else if (page === pageForEndRowIndex) {
|
|
16264
|
+
for (let colIndex = 0; colIndex <= endColIndex; colIndex++) {
|
|
16265
|
+
positions.push({ rowIndex, colIndex });
|
|
16266
|
+
}
|
|
16267
|
+
} else {
|
|
16268
|
+
for (let colIndex = 0; colIndex < columnsPerSet; colIndex++) {
|
|
16269
|
+
positions.push({ rowIndex, colIndex });
|
|
16270
|
+
}
|
|
16271
|
+
}
|
|
16272
|
+
}
|
|
16273
|
+
}
|
|
16274
|
+
return positions;
|
|
16275
|
+
}
|
|
16276
|
+
|
|
16277
|
+
// src/components/InfiniteTable/api/getCellSelectionApi.ts
|
|
16278
|
+
function ensureSortedPerOrder(arr, sortPattern) {
|
|
16279
|
+
const arrSet = new Set(arr);
|
|
16280
|
+
return sortPattern.map((item) => {
|
|
16281
|
+
if (arrSet.has(item)) {
|
|
16282
|
+
return item;
|
|
16283
|
+
}
|
|
16284
|
+
return null;
|
|
16285
|
+
}).filter((x) => x != null);
|
|
16286
|
+
}
|
|
16238
16287
|
var InfiniteTableCellSelectionApiImpl = class {
|
|
16239
16288
|
constructor(param) {
|
|
16240
16289
|
this.getCellSelectionPosition = (options) => {
|
|
@@ -18071,7 +18120,7 @@ var MultiCellSelector = class {
|
|
|
18071
18120
|
this.multiSelectEndPosition = void 0;
|
|
18072
18121
|
}
|
|
18073
18122
|
}
|
|
18074
|
-
multiSelectClick(position2) {
|
|
18123
|
+
multiSelectClick(position2, options) {
|
|
18075
18124
|
if (!this.multiSelectStartPosition) {
|
|
18076
18125
|
return;
|
|
18077
18126
|
}
|
|
@@ -18082,13 +18131,39 @@ var MultiCellSelector = class {
|
|
|
18082
18131
|
if (this.multiSelectEndPosition) {
|
|
18083
18132
|
this.deselectRange(
|
|
18084
18133
|
this.multiSelectStartPosition,
|
|
18085
|
-
this.multiSelectEndPosition
|
|
18134
|
+
this.multiSelectEndPosition,
|
|
18135
|
+
options
|
|
18086
18136
|
);
|
|
18087
18137
|
}
|
|
18088
|
-
this.selectRange(this.multiSelectStartPosition, position2);
|
|
18138
|
+
this.selectRange(this.multiSelectStartPosition, position2, options);
|
|
18089
18139
|
this.multiSelectEndPosition = position2;
|
|
18090
18140
|
}
|
|
18091
|
-
setRangeSelected(startPosition, endPosition, selected) {
|
|
18141
|
+
setRangeSelected(startPosition, endPosition, selected, options) {
|
|
18142
|
+
if (options.horizontalLayout && !isSamePage(startPosition, endPosition, options)) {
|
|
18143
|
+
const positions = getPositionsArrayForRangeInHorizontaLLayout(
|
|
18144
|
+
startPosition,
|
|
18145
|
+
endPosition,
|
|
18146
|
+
{
|
|
18147
|
+
rowsPerPage: options.rowsPerPage,
|
|
18148
|
+
columnsPerSet: options.columnsPerSet
|
|
18149
|
+
}
|
|
18150
|
+
);
|
|
18151
|
+
positions.forEach((position2) => {
|
|
18152
|
+
const selectionPosition = this.getCellSelectionPosition({
|
|
18153
|
+
rowIndex: position2.rowIndex,
|
|
18154
|
+
colIndex: position2.colIndex
|
|
18155
|
+
});
|
|
18156
|
+
if (!selectionPosition) {
|
|
18157
|
+
return;
|
|
18158
|
+
}
|
|
18159
|
+
if (selected) {
|
|
18160
|
+
this.cellSelectionState.selectCell(...selectionPosition);
|
|
18161
|
+
} else {
|
|
18162
|
+
this.cellSelectionState.deselectCell(...selectionPosition);
|
|
18163
|
+
}
|
|
18164
|
+
});
|
|
18165
|
+
return;
|
|
18166
|
+
}
|
|
18092
18167
|
const [start, end] = ensureMinMaxCellPositionByIndex(
|
|
18093
18168
|
startPosition,
|
|
18094
18169
|
endPosition
|
|
@@ -18115,11 +18190,11 @@ var MultiCellSelector = class {
|
|
|
18115
18190
|
}
|
|
18116
18191
|
}
|
|
18117
18192
|
}
|
|
18118
|
-
deselectRange(startPosition, endPosition) {
|
|
18119
|
-
this.setRangeSelected(startPosition, endPosition, false);
|
|
18193
|
+
deselectRange(startPosition, endPosition, options) {
|
|
18194
|
+
this.setRangeSelected(startPosition, endPosition, false, options);
|
|
18120
18195
|
}
|
|
18121
|
-
selectRange(startPosition, endPosition) {
|
|
18122
|
-
this.setRangeSelected(startPosition, endPosition, true);
|
|
18196
|
+
selectRange(startPosition, endPosition, options) {
|
|
18197
|
+
this.setRangeSelected(startPosition, endPosition, true, options);
|
|
18123
18198
|
}
|
|
18124
18199
|
};
|
|
18125
18200
|
|
|
@@ -20117,7 +20192,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
20117
20192
|
}
|
|
20118
20193
|
let valid2 = isValidLicense(licenseKey, {
|
|
20119
20194
|
publishedAt: 1624970570587,
|
|
20120
|
-
version: "5.0.
|
|
20195
|
+
version: "5.0.2"
|
|
20121
20196
|
});
|
|
20122
20197
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
20123
20198
|
return true;
|
|
@@ -20229,6 +20304,7 @@ function onCellDoubleClick(context, _event) {
|
|
|
20229
20304
|
function updateCellSelectionOnCellClick(context, event) {
|
|
20230
20305
|
const {
|
|
20231
20306
|
getDataSourceState,
|
|
20307
|
+
getState,
|
|
20232
20308
|
getComputed,
|
|
20233
20309
|
rowIndex,
|
|
20234
20310
|
colIndex,
|
|
@@ -20242,7 +20318,10 @@ function updateCellSelectionOnCellClick(context, event) {
|
|
|
20242
20318
|
if (selectionMode !== "multi-cell") {
|
|
20243
20319
|
return;
|
|
20244
20320
|
}
|
|
20245
|
-
const { multiCellSelector } = getComputed();
|
|
20321
|
+
const { multiCellSelector, computedVisibleColumns } = getComputed();
|
|
20322
|
+
const { brain } = getState();
|
|
20323
|
+
const { rowsPerPage } = brain;
|
|
20324
|
+
const columnsPerSet = computedVisibleColumns.length;
|
|
20246
20325
|
const cellSelection = new CellSelectionState(existingCellSelection);
|
|
20247
20326
|
multiCellSelector.cellSelectionState = cellSelection;
|
|
20248
20327
|
const position2 = {
|
|
@@ -20252,7 +20331,17 @@ function updateCellSelectionOnCellClick(context, event) {
|
|
|
20252
20331
|
if (event.metaKey || event.ctrlKey) {
|
|
20253
20332
|
multiCellSelector.singleAddClick(position2);
|
|
20254
20333
|
} else if (event.shiftKey) {
|
|
20255
|
-
|
|
20334
|
+
const horizontalLayout = !!getState().wrapRowsHorizontally;
|
|
20335
|
+
multiCellSelector.multiSelectClick(
|
|
20336
|
+
position2,
|
|
20337
|
+
horizontalLayout ? {
|
|
20338
|
+
horizontalLayout,
|
|
20339
|
+
rowsPerPage,
|
|
20340
|
+
columnsPerSet
|
|
20341
|
+
} : {
|
|
20342
|
+
horizontalLayout
|
|
20343
|
+
}
|
|
20344
|
+
);
|
|
20256
20345
|
} else {
|
|
20257
20346
|
multiCellSelector.resetClick(position2);
|
|
20258
20347
|
}
|
|
@@ -23827,7 +23916,7 @@ function useHorizontalLayout() {
|
|
|
23827
23916
|
} = getDataSourceState();
|
|
23828
23917
|
let changes = false;
|
|
23829
23918
|
const rowsPerPage = brain.rowsPerPage;
|
|
23830
|
-
const newRowsPerPage = groupBy && groupBy.length > 0 ? rowsPerPage : null;
|
|
23919
|
+
const newRowsPerPage = groupBy && groupBy.length > 0 && rowsPerPage > 0 ? rowsPerPage : null;
|
|
23831
23920
|
if (currentRowsPerPage != newRowsPerPage) {
|
|
23832
23921
|
dataSourceActions.rowsPerPage = newRowsPerPage;
|
|
23833
23922
|
changes = true;
|
package/index.mjs
CHANGED
|
@@ -16177,16 +16177,7 @@ function notNullable(value) {
|
|
|
16177
16177
|
return true;
|
|
16178
16178
|
}
|
|
16179
16179
|
|
|
16180
|
-
// src/components/
|
|
16181
|
-
function ensureSortedPerOrder(arr, sortPattern) {
|
|
16182
|
-
const arrSet = new Set(arr);
|
|
16183
|
-
return sortPattern.map((item) => {
|
|
16184
|
-
if (arrSet.has(item)) {
|
|
16185
|
-
return item;
|
|
16186
|
-
}
|
|
16187
|
-
return null;
|
|
16188
|
-
}).filter((x) => x != null);
|
|
16189
|
-
}
|
|
16180
|
+
// src/components/types/CellPositionByIndex.ts
|
|
16190
16181
|
function ensureMinMaxCellPositionByIndex(start, end) {
|
|
16191
16182
|
let { rowIndex: startRowIndex, colIndex: startColIndex } = start;
|
|
16192
16183
|
let { rowIndex: endRowIndex, colIndex: endColIndex } = end;
|
|
@@ -16197,6 +16188,64 @@ function ensureMinMaxCellPositionByIndex(start, end) {
|
|
|
16197
16188
|
{ rowIndex: rowEnd, colIndex: colEnd }
|
|
16198
16189
|
];
|
|
16199
16190
|
}
|
|
16191
|
+
function isSamePage(startPosition, endPosition, options) {
|
|
16192
|
+
const { rowsPerPage } = options;
|
|
16193
|
+
return !rowsPerPage ? true : Math.floor(startPosition.rowIndex / rowsPerPage) === Math.floor(endPosition.rowIndex / rowsPerPage);
|
|
16194
|
+
}
|
|
16195
|
+
function getPositionsArrayForRangeInHorizontaLLayout(startPosition, endPosition, options) {
|
|
16196
|
+
if (isSamePage(startPosition, endPosition, options)) {
|
|
16197
|
+
throw "You should not call this when the positions are in the same page";
|
|
16198
|
+
}
|
|
16199
|
+
const { rowsPerPage, columnsPerSet } = options;
|
|
16200
|
+
if (rowsPerPage === 0) {
|
|
16201
|
+
throw "rowsPerPage cannot be 0";
|
|
16202
|
+
}
|
|
16203
|
+
let start = startPosition;
|
|
16204
|
+
let end = endPosition;
|
|
16205
|
+
if (Math.floor(startPosition.rowIndex / rowsPerPage) > Math.floor(endPosition.rowIndex / rowsPerPage)) {
|
|
16206
|
+
start = endPosition;
|
|
16207
|
+
end = startPosition;
|
|
16208
|
+
}
|
|
16209
|
+
let { rowIndex: startRowIndex, colIndex: startColIndex } = start;
|
|
16210
|
+
let { rowIndex: endRowIndex, colIndex: endColIndex } = end;
|
|
16211
|
+
const pageForStartRowIndex = Math.floor(startRowIndex / rowsPerPage);
|
|
16212
|
+
const pageForEndRowIndex = Math.floor(endRowIndex / rowsPerPage);
|
|
16213
|
+
const offsetForStartRowIndex = startRowIndex % rowsPerPage;
|
|
16214
|
+
const offsetForEndRowIndex = endRowIndex % rowsPerPage;
|
|
16215
|
+
const minOffset = Math.min(offsetForStartRowIndex, offsetForEndRowIndex);
|
|
16216
|
+
const maxOffset = Math.max(offsetForStartRowIndex, offsetForEndRowIndex);
|
|
16217
|
+
const positions = [];
|
|
16218
|
+
for (let page = pageForStartRowIndex; page <= pageForEndRowIndex; page++) {
|
|
16219
|
+
for (let offset = minOffset; offset <= maxOffset; offset++) {
|
|
16220
|
+
const rowIndex = page * rowsPerPage + offset;
|
|
16221
|
+
if (page === pageForStartRowIndex) {
|
|
16222
|
+
for (let colIndex = startColIndex; colIndex < columnsPerSet; colIndex++) {
|
|
16223
|
+
positions.push({ rowIndex, colIndex });
|
|
16224
|
+
}
|
|
16225
|
+
} else if (page === pageForEndRowIndex) {
|
|
16226
|
+
for (let colIndex = 0; colIndex <= endColIndex; colIndex++) {
|
|
16227
|
+
positions.push({ rowIndex, colIndex });
|
|
16228
|
+
}
|
|
16229
|
+
} else {
|
|
16230
|
+
for (let colIndex = 0; colIndex < columnsPerSet; colIndex++) {
|
|
16231
|
+
positions.push({ rowIndex, colIndex });
|
|
16232
|
+
}
|
|
16233
|
+
}
|
|
16234
|
+
}
|
|
16235
|
+
}
|
|
16236
|
+
return positions;
|
|
16237
|
+
}
|
|
16238
|
+
|
|
16239
|
+
// src/components/InfiniteTable/api/getCellSelectionApi.ts
|
|
16240
|
+
function ensureSortedPerOrder(arr, sortPattern) {
|
|
16241
|
+
const arrSet = new Set(arr);
|
|
16242
|
+
return sortPattern.map((item) => {
|
|
16243
|
+
if (arrSet.has(item)) {
|
|
16244
|
+
return item;
|
|
16245
|
+
}
|
|
16246
|
+
return null;
|
|
16247
|
+
}).filter((x) => x != null);
|
|
16248
|
+
}
|
|
16200
16249
|
var InfiniteTableCellSelectionApiImpl = class {
|
|
16201
16250
|
constructor(param) {
|
|
16202
16251
|
this.getCellSelectionPosition = (options) => {
|
|
@@ -18037,7 +18086,7 @@ var MultiCellSelector = class {
|
|
|
18037
18086
|
this.multiSelectEndPosition = void 0;
|
|
18038
18087
|
}
|
|
18039
18088
|
}
|
|
18040
|
-
multiSelectClick(position2) {
|
|
18089
|
+
multiSelectClick(position2, options) {
|
|
18041
18090
|
if (!this.multiSelectStartPosition) {
|
|
18042
18091
|
return;
|
|
18043
18092
|
}
|
|
@@ -18048,13 +18097,39 @@ var MultiCellSelector = class {
|
|
|
18048
18097
|
if (this.multiSelectEndPosition) {
|
|
18049
18098
|
this.deselectRange(
|
|
18050
18099
|
this.multiSelectStartPosition,
|
|
18051
|
-
this.multiSelectEndPosition
|
|
18100
|
+
this.multiSelectEndPosition,
|
|
18101
|
+
options
|
|
18052
18102
|
);
|
|
18053
18103
|
}
|
|
18054
|
-
this.selectRange(this.multiSelectStartPosition, position2);
|
|
18104
|
+
this.selectRange(this.multiSelectStartPosition, position2, options);
|
|
18055
18105
|
this.multiSelectEndPosition = position2;
|
|
18056
18106
|
}
|
|
18057
|
-
setRangeSelected(startPosition, endPosition, selected) {
|
|
18107
|
+
setRangeSelected(startPosition, endPosition, selected, options) {
|
|
18108
|
+
if (options.horizontalLayout && !isSamePage(startPosition, endPosition, options)) {
|
|
18109
|
+
const positions = getPositionsArrayForRangeInHorizontaLLayout(
|
|
18110
|
+
startPosition,
|
|
18111
|
+
endPosition,
|
|
18112
|
+
{
|
|
18113
|
+
rowsPerPage: options.rowsPerPage,
|
|
18114
|
+
columnsPerSet: options.columnsPerSet
|
|
18115
|
+
}
|
|
18116
|
+
);
|
|
18117
|
+
positions.forEach((position2) => {
|
|
18118
|
+
const selectionPosition = this.getCellSelectionPosition({
|
|
18119
|
+
rowIndex: position2.rowIndex,
|
|
18120
|
+
colIndex: position2.colIndex
|
|
18121
|
+
});
|
|
18122
|
+
if (!selectionPosition) {
|
|
18123
|
+
return;
|
|
18124
|
+
}
|
|
18125
|
+
if (selected) {
|
|
18126
|
+
this.cellSelectionState.selectCell(...selectionPosition);
|
|
18127
|
+
} else {
|
|
18128
|
+
this.cellSelectionState.deselectCell(...selectionPosition);
|
|
18129
|
+
}
|
|
18130
|
+
});
|
|
18131
|
+
return;
|
|
18132
|
+
}
|
|
18058
18133
|
const [start, end] = ensureMinMaxCellPositionByIndex(
|
|
18059
18134
|
startPosition,
|
|
18060
18135
|
endPosition
|
|
@@ -18081,11 +18156,11 @@ var MultiCellSelector = class {
|
|
|
18081
18156
|
}
|
|
18082
18157
|
}
|
|
18083
18158
|
}
|
|
18084
|
-
deselectRange(startPosition, endPosition) {
|
|
18085
|
-
this.setRangeSelected(startPosition, endPosition, false);
|
|
18159
|
+
deselectRange(startPosition, endPosition, options) {
|
|
18160
|
+
this.setRangeSelected(startPosition, endPosition, false, options);
|
|
18086
18161
|
}
|
|
18087
|
-
selectRange(startPosition, endPosition) {
|
|
18088
|
-
this.setRangeSelected(startPosition, endPosition, true);
|
|
18162
|
+
selectRange(startPosition, endPosition, options) {
|
|
18163
|
+
this.setRangeSelected(startPosition, endPosition, true, options);
|
|
18089
18164
|
}
|
|
18090
18165
|
};
|
|
18091
18166
|
|
|
@@ -20083,7 +20158,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
20083
20158
|
}
|
|
20084
20159
|
let valid2 = isValidLicense(licenseKey, {
|
|
20085
20160
|
publishedAt: 1624970570587,
|
|
20086
|
-
version: "5.0.
|
|
20161
|
+
version: "5.0.2"
|
|
20087
20162
|
});
|
|
20088
20163
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
20089
20164
|
return true;
|
|
@@ -20195,6 +20270,7 @@ function onCellDoubleClick(context, _event) {
|
|
|
20195
20270
|
function updateCellSelectionOnCellClick(context, event) {
|
|
20196
20271
|
const {
|
|
20197
20272
|
getDataSourceState,
|
|
20273
|
+
getState,
|
|
20198
20274
|
getComputed,
|
|
20199
20275
|
rowIndex,
|
|
20200
20276
|
colIndex,
|
|
@@ -20208,7 +20284,10 @@ function updateCellSelectionOnCellClick(context, event) {
|
|
|
20208
20284
|
if (selectionMode !== "multi-cell") {
|
|
20209
20285
|
return;
|
|
20210
20286
|
}
|
|
20211
|
-
const { multiCellSelector } = getComputed();
|
|
20287
|
+
const { multiCellSelector, computedVisibleColumns } = getComputed();
|
|
20288
|
+
const { brain } = getState();
|
|
20289
|
+
const { rowsPerPage } = brain;
|
|
20290
|
+
const columnsPerSet = computedVisibleColumns.length;
|
|
20212
20291
|
const cellSelection = new CellSelectionState(existingCellSelection);
|
|
20213
20292
|
multiCellSelector.cellSelectionState = cellSelection;
|
|
20214
20293
|
const position2 = {
|
|
@@ -20218,7 +20297,17 @@ function updateCellSelectionOnCellClick(context, event) {
|
|
|
20218
20297
|
if (event.metaKey || event.ctrlKey) {
|
|
20219
20298
|
multiCellSelector.singleAddClick(position2);
|
|
20220
20299
|
} else if (event.shiftKey) {
|
|
20221
|
-
|
|
20300
|
+
const horizontalLayout = !!getState().wrapRowsHorizontally;
|
|
20301
|
+
multiCellSelector.multiSelectClick(
|
|
20302
|
+
position2,
|
|
20303
|
+
horizontalLayout ? {
|
|
20304
|
+
horizontalLayout,
|
|
20305
|
+
rowsPerPage,
|
|
20306
|
+
columnsPerSet
|
|
20307
|
+
} : {
|
|
20308
|
+
horizontalLayout
|
|
20309
|
+
}
|
|
20310
|
+
);
|
|
20222
20311
|
} else {
|
|
20223
20312
|
multiCellSelector.resetClick(position2);
|
|
20224
20313
|
}
|
|
@@ -23803,7 +23892,7 @@ function useHorizontalLayout() {
|
|
|
23803
23892
|
} = getDataSourceState();
|
|
23804
23893
|
let changes = false;
|
|
23805
23894
|
const rowsPerPage = brain.rowsPerPage;
|
|
23806
|
-
const newRowsPerPage = groupBy && groupBy.length > 0 ? rowsPerPage : null;
|
|
23895
|
+
const newRowsPerPage = groupBy && groupBy.length > 0 && rowsPerPage > 0 ? rowsPerPage : null;
|
|
23807
23896
|
if (currentRowsPerPage != newRowsPerPage) {
|
|
23808
23897
|
dataSourceActions.rowsPerPage = newRowsPerPage;
|
|
23809
23898
|
changes = true;
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"bugs": {
|
|
26
26
|
"url": "https://github.com/infinite-table/infinite-react/issues"
|
|
27
27
|
},
|
|
28
|
-
"version": "5.0.
|
|
28
|
+
"version": "5.0.2",
|
|
29
29
|
"main": "index.js",
|
|
30
30
|
"module": "index.mjs",
|
|
31
31
|
"typings": "index.d.ts",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
},
|
|
35
35
|
"license": "Commercial & Open Source",
|
|
36
36
|
"//": "will be updated at build time",
|
|
37
|
-
"publishedAt":
|
|
37
|
+
"publishedAt": 1728552676092
|
|
38
38
|
}
|