datastake-daf 0.6.830 → 0.6.831

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4827,7 +4827,7 @@ const config$2 = {
4827
4827
  AddDocument: config$3
4828
4828
  };
4829
4829
 
4830
- const _excluded$F = ["width", "height", "size", "name", "fill"];
4830
+ const _excluded$E = ["width", "height", "size", "name", "fill"];
4831
4831
  const CustomIcon = _ref => {
4832
4832
  let {
4833
4833
  width = 14,
@@ -4836,7 +4836,7 @@ const CustomIcon = _ref => {
4836
4836
  name = "",
4837
4837
  fill = "none"
4838
4838
  } = _ref,
4839
- props = _objectWithoutProperties(_ref, _excluded$F);
4839
+ props = _objectWithoutProperties(_ref, _excluded$E);
4840
4840
  const conf = config$2[name];
4841
4841
  if (conf) {
4842
4842
  return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
@@ -5125,7 +5125,7 @@ createCommonjsModule(function (module, exports) {
5125
5125
  !function(e,n){module.exports=n();}(commonjsGlobal,(function(){return {name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],t=e%100;return "["+e+(n[(t-20)%10]||n[t]||n[0])+"]"}}}));
5126
5126
  });
5127
5127
 
5128
- const _excluded$E = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
5128
+ const _excluded$D = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
5129
5129
  dayjs__default["default"].extend(customParseFormat);
5130
5130
  dayjs__default["default"].extend(utc);
5131
5131
  dayjs__default["default"].extend(utc);
@@ -5501,7 +5501,7 @@ const filterCreateData = data => {
5501
5501
  createdAt,
5502
5502
  updatedAt
5503
5503
  } = data,
5504
- rest = _objectWithoutProperties(data, _excluded$E);
5504
+ rest = _objectWithoutProperties(data, _excluded$D);
5505
5505
  const _meta = isObjectEmpty(meta) ? undefined : meta;
5506
5506
  return _objectSpread2(_objectSpread2({}, rest), {}, {
5507
5507
  meta: _meta
@@ -6033,7 +6033,7 @@ SelectFilters.propTypes = {
6033
6033
  apiUrl: PropTypes__default["default"].string
6034
6034
  };
6035
6035
 
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"];
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"];
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$D);
6067
+ rest = _objectWithoutProperties(_ref, _excluded$C);
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$C = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
6892
+ const _excluded$B = ["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$C);
6903
+ props = _objectWithoutProperties(_ref, _excluded$B);
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$B = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
7431
+ const _excluded$A = ["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$B);
7445
+ restProps = _objectWithoutProperties(_ref, _excluded$A);
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$A = ["children"];
7564
+ const _excluded$z = ["children"];
7565
7565
  const BorderedButton = _ref => {
7566
7566
  let {
7567
7567
  children
7568
7568
  } = _ref,
7569
- props = _objectWithoutProperties(_ref, _excluded$A);
7569
+ props = _objectWithoutProperties(_ref, _excluded$z);
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$z = ["icon"];
7709
+ const _excluded$y = ["icon"];
7710
7710
  function GetIcon(_ref) {
7711
7711
  let {
7712
7712
  icon
7713
7713
  } = _ref,
7714
- props = _objectWithoutProperties(_ref, _excluded$z);
7714
+ props = _objectWithoutProperties(_ref, _excluded$y);
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$y = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
8044
+ const _excluded$x = ["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$y);
8137
+ restProps = _objectWithoutProperties(_ref, _excluded$x);
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$x = ["tabs", "onChange", "value", "className"];
8857
+ const _excluded$w = ["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$x);
8865
+ rest = _objectWithoutProperties(_ref, _excluded$w);
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$w = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
8962
+ const _excluded$v = ["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$w);
8997
+ restProps = _objectWithoutProperties(button, _excluded$v);
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$v = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
11878
+ const _excluded$u = ["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$v);
11889
+ props = _objectWithoutProperties(_ref, _excluded$u);
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$u = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
11949
+ const _excluded$t = ["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$u);
11961
+ rest = _objectWithoutProperties(_ref, _excluded$t);
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$t = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
15692
+ const _excluded$s = ["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$t);
15706
+ rest = _objectWithoutProperties(_ref, _excluded$s);
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$s = ["config", "title", "loading"];
17906
+ const _excluded$r = ["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$s);
17913
+ rest = _objectWithoutProperties(_ref, _excluded$r);
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$r = ["config", "title", "loading"];
17929
+ const _excluded$q = ["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$r);
17936
+ rest = _objectWithoutProperties(_ref, _excluded$q);
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$q = ["children", "config", "detailsTitle", "firstColumnWidth"];
17966
+ const _excluded$p = ["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$q);
17974
+ rest = _objectWithoutProperties(_ref, _excluded$p);
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$p = ["title", "activeSdgGoals", "t"];
18150
+ const _excluded$o = ["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$p);
18157
+ props = _objectWithoutProperties(_ref, _excluded$o);
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$o = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
18455
+ const _excluded$n = ["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$o);
18475
+ props = _objectWithoutProperties(_ref, _excluded$n);
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$n = ["title", "children"];
18747
+ const _excluded$m = ["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$n);
18753
+ rest = _objectWithoutProperties(_ref, _excluded$m);
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$m = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
18917
+ const _excluded$l = ["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$m);
18932
+ rest = _objectWithoutProperties(_ref, _excluded$l);
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$l = ["title", "activeVegetationConditions", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "growthObservations", "t"];
19301
+ const _excluded$k = ["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$l);
19313
+ props = _objectWithoutProperties(_ref, _excluded$k);
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$k = ["title", "faunaPresent", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19429
+ const _excluded$j = ["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$k);
19440
+ props = _objectWithoutProperties(_ref, _excluded$j);
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$j = ["title", "invasiveSpecies", "hasInvasiveSpecies", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
19505
+ const _excluded$i = ["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$j);
19517
+ props = _objectWithoutProperties(_ref, _excluded$i);
19518
19518
  let invasiveSpeciesConfig = getInvasiveSpeciesConfig();
19519
19519
 
19520
19520
  // Filter to show only specific keys if filterKeys is provided
@@ -24937,7 +24937,7 @@ const RepeatableModals = ({
24937
24937
  }) : null;
24938
24938
  };
24939
24939
 
24940
- const _excluded$i = ["viewGroup"],
24940
+ const _excluded$h = ["viewGroup"],
24941
24941
  _excluded2$2 = ["label", "icon", "position"];
24942
24942
  const Content$1 = _ref => {
24943
24943
  let {
@@ -25009,7 +25009,7 @@ const Content$1 = _ref => {
25009
25009
  if (groups[gKey].viewGroup === key) {
25010
25010
  // eslint-disable-next-line no-unused-vars
25011
25011
  const _groups$gKey = groups[gKey],
25012
- gCfg = _objectWithoutProperties(_groups$gKey, _excluded$i);
25012
+ gCfg = _objectWithoutProperties(_groups$gKey, _excluded$h);
25013
25013
  items[gKey] = gCfg;
25014
25014
  }
25015
25015
  return items;
@@ -25289,7 +25289,7 @@ const Content$1 = _ref => {
25289
25289
  });
25290
25290
  };
25291
25291
 
25292
- const _excluded$h = ["t", "open", "title", "children", "onClose", "onSuccess", "cancelBtnText", "saveBtnText", "className", "loading", "disabled", "withModalFormWrapper"];
25292
+ const _excluded$g = ["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$h);
25308
+ props = _objectWithoutProperties(_ref, _excluded$g);
25309
25309
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Modal, _objectSpread2(_objectSpread2({
25310
25310
  width: 650,
25311
25311
  footer: null,
@@ -35952,7 +35952,7 @@ 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
- const _excluded$g = ["placeholder"],
35955
+ const _excluded$f = ["placeholder"],
35956
35956
  _excluded2$1 = ["label", "description", "excludeFromEdit", "showFormIf", "icon", "position", "template", "formClass"];
35957
35957
  dayjs__default["default"].extend(utc);
35958
35958
  dayjs__default["default"].extend(timezone);
@@ -36918,7 +36918,7 @@ const inputTypeComponent$1 = {
36918
36918
  },
36919
36919
  commentHint
36920
36920
  } = _ref19,
36921
- props = _objectWithoutProperties(_ref19.props, _excluded$g);
36921
+ props = _objectWithoutProperties(_ref19.props, _excluded$f);
36922
36922
  let {
36923
36923
  onChange,
36924
36924
  value,
@@ -39624,7 +39624,7 @@ function AjaxSelect(props) {
39624
39624
  }, props));
39625
39625
  }
39626
39626
 
39627
- const _excluded$f = ["placeholder"];
39627
+ /* eslint-disable no-case-declarations */
39628
39628
  const propHasValue = val => {
39629
39629
  if (Array.isArray(val)) {
39630
39630
  return val.length > 0 ? true : false;
@@ -39642,14 +39642,14 @@ const checkCondition = (condition, repeatValues, formsValue) => {
39642
39642
  return isShown;
39643
39643
  };
39644
39644
  function showHideInput(input, formsValue, repeatIndex, repeatValues, setValues, ref) {
39645
- var _input$meta;
39646
- if ((input === null || input === void 0 || (_input$meta = input.meta) === null || _input$meta === void 0 ? void 0 : _input$meta.hidden) === true) {
39647
- var _input$meta2;
39645
+ if (input?.meta?.hidden === true) {
39648
39646
  // Set default value for hidden fields
39649
- if ((input === null || input === void 0 || (_input$meta2 = input.meta) === null || _input$meta2 === void 0 ? void 0 : _input$meta2.defaultValue) !== undefined && !propHasValue(formsValue[ref])) {
39647
+ if (input?.meta?.defaultValue !== undefined && !propHasValue(formsValue[ref])) {
39650
39648
  formsValue[ref] = input.meta.defaultValue;
39651
39649
  if (setValues && typeof setValues === 'function') {
39652
- setValues(_objectSpread2({}, formsValue));
39650
+ setValues({
39651
+ ...formsValue
39652
+ });
39653
39653
  }
39654
39654
  }
39655
39655
  return false;
@@ -39708,35 +39708,35 @@ function getInputHeadLines(type, i, input, values) {
39708
39708
  switch (type) {
39709
39709
  case "h2":
39710
39710
  return /*#__PURE__*/jsxRuntime.jsx("h2", {
39711
- className: "title-semibold-2 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
39711
+ className: `title-semibold-2 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
39712
39712
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
39713
39713
  children: getInputLabel(input, values)
39714
39714
  })
39715
39715
  });
39716
39716
  case "h3":
39717
39717
  return /*#__PURE__*/jsxRuntime.jsx("h3", {
39718
- className: "title-semibold-3 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
39718
+ className: `title-semibold-3 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
39719
39719
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
39720
39720
  children: getInputLabel(input, values)
39721
39721
  })
39722
39722
  });
39723
39723
  case "h4":
39724
39724
  return /*#__PURE__*/jsxRuntime.jsx("h4", {
39725
- className: "title-semibold-4 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
39725
+ className: `title-semibold-4 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
39726
39726
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
39727
39727
  children: getInputLabel(input, values)
39728
39728
  })
39729
39729
  });
39730
39730
  case "h5":
39731
39731
  return /*#__PURE__*/jsxRuntime.jsx("h5", {
39732
- className: "title-semibold-5 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
39732
+ className: `title-semibold-5 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
39733
39733
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
39734
39734
  children: getInputLabel(input, values)
39735
39735
  })
39736
39736
  });
39737
39737
  case "h6":
39738
39738
  return /*#__PURE__*/jsxRuntime.jsx("h6", {
39739
- className: "title-semibold-6 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
39739
+ className: `title-semibold-6 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
39740
39740
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
39741
39741
  children: getInputLabel(input, values)
39742
39742
  })
@@ -39745,9 +39745,7 @@ function getInputHeadLines(type, i, input, values) {
39745
39745
  return null;
39746
39746
  }
39747
39747
  }
39748
- function getInputLabel(input) {
39749
- let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
39750
- let asText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
39748
+ function getInputLabel(input, formsValue = {}, asText = false) {
39751
39749
  if (typeof input.label === "object") {
39752
39750
  const validations = Object.keys(input.label);
39753
39751
  const key = validations.find(v => {
@@ -39805,8 +39803,7 @@ function getInputLabel(input) {
39805
39803
  }) : ReactHtmlParser__default["default"](input.label);
39806
39804
  }
39807
39805
  }
39808
- function getSelectOptions$1(option) {
39809
- let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
39806
+ function getSelectOptions$1(option, formsValue = {}) {
39810
39807
  if (typeof option.label === "object") {
39811
39808
  const validations = Object.keys(option.label);
39812
39809
  const key = validations.find(v => {
@@ -39830,9 +39827,7 @@ function getSectionLabel(labels, values) {
39830
39827
  }
39831
39828
  return labels;
39832
39829
  }
39833
- function getSubtitles(subtitles, position) {
39834
- let formsValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
39835
- let repeatValues = arguments.length > 4 ? arguments[4] : undefined;
39830
+ function getSubtitles(subtitles, position, formsValue = {}, repeatIndex, repeatValues) {
39836
39831
  let subtitle = subtitles && subtitles[position];
39837
39832
  if (subtitle && typeof subtitle === "object") {
39838
39833
  let newSubtitle = subtitle.default || "";
@@ -39876,12 +39871,14 @@ function getSubtitles(subtitles, position) {
39876
39871
  function getFormTitles(titles, key, position) {
39877
39872
  let tilte = titles && titles[key];
39878
39873
  return tilte ? /*#__PURE__*/jsxRuntime.jsx("h3", {
39879
- className: "title-semibold-3 mb0 ".concat(position ? "mt-3" : ""),
39874
+ className: `title-semibold-3 mb0 ${position ? "mt-3" : ""}`,
39880
39875
  children: tilte
39881
39876
  }) : null;
39882
39877
  }
39883
39878
  const updateFormValues = (repeatIndex, repeatValues, inputName, value, formsValue, name, mainForm) => {
39884
- formsValue = Object.assign(formsValue, _objectSpread2({}, mainForm.getFieldsValue(true)));
39879
+ formsValue = Object.assign(formsValue, {
39880
+ ...mainForm.getFieldsValue(true)
39881
+ });
39885
39882
  if (typeof repeatIndex === "number" && repeatValues) {
39886
39883
  if (!repeatValues[inputName] || !___default["default"].isEqual(repeatValues[inputName], value)) {
39887
39884
  repeatValues[inputName] = value;
@@ -39915,52 +39912,48 @@ const updateFormValues = (repeatIndex, repeatValues, inputName, value, formsValu
39915
39912
  }
39916
39913
  };
39917
39914
  const inputTypeComponent = {
39918
- text: (_ref, _ref2) => {
39919
- let {
39920
- props,
39921
- rules
39922
- } = _ref;
39923
- let {
39924
- inputMeta = {},
39925
- t
39926
- } = _ref2;
39915
+ text: ({
39916
+ props,
39917
+ rules
39918
+ }, {
39919
+ inputMeta = {},
39920
+ t
39921
+ }) => {
39927
39922
  const maxRule = rules.find(r => r.max);
39928
39923
  const maxProps = {};
39929
39924
  if (maxRule) {
39930
39925
  maxProps.maxLength = maxRule.max;
39931
39926
  }
39932
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
39933
- size: "medium"
39934
- }, maxProps), {}, {
39927
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
39928
+ size: "medium",
39929
+ ...maxProps,
39935
39930
  allowClear: true,
39936
39931
  autoComplete: "new-password",
39937
- type: "text"
39938
- }, props), {}, {
39932
+ type: "text",
39933
+ ...props,
39939
39934
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
39940
39935
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
39941
- }));
39936
+ });
39942
39937
  },
39943
- drawTerritory: (_ref3, _ref4) => {
39944
- let {
39945
- formsValue,
39946
- name,
39947
- addressData,
39948
- onValuesChange
39949
- } = _ref3;
39950
- let {
39951
- setFormValues,
39952
- form
39953
- } = _ref4;
39938
+ drawTerritory: ({
39939
+ formsValue,
39940
+ name,
39941
+ addressData,
39942
+ onValuesChange
39943
+ }, {
39944
+ setFormValues,
39945
+ form
39946
+ }) => {
39954
39947
  let search = formsValue.country;
39955
39948
  if (addressData && addressData.address && Object.keys(addressData.address).length > 0) {
39956
39949
  if (addressData.address.country) {
39957
39950
  search = addressData.address.country;
39958
39951
  }
39959
39952
  if (addressData.address.level1) {
39960
- search = "".concat(addressData.address.level1, ", ").concat(addressData.address.country);
39953
+ search = `${addressData.address.level1}, ${addressData.address.country}`;
39961
39954
  }
39962
39955
  if (addressData.address.level2) {
39963
- search = "".concat(addressData.address.level2, ", ").concat(addressData.address.level1, ", ").concat(addressData.address.country);
39956
+ search = `${addressData.address.level2}, ${addressData.address.level1}, ${addressData.address.country}`;
39964
39957
  }
39965
39958
  } else {
39966
39959
  const country = countriesList.countries[formsValue.country] || {};
@@ -39968,10 +39961,10 @@ const inputTypeComponent = {
39968
39961
  search = country.name;
39969
39962
  }
39970
39963
  if (formsValue.administrativeLevel1Name) {
39971
- search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
39964
+ search = `${search} ${formsValue.administrativeLevel1Name}`;
39972
39965
  }
39973
39966
  if (formsValue.administrativeLevel2Name) {
39974
- search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
39967
+ search = `${search} ${formsValue.administrativeLevel2Name}`;
39975
39968
  }
39976
39969
  }
39977
39970
  console.log("search", {
@@ -39991,9 +39984,10 @@ const inputTypeComponent = {
39991
39984
  const allFormValues = form && typeof form.getFieldsValue === 'function' ? form.getFieldsValue(true) : formsValue;
39992
39985
 
39993
39986
  // Create the updated values
39994
- const updatedValues = _objectSpread2(_objectSpread2({}, allFormValues), {}, {
39987
+ const updatedValues = {
39988
+ ...allFormValues,
39995
39989
  [name]: val
39996
- });
39990
+ };
39997
39991
 
39998
39992
  // Call onValuesChange with the change and all values
39999
39993
  if (typeof onValuesChange === 'function') {
@@ -40008,44 +40002,39 @@ const inputTypeComponent = {
40008
40002
  searchValue: search
40009
40003
  });
40010
40004
  },
40011
- link: (_ref5, _ref6) => {
40012
- let {
40013
- props,
40014
- rules
40015
- } = _ref5;
40016
- let {
40017
- inputMeta = {},
40018
- t
40019
- } = _ref6;
40005
+ link: ({
40006
+ props,
40007
+ rules
40008
+ }, {
40009
+ inputMeta = {},
40010
+ t
40011
+ }) => {
40020
40012
  const maxRule = rules.find(r => r.max);
40021
40013
  const maxProps = {};
40022
40014
  if (maxRule) {
40023
40015
  maxProps.maxLength = maxRule.max;
40024
40016
  }
40025
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
40026
- size: "medium"
40027
- }, maxProps), {}, {
40017
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
40018
+ size: "medium",
40019
+ ...maxProps,
40028
40020
  allowClear: true,
40029
40021
  autoComplete: "new-password",
40030
- type: "text"
40031
- }, props), {}, {
40022
+ type: "text",
40023
+ ...props,
40032
40024
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
40033
40025
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
40034
- }));
40026
+ });
40035
40027
  },
40036
- number: (_ref7, _ref8) => {
40037
- var _input$meta3;
40038
- let {
40039
- props,
40040
- rules,
40041
- input
40042
- } = _ref7;
40043
- let {
40044
- inputMeta = {},
40045
- t
40046
- } = _ref8;
40028
+ number: ({
40029
+ props,
40030
+ rules,
40031
+ input
40032
+ }, {
40033
+ inputMeta = {},
40034
+ t
40035
+ }) => {
40047
40036
  const maxRule = rules.find(r => r.max);
40048
- const integerRule = !(input !== null && input !== void 0 && (_input$meta3 = input.meta) !== null && _input$meta3 !== void 0 && _input$meta3.isDecimal);
40037
+ const integerRule = !input?.meta?.isDecimal;
40049
40038
  const parser = value => {
40050
40039
  if (!value) {
40051
40040
  return "";
@@ -40056,53 +40045,50 @@ const inputTypeComponent = {
40056
40045
  return value.replace(/\$\s?|(,*)/g, "");
40057
40046
  };
40058
40047
  if (maxRule) {
40059
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
40048
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
40060
40049
  allowClear: true,
40061
- autoComplete: "new-password"
40062
- }, props), {}, {
40050
+ autoComplete: "new-password",
40051
+ ...props,
40063
40052
  type: "number",
40064
40053
  min: 0,
40065
40054
  max: maxRule.max,
40066
40055
  parser: parser
40067
- }));
40056
+ });
40068
40057
  }
40069
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
40058
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
40070
40059
  allowClear: true,
40071
- autoComplete: "new-password"
40072
- }, props), {}, {
40060
+ autoComplete: "new-password",
40061
+ ...props,
40073
40062
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
40074
40063
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type number"),
40075
40064
  min: 0,
40076
40065
  formatter: value => numberWithCommas$1(value),
40077
40066
  parser: parser
40078
- }));
40067
+ });
40079
40068
  },
40080
- select: (_ref9, _ref10) => {
40081
- var _input$meta4;
40082
- let {
40083
- value,
40084
- options,
40085
- optionGroup,
40086
- props,
40087
- formsValue,
40088
- optionsFilter,
40089
- filterCond,
40090
- repeatValues,
40091
- repeatIndex,
40092
- name,
40093
- inputName,
40094
- address,
40095
- addressData,
40096
- input
40097
- } = _ref9;
40098
- let {
40099
- forms,
40100
- form,
40101
- setAddress,
40102
- inputMeta = {},
40103
- t,
40104
- changeInputMeta
40105
- } = _ref10;
40069
+ select: ({
40070
+ value,
40071
+ options,
40072
+ optionGroup,
40073
+ props,
40074
+ formsValue,
40075
+ optionsFilter,
40076
+ filterCond,
40077
+ repeatValues,
40078
+ repeatIndex,
40079
+ name,
40080
+ inputName,
40081
+ address,
40082
+ addressData,
40083
+ input
40084
+ }, {
40085
+ forms,
40086
+ form,
40087
+ setAddress,
40088
+ inputMeta = {},
40089
+ t,
40090
+ changeInputMeta
40091
+ }) => {
40106
40092
  let opts;
40107
40093
  if (typeof options === "string") {
40108
40094
  const [formName, key] = options.split(".");
@@ -40158,19 +40144,18 @@ const inputTypeComponent = {
40158
40144
  }
40159
40145
  opts = groupOptions;
40160
40146
  }
40161
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
40147
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
40162
40148
  autoComplete: "new-password",
40163
40149
  allowClear: true,
40164
40150
  showSearch: true,
40165
- defaultValue: input === null || input === void 0 || (_input$meta4 = input.meta) === null || _input$meta4 === void 0 ? void 0 : _input$meta4.defaultValue,
40151
+ defaultValue: input?.meta?.defaultValue,
40166
40152
  filterOption: filterSelectOptions,
40167
- optionFilterProp: "children"
40168
- }, props), {}, {
40153
+ optionFilterProp: "children",
40154
+ ...props,
40169
40155
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
40170
40156
  placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp$1(props.placeholder, formsValue) || t("Select one option"),
40171
40157
  onChange: (val, selectedValue) => {
40172
- var _input$meta5;
40173
- if (typeof (input === null || input === void 0 || (_input$meta5 = input.meta) === null || _input$meta5 === void 0 ? void 0 : _input$meta5.onChange) === "string") {
40158
+ if (typeof input?.meta?.onChange === "string") {
40174
40159
  const [value, otherKey, otherVal] = input.meta.onChange.split(".");
40175
40160
  if (val === value) {
40176
40161
  changeInputMeta({
@@ -40184,7 +40169,9 @@ const inputTypeComponent = {
40184
40169
  }
40185
40170
  if (address && selectedValue) {
40186
40171
  dot__default["default"].str(address, selectedValue.children, addressData);
40187
- setAddress(_objectSpread2({}, addressData));
40172
+ setAddress({
40173
+ ...addressData
40174
+ });
40188
40175
  }
40189
40176
  if (props.onChange) {
40190
40177
  props.onChange(val);
@@ -40196,35 +40183,33 @@ const inputTypeComponent = {
40196
40183
  value: og.value,
40197
40184
  disabled: og.disabled,
40198
40185
  children: og.label
40199
- }, "".concat(i).concat(j)))
40186
+ }, `${i}${j}`))
40200
40187
  }, i) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
40201
40188
  value: option.value,
40202
40189
  disabled: option.disabled,
40203
40190
  children: option.label
40204
40191
  }, i))
40205
- }));
40192
+ });
40206
40193
  },
40207
- multiselect: (_ref11, _ref12) => {
40208
- let {
40209
- value,
40210
- options,
40211
- optionGroup,
40212
- optionsFilter,
40213
- filterCond,
40214
- props,
40215
- formsValue,
40216
- repeatValues,
40217
- repeatIndex,
40218
- inputName,
40219
- name,
40220
- tags
40221
- } = _ref11;
40222
- let {
40223
- forms,
40224
- form,
40225
- inputMeta = {},
40226
- t
40227
- } = _ref12;
40194
+ multiselect: ({
40195
+ value,
40196
+ options,
40197
+ optionGroup,
40198
+ optionsFilter,
40199
+ filterCond,
40200
+ props,
40201
+ formsValue,
40202
+ repeatValues,
40203
+ repeatIndex,
40204
+ inputName,
40205
+ name,
40206
+ tags
40207
+ }, {
40208
+ forms,
40209
+ form,
40210
+ inputMeta = {},
40211
+ t
40212
+ }) => {
40228
40213
  let opts;
40229
40214
  if (typeof options === "string") {
40230
40215
  const [formName, key] = options.split(".");
@@ -40281,16 +40266,16 @@ const inputTypeComponent = {
40281
40266
  }
40282
40267
  opts = groupOptions;
40283
40268
  }
40284
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2(_objectSpread2({
40269
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
40285
40270
  allowClear: true,
40286
40271
  autoComplete: "new-password",
40287
40272
  mode: tags ? "tags" : "multiple",
40288
- optionFilterProp: "children"
40289
- }, tags ? {
40290
- tokenSeparators: [",", "\n", "\t"]
40291
- } : {}), {}, {
40292
- filterOption: filterSelectOptions
40293
- }, props), {}, {
40273
+ optionFilterProp: "children",
40274
+ ...(tags ? {
40275
+ tokenSeparators: [",", "\n", "\t"]
40276
+ } : {}),
40277
+ filterOption: filterSelectOptions,
40278
+ ...props,
40294
40279
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
40295
40280
  placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp$1(props.placeholder, formsValue) || t("Select all relevant options"),
40296
40281
  children: (opts || []).map((option, i) => option.items ? /*#__PURE__*/jsxRuntime.jsx(antd.Select.OptGroup, {
@@ -40299,42 +40284,42 @@ const inputTypeComponent = {
40299
40284
  value: og.value,
40300
40285
  disabled: og.disabled,
40301
40286
  children: og.label
40302
- }, "".concat(i).concat(j)))
40287
+ }, `${i}${j}`))
40303
40288
  }, i) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
40304
40289
  value: option.value,
40305
40290
  disabled: option.disabled,
40306
40291
  children: option.label
40307
40292
  }, i))
40308
- }));
40293
+ });
40309
40294
  },
40310
- date: (_ref13, _ref14) => {
40311
- let {
40312
- props,
40313
- rules,
40314
- repeatValues,
40315
- formsValue,
40316
- name
40317
- } = _ref13;
40318
- let {
40319
- inputMeta,
40320
- t,
40321
- groupFormId,
40322
- form,
40323
- setFormValues
40324
- } = _ref14;
40295
+ date: ({
40296
+ props,
40297
+ rules,
40298
+ repeatValues,
40299
+ formsValue,
40300
+ name
40301
+ }, {
40302
+ inputMeta,
40303
+ t,
40304
+ groupFormId,
40305
+ form,
40306
+ setFormValues
40307
+ }) => {
40325
40308
  const lng = localStorage.getItem("datastakeLng") || "en";
40326
40309
  const maxRule = rules.find(r => r.max);
40327
40310
  const handleDateChange = date => {
40328
40311
  if (date) {
40329
40312
  const localDate = dayjs__default["default"].utc(date);
40330
40313
  if (groupFormId) {
40331
- const _new = _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
40314
+ const _new = {
40315
+ ...(formsValue[groupFormId] || {}),
40332
40316
  [name]: localDate
40333
- });
40317
+ };
40334
40318
  form.setFieldValue(groupFormId, _new);
40335
- setFormValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
40319
+ setFormValues({
40320
+ ...formsValue,
40336
40321
  [groupFormId]: _new
40337
- }));
40322
+ });
40338
40323
  } else {
40339
40324
  form.setFieldValue(name, localDate);
40340
40325
  }
@@ -40346,10 +40331,10 @@ const inputTypeComponent = {
40346
40331
  checkForMax = checkCondition(maxRule.condition, repeatValues, formsValue);
40347
40332
  }
40348
40333
  if (checkForMax) {
40349
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
40334
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
40350
40335
  allowClear: true,
40351
- autoComplete: "new-password"
40352
- }, props), {}, {
40336
+ autoComplete: "new-password",
40337
+ ...props,
40353
40338
  onChange: handleDateChange,
40354
40339
  format: DATE_FORMATS,
40355
40340
  locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"],
@@ -40358,33 +40343,31 @@ const inputTypeComponent = {
40358
40343
  disabledDate: current => {
40359
40344
  return current && current >= dayjs__default["default"]().endOf("day");
40360
40345
  }
40361
- }));
40346
+ });
40362
40347
  }
40363
40348
  }
40364
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
40349
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
40365
40350
  allowClear: true,
40366
- autoComplete: "new-password"
40367
- }, props), {}, {
40351
+ autoComplete: "new-password",
40352
+ ...props,
40368
40353
  onChange: handleDateChange,
40369
40354
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Select date"),
40370
40355
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
40371
40356
  format: DATE_FORMATS,
40372
40357
  locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"]
40373
- }));
40358
+ });
40374
40359
  },
40375
- comment: (_ref15, _ref16) => {
40376
- let {
40377
- props: {
40378
- placeholder
40379
- },
40380
- commentHint
40381
- } = _ref15,
40382
- props = _objectWithoutProperties(_ref15.props, _excluded$f);
40383
- let {
40384
- onChange,
40385
- value
40386
- } = _ref16;
40387
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
40360
+ comment: ({
40361
+ props: {
40362
+ placeholder,
40363
+ ...props
40364
+ },
40365
+ commentHint
40366
+ }, {
40367
+ onChange,
40368
+ value
40369
+ }) => {
40370
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
40388
40371
  allowClear: true,
40389
40372
  value: value,
40390
40373
  onChange: e => onChange(e.target.value),
@@ -40394,60 +40377,56 @@ const inputTypeComponent = {
40394
40377
  autoSize: {
40395
40378
  minRows: 5,
40396
40379
  maxRows: 5
40397
- }
40398
- }, props), {}, {
40380
+ },
40381
+ ...props,
40399
40382
  disabled: false
40400
- }));
40383
+ });
40401
40384
  },
40402
- textarea: (_ref17, _ref18) => {
40403
- let {
40404
- props,
40405
- rules
40406
- } = _ref17;
40407
- let {
40408
- inputMeta,
40409
- t
40410
- } = _ref18;
40385
+ textarea: ({
40386
+ props,
40387
+ rules
40388
+ }, {
40389
+ inputMeta,
40390
+ t
40391
+ }) => {
40411
40392
  const maxRule = rules.find(r => r.max);
40412
40393
  let maxLength = MAX_TEXT_AREA_LENGTH;
40413
40394
  if (maxRule) {
40414
40395
  maxLength = maxRule.max;
40415
40396
  }
40416
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
40397
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
40417
40398
  allowClear: true,
40418
40399
  autoComplete: "new-password",
40419
40400
  maxLength: maxLength,
40420
40401
  autoSize: {
40421
40402
  minRows: 5,
40422
40403
  maxRows: 5
40423
- }
40424
- }, props), {}, {
40404
+ },
40405
+ ...props,
40425
40406
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
40426
40407
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
40427
- }));
40408
+ });
40428
40409
  },
40429
- phoneNumber: (_ref19, _ref20) => {
40430
- let {
40431
- name,
40432
- inputName,
40433
- props,
40434
- value,
40435
- repeatIndex,
40436
- repeatValues,
40437
- formsValue
40438
- } = _ref19;
40439
- let {
40440
- setFormValues,
40441
- t
40442
- } = _ref20;
40443
- return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, _objectSpread2(_objectSpread2({
40410
+ phoneNumber: ({
40411
+ name,
40412
+ inputName,
40413
+ props,
40414
+ value,
40415
+ repeatIndex,
40416
+ repeatValues,
40417
+ formsValue
40418
+ }, {
40419
+ setFormValues,
40420
+ t
40421
+ }) => {
40422
+ return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, {
40444
40423
  t: t,
40445
40424
  doChangeErrors: false,
40446
40425
  allowClear: true,
40447
- country: formsValue === null || formsValue === void 0 ? void 0 : formsValue.country,
40426
+ country: formsValue?.country,
40448
40427
  formsValue: formsValue,
40449
- initialValue: value
40450
- }, props), {}, {
40428
+ initialValue: value,
40429
+ ...props,
40451
40430
  onChange: val => {
40452
40431
  if (repeatValues) {
40453
40432
  const inputValues = Array.isArray(formsValue[name]) ? formsValue[name] || [] : [];
@@ -40463,25 +40442,24 @@ const inputTypeComponent = {
40463
40442
  setFormValues(formsValue);
40464
40443
  }
40465
40444
  }
40466
- }));
40445
+ });
40467
40446
  },
40468
- switch: (_ref21, _ref22) => {
40469
- let {
40470
- props,
40471
- value,
40472
- restricted,
40473
- autocomplete,
40474
- formsValue,
40475
- repeatIndex,
40476
- name,
40477
- inputName,
40478
- replace
40479
- } = _ref21;
40480
- let {
40481
- form,
40482
- setFormValues
40483
- } = _ref22;
40484
- return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, _objectSpread2(_objectSpread2({}, props), {}, {
40447
+ switch: ({
40448
+ props,
40449
+ value,
40450
+ restricted,
40451
+ autocomplete,
40452
+ formsValue,
40453
+ repeatIndex,
40454
+ name,
40455
+ inputName,
40456
+ replace
40457
+ }, {
40458
+ form,
40459
+ setFormValues
40460
+ }) => {
40461
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, {
40462
+ ...props,
40485
40463
  defaultChecked: value || false,
40486
40464
  checked: value || false,
40487
40465
  onChange: isChecked => {
@@ -40523,15 +40501,14 @@ const inputTypeComponent = {
40523
40501
  setFormValues(formsValue);
40524
40502
  }
40525
40503
  }
40526
- }));
40504
+ });
40527
40505
  },
40528
- total100: _ref23 => {
40529
- let {
40530
- props,
40531
- name,
40532
- options,
40533
- value
40534
- } = _ref23;
40506
+ total100: ({
40507
+ props,
40508
+ name,
40509
+ options,
40510
+ value
40511
+ }) => {
40535
40512
  value = value ? Array.isArray(value) ? value : [value] : [];
40536
40513
  function totalValue() {
40537
40514
  let total = 0;
@@ -40555,11 +40532,10 @@ const inputTypeComponent = {
40555
40532
  className: "total100",
40556
40533
  children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.List, {
40557
40534
  name: name,
40558
- children: (fields, _ref24) => {
40559
- let {
40560
- add,
40561
- remove
40562
- } = _ref24;
40535
+ children: (fields, {
40536
+ add,
40537
+ remove
40538
+ }) => {
40563
40539
  if (fields.length === 0) {
40564
40540
  const formData = value || [];
40565
40541
  if (formData.length) {
@@ -40578,26 +40554,26 @@ const inputTypeComponent = {
40578
40554
  const v = value[field.name];
40579
40555
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Space, {
40580
40556
  className: "total",
40581
- children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
40582
- noStyle: true
40583
- }, field), {}, {
40557
+ children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
40558
+ noStyle: true,
40559
+ ...field,
40584
40560
  name: [field.name, "type"],
40585
40561
  fieldKey: [field.fieldKey, "type"],
40586
40562
  initialValue: v.type,
40587
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
40563
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
40588
40564
  allowClear: true,
40589
40565
  showSearch: true,
40590
40566
  filterOption: filterSelectOptions,
40591
- optionFilterProp: "children"
40592
- }, props), {}, {
40567
+ optionFilterProp: "children",
40568
+ ...props,
40593
40569
  children: options.map((option, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
40594
40570
  value: option.value,
40595
40571
  children: option.label
40596
40572
  }, i))
40597
- }))
40598
- })), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
40599
- noStyle: true
40600
- }, field), {}, {
40573
+ })
40574
+ }), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
40575
+ noStyle: true,
40576
+ ...field,
40601
40577
  name: [field.name, "value"],
40602
40578
  fieldKey: [field.fieldKey, "value"],
40603
40579
  initialValue: v.value,
@@ -40605,14 +40581,14 @@ const inputTypeComponent = {
40605
40581
  allowClear: true,
40606
40582
  name: "value",
40607
40583
  formatter: value => {
40608
- return value ? "".concat(value, "%") : "";
40584
+ return value ? `${value}%` : "";
40609
40585
  },
40610
40586
  disabled: !v.type,
40611
40587
  placeholder: props.valueplaceholder ? props.valueplaceholder : "Value",
40612
40588
  min: 1,
40613
40589
  max: 100 - siblingTotal(v.type)
40614
40590
  })
40615
- })), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
40591
+ }), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
40616
40592
  disabled: !v.value || !v.type || totalValue() >= 100,
40617
40593
  type: "primary",
40618
40594
  icon: /*#__PURE__*/jsxRuntime.jsx(Icons.PlusOutlined, {}),
@@ -40644,21 +40620,18 @@ const inputTypeComponent = {
40644
40620
  }) : null]
40645
40621
  });
40646
40622
  },
40647
- percentage: (_ref25, _ref26) => {
40648
- var _input$meta6;
40649
- let {
40650
- name,
40651
- inputName,
40652
- totalMax,
40653
- repeatIndex,
40654
- props,
40655
- formsValue,
40656
- input
40657
- } = _ref25;
40658
- let {
40659
- inputMeta,
40660
- t
40661
- } = _ref26;
40623
+ percentage: ({
40624
+ name,
40625
+ inputName,
40626
+ totalMax,
40627
+ repeatIndex,
40628
+ props,
40629
+ formsValue,
40630
+ input
40631
+ }, {
40632
+ inputMeta,
40633
+ t
40634
+ }) => {
40662
40635
  const isRepeatable = Array.isArray(formsValue[name]);
40663
40636
  let totalSiblings = 0;
40664
40637
  if (isRepeatable && totalMax) {
@@ -40666,15 +40639,15 @@ const inputTypeComponent = {
40666
40639
  totl = totl + (grp[inputName] || 0);
40667
40640
  return totl;
40668
40641
  }, 0);
40669
- } else if (Array.isArray(input === null || input === void 0 || (_input$meta6 = input.meta) === null || _input$meta6 === void 0 ? void 0 : _input$meta6.siblings)) {
40642
+ } else if (Array.isArray(input?.meta?.siblings)) {
40670
40643
  totalSiblings = input.meta.siblings.reduce((totl, key) => {
40671
40644
  totl = totl + (formsValue[key] || 0);
40672
40645
  return totl;
40673
40646
  }, 0);
40674
40647
  }
40675
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
40676
- allowClear: true
40677
- }, props), {}, {
40648
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
40649
+ allowClear: true,
40650
+ ...props,
40678
40651
  style: {
40679
40652
  width: "100%"
40680
40653
  },
@@ -40683,36 +40656,33 @@ const inputTypeComponent = {
40683
40656
  min: 0,
40684
40657
  max: 100 - totalSiblings,
40685
40658
  formatter: value => {
40686
- return value ? "".concat(value) : "";
40659
+ return value ? `${value}` : "";
40687
40660
  },
40688
40661
  parser: value => value.replace("%", ""),
40689
40662
  addonAfter: "%"
40690
- }));
40663
+ });
40691
40664
  },
40692
- year: _ref27 => {
40693
- let {
40694
- props
40695
- } = _ref27;
40665
+ year: ({
40666
+ props
40667
+ }) => {
40696
40668
  const lng = localStorage.getItem("datastakeLng") || "en";
40697
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
40669
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
40698
40670
  allowClear: true,
40699
40671
  locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"],
40700
- picker: "year"
40701
- }, props), {}, {
40672
+ picker: "year",
40673
+ ...props,
40702
40674
  format: "YYYY"
40703
- }));
40675
+ });
40704
40676
  },
40705
- upload: (_ref28, _ref29) => {
40706
- let {
40707
- rules,
40708
- value
40709
- } = _ref28;
40710
- let {
40711
- setLoading,
40712
- t,
40713
- getApiBaseUrl,
40714
- getAppHeader
40715
- } = _ref29;
40677
+ upload: ({
40678
+ rules,
40679
+ value
40680
+ }, {
40681
+ setLoading,
40682
+ t,
40683
+ getApiBaseUrl,
40684
+ getAppHeader
40685
+ }) => {
40716
40686
  const apiURL = getApiBaseUrl();
40717
40687
  const accept = rules.length ? rules.find(rule => Object.keys(rule).includes("accept")).accept || "*" : null;
40718
40688
  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) : []) || [];
@@ -40725,12 +40695,13 @@ const inputTypeComponent = {
40725
40695
  }
40726
40696
  }
40727
40697
  const allowedExtensions = accept && accept !== "*" ? accept.split(",").map(ext => ext.trim().toLowerCase()) : [];
40728
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({}, maxProps), {}, {
40698
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
40699
+ ...maxProps,
40729
40700
  accept: accept,
40730
- action: "".concat(apiURL, "/upload"),
40701
+ action: `${apiURL}/upload`,
40731
40702
  beforeUpload: beforeUpload(allowedExtensions),
40732
40703
  onChange: val => {
40733
- if (val !== null && val !== void 0 && val.file && typeof setLoading === "function") {
40704
+ if (val?.file && typeof setLoading === "function") {
40734
40705
  if (val.file.percent !== 100) {
40735
40706
  setLoading(true);
40736
40707
  } else {
@@ -40738,9 +40709,10 @@ const inputTypeComponent = {
40738
40709
  }
40739
40710
  }
40740
40711
  },
40741
- headers: _objectSpread2({
40742
- Authorization: "Bearer ".concat(getToken())
40743
- }, getAppHeader()),
40712
+ headers: {
40713
+ Authorization: `Bearer ${getToken()}`,
40714
+ ...getAppHeader()
40715
+ },
40744
40716
  defaultFileList: values,
40745
40717
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
40746
40718
  style: {
@@ -40750,19 +40722,17 @@ const inputTypeComponent = {
40750
40722
  children: t("Upload")
40751
40723
  })]
40752
40724
  })
40753
- }));
40725
+ });
40754
40726
  },
40755
- imageUpload: (_ref30, _ref31) => {
40756
- let {
40757
- rules,
40758
- value
40759
- } = _ref30;
40760
- let {
40761
- setLoading,
40762
- getApiBaseUrl,
40763
- getAppHeader,
40764
- t
40765
- } = _ref31;
40727
+ imageUpload: ({
40728
+ rules,
40729
+ value
40730
+ }, {
40731
+ setLoading,
40732
+ getApiBaseUrl,
40733
+ getAppHeader,
40734
+ t
40735
+ }) => {
40766
40736
  const apiURL = getApiBaseUrl();
40767
40737
  const values = getImageUploadEditValue(value);
40768
40738
  const maxRule = rules.find(r => r.max);
@@ -40773,17 +40743,17 @@ const inputTypeComponent = {
40773
40743
  maxProps.multiple = true;
40774
40744
  }
40775
40745
  }
40776
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({}, maxProps), {}, {
40746
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
40747
+ ...maxProps,
40777
40748
  beforeUpload: beforeUpload(allowedImageExtensions),
40778
40749
  accept: "image/*",
40779
40750
  classList: !values || !values.length ? "empty" : "",
40780
40751
  listType: "picture",
40781
- action: "".concat(apiURL, "/upload"),
40752
+ action: `${apiURL}/upload`,
40782
40753
  onChange: val => {
40783
40754
  if (typeof setLoading === "function") {
40784
- if (val !== null && val !== void 0 && val.file) {
40785
- var _val$file;
40786
- if ((val === null || val === void 0 || (_val$file = val.file) === null || _val$file === void 0 ? void 0 : _val$file.status) === "removed") {
40755
+ if (val?.file) {
40756
+ if (val?.file?.status === "removed") {
40787
40757
  setLoading(false);
40788
40758
  return;
40789
40759
  }
@@ -40795,9 +40765,10 @@ const inputTypeComponent = {
40795
40765
  setLoading(false);
40796
40766
  }
40797
40767
  },
40798
- headers: _objectSpread2({
40799
- Authorization: "Bearer ".concat(getToken())
40800
- }, getAppHeader()),
40768
+ headers: {
40769
+ Authorization: `Bearer ${getToken()}`,
40770
+ ...getAppHeader()
40771
+ },
40801
40772
  defaultFileList: values,
40802
40773
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
40803
40774
  style: {
@@ -40807,19 +40778,17 @@ const inputTypeComponent = {
40807
40778
  children: t("Upload")
40808
40779
  })]
40809
40780
  })
40810
- }));
40781
+ });
40811
40782
  },
40812
- videoUpload: (_ref32, _ref33) => {
40813
- let {
40814
- rules,
40815
- value
40816
- } = _ref32;
40817
- let {
40818
- setLoading = () => {},
40819
- getApiBaseUrl,
40820
- getAppHeader,
40821
- t
40822
- } = _ref33;
40783
+ videoUpload: ({
40784
+ rules,
40785
+ value
40786
+ }, {
40787
+ setLoading = () => {},
40788
+ getApiBaseUrl,
40789
+ getAppHeader,
40790
+ t
40791
+ }) => {
40823
40792
  const apiURL = getApiBaseUrl();
40824
40793
  const values = getImageUploadEditValue(value);
40825
40794
  const maxRule = rules.find(r => r.max);
@@ -40830,25 +40799,21 @@ const inputTypeComponent = {
40830
40799
  maxProps.multiple = true;
40831
40800
  }
40832
40801
  }
40833
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({
40834
- itemRender: (item, fileList) => {
40835
- var _fileList$response;
40836
- return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
40837
- children: [/*#__PURE__*/jsxRuntime.jsx(EditVideoPreview, {
40838
- 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)
40839
- }), item]
40840
- });
40841
- }
40842
- }, maxProps), {}, {
40802
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
40803
+ itemRender: (item, fileList) => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
40804
+ children: [/*#__PURE__*/jsxRuntime.jsx(EditVideoPreview, {
40805
+ url: fileList?.response?.url || fileList?.url
40806
+ }), item]
40807
+ }),
40808
+ ...maxProps,
40843
40809
  accept: "video/*",
40844
40810
  classList: !values || !values.length ? "empty" : "",
40845
40811
  listType: "picture",
40846
- action: "".concat(apiURL, "/upload"),
40812
+ action: `${apiURL}/upload`,
40847
40813
  onChange: val => {
40848
40814
  if (typeof setLoading === "function") {
40849
- if (val !== null && val !== void 0 && val.file) {
40850
- var _val$file2;
40851
- if ((val === null || val === void 0 || (_val$file2 = val.file) === null || _val$file2 === void 0 ? void 0 : _val$file2.status) === "removed") {
40815
+ if (val?.file) {
40816
+ if (val?.file?.status === "removed") {
40852
40817
  setLoading(false);
40853
40818
  return;
40854
40819
  }
@@ -40860,9 +40825,10 @@ const inputTypeComponent = {
40860
40825
  setLoading(false);
40861
40826
  }
40862
40827
  },
40863
- headers: _objectSpread2({
40864
- Authorization: "Bearer ".concat(getToken())
40865
- }, getAppHeader()),
40828
+ headers: {
40829
+ Authorization: `Bearer ${getToken()}`,
40830
+ ...getAppHeader()
40831
+ },
40866
40832
  defaultFileList: values,
40867
40833
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
40868
40834
  style: {
@@ -40872,19 +40838,17 @@ const inputTypeComponent = {
40872
40838
  children: t("Upload")
40873
40839
  })]
40874
40840
  })
40875
- }));
40841
+ });
40876
40842
  },
40877
- geolocation: (_ref34, _ref35) => {
40878
- let {
40879
- value,
40880
- name,
40881
- formsValue,
40882
- addressData,
40883
- props
40884
- } = _ref34;
40885
- let {
40886
- inputMeta
40887
- } = _ref35;
40843
+ geolocation: ({
40844
+ value,
40845
+ name,
40846
+ formsValue,
40847
+ addressData,
40848
+ props
40849
+ }, {
40850
+ inputMeta
40851
+ }) => {
40888
40852
  let search = formsValue.country;
40889
40853
  if (addressData && Object.keys(addressData).length > 0) {
40890
40854
  const country = countriesList.countries[formsValue.country] || {};
@@ -40892,10 +40856,10 @@ const inputTypeComponent = {
40892
40856
  search = addressData.country;
40893
40857
  }
40894
40858
  if (addressData.level1) {
40895
- search = "".concat(addressData.level1, ", ").concat(addressData.country || country.name);
40859
+ search = `${addressData.level1}, ${addressData.country || country.name}`;
40896
40860
  }
40897
40861
  if (addressData.level2) {
40898
- search = "".concat(addressData.level2, ", ").concat(addressData.level1, ", ").concat(addressData.country || country.name);
40862
+ search = `${addressData.level2}, ${addressData.level1}, ${addressData.country || country.name}`;
40899
40863
  }
40900
40864
  } else {
40901
40865
  const country = countriesList.countries[formsValue.country] || {};
@@ -40903,10 +40867,10 @@ const inputTypeComponent = {
40903
40867
  search = country.name;
40904
40868
  }
40905
40869
  if (formsValue.administrativeLevel1Name) {
40906
- search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
40870
+ search = `${search} ${formsValue.administrativeLevel1Name}`;
40907
40871
  }
40908
40872
  if (formsValue.administrativeLevel2Name) {
40909
- search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
40873
+ search = `${search} ${formsValue.administrativeLevel2Name}`;
40910
40874
  }
40911
40875
  }
40912
40876
  return /*#__PURE__*/jsxRuntime.jsx(Geolocation, {
@@ -40919,35 +40883,33 @@ const inputTypeComponent = {
40919
40883
  searchValue: search
40920
40884
  });
40921
40885
  },
40922
- ajaxSelect: (_ref36, _ref37) => {
40923
- let {
40924
- call,
40925
- automaticallyLink,
40926
- name,
40927
- preSelected,
40928
- inputName,
40929
- props,
40930
- formsValue,
40931
- onNewSetValue,
40932
- multiple,
40933
- updateOptions,
40934
- repeatValues,
40935
- repeatIndex,
40936
- value,
40937
- unique,
40938
- address,
40939
- addressData = {},
40940
- input
40941
- } = _ref36;
40942
- let {
40943
- form,
40944
- forms,
40945
- setAddress,
40946
- changeInputMeta,
40947
- inputMeta = {},
40948
- meta,
40949
- setFormValues
40950
- } = _ref37;
40886
+ ajaxSelect: ({
40887
+ call,
40888
+ automaticallyLink,
40889
+ name,
40890
+ preSelected,
40891
+ inputName,
40892
+ props,
40893
+ formsValue,
40894
+ onNewSetValue,
40895
+ multiple,
40896
+ updateOptions,
40897
+ repeatValues,
40898
+ repeatIndex,
40899
+ value,
40900
+ unique,
40901
+ address,
40902
+ addressData = {},
40903
+ input
40904
+ }, {
40905
+ form,
40906
+ forms,
40907
+ setAddress,
40908
+ changeInputMeta,
40909
+ inputMeta = {},
40910
+ meta,
40911
+ setFormValues
40912
+ }) => {
40951
40913
  return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect, {
40952
40914
  preSelected: preSelected,
40953
40915
  input: input,
@@ -40983,41 +40945,40 @@ const inputTypeComponent = {
40983
40945
  const selectedValue = data.find(v => v.value === ev);
40984
40946
  if (address && selectedValue) {
40985
40947
  dot__default["default"].str(address, selectedValue.label, addressData);
40986
- setAddress(_objectSpread2({}, addressData));
40948
+ setAddress({
40949
+ ...addressData
40950
+ });
40987
40951
  }
40988
40952
  }
40989
40953
  },
40990
40954
  setAddress: setAddress
40991
40955
  });
40992
40956
  },
40993
- tag: _ref38 => {
40994
- let {
40995
- value,
40996
- repeatLabel
40997
- } = _ref38;
40957
+ tag: ({
40958
+ value,
40959
+ repeatLabel
40960
+ }) => {
40998
40961
  return /*#__PURE__*/jsxRuntime.jsx(TagInput$1, {
40999
40962
  allowClear: true,
41000
40963
  value: value || [],
41001
40964
  newPlaceholder: repeatLabel
41002
40965
  });
41003
40966
  },
41004
- modal: (_ref39, _ref40) => {
41005
- let {
41006
- call,
41007
- automaticallyLink,
41008
- name,
41009
- inputName,
41010
- props,
41011
- formsValue,
41012
- onNewSetValue,
41013
- repeatValues,
41014
- repeatIndex,
41015
- value,
41016
- modalTitle
41017
- } = _ref39;
41018
- let {
41019
- form
41020
- } = _ref40;
40967
+ modal: ({
40968
+ call,
40969
+ automaticallyLink,
40970
+ name,
40971
+ inputName,
40972
+ props,
40973
+ formsValue,
40974
+ onNewSetValue,
40975
+ repeatValues,
40976
+ repeatIndex,
40977
+ value,
40978
+ modalTitle
40979
+ }, {
40980
+ form
40981
+ }) => {
41021
40982
  return /*#__PURE__*/jsxRuntime.jsx(AjaxModal$2, {
41022
40983
  allowClear: true,
41023
40984
  call: call,
@@ -41035,69 +40996,63 @@ const inputTypeComponent = {
41035
40996
  buttonText: modalTitle
41036
40997
  });
41037
40998
  },
41038
- website: (_ref41, _ref42) => {
41039
- let {
41040
- name,
41041
- inputName,
41042
- props,
41043
- value,
41044
- repeatIndex,
41045
- repeatValues,
41046
- formsValue
41047
- } = _ref41;
41048
- let {
41049
- form,
41050
- inputMeta = {},
41051
- t
41052
- } = _ref42;
41053
- return /*#__PURE__*/jsxRuntime.jsx(Website, _objectSpread2(_objectSpread2({
40999
+ website: ({
41000
+ name,
41001
+ inputName,
41002
+ props,
41003
+ value,
41004
+ repeatIndex,
41005
+ repeatValues,
41006
+ formsValue
41007
+ }, {
41008
+ form,
41009
+ inputMeta = {},
41010
+ t
41011
+ }) => {
41012
+ return /*#__PURE__*/jsxRuntime.jsx(Website, {
41054
41013
  allowClear: true,
41055
41014
  initialValue: value,
41056
- t: t
41057
- }, props), {}, {
41015
+ t: t,
41016
+ ...props,
41058
41017
  onChange: val => updateFormValues(repeatIndex, repeatValues, inputName, val, formsValue, name, form),
41059
41018
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
41060
41019
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || "www.example.com"
41061
- }));
41020
+ });
41062
41021
  },
41063
- dataLink: (_ref43, _ref44) => {
41064
- var _input$meta7, _input$meta10, _formsValue$meta, _input$meta11;
41065
- let {
41066
- setValues,
41067
- name,
41068
- onValuesChange,
41069
- formsValue,
41070
- input,
41071
- changeLinking,
41072
- call,
41073
- automaticallyLink,
41074
- inputName,
41075
- props,
41076
- onNewSetValue,
41077
- multiple,
41078
- updateOptions,
41079
- repeatValues,
41080
- repeatIndex,
41081
- value,
41082
- unique,
41083
- address,
41084
- addressData = {},
41085
- getFromLinking
41086
- } = _ref43;
41087
- let {
41088
- form,
41089
- groupFormId,
41090
- setAddress,
41091
- isHighlighted,
41092
- changeInputMeta,
41093
- meta,
41094
- inputMeta,
41095
- forms
41096
- } = _ref44;
41097
- if ((input === null || input === void 0 || (_input$meta7 = input.meta) === null || _input$meta7 === void 0 || (_input$meta7 = _input$meta7.optionsView) === null || _input$meta7 === void 0 ? void 0 : _input$meta7.editInputType) === "ajaxSelect") {
41098
- var _formsValue$groupForm, _input$meta8, _input$meta9;
41099
- const currentValue = groupFormId ? (_formsValue$groupForm = formsValue[groupFormId]) === null || _formsValue$groupForm === void 0 ? void 0 : _formsValue$groupForm[name] : formsValue[name];
41100
- (input === null || input === void 0 || (_input$meta8 = input.meta) === null || _input$meta8 === void 0 || (_input$meta8 = _input$meta8.optionsView) === null || _input$meta8 === void 0 ? void 0 : _input$meta8.call) || (input === null || input === void 0 || (_input$meta9 = input.meta) === null || _input$meta9 === void 0 ? void 0 : _input$meta9.call) || "default::list()::::";
41022
+ dataLink: ({
41023
+ setValues,
41024
+ name,
41025
+ onValuesChange,
41026
+ formsValue,
41027
+ input,
41028
+ changeLinking,
41029
+ call,
41030
+ automaticallyLink,
41031
+ inputName,
41032
+ props,
41033
+ onNewSetValue,
41034
+ multiple,
41035
+ updateOptions,
41036
+ repeatValues,
41037
+ repeatIndex,
41038
+ value,
41039
+ unique,
41040
+ address,
41041
+ addressData = {},
41042
+ getFromLinking
41043
+ }, {
41044
+ form,
41045
+ groupFormId,
41046
+ setAddress,
41047
+ isHighlighted,
41048
+ changeInputMeta,
41049
+ meta,
41050
+ inputMeta,
41051
+ forms
41052
+ }) => {
41053
+ if (input?.meta?.optionsView?.editInputType === "ajaxSelect") {
41054
+ const currentValue = groupFormId ? formsValue[groupFormId]?.[name] : formsValue[name];
41055
+ input?.meta?.optionsView?.call || input?.meta?.call || "default::list()::::";
41101
41056
  return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect$1, {
41102
41057
  size: "medium",
41103
41058
  input: input,
@@ -41134,7 +41089,9 @@ const inputTypeComponent = {
41134
41089
  const selectedValue = data.find(v => v.value === ev);
41135
41090
  if (address && selectedValue) {
41136
41091
  dot__default["default"].str(address, selectedValue.label, addressData);
41137
- setAddress(_objectSpread2({}, addressData));
41092
+ setAddress({
41093
+ ...addressData
41094
+ });
41138
41095
  }
41139
41096
  }
41140
41097
  },
@@ -41144,149 +41101,188 @@ const inputTypeComponent = {
41144
41101
  isDataLink: true
41145
41102
  });
41146
41103
  }
41147
- const isSingle = (input === null || input === void 0 || (_input$meta10 = input.meta) === null || _input$meta10 === void 0 ? void 0 : _input$meta10.maxRepeat) === 1;
41148
- 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));
41104
+ const isSingle = input?.meta?.maxRepeat === 1;
41105
+ const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [{
41106
+ ...(formsValue[groupFormId] || {})[name]
41107
+ }] : [] : getArray((formsValue[groupFormId] || {})[name] || []).map(v => ({
41108
+ ...v
41109
+ })) : isSingle ? formsValue[name] ? [{
41110
+ ...formsValue[name]
41111
+ }] : [] : (formsValue[name] || []).map(v => ({
41112
+ ...v
41113
+ }));
41149
41114
  const onUpdate = (val, i) => {
41150
41115
  const _val = isSingle ? {
41151
41116
  [name]: val
41152
41117
  } : {
41153
- [name]: formData === null || formData === void 0 ? void 0 : formData.map((d, j) => i === j ? val : d)
41118
+ [name]: formData?.map((d, j) => i === j ? val : d)
41154
41119
  };
41155
41120
  if (groupFormId) {
41156
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
41157
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
41158
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
41121
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
41122
+ const _newData = {
41123
+ ..._defaultData,
41124
+ ..._val
41125
+ };
41126
+ onValuesChange(_newData, {
41127
+ ...formsValue,
41159
41128
  [groupFormId]: _newData
41160
- }));
41161
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
41162
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
41129
+ });
41130
+ form?.setFieldValue(groupFormId, _newData);
41131
+ setValues({
41132
+ ...formsValue,
41163
41133
  [groupFormId]: _newData
41164
- }));
41134
+ });
41165
41135
  return;
41166
41136
  }
41167
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
41168
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
41169
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
41137
+ onValuesChange(_val, {
41138
+ ...formsValue,
41139
+ ..._val
41140
+ });
41141
+ form?.setFieldValue(name, _val[name]);
41142
+ setValues({
41143
+ ...formsValue,
41144
+ ..._val
41145
+ });
41170
41146
  };
41171
41147
  return /*#__PURE__*/jsxRuntime.jsx(DataLink, {
41172
41148
  form: input,
41173
41149
  formsValue: formsValue,
41174
41150
  onUpdate: onUpdate,
41175
41151
  isHighlighted: isHighlighted,
41176
- values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
41152
+ values: groupFormId ? {
41153
+ ...(formsValue[groupFormId] || {}),
41177
41154
  meta: {
41178
- inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta = formsValue.meta) === null || _formsValue$meta === void 0 ? void 0 : _formsValue$meta.inputs) || {})[groupFormId]
41155
+ inputs: (formsValue?.meta?.inputs || {})[groupFormId]
41179
41156
  }
41180
- }) : formsValue,
41157
+ } : formsValue,
41181
41158
  name: name,
41182
41159
  groupFormId: groupFormId,
41183
- maxRepeat: input === null || input === void 0 || (_input$meta11 = input.meta) === null || _input$meta11 === void 0 ? void 0 : _input$meta11.maxRepeat,
41184
- remove: _ref45 => {
41185
- let {
41186
- key
41187
- } = _ref45;
41160
+ maxRepeat: input?.meta?.maxRepeat,
41161
+ remove: ({
41162
+ key
41163
+ }) => {
41188
41164
  const _val = isSingle ? {
41189
41165
  [name]: null
41190
41166
  } : {
41191
41167
  [name]: formData.filter((v, i) => i !== key)
41192
41168
  };
41193
41169
  if (groupFormId) {
41194
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
41195
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
41196
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
41170
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
41171
+ const _newData = {
41172
+ ..._defaultData,
41173
+ ..._val
41174
+ };
41175
+ onValuesChange(_newData, {
41176
+ ...formsValue,
41197
41177
  [groupFormId]: _newData
41198
- }));
41199
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
41200
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
41178
+ });
41179
+ form?.setFieldValue(groupFormId, _newData);
41180
+ setValues({
41181
+ ...formsValue,
41201
41182
  [groupFormId]: _newData
41202
- }));
41183
+ });
41203
41184
  return;
41204
41185
  }
41205
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
41206
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
41207
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
41186
+ onValuesChange(_val, {
41187
+ ...formsValue,
41188
+ ..._val
41189
+ });
41190
+ form?.setFieldValue(name, _val[name]);
41191
+ setValues({
41192
+ ...formsValue,
41193
+ ..._val
41194
+ });
41208
41195
  },
41209
41196
  add: val => {
41210
41197
  const _val = isSingle ? {
41211
41198
  [name]: val
41212
41199
  } : {
41213
- [name]: [...formData, _objectSpread2({}, val)]
41200
+ [name]: [...formData, {
41201
+ ...val
41202
+ }]
41214
41203
  };
41215
41204
  if (groupFormId) {
41216
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
41217
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
41218
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
41219
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
41205
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
41206
+ const _newData = {
41207
+ ..._defaultData,
41208
+ ..._val
41209
+ };
41210
+ form?.setFieldValue(groupFormId, _newData);
41211
+ onValuesChange(_newData, {
41212
+ ...formsValue,
41220
41213
  [groupFormId]: _newData
41221
- }));
41222
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
41214
+ });
41215
+ setValues({
41216
+ ...formsValue,
41223
41217
  [groupFormId]: _newData
41224
- }));
41218
+ });
41225
41219
  return;
41226
41220
  }
41227
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
41228
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
41229
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
41221
+ form?.setFieldValue(name, _val[name]);
41222
+ onValuesChange(_val, {
41223
+ ...formsValue,
41224
+ ..._val
41225
+ });
41226
+ setValues({
41227
+ ...formsValue,
41228
+ ..._val
41229
+ });
41230
41230
  },
41231
41231
  k: name,
41232
41232
  formData: formData
41233
41233
  });
41234
41234
  },
41235
- internallink: (_ref46, _ref47) => {
41236
- let {
41237
- name,
41238
- inputName,
41239
- props,
41240
- value,
41241
- repeatIndex,
41242
- repeatValues,
41243
- formsValue
41244
- } = _ref46;
41245
- let {
41246
- form,
41247
- inputMeta = {},
41248
- t
41249
- } = _ref47;
41250
- return /*#__PURE__*/jsxRuntime.jsx(Website, _objectSpread2(_objectSpread2({
41235
+ internallink: ({
41236
+ name,
41237
+ inputName,
41238
+ props,
41239
+ value,
41240
+ repeatIndex,
41241
+ repeatValues,
41242
+ formsValue
41243
+ }, {
41244
+ form,
41245
+ inputMeta = {},
41246
+ t
41247
+ }) => {
41248
+ return /*#__PURE__*/jsxRuntime.jsx(Website, {
41251
41249
  allowClear: true,
41252
41250
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
41253
41251
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || "www.example.com",
41254
- initialValue: value
41255
- }, props), {}, {
41252
+ initialValue: value,
41253
+ ...props,
41256
41254
  onChange: val => updateFormValues(repeatIndex, repeatValues, inputName, val, formsValue, name, form)
41257
- }));
41255
+ });
41258
41256
  },
41259
- group: _ref48 => {
41260
- let {
41261
- props,
41262
- groupInputs
41263
- } = _ref48;
41264
- return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, _objectSpread2({
41265
- groupInputs: groupInputs
41266
- }, props));
41257
+ group: ({
41258
+ props,
41259
+ groupInputs
41260
+ }) => {
41261
+ return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, {
41262
+ groupInputs: groupInputs,
41263
+ ...props
41264
+ });
41267
41265
  },
41268
- groupInputs: (_ref49, _ref50) => {
41269
- let {
41270
- props,
41271
- groupInputs
41272
- } = _ref49;
41273
- let {
41274
- inputMeta
41275
- } = _ref50;
41276
- return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, _objectSpread2({
41266
+ groupInputs: ({
41267
+ props,
41268
+ groupInputs
41269
+ }, {
41270
+ inputMeta
41271
+ }) => {
41272
+ return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, {
41277
41273
  groupInputs: groupInputs,
41278
- inputMeta: inputMeta
41279
- }, props));
41274
+ inputMeta: inputMeta,
41275
+ ...props
41276
+ });
41280
41277
  },
41281
- radioGroup: _ref51 => {
41282
- let {
41283
- props,
41284
- value,
41285
- options
41286
- } = _ref51;
41287
- return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, _objectSpread2(_objectSpread2({
41288
- value: value
41289
- }, props), {}, {
41278
+ radioGroup: ({
41279
+ props,
41280
+ value,
41281
+ options
41282
+ }) => {
41283
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, {
41284
+ value: value,
41285
+ ...props,
41290
41286
  children: (options || []).map(o => {
41291
41287
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Radio, {
41292
41288
  value: o.value,
@@ -41299,17 +41295,16 @@ const inputTypeComponent = {
41299
41295
  }) : null]
41300
41296
  }, o.value);
41301
41297
  })
41302
- }));
41298
+ });
41303
41299
  },
41304
- checkboxGroup: _ref52 => {
41305
- let {
41306
- props,
41307
- value,
41308
- options
41309
- } = _ref52;
41310
- return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox.Group, _objectSpread2(_objectSpread2({
41311
- value: value
41312
- }, props), {}, {
41300
+ checkboxGroup: ({
41301
+ props,
41302
+ value,
41303
+ options
41304
+ }) => {
41305
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox.Group, {
41306
+ value: value,
41307
+ ...props,
41313
41308
  children: (options || []).map(o => {
41314
41309
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Checkbox, {
41315
41310
  value: o.value,
@@ -41322,30 +41317,28 @@ const inputTypeComponent = {
41322
41317
  }) : null]
41323
41318
  }, o.value);
41324
41319
  })
41325
- }));
41320
+ });
41326
41321
  }
41327
41322
  };
41328
- const GetFormItem = _ref53 => {
41329
- var _find, _input$meta12, _input$meta13, _input$meta14, _input$meta15, _input$meta16, _input$meta17, _input$meta18, _inputData$value, _input$meta19, _input$meta20, _inputData$commentVal;
41330
- let {
41331
- code,
41332
- inputData,
41333
- inputId,
41334
- input,
41335
- setLoading,
41336
- values,
41337
- MainForm,
41338
- options,
41339
- plainForms,
41340
- setValues,
41341
- alertError,
41342
- setAddress,
41343
- inputMeta = {},
41344
- inputKey,
41345
- changeInputMeta = () => {},
41346
- i,
41347
- isCreate = false
41348
- } = _ref53;
41323
+ const GetFormItem = ({
41324
+ code,
41325
+ inputData,
41326
+ inputId,
41327
+ input,
41328
+ setLoading,
41329
+ values,
41330
+ MainForm,
41331
+ options,
41332
+ plainForms,
41333
+ setValues,
41334
+ alertError,
41335
+ setAddress,
41336
+ inputMeta = {},
41337
+ inputKey,
41338
+ changeInputMeta = () => {},
41339
+ i,
41340
+ isCreate = false
41341
+ }) => {
41349
41342
  const {
41350
41343
  t,
41351
41344
  getAppHeader,
@@ -41361,7 +41354,7 @@ const GetFormItem = _ref53 => {
41361
41354
  case "h6":
41362
41355
  return getInputHeadLines(input.type, i, input, values);
41363
41356
  default:
41364
- const rules = inputMeta !== null && inputMeta !== void 0 && inputMeta.notApplicable || inputMeta !== null && inputMeta !== void 0 && inputMeta.notAvailable ? [] : inputData.rules ? inputData.rules.filter(rule => !Object.keys(rule).includes("accept") && !Object.keys(rule).includes("max")) : [];
41357
+ const rules = inputMeta?.notApplicable || inputMeta?.notAvailable ? [] : inputData.rules ? inputData.rules.filter(rule => !Object.keys(rule).includes("accept") && !Object.keys(rule).includes("max")) : [];
41365
41358
  const requiredRule = rules.find(r => r.required);
41366
41359
  if (requiredRule && input.type === "text") {
41367
41360
  rules.push({
@@ -41370,45 +41363,47 @@ const GetFormItem = _ref53 => {
41370
41363
  });
41371
41364
  }
41372
41365
  const noLabel = ["message"].includes(input.type);
41373
- let maxRule = (_find = ((inputData === null || inputData === void 0 ? void 0 : inputData.rules) || []).find(rule => rule.max)) === null || _find === void 0 ? void 0 : _find.max;
41366
+ let maxRule = (inputData?.rules || []).find(rule => rule.max)?.max;
41374
41367
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
41375
41368
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
41376
41369
  className: "flex input-cont",
41377
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
41378
- initialValue: inputMeta === null || inputMeta === void 0 ? void 0 : inputMeta.defaultValue
41379
- }, ["total100", "group"].includes(input.type) ? {} : {
41380
- name: inputId,
41381
- fieldKey: inputId,
41382
- initialValue: inputData.value
41383
- }), ["upload", "imageUpload", "videoUpload"].includes(input.type) ? {
41384
- valuePropName: "fileList",
41385
- getValueFromEvent: e => {
41386
- if (Array.isArray(e)) {
41387
- return e;
41388
- }
41389
- return e && e.fileList && e.fileList.map(f => {
41390
- if (f.response) {
41391
- return f.response;
41370
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
41371
+ initialValue: inputMeta?.defaultValue,
41372
+ ...(["total100", "group"].includes(input.type) ? {} : {
41373
+ name: inputId,
41374
+ fieldKey: inputId,
41375
+ initialValue: inputData.value
41376
+ }),
41377
+ ...(["upload", "imageUpload", "videoUpload"].includes(input.type) ? {
41378
+ valuePropName: "fileList",
41379
+ getValueFromEvent: e => {
41380
+ if (Array.isArray(e)) {
41381
+ return e;
41392
41382
  }
41393
- return f;
41394
- });
41395
- }
41396
- } : {}), {}, {
41383
+ return e && e.fileList && e.fileList.map(f => {
41384
+ if (f.response) {
41385
+ return f.response;
41386
+ }
41387
+ return f;
41388
+ });
41389
+ }
41390
+ } : {}),
41397
41391
  style: input.showOnView === false ? {
41398
41392
  display: "none"
41399
- } : {}
41400
- }, ["switch"].includes(input.type) ? {
41401
- labelCol: {
41402
- span: 20
41403
- },
41404
- style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
41405
- display: "none"
41406
- } : {}), {}, {
41407
- flexDirection: "row",
41408
- justifyContent: "space-between"
41409
- })
41410
- } : {}), {}, {
41411
- className: input.comment ? "flex-1 with-comment i-".concat(input.type) : "i-".concat(input.type, " flex-1"),
41393
+ } : {},
41394
+ ...(["switch"].includes(input.type) ? {
41395
+ labelCol: {
41396
+ span: 20
41397
+ },
41398
+ style: {
41399
+ ...(input.showOnView === false ? {
41400
+ display: "none"
41401
+ } : {}),
41402
+ flexDirection: "row",
41403
+ justifyContent: "space-between"
41404
+ }
41405
+ } : {}),
41406
+ className: input.comment ? `flex-1 with-comment i-${input.type}` : `i-${input.type} flex-1`,
41412
41407
  "data-id": inputData.name,
41413
41408
  rules: rules,
41414
41409
  required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
@@ -41419,8 +41414,8 @@ const GetFormItem = _ref53 => {
41419
41414
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
41420
41415
  className: "mr-1",
41421
41416
  children: getInputLabel(input, values)
41422
- }), !!(input !== null && input !== void 0 && (_input$meta12 = input.meta) !== null && _input$meta12 !== void 0 && _input$meta12.tooltip) && /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
41423
- title: input === null || input === void 0 || (_input$meta13 = input.meta) === null || _input$meta13 === void 0 ? void 0 : _input$meta13.tooltip,
41417
+ }), !!input?.meta?.tooltip && /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
41418
+ title: input?.meta?.tooltip,
41424
41419
  trigger: "hover",
41425
41420
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
41426
41421
  className: "flex flex-column justify-content-center",
@@ -41438,7 +41433,7 @@ const GetFormItem = _ref53 => {
41438
41433
  title: t("Not applicable"),
41439
41434
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
41440
41435
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
41441
- disabled: !(input !== null && input !== void 0 && (_input$meta14 = input.meta) !== null && _input$meta14 !== void 0 && _input$meta14.notApplicable),
41436
+ disabled: !input?.meta?.notApplicable,
41442
41437
  className: formatClassname(["default p-0", inputMeta.notApplicable && "primary"]),
41443
41438
  type: "link",
41444
41439
  onClick: () => {
@@ -41473,7 +41468,7 @@ const GetFormItem = _ref53 => {
41473
41468
  title: t("No available information"),
41474
41469
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
41475
41470
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
41476
- disabled: !(input !== null && input !== void 0 && (_input$meta15 = input.meta) !== null && _input$meta15 !== void 0 && _input$meta15.notAvailable),
41471
+ disabled: !input?.meta?.notAvailable,
41477
41472
  className: formatClassname(["default p-0", inputMeta.notAvailable && "primary"]),
41478
41473
  type: "link",
41479
41474
  onClick: () => {
@@ -41507,14 +41502,14 @@ const GetFormItem = _ref53 => {
41507
41502
  }), /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
41508
41503
  title: t("Add comment"),
41509
41504
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
41510
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
41505
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
41511
41506
  type: "link",
41512
- disabled: !(input !== null && input !== void 0 && (_input$meta16 = input.meta) !== null && _input$meta16 !== void 0 && _input$meta16.comment)
41513
- }, !isShown ? {
41514
- className: "default p-0"
41515
- } : {
41516
- className: "p-0 primary"
41517
- }), {}, {
41507
+ disabled: !input?.meta?.comment,
41508
+ ...(!isShown ? {
41509
+ className: "default p-0"
41510
+ } : {
41511
+ className: "p-0 primary"
41512
+ }),
41518
41513
  onClick: () => {
41519
41514
  setIsShown(true);
41520
41515
  changeInputMeta({
@@ -41530,18 +41525,18 @@ const GetFormItem = _ref53 => {
41530
41525
  width: 16,
41531
41526
  height: 16
41532
41527
  })
41533
- }))
41528
+ })
41534
41529
  })
41535
41530
  })]
41536
- }), (_input$meta17 = input.meta) !== null && _input$meta17 !== void 0 && _input$meta17.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
41531
+ }), input.meta?.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
41537
41532
  className: "code",
41538
41533
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
41539
- children: (_input$meta18 = input.meta) === null || _input$meta18 === void 0 ? void 0 : _input$meta18.code
41534
+ children: input.meta?.code
41540
41535
  })
41541
41536
  }) : code ? /*#__PURE__*/jsxRuntime.jsx("div", {
41542
41537
  className: "code",
41543
41538
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
41544
- children: "".concat(code, ".").concat(i + 1)
41539
+ children: `${code}.${i + 1}`
41545
41540
  })
41546
41541
  }) : null]
41547
41542
  })
@@ -41561,7 +41556,7 @@ const GetFormItem = _ref53 => {
41561
41556
  getAppHeader,
41562
41557
  getApiBaseUrl
41563
41558
  }) : console.log(input)
41564
- }))
41559
+ })
41565
41560
  }), alertError ? /*#__PURE__*/jsxRuntime.jsx(antd.Alert, {
41566
41561
  message: alertError.message,
41567
41562
  type: "error",
@@ -41590,10 +41585,10 @@ const GetFormItem = _ref53 => {
41590
41585
  className: "max-char-span",
41591
41586
  children: t("max-char", {
41592
41587
  chars: maxRule,
41593
- filled: (inputData === null || inputData === void 0 || (_inputData$value = inputData.value) === null || _inputData$value === void 0 ? void 0 : _inputData$value.length) || 0
41588
+ filled: inputData?.value?.length || 0
41594
41589
  })
41595
41590
  })
41596
- }) : null, (_input$meta19 = input.meta) !== null && _input$meta19 !== void 0 && _input$meta19.comment && isShown ? /*#__PURE__*/jsxRuntime.jsxs("div", {
41591
+ }) : null, input.meta?.comment && isShown ? /*#__PURE__*/jsxRuntime.jsxs("div", {
41597
41592
  className: "input-content dynamic-form-comment",
41598
41593
  children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
41599
41594
  className: "comment-textarea",
@@ -41619,7 +41614,7 @@ const GetFormItem = _ref53 => {
41619
41614
  },
41620
41615
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
41621
41616
  type: "link",
41622
- disabled: !((_input$meta20 = input.meta) !== null && _input$meta20 !== void 0 && _input$meta20.comment),
41617
+ disabled: !input.meta?.comment,
41623
41618
  className: "p-0",
41624
41619
  children: /*#__PURE__*/jsxRuntime.jsx(Icons.DeleteOutlined, {
41625
41620
  width: 16,
@@ -41650,7 +41645,7 @@ const GetFormItem = _ref53 => {
41650
41645
  className: "max-char-span",
41651
41646
  children: t("max-char", {
41652
41647
  chars: MAX_COMMENTS_LENGTH,
41653
- filled: (inputData === null || inputData === void 0 || (_inputData$commentVal = inputData.commentValue) === null || _inputData$commentVal === void 0 ? void 0 : _inputData$commentVal.length) || 0
41648
+ filled: inputData?.commentValue?.length || 0
41654
41649
  })
41655
41650
  })]
41656
41651
  }) : null]
@@ -41670,23 +41665,22 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
41670
41665
  const formId = form.dataId || k;
41671
41666
  const allInputs = Object.keys(form.inputs).filter(i => {
41672
41667
  const input = form.inputs[i];
41673
- return !excludedKeys.includes(i) && !input.excludeFromEdit && showHideInput(input, values, undefined, undefined, setValues, "".concat(formId, ".").concat(i));
41668
+ return !excludedKeys.includes(i) && !input.excludeFromEdit && showHideInput(input, values, undefined, undefined, setValues, `${formId}.${i}`);
41674
41669
  });
41675
41670
  return allInputs.length ? /*#__PURE__*/jsxRuntime.jsxs(React__default["default"].Fragment, {
41676
41671
  children: [getFormTitles(formTitles, formId, i), ['h2', 'h3', 'h4', 'h5', 'h6'].includes(form.type) ? getInputHeadLines(form.type, i, form, values) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
41677
41672
  children: [!form.repeatable ? /*#__PURE__*/jsxRuntime.jsx("h3", {
41678
- className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " mb0 ").concat(i ? 'mt-3' : ''),
41673
+ className: `${form.titleClass ? form.titleClass : 'title-semibold-4'} mb0 ${i ? 'mt-3' : ''}`,
41679
41674
  children: getInputLabel(form, values)
41680
41675
  }) : !form.hideSectionLabel ? /*#__PURE__*/jsxRuntime.jsx("h3", {
41681
- className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " mb0 ").concat(i ? 'mt-3' : ''),
41676
+ className: `${form.titleClass ? form.titleClass : 'title-semibold-4'} mb0 ${i ? 'mt-3' : ''}`,
41682
41677
  children: form.sectionLabel ? getSectionLabel(form.sectionLabel, values) : form.label ? getInputLabel(form, values) : camelCaseToTitle(k)
41683
41678
  }) : null, /*#__PURE__*/jsxRuntime.jsx(antd.Form.List, {
41684
41679
  name: formId,
41685
- children: (fields, _ref) => {
41686
- let {
41687
- add,
41688
- remove
41689
- } = _ref;
41680
+ children: (fields, {
41681
+ add,
41682
+ remove
41683
+ }) => {
41690
41684
  const formData = form.repeatable ? values[formId] || [] : values[formId] ? [values[formId]] : [];
41691
41685
  if (fields.length === 0) {
41692
41686
  const formInputs = form.inputs;
@@ -41737,7 +41731,7 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
41737
41731
  padding: '0px 5px',
41738
41732
  color: '#2E90FA'
41739
41733
  },
41740
- children: "#".concat(field.name + 1)
41734
+ children: `#${field.name + 1}`
41741
41735
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
41742
41736
  className: "remove-button-for-repeatable",
41743
41737
  children: (formData.filter(k => Object.keys(k).length > 0).length >= 1 || fields.length > 1) && (typeof form.canDelete !== 'function' || form.canDelete(Array.isArray(values[formId]) ? values[formId][field.name] || {} : values[formId] || {})) ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
@@ -41759,8 +41753,8 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
41759
41753
  const inputId = input.dataId || inp;
41760
41754
  const inputValues = Array.isArray(values[formId]) ? values[formId][field.name] || {} : values[formId] || {};
41761
41755
  const value = inputValues[inputId];
41762
- const commentValue = inputValues["".concat(inputId, "Comment")];
41763
- const inputData = getData(formId, input, value, commentValue, "".concat(formId, "[").concat(field.name, "].").concat(inputId), "".concat(formId, ".").concat(inputId));
41756
+ const commentValue = inputValues[`${inputId}Comment`];
41757
+ const inputData = getData(formId, input, value, commentValue, `${formId}[${field.name}].${inputId}`, `${formId}.${inputId}`);
41764
41758
  const subtitles = form.subtitles || null;
41765
41759
  inputData.repeatIndex = field.name;
41766
41760
  inputData.inputName = inputId;
@@ -41781,59 +41775,64 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
41781
41775
  message: requiredRule.message || ''
41782
41776
  });
41783
41777
  }
41784
- return showHideInput(input, values, field.name, inputValues, setValues, "".concat(formId, "[").concat(field.name, "].").concat(inputId)) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
41778
+ return showHideInput(input, values, field.name, inputValues, setValues, `${formId}[${field.name}].${inputId}`) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
41785
41779
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
41786
- className: form.repeatable ? "inputs" : "",
41780
+ className: form.repeatable ? `inputs` : "",
41787
41781
  children: [getSubtitles(subtitles, input.position, values, field.name, inputValues), ['h2', 'h3', 'h4', 'h5', 'h6'].includes(input.type) ? getInputHeadLines(input.type, i, input, values) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
41788
- children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, field), {}, {
41789
- required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
41790
- }, ['total100', 'group'].includes(input.type) ? {} : {
41791
- name: [field.name, inputId],
41792
- fieldKey: [field.fieldKey, inputId],
41793
- initialValue: inputData.value
41794
- }), ['upload'].includes(input.type) ? {
41795
- valuePropName: "fileList",
41796
- getValueFromEvent: e => {
41797
- if (Array.isArray(e)) {
41798
- return e;
41799
- }
41800
- return e && e.fileList && e.fileList.map(f => {
41801
- if (f.response) {
41802
- return f.response;
41782
+ children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
41783
+ ...field,
41784
+ required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false,
41785
+ ...(['total100', 'group'].includes(input.type) ? {} : {
41786
+ name: [field.name, inputId],
41787
+ fieldKey: [field.fieldKey, inputId],
41788
+ initialValue: inputData.value
41789
+ }),
41790
+ ...(['upload'].includes(input.type) ? {
41791
+ valuePropName: "fileList",
41792
+ getValueFromEvent: e => {
41793
+ if (Array.isArray(e)) {
41794
+ return e;
41803
41795
  }
41804
- return f;
41805
- });
41806
- }
41807
- } : {}), {}, {
41796
+ return e && e.fileList && e.fileList.map(f => {
41797
+ if (f.response) {
41798
+ return f.response;
41799
+ }
41800
+ return f;
41801
+ });
41802
+ }
41803
+ } : {}),
41808
41804
  style: input.showOnView === false ? {
41809
41805
  display: 'none'
41810
- } : {}
41811
- }, ['switch'].includes(input.type) ? {
41812
- labelCol: {
41813
- span: 20
41814
- },
41815
- style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
41816
- display: 'none'
41817
- } : {}), {}, {
41818
- flexDirection: 'row',
41819
- justifyContent: 'space-between'
41820
- })
41821
- } : {}), {}, {
41806
+ } : {},
41807
+ ...(['switch'].includes(input.type) ? {
41808
+ labelCol: {
41809
+ span: 20
41810
+ },
41811
+ style: {
41812
+ ...(input.showOnView === false ? {
41813
+ display: 'none'
41814
+ } : {}),
41815
+ flexDirection: 'row',
41816
+ justifyContent: 'space-between'
41817
+ }
41818
+ } : {}),
41822
41819
  label: getInputLabel(input, values),
41823
41820
  rules: rules,
41824
- className: input.comment ? "with-comment i-".concat(input.type) : "i-".concat(input.type),
41821
+ className: input.comment ? `with-comment i-${input.type}` : `i-${input.type}`,
41825
41822
  extra: input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
41826
41823
  disabled: inputData.props.disabled,
41827
41824
  type: "link",
41828
41825
  onClick: () => {
41829
41826
  const inputValues = Array.isArray(values[formId]) ? values[formId][field.name] || {} : values[formId] || {};
41830
- inputValues["".concat(inputData.inputName, "Comment")] = !inputData.commentValue ? '' : undefined;
41827
+ inputValues[`${inputData.inputName}Comment`] = !inputData.commentValue ? '' : undefined;
41831
41828
  if (Array.isArray(values[formId])) {
41832
41829
  values[formId][field.name] = inputValues;
41833
41830
  } else {
41834
41831
  values[formId] = inputValues;
41835
41832
  }
41836
- setValues(_objectSpread2({}, values));
41833
+ setValues({
41834
+ ...values
41835
+ });
41837
41836
  },
41838
41837
  children: t(!inputData.commentValue ? 'Add Comment' : 'Remove Comment')
41839
41838
  }) : null,
@@ -41850,9 +41849,9 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
41850
41849
  getAppHeader,
41851
41850
  getApiBaseUrl
41852
41851
  }) : console.log(input)
41853
- })), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
41854
- name: [field.name, "".concat(inputData.inputName, "Comment")],
41855
- fieldKey: [field.fieldKey, "".concat(inputData.inputName, "Comment")],
41852
+ }), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
41853
+ name: [field.name, `${inputData.inputName}Comment`],
41854
+ fieldKey: [field.fieldKey, `${inputData.inputName}Comment`],
41856
41855
  initialValue: inputData.commentValue,
41857
41856
  hidden: !inputData.commentValue,
41858
41857
  children: inputTypeComponent.comment(inputData, {
@@ -41866,10 +41865,10 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
41866
41865
  }) : null]
41867
41866
  })]
41868
41867
  }, ii)
41869
- }, "".concat(i).concat(ii)) : null;
41868
+ }, `${i}${ii}`) : null;
41870
41869
  })
41871
41870
  })]
