@charlesgomes/leafcode-shared-lib-react 1.0.34 → 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 +16 -7
- package/dist/index.mjs +16 -7
- 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
|
@@ -1146,9 +1146,14 @@ var SelectFilterTemplate = (options, isLanguagePtBr = true, items = []) => {
|
|
|
1146
1146
|
};
|
|
1147
1147
|
var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
1148
1148
|
const resolvedItems = items ?? getDefaultFilterMatchOptionsString(isLanguagePtBr);
|
|
1149
|
-
const rawFilter = options.
|
|
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",
|
|
@@ -1174,7 +1179,7 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1174
1179
|
const newMatchMode = e.value;
|
|
1175
1180
|
const isNewSpecial = newMatchMode === customMatchModes.empty || newMatchMode === customMatchModes.notEmpty;
|
|
1176
1181
|
options.filterCallback({
|
|
1177
|
-
|
|
1182
|
+
text: isNewSpecial ? null : null,
|
|
1178
1183
|
matchMode: newMatchMode
|
|
1179
1184
|
});
|
|
1180
1185
|
}
|
|
@@ -1190,11 +1195,15 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1190
1195
|
onChange: (e) => {
|
|
1191
1196
|
const value = e.target.value;
|
|
1192
1197
|
if (value.trim()) {
|
|
1193
|
-
options.filterCallback(
|
|
1194
|
-
value
|
|
1195
|
-
|
|
1198
|
+
options.filterCallback({
|
|
1199
|
+
text: value,
|
|
1200
|
+
matchMode: currentMatchMode
|
|
1201
|
+
});
|
|
1196
1202
|
} else {
|
|
1197
|
-
options.filterCallback(
|
|
1203
|
+
options.filterCallback({
|
|
1204
|
+
text: null,
|
|
1205
|
+
matchMode: currentMatchMode
|
|
1206
|
+
});
|
|
1198
1207
|
}
|
|
1199
1208
|
}
|
|
1200
1209
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1095,9 +1095,14 @@ var SelectFilterTemplate = (options, isLanguagePtBr = true, items = []) => {
|
|
|
1095
1095
|
};
|
|
1096
1096
|
var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
1097
1097
|
const resolvedItems = items ?? getDefaultFilterMatchOptionsString(isLanguagePtBr);
|
|
1098
|
-
const rawFilter = options.
|
|
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",
|
|
@@ -1123,7 +1128,7 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1123
1128
|
const newMatchMode = e.value;
|
|
1124
1129
|
const isNewSpecial = newMatchMode === customMatchModes.empty || newMatchMode === customMatchModes.notEmpty;
|
|
1125
1130
|
options.filterCallback({
|
|
1126
|
-
|
|
1131
|
+
text: isNewSpecial ? null : null,
|
|
1127
1132
|
matchMode: newMatchMode
|
|
1128
1133
|
});
|
|
1129
1134
|
}
|
|
@@ -1139,11 +1144,15 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1139
1144
|
onChange: (e) => {
|
|
1140
1145
|
const value = e.target.value;
|
|
1141
1146
|
if (value.trim()) {
|
|
1142
|
-
options.filterCallback(
|
|
1143
|
-
value
|
|
1144
|
-
|
|
1147
|
+
options.filterCallback({
|
|
1148
|
+
text: value,
|
|
1149
|
+
matchMode: currentMatchMode
|
|
1150
|
+
});
|
|
1145
1151
|
} else {
|
|
1146
|
-
options.filterCallback(
|
|
1152
|
+
options.filterCallback({
|
|
1153
|
+
text: null,
|
|
1154
|
+
matchMode: currentMatchMode
|
|
1155
|
+
});
|
|
1147
1156
|
}
|
|
1148
1157
|
}
|
|
1149
1158
|
}
|
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 {
|