datastake-daf 0.6.269 → 0.6.271

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.
@@ -3215,7 +3215,7 @@ const config$3 = {
3215
3215
  Lightning: config$4
3216
3216
  };
3217
3217
 
3218
- const _excluded$x = ["width", "height", "size", "name", "fill"];
3218
+ const _excluded$w = ["width", "height", "size", "name", "fill"];
3219
3219
  const CustomIcon = _ref => {
3220
3220
  let {
3221
3221
  width = 14,
@@ -3224,7 +3224,7 @@ const CustomIcon = _ref => {
3224
3224
  name = "",
3225
3225
  fill = "none"
3226
3226
  } = _ref,
3227
- props = _objectWithoutProperties(_ref, _excluded$x);
3227
+ props = _objectWithoutProperties(_ref, _excluded$w);
3228
3228
  const conf = config$3[name];
3229
3229
  if (conf) {
3230
3230
  return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
@@ -9426,7 +9426,7 @@ createCommonjsModule(function (module, exports) {
9426
9426
  !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])+"]"}}}));
9427
9427
  });
9428
9428
 
9429
- const _excluded$w = ["view", "module", "scope", "form", "meta"];
9429
+ const _excluded$v = ["view", "module", "scope", "form", "meta"];
9430
9430
  dayjs__default["default"].extend(customParseFormat);
9431
9431
  dayjs__default["default"].extend(utc);
9432
9432
  dayjs__default["default"].extend(utc);
@@ -9800,7 +9800,7 @@ const filterCreateData = data => {
9800
9800
  form,
9801
9801
  meta
9802
9802
  } = data,
9803
- rest = _objectWithoutProperties(data, _excluded$w);
9803
+ rest = _objectWithoutProperties(data, _excluded$v);
9804
9804
  const _meta = isObjectEmpty(meta) ? undefined : meta;