41872
- }, "".concat(formId, "-").concat(field.name))), form.repeatable ? /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
41871
+ }, `${formId}-${field.name}`)), form.repeatable ? /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
41873
41872
  type: "dashed",
41874
41873
  style: {
41875
41874
  margin: '10px 0px 30px',
@@ -41898,7 +41897,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
41898
41897
  const hasLabel = label && (typeof label === 'string' && (label || '').trim() !== '' || typeof label === 'object') ? true : false;
41899
41898
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
41900
41899
  children: [hasLabel ? /*#__PURE__*/jsxRuntime.jsx("h3", {
41901
- className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " ").concat(i ? 'mt-3 mb-1' : ''),
41900
+ className: `${form.titleClass ? form.titleClass : 'title-semibold-4'} ${i ? 'mt-3 mb-1' : ''}`,
41902
41901
  children: label
41903
41902
  }) : null, /*#__PURE__*/jsxRuntime.jsx("div", {
41904
41903
  className: hasLabel ? "mb-4" : "",
@@ -41907,8 +41906,8 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
41907
41906
  const inputId = input.dataId || inp;
41908
41907
  const inputValues = Array.isArray(values[formId]) ? values[formId] || {} : values[formId] || {};
41909
41908
  const value = inputValues[inputId];
41910
- const commentValue = inputValues["".concat(inputId, "Comment")];
41911
- const inputData = getData(formId, input, value, commentValue, "".concat(formId, ".").concat(inputId), "".concat(formId, ".").concat(inputId));
41909
+ const commentValue = inputValues[`${inputId}Comment`];
41910
+ const inputData = getData(formId, input, value, commentValue, `${formId}.${inputId}`, `${formId}.${inputId}`);
41912
41911
  const subtitles = form.subtitles || null;
41913
41912
  inputData.repeatIndex = undefined;
41914
41913
  inputData.inputName = inputId;
@@ -41929,58 +41928,62 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
41929
41928
  message: requiredRule.message || ''
41930
41929
  });
41931
41930
  }
