@amirjalili1374/ui-kit 1.4.30 → 1.4.32

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
@@ -17533,7 +17533,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
17533
17533
  return !!props.filterComponent;
17534
17534
  });
17535
17535
  const fetchData = async (queryParams) => {
17536
- var _a, _b;
17536
+ var _a, _b, _c;
17537
17537
  loading.value = true;
17538
17538
  error.value = null;
17539
17539
  let params = {
@@ -17551,7 +17551,20 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
17551
17551
  size: itemsPerPage.value
17552
17552
  } : params;
17553
17553
  const response = await api.fetch(requestParams);
17554
- const serverRawData = shouldPaginate ? ((_a = response.data) == null ? void 0 : _a.content) ?? [] : response.data ?? [];
17554
+ let serverRawData = [];
17555
+ if (shouldPaginate) {
17556
+ serverRawData = ((_a = response.data) == null ? void 0 : _a.content) ?? [];
17557
+ } else {
17558
+ if (Array.isArray(response.data)) {
17559
+ serverRawData = response.data;
17560
+ } else if (((_b = response.data) == null ? void 0 : _b.content) && Array.isArray(response.data.content)) {
17561
+ serverRawData = response.data.content;
17562
+ } else if (response.data && typeof response.data === "object" && !Array.isArray(response.data)) {
17563
+ serverRawData = [response.data];
17564
+ } else {
17565
+ serverRawData = [];
17566
+ }
17567
+ }
17555
17568
  const serverData = Array.isArray(serverRawData) ? serverRawData : [];
17556
17569
  originalServerData.value = serverData;
17557
17570
  items.value = serverData.map((item) => {
@@ -17567,7 +17580,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
17567
17580
  });
17568
17581
  return newItem;
17569
17582
  });
17570
- if (shouldPaginate && ((_b = response.data) == null ? void 0 : _b.page)) {
17583
+ if (shouldPaginate && ((_c = response.data) == null ? void 0 : _c.page)) {
17571
17584
  totalSize.value = response.data.page.totalElements;
17572
17585
  totalPages.value = response.data.page.totalPages;
17573
17586
  hasMore.value = currentPage.value < response.data.page.totalPages;
@@ -18937,7 +18950,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
18937
18950
  disabled: isHeaderDisabled(header),
18938
18951
  clearable: "",
18939
18952
  variant: "outlined",
18940
- "menu-props": { attach: "body", zIndex: 1e4 }
18953
+ attach: "",
18954
+ "menu-props": { zIndex: 2e4 }
18941
18955
  }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "items", "item-title", "item-value", "return-object", "multiple", "chips", "closable-chips", "disabled"])) : isMoneyHeader(header) ? (openBlock(), createBlock(_sfc_main$i, {
18942
18956
  key: 2,
18943
18957
  modelValue: formModel.value[resolveHeaderKey(header)],
@@ -19224,7 +19238,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
19224
19238
  variant: "underlined",
19225
19239
  "hide-details": "",
19226
19240
  class: "mb-1",
19227
- "menu-props": { attach: "body", zIndex: 2e4 }
19241
+ attach: "",
19242
+ "menu-props": { zIndex: 2e4 }
19228
19243
  }, null, 8, ["modelValue", "onUpdate:modelValue", "items"])) : createCommentVNode("", true),
19229
19244
  isDateHeader(header) ? (openBlock(), createBlock(ShamsiDatePicker, {
19230
19245
  key: 1,
@@ -19248,7 +19263,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
19248
19263
  disabled: isHeaderDisabled(header),
19249
19264
  clearable: "",
19250
19265
  variant: "outlined",
19251
- "menu-props": { attach: "body", zIndex: 2e4 }
19266
+ attach: "",
19267
+ "menu-props": { zIndex: 2e4 }
19252
19268
  }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "items", "item-title", "item-value", "return-object", "multiple", "chips", "closable-chips", "disabled"])) : isMoneyHeader(header) ? (openBlock(), createBlock(_sfc_main$i, {
19253
19269
  key: 3,
19254
19270
  modelValue: filterModel.value[resolveHeaderKey(header)],