9805
9805
  return _objectSpread2(_objectSpread2({}, rest), {}, {
9806
9806
  meta: _meta
@@ -10180,7 +10180,7 @@ SelectFilters.propTypes = {
10180
10180
  apiUrl: PropTypes__default["default"].string
10181
10181
  };
10182
10182
 
10183
- const _excluded$v = ["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"];
10183
+ const _excluded$u = ["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"];
10184
10184
  function DAFTable(_ref) {
10185
10185
  let {
10186
10186
  columns = [],
@@ -10211,7 +10211,7 @@ function DAFTable(_ref) {
10211
10211
  app,
10212
10212
  doEmptyRows
10213
10213
  } = _ref,
10214
- rest = _objectWithoutProperties(_ref, _excluded$v);
10214
+ rest = _objectWithoutProperties(_ref, _excluded$u);
10215
10215
  const [source, setSource] = React.useState([]);
10216
10216
  const projectData = (projects || []).find(p => p.id === selectedProject);
10217
10217
  const [filtersInit, setFiltersInit] = React.useState(!loading);
@@ -11128,7 +11128,7 @@ function ComponentWithFocus(_ref) {
11128
11128
  }
11129
11129
 
11130
11130
  var _templateObject$c;
11131
- const _excluded$u = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
11131
+ const _excluded$t = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
11132
11132
  function StickyTable(_ref) {
11133
11133
  let {
11134
11134
  size = "small",
@@ -11139,7 +11139,7 @@ function StickyTable(_ref) {
11139
11139
  pagination = false,
11140
11140
  doEmptyRows = true
11141
11141
  } = _ref,
11142
- props = _objectWithoutProperties(_ref, _excluded$u);
11142
+ props = _objectWithoutProperties(_ref, _excluded$t);
11143
11143
  const data = React__default["default"].useMemo(() => {
11144
11144
  if (!doEmptyRows) {
11145
11145
  return dataSource;
@@ -11635,7 +11635,7 @@ const BTN_SIZE = {
11635
11635
  LG: 'large'
11636
11636
  };
11637
11637
 
11638
- const _excluded$t = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
11638
+ const _excluded$s = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
11639
11639
  function DafButton(_ref) {
11640
11640
  let {
11641
11641
  content = '',
@@ -11649,7 +11649,7 @@ function DafButton(_ref) {
11649
11649
  style = {},
11650
11650
  className = ''
11651
11651
  } = _ref,
11652
- restProps = _objectWithoutProperties(_ref, _excluded$t);
11652
+ restProps = _objectWithoutProperties(_ref, _excluded$s);
11653
11653
  return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
11654
11654
  icon: icon,
11655
11655
  type: type,
@@ -11768,12 +11768,12 @@ const Style$H = dt.div`
11768
11768
  }
11769
11769
  `;
11770
11770
 
11771
- const _excluded$s = ["children"];
11771
+ const _excluded$r = ["children"];
11772
11772
  const BorderedButton = _ref => {
11773
11773
  let {
11774
11774
  children
11775
11775
  } = _ref,
11776
- props = _objectWithoutProperties(_ref, _excluded$s);
11776
+ props = _objectWithoutProperties(_ref, _excluded$r);
11777
11777
  return /*#__PURE__*/jsxRuntime.jsx(Style$H, {
11778
11778
  className: "d-btn-cont",
11779
11779
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -11913,12 +11913,12 @@ Badge.propTypes = {
11913
11913
  props: PropTypes__default["default"].object
11914
11914
  };
11915
11915
 
11916
- const _excluded$r = ["icon"];
11916
+ const _excluded$q = ["icon"];
11917
11917
  function GetIcon(_ref) {
11918
11918
  let {
11919
11919
  icon
11920
11920
  } = _ref,
11921
- props = _objectWithoutProperties(_ref, _excluded$r);
11921
+ props = _objectWithoutProperties(_ref, _excluded$q);
11922
11922
  let Icon = Icons__namespace.CloseOutlined;
11923
11923
  if (Icons__namespace[icon]) {
11924
11924
  Icon = Icons__namespace[icon];
@@ -12237,7 +12237,7 @@ GoToSelect.propTypes = {
12237
12237
  t: PropTypes__default["default"].func
12238
12238
  };
12239
12239
 
12240
- const _excluded$q = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
12240
+ const _excluded$p = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
12241
12241
  const {
12242
12242
  useToken: useToken$l
12243
12243
  } = antd.theme;
@@ -12330,7 +12330,7 @@ function Multiselect(_ref) {
12330
12330
  isSingle = false,
12331
12331
  selectionType = SELECTION_TYPES.DEFAULT
12332
12332
  } = _ref,
12333
- restProps = _objectWithoutProperties(_ref, _excluded$q);
12333
+ restProps = _objectWithoutProperties(_ref, _excluded$p);
12334
12334
  const {
12335
12335
  token
12336
12336
  } = useToken$l();
@@ -13046,7 +13046,7 @@ DAFHeader.propTypes = {
13046
13046
  filtersConfig: PropTypes__default["default"].any
13047
13047
  };
13048
13048
 
13049
- const _excluded$p = ["tabs", "onChange", "value", "className"];
13049
+ const _excluded$o = ["tabs", "onChange", "value", "className"];
13050
13050
  function TabsHeader(_ref) {
13051
13051
  let {
13052
13052
  tabs = [],
@@ -13054,7 +13054,7 @@ function TabsHeader(_ref) {
13054
13054
  value = '',
13055
13055
  className = 'mt-2'
13056
13056
  } = _ref,
13057
- rest = _objectWithoutProperties(_ref, _excluded$p);
13057
+ rest = _objectWithoutProperties(_ref, _excluded$o);
13058
13058
  return /*#__PURE__*/jsxRuntime.jsx("div", {
13059
13059
  className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
13060
13060
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
@@ -13151,7 +13151,7 @@ DrawerHeader.propTypes = {
13151
13151
  tabsConfig: PropTypes__default["default"].any
13152
13152
  };
13153
13153
 
13154
- const _excluded$o = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
13154
+ const _excluded$n = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
13155
13155
  const useFooter = _ref => {
13156
13156
  let {
13157
13157
  leftContent,
@@ -13186,7 +13186,7 @@ const useFooter = _ref => {
13186
13186
  style = {},
13187
13187
  className = ""
13188
13188
  } = button,
13189
- restProps = _objectWithoutProperties(button, _excluded$o);
13189
+ restProps = _objectWithoutProperties(button, _excluded$n);
13190
13190
  return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
13191
13191
  content: label,
13192
13192
  type: type,
@@ -14082,8 +14082,9 @@ const determineHasChildren = ({
14082
14082
 
14083
14083
  const sortByPosition = (items, getConfig) => {
14084
14084
  return items.sort((a, b) => {
14085
- const positionA = getConfig(a)?.position || 0;
14086
- const positionB = getConfig(b)?.position || 0;
14085
+ var _getConfig, _getConfig2;
14086
+ const positionA = ((_getConfig = getConfig(a)) === null || _getConfig === void 0 ? void 0 : _getConfig.position) || 0;
14087
+ const positionB = ((_getConfig2 = getConfig(b)) === null || _getConfig2 === void 0 ? void 0 : _getConfig2.position) || 0;
14087
14088
  return positionA - positionB;
14088
14089
  });
14089
14090
  };
@@ -14100,7 +14101,7 @@ const resolveDynamicLabel = (labelConfig, item, defaultLabel) => {
14100
14101
  const parts = labelKey.split(' is ');
14101
14102
  if (parts.length === 2) {
14102
14103
  const [conditionKey, conditionValue] = parts;
14103
- if (item?.[conditionKey] === conditionValue) {
14104
+ if ((item === null || item === void 0 ? void 0 : item[conditionKey]) === conditionValue) {
14104
14105
  return labelConfig[labelKey];
14105
14106
  }
14106
14107
  }
@@ -16090,7 +16091,7 @@ Widget.propTypes = {
16090
16091
  description: PropTypes__default["default"].string
16091
16092
  };
16092
16093
 
16093
- const _excluded$n = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText"];
16094
+ const _excluded$m = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText"];
16094
16095
  function ImageWidget(_ref) {
16095
16096
  let {
16096
16097
  loading = false,
@@ -16100,7 +16101,7 @@ function ImageWidget(_ref) {
16100
16101
  imgAlt,
16101
16102
  noDescriptionText
16102
16103
  } = _ref,
16103
- props = _objectWithoutProperties(_ref, _excluded$n);
16104
+ props = _objectWithoutProperties(_ref, _excluded$m);
16104
16105
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
16105
16106
  loading: loading,
16106
16107
  title: title,
@@ -16157,7 +16158,7 @@ function ImageWidget(_ref) {
16157
16158
  }
16158
16159
 
16159
16160
  var _templateObject$9;
16160
- const _excluded$m = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
16161
+ const _excluded$l = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
16161
16162
  function FlowWidget(_ref) {
16162
16163
  let {
16163
16164
  title,
@@ -16169,7 +16170,7 @@ function FlowWidget(_ref) {
16169
16170
  className,
16170
16171
  direction = "horizontal"
16171
16172
  } = _ref,
16172
- rest = _objectWithoutProperties(_ref, _excluded$m);
16173
+ rest = _objectWithoutProperties(_ref, _excluded$l);
16173
16174
  const [activeTab, setActiveTab] = React.useState();
16174
16175
  React.useEffect(() => {
16175
16176
  if (defaultActiveTab) {
@@ -19228,7 +19229,7 @@ Map$3.propTypes = {
19228
19229
  nameAsSiderTitle: PropTypes__default["default"].bool
19229
19230
  };
19230
19231
 
19231
- const _excluded$l = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
19232
+ const _excluded$k = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
19232
19233
  function InExpandableWidgetMap(_ref) {
19233
19234
  let {
19234
19235
  isExpanded,
@@ -19242,7 +19243,7 @@ function InExpandableWidgetMap(_ref) {
19242
19243
  height,
19243
19244
  widgetConfig
19244
19245
  } = _ref,
19245
- rest = _objectWithoutProperties(_ref, _excluded$l);
19246
+ rest = _objectWithoutProperties(_ref, _excluded$k);
19246
19247
  const [mapKey, setMapKey] = React.useState(0);
19247
19248
  const [isMapReady, setIsMapReady] = React.useState(false);
19248
19249
  React.useEffect(() => {
@@ -19927,14 +19928,26 @@ const useGlobe = ({
19927
19928
  const addedSources = React.useRef(new Set());
19928
19929
  const isMounted = React.useRef(true);
19929
19930
  const addAllDataToMap = React.useCallback(() => {
19930
- if (!data || !mapRef || !mapRef.isStyleLoaded()) {
19931
+ console.log('🚀 [GLOBE HOOK] addAllDataToMap called');
19932
+ console.log('🚀 [GLOBE HOOK] data:', data);
19933
+ console.log('🚀 [GLOBE HOOK] mapRef exists:', !!mapRef);
19934
+ console.log('🚀 [GLOBE HOOK] style loaded:', mapRef?.isStyleLoaded());
19935
+ if (!data || !mapRef) {
19936
+ console.log('❌ [GLOBE HOOK] addAllDataToMap early return - missing data or mapRef');
19937
+ return;
19938
+ }
19939
+ if (!mapRef.isStyleLoaded()) {
19940
+ console.log('⏳ [GLOBE HOOK] Style not loaded yet, retrying in 100ms...');
19941
+ setTimeout(() => {
19942
+ addAllDataToMap();
19943
+ }, 100);
19931
19944
  return;
19932
19945
  }
19933
-
19934
- // Prevent multiple calls with empty data
19935
19946
  if (data.length === 0) {
19947
+ console.log('❌ [GLOBE HOOK] addAllDataToMap early return - no data');
19936
19948
  return;
19937
19949
  }
19950
+ console.log('✅ [GLOBE HOOK] Starting to add markers to map...');
19938
19951
 
19939
19952
  // Clear existing markers using functional update to avoid dependency issues
19940
19953
  setMapMarkers(currentMarkers => {
@@ -19986,8 +19999,13 @@ const useGlobe = ({
19986
19999
  if (data && mapRef) {
19987
20000
  const newMarkers = [];
19988
20001
  const maxTotal = Math.max(...(data || []).map(d => d.total || 0));
20002
+ console.log('🎯 [GLOBE HOOK] Processing data items:', data.length);
19989
20003
  data.forEach((d, i) => {
20004
+ console.log(`🎯 [GLOBE HOOK] Processing item ${i}:`, d);
20005
+ console.log(`🎯 [GLOBE HOOK] Item ${i} marker:`, d?.marker);
20006
+ console.log(`🎯 [GLOBE HOOK] Item ${i} lat/lng:`, d?.marker?.lat, d?.marker?.lng);
19990
20007
  if (d?.marker?.lat && d?.marker?.lng) {
20008
+ console.log(`✅ [GLOBE HOOK] Item ${i} has valid coordinates, creating marker...`);
19991
20009
  let marker;
19992
20010
  let iconClassName = "";
19993
20011
  let iconSize = [25, 25];
@@ -20067,6 +20085,7 @@ const useGlobe = ({
20067
20085
  el.style.fontWeight = 'bold';
20068
20086
  el.innerHTML = `<span>${d.total || 0}</span>`;
20069
20087
  marker = new mapboxgl.Marker(el).setLngLat([d.marker.lng, d.marker.lat]).setPopup(new mapboxgl.Popup().setDOMContent(div)).addTo(mapRef);
20088
+ console.log(`🎉 [GLOBE HOOK] Marker ${i} added to map at:`, [d.marker.lng, d.marker.lat]);
20070
20089
  } else if (type === "territory") {
20071
20090
  // Handle territory polygons
20072
20091
  if (d.area && Array.isArray(d.area)) {
@@ -20136,6 +20155,7 @@ const useGlobe = ({
20136
20155
  }));
20137
20156
  roots.current.push(root);
20138
20157
  marker = new mapboxgl.Marker(el).setLngLat([d.marker.lng, d.marker.lat]).setPopup(new mapboxgl.Popup().setDOMContent(div)).addTo(mapRef);
20158
+ console.log(`🎉 [GLOBE HOOK] Default marker ${i} added to map at:`, [d.marker.lng, d.marker.lat]);
20139
20159
  }
20140
20160
 
20141
20161
  // Add click handler
@@ -20169,6 +20189,7 @@ const useGlobe = ({
20169
20189
  mapboxgl.accessToken = MAP_TOKEN;
20170
20190
 
20171
20191
  // Create the map with Mapbox GL JS - 3D globe
20192
+ console.log('🗺️ [GLOBE HOOK] Creating map with style:', STYLE_URL);
20172
20193
  const map = new mapboxgl.Map({
20173
20194
  container: container.current,
20174
20195
  style: STYLE_URL,
@@ -20187,8 +20208,13 @@ const useGlobe = ({
20187
20208
 
20188
20209
  // Configure the map when style loads
20189
20210
  map.on('style.load', () => {
20211
+ console.log('🎨 [GLOBE HOOK] Style loaded event triggered');
20212
+ console.log('🎨 [GLOBE HOOK] Map style loaded:', map.isStyleLoaded());
20213
+
20190
20214
  // Wait a bit for the style to fully load
20191
20215
  setTimeout(() => {
20216
+ console.log('🎨 [GLOBE HOOK] After timeout - Map style loaded:', map.isStyleLoaded());
20217
+
20192
20218
  // Set fog for the space background effect with stars - simplified to avoid errors
20193
20219
  try {
20194
20220
  map.setFog({
@@ -20284,9 +20310,10 @@ const useGlobe = ({
20284
20310
 
20285
20311
  // Add navigation controls
20286
20312
  map.addControl(new mapboxgl.NavigationControl(), 'top-right');
20313
+ console.log('🗺️ [GLOBE HOOK] Map created successfully');
20287
20314
  return map;
20288
20315
  } catch (error) {
20289
- console.error('Error creating Mapbox GL JS globe:', error);
20316
+ console.error('❌ [GLOBE HOOK] Error creating Mapbox GL JS globe:', error);
20290
20317
  return null;
20291
20318
  }
20292
20319
  }, []);
@@ -20299,9 +20326,12 @@ const useGlobe = ({
20299
20326
  // }, [initialMarkerSetIsDone]);
20300
20327
 
20301
20328
  React.useEffect(() => {
20329
+ console.log('🔄 [GLOBE HOOK] useEffect for map creation - mapRef:', !!mapRef);
20302
20330
  if (!mapRef) {
20331
+ console.log('🔄 [GLOBE HOOK] Creating map instance...');
20303
20332
  const instance = createInstance();
20304
20333
  if (instance) {
20334
+ console.log('🔄 [GLOBE HOOK] Map instance created, setting mapRef');
20305
20335
  setMapRef(instance);
20306
20336
 
20307
20337
  // Add comprehensive resize detection for Mapbox GL JS responsiveness
@@ -20382,14 +20412,22 @@ const useGlobe = ({
20382
20412
  }
20383
20413
  }, [polygon, mapRef]);
20384
20414
  React.useEffect(() => {
20415
+ console.log('📥 [GLOBE HOOK] allData received:', allData);
20416
+ console.log('📥 [GLOBE HOOK] allData length:', allData?.length);
20385
20417
  if (allData) {
20386
20418
  if (allData.length === 0) {
20419
+ console.log('⚠️ [GLOBE HOOK] Empty data array');
20387
20420
  setEmptyStateIsVisible(true);
20388
20421
  } else if (emptyStateIsVisible) {
20389
20422
  setEmptyStateIsVisible(false);
20390
20423
  }
20391
- setData(filterValidGPS(allData));
20424
+ console.log('🔍 [GLOBE HOOK] Filtering data with filterValidGPS...');
20425
+ const filteredData = filterValidGPS(allData);
20426
+ console.log('🔍 [GLOBE HOOK] filtered data result:', filteredData);
20427
+ console.log('🔍 [GLOBE HOOK] filtered data length:', filteredData.length);
20428
+ setData(filteredData);
20392
20429
  } else {
20430
+ console.log('❌ [GLOBE HOOK] No allData provided');
20393
20431
  setData(null);
20394
20432
  }
20395
20433
  }, [allData, emptyStateIsVisible]);
@@ -20419,7 +20457,19 @@ const useGlobe = ({
20419
20457
  }
20420
20458
  }, [user, mapRef, allData]);
20421
20459
  React.useEffect(() => {
20422
- if (mapRef && data && !initialMarkerSetIsDone && mapRef.isStyleLoaded()) {
20460
+ console.log('🔄 [GLOBE HOOK] useEffect triggered:', {
20461
+ mapRef: !!mapRef,
20462
+ data: !!data,
20463
+ dataLength: data?.length,
20464
+ initialMarkerSetIsDone,
20465
+ styleLoaded: mapRef?.isStyleLoaded()
20466
+ });
20467
+ if (mapRef && data && !initialMarkerSetIsDone) {
20468
+ console.log('🚀 [GLOBE HOOK] Attempting to add markers...');
20469
+ console.log('🚀 [GLOBE HOOK] Style loaded check:', mapRef.isStyleLoaded());
20470
+
20471
+ // Try to add markers immediately, and if style isn't loaded,
20472
+ // the addAllDataToMap function will handle it
20423
20473
  setInitialMarkerSetIsDone(true);
20424
20474
  addAllDataToMap();
20425
20475
  }
@@ -20632,7 +20682,7 @@ function Globe(_ref) {
20632
20682
  renderSider = null,
20633
20683
  renderMarker = null,
20634
20684
  type = "default",
20635
- showSider = true,
20685
+ showSider = false,
20636
20686
  filtersConfig,
20637
20687
  onFilterChange = () => {},
20638
20688
  isSatellite = false,
@@ -20642,15 +20692,29 @@ function Globe(_ref) {
20642
20692
  onUnmount
20643
20693
  } = _ref;
20644
20694
  // Map data to include marker coordinates
20645
- const mappedData = React.useMemo(() => data.map(d => {
20646
- var _d$gps, _d$gps2;
20647
- return _objectSpread2(_objectSpread2({}, d), {}, {
20648
- marker: {
20649
- lat: d === null || d === void 0 || (_d$gps = d.gps) === null || _d$gps === void 0 ? void 0 : _d$gps.latitude,
20650
- lng: d === null || d === void 0 || (_d$gps2 = d.gps) === null || _d$gps2 === void 0 ? void 0 : _d$gps2.longitude
20651
- }
20695
+ const mappedData = React.useMemo(() => {
20696
+ console.log('📊 [GLOBE COMPONENT] Original data received:', data);
20697
+ console.log('📊 [GLOBE COMPONENT] Data length:', data === null || data === void 0 ? void 0 : data.length);
20698
+ if (!data || data.length === 0) {
20699
+ console.log('❌ [GLOBE COMPONENT] No data to map');
20700
+ return [];
20701
+ }
20702
+ const mapped = data.map((d, i) => {
20703
+ var _d$gps, _d$gps2;
20704
+ console.log("\uD83D\uDCCA [GLOBE COMPONENT] Mapping item ".concat(i, ":"), d);
20705
+ console.log("\uD83D\uDCCA [GLOBE COMPONENT] Item ".concat(i, " GPS:"), d === null || d === void 0 ? void 0 : d.gps);
20706
+ const result = _objectSpread2(_objectSpread2({}, d), {}, {
20707
+ marker: {
20708
+ lat: d === null || d === void 0 || (_d$gps = d.gps) === null || _d$gps === void 0 ? void 0 : _d$gps.latitude,
20709
+ lng: d === null || d === void 0 || (_d$gps2 = d.gps) === null || _d$gps2 === void 0 ? void 0 : _d$gps2.longitude
20710
+ }
20711
+ });
20712
+ console.log("\uD83D\uDCCA [GLOBE COMPONENT] Item ".concat(i, " mapped result:"), result);
20713
+ return result;
20652
20714
  });
20653
- }), [data]);
20715
+ console.log('📊 [GLOBE COMPONENT] Final mapped data:', mapped);
20716
+ return mapped;
20717
+ }, [data]);
20654
20718
 
20655
20719
  // Get resize context for sidebar state changes
20656
20720
  const {
@@ -20834,6 +20898,176 @@ Globe.propTypes = {
20834
20898
  nameAsSiderTitle: PropTypes__default["default"].bool
20835
20899
  };
20836
20900
 
20901
+ const SimpleGlobe = _ref => {
20902
+ let {
20903
+ projects = [],
20904
+ mapConfig = {},
20905
+ showSider = false,
20906
+ onProjectClick = () => {},
20907
+ type = "default",
20908
+ color = "var(--color-primary-60)"
20909
+ } = _ref;
20910
+ const mapContainer = React.useRef(null);
20911
+ const map = React.useRef(null);
20912
+ React.useEffect(() => {
20913
+ if (map.current) return; // Initialize map only once
20914
+
20915
+ console.log('🗺️ [SIMPLE GLOBE] Creating map...');
20916
+
20917
+ // Set Mapbox access token
20918
+ mapboxgl.accessToken = 'pk.eyJ1IjoicmVkaXM5OTkiLCJhIjoiY2x4YWV5MzA5MmtuZzJpcXM5Y201Z2E2YiJ9.m5bwPg-Tj4Akesl1yQUa3w';
20919
+
20920
+ // Create map with custom Straatos style
20921
+ map.current = new mapboxgl.Map({
20922
+ container: mapContainer.current,
20923
+ style: 'mapbox://styles/pietragottardo/cm9tt9zfi00d101pg1vdx26si',
20924
+ center: [0, 0],
20925
+ zoom: mapConfig.maxZoom || 3,
20926
+ projection: 'globe',
20927
+ attributionControl: false
20928
+ });
20929
+
20930
+ // Add markers when map loads
20931
+ map.current.on('load', () => {
20932
+ console.log('🗺️ [SIMPLE GLOBE] Map loaded, adding markers...');
20933
+
20934
+ // Hide Mapbox logo and attribution completely
20935
+ map.current.getContainer();
20936
+ const style = document.createElement('style');
20937
+ style.textContent = "\n .mapboxgl-ctrl-logo,\n .mapboxgl-ctrl-attrib,\n .mapboxgl-ctrl-bottom-left,\n .mapboxgl-ctrl-bottom-right {\n display: none !important;\n }\n ";
20938
+ document.head.appendChild(style);
20939
+
20940
+ // Set the space background with stars
20941
+ try {
20942
+ map.current.setFog({
20943
+ 'color': 'rgb(0, 0, 0)',
20944
+ 'high-color': 'rgb(0, 0, 0)',
20945
+ 'horizon-blend': 0.1,
20946
+ 'space-color': 'rgb(0, 0, 0)',
20947
+ 'star-intensity': 0.6
20948
+ });
20949
+ console.log('✨ [SIMPLE GLOBE] Space background with stars set');
20950
+ } catch (e) {
20951
+ console.log('⚠️ [SIMPLE GLOBE] Could not set fog, trying alternative...');
20952
+ // Fallback: try simpler fog configuration
20953
+ try {
20954
+ map.current.setFog({
20955
+ 'color': 'rgb(0, 0, 0)',
20956
+ 'high-color': 'rgb(0, 0, 0)',
20957
+ 'horizon-blend': 0.1
20958
+ });
20959
+ console.log('✨ [SIMPLE GLOBE] Alternative space background set');
20960
+ } catch (e2) {
20961
+ console.log('⚠️ [SIMPLE GLOBE] Could not set any fog configuration');
20962
+ }
20963
+ }
20964
+
20965
+ // Calculate bounds to fit all markers
20966
+ const bounds = new mapboxgl.LngLatBounds();
20967
+ let hasValidCoordinates = false;
20968
+ projects.forEach((project, index) => {
20969
+ var _project$author;
20970
+ console.log("\uD83D\uDCCD [SIMPLE GLOBE] Adding marker ".concat(index, ":"), project);
20971
+
20972
+ // Create marker element based on type
20973
+ const el = document.createElement('div');
20974
+ el.className = 'mapboxgl-marker map-marker';
20975
+ el.style.cursor = 'pointer';
20976
+ el.style.boxShadow = '0px 3.45px 3.45px 0px #00000029';
20977
+ el.style.display = 'flex';
20978
+ el.style.alignItems = 'center';
20979
+ el.style.justifyContent = 'center';
20980
+ el.style.position = 'absolute';
20981
+ el.style.transform = 'translate(-50%, -50%)';
20982
+ if (type === "location") {
20983
+ // Location marker - SVG map pin style
20984
+ el.style.width = '28px';
20985
+ el.style.height = '33px';
20986
+ el.innerHTML = "\n <svg\n width=\"28\"\n height=\"33\"\n viewBox=\"0 0 28 33\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.14346 4.87419C10.0688 -0.15896 18.0528 -0.162058 22.9757 4.86861C27.6563 9.65161 27.8841 17.2616 23.6622 22.3255H23.6608C23.427 22.6141 23.1808 22.894 22.9211 23.1623L14.0671 32.2101L5.44057 23.3948L5.13868 23.096C0.215857 18.0655 0.218422 9.90737 5.14346 4.87419Z\"\n fill=\"".concat(color, "\"\n stroke=\"white\"\n />\n </svg>\n ");
20987
+ } else {
20988
+ // Default circular marker style
20989
+ el.style.width = '30px';
20990
+ el.style.height = '30px';
20991
+ el.style.backgroundColor = color;
20992
+ el.style.borderRadius = '50%';
20993
+ el.style.border = '2px solid white';
20994
+ el.style.color = 'white';
20995
+ el.style.fontWeight = 'bold';
20996
+ el.style.fontSize = '14px';
20997
+ el.style.textAlign = 'center';
20998
+ el.style.lineHeight = '1';
20999
+ el.innerHTML = "<span style=\"display: block; line-height: 1;\">".concat(project.percentageCompletion || 0, "</span>");
21000
+ }
21001
+
21002
+ // Create popup content using the same structure as minesitemap
21003
+ const popupContent = "\n <div class=\"daf-tooltip-cont\">\n <div class=\"daf-tooltip-head\">\n <div class=\"daf-tooltip-title\">\n <div>\n <h4>".concat(project.name, "</h4>\n <h5>").concat(project.sectoralScope || 'Project', "</h5>\n </div>\n </div>\n </div>\n <div class=\"daf-tooltip-list\">\n <div class=\"daf-tooltip-list-item\">\n <span class=\"daf-tooltip-name\">Country</span>\n <span class=\"daf-tooltip-value\">").concat(project.country || 'N/A', "</span>\n </div>\n <div class=\"daf-tooltip-list-item\">\n <span class=\"daf-tooltip-name\">Completion</span>\n <span class=\"daf-tooltip-value\">").concat(project.percentageCompletion || 0, "%</span>\n </div>\n <div class=\"daf-tooltip-list-item\">\n <span class=\"daf-tooltip-name\">Author</span>\n <span class=\"daf-tooltip-value\">").concat(((_project$author = project.author) === null || _project$author === void 0 ? void 0 : _project$author.name) || 'N/A', "</span>\n </div>\n <div class=\"daf-tooltip-list-item\">\n <span class=\"daf-tooltip-name\">ID</span>\n <span class=\"daf-tooltip-value\">").concat(project.datastakeId || 'N/A', "</span>\n </div>\n </div>\n </div>\n ");
21004
+
21005
+ // Create popup
21006
+ const popup = new mapboxgl.Popup({
21007
+ offset: 25,
21008
+ closeButton: true,
21009
+ closeOnClick: false
21010
+ }).setHTML(popupContent);
21011
+
21012
+ // Ensure coordinates are valid numbers
21013
+ const lng = Number(project.longitude);
21014
+ const lat = Number(project.latitude);
21015
+ console.log("\uD83D\uDCCD [SIMPLE GLOBE] Marker ".concat(index, " coordinates:"), {
21016
+ lng,
21017
+ lat
21018
+ });
21019
+
21020
+ // Validate coordinates
21021
+ if (isNaN(lng) || isNaN(lat) || lng < -180 || lng > 180 || lat < -90 || lat > 90) {
21022
+ console.error("\u274C [SIMPLE GLOBE] Invalid coordinates for project ".concat(index, ":"), {
21023
+ lng,
21024
+ lat
21025
+ });
21026
+ return;
21027
+ }
21028
+
21029
+ // Add coordinates to bounds
21030
+ bounds.extend([lng, lat]);
21031
+ hasValidCoordinates = true;
21032
+
21033
+ // Add marker to map with proper coordinate order [lng, lat]
21034
+ new mapboxgl.Marker(el).setLngLat([lng, lat]).setPopup(popup).addTo(map.current);
21035
+
21036
+ // Add click handler
21037
+ el.addEventListener('click', () => {
21038
+ console.log('📍 [SIMPLE GLOBE] Marker clicked:', project);
21039
+ onProjectClick(project);
21040
+ });
21041
+ console.log("\u2705 [SIMPLE GLOBE] Marker ".concat(index, " added at:"), [lng, lat]);
21042
+ });
21043
+
21044
+ // Fit map to show all markers if we have valid coordinates
21045
+ if (hasValidCoordinates && !bounds.isEmpty()) {
21046
+ console.log('🗺️ [SIMPLE GLOBE] Fitting map to bounds:', bounds);
21047
+ map.current.fitBounds(bounds, {
21048
+ padding: 50,
21049
+ maxZoom: 8
21050
+ });
21051
+ }
21052
+ });
21053
+ return () => {
21054
+ if (map.current) {
21055
+ map.current.remove();
21056
+ map.current = null;
21057
+ }
21058
+ };
21059
+ }, [projects, onProjectClick, mapConfig]);
21060
+ return /*#__PURE__*/jsxRuntime.jsx(Style$A, {
21061
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
21062
+ ref: mapContainer,
21063
+ style: {
21064
+ width: '100%',
21065
+ height: '500px'
21066
+ }
21067
+ })
21068
+ });
21069
+ };
21070
+
20837
21071
  function WidgetPlaceholder(_ref) {
20838
21072
  let {
20839
21073
  icon = "",
@@ -21063,14 +21297,14 @@ const MapConfig = ({
21063
21297
  });
21064
21298
  };
21065
21299
 
21066
- const _excluded$k = ["config", "title", "loading"];
21300
+ const _excluded$j = ["config", "title", "loading"];
21067
21301
  const Details = _ref => {
21068
21302
  let {
21069
21303
  config = [],
21070
21304
  title,
21071
21305
  loading = false
21072
21306
  } = _ref,
21073
- rest = _objectWithoutProperties(_ref, _excluded$k);
21307
+ rest = _objectWithoutProperties(_ref, _excluded$j);
21074
21308
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
21075
21309
  className: "with-border-header h-w-btn-header card",
21076
21310
  loading: loading,
@@ -21086,14 +21320,14 @@ const Details = _ref => {
21086
21320
  }));
21087
21321
  };
21088
21322
 
21089
- const _excluded$j = ["config", "title", "loading"];
21323
+ const _excluded$i = ["config", "title", "loading"];
21090
21324
  const KeyIndicatorsDetails = _ref => {
21091
21325
  let {
21092
21326
  config,
21093
21327
  title,
21094
21328
  loading = false
21095
21329
  } = _ref,
21096
- rest = _objectWithoutProperties(_ref, _excluded$j);
21330
+ rest = _objectWithoutProperties(_ref, _excluded$i);
21097
21331
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
21098
21332
  className: "with-border-header h-w-btn-header",
21099
21333
  title: title,
@@ -21123,7 +21357,7 @@ const Style$y = dt.div`
21123
21357
  }
21124
21358
  `;
21125
21359
 
21126
- const _excluded$i = ["children", "config", "detailsTitle", "firstColumnWidth"];
21360
+ const _excluded$h = ["children", "config", "detailsTitle", "firstColumnWidth"];
21127
21361
  const DetailsSection = _ref => {
21128
21362
  let {
21129
21363
  children,
@@ -21131,7 +21365,7 @@ const DetailsSection = _ref => {
21131
21365
  detailsTitle,
21132
21366
  firstColumnWidth = "250px"
21133
21367
  } = _ref,
21134
- rest = _objectWithoutProperties(_ref, _excluded$i);
21368
+ rest = _objectWithoutProperties(_ref, _excluded$h);
21135
21369
  return /*#__PURE__*/jsxRuntime.jsx(Style$y, {
21136
21370
  firstColumnWidth: firstColumnWidth,
21137
21371
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -21307,14 +21541,14 @@ const getGoalConfig = () => {
21307
21541
  };
21308
21542
 
21309
21543
  var _templateObject$8;
21310
- const _excluded$h = ["title", "activeSdgGoals", "t"];
21544
+ const _excluded$g = ["title", "activeSdgGoals", "t"];
21311
21545
  function SDGWidget(_ref) {
21312
21546
  let {
21313
21547
  title = "Sustainable Development Goals",
21314
21548
  activeSdgGoals = [],
21315
21549
  t = key => key
21316
21550
  } = _ref,
21317
- props = _objectWithoutProperties(_ref, _excluded$h);
21551
+ props = _objectWithoutProperties(_ref, _excluded$g);
21318
21552
  const sdgConfig = getGoalConfig();
21319
21553
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
21320
21554
  title: title,
@@ -21532,7 +21766,7 @@ function SdgList({
21532
21766
  });
21533
21767
  }
21534
21768
 
21535
- const _excluded$g = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
21769
+ const _excluded$f = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
21536
21770
  const {
21537
21771
  Meta
21538
21772
  } = antd.Card;
@@ -21552,7 +21786,7 @@ function ProjectWidget(_ref) {
21552
21786
  hideSDGList = false,
21553
21787
  t = x => x
21554
21788
  } = _ref,
21555
- props = _objectWithoutProperties(_ref, _excluded$g);
21789
+ props = _objectWithoutProperties(_ref, _excluded$f);
21556
21790
  const [isHovered, setIsHovered] = React__default["default"].useState(false);
21557
21791
  const {
21558
21792
  token
@@ -21797,13 +22031,13 @@ const WidgetCard = _ref => {
21797
22031
  });
21798
22032
  };
21799
22033
 
21800
- const _excluded$f = ["title", "children"];
22034
+ const _excluded$e = ["title", "children"];
21801
22035
  const CarouselWidget = /*#__PURE__*/React.forwardRef((_ref, ref) => {
21802
22036
  let {
21803
22037
  title,
21804
22038
  children
21805
22039
  } = _ref,
21806
- rest = _objectWithoutProperties(_ref, _excluded$f);
22040
+ rest = _objectWithoutProperties(_ref, _excluded$e);
21807
22041
  /**
21808
22042
  * Handles carousel slide change events
21809
22043
  * @param {number} currentSlide - The index of the current slide after change
@@ -21924,7 +22158,7 @@ const StyledCarouselWrapper = dt.div`
21924
22158
 
21925
22159
  `;
21926
22160
 
21927
- const _excluded$e = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows"];
22161
+ const _excluded$d = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows"];
21928
22162
  function ImageCarousel(_ref) {
21929
22163
  let {
21930
22164
  title,
@@ -21937,7 +22171,7 @@ function ImageCarousel(_ref) {
21937
22171
  arrowHoverIconColor = "#1890ff",
21938
22172
  customArrows = false
21939
22173
  } = _ref,
21940
- rest = _objectWithoutProperties(_ref, _excluded$e);
22174
+ rest = _objectWithoutProperties(_ref, _excluded$d);
21941
22175
  const [previewVisible, setPreviewVisible] = React.useState(false);
21942
22176
  const [current, setCurrent] = React.useState(0);
21943
22177
  const carouselRef = React.useRef(null);
@@ -22558,8 +22792,7 @@ function _checkValue(wantedValue, match, fieldValue) {
22558
22792
  }
22559
22793
  return false;
22560
22794
  }
22561
- function getInputProp$1(prop) {
22562
- let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
22795
+ function getInputProp$1(prop, formsValue = {}) {
22563
22796
  if (prop && typeof prop === 'object') {
22564
22797
  const validations = Object.keys(prop);
22565
22798
  const key = validations.find(v => {
@@ -22573,9 +22806,7 @@ function getInputProp$1(prop) {
22573
22806
  return prop;
22574
22807
  }
22575
22808
  }
22576
- function getInputLabel$2(input) {
22577
- let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
22578
- let asText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
22809
+ function getInputLabel$2(input, formsValue = {}, asText = false) {
22579
22810
  const label = getInputProp$1(input.label, formsValue);
22580
22811
  return input.description && typeof input.description === 'string' && !asText ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
22581
22812
  children: [ReactHtmlParser__default["default"](label), /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
@@ -27288,7 +27519,7 @@ const RepeatableModals = ({
27288
27519
  }) : null;
27289
27520
  };
27290
27521
 
27291
- const _excluded$d = ["viewGroup"],
27522
+ const _excluded$c = ["viewGroup"],
27292
27523
  _excluded2 = ["label", "icon", "position"];
27293
27524
  const Content = _ref => {
27294
27525
  let {
@@ -27356,7 +27587,7 @@ const Content = _ref => {
27356
27587
  if (groups[gKey].viewGroup === key) {
27357
27588
  // eslint-disable-next-line no-unused-vars
27358
27589
  const _groups$gKey = groups[gKey],
27359
- gCfg = _objectWithoutProperties(_groups$gKey, _excluded$d);
27590
+ gCfg = _objectWithoutProperties(_groups$gKey, _excluded$c);
27360
27591
  items[gKey] = gCfg;
27361
27592
  }
27362
27593
  return items;
@@ -33797,8 +34028,7 @@ const EditForm = _ref => {
33797
34028
  errors = {},
33798
34029
  changeErrors = () => {},
33799
34030
  evaluationConfig = [],
33800
- staticWidth = "614px",
33801
- fullWidth = false
34031
+ staticWidth = "614px"
33802
34032
  } = _ref;
33803
34033
  const [isSubmitting] = React.useState(false);
33804
34034
  const formData = JSON.parse(JSON.stringify(convertUndefinedToNull(data) || {}));
@@ -34016,9 +34246,9 @@ const EditForm = _ref => {
34016
34246
  name: id,
34017
34247
  layout: "vertical",
34018
34248
  style: {
34019
- maxWidth: fullWidth ? "unset" : 700
34249
+ maxWidth: 700
34020
34250
  },
34021
- className: "main-form".concat(formClass ? " ".concat(formClass) : "", " "),
34251
+ className: "main-form".concat(formClass ? " ".concat(formClass) : ""),
34022
34252
  onValuesChange: (_changedValue, _allValues) => {
34023
34253
  const changedValue = _objectSpread2({}, _changedValue);
34024
34254
  const allValues = _objectSpread2({}, _allValues);
@@ -41159,7 +41389,7 @@ function AjaxSelect(props) {
41159
41389
  }, props));
41160
41390
  }
41161
41391
 
41162
- const _excluded$c = ["placeholder"];
41392
+ /* eslint-disable no-case-declarations */
41163
41393
  const propHasValue = val => {
41164
41394
  if (Array.isArray(val)) {
41165
41395
  return val.length > 0 ? true : false;
@@ -41231,35 +41461,35 @@ function getInputHeadLines(type, i, input, values) {
41231
41461
  switch (type) {
41232
41462
  case 'h2':
41233
41463
  return /*#__PURE__*/jsxRuntime.jsx("h2", {
41234
- className: "title-semibold-2 ".concat(input.marginBottom || '', " ").concat(input.groupHeader || '', " ").concat(i ? input.marginTop || '' : ''),
41464
+ className: `title-semibold-2 ${input.marginBottom || ''} ${input.groupHeader || ''} ${i ? input.marginTop || '' : ''}`,
41235
41465
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
41236
41466
  children: getInputLabel(input, values)
41237
41467
  })
41238
41468
  });
41239
41469
  case 'h3':
41240
41470
  return /*#__PURE__*/jsxRuntime.jsx("h3", {
41241
- className: "title-semibold-3 ".concat(input.marginBottom || '', " ").concat(input.groupHeader || '', " ").concat(i ? input.marginTop || '' : ''),
41471
+ className: `title-semibold-3 ${input.marginBottom || ''} ${input.groupHeader || ''} ${i ? input.marginTop || '' : ''}`,
41242
41472
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
41243
41473
  children: getInputLabel(input, values)
41244
41474
  })
41245
41475
  });
41246
41476
  case 'h4':
41247
41477
  return /*#__PURE__*/jsxRuntime.jsx("h4", {
41248
- className: "title-semibold-4 ".concat(input.marginBottom || '', " ").concat(input.groupHeader || '', " ").concat(i ? input.marginTop || '' : ''),
41478
+ className: `title-semibold-4 ${input.marginBottom || ''} ${input.groupHeader || ''} ${i ? input.marginTop || '' : ''}`,
41249
41479
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
41250
41480
  children: getInputLabel(input, values)
41251
41481
  })
41252
41482
  });
41253
41483
  case 'h5':
41254
41484
  return /*#__PURE__*/jsxRuntime.jsx("h5", {
41255
- className: "title-semibold-5 ".concat(input.marginBottom || '', " ").concat(input.groupHeader || '', " ").concat(i ? input.marginTop || '' : ''),
41485
+ className: `title-semibold-5 ${input.marginBottom || ''} ${input.groupHeader || ''} ${i ? input.marginTop || '' : ''}`,
41256
41486
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
41257
41487
  children: getInputLabel(input, values)
41258
41488
  })
41259
41489
  });
41260
41490
  case 'h6':
41261
41491
  return /*#__PURE__*/jsxRuntime.jsx("h6", {
41262
- className: "title-semibold-6 ".concat(input.marginBottom || '', " ").concat(input.groupHeader || '', " ").concat(i ? input.marginTop || '' : ''),
41492
+ className: `title-semibold-6 ${input.marginBottom || ''} ${input.groupHeader || ''} ${i ? input.marginTop || '' : ''}`,
41263
41493
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
41264
41494
  children: getInputLabel(input, values)
41265
41495
  })
@@ -41268,9 +41498,7 @@ function getInputHeadLines(type, i, input, values) {
41268
41498
  return null;
41269
41499
  }
41270
41500
  }
41271
- function getInputLabel(input) {
41272
- let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
41273
- let asText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
41501
+ function getInputLabel(input, formsValue = {}, asText = false) {
41274
41502
  if (typeof input.label === 'object') {
41275
41503
  const validations = Object.keys(input.label);
41276
41504
  const key = validations.find(v => {
@@ -41328,8 +41556,7 @@ function getInputLabel(input) {
41328
41556
  }) : ReactHtmlParser__default["default"](input.label);
41329
41557
  }
41330
41558
  }
41331
- function getSelectOptions$1(option) {
41332
- let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
41559
+ function getSelectOptions$1(option, formsValue = {}) {
41333
41560
  if (typeof option.label === 'object') {
41334
41561
  const validations = Object.keys(option.label);
41335
41562
  const key = validations.find(v => {
@@ -41353,9 +41580,7 @@ function getSectionLabel(labels, values) {
41353
41580
  }
41354
41581
  return labels;
41355
41582
  }
41356
- function getSubtitles(subtitles, position) {
41357
- let formsValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
41358
- let repeatValues = arguments.length > 4 ? arguments[4] : undefined;
41583
+ function getSubtitles(subtitles, position, formsValue = {}, repeatIndex, repeatValues) {
41359
41584
  let subtitle = subtitles && subtitles[position];
41360
41585
  if (subtitle && typeof subtitle === 'object') {
41361
41586
  let newSubtitle = subtitle.default || '';
@@ -41399,12 +41624,14 @@ function getSubtitles(subtitles, position) {
41399
41624
  function getFormTitles(titles, key, position) {
41400
41625
  let tilte = titles && titles[key];
41401
41626
  return tilte ? /*#__PURE__*/jsxRuntime.jsx("h3", {
41402
- className: "title-semibold-3 mb0 ".concat(position ? 'mt-3' : ''),
41627
+ className: `title-semibold-3 mb0 ${position ? 'mt-3' : ''}`,
41403
41628
  children: tilte
41404
41629
  }) : null;
41405
41630
  }
41406
41631
  const updateFormValues = (repeatIndex, repeatValues, inputName, value, formsValue, name, mainForm) => {
41407
- formsValue = Object.assign(formsValue, _objectSpread2({}, mainForm.getFieldsValue(true)));
41632
+ formsValue = Object.assign(formsValue, {
41633
+ ...mainForm.getFieldsValue(true)
41634
+ });
41408
41635
  if (typeof repeatIndex === 'number' && repeatValues) {
41409
41636
  if (!repeatValues[inputName] || !___default["default"].isEqual(repeatValues[inputName], value)) {
41410
41637
  repeatValues[inputName] = value;
@@ -41438,50 +41665,46 @@ const updateFormValues = (repeatIndex, repeatValues, inputName, value, formsValu
41438
41665
  }
41439
41666
  };
41440
41667
  const inputTypeComponent = {
41441
- text: (_ref, _ref2) => {
41442
- let {
41443
- props,
41444
- rules
41445
- } = _ref;
41446
- let {
41447
- inputMeta = {},
41448
- t
41449
- } = _ref2;
41668
+ text: ({
41669
+ props,
41670
+ rules
41671
+ }, {
41672
+ inputMeta = {},
41673
+ t
41674
+ }) => {
41450
41675
  const maxRule = rules.find(r => r.max);
41451
41676
  const maxProps = {};
41452
41677
  if (maxRule) {
41453
41678
  maxProps.maxLength = maxRule.max;
41454
41679
  }
41455
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
41456
- size: "medium"
41457
- }, maxProps), {}, {
41680
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
41681
+ size: "medium",
41682
+ ...maxProps,
41458
41683
  allowClear: true,
41459
41684
  autoComplete: "new-password",
41460
- type: "text"
41461
- }, props), {}, {
41685
+ type: "text",
41686
+ ...props,
41462
41687
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
41463
41688
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t('Type')
41464
- }));
41689
+ });
41465
41690
  },
41466
- drawTerritory: (_ref3, _ref4) => {
41467
- let {
41468
- formsValue,
41469
- name,
41470
- addressData
41471
- } = _ref3;
41472
- let {
41473
- setFormValues
41474
- } = _ref4;
41691
+ drawTerritory: ({
41692
+ formsValue,
41693
+ name,
41694
+ addressData
41695
+ }, {
41696
+ setFormValues
41697
+ }) => {
41475
41698
  let search = formsValue.country;
41476
41699
  if (addressData && addressData.address && Object.keys(addressData.address).length > 0) {
41477
41700
  if (addressData.address.country) {
41478
41701
  search = addressData.address.country;
41479
41702
  }
41480
41703
  if (addressData.address.level1) {
41481
- search = "".concat(addressData.address.level1, ", ").concat(addressData.address.country);
41704
+ search = `${addressData.address.level1}, ${addressData.address.country}`;
41482
41705
  }
41483
41706
  if (addressData.address.level2) {
41484
- search = "".concat(addressData.address.level2, ", ").concat(addressData.address.level1, ", ").concat(addressData.address.country);
41707
+ search = `${addressData.address.level2}, ${addressData.address.level1}, ${addressData.address.country}`;
41485
41708
  }
41486
41709
  } else {
41487
41710
  const country = countriesList.countries[formsValue.country] || {};
@@ -41489,10 +41712,10 @@ const inputTypeComponent = {
41489
41712
  search = country.name;
41490
41713
  }
41491
41714
  if (formsValue.administrativeLevel1Name) {
41492
- search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
41715
+ search = `${search} ${formsValue.administrativeLevel1Name}`;
41493
41716
  }
41494
41717
  if (formsValue.administrativeLevel2Name) {
41495
- search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
41718
+ search = `${search} ${formsValue.administrativeLevel2Name}`;
41496
41719
  }
41497
41720
  }
41498
41721
  return /*#__PURE__*/jsxRuntime.jsx(PolygonSelector, {
@@ -41504,44 +41727,39 @@ const inputTypeComponent = {
41504
41727
  searchValue: search
41505
41728
  });
41506
41729
  },
41507
- link: (_ref5, _ref6) => {
41508
- let {
41509
- props,
41510
- rules
41511
- } = _ref5;
41512
- let {
41513
- inputMeta = {},
41514
- t
41515
- } = _ref6;
41730
+ link: ({
41731
+ props,
41732
+ rules
41733
+ }, {
41734
+ inputMeta = {},
41735
+ t
41736
+ }) => {
41516
41737
  const maxRule = rules.find(r => r.max);
41517
41738
  const maxProps = {};
41518
41739
  if (maxRule) {
41519
41740
  maxProps.maxLength = maxRule.max;
41520
41741
  }
41521
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
41522
- size: "medium"
41523
- }, maxProps), {}, {
41742
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
41743
+ size: "medium",
41744
+ ...maxProps,
41524
41745
  allowClear: true,
41525
41746
  autoComplete: "new-password",
41526
- type: "text"
41527
- }, props), {}, {
41747
+ type: "text",
41748
+ ...props,
41528
41749
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
41529
41750
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t('Type')
41530
- }));
41751
+ });
41531
41752
  },
41532
- number: (_ref7, _ref8) => {
41533
- var _input$meta;
41534
- let {
41535
- props,
41536
- rules,
41537
- input
41538
- } = _ref7;
41539
- let {
41540
- inputMeta = {},
41541
- t
41542
- } = _ref8;
41753
+ number: ({
41754
+ props,
41755
+ rules,
41756
+ input
41757
+ }, {
41758
+ inputMeta = {},
41759
+ t
41760
+ }) => {
41543
41761
  const maxRule = rules.find(r => r.max);
41544
- const integerRule = !(input !== null && input !== void 0 && (_input$meta = input.meta) !== null && _input$meta !== void 0 && _input$meta.isDecimal);
41762
+ const integerRule = !input?.meta?.isDecimal;
41545
41763
  const parser = value => {
41546
41764
  if (!value) {
41547
41765
  return '';
@@ -41552,53 +41770,50 @@ const inputTypeComponent = {
41552
41770
  return value.replace(/\$\s?|(,*)/g, '');
41553
41771
  };
41554
41772
  if (maxRule) {
41555
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
41773
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
41556
41774
  allowClear: true,
41557
- autoComplete: "new-password"
41558
- }, props), {}, {
41775
+ autoComplete: "new-password",
41776
+ ...props,
41559
41777
  type: "number",
41560
41778
  min: 0,
41561
41779
  max: maxRule.max,
41562
41780
  parser: parser
41563
- }));
41781
+ });
41564
41782
  }
41565
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
41783
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
41566
41784
  allowClear: true,
41567
- autoComplete: "new-password"
41568
- }, props), {}, {
41785
+ autoComplete: "new-password",
41786
+ ...props,
41569
41787
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
41570
41788
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t('Type number'),
41571
41789
  min: 0,
41572
41790
  formatter: value => numberWithCommas$1(value),
41573
41791
  parser: parser
41574
- }));
41792
+ });
41575
41793
  },
41576
- select: (_ref9, _ref10) => {
41577
- var _input$meta2;
41578
- let {
41579
- value,
41580
- options,
41581
- optionGroup,
41582
- props,
41583
- formsValue,
41584
- optionsFilter,
41585
- filterCond,
41586
- repeatValues,
41587
- repeatIndex,
41588
- name,
41589
- inputName,
41590
- address,
41591
- addressData,
41592
- input
41593
- } = _ref9;
41594
- let {
41595
- forms,
41596
- form,
41597
- setAddress,
41598
- inputMeta = {},
41599
- t,
41600
- changeInputMeta
41601
- } = _ref10;
41794
+ select: ({
41795
+ value,
41796
+ options,
41797
+ optionGroup,
41798
+ props,
41799
+ formsValue,
41800
+ optionsFilter,
41801
+ filterCond,
41802
+ repeatValues,
41803
+ repeatIndex,
41804
+ name,
41805
+ inputName,
41806
+ address,
41807
+ addressData,
41808
+ input
41809
+ }, {
41810
+ forms,
41811
+ form,
41812
+ setAddress,
41813
+ inputMeta = {},
41814
+ t,
41815
+ changeInputMeta
41816
+ }) => {
41602
41817
  let opts;
41603
41818
  if (typeof options === 'string') {
41604
41819
  const [formName, key] = options.split('.');
@@ -41654,19 +41869,18 @@ const inputTypeComponent = {
41654
41869
  }
41655
41870
  opts = groupOptions;
41656
41871
  }
41657
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
41872
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
41658
41873
  autoComplete: "new-password",
41659
41874
  allowClear: true,
41660
41875
  showSearch: true,
41661
- defaultValue: input === null || input === void 0 || (_input$meta2 = input.meta) === null || _input$meta2 === void 0 ? void 0 : _input$meta2.defaultValue,
41876
+ defaultValue: input?.meta?.defaultValue,
41662
41877
  filterOption: filterSelectOptions,
41663
- optionFilterProp: "children"
41664
- }, props), {}, {
41878
+ optionFilterProp: "children",
41879
+ ...props,
41665
41880
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
41666
41881
  placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp$1(props.placeholder, formsValue) || t('Select one option'),
41667
41882
  onChange: (val, selectedValue) => {
41668
- var _input$meta3;
41669
- if (typeof (input === null || input === void 0 || (_input$meta3 = input.meta) === null || _input$meta3 === void 0 ? void 0 : _input$meta3.onChange) === 'string') {
41883
+ if (typeof input?.meta?.onChange === 'string') {
41670
41884
  const [value, otherKey, otherVal] = input.meta.onChange.split('.');
41671
41885
  if (val === value) {
41672
41886
  changeInputMeta({
@@ -41680,7 +41894,9 @@ const inputTypeComponent = {
41680
41894
  }
41681
41895
  if (address && selectedValue) {
41682
41896
  dot__default["default"].str(address, selectedValue.children, addressData);
41683
- setAddress(_objectSpread2({}, addressData));
41897
+ setAddress({
41898
+ ...addressData
41899
+ });
41684
41900
  }
41685
41901
  if (props.onChange) {
41686
41902
  props.onChange(val);
@@ -41692,35 +41908,33 @@ const inputTypeComponent = {
41692
41908
  value: og.value,
41693
41909
  disabled: og.disabled,
41694
41910
  children: og.label
41695
- }, "".concat(i).concat(j)))
41911
+ }, `${i}${j}`))
41696
41912
  }, i) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
41697
41913
  value: option.value,
41698
41914
  disabled: option.disabled,
41699
41915
  children: option.label
41700
41916
  }, i))
41701
- }));
41917
+ });
41702
41918
  },
41703
- multiselect: (_ref11, _ref12) => {
41704
- let {
41705
- value,
41706
- options,
41707
- optionGroup,
41708
- optionsFilter,
41709
- filterCond,
41710
- props,
41711
- formsValue,
41712
- repeatValues,
41713
- repeatIndex,
41714
- inputName,
41715
- name,
41716
- tags
41717
- } = _ref11;
41718
- let {
41719
- forms,
41720
- form,
41721
- inputMeta = {},
41722
- t
41723
- } = _ref12;
41919
+ multiselect: ({
41920
+ value,
41921
+ options,
41922
+ optionGroup,
41923
+ optionsFilter,
41924
+ filterCond,
41925
+ props,
41926
+ formsValue,
41927
+ repeatValues,
41928
+ repeatIndex,
41929
+ inputName,
41930
+ name,
41931
+ tags
41932
+ }, {
41933
+ forms,
41934
+ form,
41935
+ inputMeta = {},
41936
+ t
41937
+ }) => {
41724
41938
  let opts;
41725
41939
  if (typeof options === 'string') {
41726
41940
  const [formName, key] = options.split('.');
@@ -41777,16 +41991,16 @@ const inputTypeComponent = {
41777
41991
  }
41778
41992
  opts = groupOptions;
41779
41993
  }
41780
- return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2(_objectSpread2({
41994
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
41781
41995
  allowClear: true,
41782
41996
  autoComplete: "new-password",
41783
41997
  mode: tags ? "tags" : "multiple",
41784
- optionFilterProp: "children"
41785
- }, tags ? {
41786
- tokenSeparators: [',', '\n', '\t']
41787
- } : {}), {}, {
41788
- filterOption: filterSelectOptions
41789
- }, props), {}, {
41998
+ optionFilterProp: "children",
41999
+ ...(tags ? {
42000
+ tokenSeparators: [',', '\n', '\t']
42001
+ } : {}),
42002
+ filterOption: filterSelectOptions,
42003
+ ...props,
41790
42004
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
41791
42005
  placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp$1(props.placeholder, formsValue) || t('Select all relevant options'),
41792
42006
  children: (opts || []).map((option, i) => option.items ? /*#__PURE__*/jsxRuntime.jsx(antd.Select.OptGroup, {
@@ -41795,42 +42009,42 @@ const inputTypeComponent = {
41795
42009
  value: og.value,
41796
42010
  disabled: og.disabled,
41797
42011
  children: og.label
41798
- }, "".concat(i).concat(j)))
42012
+ }, `${i}${j}`))
41799
42013
  }, i) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
41800
42014
  value: option.value,
41801
42015
  disabled: option.disabled,
41802
42016
  children: option.label
41803
42017
  }, i))
41804
- }));
42018
+ });
41805
42019
  },
41806
- date: (_ref13, _ref14) => {
41807
- let {
41808
- props,
41809
- rules,
41810
- repeatValues,
41811
- formsValue,
41812
- name
41813
- } = _ref13;
41814
- let {
41815
- inputMeta,
41816
- t,
41817
- groupFormId,
41818
- form,
41819
- setFormValues
41820
- } = _ref14;
42020
+ date: ({
42021
+ props,
42022
+ rules,
42023
+ repeatValues,
42024
+ formsValue,
42025
+ name
42026
+ }, {
42027
+ inputMeta,
42028
+ t,
42029
+ groupFormId,
42030
+ form,
42031
+ setFormValues
42032
+ }) => {
41821
42033
  const lng = localStorage.getItem('datastakeLng') || 'en';
41822
42034
  const maxRule = rules.find(r => r.max);
41823
42035
  const handleDateChange = date => {
41824
42036
  if (date) {
41825
42037
  const localDate = dayjs__default["default"].utc(date);
41826
42038
  if (groupFormId) {
41827
- const _new = _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
42039
+ const _new = {
42040
+ ...(formsValue[groupFormId] || {}),
41828
42041
  [name]: localDate
41829
- });
42042
+ };
41830
42043
  form.setFieldValue(groupFormId, _new);
41831
- setFormValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
42044
+ setFormValues({
42045
+ ...formsValue,
41832
42046
  [groupFormId]: _new
41833
- }));
42047
+ });
41834
42048
  } else {
41835
42049
  form.setFieldValue(name, localDate);
41836
42050
  }
@@ -41842,10 +42056,10 @@ const inputTypeComponent = {
41842
42056
  checkForMax = checkCondition(maxRule.condition, repeatValues, formsValue);
41843
42057
  }
41844
42058
  if (checkForMax) {
41845
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
42059
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
41846
42060
  allowClear: true,
41847
- autoComplete: "new-password"
41848
- }, props), {}, {
42061
+ autoComplete: "new-password",
42062
+ ...props,
41849
42063
  onChange: handleDateChange,
41850
42064
  format: DATE_FORMATS,
41851
42065
  locale: lng === 'fr' ? localeFr__default["default"] : localeEn__default["default"],
@@ -41854,33 +42068,31 @@ const inputTypeComponent = {
41854
42068
  disabledDate: current => {
41855
42069
  return current && current >= dayjs__default["default"]().endOf('day');
41856
42070
  }
41857
- }));
42071
+ });
41858
42072
  }
41859
42073
  }
41860
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
42074
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
41861
42075
  allowClear: true,
41862
- autoComplete: "new-password"
41863
- }, props), {}, {
42076
+ autoComplete: "new-password",
42077
+ ...props,
41864
42078
  onChange: handleDateChange,
41865
42079
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t('Select date'),
41866
42080
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
41867
42081
  format: DATE_FORMATS,
41868
42082
  locale: lng === 'fr' ? localeFr__default["default"] : localeEn__default["default"]
41869
- }));
42083
+ });
41870
42084
  },
41871
- comment: (_ref15, _ref16) => {
41872
- let {
41873
- props: {
41874
- placeholder
41875
- },
41876
- commentHint
41877
- } = _ref15,
41878
- props = _objectWithoutProperties(_ref15.props, _excluded$c);
41879
- let {
41880
- onChange,
41881
- value
41882
- } = _ref16;
41883
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
42085
+ comment: ({
42086
+ props: {
42087
+ placeholder,
42088
+ ...props
42089
+ },
42090
+ commentHint
42091
+ }, {
42092
+ onChange,
42093
+ value
42094
+ }) => {
42095
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
41884
42096
  allowClear: true,
41885
42097
  value: value,
41886
42098
  onChange: e => onChange(e.target.value),
@@ -41890,60 +42102,56 @@ const inputTypeComponent = {
41890
42102
  autoSize: {
41891
42103
  minRows: 5,
41892
42104
  maxRows: 5
41893
- }
41894
- }, props), {}, {
42105
+ },
42106
+ ...props,
41895
42107
  disabled: false
41896
- }));
42108
+ });
41897
42109
  },
41898
- textarea: (_ref17, _ref18) => {
41899
- let {
41900
- props,
41901
- rules
41902
- } = _ref17;
41903
- let {
41904
- inputMeta,
41905
- t
41906
- } = _ref18;
42110
+ textarea: ({
42111
+ props,
42112
+ rules
42113
+ }, {
42114
+ inputMeta,
42115
+ t
42116
+ }) => {
41907
42117
  const maxRule = rules.find(r => r.max);
41908
42118
  let maxLength = MAX_TEXT_AREA_LENGTH;
41909
42119
  if (maxRule) {
41910
42120
  maxLength = maxRule.max;
41911
42121
  }
41912
- return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
42122
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
41913
42123
  allowClear: true,
41914
42124
  autoComplete: "new-password",
41915
42125
  maxLength: maxLength,
41916
42126
  autoSize: {
41917
42127
  minRows: 5,
41918
42128
  maxRows: 5
41919
- }
41920
- }, props), {}, {
42129
+ },
42130
+ ...props,
41921
42131
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
41922
42132
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t('Type')
41923
- }));
42133
+ });
41924
42134
  },
41925
- phoneNumber: (_ref19, _ref20) => {
41926
- let {
41927
- name,
41928
- inputName,
41929
- props,
41930
- value,
41931
- repeatIndex,
41932
- repeatValues,
41933
- formsValue
41934
- } = _ref19;
41935
- let {
41936
- setFormValues,
41937
- t
41938
- } = _ref20;
41939
- return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, _objectSpread2(_objectSpread2({
42135
+ phoneNumber: ({
42136
+ name,
42137
+ inputName,
42138
+ props,
42139
+ value,
42140
+ repeatIndex,
42141
+ repeatValues,
42142
+ formsValue
42143
+ }, {
42144
+ setFormValues,
42145
+ t
42146
+ }) => {
42147
+ return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, {
41940
42148
  t: t,
41941
42149
  doChangeErrors: false,
41942
42150
  allowClear: true,
41943
- country: formsValue === null || formsValue === void 0 ? void 0 : formsValue.country,
42151
+ country: formsValue?.country,
41944
42152
  formsValue: formsValue,
41945
- initialValue: value
41946
- }, props), {}, {
42153
+ initialValue: value,
42154
+ ...props,
41947
42155
  onChange: val => {
41948
42156
  if (repeatValues) {
41949
42157
  const inputValues = Array.isArray(formsValue[name]) ? formsValue[name] || [] : [];
@@ -41959,25 +42167,24 @@ const inputTypeComponent = {
41959
42167
  setFormValues(formsValue);
41960
42168
  }
41961
42169
  }
41962
- }));
42170
+ });
41963
42171
  },
41964
- switch: (_ref21, _ref22) => {
41965
- let {
41966
- props,
41967
- value,
41968
- restricted,
41969
- autocomplete,
41970
- formsValue,
41971
- repeatIndex,
41972
- name,
41973
- inputName,
41974
- replace
41975
- } = _ref21;
41976
- let {
41977
- form,
41978
- setFormValues
41979
- } = _ref22;
41980
- return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, _objectSpread2(_objectSpread2({}, props), {}, {
42172
+ switch: ({
42173
+ props,
42174
+ value,
42175
+ restricted,
42176
+ autocomplete,
42177
+ formsValue,
42178
+ repeatIndex,
42179
+ name,
42180
+ inputName,
42181
+ replace
42182
+ }, {
42183
+ form,
42184
+ setFormValues
42185
+ }) => {
42186
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, {
42187
+ ...props,
41981
42188
  defaultChecked: value || false,
41982
42189
  checked: value || false,
41983
42190
  onChange: isChecked => {
@@ -42019,15 +42226,14 @@ const inputTypeComponent = {
42019
42226
  setFormValues(formsValue);
42020
42227
  }
42021
42228
  }
42022
- }));
42229
+ });
42023
42230
  },
42024
- total100: _ref23 => {
42025
- let {
42026
- props,
42027
- name,
42028
- options,
42029
- value
42030
- } = _ref23;
42231
+ total100: ({
42232
+ props,
42233
+ name,
42234
+ options,
42235
+ value
42236
+ }) => {
42031
42237
  value = value ? Array.isArray(value) ? value : [value] : [];
42032
42238
  function totalValue() {
42033
42239
  let total = 0;
@@ -42051,11 +42257,10 @@ const inputTypeComponent = {
42051
42257
  className: "total100",
42052
42258
  children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.List, {
42053
42259
  name: name,
42054
- children: (fields, _ref24) => {
42055
- let {
42056
- add,
42057
- remove
42058
- } = _ref24;
42260
+ children: (fields, {
42261
+ add,
42262
+ remove
42263
+ }) => {
42059
42264
  if (fields.length === 0) {
42060
42265
  const formData = value || [];
42061
42266
  if (formData.length) {
@@ -42074,26 +42279,26 @@ const inputTypeComponent = {
42074
42279
  const v = value[field.name];
42075
42280
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Space, {
42076
42281
  className: "total",
42077
- children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
42078
- noStyle: true
42079
- }, field), {}, {
42282
+ children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
42283
+ noStyle: true,
42284
+ ...field,
42080
42285
  name: [field.name, 'type'],
42081
42286
  fieldKey: [field.fieldKey, 'type'],
42082
42287
  initialValue: v.type,
42083
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
42288
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
42084
42289
  allowClear: true,
42085
42290
  showSearch: true,
42086
42291
  filterOption: filterSelectOptions,
42087
- optionFilterProp: "children"
42088
- }, props), {}, {
42292
+ optionFilterProp: "children",
42293
+ ...props,
42089
42294
  children: options.map((option, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
42090
42295
  value: option.value,
42091
42296
  children: option.label
42092
42297
  }, i))
42093
- }))
42094
- })), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
42095
- noStyle: true
42096
- }, field), {}, {
42298
+ })
42299
+ }), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
42300
+ noStyle: true,
42301
+ ...field,
42097
42302
  name: [field.name, 'value'],
42098
42303
  fieldKey: [field.fieldKey, 'value'],
42099
42304
  initialValue: v.value,
@@ -42101,14 +42306,14 @@ const inputTypeComponent = {
42101
42306
  allowClear: true,
42102
42307
  name: "value",
42103
42308
  formatter: value => {
42104
- return value ? "".concat(value, "%") : '';
42309
+ return value ? `${value}%` : '';
42105
42310
  },
42106
42311
  disabled: !v.type,
42107
42312
  placeholder: props.valueplaceholder ? props.valueplaceholder : 'Value',
42108
42313
  min: 1,
42109
42314
  max: 100 - siblingTotal(v.type)
42110
42315
  })
42111
- })), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
42316
+ }), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
42112
42317
  disabled: !v.value || !v.type || totalValue() >= 100,
42113
42318
  type: "primary",
42114
42319
  icon: /*#__PURE__*/jsxRuntime.jsx(Icons.PlusOutlined, {}),
@@ -42140,21 +42345,18 @@ const inputTypeComponent = {
42140
42345
  }) : null]
42141
42346
  });
42142
42347
  },
42143
- percentage: (_ref25, _ref26) => {
42144
- var _input$meta4;
42145
- let {
42146
- name,
42147
- inputName,
42148
- totalMax,
42149
- repeatIndex,
42150
- props,
42151
- formsValue,
42152
- input
42153
- } = _ref25;
42154
- let {
42155
- inputMeta,
42156
- t
42157
- } = _ref26;
42348
+ percentage: ({
42349
+ name,
42350
+ inputName,
42351
+ totalMax,
42352
+ repeatIndex,
42353
+ props,
42354
+ formsValue,
42355
+ input
42356
+ }, {
42357
+ inputMeta,
42358
+ t
42359
+ }) => {
42158
42360
  const isRepeatable = Array.isArray(formsValue[name]);
42159
42361
  let totalSiblings = 0;
42160
42362
  if (isRepeatable && totalMax) {
@@ -42162,15 +42364,15 @@ const inputTypeComponent = {
42162
42364
  totl = totl + (grp[inputName] || 0);
42163
42365
  return totl;
42164
42366
  }, 0);
42165
- } else if (Array.isArray(input === null || input === void 0 || (_input$meta4 = input.meta) === null || _input$meta4 === void 0 ? void 0 : _input$meta4.siblings)) {
42367
+ } else if (Array.isArray(input?.meta?.siblings)) {
42166
42368
  totalSiblings = input.meta.siblings.reduce((totl, key) => {
42167
42369
  totl = totl + (formsValue[key] || 0);
42168
42370
  return totl;
42169
42371
  }, 0);
42170
42372
  }
42171
- return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
42172
- allowClear: true
42173
- }, props), {}, {
42373
+ return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
42374
+ allowClear: true,
42375
+ ...props,
42174
42376
  style: {
42175
42377
  width: '100%'
42176
42378
  },
@@ -42179,36 +42381,33 @@ const inputTypeComponent = {
42179
42381
  min: 0,
42180
42382
  max: 100 - totalSiblings,
42181
42383
  formatter: value => {
42182
- return value ? "".concat(value) : '';
42384
+ return value ? `${value}` : '';
42183
42385
  },
42184
42386
  parser: value => value.replace('%', ''),
42185
42387
  addonAfter: "%"
42186
- }));
42388
+ });
42187
42389
  },
42188
- year: _ref27 => {
42189
- let {
42190
- props
42191
- } = _ref27;
42390
+ year: ({
42391
+ props
42392
+ }) => {
42192
42393
  const lng = localStorage.getItem('datastakeLng') || 'en';
42193
- return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
42394
+ return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
42194
42395
  allowClear: true,
42195
42396
  locale: lng === 'fr' ? localeFr__default["default"] : localeEn__default["default"],
42196
- picker: "year"
42197
- }, props), {}, {
42397
+ picker: "year",
42398
+ ...props,
42198
42399
  format: "YYYY"
42199
- }));
42400
+ });
42200
42401
  },
