datastake-daf 0.6.843 → 0.6.844

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.
@@ -4827,7 +4827,7 @@ const config$2 = {
4827
4827
  AddDocument: config$3
4828
4828
  };
4829
4829
 
4830
- const _excluded$F = ["width", "height", "size", "name", "fill"];
4830
+ const _excluded$E = ["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$F);
4839
+ props = _objectWithoutProperties(_ref, _excluded$E);
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$E = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
5128
+ const _excluded$D = ["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$E);
5504
+ rest = _objectWithoutProperties(data, _excluded$D);
5505
5505
  const _meta = isObjectEmpty(meta) ? undefined : meta;
5506
5506
  return _objectSpread2(_objectSpread2({}, rest), {}, {
5507
5507
  meta: _meta
@@ -6044,7 +6044,7 @@ SelectFilters.propTypes = {
6044
6044
  apiUrl: PropTypes__default["default"].string
6045
6045
  };
6046
6046
 
6047
- 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"];
6047
+ 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"];
6048
6048
  function DAFTable(_ref) {
6049
6049
  let {
6050
6050
  columns = [],
@@ -6075,7 +6075,7 @@ function DAFTable(_ref) {
6075
6075
  app,
6076
6076
  doEmptyRows
6077
6077
  } = _ref,
6078
- rest = _objectWithoutProperties(_ref, _excluded$D);
6078
+ rest = _objectWithoutProperties(_ref, _excluded$C);
6079
6079
  const source = React.useMemo(() => {
6080
6080
  if (data && Array.isArray(data)) {
6081
6081
  return data;
@@ -6900,7 +6900,7 @@ function ComponentWithFocus(_ref) {
6900
6900
  }
6901
6901
 
6902
6902
  var _templateObject$h;
6903
- const _excluded$C = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
6903
+ const _excluded$B = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
6904
6904
  function StickyTable(_ref) {
6905
6905
  let {
6906
6906
  size = "small",
@@ -6911,7 +6911,7 @@ function StickyTable(_ref) {
6911
6911
  pagination = false,
6912
6912
  doEmptyRows = true
6913
6913
  } = _ref,
6914
- props = _objectWithoutProperties(_ref, _excluded$C);
6914
+ props = _objectWithoutProperties(_ref, _excluded$B);
6915
6915
  const data = React__default["default"].useMemo(() => {
6916
6916
  if (!doEmptyRows) {
6917
6917
  return dataSource;
@@ -7439,7 +7439,7 @@ const BTN_SIZE = {
7439
7439
  LG: 'large'
7440
7440
  };
7441
7441
 
7442
- const _excluded$B = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
7442
+ const _excluded$A = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
7443
7443
  function DafButton(_ref) {
7444
7444
  let {
7445
7445
  content = '',
@@ -7453,7 +7453,7 @@ function DafButton(_ref) {
7453
7453
  style = {},
7454
7454
  className = ''
7455
7455
  } = _ref,
7456
- restProps = _objectWithoutProperties(_ref, _excluded$B);
7456
+ restProps = _objectWithoutProperties(_ref, _excluded$A);
7457
7457
  return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
7458
7458
  icon: icon,
7459
7459
  type: type,
@@ -7572,12 +7572,12 @@ const Style$R = styled__default["default"].div`
7572
7572
  }
7573
7573
  `;
7574
7574
 
7575
- const _excluded$A = ["children"];
7575
+ const _excluded$z = ["children"];
7576
7576
  const BorderedButton = _ref => {
7577
7577
  let {
7578
7578
  children
7579
7579
  } = _ref,
7580
- props = _objectWithoutProperties(_ref, _excluded$A);
7580
+ props = _objectWithoutProperties(_ref, _excluded$z);
7581
7581
  return /*#__PURE__*/jsxRuntime.jsx(Style$R, {
7582
7582
  className: "d-btn-cont",
7583
7583
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -7717,12 +7717,12 @@ Badge.propTypes = {
7717
7717
  props: PropTypes__default["default"].object
7718
7718
  };
7719
7719
 
7720
- const _excluded$z = ["icon"];
7720
+ const _excluded$y = ["icon"];
7721
7721
  function GetIcon(_ref) {
7722
7722
  let {
7723
7723
  icon
7724
7724
  } = _ref,
7725
- props = _objectWithoutProperties(_ref, _excluded$z);
7725
+ props = _objectWithoutProperties(_ref, _excluded$y);
7726
7726
  let Icon = Icons__namespace.CloseOutlined;
7727
7727
  if (Icons__namespace[icon]) {
7728
7728
  Icon = Icons__namespace[icon];
@@ -8052,7 +8052,7 @@ const MultiSelectStyled = styled__default["default"](antd.Select)`
8052
8052
  }
8053
8053
  `;
8054
8054
 
8055
- const _excluded$y = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
8055
+ const _excluded$x = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
8056
8056
  const {
8057
8057
  useToken: useToken$p
8058
8058
  } = antd.theme;
@@ -8145,7 +8145,7 @@ function Multiselect(_ref) {
8145
8145
  isSingle = false,
8146
8146
  selectionType = SELECTION_TYPES.DEFAULT
8147
8147
  } = _ref,
8148
- restProps = _objectWithoutProperties(_ref, _excluded$y);
8148
+ restProps = _objectWithoutProperties(_ref, _excluded$x);
8149
8149
  const {
8150
8150
  token
8151
8151
  } = useToken$p();
@@ -8865,7 +8865,7 @@ DAFHeader.propTypes = {
8865
8865
  filtersConfig: PropTypes__default["default"].any
8866
8866
  };
8867
8867
 
8868
- const _excluded$x = ["tabs", "onChange", "value", "className"];
8868
+ const _excluded$w = ["tabs", "onChange", "value", "className"];
8869
8869
  function TabsHeader(_ref) {
8870
8870
  let {
8871
8871
  tabs = [],
@@ -8873,7 +8873,7 @@ function TabsHeader(_ref) {
8873
8873
  value = '',
8874
8874
  className = 'mt-2'
8875
8875
  } = _ref,
8876
- rest = _objectWithoutProperties(_ref, _excluded$x);
8876
+ rest = _objectWithoutProperties(_ref, _excluded$w);
8877
8877
  return /*#__PURE__*/jsxRuntime.jsx("div", {
8878
8878
  className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
8879
8879
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
@@ -8970,7 +8970,7 @@ DrawerHeader.propTypes = {
8970
8970
  tabsConfig: PropTypes__default["default"].any
8971
8971
  };
8972
8972
 
8973
- const _excluded$w = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
8973
+ const _excluded$v = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
8974
8974
  const useFooter = _ref => {
8975
8975
  let {
8976
8976
  leftContent,
@@ -9005,7 +9005,7 @@ const useFooter = _ref => {
9005
9005
  style = {},
9006
9006
  className = ""
9007
9007
  } = button,
9008
- restProps = _objectWithoutProperties(button, _excluded$w);
9008
+ restProps = _objectWithoutProperties(button, _excluded$v);
9009
9009
  return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
9010
9010
  content: label,
9011
9011
  type: type,
@@ -11886,7 +11886,7 @@ Widget.propTypes = {
11886
11886
  };
11887
11887
  Widget.displayName = 'Widget';
11888
11888
 
11889
- const _excluded$v = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
11889
+ const _excluded$u = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
11890
11890
  function ImageWidget(_ref) {
11891
11891
  let {
11892
11892
  loading = false,
@@ -11897,7 +11897,7 @@ function ImageWidget(_ref) {
11897
11897
  noDescriptionText,
11898
11898
  isPdf = false
11899
11899
  } = _ref,
11900
- props = _objectWithoutProperties(_ref, _excluded$v);
11900
+ props = _objectWithoutProperties(_ref, _excluded$u);
11901
11901
  const expandable = isPdf ? false : props.expandable;
11902
11902
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
11903
11903
  loading: loading,
@@ -11957,7 +11957,7 @@ function ImageWidget(_ref) {
11957
11957
  ImageWidget.displayName = 'ImageWidget';
11958
11958
 
11959
11959
  var _templateObject$e;
11960
- const _excluded$u = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
11960
+ const _excluded$t = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
11961
11961
  function FlowWidget(_ref) {
11962
11962
  let {
11963
11963
  title,
@@ -11969,7 +11969,7 @@ function FlowWidget(_ref) {
11969
11969
  className,
11970
11970
  direction = "horizontal"
11971
11971
  } = _ref,
11972
- rest = _objectWithoutProperties(_ref, _excluded$u);
11972
+ rest = _objectWithoutProperties(_ref, _excluded$t);
11973
11973
  const [activeTab, setActiveTab] = React.useState();
11974
11974
  React.useEffect(() => {
11975
11975
  if (defaultActiveTab) {
@@ -15700,7 +15700,7 @@ Map$3.propTypes = {
15700
15700
  link: PropTypes__default["default"].any
15701
15701
  };
15702
15702
 
15703
- const _excluded$t = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
15703
+ const _excluded$s = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
15704
15704
  function InExpandableWidgetMap(_ref) {
15705
15705
  let {
15706
15706
  isExpanded,
@@ -15714,7 +15714,7 @@ function InExpandableWidgetMap(_ref) {
15714
15714
  height,
15715
15715
  widgetConfig
15716
15716
  } = _ref,
15717
- rest = _objectWithoutProperties(_ref, _excluded$t);
15717
+ rest = _objectWithoutProperties(_ref, _excluded$s);
15718
15718
  const [mapKey, setMapKey] = React.useState(0);
15719
15719
  const [isMapReady, setIsMapReady] = React.useState(false);
15720
15720
  React.useEffect(() => {
@@ -17914,14 +17914,14 @@ const MapConfig = ({
17914
17914
  });
17915
17915
  };
17916
17916
 
17917
- const _excluded$s = ["config", "title", "loading"];
17917
+ const _excluded$r = ["config", "title", "loading"];
17918
17918
  const Details = _ref => {
17919
17919
  let {
17920
17920
  config = [],
17921
17921
  title,
17922
17922
  loading = false
17923
17923
  } = _ref,
17924
- rest = _objectWithoutProperties(_ref, _excluded$s);
17924
+ rest = _objectWithoutProperties(_ref, _excluded$r);
17925
17925
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
17926
17926
  className: "with-border-header h-w-btn-header card",
17927
17927
  loading: loading,
@@ -17937,14 +17937,14 @@ const Details = _ref => {
17937
17937
  }));
17938
17938
  };
17939
17939
 
17940
- const _excluded$r = ["config", "title", "loading"];
17940
+ const _excluded$q = ["config", "title", "loading"];
17941
17941
  const KeyIndicatorsDetails = _ref => {
17942
17942
  let {
17943
17943
  config,
17944
17944
  title,
17945
17945
  loading = false
17946
17946
  } = _ref,
17947
- rest = _objectWithoutProperties(_ref, _excluded$r);
17947
+ rest = _objectWithoutProperties(_ref, _excluded$q);
17948
17948
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
17949
17949
  className: "with-border-header h-w-btn-header",
17950
17950
  title: title,
@@ -17974,7 +17974,7 @@ const Style$G = styled__default["default"].div`
17974
17974
  }
17975
17975
  `;
17976
17976
 
17977
- const _excluded$q = ["children", "config", "detailsTitle", "firstColumnWidth"];
17977
+ const _excluded$p = ["children", "config", "detailsTitle", "firstColumnWidth"];
17978
17978
  const DetailsSection = _ref => {
17979
17979
  let {
17980
17980
  children,
@@ -17982,7 +17982,7 @@ const DetailsSection = _ref => {
17982
17982
  detailsTitle,
17983
17983
  firstColumnWidth = "250px"
17984
17984
  } = _ref,
17985
- rest = _objectWithoutProperties(_ref, _excluded$q);
17985
+ rest = _objectWithoutProperties(_ref, _excluded$p);
17986
17986
  return /*#__PURE__*/jsxRuntime.jsx(Style$G, {
17987
17987
  firstColumnWidth: firstColumnWidth,
17988
17988
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -18158,14 +18158,14 @@ const getGoalConfig = () => {
18158
18158
  };
18159
18159
 
18160
18160
  var _templateObject$c;
18161
- const _excluded$p = ["title", "activeSdgGoals", "t"];
18161
+ const _excluded$o = ["title", "activeSdgGoals", "t"];
18162
18162
  function SDGWidget(_ref) {
18163
18163
  let {
18164
18164
  title = "Sustainable Development Goals",
18165
18165
  activeSdgGoals = [],
18166
18166
  t = key => key
18167
18167
  } = _ref,
18168
- props = _objectWithoutProperties(_ref, _excluded$p);
18168
+ props = _objectWithoutProperties(_ref, _excluded$o);
18169
18169
  const sdgConfig = getGoalConfig();
18170
18170
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
18171
18171
  title: title,
@@ -18463,7 +18463,7 @@ function SdgList({
18463
18463
  });
18464
18464
  }
18465
18465
 
18466
- const _excluded$o = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
18466
+ const _excluded$n = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
18467
18467
  const {
18468
18468
  Meta
18469
18469
  } = antd.Card;
@@ -18483,7 +18483,7 @@ function ProjectWidget(_ref) {
18483
18483
  hideSDGList = false,
18484
18484
  t = x => x
18485
18485
  } = _ref,
18486
- props = _objectWithoutProperties(_ref, _excluded$o);
18486
+ props = _objectWithoutProperties(_ref, _excluded$n);
18487
18487
  const [isHovered, setIsHovered] = React__default["default"].useState(false);
18488
18488
  const {
18489
18489
  token
@@ -18755,13 +18755,13 @@ const WidgetCard = _ref => {
18755
18755
  });
18756
18756
  };
18757
18757
 
18758
- const _excluded$n = ["title", "children"];
18758
+ const _excluded$m = ["title", "children"];
18759
18759
  const CarouselWidget = /*#__PURE__*/React.forwardRef((_ref, ref) => {
18760
18760
  let {
18761
18761
  title,
18762
18762
  children
18763
18763
  } = _ref,
18764
- rest = _objectWithoutProperties(_ref, _excluded$n);
18764
+ rest = _objectWithoutProperties(_ref, _excluded$m);
18765
18765
  /**
18766
18766
  * Handles carousel slide change events
18767
18767
  * @param {number} currentSlide - The index of the current slide after change
@@ -18925,7 +18925,7 @@ const EmptyStateContainer = styled__default["default"].div`
18925
18925
  }
18926
18926
  `;
18927
18927
 
18928
- const _excluded$m = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
18928
+ const _excluded$l = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
18929
18929
  function ImageCarousel(_ref) {
18930
18930
  let {
18931
18931
  title,
@@ -18940,7 +18940,7 @@ function ImageCarousel(_ref) {
18940
18940
  emptyLogo = antd.Empty.PRESENTED_IMAGE_SIMPLE,
18941
18941
  emptyText = "No Image"
18942
18942
  } = _ref,
18943
- rest = _objectWithoutProperties(_ref, _excluded$m);
18943
+ rest = _objectWithoutProperties(_ref, _excluded$l);
18944
18944
  const [previewVisible, setPreviewVisible] = React.useState(false);
18945
18945
  const [current, setCurrent] = React.useState(0);
18946
18946
  const carouselRef = React.useRef(null);
@@ -19309,7 +19309,7 @@ const getVegetationConfig = () => {
19309
19309
  };
19310
19310
 
19311
19311
  var _templateObject$a, _templateObject2$3;
19312
- const _excluded$l = ["title", "activeVegetationConditions", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "growthObservations", "t"];
19312
+ const _excluded$k = ["title", "activeVegetationConditions", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "growthObservations", "t"];
19313
19313
  function VegetationWidget(_ref) {
19314
19314
  let {
19315
19315
  title = "Vegetation Health",
@@ -19321,7 +19321,7 @@ function VegetationWidget(_ref) {
19321
19321
  growthObservations = [],
19322
19322
  t = key => key
19323
19323
  } = _ref,
19324
- props = _objectWithoutProperties(_ref, _excluded$l);
19324
+ props = _objectWithoutProperties(_ref, _excluded$k);
19325
19325
  let vegetationConfig = getVegetationConfig();
19326
19326
  const allVegetationKeys = vegetationConfig.map(item => item.key);
19327
19327
  if (filterKeys && Array.isArray(filterKeys)) {
@@ -19437,7 +19437,7 @@ const getFaunaConfig = () => {
19437
19437
  };
19438
19438
 
19439
19439
  var _templateObject$9, _templateObject2$2;
19440
- const _excluded$k = ["title", "faunaPresent", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19440
+ const _excluded$j = ["title", "faunaPresent", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19441
19441
  function FaunaWidget(_ref) {
19442
19442
  let {
19443
19443
  title = "Observed Fauna",
@@ -19448,7 +19448,7 @@ function FaunaWidget(_ref) {
19448
19448
  itemHeight = 100,
19449
19449
  t = key => key
19450
19450
  } = _ref,
19451
- props = _objectWithoutProperties(_ref, _excluded$k);
19451
+ props = _objectWithoutProperties(_ref, _excluded$j);
19452
19452
  let faunaConfig = getFaunaConfig();
19453
19453
 
19454
19454
  // Filter to show only specific keys if filterKeys is provided
@@ -19513,7 +19513,7 @@ const getInvasiveSpeciesConfig = () => {
19513
19513
  };
19514
19514
 
19515
19515
  var _templateObject$8, _templateObject2$1;
19516
- const _excluded$j = ["title", "invasiveSpecies", "hasInvasiveSpecies", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19516
+ const _excluded$i = ["title", "invasiveSpecies", "hasInvasiveSpecies", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19517
19517
  function InvasiveSpeciesWidget(_ref) {
19518
19518
  let {
19519
19519
  title = "Invasive Species",
@@ -19525,7 +19525,7 @@ function InvasiveSpeciesWidget(_ref) {
19525
19525
  itemHeight = 100,
19526
19526
  t = key => key
19527
19527
  } = _ref,
19528
- props = _objectWithoutProperties(_ref, _excluded$j);
19528
+ props = _objectWithoutProperties(_ref, _excluded$i);
19529
19529
  let invasiveSpeciesConfig = getInvasiveSpeciesConfig();
19530
19530
 
19531
19531
  // Filter to show only specific keys if filterKeys is provided
@@ -24956,8 +24956,8 @@ const RepeatableModals = ({
24956
24956
  }) : null;
24957
24957
  };
24958
24958
 
24959
- const _excluded$i = ["viewGroup"],
24960
- _excluded2$2 = ["label", "icon", "position"];
24959
+ const _excluded$h = ["viewGroup"],
24960
+ _excluded2$1 = ["label", "icon", "position"];
24961
24961
  const Content$1 = _ref => {
24962
24962
  let {
24963
24963
  style = {},
@@ -25028,7 +25028,7 @@ const Content$1 = _ref => {
25028
25028
  if (groups[gKey].viewGroup === key) {
25029
25029
  // eslint-disable-next-line no-unused-vars
25030
25030
  const _groups$gKey = groups[gKey],
25031
- gCfg = _objectWithoutProperties(_groups$gKey, _excluded$i);
25031
+ gCfg = _objectWithoutProperties(_groups$gKey, _excluded$h);
25032
25032
  items[gKey] = gCfg;
25033
25033
  }
25034
25034
  return items;
@@ -25256,7 +25256,7 @@ const Content$1 = _ref => {
25256
25256
  showIcon: true
25257
25257
  });
25258
25258
  }
25259
- let groups = _objectWithoutProperties(f, _excluded2$2);
25259
+ let groups = _objectWithoutProperties(f, _excluded2$1);
25260
25260
  groups = Object.keys(groups).reduce((items, key) => {
25261
25261
  var _groups$key2;
25262
25262
  if (!((_groups$key2 = groups[key]) !== null && _groups$key2 !== void 0 && (_groups$key2 = _groups$key2.meta) !== null && _groups$key2 !== void 0 && _groups$key2.excludeFromView)) {
@@ -25308,7 +25308,7 @@ const Content$1 = _ref => {
25308
25308
  });
25309
25309
  };
25310
25310
 
25311
- const _excluded$h = ["t", "open", "title", "children", "onClose", "onSuccess", "cancelBtnText", "saveBtnText", "className", "loading", "disabled", "withModalFormWrapper"];
25311
+ const _excluded$g = ["t", "open", "title", "children", "onClose", "onSuccess", "cancelBtnText", "saveBtnText", "className", "loading", "disabled", "withModalFormWrapper"];
25312
25312
  function Modal(_ref) {
25313
25313
  let {
25314
25314
  t = text => text,
@@ -25324,7 +25324,7 @@ function Modal(_ref) {
25324
25324
  disabled = false,
25325
25325
  withModalFormWrapper = true
25326
25326
  } = _ref,
25327
- props = _objectWithoutProperties(_ref, _excluded$h);
25327
+ props = _objectWithoutProperties(_ref, _excluded$g);
25328
25328
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Modal, _objectSpread2(_objectSpread2({
25329
25329
  width: 650,
25330
25330
  footer: null,
@@ -35971,13 +35971,11 @@ const beforeUpload = allowedExtensions => file => {
35971
35971
  };
35972
35972
  const allowedImageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.avif', '.bmp', '.tiff', '.tif', '.heif', '.heic', '.svg', '.ico'];
35973
35973
 
35974
- const _excluded$g = ["placeholder"],
35975
- _excluded2$1 = ["label", "description", "excludeFromEdit", "showFormIf", "icon", "position", "template", "formClass"];
35974
+ /* eslint-disable no-case-declarations */
35976
35975
  dayjs__default["default"].extend(utc);
35977
35976
  dayjs__default["default"].extend(timezone);
35978
35977
  dayjs__default["default"].tz.setDefault("UTC");
35979
- const getDefaultInputValue = function () {
35980
- let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
35978
+ const getDefaultInputValue = (input = {}) => {
35981
35979
  let value = undefined;
35982
35980
  if (input.type === "multiselect") {
35983
35981
  value = [];
@@ -35995,30 +35993,33 @@ const checkCondition$1 = (condition, repeatValues, formsValue) => {
35995
35993
  const isShown = _checkValue(isNotEmpty ? field : wantedValue, match, isNotEmpty ? formValue : value);
35996
35994
  return isShown;
35997
35995
  };
35998
- const renderDataLinkGroup = _ref2 => {
35999
- var _input$meta, _formsValue$meta, _input$meta2;
36000
- let {
36001
- input,
36002
- groupFormId,
36003
- name,
36004
- formsValue,
36005
- form,
36006
- onValuesChange,
36007
- setValues,
36008
- changeLinking,
36009
- isHighlighted
36010
- } = _ref2;
36011
- const dataLinkKey = Object.keys((input === null || input === void 0 ? void 0 : input.inputs) || {}).find(k => {
36012
- var _input$inputs$k;
36013
- return (input === null || input === void 0 || (_input$inputs$k = input.inputs[k]) === null || _input$inputs$k === void 0 ? void 0 : _input$inputs$k.type) === "dataLink";
36014
- });
36015
- const dataLinkInput = ((input === null || input === void 0 ? void 0 : input.inputs) || {})[dataLinkKey];
36016
- const otherInputs = Object.keys((input === null || input === void 0 ? void 0 : input.inputs) || {}).filter(k => k !== dataLinkKey).reduce((all, key) => {
36017
- all[key] = input === null || input === void 0 ? void 0 : input.inputs[key];
35996
+ const renderDataLinkGroup = ({
35997
+ input,
35998
+ groupFormId,
35999
+ name,
36000
+ formsValue,
36001
+ form,
36002
+ onValuesChange,
36003
+ setValues,
36004
+ changeLinking,
36005
+ isHighlighted
36006
+ }) => {
36007
+ const dataLinkKey = Object.keys(input?.inputs || {}).find(k => input?.inputs[k]?.type === "dataLink");
36008
+ const dataLinkInput = (input?.inputs || {})[dataLinkKey];
36009
+ const otherInputs = Object.keys(input?.inputs || {}).filter(k => k !== dataLinkKey).reduce((all, key) => {
36010
+ all[key] = input?.inputs[key];
36018
36011
  return all;
36019
36012
  }, {});
36020
- const isSingle = (input === null || input === void 0 || (_input$meta = input.meta) === null || _input$meta === void 0 ? void 0 : _input$meta.maxRepeat) === 1;
36021
- 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])] : [] : getArray(formsValue[name] || []).map(v => _objectSpread2({}, v));
36013
+ const isSingle = input?.meta?.maxRepeat === 1;
36014
+ const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [{
36015
+ ...(formsValue[groupFormId] || {})[name]
36016
+ }] : [] : getArray((formsValue[groupFormId] || {})[name] || []).map(v => ({
36017
+ ...v
36018
+ })) : isSingle ? formsValue[name] ? [{
36019
+ ...formsValue[name]
36020
+ }] : [] : getArray(formsValue[name] || []).map(v => ({
36021
+ ...v
36022
+ }));
36022
36023
  const onUpdate = (val, i) => {
36023
36024
  const _val = isSingle ? {
36024
36025
  [name]: val
@@ -36026,20 +36027,31 @@ const renderDataLinkGroup = _ref2 => {
36026
36027
  [name]: formData.map((d, j) => i === j ? val : d)
36027
36028
  };
36028
36029
  if (groupFormId) {
36029
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
36030
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
36031
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
36030
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
36031
+ const _newData = {
36032
+ ..._defaultData,
36033
+ ..._val
36034
+ };
36035
+ onValuesChange(_newData, {
36036
+ ...formsValue,
36032
36037
  [groupFormId]: _newData
36033
- }));
36034
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
36035
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
36038
+ });
36039
+ form?.setFieldValue(groupFormId, _newData);
36040
+ setValues({
36041
+ ...formsValue,
36036
36042
  [groupFormId]: _newData
36037
- }));
36043
+ });
36038
36044
  return;
36039
36045
  }
36040
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
36041
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
36042
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
36046
+ onValuesChange(_val, {
36047
+ ...formsValue,
36048
+ ..._val
36049
+ });
36050
+ form?.setFieldValue(name, _val[name]);
36051
+ setValues({
36052
+ ...formsValue,
36053
+ ..._val
36054
+ });
36043
36055
  };
36044
36056
  return /*#__PURE__*/jsxRuntime.jsx(DataLinkGroup, {
36045
36057
  form: input,
@@ -36050,79 +36062,102 @@ const renderDataLinkGroup = _ref2 => {
36050
36062
  isHighlighted: isHighlighted,
36051
36063
  dataLinkInput: dataLinkInput,
36052
36064
  formsValue: formsValue,
36053
- values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
36065
+ values: groupFormId ? {
36066
+ ...(formsValue[groupFormId] || {}),
36054
36067
  meta: {
36055
- inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta = formsValue.meta) === null || _formsValue$meta === void 0 ? void 0 : _formsValue$meta.inputs) || {})[groupFormId]
36068
+ inputs: (formsValue?.meta?.inputs || {})[groupFormId]
36056
36069
  }
36057
- }) : formsValue,
36070
+ } : formsValue,
36058
36071
  name: name,
36059
36072
  groupFormId: groupFormId,
36060
- maxRepeat: input === null || input === void 0 || (_input$meta2 = input.meta) === null || _input$meta2 === void 0 ? void 0 : _input$meta2.maxRepeat,
36061
- remove: _ref3 => {
36062
- let {
36063
- key
36064
- } = _ref3;
36073
+ maxRepeat: input?.meta?.maxRepeat,
36074
+ remove: ({
36075
+ key
36076
+ }) => {
36065
36077
  const _val = isSingle ? {
36066
36078
  [name]: null
36067
36079
  } : {
36068
36080
  [name]: formData.filter((v, j) => j !== key)
36069
36081
  };
36070
36082
  if (groupFormId) {
36071
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
36072
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
36073
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
36083
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
36084
+ const _newData = {
36085
+ ..._defaultData,
36086
+ ..._val
36087
+ };
36088
+ onValuesChange(_newData, {
36089
+ ...formsValue,
36074
36090
  [groupFormId]: _newData
36075
- }));
36076
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
36077
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
36091
+ });
36092
+ form?.setFieldValue(groupFormId, _newData);
36093
+ setValues({
36094
+ ...formsValue,
36078
36095
  [groupFormId]: _newData
36079
- }));
36096
+ });
36080
36097
  return;
36081
36098
  }
36082
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
36083
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
36084
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
36099
+ onValuesChange(_val, {
36100
+ ...formsValue,
36101
+ ..._val
36102
+ });
36103
+ form?.setFieldValue(name, _val[name]);
36104
+ setValues({
36105
+ ...formsValue,
36106
+ ..._val
36107
+ });
36085
36108
  },
36086
36109
  add: val => {
36087
36110
  const _val = isSingle ? {
36088
36111
  [name]: val
36089
36112
  } : {
36090
- [name]: [...formData, _objectSpread2({}, val)]
36113
+ [name]: [...formData, {
36114
+ ...val
36115
+ }]
36091
36116
  };
36092
36117
  if (groupFormId) {
36093
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
36094
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
36095
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
36096
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
36118
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
36119
+ const _newData = {
36120
+ ..._defaultData,
36121
+ ..._val
36122
+ };
36123
+ form?.setFieldValue(groupFormId, _newData);
36124
+ onValuesChange(_newData, {
36125
+ ...formsValue,
36097
36126
  [groupFormId]: _newData
36098
- }));
36099
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
36127
+ });
36128
+ setValues({
36129
+ ...formsValue,
36100
36130
  [groupFormId]: _newData
36101
- }));
36131
+ });
36102
36132
  return;
36103
36133
  }
36104
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
36105
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
36106
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
36134
+ form?.setFieldValue(name, _val[name]);
36135
+ onValuesChange(_val, {
36136
+ ...formsValue,
36137
+ ..._val
36138
+ });
36139
+ setValues({
36140
+ ...formsValue,
36141
+ ..._val
36142
+ });
36107
36143
  },
36108
36144
  k: name,
36109
36145
  formData: formData
36110
36146
  });
36111
36147
  };
36112
36148
  function showHideInput$1(input, data, repeatIndex, repeatValues, inputMeta) {
36113
- var _input$meta3, _data$meta;
36114
- if (inputMeta !== null && inputMeta !== void 0 && inputMeta.notApplicable || inputMeta !== null && inputMeta !== void 0 && inputMeta.notAvailable) {
36149
+ if (inputMeta?.notApplicable || inputMeta?.notAvailable) {
36115
36150
  return false;
36116
36151
  }
36117
- if (typeof (input === null || input === void 0 || (_input$meta3 = input.meta) === null || _input$meta3 === void 0 ? void 0 : _input$meta3.excludeFromEdit) === "boolean") {
36118
- var _input$meta4;
36119
- return !(input !== null && input !== void 0 && (_input$meta4 = input.meta) !== null && _input$meta4 !== void 0 && _input$meta4.excludeFromEdit);
36152
+ if (typeof input?.meta?.excludeFromEdit === "boolean") {
36153
+ return !input?.meta?.excludeFromEdit;
36120
36154
  }
36121
- const formsValue = _objectSpread2({}, data);
36122
- Object.keys((data === null || data === void 0 || (_data$meta = data.meta) === null || _data$meta === void 0 ? void 0 : _data$meta.inputs) || {}).forEach(key => {
36123
- var _data$meta2;
36124
- const input = data === null || data === void 0 || (_data$meta2 = data.meta) === null || _data$meta2 === void 0 ? void 0 : _data$meta2.inputs[key];
36125
- if (input !== null && input !== void 0 && input.notApplicable || input !== null && input !== void 0 && input.notAvailable) {
36155
+ const formsValue = {
36156
+ ...data
36157
+ };
36158
+ Object.keys(data?.meta?.inputs || {}).forEach(key => {
36159
+ const input = data?.meta?.inputs[key];
36160
+ if (input?.notApplicable || input?.notAvailable) {
36126
36161
  formsValue[key] = undefined;
36127
36162
  delete formsValue[key];
36128
36163
  }
@@ -36181,35 +36216,35 @@ function getInputHeadLines$1(type, i, input, values) {
36181
36216
  switch (type) {
36182
36217
  case "h2":
36183
36218
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36184
- className: "title-semibold-2 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
36219
+ className: `title-semibold-2 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
36185
36220
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
36186
36221
  children: getInputLabel$1(input, values)
36187
36222
  })
36188
36223
  });
36189
36224
  case "h3":
36190
36225
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36191
- className: "title-semibold-3 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
36226
+ className: `title-semibold-3 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
36192
36227
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
36193
36228
  children: getInputLabel$1(input, values)
36194
36229
  })
36195
36230
  });
36196
36231
  case "h4":
36197
36232
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36198
- className: "title-semibold-4 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
36233
+ className: `title-semibold-4 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
36199
36234
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
36200
36235
  children: getInputLabel$1(input, values)
36201
36236
  })
36202
36237
  });
36203
36238
  case "h5":
36204
36239
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36205
- className: "title-semibold-5 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
36240
+ className: `title-semibold-5 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
36206
36241
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
36207
36242
  children: getInputLabel$1(input, values)
36208
36243
  })
36209
36244
  });
36210
36245
  case "h6":
36211
36246
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36212
- className: "title-semibold-6 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
36247
+ className: `title-semibold-6 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
36213
36248
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
36214
36249
  children: getInputLabel$1(input, values)
36215
36250
  })
@@ -36218,16 +36253,15 @@ function getInputHeadLines$1(type, i, input, values) {
36218
36253
  return null;
36219
36254
  }
36220
36255
  }
36221
- function getInputProp(prop) {
36222
- let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
36223
- let scope = arguments.length > 2 ? arguments[2] : undefined;
36256
+ function getInputProp(prop, formsValue = {}, scope) {
36224
36257
  if (prop && typeof prop === "object") {
36225
36258
  const validations = Object.keys(prop);
36226
36259
  const key = validations.find(v => {
36227
36260
  let [path, match, wantedValue] = v.split(/( is | includes | not | notEmpty )/gim);
36228
- const value = dot__default["default"].pick(path, _objectSpread2(_objectSpread2({}, formsValue), {}, {
36261
+ const value = dot__default["default"].pick(path, {
36262
+ ...formsValue,
36229
36263
  scope
36230
- }));
36264
+ });
36231
36265
  return _checkValue(wantedValue, match, value);
36232
36266
  });
36233
36267
  const label = key ? prop[key] : prop[validations[0]];
@@ -36236,33 +36270,29 @@ function getInputProp(prop) {
36236
36270
  return prop;
36237
36271
  }
36238
36272
  }
36239
- function getInputLabel$1(input) {
36240
- let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
36241
- let asText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
36273
+ function getInputLabel$1(input, formsValue = {}, asText = false) {
36242
36274
  return /*#__PURE__*/jsxRuntime.jsx(InputLabel, {
36243
36275
  input: input,
36244
36276
  formsValue: formsValue,
36245
36277
  asText: asText
36246
36278
  });
36247
36279
  }
36248
- const InputLabel = _ref4 => {
36249
- var _input$meta5, _input$meta6, _input$meta7;
36250
- let {
36251
- input,
36252
- formsValue,
36253
- asText
36254
- } = _ref4;
36280
+ const InputLabel = ({
36281
+ input,
36282
+ formsValue,
36283
+ asText
36284
+ }) => {
36255
36285
  const {
36256
36286
  t,
36257
36287
  evaluationConfig,
36258
36288
  scope
36259
36289
  } = useEditContext();
36260
36290
  const label = getInputProp(input.label, formsValue, scope);
36261
- return input !== null && input !== void 0 && (_input$meta5 = input.meta) !== null && _input$meta5 !== void 0 && _input$meta5.isEvaluation || input.description && typeof input.description === "string" && !asText ? /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
36291
+ return input?.meta?.isEvaluation || input.description && typeof input.description === "string" && !asText ? /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
36262
36292
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
36263
36293
  className: "flex",
36264
36294
  children: [ReactHtmlParser__default["default"](label), /*#__PURE__*/jsxRuntime.jsx(antd.Popover, {
36265
- content: input !== null && input !== void 0 && (_input$meta6 = input.meta) !== null && _input$meta6 !== void 0 && _input$meta6.isEvaluation ? /*#__PURE__*/jsxRuntime.jsx(EvaluationPopover, {
36295
+ content: input?.meta?.isEvaluation ? /*#__PURE__*/jsxRuntime.jsx(EvaluationPopover, {
36266
36296
  t: t,
36267
36297
  evaluationConfig: evaluationConfig
36268
36298
  }) : /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -36270,7 +36300,7 @@ const InputLabel = _ref4 => {
36270
36300
  children: ReactHtmlParser__default["default"](input.description)
36271
36301
  }),
36272
36302
  placement: "top",
36273
- children: !(input !== null && input !== void 0 && (_input$meta7 = input.meta) !== null && _input$meta7 !== void 0 && _input$meta7.isEvaluation) || evaluationConfig.length > 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
36303
+ children: !input?.meta?.isEvaluation || evaluationConfig.length > 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
36274
36304
  className: "flex flex-column justify-content-center ml-1",
36275
36305
  children: /*#__PURE__*/jsxRuntime.jsx(TooltipIcon, {
36276
36306
  fontSize: 13
@@ -36292,9 +36322,7 @@ function getSectionLabel$1(labels, values) {
36292
36322
  }
36293
36323
  return labels;
36294
36324
  }
36295
- function getSubtitles$1(subtitles, position) {
36296
- let formsValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
36297
- let repeatValues = arguments.length > 4 ? arguments[4] : undefined;
36325
+ function getSubtitles$1(subtitles, position, formsValue = {}, repeatIndex, repeatValues) {
36298
36326
  let subtitle = subtitles && subtitles[position];
36299
36327
  if (subtitle && typeof subtitle === "object") {
36300
36328
  let newSubtitle = subtitle.default || "";
@@ -36338,12 +36366,14 @@ function getSubtitles$1(subtitles, position) {
36338
36366
  function getFormTitles$1(titles, key, position) {
36339
36367
  let tilte = titles && titles[key];
36340
36368
  return tilte ? /*#__PURE__*/jsxRuntime.jsx("h3", {
36341
- className: "title-semibold-3 mb0 ".concat(position ? "mt-3" : ""),
36369
+ className: `title-semibold-3 mb0 ${position ? "mt-3" : ""}`,
36342
36370
  children: tilte
36343
36371
  }) : null;
36344
36372
  }
36345
36373
  const updateFormValues$1 = (repeatIndex, repeatValues, inputName, value, formsValue, name, mainForm) => {
36346
- formsValue = Object.assign(formsValue, _objectSpread2({}, mainForm.getFieldsValue(true)));
36374
+ formsValue = Object.assign(formsValue, {
36375
+ ...mainForm.getFieldsValue(true)
36376
+ });
36347
36377
  if (typeof repeatIndex === "number" && repeatValues) {
36348
36378
  if (!repeatValues[inputName] || !___default["default"].isEqual(repeatValues[inputName], value)) {
36349
36379
  repeatValues[inputName] = value;
@@ -36378,16 +36408,14 @@ const updateFormValues$1 = (repeatIndex, repeatValues, inputName, value, formsVa
36378
36408
  };
36379
36409
  const inputOnBlur = [];
36380
36410
  const inputTypeComponent$1 = {
36381
- text: (_ref5, _ref6) => {
36382
- let {
36383
- props,
36384
- rules
36385
- } = _ref5;
36386
- let {
36387
- inputMeta = {},
36388
- t,
36389
- isHighlighted
36390
- } = _ref6;
36411
+ text: ({
36412
+ props,
36413
+ rules
36414
+ }, {
36415
+ inputMeta = {},
36416
+ t,
36417
+ isHighlighted
36418
+ }) => {
36391
36419
  const maxRule = rules.find(r => r.max);
36392
36420
  const maxProps = {
36393
36421
  maxLength: MAX_TEXT_AREA_LENGTH
@@ -36395,28 +36423,26 @@ const inputTypeComponent$1 = {
36395
36423
  if (maxRule) {
36396
36424
  maxProps.maxLength = maxRule.max;
36397
36425
  }
36398
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
36399
- size: "large"
36400
- }, maxProps), {}, {
36426
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
36427
+ size: "large",
36428
+ ...maxProps,
36401
36429
  allowClear: true,
36402
36430
  autoComplete: "new-password",
36403
- type: "text"
36404
- }, props), {}, {
36431
+ type: "text",
36432
+ ...props,
36405
36433
  className: formatClassname([isHighlighted && "highlighted-input"]),
36406
36434
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
36407
36435
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
36408
- }));
36436
+ });
36409
36437
  },
36410
- link: (_ref7, _ref8) => {
36411
- let {
36412
- props,
36413
- rules
36414
- } = _ref7;
36415
- let {
36416
- inputMeta = {},
36417
- t,
36418
- isHighlighted
36419
- } = _ref8;
36438
+ link: ({
36439
+ props,
36440
+ rules
36441
+ }, {
36442
+ inputMeta = {},
36443
+ t,
36444
+ isHighlighted
36445
+ }) => {
36420
36446
  const maxRule = rules.find(r => r.max);
36421
36447
  const maxProps = {
36422
36448
  maxLength: MAX_TEXT_AREA_LENGTH
@@ -36424,32 +36450,29 @@ const inputTypeComponent$1 = {
36424
36450
  if (maxRule) {
36425
36451
  maxProps.maxLength = maxRule.max;
36426
36452
  }
36427
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
36428
- size: "large"
36429
- }, maxProps), {}, {
36453
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
36454
+ size: "large",
36455
+ ...maxProps,
36430
36456
  allowClear: true,
36431
36457
  autoComplete: "new-password",
36432
- type: "text"
36433
- }, props), {}, {
36458
+ type: "text",
36459
+ ...props,
36434
36460
  className: formatClassname([isHighlighted && "highlighted-input"]),
36435
36461
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
36436
36462
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
36437
- }));
36463
+ });
36438
36464
  },
36439
- number: (_ref9, _ref10) => {
36440
- var _input$meta8;
36441
- let {
36442
- props,
36443
- rules,
36444
- input
36445
- } = _ref9;
36446
- let {
36447
- inputMeta = {},
36448
- t,
36449
- isHighlighted
36450
- } = _ref10;
36465
+ number: ({
36466
+ props,
36467
+ rules,
36468
+ input
36469
+ }, {
36470
+ inputMeta = {},
36471
+ t,
36472
+ isHighlighted
36473
+ }) => {
36451
36474
  const maxRule = rules.find(r => r.max);
36452
- const integerRule = !(input !== null && input !== void 0 && (_input$meta8 = input.meta) !== null && _input$meta8 !== void 0 && _input$meta8.isDecimal);
36475
+ const integerRule = !input?.meta?.isDecimal;
36453
36476
  const parser = value => {
36454
36477
  if (!value) {
36455
36478
  return "";
@@ -36460,63 +36483,60 @@ const inputTypeComponent$1 = {
36460
36483
  return value.replace(/\$\s?|(,*)/g, "");
36461
36484
  };
36462
36485
  if (maxRule) {
36463
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
36486
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
36464
36487
  size: "large",
36465
36488
  allowClear: true,
36466
- autoComplete: "new-password"
36467
- }, props), {}, {
36489
+ autoComplete: "new-password",
36490
+ ...props,
36468
36491
  type: "number",
36469
36492
  parser: parser,
36470
36493
  min: 0,
36471
36494
  max: maxRule.max,
36472
36495
  className: formatClassname([isHighlighted && "highlighted-input"])
36473
- }));
36496
+ });
36474
36497
  }
36475
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
36498
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
36476
36499
  size: "large",
36477
36500
  allowClear: true,
36478
36501
  className: formatClassname([isHighlighted && "highlighted-input"]),
36479
- autoComplete: "new-password"
36480
- }, props), {}, {
36502
+ autoComplete: "new-password",
36503
+ ...props,
36481
36504
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
36482
36505
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type number"),
36483
36506
  min: 0,
36484
36507
  formatter: value => numberWithCommas$1(value),
36485
36508
  parser: parser
36486
- }));
36509
+ });
36487
36510
  },
36488
36511
  // eslint-disable-next-line no-unused-vars
36489
- select: (_ref11, _ref12) => {
36490
- var _input$meta9, _input$meta10;
36491
- let {
36492
- value,
36493
- options,
36494
- optionGroup,
36495
- props,
36496
- formsValue,
36497
- optionsFilter,
36498
- filterCond,
36499
- repeatValues,
36500
- repeatIndex,
36501
- name,
36502
- inputName,
36503
- address,
36504
- addressData,
36505
- input,
36506
- scope
36507
- } = _ref11;
36508
- let {
36509
- forms,
36510
- form,
36511
- setAddress,
36512
- inputMeta = {},
36513
- t,
36514
- isHighlighted,
36515
- changeInputMeta,
36516
- groupFormId
36517
- } = _ref12;
36512
+ select: ({
36513
+ value,
36514
+ options,
36515
+ optionGroup,
36516
+ props,
36517
+ formsValue,
36518
+ optionsFilter,
36519
+ filterCond,
36520
+ repeatValues,
36521
+ repeatIndex,
36522
+ name,
36523
+ inputName,
36524
+ address,
36525
+ addressData,
36526
+ input,
36527
+ scope
36528
+ }, {
36529
+ forms,
36530
+ form,
36531
+ setAddress,
36532
+ inputMeta = {},
36533
+ t,
36534
+ isHighlighted,
36535
+ changeInputMeta,
36536
+ groupFormId
36537
+ }) => {
36518
36538
  let opts;
36519
- const isEvaluation = input === null || input === void 0 || (_input$meta9 = input.meta) === null || _input$meta9 === void 0 ? void 0 : _input$meta9.isEvaluation;
36539
+ const isEvaluation = input?.meta?.isEvaluation;
36520
36540
  let defaultValue = value;
36521
36541
  if (typeof options === "string") {
36522
36542
  const [formName, key] = options.split(".");
@@ -36541,7 +36561,7 @@ const inputTypeComponent$1 = {
36541
36561
  opts = [];
36542
36562
  }
36543
36563
  } else {
36544
- opts = options === null || options === void 0 ? void 0 : options.filter(o => !o.onlyView);
36564
+ opts = options?.filter(o => !o.onlyView);
36545
36565
  }
36546
36566
  opts = JSON.parse(JSON.stringify(opts || []));
36547
36567
  opts = opts.map(o => getSelectOptions$2(o, formsValue));
@@ -36551,7 +36571,7 @@ const inputTypeComponent$1 = {
36551
36571
  const uniqueDefaultKeys = getUniqueDefaultKeys(options);
36552
36572
 
36553
36573
  // Handle default value logic
36554
- if (!propHasValue$1(value) && propHasValue$1(input === null || input === void 0 || (_input$meta10 = input.meta) === null || _input$meta10 === void 0 ? void 0 : _input$meta10.defaultValue)) {
36574
+ if (!propHasValue$1(value) && propHasValue$1(input?.meta?.defaultValue)) {
36555
36575
  // If no current value but there's a default value, use the default
36556
36576
  value = input.meta.defaultValue;
36557
36577
  defaultValue = value;
@@ -36584,7 +36604,7 @@ const inputTypeComponent$1 = {
36584
36604
  }
36585
36605
  opts = groupOptions;
36586
36606
  }
36587
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
36607
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
36588
36608
  size: "large",
36589
36609
  autoComplete: "new-password",
36590
36610
  allowClear: true,
@@ -36593,32 +36613,35 @@ const inputTypeComponent$1 = {
36593
36613
  value: value // Use value instead of defaultValue for controlled behavior
36594
36614
  ,
36595
36615
  filterOption: filterSelectOptions,
36596
- optionFilterProp: "children"
36597
- }, props), {}, {
36616
+ optionFilterProp: "children",
36617
+ ...props,
36598
36618
  className: formatClassname([isHighlighted && "highlighted-select"]),
36599
36619
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
36600
36620
  placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp(props.placeholder, formsValue) || t("Select one option"),
36601
36621
  onChange: (val, selectedValue) => {
36602
36622
  // ONLY FOR SBG EVALUATON !!
36603
36623
  if (isEvaluation && val === "na" && groupFormId) {
36604
- var _formsValue$meta2;
36605
36624
  changeInputMeta({
36606
36625
  key: groupFormId,
36607
- value: _objectSpread2(_objectSpread2({}, (formsValue === null || formsValue === void 0 || (_formsValue$meta2 = formsValue.meta) === null || _formsValue$meta2 === void 0 || (_formsValue$meta2 = _formsValue$meta2.inputs) === null || _formsValue$meta2 === void 0 ? void 0 : _formsValue$meta2[groupFormId]) || {}), {}, {
36626
+ value: {
36627
+ ...(formsValue?.meta?.inputs?.[groupFormId] || {}),
36608
36628
  documentation: {
36609
36629
  notApplicable: true
36610
36630
  }
36611
- }),
36631
+ },
36612
36632
  otherValues: {
36613
- [groupFormId]: _objectSpread2(_objectSpread2({}, (formsValue === null || formsValue === void 0 ? void 0 : formsValue[groupFormId]) || {}), {}, {
36633
+ [groupFormId]: {
36634
+ ...(formsValue?.[groupFormId] || {}),
36614
36635
  [name]: val
36615
- })
36636
+ }
36616
36637
  }
36617
36638
  });
36618
36639
  }
36619
36640
  if (address && selectedValue) {
36620
36641
  dot__default["default"].str(address, selectedValue.children, addressData);
36621
- setAddress(_objectSpread2({}, addressData));
36642
+ setAddress({
36643
+ ...addressData
36644
+ });
36622
36645
  }
36623
36646
  if (props.onChange) {
36624
36647
  props.onChange(val);
@@ -36649,15 +36672,15 @@ const inputTypeComponent$1 = {
36649
36672
  if (og.disabled !== undefined) {
36650
36673
  groupOtherProps.disabled = og.disabled;
36651
36674
  }
36652
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, _objectSpread2(_objectSpread2({
36653
- value: og.value
36654
- }, groupOtherProps), {}, {
36675
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
36676
+ value: og.value,
36677
+ ...groupOtherProps,
36655
36678
  children: og.label
36656
- }), "".concat(i).concat(j));
36679
+ }, `${i}${j}`);
36657
36680
  })
36658
- }) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, _objectSpread2(_objectSpread2({
36659
- value: option.value
36660
- }, otherProps), {}, {
36681
+ }) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
36682
+ value: option.value,
36683
+ ...otherProps,
36661
36684
  children: isEvaluation ? /*#__PURE__*/jsxRuntime.jsxs("div", {
36662
36685
  className: "flex",
36663
36686
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
@@ -36665,35 +36688,33 @@ const inputTypeComponent$1 = {
36665
36688
  children: sgbEvaluationIcons[option.value]
36666
36689
  }), option.label]
36667
36690
  }) : option.label
36668
- }), option.value);
36691
+ }, option.value);
36669
36692
  })
36670
- }));
36693
+ });
36671
36694
  },
36672
- multiselect: (_ref13, _ref14) => {
36673
- let {
36674
- value,
36675
- options,
36676
- optionGroup,
36677
- optionsFilter,
36678
- filterCond,
36679
- props,
36680
- formsValue,
36681
- repeatValues,
36682
- repeatIndex,
36683
- inputName,
36684
- name,
36685
- tags,
36686
- maxWidth,
36687
- staticWidth,
36688
- fullWidth
36689
- } = _ref13;
36690
- let {
36691
- forms,
36692
- form,
36693
- inputMeta = {},
36694
- t,
36695
- isHighlighted
36696
- } = _ref14;
36695
+ multiselect: ({
36696
+ value,
36697
+ options,
36698
+ optionGroup,
36699
+ optionsFilter,
36700
+ filterCond,
36701
+ props,
36702
+ formsValue,
36703
+ repeatValues,
36704
+ repeatIndex,
36705
+ inputName,
36706
+ name,
36707
+ tags,
36708
+ maxWidth,
36709
+ staticWidth,
36710
+ fullWidth
36711
+ }, {
36712
+ forms,
36713
+ form,
36714
+ inputMeta = {},
36715
+ t,
36716
+ isHighlighted
36717
+ }) => {
36697
36718
  let opts;
36698
36719
  if (typeof options === "string") {
36699
36720
  const [formName, key] = options.split(".");
@@ -36755,17 +36776,17 @@ const inputTypeComponent$1 = {
36755
36776
  staticWidth,
36756
36777
  fullWidth
36757
36778
  });
36758
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2(_objectSpread2({
36779
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
36759
36780
  size: "medium",
36760
36781
  allowClear: true,
36761
36782
  autoComplete: "new-password",
36762
36783
  mode: tags ? "tags" : "multiple",
36763
- optionFilterProp: "children"
36764
- }, tags ? {
36765
- tokenSeparators: [","]
36766
- } : {}), {}, {
36767
- filterOption: filterSelectOptions
36768
- }, props), {}, {
36784
+ optionFilterProp: "children",
36785
+ ...(tags ? {
36786
+ tokenSeparators: [","]
36787
+ } : {}),
36788
+ filterOption: filterSelectOptions,
36789
+ ...props,
36769
36790
  className: formatClassname([isHighlighted && "highlighted-select"]),
36770
36791
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
36771
36792
  placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp(props.placeholder, formsValue) || t("Select all relevant options"),
@@ -36804,52 +36825,51 @@ const inputTypeComponent$1 = {
36804
36825
  if (og.disabled !== undefined) {
36805
36826
  groupOtherProps.disabled = og.disabled;
36806
36827
  }
36807
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, _objectSpread2(_objectSpread2({
36808
- value: og.value
36809
- }, groupOtherProps), {}, {
36828
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
36829
+ value: og.value,
36830
+ ...groupOtherProps,
36810
36831
  children: og.label
36811
- }), "".concat(i).concat(j));
36832
+ }, `${i}${j}`);
36812
36833
  })
36813
- }) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, _objectSpread2(_objectSpread2({
36814
- value: option.value
36815
- }, otherProps), {}, {
36834
+ }) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
36835
+ value: option.value,
36836
+ ...otherProps,
36816
36837
  children: option.label
36817
- }), i);
36838
+ }, i);
36818
36839
  })
36819
- }));
36840
+ });
36820
36841
  },
36821
- date: (_ref15, _ref16) => {
36822
- var _formsValue$groupForm, _value2;
36823
- let {
36824
- props,
36825
- rules,
36826
- repeatValues,
36827
- formsValue,
36828
- name
36829
- } = _ref15;
36830
- let {
36831
- setFormValues,
36832
- inputMeta,
36833
- form,
36834
- t,
36835
- isHighlighted,
36836
- groupFormId
36837
- } = _ref16;
36842
+ date: ({
36843
+ props,
36844
+ rules,
36845
+ repeatValues,
36846
+ formsValue,
36847
+ name
36848
+ }, {
36849
+ setFormValues,
36850
+ inputMeta,
36851
+ form,
36852
+ t,
36853
+ isHighlighted,
36854
+ groupFormId
36855
+ }) => {
36838
36856
  const lng = localStorage.getItem("datastakeLng") || "en";
36839
36857
  const maxRule = rules.find(r => r.max);
36840
- let value = groupFormId ? formsValue === null || formsValue === void 0 || (_formsValue$groupForm = formsValue[groupFormId]) === null || _formsValue$groupForm === void 0 ? void 0 : _formsValue$groupForm[name] : formsValue[name];
36858
+ let value = groupFormId ? formsValue?.[groupFormId]?.[name] : formsValue[name];
36841
36859
  const handleDateChange = date => {
36842
36860
  if (date) {
36843
36861
  // const localDate = dayjs.utc(date).add(dayjs(date).utcOffset(), 'minutes');
36844
36862
  const localDate = dayjs__default["default"].utc(date);
36845
36863
  if (groupFormId) {
36846
- const _new = _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
36864
+ const _new = {
36865
+ ...(formsValue[groupFormId] || {}),
36847
36866
  [name]: localDate
36848
- });
36867
+ };
36849
36868
  form.setFieldValue(groupFormId, _new);
36850
- setFormValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
36869
+ setFormValues({
36870
+ ...formsValue,
36851
36871
  [groupFormId]: _new
36852
- }));
36872
+ });
36853
36873
  } else {
36854
36874
  form.setFieldValue(name, localDate);
36855
36875
  }
@@ -36858,13 +36878,15 @@ const inputTypeComponent$1 = {
36858
36878
  if (groupFormId) {
36859
36879
  if (typeof value === "string" || typeof value === "undefined") {
36860
36880
  value = typeof value === "string" ? dayjs__default["default"].utc(value) : null;
36861
- const _new = _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
36881
+ const _new = {
36882
+ ...(formsValue[groupFormId] || {}),
36862
36883
  [name]: value
36863
- });
36884
+ };
36864
36885
  form.setFieldValue(groupFormId, _new);
36865
- setFormValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
36886
+ setFormValues({
36887
+ ...formsValue,
36866
36888
  [groupFormId]: _new
36867
- }));
36889
+ });
36868
36890
  }
36869
36891
  } else {
36870
36892
  if (typeof value === "string") {
@@ -36880,13 +36902,12 @@ const inputTypeComponent$1 = {
36880
36902
  checkForMax = checkCondition$1(maxRule.condition, repeatValues, formsValue);
36881
36903
  }
36882
36904
  if (checkForMax) {
36883
- var _value;
36884
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
36905
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
36885
36906
  size: "large",
36886
36907
  allowClear: true,
36887
- autoComplete: "new-password"
36888
- }, props), {}, {
36889
- value: value ? dayjs__default["default"]((_value = value) === null || _value === void 0 ? void 0 : _value.format("YYYY-MM-DD"), "YYYY-MM-DD") : undefined,
36908
+ autoComplete: "new-password",
36909
+ ...props,
36910
+ value: value ? dayjs__default["default"](value?.format("YYYY-MM-DD"), "YYYY-MM-DD") : undefined,
36890
36911
  onChange: handleDateChange,
36891
36912
  className: formatClassname([isHighlighted && "highlighted-input"]),
36892
36913
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
@@ -36896,54 +36917,49 @@ const inputTypeComponent$1 = {
36896
36917
  disabledDate: current => {
36897
36918
  return current && current >= dayjs__default["default"]().endOf("day");
36898
36919
  }
36899
- }));
36920
+ });
36900
36921
  }
36901
36922
  }
36902
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
36923
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
36903
36924
  size: "large",
36904
36925
  allowClear: true,
36905
- autoComplete: "new-password"
36906
- }, props), {}, {
36907
- value: value ? dayjs__default["default"]((_value2 = value) === null || _value2 === void 0 ? void 0 : _value2.format("YYYY-MM-DD"), "YYYY-MM-DD") : undefined,
36926
+ autoComplete: "new-password",
36927
+ ...props,
36928
+ value: value ? dayjs__default["default"](value?.format("YYYY-MM-DD"), "YYYY-MM-DD") : undefined,
36908
36929
  onChange: handleDateChange,
36909
36930
  className: formatClassname([isHighlighted && "highlighted-input"]),
36910
36931
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
36911
36932
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder,
36912
36933
  format: DATE_FORMATS,
36913
36934
  locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"]
36914
- }));
36935
+ });
36915
36936
  },
36916
- groupExpandable: (_ref17, _ref18) => {
36917
- var _formsValue$groupForm2;
36918
- let {
36919
- formsValue,
36920
- name,
36921
- input
36922
- } = _ref17;
36923
- let {
36924
- groupFormId
36925
- } = _ref18;
36926
- const data = groupFormId ? formsValue === null || formsValue === void 0 || (_formsValue$groupForm2 = formsValue[groupFormId]) === null || _formsValue$groupForm2 === void 0 ? void 0 : _formsValue$groupForm2[name] : formsValue === null || formsValue === void 0 ? void 0 : formsValue[name];
36937
+ groupExpandable: ({
36938
+ formsValue,
36939
+ name,
36940
+ input
36941
+ }, {
36942
+ groupFormId
36943
+ }) => {
36944
+ const data = groupFormId ? formsValue?.[groupFormId]?.[name] : formsValue?.[name];
36927
36945
  return /*#__PURE__*/jsxRuntime.jsx(GroupExpandable, {
36928
36946
  input: input,
36929
36947
  formsValue: formsValue,
36930
36948
  data: data
36931
36949
  });
36932
36950
  },
36933
- comment: (_ref19, _ref20) => {
36934
- let {
36935
- props: {
36936
- placeholder
36937
- },
36938
- commentHint
36939
- } = _ref19,
36940
- props = _objectWithoutProperties(_ref19.props, _excluded$g);
36941
- let {
36942
- onChange,
36943
- value,
36944
- isHighlighted
36945
- } = _ref20;
36946
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
36951
+ comment: ({
36952
+ props: {
36953
+ placeholder,
36954
+ ...props
36955
+ },
36956
+ commentHint
36957
+ }, {
36958
+ onChange,
36959
+ value,
36960
+ isHighlighted
36961
+ }) => {
36962
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
36947
36963
  allowClear: true,
36948
36964
  value: value,
36949
36965
  onChange: e => onChange(e.target.value),
@@ -36954,27 +36970,26 @@ const inputTypeComponent$1 = {
36954
36970
  autoSize: {
36955
36971
  minRows: 5,
36956
36972
  maxRows: 5
36957
- }
36958
- }, props), {}, {
36973
+ },
36974
+ ...props,
36959
36975
  disabled: false
36960
- }));
36976
+ });
36961
36977
  },
36962
- tableComment: (_ref21, _ref22) => {
36963
- var _formsValue$meta3;
36964
- let {
36965
- setValues,
36966
- name,
36967
- onValuesChange,
36968
- formsValue
36969
- } = _ref21;
36970
- let {
36971
- form,
36972
- groupFormId,
36973
- isHighlighted
36974
- } = _ref22;
36975
- const formData = groupFormId ? getArray((formsValue[groupFormId] || {})[name] || []).map((v, i) => _objectSpread2(_objectSpread2({}, v), {}, {
36978
+ tableComment: ({
36979
+ setValues,
36980
+ name,
36981
+ onValuesChange,
36982
+ formsValue
36983
+ }, {
36984
+ form,
36985
+ groupFormId,
36986
+ isHighlighted
36987
+ }) => {
36988
+ const formData = groupFormId ? getArray((formsValue[groupFormId] || {})[name] || []).map((v, i) => ({
36989
+ ...v,
36976
36990
  key: i
36977
- })) : (formsValue[name] || []).map((v, i) => _objectSpread2(_objectSpread2({}, v), {}, {
36991
+ })) : (formsValue[name] || []).map((v, i) => ({
36992
+ ...v,
36978
36993
  key: i
36979
36994
  }));
36980
36995
  const onUpdate = (val, i) => {
@@ -36982,89 +36997,121 @@ const inputTypeComponent$1 = {
36982
36997
  [name]: formData.map((d, j) => i === j ? val : d)
36983
36998
  };
36984
36999
  if (groupFormId) {
36985
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
36986
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
36987
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
37000
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
37001
+ const _newData = {
37002
+ ..._defaultData,
37003
+ ..._val
37004
+ };
37005
+ onValuesChange(_newData, {
37006
+ ...formsValue,
36988
37007
  [groupFormId]: _newData
36989
- }));
36990
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
36991
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
37008
+ });
37009
+ form?.setFieldValue(groupFormId, _newData);
37010
+ setValues({
37011
+ ...formsValue,
36992
37012
  [groupFormId]: _newData
36993
- }));
37013
+ });
36994
37014
  return;
36995
37015
  }
36996
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
36997
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
36998
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
37016
+ onValuesChange(_val, {
37017
+ ...formsValue,
37018
+ ..._val
37019
+ });
37020
+ form?.setFieldValue(name, _val[name]);
37021
+ setValues({
37022
+ ...formsValue,
37023
+ ..._val
37024
+ });
36999
37025
  };
37000
37026
  return /*#__PURE__*/jsxRuntime.jsx(Comment, {
37001
37027
  onUpdate: onUpdate,
37002
37028
  isHighlighted: isHighlighted,
37003
37029
  form: form,
37004
- values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
37030
+ values: groupFormId ? {
37031
+ ...(formsValue[groupFormId] || {}),
37005
37032
  meta: {
37006
- inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta3 = formsValue.meta) === null || _formsValue$meta3 === void 0 ? void 0 : _formsValue$meta3.inputs) || {})[groupFormId]
37033
+ inputs: (formsValue?.meta?.inputs || {})[groupFormId]
37007
37034
  }
37008
- }) : formsValue,
37035
+ } : formsValue,
37009
37036
  name: name,
37010
- remove: _ref23 => {
37011
- let {
37012
- key
37013
- } = _ref23;
37037
+ remove: ({
37038
+ key
37039
+ }) => {
37014
37040
  const _val = {
37015
37041
  [name]: formData.filter(v => v.key !== key)
37016
37042
  };
37017
37043
  if (groupFormId) {
37018
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
37019
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
37020
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
37044
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
37045
+ const _newData = {
37046
+ ..._defaultData,
37047
+ ..._val
37048
+ };
37049
+ onValuesChange(_newData, {
37050
+ ...formsValue,
37021
37051
  [groupFormId]: _newData
37022
- }));
37023
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
37024
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
37052
+ });
37053
+ form?.setFieldValue(groupFormId, _newData);
37054
+ setValues({
37055
+ ...formsValue,
37025
37056
  [groupFormId]: _newData
37026
- }));
37057
+ });
37027
37058
  return;
37028
37059
  }
37029
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
37030
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
37031
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
37060
+ onValuesChange(_val, {
37061
+ ...formsValue,
37062
+ ..._val
37063
+ });
37064
+ form?.setFieldValue(name, _val[name]);
37065
+ setValues({
37066
+ ...formsValue,
37067
+ ..._val
37068
+ });
37032
37069
  },
37033
37070
  add: val => {
37034
37071
  const _val = {
37035
- [name]: [...formData, _objectSpread2(_objectSpread2({}, val), {}, {
37072
+ [name]: [...formData, {
37073
+ ...val,
37036
37074
  key: formData.length
37037
- })]
37075
+ }]
37038
37076
  };
37039
37077
  if (groupFormId) {
37040
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
37041
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
37042
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
37043
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
37078
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
37079
+ const _newData = {
37080
+ ..._defaultData,
37081
+ ..._val
37082
+ };
37083
+ form?.setFieldValue(groupFormId, _newData);
37084
+ onValuesChange(_newData, {
37085
+ ...formsValue,
37044
37086
  [groupFormId]: _newData
37045
- }));
37046
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
37087
+ });
37088
+ setValues({
37089
+ ...formsValue,
37047
37090
  [groupFormId]: _newData
37048
- }));
37091
+ });
37049
37092
  return;
37050
37093
  }
37051
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
37052
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
37053
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
37094
+ form?.setFieldValue(name, _val[name]);
37095
+ onValuesChange(_val, {
37096
+ ...formsValue,
37097
+ ..._val
37098
+ });
37099
+ setValues({
37100
+ ...formsValue,
37101
+ ..._val
37102
+ });
37054
37103
  },
37055
37104
  k: name
37056
37105
  });
37057
37106
  },
37058
- textarea: (_ref24, _ref25) => {
37059
- let {
37060
- props,
37061
- rules
37062
- } = _ref24;
37063
- let {
37064
- inputMeta,
37065
- t,
37066
- isHighlighted
37067
- } = _ref25;
37107
+ textarea: ({
37108
+ props,
37109
+ rules
37110
+ }, {
37111
+ inputMeta,
37112
+ t,
37113
+ isHighlighted
37114
+ }) => {
37068
37115
  const maxRule = rules.find(r => r.max);
37069
37116
  let maxLength = MAX_TEXT_AREA_LENGTH;
37070
37117
  let rows = 5;
@@ -37091,7 +37138,7 @@ const inputTypeComponent$1 = {
37091
37138
  // rows = 14;
37092
37139
  // }
37093
37140
  }
37094
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
37141
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
37095
37142
  allowClear: true,
37096
37143
  autoComplete: "new-password",
37097
37144
  maxLength: maxLength,
@@ -37099,37 +37146,35 @@ const inputTypeComponent$1 = {
37099
37146
  autoSize: {
37100
37147
  minRows: rows,
37101
37148
  maxRows: rows
37102
- }
37103
- }, props), {}, {
37149
+ },
37150
+ ...props,
37104
37151
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
37105
37152
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
37106
- }));
37153
+ });
37107
37154
  },
37108
- phoneNumber: (_ref26, _ref27) => {
37109
- let {
37110
- name,
37111
- inputName,
37112
- props,
37113
- value,
37114
- repeatIndex,
37115
- repeatValues,
37116
- formsValue
37117
- } = _ref26;
37118
- let {
37119
- setFormValues,
37120
- inputMeta,
37121
- t,
37122
- isHighlighted
37123
- } = _ref27;
37124
- return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, _objectSpread2(_objectSpread2({
37155
+ phoneNumber: ({
37156
+ name,
37157
+ inputName,
37158
+ props,
37159
+ value,
37160
+ repeatIndex,
37161
+ repeatValues,
37162
+ formsValue
37163
+ }, {
37164
+ setFormValues,
37165
+ inputMeta,
37166
+ t,
37167
+ isHighlighted
37168
+ }) => {
37169
+ return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, {
37125
37170
  customSelectWidthPercentage: "20%",
37126
37171
  t: t,
37127
37172
  size: "large",
37128
37173
  allowClear: true,
37129
- country: formsValue === null || formsValue === void 0 ? void 0 : formsValue.country,
37174
+ country: formsValue?.country,
37130
37175
  initialValue: value,
37131
- name: name
37132
- }, props), {}, {
37176
+ name: name,
37177
+ ...props,
37133
37178
  className: formatClassname([isHighlighted && "highlighted-input"]),
37134
37179
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
37135
37180
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type Number"),
@@ -37150,27 +37195,26 @@ const inputTypeComponent$1 = {
37150
37195
  }
37151
37196
  return val;
37152
37197
  }
37153
- }));
37198
+ });
37154
37199
  },
37155
- switch: (_ref28, _ref29) => {
37156
- let {
37157
- props,
37158
- value,
37159
- restricted,
37160
- autocomplete,
37161
- formsValue,
37162
- repeatValues,
37163
- repeatIndex,
37164
- name,
37165
- inputName,
37166
- replace: replaceInput,
37167
- unique
37168
- } = _ref28;
37169
- let {
37170
- form,
37171
- isHighlighted
37172
- } = _ref29;
37173
- return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, _objectSpread2(_objectSpread2({}, props), {}, {
37200
+ switch: ({
37201
+ props,
37202
+ value,
37203
+ restricted,
37204
+ autocomplete,
37205
+ formsValue,
37206
+ repeatValues,
37207
+ repeatIndex,
37208
+ name,
37209
+ inputName,
37210
+ replace: replaceInput,
37211
+ unique
37212
+ }, {
37213
+ form,
37214
+ isHighlighted
37215
+ }) => {
37216
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, {
37217
+ ...props,
37174
37218
  size: "default",
37175
37219
  defaultChecked: value || false,
37176
37220
  checked: value || false,
@@ -37198,7 +37242,9 @@ const inputTypeComponent$1 = {
37198
37242
  const [formName, replaceInputName] = replaceTo.split(".");
37199
37243
  const replaceRepeatValues = replaceInputName ? dot__default["default"].pick(formName, formsValue) : undefined;
37200
37244
  updateFormValues$1(undefined, replaceRepeatValues, replaceInputName, isChecked ? newId : undefined, formsValue, formName, form);
37201
- formsValue = Object.assign(formsValue, _objectSpread2({}, form.getFieldsValue(true)));
37245
+ formsValue = Object.assign(formsValue, {
37246
+ ...form.getFieldsValue(true)
37247
+ });
37202
37248
  if (oldId) {
37203
37249
  const allRepeatValues = dot__default["default"].pick(name, formsValue);
37204
37250
  if (allRepeatValues && Array.isArray(allRepeatValues)) {
@@ -37239,22 +37285,20 @@ const inputTypeComponent$1 = {
37239
37285
  }
37240
37286
  }
37241
37287
  }
37242
- }));
37288
+ });
37243
37289
  },
37244
- radioGroup: (_ref30, _ref31) => {
37245
- let {
37246
- props,
37247
- value,
37248
- options,
37249
- isRisk
37250
- } = _ref30;
37251
- let {
37252
- isHighlighted
37253
- } = _ref31;
37290
+ radioGroup: ({
37291
+ props,
37292
+ value,
37293
+ options,
37294
+ isRisk
37295
+ }, {
37296
+ isHighlighted
37297
+ }) => {
37254
37298
  if (isRisk) {
37255
- return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, _objectSpread2(_objectSpread2({
37256
- value: value
37257
- }, props), {}, {
37299
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, {
37300
+ value: value,
37301
+ ...props,
37258
37302
  className: "is-risk-radio",
37259
37303
  children: (options || []).map(o => {
37260
37304
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Radio, {
@@ -37268,11 +37312,11 @@ const inputTypeComponent$1 = {
37268
37312
  }) : null]
37269
37313
  }, o.value);
37270
37314
  })
37271
- }));
37315
+ });
37272
37316
  }
37273
- return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, _objectSpread2(_objectSpread2({
37274
- value: value
37275
- }, props), {}, {
37317
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, {
37318
+ value: value,
37319
+ ...props,
37276
37320
  className: formatClassname([isHighlighted && "highlighted-input"]),
37277
37321
  children: (options || []).map(o => {
37278
37322
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Radio, {
@@ -37286,20 +37330,18 @@ const inputTypeComponent$1 = {
37286
37330
  }) : null]
37287
37331
  }, o.value);
37288
37332
  })
37289
- }));
37333
+ });
37290
37334
  },
37291
- checkboxGroup: (_ref32, _ref33) => {
37292
- let {
37293
- props,
37294
- value,
37295
- options
37296
- } = _ref32;
37297
- let {
37298
- isHighlighted
37299
- } = _ref33;
37300
- return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox.Group, _objectSpread2(_objectSpread2({
37301
- value: value
37302
- }, props), {}, {
37335
+ checkboxGroup: ({
37336
+ props,
37337
+ value,
37338
+ options
37339
+ }, {
37340
+ isHighlighted
37341
+ }) => {
37342
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox.Group, {
37343
+ value: value,
37344
+ ...props,
37303
37345
  className: formatClassname([isHighlighted && "highlighted-input"]),
37304
37346
  style: {
37305
37347
  display: "grid",
@@ -37323,18 +37365,16 @@ const inputTypeComponent$1 = {
37323
37365
  }) : null]
37324
37366
  }, o.value);
37325
37367
  })
37326
- }));
37368
+ });
37327
37369
  },
37328
- total100: (_ref34, _ref35) => {
37329
- let {
37330
- props,
37331
- name,
37332
- options,
37333
- value
37334
- } = _ref34;
37335
- let {
37336
- isHighlighted
37337
- } = _ref35;
37370
+ total100: ({
37371
+ props,
37372
+ name,
37373
+ options,
37374
+ value
37375
+ }, {
37376
+ isHighlighted
37377
+ }) => {
37338
37378
  value = value ? Array.isArray(value) ? value : [value] : [];
37339
37379
  function totalValue() {
37340
37380
  let total = 0;
@@ -37358,11 +37398,10 @@ const inputTypeComponent$1 = {
37358
37398
  className: formatClassname(["total100", isHighlighted && "highlighted-input"]),
37359
37399
  children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.List, {
37360
37400
  name: name,
37361
- children: (fields, _ref36) => {
37362
- let {
37363
- add,
37364
- remove
37365
- } = _ref36;
37401
+ children: (fields, {
37402
+ add,
37403
+ remove
37404
+ }) => {
37366
37405
  if (fields.length === 0) {
37367
37406
  const formData = value || [];
37368
37407
  if (formData.length) {
@@ -37381,27 +37420,27 @@ const inputTypeComponent$1 = {
37381
37420
  const v = value[field.name] || {};
37382
37421
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Space, {
37383
37422
  className: "total",
37384
- children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
37385
- noStyle: true
37386
- }, field), {}, {
37423
+ children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
37424
+ noStyle: true,
37425
+ ...field,
37387
37426
  name: [field.name, "type"],
37388
37427
  fieldKey: [field.fieldKey, "type"],
37389
37428
  initialValue: v.type || null,
37390
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
37429
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
37391
37430
  size: "large",
37392
37431
  allowClear: true,
37393
37432
  showSearch: true,
37394
37433
  filterOption: filterSelectOptions,
37395
- optionFilterProp: "children"
37396
- }, props), {}, {
37434
+ optionFilterProp: "children",
37435
+ ...props,
37397
37436
  children: options.map((option, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
37398
37437
  value: option.value,
37399
37438
  children: option.label
37400
37439
  }, i))
37401
- }))
37402
- })), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
37403
- noStyle: true
37404
- }, field), {}, {
37440
+ })
37441
+ }), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
37442
+ noStyle: true,
37443
+ ...field,
37405
37444
  name: [field.name, "value"],
37406
37445
  fieldKey: [field.fieldKey, "value"],
37407
37446
  initialValue: v.value,
@@ -37410,14 +37449,14 @@ const inputTypeComponent$1 = {
37410
37449
  allowClear: true,
37411
37450
  name: "value",
37412
37451
  formatter: value => {
37413
- return value ? "".concat(value, "%") : "";
37452
+ return value ? `${value}%` : "";
37414
37453
  },
37415
37454
  disabled: !v.type || null,
37416
37455
  placeholder: props.valueplaceholder ? props.valueplaceholder : "Value",
37417
37456
  min: 1,
37418
37457
  max: 100 - siblingTotal(v.type || 0)
37419
37458
  })
37420
- })), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
37459
+ }), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
37421
37460
  disabled: !v.value || !v.type || totalValue() >= 100,
37422
37461
  type: "primary",
37423
37462
  icon: /*#__PURE__*/jsxRuntime.jsx(Icons.PlusOutlined, {}),
@@ -37449,22 +37488,19 @@ const inputTypeComponent$1 = {
37449
37488
  }) : null]
37450
37489
  });
37451
37490
  },
37452
- percentage: (_ref37, _ref38) => {
37453
- var _input$meta11;
37454
- let {
37455
- name,
37456
- inputName,
37457
- totalMax,
37458
- repeatIndex,
37459
- props,
37460
- formsValue,
37461
- input
37462
- } = _ref37;
37463
- let {
37464
- inputMeta,
37465
- t,
37466
- isHighlighted
37467
- } = _ref38;
37491
+ percentage: ({
37492
+ name,
37493
+ inputName,
37494
+ totalMax,
37495
+ repeatIndex,
37496
+ props,
37497
+ formsValue,
37498
+ input
37499
+ }, {
37500
+ inputMeta,
37501
+ t,
37502
+ isHighlighted
37503
+ }) => {
37468
37504
  const isRepeatable = Array.isArray(formsValue[name]);
37469
37505
  let totalSiblings = 0;
37470
37506
  if (isRepeatable && totalMax) {
@@ -37472,47 +37508,45 @@ const inputTypeComponent$1 = {
37472
37508
  totl = totl + (grp[inputName] || 0);
37473
37509
  return totl;
37474
37510
  }, 0);
37475
- } else if (Array.isArray(input === null || input === void 0 || (_input$meta11 = input.meta) === null || _input$meta11 === void 0 ? void 0 : _input$meta11.siblings)) {
37511
+ } else if (Array.isArray(input?.meta?.siblings)) {
37476
37512
  totalSiblings = input.meta.siblings.reduce((totl, key) => {
37477
37513
  totl = totl + (formsValue[key] || 0);
37478
37514
  return totl;
37479
37515
  }, 0);
37480
37516
  }
37481
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
37517
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
37482
37518
  size: "large",
37483
- allowClear: true
37484
- }, props), {}, {
37519
+ allowClear: true,
37520
+ ...props,
37485
37521
  className: formatClassname([isHighlighted && "highlighted-cont"]),
37486
37522
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
37487
37523
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type number"),
37488
37524
  min: 0,
37489
37525
  max: 100 - totalSiblings,
37490
37526
  formatter: value => {
37491
- return value ? "".concat(value) : "";
37527
+ return value ? `${value}` : "";
37492
37528
  },
37493
37529
  parser: value => value.replace("%", ""),
37494
37530
  addonAfter: "%"
37495
- }));
37531
+ });
37496
37532
  },
37497
- drawTerritory: (_ref39, _ref40) => {
37498
- let {
37499
- formsValue,
37500
- name,
37501
- addressData
37502
- } = _ref39;
37503
- let {
37504
- setFormValues
37505
- } = _ref40;
37533
+ drawTerritory: ({
37534
+ formsValue,
37535
+ name,
37536
+ addressData
37537
+ }, {
37538
+ setFormValues
37539
+ }) => {
37506
37540
  let search = formsValue.country;
37507
37541
  if (addressData && addressData.address && Object.keys(addressData.address).length > 0) {
37508
37542
  if (addressData.address.country) {
37509
37543
  search = addressData.address.country;
37510
37544
  }
37511
37545
  if (addressData.address.level1) {
37512
- search = "".concat(addressData.address.level1, ", ").concat(addressData.address.country);
37546
+ search = `${addressData.address.level1}, ${addressData.address.country}`;
37513
37547
  }
37514
37548
  if (addressData.address.level2) {
37515
- search = "".concat(addressData.address.level2, ", ").concat(addressData.address.level1, ", ").concat(addressData.address.country);
37549
+ search = `${addressData.address.level2}, ${addressData.address.level1}, ${addressData.address.country}`;
37516
37550
  }
37517
37551
  } else {
37518
37552
  const country = countriesList.countries[formsValue.country] || {};
@@ -37520,10 +37554,10 @@ const inputTypeComponent$1 = {
37520
37554
  search = country.name;
37521
37555
  }
37522
37556
  if (formsValue.administrativeLevel1Name) {
37523
- search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
37557
+ search = `${search} ${formsValue.administrativeLevel1Name}`;
37524
37558
  }
37525
37559
  if (formsValue.administrativeLevel2Name) {
37526
- search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
37560
+ search = `${search} ${formsValue.administrativeLevel2Name}`;
37527
37561
  }
37528
37562
  }
37529
37563
  return /*#__PURE__*/jsxRuntime.jsx(PolygonSelector, {
@@ -37535,36 +37569,32 @@ const inputTypeComponent$1 = {
37535
37569
  searchValue: search
37536
37570
  });
37537
37571
  },
37538
- year: (_ref41, _ref42) => {
37539
- let {
37540
- props
37541
- } = _ref41;
37542
- let {
37543
- isHighlighted
37544
- } = _ref42;
37572
+ year: ({
37573
+ props
37574
+ }, {
37575
+ isHighlighted
37576
+ }) => {
37545
37577
  const lng = localStorage.getItem("datastakeLng") || "en";
37546
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
37578
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
37547
37579
  size: "large",
37548
37580
  allowClear: true,
37549
37581
  locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"],
37550
- picker: "year"
37551
- }, props), {}, {
37582
+ picker: "year",
37583
+ ...props,
37552
37584
  className: formatClassname([isHighlighted && "highlighted-input"]),
37553
37585
  format: "YYYY"
37554
- }));
37586
+ });
37555
37587
  },
37556
- upload: (_ref43, _ref44) => {
37557
- let {
37558
- rules,
37559
- value
37560
- } = _ref43;
37561
- let {
37562
- setLoading = () => {},
37563
- getApiBaseUrl,
37564
- getAppHeader,
37565
- t,
37566
- isHighlighted
37567
- } = _ref44;
37588
+ upload: ({
37589
+ rules,
37590
+ value
37591
+ }, {
37592
+ setLoading = () => {},
37593
+ getApiBaseUrl,
37594
+ getAppHeader,
37595
+ t,
37596
+ isHighlighted
37597
+ }) => {
37568
37598
  const apiURL = getApiBaseUrl();
37569
37599
  const accept = rules.length ? rules.find(rule => Object.keys(rule).includes("accept")).accept || "*" : null;
37570
37600
  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) : []) || [];
@@ -37577,12 +37607,13 @@ const inputTypeComponent$1 = {
37577
37607
  maxProps.multiple = true;
37578
37608
  }
37579
37609
  }
37580
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({}, maxProps), {}, {
37610
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
37611
+ ...maxProps,
37581
37612
  accept: accept,
37582
- action: "".concat(apiURL, "/upload"),
37613
+ action: `${apiURL}/upload`,
37583
37614
  beforeUpload: beforeUpload(allowedExtensions),
37584
37615
  onChange: val => {
37585
- if (val !== null && val !== void 0 && val.file && typeof setLoading === "function") {
37616
+ if (val?.file && typeof setLoading === "function") {
37586
37617
  if (val.file.percent !== 100) {
37587
37618
  setLoading(true);
37588
37619
  } else {
@@ -37590,9 +37621,10 @@ const inputTypeComponent$1 = {
37590
37621
  }
37591
37622
  }
37592
37623
  },
37593
- headers: _objectSpread2({
37594
- Authorization: "Bearer ".concat(getToken())
37595
- }, getAppHeader()),
37624
+ headers: {
37625
+ Authorization: `Bearer ${getToken()}`,
37626
+ ...getAppHeader()
37627
+ },
37596
37628
  defaultFileList: values,
37597
37629
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
37598
37630
  style: {
@@ -37603,20 +37635,18 @@ const inputTypeComponent$1 = {
37603
37635
  children: t("Upload")
37604
37636
  })]
37605
37637
  })
37606
- }));
37638
+ });
37607
37639
  },
37608
- imageUpload: (_ref45, _ref46) => {
37609
- let {
37610
- rules,
37611
- value
37612
- } = _ref45;
37613
- let {
37614
- setLoading = () => {},
37615
- getApiBaseUrl,
37616
- getAppHeader,
37617
- t,
37618
- isHighlighted
37619
- } = _ref46;
37640
+ imageUpload: ({
37641
+ rules,
37642
+ value
37643
+ }, {
37644
+ setLoading = () => {},
37645
+ getApiBaseUrl,
37646
+ getAppHeader,
37647
+ t,
37648
+ isHighlighted
37649
+ }) => {
37620
37650
  const apiURL = getApiBaseUrl();
37621
37651
  const values = getImageUploadEditValue(value);
37622
37652
  const maxRule = rules.find(r => r.max);
@@ -37627,18 +37657,17 @@ const inputTypeComponent$1 = {
37627
37657
  maxProps.multiple = true;
37628
37658
  }
37629
37659
  }
37630
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({
37631
- beforeUpload: beforeUpload(allowedImageExtensions)
37632
- }, maxProps), {}, {
37660
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
37661
+ beforeUpload: beforeUpload(allowedImageExtensions),
37662
+ ...maxProps,
37633
37663
  accept: "image/*",
37634
37664
  classList: !values || !values.length ? "empty" : "",
37635
37665
  listType: "picture",
37636
- action: "".concat(apiURL, "/upload"),
37666
+ action: `${apiURL}/upload`,
37637
37667
  onChange: val => {
37638
37668
  if (typeof setLoading === "function") {
37639
- if (val !== null && val !== void 0 && val.file) {
37640
- var _val$file;
37641
- if ((val === null || val === void 0 || (_val$file = val.file) === null || _val$file === void 0 ? void 0 : _val$file.status) === "removed") {
37669
+ if (val?.file) {
37670
+ if (val?.file?.status === "removed") {
37642
37671
  setLoading(false);
37643
37672
  return;
37644
37673
  }
@@ -37650,9 +37679,10 @@ const inputTypeComponent$1 = {
37650
37679
  setLoading(false);
37651
37680
  }
37652
37681
  },
37653
- headers: _objectSpread2({
37654
- Authorization: "Bearer ".concat(getToken())
37655
- }, getAppHeader()),
37682
+ headers: {
37683
+ Authorization: `Bearer ${getToken()}`,
37684
+ ...getAppHeader()
37685
+ },
37656
37686
  defaultFileList: values,
37657
37687
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
37658
37688
  style: {
@@ -37663,20 +37693,18 @@ const inputTypeComponent$1 = {
37663
37693
  children: t("Upload")
37664
37694
  })]
37665
37695
  })
37666
- }));
37696
+ });
37667
37697
  },
37668
- videoUpload: (_ref47, _ref48) => {
37669
- let {
37670
- rules,
37671
- value
37672
- } = _ref47;
37673
- let {
37674
- setLoading = () => {},
37675
- getApiBaseUrl,
37676
- getAppHeader,
37677
- t,
37678
- isHighlighted
37679
- } = _ref48;
37698
+ videoUpload: ({
37699
+ rules,
37700
+ value
37701
+ }, {
37702
+ setLoading = () => {},
37703
+ getApiBaseUrl,
37704
+ getAppHeader,
37705
+ t,
37706
+ isHighlighted
37707
+ }) => {
37680
37708
  const apiURL = getApiBaseUrl();
37681
37709
  const values = getImageUploadEditValue(value);
37682
37710
  const maxRule = rules.find(r => r.max);
@@ -37687,25 +37715,21 @@ const inputTypeComponent$1 = {
37687
37715
  maxProps.multiple = true;
37688
37716
  }
37689
37717
  }
37690
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({
37691
- itemRender: (item, fileList) => {
37692
- var _fileList$response;
37693
- return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
37694
- children: [/*#__PURE__*/jsxRuntime.jsx(EditVideoPreview, {
37695
- 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)
37696
- }), item]
37697
- });
37698
- }
37699
- }, maxProps), {}, {
37718
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
37719
+ itemRender: (item, fileList) => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
37720
+ children: [/*#__PURE__*/jsxRuntime.jsx(EditVideoPreview, {
37721
+ url: fileList?.response?.url || fileList?.url
37722
+ }), item]
37723
+ }),
37724
+ ...maxProps,
37700
37725
  accept: "video/*",
37701
37726
  classList: !values || !values.length ? "empty" : "",
37702
37727
  listType: "picture",
37703
- action: "".concat(apiURL, "/upload"),
37728
+ action: `${apiURL}/upload`,
37704
37729
  onChange: val => {
37705
37730
  if (typeof setLoading === "function") {
37706
- if (val !== null && val !== void 0 && val.file) {
37707
- var _val$file2;
37708
- if ((val === null || val === void 0 || (_val$file2 = val.file) === null || _val$file2 === void 0 ? void 0 : _val$file2.status) === "removed") {
37731
+ if (val?.file) {
37732
+ if (val?.file?.status === "removed") {
37709
37733
  setLoading(false);
37710
37734
  return;
37711
37735
  }
@@ -37717,9 +37741,10 @@ const inputTypeComponent$1 = {
37717
37741
  setLoading(false);
37718
37742
  }
37719
37743
  },
37720
- headers: _objectSpread2({
37721
- Authorization: "Bearer ".concat(getToken())
37722
- }, getAppHeader()),
37744
+ headers: {
37745
+ Authorization: `Bearer ${getToken()}`,
37746
+ ...getAppHeader()
37747
+ },
37723
37748
  fileList: values,
37724
37749
  defaultFileList: values,
37725
37750
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
@@ -37731,30 +37756,28 @@ const inputTypeComponent$1 = {
37731
37756
  children: t("Upload")
37732
37757
  })]
37733
37758
  })
37734
- }));
37759
+ });
37735
37760
  },
37736
- geolocation: (_ref49, _ref50) => {
37737
- let {
37738
- value,
37739
- name,
37740
- props,
37741
- formsValue,
37742
- addressData
37743
- } = _ref49;
37744
- let {
37745
- inputMeta,
37746
- isHighlighted
37747
- } = _ref50;
37761
+ geolocation: ({
37762
+ value,
37763
+ name,
37764
+ props,
37765
+ formsValue,
37766
+ addressData
37767
+ }, {
37768
+ inputMeta,
37769
+ isHighlighted
37770
+ }) => {
37748
37771
  let search = formsValue.country;
37749
37772
  if (addressData && Object.keys(addressData).length > 0) {
37750
37773
  if (addressData.country) {
37751
37774
  search = addressData.country;
37752
37775
  }
37753
37776
  if (addressData.level1) {
37754
- search = "".concat(addressData.level1, ", ").concat(addressData.country);
37777
+ search = `${addressData.level1}, ${addressData.country}`;
37755
37778
  }
37756
37779
  if (addressData.level2) {
37757
- search = "".concat(addressData.level2, ", ").concat(addressData.level1, ", ").concat(addressData.country);
37780
+ search = `${addressData.level2}, ${addressData.level1}, ${addressData.country}`;
37758
37781
  }
37759
37782
  } else {
37760
37783
  const country = countriesList.countries[formsValue.country] || {};
@@ -37762,10 +37785,10 @@ const inputTypeComponent$1 = {
37762
37785
  search = country.name;
37763
37786
  }
37764
37787
  if (formsValue.administrativeLevel1Name) {
37765
- search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
37788
+ search = `${search} ${formsValue.administrativeLevel1Name}`;
37766
37789
  }
37767
37790
  if (formsValue.administrativeLevel2Name) {
37768
- search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
37791
+ search = `${search} ${formsValue.administrativeLevel2Name}`;
37769
37792
  }
37770
37793
  }
37771
37794
  return /*#__PURE__*/jsxRuntime.jsx(Geolocation, {
@@ -37779,36 +37802,34 @@ const inputTypeComponent$1 = {
37779
37802
  searchValue: search
37780
37803
  });
37781
37804
  },
37782
- ajaxSelect: (_ref51, _ref52) => {
37783
- let {
37784
- call,
37785
- automaticallyLink,
37786
- name,
37787
- inputName,
37788
- props,
37789
- formsValue,
37790
- onNewSetValue,
37791
- multiple,
37792
- updateOptions,
37793
- repeatValues,
37794
- repeatIndex,
37795
- value,
37796
- unique,
37797
- address,
37798
- addressData = {},
37799
- getFromLinking,
37800
- input
37801
- } = _ref51;
37802
- let {
37803
- form,
37804
- forms,
37805
- setAddress,
37806
- changeInputMeta,
37807
- inputMeta,
37808
- meta,
37809
- isHighlighted,
37810
- groupFormId
37811
- } = _ref52;
37805
+ ajaxSelect: ({
37806
+ call,
37807
+ automaticallyLink,
37808
+ name,
37809
+ inputName,
37810
+ props,
37811
+ formsValue,
37812
+ onNewSetValue,
37813
+ multiple,
37814
+ updateOptions,
37815
+ repeatValues,
37816
+ repeatIndex,
37817
+ value,
37818
+ unique,
37819
+ address,
37820
+ addressData = {},
37821
+ getFromLinking,
37822
+ input
37823
+ }, {
37824
+ form,
37825
+ forms,
37826
+ setAddress,
37827
+ changeInputMeta,
37828
+ inputMeta,
37829
+ meta,
37830
+ isHighlighted,
37831
+ groupFormId
37832
+ }) => {
37812
37833
  return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect, {
37813
37834
  size: "medium",
37814
37835
  input: input,
@@ -37845,7 +37866,9 @@ const inputTypeComponent$1 = {
37845
37866
  const selectedValue = data.find(v => v.value === ev);
37846
37867
  if (address && selectedValue) {
37847
37868
  dot__default["default"].str(address, selectedValue.label, addressData);
37848
- setAddress(_objectSpread2({}, addressData));
37869
+ setAddress({
37870
+ ...addressData
37871
+ });
37849
37872
  }
37850
37873
  }
37851
37874
  },
@@ -37854,11 +37877,10 @@ const inputTypeComponent$1 = {
37854
37877
  address: true
37855
37878
  });
37856
37879
  },
37857
- tag: _ref53 => {
37858
- let {
37859
- value,
37860
- repeatLabel
37861
- } = _ref53;
37880
+ tag: ({
37881
+ value,
37882
+ repeatLabel
37883
+ }) => {
37862
37884
  return /*#__PURE__*/jsxRuntime.jsx(TagInput, {
37863
37885
  size: "large",
37864
37886
  allowClear: true,
@@ -37866,28 +37888,26 @@ const inputTypeComponent$1 = {
37866
37888
  newPlaceholder: repeatLabel
37867
37889
  });
37868
37890
  },
37869
- modal: (_ref54, _ref55) => {
37870
- let {
37871
- call,
37872
- automaticallyLink,
37873
- name,
37874
- inputName,
37875
- props,
37876
- formsValue,
37877
- allFormsValue,
37878
- onNewSetValue,
37879
- repeatValues,
37880
- repeatIndex,
37881
- value,
37882
- modalTitle,
37883
- totalInputs,
37884
- shownInputs,
37885
- allowDupplicates
37886
- } = _ref54;
37887
- let {
37888
- form,
37889
- add
37890
- } = _ref55;
37891
+ modal: ({
37892
+ call,
37893
+ automaticallyLink,
37894
+ name,
37895
+ inputName,
37896
+ props,
37897
+ formsValue,
37898
+ allFormsValue,
37899
+ onNewSetValue,
37900
+ repeatValues,
37901
+ repeatIndex,
37902
+ value,
37903
+ modalTitle,
37904
+ totalInputs,
37905
+ shownInputs,
37906
+ allowDupplicates
37907
+ }, {
37908
+ form,
37909
+ add
37910
+ }) => {
37891
37911
  return /*#__PURE__*/jsxRuntime.jsx(AjaxModal, {
37892
37912
  allowClear: true,
37893
37913
  call: call,
@@ -37910,44 +37930,40 @@ const inputTypeComponent$1 = {
37910
37930
  allowDupplicates: allowDupplicates
37911
37931
  });
37912
37932
  },
37913
- dataLink: (_ref56, _ref57) => {
37914
- var _input$meta12, _input$meta15, _input$meta16, _formsValue$meta5, _input$meta18;
37915
- let {
37916
- setValues,
37917
- name,
37918
- onValuesChange,
37919
- changeLinking,
37920
- formsValue,
37921
- input,
37922
- call,
37923
- automaticallyLink,
37924
- inputName,
37925
- props,
37926
- onNewSetValue,
37927
- multiple,
37928
- updateOptions,
37929
- repeatValues,
37930
- repeatIndex,
37931
- value,
37932
- unique,
37933
- address,
37934
- addressData = {},
37935
- getFromLinking
37936
- } = _ref56;
37937
- let {
37938
- form,
37939
- forms,
37940
- setAddress,
37941
- changeInputMeta,
37942
- inputMeta,
37943
- meta,
37944
- isHighlighted,
37945
- groupFormId
37946
- } = _ref57;
37947
- if ((input === null || input === void 0 || (_input$meta12 = input.meta) === null || _input$meta12 === void 0 || (_input$meta12 = _input$meta12.optionsView) === null || _input$meta12 === void 0 ? void 0 : _input$meta12.editInputType) === "ajaxSelect") {
37948
- var _formsValue$groupForm3, _input$meta13, _input$meta14;
37949
- const currentValue = groupFormId ? (_formsValue$groupForm3 = formsValue[groupFormId]) === null || _formsValue$groupForm3 === void 0 ? void 0 : _formsValue$groupForm3[name] : formsValue[name];
37950
- (input === null || input === void 0 || (_input$meta13 = input.meta) === null || _input$meta13 === void 0 || (_input$meta13 = _input$meta13.optionsView) === null || _input$meta13 === void 0 ? void 0 : _input$meta13.call) || (input === null || input === void 0 || (_input$meta14 = input.meta) === null || _input$meta14 === void 0 ? void 0 : _input$meta14.call) || "default::list()::::";
37933
+ dataLink: ({
37934
+ setValues,
37935
+ name,
37936
+ onValuesChange,
37937
+ changeLinking,
37938
+ formsValue,
37939
+ input,
37940
+ call,
37941
+ automaticallyLink,
37942
+ inputName,
37943
+ props,
37944
+ onNewSetValue,
37945
+ multiple,
37946
+ updateOptions,
37947
+ repeatValues,
37948
+ repeatIndex,
37949
+ value,
37950
+ unique,
37951
+ address,
37952
+ addressData = {},
37953
+ getFromLinking
37954
+ }, {
37955
+ form,
37956
+ forms,
37957
+ setAddress,
37958
+ changeInputMeta,
37959
+ inputMeta,
37960
+ meta,
37961
+ isHighlighted,
37962
+ groupFormId
37963
+ }) => {
37964
+ if (input?.meta?.optionsView?.editInputType === "ajaxSelect") {
37965
+ const currentValue = groupFormId ? formsValue[groupFormId]?.[name] : formsValue[name];
37966
+ input?.meta?.optionsView?.call || input?.meta?.call || "default::list()::::";
37951
37967
  return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect$1, {
37952
37968
  size: "medium",
37953
37969
  input: input,
@@ -37984,7 +38000,9 @@ const inputTypeComponent$1 = {
37984
38000
  const selectedValue = data.find(v => v.value === ev);
37985
38001
  if (address && selectedValue) {
37986
38002
  dot__default["default"].str(address, selectedValue.label, addressData);
37987
- setAddress(_objectSpread2({}, addressData));
38003
+ setAddress({
38004
+ ...addressData
38005
+ });
37988
38006
  }
37989
38007
  }
37990
38008
  },
@@ -37994,93 +38012,138 @@ const inputTypeComponent$1 = {
37994
38012
  isDataLink: true
37995
38013
  });
37996
38014
  }
37997
- const isSingle = (input === null || input === void 0 || (_input$meta15 = input.meta) === null || _input$meta15 === void 0 ? void 0 : _input$meta15.maxRepeat) === 1;
37998
- 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));
38015
+ const isSingle = input?.meta?.maxRepeat === 1;
38016
+ const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [{
38017
+ ...(formsValue[groupFormId] || {})[name]
38018
+ }] : [] : getArray((formsValue[groupFormId] || {})[name] || []).map(v => ({
38019
+ ...v
38020
+ })) : isSingle ? formsValue[name] ? [{
38021
+ ...formsValue[name]
38022
+ }] : [] : (formsValue[name] || []).map(v => ({
38023
+ ...v
38024
+ }));
37999
38025
  const onUpdate = (editData, i) => {
38000
- const val = _objectSpread2(_objectSpread2({}, formData[i]), editData);
38026
+ const val = {
38027
+ ...formData[i],
38028
+ ...editData
38029
+ };
38001
38030
  const _val = isSingle ? {
38002
38031
  [name]: val
38003
38032
  } : {
38004
- [name]: formData === null || formData === void 0 ? void 0 : formData.map((d, j) => i === j ? val : d)
38033
+ [name]: formData?.map((d, j) => i === j ? val : d)
38005
38034
  };
38006
38035
  if (groupFormId) {
38007
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
38008
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
38009
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
38036
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
38037
+ const _newData = {
38038
+ ..._defaultData,
38039
+ ..._val
38040
+ };
38041
+ onValuesChange(_newData, {
38042
+ ...formsValue,
38010
38043
  [groupFormId]: _newData
38011
- }));
38012
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
38013
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
38044
+ });
38045
+ form?.setFieldValue(groupFormId, _newData);
38046
+ setValues({
38047
+ ...formsValue,
38014
38048
  [groupFormId]: _newData
38015
- }));
38049
+ });
38016
38050
  return;
38017
38051
  }
38018
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
38019
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
38020
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
38052
+ onValuesChange(_val, {
38053
+ ...formsValue,
38054
+ ..._val
38055
+ });
38056
+ form?.setFieldValue(name, _val[name]);
38057
+ setValues({
38058
+ ...formsValue,
38059
+ ..._val
38060
+ });
38021
38061
  };
38022
- if (input !== null && input !== void 0 && (_input$meta16 = input.meta) !== null && _input$meta16 !== void 0 && _input$meta16.flat) {
38023
- var _formsValue$meta4, _input$meta17;
38062
+ if (input?.meta?.flat) {
38024
38063
  return /*#__PURE__*/jsxRuntime.jsx(DataLinkFlat, {
38025
38064
  form: input,
38026
38065
  changeLinking: changeLinking,
38027
38066
  onUpdate: onUpdate,
38028
38067
  isHighlighted: isHighlighted,
38029
38068
  formsValue: formsValue,
38030
- values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
38069
+ values: groupFormId ? {
38070
+ ...(formsValue[groupFormId] || {}),
38031
38071
  meta: {
38032
- inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta4 = formsValue.meta) === null || _formsValue$meta4 === void 0 ? void 0 : _formsValue$meta4.inputs) || {})[groupFormId]
38072
+ inputs: (formsValue?.meta?.inputs || {})[groupFormId]
38033
38073
  }
38034
- }) : formsValue,
38074
+ } : formsValue,
38035
38075
  name: name,
38036
38076
  groupFormId: groupFormId,
38037
- maxRepeat: input === null || input === void 0 || (_input$meta17 = input.meta) === null || _input$meta17 === void 0 ? void 0 : _input$meta17.maxRepeat,
38038
- remove: _ref58 => {
38039
- let {
38040
- key
38041
- } = _ref58;
38077
+ maxRepeat: input?.meta?.maxRepeat,
38078
+ remove: ({
38079
+ key
38080
+ }) => {
38042
38081
  const _val = isSingle ? {
38043
38082
  [name]: null
38044
38083
  } : {
38045
38084
  [name]: formData.filter((v, i) => i !== key)
38046
38085
  };
38047
38086
  if (groupFormId) {
38048
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
38049
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
38050
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
38087
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
38088
+ const _newData = {
38089
+ ..._defaultData,
38090
+ ..._val
38091
+ };
38092
+ onValuesChange(_newData, {
38093
+ ...formsValue,
38051
38094
  [groupFormId]: _newData
38052
- }));
38053
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
38054
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
38095
+ });
38096
+ form?.setFieldValue(groupFormId, _newData);
38097
+ setValues({
38098
+ ...formsValue,
38055
38099
  [groupFormId]: _newData
38056
- }));
38100
+ });
38057
38101
  return;
38058
38102
  }
38059
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
38060
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
38061
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
38103
+ onValuesChange(_val, {
38104
+ ...formsValue,
38105
+ ..._val
38106
+ });
38107
+ form?.setFieldValue(name, _val[name]);
38108
+ setValues({
38109
+ ...formsValue,
38110
+ ..._val
38111
+ });
38062
38112
  },
38063
38113
  add: val => {
38064
38114
  const _val = isSingle ? {
38065
38115
  [name]: val
38066
38116
  } : {
38067
- [name]: [...formData, _objectSpread2({}, val)]
38117
+ [name]: [...formData, {
38118
+ ...val
38119
+ }]
38068
38120
  };
38069
38121
  if (groupFormId) {
38070
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
38071
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
38072
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
38073
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
38122
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
38123
+ const _newData = {
38124
+ ..._defaultData,
38125
+ ..._val
38126
+ };
38127
+ form?.setFieldValue(groupFormId, _newData);
38128
+ onValuesChange(_newData, {
38129
+ ...formsValue,
38074
38130
  [groupFormId]: _newData
38075
- }));
38076
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
38131
+ });
38132
+ setValues({
38133
+ ...formsValue,
38077
38134
  [groupFormId]: _newData
38078
- }));
38135
+ });
38079
38136
  return;
38080
38137
  }
38081
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
38082
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
38083
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
38138
+ form?.setFieldValue(name, _val[name]);
38139
+ onValuesChange(_val, {
38140
+ ...formsValue,
38141
+ ..._val
38142
+ });
38143
+ setValues({
38144
+ ...formsValue,
38145
+ ..._val
38146
+ });
38084
38147
  },
38085
38148
  k: name,
38086
38149
  formData: formData
@@ -38092,79 +38155,101 @@ const inputTypeComponent$1 = {
38092
38155
  onUpdate: onUpdate,
38093
38156
  isHighlighted: isHighlighted,
38094
38157
  formsValue: formsValue,
38095
- values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
38158
+ values: groupFormId ? {
38159
+ ...(formsValue[groupFormId] || {}),
38096
38160
  meta: {
38097
- inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta5 = formsValue.meta) === null || _formsValue$meta5 === void 0 ? void 0 : _formsValue$meta5.inputs) || {})[groupFormId]
38161
+ inputs: (formsValue?.meta?.inputs || {})[groupFormId]
38098
38162
  }
38099
- }) : formsValue,
38163
+ } : formsValue,
38100
38164
  name: name,
38101
38165
  groupFormId: groupFormId,
38102
- maxRepeat: input === null || input === void 0 || (_input$meta18 = input.meta) === null || _input$meta18 === void 0 ? void 0 : _input$meta18.maxRepeat,
38103
- remove: _ref59 => {
38104
- let {
38105
- key
38106
- } = _ref59;
38166
+ maxRepeat: input?.meta?.maxRepeat,
38167
+ remove: ({
38168
+ key
38169
+ }) => {
38107
38170
  const _val = isSingle ? {
38108
38171
  [name]: null
38109
38172
  } : {
38110
38173
  [name]: formData.filter((v, i) => i !== key)
38111
38174
  };
38112
38175
  if (groupFormId) {
38113
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
38114
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
38115
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
38176
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
38177
+ const _newData = {
38178
+ ..._defaultData,
38179
+ ..._val
38180
+ };
38181
+ onValuesChange(_newData, {
38182
+ ...formsValue,
38116
38183
  [groupFormId]: _newData
38117
- }));
38118
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
38119
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
38184
+ });
38185
+ form?.setFieldValue(groupFormId, _newData);
38186
+ setValues({
38187
+ ...formsValue,
38120
38188
  [groupFormId]: _newData
38121
- }));
38189
+ });
38122
38190
  return;
38123
38191
  }
38124
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
38125
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
38126
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
38192
+ onValuesChange(_val, {
38193
+ ...formsValue,
38194
+ ..._val
38195
+ });
38196
+ form?.setFieldValue(name, _val[name]);
38197
+ setValues({
38198
+ ...formsValue,
38199
+ ..._val
38200
+ });
38127
38201
  },
38128
38202
  add: val => {
38129
38203
  const _val = isSingle ? {
38130
38204
  [name]: val
38131
38205
  } : {
38132
- [name]: [...formData, _objectSpread2({}, val)]
38206
+ [name]: [...formData, {
38207
+ ...val
38208
+ }]
38133
38209
  };
38134
38210
  if (groupFormId) {
38135
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
38136
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
38137
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
38138
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
38211
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
38212
+ const _newData = {
38213
+ ..._defaultData,
38214
+ ..._val
38215
+ };
38216
+ form?.setFieldValue(groupFormId, _newData);
38217
+ onValuesChange(_newData, {
38218
+ ...formsValue,
38139
38219
  [groupFormId]: _newData
38140
- }));
38141
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
38220
+ });
38221
+ setValues({
38222
+ ...formsValue,
38142
38223
  [groupFormId]: _newData
38143
- }));
38224
+ });
38144
38225
  return;
38145
38226
  }
38146
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
38147
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
38148
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
38227
+ form?.setFieldValue(name, _val[name]);
38228
+ onValuesChange(_val, {
38229
+ ...formsValue,
38230
+ ..._val
38231
+ });
38232
+ setValues({
38233
+ ...formsValue,
38234
+ ..._val
38235
+ });
38149
38236
  },
38150
38237
  k: name,
38151
38238
  formData: formData
38152
38239
  });
38153
38240
  },
38154
- dataLinkGroup: (_ref60, _ref61) => {
38155
- let {
38156
- setValues,
38157
- name,
38158
- onValuesChange,
38159
- changeLinking,
38160
- formsValue,
38161
- input
38162
- } = _ref60;
38163
- let {
38164
- form,
38165
- groupFormId,
38166
- isHighlighted
38167
- } = _ref61;
38241
+ dataLinkGroup: ({
38242
+ setValues,
38243
+ name,
38244
+ onValuesChange,
38245
+ changeLinking,
38246
+ formsValue,
38247
+ input
38248
+ }, {
38249
+ form,
38250
+ groupFormId,
38251
+ isHighlighted
38252
+ }) => {
38168
38253
  return renderDataLinkGroup({
38169
38254
  input,
38170
38255
  name,
@@ -38177,41 +38262,51 @@ const inputTypeComponent$1 = {
38177
38262
  isHighlighted
38178
38263
  });
38179
38264
  },
38180
- groupCheckbox: (_ref62, _ref63) => {
38181
- let {
38182
- setValues,
38183
- name,
38184
- onValuesChange,
38185
- formsValue,
38186
- input
38187
- } = _ref62;
38188
- let {
38189
- form,
38190
- groupFormId,
38191
- isHighlighted
38192
- } = _ref63;
38265
+ groupCheckbox: ({
38266
+ setValues,
38267
+ name,
38268
+ onValuesChange,
38269
+ formsValue,
38270
+ input
38271
+ }, {
38272
+ form,
38273
+ groupFormId,
38274
+ isHighlighted
38275
+ }) => {
38193
38276
  const formData = groupFormId ? (formsValue[groupFormId] || {})[name] || [] : formsValue[name] || [];
38194
38277
  const onUpdate = (val, key) => {
38195
38278
  const _val = {
38196
- [name]: _objectSpread2(_objectSpread2({}, formData), {}, {
38279
+ [name]: {
38280
+ ...formData,
38197
38281
  [key]: val
38198
- })
38282
+ }
38199
38283
  };
38200
38284
  if (groupFormId) {
38201
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
38202
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
38203
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
38285
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
38286
+ const _newData = {
38287
+ ..._defaultData,
38288
+ ..._val
38289
+ };
38290
+ onValuesChange(_newData, {
38291
+ ...formsValue,
38204
38292
  [groupFormId]: _newData
38205
- }));
38206
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
38207
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
38293
+ });
38294
+ form?.setFieldValue(groupFormId, _newData);
38295
+ setValues({
38296
+ ...formsValue,
38208
38297
  [groupFormId]: _newData
38209
- }));
38298
+ });
38210
38299
  return;
38211
38300
  }
38212
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
38213
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
38214
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
38301
+ onValuesChange(_val, {
38302
+ ...formsValue,
38303
+ ..._val
38304
+ });
38305
+ form?.setFieldValue(name, _val[name]);
38306
+ setValues({
38307
+ ...formsValue,
38308
+ ..._val
38309
+ });
38215
38310
  };
38216
38311
  return /*#__PURE__*/jsxRuntime.jsx(GroupCheckbox, {
38217
38312
  form: input,
@@ -38220,91 +38315,96 @@ const inputTypeComponent$1 = {
38220
38315
  isHighlighted: isHighlighted
38221
38316
  });
38222
38317
  },
38223
- website: (_ref64, _ref65) => {
38224
- let {
38225
- name,
38226
- inputName,
38227
- props,
38228
- value,
38229
- repeatIndex,
38230
- repeatValues,
38231
- formsValue
38232
- } = _ref64;
38233
- let {
38234
- form,
38235
- isHighlighted,
38236
- inputMeta = {},
38237
- t
38238
- } = _ref65;
38239
- return /*#__PURE__*/jsxRuntime.jsx(Website, _objectSpread2(_objectSpread2({
38318
+ website: ({
38319
+ name,
38320
+ inputName,
38321
+ props,
38322
+ value,
38323
+ repeatIndex,
38324
+ repeatValues,
38325
+ formsValue
38326
+ }, {
38327
+ form,
38328
+ isHighlighted,
38329
+ inputMeta = {},
38330
+ t
38331
+ }) => {
38332
+ return /*#__PURE__*/jsxRuntime.jsx(Website, {
38240
38333
  size: "large",
38241
38334
  allowClear: true,
38242
- initialValue: value
38243
- }, props), {}, {
38335
+ initialValue: value,
38336
+ ...props,
38244
38337
  onChange: val => updateFormValues$1(repeatIndex, repeatValues, inputName, val, formsValue, name, form),
38245
38338
  className: formatClassname([isHighlighted && "highlighted-cont"]),
38246
38339
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
38247
38340
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || "www.example.com"
38248
- }));
38341
+ });
38249
38342
  },
38250
- group: (_ref66, _ref67) => {
38251
- let {
38252
- props,
38253
- groupInputs,
38254
- formsValue
38255
- } = _ref66;
38256
- let {
38257
- inputMeta,
38258
- isHighlighted
38259
- } = _ref67;
38260
- return /*#__PURE__*/jsxRuntime.jsx(GroupInput, _objectSpread2({
38343
+ group: ({
38344
+ props,
38345
+ groupInputs,
38346
+ formsValue
38347
+ }, {
38348
+ inputMeta,
38349
+ isHighlighted
38350
+ }) => {
38351
+ return /*#__PURE__*/jsxRuntime.jsx(GroupInput, {
38261
38352
  formsValue: formsValue,
38262
38353
  isHighlighted: isHighlighted,
38263
38354
  groupInputs: groupInputs,
38264
- inputMeta: inputMeta
38265
- }, props));
38355
+ inputMeta: inputMeta,
38356
+ ...props
38357
+ });
38266
38358
  },
38267
- groupInputs: (_ref68, _ref69) => {
38268
- let {
38269
- props,
38270
- groupInputs,
38271
- formsValue
38272
- } = _ref68;
38273
- let {
38274
- inputMeta,
38275
- isHighlighted
38276
- } = _ref69;
38277
- return /*#__PURE__*/jsxRuntime.jsx(GroupInput, _objectSpread2({
38359
+ groupInputs: ({
38360
+ props,
38361
+ groupInputs,
38362
+ formsValue
38363
+ }, {
38364
+ inputMeta,
38365
+ isHighlighted
38366
+ }) => {
38367
+ return /*#__PURE__*/jsxRuntime.jsx(GroupInput, {
38278
38368
  formsValue: formsValue,
38279
38369
  isHighlighted: isHighlighted,
38280
38370
  groupInputs: groupInputs,
38281
- inputMeta: inputMeta
38282
- }, props));
38371
+ inputMeta: inputMeta,
38372
+ ...props
38373
+ });
38283
38374
  },
38284
- smartHelp: (_ref70, _ref71) => {
38375
+ smartHelp: ({
38376
+ name,
38377
+ inputName,
38378
+ props,
38379
+ value,
38380
+ repeatIndex,
38381
+ repeatValues,
38382
+ formsValue
38383
+ }, {
38384
+ form,
38385
+ isHighlighted,
38386
+ inputMeta = {},
38387
+ t
38388
+ }) => {
38285
38389
  return /*#__PURE__*/jsxRuntime.jsx(Smart, {});
38286
38390
  }
38287
38391
  };
38288
38392
  const filterForm = (f, d) => {
38289
38393
  return f && (f.showFormIf ? showHideForm(f, d) : true);
38290
38394
  };
38291
- const checkFormHasSubsections = function () {
38292
- let f = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
38293
- return Object.keys(f).map(key => propHasValue$1(f[key].subSection)).includes(true);
38294
- };
38395
+ const checkFormHasSubsections = (f = {}) => Object.keys(f).map(key => propHasValue$1(f[key].subSection)).includes(true);
38295
38396
  const mapFormGroup = (f, d) => Object.keys(f).map(key => {
38296
- const _ref72 = f[key] || {},
38297
- {
38298
- label,
38299
- description = "",
38300
- excludeFromEdit,
38301
- showFormIf,
38302
- icon = "",
38303
- position = 0,
38304
- template,
38305
- formClass
38306
- } = _ref72,
38307
- fc = _objectWithoutProperties(_ref72, _excluded2$1);
38397
+ const {
38398
+ label,
38399
+ description = "",
38400
+ excludeFromEdit,
38401
+ showFormIf,
38402
+ icon = "",
38403
+ position = 0,
38404
+ template,
38405
+ formClass,
38406
+ ...fc
38407
+ } = f[key] || {};
38308
38408
  const fConf = {
38309
38409
  id: key,
38310
38410
  label,
@@ -38363,14 +38463,11 @@ const groupSubForms = (fConf, d) => {
38363
38463
  return f;
38364
38464
  }, {});
38365
38465
  };
38366
- const inputIsEmpty = function () {
38367
- let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
38368
- let values = arguments.length > 1 ? arguments[1] : undefined;
38369
- let inputMeta = arguments.length > 2 ? arguments[2] : undefined;
38370
- if (inputMeta !== null && inputMeta !== void 0 && inputMeta.notApplicable || inputMeta !== null && inputMeta !== void 0 && inputMeta.notAvailable) {
38466
+ const inputIsEmpty = (input = {}, values, inputMeta) => {
38467
+ if (inputMeta?.notApplicable || inputMeta?.notAvailable) {
38371
38468
  return false;
38372
38469
  }
38373
- if ((input === null || input === void 0 ? void 0 : input.type) === "groupInputs") {
38470
+ if (input?.type === "groupInputs") {
38374
38471
  return true;
38375
38472
  }
38376
38473
  const value = values[input.dataId];
@@ -38382,28 +38479,26 @@ const inputIsEmpty = function () {
38382
38479
  }
38383
38480
  return !value;
38384
38481
  };
38385
- const GetFormItem$1 = _ref73 => {
38386
- var _inputMeta$reviews, _input$meta19, _input$meta20, _rules$find, _input$meta21;
38387
- let {
38388
- highlightMandatory,
38389
- inputData,
38390
- inputId,
38391
- input,
38392
- values,
38393
- MainForm,
38394
- options,
38395
- plainForms,
38396
- setValues,
38397
- setAddress,
38398
- i,
38399
- inputKey,
38400
- onValuesChange = () => {},
38401
- setLoading = () => {},
38402
- inputMeta = {},
38403
- changeInputMeta = () => {},
38404
- changeLinking = () => {},
38405
- namespace
38406
- } = _ref73;
38482
+ const GetFormItem$1 = ({
38483
+ highlightMandatory,
38484
+ inputData,
38485
+ inputId,
38486
+ input,
38487
+ values,
38488
+ MainForm,
38489
+ options,
38490
+ plainForms,
38491
+ setValues,
38492
+ setAddress,
38493
+ i,
38494
+ inputKey,
38495
+ onValuesChange = () => {},
38496
+ setLoading = () => {},
38497
+ inputMeta = {},
38498
+ changeInputMeta = () => {},
38499
+ changeLinking = () => {},
38500
+ namespace
38501
+ }) => {
38407
38502
  const {
38408
38503
  t,
38409
38504
  user,
@@ -38418,42 +38513,44 @@ const GetFormItem$1 = _ref73 => {
38418
38513
  staticWidth,
38419
38514
  fullWidth
38420
38515
  } = useEditContext();
38421
- const lastReview = ((inputMeta === null || inputMeta === void 0 ? void 0 : inputMeta.reviews) || [])[((inputMeta === null || inputMeta === void 0 || (_inputMeta$reviews = inputMeta.reviews) === null || _inputMeta$reviews === void 0 ? void 0 : _inputMeta$reviews.length) || 0) - 1];
38516
+ const lastReview = (inputMeta?.reviews || [])[(inputMeta?.reviews?.length || 0) - 1];
38422
38517
  const [isShown, setIsShown] = React.useState(!!inputData.commentValue);
38423
38518
  const inputLabel = getInputLabel$1(input, values);
38424
38519
  const onClickReviewSuccess = () => {
38425
38520
  if (!isReview) {
38426
38521
  return;
38427
38522
  }
38428
- const reviewSuccess = lastReview === null || lastReview === void 0 ? void 0 : lastReview.reviewSuccess;
38523
+ const reviewSuccess = lastReview?.reviewSuccess;
38429
38524
  changeInputMeta({
38430
38525
  key: inputId,
38431
38526
  type: input.type,
38432
- value: _objectSpread2(_objectSpread2({}, inputMeta), {}, {
38527
+ value: {
38528
+ ...inputMeta,
38433
38529
  reviews: reviewSuccess ? (inputMeta.reviews || []).filter(v => v.createdAt !== lastReview.createdAt) : [...(inputMeta.reviews || []), {
38434
38530
  reviewer: user,
38435
38531
  createdAt: new Date().toISOString(),
38436
38532
  reviewSuccess: true
38437
38533
  }]
38438
- })
38534
+ }
38439
38535
  });
38440
38536
  };
38441
38537
  const onClickReviewError = () => {
38442
38538
  if (!isReview) {
38443
38539
  return;
38444
38540
  }
38445
- const reviewError = lastReview === null || lastReview === void 0 ? void 0 : lastReview.reviewError;
38541
+ const reviewError = lastReview?.reviewError;
38446
38542
  changeInputMeta({
38447
38543
  key: inputId,
38448
38544
  type: input.type,
38449
- value: _objectSpread2(_objectSpread2({}, inputMeta), {}, {
38545
+ value: {
38546
+ ...inputMeta,
38450
38547
  reviews: reviewError ? (inputMeta.reviews || []).filter(v => v.createdAt !== lastReview.createdAt) : [...(inputMeta.reviews || []), {
38451
38548
  reviewer: user,
38452
38549
  createdAt: new Date().toISOString(),
38453
38550
  reviewError: true,
38454
38551
  comment: ""
38455
38552
  }]
38456
- })
38553
+ }
38457
38554
  });
38458
38555
  };
38459
38556
  switch (input.type) {
@@ -38467,12 +38564,12 @@ const GetFormItem$1 = _ref73 => {
38467
38564
  case "header":
38468
38565
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
38469
38566
  className: "daf-title with-subtitle",
38470
- style: input === null || input === void 0 || (_input$meta19 = input.meta) === null || _input$meta19 === void 0 ? void 0 : _input$meta19.style,
38567
+ style: input?.meta?.style,
38471
38568
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
38472
38569
  className: "flex",
38473
38570
  children: [/*#__PURE__*/jsxRuntime.jsx("h1", {
38474
38571
  children: ReactHtmlParser__default["default"](getLabel$1(input.label, values))
38475
- }), !!input.description || input !== null && input !== void 0 && (_input$meta20 = input.meta) !== null && _input$meta20 !== void 0 && _input$meta20.isEvaluation ? /*#__PURE__*/jsxRuntime.jsx(antd.Popover, {
38572
+ }), !!input.description || input?.meta?.isEvaluation ? /*#__PURE__*/jsxRuntime.jsx(antd.Popover, {
38476
38573
  content: /*#__PURE__*/jsxRuntime.jsx("div", {
38477
38574
  className: "tooltip-popover-cont",
38478
38575
  children: ReactHtmlParser__default["default"](input.description)
@@ -38499,7 +38596,7 @@ const GetFormItem$1 = _ref73 => {
38499
38596
  const specialCharsRule = rules.find(r => r.type === "specialCharacters");
38500
38597
 
38501
38598
  // eslint-disable-next-line no-case-declarations
38502
- let maxRule = (_rules$find = rules.find(rule => rule.max)) === null || _rules$find === void 0 ? void 0 : _rules$find.max;
38599
+ let maxRule = rules.find(rule => rule.max)?.max;
38503
38600
  if (!maxRule && input.type === "textarea") {
38504
38601
  maxRule = MAX_TEXT_AREA_LENGTH;
38505
38602
  }
@@ -38512,30 +38609,27 @@ const GetFormItem$1 = _ref73 => {
38512
38609
  message: requiredRule.message || ""
38513
38610
  });
38514
38611
  }
38515
- const isHighlighted = highlightMandatory && (input === null || input === void 0 || (_input$meta21 = input.meta) === null || _input$meta21 === void 0 ? void 0 : _input$meta21.mandatory) && inputIsEmpty(input, values, inputMeta);
38612
+ const isHighlighted = highlightMandatory && input?.meta?.mandatory && inputIsEmpty(input, values, inputMeta);
38516
38613
  if (requiredRule || specialCharsRule) {
38517
38614
  if (input.type === "groupInputs") {
38518
38615
  rules = rules.map(r => {
38519
38616
  if (r.required) {
38520
- return _ref74 => {
38521
- let {
38522
- getFieldValue
38523
- } = _ref74;
38524
- return {
38525
- validator() {
38526
- if (inputMeta.notAvailable || inputMeta.notApplicable) {
38527
- return Promise.resolve();
38528
- }
38529
- const keys = Object.keys(input.inputs);
38530
- for (let i = 0; i < keys.length; i++) {
38531
- if (typeof getFieldValue(keys[i]) === "undefined" || getFieldValue(keys[i]) === null) {
38532
- return Promise.reject(r.message);
38533
- }
38534
- }
38617
+ return ({
38618
+ getFieldValue
38619
+ }) => ({
38620
+ validator() {
38621
+ if (inputMeta.notAvailable || inputMeta.notApplicable) {
38535
38622
  return Promise.resolve();
38536
38623
  }
38537
- };
38538
- };
38624
+ const keys = Object.keys(input.inputs);
38625
+ for (let i = 0; i < keys.length; i++) {
38626
+ if (typeof getFieldValue(keys[i]) === "undefined" || getFieldValue(keys[i]) === null) {
38627
+ return Promise.reject(r.message);
38628
+ }
38629
+ }
38630
+ return Promise.resolve();
38631
+ }
38632
+ });
38539
38633
  }
38540
38634
  return r;
38541
38635
  });
@@ -38573,13 +38667,12 @@ const GetFormItem$1 = _ref73 => {
38573
38667
  }
38574
38668
  }
38575
38669
  if (input && typeof input === "object") {
38576
- var _input$meta22, _input$meta23, _input$meta24, _input$meta25, _values$parent, _input$meta26, _input$meta27, _inputData$value, _input$meta28, _input$meta29, _inputData$commentVal, _lastReview$comment, _lastReview$reviewer, _lastReview$reviewer2;
38577
38670
  // check if input is valid
38578
38671
  const hideComment = namespace === "project-readiness";
38579
38672
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
38580
38673
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
38581
38674
  className: "flex-row input-cont",
38582
- children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
38675
+ children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
38583
38676
  extra: /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
38584
38677
  children: !noActionsInputs.includes(input.type) ? /*#__PURE__*/jsxRuntime.jsxs("div", {
38585
38678
  className: formatClassname(["ml-4 input-actions"]),
@@ -38589,7 +38682,7 @@ const GetFormItem$1 = _ref73 => {
38589
38682
  title: t("Add review note"),
38590
38683
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
38591
38684
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
38592
- className: formatClassname(["review-btn review-error-btn", (lastReview === null || lastReview === void 0 ? void 0 : lastReview.reviewError) && "primary"]),
38685
+ className: formatClassname(["review-btn review-error-btn", lastReview?.reviewError && "primary"]),
38593
38686
  type: "link",
38594
38687
  onClick: onClickReviewError,
38595
38688
  children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
@@ -38605,7 +38698,7 @@ const GetFormItem$1 = _ref73 => {
38605
38698
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
38606
38699
  type: "link",
38607
38700
  onClick: onClickReviewSuccess,
38608
- className: formatClassname(["review-btn review-success-btn", (lastReview === null || lastReview === void 0 ? void 0 : lastReview.reviewSuccess) && "primary"]),
38701
+ className: formatClassname(["review-btn review-success-btn", lastReview?.reviewSuccess && "primary"]),
38609
38702
  children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
38610
38703
  name: "CheckSquare",
38611
38704
  width: 16,
@@ -38642,7 +38735,7 @@ const GetFormItem$1 = _ref73 => {
38642
38735
  }
38643
38736
  });
38644
38737
  },
38645
- disabled: !((_input$meta22 = input.meta) !== null && _input$meta22 !== void 0 && _input$meta22.notApplicable),
38738
+ disabled: !input.meta?.notApplicable,
38646
38739
  children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
38647
38740
  name: "NotApplicable",
38648
38741
  width: 16,
@@ -38656,7 +38749,7 @@ const GetFormItem$1 = _ref73 => {
38656
38749
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
38657
38750
  className: formatClassname(["default p-0", inputMeta.notAvailable && "primary"]),
38658
38751
  type: "link",
38659
- disabled: !((_input$meta23 = input.meta) !== null && _input$meta23 !== void 0 && _input$meta23.notAvailable),
38752
+ disabled: !input.meta?.notAvailable,
38660
38753
  onClick: () => {
38661
38754
  const value = getDefaultInputValue(input);
38662
38755
  MainForm.setFields([{
@@ -38688,14 +38781,14 @@ const GetFormItem$1 = _ref73 => {
38688
38781
  }), !hideComment ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
38689
38782
  title: t("Add comment"),
38690
38783
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
38691
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
38784
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
38692
38785
  type: "link",
38693
- disabled: !((_input$meta24 = input.meta) !== null && _input$meta24 !== void 0 && _input$meta24.comment)
38694
- }, !isShown ? {
38695
- className: "default p-0"
38696
- } : {
38697
- className: "p-0 primary"
38698
- }), {}, {
38786
+ disabled: !input.meta?.comment,
38787
+ ...(!isShown ? {
38788
+ className: "default p-0"
38789
+ } : {
38790
+ className: "p-0 primary"
38791
+ }),
38699
38792
  onClick: () => {
38700
38793
  if (inputMeta.comment !== undefined && inputMeta.comment !== null) {
38701
38794
  return;
@@ -38714,7 +38807,7 @@ const GetFormItem$1 = _ref73 => {
38714
38807
  width: 16,
38715
38808
  height: 16
38716
38809
  })
38717
- }))
38810
+ })
38718
38811
  })
38719
38812
  }) : /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
38720
38813
  title: t("Project Readiness"),
@@ -38733,34 +38826,36 @@ const GetFormItem$1 = _ref73 => {
38733
38826
  }) : null]
38734
38827
  }) : null
38735
38828
  }),
38736
- initialValue: inputMeta === null || inputMeta === void 0 ? void 0 : inputMeta.defaultValue
38737
- }, inputOnBlur.includes(input.type) ? {
38738
- trigger: "onBlur"
38739
- } : {}), ["total100", "group"].includes(input.type) ? {} : {
38740
- name: inputId,
38741
- fieldKey: inputId,
38742
- initialValue: inputData.value
38743
- }), ["upload"].includes(input.type) ? {
38744
- valuePropName: "fileList",
38745
- getValueFromEvent: e => {
38746
- if (Array.isArray(e)) {
38747
- return e;
38748
- }
38749
- return e && e.fileList && e.fileList.map(f => {
38750
- if (f.response) {
38751
- return f.response;
38829
+ initialValue: inputMeta?.defaultValue,
38830
+ ...(inputOnBlur.includes(input.type) ? {
38831
+ trigger: "onBlur"
38832
+ } : {}),
38833
+ ...(["total100", "group"].includes(input.type) ? {} : {
38834
+ name: inputId,
38835
+ fieldKey: inputId,
38836
+ initialValue: inputData.value
38837
+ }),
38838
+ ...(["upload"].includes(input.type) ? {
38839
+ valuePropName: "fileList",
38840
+ getValueFromEvent: e => {
38841
+ if (Array.isArray(e)) {
38842
+ return e;
38752
38843
  }
38753
- return f;
38754
- });
38755
- }
38756
- } : {}), {}, {
38757
- className: formatClassname(["i-".concat(input.type, " flex-1"), input.comment && "with-comment", maxRule && "with-max-rule"]),
38844
+ return e && e.fileList && e.fileList.map(f => {
38845
+ if (f.response) {
38846
+ return f.response;
38847
+ }
38848
+ return f;
38849
+ });
38850
+ }
38851
+ } : {}),
38852
+ className: formatClassname([`i-${input.type} flex-1`, input.comment && "with-comment", maxRule && "with-max-rule"]),
38758
38853
  "data-id": inputData.name,
38759
38854
  rules: rules,
38760
38855
  required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false,
38761
38856
  labelCol: 12,
38762
38857
  label: /*#__PURE__*/jsxRuntime.jsx("div", {
38763
- className: formatClassname(["flex", (input === null || input === void 0 || (_input$meta25 = input.meta) === null || _input$meta25 === void 0 ? void 0 : _input$meta25.code) && "mr-10"]),
38858
+ className: formatClassname(["flex", input?.meta?.code && "mr-10"]),
38764
38859
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
38765
38860
  className: "mr-1",
38766
38861
  children: getInputLabel$1(input, values)
@@ -38773,7 +38868,7 @@ const GetFormItem$1 = _ref73 => {
38773
38868
  config: input,
38774
38869
  t: t,
38775
38870
  ajaxForms: ajaxForms,
38776
- linkingData: (values === null || values === void 0 ? void 0 : values.linking) || (values === null || values === void 0 || (_values$parent = values.parent) === null || _values$parent === void 0 ? void 0 : _values$parent.linking),
38871
+ linkingData: values?.linking || values?.parent?.linking,
38777
38872
  changeAjaxForms: changeAjaxForms,
38778
38873
  getApiBaseUrl: getApiBaseUrl,
38779
38874
  getAppHeader: getAppHeader,
@@ -38781,11 +38876,12 @@ const GetFormItem$1 = _ref73 => {
38781
38876
  getToken: getToken,
38782
38877
  app: app,
38783
38878
  valueOnlyString: true
38784
- }) : inputTypeComponent$1[input.type] ? inputTypeComponent$1[input.type](_objectSpread2(_objectSpread2({}, inputData), {}, {
38879
+ }) : inputTypeComponent$1[input.type] ? inputTypeComponent$1[input.type]({
38880
+ ...inputData,
38785
38881
  maxWidth,
38786
38882
  staticWidth,
38787
38883
  fullWidth
38788
- }), {
38884
+ }, {
38789
38885
  form: MainForm,
38790
38886
  forms: options,
38791
38887
  allForms: plainForms,
@@ -38806,10 +38902,10 @@ const GetFormItem$1 = _ref73 => {
38806
38902
  staticWidth,
38807
38903
  fullWidth
38808
38904
  }) : console.log(input)
38809
- })), (_input$meta26 = input.meta) !== null && _input$meta26 !== void 0 && _input$meta26.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
38905
+ }), input.meta?.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
38810
38906
  className: "code",
38811
38907
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
38812
- children: (_input$meta27 = input.meta) === null || _input$meta27 === void 0 ? void 0 : _input$meta27.code
38908
+ children: input.meta?.code
38813
38909
  })
38814
38910
  }) : null]
38815
38911
  }), maxRule ? ["imageUpload", "upload", "videoUpload"].includes(input.type) ? /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -38829,10 +38925,10 @@ const GetFormItem$1 = _ref73 => {
38829
38925
  className: "max-char-span",
38830
38926
  children: t("max-char", {
38831
38927
  chars: maxRule,
38832
- filled: (inputData === null || inputData === void 0 || (_inputData$value = inputData.value) === null || _inputData$value === void 0 ? void 0 : _inputData$value.length) || 0
38928
+ filled: inputData?.value?.length || 0
38833
38929
  })
38834
38930
  })
38835
- }) : null, (_input$meta28 = input.meta) !== null && _input$meta28 !== void 0 && _input$meta28.comment && isShown ? /*#__PURE__*/jsxRuntime.jsxs("div", {
38931
+ }) : null, input.meta?.comment && isShown ? /*#__PURE__*/jsxRuntime.jsxs("div", {
38836
38932
  className: "input-content",
38837
38933
  children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
38838
38934
  className: "comment-textarea",
@@ -38858,7 +38954,7 @@ const GetFormItem$1 = _ref73 => {
38858
38954
  },
38859
38955
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
38860
38956
  type: "link",
38861
- disabled: !((_input$meta29 = input.meta) !== null && _input$meta29 !== void 0 && _input$meta29.comment),
38957
+ disabled: !input.meta?.comment,
38862
38958
  className: "p-0",
38863
38959
  children: /*#__PURE__*/jsxRuntime.jsx(Icons.DeleteOutlined, {
38864
38960
  width: 16,
@@ -38867,11 +38963,12 @@ const GetFormItem$1 = _ref73 => {
38867
38963
  })
38868
38964
  })]
38869
38965
  }),
38870
- children: inputTypeComponent$1.comment(_objectSpread2(_objectSpread2({}, inputData), {}, {
38966
+ children: inputTypeComponent$1.comment({
38967
+ ...inputData,
38871
38968
  maxWidth,
38872
38969
  staticWidth,
38873
38970
  fullWidth
38874
- }), {
38971
+ }, {
38875
38972
  form: MainForm,
38876
38973
  forms: options,
38877
38974
  setFormValues: setValues,
@@ -38896,16 +38993,16 @@ const GetFormItem$1 = _ref73 => {
38896
38993
  className: "max-char-span",
38897
38994
  children: t("max-char", {
38898
38995
  chars: MAX_COMMENTS_LENGTH,
38899
- filled: (inputData === null || inputData === void 0 || (_inputData$commentVal = inputData.commentValue) === null || _inputData$commentVal === void 0 ? void 0 : _inputData$commentVal.length) || 0
38996
+ filled: inputData?.commentValue?.length || 0
38900
38997
  })
38901
38998
  })]
38902
- }) : null, lastReview !== null && lastReview !== void 0 && lastReview.reviewError ? /*#__PURE__*/jsxRuntime.jsx("div", {
38999
+ }) : null, lastReview?.reviewError ? /*#__PURE__*/jsxRuntime.jsx("div", {
38903
39000
  className: "input-content",
38904
39001
  children: isReview ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
38905
39002
  children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
38906
39003
  className: "comment-textarea",
38907
- initialValue: (lastReview === null || lastReview === void 0 ? void 0 : lastReview.comment) || "",
38908
- name: "".concat(inputId, "-reviewErrorComment"),
39004
+ initialValue: lastReview?.comment || "",
39005
+ name: `${inputId}-reviewErrorComment`,
38909
39006
  label: /*#__PURE__*/jsxRuntime.jsx("div", {
38910
39007
  className: "flex w-100",
38911
39008
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -38913,28 +39010,31 @@ const GetFormItem$1 = _ref73 => {
38913
39010
  children: t("Review note")
38914
39011
  })
38915
39012
  }),
38916
- children: inputTypeComponent$1.comment(_objectSpread2(_objectSpread2({}, inputData), {}, {
39013
+ children: inputTypeComponent$1.comment({
39014
+ ...inputData,
38917
39015
  maxWidth,
38918
39016
  staticWidth,
38919
39017
  fullWidth
38920
- }), {
39018
+ }, {
38921
39019
  form: MainForm,
38922
39020
  forms: options,
38923
- value: (lastReview === null || lastReview === void 0 ? void 0 : lastReview.comment) || "",
39021
+ value: lastReview?.comment || "",
38924
39022
  onChange: val => {
38925
39023
  changeInputMeta({
38926
39024
  key: inputId,
38927
39025
  type: input.type,
38928
- value: _objectSpread2(_objectSpread2({}, inputMeta), {}, {
38929
- reviews: ((inputMeta === null || inputMeta === void 0 ? void 0 : inputMeta.reviews) || []).map(v => {
39026
+ value: {
39027
+ ...inputMeta,
39028
+ reviews: (inputMeta?.reviews || []).map(v => {
38930
39029
  if (v.createdAt === lastReview.createdAt) {
38931
- return _objectSpread2(_objectSpread2({}, v), {}, {
39030
+ return {
39031
+ ...v,
38932
39032
  comment: val
38933
- });
39033
+ };
38934
39034
  }
38935
39035
  return v;
38936
39036
  })
38937
- })
39037
+ }
38938
39038
  });
38939
39039
  },
38940
39040
  t,
@@ -38948,7 +39048,7 @@ const GetFormItem$1 = _ref73 => {
38948
39048
  className: "max-char-span",
38949
39049
  children: t("max-char", {
38950
39050
  chars: MAX_COMMENTS_LENGTH,
38951
- filled: ((_lastReview$comment = lastReview.comment) === null || _lastReview$comment === void 0 ? void 0 : _lastReview$comment.length) || 0
39051
+ filled: lastReview.comment?.length || 0
38952
39052
  })
38953
39053
  })]
38954
39054
  }) : /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -38969,7 +39069,7 @@ const GetFormItem$1 = _ref73 => {
38969
39069
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
38970
39070
  className: "flex flex-column justify-center mr-1",
38971
39071
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
38972
- children: (lastReview === null || lastReview === void 0 || (_lastReview$reviewer = lastReview.reviewer) === null || _lastReview$reviewer === void 0 ? void 0 : _lastReview$reviewer.firstName) + " " + (lastReview === null || lastReview === void 0 || (_lastReview$reviewer2 = lastReview.reviewer) === null || _lastReview$reviewer2 === void 0 ? void 0 : _lastReview$reviewer2.lastName) + " - " + moment__default["default"](lastReview.createdAt).format("DD MMM YYYY")
39072
+ children: lastReview?.reviewer?.firstName + " " + lastReview?.reviewer?.lastName + " - " + moment__default["default"](lastReview.createdAt).format("DD MMM YYYY")
38973
39073
  })
38974
39074
  })]
38975
39075
  })]
@@ -38980,14 +39080,13 @@ const GetFormItem$1 = _ref73 => {
38980
39080
  return null;
38981
39081
  }
38982
39082
  };
38983
- const editErrorHandler = _ref76 => {
38984
- let {
38985
- errorFields,
38986
- t = s => s
38987
- } = _ref76;
39083
+ const editErrorHandler = ({
39084
+ errorFields,
39085
+ t = s => s
39086
+ }) => {
38988
39087
  if (Array.isArray(errorFields) && errorFields.length) {
38989
39088
  const name = errorFields[0].name.join(".");
38990
- const element = document.querySelector("[data-id=\"".concat(name, "\"]"));
39089
+ const element = document.querySelector(`[data-id="${name}"]`);
38991
39090
  if (element) {
38992
39091
  element.scrollIntoView();
38993
39092
  antd.message.error(t("errors::please-correct-invalid-inputs"));
@@ -41689,22 +41788,23 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
41689
41788
  const formId = form.dataId || k;
41690
41789
  const allInputs = Object.keys(form.inputs).filter(i => {
41691
41790
  const input = form.inputs[i];
41692
- return !excludedKeys.includes(i) && !input.excludeFromEdit && showHideInput(input, values, undefined, undefined, setValues, `${formId}.${i}`);
41791
+ return !excludedKeys.includes(i) && !input.excludeFromEdit && showHideInput(input, values, undefined, undefined, setValues, "".concat(formId, ".").concat(i));
41693
41792
  });
41694
41793
  return allInputs.length ? /*#__PURE__*/jsxRuntime.jsxs(React__default["default"].Fragment, {
41695
41794
  children: [getFormTitles(formTitles, formId, i), ['h2', 'h3', 'h4', 'h5', 'h6'].includes(form.type) ? getInputHeadLines(form.type, i, form, values) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
41696
41795
  children: [!form.repeatable ? /*#__PURE__*/jsxRuntime.jsx("h3", {
41697
- className: `${form.titleClass ? form.titleClass : 'title-semibold-4'} mb0 ${i ? 'mt-3' : ''}`,
41796
+ className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " mb0 ").concat(i ? 'mt-3' : ''),
41698
41797
  children: getInputLabel(form, values)
41699
41798
  }) : !form.hideSectionLabel ? /*#__PURE__*/jsxRuntime.jsx("h3", {
41700
- className: `${form.titleClass ? form.titleClass : 'title-semibold-4'} mb0 ${i ? 'mt-3' : ''}`,
41799
+ className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " mb0 ").concat(i ? 'mt-3' : ''),
41701
41800
  children: form.sectionLabel ? getSectionLabel(form.sectionLabel, values) : form.label ? getInputLabel(form, values) : camelCaseToTitle(k)
41702
41801
  }) : null, /*#__PURE__*/jsxRuntime.jsx(antd.Form.List, {
41703
41802
  name: formId,
41704
- children: (fields, {
41705
- add,
41706
- remove
41707
- }) => {
41803
+ children: (fields, _ref) => {
41804
+ let {
41805
+ add,
41806
+ remove
41807
+ } = _ref;
41708
41808
  const formData = form.repeatable ? values[formId] || [] : values[formId] ? [values[formId]] : [];
41709
41809
  if (fields.length === 0) {
41710
41810
  const formInputs = form.inputs;
@@ -41755,7 +41855,7 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
41755
41855
  padding: '0px 5px',
41756
41856
  color: '#2E90FA'
41757
41857
  },
41758
- children: `#${field.name + 1}`
41858
+ children: "#".concat(field.name + 1)
41759
41859
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
41760
41860
  className: "remove-button-for-repeatable",
41761
41861
  children: (formData.filter(k => Object.keys(k).length > 0).length >= 1 || fields.length > 1) && (typeof form.canDelete !== 'function' || form.canDelete(Array.isArray(values[formId]) ? values[formId][field.name] || {} : values[formId] || {})) ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
@@ -41777,8 +41877,8 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
41777
41877
  const inputId = input.dataId || inp;
41778
41878
  const inputValues = Array.isArray(values[formId]) ? values[formId][field.name] || {} : values[formId] || {};
41779
41879
  const value = inputValues[inputId];
41780
- const commentValue = inputValues[`${inputId}Comment`];
41781
- const inputData = getData(formId, input, value, commentValue, `${formId}[${field.name}].${inputId}`, `${formId}.${inputId}`);
41880
+ const commentValue = inputValues["".concat(inputId, "Comment")];
41881
+ const inputData = getData(formId, input, value, commentValue, "".concat(formId, "[").concat(field.name, "].").concat(inputId), "".concat(formId, ".").concat(inputId));
41782
41882
  const subtitles = form.subtitles || null;
41783
41883
  inputData.repeatIndex = field.name;
41784
41884
  inputData.inputName = inputId;
@@ -41799,64 +41899,59 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
41799
41899
  message: requiredRule.message || ''
41800
41900
  });
41801
41901
  }
41802
- return showHideInput(input, values, field.name, inputValues, setValues, `${formId}[${field.name}].${inputId}`) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
41902
+ return showHideInput(input, values, field.name, inputValues, setValues, "".concat(formId, "[").concat(field.name, "].").concat(inputId)) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
41803
41903
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
41804
- className: form.repeatable ? `inputs` : "",
41904
+ className: form.repeatable ? "inputs" : "",
41805
41905
  children: [getSubtitles(subtitles, input.position, values, field.name, inputValues), ['h2', 'h3', 'h4', 'h5', 'h6'].includes(input.type) ? getInputHeadLines(input.type, i, input, values) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
41806
- children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
41807
- ...field,
41808
- required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false,
41809
- ...(['total100', 'group'].includes(input.type) ? {} : {
41810
- name: [field.name, inputId],
41811
- fieldKey: [field.fieldKey, inputId],
41812
- initialValue: inputData.value
41813
- }),
41814
- ...(['upload'].includes(input.type) ? {
41815
- valuePropName: "fileList",
41816
- getValueFromEvent: e => {
41817
- if (Array.isArray(e)) {
41818
- return e;
41819
- }
41820
- return e && e.fileList && e.fileList.map(f => {
41821
- if (f.response) {
41822
- return f.response;
41823
- }
41824
- return f;
41825
- });
41906
+ children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, field), {}, {
41907
+ required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
41908
+ }, ['total100', 'group'].includes(input.type) ? {} : {
41909
+ name: [field.name, inputId],
41910
+ fieldKey: [field.fieldKey, inputId],
41911
+ initialValue: inputData.value
41912
+ }), ['upload'].includes(input.type) ? {
41913
+ valuePropName: "fileList",
41914
+ getValueFromEvent: e => {
41915
+ if (Array.isArray(e)) {
41916
+ return e;
41826
41917
  }
41827
- } : {}),
41918
+ return e && e.fileList && e.fileList.map(f => {
41919
+ if (f.response) {
41920
+ return f.response;
41921
+ }
41922
+ return f;
41923
+ });
41924
+ }
41925
+ } : {}), {}, {
41828
41926
  style: input.showOnView === false ? {
41829
41927
  display: 'none'
41830
- } : {},
41831
- ...(['switch'].includes(input.type) ? {
41832
- labelCol: {
41833
- span: 20
41834
- },
41835
- style: {
41836
- ...(input.showOnView === false ? {
41837
- display: 'none'
41838
- } : {}),
41839
- flexDirection: 'row',
41840
- justifyContent: 'space-between'
41841
- }
41842
- } : {}),
41928
+ } : {}
41929
+ }, ['switch'].includes(input.type) ? {
41930
+ labelCol: {
41931
+ span: 20
41932
+ },
41933
+ style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
41934
+ display: 'none'
41935
+ } : {}), {}, {
41936
+ flexDirection: 'row',
41937
+ justifyContent: 'space-between'
41938
+ })
41939
+ } : {}), {}, {
41843
41940
  label: getInputLabel(input, values),
41844
41941
  rules: rules,
41845
- className: input.comment ? `with-comment i-${input.type}` : `i-${input.type}`,
41942
+ className: input.comment ? "with-comment i-".concat(input.type) : "i-".concat(input.type),
41846
41943
  extra: input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
41847
41944
  disabled: inputData.props.disabled,
41848
41945
  type: "link",
41849
41946
  onClick: () => {
41850
41947
  const inputValues = Array.isArray(values[formId]) ? values[formId][field.name] || {} : values[formId] || {};
41851
- inputValues[`${inputData.inputName}Comment`] = !inputData.commentValue ? '' : undefined;
41948
+ inputValues["".concat(inputData.inputName, "Comment")] = !inputData.commentValue ? '' : undefined;
41852
41949
  if (Array.isArray(values[formId])) {
41853
41950
  values[formId][field.name] = inputValues;
41854
41951
  } else {
41855
41952
  values[formId] = inputValues;
41856
41953
  }
41857
- setValues({
41858
- ...values
41859
- });
41954
+ setValues(_objectSpread2({}, values));
41860
41955
  },
41861
41956
  children: t(!inputData.commentValue ? 'Add Comment' : 'Remove Comment')
41862
41957
  }) : null,
@@ -41873,9 +41968,9 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
41873
41968
  getAppHeader,
41874
41969
  getApiBaseUrl
41875
41970
  }) : console.log(input)
41876
- }), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
41877
- name: [field.name, `${inputData.inputName}Comment`],
41878
- fieldKey: [field.fieldKey, `${inputData.inputName}Comment`],
41971
+ })), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
41972
+ name: [field.name, "".concat(inputData.inputName, "Comment")],
41973
+ fieldKey: [field.fieldKey, "".concat(inputData.inputName, "Comment")],
41879
41974
  initialValue: inputData.commentValue,
41880
41975
  hidden: !inputData.commentValue,
41881
41976
  children: inputTypeComponent.comment(inputData, {
@@ -41889,10 +41984,10 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
41889
41984
  }) : null]
41890
41985
  })]
41891
41986
  }, ii)
41892
- }, `${i}${ii}`) : null;
41987
+ }, "".concat(i).concat(ii)) : null;
41893
41988
  })
