@amirjalili1374/ui-kit 1.4.38 → 1.4.39

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/ui-kit.es.js CHANGED
@@ -13549,6 +13549,14 @@ const formatPrice = (value2, currency = "", decimals = 0) => {
13549
13549
  const formattedNumber = formatNumberWithCommas(value2, decimals);
13550
13550
  return currency ? `${currency}${formattedNumber}` : formattedNumber;
13551
13551
  };
13552
+ function defaultFilterAdapter(raw) {
13553
+ const out = {};
13554
+ for (const [key2, value2] of Object.entries(raw)) {
13555
+ if (value2 === "" || value2 === null || value2 === void 0) continue;
13556
+ out[key2] = value2;
13557
+ }
13558
+ return out;
13559
+ }
13552
13560
  const VAlertTitle = createSimpleFunctional("v-alert-title");
13553
13561
  const makeIconSizeProps = propsFactory({
13554
13562
  iconSize: [Number, String],
@@ -17159,6 +17167,12 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
17159
17167
  groupBy: props.groupBy,
17160
17168
  defaultExpanded: props.defaultExpanded
17161
17169
  });
17170
+ function resolveFilter(raw) {
17171
+ if (props.filterAdapter) {
17172
+ return props.filterAdapter(raw);
17173
+ }
17174
+ return defaultFilterAdapter(raw);
17175
+ }
17162
17176
  const originalToggleSelection = selection.toggleSelection;
17163
17177
  selection.toggleSelection = (item) => {
17164
17178
  if (props.bulkMode) {
@@ -17534,19 +17548,15 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
17534
17548
  computed(() => {
17535
17549
  return !!props.filterComponent;
17536
17550
  });
17537
- const applyFilterAdapter = (raw) => {
17538
- if (!props.filterAdapter) return raw;
17539
- return props.filterAdapter(raw);
17540
- };
17541
17551
  const fetchData = async (queryParams) => {
17542
17552
  var _a, _b, _c;
17543
17553
  loading.value = true;
17544
17554
  error.value = null;
17545
17555
  try {
17546
17556
  const rawFilter = buildFilterParams();
17547
- const adaptedFilter = applyFilterAdapter(rawFilter);
17557
+ const finalFilter = resolveFilter(rawFilter);
17548
17558
  let params = {
17549
- ...adaptedFilter,
17559
+ ...finalFilter,
17550
17560
  ...props.queryParams
17551
17561
  };
17552
17562
  if (queryParams) {