42201
- upload: (_ref28, _ref29) => {
42202
- let {
42203
- rules,
42204
- value
42205
- } = _ref28;
42206
- let {
42207
- setLoading,
42208
- t,
42209
- getApiBaseUrl,
42210
- getAppHeader
42211
- } = _ref29;
42402
+ upload: ({
42403
+ rules,
42404
+ value
42405
+ }, {
42406
+ setLoading,
42407
+ t,
42408
+ getApiBaseUrl,
42409
+ getAppHeader
42410
+ }) => {
42212
42411
  const apiURL = getApiBaseUrl();
42213
42412
  const accept = rules.length ? rules.find(rule => Object.keys(rule).includes('accept')).accept || '*' : null;
42214
42413
  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) : []) || [];
@@ -42221,12 +42420,13 @@ const inputTypeComponent = {
42221
42420
  }
42222
42421
  }
42223
42422
  const allowedExtensions = accept && accept !== "*" ? accept.split(",").map(ext => ext.trim().toLowerCase()) : [];
42224
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({}, maxProps), {}, {
42423
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
42424
+ ...maxProps,
42225
42425
  accept: accept,
42226
- action: "".concat(apiURL, "/upload"),
42426
+ action: `${apiURL}/upload`,
42227
42427
  beforeUpload: beforeUpload(allowedExtensions),
42228
42428
  onChange: val => {
42229
- if (val !== null && val !== void 0 && val.file && typeof setLoading === 'function') {
42429
+ if (val?.file && typeof setLoading === 'function') {
42230
42430
  if (val.file.percent !== 100) {
42231
42431
  setLoading(true);
42232
42432
  } else {
@@ -42234,9 +42434,10 @@ const inputTypeComponent = {
42234
42434
  }
42235
42435
  }
42236
42436
  },
42237
- headers: _objectSpread2({
42238
- Authorization: "Bearer ".concat(getToken())
42239
- }, getAppHeader()),
42437
+ headers: {
42438
+ Authorization: `Bearer ${getToken()}`,
42439
+ ...getAppHeader()
42440
+ },
42240
42441
  defaultFileList: values,
42241
42442
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
42242
42443
  style: {
@@ -42246,19 +42447,17 @@ const inputTypeComponent = {
42246
42447
  children: t('Upload')
42247
42448
  })]
42248
42449
  })