41894
41989
  })]
41895
- }, `${formId}-${field.name}`)), form.repeatable ? /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
41990
+ }, "".concat(formId, "-").concat(field.name))), form.repeatable ? /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
41896
41991
  type: "dashed",
41897
41992
  style: {
41898
41993
  margin: '10px 0px 30px',
@@ -41921,7 +42016,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
41921
42016
  const hasLabel = label && (typeof label === 'string' && (label || '').trim() !== '' || typeof label === 'object') ? true : false;
41922
42017
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
41923
42018
  children: [hasLabel ? /*#__PURE__*/jsxRuntime.jsx("h3", {
41924
- className: `${form.titleClass ? form.titleClass : 'title-semibold-4'} ${i ? 'mt-3 mb-1' : ''}`,
42019
+ className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " ").concat(i ? 'mt-3 mb-1' : ''),
41925
42020
  children: label
41926
42021
  }) : null, /*#__PURE__*/jsxRuntime.jsx("div", {
41927
42022
  className: hasLabel ? "mb-4" : "",
@@ -41930,8 +42025,8 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
41930
42025
  const inputId = input.dataId || inp;
41931
42026
  const inputValues = Array.isArray(values[formId]) ? values[formId] || {} : values[formId] || {};
41932
42027
  const value = inputValues[inputId];
41933
- const commentValue = inputValues[`${inputId}Comment`];
41934
- const inputData = getData(formId, input, value, commentValue, `${formId}.${inputId}`, `${formId}.${inputId}`);
42028
+ const commentValue = inputValues["".concat(inputId, "Comment")];
42029
+ const inputData = getData(formId, input, value, commentValue, "".concat(formId, ".").concat(inputId), "".concat(formId, ".").concat(inputId));
41935
42030
  const subtitles = form.subtitles || null;
41936
42031
  inputData.repeatIndex = undefined;
41937
42032
  inputData.inputName = inputId;
@@ -41952,62 +42047,58 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
41952
42047
  message: requiredRule.message || ''
41953
42048
  });
41954
42049
  }
