datastake-daf 0.6.835 → 0.6.838

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.
Files changed (32) hide show
  1. package/dist/components/index.js +720 -727
  2. package/dist/hooks/index.js +23 -11
  3. package/dist/pages/index.js +426 -196
  4. package/dist/services/index.js +7 -8
  5. package/dist/style/datastake/mapbox-gl.css +330 -0
  6. package/package.json +1 -1
  7. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/hook.js +3 -3
  8. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/index.jsx +2 -2
  9. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/index.jsx +2 -6
  10. package/src/@daf/core/components/Screens/Admin/AdminTables/AccountTable/index.jsx +0 -1
  11. package/src/@daf/hooks/useWidgetFetch.js +20 -7
  12. package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/KeyIndicators/config.js +2 -3
  13. package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/KeyIndicators/index.js +2 -2
  14. package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/MineSite/index.js +3 -3
  15. package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/IncidentsTime/config.js +206 -0
  16. package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/IncidentsTime/hook.js +48 -0
  17. package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/IncidentsTime/index.js +154 -0
  18. package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/ProblemSolver/hook.js +83 -0
  19. package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/RisksWidget/components/ProblemSolver/index.js +14 -7
  20. package/src/@daf/pages/Dashboards/ConflictManagement/components/RisksWidget/components/TerritorialDistribution/config.js +10 -0
  21. package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/RisksWidget/components/TerritorialDistribution/index.js +18 -13
  22. package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/RisksWidget/index.js +1 -1
  23. package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/index.js +17 -19
  24. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/PlantingLocations/index.jsx +5 -5
  25. package/src/@daf/services/DashboardService.js +8 -8
  26. package/src/pages.js +1 -1
  27. package/src/@daf/core/components/Screens/ConflictManagement/components/RisksWidget/components/IncidentsTime/hook.js +0 -32
  28. package/src/@daf/core/components/Screens/ConflictManagement/components/RisksWidget/components/IncidentsTime/index.js +0 -73
  29. package/src/@daf/core/components/Screens/ConflictManagement/components/RisksWidget/components/ProblemSolver/hook.js +0 -86
  30. package/src/@daf/core/components/Screens/ConflictManagement/components/RisksWidget/components/TerritorialDistribution/config.js +0 -34
  31. /package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/MineSite/helper.js +0 -0
  32. /package/src/@daf/{core/components/Screens → pages/Dashboards}/ConflictManagement/components/RisksWidget/config.js +0 -0
@@ -4827,7 +4827,7 @@ const config$2 = {
4827
4827
  AddDocument: config$3
4828
4828
  };
4829
4829
 