42249
- }));
42450
+ });
42250
42451
  },
42251
- imageUpload: (_ref30, _ref31) => {
42252
- let {
42253
- rules,
42254
- value
42255
- } = _ref30;
42256
- let {
42257
- setLoading,
42258
- getApiBaseUrl,
42259
- getAppHeader,
42260
- t
42261
- } = _ref31;
42452
+ imageUpload: ({
42453
+ rules,
42454
+ value
42455
+ }, {
42456
+ setLoading,
42457
+ getApiBaseUrl,
42458
+ getAppHeader,
42459
+ t
42460
+ }) => {
42262
42461
  const apiURL = getApiBaseUrl();
42263
42462
  const values = getImageUploadEditValue(value);
42264
42463
  const maxRule = rules.find(r => r.max);
@@ -42269,17 +42468,17 @@ const inputTypeComponent = {
42269
42468
  maxProps.multiple = true;
42270
42469
  }
42271
42470
  }
42272
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({}, maxProps), {}, {
42471
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
42472
+ ...maxProps,
42273
42473
  beforeUpload: beforeUpload(allowedImageExtensions),
42274
42474
  accept: "image/*",
42275
42475
  classList: !values || !values.length ? 'empty' : '',
42276
42476
  listType: "picture",
42277
- action: "".concat(apiURL, "/upload"),
42477
+ action: `${apiURL}/upload`,
42278
42478
  onChange: val => {
42279
42479
  if (typeof setLoading === 'function') {
42280
- if (val !== null && val !== void 0 && val.file) {
42281
- var _val$file;
42282
- if ((val === null || val === void 0 || (_val$file = val.file) === null || _val$file === void 0 ? void 0 : _val$file.status) === "removed") {
42480
+ if (val?.file) {
42481
+ if (val?.file?.status === "removed") {
42283
42482
  setLoading(false);
42284
42483
  return;
42285
42484
  }
@@ -42291,9 +42490,10 @@ const inputTypeComponent = {
42291
42490
  setLoading(false);
42292
42491
  }
42293
42492
  },
42294
- headers: _objectSpread2({
42295
- Authorization: "Bearer ".concat(getToken())
42296
- }, getAppHeader()),
42493
+ headers: {
42494
+ Authorization: `Bearer ${getToken()}`,
42495
+ ...getAppHeader()
42496
+ },
42297
42497
  defaultFileList: values,
42298
42498
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
42299
42499
  style: {
@@ -42303,19 +42503,17 @@ const inputTypeComponent = {
42303
42503
  children: t('Upload')
42304
42504
  })]
42305
42505
  })
42306
- }));
42506
+ });
42307
42507
  },