41955
- return showHideInput(input, values, undefined, inputValues, setValues, `${formId}.${inputId}`) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
42050
+ return showHideInput(input, values, undefined, inputValues, setValues, "".concat(formId, ".").concat(inputId)) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
41956
42051
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
41957
42052
  children: [getSubtitles(subtitles, input.position, values, undefined, inputValues), ['h2', 'h3', 'h4', 'h5', 'h6'].includes(input.type) ? getInputHeadLines(input.type, i, input, values) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
41958
- children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
41959
- required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false,
41960
- ...(['total100', 'group'].includes(input.type) ? {} : {
41961
- name: [formId, inputId],
41962
- fieldKey: [formId, inputId],
41963
- initialValue: inputData.value
41964
- }),
41965
- ...(['upload'].includes(input.type) ? {
41966
- valuePropName: "fileList",
41967
- getValueFromEvent: e => {
41968
- if (Array.isArray(e)) {
41969
- return e;
41970
- }
41971
- return e && e.fileList && e.fileList.map(f => {
41972
- if (f.response) {
41973
- return f.response;
41974
- }
41975
- return f;
41976
- });
42053
+ children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
42054
+ required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
42055
+ }, ['total100', 'group'].includes(input.type) ? {} : {
42056
+ name: [formId, inputId],
42057
+ fieldKey: [formId, inputId],
42058
+ initialValue: inputData.value
42059
+ }), ['upload'].includes(input.type) ? {
42060
+ valuePropName: "fileList",
42061
+ getValueFromEvent: e => {
42062
+ if (Array.isArray(e)) {
42063
+ return e;
41977
42064
  }
41978
- } : {}),
42065
+ return e && e.fileList && e.fileList.map(f => {
42066
+ if (f.response) {
42067
+ return f.response;
42068
+ }
42069
+ return f;
42070
+ });
42071
+ }
42072
+ } : {}), {}, {
41979
42073
  style: input.showOnView === false ? {
41980
42074
  display: 'none'
41981
- } : {},
41982
- ...(['switch'].includes(input.type) ? {
41983
- labelCol: {
41984
- span: 20
41985
- },
41986
- style: {
41987
- ...(input.showOnView === false ? {
41988
- display: 'none'
41989
- } : {}),
41990
- flexDirection: 'row',
41991
- justifyContent: 'space-between'
41992
- }
41993
- } : {}),
42075
+ } : {}
42076
+ }, ['switch'].includes(input.type) ? {
42077
+ labelCol: {
42078
+ span: 20
42079
+ },
42080
+ style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
42081
+ display: 'none'
42082
+ } : {}), {}, {
42083
+ flexDirection: 'row',
42084
+ justifyContent: 'space-between'
42085
+ })
42086
+ } : {}), {}, {
41994
42087
  label: getInputLabel(input, values),
41995
42088
  rules: rules,
41996
- className: input.comment ? `with-comment i-${input.type}` : `i-${input.type}`,
42089
+ className: input.comment ? "with-comment i-".concat(input.type) : "i-".concat(input.type),
41997
42090
  extra: input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
41998
42091
  disabled: inputData.props.disabled,
41999
42092
  type: "link",
42000
42093
  onClick: () => {
42001
42094
  const inputValues = Array.isArray(values[formId]) ? values[formId] || {} : values[formId] || {};
42002
- inputValues[`${inputData.inputName}Comment`] = !inputData.commentValue ? '' : undefined;
42095
+ inputValues["".concat(inputData.inputName, "Comment")] = !inputData.commentValue ? '' : undefined;
42003
42096
  if (Array.isArray(values[formId])) {
42004
42097
  values[formId] = inputValues;
42005
42098
  } else {
42006
42099
  values[formId] = inputValues;
42007
42100
  }
42008
- setValues({
42009
- ...values
42010
- });
42101
+ setValues(_objectSpread2({}, values));
42011
42102
  },
42012
42103
  children: t(!inputData.commentValue ? 'Add Comment' : 'Remove Comment')
42013
42104
  }) : null,
