@charlesgomes/leafcode-shared-lib-react 1.0.34 → 1.0.36
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 +10 -9
- package/dist/index.js +19 -8
- package/dist/index.mjs +19 -8
- package/dist/styles/table.css +12 -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,19 @@ 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
|
+
left: 7px;
|
|
184
|
+
}
|
|
185
|
+
.p-selection-column .p-column-header-content {
|
|
190
186
|
position: relative;
|
|
191
|
-
|
|
187
|
+
top: 0;
|
|
188
|
+
right: -2px;
|
|
189
|
+
transform: translate(-40%, 0);
|
|
190
|
+
}
|
|
191
|
+
.p-checkbox-input {
|
|
192
|
+
position: absolute;
|
|
192
193
|
}
|
|
193
194
|
.p-selection-column .p-checkbox {
|
|
194
195
|
display: inline-flex;
|
package/dist/index.js
CHANGED
|
@@ -1146,9 +1146,9 @@ 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
|
-
const currentValue = typeof rawFilter.
|
|
1151
|
+
const currentValue = typeof rawFilter.text === "string" ? rawFilter.text : "";
|
|
1152
1152
|
const isSpecial = currentMatchMode === customMatchModes.empty || currentMatchMode === customMatchModes.notEmpty;
|
|
1153
1153
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1154
1154
|
"div",
|
|
@@ -1173,8 +1173,15 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1173
1173
|
onChange: (e) => {
|
|
1174
1174
|
const newMatchMode = e.value;
|
|
1175
1175
|
const isNewSpecial = newMatchMode === customMatchModes.empty || newMatchMode === customMatchModes.notEmpty;
|
|
1176
|
+
if (isNewSpecial) {
|
|
1177
|
+
options.filterCallback({
|
|
1178
|
+
text: null,
|
|
1179
|
+
matchMode: newMatchMode
|
|
1180
|
+
});
|
|
1181
|
+
return;
|
|
1182
|
+
}
|
|
1176
1183
|
options.filterCallback({
|
|
1177
|
-
|
|
1184
|
+
text: null,
|
|
1178
1185
|
matchMode: newMatchMode
|
|
1179
1186
|
});
|
|
1180
1187
|
}
|
|
@@ -1185,16 +1192,20 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1185
1192
|
{
|
|
1186
1193
|
value: currentValue,
|
|
1187
1194
|
placeholder: isLanguagePtBr ? "Pesquisar" : "Search",
|
|
1188
|
-
className: "p-column-filter",
|
|
1189
1195
|
style: { width: "100%" },
|
|
1196
|
+
className: "p-column-filter",
|
|
1190
1197
|
onChange: (e) => {
|
|
1191
1198
|
const value = e.target.value;
|
|
1192
1199
|
if (value.trim()) {
|
|
1193
|
-
options.filterCallback(
|
|
1194
|
-
value
|
|
1195
|
-
|
|
1200
|
+
options.filterCallback({
|
|
1201
|
+
text: value,
|
|
1202
|
+
matchMode: currentMatchMode
|
|
1203
|
+
});
|
|
1196
1204
|
} else {
|
|
1197
|
-
options.filterCallback(
|
|
1205
|
+
options.filterCallback({
|
|
1206
|
+
text: null,
|
|
1207
|
+
matchMode: currentMatchMode
|
|
1208
|
+
});
|
|
1198
1209
|
}
|
|
1199
1210
|
}
|
|
1200
1211
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1095,9 +1095,9 @@ 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
|
-
const currentValue = typeof rawFilter.
|
|
1100
|
+
const currentValue = typeof rawFilter.text === "string" ? rawFilter.text : "";
|
|
1101
1101
|
const isSpecial = currentMatchMode === customMatchModes.empty || currentMatchMode === customMatchModes.notEmpty;
|
|
1102
1102
|
return /* @__PURE__ */ jsxs6(
|
|
1103
1103
|
"div",
|
|
@@ -1122,8 +1122,15 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1122
1122
|
onChange: (e) => {
|
|
1123
1123
|
const newMatchMode = e.value;
|
|
1124
1124
|
const isNewSpecial = newMatchMode === customMatchModes.empty || newMatchMode === customMatchModes.notEmpty;
|
|
1125
|
+
if (isNewSpecial) {
|
|
1126
|
+
options.filterCallback({
|
|
1127
|
+
text: null,
|
|
1128
|
+
matchMode: newMatchMode
|
|
1129
|
+
});
|
|
1130
|
+
return;
|
|
1131
|
+
}
|
|
1125
1132
|
options.filterCallback({
|
|
1126
|
-
|
|
1133
|
+
text: null,
|
|
1127
1134
|
matchMode: newMatchMode
|
|
1128
1135
|
});
|
|
1129
1136
|
}
|
|
@@ -1134,16 +1141,20 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1134
1141
|
{
|
|
1135
1142
|
value: currentValue,
|
|
1136
1143
|
placeholder: isLanguagePtBr ? "Pesquisar" : "Search",
|
|
1137
|
-
className: "p-column-filter",
|
|
1138
1144
|
style: { width: "100%" },
|
|
1145
|
+
className: "p-column-filter",
|
|
1139
1146
|
onChange: (e) => {
|
|
1140
1147
|
const value = e.target.value;
|
|
1141
1148
|
if (value.trim()) {
|
|
1142
|
-
options.filterCallback(
|
|
1143
|
-
value
|
|
1144
|
-
|
|
1149
|
+
options.filterCallback({
|
|
1150
|
+
text: value,
|
|
1151
|
+
matchMode: currentMatchMode
|
|
1152
|
+
});
|
|
1145
1153
|
} else {
|
|
1146
|
-
options.filterCallback(
|
|
1154
|
+
options.filterCallback({
|
|
1155
|
+
text: null,
|
|
1156
|
+
matchMode: currentMatchMode
|
|
1157
|
+
});
|
|
1147
1158
|
}
|
|
1148
1159
|
}
|
|
1149
1160
|
}
|
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;
|
|
@@ -215,15 +210,21 @@ th {
|
|
|
215
210
|
position: relative;
|
|
216
211
|
}
|
|
217
212
|
|
|
218
|
-
.p-datatable .p-datatable-tbody > tr > td.p-selection-column .p-checkbox {
|
|
219
|
-
position: relative;
|
|
220
|
-
left: -2px;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
213
|
.p-datatable .p-datatable-thead > tr > th.p-selection-column .p-checkbox-input {
|
|
224
214
|
text-align: center !important;
|
|
215
|
+
position: absolute;
|
|
216
|
+
left: 7px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.p-selection-column .p-column-header-content {
|
|
225
220
|
position: relative;
|
|
226
|
-
|
|
221
|
+
top: 0;
|
|
222
|
+
right: -2px;
|
|
223
|
+
transform: translate(-40%, 0);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.p-checkbox-input {
|
|
227
|
+
position: absolute;
|
|
227
228
|
}
|
|
228
229
|
|
|
229
230
|
.p-selection-column .p-checkbox {
|