42308
- videoUpload: (_ref32, _ref33) => {
42309
- let {
42310
- rules,
42311
- value
42312
- } = _ref32;
42313
- let {
42314
- setLoading = () => {},
42315
- getApiBaseUrl,
42316
- getAppHeader,
42317
- t
42318
- } = _ref33;
42508
+ videoUpload: ({
42509
+ rules,
42510
+ value
42511
+ }, {
42512
+ setLoading = () => {},
42513
+ getApiBaseUrl,
42514
+ getAppHeader,
42515
+ t
42516
+ }) => {
42319
42517
  const apiURL = getApiBaseUrl();
42320
42518
  const values = getImageUploadEditValue(value);
42321
42519
  const maxRule = rules.find(r => r.max);
@@ -42326,25 +42524,21 @@ const inputTypeComponent = {
42326
42524
  maxProps.multiple = true;
42327
42525
  }
42328
42526
  }
42329
- return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({
42330
- itemRender: (item, fileList) => {
42331
- var _fileList$response;
42332
- return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
42333
- children: [/*#__PURE__*/jsxRuntime.jsx(EditVideoPreview, {
42334
- 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)
42335
- }), item]
42336
- });
42337
- }
42338
- }, maxProps), {}, {
42527
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
42528
+ itemRender: (item, fileList) => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
42529
+ children: [/*#__PURE__*/jsxRuntime.jsx(EditVideoPreview, {
42530
+ url: fileList?.response?.url || fileList?.url
42531
+ }), item]
42532
+ }),
42533
+ ...maxProps,
42339
42534
  accept: "video/*",
42340
42535
  classList: !values || !values.length ? 'empty' : '',
42341
42536
  listType: "picture",