@@ -42022,9 +42113,9 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
42022
42113
  getAppHeader,
42023
42114
  getApiBaseUrl
42024
42115
  }) : console.log(input)
42025
- }), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
42026
- name: [formId, `${inputData.inputName}Comment`],
42027
- fieldKey: [formId, `${inputData.inputName}Comment`],
42116
+ })), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
42117
+ name: [formId, "".concat(inputData.inputName, "Comment")],
42118
+ fieldKey: [formId, "".concat(inputData.inputName, "Comment")],
42028
42119
  initialValue: inputData.commentValue,
42029
42120
  hidden: !inputData.commentValue,
42030
42121
  children: inputTypeComponent.comment(inputData, {
@@ -42038,7 +42129,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
42038
42129
  }) : null]
42039
42130
  })]
42040
42131
  }, ii)
42041
- }, `${i}${ii}`) : null;
42132
+ }, "".concat(i).concat(ii)) : null;
42042
42133
  })
42043
42134
  })]
42044
42135
  });
@@ -54937,7 +55028,8 @@ function AccountTable(_ref) {
54937
55028
  module,
54938
55029
  defaultPageSize = 20,
54939
55030
  actionButton,
54940
- inviteAccount
55031
+ inviteAccount,
55032
+ refetchTrigger
54941
55033
  } = _ref;
