datastake-daf 0.6.840 → 0.6.842
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 +809 -819
- package/dist/pages/index.js +25 -24
- package/package.json +1 -1
- package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/Locations/index.js +20 -19
- package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/index.js +5 -2
- package/src/@daf/pages/Events/Activities/columns.js +7 -3
- package/src/@daf/pages/Events/Incidents/columns.js +7 -3
- package/src/@daf/pages/Summary/Operator/components/TradeRelationships/helper.js +5 -2
- package/src/@daf/pages/Summary/Operator/components/TradeRelationships/index.js +6 -3
package/dist/components/index.js
CHANGED
|
@@ -4827,7 +4827,7 @@ const config$2 = {
|
|
|
4827
4827
|
AddDocument: config$3
|
|
4828
4828
|
};
|
|
4829
4829
|
|
|
4830
|
-
const _excluded$
|
|
4830
|
+
const _excluded$D = ["width", "height", "size", "name", "fill"];
|
|
4831
4831
|
const CustomIcon = _ref => {
|
|
4832
4832
|
let {
|
|
4833
4833
|
width = 14,
|
|
@@ -4836,7 +4836,7 @@ const CustomIcon = _ref => {
|
|
|
4836
4836
|
name = "",
|
|
4837
4837
|
fill = "none"
|
|
4838
4838
|
} = _ref,
|
|
4839
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4839
|
+
props = _objectWithoutProperties(_ref, _excluded$D);
|
|
4840
4840
|
const conf = config$2[name];
|
|
4841
4841
|
if (conf) {
|
|
4842
4842
|
return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -5125,7 +5125,7 @@ createCommonjsModule(function (module, exports) {
|
|
|
5125
5125
|
!function(e,n){module.exports=n();}(commonjsGlobal,(function(){return {name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],t=e%100;return "["+e+(n[(t-20)%10]||n[t]||n[0])+"]"}}}));
|
|
5126
5126
|
});
|
|
5127
5127
|
|
|
5128
|
-
const _excluded$
|
|
5128
|
+
const _excluded$C = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
|
|
5129
5129
|
dayjs__default["default"].extend(customParseFormat);
|
|
5130
5130
|
dayjs__default["default"].extend(utc);
|
|
5131
5131
|
dayjs__default["default"].extend(utc);
|
|
@@ -5501,7 +5501,7 @@ const filterCreateData = data => {
|
|
|
5501
5501
|
createdAt,
|
|
5502
5502
|
updatedAt
|
|
5503
5503
|
} = data,
|
|
5504
|
-
rest = _objectWithoutProperties(data, _excluded$
|
|
5504
|
+
rest = _objectWithoutProperties(data, _excluded$C);
|
|
5505
5505
|
const _meta = isObjectEmpty(meta) ? undefined : meta;
|
|
5506
5506
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
5507
5507
|
meta: _meta
|
|
@@ -6033,7 +6033,7 @@ SelectFilters.propTypes = {
|
|
|
6033
6033
|
apiUrl: PropTypes__default["default"].string
|
|
6034
6034
|
};
|
|
6035
6035
|
|
|
6036
|
-
const _excluded$
|
|
6036
|
+
const _excluded$B = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
|
|
6037
6037
|
function DAFTable(_ref) {
|
|
6038
6038
|
let {
|
|
6039
6039
|
columns = [],
|
|
@@ -6064,7 +6064,7 @@ function DAFTable(_ref) {
|
|
|
6064
6064
|
app,
|
|
6065
6065
|
doEmptyRows
|
|
6066
6066
|
} = _ref,
|
|
6067
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6067
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
6068
6068
|
const source = React.useMemo(() => {
|
|
6069
6069
|
if (data && Array.isArray(data)) {
|
|
6070
6070
|
return data;
|
|
@@ -6889,7 +6889,7 @@ function ComponentWithFocus(_ref) {
|
|
|
6889
6889
|
}
|
|
6890
6890
|
|
|
6891
6891
|
var _templateObject$h;
|
|
6892
|
-
const _excluded$
|
|
6892
|
+
const _excluded$A = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
|
|
6893
6893
|
function StickyTable(_ref) {
|
|
6894
6894
|
let {
|
|
6895
6895
|
size = "small",
|
|
@@ -6900,7 +6900,7 @@ function StickyTable(_ref) {
|
|
|
6900
6900
|
pagination = false,
|
|
6901
6901
|
doEmptyRows = true
|
|
6902
6902
|
} = _ref,
|
|
6903
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6903
|
+
props = _objectWithoutProperties(_ref, _excluded$A);
|
|
6904
6904
|
const data = React__default["default"].useMemo(() => {
|
|
6905
6905
|
if (!doEmptyRows) {
|
|
6906
6906
|
return dataSource;
|
|
@@ -7428,7 +7428,7 @@ const BTN_SIZE = {
|
|
|
7428
7428
|
LG: 'large'
|
|
7429
7429
|
};
|
|
7430
7430
|
|
|
7431
|
-
const _excluded$
|
|
7431
|
+
const _excluded$z = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
|
|
7432
7432
|
function DafButton(_ref) {
|
|
7433
7433
|
let {
|
|
7434
7434
|
content = '',
|
|
@@ -7442,7 +7442,7 @@ function DafButton(_ref) {
|
|
|
7442
7442
|
style = {},
|
|
7443
7443
|
className = ''
|
|
7444
7444
|
} = _ref,
|
|
7445
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
7445
|
+
restProps = _objectWithoutProperties(_ref, _excluded$z);
|
|
7446
7446
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
|
|
7447
7447
|
icon: icon,
|
|
7448
7448
|
type: type,
|
|
@@ -7561,12 +7561,12 @@ const Style$R = styled__default["default"].div`
|
|
|
7561
7561
|
}
|
|
7562
7562
|
`;
|
|
7563
7563
|
|
|
7564
|
-
const _excluded$
|
|
7564
|
+
const _excluded$y = ["children"];
|
|
7565
7565
|
const BorderedButton = _ref => {
|
|
7566
7566
|
let {
|
|
7567
7567
|
children
|
|
7568
7568
|
} = _ref,
|
|
7569
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7569
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
7570
7570
|
return /*#__PURE__*/jsxRuntime.jsx(Style$R, {
|
|
7571
7571
|
className: "d-btn-cont",
|
|
7572
7572
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -7706,12 +7706,12 @@ Badge.propTypes = {
|
|
|
7706
7706
|
props: PropTypes__default["default"].object
|
|
7707
7707
|
};
|
|
7708
7708
|
|
|
7709
|
-
const _excluded$
|
|
7709
|
+
const _excluded$x = ["icon"];
|
|
7710
7710
|
function GetIcon(_ref) {
|
|
7711
7711
|
let {
|
|
7712
7712
|
icon
|
|
7713
7713
|
} = _ref,
|
|
7714
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7714
|
+
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
7715
7715
|
let Icon = Icons__namespace.CloseOutlined;
|
|
7716
7716
|
if (Icons__namespace[icon]) {
|
|
7717
7717
|
Icon = Icons__namespace[icon];
|
|
@@ -8041,7 +8041,7 @@ const MultiSelectStyled = styled__default["default"](antd.Select)`
|
|
|
8041
8041
|
}
|
|
8042
8042
|
`;
|
|
8043
8043
|
|
|
8044
|
-
const _excluded$
|
|
8044
|
+
const _excluded$w = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
|
|
8045
8045
|
const {
|
|
8046
8046
|
useToken: useToken$p
|
|
8047
8047
|
} = antd.theme;
|
|
@@ -8134,7 +8134,7 @@ function Multiselect(_ref) {
|
|
|
8134
8134
|
isSingle = false,
|
|
8135
8135
|
selectionType = SELECTION_TYPES.DEFAULT
|
|
8136
8136
|
} = _ref,
|
|
8137
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
8137
|
+
restProps = _objectWithoutProperties(_ref, _excluded$w);
|
|
8138
8138
|
const {
|
|
8139
8139
|
token
|
|
8140
8140
|
} = useToken$p();
|
|
@@ -8854,7 +8854,7 @@ DAFHeader.propTypes = {
|
|
|
8854
8854
|
filtersConfig: PropTypes__default["default"].any
|
|
8855
8855
|
};
|
|
8856
8856
|
|
|
8857
|
-
const _excluded$
|
|
8857
|
+
const _excluded$v = ["tabs", "onChange", "value", "className"];
|
|
8858
8858
|
function TabsHeader(_ref) {
|
|
8859
8859
|
let {
|
|
8860
8860
|
tabs = [],
|
|
@@ -8862,7 +8862,7 @@ function TabsHeader(_ref) {
|
|
|
8862
8862
|
value = '',
|
|
8863
8863
|
className = 'mt-2'
|
|
8864
8864
|
} = _ref,
|
|
8865
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8865
|
+
rest = _objectWithoutProperties(_ref, _excluded$v);
|
|
8866
8866
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8867
8867
|
className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
|
|
8868
8868
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
|
|
@@ -8959,7 +8959,7 @@ DrawerHeader.propTypes = {
|
|
|
8959
8959
|
tabsConfig: PropTypes__default["default"].any
|
|
8960
8960
|
};
|
|
8961
8961
|
|
|
8962
|
-
const _excluded$
|
|
8962
|
+
const _excluded$u = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
|
|
8963
8963
|
const useFooter = _ref => {
|
|
8964
8964
|
let {
|
|
8965
8965
|
leftContent,
|
|
@@ -8994,7 +8994,7 @@ const useFooter = _ref => {
|
|
|
8994
8994
|
style = {},
|
|
8995
8995
|
className = ""
|
|
8996
8996
|
} = button,
|
|
8997
|
-
restProps = _objectWithoutProperties(button, _excluded$
|
|
8997
|
+
restProps = _objectWithoutProperties(button, _excluded$u);
|
|
8998
8998
|
return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
|
|
8999
8999
|
content: label,
|
|
9000
9000
|
type: type,
|
|
@@ -11875,7 +11875,7 @@ Widget.propTypes = {
|
|
|
11875
11875
|
};
|
|
11876
11876
|
Widget.displayName = 'Widget';
|
|
11877
11877
|
|
|
11878
|
-
const _excluded$
|
|
11878
|
+
const _excluded$t = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
|
|
11879
11879
|
function ImageWidget(_ref) {
|
|
11880
11880
|
let {
|
|
11881
11881
|
loading = false,
|
|
@@ -11886,7 +11886,7 @@ function ImageWidget(_ref) {
|
|
|
11886
11886
|
noDescriptionText,
|
|
11887
11887
|
isPdf = false
|
|
11888
11888
|
} = _ref,
|
|
11889
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11889
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
11890
11890
|
const expandable = isPdf ? false : props.expandable;
|
|
11891
11891
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
11892
11892
|
loading: loading,
|
|
@@ -11946,7 +11946,7 @@ function ImageWidget(_ref) {
|
|
|
11946
11946
|
ImageWidget.displayName = 'ImageWidget';
|
|
11947
11947
|
|
|
11948
11948
|
var _templateObject$e;
|
|
11949
|
-
const _excluded$
|
|
11949
|
+
const _excluded$s = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
|
|
11950
11950
|
function FlowWidget(_ref) {
|
|
11951
11951
|
let {
|
|
11952
11952
|
title,
|
|
@@ -11958,7 +11958,7 @@ function FlowWidget(_ref) {
|
|
|
11958
11958
|
className,
|
|
11959
11959
|
direction = "horizontal"
|
|
11960
11960
|
} = _ref,
|
|
11961
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11961
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
11962
11962
|
const [activeTab, setActiveTab] = React.useState();
|
|
11963
11963
|
React.useEffect(() => {
|
|
11964
11964
|
if (defaultActiveTab) {
|
|
@@ -15689,7 +15689,7 @@ Map$3.propTypes = {
|
|
|
15689
15689
|
link: PropTypes__default["default"].any
|
|
15690
15690
|
};
|
|
15691
15691
|
|
|
15692
|
-
const _excluded$
|
|
15692
|
+
const _excluded$r = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
|
|
15693
15693
|
function InExpandableWidgetMap(_ref) {
|
|
15694
15694
|
let {
|
|
15695
15695
|
isExpanded,
|
|
@@ -15703,7 +15703,7 @@ function InExpandableWidgetMap(_ref) {
|
|
|
15703
15703
|
height,
|
|
15704
15704
|
widgetConfig
|
|
15705
15705
|
} = _ref,
|
|
15706
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15706
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
15707
15707
|
const [mapKey, setMapKey] = React.useState(0);
|
|
15708
15708
|
const [isMapReady, setIsMapReady] = React.useState(false);
|
|
15709
15709
|
React.useEffect(() => {
|
|
@@ -17903,14 +17903,14 @@ const MapConfig = ({
|
|
|
17903
17903
|
});
|
|
17904
17904
|
};
|
|
17905
17905
|
|
|
17906
|
-
const _excluded$
|
|
17906
|
+
const _excluded$q = ["config", "title", "loading"];
|
|
17907
17907
|
const Details = _ref => {
|
|
17908
17908
|
let {
|
|
17909
17909
|
config = [],
|
|
17910
17910
|
title,
|
|
17911
17911
|
loading = false
|
|
17912
17912
|
} = _ref,
|
|
17913
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17913
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
17914
17914
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
17915
17915
|
className: "with-border-header h-w-btn-header card",
|
|
17916
17916
|
loading: loading,
|
|
@@ -17926,14 +17926,14 @@ const Details = _ref => {
|
|
|
17926
17926
|
}));
|
|
17927
17927
|
};
|
|
17928
17928
|
|
|
17929
|
-
const _excluded$
|
|
17929
|
+
const _excluded$p = ["config", "title", "loading"];
|
|
17930
17930
|
const KeyIndicatorsDetails = _ref => {
|
|
17931
17931
|
let {
|
|
17932
17932
|
config,
|
|
17933
17933
|
title,
|
|
17934
17934
|
loading = false
|
|
17935
17935
|
} = _ref,
|
|
17936
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17936
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
17937
17937
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
17938
17938
|
className: "with-border-header h-w-btn-header",
|
|
17939
17939
|
title: title,
|
|
@@ -17963,7 +17963,7 @@ const Style$G = styled__default["default"].div`
|
|
|
17963
17963
|
}
|
|
17964
17964
|
`;
|
|
17965
17965
|
|
|
17966
|
-
const _excluded$
|
|
17966
|
+
const _excluded$o = ["children", "config", "detailsTitle", "firstColumnWidth"];
|
|
17967
17967
|
const DetailsSection = _ref => {
|
|
17968
17968
|
let {
|
|
17969
17969
|
children,
|
|
@@ -17971,7 +17971,7 @@ const DetailsSection = _ref => {
|
|
|
17971
17971
|
detailsTitle,
|
|
17972
17972
|
firstColumnWidth = "250px"
|
|
17973
17973
|
} = _ref,
|
|
17974
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17974
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
17975
17975
|
return /*#__PURE__*/jsxRuntime.jsx(Style$G, {
|
|
17976
17976
|
firstColumnWidth: firstColumnWidth,
|
|
17977
17977
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -18147,14 +18147,14 @@ const getGoalConfig = () => {
|
|
|
18147
18147
|
};
|
|
18148
18148
|
|
|
18149
18149
|
var _templateObject$c;
|
|
18150
|
-
const _excluded$
|
|
18150
|
+
const _excluded$n = ["title", "activeSdgGoals", "t"];
|
|
18151
18151
|
function SDGWidget(_ref) {
|
|
18152
18152
|
let {
|
|
18153
18153
|
title = "Sustainable Development Goals",
|
|
18154
18154
|
activeSdgGoals = [],
|
|
18155
18155
|
t = key => key
|
|
18156
18156
|
} = _ref,
|
|
18157
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
18157
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
18158
18158
|
const sdgConfig = getGoalConfig();
|
|
18159
18159
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
18160
18160
|
title: title,
|
|
@@ -18452,7 +18452,7 @@ function SdgList({
|
|
|
18452
18452
|
});
|
|
18453
18453
|
}
|
|
18454
18454
|
|
|
18455
|
-
const _excluded$
|
|
18455
|
+
const _excluded$m = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
|
|
18456
18456
|
const {
|
|
18457
18457
|
Meta
|
|
18458
18458
|
} = antd.Card;
|
|
@@ -18472,7 +18472,7 @@ function ProjectWidget(_ref) {
|
|
|
18472
18472
|
hideSDGList = false,
|
|
18473
18473
|
t = x => x
|
|
18474
18474
|
} = _ref,
|
|
18475
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
18475
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
18476
18476
|
const [isHovered, setIsHovered] = React__default["default"].useState(false);
|
|
18477
18477
|
const {
|
|
18478
18478
|
token
|
|
@@ -18744,13 +18744,13 @@ const WidgetCard = _ref => {
|
|
|
18744
18744
|
});
|
|
18745
18745
|
};
|
|
18746
18746
|
|
|
18747
|
-
const _excluded$
|
|
18747
|
+
const _excluded$l = ["title", "children"];
|
|
18748
18748
|
const CarouselWidget = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
18749
18749
|
let {
|
|
18750
18750
|
title,
|
|
18751
18751
|
children
|
|
18752
18752
|
} = _ref,
|
|
18753
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18753
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
18754
18754
|
/**
|
|
18755
18755
|
* Handles carousel slide change events
|
|
18756
18756
|
* @param {number} currentSlide - The index of the current slide after change
|
|
@@ -18914,7 +18914,7 @@ const EmptyStateContainer = styled__default["default"].div`
|
|
|
18914
18914
|
}
|
|
18915
18915
|
`;
|
|
18916
18916
|
|
|
18917
|
-
const _excluded$
|
|
18917
|
+
const _excluded$k = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
|
|
18918
18918
|
function ImageCarousel(_ref) {
|
|
18919
18919
|
let {
|
|
18920
18920
|
title,
|
|
@@ -18929,7 +18929,7 @@ function ImageCarousel(_ref) {
|
|
|
18929
18929
|
emptyLogo = antd.Empty.PRESENTED_IMAGE_SIMPLE,
|
|
18930
18930
|
emptyText = "No Image"
|
|
18931
18931
|
} = _ref,
|
|
18932
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18932
|
+
rest = _objectWithoutProperties(_ref, _excluded$k);
|
|
18933
18933
|
const [previewVisible, setPreviewVisible] = React.useState(false);
|
|
18934
18934
|
const [current, setCurrent] = React.useState(0);
|
|
18935
18935
|
const carouselRef = React.useRef(null);
|
|
@@ -19298,7 +19298,7 @@ const getVegetationConfig = () => {
|
|
|
19298
19298
|
};
|
|
19299
19299
|
|
|
19300
19300
|
var _templateObject$a, _templateObject2$3;
|
|
19301
|
-
const _excluded$
|
|
19301
|
+
const _excluded$j = ["title", "activeVegetationConditions", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "growthObservations", "t"];
|
|
19302
19302
|
function VegetationWidget(_ref) {
|
|
19303
19303
|
let {
|
|
19304
19304
|
title = "Vegetation Health",
|
|
@@ -19310,7 +19310,7 @@ function VegetationWidget(_ref) {
|
|
|
19310
19310
|
growthObservations = [],
|
|
19311
19311
|
t = key => key
|
|
19312
19312
|
} = _ref,
|
|
19313
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19313
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
19314
19314
|
let vegetationConfig = getVegetationConfig();
|
|
19315
19315
|
const allVegetationKeys = vegetationConfig.map(item => item.key);
|
|
19316
19316
|
if (filterKeys && Array.isArray(filterKeys)) {
|
|
@@ -19426,7 +19426,7 @@ const getFaunaConfig = () => {
|
|
|
19426
19426
|
};
|
|
19427
19427
|
|
|
19428
19428
|
var _templateObject$9, _templateObject2$2;
|
|
19429
|
-
const _excluded$
|
|
19429
|
+
const _excluded$i = ["title", "faunaPresent", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
|
|
19430
19430
|
function FaunaWidget(_ref) {
|
|
19431
19431
|
let {
|
|
19432
19432
|
title = "Observed Fauna",
|
|
@@ -19437,7 +19437,7 @@ function FaunaWidget(_ref) {
|
|
|
19437
19437
|
itemHeight = 100,
|
|
19438
19438
|
t = key => key
|
|
19439
19439
|
} = _ref,
|
|
19440
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19440
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
19441
19441
|
let faunaConfig = getFaunaConfig();
|
|
19442
19442
|
|
|
19443
19443
|
// Filter to show only specific keys if filterKeys is provided
|
|
@@ -19502,7 +19502,7 @@ const getInvasiveSpeciesConfig = () => {
|
|
|
19502
19502
|
};
|
|
19503
19503
|
|
|
19504
19504
|
var _templateObject$8, _templateObject2$1;
|
|
19505
|
-
const _excluded$
|
|
19505
|
+
const _excluded$h = ["title", "invasiveSpecies", "hasInvasiveSpecies", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
|
|
19506
19506
|
function InvasiveSpeciesWidget(_ref) {
|
|
19507
19507
|
let {
|
|
19508
19508
|
title = "Invasive Species",
|
|
@@ -19514,7 +19514,7 @@ function InvasiveSpeciesWidget(_ref) {
|
|
|
19514
19514
|
itemHeight = 100,
|
|
19515
19515
|
t = key => key
|
|
19516
19516
|
} = _ref,
|
|
19517
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19517
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
19518
19518
|
let invasiveSpeciesConfig = getInvasiveSpeciesConfig();
|
|
19519
19519
|
|
|
19520
19520
|
// Filter to show only specific keys if filterKeys is provided
|
|
@@ -24937,7 +24937,7 @@ const RepeatableModals = ({
|
|
|
24937
24937
|
}) : null;
|
|
24938
24938
|
};
|
|
24939
24939
|
|
|
24940
|
-
const _excluded$
|
|
24940
|
+
const _excluded$g = ["viewGroup"],
|
|
24941
24941
|
_excluded2$1 = ["label", "icon", "position"];
|
|
24942
24942
|
const Content$1 = _ref => {
|
|
24943
24943
|
let {
|
|
@@ -25009,7 +25009,7 @@ const Content$1 = _ref => {
|
|
|
25009
25009
|
if (groups[gKey].viewGroup === key) {
|
|
25010
25010
|
// eslint-disable-next-line no-unused-vars
|
|
25011
25011
|
const _groups$gKey = groups[gKey],
|
|
25012
|
-
gCfg = _objectWithoutProperties(_groups$gKey, _excluded$
|
|
25012
|
+
gCfg = _objectWithoutProperties(_groups$gKey, _excluded$g);
|
|
25013
25013
|
items[gKey] = gCfg;
|
|
25014
25014
|
}
|
|
25015
25015
|
return items;
|
|
@@ -25289,7 +25289,7 @@ const Content$1 = _ref => {
|
|
|
25289
25289
|
});
|
|
25290
25290
|
};
|
|
25291
25291
|
|
|
25292
|
-
const _excluded$
|
|
25292
|
+
const _excluded$f = ["t", "open", "title", "children", "onClose", "onSuccess", "cancelBtnText", "saveBtnText", "className", "loading", "disabled", "withModalFormWrapper"];
|
|
25293
25293
|
function Modal(_ref) {
|
|
25294
25294
|
let {
|
|
25295
25295
|
t = text => text,
|
|
@@ -25305,7 +25305,7 @@ function Modal(_ref) {
|
|
|
25305
25305
|
disabled = false,
|
|
25306
25306
|
withModalFormWrapper = true
|
|
25307
25307
|
} = _ref,
|
|
25308
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
25308
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
25309
25309
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Modal, _objectSpread2(_objectSpread2({
|
|
25310
25310
|
width: 650,
|
|
25311
25311
|
footer: null,
|
|
@@ -39723,7 +39723,7 @@ function AjaxSelect(props) {
|
|
|
39723
39723
|
}, props));
|
|
39724
39724
|
}
|
|
39725
39725
|
|
|
39726
|
-
|
|
39726
|
+
/* eslint-disable no-case-declarations */
|
|
39727
39727
|
const propHasValue = val => {
|
|
39728
39728
|
if (Array.isArray(val)) {
|
|
39729
39729
|
return val.length > 0 ? true : false;
|
|
@@ -39741,14 +39741,14 @@ const checkCondition = (condition, repeatValues, formsValue) => {
|
|
|
39741
39741
|
return isShown;
|
|
39742
39742
|
};
|
|
39743
39743
|
function showHideInput(input, formsValue, repeatIndex, repeatValues, setValues, ref) {
|
|
39744
|
-
|
|
39745
|
-
if ((input === null || input === void 0 || (_input$meta = input.meta) === null || _input$meta === void 0 ? void 0 : _input$meta.hidden) === true) {
|
|
39746
|
-
var _input$meta2;
|
|
39744
|
+
if (input?.meta?.hidden === true) {
|
|
39747
39745
|
// Set default value for hidden fields
|
|
39748
|
-
if (
|
|
39746
|
+
if (input?.meta?.defaultValue !== undefined && !propHasValue(formsValue[ref])) {
|
|
39749
39747
|
formsValue[ref] = input.meta.defaultValue;
|
|
39750
39748
|
if (setValues && typeof setValues === 'function') {
|
|
39751
|
-
setValues(
|
|
39749
|
+
setValues({
|
|
39750
|
+
...formsValue
|
|
39751
|
+
});
|
|
39752
39752
|
}
|
|
39753
39753
|
}
|
|
39754
39754
|
return false;
|
|
@@ -39807,35 +39807,35 @@ function getInputHeadLines(type, i, input, values) {
|
|
|
39807
39807
|
switch (type) {
|
|
39808
39808
|
case "h2":
|
|
39809
39809
|
return /*#__PURE__*/jsxRuntime.jsx("h2", {
|
|
39810
|
-
className:
|
|
39810
|
+
className: `title-semibold-2 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
|
|
39811
39811
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
39812
39812
|
children: getInputLabel(input, values)
|
|
39813
39813
|
})
|
|
39814
39814
|
});
|
|
39815
39815
|
case "h3":
|
|
39816
39816
|
return /*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
39817
|
-
className:
|
|
39817
|
+
className: `title-semibold-3 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
|
|
39818
39818
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
39819
39819
|
children: getInputLabel(input, values)
|
|
39820
39820
|
})
|
|
39821
39821
|
});
|
|
39822
39822
|
case "h4":
|
|
39823
39823
|
return /*#__PURE__*/jsxRuntime.jsx("h4", {
|
|
39824
|
-
className:
|
|
39824
|
+
className: `title-semibold-4 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
|
|
39825
39825
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
39826
39826
|
children: getInputLabel(input, values)
|
|
39827
39827
|
})
|
|
39828
39828
|
});
|
|
39829
39829
|
case "h5":
|
|
39830
39830
|
return /*#__PURE__*/jsxRuntime.jsx("h5", {
|
|
39831
|
-
className:
|
|
39831
|
+
className: `title-semibold-5 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
|
|
39832
39832
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
39833
39833
|
children: getInputLabel(input, values)
|
|
39834
39834
|
})
|
|
39835
39835
|
});
|
|
39836
39836
|
case "h6":
|
|
39837
39837
|
return /*#__PURE__*/jsxRuntime.jsx("h6", {
|
|
39838
|
-
className:
|
|
39838
|
+
className: `title-semibold-6 ${input.marginBottom || ""} ${input.groupHeader || ""} ${i ? input.marginTop || "" : ""}`,
|
|
39839
39839
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
39840
39840
|
children: getInputLabel(input, values)
|
|
39841
39841
|
})
|
|
@@ -39844,9 +39844,7 @@ function getInputHeadLines(type, i, input, values) {
|
|
|
39844
39844
|
return null;
|
|
39845
39845
|
}
|
|
39846
39846
|
}
|
|
39847
|
-
function getInputLabel(input) {
|
|
39848
|
-
let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
39849
|
-
let asText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
39847
|
+
function getInputLabel(input, formsValue = {}, asText = false) {
|
|
39850
39848
|
if (typeof input.label === "object") {
|
|
39851
39849
|
const validations = Object.keys(input.label);
|
|
39852
39850
|
const key = validations.find(v => {
|
|
@@ -39904,8 +39902,7 @@ function getInputLabel(input) {
|
|
|
39904
39902
|
}) : ReactHtmlParser__default["default"](input.label);
|
|
39905
39903
|
}
|
|
39906
39904
|
}
|
|
39907
|
-
function getSelectOptions$1(option) {
|
|
39908
|
-
let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
39905
|
+
function getSelectOptions$1(option, formsValue = {}) {
|
|
39909
39906
|
if (typeof option.label === "object") {
|
|
39910
39907
|
const validations = Object.keys(option.label);
|
|
39911
39908
|
const key = validations.find(v => {
|
|
@@ -39929,9 +39926,7 @@ function getSectionLabel(labels, values) {
|
|
|
39929
39926
|
}
|
|
39930
39927
|
return labels;
|
|
39931
39928
|
}
|
|
39932
|
-
function getSubtitles(subtitles, position) {
|
|
39933
|
-
let formsValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
39934
|
-
let repeatValues = arguments.length > 4 ? arguments[4] : undefined;
|
|
39929
|
+
function getSubtitles(subtitles, position, formsValue = {}, repeatIndex, repeatValues) {
|
|
39935
39930
|
let subtitle = subtitles && subtitles[position];
|
|
39936
39931
|
if (subtitle && typeof subtitle === "object") {
|
|
39937
39932
|
let newSubtitle = subtitle.default || "";
|
|
@@ -39975,12 +39970,14 @@ function getSubtitles(subtitles, position) {
|
|
|
39975
39970
|
function getFormTitles(titles, key, position) {
|
|
39976
39971
|
let tilte = titles && titles[key];
|
|
39977
39972
|
return tilte ? /*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
39978
|
-
className:
|
|
39973
|
+
className: `title-semibold-3 mb0 ${position ? "mt-3" : ""}`,
|
|
39979
39974
|
children: tilte
|
|
39980
39975
|
}) : null;
|
|
39981
39976
|
}
|
|
39982
39977
|
const updateFormValues = (repeatIndex, repeatValues, inputName, value, formsValue, name, mainForm) => {
|
|
39983
|
-
formsValue = Object.assign(formsValue,
|
|
39978
|
+
formsValue = Object.assign(formsValue, {
|
|
39979
|
+
...mainForm.getFieldsValue(true)
|
|
39980
|
+
});
|
|
39984
39981
|
if (typeof repeatIndex === "number" && repeatValues) {
|
|
39985
39982
|
if (!repeatValues[inputName] || !___default["default"].isEqual(repeatValues[inputName], value)) {
|
|
39986
39983
|
repeatValues[inputName] = value;
|
|
@@ -40014,52 +40011,48 @@ const updateFormValues = (repeatIndex, repeatValues, inputName, value, formsValu
|
|
|
40014
40011
|
}
|
|
40015
40012
|
};
|
|
40016
40013
|
const inputTypeComponent = {
|
|
40017
|
-
text: (
|
|
40018
|
-
|
|
40019
|
-
|
|
40020
|
-
|
|
40021
|
-
|
|
40022
|
-
|
|
40023
|
-
|
|
40024
|
-
t
|
|
40025
|
-
} = _ref2;
|
|
40014
|
+
text: ({
|
|
40015
|
+
props,
|
|
40016
|
+
rules
|
|
40017
|
+
}, {
|
|
40018
|
+
inputMeta = {},
|
|
40019
|
+
t
|
|
40020
|
+
}) => {
|
|
40026
40021
|
const maxRule = rules.find(r => r.max);
|
|
40027
40022
|
const maxProps = {};
|
|
40028
40023
|
if (maxRule) {
|
|
40029
40024
|
maxProps.maxLength = maxRule.max;
|
|
40030
40025
|
}
|
|
40031
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Input,
|
|
40032
|
-
size: "medium"
|
|
40033
|
-
|
|
40026
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
|
|
40027
|
+
size: "medium",
|
|
40028
|
+
...maxProps,
|
|
40034
40029
|
allowClear: true,
|
|
40035
40030
|
autoComplete: "new-password",
|
|
40036
|
-
type: "text"
|
|
40037
|
-
|
|
40031
|
+
type: "text",
|
|
40032
|
+
...props,
|
|
40038
40033
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
40039
40034
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
|
|
40040
|
-
})
|
|
40035
|
+
});
|
|
40041
40036
|
},
|
|
40042
|
-
drawTerritory: (
|
|
40043
|
-
|
|
40044
|
-
|
|
40045
|
-
|
|
40046
|
-
|
|
40047
|
-
|
|
40048
|
-
|
|
40049
|
-
|
|
40050
|
-
|
|
40051
|
-
form
|
|
40052
|
-
} = _ref4;
|
|
40037
|
+
drawTerritory: ({
|
|
40038
|
+
formsValue,
|
|
40039
|
+
name,
|
|
40040
|
+
addressData,
|
|
40041
|
+
onValuesChange
|
|
40042
|
+
}, {
|
|
40043
|
+
setFormValues,
|
|
40044
|
+
form
|
|
40045
|
+
}) => {
|
|
40053
40046
|
let search = formsValue.country;
|
|
40054
40047
|
if (addressData && addressData.address && Object.keys(addressData.address).length > 0) {
|
|
40055
40048
|
if (addressData.address.country) {
|
|
40056
40049
|
search = addressData.address.country;
|
|
40057
40050
|
}
|
|
40058
40051
|
if (addressData.address.level1) {
|
|
40059
|
-
search =
|
|
40052
|
+
search = `${addressData.address.level1}, ${addressData.address.country}`;
|
|
40060
40053
|
}
|
|
40061
40054
|
if (addressData.address.level2) {
|
|
40062
|
-
search =
|
|
40055
|
+
search = `${addressData.address.level2}, ${addressData.address.level1}, ${addressData.address.country}`;
|
|
40063
40056
|
}
|
|
40064
40057
|
} else {
|
|
40065
40058
|
const country = countriesList.countries[formsValue.country] || {};
|
|
@@ -40067,10 +40060,10 @@ const inputTypeComponent = {
|
|
|
40067
40060
|
search = country.name;
|
|
40068
40061
|
}
|
|
40069
40062
|
if (formsValue.administrativeLevel1Name) {
|
|
40070
|
-
search =
|
|
40063
|
+
search = `${search} ${formsValue.administrativeLevel1Name}`;
|
|
40071
40064
|
}
|
|
40072
40065
|
if (formsValue.administrativeLevel2Name) {
|
|
40073
|
-
search =
|
|
40066
|
+
search = `${search} ${formsValue.administrativeLevel2Name}`;
|
|
40074
40067
|
}
|
|
40075
40068
|
}
|
|
40076
40069
|
console.log("search", {
|
|
@@ -40090,9 +40083,10 @@ const inputTypeComponent = {
|
|
|
40090
40083
|
const allFormValues = form && typeof form.getFieldsValue === 'function' ? form.getFieldsValue(true) : formsValue;
|
|
40091
40084
|
|
|
40092
40085
|
// Create the updated values
|
|
40093
|
-
const updatedValues =
|
|
40086
|
+
const updatedValues = {
|
|
40087
|
+
...allFormValues,
|
|
40094
40088
|
[name]: val
|
|
40095
|
-
}
|
|
40089
|
+
};
|
|
40096
40090
|
|
|
40097
40091
|
// Call onValuesChange with the change and all values
|
|
40098
40092
|
if (typeof onValuesChange === 'function') {
|
|
@@ -40107,44 +40101,39 @@ const inputTypeComponent = {
|
|
|
40107
40101
|
searchValue: search
|
|
40108
40102
|
});
|
|
40109
40103
|
},
|
|
40110
|
-
link: (
|
|
40111
|
-
|
|
40112
|
-
|
|
40113
|
-
|
|
40114
|
-
|
|
40115
|
-
|
|
40116
|
-
|
|
40117
|
-
t
|
|
40118
|
-
} = _ref6;
|
|
40104
|
+
link: ({
|
|
40105
|
+
props,
|
|
40106
|
+
rules
|
|
40107
|
+
}, {
|
|
40108
|
+
inputMeta = {},
|
|
40109
|
+
t
|
|
40110
|
+
}) => {
|
|
40119
40111
|
const maxRule = rules.find(r => r.max);
|
|
40120
40112
|
const maxProps = {};
|
|
40121
40113
|
if (maxRule) {
|
|
40122
40114
|
maxProps.maxLength = maxRule.max;
|
|
40123
40115
|
}
|
|
40124
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Input,
|
|
40125
|
-
size: "medium"
|
|
40126
|
-
|
|
40116
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
|
|
40117
|
+
size: "medium",
|
|
40118
|
+
...maxProps,
|
|
40127
40119
|
allowClear: true,
|
|
40128
40120
|
autoComplete: "new-password",
|
|
40129
|
-
type: "text"
|
|
40130
|
-
|
|
40121
|
+
type: "text",
|
|
40122
|
+
...props,
|
|
40131
40123
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
40132
40124
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
|
|
40133
|
-
})
|
|
40125
|
+
});
|
|
40134
40126
|
},
|
|
40135
|
-
number: (
|
|
40136
|
-
|
|
40137
|
-
|
|
40138
|
-
|
|
40139
|
-
|
|
40140
|
-
|
|
40141
|
-
|
|
40142
|
-
|
|
40143
|
-
inputMeta = {},
|
|
40144
|
-
t
|
|
40145
|
-
} = _ref8;
|
|
40127
|
+
number: ({
|
|
40128
|
+
props,
|
|
40129
|
+
rules,
|
|
40130
|
+
input
|
|
40131
|
+
}, {
|
|
40132
|
+
inputMeta = {},
|
|
40133
|
+
t
|
|
40134
|
+
}) => {
|
|
40146
40135
|
const maxRule = rules.find(r => r.max);
|
|
40147
|
-
const integerRule = !
|
|
40136
|
+
const integerRule = !input?.meta?.isDecimal;
|
|
40148
40137
|
const parser = value => {
|
|
40149
40138
|
if (!value) {
|
|
40150
40139
|
return "";
|
|
@@ -40155,53 +40144,50 @@ const inputTypeComponent = {
|
|
|
40155
40144
|
return value.replace(/\$\s?|(,*)/g, "");
|
|
40156
40145
|
};
|
|
40157
40146
|
if (maxRule) {
|
|
40158
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber,
|
|
40147
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
|
|
40159
40148
|
allowClear: true,
|
|
40160
|
-
autoComplete: "new-password"
|
|
40161
|
-
|
|
40149
|
+
autoComplete: "new-password",
|
|
40150
|
+
...props,
|
|
40162
40151
|
type: "number",
|
|
40163
40152
|
min: 0,
|
|
40164
40153
|
max: maxRule.max,
|
|
40165
40154
|
parser: parser
|
|
40166
|
-
})
|
|
40155
|
+
});
|
|
40167
40156
|
}
|
|
40168
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber,
|
|
40157
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
|
|
40169
40158
|
allowClear: true,
|
|
40170
|
-
autoComplete: "new-password"
|
|
40171
|
-
|
|
40159
|
+
autoComplete: "new-password",
|
|
40160
|
+
...props,
|
|
40172
40161
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
40173
40162
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type number"),
|
|
40174
40163
|
min: 0,
|
|
40175
40164
|
formatter: value => numberWithCommas$1(value),
|
|
40176
40165
|
parser: parser
|
|
40177
|
-
})
|
|
40166
|
+
});
|
|
40178
40167
|
},
|
|
40179
|
-
select: (
|
|
40180
|
-
|
|
40181
|
-
|
|
40182
|
-
|
|
40183
|
-
|
|
40184
|
-
|
|
40185
|
-
|
|
40186
|
-
|
|
40187
|
-
|
|
40188
|
-
|
|
40189
|
-
|
|
40190
|
-
|
|
40191
|
-
|
|
40192
|
-
|
|
40193
|
-
|
|
40194
|
-
|
|
40195
|
-
|
|
40196
|
-
|
|
40197
|
-
|
|
40198
|
-
|
|
40199
|
-
|
|
40200
|
-
|
|
40201
|
-
|
|
40202
|
-
t,
|
|
40203
|
-
changeInputMeta
|
|
40204
|
-
} = _ref10;
|
|
40168
|
+
select: ({
|
|
40169
|
+
value,
|
|
40170
|
+
options,
|
|
40171
|
+
optionGroup,
|
|
40172
|
+
props,
|
|
40173
|
+
formsValue,
|
|
40174
|
+
optionsFilter,
|
|
40175
|
+
filterCond,
|
|
40176
|
+
repeatValues,
|
|
40177
|
+
repeatIndex,
|
|
40178
|
+
name,
|
|
40179
|
+
inputName,
|
|
40180
|
+
address,
|
|
40181
|
+
addressData,
|
|
40182
|
+
input
|
|
40183
|
+
}, {
|
|
40184
|
+
forms,
|
|
40185
|
+
form,
|
|
40186
|
+
setAddress,
|
|
40187
|
+
inputMeta = {},
|
|
40188
|
+
t,
|
|
40189
|
+
changeInputMeta
|
|
40190
|
+
}) => {
|
|
40205
40191
|
let opts;
|
|
40206
40192
|
if (typeof options === "string") {
|
|
40207
40193
|
const [formName, key] = options.split(".");
|
|
@@ -40257,19 +40243,18 @@ const inputTypeComponent = {
|
|
|
40257
40243
|
}
|
|
40258
40244
|
opts = groupOptions;
|
|
40259
40245
|
}
|
|
40260
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Select,
|
|
40246
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
|
|
40261
40247
|
autoComplete: "new-password",
|
|
40262
40248
|
allowClear: true,
|
|
40263
40249
|
showSearch: true,
|
|
40264
|
-
defaultValue: input
|
|
40250
|
+
defaultValue: input?.meta?.defaultValue,
|
|
40265
40251
|
filterOption: filterSelectOptions,
|
|
40266
|
-
optionFilterProp: "children"
|
|
40267
|
-
|
|
40252
|
+
optionFilterProp: "children",
|
|
40253
|
+
...props,
|
|
40268
40254
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
40269
40255
|
placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp$1(props.placeholder, formsValue) || t("Select one option"),
|
|
40270
40256
|
onChange: (val, selectedValue) => {
|
|
40271
|
-
|
|
40272
|
-
if (typeof (input === null || input === void 0 || (_input$meta5 = input.meta) === null || _input$meta5 === void 0 ? void 0 : _input$meta5.onChange) === "string") {
|
|
40257
|
+
if (typeof input?.meta?.onChange === "string") {
|
|
40273
40258
|
const [value, otherKey, otherVal] = input.meta.onChange.split(".");
|
|
40274
40259
|
if (val === value) {
|
|
40275
40260
|
changeInputMeta({
|
|
@@ -40283,7 +40268,9 @@ const inputTypeComponent = {
|
|
|
40283
40268
|
}
|
|
40284
40269
|
if (address && selectedValue) {
|
|
40285
40270
|
dot__default["default"].str(address, selectedValue.children, addressData);
|
|
40286
|
-
setAddress(
|
|
40271
|
+
setAddress({
|
|
40272
|
+
...addressData
|
|
40273
|
+
});
|
|
40287
40274
|
}
|
|
40288
40275
|
if (props.onChange) {
|
|
40289
40276
|
props.onChange(val);
|
|
@@ -40295,35 +40282,33 @@ const inputTypeComponent = {
|
|
|
40295
40282
|
value: og.value,
|
|
40296
40283
|
disabled: og.disabled,
|
|
40297
40284
|
children: og.label
|
|
40298
|
-
},
|
|
40285
|
+
}, `${i}${j}`))
|
|
40299
40286
|
}, i) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
|
|
40300
40287
|
value: option.value,
|
|
40301
40288
|
disabled: option.disabled,
|
|
40302
40289
|
children: option.label
|
|
40303
40290
|
}, i))
|
|
40304
|
-
})
|
|
40291
|
+
});
|
|
40305
40292
|
},
|
|
40306
|
-
multiselect: (
|
|
40307
|
-
|
|
40308
|
-
|
|
40309
|
-
|
|
40310
|
-
|
|
40311
|
-
|
|
40312
|
-
|
|
40313
|
-
|
|
40314
|
-
|
|
40315
|
-
|
|
40316
|
-
|
|
40317
|
-
|
|
40318
|
-
|
|
40319
|
-
|
|
40320
|
-
|
|
40321
|
-
|
|
40322
|
-
|
|
40323
|
-
|
|
40324
|
-
|
|
40325
|
-
t
|
|
40326
|
-
} = _ref12;
|
|
40293
|
+
multiselect: ({
|
|
40294
|
+
value,
|
|
40295
|
+
options,
|
|
40296
|
+
optionGroup,
|
|
40297
|
+
optionsFilter,
|
|
40298
|
+
filterCond,
|
|
40299
|
+
props,
|
|
40300
|
+
formsValue,
|
|
40301
|
+
repeatValues,
|
|
40302
|
+
repeatIndex,
|
|
40303
|
+
inputName,
|
|
40304
|
+
name,
|
|
40305
|
+
tags
|
|
40306
|
+
}, {
|
|
40307
|
+
forms,
|
|
40308
|
+
form,
|
|
40309
|
+
inputMeta = {},
|
|
40310
|
+
t
|
|
40311
|
+
}) => {
|
|
40327
40312
|
let opts;
|
|
40328
40313
|
if (typeof options === "string") {
|
|
40329
40314
|
const [formName, key] = options.split(".");
|
|
@@ -40380,16 +40365,16 @@ const inputTypeComponent = {
|
|
|
40380
40365
|
}
|
|
40381
40366
|
opts = groupOptions;
|
|
40382
40367
|
}
|
|
40383
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Select,
|
|
40368
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
|
|
40384
40369
|
allowClear: true,
|
|
40385
40370
|
autoComplete: "new-password",
|
|
40386
40371
|
mode: tags ? "tags" : "multiple",
|
|
40387
|
-
optionFilterProp: "children"
|
|
40388
|
-
|
|
40389
|
-
|
|
40390
|
-
|
|
40391
|
-
filterOption: filterSelectOptions
|
|
40392
|
-
|
|
40372
|
+
optionFilterProp: "children",
|
|
40373
|
+
...(tags ? {
|
|
40374
|
+
tokenSeparators: [",", "\n", "\t"]
|
|
40375
|
+
} : {}),
|
|
40376
|
+
filterOption: filterSelectOptions,
|
|
40377
|
+
...props,
|
|
40393
40378
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
40394
40379
|
placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp$1(props.placeholder, formsValue) || t("Select all relevant options"),
|
|
40395
40380
|
children: (opts || []).map((option, i) => option.items ? /*#__PURE__*/jsxRuntime.jsx(antd.Select.OptGroup, {
|
|
@@ -40398,42 +40383,42 @@ const inputTypeComponent = {
|
|
|
40398
40383
|
value: og.value,
|
|
40399
40384
|
disabled: og.disabled,
|
|
40400
40385
|
children: og.label
|
|
40401
|
-
},
|
|
40386
|
+
}, `${i}${j}`))
|
|
40402
40387
|
}, i) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
|
|
40403
40388
|
value: option.value,
|
|
40404
40389
|
disabled: option.disabled,
|
|
40405
40390
|
children: option.label
|
|
40406
40391
|
}, i))
|
|
40407
|
-
})
|
|
40392
|
+
});
|
|
40408
40393
|
},
|
|
40409
|
-
date: (
|
|
40410
|
-
|
|
40411
|
-
|
|
40412
|
-
|
|
40413
|
-
|
|
40414
|
-
|
|
40415
|
-
|
|
40416
|
-
|
|
40417
|
-
|
|
40418
|
-
|
|
40419
|
-
|
|
40420
|
-
|
|
40421
|
-
|
|
40422
|
-
setFormValues
|
|
40423
|
-
} = _ref14;
|
|
40394
|
+
date: ({
|
|
40395
|
+
props,
|
|
40396
|
+
rules,
|
|
40397
|
+
repeatValues,
|
|
40398
|
+
formsValue,
|
|
40399
|
+
name
|
|
40400
|
+
}, {
|
|
40401
|
+
inputMeta,
|
|
40402
|
+
t,
|
|
40403
|
+
groupFormId,
|
|
40404
|
+
form,
|
|
40405
|
+
setFormValues
|
|
40406
|
+
}) => {
|
|
40424
40407
|
const lng = localStorage.getItem("datastakeLng") || "en";
|
|
40425
40408
|
const maxRule = rules.find(r => r.max);
|
|
40426
40409
|
const handleDateChange = date => {
|
|
40427
40410
|
if (date) {
|
|
40428
40411
|
const localDate = dayjs__default["default"].utc(date);
|
|
40429
40412
|
if (groupFormId) {
|
|
40430
|
-
const _new =
|
|
40413
|
+
const _new = {
|
|
40414
|
+
...(formsValue[groupFormId] || {}),
|
|
40431
40415
|
[name]: localDate
|
|
40432
|
-
}
|
|
40416
|
+
};
|
|
40433
40417
|
form.setFieldValue(groupFormId, _new);
|
|
40434
|
-
setFormValues(
|
|
40418
|
+
setFormValues({
|
|
40419
|
+
...formsValue,
|
|
40435
40420
|
[groupFormId]: _new
|
|
40436
|
-
})
|
|
40421
|
+
});
|
|
40437
40422
|
} else {
|
|
40438
40423
|
form.setFieldValue(name, localDate);
|
|
40439
40424
|
}
|
|
@@ -40445,10 +40430,10 @@ const inputTypeComponent = {
|
|
|
40445
40430
|
checkForMax = checkCondition(maxRule.condition, repeatValues, formsValue);
|
|
40446
40431
|
}
|
|
40447
40432
|
if (checkForMax) {
|
|
40448
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker,
|
|
40433
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
|
|
40449
40434
|
allowClear: true,
|
|
40450
|
-
autoComplete: "new-password"
|
|
40451
|
-
|
|
40435
|
+
autoComplete: "new-password",
|
|
40436
|
+
...props,
|
|
40452
40437
|
onChange: handleDateChange,
|
|
40453
40438
|
format: DATE_FORMATS,
|
|
40454
40439
|
locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"],
|
|
@@ -40457,33 +40442,31 @@ const inputTypeComponent = {
|
|
|
40457
40442
|
disabledDate: current => {
|
|
40458
40443
|
return current && current >= dayjs__default["default"]().endOf("day");
|
|
40459
40444
|
}
|
|
40460
|
-
})
|
|
40445
|
+
});
|
|
40461
40446
|
}
|
|
40462
40447
|
}
|
|
40463
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker,
|
|
40448
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
|
|
40464
40449
|
allowClear: true,
|
|
40465
|
-
autoComplete: "new-password"
|
|
40466
|
-
|
|
40450
|
+
autoComplete: "new-password",
|
|
40451
|
+
...props,
|
|
40467
40452
|
onChange: handleDateChange,
|
|
40468
40453
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Select date"),
|
|
40469
40454
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
40470
40455
|
format: DATE_FORMATS,
|
|
40471
40456
|
locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"]
|
|
40472
|
-
})
|
|
40457
|
+
});
|
|
40473
40458
|
},
|
|
40474
|
-
comment: (
|
|
40475
|
-
|
|
40476
|
-
|
|
40477
|
-
|
|
40478
|
-
|
|
40479
|
-
|
|
40480
|
-
|
|
40481
|
-
|
|
40482
|
-
|
|
40483
|
-
|
|
40484
|
-
|
|
40485
|
-
} = _ref16;
|
|
40486
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
|
|
40459
|
+
comment: ({
|
|
40460
|
+
props: {
|
|
40461
|
+
placeholder,
|
|
40462
|
+
...props
|
|
40463
|
+
},
|
|
40464
|
+
commentHint
|
|
40465
|
+
}, {
|
|
40466
|
+
onChange,
|
|
40467
|
+
value
|
|
40468
|
+
}) => {
|
|
40469
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
|
|
40487
40470
|
allowClear: true,
|
|
40488
40471
|
value: value,
|
|
40489
40472
|
onChange: e => onChange(e.target.value),
|
|
@@ -40493,60 +40476,56 @@ const inputTypeComponent = {
|
|
|
40493
40476
|
autoSize: {
|
|
40494
40477
|
minRows: 5,
|
|
40495
40478
|
maxRows: 5
|
|
40496
|
-
}
|
|
40497
|
-
|
|
40479
|
+
},
|
|
40480
|
+
...props,
|
|
40498
40481
|
disabled: false
|
|
40499
|
-
})
|
|
40482
|
+
});
|
|
40500
40483
|
},
|
|
40501
|
-
textarea: (
|
|
40502
|
-
|
|
40503
|
-
|
|
40504
|
-
|
|
40505
|
-
|
|
40506
|
-
|
|
40507
|
-
|
|
40508
|
-
t
|
|
40509
|
-
} = _ref18;
|
|
40484
|
+
textarea: ({
|
|
40485
|
+
props,
|
|
40486
|
+
rules
|
|
40487
|
+
}, {
|
|
40488
|
+
inputMeta,
|
|
40489
|
+
t
|
|
40490
|
+
}) => {
|
|
40510
40491
|
const maxRule = rules.find(r => r.max);
|
|
40511
40492
|
let maxLength = MAX_TEXT_AREA_LENGTH;
|
|
40512
40493
|
if (maxRule) {
|
|
40513
40494
|
maxLength = maxRule.max;
|
|
40514
40495
|
}
|
|
40515
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea,
|
|
40496
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
|
|
40516
40497
|
allowClear: true,
|
|
40517
40498
|
autoComplete: "new-password",
|
|
40518
40499
|
maxLength: maxLength,
|
|
40519
40500
|
autoSize: {
|
|
40520
40501
|
minRows: 5,
|
|
40521
40502
|
maxRows: 5
|
|
40522
|
-
}
|
|
40523
|
-
|
|
40503
|
+
},
|
|
40504
|
+
...props,
|
|
40524
40505
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
40525
40506
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
|
|
40526
|
-
})
|
|
40507
|
+
});
|
|
40527
40508
|
},
|
|
40528
|
-
phoneNumber: (
|
|
40529
|
-
|
|
40530
|
-
|
|
40531
|
-
|
|
40532
|
-
|
|
40533
|
-
|
|
40534
|
-
|
|
40535
|
-
|
|
40536
|
-
|
|
40537
|
-
|
|
40538
|
-
|
|
40539
|
-
|
|
40540
|
-
|
|
40541
|
-
} = _ref20;
|
|
40542
|
-
return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, _objectSpread2(_objectSpread2({
|
|
40509
|
+
phoneNumber: ({
|
|
40510
|
+
name,
|
|
40511
|
+
inputName,
|
|
40512
|
+
props,
|
|
40513
|
+
value,
|
|
40514
|
+
repeatIndex,
|
|
40515
|
+
repeatValues,
|
|
40516
|
+
formsValue
|
|
40517
|
+
}, {
|
|
40518
|
+
setFormValues,
|
|
40519
|
+
t
|
|
40520
|
+
}) => {
|
|
40521
|
+
return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, {
|
|
40543
40522
|
t: t,
|
|
40544
40523
|
doChangeErrors: false,
|
|
40545
40524
|
allowClear: true,
|
|
40546
|
-
country: formsValue
|
|
40525
|
+
country: formsValue?.country,
|
|
40547
40526
|
formsValue: formsValue,
|
|
40548
|
-
initialValue: value
|
|
40549
|
-
|
|
40527
|
+
initialValue: value,
|
|
40528
|
+
...props,
|
|
40550
40529
|
onChange: val => {
|
|
40551
40530
|
if (repeatValues) {
|
|
40552
40531
|
const inputValues = Array.isArray(formsValue[name]) ? formsValue[name] || [] : [];
|
|
@@ -40562,25 +40541,24 @@ const inputTypeComponent = {
|
|
|
40562
40541
|
setFormValues(formsValue);
|
|
40563
40542
|
}
|
|
40564
40543
|
}
|
|
40565
|
-
})
|
|
40544
|
+
});
|
|
40566
40545
|
},
|
|
40567
|
-
switch: (
|
|
40568
|
-
|
|
40569
|
-
|
|
40570
|
-
|
|
40571
|
-
|
|
40572
|
-
|
|
40573
|
-
|
|
40574
|
-
|
|
40575
|
-
|
|
40576
|
-
|
|
40577
|
-
|
|
40578
|
-
|
|
40579
|
-
|
|
40580
|
-
|
|
40581
|
-
|
|
40582
|
-
|
|
40583
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
40546
|
+
switch: ({
|
|
40547
|
+
props,
|
|
40548
|
+
value,
|
|
40549
|
+
restricted,
|
|
40550
|
+
autocomplete,
|
|
40551
|
+
formsValue,
|
|
40552
|
+
repeatIndex,
|
|
40553
|
+
name,
|
|
40554
|
+
inputName,
|
|
40555
|
+
replace
|
|
40556
|
+
}, {
|
|
40557
|
+
form,
|
|
40558
|
+
setFormValues
|
|
40559
|
+
}) => {
|
|
40560
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, {
|
|
40561
|
+
...props,
|
|
40584
40562
|
defaultChecked: value || false,
|
|
40585
40563
|
checked: value || false,
|
|
40586
40564
|
onChange: isChecked => {
|
|
@@ -40622,15 +40600,14 @@ const inputTypeComponent = {
|
|
|
40622
40600
|
setFormValues(formsValue);
|
|
40623
40601
|
}
|
|
40624
40602
|
}
|
|
40625
|
-
})
|
|
40603
|
+
});
|
|
40626
40604
|
},
|
|
40627
|
-
total100:
|
|
40628
|
-
|
|
40629
|
-
|
|
40630
|
-
|
|
40631
|
-
|
|
40632
|
-
|
|
40633
|
-
} = _ref23;
|
|
40605
|
+
total100: ({
|
|
40606
|
+
props,
|
|
40607
|
+
name,
|
|
40608
|
+
options,
|
|
40609
|
+
value
|
|
40610
|
+
}) => {
|
|
40634
40611
|
value = value ? Array.isArray(value) ? value : [value] : [];
|
|
40635
40612
|
function totalValue() {
|
|
40636
40613
|
let total = 0;
|
|
@@ -40654,11 +40631,10 @@ const inputTypeComponent = {
|
|
|
40654
40631
|
className: "total100",
|
|
40655
40632
|
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.List, {
|
|
40656
40633
|
name: name,
|
|
40657
|
-
children: (fields,
|
|
40658
|
-
|
|
40659
|
-
|
|
40660
|
-
|
|
40661
|
-
} = _ref24;
|
|
40634
|
+
children: (fields, {
|
|
40635
|
+
add,
|
|
40636
|
+
remove
|
|
40637
|
+
}) => {
|
|
40662
40638
|
if (fields.length === 0) {
|
|
40663
40639
|
const formData = value || [];
|
|
40664
40640
|
if (formData.length) {
|
|
@@ -40677,26 +40653,26 @@ const inputTypeComponent = {
|
|
|
40677
40653
|
const v = value[field.name];
|
|
40678
40654
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Space, {
|
|
40679
40655
|
className: "total",
|
|
40680
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item,
|
|
40681
|
-
noStyle: true
|
|
40682
|
-
|
|
40656
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
40657
|
+
noStyle: true,
|
|
40658
|
+
...field,
|
|
40683
40659
|
name: [field.name, "type"],
|
|
40684
40660
|
fieldKey: [field.fieldKey, "type"],
|
|
40685
40661
|
initialValue: v.type,
|
|
40686
|
-
children: /*#__PURE__*/jsxRuntime.jsx(antd.Select,
|
|
40662
|
+
children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
|
|
40687
40663
|
allowClear: true,
|
|
40688
40664
|
showSearch: true,
|
|
40689
40665
|
filterOption: filterSelectOptions,
|
|
40690
|
-
optionFilterProp: "children"
|
|
40691
|
-
|
|
40666
|
+
optionFilterProp: "children",
|
|
40667
|
+
...props,
|
|
40692
40668
|
children: options.map((option, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
|
|
40693
40669
|
value: option.value,
|
|
40694
40670
|
children: option.label
|
|
40695
40671
|
}, i))
|
|
40696
|
-
})
|
|
40697
|
-
})
|
|
40698
|
-
noStyle: true
|
|
40699
|
-
|
|
40672
|
+
})
|
|
40673
|
+
}), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
40674
|
+
noStyle: true,
|
|
40675
|
+
...field,
|
|
40700
40676
|
name: [field.name, "value"],
|
|
40701
40677
|
fieldKey: [field.fieldKey, "value"],
|
|
40702
40678
|
initialValue: v.value,
|
|
@@ -40704,14 +40680,14 @@ const inputTypeComponent = {
|
|
|
40704
40680
|
allowClear: true,
|
|
40705
40681
|
name: "value",
|
|
40706
40682
|
formatter: value => {
|
|
40707
|
-
return value ?
|
|
40683
|
+
return value ? `${value}%` : "";
|
|
40708
40684
|
},
|
|
40709
40685
|
disabled: !v.type,
|
|
40710
40686
|
placeholder: props.valueplaceholder ? props.valueplaceholder : "Value",
|
|
40711
40687
|
min: 1,
|
|
40712
40688
|
max: 100 - siblingTotal(v.type)
|
|
40713
40689
|
})
|
|
40714
|
-
})
|
|
40690
|
+
}), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
40715
40691
|
disabled: !v.value || !v.type || totalValue() >= 100,
|
|
40716
40692
|
type: "primary",
|
|
40717
40693
|
icon: /*#__PURE__*/jsxRuntime.jsx(Icons.PlusOutlined, {}),
|
|
@@ -40743,21 +40719,18 @@ const inputTypeComponent = {
|
|
|
40743
40719
|
}) : null]
|
|
40744
40720
|
});
|
|
40745
40721
|
},
|
|
40746
|
-
percentage: (
|
|
40747
|
-
|
|
40748
|
-
|
|
40749
|
-
|
|
40750
|
-
|
|
40751
|
-
|
|
40752
|
-
|
|
40753
|
-
|
|
40754
|
-
|
|
40755
|
-
|
|
40756
|
-
|
|
40757
|
-
|
|
40758
|
-
inputMeta,
|
|
40759
|
-
t
|
|
40760
|
-
} = _ref26;
|
|
40722
|
+
percentage: ({
|
|
40723
|
+
name,
|
|
40724
|
+
inputName,
|
|
40725
|
+
totalMax,
|
|
40726
|
+
repeatIndex,
|
|
40727
|
+
props,
|
|
40728
|
+
formsValue,
|
|
40729
|
+
input
|
|
40730
|
+
}, {
|
|
40731
|
+
inputMeta,
|
|
40732
|
+
t
|
|
40733
|
+
}) => {
|
|
40761
40734
|
const isRepeatable = Array.isArray(formsValue[name]);
|
|
40762
40735
|
let totalSiblings = 0;
|
|
40763
40736
|
if (isRepeatable && totalMax) {
|
|
@@ -40765,15 +40738,15 @@ const inputTypeComponent = {
|
|
|
40765
40738
|
totl = totl + (grp[inputName] || 0);
|
|
40766
40739
|
return totl;
|
|
40767
40740
|
}, 0);
|
|
40768
|
-
} else if (Array.isArray(input
|
|
40741
|
+
} else if (Array.isArray(input?.meta?.siblings)) {
|
|
40769
40742
|
totalSiblings = input.meta.siblings.reduce((totl, key) => {
|
|
40770
40743
|
totl = totl + (formsValue[key] || 0);
|
|
40771
40744
|
return totl;
|
|
40772
40745
|
}, 0);
|
|
40773
40746
|
}
|
|
40774
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber,
|
|
40775
|
-
allowClear: true
|
|
40776
|
-
|
|
40747
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
|
|
40748
|
+
allowClear: true,
|
|
40749
|
+
...props,
|
|
40777
40750
|
style: {
|
|
40778
40751
|
width: "100%"
|
|
40779
40752
|
},
|
|
@@ -40782,36 +40755,33 @@ const inputTypeComponent = {
|
|
|
40782
40755
|
min: 0,
|
|
40783
40756
|
max: 100 - totalSiblings,
|
|
40784
40757
|
formatter: value => {
|
|
40785
|
-
return value ?
|
|
40758
|
+
return value ? `${value}` : "";
|
|
40786
40759
|
},
|
|
40787
40760
|
parser: value => value.replace("%", ""),
|
|
40788
40761
|
addonAfter: "%"
|
|
40789
|
-
})
|
|
40762
|
+
});
|
|
40790
40763
|
},
|
|
40791
|
-
year:
|
|
40792
|
-
|
|
40793
|
-
|
|
40794
|
-
} = _ref27;
|
|
40764
|
+
year: ({
|
|
40765
|
+
props
|
|
40766
|
+
}) => {
|
|
40795
40767
|
const lng = localStorage.getItem("datastakeLng") || "en";
|
|
40796
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker,
|
|
40768
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
|
|
40797
40769
|
allowClear: true,
|
|
40798
40770
|
locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"],
|
|
40799
|
-
picker: "year"
|
|
40800
|
-
|
|
40771
|
+
picker: "year",
|
|
40772
|
+
...props,
|
|
40801
40773
|
format: "YYYY"
|
|
40802
|
-
})
|
|
40774
|
+
});
|
|
40803
40775
|
},
|
|
40804
|
-
upload: (
|
|
40805
|
-
|
|
40806
|
-
|
|
40807
|
-
|
|
40808
|
-
|
|
40809
|
-
|
|
40810
|
-
|
|
40811
|
-
|
|
40812
|
-
|
|
40813
|
-
getAppHeader
|
|
40814
|
-
} = _ref29;
|
|
40776
|
+
upload: ({
|
|
40777
|
+
rules,
|
|
40778
|
+
value
|
|
40779
|
+
}, {
|
|
40780
|
+
setLoading,
|
|
40781
|
+
t,
|
|
40782
|
+
getApiBaseUrl,
|
|
40783
|
+
getAppHeader
|
|
40784
|
+
}) => {
|
|
40815
40785
|
const apiURL = getApiBaseUrl();
|
|
40816
40786
|
const accept = rules.length ? rules.find(rule => Object.keys(rule).includes("accept")).accept || "*" : null;
|
|
40817
40787
|
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) : []) || [];
|
|
@@ -40824,12 +40794,13 @@ const inputTypeComponent = {
|
|
|
40824
40794
|
}
|
|
40825
40795
|
}
|
|
40826
40796
|
const allowedExtensions = accept && accept !== "*" ? accept.split(",").map(ext => ext.trim().toLowerCase()) : [];
|
|
40827
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload,
|
|
40797
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
|
|
40798
|
+
...maxProps,
|
|
40828
40799
|
accept: accept,
|
|
40829
|
-
action:
|
|
40800
|
+
action: `${apiURL}/upload`,
|
|
40830
40801
|
beforeUpload: beforeUpload(allowedExtensions),
|
|
40831
40802
|
onChange: val => {
|
|
40832
|
-
if (val
|
|
40803
|
+
if (val?.file && typeof setLoading === "function") {
|
|
40833
40804
|
if (val.file.percent !== 100) {
|
|
40834
40805
|
setLoading(true);
|
|
40835
40806
|
} else {
|
|
@@ -40837,9 +40808,10 @@ const inputTypeComponent = {
|
|
|
40837
40808
|
}
|
|
40838
40809
|
}
|
|
40839
40810
|
},
|
|
40840
|
-
headers:
|
|
40841
|
-
Authorization:
|
|
40842
|
-
|
|
40811
|
+
headers: {
|
|
40812
|
+
Authorization: `Bearer ${getToken()}`,
|
|
40813
|
+
...getAppHeader()
|
|
40814
|
+
},
|
|
40843
40815
|
defaultFileList: values,
|
|
40844
40816
|
children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
|
|
40845
40817
|
style: {
|
|
@@ -40849,19 +40821,17 @@ const inputTypeComponent = {
|
|
|
40849
40821
|
children: t("Upload")
|
|
40850
40822
|
})]
|
|
40851
40823
|
})
|
|
40852
|
-
})
|
|
40824
|
+
});
|
|
40853
40825
|
},
|
|
40854
|
-
imageUpload: (
|
|
40855
|
-
|
|
40856
|
-
|
|
40857
|
-
|
|
40858
|
-
|
|
40859
|
-
|
|
40860
|
-
|
|
40861
|
-
|
|
40862
|
-
|
|
40863
|
-
t
|
|
40864
|
-
} = _ref31;
|
|
40826
|
+
imageUpload: ({
|
|
40827
|
+
rules,
|
|
40828
|
+
value
|
|
40829
|
+
}, {
|
|
40830
|
+
setLoading,
|
|
40831
|
+
getApiBaseUrl,
|
|
40832
|
+
getAppHeader,
|
|
40833
|
+
t
|
|
40834
|
+
}) => {
|
|
40865
40835
|
const apiURL = getApiBaseUrl();
|
|
40866
40836
|
const values = getImageUploadEditValue(value);
|
|
40867
40837
|
const maxRule = rules.find(r => r.max);
|
|
@@ -40872,17 +40842,17 @@ const inputTypeComponent = {
|
|
|
40872
40842
|
maxProps.multiple = true;
|
|
40873
40843
|
}
|
|
40874
40844
|
}
|
|
40875
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload,
|
|
40845
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
|
|
40846
|
+
...maxProps,
|
|
40876
40847
|
beforeUpload: beforeUpload(allowedImageExtensions),
|
|
40877
40848
|
accept: "image/*",
|
|
40878
40849
|
classList: !values || !values.length ? "empty" : "",
|
|
40879
40850
|
listType: "picture",
|
|
40880
|
-
action:
|
|
40851
|
+
action: `${apiURL}/upload`,
|
|
40881
40852
|
onChange: val => {
|
|
40882
40853
|
if (typeof setLoading === "function") {
|
|
40883
|
-
if (val
|
|
40884
|
-
|
|
40885
|
-
if ((val === null || val === void 0 || (_val$file = val.file) === null || _val$file === void 0 ? void 0 : _val$file.status) === "removed") {
|
|
40854
|
+
if (val?.file) {
|
|
40855
|
+
if (val?.file?.status === "removed") {
|
|
40886
40856
|
setLoading(false);
|
|
40887
40857
|
return;
|
|
40888
40858
|
}
|
|
@@ -40894,9 +40864,10 @@ const inputTypeComponent = {
|
|
|
40894
40864
|
setLoading(false);
|
|
40895
40865
|
}
|
|
40896
40866
|
},
|
|
40897
|
-
headers:
|
|
40898
|
-
Authorization:
|
|
40899
|
-
|
|
40867
|
+
headers: {
|
|
40868
|
+
Authorization: `Bearer ${getToken()}`,
|
|
40869
|
+
...getAppHeader()
|
|
40870
|
+
},
|
|
40900
40871
|
defaultFileList: values,
|
|
40901
40872
|
children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
|
|
40902
40873
|
style: {
|
|
@@ -40906,19 +40877,17 @@ const inputTypeComponent = {
|
|
|
40906
40877
|
children: t("Upload")
|
|
40907
40878
|
})]
|
|
40908
40879
|
})
|
|
40909
|
-
})
|
|
40880
|
+
});
|
|
40910
40881
|
},
|
|
40911
|
-
videoUpload: (
|
|
40912
|
-
|
|
40913
|
-
|
|
40914
|
-
|
|
40915
|
-
|
|
40916
|
-
|
|
40917
|
-
|
|
40918
|
-
|
|
40919
|
-
|
|
40920
|
-
t
|
|
40921
|
-
} = _ref33;
|
|
40882
|
+
videoUpload: ({
|
|
40883
|
+
rules,
|
|
40884
|
+
value
|
|
40885
|
+
}, {
|
|
40886
|
+
setLoading = () => {},
|
|
40887
|
+
getApiBaseUrl,
|
|
40888
|
+
getAppHeader,
|
|
40889
|
+
t
|
|
40890
|
+
}) => {
|
|
40922
40891
|
const apiURL = getApiBaseUrl();
|
|
40923
40892
|
const values = getImageUploadEditValue(value);
|
|
40924
40893
|
const maxRule = rules.find(r => r.max);
|
|
@@ -40929,25 +40898,21 @@ const inputTypeComponent = {
|
|
|
40929
40898
|
maxProps.multiple = true;
|
|
40930
40899
|
}
|
|
40931
40900
|
}
|
|
40932
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload,
|
|
40933
|
-
itemRender: (item, fileList) => {
|
|
40934
|
-
|
|
40935
|
-
|
|
40936
|
-
|
|
40937
|
-
|
|
40938
|
-
|
|
40939
|
-
});
|
|
40940
|
-
}
|
|
40941
|
-
}, maxProps), {}, {
|
|
40901
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
|
|
40902
|
+
itemRender: (item, fileList) => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
40903
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(EditVideoPreview, {
|
|
40904
|
+
url: fileList?.response?.url || fileList?.url
|
|
40905
|
+
}), item]
|
|
40906
|
+
}),
|
|
40907
|
+
...maxProps,
|
|
40942
40908
|
accept: "video/*",
|
|
40943
40909
|
classList: !values || !values.length ? "empty" : "",
|
|
40944
40910
|
listType: "picture",
|
|
40945
|
-
action:
|
|
40911
|
+
action: `${apiURL}/upload`,
|
|
40946
40912
|
onChange: val => {
|
|
40947
40913
|
if (typeof setLoading === "function") {
|
|
40948
|
-
if (val
|
|
40949
|
-
|
|
40950
|
-
if ((val === null || val === void 0 || (_val$file2 = val.file) === null || _val$file2 === void 0 ? void 0 : _val$file2.status) === "removed") {
|
|
40914
|
+
if (val?.file) {
|
|
40915
|
+
if (val?.file?.status === "removed") {
|
|
40951
40916
|
setLoading(false);
|
|
40952
40917
|
return;
|
|
40953
40918
|
}
|
|
@@ -40959,9 +40924,10 @@ const inputTypeComponent = {
|
|
|
40959
40924
|
setLoading(false);
|
|
40960
40925
|
}
|
|
40961
40926
|
},
|
|
40962
|
-
headers:
|
|
40963
|
-
Authorization:
|
|
40964
|
-
|
|
40927
|
+
headers: {
|
|
40928
|
+
Authorization: `Bearer ${getToken()}`,
|
|
40929
|
+
...getAppHeader()
|
|
40930
|
+
},
|
|
40965
40931
|
defaultFileList: values,
|
|
40966
40932
|
children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
|
|
40967
40933
|
style: {
|
|
@@ -40971,19 +40937,17 @@ const inputTypeComponent = {
|
|
|
40971
40937
|
children: t("Upload")
|
|
40972
40938
|
})]
|
|
40973
40939
|
})
|
|
40974
|
-
})
|
|
40940
|
+
});
|
|
40975
40941
|
},
|
|
40976
|
-
geolocation: (
|
|
40977
|
-
|
|
40978
|
-
|
|
40979
|
-
|
|
40980
|
-
|
|
40981
|
-
|
|
40982
|
-
|
|
40983
|
-
|
|
40984
|
-
|
|
40985
|
-
inputMeta
|
|
40986
|
-
} = _ref35;
|
|
40942
|
+
geolocation: ({
|
|
40943
|
+
value,
|
|
40944
|
+
name,
|
|
40945
|
+
formsValue,
|
|
40946
|
+
addressData,
|
|
40947
|
+
props
|
|
40948
|
+
}, {
|
|
40949
|
+
inputMeta
|
|
40950
|
+
}) => {
|
|
40987
40951
|
let search = formsValue.country;
|
|
40988
40952
|
if (addressData && Object.keys(addressData).length > 0) {
|
|
40989
40953
|
const country = countriesList.countries[formsValue.country] || {};
|
|
@@ -40991,10 +40955,10 @@ const inputTypeComponent = {
|
|
|
40991
40955
|
search = addressData.country;
|
|
40992
40956
|
}
|
|
40993
40957
|
if (addressData.level1) {
|
|
40994
|
-
search =
|
|
40958
|
+
search = `${addressData.level1}, ${addressData.country || country.name}`;
|
|
40995
40959
|
}
|
|
40996
40960
|
if (addressData.level2) {
|
|
40997
|
-
search =
|
|
40961
|
+
search = `${addressData.level2}, ${addressData.level1}, ${addressData.country || country.name}`;
|
|
40998
40962
|
}
|
|
40999
40963
|
} else {
|
|
41000
40964
|
const country = countriesList.countries[formsValue.country] || {};
|
|
@@ -41002,10 +40966,10 @@ const inputTypeComponent = {
|
|
|
41002
40966
|
search = country.name;
|
|
41003
40967
|
}
|
|
41004
40968
|
if (formsValue.administrativeLevel1Name) {
|
|
41005
|
-
search =
|
|
40969
|
+
search = `${search} ${formsValue.administrativeLevel1Name}`;
|
|
41006
40970
|
}
|
|
41007
40971
|
if (formsValue.administrativeLevel2Name) {
|
|
41008
|
-
search =
|
|
40972
|
+
search = `${search} ${formsValue.administrativeLevel2Name}`;
|
|
41009
40973
|
}
|
|
41010
40974
|
}
|
|
41011
40975
|
return /*#__PURE__*/jsxRuntime.jsx(Geolocation, {
|
|
@@ -41018,35 +40982,33 @@ const inputTypeComponent = {
|
|
|
41018
40982
|
searchValue: search
|
|
41019
40983
|
});
|
|
41020
40984
|
},
|
|
41021
|
-
ajaxSelect: (
|
|
41022
|
-
|
|
41023
|
-
|
|
41024
|
-
|
|
41025
|
-
|
|
41026
|
-
|
|
41027
|
-
|
|
41028
|
-
|
|
41029
|
-
|
|
41030
|
-
|
|
41031
|
-
|
|
41032
|
-
|
|
41033
|
-
|
|
41034
|
-
|
|
41035
|
-
|
|
41036
|
-
|
|
41037
|
-
|
|
41038
|
-
|
|
41039
|
-
|
|
41040
|
-
|
|
41041
|
-
|
|
41042
|
-
|
|
41043
|
-
|
|
41044
|
-
|
|
41045
|
-
|
|
41046
|
-
|
|
41047
|
-
|
|
41048
|
-
setFormValues
|
|
41049
|
-
} = _ref37;
|
|
40985
|
+
ajaxSelect: ({
|
|
40986
|
+
call,
|
|
40987
|
+
automaticallyLink,
|
|
40988
|
+
name,
|
|
40989
|
+
preSelected,
|
|
40990
|
+
inputName,
|
|
40991
|
+
props,
|
|
40992
|
+
formsValue,
|
|
40993
|
+
onNewSetValue,
|
|
40994
|
+
multiple,
|
|
40995
|
+
updateOptions,
|
|
40996
|
+
repeatValues,
|
|
40997
|
+
repeatIndex,
|
|
40998
|
+
value,
|
|
40999
|
+
unique,
|
|
41000
|
+
address,
|
|
41001
|
+
addressData = {},
|
|
41002
|
+
input
|
|
41003
|
+
}, {
|
|
41004
|
+
form,
|
|
41005
|
+
forms,
|
|
41006
|
+
setAddress,
|
|
41007
|
+
changeInputMeta,
|
|
41008
|
+
inputMeta = {},
|
|
41009
|
+
meta,
|
|
41010
|
+
setFormValues
|
|
41011
|
+
}) => {
|
|
41050
41012
|
return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect, {
|
|
41051
41013
|
preSelected: preSelected,
|
|
41052
41014
|
input: input,
|
|
@@ -41082,41 +41044,40 @@ const inputTypeComponent = {
|
|
|
41082
41044
|
const selectedValue = data.find(v => v.value === ev);
|
|
41083
41045
|
if (address && selectedValue) {
|
|
41084
41046
|
dot__default["default"].str(address, selectedValue.label, addressData);
|
|
41085
|
-
setAddress(
|
|
41047
|
+
setAddress({
|
|
41048
|
+
...addressData
|
|
41049
|
+
});
|
|
41086
41050
|
}
|
|
41087
41051
|
}
|
|
41088
41052
|
},
|
|
41089
41053
|
setAddress: setAddress
|
|
41090
41054
|
});
|
|
41091
41055
|
},
|
|
41092
|
-
tag:
|
|
41093
|
-
|
|
41094
|
-
|
|
41095
|
-
|
|
41096
|
-
} = _ref38;
|
|
41056
|
+
tag: ({
|
|
41057
|
+
value,
|
|
41058
|
+
repeatLabel
|
|
41059
|
+
}) => {
|
|
41097
41060
|
return /*#__PURE__*/jsxRuntime.jsx(TagInput$1, {
|
|
41098
41061
|
allowClear: true,
|
|
41099
41062
|
value: value || [],
|
|
41100
41063
|
newPlaceholder: repeatLabel
|
|
41101
41064
|
});
|
|
41102
41065
|
},
|
|
41103
|
-
modal: (
|
|
41104
|
-
|
|
41105
|
-
|
|
41106
|
-
|
|
41107
|
-
|
|
41108
|
-
|
|
41109
|
-
|
|
41110
|
-
|
|
41111
|
-
|
|
41112
|
-
|
|
41113
|
-
|
|
41114
|
-
|
|
41115
|
-
|
|
41116
|
-
|
|
41117
|
-
|
|
41118
|
-
form
|
|
41119
|
-
} = _ref40;
|
|
41066
|
+
modal: ({
|
|
41067
|
+
call,
|
|
41068
|
+
automaticallyLink,
|
|
41069
|
+
name,
|
|
41070
|
+
inputName,
|
|
41071
|
+
props,
|
|
41072
|
+
formsValue,
|
|
41073
|
+
onNewSetValue,
|
|
41074
|
+
repeatValues,
|
|
41075
|
+
repeatIndex,
|
|
41076
|
+
value,
|
|
41077
|
+
modalTitle
|
|
41078
|
+
}, {
|
|
41079
|
+
form
|
|
41080
|
+
}) => {
|
|
41120
41081
|
return /*#__PURE__*/jsxRuntime.jsx(AjaxModal$2, {
|
|
41121
41082
|
allowClear: true,
|
|
41122
41083
|
call: call,
|
|
@@ -41134,69 +41095,63 @@ const inputTypeComponent = {
|
|
|
41134
41095
|
buttonText: modalTitle
|
|
41135
41096
|
});
|
|
41136
41097
|
},
|
|
41137
|
-
website: (
|
|
41138
|
-
|
|
41139
|
-
|
|
41140
|
-
|
|
41141
|
-
|
|
41142
|
-
|
|
41143
|
-
|
|
41144
|
-
|
|
41145
|
-
|
|
41146
|
-
|
|
41147
|
-
|
|
41148
|
-
|
|
41149
|
-
|
|
41150
|
-
|
|
41151
|
-
} = _ref42;
|
|
41152
|
-
return /*#__PURE__*/jsxRuntime.jsx(Website, _objectSpread2(_objectSpread2({
|
|
41098
|
+
website: ({
|
|
41099
|
+
name,
|
|
41100
|
+
inputName,
|
|
41101
|
+
props,
|
|
41102
|
+
value,
|
|
41103
|
+
repeatIndex,
|
|
41104
|
+
repeatValues,
|
|
41105
|
+
formsValue
|
|
41106
|
+
}, {
|
|
41107
|
+
form,
|
|
41108
|
+
inputMeta = {},
|
|
41109
|
+
t
|
|
41110
|
+
}) => {
|
|
41111
|
+
return /*#__PURE__*/jsxRuntime.jsx(Website, {
|
|
41153
41112
|
allowClear: true,
|
|
41154
41113
|
initialValue: value,
|
|
41155
|
-
t: t
|
|
41156
|
-
|
|
41114
|
+
t: t,
|
|
41115
|
+
...props,
|
|
41157
41116
|
onChange: val => updateFormValues(repeatIndex, repeatValues, inputName, val, formsValue, name, form),
|
|
41158
41117
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
41159
41118
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || "www.example.com"
|
|
41160
|
-
})
|
|
41119
|
+
});
|
|
41161
41120
|
},
|
|
41162
|
-
dataLink: (
|
|
41163
|
-
|
|
41164
|
-
|
|
41165
|
-
|
|
41166
|
-
|
|
41167
|
-
|
|
41168
|
-
|
|
41169
|
-
|
|
41170
|
-
|
|
41171
|
-
|
|
41172
|
-
|
|
41173
|
-
|
|
41174
|
-
|
|
41175
|
-
|
|
41176
|
-
|
|
41177
|
-
|
|
41178
|
-
|
|
41179
|
-
|
|
41180
|
-
|
|
41181
|
-
|
|
41182
|
-
|
|
41183
|
-
|
|
41184
|
-
|
|
41185
|
-
|
|
41186
|
-
|
|
41187
|
-
|
|
41188
|
-
|
|
41189
|
-
|
|
41190
|
-
|
|
41191
|
-
|
|
41192
|
-
|
|
41193
|
-
|
|
41194
|
-
|
|
41195
|
-
|
|
41196
|
-
if ((input === null || input === void 0 || (_input$meta7 = input.meta) === null || _input$meta7 === void 0 || (_input$meta7 = _input$meta7.optionsView) === null || _input$meta7 === void 0 ? void 0 : _input$meta7.editInputType) === "ajaxSelect") {
|
|
41197
|
-
var _formsValue$groupForm, _input$meta8, _input$meta9;
|
|
41198
|
-
const currentValue = groupFormId ? (_formsValue$groupForm = formsValue[groupFormId]) === null || _formsValue$groupForm === void 0 ? void 0 : _formsValue$groupForm[name] : formsValue[name];
|
|
41199
|
-
(input === null || input === void 0 || (_input$meta8 = input.meta) === null || _input$meta8 === void 0 || (_input$meta8 = _input$meta8.optionsView) === null || _input$meta8 === void 0 ? void 0 : _input$meta8.call) || (input === null || input === void 0 || (_input$meta9 = input.meta) === null || _input$meta9 === void 0 ? void 0 : _input$meta9.call) || "default::list()::::";
|
|
41121
|
+
dataLink: ({
|
|
41122
|
+
setValues,
|
|
41123
|
+
name,
|
|
41124
|
+
onValuesChange,
|
|
41125
|
+
formsValue,
|
|
41126
|
+
input,
|
|
41127
|
+
changeLinking,
|
|
41128
|
+
call,
|
|
41129
|
+
automaticallyLink,
|
|
41130
|
+
inputName,
|
|
41131
|
+
props,
|
|
41132
|
+
onNewSetValue,
|
|
41133
|
+
multiple,
|
|
41134
|
+
updateOptions,
|
|
41135
|
+
repeatValues,
|
|
41136
|
+
repeatIndex,
|
|
41137
|
+
value,
|
|
41138
|
+
unique,
|
|
41139
|
+
address,
|
|
41140
|
+
addressData = {},
|
|
41141
|
+
getFromLinking
|
|
41142
|
+
}, {
|
|
41143
|
+
form,
|
|
41144
|
+
groupFormId,
|
|
41145
|
+
setAddress,
|
|
41146
|
+
isHighlighted,
|
|
41147
|
+
changeInputMeta,
|
|
41148
|
+
meta,
|
|
41149
|
+
inputMeta,
|
|
41150
|
+
forms
|
|
41151
|
+
}) => {
|
|
41152
|
+
if (input?.meta?.optionsView?.editInputType === "ajaxSelect") {
|
|
41153
|
+
const currentValue = groupFormId ? formsValue[groupFormId]?.[name] : formsValue[name];
|
|
41154
|
+
input?.meta?.optionsView?.call || input?.meta?.call || "default::list()::::";
|
|
41200
41155
|
return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect$1, {
|
|
41201
41156
|
size: "medium",
|
|
41202
41157
|
input: input,
|
|
@@ -41233,7 +41188,9 @@ const inputTypeComponent = {
|
|
|
41233
41188
|
const selectedValue = data.find(v => v.value === ev);
|
|
41234
41189
|
if (address && selectedValue) {
|
|
41235
41190
|
dot__default["default"].str(address, selectedValue.label, addressData);
|
|
41236
|
-
setAddress(
|
|
41191
|
+
setAddress({
|
|
41192
|
+
...addressData
|
|
41193
|
+
});
|
|
41237
41194
|
}
|
|
41238
41195
|
}
|
|
41239
41196
|
},
|
|
@@ -41243,149 +41200,188 @@ const inputTypeComponent = {
|
|
|
41243
41200
|
isDataLink: true
|
|
41244
41201
|
});
|
|
41245
41202
|
}
|
|
41246
|
-
const isSingle =
|
|
41247
|
-
const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [
|
|
41203
|
+
const isSingle = input?.meta?.maxRepeat === 1;
|
|
41204
|
+
const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [{
|
|
41205
|
+
...(formsValue[groupFormId] || {})[name]
|
|
41206
|
+
}] : [] : getArray((formsValue[groupFormId] || {})[name] || []).map(v => ({
|
|
41207
|
+
...v
|
|
41208
|
+
})) : isSingle ? formsValue[name] ? [{
|
|
41209
|
+
...formsValue[name]
|
|
41210
|
+
}] : [] : (formsValue[name] || []).map(v => ({
|
|
41211
|
+
...v
|
|
41212
|
+
}));
|
|
41248
41213
|
const onUpdate = (val, i) => {
|
|
41249
41214
|
const _val = isSingle ? {
|
|
41250
41215
|
[name]: val
|
|
41251
41216
|
} : {
|
|
41252
|
-
[name]: formData
|
|
41217
|
+
[name]: formData?.map((d, j) => i === j ? val : d)
|
|
41253
41218
|
};
|
|
41254
41219
|
if (groupFormId) {
|
|
41255
|
-
const _defaultData =
|
|
41256
|
-
const _newData =
|
|
41257
|
-
|
|
41220
|
+
const _defaultData = form?.getFieldValue(groupFormId) || {};
|
|
41221
|
+
const _newData = {
|
|
41222
|
+
..._defaultData,
|
|
41223
|
+
..._val
|
|
41224
|
+
};
|
|
41225
|
+
onValuesChange(_newData, {
|
|
41226
|
+
...formsValue,
|
|
41258
41227
|
[groupFormId]: _newData
|
|
41259
|
-
})
|
|
41260
|
-
form
|
|
41261
|
-
setValues(
|
|
41228
|
+
});
|
|
41229
|
+
form?.setFieldValue(groupFormId, _newData);
|
|
41230
|
+
setValues({
|
|
41231
|
+
...formsValue,
|
|
41262
41232
|
[groupFormId]: _newData
|
|
41263
|
-
})
|
|
41233
|
+
});
|
|
41264
41234
|
return;
|
|
41265
41235
|
}
|
|
41266
|
-
onValuesChange(_val,
|
|
41267
|
-
|
|
41268
|
-
|
|
41236
|
+
onValuesChange(_val, {
|
|
41237
|
+
...formsValue,
|
|
41238
|
+
..._val
|
|
41239
|
+
});
|
|
41240
|
+
form?.setFieldValue(name, _val[name]);
|
|
41241
|
+
setValues({
|
|
41242
|
+
...formsValue,
|
|
41243
|
+
..._val
|
|
41244
|
+
});
|
|
41269
41245
|
};
|
|
41270
41246
|
return /*#__PURE__*/jsxRuntime.jsx(DataLink, {
|
|
41271
41247
|
form: input,
|
|
41272
41248
|
formsValue: formsValue,
|
|
41273
41249
|
onUpdate: onUpdate,
|
|
41274
41250
|
isHighlighted: isHighlighted,
|
|
41275
|
-
values: groupFormId ?
|
|
41251
|
+
values: groupFormId ? {
|
|
41252
|
+
...(formsValue[groupFormId] || {}),
|
|
41276
41253
|
meta: {
|
|
41277
|
-
inputs: (
|
|
41254
|
+
inputs: (formsValue?.meta?.inputs || {})[groupFormId]
|
|
41278
41255
|
}
|
|
41279
|
-
}
|
|
41256
|
+
} : formsValue,
|
|
41280
41257
|
name: name,
|
|
41281
41258
|
groupFormId: groupFormId,
|
|
41282
|
-
maxRepeat: input
|
|
41283
|
-
remove:
|
|
41284
|
-
|
|
41285
|
-
|
|
41286
|
-
} = _ref45;
|
|
41259
|
+
maxRepeat: input?.meta?.maxRepeat,
|
|
41260
|
+
remove: ({
|
|
41261
|
+
key
|
|
41262
|
+
}) => {
|
|
41287
41263
|
const _val = isSingle ? {
|
|
41288
41264
|
[name]: null
|
|
41289
41265
|
} : {
|
|
41290
41266
|
[name]: formData.filter((v, i) => i !== key)
|
|
41291
41267
|
};
|
|
41292
41268
|
if (groupFormId) {
|
|
41293
|
-
const _defaultData =
|
|
41294
|
-
const _newData =
|
|
41295
|
-
|
|
41269
|
+
const _defaultData = form?.getFieldValue(groupFormId) || {};
|
|
41270
|
+
const _newData = {
|
|
41271
|
+
..._defaultData,
|
|
41272
|
+
..._val
|
|
41273
|
+
};
|
|
41274
|
+
onValuesChange(_newData, {
|
|
41275
|
+
...formsValue,
|
|
41296
41276
|
[groupFormId]: _newData
|
|
41297
|
-
})
|
|
41298
|
-
form
|
|
41299
|
-
setValues(
|
|
41277
|
+
});
|
|
41278
|
+
form?.setFieldValue(groupFormId, _newData);
|
|
41279
|
+
setValues({
|
|
41280
|
+
...formsValue,
|
|
41300
41281
|
[groupFormId]: _newData
|
|
41301
|
-
})
|
|
41282
|
+
});
|
|
41302
41283
|
return;
|
|
41303
41284
|
}
|
|
41304
|
-
onValuesChange(_val,
|
|
41305
|
-
|
|
41306
|
-
|
|
41285
|
+
onValuesChange(_val, {
|
|
41286
|
+
...formsValue,
|
|
41287
|
+
..._val
|
|
41288
|
+
});
|
|
41289
|
+
form?.setFieldValue(name, _val[name]);
|
|
41290
|
+
setValues({
|
|
41291
|
+
...formsValue,
|
|
41292
|
+
..._val
|
|
41293
|
+
});
|
|
41307
41294
|
},
|
|
41308
41295
|
add: val => {
|
|
41309
41296
|
const _val = isSingle ? {
|
|
41310
41297
|
[name]: val
|
|
41311
41298
|
} : {
|
|
41312
|
-
[name]: [...formData,
|
|
41299
|
+
[name]: [...formData, {
|
|
41300
|
+
...val
|
|
41301
|
+
}]
|
|
41313
41302
|
};
|
|
41314
41303
|
if (groupFormId) {
|
|
41315
|
-
const _defaultData =
|
|
41316
|
-
const _newData =
|
|
41317
|
-
|
|
41318
|
-
|
|
41304
|
+
const _defaultData = form?.getFieldValue(groupFormId) || {};
|
|
41305
|
+
const _newData = {
|
|
41306
|
+
..._defaultData,
|
|
41307
|
+
..._val
|
|
41308
|
+
};
|
|
41309
|
+
form?.setFieldValue(groupFormId, _newData);
|
|
41310
|
+
onValuesChange(_newData, {
|
|
41311
|
+
...formsValue,
|
|
41319
41312
|
[groupFormId]: _newData
|
|
41320
|
-
})
|
|
41321
|
-
setValues(
|
|
41313
|
+
});
|
|
41314
|
+
setValues({
|
|
41315
|
+
...formsValue,
|
|
41322
41316
|
[groupFormId]: _newData
|
|
41323
|
-
})
|
|
41317
|
+
});
|
|
41324
41318
|
return;
|
|
41325
41319
|
}
|
|
41326
|
-
form
|
|
41327
|
-
onValuesChange(_val,
|
|
41328
|
-
|
|
41320
|
+
form?.setFieldValue(name, _val[name]);
|
|
41321
|
+
onValuesChange(_val, {
|
|
41322
|
+
...formsValue,
|
|
41323
|
+
..._val
|
|
41324
|
+
});
|
|
41325
|
+
setValues({
|
|
41326
|
+
...formsValue,
|
|
41327
|
+
..._val
|
|
41328
|
+
});
|
|
41329
41329
|
},
|
|
41330
41330
|
k: name,
|
|
41331
41331
|
formData: formData
|
|
41332
41332
|
});
|
|
41333
41333
|
},
|
|
41334
|
-
internallink: (
|
|
41335
|
-
|
|
41336
|
-
|
|
41337
|
-
|
|
41338
|
-
|
|
41339
|
-
|
|
41340
|
-
|
|
41341
|
-
|
|
41342
|
-
|
|
41343
|
-
|
|
41344
|
-
|
|
41345
|
-
|
|
41346
|
-
|
|
41347
|
-
|
|
41348
|
-
} = _ref47;
|
|
41349
|
-
return /*#__PURE__*/jsxRuntime.jsx(Website, _objectSpread2(_objectSpread2({
|
|
41334
|
+
internallink: ({
|
|
41335
|
+
name,
|
|
41336
|
+
inputName,
|
|
41337
|
+
props,
|
|
41338
|
+
value,
|
|
41339
|
+
repeatIndex,
|
|
41340
|
+
repeatValues,
|
|
41341
|
+
formsValue
|
|
41342
|
+
}, {
|
|
41343
|
+
form,
|
|
41344
|
+
inputMeta = {},
|
|
41345
|
+
t
|
|
41346
|
+
}) => {
|
|
41347
|
+
return /*#__PURE__*/jsxRuntime.jsx(Website, {
|
|
41350
41348
|
allowClear: true,
|
|
41351
41349
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
41352
41350
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || "www.example.com",
|
|
41353
|
-
initialValue: value
|
|
41354
|
-
|
|
41351
|
+
initialValue: value,
|
|
41352
|
+
...props,
|
|
41355
41353
|
onChange: val => updateFormValues(repeatIndex, repeatValues, inputName, val, formsValue, name, form)
|
|
41356
|
-
})
|
|
41354
|
+
});
|
|
41357
41355
|
},
|
|
41358
|
-
group:
|
|
41359
|
-
|
|
41360
|
-
|
|
41361
|
-
|
|
41362
|
-
|
|
41363
|
-
|
|
41364
|
-
|
|
41365
|
-
}
|
|
41356
|
+
group: ({
|
|
41357
|
+
props,
|
|
41358
|
+
groupInputs
|
|
41359
|
+
}) => {
|
|
41360
|
+
return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, {
|
|
41361
|
+
groupInputs: groupInputs,
|
|
41362
|
+
...props
|
|
41363
|
+
});
|
|
41366
41364
|
},
|
|
41367
|
-
groupInputs: (
|
|
41368
|
-
|
|
41369
|
-
|
|
41370
|
-
|
|
41371
|
-
|
|
41372
|
-
|
|
41373
|
-
|
|
41374
|
-
} = _ref50;
|
|
41375
|
-
return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, _objectSpread2({
|
|
41365
|
+
groupInputs: ({
|
|
41366
|
+
props,
|
|
41367
|
+
groupInputs
|
|
41368
|
+
}, {
|
|
41369
|
+
inputMeta
|
|
41370
|
+
}) => {
|
|
41371
|
+
return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, {
|
|
41376
41372
|
groupInputs: groupInputs,
|
|
41377
|
-
inputMeta: inputMeta
|
|
41378
|
-
|
|
41373
|
+
inputMeta: inputMeta,
|
|
41374
|
+
...props
|
|
41375
|
+
});
|
|
41379
41376
|
},
|
|
41380
|
-
radioGroup:
|
|
41381
|
-
|
|
41382
|
-
|
|
41383
|
-
|
|
41384
|
-
|
|
41385
|
-
|
|
41386
|
-
|
|
41387
|
-
|
|
41388
|
-
}, props), {}, {
|
|
41377
|
+
radioGroup: ({
|
|
41378
|
+
props,
|
|
41379
|
+
value,
|
|
41380
|
+
options
|
|
41381
|
+
}) => {
|
|
41382
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, {
|
|
41383
|
+
value: value,
|
|
41384
|
+
...props,
|
|
41389
41385
|
children: (options || []).map(o => {
|
|
41390
41386
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Radio, {
|
|
41391
41387
|
value: o.value,
|
|
@@ -41398,17 +41394,16 @@ const inputTypeComponent = {
|
|
|
41398
41394
|
}) : null]
|
|
41399
41395
|
}, o.value);
|
|
41400
41396
|
})
|
|
41401
|
-
})
|
|
41397
|
+
});
|
|
41402
41398
|
},
|
|
41403
|
-
checkboxGroup:
|
|
41404
|
-
|
|
41405
|
-
|
|
41406
|
-
|
|
41407
|
-
|
|
41408
|
-
|
|
41409
|
-
|
|
41410
|
-
|
|
41411
|
-
}, props), {}, {
|
|
41399
|
+
checkboxGroup: ({
|
|
41400
|
+
props,
|
|
41401
|
+
value,
|
|
41402
|
+
options
|
|
41403
|
+
}) => {
|
|
41404
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox.Group, {
|
|
41405
|
+
value: value,
|
|
41406
|
+
...props,
|
|
41412
41407
|
children: (options || []).map(o => {
|
|
41413
41408
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Checkbox, {
|
|
41414
41409
|
value: o.value,
|
|
@@ -41421,30 +41416,28 @@ const inputTypeComponent = {
|
|
|
41421
41416
|
}) : null]
|
|
41422
41417
|
}, o.value);
|
|
41423
41418
|
})
|
|
41424
|
-
})
|
|
41419
|
+
});
|
|
41425
41420
|
}
|
|
41426
41421
|
};
|
|
41427
|
-
const GetFormItem =
|
|
41428
|
-
|
|
41429
|
-
|
|
41430
|
-
|
|
41431
|
-
|
|
41432
|
-
|
|
41433
|
-
|
|
41434
|
-
|
|
41435
|
-
|
|
41436
|
-
|
|
41437
|
-
|
|
41438
|
-
|
|
41439
|
-
|
|
41440
|
-
|
|
41441
|
-
|
|
41442
|
-
|
|
41443
|
-
|
|
41444
|
-
|
|
41445
|
-
|
|
41446
|
-
isCreate = false
|
|
41447
|
-
} = _ref53;
|
|
41422
|
+
const GetFormItem = ({
|
|
41423
|
+
code,
|
|
41424
|
+
inputData,
|
|
41425
|
+
inputId,
|
|
41426
|
+
input,
|
|
41427
|
+
setLoading,
|
|
41428
|
+
values,
|
|
41429
|
+
MainForm,
|
|
41430
|
+
options,
|
|
41431
|
+
plainForms,
|
|
41432
|
+
setValues,
|
|
41433
|
+
alertError,
|
|
41434
|
+
setAddress,
|
|
41435
|
+
inputMeta = {},
|
|
41436
|
+
inputKey,
|
|
41437
|
+
changeInputMeta = () => {},
|
|
41438
|
+
i,
|
|
41439
|
+
isCreate = false
|
|
41440
|
+
}) => {
|
|
41448
41441
|
const {
|
|
41449
41442
|
t,
|
|
41450
41443
|
getAppHeader,
|
|
@@ -41460,7 +41453,7 @@ const GetFormItem = _ref53 => {
|
|
|
41460
41453
|
case "h6":
|
|
41461
41454
|
return getInputHeadLines(input.type, i, input, values);
|
|
41462
41455
|
default:
|
|
41463
|
-
const rules = inputMeta
|
|
41456
|
+
const rules = inputMeta?.notApplicable || inputMeta?.notAvailable ? [] : inputData.rules ? inputData.rules.filter(rule => !Object.keys(rule).includes("accept") && !Object.keys(rule).includes("max")) : [];
|
|
41464
41457
|
const requiredRule = rules.find(r => r.required);
|
|
41465
41458
|
if (requiredRule && input.type === "text") {
|
|
41466
41459
|
rules.push({
|
|
@@ -41469,45 +41462,47 @@ const GetFormItem = _ref53 => {
|
|
|
41469
41462
|
});
|
|
41470
41463
|
}
|
|
41471
41464
|
const noLabel = ["message"].includes(input.type);
|
|
41472
|
-
let maxRule = (
|
|
41465
|
+
let maxRule = (inputData?.rules || []).find(rule => rule.max)?.max;
|
|
41473
41466
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
41474
41467
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
41475
41468
|
className: "flex input-cont",
|
|
41476
|
-
children: /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item,
|
|
41477
|
-
initialValue: inputMeta
|
|
41478
|
-
|
|
41479
|
-
|
|
41480
|
-
|
|
41481
|
-
|
|
41482
|
-
|
|
41483
|
-
|
|
41484
|
-
|
|
41485
|
-
|
|
41486
|
-
|
|
41487
|
-
|
|
41488
|
-
return e && e.fileList && e.fileList.map(f => {
|
|
41489
|
-
if (f.response) {
|
|
41490
|
-
return f.response;
|
|
41469
|
+
children: /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
41470
|
+
initialValue: inputMeta?.defaultValue,
|
|
41471
|
+
...(["total100", "group"].includes(input.type) ? {} : {
|
|
41472
|
+
name: inputId,
|
|
41473
|
+
fieldKey: inputId,
|
|
41474
|
+
initialValue: inputData.value
|
|
41475
|
+
}),
|
|
41476
|
+
...(["upload", "imageUpload", "videoUpload"].includes(input.type) ? {
|
|
41477
|
+
valuePropName: "fileList",
|
|
41478
|
+
getValueFromEvent: e => {
|
|
41479
|
+
if (Array.isArray(e)) {
|
|
41480
|
+
return e;
|
|
41491
41481
|
}
|
|
41492
|
-
return f
|
|
41493
|
-
|
|
41494
|
-
|
|
41495
|
-
|
|
41482
|
+
return e && e.fileList && e.fileList.map(f => {
|
|
41483
|
+
if (f.response) {
|
|
41484
|
+
return f.response;
|
|
41485
|
+
}
|
|
41486
|
+
return f;
|
|
41487
|
+
});
|
|
41488
|
+
}
|
|
41489
|
+
} : {}),
|
|
41496
41490
|
style: input.showOnView === false ? {
|
|
41497
41491
|
display: "none"
|
|
41498
|
-
} : {}
|
|
41499
|
-
|
|
41500
|
-
|
|
41501
|
-
|
|
41502
|
-
|
|
41503
|
-
|
|
41504
|
-
|
|
41505
|
-
|
|
41506
|
-
|
|
41507
|
-
|
|
41508
|
-
|
|
41509
|
-
|
|
41510
|
-
|
|
41492
|
+
} : {},
|
|
41493
|
+
...(["switch"].includes(input.type) ? {
|
|
41494
|
+
labelCol: {
|
|
41495
|
+
span: 20
|
|
41496
|
+
},
|
|
41497
|
+
style: {
|
|
41498
|
+
...(input.showOnView === false ? {
|
|
41499
|
+
display: "none"
|
|
41500
|
+
} : {}),
|
|
41501
|
+
flexDirection: "row",
|
|
41502
|
+
justifyContent: "space-between"
|
|
41503
|
+
}
|
|
41504
|
+
} : {}),
|
|
41505
|
+
className: input.comment ? `flex-1 with-comment i-${input.type}` : `i-${input.type} flex-1`,
|
|
41511
41506
|
"data-id": inputData.name,
|
|
41512
41507
|
rules: rules,
|
|
41513
41508
|
required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
|
|
@@ -41518,8 +41513,8 @@ const GetFormItem = _ref53 => {
|
|
|
41518
41513
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
41519
41514
|
className: "mr-1",
|
|
41520
41515
|
children: getInputLabel(input, values)
|
|
41521
|
-
}), !!
|
|
41522
|
-
title: input
|
|
41516
|
+
}), !!input?.meta?.tooltip && /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
41517
|
+
title: input?.meta?.tooltip,
|
|
41523
41518
|
trigger: "hover",
|
|
41524
41519
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
41525
41520
|
className: "flex flex-column justify-content-center",
|
|
@@ -41537,7 +41532,7 @@ const GetFormItem = _ref53 => {
|
|
|
41537
41532
|
title: t("Not applicable"),
|
|
41538
41533
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
41539
41534
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
41540
|
-
disabled: !
|
|
41535
|
+
disabled: !input?.meta?.notApplicable,
|
|
41541
41536
|
className: formatClassname(["default p-0", inputMeta.notApplicable && "primary"]),
|
|
41542
41537
|
type: "link",
|
|
41543
41538
|
onClick: () => {
|
|
@@ -41572,7 +41567,7 @@ const GetFormItem = _ref53 => {
|
|
|
41572
41567
|
title: t("No available information"),
|
|
41573
41568
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
41574
41569
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
41575
|
-
disabled: !
|
|
41570
|
+
disabled: !input?.meta?.notAvailable,
|
|
41576
41571
|
className: formatClassname(["default p-0", inputMeta.notAvailable && "primary"]),
|
|
41577
41572
|
type: "link",
|
|
41578
41573
|
onClick: () => {
|
|
@@ -41606,14 +41601,14 @@ const GetFormItem = _ref53 => {
|
|
|
41606
41601
|
}), /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
41607
41602
|
title: t("Add comment"),
|
|
41608
41603
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
41609
|
-
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button,
|
|
41604
|
+
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
41610
41605
|
type: "link",
|
|
41611
|
-
disabled: !
|
|
41612
|
-
|
|
41613
|
-
|
|
41614
|
-
|
|
41615
|
-
|
|
41616
|
-
|
|
41606
|
+
disabled: !input?.meta?.comment,
|
|
41607
|
+
...(!isShown ? {
|
|
41608
|
+
className: "default p-0"
|
|
41609
|
+
} : {
|
|
41610
|
+
className: "p-0 primary"
|
|
41611
|
+
}),
|
|
41617
41612
|
onClick: () => {
|
|
41618
41613
|
setIsShown(true);
|
|
41619
41614
|
changeInputMeta({
|
|
@@ -41629,18 +41624,18 @@ const GetFormItem = _ref53 => {
|
|
|
41629
41624
|
width: 16,
|
|
41630
41625
|
height: 16
|
|
41631
41626
|
})
|
|
41632
|
-
})
|
|
41627
|
+
})
|
|
41633
41628
|
})
|
|
41634
41629
|
})]
|
|
41635
|
-
}),
|
|
41630
|
+
}), input.meta?.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
41636
41631
|
className: "code",
|
|
41637
41632
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
41638
|
-
children:
|
|
41633
|
+
children: input.meta?.code
|
|
41639
41634
|
})
|
|
41640
41635
|
}) : code ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
41641
41636
|
className: "code",
|
|
41642
41637
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
41643
|
-
children:
|
|
41638
|
+
children: `${code}.${i + 1}`
|
|
41644
41639
|
})
|
|
41645
41640
|
}) : null]
|
|
41646
41641
|
})
|
|
@@ -41660,7 +41655,7 @@ const GetFormItem = _ref53 => {
|
|
|
41660
41655
|
getAppHeader,
|
|
41661
41656
|
getApiBaseUrl
|
|
41662
41657
|
}) : console.log(input)
|
|
41663
|
-
})
|
|
41658
|
+
})
|
|
41664
41659
|
}), alertError ? /*#__PURE__*/jsxRuntime.jsx(antd.Alert, {
|
|
41665
41660
|
message: alertError.message,
|
|
41666
41661
|
type: "error",
|
|
@@ -41689,10 +41684,10 @@ const GetFormItem = _ref53 => {
|
|
|
41689
41684
|
className: "max-char-span",
|
|
41690
41685
|
children: t("max-char", {
|
|
41691
41686
|
chars: maxRule,
|
|
41692
|
-
filled:
|
|
41687
|
+
filled: inputData?.value?.length || 0
|
|
41693
41688
|
})
|
|
41694
41689
|
})
|
|
41695
|
-
}) : null,
|
|
41690
|
+
}) : null, input.meta?.comment && isShown ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
41696
41691
|
className: "input-content dynamic-form-comment",
|
|
41697
41692
|
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
41698
41693
|
className: "comment-textarea",
|
|
@@ -41718,7 +41713,7 @@ const GetFormItem = _ref53 => {
|
|
|
41718
41713
|
},
|
|
41719
41714
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
41720
41715
|
type: "link",
|
|
41721
|
-
disabled: !
|
|
41716
|
+
disabled: !input.meta?.comment,
|
|
41722
41717
|
className: "p-0",
|
|
41723
41718
|
children: /*#__PURE__*/jsxRuntime.jsx(Icons.DeleteOutlined, {
|
|
41724
41719
|
width: 16,
|
|
@@ -41749,7 +41744,7 @@ const GetFormItem = _ref53 => {
|
|
|
41749
41744
|
className: "max-char-span",
|
|
41750
41745
|
children: t("max-char", {
|
|
41751
41746
|
chars: MAX_COMMENTS_LENGTH,
|
|
41752
|
-
filled:
|
|
41747
|
+
filled: inputData?.commentValue?.length || 0
|
|
41753
41748
|
})
|
|
41754
41749
|
})]
|
|
41755
41750
|
}) : null]
|
|
@@ -41769,22 +41764,23 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
|
|
|
41769
41764
|
const formId = form.dataId || k;
|
|
41770
41765
|
const allInputs = Object.keys(form.inputs).filter(i => {
|
|
41771
41766
|
const input = form.inputs[i];
|
|
41772
|
-
return !excludedKeys.includes(i) && !input.excludeFromEdit && showHideInput(input, values, undefined, undefined, setValues,
|
|
41767
|
+
return !excludedKeys.includes(i) && !input.excludeFromEdit && showHideInput(input, values, undefined, undefined, setValues, "".concat(formId, ".").concat(i));
|
|
41773
41768
|
});
|
|
41774
41769
|
return allInputs.length ? /*#__PURE__*/jsxRuntime.jsxs(React__default["default"].Fragment, {
|
|
41775
41770
|
children: [getFormTitles(formTitles, formId, i), ['h2', 'h3', 'h4', 'h5', 'h6'].includes(form.type) ? getInputHeadLines(form.type, i, form, values) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
41776
41771
|
children: [!form.repeatable ? /*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
41777
|
-
className:
|
|
41772
|
+
className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " mb0 ").concat(i ? 'mt-3' : ''),
|
|
41778
41773
|
children: getInputLabel(form, values)
|
|
41779
41774
|
}) : !form.hideSectionLabel ? /*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
41780
|
-
className:
|
|
41775
|
+
className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " mb0 ").concat(i ? 'mt-3' : ''),
|
|
41781
41776
|
children: form.sectionLabel ? getSectionLabel(form.sectionLabel, values) : form.label ? getInputLabel(form, values) : camelCaseToTitle(k)
|
|
41782
41777
|
}) : null, /*#__PURE__*/jsxRuntime.jsx(antd.Form.List, {
|
|
41783
41778
|
name: formId,
|
|
41784
|
-
children: (fields, {
|
|
41785
|
-
|
|
41786
|
-
|
|
41787
|
-
|
|
41779
|
+
children: (fields, _ref) => {
|
|
41780
|
+
let {
|
|
41781
|
+
add,
|
|
41782
|
+
remove
|
|
41783
|
+
} = _ref;
|
|
41788
41784
|
const formData = form.repeatable ? values[formId] || [] : values[formId] ? [values[formId]] : [];
|
|
41789
41785
|
if (fields.length === 0) {
|
|
41790
41786
|
const formInputs = form.inputs;
|
|
@@ -41835,7 +41831,7 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
|
|
|
41835
41831
|
padding: '0px 5px',
|
|
41836
41832
|
color: '#2E90FA'
|
|
41837
41833
|
},
|
|
41838
|
-
children:
|
|
41834
|
+
children: "#".concat(field.name + 1)
|
|
41839
41835
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
41840
41836
|
className: "remove-button-for-repeatable",
|
|
41841
41837
|
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, {
|
|
@@ -41857,8 +41853,8 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
|
|
|
41857
41853
|
const inputId = input.dataId || inp;
|
|
41858
41854
|
const inputValues = Array.isArray(values[formId]) ? values[formId][field.name] || {} : values[formId] || {};
|
|
41859
41855
|
const value = inputValues[inputId];
|
|
41860
|
-
const commentValue = inputValues[
|
|
41861
|
-
const inputData = getData(formId, input, value, commentValue,
|
|
41856
|
+
const commentValue = inputValues["".concat(inputId, "Comment")];
|
|
41857
|
+
const inputData = getData(formId, input, value, commentValue, "".concat(formId, "[").concat(field.name, "].").concat(inputId), "".concat(formId, ".").concat(inputId));
|
|
41862
41858
|
const subtitles = form.subtitles || null;
|
|
41863
41859
|
inputData.repeatIndex = field.name;
|
|
41864
41860
|
inputData.inputName = inputId;
|
|
@@ -41879,64 +41875,59 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
|
|
|
41879
41875
|
message: requiredRule.message || ''
|
|
41880
41876
|
});
|
|
41881
41877
|
}
|
|
41882
|
-
return showHideInput(input, values, field.name, inputValues, setValues,
|
|
41878
|
+
return showHideInput(input, values, field.name, inputValues, setValues, "".concat(formId, "[").concat(field.name, "].").concat(inputId)) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
|
|
41883
41879
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
41884
|
-
className: form.repeatable ?
|
|
41880
|
+
className: form.repeatable ? "inputs" : "",
|
|
41885
41881
|
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, {
|
|
41886
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
41887
|
-
|
|
41888
|
-
|
|
41889
|
-
|
|
41890
|
-
|
|
41891
|
-
|
|
41892
|
-
|
|
41893
|
-
|
|
41894
|
-
|
|
41895
|
-
|
|
41896
|
-
|
|
41897
|
-
if (Array.isArray(e)) {
|
|
41898
|
-
return e;
|
|
41899
|
-
}
|
|
41900
|
-
return e && e.fileList && e.fileList.map(f => {
|
|
41901
|
-
if (f.response) {
|
|
41902
|
-
return f.response;
|
|
41903
|
-
}
|
|
41904
|
-
return f;
|
|
41905
|
-
});
|
|
41882
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, field), {}, {
|
|
41883
|
+
required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
|
|
41884
|
+
}, ['total100', 'group'].includes(input.type) ? {} : {
|
|
41885
|
+
name: [field.name, inputId],
|
|
41886
|
+
fieldKey: [field.fieldKey, inputId],
|
|
41887
|
+
initialValue: inputData.value
|
|
41888
|
+
}), ['upload'].includes(input.type) ? {
|
|
41889
|
+
valuePropName: "fileList",
|
|
41890
|
+
getValueFromEvent: e => {
|
|
41891
|
+
if (Array.isArray(e)) {
|
|
41892
|
+
return e;
|
|
41906
41893
|
}
|
|
41907
|
-
|
|
41894
|
+
return e && e.fileList && e.fileList.map(f => {
|
|
41895
|
+
if (f.response) {
|
|
41896
|
+
return f.response;
|
|
41897
|
+
}
|
|
41898
|
+
return f;
|
|
41899
|
+
});
|
|
41900
|
+
}
|
|
41901
|
+
} : {}), {}, {
|
|
41908
41902
|
style: input.showOnView === false ? {
|
|
41909
41903
|
display: 'none'
|
|
41910
|
-
} : {}
|
|
41911
|
-
|
|
41912
|
-
|
|
41913
|
-
|
|
41914
|
-
|
|
41915
|
-
|
|
41916
|
-
|
|
41917
|
-
|
|
41918
|
-
|
|
41919
|
-
|
|
41920
|
-
|
|
41921
|
-
|
|
41922
|
-
} : {}),
|
|
41904
|
+
} : {}
|
|
41905
|
+
}, ['switch'].includes(input.type) ? {
|
|
41906
|
+
labelCol: {
|
|
41907
|
+
span: 20
|
|
41908
|
+
},
|
|
41909
|
+
style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
|
|
41910
|
+
display: 'none'
|
|
41911
|
+
} : {}), {}, {
|
|
41912
|
+
flexDirection: 'row',
|
|
41913
|
+
justifyContent: 'space-between'
|
|
41914
|
+
})
|
|
41915
|
+
} : {}), {}, {
|
|
41923
41916
|
label: getInputLabel(input, values),
|
|
41924
41917
|
rules: rules,
|
|
41925
|
-
className: input.comment ?
|
|
41918
|
+
className: input.comment ? "with-comment i-".concat(input.type) : "i-".concat(input.type),
|
|
41926
41919
|
extra: input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
41927
41920
|
disabled: inputData.props.disabled,
|
|
41928
41921
|
type: "link",
|
|
41929
41922
|
onClick: () => {
|
|
41930
41923
|
const inputValues = Array.isArray(values[formId]) ? values[formId][field.name] || {} : values[formId] || {};
|
|
41931
|
-
inputValues[
|
|
41924
|
+
inputValues["".concat(inputData.inputName, "Comment")] = !inputData.commentValue ? '' : undefined;
|
|
41932
41925
|
if (Array.isArray(values[formId])) {
|
|
41933
41926
|
values[formId][field.name] = inputValues;
|
|
41934
41927
|
} else {
|
|
41935
41928
|
values[formId] = inputValues;
|
|
41936
41929
|
}
|
|
41937
|
-
setValues({
|
|
41938
|
-
...values
|
|
41939
|
-
});
|
|
41930
|
+
setValues(_objectSpread2({}, values));
|
|
41940
41931
|
},
|
|
41941
41932
|
children: t(!inputData.commentValue ? 'Add Comment' : 'Remove Comment')
|
|
41942
41933
|
}) : null,
|
|
@@ -41953,9 +41944,9 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
|
|
|
41953
41944
|
getAppHeader,
|
|
41954
41945
|
getApiBaseUrl
|
|
41955
41946
|
}) : console.log(input)
|
|
41956
|
-
}), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
41957
|
-
name: [field.name,
|
|
41958
|
-
fieldKey: [field.fieldKey,
|
|
41947
|
+
})), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
41948
|
+
name: [field.name, "".concat(inputData.inputName, "Comment")],
|
|
41949
|
+
fieldKey: [field.fieldKey, "".concat(inputData.inputName, "Comment")],
|
|
41959
41950
|
initialValue: inputData.commentValue,
|
|
41960
41951
|
hidden: !inputData.commentValue,
|
|
41961
41952
|
children: inputTypeComponent.comment(inputData, {
|
|
@@ -41969,10 +41960,10 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
|
|
|
41969
41960
|
}) : null]
|
|
41970
41961
|
})]
|
|
41971
41962
|
}, ii)
|
|
41972
|
-
},
|
|
41963
|
+
}, "".concat(i).concat(ii)) : null;
|
|
41973
41964
|
})
|
|
41974
41965
|
})]
|
|
41975
|
-
},
|
|
41966
|
+
}, "".concat(formId, "-").concat(field.name))), form.repeatable ? /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
|
|
41976
41967
|
type: "dashed",
|
|
41977
41968
|
style: {
|
|
41978
41969
|
margin: '10px 0px 30px',
|
|
@@ -42001,7 +41992,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
|
|
|
42001
41992
|
const hasLabel = label && (typeof label === 'string' && (label || '').trim() !== '' || typeof label === 'object') ? true : false;
|
|
42002
41993
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
42003
41994
|
children: [hasLabel ? /*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
42004
|
-
className:
|
|
41995
|
+
className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " ").concat(i ? 'mt-3 mb-1' : ''),
|
|
42005
41996
|
children: label
|
|
42006
41997
|
}) : null, /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
42007
41998
|
className: hasLabel ? "mb-4" : "",
|
|
@@ -42010,8 +42001,8 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
|
|
|
42010
42001
|
const inputId = input.dataId || inp;
|
|
42011
42002
|
const inputValues = Array.isArray(values[formId]) ? values[formId] || {} : values[formId] || {};
|
|
42012
42003
|
const value = inputValues[inputId];
|
|
42013
|
-
const commentValue = inputValues[
|
|
42014
|
-
const inputData = getData(formId, input, value, commentValue,
|
|
42004
|
+
const commentValue = inputValues["".concat(inputId, "Comment")];
|
|
42005
|
+
const inputData = getData(formId, input, value, commentValue, "".concat(formId, ".").concat(inputId), "".concat(formId, ".").concat(inputId));
|
|
42015
42006
|
const subtitles = form.subtitles || null;
|
|
42016
42007
|
inputData.repeatIndex = undefined;
|
|
42017
42008
|
inputData.inputName = inputId;
|
|
@@ -42032,62 +42023,58 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
|
|
|
42032
42023
|
message: requiredRule.message || ''
|
|
42033
42024
|
});
|
|
42034
42025
|
}
|
|
42035
|
-
return showHideInput(input, values, undefined, inputValues, setValues,
|
|
42026
|
+
return showHideInput(input, values, undefined, inputValues, setValues, "".concat(formId, ".").concat(inputId)) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
|
|
42036
42027
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
42037
42028
|
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, {
|
|
42038
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
42039
|
-
required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
|
|
42040
|
-
|
|
42041
|
-
|
|
42042
|
-
|
|
42043
|
-
|
|
42044
|
-
|
|
42045
|
-
|
|
42046
|
-
|
|
42047
|
-
|
|
42048
|
-
|
|
42049
|
-
return e;
|
|
42050
|
-
}
|
|
42051
|
-
return e && e.fileList && e.fileList.map(f => {
|
|
42052
|
-
if (f.response) {
|
|
42053
|
-
return f.response;
|
|
42054
|
-
}
|
|
42055
|
-
return f;
|
|
42056
|
-
});
|
|
42029
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
42030
|
+
required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
|
|
42031
|
+
}, ['total100', 'group'].includes(input.type) ? {} : {
|
|
42032
|
+
name: [formId, inputId],
|
|
42033
|
+
fieldKey: [formId, inputId],
|
|
42034
|
+
initialValue: inputData.value
|
|
42035
|
+
}), ['upload'].includes(input.type) ? {
|
|
42036
|
+
valuePropName: "fileList",
|
|
42037
|
+
getValueFromEvent: e => {
|
|
42038
|
+
if (Array.isArray(e)) {
|
|
42039
|
+
return e;
|
|
42057
42040
|
}
|
|
42058
|
-
|
|
42041
|
+
return e && e.fileList && e.fileList.map(f => {
|
|
42042
|
+
if (f.response) {
|
|
42043
|
+
return f.response;
|
|
42044
|
+
}
|
|
42045
|
+
return f;
|
|
42046
|
+
});
|
|
42047
|
+
}
|
|
42048
|
+
} : {}), {}, {
|
|
42059
42049
|
style: input.showOnView === false ? {
|
|
42060
42050
|
display: 'none'
|
|
42061
|
-
} : {}
|
|
42062
|
-
|
|
42063
|
-
|
|
42064
|
-
|
|
42065
|
-
|
|
42066
|
-
|
|
42067
|
-
|
|
42068
|
-
|
|
42069
|
-
|
|
42070
|
-
|
|
42071
|
-
|
|
42072
|
-
|
|
42073
|
-
} : {}),
|
|
42051
|
+
} : {}
|
|
42052
|
+
}, ['switch'].includes(input.type) ? {
|
|
42053
|
+
labelCol: {
|
|
42054
|
+
span: 20
|
|
42055
|
+
},
|
|
42056
|
+
style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
|
|
42057
|
+
display: 'none'
|
|
42058
|
+
} : {}), {}, {
|
|
42059
|
+
flexDirection: 'row',
|
|
42060
|
+
justifyContent: 'space-between'
|
|
42061
|
+
})
|
|
42062
|
+
} : {}), {}, {
|
|
42074
42063
|
label: getInputLabel(input, values),
|
|
42075
42064
|
rules: rules,
|
|
42076
|
-
className: input.comment ?
|
|
42065
|
+
className: input.comment ? "with-comment i-".concat(input.type) : "i-".concat(input.type),
|
|
42077
42066
|
extra: input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
42078
42067
|
disabled: inputData.props.disabled,
|
|
42079
42068
|
type: "link",
|
|
42080
42069
|
onClick: () => {
|
|
42081
42070
|
const inputValues = Array.isArray(values[formId]) ? values[formId] || {} : values[formId] || {};
|
|
42082
|
-
inputValues[
|
|
42071
|
+
inputValues["".concat(inputData.inputName, "Comment")] = !inputData.commentValue ? '' : undefined;
|
|
42083
42072
|
if (Array.isArray(values[formId])) {
|
|
42084
42073
|
values[formId] = inputValues;
|
|
42085
42074
|
} else {
|
|
42086
42075
|
values[formId] = inputValues;
|
|
42087
42076
|
}
|
|
42088
|
-
setValues({
|
|
42089
|
-
...values
|
|
42090
|
-
});
|
|
42077
|
+
setValues(_objectSpread2({}, values));
|
|
42091
42078
|
},
|
|
42092
42079
|
children: t(!inputData.commentValue ? 'Add Comment' : 'Remove Comment')
|
|
42093
42080
|
}) : null,
|
|
@@ -42102,9 +42089,9 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
|
|
|
42102
42089
|
getAppHeader,
|
|
42103
42090
|
getApiBaseUrl
|
|
42104
42091
|
}) : console.log(input)
|
|
42105
|
-
}), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
42106
|
-
name: [formId,
|
|
42107
|
-
fieldKey: [formId,
|
|
42092
|
+
})), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
42093
|
+
name: [formId, "".concat(inputData.inputName, "Comment")],
|
|
42094
|
+
fieldKey: [formId, "".concat(inputData.inputName, "Comment")],
|
|
42108
42095
|
initialValue: inputData.commentValue,
|
|
42109
42096
|
hidden: !inputData.commentValue,
|
|
42110
42097
|
children: inputTypeComponent.comment(inputData, {
|
|
@@ -42118,7 +42105,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
|
|
|
42118
42105
|
}) : null]
|
|
42119
42106
|
})]
|
|
42120
42107
|
}, ii)
|
|
42121
|
-
},
|
|
42108
|
+
}, "".concat(i).concat(ii)) : null;
|
|
42122
42109
|
})
|
|
42123
42110
|
})]
|
|
42124
42111
|
});
|
|
@@ -42157,7 +42144,10 @@ const useCombinedPrefilledValues = (combinedPrefilledValues, values, parentValue
|
|
|
42157
42144
|
}
|
|
42158
42145
|
});
|
|
42159
42146
|
if (hasChanges) {
|
|
42160
|
-
setValues(prevValues =>
|
|
42147
|
+
setValues(prevValues => ({
|
|
42148
|
+
...prevValues,
|
|
42149
|
+
...resolvedValues
|
|
42150
|
+
}));
|
|
42161
42151
|
MainForm.setFieldsValue(resolvedValues);
|
|
42162
42152
|
}
|
|
42163
42153
|
}, [values, parentValues, combinedPrefilledValues, setValues, MainForm]);
|