42342
- action: "".concat(apiURL, "/upload"),
42537
+ action: `${apiURL}/upload`,
42343
42538
  onChange: val => {
42344
42539
  if (typeof setLoading === 'function') {
42345
- if (val !== null && val !== void 0 && val.file) {
42346
- var _val$file2;
42347
- if ((val === null || val === void 0 || (_val$file2 = val.file) === null || _val$file2 === void 0 ? void 0 : _val$file2.status) === "removed") {
42540
+ if (val?.file) {
42541
+ if (val?.file?.status === "removed") {
42348
42542
  setLoading(false);
42349
42543
  return;
42350
42544
  }
@@ -42356,9 +42550,10 @@ const inputTypeComponent = {
42356
42550
  setLoading(false);
42357
42551
  }
42358
42552
  },
42359
- headers: _objectSpread2({
42360
- Authorization: "Bearer ".concat(getToken())
42361
- }, getAppHeader()),
42553
+ headers: {
42554
+ Authorization: `Bearer ${getToken()}`,
42555
+ ...getAppHeader()
42556
+ },
42362
42557
  defaultFileList: values,
42363
42558
  children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
42364
42559
  style: {
@@ -42368,19 +42563,17 @@ const inputTypeComponent = {
42368
42563
  children: t('Upload')
42369
42564
  })]
42370
42565
  })
42371
- }));
42566
+ });
42372
42567
  },
42373
- geolocation: (_ref34, _ref35) => {
42374
- let {
42375
- value,
42376
- name,
42377
- formsValue,
42378
- addressData,
42379
- props
42380
- } = _ref34;
42381
- let {
42382
- inputMeta
42383
- } = _ref35;
42568
+ geolocation: ({
42569
+ value,
42570
+ name,
42571
+ formsValue,
42572
+ addressData,
42573
+ props
42574
+ }, {
42575
+ inputMeta
42576
+ }) => {
42384
42577
  let search = formsValue.country;
42385
42578
  if (addressData && Object.keys(addressData).length > 0) {
42386
42579
  const country = countriesList.countries[formsValue.country] || {};
@@ -42388,10 +42581,10 @@ const inputTypeComponent = {
42388
42581
  search = addressData.country;
42389
42582
  }
42390
42583
  if (addressData.level1) {
42391
- search = "".concat(addressData.level1, ", ").concat(addressData.country || country.name);
42584
+ search = `${addressData.level1}, ${addressData.country || country.name}`;
42392
42585
  }
42393
42586
  if (addressData.level2) {
42394
- search = "".concat(addressData.level2, ", ").concat(addressData.level1, ", ").concat(addressData.country || country.name);
42587
+ search = `${addressData.level2}, ${addressData.level1}, ${addressData.country || country.name}`;
42395
42588
  }
42396
42589
  } else {
42397
42590
  const country = countriesList.countries[formsValue.country] || {};
@@ -42399,10 +42592,10 @@ const inputTypeComponent = {
42399
42592
  search = country.name;
42400
42593
  }
42401
42594
  if (formsValue.administrativeLevel1Name) {
42402
- search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
42595
+ search = `${search} ${formsValue.administrativeLevel1Name}`;
42403
42596
  }
42404
42597
  if (formsValue.administrativeLevel2Name) {
42405
- search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
42598
+ search = `${search} ${formsValue.administrativeLevel2Name}`;
42406
42599
  }
42407
42600
  }
42408
42601
  return /*#__PURE__*/jsxRuntime.jsx(Geolocation, {
@@ -42415,35 +42608,33 @@ const inputTypeComponent = {
42415
42608
  searchValue: search
42416
42609
  });
42417
42610
  },
42418
- ajaxSelect: (_ref36, _ref37) => {
42419
- let {
42420
- call,
42421
- automaticallyLink,
42422
- name,
42423
- preSelected,
42424
- inputName,
42425
- props,
42426
- formsValue,
42427
- onNewSetValue,
42428
- multiple,
42429
- updateOptions,
42430
- repeatValues,
42431
- repeatIndex,
42432
- value,
42433
- unique,
42434
- address,
42435
- addressData = {},
42436
- input
42437
- } = _ref36;
42438
- let {
42439
- form,
42440
- forms,
42441
- setAddress,
42442
- changeInputMeta,
42443
- inputMeta = {},
42444
- meta,
42445
- setFormValues
42446
- } = _ref37;
42611
+ ajaxSelect: ({
42612
+ call,
42613
+ automaticallyLink,
42614
+ name,
42615
+ preSelected,
42616
+ inputName,
42617
+ props,
42618
+ formsValue,
42619
+ onNewSetValue,
42620
+ multiple,
42621
+ updateOptions,
42622
+ repeatValues,
42623
+ repeatIndex,
42624
+ value,
42625
+ unique,
42626
+ address,
42627
+ addressData = {},
42628
+ input
42629
+ }, {
42630
+ form,
42631
+ forms,
42632
+ setAddress,
42633
+ changeInputMeta,
42634
+ inputMeta = {},
42635
+ meta,
42636
+ setFormValues
42637
+ }) => {
42447
42638
  return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect, {
42448
42639
  preSelected: preSelected,
42449
42640
  input: input,
@@ -42479,41 +42670,40 @@ const inputTypeComponent = {
42479
42670
  const selectedValue = data.find(v => v.value === ev);
42480
42671
  if (address && selectedValue) {
42481
42672
  dot__default["default"].str(address, selectedValue.label, addressData);
42482
- setAddress(_objectSpread2({}, addressData));
42673
+ setAddress({
42674
+ ...addressData
42675
+ });
42483
42676
  }
42484
42677
  }
42485
42678
  },
42486
42679
  setAddress: setAddress
42487
42680
  });
42488
42681
  },
42489
- tag: _ref38 => {
42490
- let {
42491
- value,
42492
- repeatLabel
42493
- } = _ref38;
42682
+ tag: ({
42683
+ value,
42684
+ repeatLabel
42685
+ }) => {
42494
42686
  return /*#__PURE__*/jsxRuntime.jsx(TagInput$1, {
42495
42687
  allowClear: true,
42496
42688
  value: value || [],
42497
42689
  newPlaceholder: repeatLabel
42498
42690
  });
42499
42691
  },
42500
- modal: (_ref39, _ref40) => {
42501
- let {
42502
- call,
42503
- automaticallyLink,
42504
- name,
42505
- inputName,
42506
- props,
42507
- formsValue,
42508
- onNewSetValue,
42509
- repeatValues,
42510
- repeatIndex,
42511
- value,
42512
- modalTitle
42513
- } = _ref39;
42514
- let {
42515
- form
42516
- } = _ref40;
42692
+ modal: ({
42693
+ call,
42694
+ automaticallyLink,
42695
+ name,
42696
+ inputName,
42697
+ props,
42698
+ formsValue,
42699
+ onNewSetValue,
42700
+ repeatValues,
42701
+ repeatIndex,
42702
+ value,
42703
+ modalTitle
42704
+ }, {
42705
+ form
42706
+ }) => {
42517
42707
  return /*#__PURE__*/jsxRuntime.jsx(AjaxModal$2, {
42518
42708
  allowClear: true,
42519
42709
  call: call,
@@ -42531,69 +42721,63 @@ const inputTypeComponent = {
42531
42721
  buttonText: modalTitle
42532
42722
  });
42533
42723
  },
42534
- website: (_ref41, _ref42) => {
42535
- let {
42536
- name,
42537
- inputName,
42538
- props,
42539
- value,
42540
- repeatIndex,
42541
- repeatValues,
42542
- formsValue
42543
- } = _ref41;
42544
- let {
42545
- form,
42546
- inputMeta = {},
42547
- t
42548
- } = _ref42;
42549
- return /*#__PURE__*/jsxRuntime.jsx(Website, _objectSpread2(_objectSpread2({
42724
+ website: ({
42725
+ name,
42726
+ inputName,
42727
+ props,
42728
+ value,
42729
+ repeatIndex,
42730
+ repeatValues,
42731
+ formsValue
42732
+ }, {
42733
+ form,
42734
+ inputMeta = {},
42735
+ t
42736
+ }) => {
42737
+ return /*#__PURE__*/jsxRuntime.jsx(Website, {
42550
42738
  allowClear: true,
42551
42739
  initialValue: value,
42552
- t: t
42553
- }, props), {}, {
42740
+ t: t,
42741
+ ...props,
42554
42742
  onChange: val => updateFormValues(repeatIndex, repeatValues, inputName, val, formsValue, name, form),
42555
42743
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
42556
42744
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || 'www.example.com'
42557
- }));
42745
+ });
42558
42746
  },
42559
- dataLink: (_ref43, _ref44) => {
42560
- var _input$meta5, _input$meta8, _formsValue$meta, _input$meta9;
42561
- let {
42562
- setValues,
42563
- name,
42564
- onValuesChange,
42565
- formsValue,
42566
- input,
42567
- changeLinking,
42568
- call,
42569
- automaticallyLink,
42570
- inputName,
42571
- props,
42572
- onNewSetValue,
42573
- multiple,
42574
- updateOptions,
42575
- repeatValues,
42576
- repeatIndex,
42577
- value,
42578
- unique,
42579
- address,
42580
- addressData = {},
42581
- getFromLinking
42582
- } = _ref43;
42583
- let {
42584
- form,
42585
- groupFormId,
42586
- setAddress,
42587
- isHighlighted,
42588
- changeInputMeta,
42589
- meta,
42590
- inputMeta,
42591
- forms
42592
- } = _ref44;
42593
- if ((input === null || input === void 0 || (_input$meta5 = input.meta) === null || _input$meta5 === void 0 || (_input$meta5 = _input$meta5.optionsView) === null || _input$meta5 === void 0 ? void 0 : _input$meta5.editInputType) === 'ajaxSelect') {
42594
- var _formsValue$groupForm, _input$meta6, _input$meta7;
42595
- const currentValue = groupFormId ? (_formsValue$groupForm = formsValue[groupFormId]) === null || _formsValue$groupForm === void 0 ? void 0 : _formsValue$groupForm[name] : formsValue[name];
42596
- (input === null || input === void 0 || (_input$meta6 = input.meta) === null || _input$meta6 === void 0 || (_input$meta6 = _input$meta6.optionsView) === null || _input$meta6 === void 0 ? void 0 : _input$meta6.call) || (input === null || input === void 0 || (_input$meta7 = input.meta) === null || _input$meta7 === void 0 ? void 0 : _input$meta7.call) || 'default::list()::::';
42747
+ dataLink: ({
42748
+ setValues,
42749
+ name,
42750
+ onValuesChange,
42751
+ formsValue,
42752
+ input,
42753
+ changeLinking,
42754
+ call,
42755
+ automaticallyLink,
42756
+ inputName,
42757
+ props,
42758
+ onNewSetValue,
42759
+ multiple,
42760
+ updateOptions,
42761
+ repeatValues,
42762
+ repeatIndex,
42763
+ value,
42764
+ unique,
42765
+ address,
42766
+ addressData = {},
42767
+ getFromLinking
42768
+ }, {
42769
+ form,
42770
+ groupFormId,
42771
+ setAddress,
42772
+ isHighlighted,
42773
+ changeInputMeta,
42774
+ meta,
42775
+ inputMeta,
42776
+ forms
42777
+ }) => {
42778
+ if (input?.meta?.optionsView?.editInputType === 'ajaxSelect') {
42779
+ const currentValue = groupFormId ? formsValue[groupFormId]?.[name] : formsValue[name];
42780
+ input?.meta?.optionsView?.call || input?.meta?.call || 'default::list()::::';
42597
42781
  return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect$1, {
42598
42782
  size: "medium",
42599
42783
  input: input,
@@ -42630,7 +42814,9 @@ const inputTypeComponent = {
42630
42814
  const selectedValue = data.find(v => v.value === ev);
42631
42815
  if (address && selectedValue) {
42632
42816
  dot__default["default"].str(address, selectedValue.label, addressData);
42633
- setAddress(_objectSpread2({}, addressData));
42817
+ setAddress({
42818
+ ...addressData
42819
+ });
42634
42820
  }
42635
42821
  }
42636
42822
  },
@@ -42640,149 +42826,188 @@ const inputTypeComponent = {
42640
42826
  isDataLink: true
42641
42827
  });
42642
42828
  }
42643
- const isSingle = (input === null || input === void 0 || (_input$meta8 = input.meta) === null || _input$meta8 === void 0 ? void 0 : _input$meta8.maxRepeat) === 1;
42644
- 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));
42829
+ const isSingle = input?.meta?.maxRepeat === 1;
42830
+ const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [{
42831
+ ...(formsValue[groupFormId] || {})[name]
42832
+ }] : [] : getArray((formsValue[groupFormId] || {})[name] || []).map(v => ({
42833
+ ...v
42834
+ })) : isSingle ? formsValue[name] ? [{
42835
+ ...formsValue[name]
42836
+ }] : [] : (formsValue[name] || []).map(v => ({
42837
+ ...v
42838
+ }));
42645
42839
  const onUpdate = (val, i) => {
42646
42840
  const _val = isSingle ? {
42647
42841
  [name]: val
42648
42842
  } : {
42649
- [name]: formData === null || formData === void 0 ? void 0 : formData.map((d, j) => i === j ? val : d)
42843
+ [name]: formData?.map((d, j) => i === j ? val : d)
42650
42844
  };
42651
42845
  if (groupFormId) {
42652
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
42653
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
42654
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
42846
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
42847
+ const _newData = {
42848
+ ..._defaultData,
42849
+ ..._val
42850
+ };
42851
+ onValuesChange(_newData, {
42852
+ ...formsValue,
42655
42853
  [groupFormId]: _newData
42656
- }));
42657
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
42658
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
42854
+ });
42855
+ form?.setFieldValue(groupFormId, _newData);
42856
+ setValues({
42857
+ ...formsValue,
42659
42858
  [groupFormId]: _newData
42660
- }));
42859
+ });
42661
42860
  return;
42662
42861
  }
42663
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
42664
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
42665
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
42862
+ onValuesChange(_val, {
42863
+ ...formsValue,
42864
+ ..._val
42865
+ });
42866
+ form?.setFieldValue(name, _val[name]);
42867
+ setValues({
42868
+ ...formsValue,
42869
+ ..._val
42870
+ });
42666
42871
  };
42667
42872
  return /*#__PURE__*/jsxRuntime.jsx(DataLink, {
42668
42873
  form: input,
42669
42874
  formsValue: formsValue,
42670
42875
  onUpdate: onUpdate,
42671
42876
  isHighlighted: isHighlighted,
42672
- values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
42877
+ values: groupFormId ? {
42878
+ ...(formsValue[groupFormId] || {}),
42673
42879
  meta: {
42674
- inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta = formsValue.meta) === null || _formsValue$meta === void 0 ? void 0 : _formsValue$meta.inputs) || {})[groupFormId]
42880
+ inputs: (formsValue?.meta?.inputs || {})[groupFormId]
42675
42881
  }
42676
- }) : formsValue,
42882
+ } : formsValue,
42677
42883
  name: name,
42678
42884
  groupFormId: groupFormId,
42679
- maxRepeat: input === null || input === void 0 || (_input$meta9 = input.meta) === null || _input$meta9 === void 0 ? void 0 : _input$meta9.maxRepeat,
42680
- remove: _ref45 => {
42681
- let {
42682
- key
42683
- } = _ref45;
42885
+ maxRepeat: input?.meta?.maxRepeat,
42886
+ remove: ({
42887
+ key
42888
+ }) => {
42684
42889
  const _val = isSingle ? {
42685
42890
  [name]: null
42686
42891
  } : {
42687
42892
  [name]: formData.filter((v, i) => i !== key)
42688
42893
  };
42689
42894
  if (groupFormId) {
42690
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
42691
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
42692
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
42895
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
42896
+ const _newData = {
42897
+ ..._defaultData,
42898
+ ..._val
42899
+ };
42900
+ onValuesChange(_newData, {
42901
+ ...formsValue,
42693
42902
  [groupFormId]: _newData
42694
- }));
42695
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
42696
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
42903
+ });
42904
+ form?.setFieldValue(groupFormId, _newData);
42905
+ setValues({
42906
+ ...formsValue,
42697
42907
  [groupFormId]: _newData
42698
- }));
42908
+ });
42699
42909
  return;
42700
42910
  }
42701
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
42702
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
42703
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
42911
+ onValuesChange(_val, {
42912
+ ...formsValue,
42913
+ ..._val
42914
+ });
42915
+ form?.setFieldValue(name, _val[name]);
42916
+ setValues({
42917
+ ...formsValue,
42918
+ ..._val
42919
+ });
42704
42920
  },
