@charlesgomes/leafcode-shared-lib-react 1.0.33 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +9 -9
- package/dist/index.js +10 -12
- package/dist/index.mjs +10 -12
- package/dist/styles/table.css +20 -11
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -166,10 +166,6 @@ th {
|
|
|
166
166
|
width: 1rem;
|
|
167
167
|
height: 1rem;
|
|
168
168
|
}
|
|
169
|
-
.p-column-header-content .p-checkbox {
|
|
170
|
-
position: relative;
|
|
171
|
-
left: -2px;
|
|
172
|
-
}
|
|
173
169
|
.p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover).p-highlight .p-checkbox-box {
|
|
174
170
|
border-color: #094394;
|
|
175
171
|
background: #094394;
|
|
@@ -181,14 +177,18 @@ th {
|
|
|
181
177
|
vertical-align: middle;
|
|
182
178
|
position: relative;
|
|
183
179
|
}
|
|
184
|
-
.p-datatable .p-datatable-tbody > tr > td.p-selection-column .p-checkbox {
|
|
185
|
-
position: relative;
|
|
186
|
-
left: -2px;
|
|
187
|
-
}
|
|
188
180
|
.p-datatable .p-datatable-thead > tr > th.p-selection-column .p-checkbox-input {
|
|
189
181
|
text-align: center !important;
|
|
182
|
+
position: absolute;
|
|
183
|
+
}
|
|
184
|
+
.p-selection-column .p-column-header-content {
|
|
190
185
|
position: relative;
|
|
191
|
-
|
|
186
|
+
top: 0;
|
|
187
|
+
right: 0;
|
|
188
|
+
transform: translate(-40%, 0);
|
|
189
|
+
}
|
|
190
|
+
.p-checkbox-input {
|
|
191
|
+
position: absolute;
|
|
192
192
|
}
|
|
193
193
|
.p-selection-column .p-checkbox {
|
|
194
194
|
display: inline-flex;
|
package/dist/index.js
CHANGED
|
@@ -1148,7 +1148,12 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1148
1148
|
const resolvedItems = items ?? getDefaultFilterMatchOptionsString(isLanguagePtBr);
|
|
1149
1149
|
const rawFilter = options.value ?? {};
|
|
1150
1150
|
const currentMatchMode = rawFilter.matchMode ?? "contains";
|
|
1151
|
-
|
|
1151
|
+
let currentValue = "";
|
|
1152
|
+
if (typeof rawFilter.value === "string") {
|
|
1153
|
+
currentValue = rawFilter.value;
|
|
1154
|
+
} else if (rawFilter.value && typeof rawFilter.value === "object" && typeof rawFilter.value.value === "string") {
|
|
1155
|
+
currentValue = rawFilter.value.value;
|
|
1156
|
+
}
|
|
1152
1157
|
const isSpecial = currentMatchMode === customMatchModes.empty || currentMatchMode === customMatchModes.notEmpty;
|
|
1153
1158
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1154
1159
|
"div",
|
|
@@ -1173,15 +1178,8 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1173
1178
|
onChange: (e) => {
|
|
1174
1179
|
const newMatchMode = e.value;
|
|
1175
1180
|
const isNewSpecial = newMatchMode === customMatchModes.empty || newMatchMode === customMatchModes.notEmpty;
|
|
1176
|
-
if (isNewSpecial) {
|
|
1177
|
-
options.filterCallback({
|
|
1178
|
-
value: null,
|
|
1179
|
-
matchMode: newMatchMode
|
|
1180
|
-
});
|
|
1181
|
-
return;
|
|
1182
|
-
}
|
|
1183
1181
|
options.filterCallback({
|
|
1184
|
-
|
|
1182
|
+
text: isNewSpecial ? null : null,
|
|
1185
1183
|
matchMode: newMatchMode
|
|
1186
1184
|
});
|
|
1187
1185
|
}
|
|
@@ -1192,18 +1190,18 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1192
1190
|
{
|
|
1193
1191
|
value: currentValue,
|
|
1194
1192
|
placeholder: isLanguagePtBr ? "Pesquisar" : "Search",
|
|
1195
|
-
style: { width: "100%" },
|
|
1196
1193
|
className: "p-column-filter",
|
|
1194
|
+
style: { width: "100%" },
|
|
1197
1195
|
onChange: (e) => {
|
|
1198
1196
|
const value = e.target.value;
|
|
1199
1197
|
if (value.trim()) {
|
|
1200
1198
|
options.filterCallback({
|
|
1201
|
-
value,
|
|
1199
|
+
text: value,
|
|
1202
1200
|
matchMode: currentMatchMode
|
|
1203
1201
|
});
|
|
1204
1202
|
} else {
|
|
1205
1203
|
options.filterCallback({
|
|
1206
|
-
|
|
1204
|
+
text: null,
|
|
1207
1205
|
matchMode: currentMatchMode
|
|
1208
1206
|
});
|
|
1209
1207
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1097,7 +1097,12 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1097
1097
|
const resolvedItems = items ?? getDefaultFilterMatchOptionsString(isLanguagePtBr);
|
|
1098
1098
|
const rawFilter = options.value ?? {};
|
|
1099
1099
|
const currentMatchMode = rawFilter.matchMode ?? "contains";
|
|
1100
|
-
|
|
1100
|
+
let currentValue = "";
|
|
1101
|
+
if (typeof rawFilter.value === "string") {
|
|
1102
|
+
currentValue = rawFilter.value;
|
|
1103
|
+
} else if (rawFilter.value && typeof rawFilter.value === "object" && typeof rawFilter.value.value === "string") {
|
|
1104
|
+
currentValue = rawFilter.value.value;
|
|
1105
|
+
}
|
|
1101
1106
|
const isSpecial = currentMatchMode === customMatchModes.empty || currentMatchMode === customMatchModes.notEmpty;
|
|
1102
1107
|
return /* @__PURE__ */ jsxs6(
|
|
1103
1108
|
"div",
|
|
@@ -1122,15 +1127,8 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1122
1127
|
onChange: (e) => {
|
|
1123
1128
|
const newMatchMode = e.value;
|
|
1124
1129
|
const isNewSpecial = newMatchMode === customMatchModes.empty || newMatchMode === customMatchModes.notEmpty;
|
|
1125
|
-
if (isNewSpecial) {
|
|
1126
|
-
options.filterCallback({
|
|
1127
|
-
value: null,
|
|
1128
|
-
matchMode: newMatchMode
|
|
1129
|
-
});
|
|
1130
|
-
return;
|
|
1131
|
-
}
|
|
1132
1130
|
options.filterCallback({
|
|
1133
|
-
|
|
1131
|
+
text: isNewSpecial ? null : null,
|
|
1134
1132
|
matchMode: newMatchMode
|
|
1135
1133
|
});
|
|
1136
1134
|
}
|
|
@@ -1141,18 +1139,18 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1141
1139
|
{
|
|
1142
1140
|
value: currentValue,
|
|
1143
1141
|
placeholder: isLanguagePtBr ? "Pesquisar" : "Search",
|
|
1144
|
-
style: { width: "100%" },
|
|
1145
1142
|
className: "p-column-filter",
|
|
1143
|
+
style: { width: "100%" },
|
|
1146
1144
|
onChange: (e) => {
|
|
1147
1145
|
const value = e.target.value;
|
|
1148
1146
|
if (value.trim()) {
|
|
1149
1147
|
options.filterCallback({
|
|
1150
|
-
value,
|
|
1148
|
+
text: value,
|
|
1151
1149
|
matchMode: currentMatchMode
|
|
1152
1150
|
});
|
|
1153
1151
|
} else {
|
|
1154
1152
|
options.filterCallback({
|
|
1155
|
-
|
|
1153
|
+
text: null,
|
|
1156
1154
|
matchMode: currentMatchMode
|
|
1157
1155
|
});
|
|
1158
1156
|
}
|
package/dist/styles/table.css
CHANGED
|
@@ -196,11 +196,6 @@ th {
|
|
|
196
196
|
height: 1rem;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
.p-column-header-content .p-checkbox {
|
|
200
|
-
position: relative;
|
|
201
|
-
left: -2px;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
199
|
.p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover).p-highlight
|
|
205
200
|
.p-checkbox-box {
|
|
206
201
|
border-color: #094394;
|
|
@@ -208,6 +203,15 @@ th {
|
|
|
208
203
|
color: #ffffff;
|
|
209
204
|
}
|
|
210
205
|
|
|
206
|
+
/* .p-checkbox-box {
|
|
207
|
+
display: flex;
|
|
208
|
+
justify-content: center;
|
|
209
|
+
align-items: center;
|
|
210
|
+
min-width: 1rem !important;
|
|
211
|
+
min-height: 1px !important;
|
|
212
|
+
max-height: 1rem;
|
|
213
|
+
} */
|
|
214
|
+
|
|
211
215
|
.p-datatable .p-datatable-tbody > tr > td.p-selection-column {
|
|
212
216
|
text-align: center !important;
|
|
213
217
|
display: table-cell;
|
|
@@ -215,15 +219,20 @@ th {
|
|
|
215
219
|
position: relative;
|
|
216
220
|
}
|
|
217
221
|
|
|
218
|
-
.p-datatable .p-datatable-tbody > tr > td.p-selection-column .p-checkbox {
|
|
219
|
-
position: relative;
|
|
220
|
-
left: -2px;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
222
|
.p-datatable .p-datatable-thead > tr > th.p-selection-column .p-checkbox-input {
|
|
224
223
|
text-align: center !important;
|
|
224
|
+
position: absolute;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.p-selection-column .p-column-header-content {
|
|
225
228
|
position: relative;
|
|
226
|
-
|
|
229
|
+
top: 0;
|
|
230
|
+
right: 0;
|
|
231
|
+
transform: translate(-40%, 0);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.p-checkbox-input {
|
|
235
|
+
position: absolute;
|
|
227
236
|
}
|
|
228
237
|
|
|
229
238
|
.p-selection-column .p-checkbox {
|