@nickaux/form-configurator 1.1.214 → 1.1.215

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.
@@ -40053,6 +40053,7 @@ class TypeDefault {
40053
40053
  return this.formManager.getFieldPath(this.id);
40054
40054
  }
40055
40055
  change(value) {
40056
+ this.executeListenenr(value);
40056
40057
  this.formManager.setFieldValueByPath(this.id, value);
40057
40058
  this.executeListenenr(value);
40058
40059
  this.executeActions(value);
@@ -75669,7 +75670,7 @@ function Listing({
75669
75670
  onSearch = (filter) => {
75670
75671
  }
75671
75672
  }) {
75672
- var _a, _b, _c, _d, _e2, _f;
75673
+ var _a, _b, _c, _d, _e2, _f, _g;
75673
75674
  if (!data2) {
75674
75675
  return "";
75675
75676
  }
@@ -75683,7 +75684,6 @@ function Listing({
75683
75684
  const [params, setParams] = useState(buildListingParam(listingParams));
75684
75685
  const [dataResult, setDataResult] = useState([]);
75685
75686
  useEffect(() => {
75686
- console.log("listing data", data2);
75687
75687
  onSearchHandler(formManager.formElements[0].id, searchParams);
75688
75688
  setDataResult(filter(searchParams == null ? void 0 : searchParams.text));
75689
75689
  if (params == null ? void 0 : params.defaultSort) {
@@ -75766,6 +75766,10 @@ function Listing({
75766
75766
  if (params === false) {
75767
75767
  return false;
75768
75768
  }
75769
+ const _pageCount = Math.ceil(Object.keys(dataResult).length / perPage);
75770
+ const _initialPage = ((_f = searchParams == null ? void 0 : searchParams.pagination) == null ? void 0 : _f.selected) > _pageCount ? 0 : (_g = searchParams == null ? void 0 : searchParams.pagination) == null ? void 0 : _g.selected;
75771
+ const pageCount = Math.max(_pageCount ?? 1, 1);
75772
+ const initialPage = Math.min(_initialPage ?? 0, pageCount - 1);
75769
75773
  return /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
75770
75774
  /* @__PURE__ */ jsxs("div", { className: "search-bar", children: [
75771
75775
  /* @__PURE__ */ jsx$2(
@@ -75849,8 +75853,8 @@ function Listing({
75849
75853
  nextLabel: "Suivant",
75850
75854
  breakLabel: "...",
75851
75855
  breakClassName: "break-me",
75852
- pageCount: Math.ceil(Object.keys(dataResult).length / perPage),
75853
- initialPage: (_f = searchParams == null ? void 0 : searchParams.pagination) == null ? void 0 : _f.selected,
75856
+ pageCount,
75857
+ initialPage,
75854
75858
  marginPagesDisplayed: 1,
75855
75859
  pageRangeDisplayed: 2,
75856
75860
  onPageChange: handlePageClick,
@@ -149153,7 +149157,6 @@ class FormManager {
149153
149157
  for (let i2 = 0; i2 < formData.length; i2++) {
149154
149158
  formData[i2] = this.loadJsonFormNode(formData[i2], true);
149155
149159
  }
149156
- console.log(formData);
149157
149160
  return formData;
149158
149161
  }
149159
149162
  // getMaxContentLevel(p_item) {