42705
42921
  add: val => {
42706
42922
  const _val = isSingle ? {
42707
42923
  [name]: val
42708
42924
  } : {
42709
- [name]: [...formData, _objectSpread2({}, val)]
42925
+ [name]: [...formData, {
42926
+ ...val
42927
+ }]
42710
42928
  };
42711
42929
  if (groupFormId) {
42712
- const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
42713
- const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
42714
- form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
42715
- onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
42930
+ const _defaultData = form?.getFieldValue(groupFormId) || {};
42931
+ const _newData = {
42932
+ ..._defaultData,
42933
+ ..._val
42934
+ };
42935
+ form?.setFieldValue(groupFormId, _newData);
42936
+ onValuesChange(_newData, {
42937
+ ...formsValue,
42716
42938
  [groupFormId]: _newData
42717
- }));
42718
- setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
42939
+ });
42940
+ setValues({
42941
+ ...formsValue,
42719
42942
  [groupFormId]: _newData
42720
- }));
42943
+ });
42721
42944
  return;
42722
42945
  }
42723
- form === null || form === void 0 || form.setFieldValue(name, _val[name]);
42724
- onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
42725
- setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
42946
+ form?.setFieldValue(name, _val[name]);
42947
+ onValuesChange(_val, {
42948
+ ...formsValue,
42949
+ ..._val
42950
+ });
42951
+ setValues({
42952
+ ...formsValue,
42953
+ ..._val
42954
+ });
42726
42955
  },
42727
42956
  k: name,
42728
42957
  formData: formData
42729
42958
  });
42730
42959
  },
42731
- internallink: (_ref46, _ref47) => {
42732
- let {
42733
- name,
42734
- inputName,
42735
- props,
42736
- value,
42737
- repeatIndex,
42738
- repeatValues,
42739
- formsValue
42740
- } = _ref46;
42741
- let {
42742
- form,
42743
- inputMeta = {},
42744
- t
42745
- } = _ref47;
42746
- return /*#__PURE__*/jsxRuntime.jsx(Website, _objectSpread2(_objectSpread2({
42960
+ internallink: ({
42961
+ name,
42962
+ inputName,
42963
+ props,
42964
+ value,
42965
+ repeatIndex,
42966
+ repeatValues,
42967
+ formsValue
42968
+ }, {
42969
+ form,
42970
+ inputMeta = {},
42971
+ t
42972
+ }) => {
42973
+ return /*#__PURE__*/jsxRuntime.jsx(Website, {
42747
42974
  allowClear: true,
42748
42975
  disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
42749
42976
  placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || 'www.example.com',
42750
- initialValue: value
42751
- }, props), {}, {
42977
+ initialValue: value,
42978
+ ...props,
42752
42979
  onChange: val => updateFormValues(repeatIndex, repeatValues, inputName, val, formsValue, name, form)
42753
- }));
42980
+ });
42754
42981
  },
42755
- group: _ref48 => {
42756
- let {
42757
- props,
42758
- groupInputs
42759
- } = _ref48;
42760
- return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, _objectSpread2({
42761
- groupInputs: groupInputs
42762
- }, props));
42982
+ group: ({
42983
+ props,
42984
+ groupInputs
42985
+ }) => {
42986
+ return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, {
42987
+ groupInputs: groupInputs,
42988
+ ...props
42989
+ });
42763
42990
  },
42764
- groupInputs: (_ref49, _ref50) => {
42765
- let {
42766
- props,
42767
- groupInputs
42768
- } = _ref49;
42769
- let {
42770
- inputMeta
42771
- } = _ref50;
42772
- return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, _objectSpread2({
42991
+ groupInputs: ({
42992
+ props,
42993
+ groupInputs
42994
+ }, {
42995
+ inputMeta
42996
+ }) => {
42997
+ return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, {
42773
42998
  groupInputs: groupInputs,
42774
- inputMeta: inputMeta
42775
- }, props));
42999
+ inputMeta: inputMeta,
43000
+ ...props
43001
+ });
42776
43002
  },
42777
- radioGroup: _ref51 => {
42778
- let {
42779
- props,
42780
- value,
42781
- options
42782
- } = _ref51;
42783
- return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, _objectSpread2(_objectSpread2({
42784
- value: value
42785
- }, props), {}, {
43003
+ radioGroup: ({
43004
+ props,
43005
+ value,
43006
+ options
43007
+ }) => {
43008
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, {
43009
+ value: value,
43010
+ ...props,
42786
43011
  children: (options || []).map(o => {
42787
43012
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Radio, {
42788
43013
  value: o.value,
@@ -42795,17 +43020,16 @@ const inputTypeComponent = {
42795
43020
  }) : null]
42796
43021
  }, o.value);
42797
43022
  })
42798
- }));
43023
+ });
42799
43024
  },
42800
- checkboxGroup: _ref52 => {
42801
- let {
42802
- props,
42803
- value,
42804
- options
42805
- } = _ref52;
42806
- return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox.Group, _objectSpread2(_objectSpread2({
42807
- value: value
42808
- }, props), {}, {
43025
+ checkboxGroup: ({
43026
+ props,
43027
+ value,
43028
+ options
43029
+ }) => {
43030
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox.Group, {
43031
+ value: value,
43032
+ ...props,
42809
43033
  children: (options || []).map(o => {
42810
43034
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Checkbox, {
42811
43035
  value: o.value,
@@ -42818,30 +43042,28 @@ const inputTypeComponent = {
42818
43042
  }) : null]
42819
43043
  }, o.value);
42820
43044
  })
42821
- }));
43045
+ });
42822
43046
  }
42823
43047
  };
42824
- const GetFormItem = _ref53 => {
42825
- var _find, _input$meta10, _input$meta11, _input$meta12, _input$meta13, _input$meta14, _input$meta15, _input$meta16, _inputData$value, _input$meta17, _input$meta18, _inputData$commentVal;
42826
- let {
42827
- code,
42828
- inputData,
42829
- inputId,
42830
- input,
42831
- setLoading,
42832
- values,
42833
- MainForm,
42834
- options,
42835
- plainForms,
42836
- setValues,
42837
- alertError,
42838
- setAddress,
42839
- inputMeta = {},
42840
- inputKey,
42841
- changeInputMeta = () => {},
42842
- i,
42843
- isCreate = false
42844
- } = _ref53;
43048
+ const GetFormItem = ({
43049
+ code,
43050
+ inputData,
43051
+ inputId,
43052
+ input,
43053
+ setLoading,
43054
+ values,
43055
+ MainForm,
43056
+ options,
43057
+ plainForms,
43058
+ setValues,
43059
+ alertError,
43060
+ setAddress,
43061
+ inputMeta = {},
43062
+ inputKey,
43063
+ changeInputMeta = () => {},
43064
+ i,
43065
+ isCreate = false
43066
+ }) => {
42845
43067
  const {
42846
43068
  t,
42847
43069
  getAppHeader,
@@ -42857,7 +43079,7 @@ const GetFormItem = _ref53 => {
42857
43079
  case 'h6':
42858
43080
  return getInputHeadLines(input.type, i, input, values);
42859
43081
  default:
42860
- 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')) : [];
43082
+ const rules = inputMeta?.notApplicable || inputMeta?.notAvailable ? [] : inputData.rules ? inputData.rules.filter(rule => !Object.keys(rule).includes('accept') && !Object.keys(rule).includes('max')) : [];
42861
43083
  const requiredRule = rules.find(r => r.required);
42862
43084
  if (requiredRule && input.type === 'text') {
42863
43085
  rules.push({
@@ -42866,45 +43088,47 @@ const GetFormItem = _ref53 => {
42866
43088
  });
42867
43089
  }
42868
43090
  const noLabel = ['message'].includes(input.type);
42869
- let maxRule = (_find = ((inputData === null || inputData === void 0 ? void 0 : inputData.rules) || []).find(rule => rule.max)) === null || _find === void 0 ? void 0 : _find.max;
43091
+ let maxRule = (inputData?.rules || []).find(rule => rule.max)?.max;
42870
43092
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
42871
43093
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
42872
43094
  className: "flex input-cont",
42873
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
42874
- initialValue: inputMeta === null || inputMeta === void 0 ? void 0 : inputMeta.defaultValue
42875
- }, ['total100', 'group'].includes(input.type) ? {} : {
42876
- name: inputId,
42877
- fieldKey: inputId,
42878
- initialValue: inputData.value
42879
- }), ['upload', 'imageUpload', 'videoUpload'].includes(input.type) ? {
42880
- valuePropName: "fileList",
42881
- getValueFromEvent: e => {
42882
- if (Array.isArray(e)) {
42883
- return e;
42884
- }
42885
- return e && e.fileList && e.fileList.map(f => {
42886
- if (f.response) {
42887
- return f.response;
43095
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
43096
+ initialValue: inputMeta?.defaultValue,
43097
+ ...(['total100', 'group'].includes(input.type) ? {} : {
43098
+ name: inputId,
43099
+ fieldKey: inputId,
43100
+ initialValue: inputData.value
43101
+ }),
43102
+ ...(['upload', 'imageUpload', 'videoUpload'].includes(input.type) ? {
43103
+ valuePropName: "fileList",
43104
+ getValueFromEvent: e => {
43105
+ if (Array.isArray(e)) {
43106
+ return e;
42888
43107
  }
42889
- return f;
42890
- });
42891
- }
42892
- } : {}), {}, {
43108
+ return e && e.fileList && e.fileList.map(f => {
43109
+ if (f.response) {
43110
+ return f.response;
43111
+ }
43112
+ return f;
43113
+ });
43114
+ }
43115
+ } : {}),
42893
43116
  style: input.showOnView === false ? {
42894
43117
  display: 'none'
42895
- } : {}
42896
- }, ['switch'].includes(input.type) ? {
42897
- labelCol: {
42898
- span: 20
42899
- },
42900
- style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
42901
- display: 'none'
42902
- } : {}), {}, {
42903
- flexDirection: 'row',
42904
- justifyContent: 'space-between'
42905
- })
42906
- } : {}), {}, {
42907
- className: input.comment ? "flex-1 with-comment i-".concat(input.type) : "i-".concat(input.type, " flex-1"),
43118
+ } : {},
43119
+ ...(['switch'].includes(input.type) ? {
43120
+ labelCol: {
43121
+ span: 20
43122
+ },
43123
+ style: {
43124
+ ...(input.showOnView === false ? {
43125
+ display: 'none'
43126
+ } : {}),
43127
+ flexDirection: 'row',
43128
+ justifyContent: 'space-between'
43129
+ }
43130
+ } : {}),
43131
+ className: input.comment ? `flex-1 with-comment i-${input.type}` : `i-${input.type} flex-1`,
42908
43132
  "data-id": inputData.name,
42909
43133
  rules: rules,
42910
43134
  required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
@@ -42915,8 +43139,8 @@ const GetFormItem = _ref53 => {
42915
43139
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
42916
43140
  className: "mr-1",
42917
43141
  children: getInputLabel(input, values)
42918
- }), !!(input !== null && input !== void 0 && (_input$meta10 = input.meta) !== null && _input$meta10 !== void 0 && _input$meta10.tooltip) && /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
42919
- title: input === null || input === void 0 || (_input$meta11 = input.meta) === null || _input$meta11 === void 0 ? void 0 : _input$meta11.tooltip,
43142
+ }), !!input?.meta?.tooltip && /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
43143
+ title: input?.meta?.tooltip,
42920
43144
  trigger: "hover",
42921
43145
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
42922
43146
  className: "flex flex-column justify-content-center",
@@ -42934,7 +43158,7 @@ const GetFormItem = _ref53 => {
42934
43158
  title: t('Not applicable'),
42935
43159
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
42936
43160
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
42937
- disabled: !(input !== null && input !== void 0 && (_input$meta12 = input.meta) !== null && _input$meta12 !== void 0 && _input$meta12.notApplicable),
43161
+ disabled: !input?.meta?.notApplicable,
42938
43162
  className: formatClassname(["default p-0", inputMeta.notApplicable && 'primary']),
42939
43163
  type: "link",
42940
43164
  onClick: () => {
@@ -42969,7 +43193,7 @@ const GetFormItem = _ref53 => {
42969
43193
  title: t('No available information'),
42970
43194
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
42971
43195
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
42972
- disabled: !(input !== null && input !== void 0 && (_input$meta13 = input.meta) !== null && _input$meta13 !== void 0 && _input$meta13.notAvailable),
43196
+ disabled: !input?.meta?.notAvailable,
42973
43197
  className: formatClassname(["default p-0", inputMeta.notAvailable && 'primary']),
42974
43198
  type: "link",
42975
43199
  onClick: () => {
@@ -43003,14 +43227,14 @@ const GetFormItem = _ref53 => {
43003
43227
  }), /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
43004
43228
  title: t('Add comment'),
43005
43229
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
43006
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
43230
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
43007
43231
  type: "link",
43008
- disabled: !(input !== null && input !== void 0 && (_input$meta14 = input.meta) !== null && _input$meta14 !== void 0 && _input$meta14.comment)
43009
- }, !isShown ? {
43010
- className: 'default p-0'
43011
- } : {
43012
- className: 'p-0 primary'
43013
- }), {}, {
43232
+ disabled: !input?.meta?.comment,
43233
+ ...(!isShown ? {
43234
+ className: 'default p-0'
43235
+ } : {
43236
+ className: 'p-0 primary'
43237
+ }),
43014
43238
  onClick: () => {
43015
43239
  setIsShown(true);
43016
43240
  changeInputMeta({
@@ -43026,18 +43250,18 @@ const GetFormItem = _ref53 => {
43026
43250
  width: 16,
43027
43251
  height: 16
43028
43252
  })
43029
- }))
43253
+ })
43030
43254
  })
43031
43255
  })]
43032
- }), (_input$meta15 = input.meta) !== null && _input$meta15 !== void 0 && _input$meta15.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
43256
+ }), input.meta?.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
43033
43257
  className: "code",
43034
43258
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
43035
- children: (_input$meta16 = input.meta) === null || _input$meta16 === void 0 ? void 0 : _input$meta16.code
43259
+ children: input.meta?.code
43036
43260
  })
43037
43261
  }) : code ? /*#__PURE__*/jsxRuntime.jsx("div", {
43038
43262
  className: "code",
43039
43263
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
43040
- children: "".concat(code, ".").concat(i + 1)
43264
+ children: `${code}.${i + 1}`
43041
43265
  })
43042
43266
  }) : null]
43043
43267
  })
@@ -43057,7 +43281,7 @@ const GetFormItem = _ref53 => {
43057
43281
  getAppHeader,
43058
43282
  getApiBaseUrl
43059
43283
  }) : console.log(input)
43060
- }))
43284
+ })
43061
43285
  }), alertError ? /*#__PURE__*/jsxRuntime.jsx(antd.Alert, {
43062
43286
  message: alertError.message,
43063
43287
  type: "error",
@@ -43086,10 +43310,10 @@ const GetFormItem = _ref53 => {
43086
43310
  className: "max-char-span",
43087
43311
  children: t('max-char', {
43088
43312
  chars: maxRule,
43089
- filled: (inputData === null || inputData === void 0 || (_inputData$value = inputData.value) === null || _inputData$value === void 0 ? void 0 : _inputData$value.length) || 0
43313
+ filled: inputData?.value?.length || 0
43090
43314
  })
43091
43315
  })
43092
- }) : null, (_input$meta17 = input.meta) !== null && _input$meta17 !== void 0 && _input$meta17.comment && isShown ? /*#__PURE__*/jsxRuntime.jsxs("div", {
43316
+ }) : null, input.meta?.comment && isShown ? /*#__PURE__*/jsxRuntime.jsxs("div", {
43093
43317
  className: "input-content dynamic-form-comment",
43094
43318
  children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
43095
43319
  className: "comment-textarea",
@@ -43115,7 +43339,7 @@ const GetFormItem = _ref53 => {
43115
43339
  },
43116
43340
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
43117
43341
  type: "link",
43118
- disabled: !((_input$meta18 = input.meta) !== null && _input$meta18 !== void 0 && _input$meta18.comment),
43342
+ disabled: !input.meta?.comment,
43119
43343
  className: "p-0",
43120
43344
  children: /*#__PURE__*/jsxRuntime.jsx(Icons.DeleteOutlined, {
43121
43345
  width: 16,
@@ -43146,7 +43370,7 @@ const GetFormItem = _ref53 => {
43146
43370
  className: "max-char-span",
43147
43371
  children: t('max-char', {
43148
43372
  chars: MAX_COMMENTS_LENGTH,
43149
- filled: (inputData === null || inputData === void 0 || (_inputData$commentVal = inputData.commentValue) === null || _inputData$commentVal === void 0 ? void 0 : _inputData$commentVal.length) || 0
43373
+ filled: inputData?.commentValue?.length || 0
43150
43374
  })
43151
43375
  })]
43152
43376
  }) : null]