4830
- const _excluded$E = ["width", "height", "size", "name", "fill"];
4830
+ const _excluded$F = ["width", "height", "size", "name", "fill"];
4831
4831
  const CustomIcon = _ref => {
4832
4832
  let {
4833
4833
  width = 14,
@@ -4836,7 +4836,7 @@ const CustomIcon = _ref => {
4836
4836
  name = "",
4837
4837
  fill = "none"
4838
4838
  } = _ref,
4839
- props = _objectWithoutProperties(_ref, _excluded$E);
4839
+ props = _objectWithoutProperties(_ref, _excluded$F);
4840
4840
  const conf = config$2[name];
4841
4841
  if (conf) {
4842
4842
  return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
@@ -5125,7 +5125,7 @@ createCommonjsModule(function (module, exports) {
5125
5125
  !function(e,n){module.exports=n();}(commonjsGlobal,(function(){return {name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],t=e%100;return "["+e+(n[(t-20)%10]||n[t]||n[0])+"]"}}}));
5126
5126
  });
5127
5127
 
5128
- const _excluded$D = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
5128
+ const _excluded$E = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
5129
5129
  dayjs__default["default"].extend(customParseFormat);
5130
5130
  dayjs__default["default"].extend(utc);
5131
5131
  dayjs__default["default"].extend(utc);
@@ -5501,7 +5501,7 @@ const filterCreateData = data => {
5501
5501
  createdAt,
5502
5502
  updatedAt
5503
5503
  } = data,
5504
- rest = _objectWithoutProperties(data, _excluded$D);
5504
+ rest = _objectWithoutProperties(data, _excluded$E);
5505
5505
  const _meta = isObjectEmpty(meta) ? undefined : meta;
5506
5506
  return _objectSpread2(_objectSpread2({}, rest), {}, {
5507
5507
  meta: _meta
@@ -6033,7 +6033,7 @@ SelectFilters.propTypes = {
6033
6033
  apiUrl: PropTypes__default["default"].string
6034
6034
  };
6035
6035
 
6036
- const _excluded$C = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
6036
+ const _excluded$D = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
6037
6037
  function DAFTable(_ref) {
6038
6038
  let {
6039
6039
  columns = [],
@@ -6064,7 +6064,7 @@ function DAFTable(_ref) {
6064
6064
  app,
6065
6065
  doEmptyRows
6066
6066
  } = _ref,
6067
- rest = _objectWithoutProperties(_ref, _excluded$C);
6067
+ rest = _objectWithoutProperties(_ref, _excluded$D);
6068
6068
  const source = React.useMemo(() => {
6069
6069
  if (data && Array.isArray(data)) {
6070
6070
  return data;
@@ -6889,7 +6889,7 @@ function ComponentWithFocus(_ref) {
6889
6889
  }
6890
6890
 
6891
6891
  var _templateObject$h;
6892
- const _excluded$B = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
6892
+ const _excluded$C = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
6893
6893
  function StickyTable(_ref) {
6894
6894
  let {
6895
6895
  size = "small",
@@ -6900,7 +6900,7 @@ function StickyTable(_ref) {
6900
6900
  pagination = false,
6901
6901
  doEmptyRows = true
6902
6902
  } = _ref,
6903
- props = _objectWithoutProperties(_ref, _excluded$B);
6903
+ props = _objectWithoutProperties(_ref, _excluded$C);
6904
6904
  const data = React__default["default"].useMemo(() => {
6905
6905
  if (!doEmptyRows) {
6906
6906
  return dataSource;
@@ -7428,7 +7428,7 @@ const BTN_SIZE = {
7428
7428
  LG: 'large'
7429
7429
  };
7430
7430
 
7431
- const _excluded$A = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
7431
+ const _excluded$B = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
7432
7432
  function DafButton(_ref) {
7433
7433
  let {
7434
7434
  content = '',
@@ -7442,7 +7442,7 @@ function DafButton(_ref) {
7442
7442
  style = {},
7443
7443
  className = ''
7444
7444
  } = _ref,
7445
- restProps = _objectWithoutProperties(_ref, _excluded$A);
7445
+ restProps = _objectWithoutProperties(_ref, _excluded$B);
7446
7446
  return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
7447
7447
  icon: icon,
7448
7448
  type: type,
@@ -7561,12 +7561,12 @@ const Style$R = styled__default["default"].div`
7561
7561
  }
7562
7562
  `;
7563
7563
 
7564
- const _excluded$z = ["children"];
7564
+ const _excluded$A = ["children"];
7565
7565
  const BorderedButton = _ref => {
7566
7566
  let {
7567
7567
  children
7568
7568
  } = _ref,
7569
- props = _objectWithoutProperties(_ref, _excluded$z);
7569
+ props = _objectWithoutProperties(_ref, _excluded$A);
7570
7570
  return /*#__PURE__*/jsxRuntime.jsx(Style$R, {
7571
7571
  className: "d-btn-cont",
7572
7572
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -7706,12 +7706,12 @@ Badge.propTypes = {
7706
7706
  props: PropTypes__default["default"].object
7707
7707
  };
7708
7708
 
7709
- const _excluded$y = ["icon"];
7709
+ const _excluded$z = ["icon"];
7710
7710
  function GetIcon(_ref) {
7711
7711
  let {
7712
7712
  icon
7713
7713
  } = _ref,
7714
- props = _objectWithoutProperties(_ref, _excluded$y);
7714
+ props = _objectWithoutProperties(_ref, _excluded$z);
7715
7715
  let Icon = Icons__namespace.CloseOutlined;
7716
7716
  if (Icons__namespace[icon]) {
7717
7717
  Icon = Icons__namespace[icon];
@@ -8041,7 +8041,7 @@ const MultiSelectStyled = styled__default["default"](antd.Select)`
8041
8041
  }
8042
8042
  `;
8043
8043
 
8044
- const _excluded$x = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
8044
+ const _excluded$y = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
8045
8045
  const {
8046
8046
  useToken: useToken$p
8047
8047
  } = antd.theme;
@@ -8134,7 +8134,7 @@ function Multiselect(_ref) {
8134
8134
  isSingle = false,
8135
8135
  selectionType = SELECTION_TYPES.DEFAULT
8136
8136
  } = _ref,
8137
- restProps = _objectWithoutProperties(_ref, _excluded$x);
8137
+ restProps = _objectWithoutProperties(_ref, _excluded$y);
8138
8138
  const {
8139
8139
  token
8140
8140
  } = useToken$p();
@@ -8854,7 +8854,7 @@ DAFHeader.propTypes = {
8854
8854
  filtersConfig: PropTypes__default["default"].any
8855
8855
  };
8856
8856
 
8857
- const _excluded$w = ["tabs", "onChange", "value", "className"];
8857
+ const _excluded$x = ["tabs", "onChange", "value", "className"];
8858
8858
  function TabsHeader(_ref) {
8859
8859
  let {
8860
8860
  tabs = [],
@@ -8862,7 +8862,7 @@ function TabsHeader(_ref) {
8862
8862
  value = '',
8863
8863
  className = 'mt-2'
8864
8864
  } = _ref,
8865
- rest = _objectWithoutProperties(_ref, _excluded$w);
8865
+ rest = _objectWithoutProperties(_ref, _excluded$x);
8866
8866
  return /*#__PURE__*/jsxRuntime.jsx("div", {
8867
8867
  className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
8868
8868
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
@@ -8959,7 +8959,7 @@ DrawerHeader.propTypes = {
8959
8959
  tabsConfig: PropTypes__default["default"].any
8960
8960
  };
8961
8961
 
8962
- const _excluded$v = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
8962
+ const _excluded$w = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
8963
8963
  const useFooter = _ref => {
8964
8964
  let {
8965
8965
  leftContent,
@@ -8994,7 +8994,7 @@ const useFooter = _ref => {
8994
8994
  style = {},
8995
8995
  className = ""
8996
8996
  } = button,
8997
- restProps = _objectWithoutProperties(button, _excluded$v);
8997
+ restProps = _objectWithoutProperties(button, _excluded$w);
8998
8998
  return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
8999
8999
  content: label,
9000
9000
  type: type,
@@ -11875,7 +11875,7 @@ Widget.propTypes = {
11875
11875
  };
11876
11876
  Widget.displayName = 'Widget';
11877
11877
 
11878
- const _excluded$u = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
11878
+ const _excluded$v = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
11879
11879
  function ImageWidget(_ref) {
11880
11880
  let {
11881
11881
  loading = false,
@@ -11886,7 +11886,7 @@ function ImageWidget(_ref) {
11886
11886
  noDescriptionText,
11887
11887
  isPdf = false
11888
11888
  } = _ref,
11889
- props = _objectWithoutProperties(_ref, _excluded$u);
11889
+ props = _objectWithoutProperties(_ref, _excluded$v);
11890
11890
  const expandable = isPdf ? false : props.expandable;
11891
11891
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
11892
11892
  loading: loading,
@@ -11946,7 +11946,7 @@ function ImageWidget(_ref) {
11946
11946
  ImageWidget.displayName = 'ImageWidget';
11947
11947
 
11948
11948
  var _templateObject$e;
11949
- const _excluded$t = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
11949
+ const _excluded$u = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
11950
11950
  function FlowWidget(_ref) {
11951
11951
  let {
11952
11952
  title,
@@ -11958,7 +11958,7 @@ function FlowWidget(_ref) {
11958
11958
  className,
11959
11959
  direction = "horizontal"
11960
11960
  } = _ref,
11961
- rest = _objectWithoutProperties(_ref, _excluded$t);
11961
+ rest = _objectWithoutProperties(_ref, _excluded$u);
11962
11962
  const [activeTab, setActiveTab] = React.useState();
11963
11963
  React.useEffect(() => {
11964
11964
  if (defaultActiveTab) {
@@ -15689,7 +15689,7 @@ Map$3.propTypes = {
15689
15689
  link: PropTypes__default["default"].any
15690
15690
  };
15691
15691
 
15692
- const _excluded$s = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
15692
+ const _excluded$t = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
15693
15693
  function InExpandableWidgetMap(_ref) {
15694
15694
  let {
15695
15695
  isExpanded,
@@ -15703,7 +15703,7 @@ function InExpandableWidgetMap(_ref) {
15703
15703
  height,
15704
15704
  widgetConfig
15705
15705
  } = _ref,
15706
- rest = _objectWithoutProperties(_ref, _excluded$s);
15706
+ rest = _objectWithoutProperties(_ref, _excluded$t);
15707
15707
  const [mapKey, setMapKey] = React.useState(0);
15708
15708
  const [isMapReady, setIsMapReady] = React.useState(false);
15709
15709
  React.useEffect(() => {
@@ -17903,14 +17903,14 @@ const MapConfig = ({
17903
17903
  });
17904
17904
  };
17905
17905
 
17906
- const _excluded$r = ["config", "title", "loading"];
17906
+ const _excluded$s = ["config", "title", "loading"];
17907
17907
  const Details = _ref => {
17908
17908
  let {
17909
17909
  config = [],
17910
17910
  title,
17911
17911
  loading = false
17912
17912
  } = _ref,
17913
- rest = _objectWithoutProperties(_ref, _excluded$r);
17913
+ rest = _objectWithoutProperties(_ref, _excluded$s);
17914
17914
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
17915
17915
  className: "with-border-header h-w-btn-header card",
17916
17916
  loading: loading,
@@ -17926,14 +17926,14 @@ const Details = _ref => {
17926
17926
  }));
17927
17927
  };
17928
17928
 
17929
- const _excluded$q = ["config", "title", "loading"];
17929
+ const _excluded$r = ["config", "title", "loading"];
17930
17930
  const KeyIndicatorsDetails = _ref => {
17931
17931
  let {
17932
17932
  config,
17933
17933
  title,
17934
17934
  loading = false
17935
17935
  } = _ref,
17936
- rest = _objectWithoutProperties(_ref, _excluded$q);
17936
+ rest = _objectWithoutProperties(_ref, _excluded$r);
17937
17937
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
17938
17938
  className: "with-border-header h-w-btn-header",
17939
17939
  title: title,
@@ -17963,7 +17963,7 @@ const Style$G = styled__default["default"].div`
17963
17963
  }
17964
17964
  `;
17965
17965
 
17966
- const _excluded$p = ["children", "config", "detailsTitle", "firstColumnWidth"];
17966
+ const _excluded$q = ["children", "config", "detailsTitle", "firstColumnWidth"];
17967
17967
  const DetailsSection = _ref => {
17968
17968
  let {
17969
17969
  children,
@@ -17971,7 +17971,7 @@ const DetailsSection = _ref => {
17971
17971
  detailsTitle,
17972
17972
  firstColumnWidth = "250px"
17973
17973
  } = _ref,
17974
- rest = _objectWithoutProperties(_ref, _excluded$p);
17974
+ rest = _objectWithoutProperties(_ref, _excluded$q);
17975
17975
  return /*#__PURE__*/jsxRuntime.jsx(Style$G, {
17976
17976
  firstColumnWidth: firstColumnWidth,
17977
17977
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -18147,14 +18147,14 @@ const getGoalConfig = () => {
18147
18147
  };
18148
18148
 
18149
18149
  var _templateObject$c;
18150
- const _excluded$o = ["title", "activeSdgGoals", "t"];
18150
+ const _excluded$p = ["title", "activeSdgGoals", "t"];
18151
18151
  function SDGWidget(_ref) {
18152
18152
  let {
18153
18153
  title = "Sustainable Development Goals",
18154
18154
  activeSdgGoals = [],
18155
18155
  t = key => key
18156
18156
  } = _ref,
18157
- props = _objectWithoutProperties(_ref, _excluded$o);
18157
+ props = _objectWithoutProperties(_ref, _excluded$p);
18158
18158
  const sdgConfig = getGoalConfig();
18159
18159
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
18160
18160
  title: title,
@@ -18452,7 +18452,7 @@ function SdgList({
18452
18452
  });
18453
18453
  }
18454
18454
 
18455
- const _excluded$n = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
18455
+ const _excluded$o = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
18456
18456
  const {
18457
18457
  Meta
18458
18458
  } = antd.Card;
@@ -18472,7 +18472,7 @@ function ProjectWidget(_ref) {
18472
18472
  hideSDGList = false,
18473
18473
  t = x => x
18474
18474
  } = _ref,
18475
- props = _objectWithoutProperties(_ref, _excluded$n);
18475
+ props = _objectWithoutProperties(_ref, _excluded$o);
18476
18476
  const [isHovered, setIsHovered] = React__default["default"].useState(false);
18477
18477
  const {
18478
18478
  token
@@ -18744,13 +18744,13 @@ const WidgetCard = _ref => {
18744
18744
  });
18745
18745
  };
18746
18746
 
18747
- const _excluded$m = ["title", "children"];
18747
+ const _excluded$n = ["title", "children"];
18748
18748
  const CarouselWidget = /*#__PURE__*/React.forwardRef((_ref, ref) => {
18749
18749
  let {
18750
18750
  title,
18751
18751
  children
18752
18752
  } = _ref,
18753
- rest = _objectWithoutProperties(_ref, _excluded$m);
18753
+ rest = _objectWithoutProperties(_ref, _excluded$n);
18754
18754
  /**
18755
18755
  * Handles carousel slide change events
18756
18756
  * @param {number} currentSlide - The index of the current slide after change
@@ -18914,7 +18914,7 @@ const EmptyStateContainer = styled__default["default"].div`
18914
18914
  }
18915
18915
  `;
18916
18916
 
18917
- const _excluded$l = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
18917
+ const _excluded$m = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
18918
18918
  function ImageCarousel(_ref) {
18919
18919
  let {
18920
18920
  title,
@@ -18929,7 +18929,7 @@ function ImageCarousel(_ref) {
18929
18929
  emptyLogo = antd.Empty.PRESENTED_IMAGE_SIMPLE,
18930
18930
  emptyText = "No Image"
18931
18931
  } = _ref,
18932
- rest = _objectWithoutProperties(_ref, _excluded$l);
18932
+ rest = _objectWithoutProperties(_ref, _excluded$m);
18933
18933
  const [previewVisible, setPreviewVisible] = React.useState(false);
18934
18934
  const [current, setCurrent] = React.useState(0);
18935
18935
  const carouselRef = React.useRef(null);
@@ -19298,7 +19298,7 @@ const getVegetationConfig = () => {
19298
19298
  };
19299
19299
 
19300
19300
  var _templateObject$a, _templateObject2$3;
19301
- const _excluded$k = ["title", "activeVegetationConditions", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "growthObservations", "t"];
19301
+ const _excluded$l = ["title", "activeVegetationConditions", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "growthObservations", "t"];
19302
19302
  function VegetationWidget(_ref) {
19303
19303
  let {
19304
19304
  title = "Vegetation Health",
@@ -19310,7 +19310,7 @@ function VegetationWidget(_ref) {
19310
19310
  growthObservations = [],
19311
19311
  t = key => key
19312
19312
  } = _ref,
19313
- props = _objectWithoutProperties(_ref, _excluded$k);
19313
+ props = _objectWithoutProperties(_ref, _excluded$l);
19314
19314
  let vegetationConfig = getVegetationConfig();
19315
19315
  const allVegetationKeys = vegetationConfig.map(item => item.key);
19316
19316
  if (filterKeys && Array.isArray(filterKeys)) {
@@ -19426,7 +19426,7 @@ const getFaunaConfig = () => {
19426
19426
  };
19427
19427
 
19428
19428
  var _templateObject$9, _templateObject2$2;
19429
- const _excluded$j = ["title", "faunaPresent", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19429
+ const _excluded$k = ["title", "faunaPresent", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19430
19430
  function FaunaWidget(_ref) {
19431
19431
  let {
19432
19432
  title = "Observed Fauna",
@@ -19437,7 +19437,7 @@ function FaunaWidget(_ref) {
19437
19437
  itemHeight = 100,
19438
19438
  t = key => key
19439
19439
  } = _ref,
19440
- props = _objectWithoutProperties(_ref, _excluded$j);
19440
+ props = _objectWithoutProperties(_ref, _excluded$k);
19441
19441
  let faunaConfig = getFaunaConfig();
19442
19442
 
19443
19443
  // Filter to show only specific keys if filterKeys is provided
@@ -19502,7 +19502,7 @@ const getInvasiveSpeciesConfig = () => {
19502
19502
  };
19503
19503
 
19504
19504
  var _templateObject$8, _templateObject2$1;
19505
- const _excluded$i = ["title", "invasiveSpecies", "hasInvasiveSpecies", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19505
+ const _excluded$j = ["title", "invasiveSpecies", "hasInvasiveSpecies", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19506
19506
  function InvasiveSpeciesWidget(_ref) {
19507
19507
  let {
19508
19508
  title = "Invasive Species",
@@ -19514,7 +19514,7 @@ function InvasiveSpeciesWidget(_ref) {
19514
19514
  itemHeight = 100,
19515
19515
  t = key => key
19516
19516
  } = _ref,
19517
- props = _objectWithoutProperties(_ref, _excluded$i);
19517
+ props = _objectWithoutProperties(_ref, _excluded$j);
19518
19518
  let invasiveSpeciesConfig = getInvasiveSpeciesConfig();
19519
19519
 
19520
19520
  // Filter to show only specific keys if filterKeys is provided
@@ -24937,7 +24937,7 @@ const RepeatableModals = ({
24937
24937
  }) : null;
24938
24938
  };
24939
24939
 
24940
- const _excluded$h = ["viewGroup"],
24940
+ const _excluded$i = ["viewGroup"],
24941
24941
  _excluded2$2 = ["label", "icon", "position"];
24942
24942
  const Content$1 = _ref => {
24943
24943
  let {
@@ -25009,7 +25009,7 @@ const Content$1 = _ref => {
25009
25009
  if (groups[gKey].viewGroup === key) {
25010
25010
  // eslint-disable-next-line no-unused-vars
25011
25011
  const _groups$gKey = groups[gKey],
25012
- gCfg = _objectWithoutProperties(_groups$gKey, _excluded$h);
25012
+ gCfg = _objectWithoutProperties(_groups$gKey, _excluded$i);
25013
25013
  items[gKey] = gCfg;
25014
25014
  }
25015
25015
  return items;
@@ -25289,7 +25289,7 @@ const Content$1 = _ref => {
25289
25289
  });
25290
25290
  };
25291
25291
 
25292
- const _excluded$g = ["t", "open", "title", "children", "onClose", "onSuccess", "cancelBtnText", "saveBtnText", "className", "loading", "disabled", "withModalFormWrapper"];
25292
+ const _excluded$h = ["t", "open", "title", "children", "onClose", "onSuccess", "cancelBtnText", "saveBtnText", "className", "loading", "disabled", "withModalFormWrapper"];
25293
25293
  function Modal(_ref) {
25294
25294
  let {
25295
25295
  t = text => text,
@@ -25305,7 +25305,7 @@ function Modal(_ref) {
25305
25305
  disabled = false,
25306
25306
  withModalFormWrapper = true
25307
25307
  } = _ref,
25308
- props = _objectWithoutProperties(_ref, _excluded$g);
25308
+ props = _objectWithoutProperties(_ref, _excluded$h);
25309
25309
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Modal, _objectSpread2(_objectSpread2({
25310
25310
  width: 650,
25311
25311
  footer: null,
@@ -35913,7 +35913,7 @@ const beforeUpload = allowedExtensions => file => {
35913
35913
  };
35914
35914
  const allowedImageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.avif', '.bmp', '.tiff', '.tif', '.heif', '.heic', '.svg', '.ico'];
35915
35915
 
35916
- const _excluded$f = ["placeholder"],
35916
+ const _excluded$g = ["placeholder"],
35917
35917
  _excluded2$1 = ["label", "description", "excludeFromEdit", "showFormIf", "icon", "position", "template", "formClass"];
35918
35918
  dayjs__default["default"].extend(utc);
35919
35919
  dayjs__default["default"].extend(timezone);
@@ -36879,7 +36879,7 @@ const inputTypeComponent$1 = {
36879
36879
  },
36880
36880
  commentHint
36881
36881
  } = _ref19,
36882
- props = _objectWithoutProperties(_ref19.props, _excluded$f);
36882
+ props = _objectWithoutProperties(_ref19.props, _excluded$g);
36883
36883
  let {
36884
36884
  onChange,
36885
36885
  value,
@@ -39585,7 +39585,7 @@ function AjaxSelect(props) {
39585
39585
  }, props));
39586
39586
  }
39587
39587
 
39588
- /* eslint-disable no-case-declarations */
39588
+ const _excluded$f = ["placeholder"];
39589
39589
  const propHasValue = val => {
39590
39590
  if (Array.isArray(val)) {
39591
39591
  return val.length > 0 ? true : false;
@@ -39603,14 +39603,14 @@ const checkCondition = (condition, repeatValues, formsValue) => {
39603
39603
  return isShown;
39604
39604
  };
39605
39605
  function showHideInput(input, formsValue, repeatIndex, repeatValues, setValues, ref) {
39606
- if (input?.meta?.hidden === true) {
39606
+ var _input$meta;
39607
+ if ((input === null || input === void 0 || (_input$meta = input.meta) === null || _input$meta === void 0 ? void 0 : _input$meta.hidden) === true) {
39608
+ var _input$meta2;
39607
39609
  // Set default value for hidden fields
39608
- if (input?.meta?.defaultValue !== undefined && !propHasValue(formsValue[ref])) {
39610
+ if ((input === null || input === void 0 || (_input$meta2 = input.meta) === null || _input$meta2 === void 0 ? void 0 : _input$meta2.defaultValue) !== undefined && !propHasValue(formsValue[ref])) {
39609
39611
  formsValue[ref] = input.meta.defaultValue;
39610
39612
  if (setValues && typeof setValues === 'function') {
39611
- setValues({
39612
- ...formsValue
39613
- });
39613
+ setValues(_objectSpread2({}, formsValue));
39614
39614
  }
39615
39615
  }
39616
39616
  return false;
@@ -39669,35 +39669,35 @@ function getInputHeadLines(type, i, input, values) {
39669
39669
  switch (type) {
39670
39670
  case "h2":
39671
39671
  return /*#__PURE__*/jsxRuntime.jsx("h2", {
39672
- className: `title-semibold-2 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
39672
+ className: "title-semibold-2 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
39673
39673
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
39674
39674
  children: getInputLabel(input, values)
39675
39675
  })
39676
39676
  });
39677
39677
  case "h3":
39678
39678
  return /*#__PURE__*/jsxRuntime.jsx("h3", {
39679
- className: `title-semibold-3 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
39679
+ className: "title-semibold-3 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
39680
39680
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
39681
39681
  children: getInputLabel(input, values)
39682
39682
  })
39683
39683
  });
39684
39684
  case "h4":
39685
39685
  return /*#__PURE__*/jsxRuntime.jsx("h4", {
39686
- className: `title-semibold-4 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
39686
+ className: "title-semibold-4 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
39687
39687
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
39688
39688
  children: getInputLabel(input, values)
39689
39689
  })
39690
39690
  });
39691
39691
  case "h5":
39692
39692
  return /*#__PURE__*/jsxRuntime.jsx("h5", {
39693
- className: `title-semibold-5 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
39693
+ className: "title-semibold-5 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
39694
39694
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
39695
39695
  children: getInputLabel(input, values)
39696
39696
  })
39697
39697
  });
39698
39698
  case "h6":
39699
39699
  return /*#__PURE__*/jsxRuntime.jsx("h6", {
39700
- className: `title-semibold-6 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
39700
+ className: "title-semibold-6 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
39701
39701
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
39702
39702
  children: getInputLabel(input, values)
39703
39703
  })
@@ -39706,7 +39706,9 @@ function getInputHeadLines(type, i, input, values) {
39706
39706
  return null;
39707
39707
  }
39708
39708
  }
39709
- function getInputLabel(input, formsValue = {}, asText = false) {
39709
+ function getInputLabel(input) {
39710
+ let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
39711
+ let asText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
39710
39712
  if (typeof input.label === "object") {
39711
39713
  const validations = Object.keys(input.label);
39712
39714
  const key = validations.find(v => {
@@ -39764,7 +39766,8 @@ function getInputLabel(input, formsValue = {}, asText = false) {
39764
39766
  }) : ReactHtmlParser__default["default"](input.label);
39765
39767
  }
39766
39768
  }
39767
- function getSelectOptions$1(option, formsValue = {}) {
39769
+ function getSelectOptions$1(option) {
39770
+ let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
39768
39771
  if (typeof option.label === "object") {
39769
39772
  const validations = Object.keys(option.label);
39770
39773
  const key = validations.find(v => {
@@ -39788,7 +39791,9 @@ function getSectionLabel(labels, values) {
39788
39791
  }
39789
39792
  return labels;
39790
39793
  }
39791
- function getSubtitles(subtitles, position, formsValue = {}, repeatIndex, repeatValues) {
39794
+ function getSubtitles(subtitles, position) {
39795
+ let formsValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
39796
+ let repeatValues = arguments.length > 4 ? arguments[4] : undefined;
39792
39797
  let subtitle = subtitles && subtitles[position];
39793
39798
  if (subtitle && typeof subtitle === "object") {
39794
39799
  let newSubtitle = subtitle.default || "";
@@ -39832,14 +39837,12 @@ function getSubtitles(subtitles, position, formsValue = {}, repeatIndex, repeatV
39832
39837
  function getFormTitles(titles, key, position) {
39833
39838
  let tilte = titles && titles[key];
39834
39839
  return tilte ? /*#__PURE__*/jsxRuntime.jsx("h3", {
39835
- className: `title-semibold-3 mb0 ${position ? "mt-3" : ""}`,
39840
+ className: "title-semibold-3 mb0 ".concat(position ? "mt-3" : ""),
39836
39841
  children: tilte
39837
39842
  }) : null;
39838
39843
  }
39839
39844
  const updateFormValues = (repeatIndex, repeatValues, inputName, value, formsValue, name, mainForm) => {
39840
- formsValue = Object.assign(formsValue, {
39841
- ...mainForm.getFieldsValue(true)
39842
- });
39845
+ formsValue = Object.assign(formsValue, _objectSpread2({}, mainForm.getFieldsValue(true)));
39843
39846
  if (typeof repeatIndex === "number" && repeatValues) {
39844
39847
  if (!repeatValues[inputName] || !___default["default"].isEqual(repeatValues[inputName], value)) {
39845
39848
  repeatValues[inputName] = value;
@@ -39873,48 +39876,52 @@ const updateFormValues = (repeatIndex, repeatValues, inputName, value, formsValu
39873
39876
  }
39874
39877
  };
39875
39878
  const inputTypeComponent = {
39876
- text: ({
39877
- props,
39878
- rules
39879
- }, {
39880
- inputMeta = {},
39881
- t
39882
- }) => {
39879
+ text: (_ref, _ref2) => {
39880
+ let {
39881
+ props,
39882
+ rules
39883
+ } = _ref;
39884
+ let {
39885
+ inputMeta = {},
39886
+ t
39887
+ } = _ref2;
39883
39888
  const maxRule = rules.find(r => r.max);
39884
39889
  const maxProps = {};
39885
39890
  if (maxRule) {
39886
39891
  maxProps.maxLength = maxRule.max;
39887
39892
  }
39888
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
39889
- size: "medium",
39890
- ...maxProps,
39893
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
39894
+ size: "medium"
39895
+ }, maxProps), {}, {
39891
39896
  allowClear: true,
39892
39897
  autoComplete: "new-password",
39893
- type: "text",
39894
- ...props,
39898
+ type: "text"
39899
+ }, props), {}, {
39895
39900
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
39896
39901
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
39897
- });
39902
+ }));
39898
39903
  },
39899
- drawTerritory: ({
39900
- formsValue,
39901
- name,
39902
- addressData,
39903
- onValuesChange
39904
- }, {
39905
- setFormValues,
39906
- form
39907
- }) => {
39904
+ drawTerritory: (_ref3, _ref4) => {
39905
+ let {
39906
+ formsValue,
39907
+ name,
39908
+ addressData,
39909
+ onValuesChange
39910
+ } = _ref3;
39911
+ let {
39912
+ setFormValues,
39913
+ form
39914
+ } = _ref4;
39908
39915
  let search = formsValue.country;
39909
39916
  if (addressData && addressData.address && Object.keys(addressData.address).length > 0) {
39910
39917
  if (addressData.address.country) {
39911
39918
  search = addressData.address.country;
39912
39919
  }
39913
39920
  if (addressData.address.level1) {
39914
- search = `${addressData.address.level1}, ${addressData.address.country}`;
39921
+ search = "".concat(addressData.address.level1, ", ").concat(addressData.address.country);
39915
39922
  }
39916
39923
  if (addressData.address.level2) {
39917
- search = `${addressData.address.level2}, ${addressData.address.level1}, ${addressData.address.country}`;
39924
+ search = "".concat(addressData.address.level2, ", ").concat(addressData.address.level1, ", ").concat(addressData.address.country);
39918
39925
  }
39919
39926
  } else {
39920
39927
  const country = countriesList.countries[formsValue.country] || {};
@@ -39922,10 +39929,10 @@ const inputTypeComponent = {
39922
39929
  search = country.name;
39923
39930
  }
39924
39931
  if (formsValue.administrativeLevel1Name) {
39925
- search = `${search} ${formsValue.administrativeLevel1Name}`;
39932
+ search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
39926
39933
  }
39927
39934
  if (formsValue.administrativeLevel2Name) {
39928
- search = `${search} ${formsValue.administrativeLevel2Name}`;
39935
+ search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
39929
39936
  }
39930
39937
  }
39931
39938
  console.log("search", {
@@ -39945,10 +39952,9 @@ const inputTypeComponent = {
39945
39952
  const allFormValues = form && typeof form.getFieldsValue === 'function' ? form.getFieldsValue(true) : formsValue;
39946
39953
 
39947
39954
  // Create the updated values
39948
- const updatedValues = {
39949
- ...allFormValues,
39955
+ const updatedValues = _objectSpread2(_objectSpread2({}, allFormValues), {}, {
39950
39956
  [name]: val
39951
- };
39957
+ });
39952
39958
 
39953
39959
  // Call onValuesChange with the change and all values
39954
39960
  if (typeof onValuesChange === 'function') {
@@ -39963,39 +39969,44 @@ const inputTypeComponent = {
39963
39969
  searchValue: search
39964
39970
  });
39965
39971
  },
39966
- link: ({
39967
- props,
39968
- rules
39969
- }, {
39970
- inputMeta = {},
39971
- t
39972
- }) => {
39972
+ link: (_ref5, _ref6) => {
39973
+ let {
39974
+ props,
39975
+ rules
39976
+ } = _ref5;
39977
+ let {
39978
+ inputMeta = {},
39979
+ t
39980
+ } = _ref6;
39973
39981
  const maxRule = rules.find(r => r.max);
39974
39982
  const maxProps = {};
39975
39983
  if (maxRule) {
39976
39984
  maxProps.maxLength = maxRule.max;
39977
39985
  }
39978
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
39979
- size: "medium",
39980
- ...maxProps,
39986
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
39987
+ size: "medium"
39988
+ }, maxProps), {}, {
39981
39989
  allowClear: true,
39982
39990
  autoComplete: "new-password",
39983
- type: "text",
39984
- ...props,
39991
+ type: "text"
39992
+ }, props), {}, {
39985
39993
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
39986
39994
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
39987
- });
39995
+ }));
39988
39996
  },
39989
- number: ({
39990
- props,
39991
- rules,
39992
- input
39993
- }, {
39994
- inputMeta = {},
39995
- t
39996
- }) => {
39997
+ number: (_ref7, _ref8) => {
39998
+ var _input$meta3;
39999
+ let {
40000
+ props,
40001
+ rules,
40002
+ input
40003
+ } = _ref7;
40004
+ let {
40005
+ inputMeta = {},
40006
+ t
40007
+ } = _ref8;
39997
40008
  const maxRule = rules.find(r => r.max);
39998
- const integerRule = !input?.meta?.isDecimal;
40009
+ const integerRule = !(input !== null && input !== void 0 && (_input$meta3 = input.meta) !== null && _input$meta3 !== void 0 && _input$meta3.isDecimal);
39999
40010
  const parser = value => {
40000
40011
  if (!value) {
40001
40012
  return "";
@@ -40006,50 +40017,53 @@ const inputTypeComponent = {
40006
40017
  return value.replace(/\$\s?|(,*)/g, "");
40007
40018
  };
40008
40019
  if (maxRule) {
40009
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
40020
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
40010
40021
  allowClear: true,
40011
- autoComplete: "new-password",
40012
- ...props,
40022
+ autoComplete: "new-password"
40023
+ }, props), {}, {
40013
40024
  type: "number",
40014
40025
  min: 0,
40015
40026
  max: maxRule.max,
40016
40027
  parser: parser
40017
- });
40028
+ }));
40018
40029
  }
40019
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
40030
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
40020
40031
  allowClear: true,
40021
- autoComplete: "new-password",
40022
- ...props,
40032
+ autoComplete: "new-password"
40033
+ }, props), {}, {
40023
40034
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
40024
40035
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type number"),
40025
40036
  min: 0,
40026
40037
  formatter: value => numberWithCommas$1(value),
40027
40038
  parser: parser
40028
- });
40039
+ }));
40029
40040
  },
40030
- select: ({
40031
- value,
40032
- options,
40033
- optionGroup,
40034
- props,
40035
- formsValue,
40036
- optionsFilter,
40037
- filterCond,
40038
- repeatValues,
40039
- repeatIndex,
40040
- name,
40041
- inputName,
40042
- address,
40043
- addressData,
40044
- input
40045
- }, {
40046
- forms,
40047
- form,
40048
- setAddress,
40049
- inputMeta = {},
40050
- t,
40051
- changeInputMeta
40052
- }) => {
40041
+ select: (_ref9, _ref10) => {
40042
+ var _input$meta4;
40043
+ let {
40044
+ value,
40045
+ options,
40046
+ optionGroup,
40047
+ props,
40048
+ formsValue,
40049
+ optionsFilter,
40050
+ filterCond,
40051
+ repeatValues,
40052
+ repeatIndex,
40053
+ name,
40054
+ inputName,
40055
+ address,
40056
+ addressData,
40057
+ input
40058
+ } = _ref9;
40059
+ let {
40060
+ forms,
40061
+ form,
40062
+ setAddress,
40063
+ inputMeta = {},
40064
+ t,
40065
+ changeInputMeta
40066
+ } = _ref10;
40053
40067
  let opts;
40054
40068
  if (typeof options === "string") {
40055
40069
  const [formName, key] = options.split(".");
@@ -40105,18 +40119,19 @@ const inputTypeComponent = {
40105
40119
  }
40106
40120
  opts = groupOptions;
40107
40121
  }
40108
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
40122
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
40109
40123
  autoComplete: "new-password",
40110
40124
  allowClear: true,
40111
40125
  showSearch: true,
40112
- defaultValue: input?.meta?.defaultValue,
40126
+ defaultValue: input === null || input === void 0 || (_input$meta4 = input.meta) === null || _input$meta4 === void 0 ? void 0 : _input$meta4.defaultValue,
40113
40127
  filterOption: filterSelectOptions,
40114
- optionFilterProp: "children",
40115
- ...props,
40128
+ optionFilterProp: "children"
40129
+ }, props), {}, {
40116
40130
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
40117
40131
  placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp$1(props.placeholder, formsValue) || t("Select one option"),
40118
40132
  onChange: (val, selectedValue) => {
40119
- if (typeof input?.meta?.onChange === "string") {
40133
+ var _input$meta5;
40134
+ if (typeof (input === null || input === void 0 || (_input$meta5 = input.meta) === null || _input$meta5 === void 0 ? void 0 : _input$meta5.onChange) === "string") {
40120
40135
  const [value, otherKey, otherVal] = input.meta.onChange.split(".");
40121
40136
  if (val === value) {
40122
40137
  changeInputMeta({
@@ -40130,9 +40145,7 @@ const inputTypeComponent = {
40130
40145
  }
40131
40146
  if (address && selectedValue) {
40132
40147
  dot__default["default"].str(address, selectedValue.children, addressData);
40133
- setAddress({
40134
- ...addressData
40135
- });
40148
+ setAddress(_objectSpread2({}, addressData));
40136
40149
  }
40137
40150
  if (props.onChange) {
40138
40151
  props.onChange(val);
@@ -40144,33 +40157,35 @@ const inputTypeComponent = {
40144
40157
  value: og.value,
40145
40158
  disabled: og.disabled,
40146
40159
  children: og.label
40147
- }, `${i}${j}`))
40160
+ }, "".concat(i).concat(j)))
40148
40161
  }, i) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
40149
40162
  value: option.value,
40150
40163
  disabled: option.disabled,
40151
40164
  children: option.label
40152
40165
  }, i))
40153
- });
40166
+ }));
40154
40167
  },
40155
- multiselect: ({
40156
- value,
40157
- options,
40158
- optionGroup,
40159
- optionsFilter,
40160
- filterCond,
40161
- props,
40162
- formsValue,
40163
- repeatValues,
40164
- repeatIndex,
40165
- inputName,
40166
- name,
40167
- tags
40168
- }, {
40169
- forms,
40170
- form,
40171
- inputMeta = {},
40172
- t
40173
- }) => {
40168
+ multiselect: (_ref11, _ref12) => {
40169
+ let {
40170
+ value,
40171
+ options,
40172
+ optionGroup,
40173
+ optionsFilter,
40174
+ filterCond,
40175
+ props,
40176
+ formsValue,
40177
+ repeatValues,
40178
+ repeatIndex,
40179
+ inputName,
40180
+ name,
40181
+ tags
40182
+ } = _ref11;
40183
+ let {
40184
+ forms,
40185
+ form,
40186
+ inputMeta = {},
40187
+ t
40188
+ } = _ref12;
40174
40189
  let opts;
40175
40190
  if (typeof options === "string") {
40176
40191
  const [formName, key] = options.split(".");
@@ -40227,16 +40242,16 @@ const inputTypeComponent = {
40227
40242
  }
40228
40243
  opts = groupOptions;
40229
40244
  }
40230
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
40245
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2(_objectSpread2({
40231
40246
  allowClear: true,
40232
40247
  autoComplete: "new-password",
40233
40248
  mode: tags ? "tags" : "multiple",
40234
- optionFilterProp: "children",
40235
- ...(tags ? {
40236
- tokenSeparators: [",", "\n", "\t"]
40237
- } : {}),
40238
- filterOption: filterSelectOptions,
40239
- ...props,
40249
+ optionFilterProp: "children"
40250
+ }, tags ? {
40251
+ tokenSeparators: [",", "\n", "\t"]
40252
+ } : {}), {}, {
40253
+ filterOption: filterSelectOptions
40254
+ }, props), {}, {
40240
40255
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
40241
40256
  placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp$1(props.placeholder, formsValue) || t("Select all relevant options"),
40242
40257
  children: (opts || []).map((option, i) => option.items ? /*#__PURE__*/jsxRuntime.jsx(antd.Select.OptGroup, {
@@ -40245,42 +40260,42 @@ const inputTypeComponent = {
40245
40260
  value: og.value,
40246
40261
  disabled: og.disabled,
40247
40262
  children: og.label
40248
- }, `${i}${j}`))
40263
+ }, "".concat(i).concat(j)))
40249
40264
  }, i) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
40250
40265
  value: option.value,
40251
40266
  disabled: option.disabled,
40252
40267
  children: option.label
40253
40268
  }, i))
40254
- });
40269
+ }));
40255
40270
  },
40256
- date: ({
40257
- props,
40258
- rules,
40259
- repeatValues,
40260
- formsValue,
40261
- name
40262
- }, {
40263
- inputMeta,
40264
- t,
40265
- groupFormId,
40266
- form,
40267
- setFormValues
40268
- }) => {
40271
+ date: (_ref13, _ref14) => {
40272
+ let {
40273
+ props,
40274
+ rules,
40275
+ repeatValues,
40276
+ formsValue,
40277
+ name
40278
+ } = _ref13;
40279
+ let {
40280
+ inputMeta,
40281
+ t,
40282
+ groupFormId,
40283
+ form,
40284
+ setFormValues
40285
+ } = _ref14;
40269
40286
  const lng = localStorage.getItem("datastakeLng") || "en";
40270
40287
  const maxRule = rules.find(r => r.max);
40271
40288
  const handleDateChange = date => {
40272
40289
  if (date) {
40273
40290
  const localDate = dayjs__default["default"].utc(date);
40274
40291
  if (groupFormId) {
40275
- const _new = {
40276
- ...(formsValue[groupFormId] || {}),
40292
+ const _new = _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
40277
40293
  [name]: localDate
40278
- };
40294
+ });
40279
40295
  form.setFieldValue(groupFormId, _new);
40280
- setFormValues({
40281
- ...formsValue,
40296
+ setFormValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
40282
40297
  [groupFormId]: _new
40283
- });
40298
+ }));
40284
40299
  } else {
40285
40300
  form.setFieldValue(name, localDate);
40286
40301
  }
@@ -40292,10 +40307,10 @@ const inputTypeComponent = {
40292
40307
  checkForMax = checkCondition(maxRule.condition, repeatValues, formsValue);
40293
40308
  }
40294
40309
  if (checkForMax) {
40295
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
40310
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
40296
40311
  allowClear: true,
40297
- autoComplete: "new-password",
40298
- ...props,
40312
+ autoComplete: "new-password"
40313
+ }, props), {}, {
40299
40314
  onChange: handleDateChange,
40300
40315
  format: DATE_FORMATS,
40301
40316
  locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"],
@@ -40304,31 +40319,33 @@ const inputTypeComponent = {
40304
40319
  disabledDate: current => {
40305
40320
  return current && current >= dayjs__default["default"]().endOf("day");
40306
40321
  }
40307
- });
40322
+ }));
40308
40323
  }
40309
40324
  }
40310
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
40325
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
40311
40326
  allowClear: true,
40312
- autoComplete: "new-password",
40313
- ...props,
40327
+ autoComplete: "new-password"
40328
+ }, props), {}, {
40314
40329
  onChange: handleDateChange,
40315
40330
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Select date"),
40316
40331
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
40317
40332
  format: DATE_FORMATS,
40318
40333
  locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"]
40319
- });
40334
+ }));
40320
40335
  },
40321
- comment: ({
40322
- props: {
40323
- placeholder,
40324
- ...props
40325
- },
40326
- commentHint
40327
- }, {
40328
- onChange,
40329
- value
40330
- }) => {
40331
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
40336
+ comment: (_ref15, _ref16) => {
40337
+ let {
40338
+ props: {
40339
+ placeholder
40340
+ },
40341
+ commentHint
40342
+ } = _ref15,
40343
+ props = _objectWithoutProperties(_ref15.props, _excluded$f);
40344
+ let {
40345
+ onChange,
40346
+ value
40347
+ } = _ref16;
40348
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
40332
40349
  allowClear: true,
40333
40350
  value: value,
40334
40351
  onChange: e => onChange(e.target.value),
@@ -40338,56 +40355,60 @@ const inputTypeComponent = {
40338
40355
  autoSize: {
40339
40356
  minRows: 5,
40340
40357
  maxRows: 5
40341
- },
40342
- ...props,
40358
+ }
40359
+ }, props), {}, {
40343
40360
  disabled: false
40344
- });
40361
+ }));
40345
40362
  },
40346
- textarea: ({
40347
- props,
40348
- rules
40349
- }, {
40350
- inputMeta,
40351
- t
40352
- }) => {
40363
+ textarea: (_ref17, _ref18) => {
40364
+ let {
40365
+ props,
40366
+ rules
40367
+ } = _ref17;
40368
+ let {
40369
+ inputMeta,
40370
+ t
40371
+ } = _ref18;
40353
40372
  const maxRule = rules.find(r => r.max);
40354
40373
  let maxLength = MAX_TEXT_AREA_LENGTH;
40355
40374
  if (maxRule) {
40356
40375
  maxLength = maxRule.max;
40357
40376
  }
40358
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
40377
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
40359
40378
  allowClear: true,
40360
40379
  autoComplete: "new-password",
40361
40380
  maxLength: maxLength,
40362
40381
  autoSize: {
40363
40382
  minRows: 5,
40364
40383
  maxRows: 5
40365
- },
40366
- ...props,
40384
+ }
40385
+ }, props), {}, {
40367
40386
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
40368
40387
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
40369
- });
40388
+ }));
40370
40389
  },
40371
- phoneNumber: ({
40372
- name,
40373
- inputName,
40374
- props,
40375
- value,
40376
- repeatIndex,
40377
- repeatValues,
40378
- formsValue
40379
- }, {
40380
- setFormValues,
40381
- t
40382
- }) => {
40383
- return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, {
40390
+ phoneNumber: (_ref19, _ref20) => {
40391
+ let {
40392
+ name,
40393
+ inputName,
40394
+ props,
40395
+ value,
40396
+ repeatIndex,
40397
+ repeatValues,
40398
+ formsValue
40399
+ } = _ref19;
40400
+ let {
40401
+ setFormValues,
40402
+ t
40403
+ } = _ref20;
40404
+ return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, _objectSpread2(_objectSpread2({
40384
40405
  t: t,
40385
40406
  doChangeErrors: false,
40386
40407
  allowClear: true,
40387
- country: formsValue?.country,
40408
+ country: formsValue === null || formsValue === void 0 ? void 0 : formsValue.country,
40388
40409
  formsValue: formsValue,
40389
- initialValue: value,
40390
- ...props,
40410
+ initialValue: value
40411
+ }, props), {}, {
40391
40412
  onChange: val => {
40392
40413
  if (repeatValues) {
40393
40414
  const inputValues = Array.isArray(formsValue[name]) ? formsValue[name] || [] : [];
@@ -40403,24 +40424,25 @@ const inputTypeComponent = {
40403
40424
  setFormValues(formsValue);
40404
40425
  }
40405
40426
  }
40406
- });
40427
+ }));
40407
40428
  },
40408
- switch: ({
40409
- props,
40410
- value,
40411
- restricted,
40412
- autocomplete,
40413
- formsValue,
40414
- repeatIndex,
40415
- name,
40416
- inputName,
40417
- replace
40418
- }, {
40419
- form,
40420
- setFormValues
40421
- }) => {
40422
- return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, {
40423
- ...props,
40429
+ switch: (_ref21, _ref22) => {
40430
+ let {
40431
+ props,
40432
+ value,
40433
+ restricted,
40434
+ autocomplete,
40435
+ formsValue,
40436
+ repeatIndex,
40437
+ name,
40438
+ inputName,
40439
+ replace
40440
+ } = _ref21;
40441
+ let {
40442
+ form,
40443
+ setFormValues
40444
+ } = _ref22;
40445
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, _objectSpread2(_objectSpread2({}, props), {}, {
40424
40446
  defaultChecked: value || false,
40425
40447
  checked: value || false,
40426
40448
  onChange: isChecked => {
@@ -40462,14 +40484,15 @@ const inputTypeComponent = {
40462
40484
  setFormValues(formsValue);
40463
40485
  }
40464
40486
  }
40465
- });
40487
+ }));
40466
40488
  },
40467
- total100: ({
40468
- props,
40469
- name,
40470
- options,
40471
- value
40472
- }) => {
40489
+ total100: _ref23 => {
40490
+ let {
40491
+ props,
40492
+ name,
40493
+ options,
40494
+ value
40495
+ } = _ref23;
40473
40496
  value = value ? Array.isArray(value) ? value : [value] : [];
40474
40497
  function totalValue() {
40475
40498
  let total = 0;
@@ -40493,10 +40516,11 @@ const inputTypeComponent = {
40493
40516
  className: "total100",
40494
40517
  children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.List, {
40495
40518
  name: name,
40496
- children: (fields, {
40497
- add,
40498
- remove
40499
- }) => {
40519
+ children: (fields, _ref24) => {
40520
+ let {
40521
+ add,
40522
+ remove
40523
+ } = _ref24;
40500
40524
  if (fields.length === 0) {
40501
40525
  const formData = value || [];
40502
40526
  if (formData.length) {
@@ -40515,26 +40539,26 @@ const inputTypeComponent = {
40515
40539
  const v = value[field.name];
40516
40540
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Space, {
40517
40541
  className: "total",
40518
- children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
40519
- noStyle: true,
40520
- ...field,
40542
+ children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
40543
+ noStyle: true
40544
+ }, field), {}, {
40521
40545
  name: [field.name, "type"],
40522
40546
  fieldKey: [field.fieldKey, "type"],
40523
40547
  initialValue: v.type,
40524
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
40548
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
40525
40549
  allowClear: true,
40526
40550
  showSearch: true,
40527
40551
  filterOption: filterSelectOptions,
40528
- optionFilterProp: "children",
40529
- ...props,
40552
+ optionFilterProp: "children"
40553
+ }, props), {}, {
40530
40554
  children: options.map((option, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
40531
40555
  value: option.value,
40532
40556
  children: option.label
40533
40557
  }, i))
40534
- })
40535
- }), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
40536
- noStyle: true,
40537
- ...field,
40558
+ }))
40559
+ })), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
40560
+ noStyle: true
40561
+ }, field), {}, {
40538
40562
  name: [field.name, "value"],
40539
40563
  fieldKey: [field.fieldKey, "value"],
40540
40564
  initialValue: v.value,
@@ -40542,14 +40566,14 @@ const inputTypeComponent = {
40542
40566
  allowClear: true,
40543
40567
  name: "value",
40544
40568
  formatter: value => {
40545
- return value ? `${value}%` : "";
40569
+ return value ? "".concat(value, "%") : "";
40546
40570
  },
40547
40571
  disabled: !v.type,
40548
40572
  placeholder: props.valueplaceholder ? props.valueplaceholder : "Value",
40549
40573
  min: 1,
40550
40574
  max: 100 - siblingTotal(v.type)
40551
40575
  })
40552
- }), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
40576
+ })), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
40553
40577
  disabled: !v.value || !v.type || totalValue() >= 100,
40554
40578
  type: "primary",
40555
40579
  icon: /*#__PURE__*/jsxRuntime.jsx(Icons.PlusOutlined, {}),
@@ -40581,18 +40605,21 @@ const inputTypeComponent = {
40581
40605
  }) : null]
40582
40606
  });
40583
40607
  },
40584
- percentage: ({
40585
- name,
40586
- inputName,
40587
- totalMax,
40588
- repeatIndex,
40589
- props,
40590
- formsValue,
40591
- input
40592
- }, {
40593
- inputMeta,
40594
- t
40595
- }) => {
40608
+ percentage: (_ref25, _ref26) => {
40609
+ var _input$meta6;
40610
+ let {
40611
+ name,
40612
+ inputName,
40613
+ totalMax,
40614
+ repeatIndex,
40615
+ props,
40616
+ formsValue,
40617
+ input
40618
+ } = _ref25;
40619
+ let {
40620
+ inputMeta,
40621
+ t
40622
+ } = _ref26;
40596
40623
  const isRepeatable = Array.isArray(formsValue[name]);
40597
40624
  let totalSiblings = 0;
40598
40625
  if (isRepeatable && totalMax) {
@@ -40600,15 +40627,15 @@ const inputTypeComponent = {
40600
40627
  totl = totl + (grp[inputName] || 0);
40601
40628
  return totl;
40602
40629
  }, 0);
40603
- } else if (Array.isArray(input?.meta?.siblings)) {
40630
+ } else if (Array.isArray(input === null || input === void 0 || (_input$meta6 = input.meta) === null || _input$meta6 === void 0 ? void 0 : _input$meta6.siblings)) {
40604
40631
  totalSiblings = input.meta.siblings.reduce((totl, key) => {
40605
40632
  totl = totl + (formsValue[key] || 0);
40606
40633
  return totl;
40607
40634
  }, 0);
40608
40635
  }
40609
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
40610
- allowClear: true,
40611
- ...props,
40636
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
40637
+ allowClear: true
40638
+ }, props), {}, {
40612
40639
  style: {
40613
40640
  width: "100%"
40614
40641
  },
@@ -40617,33 +40644,36 @@ const inputTypeComponent = {
40617
40644
  min: 0,
40618
40645
  max: 100 - totalSiblings,
40619
40646
  formatter: value => {
40620
- return value ? `${value}` : "";
40647
+ return value ? "".concat(value) : "";
40621
40648
  },
40622
40649
  parser: value => value.replace("%", ""),
40623
40650
  addonAfter: "%"
40624
- });
40651
+ }));
40625
40652
  },
40626
- year: ({
40627
- props
40628
- }) => {
40653
+ year: _ref27 => {
40654
+ let {
40655
+ props
40656
+ } = _ref27;
40629
40657
  const lng = localStorage.getItem("datastakeLng") || "en";
40630
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
40658
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
40631
40659
  allowClear: true,
40632
40660
  locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"],
40633
- picker: "year",
40634
- ...props,
40661
+ picker: "year"
40662
+ }, props), {}, {
40635
40663
  format: "YYYY"
40636
- });
40664
+ }));
40637
40665
  },
40638
- upload: ({
40639
- rules,
40640
- value
40641
- }, {
40642
- setLoading,
40643
- t,
40644
- getApiBaseUrl,
40645
- getAppHeader
40646
- }) => {
40666
+ upload: (_ref28, _ref29) => {
40667
+ let {
40668
+ rules,
40669
+ value
40670
+ } = _ref28;
40671
+ let {
40672
+ setLoading,
40673
+ t,
40674
+ getApiBaseUrl,
40675
+ getAppHeader
40676
+ } = _ref29;
40647
40677
  const apiURL = getApiBaseUrl();
40648
40678
  const accept = rules.length ? rules.find(rule => Object.keys(rule).includes("accept")).accept || "*" : null;
40649
40679
  const values = (Array.isArray(value) ? value : value && typeof value === "object" && value.fileList && Array.isArray(value.fileList) ? value.fileList.map(f => f.response).filter(f => f) : []) || [];
@@ -40656,13 +40686,12 @@ const inputTypeComponent = {
40656
40686
  }
40657
40687
  }
40658
40688
  const allowedExtensions = accept && accept !== "*" ? accept.split(",").map(ext => ext.trim().toLowerCase()) : [];
40659
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
40660
- ...maxProps,
40689
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({}, maxProps), {}, {
40661
40690
  accept: accept,
40662
- action: `${apiURL}/upload`,
40691
+ action: "".concat(apiURL, "/upload"),
40663
40692
  beforeUpload: beforeUpload(allowedExtensions),
40664
40693
  onChange: val => {
40665
- if (val?.file && typeof setLoading === "function") {
40694
+ if (val !== null && val !== void 0 && val.file && typeof setLoading === "function") {
40666
40695
  if (val.file.percent !== 100) {
40667
40696
  setLoading(true);
40668
40697
  } else {
@@ -40670,10 +40699,9 @@ const inputTypeComponent = {
40670
40699
  }
40671
40700
  }
40672
40701
  },
40673
- headers: {
40674
- Authorization: `Bearer ${getToken()}`,
40675
- ...getAppHeader()
40676
- },
40702
+ headers: _objectSpread2({
40703
+ Authorization: "Bearer ".concat(getToken())
40704
+ }, getAppHeader()),
40677
40705
  defaultFileList: values,
40678
40706
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
40679
40707
  style: {
@@ -40683,17 +40711,19 @@ const inputTypeComponent = {
40683
40711
  children: t("Upload")
40684
40712
  })]
40685
40713
  })
40686
- });
40714
+ }));
40687
40715
  },
40688
- imageUpload: ({
40689
- rules,
40690
- value
40691
- }, {
40692
- setLoading,
40693
- getApiBaseUrl,
40694
- getAppHeader,
40695
- t
40696
- }) => {
40716
+ imageUpload: (_ref30, _ref31) => {
40717
+ let {
40718
+ rules,
40719
+ value
40720
+ } = _ref30;
40721
+ let {
40722
+ setLoading,
40723
+ getApiBaseUrl,
40724
+ getAppHeader,
40725
+ t
40726
+ } = _ref31;
40697
40727
  const apiURL = getApiBaseUrl();
40698
40728
  const values = getImageUploadEditValue(value);
40699
40729
  const maxRule = rules.find(r => r.max);
@@ -40704,17 +40734,17 @@ const inputTypeComponent = {
40704
40734
  maxProps.multiple = true;
40705
40735
  }
40706
40736
  }
40707
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
40708
- ...maxProps,
40737
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({}, maxProps), {}, {
40709
40738
  beforeUpload: beforeUpload(allowedImageExtensions),
40710
40739
  accept: "image/*",
40711
40740
  classList: !values || !values.length ? "empty" : "",
40712
40741
  listType: "picture",
40713
- action: `${apiURL}/upload`,
40742
+ action: "".concat(apiURL, "/upload"),
40714
40743
  onChange: val => {
40715
40744
  if (typeof setLoading === "function") {
40716
- if (val?.file) {
40717
- if (val?.file?.status === "removed") {
40745
+ if (val !== null && val !== void 0 && val.file) {
40746
+ var _val$file;
40747
+ if ((val === null || val === void 0 || (_val$file = val.file) === null || _val$file === void 0 ? void 0 : _val$file.status) === "removed") {
40718
40748
  setLoading(false);
40719
40749
  return;
40720
40750
  }
@@ -40726,10 +40756,9 @@ const inputTypeComponent = {
40726
40756
  setLoading(false);
40727
40757
  }
40728
40758
  },
40729
- headers: {
40730
- Authorization: `Bearer ${getToken()}`,
40731
- ...getAppHeader()
40732
- },
40759
+ headers: _objectSpread2({
40760
+ Authorization: "Bearer ".concat(getToken())
40761
+ }, getAppHeader()),
40733
40762
  defaultFileList: values,
40734
40763
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
40735
40764
  style: {
@@ -40739,17 +40768,19 @@ const inputTypeComponent = {
40739
40768
  children: t("Upload")
40740
40769
  })]
40741
40770
  })
40742
- });
40771
+ }));
40743
40772
  },
40744
- videoUpload: ({
40745
- rules,
40746
- value
40747
- }, {
40748
- setLoading = () => {},
40749
- getApiBaseUrl,
40750
- getAppHeader,
40751
- t
40752
- }) => {
40773
+ videoUpload: (_ref32, _ref33) => {
40774
+ let {
40775
+ rules,
40776
+ value
40777
+ } = _ref32;
40778
+ let {
40779
+ setLoading = () => {},
40780
+ getApiBaseUrl,
40781
+ getAppHeader,
40782
+ t
40783
+ } = _ref33;
40753
40784
  const apiURL = getApiBaseUrl();
40754
40785
  const values = getImageUploadEditValue(value);
40755
40786
  const maxRule = rules.find(r => r.max);
@@ -40760,21 +40791,25 @@ const inputTypeComponent = {
40760
40791
  maxProps.multiple = true;
40761
40792
  }
40762
40793
  }
40763
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
40764
- itemRender: (item, fileList) => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
40765
- children: [/*#__PURE__*/jsxRuntime.jsx(EditVideoPreview, {
40766
- url: fileList?.response?.url || fileList?.url
40767
- }), item]
40768
- }),
40769
- ...maxProps,
40794
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({
40795
+ itemRender: (item, fileList) => {
40796
+ var _fileList$response;
40797
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
40798
+ children: [/*#__PURE__*/jsxRuntime.jsx(EditVideoPreview, {
40799
+ url: (fileList === null || fileList === void 0 || (_fileList$response = fileList.response) === null || _fileList$response === void 0 ? void 0 : _fileList$response.url) || (fileList === null || fileList === void 0 ? void 0 : fileList.url)
40800
+ }), item]
40801
+ });
40802
+ }
40803
+ }, maxProps), {}, {
40770
40804
  accept: "video/*",
40771
40805
  classList: !values || !values.length ? "empty" : "",
40772
40806
  listType: "picture",
40773
- action: `${apiURL}/upload`,
40807
+ action: "".concat(apiURL, "/upload"),
40774
40808
  onChange: val => {
40775
40809
  if (typeof setLoading === "function") {
40776
- if (val?.file) {
40777
- if (val?.file?.status === "removed") {
40810
+ if (val !== null && val !== void 0 && val.file) {
40811
+ var _val$file2;
40812
+ if ((val === null || val === void 0 || (_val$file2 = val.file) === null || _val$file2 === void 0 ? void 0 : _val$file2.status) === "removed") {
40778
40813
  setLoading(false);
40779
40814
  return;
40780
40815
  }
@@ -40786,10 +40821,9 @@ const inputTypeComponent = {
40786
40821
  setLoading(false);
40787
40822
  }
40788
40823
  },
40789
- headers: {
40790
- Authorization: `Bearer ${getToken()}`,
40791
- ...getAppHeader()
40792
- },
40824
+ headers: _objectSpread2({
40825
+ Authorization: "Bearer ".concat(getToken())
40826
+ }, getAppHeader()),
40793
40827
  defaultFileList: values,
40794
40828
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
40795
40829
  style: {
@@ -40799,17 +40833,19 @@ const inputTypeComponent = {
40799
40833
  children: t("Upload")
40800
40834
  })]
40801
40835
  })
40802
- });
40836
+ }));
40803
40837
  },
40804
- geolocation: ({
40805
- value,
40806
- name,
40807
- formsValue,
40808
- addressData,
40809
- props
40810
- }, {
40811
- inputMeta
40812
- }) => {
40838
+ geolocation: (_ref34, _ref35) => {
40839
+ let {
40840
+ value,
40841
+ name,
40842
+ formsValue,
40843
+ addressData,
40844
+ props
40845
+ } = _ref34;
40846
+ let {
40847
+ inputMeta
40848
+ } = _ref35;
40813
40849
  let search = formsValue.country;
40814
40850
  if (addressData && Object.keys(addressData).length > 0) {
40815
40851
  const country = countriesList.countries[formsValue.country] || {};
@@ -40817,10 +40853,10 @@ const inputTypeComponent = {
40817
40853
  search = addressData.country;
40818
40854
  }
40819
40855
  if (addressData.level1) {
40820
- search = `${addressData.level1}, ${addressData.country || country.name}`;
40856
+ search = "".concat(addressData.level1, ", ").concat(addressData.country || country.name);
40821
40857
  }
40822
40858
  if (addressData.level2) {
40823
- search = `${addressData.level2}, ${addressData.level1}, ${addressData.country || country.name}`;
40859
+ search = "".concat(addressData.level2, ", ").concat(addressData.level1, ", ").concat(addressData.country || country.name);
40824
40860
  }
40825
40861
  } else {
40826
40862
  const country = countriesList.countries[formsValue.country] || {};
@@ -40828,10 +40864,10 @@ const inputTypeComponent = {
40828
40864
  search = country.name;
40829
40865
  }
40830
40866
  if (formsValue.administrativeLevel1Name) {
40831
- search = `${search} ${formsValue.administrativeLevel1Name}`;
40867
+ search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
40832
40868
  }
40833
40869
  if (formsValue.administrativeLevel2Name) {
40834
- search = `${search} ${formsValue.administrativeLevel2Name}`;
40870
+ search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
40835
40871
  }
40836
40872
  }
40837
40873
  return /*#__PURE__*/jsxRuntime.jsx(Geolocation, {
@@ -40844,33 +40880,35 @@ const inputTypeComponent = {
40844
40880
  searchValue: search
40845
40881
  });
40846
40882
  },
40847
- ajaxSelect: ({
40848
- call,
40849
- automaticallyLink,
40850
- name,
40851
- preSelected,
40852
- inputName,
40853
- props,
40854
- formsValue,
40855
- onNewSetValue,
40856
- multiple,
40857
- updateOptions,
40858
- repeatValues,
40859
- repeatIndex,
40860
- value,
40861
- unique,
40862
- address,
40863
- addressData = {},
40864
- input
40865
- }, {
40866
- form,
40867
- forms,
40868
- setAddress,
40869
- changeInputMeta,
40870
- inputMeta = {},
40871
- meta,
40872
- setFormValues
40873
- }) => {
40883
+ ajaxSelect: (_ref36, _ref37) => {
40884
+ let {
40885
+ call,
40886
+ automaticallyLink,
40887
+ name,
40888
+ preSelected,
40889
+ inputName,
40890
+ props,
40891
+ formsValue,
40892
+ onNewSetValue,
40893
+ multiple,
40894
+ updateOptions,
40895
+ repeatValues,
40896
+ repeatIndex,
40897
+ value,
40898
+ unique,
40899
+ address,
40900
+ addressData = {},
40901
+ input
40902
+ } = _ref36;
40903
+ let {
40904
+ form,
40905
+ forms,
40906
+ setAddress,
40907
+ changeInputMeta,
40908
+ inputMeta = {},
40909
+ meta,
40910
+ setFormValues
40911
+ } = _ref37;
40874
40912
  return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect, {
40875
40913
  preSelected: preSelected,
40876
40914
  input: input,
@@ -40906,40 +40944,41 @@ const inputTypeComponent = {
40906
40944
  const selectedValue = data.find(v => v.value === ev);
40907
40945
  if (address && selectedValue) {
40908
40946
  dot__default["default"].str(address, selectedValue.label, addressData);
40909
- setAddress({
40910
- ...addressData
40911
- });
40947
+ setAddress(_objectSpread2({}, addressData));
40912
40948
  }
40913
40949
  }
40914
40950
  },
40915
40951
  setAddress: setAddress
40916
40952
  });
40917
40953
  },
40918
- tag: ({
40919
- value,
40920
- repeatLabel
40921
- }) => {
40954
+ tag: _ref38 => {
40955
+ let {
40956
+ value,
40957
+ repeatLabel
40958
+ } = _ref38;
40922
40959
  return /*#__PURE__*/jsxRuntime.jsx(TagInput$1, {
40923
40960
  allowClear: true,
40924
40961
  value: value || [],
40925
40962
  newPlaceholder: repeatLabel
40926
40963
  });
40927
40964
  },
40928
- modal: ({
40929
- call,
40930
- automaticallyLink,
40931
- name,
40932
- inputName,
40933
- props,
40934
- formsValue,
40935
- onNewSetValue,
40936
- repeatValues,
40937
- repeatIndex,
40938
- value,
40939
- modalTitle
40940
- }, {
40941
- form
40942
- }) => {
40965
+ modal: (_ref39, _ref40) => {
40966
+ let {
40967
+ call,
40968
+ automaticallyLink,
40969
+ name,
40970
+ inputName,
40971
+ props,
40972
+ formsValue,
40973
+ onNewSetValue,
40974
+ repeatValues,
40975
+ repeatIndex,
40976
+ value,
40977
+ modalTitle
40978
+ } = _ref39;
40979
+ let {
40980
+ form
40981
+ } = _ref40;
40943
40982
  return /*#__PURE__*/jsxRuntime.jsx(AjaxModal$2, {
40944
40983
  allowClear: true,
40945
40984
  call: call,
@@ -40957,63 +40996,69 @@ const inputTypeComponent = {
40957
40996
  buttonText: modalTitle
40958
40997
  });
40959
40998
  },
40960
- website: ({
40961
- name,
40962
- inputName,
40963
- props,
40964
- value,
40965
- repeatIndex,
40966
- repeatValues,
40967
- formsValue
40968
- }, {
40969
- form,
40970
- inputMeta = {},
40971
- t
40972
- }) => {
40973
- return /*#__PURE__*/jsxRuntime.jsx(Website, {
40999
+ website: (_ref41, _ref42) => {
41000
+ let {
41001
+ name,
41002
+ inputName,
41003
+ props,
41004
+ value,
41005
+ repeatIndex,
41006
+ repeatValues,
41007
+ formsValue
41008
+ } = _ref41;
41009
+ let {
41010
+ form,
41011
+ inputMeta = {},
41012
+ t
41013
+ } = _ref42;
41014
+ return /*#__PURE__*/jsxRuntime.jsx(Website, _objectSpread2(_objectSpread2({
40974
41015
  allowClear: true,
40975
41016
  initialValue: value,
40976
- t: t,
40977
- ...props,
41017
+ t: t
41018
+ }, props), {}, {
40978
41019
  onChange: val => updateFormValues(repeatIndex, repeatValues, inputName, val, formsValue, name, form),
40979
41020
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
40980
41021
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || "www.example.com"
40981
- });
41022
+ }));
40982
41023
  },
40983
- dataLink: ({
40984
- setValues,
40985
- name,
40986
- onValuesChange,
40987
- formsValue,
40988
- input,
40989
- changeLinking,
40990
- call,
40991
- automaticallyLink,
40992
- inputName,
40993
- props,
40994
- onNewSetValue,
40995
- multiple,
40996
- updateOptions,
40997
- repeatValues,
40998
- repeatIndex,
40999
- value,
41000
- unique,
41001
- address,
41002
- addressData = {},
41003
- getFromLinking
41004
- }, {
41005
- form,
41006
- groupFormId,
41007
- setAddress,
41008
- isHighlighted,
41009
- changeInputMeta,
41010
- meta,
41011
- inputMeta,
41012
- forms
41013
- }) => {
41014
- if (input?.meta?.optionsView?.editInputType === "ajaxSelect") {
41015
- const currentValue = groupFormId ? formsValue[groupFormId]?.[name] : formsValue[name];
41016
- input?.meta?.optionsView?.call || input?.meta?.call || "default::list()::::";
41024
+ dataLink: (_ref43, _ref44) => {
41025
+ var _input$meta7, _input$meta10, _formsValue$meta, _input$meta11;
41026
+ let {
41027
+ setValues,
41028
+ name,
41029
+ onValuesChange,
41030
+ formsValue,
41031
+ input,
41032
+ changeLinking,
41033
+ call,
41034
+ automaticallyLink,
41035
+ inputName,
41036
+ props,
41037
+ onNewSetValue,
41038
+ multiple,
41039
+ updateOptions,
41040
+ repeatValues,
41041
+ repeatIndex,
41042
+ value,
41043
+ unique,
41044
+ address,
41045
+ addressData = {},
41046
+ getFromLinking
41047
+ } = _ref43;
41048
+ let {
41049
+ form,
41050
+ groupFormId,
41051
+ setAddress,
41052
+ isHighlighted,
41053
+ changeInputMeta,
41054
+ meta,
41055
+ inputMeta,
41056
+ forms
41057
+ } = _ref44;
41058
+ if ((input === null || input === void 0 || (_input$meta7 = input.meta) === null || _input$meta7 === void 0 || (_input$meta7 = _input$meta7.optionsView) === null || _input$meta7 === void 0 ? void 0 : _input$meta7.editInputType) === "ajaxSelect") {
41059
+ var _formsValue$groupForm, _input$meta8, _input$meta9;
41060
+ const currentValue = groupFormId ? (_formsValue$groupForm = formsValue[groupFormId]) === null || _formsValue$groupForm === void 0 ? void 0 : _formsValue$groupForm[name] : formsValue[name];
41061
+ (input === null || input === void 0 || (_input$meta8 = input.meta) === null || _input$meta8 === void 0 || (_input$meta8 = _input$meta8.optionsView) === null || _input$meta8 === void 0 ? void 0 : _input$meta8.call) || (input === null || input === void 0 || (_input$meta9 = input.meta) === null || _input$meta9 === void 0 ? void 0 : _input$meta9.call) || "default::list()::::";
41017
41062
  return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect$1, {
41018
41063
  size: "medium",
41019
41064
  input: input,
@@ -41050,9 +41095,7 @@ const inputTypeComponent = {
41050
41095
  const selectedValue = data.find(v => v.value === ev);
41051
41096
  if (address && selectedValue) {
41052
41097
  dot__default["default"].str(address, selectedValue.label, addressData);
41053
- setAddress({
41054
- ...addressData
41055
- });
41098
+ setAddress(_objectSpread2({}, addressData));
41056
41099
  }
41057
41100
  }
41058
41101
  },
@@ -41062,188 +41105,149 @@ const inputTypeComponent = {
41062
41105
  isDataLink: true
41063
41106
  });
41064
41107
  }
41065
- const isSingle = input?.meta?.maxRepeat === 1;
41066
- const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [{
41067
- ...(formsValue[groupFormId] || {})[name]
41068
- }] : [] : getArray((formsValue[groupFormId] || {})[name] || []).map(v => ({
41069
- ...v
41070
- })) : isSingle ? formsValue[name] ? [{
41071
- ...formsValue[name]
41072
- }] : [] : (formsValue[name] || []).map(v => ({
41073
- ...v
41074
- }));
41108
+ const isSingle = (input === null || input === void 0 || (_input$meta10 = input.meta) === null || _input$meta10 === void 0 ? void 0 : _input$meta10.maxRepeat) === 1;
41109
+ const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [_objectSpread2({}, (formsValue[groupFormId] || {})[name])] : [] : getArray((formsValue[groupFormId] || {})[name] || []).map(v => _objectSpread2({}, v)) : isSingle ? formsValue[name] ? [_objectSpread2({}, formsValue[name])] : [] : (formsValue[name] || []).map(v => _objectSpread2({}, v));
41075
41110
  const onUpdate = (val, i) => {
41076
41111
  const _val = isSingle ? {
41077
41112
  [name]: val
41078
41113
  } : {
41079
- [name]: formData?.map((d, j) => i === j ? val : d)
41114
+ [name]: formData === null || formData === void 0 ? void 0 : formData.map((d, j) => i === j ? val : d)
41080
41115
  };
41081
41116
  if (groupFormId) {
41082
- const _defaultData = form?.getFieldValue(groupFormId) || {};
41083
- const _newData = {
41084
- ..._defaultData,
41085
- ..._val
41086
- };
41087
- onValuesChange(_newData, {
41088
- ...formsValue,
41117
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
41118
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
41119
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
41089
41120
  [groupFormId]: _newData
41090
- });
41091
- form?.setFieldValue(groupFormId, _newData);
41092
- setValues({
41093
- ...formsValue,
41121
+ }));
41122
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
41123
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
41094
41124
  [groupFormId]: _newData
41095
- });
41125
+ }));
41096
41126
  return;
41097
41127
  }
41098
- onValuesChange(_val, {
41099
- ...formsValue,
41100
- ..._val
41101
- });
41102
- form?.setFieldValue(name, _val[name]);
41103
- setValues({
41104
- ...formsValue,
41105
- ..._val
41106
- });
41128
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
41129
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
41130
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
41107
41131
  };
41108
41132
  return /*#__PURE__*/jsxRuntime.jsx(DataLink, {
41109
41133
  form: input,
41110
41134
  formsValue: formsValue,
41111
41135
  onUpdate: onUpdate,
41112
41136
  isHighlighted: isHighlighted,
41113
- values: groupFormId ? {
41114
- ...(formsValue[groupFormId] || {}),
41137
+ values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
41115
41138
  meta: {
41116
- inputs: (formsValue?.meta?.inputs || {})[groupFormId]
41139
+ inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta = formsValue.meta) === null || _formsValue$meta === void 0 ? void 0 : _formsValue$meta.inputs) || {})[groupFormId]
41117
41140
  }
41118
- } : formsValue,
41141
+ }) : formsValue,
41119
41142
  name: name,
41120
41143
  groupFormId: groupFormId,
41121
- maxRepeat: input?.meta?.maxRepeat,
41122
- remove: ({
41123
- key
41124
- }) => {
41144
+ maxRepeat: input === null || input === void 0 || (_input$meta11 = input.meta) === null || _input$meta11 === void 0 ? void 0 : _input$meta11.maxRepeat,
41145
+ remove: _ref45 => {
41146
+ let {
41147
+ key
41148
+ } = _ref45;
41125
41149
  const _val = isSingle ? {
41126
41150
  [name]: null
41127
41151
  } : {
41128
41152
  [name]: formData.filter((v, i) => i !== key)
41129
41153
  };
41130
41154
  if (groupFormId) {
41131
- const _defaultData = form?.getFieldValue(groupFormId) || {};
41132
- const _newData = {
41133
- ..._defaultData,
41134
- ..._val
41135
- };
41136
- onValuesChange(_newData, {
41137
- ...formsValue,
41155
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
41156
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
41157
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
41138
41158
  [groupFormId]: _newData
41139
- });
41140
- form?.setFieldValue(groupFormId, _newData);
41141
- setValues({
41142
- ...formsValue,
41159
+ }));
41160
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
41161
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
41143
41162
  [groupFormId]: _newData
41144
- });
41163
+ }));
41145
41164
  return;
41146
41165
  }
41147
- onValuesChange(_val, {
41148
- ...formsValue,
41149
- ..._val
41150
- });
41151
- form?.setFieldValue(name, _val[name]);
41152
- setValues({
41153
- ...formsValue,
41154
- ..._val
41155
- });
41166
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
41167
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
41168
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
41156
41169
  },
41157
41170
  add: val => {
41158
41171
  const _val = isSingle ? {
41159
41172
  [name]: val
41160
41173
  } : {
41161
- [name]: [...formData, {
41162
- ...val
41163
- }]
41174
+ [name]: [...formData, _objectSpread2({}, val)]
41164
41175
  };
41165
41176
  if (groupFormId) {
41166
- const _defaultData = form?.getFieldValue(groupFormId) || {};
41167
- const _newData = {
41168
- ..._defaultData,
41169
- ..._val
41170
- };
41171
- form?.setFieldValue(groupFormId, _newData);
41172
- onValuesChange(_newData, {
41173
- ...formsValue,
41177
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
41178
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
41179
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
41180
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
41174
41181
  [groupFormId]: _newData
41175
- });
41176
- setValues({
41177
- ...formsValue,
41182
+ }));
41183
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
41178
41184
  [groupFormId]: _newData
41179
- });
41185
+ }));
41180
41186
  return;
41181
41187
  }
41182
- form?.setFieldValue(name, _val[name]);
41183
- onValuesChange(_val, {
41184
- ...formsValue,
41185
- ..._val
41186
- });
41187
- setValues({
41188
- ...formsValue,
41189
- ..._val
41190
- });
41188
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
41189
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
41190
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
41191
41191
  },
41192
41192
  k: name,
41193
41193
  formData: formData
41194
41194
  });
41195
41195
  },
41196
- internallink: ({
41197
- name,
41198
- inputName,
41199
- props,
41200
- value,
41201
- repeatIndex,
41202
- repeatValues,
41203
- formsValue
41204
- }, {
41205
- form,
41206
- inputMeta = {},
41207
- t
41208
- }) => {
41209
- return /*#__PURE__*/jsxRuntime.jsx(Website, {
41196
+ internallink: (_ref46, _ref47) => {
41197
+ let {
41198
+ name,
41199
+ inputName,
41200
+ props,
41201
+ value,
41202
+ repeatIndex,
41203
+ repeatValues,
41204
+ formsValue
41205
+ } = _ref46;
41206
+ let {
41207
+ form,
41208
+ inputMeta = {},
41209
+ t
41210
+ } = _ref47;
41211
+ return /*#__PURE__*/jsxRuntime.jsx(Website, _objectSpread2(_objectSpread2({
41210
41212
  allowClear: true,
41211
41213
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
41212
41214
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || "www.example.com",
41213
- initialValue: value,
41214
- ...props,
41215
+ initialValue: value
41216
+ }, props), {}, {
41215
41217
  onChange: val => updateFormValues(repeatIndex, repeatValues, inputName, val, formsValue, name, form)
41216
- });
41218
+ }));
41217
41219
  },
41218
- group: ({
41219
- props,
41220
- groupInputs
41221
- }) => {
41222
- return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, {
41223
- groupInputs: groupInputs,
41224
- ...props
41225
- });
41220
+ group: _ref48 => {
41221
+ let {
41222
+ props,
41223
+ groupInputs
41224
+ } = _ref48;
41225
+ return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, _objectSpread2({
41226
+ groupInputs: groupInputs
41227
+ }, props));
41226
41228
  },
41227
- groupInputs: ({
41228
- props,
41229
- groupInputs
41230
- }, {
41231
- inputMeta
41232
- }) => {
41233
- return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, {
41229
+ groupInputs: (_ref49, _ref50) => {
41230
+ let {
41231
+ props,
41232
+ groupInputs
41233
+ } = _ref49;
41234
+ let {
41235
+ inputMeta
41236
+ } = _ref50;
41237
+ return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, _objectSpread2({
41234
41238
  groupInputs: groupInputs,
41235
- inputMeta: inputMeta,
41236
- ...props
41237
- });
41239
+ inputMeta: inputMeta
41240
+ }, props));
41238
41241
  },
41239
- radioGroup: ({
41240
- props,
41241
- value,
41242
- options
41243
- }) => {
41244
- return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, {
41245
- value: value,
41246
- ...props,
41242
+ radioGroup: _ref51 => {
41243
+ let {
41244
+ props,
41245
+ value,
41246
+ options
41247
+ } = _ref51;
41248
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, _objectSpread2(_objectSpread2({
41249
+ value: value
41250
+ }, props), {}, {
41247
41251
  children: (options || []).map(o => {
41248
41252
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Radio, {
41249
41253
  value: o.value,
@@ -41256,16 +41260,17 @@ const inputTypeComponent = {
41256
41260
  }) : null]
41257
41261
  }, o.value);
41258
41262
  })
41259
- });
41263
+ }));
41260
41264
  },
41261
- checkboxGroup: ({
41262
- props,
41263
- value,
41264
- options
41265
- }) => {
41266
- return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox.Group, {
41267
- value: value,
41268
- ...props,
41265
+ checkboxGroup: _ref52 => {
41266
+ let {
41267
+ props,
41268
+ value,
41269
+ options
41270
+ } = _ref52;
41271
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox.Group, _objectSpread2(_objectSpread2({
41272
+ value: value
41273
+ }, props), {}, {
41269
41274
  children: (options || []).map(o => {
41270
41275
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Checkbox, {
41271
41276
  value: o.value,
@@ -41278,28 +41283,30 @@ const inputTypeComponent = {
41278
41283
  }) : null]
41279
41284
  }, o.value);
41280
41285
  })
41281
- });
41286
+ }));
41282
41287
  }
41283
41288
  };
41284
- const GetFormItem = ({
41285
- code,
41286
- inputData,
41287
- inputId,
41288
- input,
41289
- setLoading,
41290
- values,
41291
- MainForm,
41292
- options,
41293
- plainForms,
41294
- setValues,
41295
- alertError,
41296
- setAddress,
41297
- inputMeta = {},
41298
- inputKey,
41299
- changeInputMeta = () => {},
41300
- i,
41301
- isCreate = false
41302
- }) => {
41289
+ const GetFormItem = _ref53 => {
41290
+ var _find, _input$meta12, _input$meta13, _input$meta14, _input$meta15, _input$meta16, _input$meta17, _input$meta18, _inputData$value, _input$meta19, _input$meta20, _inputData$commentVal;
41291
+ let {
41292
+ code,
41293
+ inputData,
41294
+ inputId,
41295
+ input,
41296
+ setLoading,
41297
+ values,
41298
+ MainForm,
41299
+ options,
41300
+ plainForms,
41301
+ setValues,
41302
+ alertError,
41303
+ setAddress,
41304
+ inputMeta = {},
41305
+ inputKey,
41306
+ changeInputMeta = () => {},
41307
+ i,
41308
+ isCreate = false
41309
+ } = _ref53;
41303
41310
  const {
41304
41311
  t,
41305
41312
  getAppHeader,
@@ -41315,7 +41322,7 @@ const GetFormItem = ({
41315
41322
  case "h6":
41316
41323
  return getInputHeadLines(input.type, i, input, values);
41317
41324
  default:
41318
- const rules = inputMeta?.notApplicable || inputMeta?.notAvailable ? [] : inputData.rules ? inputData.rules.filter(rule => !Object.keys(rule).includes("accept") && !Object.keys(rule).includes("max")) : [];
41325
+ const rules = inputMeta !== null && inputMeta !== void 0 && inputMeta.notApplicable || inputMeta !== null && inputMeta !== void 0 && inputMeta.notAvailable ? [] : inputData.rules ? inputData.rules.filter(rule => !Object.keys(rule).includes("accept") && !Object.keys(rule).includes("max")) : [];
41319
41326
  const requiredRule = rules.find(r => r.required);
41320
41327
  if (requiredRule && input.type === "text") {
41321
41328
  rules.push({
@@ -41324,47 +41331,45 @@ const GetFormItem = ({
41324
41331
  });
41325
41332
  }
41326
41333
  const noLabel = ["message"].includes(input.type);
41327
- let maxRule = (inputData?.rules || []).find(rule => rule.max)?.max;
41334
+ let maxRule = (_find = ((inputData === null || inputData === void 0 ? void 0 : inputData.rules) || []).find(rule => rule.max)) === null || _find === void 0 ? void 0 : _find.max;
41328
41335
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
41329
41336
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
41330
41337
  className: "flex input-cont",
41331
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
41332
- initialValue: inputMeta?.defaultValue,
41333
- ...(["total100", "group"].includes(input.type) ? {} : {
41334
- name: inputId,
41335
- fieldKey: inputId,
41336
- initialValue: inputData.value
41337
- }),
41338
- ...(["upload", "imageUpload", "videoUpload"].includes(input.type) ? {
41339
- valuePropName: "fileList",
41340
- getValueFromEvent: e => {
41341
- if (Array.isArray(e)) {
41342
- return e;
41343
- }
41344
- return e && e.fileList && e.fileList.map(f => {
41345
- if (f.response) {
41346
- return f.response;
41347
- }
41348
- return f;
41349
- });
41338
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
41339
+ initialValue: inputMeta === null || inputMeta === void 0 ? void 0 : inputMeta.defaultValue
41340
+ }, ["total100", "group"].includes(input.type) ? {} : {
41341
+ name: inputId,
41342
+ fieldKey: inputId,
41343
+ initialValue: inputData.value
41344
+ }), ["upload", "imageUpload", "videoUpload"].includes(input.type) ? {
41345
+ valuePropName: "fileList",
41346
+ getValueFromEvent: e => {
41347
+ if (Array.isArray(e)) {
41348
+ return e;
41350
41349
  }
41351
- } : {}),
41350
+ return e && e.fileList && e.fileList.map(f => {
41351
+ if (f.response) {
41352
+ return f.response;
41353
+ }
41354
+ return f;
41355
+ });
41356
+ }
41357
+ } : {}), {}, {
41352
41358
  style: input.showOnView === false ? {
41353
41359
  display: "none"
41354
- } : {},
41355
- ...(["switch"].includes(input.type) ? {
41356
- labelCol: {
41357
- span: 20
41358
- },
41359
- style: {
41360
- ...(input.showOnView === false ? {
41361
- display: "none"
41362
- } : {}),
41363
- flexDirection: "row",
41364
- justifyContent: "space-between"
41365
- }
41366
- } : {}),
41367
- className: input.comment ? `flex-1 with-comment i-${input.type}` : `i-${input.type} flex-1`,
41360
+ } : {}
41361
+ }, ["switch"].includes(input.type) ? {
41362
+ labelCol: {
41363
+ span: 20
41364
+ },
41365
+ style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
41366
+ display: "none"
41367
+ } : {}), {}, {
41368
+ flexDirection: "row",
41369
+ justifyContent: "space-between"
41370
+ })
41371
+ } : {}), {}, {
41372
+ className: input.comment ? "flex-1 with-comment i-".concat(input.type) : "i-".concat(input.type, " flex-1"),
41368
41373
  "data-id": inputData.name,
41369
41374
  rules: rules,
41370
41375
  required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
@@ -41375,8 +41380,8 @@ const GetFormItem = ({
41375
41380
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
41376
41381
  className: "mr-1",
41377
41382
  children: getInputLabel(input, values)
41378
- }), !!input?.meta?.tooltip && /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
41379
- title: input?.meta?.tooltip,
41383
+ }), !!(input !== null && input !== void 0 && (_input$meta12 = input.meta) !== null && _input$meta12 !== void 0 && _input$meta12.tooltip) && /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
41384
+ title: input === null || input === void 0 || (_input$meta13 = input.meta) === null || _input$meta13 === void 0 ? void 0 : _input$meta13.tooltip,
41380
41385
  trigger: "hover",
41381
41386
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
41382
41387
  className: "flex flex-column justify-content-center",
@@ -41394,7 +41399,7 @@ const GetFormItem = ({
41394
41399
  title: t("Not applicable"),
41395
41400
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
41396
41401
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
41397
- disabled: !input?.meta?.notApplicable,
41402
+ disabled: !(input !== null && input !== void 0 && (_input$meta14 = input.meta) !== null && _input$meta14 !== void 0 && _input$meta14.notApplicable),
41398
41403
  className: formatClassname(["default p-0", inputMeta.notApplicable && "primary"]),
41399
41404
  type: "link",
41400
41405
  onClick: () => {
@@ -41429,7 +41434,7 @@ const GetFormItem = ({
41429
41434
  title: t("No available information"),
41430
41435
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
41431
41436
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
41432
- disabled: !input?.meta?.notAvailable,
41437
+ disabled: !(input !== null && input !== void 0 && (_input$meta15 = input.meta) !== null && _input$meta15 !== void 0 && _input$meta15.notAvailable),
41433
41438
  className: formatClassname(["default p-0", inputMeta.notAvailable && "primary"]),
41434
41439
  type: "link",
41435
41440
  onClick: () => {
@@ -41463,14 +41468,14 @@ const GetFormItem = ({
41463
41468
  }), /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
41464
41469
  title: t("Add comment"),
41465
41470
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
41466
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
41471
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
41467
41472
  type: "link",
41468
- disabled: !input?.meta?.comment,
41469
- ...(!isShown ? {
41470
- className: "default p-0"
41471
- } : {
41472
- className: "p-0 primary"
41473
- }),
41473
+ disabled: !(input !== null && input !== void 0 && (_input$meta16 = input.meta) !== null && _input$meta16 !== void 0 && _input$meta16.comment)
41474
+ }, !isShown ? {
41475
+ className: "default p-0"
41476
+ } : {
41477
+ className: "p-0 primary"
41478
+ }), {}, {
41474
41479
  onClick: () => {
41475
41480
  setIsShown(true);
41476
41481
  changeInputMeta({
@@ -41486,18 +41491,18 @@ const GetFormItem = ({
41486
41491
  width: 16,
41487
41492
  height: 16
41488
41493
  })
41489
- })
41494
+ }))
41490
41495
  })
41491
41496
  })]
41492
- }), input.meta?.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
41497
+ }), (_input$meta17 = input.meta) !== null && _input$meta17 !== void 0 && _input$meta17.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
41493
41498
  className: "code",
41494
41499
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
41495
- children: input.meta?.code
41500
+ children: (_input$meta18 = input.meta) === null || _input$meta18 === void 0 ? void 0 : _input$meta18.code
41496
41501
  })
41497
41502
  }) : code ? /*#__PURE__*/jsxRuntime.jsx("div", {
41498
41503
  className: "code",
41499
41504
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
41500
- children: `${code}.${i + 1}`
41505
+ children: "".concat(code, ".").concat(i + 1)
41501
41506
  })
41502
41507
  }) : null]
41503
41508
  })
@@ -41517,7 +41522,7 @@ const GetFormItem = ({
41517
41522
  getAppHeader,
41518
41523
  getApiBaseUrl
41519
41524
  }) : console.log(input)
41520
- })
41525
+ }))
41521
41526
  }), alertError ? /*#__PURE__*/jsxRuntime.jsx(antd.Alert, {
41522
41527
  message: alertError.message,
41523
41528
  type: "error",
@@ -41546,10 +41551,10 @@ const GetFormItem = ({
41546
41551
  className: "max-char-span",
41547
41552
  children: t("max-char", {
41548
41553
  chars: maxRule,
41549
- filled: inputData?.value?.length || 0
41554
+ filled: (inputData === null || inputData === void 0 || (_inputData$value = inputData.value) === null || _inputData$value === void 0 ? void 0 : _inputData$value.length) || 0
41550
41555
  })
41551
41556
  })
41552
- }) : null, input.meta?.comment && isShown ? /*#__PURE__*/jsxRuntime.jsxs("div", {
41557
+ }) : null, (_input$meta19 = input.meta) !== null && _input$meta19 !== void 0 && _input$meta19.comment && isShown ? /*#__PURE__*/jsxRuntime.jsxs("div", {
41553
41558
  className: "input-content dynamic-form-comment",
41554
41559
  children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
41555
41560
  className: "comment-textarea",
@@ -41575,7 +41580,7 @@ const GetFormItem = ({
41575
41580
  },
41576
41581
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
41577
41582
  type: "link",
41578
- disabled: !input.meta?.comment,
41583
+ disabled: !((_input$meta20 = input.meta) !== null && _input$meta20 !== void 0 && _input$meta20.comment),
41579
41584
  className: "p-0",
41580
41585
  children: /*#__PURE__*/jsxRuntime.jsx(Icons.DeleteOutlined, {
41581
41586
  width: 16,
@@ -41606,7 +41611,7 @@ const GetFormItem = ({
41606
41611
  className: "max-char-span",
41607
41612
  children: t("max-char", {
41608
41613
  chars: MAX_COMMENTS_LENGTH,
41609
- filled: inputData?.commentValue?.length || 0
41614
+ filled: (inputData === null || inputData === void 0 || (_inputData$commentVal = inputData.commentValue) === null || _inputData$commentVal === void 0 ? void 0 : _inputData$commentVal.length) || 0
41610
41615
  })
41611
41616
  })]
41612
41617
  }) : null]
@@ -52978,7 +52983,6 @@ const {
52978
52983
  } = antd.theme;
52979
52984
  function useTopContributors({
52980
52985
  container,
52981
- params,
52982
52986
  t
52983
52987
  }) {
52984
52988
  const [mainGraph, setMainGraph] = React.useState(null);
@@ -52991,9 +52995,7 @@ function useTopContributors({
52991
52995
  const fetchTopContributors = async () => {
52992
52996
  try {
52993
52997
  setLoading(true);
52994
- const response = await AdminService$1.getTopContributors({
52995
- params
52996
- });
52998
+ const response = await AdminService$1.getTopContributors({});
52997
52999
  const transformedData = (response?.data || []).map(item => ({
52998
53000
  label: item.name,
52999
53001
  Score: item.value
@@ -53007,7 +53009,7 @@ function useTopContributors({
53007
53009
  }
53008
53010
  };
53009
53011
  fetchTopContributors();
53010
- }, [params]);
53012
+ }, []);
53011
53013
  React.useEffect(() => {
53012
53014
  if (container.current) {
53013
53015
  if (mainGraph) {
@@ -53079,7 +53081,6 @@ function useTopContributors({
53079
53081
  }
53080
53082
 
53081
53083
  function TopContributors({
53082
- params,
53083
53084
  t
53084
53085
  }) {
53085
53086
  const container = React.useRef(null);
@@ -53087,7 +53088,6 @@ function TopContributors({
53087
53088
  loading
53088
53089
  } = useTopContributors({
53089
53090
  container,
53090
- params,
53091
53091
  t
53092
53092
  });
53093
53093
  return /*#__PURE__*/jsxRuntime.jsx(Widget, {
@@ -53114,13 +53114,6 @@ function UserStatistics({
53114
53114
  t,
53115
53115
  translationKeys
53116
53116
  }) {
53117
- // console.log("UserStatistics:loading", loading);
53118
- // console.log("UserStatistics:loadingUserGrowth", loadingUserGrowth);
53119
- // console.log("UserStatistics:data", data);
53120
- // console.log("UserStatistics:userActivityData", data?.userActivityData);
53121
- // console.log("UserStatistics:topContributorsData", data?.topContributorsData);
53122
- // console.log("UserStatistics:userGrowthData", data?.userGrowthData);
53123
-
53124
53117
  return /*#__PURE__*/jsxRuntime.jsx(Widget, {
53125
53118
  title: t(`${translationKeys}-admin::usage-statistics`),
53126
53119
  className: "with-border-header",