@layerfi/components 0.1.82 → 0.1.83

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.
@@ -115,7 +115,7 @@ var import_react17 = __toESM(require("react"));
115
115
  var import_react16 = __toESM(require("react"));
116
116
 
117
117
  // package.json
118
- var version = "0.1.82";
118
+ var version = "0.1.83";
119
119
 
120
120
  // src/models/APIError.ts
121
121
  var APIError = class _APIError extends Error {
@@ -11816,6 +11816,9 @@ var Indicator = ({
11816
11816
  setCustomCursorSize,
11817
11817
  viewBox = {}
11818
11818
  }) => {
11819
+ if (!(className == null ? void 0 : className.match(/selected/))) {
11820
+ return null;
11821
+ }
11819
11822
  const [opacityIndicator, setOpacityIndicator] = (0, import_react133.useState)(0);
11820
11823
  const { x: animateTo = 0, width = 0 } = "x" in viewBox ? viewBox : emptyViewBox;
11821
11824
  const margin = width > 12 ? 12 : 6;
@@ -11833,9 +11836,6 @@ var Indicator = ({
11833
11836
  setOpacityIndicator(1);
11834
11837
  }, 200);
11835
11838
  }, [animateTo]);
11836
- if (!(className == null ? void 0 : className.match(/selected/))) {
11837
- return null;
11838
- }
11839
11839
  const rectRef = (ref) => {
11840
11840
  if (ref) {
11841
11841
  const refRectWidth = ref.getBoundingClientRect().width;
@@ -18845,7 +18845,8 @@ var TasksList = ({ pageSize = 10 }) => {
18845
18845
  );
18846
18846
  const goToNextPage = (task) => {
18847
18847
  const allComplete = sortedTasks == null ? void 0 : sortedTasks.filter((taskInList) => taskInList.id !== task.id).every((task2) => isComplete(task2.status));
18848
- if (allComplete) {
18848
+ const hasMorePages = sortedTasks ? sortedTasks.length > pageSize * currentPage : false;
18849
+ if (allComplete && hasMorePages) {
18849
18850
  setCurrentPage(currentPage + 1);
18850
18851
  }
18851
18852
  };
@@ -57,7 +57,7 @@ import React9, { useState as useState7 } from "react";
57
57
  import React8, { useReducer, useEffect as useEffect4 } from "react";
58
58
 
59
59
  // package.json
60
- var version = "0.1.82";
60
+ var version = "0.1.83";
61
61
 
62
62
  // src/models/APIError.ts
63
63
  var APIError = class _APIError extends Error {
@@ -11811,6 +11811,9 @@ var Indicator = ({
11811
11811
  setCustomCursorSize,
11812
11812
  viewBox = {}
11813
11813
  }) => {
11814
+ if (!(className == null ? void 0 : className.match(/selected/))) {
11815
+ return null;
11816
+ }
11814
11817
  const [opacityIndicator, setOpacityIndicator] = useState37(0);
11815
11818
  const { x: animateTo = 0, width = 0 } = "x" in viewBox ? viewBox : emptyViewBox;
11816
11819
  const margin = width > 12 ? 12 : 6;
@@ -11828,9 +11831,6 @@ var Indicator = ({
11828
11831
  setOpacityIndicator(1);
11829
11832
  }, 200);
11830
11833
  }, [animateTo]);
11831
- if (!(className == null ? void 0 : className.match(/selected/))) {
11832
- return null;
11833
- }
11834
11834
  const rectRef = (ref) => {
11835
11835
  if (ref) {
11836
11836
  const refRectWidth = ref.getBoundingClientRect().width;
@@ -18881,7 +18881,8 @@ var TasksList = ({ pageSize = 10 }) => {
18881
18881
  );
18882
18882
  const goToNextPage = (task) => {
18883
18883
  const allComplete = sortedTasks == null ? void 0 : sortedTasks.filter((taskInList) => taskInList.id !== task.id).every((task2) => isComplete(task2.status));
18884
- if (allComplete) {
18884
+ const hasMorePages = sortedTasks ? sortedTasks.length > pageSize * currentPage : false;
18885
+ if (allComplete && hasMorePages) {
18885
18886
  setCurrentPage(currentPage + 1);
18886
18887
  }
18887
18888
  };