@@ -43166,23 +43390,22 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
43166
43390
  const formId = form.dataId || k;
43167
43391
  const allInputs = Object.keys(form.inputs).filter(i => {
43168
43392
  const input = form.inputs[i];
43169
- return !excludedKeys.includes(i) && !input.excludeFromEdit && showHideInput(input, values, undefined, undefined, setValues, "".concat(formId, ".").concat(i));
43393
+ return !excludedKeys.includes(i) && !input.excludeFromEdit && showHideInput(input, values, undefined, undefined, setValues, `${formId}.${i}`);
43170
43394
  });
43171
43395
  return allInputs.length ? /*#__PURE__*/jsxRuntime.jsxs(React__default["default"].Fragment, {
43172
43396
  children: [getFormTitles(formTitles, formId, i), ['h2', 'h3', 'h4', 'h5', 'h6'].includes(form.type) ? getInputHeadLines(form.type, i, form, values) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
43173
43397
  children: [!form.repeatable ? /*#__PURE__*/jsxRuntime.jsx("h3", {
43174
- className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " mb0 ").concat(i ? 'mt-3' : ''),
43398
+ className: `${form.titleClass ? form.titleClass : 'title-semibold-4'} mb0 ${i ? 'mt-3' : ''}`,
43175
43399
  children: getInputLabel(form, values)
43176
43400
  }) : !form.hideSectionLabel ? /*#__PURE__*/jsxRuntime.jsx("h3", {
43177
- className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " mb0 ").concat(i ? 'mt-3' : ''),
43401
+ className: `${form.titleClass ? form.titleClass : 'title-semibold-4'} mb0 ${i ? 'mt-3' : ''}`,
43178
43402
  children: form.sectionLabel ? getSectionLabel(form.sectionLabel, values) : form.label ? getInputLabel(form, values) : camelCaseToTitle(k)
43179
43403
  }) : null, /*#__PURE__*/jsxRuntime.jsx(antd.Form.List, {
43180
43404
  name: formId,
43181
- children: (fields, _ref) => {
43182
- let {
43183
- add,
43184
- remove
43185
- } = _ref;
43405
+ children: (fields, {
43406
+ add,
43407
+ remove
43408
+ }) => {
43186
43409
  const formData = form.repeatable ? values[formId] || [] : values[formId] ? [values[formId]] : [];
43187
43410
  if (fields.length === 0) {
43188
43411
  const formInputs = form.inputs;
@@ -43233,7 +43456,7 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
43233
43456
  padding: '0px 5px',
43234
43457
  color: '#2E90FA'
43235
43458
  },
43236
- children: "#".concat(field.name + 1)
43459
+ children: `#${field.name + 1}`
43237
43460
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
43238
43461
  className: "remove-button-for-repeatable",
43239
43462
  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, {
@@ -43255,8 +43478,8 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
43255
43478
  const inputId = input.dataId || inp;
43256
43479
  const inputValues = Array.isArray(values[formId]) ? values[formId][field.name] || {} : values[formId] || {};
43257
43480
  const value = inputValues[inputId];
43258
- const commentValue = inputValues["".concat(inputId, "Comment")];
43259
- const inputData = getData(formId, input, value, commentValue, "".concat(formId, "[").concat(field.name, "].").concat(inputId), "".concat(formId, ".").concat(inputId));
43481
+ const commentValue = inputValues[`${inputId}Comment`];
43482
+ const inputData = getData(formId, input, value, commentValue, `${formId}[${field.name}].${inputId}`, `${formId}.${inputId}`);
43260
43483
  const subtitles = form.subtitles || null;
43261
43484
  inputData.repeatIndex = field.name;
43262
43485
  inputData.inputName = inputId;
@@ -43277,59 +43500,64 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
43277
43500
  message: requiredRule.message || ''
43278
43501
  });
43279
43502
  }
43280
- return showHideInput(input, values, field.name, inputValues, setValues, "".concat(formId, "[").concat(field.name, "].").concat(inputId)) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
43503
+ return showHideInput(input, values, field.name, inputValues, setValues, `${formId}[${field.name}].${inputId}`) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
43281
43504
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
43282
- className: form.repeatable ? "inputs" : "",
43505
+ className: form.repeatable ? `inputs` : "",
43283
43506
  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, {
43284
- children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, field), {}, {
43285
- required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
43286
- }, ['total100', 'group'].includes(input.type) ? {} : {
43287
- name: [field.name, inputId],
43288
- fieldKey: [field.fieldKey, inputId],
43289
- initialValue: inputData.value
43290
- }), ['upload'].includes(input.type) ? {
43291
- valuePropName: "fileList",
43292
- getValueFromEvent: e => {
43293
- if (Array.isArray(e)) {
43294
- return e;
43295
- }
43296
- return e && e.fileList && e.fileList.map(f => {
43297
- if (f.response) {
43298
- return f.response;
43507
+ children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
43508
+ ...field,
43509
+ required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false,
43510
+ ...(['total100', 'group'].includes(input.type) ? {} : {
43511
+ name: [field.name, inputId],
43512
+ fieldKey: [field.fieldKey, inputId],
43513
+ initialValue: inputData.value
43514
+ }),
43515
+ ...(['upload'].includes(input.type) ? {
43516
+ valuePropName: "fileList",
43517
+ getValueFromEvent: e => {
43518
+ if (Array.isArray(e)) {
43519
+ return e;
43299
43520
  }
43300
- return f;
43301
- });
43302
- }
43303
- } : {}), {}, {
43521
+ return e && e.fileList && e.fileList.map(f => {
43522
+ if (f.response) {
43523
+ return f.response;
43524
+ }
43525
+ return f;
43526
+ });
43527
+ }
43528
+ } : {}),
43304
43529
  style: input.showOnView === false ? {
43305
43530
  display: 'none'
43306
- } : {}
43307
- }, ['switch'].includes(input.type) ? {
43308
- labelCol: {
43309
- span: 20
43310
- },
43311
- style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
43312
- display: 'none'
43313
- } : {}), {}, {
43314
- flexDirection: 'row',
43315
- justifyContent: 'space-between'
43316
- })
43317
- } : {}), {}, {
43531
+ } : {},
43532
+ ...(['switch'].includes(input.type) ? {
43533
+ labelCol: {
43534
+ span: 20
43535
+ },
43536
+ style: {
43537
+ ...(input.showOnView === false ? {
43538
+ display: 'none'
43539
+ } : {}),
43540
+ flexDirection: 'row',
43541
+ justifyContent: 'space-between'
43542
+ }
43543
+ } : {}),
43318
43544
  label: getInputLabel(input, values),
43319
43545
  rules: rules,
43320
- className: input.comment ? "with-comment i-".concat(input.type) : "i-".concat(input.type),
43546
+ className: input.comment ? `with-comment i-${input.type}` : `i-${input.type}`,
43321
43547
  extra: input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
43322
43548
  disabled: inputData.props.disabled,
43323
43549
  type: "link",
43324
43550
  onClick: () => {
43325
43551
  const inputValues = Array.isArray(values[formId]) ? values[formId][field.name] || {} : values[formId] || {};
43326
- inputValues["".concat(inputData.inputName, "Comment")] = !inputData.commentValue ? '' : undefined;
43552
+ inputValues[`${inputData.inputName}Comment`] = !inputData.commentValue ? '' : undefined;
43327
43553
  if (Array.isArray(values[formId])) {
43328
43554
  values[formId][field.name] = inputValues;
43329
43555
  } else {
43330
43556
  values[formId] = inputValues;
43331
43557
  }
43332
- setValues(_objectSpread2({}, values));
43558
+ setValues({
43559
+ ...values
43560
+ });
43333
43561
  },
43334
43562
  children: t(!inputData.commentValue ? 'Add Comment' : 'Remove Comment')
43335
43563
  }) : null,
@@ -43346,9 +43574,9 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
43346
43574
  getAppHeader,
43347
43575
  getApiBaseUrl
43348
43576
  }) : console.log(input)
43349
- })), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
43350
- name: [field.name, "".concat(inputData.inputName, "Comment")],
43351
- fieldKey: [field.fieldKey, "".concat(inputData.inputName, "Comment")],
43577
+ }), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
43578
+ name: [field.name, `${inputData.inputName}Comment`],
43579
+ fieldKey: [field.fieldKey, `${inputData.inputName}Comment`],
43352
43580
  initialValue: inputData.commentValue,
43353
43581
  hidden: !inputData.commentValue,
43354
43582
  children: inputTypeComponent.comment(inputData, {
@@ -43362,10 +43590,10 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
43362
43590
  }) : null]
43363
43591
  })]
43364
43592
  }, ii)
43365
- }, "".concat(i).concat(ii)) : null;
43593
+ }, `${i}${ii}`) : null;
43366
43594
  })
43367
43595
  })]
43368
- }, "".concat(formId, "-").concat(field.name))), form.repeatable ? /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
43596
+ }, `${formId}-${field.name}`)), form.repeatable ? /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
43369
43597
  type: "dashed",
43370
43598
  style: {
43371
43599
  margin: '10px 0px 30px',
@@ -43394,7 +43622,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
43394
43622
  const hasLabel = label && (typeof label === 'string' && (label || '').trim() !== '' || typeof label === 'object') ? true : false;
43395
43623
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
43396
43624
  children: [hasLabel ? /*#__PURE__*/jsxRuntime.jsx("h3", {
43397
- className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " ").concat(i ? 'mt-3 mb-1' : ''),
43625
+ className: `${form.titleClass ? form.titleClass : 'title-semibold-4'} ${i ? 'mt-3 mb-1' : ''}`,
43398
43626
  children: label
43399
43627
  }) : null, /*#__PURE__*/jsxRuntime.jsx("div", {
43400
43628
  className: hasLabel ? "mb-4" : "",
@@ -43403,8 +43631,8 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
43403
43631
  const inputId = input.dataId || inp;
43404
43632
  const inputValues = Array.isArray(values[formId]) ? values[formId] || {} : values[formId] || {};
43405
43633
  const value = inputValues[inputId];
43406
- const commentValue = inputValues["".concat(inputId, "Comment")];
43407
- const inputData = getData(formId, input, value, commentValue, "".concat(formId, ".").concat(inputId), "".concat(formId, ".").concat(inputId));
43634
+ const commentValue = inputValues[`${inputId}Comment`];
43635
+ const inputData = getData(formId, input, value, commentValue, `${formId}.${inputId}`, `${formId}.${inputId}`);
43408
43636
  const subtitles = form.subtitles || null;
43409
43637
  inputData.repeatIndex = undefined;
43410
43638
  inputData.inputName = inputId;
@@ -43425,58 +43653,62 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
43425
43653
  message: requiredRule.message || ''
43426
43654
  });
43427
43655
  }
43428
- return showHideInput(input, values, undefined, inputValues, setValues, "".concat(formId, ".").concat(inputId)) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
43656
+ return showHideInput(input, values, undefined, inputValues, setValues, `${formId}.${inputId}`) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
43429
43657
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
43430
43658
  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, {
43431
- children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
43432
- required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
43433
- }, ['total100', 'group'].includes(input.type) ? {} : {
43434
- name: [formId, inputId],
43435
- fieldKey: [formId, inputId],
43436
- initialValue: inputData.value
43437
- }), ['upload'].includes(input.type) ? {
43438
- valuePropName: "fileList",
43439
- getValueFromEvent: e => {
43440
- if (Array.isArray(e)) {
43441
- return e;
43442
- }
43443
- return e && e.fileList && e.fileList.map(f => {
43444
- if (f.response) {
43445
- return f.response;
43659
+ children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
43660
+ required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false,
43661
+ ...(['total100', 'group'].includes(input.type) ? {} : {
43662
+ name: [formId, inputId],
43663
+ fieldKey: [formId, inputId],
43664
+ initialValue: inputData.value
43665
+ }),
43666
+ ...(['upload'].includes(input.type) ? {
43667
+ valuePropName: "fileList",
43668
+ getValueFromEvent: e => {
43669
+ if (Array.isArray(e)) {
43670
+ return e;
43446
43671
  }
43447
- return f;
43448
- });
43449
- }
43450
- } : {}), {}, {
43672
+ return e && e.fileList && e.fileList.map(f => {
43673
+ if (f.response) {
43674
+ return f.response;
43675
+ }
43676
+ return f;
43677
+ });
43678
+ }
43679
+ } : {}),
43451
43680
  style: input.showOnView === false ? {
43452
43681
  display: 'none'
43453
- } : {}
43454
- }, ['switch'].includes(input.type) ? {
43455
- labelCol: {
43456
- span: 20
43457
- },
43458
- style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
43459
- display: 'none'
43460
- } : {}), {}, {
43461
- flexDirection: 'row',
43462
- justifyContent: 'space-between'
43463
- })
43464
- } : {}), {}, {
43682
+ } : {},
43683
+ ...(['switch'].includes(input.type) ? {
43684
+ labelCol: {
43685
+ span: 20
43686
+ },
43687
+ style: {
43688
+ ...(input.showOnView === false ? {
43689
+ display: 'none'
43690
+ } : {}),
43691
+ flexDirection: 'row',
43692
+ justifyContent: 'space-between'
43693
+ }
43694
+ } : {}),
43465
43695
  label: getInputLabel(input, values),
43466
43696
  rules: rules,
43467
- className: input.comment ? "with-comment i-".concat(input.type) : "i-".concat(input.type),
43697
+ className: input.comment ? `with-comment i-${input.type}` : `i-${input.type}`,
43468
43698
  extra: input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
43469
43699
  disabled: inputData.props.disabled,
43470
43700
  type: "link",
43471
43701
  onClick: () => {
43472
43702
  const inputValues = Array.isArray(values[formId]) ? values[formId] || {} : values[formId] || {};
43473
- inputValues["".concat(inputData.inputName, "Comment")] = !inputData.commentValue ? '' : undefined;
43703
+ inputValues[`${inputData.inputName}Comment`] = !inputData.commentValue ? '' : undefined;
43474
43704
  if (Array.isArray(values[formId])) {
43475
43705
  values[formId] = inputValues;
43476
43706
  } else {
43477
43707
  values[formId] = inputValues;
43478
43708
  }
43479
- setValues(_objectSpread2({}, values));
43709
+ setValues({
43710
+ ...values
43711
+ });
43480
43712
  },
43481
43713
  children: t(!inputData.commentValue ? 'Add Comment' : 'Remove Comment')
43482
43714
  }) : null,
@@ -43491,9 +43723,9 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
43491
43723
  getAppHeader,
43492
43724
  getApiBaseUrl
43493
43725
  }) : console.log(input)
43494
- })), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
43495
- name: [formId, "".concat(inputData.inputName, "Comment")],
43496
- fieldKey: [formId, "".concat(inputData.inputName, "Comment")],
43726
+ }), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
43727
+ name: [formId, `${inputData.inputName}Comment`],
43728
+ fieldKey: [formId, `${inputData.inputName}Comment`],
43497
43729
  initialValue: inputData.commentValue,
43498
43730
  hidden: !inputData.commentValue,
43499
43731
  children: inputTypeComponent.comment(inputData, {
@@ -43507,7 +43739,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
43507
43739
  }) : null]
43508
43740
  })]
43509
43741
  }, ii)
43510
- }, "".concat(i).concat(ii)) : null;
43742
+ }, `${i}${ii}`) : null;
43511
43743
  })
43512
43744
  })]
43513
43745
  });
@@ -61609,6 +61841,7 @@ exports.SelectFiltersTimeFrame = Timeframe;
61609
61841
  exports.SettingsPopover = SettingsPopover;
61610
61842
  exports.Sidenav = Sidenav;
61611
61843
  exports.SidenavMenu = SidenavMenu;
61844
+ exports.SimpleGlobe = SimpleGlobe;
61612
61845
  exports.StackChart = StackChart;
61613
61846
  exports.StakeholderMappings = index$1;
61614
61847
  exports.Steps = DAFSteps;