do-ui-design-system 1.1.21 → 1.1.23
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/do-theme/table.css
CHANGED
|
@@ -185,8 +185,22 @@
|
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
|
|
188
|
-
const
|
|
189
|
-
|
|
188
|
+
const filteredIds = $derived(new Set(filtered().map((r) => r[idKey])));
|
|
189
|
+
|
|
190
|
+
// Al cambiar el filtro, deselecciona los que ya no son visibles
|
|
191
|
+
$effect(() => {
|
|
192
|
+
const ids = filteredIds;
|
|
193
|
+
const next = new Set([...selected].filter((id) => ids.has(id)));
|
|
194
|
+
if (next.size !== selected.size) {
|
|
195
|
+
selected = next;
|
|
196
|
+
onSelectionChange?.(Array.from(next));
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
const allSelected = $derived(
|
|
201
|
+
filteredIds.size > 0 && [...filteredIds].every((id) => selected.has(id))
|
|
202
|
+
);
|
|
203
|
+
const someSelected = $derived([...filteredIds].some((id) => selected.has(id)) && !allSelected);
|
|
190
204
|
|
|
191
205
|
const handleSort = (key: string) => {
|
|
192
206
|
if (sortKey !== key) {
|
|
@@ -209,11 +223,17 @@
|
|
|
209
223
|
|
|
210
224
|
const toggleAll = () => {
|
|
211
225
|
if (allSelected) {
|
|
212
|
-
|
|
213
|
-
|
|
226
|
+
// Deselecciona solo los filtrados, mantiene los que no están visibles
|
|
227
|
+
const next = new Set(selected);
|
|
228
|
+
for (const id of filteredIds) next.delete(id);
|
|
229
|
+
selected = next;
|
|
230
|
+
onSelectionChange?.(Array.from(next));
|
|
214
231
|
} else {
|
|
215
|
-
|
|
216
|
-
|
|
232
|
+
// Selecciona solo los filtrados, suma a los ya seleccionados
|
|
233
|
+
const next = new Set(selected);
|
|
234
|
+
for (const id of filteredIds) next.add(id);
|
|
235
|
+
selected = next;
|
|
236
|
+
onSelectionChange?.(Array.from(next));
|
|
217
237
|
}
|
|
218
238
|
};
|
|
219
239
|
|
|
@@ -321,7 +341,7 @@
|
|
|
321
341
|
{#if dateConfig?.columnFrom && dateConfig?.columnTo && !dateError}
|
|
322
342
|
<label class="do-table__partial-match">
|
|
323
343
|
<Toggle bind:checked={partialMatch} />
|
|
324
|
-
<h5>{dateConfig?.partialMatchLabel ?? 'Incluir
|
|
344
|
+
<h5>{dateConfig?.partialMatchLabel ?? 'Incluir datos parcialmente contenidos'}</h5>
|
|
325
345
|
</label>
|
|
326
346
|
{/if}
|
|
327
347
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBasic.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/organisms/TableBasic/TableBasic.svelte.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAGV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,eAAe,EACf,SAAS,EAET,MAAM,uBAAuB,CAAC;AAG/B,KAAK,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;IAC3C,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACzB,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;IAChB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC;CACvD,CAAC;
|
|
1
|
+
{"version":3,"file":"TableBasic.svelte.d.ts","sourceRo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