54942
55034
  const accountTypes = config === null || config === void 0 ? void 0 : config.accountTypes;
54943
55035
  const [showFilters, setShowFilters] = React.useState(false);
@@ -54965,7 +55057,8 @@ function AccountTable(_ref) {
54965
55057
  filtersConfig: filtersConfig$c,
54966
55058
  getRedirectLink,
54967
55059
  getData,
54968
- fetchPendingOnMount: true
55060
+ fetchPendingOnMount: true,
55061
+ refetchTrigger
54969
55062
  });
54970
55063
  const selectOptions = React.useMemo(() => {
54971
55064
  var _config$options;
@@ -58219,23 +58312,27 @@ function NewAccount({
58219
58312
  updateAccount,
58220
58313
  inviteAccount,
58221
58314
  isPending = false,
58222
- accountToEdit
58315
+ accountToEdit,
58316
+ countries
58223
58317
  }) {
58224
58318
  const [MainForm] = antd.Form.useForm();
58225
58319
  const [loading, setLoading] = React.useState(false);
58226
58320
  const [accountUsed, setAccountUsed] = React.useState(false);
58227
58321
  const isEdit = React.useMemo(() => accountToEdit && typeof accountToEdit === "object", [accountToEdit]);
58322
+ const selectedCountry = React.useMemo(() => findOptions(accountToEdit?.otherData?.country, countries), [accountToEdit?.otherData?.country, countries]);
58323
+ console.log(selectedCountry, "selectedCountry");
58228
58324
  React.useEffect(() => {
58229
58325
  if (accountToEdit && typeof accountToEdit === "object") {
58230
58326
  MainForm.setFieldsValue({
58231
58327
  name: accountToEdit.name,
58232
58328
  email: accountToEdit.email,
58233
- type: accountToEdit?.otherData?.interface
58329
+ type: accountToEdit?.otherData?.interface,
58330
+ country: selectedCountry
58234
58331
  });
58235
58332
  } else {
58236
58333
  MainForm.resetFields();
58237
58334
  }
58238
- }, [accountToEdit, MainForm]);
58335
+ }, [accountToEdit, MainForm, selectedCountry]);
58239
58336
  const onSubmit = async () => {
58240
58337
  try {
58241
58338
  const val = await MainForm.validateFields();
@@ -58247,6 +58344,7 @@ function NewAccount({
58247
58344
  data: val,
58248
58345
  isPending: accountToEdit.status === 'pending' || isPending
58249
58346
  });
58347
+ antd.message.success(t("Account successfully updated"));
58250
58348
  } else {
58251
58349
  if (!inviteAccount) {
58252
58350
  throw new Error("inviteAccount function is required for creating new accounts");
@@ -58286,7 +58384,7 @@ function NewAccount({
58286
58384
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
58287
58385
  placeholder: t("Type")
58288
58386
  })
58289
- }), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
58387
+ }), !isEdit && /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
58290
58388
  name: "email",
