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.
- package/dist/components/index.js +1053 -820
- package/package.json +1 -1
- package/src/@daf/core/components/Dashboard/Globe/Globe.stories.js +30 -5
- package/src/@daf/core/components/Dashboard/Globe/README.md +106 -0
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobe.jsx +245 -0
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobe.stories.js +202 -0
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobeDebug.jsx +85 -0
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobeExample.jsx +75 -0
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobeTest.jsx +48 -0
- package/src/@daf/core/components/Dashboard/Globe/hook.js +63 -7
- package/src/@daf/core/components/Dashboard/Globe/index.jsx +24 -6
- package/src/@daf/core/components/Dashboard/Globe/storyConfig.js +243 -0
- package/src/@daf/core/components/Dashboard/Globe/storyConfig1.js +354 -0
- package/src/@daf/core/components/EditForm/EditForm.stories.js +0 -1
- package/src/@daf/core/components/EditForm/_index.scss +18 -64
- package/src/@daf/core/components/EditForm/form.jsx +2 -3
- package/src/index.js +1 -0
- package/.env +0 -8
- package/.vscode/settings.json +0 -13
package/dist/components/index.js
CHANGED
|
@@ -3215,7 +3215,7 @@ const config$3 = {
|
|
|
3215
3215
|
Lightning: config$4
|
|
3216
3216
|
};
|
|
3217
3217
|
|
|
3218
|
-
const _excluded$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
11771
|
+
const _excluded$r = ["children"];
|
|
11772
11772
|
const BorderedButton = _ref => {
|
|
11773
11773
|
let {
|
|
11774
11774
|
children
|
|
11775
11775
|
} = _ref,
|
|
11776
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
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$
|
|
11916
|
+
const _excluded$q = ["icon"];
|
|
11917
11917
|
function GetIcon(_ref) {
|
|
11918
11918
|
let {
|
|
11919
11919
|
icon
|
|
11920
11920
|
} = _ref,
|
|
11921
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
-
|
|
14086
|
-
const
|
|
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
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
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(() =>
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
|
|
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
|
-
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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,
|
|
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: (
|
|
41442
|
-
|
|
41443
|
-
|
|
41444
|
-
|
|
41445
|
-
|
|
41446
|
-
|
|
41447
|
-
|
|
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,
|
|
41456
|
-
size: "medium"
|
|
41457
|
-
|
|
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
|
-
|
|
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: (
|
|
41467
|
-
|
|
41468
|
-
|
|
41469
|
-
|
|
41470
|
-
|
|
41471
|
-
|
|
41472
|
-
|
|
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 =
|
|
41704
|
+
search = `${addressData.address.level1}, ${addressData.address.country}`;
|
|
41482
41705
|
}
|
|
41483
41706
|
if (addressData.address.level2) {
|
|
41484
|
-
search =
|
|
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 =
|
|
41715
|
+
search = `${search} ${formsValue.administrativeLevel1Name}`;
|
|
41493
41716
|
}
|
|
41494
41717
|
if (formsValue.administrativeLevel2Name) {
|
|
41495
|
-
search =
|
|
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: (
|
|
41508
|
-
|
|
41509
|
-
|
|
41510
|
-
|
|
41511
|
-
|
|
41512
|
-
|
|
41513
|
-
|
|
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,
|
|
41522
|
-
size: "medium"
|
|
41523
|
-
|
|
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
|
-
|
|
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: (
|
|
41533
|
-
|
|
41534
|
-
|
|
41535
|
-
|
|
41536
|
-
|
|
41537
|
-
|
|
41538
|
-
|
|
41539
|
-
|
|
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 = !
|
|
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,
|
|
41773
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
|
|
41556
41774
|
allowClear: true,
|
|
41557
|
-
autoComplete: "new-password"
|
|
41558
|
-
|
|
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,
|
|
41783
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
|
|
41566
41784
|
allowClear: true,
|
|
41567
|
-
autoComplete: "new-password"
|
|
41568
|
-
|
|
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: (
|
|
41577
|
-
|
|
41578
|
-
|
|
41579
|
-
|
|
41580
|
-
|
|
41581
|
-
|
|
41582
|
-
|
|
41583
|
-
|
|
41584
|
-
|
|
41585
|
-
|
|
41586
|
-
|
|
41587
|
-
|
|
41588
|
-
|
|
41589
|
-
|
|
41590
|
-
|
|
41591
|
-
|
|
41592
|
-
|
|
41593
|
-
|
|
41594
|
-
|
|
41595
|
-
|
|
41596
|
-
|
|
41597
|
-
|
|
41598
|
-
|
|
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,
|
|
41872
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
|
|
41658
41873
|
autoComplete: "new-password",
|
|
41659
41874
|
allowClear: true,
|
|
41660
41875
|
showSearch: true,
|
|
41661
|
-
defaultValue: input
|
|
41876
|
+
defaultValue: input?.meta?.defaultValue,
|
|
41662
41877
|
filterOption: filterSelectOptions,
|
|
41663
|
-
optionFilterProp: "children"
|
|
41664
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
},
|
|
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: (
|
|
41704
|
-
|
|
41705
|
-
|
|
41706
|
-
|
|
41707
|
-
|
|
41708
|
-
|
|
41709
|
-
|
|
41710
|
-
|
|
41711
|
-
|
|
41712
|
-
|
|
41713
|
-
|
|
41714
|
-
|
|
41715
|
-
|
|
41716
|
-
|
|
41717
|
-
|
|
41718
|
-
|
|
41719
|
-
|
|
41720
|
-
|
|
41721
|
-
|
|
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,
|
|
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
|
-
|
|
41786
|
-
|
|
41787
|
-
|
|
41788
|
-
filterOption: filterSelectOptions
|
|
41789
|
-
|
|
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
|
-
},
|
|
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: (
|
|
41807
|
-
|
|
41808
|
-
|
|
41809
|
-
|
|
41810
|
-
|
|
41811
|
-
|
|
41812
|
-
|
|
41813
|
-
|
|
41814
|
-
|
|
41815
|
-
|
|
41816
|
-
|
|
41817
|
-
|
|
41818
|
-
|
|
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 =
|
|
42039
|
+
const _new = {
|
|
42040
|
+
...(formsValue[groupFormId] || {}),
|
|
41828
42041
|
[name]: localDate
|
|
41829
|
-
}
|
|
42042
|
+
};
|
|
41830
42043
|
form.setFieldValue(groupFormId, _new);
|
|
41831
|
-
setFormValues(
|
|
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,
|
|
42059
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
|
|
41846
42060
|
allowClear: true,
|
|
41847
|
-
autoComplete: "new-password"
|
|
41848
|
-
|
|
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,
|
|
42074
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
|
|
41861
42075
|
allowClear: true,
|
|
41862
|
-
autoComplete: "new-password"
|
|
41863
|
-
|
|
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: (
|
|
41872
|
-
|
|
41873
|
-
|
|
41874
|
-
|
|
41875
|
-
|
|
41876
|
-
|
|
41877
|
-
|
|
41878
|
-
|
|
41879
|
-
|
|
41880
|
-
|
|
41881
|
-
|
|
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
|
-
|
|
42105
|
+
},
|
|
42106
|
+
...props,
|
|
41895
42107
|
disabled: false
|
|
41896
|
-
})
|
|
42108
|
+
});
|
|
41897
42109
|
},
|
|
41898
|
-
textarea: (
|
|
41899
|
-
|
|
41900
|
-
|
|
41901
|
-
|
|
41902
|
-
|
|
41903
|
-
|
|
41904
|
-
|
|
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,
|
|
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
|
-
|
|
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: (
|
|
41926
|
-
|
|
41927
|
-
|
|
41928
|
-
|
|
41929
|
-
|
|
41930
|
-
|
|
41931
|
-
|
|
41932
|
-
|
|
41933
|
-
|
|
41934
|
-
|
|
41935
|
-
|
|
41936
|
-
|
|
41937
|
-
|
|
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
|
|
42151
|
+
country: formsValue?.country,
|
|
41944
42152
|
formsValue: formsValue,
|
|
41945
|
-
initialValue: value
|
|
41946
|
-
|
|
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: (
|
|
41965
|
-
|
|
41966
|
-
|
|
41967
|
-
|
|
41968
|
-
|
|
41969
|
-
|
|
41970
|
-
|
|
41971
|
-
|
|
41972
|
-
|
|
41973
|
-
|
|
41974
|
-
|
|
41975
|
-
|
|
41976
|
-
|
|
41977
|
-
|
|
41978
|
-
|
|
41979
|
-
|
|
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:
|
|
42025
|
-
|
|
42026
|
-
|
|
42027
|
-
|
|
42028
|
-
|
|
42029
|
-
|
|
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,
|
|
42055
|
-
|
|
42056
|
-
|
|
42057
|
-
|
|
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,
|
|
42078
|
-
noStyle: true
|
|
42079
|
-
|
|
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,
|
|
42288
|
+
children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
|
|
42084
42289
|
allowClear: true,
|
|
42085
42290
|
showSearch: true,
|
|
42086
42291
|
filterOption: filterSelectOptions,
|
|
42087
|
-
optionFilterProp: "children"
|
|
42088
|
-
|
|
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
|
-
})
|
|
42095
|
-
noStyle: true
|
|
42096
|
-
|
|
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 ?
|
|
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
|
-
})
|
|
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: (
|
|
42144
|
-
|
|
42145
|
-
|
|
42146
|
-
|
|
42147
|
-
|
|
42148
|
-
|
|
42149
|
-
|
|
42150
|
-
|
|
42151
|
-
|
|
42152
|
-
|
|
42153
|
-
|
|
42154
|
-
|
|
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
|
|
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,
|
|
42172
|
-
allowClear: true
|
|
42173
|
-
|
|
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 ?
|
|
42384
|
+
return value ? `${value}` : '';
|
|
42183
42385
|
},
|
|
42184
42386
|
parser: value => value.replace('%', ''),
|
|
42185
42387
|
addonAfter: "%"
|
|
42186
|
-
})
|
|
42388
|
+
});
|
|
42187
42389
|
},
|
|
42188
|
-
year:
|
|
42189
|
-
|
|
42190
|
-
|
|
42191
|
-
} = _ref27;
|
|
42390
|
+
year: ({
|
|
42391
|
+
props
|
|
42392
|
+
}) => {
|
|
42192
42393
|
const lng = localStorage.getItem('datastakeLng') || 'en';
|
|
42193
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker,
|
|
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
|
-
|
|
42397
|
+
picker: "year",
|
|
42398
|
+
...props,
|
|
42198
42399
|
format: "YYYY"
|
|
42199
|
-
})
|
|
42400
|
+
});
|
|
42200
42401
|
},
|
|
42201
|
-
upload: (
|
|
42202
|
-
|
|
42203
|
-
|
|
42204
|
-
|
|
42205
|
-
|
|
42206
|
-
|
|
42207
|
-
|
|
42208
|
-
|
|
42209
|
-
|
|
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,
|
|
42423
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
|
|
42424
|
+
...maxProps,
|
|
42225
42425
|
accept: accept,
|
|
42226
|
-
action:
|
|
42426
|
+
action: `${apiURL}/upload`,
|
|
42227
42427
|
beforeUpload: beforeUpload(allowedExtensions),
|
|
42228
42428
|
onChange: val => {
|
|
42229
|
-
if (val
|
|
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:
|
|
42238
|
-
Authorization:
|
|
42239
|
-
|
|
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: (
|
|
42252
|
-
|
|
42253
|
-
|
|
42254
|
-
|
|
42255
|
-
|
|
42256
|
-
|
|
42257
|
-
|
|
42258
|
-
|
|
42259
|
-
|
|
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,
|
|
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:
|
|
42477
|
+
action: `${apiURL}/upload`,
|
|
42278
42478
|
onChange: val => {
|
|
42279
42479
|
if (typeof setLoading === 'function') {
|
|
42280
|
-
if (val
|
|
42281
|
-
|
|
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:
|
|
42295
|
-
Authorization:
|
|
42296
|
-
|
|
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: (
|
|
42309
|
-
|
|
42310
|
-
|
|
42311
|
-
|
|
42312
|
-
|
|
42313
|
-
|
|
42314
|
-
|
|
42315
|
-
|
|
42316
|
-
|
|
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,
|
|
42330
|
-
itemRender: (item, fileList) => {
|
|
42331
|
-
|
|
42332
|
-
|
|
42333
|
-
|
|
42334
|
-
|
|
42335
|
-
|
|
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:
|
|
42537
|
+
action: `${apiURL}/upload`,
|
|
42343
42538
|
onChange: val => {
|
|
42344
42539
|
if (typeof setLoading === 'function') {
|
|
42345
|
-
if (val
|
|
42346
|
-
|
|
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:
|
|
42360
|
-
Authorization:
|
|
42361
|
-
|
|
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: (
|
|
42374
|
-
|
|
42375
|
-
|
|
42376
|
-
|
|
42377
|
-
|
|
42378
|
-
|
|
42379
|
-
|
|
42380
|
-
|
|
42381
|
-
|
|
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 =
|
|
42584
|
+
search = `${addressData.level1}, ${addressData.country || country.name}`;
|
|
42392
42585
|
}
|
|
42393
42586
|
if (addressData.level2) {
|
|
42394
|
-
search =
|
|
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 =
|
|
42595
|
+
search = `${search} ${formsValue.administrativeLevel1Name}`;
|
|
42403
42596
|
}
|
|
42404
42597
|
if (formsValue.administrativeLevel2Name) {
|
|
42405
|
-
search =
|
|
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: (
|
|
42419
|
-
|
|
42420
|
-
|
|
42421
|
-
|
|
42422
|
-
|
|
42423
|
-
|
|
42424
|
-
|
|
42425
|
-
|
|
42426
|
-
|
|
42427
|
-
|
|
42428
|
-
|
|
42429
|
-
|
|
42430
|
-
|
|
42431
|
-
|
|
42432
|
-
|
|
42433
|
-
|
|
42434
|
-
|
|
42435
|
-
|
|
42436
|
-
|
|
42437
|
-
|
|
42438
|
-
|
|
42439
|
-
|
|
42440
|
-
|
|
42441
|
-
|
|
42442
|
-
|
|
42443
|
-
|
|
42444
|
-
|
|
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(
|
|
42673
|
+
setAddress({
|
|
42674
|
+
...addressData
|
|
42675
|
+
});
|
|
42483
42676
|
}
|
|
42484
42677
|
}
|
|
42485
42678
|
},
|
|
42486
42679
|
setAddress: setAddress
|
|
42487
42680
|
});
|
|
42488
42681
|
},
|
|
42489
|
-
tag:
|
|
42490
|
-
|
|
42491
|
-
|
|
42492
|
-
|
|
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: (
|
|
42501
|
-
|
|
42502
|
-
|
|
42503
|
-
|
|
42504
|
-
|
|
42505
|
-
|
|
42506
|
-
|
|
42507
|
-
|
|
42508
|
-
|
|
42509
|
-
|
|
42510
|
-
|
|
42511
|
-
|
|
42512
|
-
|
|
42513
|
-
|
|
42514
|
-
|
|
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: (
|
|
42535
|
-
|
|
42536
|
-
|
|
42537
|
-
|
|
42538
|
-
|
|
42539
|
-
|
|
42540
|
-
|
|
42541
|
-
|
|
42542
|
-
|
|
42543
|
-
|
|
42544
|
-
|
|
42545
|
-
|
|
42546
|
-
|
|
42547
|
-
|
|
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
|
-
|
|
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: (
|
|
42560
|
-
|
|
42561
|
-
|
|
42562
|
-
|
|
42563
|
-
|
|
42564
|
-
|
|
42565
|
-
|
|
42566
|
-
|
|
42567
|
-
|
|
42568
|
-
|
|
42569
|
-
|
|
42570
|
-
|
|
42571
|
-
|
|
42572
|
-
|
|
42573
|
-
|
|
42574
|
-
|
|
42575
|
-
|
|
42576
|
-
|
|
42577
|
-
|
|
42578
|
-
|
|
42579
|
-
|
|
42580
|
-
|
|
42581
|
-
|
|
42582
|
-
|
|
42583
|
-
|
|
42584
|
-
|
|
42585
|
-
|
|
42586
|
-
|
|
42587
|
-
|
|
42588
|
-
|
|
42589
|
-
|
|
42590
|
-
|
|
42591
|
-
|
|
42592
|
-
|
|
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(
|
|
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 =
|
|
42644
|
-
const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [
|
|
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
|
|
42843
|
+
[name]: formData?.map((d, j) => i === j ? val : d)
|
|
42650
42844
|
};
|
|
42651
42845
|
if (groupFormId) {
|
|
42652
|
-
const _defaultData =
|
|
42653
|
-
const _newData =
|
|
42654
|
-
|
|
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
|
|
42658
|
-
setValues(
|
|
42854
|
+
});
|
|
42855
|
+
form?.setFieldValue(groupFormId, _newData);
|
|
42856
|
+
setValues({
|
|
42857
|
+
...formsValue,
|
|
42659
42858
|
[groupFormId]: _newData
|
|
42660
|
-
})
|
|
42859
|
+
});
|
|
42661
42860
|
return;
|
|
42662
42861
|
}
|
|
42663
|
-
onValuesChange(_val,
|
|
42664
|
-
|
|
42665
|
-
|
|
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 ?
|
|
42877
|
+
values: groupFormId ? {
|
|
42878
|
+
...(formsValue[groupFormId] || {}),
|
|
42673
42879
|
meta: {
|
|
42674
|
-
inputs: (
|
|
42880
|
+
inputs: (formsValue?.meta?.inputs || {})[groupFormId]
|
|
42675
42881
|
}
|
|
42676
|
-
}
|
|
42882
|
+
} : formsValue,
|
|
42677
42883
|
name: name,
|
|
42678
42884
|
groupFormId: groupFormId,
|
|
42679
|
-
maxRepeat: input
|
|
42680
|
-
remove:
|
|
42681
|
-
|
|
42682
|
-
|
|
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 =
|
|
42691
|
-
const _newData =
|
|
42692
|
-
|
|
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
|
|
42696
|
-
setValues(
|
|
42903
|
+
});
|
|
42904
|
+
form?.setFieldValue(groupFormId, _newData);
|
|
42905
|
+
setValues({
|
|
42906
|
+
...formsValue,
|
|
42697
42907
|
[groupFormId]: _newData
|
|
42698
|
-
})
|
|
42908
|
+
});
|
|
42699
42909
|
return;
|
|
42700
42910
|
}
|
|
42701
|
-
onValuesChange(_val,
|
|
42702
|
-
|
|
42703
|
-
|
|
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,
|
|
42925
|
+
[name]: [...formData, {
|
|
42926
|
+
...val
|
|
42927
|
+
}]
|
|
42710
42928
|
};
|
|
42711
42929
|
if (groupFormId) {
|
|
42712
|
-
const _defaultData =
|
|
42713
|
-
const _newData =
|
|
42714
|
-
|
|
42715
|
-
|
|
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(
|
|
42939
|
+
});
|
|
42940
|
+
setValues({
|
|
42941
|
+
...formsValue,
|
|
42719
42942
|
[groupFormId]: _newData
|
|
42720
|
-
})
|
|
42943
|
+
});
|
|
42721
42944
|
return;
|
|
42722
42945
|
}
|
|
42723
|
-
form
|
|
42724
|
-
onValuesChange(_val,
|
|
42725
|
-
|
|
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: (
|
|
42732
|
-
|
|
42733
|
-
|
|
42734
|
-
|
|
42735
|
-
|
|
42736
|
-
|
|
42737
|
-
|
|
42738
|
-
|
|
42739
|
-
|
|
42740
|
-
|
|
42741
|
-
|
|
42742
|
-
|
|
42743
|
-
|
|
42744
|
-
|
|
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
|
-
|
|
42977
|
+
initialValue: value,
|
|
42978
|
+
...props,
|
|
42752
42979
|
onChange: val => updateFormValues(repeatIndex, repeatValues, inputName, val, formsValue, name, form)
|
|
42753
|
-
})
|
|
42980
|
+
});
|
|
42754
42981
|
},
|
|
42755
|
-
group:
|
|
42756
|
-
|
|
42757
|
-
|
|
42758
|
-
|
|
42759
|
-
|
|
42760
|
-
|
|
42761
|
-
|
|
42762
|
-
}
|
|
42982
|
+
group: ({
|
|
42983
|
+
props,
|
|
42984
|
+
groupInputs
|
|
42985
|
+
}) => {
|
|
42986
|
+
return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, {
|
|
42987
|
+
groupInputs: groupInputs,
|
|
42988
|
+
...props
|
|
42989
|
+
});
|
|
42763
42990
|
},
|
|
42764
|
-
groupInputs: (
|
|
42765
|
-
|
|
42766
|
-
|
|
42767
|
-
|
|
42768
|
-
|
|
42769
|
-
|
|
42770
|
-
|
|
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
|
-
|
|
42999
|
+
inputMeta: inputMeta,
|
|
43000
|
+
...props
|
|
43001
|
+
});
|
|
42776
43002
|
},
|
|
42777
|
-
radioGroup:
|
|
42778
|
-
|
|
42779
|
-
|
|
42780
|
-
|
|
42781
|
-
|
|
42782
|
-
|
|
42783
|
-
|
|
42784
|
-
|
|
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:
|
|
42801
|
-
|
|
42802
|
-
|
|
42803
|
-
|
|
42804
|
-
|
|
42805
|
-
|
|
42806
|
-
|
|
42807
|
-
|
|
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 =
|
|
42825
|
-
|
|
42826
|
-
|
|
42827
|
-
|
|
42828
|
-
|
|
42829
|
-
|
|
42830
|
-
|
|
42831
|
-
|
|
42832
|
-
|
|
42833
|
-
|
|
42834
|
-
|
|
42835
|
-
|
|
42836
|
-
|
|
42837
|
-
|
|
42838
|
-
|
|
42839
|
-
|
|
42840
|
-
|
|
42841
|
-
|
|
42842
|
-
|
|
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
|
|
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 = (
|
|
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,
|
|
42874
|
-
initialValue: inputMeta
|
|
42875
|
-
|
|
42876
|
-
|
|
42877
|
-
|
|
42878
|
-
|
|
42879
|
-
|
|
42880
|
-
|
|
42881
|
-
|
|
42882
|
-
|
|
42883
|
-
|
|
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
|
-
|
|
42897
|
-
|
|
42898
|
-
|
|
42899
|
-
|
|
42900
|
-
|
|
42901
|
-
|
|
42902
|
-
|
|
42903
|
-
|
|
42904
|
-
|
|
42905
|
-
|
|
42906
|
-
|
|
42907
|
-
|
|
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
|
-
}), !!
|
|
42919
|
-
title: input
|
|
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: !
|
|
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: !
|
|
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,
|
|
43230
|
+
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
43007
43231
|
type: "link",
|
|
43008
|
-
disabled: !
|
|
43009
|
-
|
|
43010
|
-
|
|
43011
|
-
|
|
43012
|
-
|
|
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
|
-
}),
|
|
43256
|
+
}), input.meta?.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
43033
43257
|
className: "code",
|
|
43034
43258
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
43035
|
-
children:
|
|
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:
|
|
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:
|
|
43313
|
+
filled: inputData?.value?.length || 0
|
|
43090
43314
|
})
|
|
43091
43315
|
})
|
|
43092
|
-
}) : null,
|
|
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: !
|
|
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:
|
|
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,
|
|
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:
|
|
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:
|
|
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,
|
|
43182
|
-
|
|
43183
|
-
|
|
43184
|
-
|
|
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:
|
|
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[
|
|
43259
|
-
const inputData = getData(formId, input, value, commentValue,
|
|
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,
|
|
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 ?
|
|
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,
|
|
43285
|
-
|
|
43286
|
-
|
|
43287
|
-
|
|
43288
|
-
|
|
43289
|
-
|
|
43290
|
-
|
|
43291
|
-
|
|
43292
|
-
|
|
43293
|
-
|
|
43294
|
-
|
|
43295
|
-
|
|
43296
|
-
|
|
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
|
-
|
|
43308
|
-
|
|
43309
|
-
|
|
43310
|
-
|
|
43311
|
-
|
|
43312
|
-
|
|
43313
|
-
|
|
43314
|
-
|
|
43315
|
-
|
|
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 ?
|
|
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[
|
|
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(
|
|
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
|
-
})
|
|
43350
|
-
name: [field.name,
|
|
43351
|
-
fieldKey: [field.fieldKey,
|
|
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
|
-
},
|
|
43593
|
+
}, `${i}${ii}`) : null;
|
|
43366
43594
|
})
|
|
43367
43595
|
})]
|
|
43368
|
-
},
|
|
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:
|
|
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[
|
|
43407
|
-
const inputData = getData(formId, input, value, commentValue,
|
|
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,
|
|
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,
|
|
43432
|
-
required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
|
|
43433
|
-
|
|
43434
|
-
|
|
43435
|
-
|
|
43436
|
-
|
|
43437
|
-
|
|
43438
|
-
|
|
43439
|
-
|
|
43440
|
-
|
|
43441
|
-
|
|
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
|
-
|
|
43455
|
-
|
|
43456
|
-
|
|
43457
|
-
|
|
43458
|
-
|
|
43459
|
-
|
|
43460
|
-
|
|
43461
|
-
|
|
43462
|
-
|
|
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 ?
|
|
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[
|
|
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(
|
|
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
|
-
})
|
|
43495
|
-
name: [formId,
|
|
43496
|
-
fieldKey: [formId,
|
|
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
|
-
},
|
|
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;
|