41932
- return showHideInput(input, values, undefined, inputValues, setValues, "".concat(formId, ".").concat(inputId)) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
41931
+ return showHideInput(input, values, undefined, inputValues, setValues, `${formId}.${inputId}`) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
41933
41932
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
41934
41933
  children: [getSubtitles(subtitles, input.position, values, undefined, inputValues), ['h2', 'h3', 'h4', 'h5', 'h6'].includes(input.type) ? getInputHeadLines(input.type, i, input, values) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
41935
- children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
41936
- required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
41937
- }, ['total100', 'group'].includes(input.type) ? {} : {
41938
- name: [formId, inputId],
41939
- fieldKey: [formId, inputId],
41940
- initialValue: inputData.value
41941
- }), ['upload'].includes(input.type) ? {
41942
- valuePropName: "fileList",
41943
- getValueFromEvent: e => {
41944
- if (Array.isArray(e)) {
41945
- return e;
41946
- }
41947
- return e && e.fileList && e.fileList.map(f => {
41948
- if (f.response) {
41949
- return f.response;
41934
+ children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
41935
+ required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false,
41936
+ ...(['total100', 'group'].includes(input.type) ? {} : {
41937
+ name: [formId, inputId],
41938
+ fieldKey: [formId, inputId],
41939
+ initialValue: inputData.value
41940
+ }),
41941
+ ...(['upload'].includes(input.type) ? {
41942
+ valuePropName: "fileList",
41943
+ getValueFromEvent: e => {
41944
+ if (Array.isArray(e)) {
41945
+ return e;
41950
41946
  }
41951
- return f;
41952
- });
41953
- }
41954
- } : {}), {}, {
41947
+ return e && e.fileList && e.fileList.map(f => {
41948
+ if (f.response) {
41949
+ return f.response;
41950
+ }
41951
+ return f;
41952
+ });
41953
+ }
41954
+ } : {}),
41955
41955
  style: input.showOnView === false ? {
41956
41956
  display: 'none'
41957
- } : {}
41958
- }, ['switch'].includes(input.type) ? {
41959
- labelCol: {
41960
- span: 20
41961
- },
41962
- style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
41963
- display: 'none'
41964
- } : {}), {}, {
41965
- flexDirection: 'row',
41966
- justifyContent: 'space-between'
41967
- })
41968
- } : {}), {}, {
41957
+ } : {},
41958
+ ...(['switch'].includes(input.type) ? {
41959
+ labelCol: {
41960
+ span: 20
41961
+ },
41962
+ style: {
41963
+ ...(input.showOnView === false ? {
41964
+ display: 'none'
41965
+ } : {}),
41966
+ flexDirection: 'row',
41967
+ justifyContent: 'space-between'
41968
+ }
41969
+ } : {}),
41969
41970
  label: getInputLabel(input, values),