58291
58389
  label: t("Email"),
58292
58390
  rules: [{
@@ -58296,6 +58394,16 @@ function NewAccount({
58296
58394
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
58297
58395
  placeholder: t("Type")
58298
58396
  })
58397
+ }), isEdit && /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
58398
+ name: "country",
58399
+ label: t("Country"),
58400
+ rules: [{
58401
+ required: true
58402
+ }],
58403
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
58404
+ placeholder: t("Select"),
58405
+ options: countries
58406
+ })
58299
58407
  }), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
58300
58408
  name: "type",
58301
58409
  label: t("Type"),
@@ -58419,6 +58527,7 @@ function AdminAccountsScreen({
58419
58527
  };
58420
58528
  const [addAccountVisible, setAddAccountVisible] = React.useState(!!query.get("create"));
58421
58529
  const [accountToEdit, setAccountToEdit] = React.useState(null);
58530
+ const [refetchTrigger, setRefetchTrigger] = React.useState(0);
58422
58531
  const actionButtons = React.useMemo(() => [{
58423
58532
  type: "primary",
58424
58533
  onClick: () => setAddAccountVisible(true),
@@ -58459,6 +58568,7 @@ function AdminAccountsScreen({
58459
58568
  headerTitle: "accounts",
58460
58569
  actionButton: actionButtons,
58461
58570
  getData: handleGetData,
58571
+ refetchTrigger: refetchTrigger,
58462
58572
  config: {
58463
58573
  accountTypes,
58464
58574
  addAccountVisible,
@@ -58480,8 +58590,10 @@ function AdminAccountsScreen({
58480
58590
  setAccountToEdit(null);
58481
58591
  },
58482
58592
  accountTypes: accountTypes,
58483
- countriesOptions: options?.countries,
58484
- fetchData: () => {},
58593
+ countries: options?.countries,
58594
+ fetchData: () => {
58595
+ setRefetchTrigger(prev => prev + 1);
58596
+ },
58485
58597
  inviteAccount: data => AdminService.inviteAccount(data),
58486
58598
  updateAccount: ({
58487
58599
  data,