datastake-daf 0.6.829 → 0.6.830

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$E = ["width", "height", "size", "name", "fill"];
4830
+ const _excluded$F = ["width", "height", "size", "name", "fill"];
4831
4831
  const CustomIcon = _ref => {
4832
4832
  let {
4833
4833
  width = 14,
@@ -4836,7 +4836,7 @@ const CustomIcon = _ref => {
4836
4836
  name = "",
4837
4837
  fill = "none"
4838
4838
  } = _ref,
4839
- props = _objectWithoutProperties(_ref, _excluded$E);
4839
+ props = _objectWithoutProperties(_ref, _excluded$F);
4840
4840
  const conf = config$2[name];
4841
4841
  if (conf) {
4842
4842
  return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
@@ -5125,7 +5125,7 @@ createCommonjsModule(function (module, exports) {
5125
5125
  !function(e,n){module.exports=n();}(commonjsGlobal,(function(){return {name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],t=e%100;return "["+e+(n[(t-20)%10]||n[t]||n[0])+"]"}}}));
5126
5126
  });
5127
5127
 
5128
- const _excluded$D = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
5128
+ const _excluded$E = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
5129
5129
  dayjs__default["default"].extend(customParseFormat);
5130
5130
  dayjs__default["default"].extend(utc);
5131
5131
  dayjs__default["default"].extend(utc);
@@ -5501,7 +5501,7 @@ const filterCreateData = data => {
5501
5501
  createdAt,
5502
5502
  updatedAt
5503
5503
  } = data,
5504
- rest = _objectWithoutProperties(data, _excluded$D);
5504
+ rest = _objectWithoutProperties(data, _excluded$E);
5505
5505
  const _meta = isObjectEmpty(meta) ? undefined : meta;
5506
5506
  return _objectSpread2(_objectSpread2({}, rest), {}, {
5507
5507
  meta: _meta
@@ -6033,7 +6033,7 @@ SelectFilters.propTypes = {
6033
6033
  apiUrl: PropTypes__default["default"].string
6034
6034
  };
6035
6035
 
6036
- const _excluded$C = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
6036
+ const _excluded$D = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
6037
6037
  function DAFTable(_ref) {
6038
6038
  let {
6039
6039
  columns = [],
@@ -6064,7 +6064,7 @@ function DAFTable(_ref) {
6064
6064
  app,
6065
6065
  doEmptyRows
6066
6066
  } = _ref,
6067
- rest = _objectWithoutProperties(_ref, _excluded$C);
6067
+ rest = _objectWithoutProperties(_ref, _excluded$D);
6068
6068
  const source = React.useMemo(() => {
6069
6069
  if (data && Array.isArray(data)) {
6070
6070
  return data;
@@ -6889,7 +6889,7 @@ function ComponentWithFocus(_ref) {
6889
6889
  }
6890
6890
 
6891
6891
  var _templateObject$h;
6892
- const _excluded$B = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
6892
+ const _excluded$C = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
6893
6893
  function StickyTable(_ref) {
6894
6894
  let {
6895
6895
  size = "small",
@@ -6900,7 +6900,7 @@ function StickyTable(_ref) {
6900
6900
  pagination = false,
6901
6901
  doEmptyRows = true
6902
6902
  } = _ref,
6903
- props = _objectWithoutProperties(_ref, _excluded$B);
6903
+ props = _objectWithoutProperties(_ref, _excluded$C);
6904
6904
  const data = React__default["default"].useMemo(() => {
6905
6905
  if (!doEmptyRows) {
6906
6906
  return dataSource;
@@ -7428,7 +7428,7 @@ const BTN_SIZE = {
7428
7428
  LG: 'large'
7429
7429
  };
7430
7430
 
7431
- const _excluded$A = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
7431
+ const _excluded$B = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
7432
7432
  function DafButton(_ref) {
7433
7433
  let {
7434
7434
  content = '',
@@ -7442,7 +7442,7 @@ function DafButton(_ref) {
7442
7442
  style = {},
7443
7443
  className = ''
7444
7444
  } = _ref,
7445
- restProps = _objectWithoutProperties(_ref, _excluded$A);
7445
+ restProps = _objectWithoutProperties(_ref, _excluded$B);
7446
7446
  return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
7447
7447
  icon: icon,
7448
7448
  type: type,
@@ -7561,12 +7561,12 @@ const Style$R = styled__default["default"].div`
7561
7561
  }
7562
7562
  `;
7563
7563
 
7564
- const _excluded$z = ["children"];
7564
+ const _excluded$A = ["children"];
7565
7565
  const BorderedButton = _ref => {
7566
7566
  let {
7567
7567
  children
7568
7568
  } = _ref,
7569
- props = _objectWithoutProperties(_ref, _excluded$z);
7569
+ props = _objectWithoutProperties(_ref, _excluded$A);
7570
7570
  return /*#__PURE__*/jsxRuntime.jsx(Style$R, {
7571
7571
  className: "d-btn-cont",
7572
7572
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -7706,12 +7706,12 @@ Badge.propTypes = {
7706
7706
  props: PropTypes__default["default"].object
7707
7707
  };
7708
7708
 
7709
- const _excluded$y = ["icon"];
7709
+ const _excluded$z = ["icon"];
7710
7710
  function GetIcon(_ref) {
7711
7711
  let {
7712
7712
  icon
7713
7713
  } = _ref,
7714
- props = _objectWithoutProperties(_ref, _excluded$y);
7714
+ props = _objectWithoutProperties(_ref, _excluded$z);
7715
7715
  let Icon = Icons__namespace.CloseOutlined;
7716
7716
  if (Icons__namespace[icon]) {
7717
7717
  Icon = Icons__namespace[icon];
@@ -8041,7 +8041,7 @@ const MultiSelectStyled = styled__default["default"](antd.Select)`
8041
8041
  }
8042
8042
  `;
8043
8043
 
8044
- const _excluded$x = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
8044
+ const _excluded$y = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
8045
8045
  const {
8046
8046
  useToken: useToken$p
8047
8047
  } = antd.theme;
@@ -8134,7 +8134,7 @@ function Multiselect(_ref) {
8134
8134
  isSingle = false,
8135
8135
  selectionType = SELECTION_TYPES.DEFAULT
8136
8136
  } = _ref,
8137
- restProps = _objectWithoutProperties(_ref, _excluded$x);
8137
+ restProps = _objectWithoutProperties(_ref, _excluded$y);
8138
8138
  const {
8139
8139
  token
8140
8140
  } = useToken$p();
@@ -8854,7 +8854,7 @@ DAFHeader.propTypes = {
8854
8854
  filtersConfig: PropTypes__default["default"].any
8855
8855
  };
8856
8856
 
8857
- const _excluded$w = ["tabs", "onChange", "value", "className"];
8857
+ const _excluded$x = ["tabs", "onChange", "value", "className"];
8858
8858
  function TabsHeader(_ref) {
8859
8859
  let {
8860
8860
  tabs = [],
@@ -8862,7 +8862,7 @@ function TabsHeader(_ref) {
8862
8862
  value = '',
8863
8863
  className = 'mt-2'
8864
8864
  } = _ref,
8865
- rest = _objectWithoutProperties(_ref, _excluded$w);
8865
+ rest = _objectWithoutProperties(_ref, _excluded$x);
8866
8866
  return /*#__PURE__*/jsxRuntime.jsx("div", {
8867
8867
  className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
8868
8868
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
@@ -8959,7 +8959,7 @@ DrawerHeader.propTypes = {
8959
8959
  tabsConfig: PropTypes__default["default"].any
8960
8960
  };
8961
8961
 
8962
- const _excluded$v = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
8962
+ const _excluded$w = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
8963
8963
  const useFooter = _ref => {
8964
8964
  let {
8965
8965
  leftContent,
@@ -8994,7 +8994,7 @@ const useFooter = _ref => {
8994
8994
  style = {},
8995
8995
  className = ""
8996
8996
  } = button,
8997
- restProps = _objectWithoutProperties(button, _excluded$v);
8997
+ restProps = _objectWithoutProperties(button, _excluded$w);
8998
8998
  return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
8999
8999
  content: label,
9000
9000
  type: type,
@@ -11875,7 +11875,7 @@ Widget.propTypes = {
11875
11875
  };
11876
11876
  Widget.displayName = 'Widget';
11877
11877
 
11878
- const _excluded$u = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
11878
+ const _excluded$v = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
11879
11879
  function ImageWidget(_ref) {
11880
11880
  let {
11881
11881
  loading = false,
@@ -11886,7 +11886,7 @@ function ImageWidget(_ref) {
11886
11886
  noDescriptionText,
11887
11887
  isPdf = false
11888
11888
  } = _ref,
11889
- props = _objectWithoutProperties(_ref, _excluded$u);
11889
+ props = _objectWithoutProperties(_ref, _excluded$v);
11890
11890
  const expandable = isPdf ? false : props.expandable;
11891
11891
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
11892
11892
  loading: loading,
@@ -11946,7 +11946,7 @@ function ImageWidget(_ref) {
11946
11946
  ImageWidget.displayName = 'ImageWidget';
11947
11947
 
11948
11948
  var _templateObject$e;
11949
- const _excluded$t = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
11949
+ const _excluded$u = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
11950
11950
  function FlowWidget(_ref) {
11951
11951
  let {
11952
11952
  title,
@@ -11958,7 +11958,7 @@ function FlowWidget(_ref) {
11958
11958
  className,
11959
11959
  direction = "horizontal"
11960
11960
  } = _ref,
11961
- rest = _objectWithoutProperties(_ref, _excluded$t);
11961
+ rest = _objectWithoutProperties(_ref, _excluded$u);
11962
11962
  const [activeTab, setActiveTab] = React.useState();
11963
11963
  React.useEffect(() => {
11964
11964
  if (defaultActiveTab) {
@@ -15689,7 +15689,7 @@ Map$3.propTypes = {
15689
15689
  link: PropTypes__default["default"].any
15690
15690
  };
15691
15691
 
15692
- const _excluded$s = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
15692
+ const _excluded$t = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
15693
15693
  function InExpandableWidgetMap(_ref) {
15694
15694
  let {
15695
15695
  isExpanded,
@@ -15703,7 +15703,7 @@ function InExpandableWidgetMap(_ref) {
15703
15703
  height,
15704
15704
  widgetConfig
15705
15705
  } = _ref,
15706
- rest = _objectWithoutProperties(_ref, _excluded$s);
15706
+ rest = _objectWithoutProperties(_ref, _excluded$t);
15707
15707
  const [mapKey, setMapKey] = React.useState(0);
15708
15708
  const [isMapReady, setIsMapReady] = React.useState(false);
15709
15709
  React.useEffect(() => {
@@ -17903,14 +17903,14 @@ const MapConfig = ({
17903
17903
  });
17904
17904
  };
17905
17905
 
17906
- const _excluded$r = ["config", "title", "loading"];
17906
+ const _excluded$s = ["config", "title", "loading"];
17907
17907
  const Details = _ref => {
17908
17908
  let {
17909
17909
  config = [],
17910
17910
  title,
17911
17911
  loading = false
17912
17912
  } = _ref,
17913
- rest = _objectWithoutProperties(_ref, _excluded$r);
17913
+ rest = _objectWithoutProperties(_ref, _excluded$s);
17914
17914
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
17915
17915
  className: "with-border-header h-w-btn-header card",
17916
17916
  loading: loading,
@@ -17926,14 +17926,14 @@ const Details = _ref => {
17926
17926
  }));
17927
17927
  };
17928
17928
 
17929
- const _excluded$q = ["config", "title", "loading"];
17929
+ const _excluded$r = ["config", "title", "loading"];
17930
17930
  const KeyIndicatorsDetails = _ref => {
17931
17931
  let {
17932
17932
  config,
17933
17933
  title,
17934
17934
  loading = false
17935
17935
  } = _ref,
17936
- rest = _objectWithoutProperties(_ref, _excluded$q);
17936
+ rest = _objectWithoutProperties(_ref, _excluded$r);
17937
17937
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
17938
17938
  className: "with-border-header h-w-btn-header",
17939
17939
  title: title,
@@ -17963,7 +17963,7 @@ const Style$G = styled__default["default"].div`
17963
17963
  }
17964
17964
  `;
17965
17965
 
17966
- const _excluded$p = ["children", "config", "detailsTitle", "firstColumnWidth"];
17966
+ const _excluded$q = ["children", "config", "detailsTitle", "firstColumnWidth"];
17967
17967
  const DetailsSection = _ref => {
17968
17968
  let {
17969
17969
  children,
@@ -17971,7 +17971,7 @@ const DetailsSection = _ref => {
17971
17971
  detailsTitle,
17972
17972
  firstColumnWidth = "250px"
17973
17973
  } = _ref,
17974
- rest = _objectWithoutProperties(_ref, _excluded$p);
17974
+ rest = _objectWithoutProperties(_ref, _excluded$q);
17975
17975
  return /*#__PURE__*/jsxRuntime.jsx(Style$G, {
17976
17976
  firstColumnWidth: firstColumnWidth,
17977
17977
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -18147,14 +18147,14 @@ const getGoalConfig = () => {
18147
18147
  };
18148
18148
 
18149
18149
  var _templateObject$c;
18150
- const _excluded$o = ["title", "activeSdgGoals", "t"];
18150
+ const _excluded$p = ["title", "activeSdgGoals", "t"];
18151
18151
  function SDGWidget(_ref) {
18152
18152
  let {
18153
18153
  title = "Sustainable Development Goals",
18154
18154
  activeSdgGoals = [],
18155
18155
  t = key => key
18156
18156
  } = _ref,
18157
- props = _objectWithoutProperties(_ref, _excluded$o);
18157
+ props = _objectWithoutProperties(_ref, _excluded$p);
18158
18158
  const sdgConfig = getGoalConfig();
18159
18159
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
18160
18160
  title: title,
@@ -18452,7 +18452,7 @@ function SdgList({
18452
18452
  });
18453
18453
  }
18454
18454
 
18455
- const _excluded$n = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
18455
+ const _excluded$o = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
18456
18456
  const {
18457
18457
  Meta
18458
18458
  } = antd.Card;
@@ -18472,7 +18472,7 @@ function ProjectWidget(_ref) {
18472
18472
  hideSDGList = false,
18473
18473
  t = x => x
18474
18474
  } = _ref,
18475
- props = _objectWithoutProperties(_ref, _excluded$n);
18475
+ props = _objectWithoutProperties(_ref, _excluded$o);
18476
18476
  const [isHovered, setIsHovered] = React__default["default"].useState(false);
18477
18477
  const {
18478
18478
  token
@@ -18744,13 +18744,13 @@ const WidgetCard = _ref => {
18744
18744
  });
18745
18745
  };
18746
18746
 
18747
- const _excluded$m = ["title", "children"];
18747
+ const _excluded$n = ["title", "children"];
18748
18748
  const CarouselWidget = /*#__PURE__*/React.forwardRef((_ref, ref) => {
18749
18749
  let {
18750
18750
  title,
18751
18751
  children
18752
18752
  } = _ref,
18753
- rest = _objectWithoutProperties(_ref, _excluded$m);
18753
+ rest = _objectWithoutProperties(_ref, _excluded$n);
18754
18754
  /**
18755
18755
  * Handles carousel slide change events
18756
18756
  * @param {number} currentSlide - The index of the current slide after change
@@ -18914,7 +18914,7 @@ const EmptyStateContainer = styled__default["default"].div`
18914
18914
  }
18915
18915
  `;
18916
18916
 
18917
- const _excluded$l = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
18917
+ const _excluded$m = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
18918
18918
  function ImageCarousel(_ref) {
18919
18919
  let {
18920
18920
  title,
@@ -18929,7 +18929,7 @@ function ImageCarousel(_ref) {
18929
18929
  emptyLogo = antd.Empty.PRESENTED_IMAGE_SIMPLE,
18930
18930
  emptyText = "No Image"
18931
18931
  } = _ref,
18932
- rest = _objectWithoutProperties(_ref, _excluded$l);
18932
+ rest = _objectWithoutProperties(_ref, _excluded$m);
18933
18933
  const [previewVisible, setPreviewVisible] = React.useState(false);
18934
18934
  const [current, setCurrent] = React.useState(0);
18935
18935
  const carouselRef = React.useRef(null);
@@ -19298,7 +19298,7 @@ const getVegetationConfig = () => {
19298
19298
  };
19299
19299
 
19300
19300
  var _templateObject$a, _templateObject2$3;
19301
- const _excluded$k = ["title", "activeVegetationConditions", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "growthObservations", "t"];
19301
+ const _excluded$l = ["title", "activeVegetationConditions", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "growthObservations", "t"];
19302
19302
  function VegetationWidget(_ref) {
19303
19303
  let {
19304
19304
  title = "Vegetation Health",
@@ -19310,7 +19310,7 @@ function VegetationWidget(_ref) {
19310
19310
  growthObservations = [],
19311
19311
  t = key => key
19312
19312
  } = _ref,
19313
- props = _objectWithoutProperties(_ref, _excluded$k);
19313
+ props = _objectWithoutProperties(_ref, _excluded$l);
19314
19314
  let vegetationConfig = getVegetationConfig();
19315
19315
  const allVegetationKeys = vegetationConfig.map(item => item.key);
19316
19316
  if (filterKeys && Array.isArray(filterKeys)) {
@@ -19426,7 +19426,7 @@ const getFaunaConfig = () => {
19426
19426
  };
19427
19427
 
19428
19428
  var _templateObject$9, _templateObject2$2;
19429
- const _excluded$j = ["title", "faunaPresent", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19429
+ const _excluded$k = ["title", "faunaPresent", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19430
19430
  function FaunaWidget(_ref) {
19431
19431
  let {
19432
19432
  title = "Observed Fauna",
@@ -19437,7 +19437,7 @@ function FaunaWidget(_ref) {
19437
19437
  itemHeight = 100,
19438
19438
  t = key => key
19439
19439
  } = _ref,
19440
- props = _objectWithoutProperties(_ref, _excluded$j);
19440
+ props = _objectWithoutProperties(_ref, _excluded$k);
19441
19441
  let faunaConfig = getFaunaConfig();
19442
19442
 
19443
19443
  // Filter to show only specific keys if filterKeys is provided
@@ -19502,7 +19502,7 @@ const getInvasiveSpeciesConfig = () => {
19502
19502
  };
19503
19503
 
19504
19504
  var _templateObject$8, _templateObject2$1;
19505
- const _excluded$i = ["title", "invasiveSpecies", "hasInvasiveSpecies", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19505
+ const _excluded$j = ["title", "invasiveSpecies", "hasInvasiveSpecies", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19506
19506
  function InvasiveSpeciesWidget(_ref) {
19507
19507
  let {
19508
19508
  title = "Invasive Species",
@@ -19514,7 +19514,7 @@ function InvasiveSpeciesWidget(_ref) {
19514
19514
  itemHeight = 100,
19515
19515
  t = key => key
19516
19516
  } = _ref,
19517
- props = _objectWithoutProperties(_ref, _excluded$i);
19517
+ props = _objectWithoutProperties(_ref, _excluded$j);
19518
19518
  let invasiveSpeciesConfig = getInvasiveSpeciesConfig();
19519
19519
 
19520
19520
  // Filter to show only specific keys if filterKeys is provided
@@ -24937,8 +24937,8 @@ const RepeatableModals = ({
24937
24937
  }) : null;
24938
24938
  };
24939
24939
 
24940
- const _excluded$h = ["viewGroup"],
24941
- _excluded2$1 = ["label", "icon", "position"];
24940
+ const _excluded$i = ["viewGroup"],
24941
+ _excluded2$2 = ["label", "icon", "position"];
24942
24942
  const Content$1 = _ref => {
24943
24943
  let {
24944
24944
  style = {},
@@ -25009,7 +25009,7 @@ const Content$1 = _ref => {
25009
25009
  if (groups[gKey].viewGroup === key) {
25010
25010
  // eslint-disable-next-line no-unused-vars
25011
25011
  const _groups$gKey = groups[gKey],
25012
- gCfg = _objectWithoutProperties(_groups$gKey, _excluded$h);
25012
+ gCfg = _objectWithoutProperties(_groups$gKey, _excluded$i);
25013
25013
  items[gKey] = gCfg;
25014
25014
  }
25015
25015
  return items;
@@ -25237,7 +25237,7 @@ const Content$1 = _ref => {
25237
25237
  showIcon: true
25238
25238
  });
25239
25239
  }
25240
- let groups = _objectWithoutProperties(f, _excluded2$1);
25240
+ let groups = _objectWithoutProperties(f, _excluded2$2);
25241
25241
  groups = Object.keys(groups).reduce((items, key) => {
25242
25242
  var _groups$key2;
25243
25243
  if (!((_groups$key2 = groups[key]) !== null && _groups$key2 !== void 0 && (_groups$key2 = _groups$key2.meta) !== null && _groups$key2 !== void 0 && _groups$key2.excludeFromView)) {
@@ -25289,7 +25289,7 @@ const Content$1 = _ref => {
25289
25289
  });
25290
25290
  };
25291
25291
 
25292
- const _excluded$g = ["t", "open", "title", "children", "onClose", "onSuccess", "cancelBtnText", "saveBtnText", "className", "loading", "disabled", "withModalFormWrapper"];
25292
+ const _excluded$h = ["t", "open", "title", "children", "onClose", "onSuccess", "cancelBtnText", "saveBtnText", "className", "loading", "disabled", "withModalFormWrapper"];
25293
25293
  function Modal(_ref) {
25294
25294
  let {
25295
25295
  t = text => text,
@@ -25305,7 +25305,7 @@ function Modal(_ref) {
25305
25305
  disabled = false,
25306
25306
  withModalFormWrapper = true
25307
25307
  } = _ref,
25308
- props = _objectWithoutProperties(_ref, _excluded$g);
25308
+ props = _objectWithoutProperties(_ref, _excluded$h);
25309
25309
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Modal, _objectSpread2(_objectSpread2({
25310
25310
  width: 650,
25311
25311
  footer: null,
@@ -35952,11 +35952,13 @@ const beforeUpload = allowedExtensions => file => {
35952
35952
  };
35953
35953
  const allowedImageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.avif', '.bmp', '.tiff', '.tif', '.heif', '.heic', '.svg', '.ico'];
35954
35954
 
35955
- /* eslint-disable no-case-declarations */
35955
+ const _excluded$g = ["placeholder"],
35956
+ _excluded2$1 = ["label", "description", "excludeFromEdit", "showFormIf", "icon", "position", "template", "formClass"];
35956
35957
  dayjs__default["default"].extend(utc);
35957
35958
  dayjs__default["default"].extend(timezone);
35958
35959
  dayjs__default["default"].tz.setDefault("UTC");
35959
- const getDefaultInputValue = (input = {}) => {
35960
+ const getDefaultInputValue = function () {
35961
+ let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
35960
35962
  let value = undefined;
35961
35963
  if (input.type === "multiselect") {
35962
35964
  value = [];
@@ -35974,33 +35976,30 @@ const checkCondition$1 = (condition, repeatValues, formsValue) => {
35974
35976
  const isShown = _checkValue(isNotEmpty ? field : wantedValue, match, isNotEmpty ? formValue : value);
35975
35977
  return isShown;
35976
35978
  };
35977
- const renderDataLinkGroup = ({
35978
- input,
35979
- groupFormId,
35980
- name,
35981
- formsValue,
35982
- form,
35983
- onValuesChange,
35984
- setValues,
35985
- changeLinking,
35986
- isHighlighted
35987
- }) => {
35988
- const dataLinkKey = Object.keys(input?.inputs || {}).find(k => input?.inputs[k]?.type === "dataLink");
35989
- const dataLinkInput = (input?.inputs || {})[dataLinkKey];
35990
- const otherInputs = Object.keys(input?.inputs || {}).filter(k => k !== dataLinkKey).reduce((all, key) => {
35991
- all[key] = input?.inputs[key];
35979
+ const renderDataLinkGroup = _ref2 => {
35980
+ var _input$meta, _formsValue$meta, _input$meta2;
35981
+ let {
35982
+ input,
35983
+ groupFormId,
35984
+ name,
35985
+ formsValue,
35986
+ form,
35987
+ onValuesChange,
35988
+ setValues,
35989
+ changeLinking,
35990
+ isHighlighted
35991
+ } = _ref2;
35992
+ const dataLinkKey = Object.keys((input === null || input === void 0 ? void 0 : input.inputs) || {}).find(k => {
35993
+ var _input$inputs$k;
35994
+ 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";
35995
+ });
35996
+ const dataLinkInput = ((input === null || input === void 0 ? void 0 : input.inputs) || {})[dataLinkKey];
35997
+ const otherInputs = Object.keys((input === null || input === void 0 ? void 0 : input.inputs) || {}).filter(k => k !== dataLinkKey).reduce((all, key) => {
35998
+ all[key] = input === null || input === void 0 ? void 0 : input.inputs[key];
35992
35999
  return all;
35993
36000
  }, {});
35994
- const isSingle = input?.meta?.maxRepeat === 1;
35995
- const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [{
35996
- ...(formsValue[groupFormId] || {})[name]
35997
- }] : [] : getArray((formsValue[groupFormId] || {})[name] || []).map(v => ({
35998
- ...v
35999
- })) : isSingle ? formsValue[name] ? [{
36000
- ...formsValue[name]
36001
- }] : [] : getArray(formsValue[name] || []).map(v => ({
36002
- ...v
36003
- }));
36001
+ const isSingle = (input === null || input === void 0 || (_input$meta = input.meta) === null || _input$meta === void 0 ? void 0 : _input$meta.maxRepeat) === 1;
36002
+ 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));
36004
36003
  const onUpdate = (val, i) => {
36005
36004
  const _val = isSingle ? {
36006
36005
  [name]: val
@@ -36008,31 +36007,20 @@ const renderDataLinkGroup = ({
36008
36007
  [name]: formData.map((d, j) => i === j ? val : d)
36009
36008
  };
36010
36009
  if (groupFormId) {
36011
- const _defaultData = form?.getFieldValue(groupFormId) || {};
36012
- const _newData = {
36013
- ..._defaultData,
36014
- ..._val
36015
- };
36016
- onValuesChange(_newData, {
36017
- ...formsValue,
36010
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
36011
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
36012
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
36018
36013
  [groupFormId]: _newData
36019
- });
36020
- form?.setFieldValue(groupFormId, _newData);
36021
- setValues({
36022
- ...formsValue,
36014
+ }));
36015
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
36016
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
36023
36017
  [groupFormId]: _newData
36024
- });
36018
+ }));
36025
36019
  return;
36026
36020
  }
36027
- onValuesChange(_val, {
36028
- ...formsValue,
36029
- ..._val
36030
- });
36031
- form?.setFieldValue(name, _val[name]);
36032
- setValues({
36033
- ...formsValue,
36034
- ..._val
36035
- });
36021
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
36022
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
36023
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
36036
36024
  };
36037
36025
  return /*#__PURE__*/jsxRuntime.jsx(DataLinkGroup, {
36038
36026
  form: input,
@@ -36043,102 +36031,79 @@ const renderDataLinkGroup = ({
36043
36031
  isHighlighted: isHighlighted,
36044
36032
  dataLinkInput: dataLinkInput,
36045
36033
  formsValue: formsValue,
36046
- values: groupFormId ? {
36047
- ...(formsValue[groupFormId] || {}),
36034
+ values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
36048
36035
  meta: {
36049
- inputs: (formsValue?.meta?.inputs || {})[groupFormId]
36036
+ inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta = formsValue.meta) === null || _formsValue$meta === void 0 ? void 0 : _formsValue$meta.inputs) || {})[groupFormId]
36050
36037
  }
36051
- } : formsValue,
36038
+ }) : formsValue,
36052
36039
  name: name,
36053
36040
  groupFormId: groupFormId,
36054
- maxRepeat: input?.meta?.maxRepeat,
36055
- remove: ({
36056
- key
36057
- }) => {
36041
+ maxRepeat: input === null || input === void 0 || (_input$meta2 = input.meta) === null || _input$meta2 === void 0 ? void 0 : _input$meta2.maxRepeat,
36042
+ remove: _ref3 => {
36043
+ let {
36044
+ key
36045
+ } = _ref3;
36058
36046
  const _val = isSingle ? {
36059
36047
  [name]: null
36060
36048
  } : {
36061
36049
  [name]: formData.filter((v, j) => j !== key)
36062
36050
  };
36063
36051
  if (groupFormId) {
36064
- const _defaultData = form?.getFieldValue(groupFormId) || {};
36065
- const _newData = {
36066
- ..._defaultData,
36067
- ..._val
36068
- };
36069
- onValuesChange(_newData, {
36070
- ...formsValue,
36052
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
36053
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
36054
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
36071
36055
  [groupFormId]: _newData
36072
- });
36073
- form?.setFieldValue(groupFormId, _newData);
36074
- setValues({
36075
- ...formsValue,
36056
+ }));
36057
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
36058
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
36076
36059
  [groupFormId]: _newData
36077
- });
36060
+ }));
36078
36061
  return;
36079
36062
  }
36080
- onValuesChange(_val, {
36081
- ...formsValue,
36082
- ..._val
36083
- });
36084
- form?.setFieldValue(name, _val[name]);
36085
- setValues({
36086
- ...formsValue,
36087
- ..._val
36088
- });
36063
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
36064
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
36065
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
36089
36066
  },
36090
36067
  add: val => {
36091
36068
  const _val = isSingle ? {
36092
36069
  [name]: val
36093
36070
  } : {
36094
- [name]: [...formData, {
36095
- ...val
36096
- }]
36071
+ [name]: [...formData, _objectSpread2({}, val)]
36097
36072
  };
36098
36073
  if (groupFormId) {
36099
- const _defaultData = form?.getFieldValue(groupFormId) || {};
36100
- const _newData = {
36101
- ..._defaultData,
36102
- ..._val
36103
- };
36104
- form?.setFieldValue(groupFormId, _newData);
36105
- onValuesChange(_newData, {
36106
- ...formsValue,
36074
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
36075
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
36076
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
36077
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
36107
36078
  [groupFormId]: _newData
36108
- });
36109
- setValues({
36110
- ...formsValue,
36079
+ }));
36080
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
36111
36081
  [groupFormId]: _newData
36112
- });
36082
+ }));
36113
36083
  return;
36114
36084
  }
36115
- form?.setFieldValue(name, _val[name]);
36116
- onValuesChange(_val, {
36117
- ...formsValue,
36118
- ..._val
36119
- });
36120
- setValues({
36121
- ...formsValue,
36122
- ..._val
36123
- });
36085
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
36086
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
36087
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
36124
36088
  },
36125
36089
  k: name,
36126
36090
  formData: formData
36127
36091
  });
36128
36092
  };
36129
36093
  function showHideInput$1(input, data, repeatIndex, repeatValues, inputMeta) {
36130
- if (inputMeta?.notApplicable || inputMeta?.notAvailable) {
36094
+ var _input$meta3, _data$meta;
36095
+ if (inputMeta !== null && inputMeta !== void 0 && inputMeta.notApplicable || inputMeta !== null && inputMeta !== void 0 && inputMeta.notAvailable) {
36131
36096
  return false;
36132
36097
  }
36133
- if (typeof input?.meta?.excludeFromEdit === "boolean") {
36134
- return !input?.meta?.excludeFromEdit;
36098
+ if (typeof (input === null || input === void 0 || (_input$meta3 = input.meta) === null || _input$meta3 === void 0 ? void 0 : _input$meta3.excludeFromEdit) === "boolean") {
36099
+ var _input$meta4;
36100
+ return !(input !== null && input !== void 0 && (_input$meta4 = input.meta) !== null && _input$meta4 !== void 0 && _input$meta4.excludeFromEdit);
36135
36101
  }
36136
- const formsValue = {
36137
- ...data
36138
- };
36139
- Object.keys(data?.meta?.inputs || {}).forEach(key => {
36140
- const input = data?.meta?.inputs[key];
36141
- if (input?.notApplicable || input?.notAvailable) {
36102
+ const formsValue = _objectSpread2({}, data);
36103
+ Object.keys((data === null || data === void 0 || (_data$meta = data.meta) === null || _data$meta === void 0 ? void 0 : _data$meta.inputs) || {}).forEach(key => {
36104
+ var _data$meta2;
36105
+ const input = data === null || data === void 0 || (_data$meta2 = data.meta) === null || _data$meta2 === void 0 ? void 0 : _data$meta2.inputs[key];
36106
+ if (input !== null && input !== void 0 && input.notApplicable || input !== null && input !== void 0 && input.notAvailable) {
36142
36107
  formsValue[key] = undefined;
36143
36108
  delete formsValue[key];
36144
36109
  }
@@ -36197,35 +36162,35 @@ function getInputHeadLines$1(type, i, input, values) {
36197
36162
  switch (type) {
36198
36163
  case "h2":
36199
36164
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36200
- className: `title-semibold-2 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
36165
+ className: "title-semibold-2 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
36201
36166
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
36202
36167
  children: getInputLabel$1(input, values)
36203
36168
  })
36204
36169
  });
36205
36170
  case "h3":
36206
36171
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36207
- className: `title-semibold-3 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
36172
+ className: "title-semibold-3 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
36208
36173
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
36209
36174
  children: getInputLabel$1(input, values)
36210
36175
  })
36211
36176
  });
36212
36177
  case "h4":
36213
36178
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36214
- className: `title-semibold-4 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
36179
+ className: "title-semibold-4 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
36215
36180
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
36216
36181
  children: getInputLabel$1(input, values)
36217
36182
  })
36218
36183
  });
36219
36184
  case "h5":
36220
36185
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36221
- className: `title-semibold-5 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
36186
+ className: "title-semibold-5 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
36222
36187
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
36223
36188
  children: getInputLabel$1(input, values)
36224
36189
  })
36225
36190
  });
36226
36191
  case "h6":
36227
36192
  return /*#__PURE__*/jsxRuntime.jsx("div", {
36228
- className: `title-semibold-6 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
36193
+ className: "title-semibold-6 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
36229
36194
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
36230
36195
  children: getInputLabel$1(input, values)
36231
36196
  })
@@ -36234,15 +36199,16 @@ function getInputHeadLines$1(type, i, input, values) {
36234
36199
  return null;
36235
36200
  }
36236
36201
  }
36237
- function getInputProp(prop, formsValue = {}, scope) {
36202
+ function getInputProp(prop) {
36203
+ let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
36204
+ let scope = arguments.length > 2 ? arguments[2] : undefined;
36238
36205
  if (prop && typeof prop === "object") {
36239
36206
  const validations = Object.keys(prop);
36240
36207
  const key = validations.find(v => {
36241
36208
  let [path, match, wantedValue] = v.split(/( is | includes | not | notEmpty )/gim);
36242
- const value = dot__default["default"].pick(path, {
36243
- ...formsValue,
36209
+ const value = dot__default["default"].pick(path, _objectSpread2(_objectSpread2({}, formsValue), {}, {
36244
36210
  scope
36245
- });
36211
+ }));
36246
36212
  return _checkValue(wantedValue, match, value);
36247
36213
  });
36248
36214
  const label = key ? prop[key] : prop[validations[0]];
@@ -36251,29 +36217,33 @@ function getInputProp(prop, formsValue = {}, scope) {
36251
36217
  return prop;
36252
36218
  }
36253
36219
  }
36254
- function getInputLabel$1(input, formsValue = {}, asText = false) {
36220
+ function getInputLabel$1(input) {
36221
+ let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
36222
+ let asText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
36255
36223
  return /*#__PURE__*/jsxRuntime.jsx(InputLabel, {
36256
36224
  input: input,
36257
36225
  formsValue: formsValue,
36258
36226
  asText: asText
36259
36227
  });
36260
36228
  }
36261
- const InputLabel = ({
36262
- input,
36263
- formsValue,
36264
- asText
36265
- }) => {
36229
+ const InputLabel = _ref4 => {
36230
+ var _input$meta5, _input$meta6, _input$meta7;
36231
+ let {
36232
+ input,
36233
+ formsValue,
36234
+ asText
36235
+ } = _ref4;
36266
36236
  const {
36267
36237
  t,
36268
36238
  evaluationConfig,
36269
36239
  scope
36270
36240
  } = useEditContext();
36271
36241
  const label = getInputProp(input.label, formsValue, scope);
36272
- return input?.meta?.isEvaluation || input.description && typeof input.description === "string" && !asText ? /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
36242
+ 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, {
36273
36243
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
36274
36244
  className: "flex",
36275
36245
  children: [ReactHtmlParser__default["default"](label), /*#__PURE__*/jsxRuntime.jsx(antd.Popover, {
36276
- content: input?.meta?.isEvaluation ? /*#__PURE__*/jsxRuntime.jsx(EvaluationPopover, {
36246
+ content: input !== null && input !== void 0 && (_input$meta6 = input.meta) !== null && _input$meta6 !== void 0 && _input$meta6.isEvaluation ? /*#__PURE__*/jsxRuntime.jsx(EvaluationPopover, {
36277
36247
  t: t,
36278
36248
  evaluationConfig: evaluationConfig
36279
36249
  }) : /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -36281,7 +36251,7 @@ const InputLabel = ({
36281
36251
  children: ReactHtmlParser__default["default"](input.description)
36282
36252
  }),
36283
36253
  placement: "top",
36284
- children: !input?.meta?.isEvaluation || evaluationConfig.length > 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
36254
+ 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", {
36285
36255
  className: "flex flex-column justify-content-center ml-1",
36286
36256
  children: /*#__PURE__*/jsxRuntime.jsx(TooltipIcon, {
36287
36257
  fontSize: 13
@@ -36303,7 +36273,9 @@ function getSectionLabel$1(labels, values) {
36303
36273
  }
36304
36274
  return labels;
36305
36275
  }
36306
- function getSubtitles$1(subtitles, position, formsValue = {}, repeatIndex, repeatValues) {
36276
+ function getSubtitles$1(subtitles, position) {
36277
+ let formsValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
36278
+ let repeatValues = arguments.length > 4 ? arguments[4] : undefined;
36307
36279
  let subtitle = subtitles && subtitles[position];
36308
36280
  if (subtitle && typeof subtitle === "object") {
36309
36281
  let newSubtitle = subtitle.default || "";
@@ -36347,14 +36319,12 @@ function getSubtitles$1(subtitles, position, formsValue = {}, repeatIndex, repea
36347
36319
  function getFormTitles$1(titles, key, position) {
36348
36320
  let tilte = titles && titles[key];
36349
36321
  return tilte ? /*#__PURE__*/jsxRuntime.jsx("h3", {
36350
- className: `title-semibold-3 mb0 ${position ? "mt-3" : ""}`,
36322
+ className: "title-semibold-3 mb0 ".concat(position ? "mt-3" : ""),
36351
36323
  children: tilte
36352
36324
  }) : null;
36353
36325
  }
36354
36326
  const updateFormValues$1 = (repeatIndex, repeatValues, inputName, value, formsValue, name, mainForm) => {
36355
- formsValue = Object.assign(formsValue, {
36356
- ...mainForm.getFieldsValue(true)
36357
- });
36327
+ formsValue = Object.assign(formsValue, _objectSpread2({}, mainForm.getFieldsValue(true)));
36358
36328
  if (typeof repeatIndex === "number" && repeatValues) {
36359
36329
  if (!repeatValues[inputName] || !___default["default"].isEqual(repeatValues[inputName], value)) {
36360
36330
  repeatValues[inputName] = value;
@@ -36389,14 +36359,16 @@ const updateFormValues$1 = (repeatIndex, repeatValues, inputName, value, formsVa
36389
36359
  };
36390
36360
  const inputOnBlur = [];
36391
36361
  const inputTypeComponent$1 = {
36392
- text: ({
36393
- props,
36394
- rules
36395
- }, {
36396
- inputMeta = {},
36397
- t,
36398
- isHighlighted
36399
- }) => {
36362
+ text: (_ref5, _ref6) => {
36363
+ let {
36364
+ props,
36365
+ rules
36366
+ } = _ref5;
36367
+ let {
36368
+ inputMeta = {},
36369
+ t,
36370
+ isHighlighted
36371
+ } = _ref6;
36400
36372
  const maxRule = rules.find(r => r.max);
36401
36373
  const maxProps = {
36402
36374
  maxLength: MAX_TEXT_AREA_LENGTH
@@ -36404,26 +36376,28 @@ const inputTypeComponent$1 = {
36404
36376
  if (maxRule) {
36405
36377
  maxProps.maxLength = maxRule.max;
36406
36378
  }
36407
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
36408
- size: "large",
36409
- ...maxProps,
36379
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
36380
+ size: "large"
36381
+ }, maxProps), {}, {
36410
36382
  allowClear: true,
36411
36383
  autoComplete: "new-password",
36412
- type: "text",
36413
- ...props,
36384
+ type: "text"
36385
+ }, props), {}, {
36414
36386
  className: formatClassname([isHighlighted && "highlighted-input"]),
36415
36387
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
36416
36388
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
36417
- });
36389
+ }));
36418
36390
  },
36419
- link: ({
36420
- props,
36421
- rules
36422
- }, {
36423
- inputMeta = {},
36424
- t,
36425
- isHighlighted
36426
- }) => {
36391
+ link: (_ref7, _ref8) => {
36392
+ let {
36393
+ props,
36394
+ rules
36395
+ } = _ref7;
36396
+ let {
36397
+ inputMeta = {},
36398
+ t,
36399
+ isHighlighted
36400
+ } = _ref8;
36427
36401
  const maxRule = rules.find(r => r.max);
36428
36402
  const maxProps = {
36429
36403
  maxLength: MAX_TEXT_AREA_LENGTH
@@ -36431,29 +36405,32 @@ const inputTypeComponent$1 = {
36431
36405
  if (maxRule) {
36432
36406
  maxProps.maxLength = maxRule.max;
36433
36407
  }
36434
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
36435
- size: "large",
36436
- ...maxProps,
36408
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
36409
+ size: "large"
36410
+ }, maxProps), {}, {
36437
36411
  allowClear: true,
36438
36412
  autoComplete: "new-password",
36439
- type: "text",
36440
- ...props,
36413
+ type: "text"
36414
+ }, props), {}, {
36441
36415
  className: formatClassname([isHighlighted && "highlighted-input"]),
36442
36416
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
36443
36417
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
36444
- });
36418
+ }));
36445
36419
  },
36446
- number: ({
36447
- props,
36448
- rules,
36449
- input
36450
- }, {
36451
- inputMeta = {},
36452
- t,
36453
- isHighlighted
36454
- }) => {
36420
+ number: (_ref9, _ref10) => {
36421
+ var _input$meta8;
36422
+ let {
36423
+ props,
36424
+ rules,
36425
+ input
36426
+ } = _ref9;
36427
+ let {
36428
+ inputMeta = {},
36429
+ t,
36430
+ isHighlighted
36431
+ } = _ref10;
36455
36432
  const maxRule = rules.find(r => r.max);
36456
- const integerRule = !input?.meta?.isDecimal;
36433
+ const integerRule = !(input !== null && input !== void 0 && (_input$meta8 = input.meta) !== null && _input$meta8 !== void 0 && _input$meta8.isDecimal);
36457
36434
  const parser = value => {
36458
36435
  if (!value) {
36459
36436
  return "";
@@ -36464,60 +36441,63 @@ const inputTypeComponent$1 = {
36464
36441
  return value.replace(/\$\s?|(,*)/g, "");
36465
36442
  };
36466
36443
  if (maxRule) {
36467
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
36444
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
36468
36445
  size: "large",
36469
36446
  allowClear: true,
36470
- autoComplete: "new-password",
36471
- ...props,
36447
+ autoComplete: "new-password"
36448
+ }, props), {}, {
36472
36449
  type: "number",
36473
36450
  parser: parser,
36474
36451
  min: 0,
36475
36452
  max: maxRule.max,
36476
36453
  className: formatClassname([isHighlighted && "highlighted-input"])
36477
- });
36454
+ }));
36478
36455
  }
36479
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
36456
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
36480
36457
  size: "large",
36481
36458
  allowClear: true,
36482
36459
  className: formatClassname([isHighlighted && "highlighted-input"]),
36483
- autoComplete: "new-password",
36484
- ...props,
36460
+ autoComplete: "new-password"
36461
+ }, props), {}, {
36485
36462
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
36486
36463
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type number"),
36487
36464
  min: 0,
36488
36465
  formatter: value => numberWithCommas$1(value),
36489
36466
  parser: parser
36490
- });
36467
+ }));
36491
36468
  },
36492
36469
  // eslint-disable-next-line no-unused-vars
36493
- select: ({
36494
- value,
36495
- options,
36496
- optionGroup,
36497
- props,
36498
- formsValue,
36499
- optionsFilter,
36500
- filterCond,
36501
- repeatValues,
36502
- repeatIndex,
36503
- name,
36504
- inputName,
36505
- address,
36506
- addressData,
36507
- input,
36508
- scope
36509
- }, {
36510
- forms,
36511
- form,
36512
- setAddress,
36513
- inputMeta = {},
36514
- t,
36515
- isHighlighted,
36516
- changeInputMeta,
36517
- groupFormId
36518
- }) => {
36470
+ select: (_ref11, _ref12) => {
36471
+ var _input$meta9, _input$meta10;
36472
+ let {
36473
+ value,
36474
+ options,
36475
+ optionGroup,
36476
+ props,
36477
+ formsValue,
36478
+ optionsFilter,
36479
+ filterCond,
36480
+ repeatValues,
36481
+ repeatIndex,
36482
+ name,
36483
+ inputName,
36484
+ address,
36485
+ addressData,
36486
+ input,
36487
+ scope
36488
+ } = _ref11;
36489
+ let {
36490
+ forms,
36491
+ form,
36492
+ setAddress,
36493
+ inputMeta = {},
36494
+ t,
36495
+ isHighlighted,
36496
+ changeInputMeta,
36497
+ groupFormId
36498
+ } = _ref12;
36519
36499
  let opts;
36520
- const isEvaluation = input?.meta?.isEvaluation;
36500
+ const isEvaluation = input === null || input === void 0 || (_input$meta9 = input.meta) === null || _input$meta9 === void 0 ? void 0 : _input$meta9.isEvaluation;
36521
36501
  let defaultValue = value;
36522
36502
  if (typeof options === "string") {
36523
36503
  const [formName, key] = options.split(".");
@@ -36542,7 +36522,7 @@ const inputTypeComponent$1 = {
36542
36522
  opts = [];
36543
36523
  }
36544
36524
  } else {
36545
- opts = options?.filter(o => !o.onlyView);
36525
+ opts = options === null || options === void 0 ? void 0 : options.filter(o => !o.onlyView);
36546
36526
  }
36547
36527
  opts = JSON.parse(JSON.stringify(opts || []));
36548
36528
  opts = opts.map(o => getSelectOptions$2(o, formsValue));
@@ -36552,7 +36532,7 @@ const inputTypeComponent$1 = {
36552
36532
  const uniqueDefaultKeys = getUniqueDefaultKeys(options);
36553
36533
 
36554
36534
  // Handle default value logic
36555
- if (!propHasValue$1(value) && propHasValue$1(input?.meta?.defaultValue)) {
36535
+ 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)) {
36556
36536
  // If no current value but there's a default value, use the default
36557
36537
  value = input.meta.defaultValue;
36558
36538
  defaultValue = value;
@@ -36585,7 +36565,7 @@ const inputTypeComponent$1 = {
36585
36565
  }
36586
36566
  opts = groupOptions;
36587
36567
  }
36588
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
36568
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
36589
36569
  size: "large",
36590
36570
  autoComplete: "new-password",
36591
36571
  allowClear: true,
@@ -36594,35 +36574,32 @@ const inputTypeComponent$1 = {
36594
36574
  value: value // Use value instead of defaultValue for controlled behavior
36595
36575
  ,
36596
36576
  filterOption: filterSelectOptions,
36597
- optionFilterProp: "children",
36598
- ...props,
36577
+ optionFilterProp: "children"
36578
+ }, props), {}, {
36599
36579
  className: formatClassname([isHighlighted && "highlighted-select"]),
36600
36580
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
36601
36581
  placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp(props.placeholder, formsValue) || t("Select one option"),
36602
36582
  onChange: (val, selectedValue) => {
36603
36583
  // ONLY FOR SBG EVALUATON !!
36604
36584
  if (isEvaluation && val === "na" && groupFormId) {
36585
+ var _formsValue$meta2;
36605
36586
  changeInputMeta({
36606
36587
  key: groupFormId,
36607
- value: {
36608
- ...(formsValue?.meta?.inputs?.[groupFormId] || {}),
36588
+ 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]) || {}), {}, {
36609
36589
  documentation: {
36610
36590
  notApplicable: true
36611
36591
  }
36612
- },
36592
+ }),
36613
36593
  otherValues: {
36614
- [groupFormId]: {
36615
- ...(formsValue?.[groupFormId] || {}),
36594
+ [groupFormId]: _objectSpread2(_objectSpread2({}, (formsValue === null || formsValue === void 0 ? void 0 : formsValue[groupFormId]) || {}), {}, {
36616
36595
  [name]: val
36617
- }
36596
+ })
36618
36597
  }
36619
36598
  });
36620
36599
  }
36621
36600
  if (address && selectedValue) {
36622
36601
  dot__default["default"].str(address, selectedValue.children, addressData);
36623
- setAddress({
36624
- ...addressData
36625
- });
36602
+ setAddress(_objectSpread2({}, addressData));
36626
36603
  }
36627
36604
  if (props.onChange) {
36628
36605
  props.onChange(val);
@@ -36653,15 +36630,15 @@ const inputTypeComponent$1 = {
36653
36630
  if (og.disabled !== undefined) {
36654
36631
  groupOtherProps.disabled = og.disabled;
36655
36632
  }
36656
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
36657
- value: og.value,
36658
- ...groupOtherProps,
36633
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, _objectSpread2(_objectSpread2({
36634
+ value: og.value
36635
+ }, groupOtherProps), {}, {
36659
36636
  children: og.label
36660
- }, `${i}${j}`);
36637
+ }), "".concat(i).concat(j));
36661
36638
  })
36662
- }) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
36663
- value: option.value,
36664
- ...otherProps,
36639
+ }) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, _objectSpread2(_objectSpread2({
36640
+ value: option.value
36641
+ }, otherProps), {}, {
36665
36642
  children: isEvaluation ? /*#__PURE__*/jsxRuntime.jsxs("div", {
36666
36643
  className: "flex",
36667
36644
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
@@ -36669,33 +36646,35 @@ const inputTypeComponent$1 = {
36669
36646
  children: sgbEvaluationIcons[option.value]
36670
36647
  }), option.label]
36671
36648
  }) : option.label
36672
- }, option.value);
36649
+ }), option.value);
36673
36650
  })
36674
- });
36651
+ }));
36675
36652
  },
36676
- multiselect: ({
36677
- value,
36678
- options,
36679
- optionGroup,
36680
- optionsFilter,
36681
- filterCond,
36682
- props,
36683
- formsValue,
36684
- repeatValues,
36685
- repeatIndex,
36686
- inputName,
36687
- name,
36688
- tags,
36689
- maxWidth,
36690
- staticWidth,
36691
- fullWidth
36692
- }, {
36693
- forms,
36694
- form,
36695
- inputMeta = {},
36696
- t,
36697
- isHighlighted
36698
- }) => {
36653
+ multiselect: (_ref13, _ref14) => {
36654
+ let {
36655
+ value,
36656
+ options,
36657
+ optionGroup,
36658
+ optionsFilter,
36659
+ filterCond,
36660
+ props,
36661
+ formsValue,
36662
+ repeatValues,
36663
+ repeatIndex,
36664
+ inputName,
36665
+ name,
36666
+ tags,
36667
+ maxWidth,
36668
+ staticWidth,
36669
+ fullWidth
36670
+ } = _ref13;
36671
+ let {
36672
+ forms,
36673
+ form,
36674
+ inputMeta = {},
36675
+ t,
36676
+ isHighlighted
36677
+ } = _ref14;
36699
36678
  let opts;
36700
36679
  if (typeof options === "string") {
36701
36680
  const [formName, key] = options.split(".");
@@ -36757,17 +36736,17 @@ const inputTypeComponent$1 = {
36757
36736
  staticWidth,
36758
36737
  fullWidth
36759
36738
  });
36760
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
36739
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2(_objectSpread2({
36761
36740
  size: "medium",
36762
36741
  allowClear: true,
36763
36742
  autoComplete: "new-password",
36764
36743
  mode: tags ? "tags" : "multiple",
36765
- optionFilterProp: "children",
36766
- ...(tags ? {
36767
- tokenSeparators: [","]
36768
- } : {}),
36769
- filterOption: filterSelectOptions,
36770
- ...props,
36744
+ optionFilterProp: "children"
36745
+ }, tags ? {
36746
+ tokenSeparators: [","]
36747
+ } : {}), {}, {
36748
+ filterOption: filterSelectOptions
36749
+ }, props), {}, {
36771
36750
  className: formatClassname([isHighlighted && "highlighted-select"]),
36772
36751
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
36773
36752
  placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp(props.placeholder, formsValue) || t("Select all relevant options"),
@@ -36806,51 +36785,52 @@ const inputTypeComponent$1 = {
36806
36785
  if (og.disabled !== undefined) {
36807
36786
  groupOtherProps.disabled = og.disabled;
36808
36787
  }
36809
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
36810
- value: og.value,
36811
- ...groupOtherProps,
36788
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, _objectSpread2(_objectSpread2({
36789
+ value: og.value
36790
+ }, groupOtherProps), {}, {
36812
36791
  children: og.label
36813
- }, `${i}${j}`);
36792
+ }), "".concat(i).concat(j));
36814
36793
  })
36815
- }) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
36816
- value: option.value,
36817
- ...otherProps,
36794
+ }) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, _objectSpread2(_objectSpread2({
36795
+ value: option.value
36796
+ }, otherProps), {}, {
36818
36797
  children: option.label
36819
- }, i);
36798
+ }), i);
36820
36799
  })
36821
- });
36800
+ }));
36822
36801
  },
36823
- date: ({
36824
- props,
36825
- rules,
36826
- repeatValues,
36827
- formsValue,
36828
- name
36829
- }, {
36830
- setFormValues,
36831
- inputMeta,
36832
- form,
36833
- t,
36834
- isHighlighted,
36835
- groupFormId
36836
- }) => {
36802
+ date: (_ref15, _ref16) => {
36803
+ var _formsValue$groupForm, _value2;
36804
+ let {
36805
+ props,
36806
+ rules,
36807
+ repeatValues,
36808
+ formsValue,
36809
+ name
36810
+ } = _ref15;
36811
+ let {
36812
+ setFormValues,
36813
+ inputMeta,
36814
+ form,
36815
+ t,
36816
+ isHighlighted,
36817
+ groupFormId
36818
+ } = _ref16;
36837
36819
  const lng = localStorage.getItem("datastakeLng") || "en";
36838
36820
  const maxRule = rules.find(r => r.max);
36839
- let value = groupFormId ? formsValue?.[groupFormId]?.[name] : formsValue[name];
36821
+ let value = groupFormId ? formsValue === null || formsValue === void 0 || (_formsValue$groupForm = formsValue[groupFormId]) === null || _formsValue$groupForm === void 0 ? void 0 : _formsValue$groupForm[name] : formsValue[name];
36840
36822
  const handleDateChange = date => {
36841
36823
  if (date) {
36842
36824
  // const localDate = dayjs.utc(date).add(dayjs(date).utcOffset(), 'minutes');
36843
36825
  const localDate = dayjs__default["default"].utc(date);
36844
36826
  if (groupFormId) {
36845
- const _new = {
36846
- ...(formsValue[groupFormId] || {}),
36827
+ const _new = _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
36847
36828
  [name]: localDate
36848
- };
36829
+ });
36849
36830
  form.setFieldValue(groupFormId, _new);
36850
- setFormValues({
36851
- ...formsValue,
36831
+ setFormValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
36852
36832
  [groupFormId]: _new
36853
- });
36833
+ }));
36854
36834
  } else {
36855
36835
  form.setFieldValue(name, localDate);
36856
36836
  }
@@ -36859,15 +36839,13 @@ const inputTypeComponent$1 = {
36859
36839
  if (groupFormId) {
36860
36840
  if (typeof value === "string" || typeof value === "undefined") {
36861
36841
  value = typeof value === "string" ? dayjs__default["default"].utc(value) : null;
36862
- const _new = {
36863
- ...(formsValue[groupFormId] || {}),
36842
+ const _new = _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
36864
36843
  [name]: value
36865
- };
36844
+ });
36866
36845
  form.setFieldValue(groupFormId, _new);
36867
- setFormValues({
36868
- ...formsValue,
36846
+ setFormValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
36869
36847
  [groupFormId]: _new
36870
- });
36848
+ }));
36871
36849
  }
36872
36850
  } else {
36873
36851
  if (typeof value === "string") {
@@ -36883,12 +36861,13 @@ const inputTypeComponent$1 = {
36883
36861
  checkForMax = checkCondition$1(maxRule.condition, repeatValues, formsValue);
36884
36862
  }
36885
36863
  if (checkForMax) {
36886
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
36864
+ var _value;
36865
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
36887
36866
  size: "large",
36888
36867
  allowClear: true,
36889
- autoComplete: "new-password",
36890
- ...props,
36891
- value: value ? dayjs__default["default"](value?.format("YYYY-MM-DD"), "YYYY-MM-DD") : undefined,
36868
+ autoComplete: "new-password"
36869
+ }, props), {}, {
36870
+ value: value ? dayjs__default["default"]((_value = value) === null || _value === void 0 ? void 0 : _value.format("YYYY-MM-DD"), "YYYY-MM-DD") : undefined,
36892
36871
  onChange: handleDateChange,
36893
36872
  className: formatClassname([isHighlighted && "highlighted-input"]),
36894
36873
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
@@ -36898,49 +36877,54 @@ const inputTypeComponent$1 = {
36898
36877
  disabledDate: current => {
36899
36878
  return current && current >= dayjs__default["default"]().endOf("day");
36900
36879
  }
36901
- });
36880
+ }));
36902
36881
  }
36903
36882
  }
36904
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
36883
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
36905
36884
  size: "large",
36906
36885
  allowClear: true,
36907
- autoComplete: "new-password",
36908
- ...props,
36909
- value: value ? dayjs__default["default"](value?.format("YYYY-MM-DD"), "YYYY-MM-DD") : undefined,
36886
+ autoComplete: "new-password"
36887
+ }, props), {}, {
36888
+ value: value ? dayjs__default["default"]((_value2 = value) === null || _value2 === void 0 ? void 0 : _value2.format("YYYY-MM-DD"), "YYYY-MM-DD") : undefined,
36910
36889
  onChange: handleDateChange,
36911
36890
  className: formatClassname([isHighlighted && "highlighted-input"]),
36912
36891
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
36913
36892
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder,
36914
36893
  format: DATE_FORMATS,
36915
36894
  locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"]
36916
- });
36895
+ }));
36917
36896
  },
36918
- groupExpandable: ({
36919
- formsValue,
36920
- name,
36921
- input
36922
- }, {
36923
- groupFormId
36924
- }) => {
36925
- const data = groupFormId ? formsValue?.[groupFormId]?.[name] : formsValue?.[name];
36897
+ groupExpandable: (_ref17, _ref18) => {
36898
+ var _formsValue$groupForm2;
36899
+ let {
36900
+ formsValue,
36901
+ name,
36902
+ input
36903
+ } = _ref17;
36904
+ let {
36905
+ groupFormId
36906
+ } = _ref18;
36907
+ 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];
36926
36908
  return /*#__PURE__*/jsxRuntime.jsx(GroupExpandable, {
36927
36909
  input: input,
36928
36910
  formsValue: formsValue,
36929
36911
  data: data
36930
36912
  });
36931
36913
  },
36932
- comment: ({
36933
- props: {
36934
- placeholder,
36935
- ...props
36936
- },
36937
- commentHint
36938
- }, {
36939
- onChange,
36940
- value,
36941
- isHighlighted
36942
- }) => {
36943
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
36914
+ comment: (_ref19, _ref20) => {
36915
+ let {
36916
+ props: {
36917
+ placeholder
36918
+ },
36919
+ commentHint
36920
+ } = _ref19,
36921
+ props = _objectWithoutProperties(_ref19.props, _excluded$g);
36922
+ let {
36923
+ onChange,
36924
+ value,
36925
+ isHighlighted
36926
+ } = _ref20;
36927
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
36944
36928
  allowClear: true,
36945
36929
  value: value,
36946
36930
  onChange: e => onChange(e.target.value),
@@ -36951,26 +36935,27 @@ const inputTypeComponent$1 = {
36951
36935
  autoSize: {
36952
36936
  minRows: 5,
36953
36937
  maxRows: 5
36954
- },
36955
- ...props,
36938
+ }
36939
+ }, props), {}, {
36956
36940
  disabled: false
36957
- });
36941
+ }));
36958
36942
  },
36959
- tableComment: ({
36960
- setValues,
36961
- name,
36962
- onValuesChange,
36963
- formsValue
36964
- }, {
36965
- form,
36966
- groupFormId,
36967
- isHighlighted
36968
- }) => {
36969
- const formData = groupFormId ? getArray((formsValue[groupFormId] || {})[name] || []).map((v, i) => ({
36970
- ...v,
36943
+ tableComment: (_ref21, _ref22) => {
36944
+ var _formsValue$meta3;
36945
+ let {
36946
+ setValues,
36947
+ name,
36948
+ onValuesChange,
36949
+ formsValue
36950
+ } = _ref21;
36951
+ let {
36952
+ form,
36953
+ groupFormId,
36954
+ isHighlighted
36955
+ } = _ref22;
36956
+ const formData = groupFormId ? getArray((formsValue[groupFormId] || {})[name] || []).map((v, i) => _objectSpread2(_objectSpread2({}, v), {}, {
36971
36957
  key: i
36972
- })) : (formsValue[name] || []).map((v, i) => ({
36973
- ...v,
36958
+ })) : (formsValue[name] || []).map((v, i) => _objectSpread2(_objectSpread2({}, v), {}, {
36974
36959
  key: i
36975
36960
  }));
36976
36961
  const onUpdate = (val, i) => {
@@ -36978,121 +36963,89 @@ const inputTypeComponent$1 = {
36978
36963
  [name]: formData.map((d, j) => i === j ? val : d)
36979
36964
  };
36980
36965
  if (groupFormId) {
36981
- const _defaultData = form?.getFieldValue(groupFormId) || {};
36982
- const _newData = {
36983
- ..._defaultData,
36984
- ..._val
36985
- };
36986
- onValuesChange(_newData, {
36987
- ...formsValue,
36966
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
36967
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
36968
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
36988
36969
  [groupFormId]: _newData
36989
- });
36990
- form?.setFieldValue(groupFormId, _newData);
36991
- setValues({
36992
- ...formsValue,
36970
+ }));
36971
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
36972
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
36993
36973
  [groupFormId]: _newData
36994
- });
36974
+ }));
36995
36975
  return;
36996
36976
  }
36997
- onValuesChange(_val, {
36998
- ...formsValue,
36999
- ..._val
37000
- });
37001
- form?.setFieldValue(name, _val[name]);
37002
- setValues({
37003
- ...formsValue,
37004
- ..._val
37005
- });
36977
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
36978
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
36979
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
37006
36980
  };
37007
36981
  return /*#__PURE__*/jsxRuntime.jsx(Comment, {
37008
36982
  onUpdate: onUpdate,
37009
36983
  isHighlighted: isHighlighted,
37010
36984
  form: form,
37011
- values: groupFormId ? {
37012
- ...(formsValue[groupFormId] || {}),
36985
+ values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
37013
36986
  meta: {
37014
- inputs: (formsValue?.meta?.inputs || {})[groupFormId]
36987
+ inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta3 = formsValue.meta) === null || _formsValue$meta3 === void 0 ? void 0 : _formsValue$meta3.inputs) || {})[groupFormId]
37015
36988
  }
37016
- } : formsValue,
36989
+ }) : formsValue,
37017
36990
  name: name,
37018
- remove: ({
37019
- key
37020
- }) => {
36991
+ remove: _ref23 => {
36992
+ let {
36993
+ key
36994
+ } = _ref23;
37021
36995
  const _val = {
37022
36996
  [name]: formData.filter(v => v.key !== key)
37023
36997
  };
37024
36998
  if (groupFormId) {
37025
- const _defaultData = form?.getFieldValue(groupFormId) || {};
37026
- const _newData = {
37027
- ..._defaultData,
37028
- ..._val
37029
- };
37030
- onValuesChange(_newData, {
37031
- ...formsValue,
36999
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
37000
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
37001
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
37032
37002
  [groupFormId]: _newData
37033
- });
37034
- form?.setFieldValue(groupFormId, _newData);
37035
- setValues({
37036
- ...formsValue,
37003
+ }));
37004
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
37005
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
37037
37006
  [groupFormId]: _newData
37038
- });
37007
+ }));
37039
37008
  return;
37040
37009
  }
37041
- onValuesChange(_val, {
37042
- ...formsValue,
37043
- ..._val
37044
- });
37045
- form?.setFieldValue(name, _val[name]);
37046
- setValues({
37047
- ...formsValue,
37048
- ..._val
37049
- });
37010
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
37011
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
37012
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
37050
37013
  },
37051
37014
  add: val => {
37052
37015
  const _val = {
37053
- [name]: [...formData, {
37054
- ...val,
37016
+ [name]: [...formData, _objectSpread2(_objectSpread2({}, val), {}, {
37055
37017
  key: formData.length
37056
- }]
37018
+ })]
37057
37019
  };
37058
37020
  if (groupFormId) {
37059
- const _defaultData = form?.getFieldValue(groupFormId) || {};
37060
- const _newData = {
37061
- ..._defaultData,
37062
- ..._val
37063
- };
37064
- form?.setFieldValue(groupFormId, _newData);
37065
- onValuesChange(_newData, {
37066
- ...formsValue,
37021
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
37022
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
37023
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
37024
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
37067
37025
  [groupFormId]: _newData
37068
- });
37069
- setValues({
37070
- ...formsValue,
37026
+ }));
37027
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
37071
37028
  [groupFormId]: _newData
37072
- });
37029
+ }));
37073
37030
  return;
37074
37031
  }
37075
- form?.setFieldValue(name, _val[name]);
37076
- onValuesChange(_val, {
37077
- ...formsValue,
37078
- ..._val
37079
- });
37080
- setValues({
37081
- ...formsValue,
37082
- ..._val
37083
- });
37032
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
37033
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
37034
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
37084
37035
  },
37085
37036
  k: name
37086
37037
  });
37087
37038
  },
37088
- textarea: ({
37089
- props,
37090
- rules
37091
- }, {
37092
- inputMeta,
37093
- t,
37094
- isHighlighted
37095
- }) => {
37039
+ textarea: (_ref24, _ref25) => {
37040
+ let {
37041
+ props,
37042
+ rules
37043
+ } = _ref24;
37044
+ let {
37045
+ inputMeta,
37046
+ t,
37047
+ isHighlighted
37048
+ } = _ref25;
37096
37049
  const maxRule = rules.find(r => r.max);
37097
37050
  let maxLength = MAX_TEXT_AREA_LENGTH;
37098
37051
  let rows = 5;
@@ -37119,7 +37072,7 @@ const inputTypeComponent$1 = {
37119
37072
  // rows = 14;
37120
37073
  // }
37121
37074
  }
37122
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
37075
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
37123
37076
  allowClear: true,
37124
37077
  autoComplete: "new-password",
37125
37078
  maxLength: maxLength,
@@ -37127,35 +37080,37 @@ const inputTypeComponent$1 = {
37127
37080
  autoSize: {
37128
37081
  minRows: rows,
37129
37082
  maxRows: rows
37130
- },
37131
- ...props,
37083
+ }
37084
+ }, props), {}, {
37132
37085
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
37133
37086
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
37134
- });
37087
+ }));
37135
37088
  },
37136
- phoneNumber: ({
37137
- name,
37138
- inputName,
37139
- props,
37140
- value,
37141
- repeatIndex,
37142
- repeatValues,
37143
- formsValue
37144
- }, {
37145
- setFormValues,
37146
- inputMeta,
37147
- t,
37148
- isHighlighted
37149
- }) => {
37150
- return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, {
37089
+ phoneNumber: (_ref26, _ref27) => {
37090
+ let {
37091
+ name,
37092
+ inputName,
37093
+ props,
37094
+ value,
37095
+ repeatIndex,
37096
+ repeatValues,
37097
+ formsValue
37098
+ } = _ref26;
37099
+ let {
37100
+ setFormValues,
37101
+ inputMeta,
37102
+ t,
37103
+ isHighlighted
37104
+ } = _ref27;
37105
+ return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, _objectSpread2(_objectSpread2({
37151
37106
  customSelectWidthPercentage: "20%",
37152
37107
  t: t,
37153
37108
  size: "large",
37154
37109
  allowClear: true,
37155
- country: formsValue?.country,
37110
+ country: formsValue === null || formsValue === void 0 ? void 0 : formsValue.country,
37156
37111
  initialValue: value,
37157
- name: name,
37158
- ...props,
37112
+ name: name
37113
+ }, props), {}, {
37159
37114
  className: formatClassname([isHighlighted && "highlighted-input"]),
37160
37115
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
37161
37116
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type Number"),
@@ -37176,26 +37131,27 @@ const inputTypeComponent$1 = {
37176
37131
  }
37177
37132
  return val;
37178
37133
  }
37179
- });
37134
+ }));
37180
37135
  },
37181
- switch: ({
37182
- props,
37183
- value,
37184
- restricted,
37185
- autocomplete,
37186
- formsValue,
37187
- repeatValues,
37188
- repeatIndex,
37189
- name,
37190
- inputName,
37191
- replace: replaceInput,
37192
- unique
37193
- }, {
37194
- form,
37195
- isHighlighted
37196
- }) => {
37197
- return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, {
37198
- ...props,
37136
+ switch: (_ref28, _ref29) => {
37137
+ let {
37138
+ props,
37139
+ value,
37140
+ restricted,
37141
+ autocomplete,
37142
+ formsValue,
37143
+ repeatValues,
37144
+ repeatIndex,
37145
+ name,
37146
+ inputName,
37147
+ replace: replaceInput,
37148
+ unique
37149
+ } = _ref28;
37150
+ let {
37151
+ form,
37152
+ isHighlighted
37153
+ } = _ref29;
37154
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, _objectSpread2(_objectSpread2({}, props), {}, {
37199
37155
  size: "default",
37200
37156
  defaultChecked: value || false,
37201
37157
  checked: value || false,
@@ -37223,9 +37179,7 @@ const inputTypeComponent$1 = {
37223
37179
  const [formName, replaceInputName] = replaceTo.split(".");
37224
37180
  const replaceRepeatValues = replaceInputName ? dot__default["default"].pick(formName, formsValue) : undefined;
37225
37181
  updateFormValues$1(undefined, replaceRepeatValues, replaceInputName, isChecked ? newId : undefined, formsValue, formName, form);
37226
- formsValue = Object.assign(formsValue, {
37227
- ...form.getFieldsValue(true)
37228
- });
37182
+ formsValue = Object.assign(formsValue, _objectSpread2({}, form.getFieldsValue(true)));
37229
37183
  if (oldId) {
37230
37184
  const allRepeatValues = dot__default["default"].pick(name, formsValue);
37231
37185
  if (allRepeatValues && Array.isArray(allRepeatValues)) {
@@ -37266,20 +37220,22 @@ const inputTypeComponent$1 = {
37266
37220
  }
37267
37221
  }
37268
37222
  }
37269
- });
37223
+ }));
37270
37224
  },
37271
- radioGroup: ({
37272
- props,
37273
- value,
37274
- options,
37275
- isRisk
37276
- }, {
37277
- isHighlighted
37278
- }) => {
37225
+ radioGroup: (_ref30, _ref31) => {
37226
+ let {
37227
+ props,
37228
+ value,
37229
+ options,
37230
+ isRisk
37231
+ } = _ref30;
37232
+ let {
37233
+ isHighlighted
37234
+ } = _ref31;
37279
37235
  if (isRisk) {
37280
- return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, {
37281
- value: value,
37282
- ...props,
37236
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, _objectSpread2(_objectSpread2({
37237
+ value: value
37238
+ }, props), {}, {
37283
37239
  className: "is-risk-radio",
37284
37240
  children: (options || []).map(o => {
37285
37241
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Radio, {
@@ -37293,11 +37249,11 @@ const inputTypeComponent$1 = {
37293
37249
  }) : null]
37294
37250
  }, o.value);
37295
37251
  })
37296
- });
37252
+ }));
37297
37253
  }
37298
- return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, {
37299
- value: value,
37300
- ...props,
37254
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, _objectSpread2(_objectSpread2({
37255
+ value: value
37256
+ }, props), {}, {
37301
37257
  className: formatClassname([isHighlighted && "highlighted-input"]),
37302
37258
  children: (options || []).map(o => {
37303
37259
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Radio, {
@@ -37311,18 +37267,20 @@ const inputTypeComponent$1 = {
37311
37267
  }) : null]
37312
37268
  }, o.value);
37313
37269
  })
37314
- });
37270
+ }));
37315
37271
  },
37316
- checkboxGroup: ({
37317
- props,
37318
- value,
37319
- options
37320
- }, {
37321
- isHighlighted
37322
- }) => {
37323
- return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox.Group, {
37324
- value: value,
37325
- ...props,
37272
+ checkboxGroup: (_ref32, _ref33) => {
37273
+ let {
37274
+ props,
37275
+ value,
37276
+ options
37277
+ } = _ref32;
37278
+ let {
37279
+ isHighlighted
37280
+ } = _ref33;
37281
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox.Group, _objectSpread2(_objectSpread2({
37282
+ value: value
37283
+ }, props), {}, {
37326
37284
  className: formatClassname([isHighlighted && "highlighted-input"]),
37327
37285
  style: {
37328
37286
  display: "grid",
@@ -37346,16 +37304,18 @@ const inputTypeComponent$1 = {
37346
37304
  }) : null]
37347
37305
  }, o.value);
37348
37306
  })
37349
- });
37307
+ }));
37350
37308
  },
37351
- total100: ({
37352
- props,
37353
- name,
37354
- options,
37355
- value
37356
- }, {
37357
- isHighlighted
37358
- }) => {
37309
+ total100: (_ref34, _ref35) => {
37310
+ let {
37311
+ props,
37312
+ name,
37313
+ options,
37314
+ value
37315
+ } = _ref34;
37316
+ let {
37317
+ isHighlighted
37318
+ } = _ref35;
37359
37319
  value = value ? Array.isArray(value) ? value : [value] : [];
37360
37320
  function totalValue() {
37361
37321
  let total = 0;
@@ -37379,10 +37339,11 @@ const inputTypeComponent$1 = {
37379
37339
  className: formatClassname(["total100", isHighlighted && "highlighted-input"]),
37380
37340
  children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.List, {
37381
37341
  name: name,
37382
- children: (fields, {
37383
- add,
37384
- remove
37385
- }) => {
37342
+ children: (fields, _ref36) => {
37343
+ let {
37344
+ add,
37345
+ remove
37346
+ } = _ref36;
37386
37347
  if (fields.length === 0) {
37387
37348
  const formData = value || [];
37388
37349
  if (formData.length) {
@@ -37401,27 +37362,27 @@ const inputTypeComponent$1 = {
37401
37362
  const v = value[field.name] || {};
37402
37363
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Space, {
37403
37364
  className: "total",
37404
- children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
37405
- noStyle: true,
37406
- ...field,
37365
+ children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
37366
+ noStyle: true
37367
+ }, field), {}, {
37407
37368
  name: [field.name, "type"],
37408
37369
  fieldKey: [field.fieldKey, "type"],
37409
37370
  initialValue: v.type || null,
37410
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
37371
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
37411
37372
  size: "large",
37412
37373
  allowClear: true,
37413
37374
  showSearch: true,
37414
37375
  filterOption: filterSelectOptions,
37415
- optionFilterProp: "children",
37416
- ...props,
37376
+ optionFilterProp: "children"
37377
+ }, props), {}, {
37417
37378
  children: options.map((option, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
37418
37379
  value: option.value,
37419
37380
  children: option.label
37420
37381
  }, i))
37421
- })
37422
- }), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
37423
- noStyle: true,
37424
- ...field,
37382
+ }))
37383
+ })), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
37384
+ noStyle: true
37385
+ }, field), {}, {
37425
37386
  name: [field.name, "value"],
37426
37387
  fieldKey: [field.fieldKey, "value"],
37427
37388
  initialValue: v.value,
@@ -37430,14 +37391,14 @@ const inputTypeComponent$1 = {
37430
37391
  allowClear: true,
37431
37392
  name: "value",
37432
37393
  formatter: value => {
37433
- return value ? `${value}%` : "";
37394
+ return value ? "".concat(value, "%") : "";
37434
37395
  },
37435
37396
  disabled: !v.type || null,
37436
37397
  placeholder: props.valueplaceholder ? props.valueplaceholder : "Value",
37437
37398
  min: 1,
37438
37399
  max: 100 - siblingTotal(v.type || 0)
37439
37400
  })
37440
- }), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
37401
+ })), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
37441
37402
  disabled: !v.value || !v.type || totalValue() >= 100,
37442
37403
  type: "primary",
37443
37404
  icon: /*#__PURE__*/jsxRuntime.jsx(Icons.PlusOutlined, {}),
@@ -37469,19 +37430,22 @@ const inputTypeComponent$1 = {
37469
37430
  }) : null]
37470
37431
  });
37471
37432
  },
37472
- percentage: ({
37473
- name,
37474
- inputName,
37475
- totalMax,
37476
- repeatIndex,
37477
- props,
37478
- formsValue,
37479
- input
37480
- }, {
37481
- inputMeta,
37482
- t,
37483
- isHighlighted
37484
- }) => {
37433
+ percentage: (_ref37, _ref38) => {
37434
+ var _input$meta11;
37435
+ let {
37436
+ name,
37437
+ inputName,
37438
+ totalMax,
37439
+ repeatIndex,
37440
+ props,
37441
+ formsValue,
37442
+ input
37443
+ } = _ref37;
37444
+ let {
37445
+ inputMeta,
37446
+ t,
37447
+ isHighlighted
37448
+ } = _ref38;
37485
37449
  const isRepeatable = Array.isArray(formsValue[name]);
37486
37450
  let totalSiblings = 0;
37487
37451
  if (isRepeatable && totalMax) {
@@ -37489,45 +37453,47 @@ const inputTypeComponent$1 = {
37489
37453
  totl = totl + (grp[inputName] || 0);
37490
37454
  return totl;
37491
37455
  }, 0);
37492
- } else if (Array.isArray(input?.meta?.siblings)) {
37456
+ } else if (Array.isArray(input === null || input === void 0 || (_input$meta11 = input.meta) === null || _input$meta11 === void 0 ? void 0 : _input$meta11.siblings)) {
37493
37457
  totalSiblings = input.meta.siblings.reduce((totl, key) => {
37494
37458
  totl = totl + (formsValue[key] || 0);
37495
37459
  return totl;
37496
37460
  }, 0);
37497
37461
  }
37498
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
37462
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
37499
37463
  size: "large",
37500
- allowClear: true,
37501
- ...props,
37464
+ allowClear: true
37465
+ }, props), {}, {
37502
37466
  className: formatClassname([isHighlighted && "highlighted-cont"]),
37503
37467
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
37504
37468
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type number"),
37505
37469
  min: 0,
37506
37470
  max: 100 - totalSiblings,
37507
37471
  formatter: value => {
37508
- return value ? `${value}` : "";
37472
+ return value ? "".concat(value) : "";
37509
37473
  },
37510
37474
  parser: value => value.replace("%", ""),
37511
37475
  addonAfter: "%"
37512
- });
37476
+ }));
37513
37477
  },
37514
- drawTerritory: ({
37515
- formsValue,
37516
- name,
37517
- addressData
37518
- }, {
37519
- setFormValues
37520
- }) => {
37478
+ drawTerritory: (_ref39, _ref40) => {
37479
+ let {
37480
+ formsValue,
37481
+ name,
37482
+ addressData
37483
+ } = _ref39;
37484
+ let {
37485
+ setFormValues
37486
+ } = _ref40;
37521
37487
  let search = formsValue.country;
37522
37488
  if (addressData && addressData.address && Object.keys(addressData.address).length > 0) {
37523
37489
  if (addressData.address.country) {
37524
37490
  search = addressData.address.country;
37525
37491
  }
37526
37492
  if (addressData.address.level1) {
37527
- search = `${addressData.address.level1}, ${addressData.address.country}`;
37493
+ search = "".concat(addressData.address.level1, ", ").concat(addressData.address.country);
37528
37494
  }
37529
37495
  if (addressData.address.level2) {
37530
- search = `${addressData.address.level2}, ${addressData.address.level1}, ${addressData.address.country}`;
37496
+ search = "".concat(addressData.address.level2, ", ").concat(addressData.address.level1, ", ").concat(addressData.address.country);
37531
37497
  }
37532
37498
  } else {
37533
37499
  const country = countriesList.countries[formsValue.country] || {};
@@ -37535,10 +37501,10 @@ const inputTypeComponent$1 = {
37535
37501
  search = country.name;
37536
37502
  }
37537
37503
  if (formsValue.administrativeLevel1Name) {
37538
- search = `${search} ${formsValue.administrativeLevel1Name}`;
37504
+ search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
37539
37505
  }
37540
37506
  if (formsValue.administrativeLevel2Name) {
37541
- search = `${search} ${formsValue.administrativeLevel2Name}`;
37507
+ search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
37542
37508
  }
37543
37509
  }
37544
37510
  return /*#__PURE__*/jsxRuntime.jsx(PolygonSelector, {
@@ -37550,32 +37516,36 @@ const inputTypeComponent$1 = {
37550
37516
  searchValue: search
37551
37517
  });
37552
37518
  },
37553
- year: ({
37554
- props
37555
- }, {
37556
- isHighlighted
37557
- }) => {
37519
+ year: (_ref41, _ref42) => {
37520
+ let {
37521
+ props
37522
+ } = _ref41;
37523
+ let {
37524
+ isHighlighted
37525
+ } = _ref42;
37558
37526
  const lng = localStorage.getItem("datastakeLng") || "en";
37559
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
37527
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
37560
37528
  size: "large",
37561
37529
  allowClear: true,
37562
37530
  locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"],
37563
- picker: "year",
37564
- ...props,
37531
+ picker: "year"
37532
+ }, props), {}, {
37565
37533
  className: formatClassname([isHighlighted && "highlighted-input"]),
37566
37534
  format: "YYYY"
37567
- });
37535
+ }));
37568
37536
  },
37569
- upload: ({
37570
- rules,
37571
- value
37572
- }, {
37573
- setLoading = () => {},
37574
- getApiBaseUrl,
37575
- getAppHeader,
37576
- t,
37577
- isHighlighted
37578
- }) => {
37537
+ upload: (_ref43, _ref44) => {
37538
+ let {
37539
+ rules,
37540
+ value
37541
+ } = _ref43;
37542
+ let {
37543
+ setLoading = () => {},
37544
+ getApiBaseUrl,
37545
+ getAppHeader,
37546
+ t,
37547
+ isHighlighted
37548
+ } = _ref44;
37579
37549
  const apiURL = getApiBaseUrl();
37580
37550
  const accept = rules.length ? rules.find(rule => Object.keys(rule).includes("accept")).accept || "*" : null;
37581
37551
  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) : []) || [];
@@ -37588,13 +37558,12 @@ const inputTypeComponent$1 = {
37588
37558
  maxProps.multiple = true;
37589
37559
  }
37590
37560
  }
37591
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
37592
- ...maxProps,
37561
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({}, maxProps), {}, {
37593
37562
  accept: accept,
37594
- action: `${apiURL}/upload`,
37563
+ action: "".concat(apiURL, "/upload"),
37595
37564
  beforeUpload: beforeUpload(allowedExtensions),
37596
37565
  onChange: val => {
37597
- if (val?.file && typeof setLoading === "function") {
37566
+ if (val !== null && val !== void 0 && val.file && typeof setLoading === "function") {
37598
37567
  if (val.file.percent !== 100) {
37599
37568
  setLoading(true);
37600
37569
  } else {
@@ -37602,10 +37571,9 @@ const inputTypeComponent$1 = {
37602
37571
  }
37603
37572
  }
37604
37573
  },
37605
- headers: {
37606
- Authorization: `Bearer ${getToken()}`,
37607
- ...getAppHeader()
37608
- },
37574
+ headers: _objectSpread2({
37575
+ Authorization: "Bearer ".concat(getToken())
37576
+ }, getAppHeader()),
37609
37577
  defaultFileList: values,
37610
37578
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
37611
37579
  style: {
@@ -37616,18 +37584,20 @@ const inputTypeComponent$1 = {
37616
37584
  children: t("Upload")
37617
37585
  })]
37618
37586
  })
37619
- });
37587
+ }));
37620
37588
  },
37621
- imageUpload: ({
37622
- rules,
37623
- value
37624
- }, {
37625
- setLoading = () => {},
37626
- getApiBaseUrl,
37627
- getAppHeader,
37628
- t,
37629
- isHighlighted
37630
- }) => {
37589
+ imageUpload: (_ref45, _ref46) => {
37590
+ let {
37591
+ rules,
37592
+ value
37593
+ } = _ref45;
37594
+ let {
37595
+ setLoading = () => {},
37596
+ getApiBaseUrl,
37597
+ getAppHeader,
37598
+ t,
37599
+ isHighlighted
37600
+ } = _ref46;
37631
37601
  const apiURL = getApiBaseUrl();
37632
37602
  const values = getImageUploadEditValue(value);
37633
37603
  const maxRule = rules.find(r => r.max);
@@ -37638,17 +37608,18 @@ const inputTypeComponent$1 = {
37638
37608
  maxProps.multiple = true;
37639
37609
  }
37640
37610
  }
37641
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
37642
- beforeUpload: beforeUpload(allowedImageExtensions),
37643
- ...maxProps,
37611
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({
37612
+ beforeUpload: beforeUpload(allowedImageExtensions)
37613
+ }, maxProps), {}, {
37644
37614
  accept: "image/*",
37645
37615
  classList: !values || !values.length ? "empty" : "",
37646
37616
  listType: "picture",
37647
- action: `${apiURL}/upload`,
37617
+ action: "".concat(apiURL, "/upload"),
37648
37618
  onChange: val => {
37649
37619
  if (typeof setLoading === "function") {
37650
- if (val?.file) {
37651
- if (val?.file?.status === "removed") {
37620
+ if (val !== null && val !== void 0 && val.file) {
37621
+ var _val$file;
37622
+ if ((val === null || val === void 0 || (_val$file = val.file) === null || _val$file === void 0 ? void 0 : _val$file.status) === "removed") {
37652
37623
  setLoading(false);
37653
37624
  return;
37654
37625
  }
@@ -37660,10 +37631,9 @@ const inputTypeComponent$1 = {
37660
37631
  setLoading(false);
37661
37632
  }
37662
37633
  },
37663
- headers: {
37664
- Authorization: `Bearer ${getToken()}`,
37665
- ...getAppHeader()
37666
- },
37634
+ headers: _objectSpread2({
37635
+ Authorization: "Bearer ".concat(getToken())
37636
+ }, getAppHeader()),
37667
37637
  defaultFileList: values,
37668
37638
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
37669
37639
  style: {
@@ -37674,18 +37644,20 @@ const inputTypeComponent$1 = {
37674
37644
  children: t("Upload")
37675
37645
  })]
37676
37646
  })
37677
- });
37647
+ }));
37678
37648
  },
37679
- videoUpload: ({
37680
- rules,
37681
- value
37682
- }, {
37683
- setLoading = () => {},
37684
- getApiBaseUrl,
37685
- getAppHeader,
37686
- t,
37687
- isHighlighted
37688
- }) => {
37649
+ videoUpload: (_ref47, _ref48) => {
37650
+ let {
37651
+ rules,
37652
+ value
37653
+ } = _ref47;
37654
+ let {
37655
+ setLoading = () => {},
37656
+ getApiBaseUrl,
37657
+ getAppHeader,
37658
+ t,
37659
+ isHighlighted
37660
+ } = _ref48;
37689
37661
  const apiURL = getApiBaseUrl();
37690
37662
  const values = getImageUploadEditValue(value);
37691
37663
  const maxRule = rules.find(r => r.max);
@@ -37696,21 +37668,25 @@ const inputTypeComponent$1 = {
37696
37668
  maxProps.multiple = true;
37697
37669
  }
37698
37670
  }
37699
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
37700
- itemRender: (item, fileList) => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
37701
- children: [/*#__PURE__*/jsxRuntime.jsx(EditVideoPreview, {
37702
- url: fileList?.response?.url || fileList?.url
37703
- }), item]
37704
- }),
37705
- ...maxProps,
37671
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({
37672
+ itemRender: (item, fileList) => {
37673
+ var _fileList$response;
37674
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
37675
+ children: [/*#__PURE__*/jsxRuntime.jsx(EditVideoPreview, {
37676
+ 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)
37677
+ }), item]
37678
+ });
37679
+ }
37680
+ }, maxProps), {}, {
37706
37681
  accept: "video/*",
37707
37682
  classList: !values || !values.length ? "empty" : "",
37708
37683
  listType: "picture",
37709
- action: `${apiURL}/upload`,
37684
+ action: "".concat(apiURL, "/upload"),
37710
37685
  onChange: val => {
37711
37686
  if (typeof setLoading === "function") {
37712
- if (val?.file) {
37713
- if (val?.file?.status === "removed") {
37687
+ if (val !== null && val !== void 0 && val.file) {
37688
+ var _val$file2;
37689
+ if ((val === null || val === void 0 || (_val$file2 = val.file) === null || _val$file2 === void 0 ? void 0 : _val$file2.status) === "removed") {
37714
37690
  setLoading(false);
37715
37691
  return;
37716
37692
  }
@@ -37722,10 +37698,9 @@ const inputTypeComponent$1 = {
37722
37698
  setLoading(false);
37723
37699
  }
37724
37700
  },
37725
- headers: {
37726
- Authorization: `Bearer ${getToken()}`,
37727
- ...getAppHeader()
37728
- },
37701
+ headers: _objectSpread2({
37702
+ Authorization: "Bearer ".concat(getToken())
37703
+ }, getAppHeader()),
37729
37704
  fileList: values,
37730
37705
  defaultFileList: values,
37731
37706
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
@@ -37737,28 +37712,30 @@ const inputTypeComponent$1 = {
37737
37712
  children: t("Upload")
37738
37713
  })]
37739
37714
  })
37740
- });
37715
+ }));
37741
37716
  },
37742
- geolocation: ({
37743
- value,
37744
- name,
37745
- props,
37746
- formsValue,
37747
- addressData
37748
- }, {
37749
- inputMeta,
37750
- isHighlighted
37751
- }) => {
37717
+ geolocation: (_ref49, _ref50) => {
37718
+ let {
37719
+ value,
37720
+ name,
37721
+ props,
37722
+ formsValue,
37723
+ addressData
37724
+ } = _ref49;
37725
+ let {
37726
+ inputMeta,
37727
+ isHighlighted
37728
+ } = _ref50;
37752
37729
  let search = formsValue.country;
37753
37730
  if (addressData && Object.keys(addressData).length > 0) {
37754
37731
  if (addressData.country) {
37755
37732
  search = addressData.country;
37756
37733
  }
37757
37734
  if (addressData.level1) {
37758
- search = `${addressData.level1}, ${addressData.country}`;
37735
+ search = "".concat(addressData.level1, ", ").concat(addressData.country);
37759
37736
  }
37760
37737
  if (addressData.level2) {
37761
- search = `${addressData.level2}, ${addressData.level1}, ${addressData.country}`;
37738
+ search = "".concat(addressData.level2, ", ").concat(addressData.level1, ", ").concat(addressData.country);
37762
37739
  }
37763
37740
  } else {
37764
37741
  const country = countriesList.countries[formsValue.country] || {};
@@ -37766,10 +37743,10 @@ const inputTypeComponent$1 = {
37766
37743
  search = country.name;
37767
37744
  }
37768
37745
  if (formsValue.administrativeLevel1Name) {
37769
- search = `${search} ${formsValue.administrativeLevel1Name}`;
37746
+ search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
37770
37747
  }
37771
37748
  if (formsValue.administrativeLevel2Name) {
37772
- search = `${search} ${formsValue.administrativeLevel2Name}`;
37749
+ search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
37773
37750
  }
37774
37751
  }
37775
37752
  return /*#__PURE__*/jsxRuntime.jsx(Geolocation, {
@@ -37783,34 +37760,36 @@ const inputTypeComponent$1 = {
37783
37760
  searchValue: search
37784
37761
  });
37785
37762
  },
37786
- ajaxSelect: ({
37787
- call,
37788
- automaticallyLink,
37789
- name,
37790
- inputName,
37791
- props,
37792
- formsValue,
37793
- onNewSetValue,
37794
- multiple,
37795
- updateOptions,
37796
- repeatValues,
37797
- repeatIndex,
37798
- value,
37799
- unique,
37800
- address,
37801
- addressData = {},
37802
- getFromLinking,
37803
- input
37804
- }, {
37805
- form,
37806
- forms,
37807
- setAddress,
37808
- changeInputMeta,
37809
- inputMeta,
37810
- meta,
37811
- isHighlighted,
37812
- groupFormId
37813
- }) => {
37763
+ ajaxSelect: (_ref51, _ref52) => {
37764
+ let {
37765
+ call,
37766
+ automaticallyLink,
37767
+ name,
37768
+ inputName,
37769
+ props,
37770
+ formsValue,
37771
+ onNewSetValue,
37772
+ multiple,
37773
+ updateOptions,
37774
+ repeatValues,
37775
+ repeatIndex,
37776
+ value,
37777
+ unique,
37778
+ address,
37779
+ addressData = {},
37780
+ getFromLinking,
37781
+ input
37782
+ } = _ref51;
37783
+ let {
37784
+ form,
37785
+ forms,
37786
+ setAddress,
37787
+ changeInputMeta,
37788
+ inputMeta,
37789
+ meta,
37790
+ isHighlighted,
37791
+ groupFormId
37792
+ } = _ref52;
37814
37793
  return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect, {
37815
37794
  size: "medium",
37816
37795
  input: input,
@@ -37847,9 +37826,7 @@ const inputTypeComponent$1 = {
37847
37826
  const selectedValue = data.find(v => v.value === ev);
37848
37827
  if (address && selectedValue) {
37849
37828
  dot__default["default"].str(address, selectedValue.label, addressData);
37850
- setAddress({
37851
- ...addressData
37852
- });
37829
+ setAddress(_objectSpread2({}, addressData));
37853
37830
  }
37854
37831
  }
37855
37832
  },
@@ -37858,10 +37835,11 @@ const inputTypeComponent$1 = {
37858
37835
  address: true
37859
37836
  });
37860
37837
  },
37861
- tag: ({
37862
- value,
37863
- repeatLabel
37864
- }) => {
37838
+ tag: _ref53 => {
37839
+ let {
37840
+ value,
37841
+ repeatLabel
37842
+ } = _ref53;
37865
37843
  return /*#__PURE__*/jsxRuntime.jsx(TagInput, {
37866
37844
  size: "large",
37867
37845
  allowClear: true,
@@ -37869,26 +37847,28 @@ const inputTypeComponent$1 = {
37869
37847
  newPlaceholder: repeatLabel
37870
37848
  });
37871
37849
  },
37872
- modal: ({
37873
- call,
37874
- automaticallyLink,
37875
- name,
37876
- inputName,
37877
- props,
37878
- formsValue,
37879
- allFormsValue,
37880
- onNewSetValue,
37881
- repeatValues,
37882
- repeatIndex,
37883
- value,
37884
- modalTitle,
37885
- totalInputs,
37886
- shownInputs,
37887
- allowDupplicates
37888
- }, {
37889
- form,
37890
- add
37891
- }) => {
37850
+ modal: (_ref54, _ref55) => {
37851
+ let {
37852
+ call,
37853
+ automaticallyLink,
37854
+ name,
37855
+ inputName,
37856
+ props,
37857
+ formsValue,
37858
+ allFormsValue,
37859
+ onNewSetValue,
37860
+ repeatValues,
37861
+ repeatIndex,
37862
+ value,
37863
+ modalTitle,
37864
+ totalInputs,
37865
+ shownInputs,
37866
+ allowDupplicates
37867
+ } = _ref54;
37868
+ let {
37869
+ form,
37870
+ add
37871
+ } = _ref55;
37892
37872
  return /*#__PURE__*/jsxRuntime.jsx(AjaxModal, {
37893
37873
  allowClear: true,
37894
37874
  call: call,
@@ -37911,40 +37891,44 @@ const inputTypeComponent$1 = {
37911
37891
  allowDupplicates: allowDupplicates
37912
37892
  });
37913
37893
  },
37914
- dataLink: ({
37915
- setValues,
37916
- name,
37917
- onValuesChange,
37918
- changeLinking,
37919
- formsValue,
37920
- input,
37921
- call,
37922
- automaticallyLink,
37923
- inputName,
37924
- props,
37925
- onNewSetValue,
37926
- multiple,
37927
- updateOptions,
37928
- repeatValues,
37929
- repeatIndex,
37930
- value,
37931
- unique,
37932
- address,
37933
- addressData = {},
37934
- getFromLinking
37935
- }, {
37936
- form,
37937
- forms,
37938
- setAddress,
37939
- changeInputMeta,
37940
- inputMeta,
37941
- meta,
37942
- isHighlighted,
37943
- groupFormId
37944
- }) => {
37945
- if (input?.meta?.optionsView?.editInputType === "ajaxSelect") {
37946
- const currentValue = groupFormId ? formsValue[groupFormId]?.[name] : formsValue[name];
37947
- input?.meta?.optionsView?.call || input?.meta?.call || "default::list()::::";
37894
+ dataLink: (_ref56, _ref57) => {
37895
+ var _input$meta12, _input$meta15, _input$meta16, _formsValue$meta5, _input$meta18;
37896
+ let {
37897
+ setValues,
37898
+ name,
37899
+ onValuesChange,
37900
+ changeLinking,
37901
+ formsValue,
37902
+ input,
37903
+ call,
37904
+ automaticallyLink,
37905
+ inputName,
37906
+ props,
37907
+ onNewSetValue,
37908
+ multiple,
37909
+ updateOptions,
37910
+ repeatValues,
37911
+ repeatIndex,
37912
+ value,
37913
+ unique,
37914
+ address,
37915
+ addressData = {},
37916
+ getFromLinking
37917
+ } = _ref56;
37918
+ let {
37919
+ form,
37920
+ forms,
37921
+ setAddress,
37922
+ changeInputMeta,
37923
+ inputMeta,
37924
+ meta,
37925
+ isHighlighted,
37926
+ groupFormId
37927
+ } = _ref57;
37928
+ 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") {
37929
+ var _formsValue$groupForm3, _input$meta13, _input$meta14;
37930
+ const currentValue = groupFormId ? (_formsValue$groupForm3 = formsValue[groupFormId]) === null || _formsValue$groupForm3 === void 0 ? void 0 : _formsValue$groupForm3[name] : formsValue[name];
37931
+ (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()::::";
37948
37932
  return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect$1, {
37949
37933
  size: "medium",
37950
37934
  input: input,
@@ -37981,9 +37965,7 @@ const inputTypeComponent$1 = {
37981
37965
  const selectedValue = data.find(v => v.value === ev);
37982
37966
  if (address && selectedValue) {
37983
37967
  dot__default["default"].str(address, selectedValue.label, addressData);
37984
- setAddress({
37985
- ...addressData
37986
- });
37968
+ setAddress(_objectSpread2({}, addressData));
37987
37969
  }
37988
37970
  }
37989
37971
  },
@@ -37993,138 +37975,93 @@ const inputTypeComponent$1 = {
37993
37975
  isDataLink: true
37994
37976
  });
37995
37977
  }
37996
- const isSingle = input?.meta?.maxRepeat === 1;
37997
- const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [{
37998
- ...(formsValue[groupFormId] || {})[name]
37999
- }] : [] : getArray((formsValue[groupFormId] || {})[name] || []).map(v => ({
38000
- ...v
38001
- })) : isSingle ? formsValue[name] ? [{
38002
- ...formsValue[name]
38003
- }] : [] : (formsValue[name] || []).map(v => ({
38004
- ...v
38005
- }));
37978
+ const isSingle = (input === null || input === void 0 || (_input$meta15 = input.meta) === null || _input$meta15 === void 0 ? void 0 : _input$meta15.maxRepeat) === 1;
37979
+ 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));
38006
37980
  const onUpdate = (editData, i) => {
38007
- const val = {
38008
- ...formData[i],
38009
- ...editData
38010
- };
37981
+ const val = _objectSpread2(_objectSpread2({}, formData[i]), editData);
38011
37982
  const _val = isSingle ? {
38012
37983
  [name]: val
38013
37984
  } : {
38014
- [name]: formData?.map((d, j) => i === j ? val : d)
37985
+ [name]: formData === null || formData === void 0 ? void 0 : formData.map((d, j) => i === j ? val : d)
38015
37986
  };
38016
37987
  if (groupFormId) {
38017
- const _defaultData = form?.getFieldValue(groupFormId) || {};
38018
- const _newData = {
38019
- ..._defaultData,
38020
- ..._val
38021
- };
38022
- onValuesChange(_newData, {
38023
- ...formsValue,
37988
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
37989
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
37990
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
38024
37991
  [groupFormId]: _newData
38025
- });
38026
- form?.setFieldValue(groupFormId, _newData);
38027
- setValues({
38028
- ...formsValue,
37992
+ }));
37993
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
37994
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
38029
37995
  [groupFormId]: _newData
38030
- });
37996
+ }));
38031
37997
  return;
38032
37998
  }
38033
- onValuesChange(_val, {
38034
- ...formsValue,
38035
- ..._val
38036
- });
38037
- form?.setFieldValue(name, _val[name]);
38038
- setValues({
38039
- ...formsValue,
38040
- ..._val
38041
- });
37999
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
38000
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
38001
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
38042
38002
  };
38043
- if (input?.meta?.flat) {
38003
+ if (input !== null && input !== void 0 && (_input$meta16 = input.meta) !== null && _input$meta16 !== void 0 && _input$meta16.flat) {
38004
+ var _formsValue$meta4, _input$meta17;
38044
38005
  return /*#__PURE__*/jsxRuntime.jsx(DataLinkFlat, {
38045
38006
  form: input,
38046
38007
  changeLinking: changeLinking,
38047
38008
  onUpdate: onUpdate,
38048
38009
  isHighlighted: isHighlighted,
38049
38010
  formsValue: formsValue,
38050
- values: groupFormId ? {
38051
- ...(formsValue[groupFormId] || {}),
38011
+ values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
38052
38012
  meta: {
38053
- inputs: (formsValue?.meta?.inputs || {})[groupFormId]
38013
+ inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta4 = formsValue.meta) === null || _formsValue$meta4 === void 0 ? void 0 : _formsValue$meta4.inputs) || {})[groupFormId]
38054
38014
  }
38055
- } : formsValue,
38015
+ }) : formsValue,
38056
38016
  name: name,
38057
38017
  groupFormId: groupFormId,
38058
- maxRepeat: input?.meta?.maxRepeat,
38059
- remove: ({
38060
- key
38061
- }) => {
38018
+ maxRepeat: input === null || input === void 0 || (_input$meta17 = input.meta) === null || _input$meta17 === void 0 ? void 0 : _input$meta17.maxRepeat,
38019
+ remove: _ref58 => {
38020
+ let {
38021
+ key
38022
+ } = _ref58;
38062
38023
  const _val = isSingle ? {
38063
38024
  [name]: null
38064
38025
  } : {
38065
38026
  [name]: formData.filter((v, i) => i !== key)
38066
38027
  };
38067
38028
  if (groupFormId) {
38068
- const _defaultData = form?.getFieldValue(groupFormId) || {};
38069
- const _newData = {
38070
- ..._defaultData,
38071
- ..._val
38072
- };
38073
- onValuesChange(_newData, {
38074
- ...formsValue,
38029
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
38030
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
38031
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
38075
38032
  [groupFormId]: _newData
38076
- });
38077
- form?.setFieldValue(groupFormId, _newData);
38078
- setValues({
38079
- ...formsValue,
38033
+ }));
38034
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
38035
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
38080
38036
  [groupFormId]: _newData
38081
- });
38037
+ }));
38082
38038
  return;
38083
38039
  }
38084
- onValuesChange(_val, {
38085
- ...formsValue,
38086
- ..._val
38087
- });
38088
- form?.setFieldValue(name, _val[name]);
38089
- setValues({
38090
- ...formsValue,
38091
- ..._val
38092
- });
38040
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
38041
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
38042
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
38093
38043
  },
38094
38044
  add: val => {
38095
38045
  const _val = isSingle ? {
38096
38046
  [name]: val
38097
38047
  } : {
38098
- [name]: [...formData, {
38099
- ...val
38100
- }]
38048
+ [name]: [...formData, _objectSpread2({}, val)]
38101
38049
  };
38102
38050
  if (groupFormId) {
38103
- const _defaultData = form?.getFieldValue(groupFormId) || {};
38104
- const _newData = {
38105
- ..._defaultData,
38106
- ..._val
38107
- };
38108
- form?.setFieldValue(groupFormId, _newData);
38109
- onValuesChange(_newData, {
38110
- ...formsValue,
38051
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
38052
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
38053
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
38054
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
38111
38055
  [groupFormId]: _newData
38112
- });
38113
- setValues({
38114
- ...formsValue,
38056
+ }));
38057
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
38115
38058
  [groupFormId]: _newData
38116
- });
38059
+ }));
38117
38060
  return;
38118
38061
  }
38119
- form?.setFieldValue(name, _val[name]);
38120
- onValuesChange(_val, {
38121
- ...formsValue,
38122
- ..._val
38123
- });
38124
- setValues({
38125
- ...formsValue,
38126
- ..._val
38127
- });
38062
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
38063
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
38064
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
38128
38065
  },
38129
38066
  k: name,
38130
38067
  formData: formData
@@ -38136,101 +38073,79 @@ const inputTypeComponent$1 = {
38136
38073
  onUpdate: onUpdate,
38137
38074
  isHighlighted: isHighlighted,
38138
38075
  formsValue: formsValue,
38139
- values: groupFormId ? {
38140
- ...(formsValue[groupFormId] || {}),
38076
+ values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
38141
38077
  meta: {
38142
- inputs: (formsValue?.meta?.inputs || {})[groupFormId]
38078
+ inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta5 = formsValue.meta) === null || _formsValue$meta5 === void 0 ? void 0 : _formsValue$meta5.inputs) || {})[groupFormId]
38143
38079
  }
38144
- } : formsValue,
38080
+ }) : formsValue,
38145
38081
  name: name,
38146
38082
  groupFormId: groupFormId,
38147
- maxRepeat: input?.meta?.maxRepeat,
38148
- remove: ({
38149
- key
38150
- }) => {
38083
+ maxRepeat: input === null || input === void 0 || (_input$meta18 = input.meta) === null || _input$meta18 === void 0 ? void 0 : _input$meta18.maxRepeat,
38084
+ remove: _ref59 => {
38085
+ let {
38086
+ key
38087
+ } = _ref59;
38151
38088
  const _val = isSingle ? {
38152
38089
  [name]: null
38153
38090
  } : {
38154
38091
  [name]: formData.filter((v, i) => i !== key)
38155
38092
  };
38156
38093
  if (groupFormId) {
38157
- const _defaultData = form?.getFieldValue(groupFormId) || {};
38158
- const _newData = {
38159
- ..._defaultData,
38160
- ..._val
38161
- };
38162
- onValuesChange(_newData, {
38163
- ...formsValue,
38094
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
38095
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
38096
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
38164
38097
  [groupFormId]: _newData
38165
- });
38166
- form?.setFieldValue(groupFormId, _newData);
38167
- setValues({
38168
- ...formsValue,
38098
+ }));
38099
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
38100
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
38169
38101
  [groupFormId]: _newData
38170
- });
38102
+ }));
38171
38103
  return;
38172
38104
  }
38173
- onValuesChange(_val, {
38174
- ...formsValue,
38175
- ..._val
38176
- });
38177
- form?.setFieldValue(name, _val[name]);
38178
- setValues({
38179
- ...formsValue,
38180
- ..._val
38181
- });
38105
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
38106
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
38107
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
38182
38108
  },
38183
38109
  add: val => {
38184
38110
  const _val = isSingle ? {
38185
38111
  [name]: val
38186
38112
  } : {
38187
- [name]: [...formData, {
38188
- ...val
38189
- }]
38113
+ [name]: [...formData, _objectSpread2({}, val)]
38190
38114
  };
38191
38115
  if (groupFormId) {
38192
- const _defaultData = form?.getFieldValue(groupFormId) || {};
38193
- const _newData = {
38194
- ..._defaultData,
38195
- ..._val
38196
- };
38197
- form?.setFieldValue(groupFormId, _newData);
38198
- onValuesChange(_newData, {
38199
- ...formsValue,
38116
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
38117
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
38118
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
38119
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
38200
38120
  [groupFormId]: _newData
38201
- });
38202
- setValues({
38203
- ...formsValue,
38121
+ }));
38122
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
38204
38123
  [groupFormId]: _newData
38205
- });
38124
+ }));
38206
38125
  return;
38207
38126
  }
38208
- form?.setFieldValue(name, _val[name]);
38209
- onValuesChange(_val, {
38210
- ...formsValue,
38211
- ..._val
38212
- });
38213
- setValues({
38214
- ...formsValue,
38215
- ..._val
38216
- });
38127
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
38128
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
38129
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
38217
38130
  },
38218
38131
  k: name,
38219
38132
  formData: formData
38220
38133
  });
38221
38134
  },
38222
- dataLinkGroup: ({
38223
- setValues,
38224
- name,
38225
- onValuesChange,
38226
- changeLinking,
38227
- formsValue,
38228
- input
38229
- }, {
38230
- form,
38231
- groupFormId,
38232
- isHighlighted
38233
- }) => {
38135
+ dataLinkGroup: (_ref60, _ref61) => {
38136
+ let {
38137
+ setValues,
38138
+ name,
38139
+ onValuesChange,
38140
+ changeLinking,
38141
+ formsValue,
38142
+ input
38143
+ } = _ref60;
38144
+ let {
38145
+ form,
38146
+ groupFormId,
38147
+ isHighlighted
38148
+ } = _ref61;
38234
38149
  return renderDataLinkGroup({
38235
38150
  input,
38236
38151
  name,
@@ -38243,51 +38158,41 @@ const inputTypeComponent$1 = {
38243
38158
  isHighlighted
38244
38159
  });
38245
38160
  },
38246
- groupCheckbox: ({
38247
- setValues,
38248
- name,
38249
- onValuesChange,
38250
- formsValue,
38251
- input
38252
- }, {
38253
- form,
38254
- groupFormId,
38255
- isHighlighted
38256
- }) => {
38161
+ groupCheckbox: (_ref62, _ref63) => {
38162
+ let {
38163
+ setValues,
38164
+ name,
38165
+ onValuesChange,
38166
+ formsValue,
38167
+ input
38168
+ } = _ref62;
38169
+ let {
38170
+ form,
38171
+ groupFormId,
38172
+ isHighlighted
38173
+ } = _ref63;
38257
38174
  const formData = groupFormId ? (formsValue[groupFormId] || {})[name] || [] : formsValue[name] || [];
38258
38175
  const onUpdate = (val, key) => {
38259
38176
  const _val = {
38260
- [name]: {
38261
- ...formData,
38177
+ [name]: _objectSpread2(_objectSpread2({}, formData), {}, {
38262
38178
  [key]: val
38263
- }
38179
+ })
38264
38180
  };
38265
38181
  if (groupFormId) {
38266
- const _defaultData = form?.getFieldValue(groupFormId) || {};
38267
- const _newData = {
38268
- ..._defaultData,
38269
- ..._val
38270
- };
38271
- onValuesChange(_newData, {
38272
- ...formsValue,
38182
+ const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
38183
+ const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
38184
+ onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
38273
38185
  [groupFormId]: _newData
38274
- });
38275
- form?.setFieldValue(groupFormId, _newData);
38276
- setValues({
38277
- ...formsValue,
38186
+ }));
38187
+ form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
38188
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
38278
38189
  [groupFormId]: _newData
38279
- });
38190
+ }));
38280
38191
  return;
38281
38192
  }
38282
- onValuesChange(_val, {
38283
- ...formsValue,
38284
- ..._val
38285
- });
38286
- form?.setFieldValue(name, _val[name]);
38287
- setValues({
38288
- ...formsValue,
38289
- ..._val
38290
- });
38193
+ onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
38194
+ form === null || form === void 0 || form.setFieldValue(name, _val[name]);
38195
+ setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
38291
38196
  };
38292
38197
  return /*#__PURE__*/jsxRuntime.jsx(GroupCheckbox, {
38293
38198
  form: input,
@@ -38296,96 +38201,91 @@ const inputTypeComponent$1 = {
38296
38201
  isHighlighted: isHighlighted
38297
38202
  });
38298
38203
  },
38299
- website: ({
38300
- name,
38301
- inputName,
38302
- props,
38303
- value,
38304
- repeatIndex,
38305
- repeatValues,
38306
- formsValue
38307
- }, {
38308
- form,
38309
- isHighlighted,
38310
- inputMeta = {},
38311
- t
38312
- }) => {
38313
- return /*#__PURE__*/jsxRuntime.jsx(Website, {
38204
+ website: (_ref64, _ref65) => {
38205
+ let {
38206
+ name,
38207
+ inputName,
38208
+ props,
38209
+ value,
38210
+ repeatIndex,
38211
+ repeatValues,
38212
+ formsValue
38213
+ } = _ref64;
38214
+ let {
38215
+ form,
38216
+ isHighlighted,
38217
+ inputMeta = {},
38218
+ t
38219
+ } = _ref65;
38220
+ return /*#__PURE__*/jsxRuntime.jsx(Website, _objectSpread2(_objectSpread2({
38314
38221
  size: "large",
38315
38222
  allowClear: true,
38316
- initialValue: value,
38317
- ...props,
38223
+ initialValue: value
38224
+ }, props), {}, {
38318
38225
  onChange: val => updateFormValues$1(repeatIndex, repeatValues, inputName, val, formsValue, name, form),
38319
38226
  className: formatClassname([isHighlighted && "highlighted-cont"]),
38320
38227
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
38321
38228
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || "www.example.com"
38322
- });
38229
+ }));
38323
38230
  },
38324
- group: ({
38325
- props,
38326
- groupInputs,
38327
- formsValue
38328
- }, {
38329
- inputMeta,
38330
- isHighlighted
38331
- }) => {
38332
- return /*#__PURE__*/jsxRuntime.jsx(GroupInput, {
38231
+ group: (_ref66, _ref67) => {
38232
+ let {
38233
+ props,
38234
+ groupInputs,
38235
+ formsValue
38236
+ } = _ref66;
38237
+ let {
38238
+ inputMeta,
38239
+ isHighlighted
38240
+ } = _ref67;
38241
+ return /*#__PURE__*/jsxRuntime.jsx(GroupInput, _objectSpread2({
38333
38242
  formsValue: formsValue,
38334
38243
  isHighlighted: isHighlighted,
38335
38244
  groupInputs: groupInputs,
38336
- inputMeta: inputMeta,
38337
- ...props
38338
- });
38245
+ inputMeta: inputMeta
38246
+ }, props));
38339
38247
  },
38340
- groupInputs: ({
38341
- props,
38342
- groupInputs,
38343
- formsValue
38344
- }, {
38345
- inputMeta,
38346
- isHighlighted
38347
- }) => {
38348
- return /*#__PURE__*/jsxRuntime.jsx(GroupInput, {
38248
+ groupInputs: (_ref68, _ref69) => {
38249
+ let {
38250
+ props,
38251
+ groupInputs,
38252
+ formsValue
38253
+ } = _ref68;
38254
+ let {
38255
+ inputMeta,
38256
+ isHighlighted
38257
+ } = _ref69;
38258
+ return /*#__PURE__*/jsxRuntime.jsx(GroupInput, _objectSpread2({
38349
38259
  formsValue: formsValue,
38350
38260
  isHighlighted: isHighlighted,
38351
38261
  groupInputs: groupInputs,
38352
- inputMeta: inputMeta,
38353
- ...props
38354
- });
38262
+ inputMeta: inputMeta
38263
+ }, props));
38355
38264
  },
38356
- smartHelp: ({
38357
- name,
38358
- inputName,
38359
- props,
38360
- value,
38361
- repeatIndex,
38362
- repeatValues,
38363
- formsValue
38364
- }, {
38365
- form,
38366
- isHighlighted,
38367
- inputMeta = {},
38368
- t
38369
- }) => {
38265
+ smartHelp: (_ref70, _ref71) => {
38370
38266
  return /*#__PURE__*/jsxRuntime.jsx(Smart, {});
38371
38267
  }
38372
38268
  };
38373
38269
  const filterForm = (f, d) => {
38374
38270
  return f && (f.showFormIf ? showHideForm(f, d) : true);
38375
38271
  };
38376
- const checkFormHasSubsections = (f = {}) => Object.keys(f).map(key => propHasValue$1(f[key].subSection)).includes(true);
38272
+ const checkFormHasSubsections = function () {
38273
+ let f = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
38274
+ return Object.keys(f).map(key => propHasValue$1(f[key].subSection)).includes(true);
38275
+ };
38377
38276
  const mapFormGroup = (f, d) => Object.keys(f).map(key => {
38378
- const {
38379
- label,
38380
- description = "",
38381
- excludeFromEdit,
38382
- showFormIf,
38383
- icon = "",
38384
- position = 0,
38385
- template,
38386
- formClass,
38387
- ...fc
38388
- } = f[key] || {};
38277
+ const _ref72 = f[key] || {},
38278
+ {
38279
+ label,
38280
+ description = "",
38281
+ excludeFromEdit,
38282
+ showFormIf,
38283
+ icon = "",
38284
+ position = 0,
38285
+ template,
38286
+ formClass
38287
+ } = _ref72,
38288
+ fc = _objectWithoutProperties(_ref72, _excluded2$1);
38389
38289
  const fConf = {
38390
38290
  id: key,
38391
38291
  label,
@@ -38444,11 +38344,14 @@ const groupSubForms = (fConf, d) => {
38444
38344
  return f;
38445
38345
  }, {});
38446
38346
  };
38447
- const inputIsEmpty = (input = {}, values, inputMeta) => {
38448
- if (inputMeta?.notApplicable || inputMeta?.notAvailable) {
38347
+ const inputIsEmpty = function () {
38348
+ let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
38349
+ let values = arguments.length > 1 ? arguments[1] : undefined;
38350
+ let inputMeta = arguments.length > 2 ? arguments[2] : undefined;
38351
+ if (inputMeta !== null && inputMeta !== void 0 && inputMeta.notApplicable || inputMeta !== null && inputMeta !== void 0 && inputMeta.notAvailable) {
38449
38352
  return false;
38450
38353
  }
38451
- if (input?.type === "groupInputs") {
38354
+ if ((input === null || input === void 0 ? void 0 : input.type) === "groupInputs") {
38452
38355
  return true;
38453
38356
  }
38454
38357
  const value = values[input.dataId];
@@ -38460,26 +38363,28 @@ const inputIsEmpty = (input = {}, values, inputMeta) => {
38460
38363
  }
38461
38364
  return !value;
38462
38365
  };
38463
- const GetFormItem$1 = ({
38464
- highlightMandatory,
38465
- inputData,
38466
- inputId,
38467
- input,
38468
- values,
38469
- MainForm,
38470
- options,
38471
- plainForms,
38472
- setValues,
38473
- setAddress,
38474
- i,
38475
- inputKey,
38476
- onValuesChange = () => {},
38477
- setLoading = () => {},
38478
- inputMeta = {},
38479
- changeInputMeta = () => {},
38480
- changeLinking = () => {},
38481
- namespace
38482
- }) => {
38366
+ const GetFormItem$1 = _ref73 => {
38367
+ var _inputMeta$reviews, _input$meta19, _input$meta20, _rules$find, _input$meta21;
38368
+ let {
38369
+ highlightMandatory,
38370
+ inputData,
38371
+ inputId,
38372
+ input,
38373
+ values,
38374
+ MainForm,
38375
+ options,
38376
+ plainForms,
38377
+ setValues,
38378
+ setAddress,
38379
+ i,
38380
+ inputKey,
38381
+ onValuesChange = () => {},
38382
+ setLoading = () => {},
38383
+ inputMeta = {},
38384
+ changeInputMeta = () => {},
38385
+ changeLinking = () => {},
38386
+ namespace
38387
+ } = _ref73;
38483
38388
  const {
38484
38389
  t,
38485
38390
  user,
@@ -38494,44 +38399,42 @@ const GetFormItem$1 = ({
38494
38399
  staticWidth,
38495
38400
  fullWidth
38496
38401
  } = useEditContext();
38497
- const lastReview = (inputMeta?.reviews || [])[(inputMeta?.reviews?.length || 0) - 1];
38402
+ 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];
38498
38403
  const [isShown, setIsShown] = React.useState(!!inputData.commentValue);
38499
38404
  const inputLabel = getInputLabel$1(input, values);
38500
38405
  const onClickReviewSuccess = () => {
38501
38406
  if (!isReview) {
38502
38407
  return;
38503
38408
  }
38504
- const reviewSuccess = lastReview?.reviewSuccess;
38409
+ const reviewSuccess = lastReview === null || lastReview === void 0 ? void 0 : lastReview.reviewSuccess;
38505
38410
  changeInputMeta({
38506
38411
  key: inputId,
38507
38412
  type: input.type,
38508
- value: {
38509
- ...inputMeta,
38413
+ value: _objectSpread2(_objectSpread2({}, inputMeta), {}, {
38510
38414
  reviews: reviewSuccess ? (inputMeta.reviews || []).filter(v => v.createdAt !== lastReview.createdAt) : [...(inputMeta.reviews || []), {
38511
38415
  reviewer: user,
38512
38416
  createdAt: new Date().toISOString(),
38513
38417
  reviewSuccess: true
38514
38418
  }]
38515
- }
38419
+ })
38516
38420
  });
38517
38421
  };
38518
38422
  const onClickReviewError = () => {
38519
38423
  if (!isReview) {
38520
38424
  return;
38521
38425
  }
38522
- const reviewError = lastReview?.reviewError;
38426
+ const reviewError = lastReview === null || lastReview === void 0 ? void 0 : lastReview.reviewError;
38523
38427
  changeInputMeta({
38524
38428
  key: inputId,
38525
38429
  type: input.type,
38526
- value: {
38527
- ...inputMeta,
38430
+ value: _objectSpread2(_objectSpread2({}, inputMeta), {}, {
38528
38431
  reviews: reviewError ? (inputMeta.reviews || []).filter(v => v.createdAt !== lastReview.createdAt) : [...(inputMeta.reviews || []), {
38529
38432
  reviewer: user,
38530
38433
  createdAt: new Date().toISOString(),
38531
38434
  reviewError: true,
38532
38435
  comment: ""
38533
38436
  }]
38534
- }
38437
+ })
38535
38438
  });
38536
38439
  };
38537
38440
  switch (input.type) {
@@ -38545,12 +38448,12 @@ const GetFormItem$1 = ({
38545
38448
  case "header":
38546
38449
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
38547
38450
  className: "daf-title with-subtitle",
38548
- style: input?.meta?.style,
38451
+ style: input === null || input === void 0 || (_input$meta19 = input.meta) === null || _input$meta19 === void 0 ? void 0 : _input$meta19.style,
38549
38452
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
38550
38453
  className: "flex",
38551
38454
  children: [/*#__PURE__*/jsxRuntime.jsx("h1", {
38552
38455
  children: ReactHtmlParser__default["default"](getLabel$1(input.label, values))
38553
- }), !!input.description || input?.meta?.isEvaluation ? /*#__PURE__*/jsxRuntime.jsx(antd.Popover, {
38456
+ }), !!input.description || input !== null && input !== void 0 && (_input$meta20 = input.meta) !== null && _input$meta20 !== void 0 && _input$meta20.isEvaluation ? /*#__PURE__*/jsxRuntime.jsx(antd.Popover, {
38554
38457
  content: /*#__PURE__*/jsxRuntime.jsx("div", {
38555
38458
  className: "tooltip-popover-cont",
38556
38459
  children: ReactHtmlParser__default["default"](input.description)
@@ -38577,7 +38480,7 @@ const GetFormItem$1 = ({
38577
38480
  const specialCharsRule = rules.find(r => r.type === "specialCharacters");
38578
38481
 
38579
38482
  // eslint-disable-next-line no-case-declarations
38580
- let maxRule = rules.find(rule => rule.max)?.max;
38483
+ let maxRule = (_rules$find = rules.find(rule => rule.max)) === null || _rules$find === void 0 ? void 0 : _rules$find.max;
38581
38484
  if (!maxRule && input.type === "textarea") {
38582
38485
  maxRule = MAX_TEXT_AREA_LENGTH;
38583
38486
  }
@@ -38590,27 +38493,30 @@ const GetFormItem$1 = ({
38590
38493
  message: requiredRule.message || ""
38591
38494
  });
38592
38495
  }
38593
- const isHighlighted = highlightMandatory && input?.meta?.mandatory && inputIsEmpty(input, values, inputMeta);
38496
+ 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);
38594
38497
  if (requiredRule || specialCharsRule) {
38595
38498
  if (input.type === "groupInputs") {
38596
38499
  rules = rules.map(r => {
38597
38500
  if (r.required) {
38598
- return ({
38599
- getFieldValue
38600
- }) => ({
38601
- validator() {
38602
- if (inputMeta.notAvailable || inputMeta.notApplicable) {
38603
- return Promise.resolve();
38604
- }
38605
- const keys = Object.keys(input.inputs);
38606
- for (let i = 0; i < keys.length; i++) {
38607
- if (typeof getFieldValue(keys[i]) === "undefined" || getFieldValue(keys[i]) === null) {
38608
- return Promise.reject(r.message);
38501
+ return _ref74 => {
38502
+ let {
38503
+ getFieldValue
38504
+ } = _ref74;
38505
+ return {
38506
+ validator() {
38507
+ if (inputMeta.notAvailable || inputMeta.notApplicable) {
38508
+ return Promise.resolve();
38509
+ }
38510
+ const keys = Object.keys(input.inputs);
38511
+ for (let i = 0; i < keys.length; i++) {
38512
+ if (typeof getFieldValue(keys[i]) === "undefined" || getFieldValue(keys[i]) === null) {
38513
+ return Promise.reject(r.message);
38514
+ }
38609
38515
  }
38516
+ return Promise.resolve();
38610
38517
  }
38611
- return Promise.resolve();
38612
- }
38613
- });
38518
+ };
38519
+ };
38614
38520
  }
38615
38521
  return r;
38616
38522
  });
@@ -38648,12 +38554,13 @@ const GetFormItem$1 = ({
38648
38554
  }
38649
38555
  }
38650
38556
  if (input && typeof input === "object") {
38557
+ 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;
38651
38558
  // check if input is valid
38652
38559
  const hideComment = namespace === "project-readiness";
38653
38560
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
38654
38561
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
38655
38562
  className: "flex-row input-cont",
38656
- children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
38563
+ children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
38657
38564
  extra: /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
38658
38565
  children: !noActionsInputs.includes(input.type) ? /*#__PURE__*/jsxRuntime.jsxs("div", {
38659
38566
  className: formatClassname(["ml-4 input-actions"]),
@@ -38663,7 +38570,7 @@ const GetFormItem$1 = ({
38663
38570
  title: t("Add review note"),
38664
38571
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
38665
38572
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
38666
- className: formatClassname(["review-btn review-error-btn", lastReview?.reviewError && "primary"]),
38573
+ className: formatClassname(["review-btn review-error-btn", (lastReview === null || lastReview === void 0 ? void 0 : lastReview.reviewError) && "primary"]),
38667
38574
  type: "link",
38668
38575
  onClick: onClickReviewError,
38669
38576
  children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
@@ -38679,7 +38586,7 @@ const GetFormItem$1 = ({
38679
38586
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
38680
38587
  type: "link",
38681
38588
  onClick: onClickReviewSuccess,
38682
- className: formatClassname(["review-btn review-success-btn", lastReview?.reviewSuccess && "primary"]),
38589
+ className: formatClassname(["review-btn review-success-btn", (lastReview === null || lastReview === void 0 ? void 0 : lastReview.reviewSuccess) && "primary"]),
38683
38590
  children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
38684
38591
  name: "CheckSquare",
38685
38592
  width: 16,
@@ -38716,7 +38623,7 @@ const GetFormItem$1 = ({
38716
38623
  }
38717
38624
  });
38718
38625
  },
38719
- disabled: !input.meta?.notApplicable,
38626
+ disabled: !((_input$meta22 = input.meta) !== null && _input$meta22 !== void 0 && _input$meta22.notApplicable),
38720
38627
  children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
38721
38628
  name: "NotApplicable",
38722
38629
  width: 16,
@@ -38730,7 +38637,7 @@ const GetFormItem$1 = ({
38730
38637
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
38731
38638
  className: formatClassname(["default p-0", inputMeta.notAvailable && "primary"]),
38732
38639
  type: "link",
38733
- disabled: !input.meta?.notAvailable,
38640
+ disabled: !((_input$meta23 = input.meta) !== null && _input$meta23 !== void 0 && _input$meta23.notAvailable),
38734
38641
  onClick: () => {
38735
38642
  const value = getDefaultInputValue(input);
38736
38643
  MainForm.setFields([{
@@ -38762,14 +38669,14 @@ const GetFormItem$1 = ({
38762
38669
  }), !hideComment ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
38763
38670
  title: t("Add comment"),
38764
38671
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
38765
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
38672
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
38766
38673
  type: "link",
38767
- disabled: !input.meta?.comment,
38768
- ...(!isShown ? {
38769
- className: "default p-0"
38770
- } : {
38771
- className: "p-0 primary"
38772
- }),
38674
+ disabled: !((_input$meta24 = input.meta) !== null && _input$meta24 !== void 0 && _input$meta24.comment)
38675
+ }, !isShown ? {
38676
+ className: "default p-0"
38677
+ } : {
38678
+ className: "p-0 primary"
38679
+ }), {}, {
38773
38680
  onClick: () => {
38774
38681
  if (inputMeta.comment !== undefined && inputMeta.comment !== null) {
38775
38682
  return;
@@ -38788,7 +38695,7 @@ const GetFormItem$1 = ({
38788
38695
  width: 16,
38789
38696
  height: 16
38790
38697
  })
38791
- })
38698
+ }))
38792
38699
  })
38793
38700
  }) : /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
38794
38701
  title: t("Project Readiness"),
@@ -38807,36 +38714,34 @@ const GetFormItem$1 = ({
38807
38714
  }) : null]
38808
38715
  }) : null
38809
38716
  }),
38810
- initialValue: inputMeta?.defaultValue,
38811
- ...(inputOnBlur.includes(input.type) ? {
38812
- trigger: "onBlur"
38813
- } : {}),
38814
- ...(["total100", "group"].includes(input.type) ? {} : {
38815
- name: inputId,
38816
- fieldKey: inputId,
38817
- initialValue: inputData.value
38818
- }),
38819
- ...(["upload"].includes(input.type) ? {
38820
- valuePropName: "fileList",
38821
- getValueFromEvent: e => {
38822
- if (Array.isArray(e)) {
38823
- return e;
38824
- }
38825
- return e && e.fileList && e.fileList.map(f => {
38826
- if (f.response) {
38827
- return f.response;
38828
- }
38829
- return f;
38830
- });
38717
+ initialValue: inputMeta === null || inputMeta === void 0 ? void 0 : inputMeta.defaultValue
38718
+ }, inputOnBlur.includes(input.type) ? {
38719
+ trigger: "onBlur"
38720
+ } : {}), ["total100", "group"].includes(input.type) ? {} : {
38721
+ name: inputId,
38722
+ fieldKey: inputId,
38723
+ initialValue: inputData.value
38724
+ }), ["upload"].includes(input.type) ? {
38725
+ valuePropName: "fileList",
38726
+ getValueFromEvent: e => {
38727
+ if (Array.isArray(e)) {
38728
+ return e;
38831
38729
  }
38832
- } : {}),
38833
- className: formatClassname([`i-${input.type} flex-1`, input.comment && "with-comment", maxRule && "with-max-rule"]),
38730
+ return e && e.fileList && e.fileList.map(f => {
38731
+ if (f.response) {
38732
+ return f.response;
38733
+ }
38734
+ return f;
38735
+ });
38736
+ }
38737
+ } : {}), {}, {
38738
+ className: formatClassname(["i-".concat(input.type, " flex-1"), input.comment && "with-comment", maxRule && "with-max-rule"]),
38834
38739
  "data-id": inputData.name,
38835
38740
  rules: rules,
38836
38741
  required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false,
38837
38742
  labelCol: 12,
38838
38743
  label: /*#__PURE__*/jsxRuntime.jsx("div", {
38839
- className: formatClassname(["flex", input?.meta?.code && "mr-10"]),
38744
+ className: formatClassname(["flex", (input === null || input === void 0 || (_input$meta25 = input.meta) === null || _input$meta25 === void 0 ? void 0 : _input$meta25.code) && "mr-10"]),
38840
38745
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
38841
38746
  className: "mr-1",
38842
38747
  children: getInputLabel$1(input, values)
@@ -38849,7 +38754,7 @@ const GetFormItem$1 = ({
38849
38754
  config: input,
38850
38755
  t: t,
38851
38756
  ajaxForms: ajaxForms,
38852
- linkingData: values?.linking || values?.parent?.linking,
38757
+ 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),
38853
38758
  changeAjaxForms: changeAjaxForms,
38854
38759
  getApiBaseUrl: getApiBaseUrl,
38855
38760
  getAppHeader: getAppHeader,
@@ -38857,12 +38762,11 @@ const GetFormItem$1 = ({
38857
38762
  getToken: getToken,
38858
38763
  app: app,
38859
38764
  valueOnlyString: true
38860
- }) : inputTypeComponent$1[input.type] ? inputTypeComponent$1[input.type]({
38861
- ...inputData,
38765
+ }) : inputTypeComponent$1[input.type] ? inputTypeComponent$1[input.type](_objectSpread2(_objectSpread2({}, inputData), {}, {
38862
38766
  maxWidth,
38863
38767
  staticWidth,
38864
38768
  fullWidth
38865
- }, {
38769
+ }), {
38866
38770
  form: MainForm,
38867
38771
  forms: options,
38868
38772
  allForms: plainForms,
@@ -38883,10 +38787,10 @@ const GetFormItem$1 = ({
38883
38787
  staticWidth,
38884
38788
  fullWidth
38885
38789
  }) : console.log(input)
38886
- }), input.meta?.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
38790
+ })), (_input$meta26 = input.meta) !== null && _input$meta26 !== void 0 && _input$meta26.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
38887
38791
  className: "code",
38888
38792
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
38889
- children: input.meta?.code
38793
+ children: (_input$meta27 = input.meta) === null || _input$meta27 === void 0 ? void 0 : _input$meta27.code
38890
38794
  })
38891
38795
  }) : null]
38892
38796
  }), maxRule ? ["imageUpload", "upload", "videoUpload"].includes(input.type) ? /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -38906,10 +38810,10 @@ const GetFormItem$1 = ({
38906
38810
  className: "max-char-span",
38907
38811
  children: t("max-char", {
38908
38812
  chars: maxRule,
38909
- filled: inputData?.value?.length || 0
38813
+ filled: (inputData === null || inputData === void 0 || (_inputData$value = inputData.value) === null || _inputData$value === void 0 ? void 0 : _inputData$value.length) || 0
38910
38814
  })
38911
38815
  })
38912
- }) : null, input.meta?.comment && isShown ? /*#__PURE__*/jsxRuntime.jsxs("div", {
38816
+ }) : null, (_input$meta28 = input.meta) !== null && _input$meta28 !== void 0 && _input$meta28.comment && isShown ? /*#__PURE__*/jsxRuntime.jsxs("div", {
38913
38817
  className: "input-content",
38914
38818
  children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
38915
38819
  className: "comment-textarea",
@@ -38935,7 +38839,7 @@ const GetFormItem$1 = ({
38935
38839
  },
38936
38840
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
38937
38841
  type: "link",
38938
- disabled: !input.meta?.comment,
38842
+ disabled: !((_input$meta29 = input.meta) !== null && _input$meta29 !== void 0 && _input$meta29.comment),
38939
38843
  className: "p-0",
38940
38844
  children: /*#__PURE__*/jsxRuntime.jsx(Icons.DeleteOutlined, {
38941
38845
  width: 16,
@@ -38944,12 +38848,11 @@ const GetFormItem$1 = ({
38944
38848
  })
38945
38849
  })]
38946
38850
  }),
38947
- children: inputTypeComponent$1.comment({
38948
- ...inputData,
38851
+ children: inputTypeComponent$1.comment(_objectSpread2(_objectSpread2({}, inputData), {}, {
38949
38852
  maxWidth,
38950
38853
  staticWidth,
38951
38854
  fullWidth
38952
- }, {
38855
+ }), {
38953
38856
  form: MainForm,
38954
38857
  forms: options,
38955
38858
  setFormValues: setValues,
@@ -38974,16 +38877,16 @@ const GetFormItem$1 = ({
38974
38877
  className: "max-char-span",
38975
38878
  children: t("max-char", {
38976
38879
  chars: MAX_COMMENTS_LENGTH,
38977
- filled: inputData?.commentValue?.length || 0
38880
+ filled: (inputData === null || inputData === void 0 || (_inputData$commentVal = inputData.commentValue) === null || _inputData$commentVal === void 0 ? void 0 : _inputData$commentVal.length) || 0
38978
38881
  })
38979
38882
  })]
38980
- }) : null, lastReview?.reviewError ? /*#__PURE__*/jsxRuntime.jsx("div", {
38883
+ }) : null, lastReview !== null && lastReview !== void 0 && lastReview.reviewError ? /*#__PURE__*/jsxRuntime.jsx("div", {
38981
38884
  className: "input-content",
38982
38885
  children: isReview ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
38983
38886
  children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
38984
38887
  className: "comment-textarea",
38985
- initialValue: lastReview?.comment || "",
38986
- name: `${inputId}-reviewErrorComment`,
38888
+ initialValue: (lastReview === null || lastReview === void 0 ? void 0 : lastReview.comment) || "",
38889
+ name: "".concat(inputId, "-reviewErrorComment"),
38987
38890
  label: /*#__PURE__*/jsxRuntime.jsx("div", {
38988
38891
  className: "flex w-100",
38989
38892
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -38991,31 +38894,28 @@ const GetFormItem$1 = ({
38991
38894
  children: t("Review note")
38992
38895
  })
38993
38896
  }),
38994
- children: inputTypeComponent$1.comment({
38995
- ...inputData,
38897
+ children: inputTypeComponent$1.comment(_objectSpread2(_objectSpread2({}, inputData), {}, {
38996
38898
  maxWidth,
38997
38899
  staticWidth,
38998
38900
  fullWidth
38999
- }, {
38901
+ }), {
39000
38902
  form: MainForm,
39001
38903
  forms: options,
39002
- value: lastReview?.comment || "",
38904
+ value: (lastReview === null || lastReview === void 0 ? void 0 : lastReview.comment) || "",
39003
38905
  onChange: val => {
39004
38906
  changeInputMeta({
39005
38907
  key: inputId,
39006
38908
  type: input.type,
39007
- value: {
39008
- ...inputMeta,
39009
- reviews: (inputMeta?.reviews || []).map(v => {
38909
+ value: _objectSpread2(_objectSpread2({}, inputMeta), {}, {
38910
+ reviews: ((inputMeta === null || inputMeta === void 0 ? void 0 : inputMeta.reviews) || []).map(v => {
39010
38911
  if (v.createdAt === lastReview.createdAt) {
39011
- return {
39012
- ...v,
38912
+ return _objectSpread2(_objectSpread2({}, v), {}, {
39013
38913
  comment: val
39014
- };
38914
+ });
39015
38915
  }
39016
38916
  return v;
39017
38917
  })
39018
- }
38918
+ })
39019
38919
  });
39020
38920
  },
39021
38921
  t,
@@ -39029,7 +38929,7 @@ const GetFormItem$1 = ({
39029
38929
  className: "max-char-span",
39030
38930
  children: t("max-char", {
39031
38931
  chars: MAX_COMMENTS_LENGTH,
39032
- filled: lastReview.comment?.length || 0
38932
+ filled: ((_lastReview$comment = lastReview.comment) === null || _lastReview$comment === void 0 ? void 0 : _lastReview$comment.length) || 0
39033
38933
  })
39034
38934
  })]
39035
38935
  }) : /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -39050,7 +38950,7 @@ const GetFormItem$1 = ({
39050
38950
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
39051
38951
  className: "flex flex-column justify-center mr-1",
39052
38952
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
39053
- children: lastReview?.reviewer?.firstName + " " + lastReview?.reviewer?.lastName + " - " + moment__default["default"](lastReview.createdAt).format("DD MMM YYYY")
38953
+ 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")
39054
38954
  })
39055
38955
  })]
39056
38956
  })]
@@ -39061,13 +38961,14 @@ const GetFormItem$1 = ({
39061
38961
  return null;
39062
38962
  }
39063
38963
  };
39064
- const editErrorHandler = ({
39065
- errorFields,
39066
- t = s => s
39067
- }) => {
38964
+ const editErrorHandler = _ref76 => {
38965
+ let {
38966
+ errorFields,
38967
+ t = s => s
38968
+ } = _ref76;
39068
38969
  if (Array.isArray(errorFields) && errorFields.length) {
39069
38970
  const name = errorFields[0].name.join(".");
39070
- const element = document.querySelector(`[data-id="${name}"]`);
38971
+ const element = document.querySelector("[data-id=\"".concat(name, "\"]"));
39071
38972
  if (element) {
39072
38973
  element.scrollIntoView();
39073
38974
  antd.message.error(t("errors::please-correct-invalid-inputs"));