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