41970
41971
  rules: rules,
41971
- className: input.comment ? "with-comment i-".concat(input.type) : "i-".concat(input.type),
41972
+ className: input.comment ? `with-comment i-${input.type}` : `i-${input.type}`,
41972
41973
  extra: input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
41973
41974
  disabled: inputData.props.disabled,
41974
41975
  type: "link",
41975
41976
  onClick: () => {
41976
41977
  const inputValues = Array.isArray(values[formId]) ? values[formId] || {} : values[formId] || {};
41977
- inputValues["".concat(inputData.inputName, "Comment")] = !inputData.commentValue ? '' : undefined;
41978
+ inputValues[`${inputData.inputName}Comment`] = !inputData.commentValue ? '' : undefined;
41978
41979
  if (Array.isArray(values[formId])) {
41979
41980
  values[formId] = inputValues;
41980
41981
  } else {
41981
41982
  values[formId] = inputValues;
41982
41983
  }
41983
- setValues(_objectSpread2({}, values));
41984
+ setValues({
41985
+ ...values
41986
+ });
41984
41987
  },
41985
41988
  children: t(!inputData.commentValue ? 'Add Comment' : 'Remove Comment')
41986
41989
  }) : null,
@@ -41995,9 +41998,9 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
41995
41998
  getAppHeader,
41996
41999
  getApiBaseUrl
41997
42000
  }) : console.log(input)
41998
- })), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
41999
- name: [formId, "".concat(inputData.inputName, "Comment")],
42000
- fieldKey: [formId, "".concat(inputData.inputName, "Comment")],
42001
+ }), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
42002
+ name: [formId, `${inputData.inputName}Comment`],
42003
+ fieldKey: [formId, `${inputData.inputName}Comment`],
42001
42004
  initialValue: inputData.commentValue,
42002
42005
  hidden: !inputData.commentValue,
42003
42006
  children: inputTypeComponent.comment(inputData, {
@@ -42011,7 +42014,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
42011
42014
  }) : null]
42012
42015
  })]
42013
42016
  }, ii)
42014
- }, "".concat(i).concat(ii)) : null;
42017
+ }, `${i}${ii}`) : null;
42015
42018
  })
42016
42019
  })]
42017
42020
  });
@@ -42050,7 +42053,10 @@ const useCombinedPrefilledValues = (combinedPrefilledValues, values, parentValue
42050
42053
  }
42051
42054
  });
42052
42055
  if (hasChanges) {
42053
- setValues(prevValues => _objectSpread2(_objectSpread2({}, prevValues), resolvedValues));
42056
+ setValues(prevValues => ({
42057
+ ...prevValues,
42058
+ ...resolvedValues
42059
+ }));
42054
42060
  MainForm.setFieldsValue(resolvedValues);
42055
42061
  }
42056
42062
  }, [values, parentValues, combinedPrefilledValues, setValues, MainForm]);