datastake-daf 0.6.826 → 0.6.828
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 +1126 -1239
- package/dist/hooks/index.js +14 -12
- package/dist/pages/index.js +108 -77
- package/dist/services/index.js +5 -1
- package/package.json +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminTables/EventsTable/helper.js +17 -21
- package/src/@daf/core/components/Screens/Admin/AdminTables/EventsTable/index.jsx +5 -3
- package/src/@daf/core/components/Screens/Admin/AdminTables/hook.js +0 -3
- package/src/@daf/core/components/Screens/Admin/AdminViews/index.jsx +2 -1
- package/src/@daf/hooks/useGetQueryParams.js +44 -25
- package/src/@daf/hooks/useWidgetFetch.js +1 -1
- package/src/@daf/pages/Dashboards/UserDashboard/components/MineSites/index.jsx +3 -1
- package/src/@daf/pages/Locations/MineSite/config.js +1 -1
- package/src/@daf/pages/Stakeholders/Operators/config.js +1 -1
- package/src/@daf/pages/Stakeholders/Workers/config.js +1 -1
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/JobsTimeline/index.jsx +32 -9
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/HealthAndSafety/helper.js +48 -43
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/HealthAndSafety/index.jsx +17 -5
- package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleOutcomes/PlantingActivitiesTimeline.jsx +12 -5
- package/src/@daf/pages/TablePage/hook.js +7 -2
- package/src/@daf/pages/View/index.jsx +1 -1
- package/src/@daf/services/LinkedSubjects.js +5 -1
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$E = ["width", "height", "size", "name", "fill"];
|
|
4831
4831
|
const CustomIcon = _ref => {
|
|
4832
4832
|
let {
|
|
4833
4833
|
width = 14,
|
|
@@ -4836,7 +4836,7 @@ const CustomIcon = _ref => {
|
|
|
4836
4836
|
name = "",
|
|
4837
4837
|
fill = "none"
|
|
4838
4838
|
} = _ref,
|
|
4839
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4839
|
+
props = _objectWithoutProperties(_ref, _excluded$E);
|
|
4840
4840
|
const conf = config$2[name];
|
|
4841
4841
|
if (conf) {
|
|
4842
4842
|
return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -5125,7 +5125,7 @@ createCommonjsModule(function (module, exports) {
|
|
|
5125
5125
|
!function(e,n){module.exports=n();}(commonjsGlobal,(function(){return {name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],t=e%100;return "["+e+(n[(t-20)%10]||n[t]||n[0])+"]"}}}));
|
|
5126
5126
|
});
|
|
5127
5127
|
|
|
5128
|
-
const _excluded$
|
|
5128
|
+
const _excluded$D = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
|
|
5129
5129
|
dayjs__default["default"].extend(customParseFormat);
|
|
5130
5130
|
dayjs__default["default"].extend(utc);
|
|
5131
5131
|
dayjs__default["default"].extend(utc);
|
|
@@ -5501,7 +5501,7 @@ const filterCreateData = data => {
|
|
|
5501
5501
|
createdAt,
|
|
5502
5502
|
updatedAt
|
|
5503
5503
|
} = data,
|
|
5504
|
-
rest = _objectWithoutProperties(data, _excluded$
|
|
5504
|
+
rest = _objectWithoutProperties(data, _excluded$D);
|
|
5505
5505
|
const _meta = isObjectEmpty(meta) ? undefined : meta;
|
|
5506
5506
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
5507
5507
|
meta: _meta
|
|
@@ -6033,7 +6033,7 @@ SelectFilters.propTypes = {
|
|
|
6033
6033
|
apiUrl: PropTypes__default["default"].string
|
|
6034
6034
|
};
|
|
6035
6035
|
|
|
6036
|
-
const _excluded$
|
|
6036
|
+
const _excluded$C = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
|
|
6037
6037
|
function DAFTable(_ref) {
|
|
6038
6038
|
let {
|
|
6039
6039
|
columns = [],
|
|
@@ -6064,7 +6064,7 @@ function DAFTable(_ref) {
|
|
|
6064
6064
|
app,
|
|
6065
6065
|
doEmptyRows
|
|
6066
6066
|
} = _ref,
|
|
6067
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6067
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
6068
6068
|
const source = React.useMemo(() => {
|
|
6069
6069
|
if (data && Array.isArray(data)) {
|
|
6070
6070
|
return data;
|
|
@@ -6889,7 +6889,7 @@ function ComponentWithFocus(_ref) {
|
|
|
6889
6889
|
}
|
|
6890
6890
|
|
|
6891
6891
|
var _templateObject$h;
|
|
6892
|
-
const _excluded$
|
|
6892
|
+
const _excluded$B = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
|
|
6893
6893
|
function StickyTable(_ref) {
|
|
6894
6894
|
let {
|
|
6895
6895
|
size = "small",
|
|
@@ -6900,7 +6900,7 @@ function StickyTable(_ref) {
|
|
|
6900
6900
|
pagination = false,
|
|
6901
6901
|
doEmptyRows = true
|
|
6902
6902
|
} = _ref,
|
|
6903
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6903
|
+
props = _objectWithoutProperties(_ref, _excluded$B);
|
|
6904
6904
|
const data = React__default["default"].useMemo(() => {
|
|
6905
6905
|
if (!doEmptyRows) {
|
|
6906
6906
|
return dataSource;
|
|
@@ -7428,7 +7428,7 @@ const BTN_SIZE = {
|
|
|
7428
7428
|
LG: 'large'
|
|
7429
7429
|
};
|
|
7430
7430
|
|
|
7431
|
-
const _excluded$
|
|
7431
|
+
const _excluded$A = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
|
|
7432
7432
|
function DafButton(_ref) {
|
|
7433
7433
|
let {
|
|
7434
7434
|
content = '',
|
|
@@ -7442,7 +7442,7 @@ function DafButton(_ref) {
|
|
|
7442
7442
|
style = {},
|
|
7443
7443
|
className = ''
|
|
7444
7444
|
} = _ref,
|
|
7445
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
7445
|
+
restProps = _objectWithoutProperties(_ref, _excluded$A);
|
|
7446
7446
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
|
|
7447
7447
|
icon: icon,
|
|
7448
7448
|
type: type,
|
|
@@ -7561,12 +7561,12 @@ const Style$R = styled__default["default"].div`
|
|
|
7561
7561
|
}
|
|
7562
7562
|
`;
|
|
7563
7563
|
|
|
7564
|
-
const _excluded$
|
|
7564
|
+
const _excluded$z = ["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$z);
|
|
7570
7570
|
return /*#__PURE__*/jsxRuntime.jsx(Style$R, {
|
|
7571
7571
|
className: "d-btn-cont",
|
|
7572
7572
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -7706,12 +7706,12 @@ Badge.propTypes = {
|
|
|
7706
7706
|
props: PropTypes__default["default"].object
|
|
7707
7707
|
};
|
|
7708
7708
|
|
|
7709
|
-
const _excluded$
|
|
7709
|
+
const _excluded$y = ["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$y);
|
|
7715
7715
|
let Icon = Icons__namespace.CloseOutlined;
|
|
7716
7716
|
if (Icons__namespace[icon]) {
|
|
7717
7717
|
Icon = Icons__namespace[icon];
|
|
@@ -8041,7 +8041,7 @@ const MultiSelectStyled = styled__default["default"](antd.Select)`
|
|
|
8041
8041
|
}
|
|
8042
8042
|
`;
|
|
8043
8043
|
|
|
8044
|
-
const _excluded$
|
|
8044
|
+
const _excluded$x = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
|
|
8045
8045
|
const {
|
|
8046
8046
|
useToken: useToken$p
|
|
8047
8047
|
} = antd.theme;
|
|
@@ -8134,7 +8134,7 @@ function Multiselect(_ref) {
|
|
|
8134
8134
|
isSingle = false,
|
|
8135
8135
|
selectionType = SELECTION_TYPES.DEFAULT
|
|
8136
8136
|
} = _ref,
|
|
8137
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
8137
|
+
restProps = _objectWithoutProperties(_ref, _excluded$x);
|
|
8138
8138
|
const {
|
|
8139
8139
|
token
|
|
8140
8140
|
} = useToken$p();
|
|
@@ -8854,7 +8854,7 @@ DAFHeader.propTypes = {
|
|
|
8854
8854
|
filtersConfig: PropTypes__default["default"].any
|
|
8855
8855
|
};
|
|
8856
8856
|
|
|
8857
|
-
const _excluded$
|
|
8857
|
+
const _excluded$w = ["tabs", "onChange", "value", "className"];
|
|
8858
8858
|
function TabsHeader(_ref) {
|
|
8859
8859
|
let {
|
|
8860
8860
|
tabs = [],
|
|
@@ -8862,7 +8862,7 @@ function TabsHeader(_ref) {
|
|
|
8862
8862
|
value = '',
|
|
8863
8863
|
className = 'mt-2'
|
|
8864
8864
|
} = _ref,
|
|
8865
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8865
|
+
rest = _objectWithoutProperties(_ref, _excluded$w);
|
|
8866
8866
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8867
8867
|
className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
|
|
8868
8868
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
|
|
@@ -8959,7 +8959,7 @@ DrawerHeader.propTypes = {
|
|
|
8959
8959
|
tabsConfig: PropTypes__default["default"].any
|
|
8960
8960
|
};
|
|
8961
8961
|
|
|
8962
|
-
const _excluded$
|
|
8962
|
+
const _excluded$v = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
|
|
8963
8963
|
const useFooter = _ref => {
|
|
8964
8964
|
let {
|
|
8965
8965
|
leftContent,
|
|
@@ -8994,7 +8994,7 @@ const useFooter = _ref => {
|
|
|
8994
8994
|
style = {},
|
|
8995
8995
|
className = ""
|
|
8996
8996
|
} = button,
|
|
8997
|
-
restProps = _objectWithoutProperties(button, _excluded$
|
|
8997
|
+
restProps = _objectWithoutProperties(button, _excluded$v);
|
|
8998
8998
|
return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
|
|
8999
8999
|
content: label,
|
|
9000
9000
|
type: type,
|
|
@@ -11875,7 +11875,7 @@ Widget.propTypes = {
|
|
|
11875
11875
|
};
|
|
11876
11876
|
Widget.displayName = 'Widget';
|
|
11877
11877
|
|
|
11878
|
-
const _excluded$
|
|
11878
|
+
const _excluded$u = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
|
|
11879
11879
|
function ImageWidget(_ref) {
|
|
11880
11880
|
let {
|
|
11881
11881
|
loading = false,
|
|
@@ -11886,7 +11886,7 @@ function ImageWidget(_ref) {
|
|
|
11886
11886
|
noDescriptionText,
|
|
11887
11887
|
isPdf = false
|
|
11888
11888
|
} = _ref,
|
|
11889
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11889
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
11890
11890
|
const expandable = isPdf ? false : props.expandable;
|
|
11891
11891
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
11892
11892
|
loading: loading,
|
|
@@ -11946,7 +11946,7 @@ function ImageWidget(_ref) {
|
|
|
11946
11946
|
ImageWidget.displayName = 'ImageWidget';
|
|
11947
11947
|
|
|
11948
11948
|
var _templateObject$e;
|
|
11949
|
-
const _excluded$
|
|
11949
|
+
const _excluded$t = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
|
|
11950
11950
|
function FlowWidget(_ref) {
|
|
11951
11951
|
let {
|
|
11952
11952
|
title,
|
|
@@ -11958,7 +11958,7 @@ function FlowWidget(_ref) {
|
|
|
11958
11958
|
className,
|
|
11959
11959
|
direction = "horizontal"
|
|
11960
11960
|
} = _ref,
|
|
11961
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11961
|
+
rest = _objectWithoutProperties(_ref, _excluded$t);
|
|
11962
11962
|
const [activeTab, setActiveTab] = React.useState();
|
|
11963
11963
|
React.useEffect(() => {
|
|
11964
11964
|
if (defaultActiveTab) {
|
|
@@ -15689,7 +15689,7 @@ Map$3.propTypes = {
|
|
|
15689
15689
|
link: PropTypes__default["default"].any
|
|
15690
15690
|
};
|
|
15691
15691
|
|
|
15692
|
-
const _excluded$
|
|
15692
|
+
const _excluded$s = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
|
|
15693
15693
|
function InExpandableWidgetMap(_ref) {
|
|
15694
15694
|
let {
|
|
15695
15695
|
isExpanded,
|
|
@@ -15703,7 +15703,7 @@ function InExpandableWidgetMap(_ref) {
|
|
|
15703
15703
|
height,
|
|
15704
15704
|
widgetConfig
|
|
15705
15705
|
} = _ref,
|
|
15706
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15706
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
15707
15707
|
const [mapKey, setMapKey] = React.useState(0);
|
|
15708
15708
|
const [isMapReady, setIsMapReady] = React.useState(false);
|
|
15709
15709
|
React.useEffect(() => {
|
|
@@ -17903,14 +17903,14 @@ const MapConfig = ({
|
|
|
17903
17903
|
});
|
|
17904
17904
|
};
|
|
17905
17905
|
|
|
17906
|
-
const _excluded$
|
|
17906
|
+
const _excluded$r = ["config", "title", "loading"];
|
|
17907
17907
|
const Details = _ref => {
|
|
17908
17908
|
let {
|
|
17909
17909
|
config = [],
|
|
17910
17910
|
title,
|
|
17911
17911
|
loading = false
|
|
17912
17912
|
} = _ref,
|
|
17913
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17913
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
17914
17914
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
17915
17915
|
className: "with-border-header h-w-btn-header card",
|
|
17916
17916
|
loading: loading,
|
|
@@ -17926,14 +17926,14 @@ const Details = _ref => {
|
|
|
17926
17926
|
}));
|
|
17927
17927
|
};
|
|
17928
17928
|
|
|
17929
|
-
const _excluded$
|
|
17929
|
+
const _excluded$q = ["config", "title", "loading"];
|
|
17930
17930
|
const KeyIndicatorsDetails = _ref => {
|
|
17931
17931
|
let {
|
|
17932
17932
|
config,
|
|
17933
17933
|
title,
|
|
17934
17934
|
loading = false
|
|
17935
17935
|
} = _ref,
|
|
17936
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17936
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
17937
17937
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
17938
17938
|
className: "with-border-header h-w-btn-header",
|
|
17939
17939
|
title: title,
|
|
@@ -17963,7 +17963,7 @@ const Style$G = styled__default["default"].div`
|
|
|
17963
17963
|
}
|
|
17964
17964
|
`;
|
|
17965
17965
|
|
|
17966
|
-
const _excluded$
|
|
17966
|
+
const _excluded$p = ["children", "config", "detailsTitle", "firstColumnWidth"];
|
|
17967
17967
|
const DetailsSection = _ref => {
|
|
17968
17968
|
let {
|
|
17969
17969
|
children,
|
|
@@ -17971,7 +17971,7 @@ const DetailsSection = _ref => {
|
|
|
17971
17971
|
detailsTitle,
|
|
17972
17972
|
firstColumnWidth = "250px"
|
|
17973
17973
|
} = _ref,
|
|
17974
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17974
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
17975
17975
|
return /*#__PURE__*/jsxRuntime.jsx(Style$G, {
|
|
17976
17976
|
firstColumnWidth: firstColumnWidth,
|
|
17977
17977
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -18147,14 +18147,14 @@ const getGoalConfig = () => {
|
|
|
18147
18147
|
};
|
|
18148
18148
|
|
|
18149
18149
|
var _templateObject$c;
|
|
18150
|
-
const _excluded$
|
|
18150
|
+
const _excluded$o = ["title", "activeSdgGoals", "t"];
|
|
18151
18151
|
function SDGWidget(_ref) {
|
|
18152
18152
|
let {
|
|
18153
18153
|
title = "Sustainable Development Goals",
|
|
18154
18154
|
activeSdgGoals = [],
|
|
18155
18155
|
t = key => key
|
|
18156
18156
|
} = _ref,
|
|
18157
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
18157
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
18158
18158
|
const sdgConfig = getGoalConfig();
|
|
18159
18159
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
18160
18160
|
title: title,
|
|
@@ -18452,7 +18452,7 @@ function SdgList({
|
|
|
18452
18452
|
});
|
|
18453
18453
|
}
|
|
18454
18454
|
|
|
18455
|
-
const _excluded$
|
|
18455
|
+
const _excluded$n = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
|
|
18456
18456
|
const {
|
|
18457
18457
|
Meta
|
|
18458
18458
|
} = antd.Card;
|
|
@@ -18472,7 +18472,7 @@ function ProjectWidget(_ref) {
|
|
|
18472
18472
|
hideSDGList = false,
|
|
18473
18473
|
t = x => x
|
|
18474
18474
|
} = _ref,
|
|
18475
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
18475
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
18476
18476
|
const [isHovered, setIsHovered] = React__default["default"].useState(false);
|
|
18477
18477
|
const {
|
|
18478
18478
|
token
|
|
@@ -18744,13 +18744,13 @@ const WidgetCard = _ref => {
|
|
|
18744
18744
|
});
|
|
18745
18745
|
};
|
|
18746
18746
|
|
|
18747
|
-
const _excluded$
|
|
18747
|
+
const _excluded$m = ["title", "children"];
|
|
18748
18748
|
const CarouselWidget = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
18749
18749
|
let {
|
|
18750
18750
|
title,
|
|
18751
18751
|
children
|
|
18752
18752
|
} = _ref,
|
|
18753
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18753
|
+
rest = _objectWithoutProperties(_ref, _excluded$m);
|
|
18754
18754
|
/**
|
|
18755
18755
|
* Handles carousel slide change events
|
|
18756
18756
|
* @param {number} currentSlide - The index of the current slide after change
|
|
@@ -18914,7 +18914,7 @@ const EmptyStateContainer = styled__default["default"].div`
|
|
|
18914
18914
|
}
|
|
18915
18915
|
`;
|
|
18916
18916
|
|
|
18917
|
-
const _excluded$
|
|
18917
|
+
const _excluded$l = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
|
|
18918
18918
|
function ImageCarousel(_ref) {
|
|
18919
18919
|
let {
|
|
18920
18920
|
title,
|
|
@@ -18929,7 +18929,7 @@ function ImageCarousel(_ref) {
|
|
|
18929
18929
|
emptyLogo = antd.Empty.PRESENTED_IMAGE_SIMPLE,
|
|
18930
18930
|
emptyText = "No Image"
|
|
18931
18931
|
} = _ref,
|
|
18932
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18932
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
18933
18933
|
const [previewVisible, setPreviewVisible] = React.useState(false);
|
|
18934
18934
|
const [current, setCurrent] = React.useState(0);
|
|
18935
18935
|
const carouselRef = React.useRef(null);
|
|
@@ -19298,7 +19298,7 @@ const getVegetationConfig = () => {
|
|
|
19298
19298
|
};
|
|
19299
19299
|
|
|
19300
19300
|
var _templateObject$a, _templateObject2$3;
|
|
19301
|
-
const _excluded$
|
|
19301
|
+
const _excluded$k = ["title", "activeVegetationConditions", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "growthObservations", "t"];
|
|
19302
19302
|
function VegetationWidget(_ref) {
|
|
19303
19303
|
let {
|
|
19304
19304
|
title = "Vegetation Health",
|
|
@@ -19310,7 +19310,7 @@ function VegetationWidget(_ref) {
|
|
|
19310
19310
|
growthObservations = [],
|
|
19311
19311
|
t = key => key
|
|
19312
19312
|
} = _ref,
|
|
19313
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19313
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
19314
19314
|
let vegetationConfig = getVegetationConfig();
|
|
19315
19315
|
const allVegetationKeys = vegetationConfig.map(item => item.key);
|
|
19316
19316
|
if (filterKeys && Array.isArray(filterKeys)) {
|
|
@@ -19426,7 +19426,7 @@ const getFaunaConfig = () => {
|
|
|
19426
19426
|
};
|
|
19427
19427
|
|
|
19428
19428
|
var _templateObject$9, _templateObject2$2;
|
|
19429
|
-
const _excluded$
|
|
19429
|
+
const _excluded$j = ["title", "faunaPresent", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
|
|
19430
19430
|
function FaunaWidget(_ref) {
|
|
19431
19431
|
let {
|
|
19432
19432
|
title = "Observed Fauna",
|
|
@@ -19437,7 +19437,7 @@ function FaunaWidget(_ref) {
|
|
|
19437
19437
|
itemHeight = 100,
|
|
19438
19438
|
t = key => key
|
|
19439
19439
|
} = _ref,
|
|
19440
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19440
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
19441
19441
|
let faunaConfig = getFaunaConfig();
|
|
19442
19442
|
|
|
19443
19443
|
// Filter to show only specific keys if filterKeys is provided
|
|
@@ -19502,7 +19502,7 @@ const getInvasiveSpeciesConfig = () => {
|
|
|
19502
19502
|
};
|
|
19503
19503
|
|
|
19504
19504
|
var _templateObject$8, _templateObject2$1;
|
|
19505
|
-
const _excluded$
|
|
19505
|
+
const _excluded$i = ["title", "invasiveSpecies", "hasInvasiveSpecies", "filterKeys", "columnsPerRow", "itemWidth", "itemHeight", "t"];
|
|
19506
19506
|
function InvasiveSpeciesWidget(_ref) {
|
|
19507
19507
|
let {
|
|
19508
19508
|
title = "Invasive Species",
|
|
@@ -19514,7 +19514,7 @@ function InvasiveSpeciesWidget(_ref) {
|
|
|
19514
19514
|
itemHeight = 100,
|
|
19515
19515
|
t = key => key
|
|
19516
19516
|
} = _ref,
|
|
19517
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19517
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
19518
19518
|
let invasiveSpeciesConfig = getInvasiveSpeciesConfig();
|
|
19519
19519
|
|
|
19520
19520
|
// Filter to show only specific keys if filterKeys is provided
|
|
@@ -24937,8 +24937,8 @@ const RepeatableModals = ({
|
|
|
24937
24937
|
}) : null;
|
|
24938
24938
|
};
|
|
24939
24939
|
|
|
24940
|
-
const _excluded$
|
|
24941
|
-
_excluded2$
|
|
24940
|
+
const _excluded$h = ["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$h);
|
|
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$g = ["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$g);
|
|
25316
25316
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Modal, _objectSpread2(_objectSpread2({
|
|
25317
25317
|
width: 650,
|
|
25318
25318
|
footer: null,
|
|
@@ -35920,11 +35920,13 @@ const beforeUpload = allowedExtensions => file => {
|
|
|
35920
35920
|
};
|
|
35921
35921
|
const allowedImageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.avif', '.bmp', '.tiff', '.tif', '.heif', '.heic', '.svg', '.ico'];
|
|
35922
35922
|
|
|
35923
|
-
|
|
35923
|
+
const _excluded$f = ["placeholder"],
|
|
35924
|
+
_excluded2$1 = ["label", "description", "excludeFromEdit", "showFormIf", "icon", "position", "template", "formClass"];
|
|
35924
35925
|
dayjs__default["default"].extend(utc);
|
|
35925
35926
|
dayjs__default["default"].extend(timezone);
|
|
35926
35927
|
dayjs__default["default"].tz.setDefault("UTC");
|
|
35927
|
-
const getDefaultInputValue = (
|
|
35928
|
+
const getDefaultInputValue = function () {
|
|
35929
|
+
let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
35928
35930
|
let value = undefined;
|
|
35929
35931
|
if (input.type === "multiselect") {
|
|
35930
35932
|
value = [];
|
|
@@ -35942,33 +35944,30 @@ const checkCondition$1 = (condition, repeatValues, formsValue) => {
|
|
|
35942
35944
|
const isShown = _checkValue(isNotEmpty ? field : wantedValue, match, isNotEmpty ? formValue : value);
|
|
35943
35945
|
return isShown;
|
|
35944
35946
|
};
|
|
35945
|
-
const renderDataLinkGroup =
|
|
35946
|
-
|
|
35947
|
-
|
|
35948
|
-
|
|
35949
|
-
|
|
35950
|
-
|
|
35951
|
-
|
|
35952
|
-
|
|
35953
|
-
|
|
35954
|
-
|
|
35955
|
-
|
|
35956
|
-
|
|
35957
|
-
|
|
35958
|
-
const
|
|
35959
|
-
|
|
35947
|
+
const renderDataLinkGroup = _ref2 => {
|
|
35948
|
+
var _input$meta, _formsValue$meta, _input$meta2;
|
|
35949
|
+
let {
|
|
35950
|
+
input,
|
|
35951
|
+
groupFormId,
|
|
35952
|
+
name,
|
|
35953
|
+
formsValue,
|
|
35954
|
+
form,
|
|
35955
|
+
onValuesChange,
|
|
35956
|
+
setValues,
|
|
35957
|
+
changeLinking,
|
|
35958
|
+
isHighlighted
|
|
35959
|
+
} = _ref2;
|
|
35960
|
+
const dataLinkKey = Object.keys((input === null || input === void 0 ? void 0 : input.inputs) || {}).find(k => {
|
|
35961
|
+
var _input$inputs$k;
|
|
35962
|
+
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";
|
|
35963
|
+
});
|
|
35964
|
+
const dataLinkInput = ((input === null || input === void 0 ? void 0 : input.inputs) || {})[dataLinkKey];
|
|
35965
|
+
const otherInputs = Object.keys((input === null || input === void 0 ? void 0 : input.inputs) || {}).filter(k => k !== dataLinkKey).reduce((all, key) => {
|
|
35966
|
+
all[key] = input === null || input === void 0 ? void 0 : input.inputs[key];
|
|
35960
35967
|
return all;
|
|
35961
35968
|
}, {});
|
|
35962
|
-
const isSingle = input
|
|
35963
|
-
const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [{
|
|
35964
|
-
...(formsValue[groupFormId] || {})[name]
|
|
35965
|
-
}] : [] : getArray((formsValue[groupFormId] || {})[name] || []).map(v => ({
|
|
35966
|
-
...v
|
|
35967
|
-
})) : isSingle ? formsValue[name] ? [{
|
|
35968
|
-
...formsValue[name]
|
|
35969
|
-
}] : [] : getArray(formsValue[name] || []).map(v => ({
|
|
35970
|
-
...v
|
|
35971
|
-
}));
|
|
35969
|
+
const isSingle = (input === null || input === void 0 || (_input$meta = input.meta) === null || _input$meta === void 0 ? void 0 : _input$meta.maxRepeat) === 1;
|
|
35970
|
+
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));
|
|
35972
35971
|
const onUpdate = (val, i) => {
|
|
35973
35972
|
const _val = isSingle ? {
|
|
35974
35973
|
[name]: val
|
|
@@ -35976,31 +35975,20 @@ const renderDataLinkGroup = ({
|
|
|
35976
35975
|
[name]: formData.map((d, j) => i === j ? val : d)
|
|
35977
35976
|
};
|
|
35978
35977
|
if (groupFormId) {
|
|
35979
|
-
const _defaultData = form
|
|
35980
|
-
const _newData = {
|
|
35981
|
-
|
|
35982
|
-
..._val
|
|
35983
|
-
};
|
|
35984
|
-
onValuesChange(_newData, {
|
|
35985
|
-
...formsValue,
|
|
35978
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
35979
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
35980
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
35986
35981
|
[groupFormId]: _newData
|
|
35987
|
-
});
|
|
35988
|
-
form
|
|
35989
|
-
setValues({
|
|
35990
|
-
...formsValue,
|
|
35982
|
+
}));
|
|
35983
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
35984
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
35991
35985
|
[groupFormId]: _newData
|
|
35992
|
-
});
|
|
35986
|
+
}));
|
|
35993
35987
|
return;
|
|
35994
35988
|
}
|
|
35995
|
-
onValuesChange(_val, {
|
|
35996
|
-
|
|
35997
|
-
|
|
35998
|
-
});
|
|
35999
|
-
form?.setFieldValue(name, _val[name]);
|
|
36000
|
-
setValues({
|
|
36001
|
-
...formsValue,
|
|
36002
|
-
..._val
|
|
36003
|
-
});
|
|
35989
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
35990
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
35991
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
36004
35992
|
};
|
|
36005
35993
|
return /*#__PURE__*/jsxRuntime.jsx(DataLinkGroup, {
|
|
36006
35994
|
form: input,
|
|
@@ -36011,102 +35999,79 @@ const renderDataLinkGroup = ({
|
|
|
36011
35999
|
isHighlighted: isHighlighted,
|
|
36012
36000
|
dataLinkInput: dataLinkInput,
|
|
36013
36001
|
formsValue: formsValue,
|
|
36014
|
-
values: groupFormId ? {
|
|
36015
|
-
...(formsValue[groupFormId] || {}),
|
|
36002
|
+
values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
|
|
36016
36003
|
meta: {
|
|
36017
|
-
inputs: (formsValue
|
|
36004
|
+
inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta = formsValue.meta) === null || _formsValue$meta === void 0 ? void 0 : _formsValue$meta.inputs) || {})[groupFormId]
|
|
36018
36005
|
}
|
|
36019
|
-
} : formsValue,
|
|
36006
|
+
}) : formsValue,
|
|
36020
36007
|
name: name,
|
|
36021
36008
|
groupFormId: groupFormId,
|
|
36022
|
-
maxRepeat: input
|
|
36023
|
-
remove:
|
|
36024
|
-
|
|
36025
|
-
|
|
36009
|
+
maxRepeat: input === null || input === void 0 || (_input$meta2 = input.meta) === null || _input$meta2 === void 0 ? void 0 : _input$meta2.maxRepeat,
|
|
36010
|
+
remove: _ref3 => {
|
|
36011
|
+
let {
|
|
36012
|
+
key
|
|
36013
|
+
} = _ref3;
|
|
36026
36014
|
const _val = isSingle ? {
|
|
36027
36015
|
[name]: null
|
|
36028
36016
|
} : {
|
|
36029
36017
|
[name]: formData.filter((v, j) => j !== key)
|
|
36030
36018
|
};
|
|
36031
36019
|
if (groupFormId) {
|
|
36032
|
-
const _defaultData = form
|
|
36033
|
-
const _newData = {
|
|
36034
|
-
|
|
36035
|
-
..._val
|
|
36036
|
-
};
|
|
36037
|
-
onValuesChange(_newData, {
|
|
36038
|
-
...formsValue,
|
|
36020
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
36021
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
36022
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
36039
36023
|
[groupFormId]: _newData
|
|
36040
|
-
});
|
|
36041
|
-
form
|
|
36042
|
-
setValues({
|
|
36043
|
-
...formsValue,
|
|
36024
|
+
}));
|
|
36025
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
36026
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
36044
36027
|
[groupFormId]: _newData
|
|
36045
|
-
});
|
|
36028
|
+
}));
|
|
36046
36029
|
return;
|
|
36047
36030
|
}
|
|
36048
|
-
onValuesChange(_val, {
|
|
36049
|
-
|
|
36050
|
-
|
|
36051
|
-
});
|
|
36052
|
-
form?.setFieldValue(name, _val[name]);
|
|
36053
|
-
setValues({
|
|
36054
|
-
...formsValue,
|
|
36055
|
-
..._val
|
|
36056
|
-
});
|
|
36031
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
36032
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
36033
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
36057
36034
|
},
|
|
36058
36035
|
add: val => {
|
|
36059
36036
|
const _val = isSingle ? {
|
|
36060
36037
|
[name]: val
|
|
36061
36038
|
} : {
|
|
36062
|
-
[name]: [...formData, {
|
|
36063
|
-
...val
|
|
36064
|
-
}]
|
|
36039
|
+
[name]: [...formData, _objectSpread2({}, val)]
|
|
36065
36040
|
};
|
|
36066
36041
|
if (groupFormId) {
|
|
36067
|
-
const _defaultData = form
|
|
36068
|
-
const _newData = {
|
|
36069
|
-
|
|
36070
|
-
|
|
36071
|
-
};
|
|
36072
|
-
form?.setFieldValue(groupFormId, _newData);
|
|
36073
|
-
onValuesChange(_newData, {
|
|
36074
|
-
...formsValue,
|
|
36042
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
36043
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
36044
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
36045
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
36075
36046
|
[groupFormId]: _newData
|
|
36076
|
-
});
|
|
36077
|
-
setValues({
|
|
36078
|
-
...formsValue,
|
|
36047
|
+
}));
|
|
36048
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
36079
36049
|
[groupFormId]: _newData
|
|
36080
|
-
});
|
|
36050
|
+
}));
|
|
36081
36051
|
return;
|
|
36082
36052
|
}
|
|
36083
|
-
form
|
|
36084
|
-
onValuesChange(_val, {
|
|
36085
|
-
|
|
36086
|
-
..._val
|
|
36087
|
-
});
|
|
36088
|
-
setValues({
|
|
36089
|
-
...formsValue,
|
|
36090
|
-
..._val
|
|
36091
|
-
});
|
|
36053
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
36054
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
36055
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
36092
36056
|
},
|
|
36093
36057
|
k: name,
|
|
36094
36058
|
formData: formData
|
|
36095
36059
|
});
|
|
36096
36060
|
};
|
|
36097
36061
|
function showHideInput$1(input, data, repeatIndex, repeatValues, inputMeta) {
|
|
36098
|
-
|
|
36062
|
+
var _input$meta3, _data$meta;
|
|
36063
|
+
if (inputMeta !== null && inputMeta !== void 0 && inputMeta.notApplicable || inputMeta !== null && inputMeta !== void 0 && inputMeta.notAvailable) {
|
|
36099
36064
|
return false;
|
|
36100
36065
|
}
|
|
36101
|
-
if (typeof input
|
|
36102
|
-
|
|
36066
|
+
if (typeof (input === null || input === void 0 || (_input$meta3 = input.meta) === null || _input$meta3 === void 0 ? void 0 : _input$meta3.excludeFromEdit) === "boolean") {
|
|
36067
|
+
var _input$meta4;
|
|
36068
|
+
return !(input !== null && input !== void 0 && (_input$meta4 = input.meta) !== null && _input$meta4 !== void 0 && _input$meta4.excludeFromEdit);
|
|
36103
36069
|
}
|
|
36104
|
-
const formsValue = {
|
|
36105
|
-
|
|
36106
|
-
|
|
36107
|
-
|
|
36108
|
-
|
|
36109
|
-
if (input?.notApplicable || input?.notAvailable) {
|
|
36070
|
+
const formsValue = _objectSpread2({}, data);
|
|
36071
|
+
Object.keys((data === null || data === void 0 || (_data$meta = data.meta) === null || _data$meta === void 0 ? void 0 : _data$meta.inputs) || {}).forEach(key => {
|
|
36072
|
+
var _data$meta2;
|
|
36073
|
+
const input = data === null || data === void 0 || (_data$meta2 = data.meta) === null || _data$meta2 === void 0 ? void 0 : _data$meta2.inputs[key];
|
|
36074
|
+
if (input !== null && input !== void 0 && input.notApplicable || input !== null && input !== void 0 && input.notAvailable) {
|
|
36110
36075
|
formsValue[key] = undefined;
|
|
36111
36076
|
delete formsValue[key];
|
|
36112
36077
|
}
|
|
@@ -36165,35 +36130,35 @@ function getInputHeadLines$1(type, i, input, values) {
|
|
|
36165
36130
|
switch (type) {
|
|
36166
36131
|
case "h2":
|
|
36167
36132
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
36168
|
-
className:
|
|
36133
|
+
className: "title-semibold-2 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
|
|
36169
36134
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
36170
36135
|
children: getInputLabel$1(input, values)
|
|
36171
36136
|
})
|
|
36172
36137
|
});
|
|
36173
36138
|
case "h3":
|
|
36174
36139
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
36175
|
-
className:
|
|
36140
|
+
className: "title-semibold-3 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
|
|
36176
36141
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
36177
36142
|
children: getInputLabel$1(input, values)
|
|
36178
36143
|
})
|
|
36179
36144
|
});
|
|
36180
36145
|
case "h4":
|
|
36181
36146
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
36182
|
-
className:
|
|
36147
|
+
className: "title-semibold-4 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
|
|
36183
36148
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
36184
36149
|
children: getInputLabel$1(input, values)
|
|
36185
36150
|
})
|
|
36186
36151
|
});
|
|
36187
36152
|
case "h5":
|
|
36188
36153
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
36189
|
-
className:
|
|
36154
|
+
className: "title-semibold-5 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
|
|
36190
36155
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
36191
36156
|
children: getInputLabel$1(input, values)
|
|
36192
36157
|
})
|
|
36193
36158
|
});
|
|
36194
36159
|
case "h6":
|
|
36195
36160
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
36196
|
-
className:
|
|
36161
|
+
className: "title-semibold-6 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
|
|
36197
36162
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
36198
36163
|
children: getInputLabel$1(input, values)
|
|
36199
36164
|
})
|
|
@@ -36202,15 +36167,16 @@ function getInputHeadLines$1(type, i, input, values) {
|
|
|
36202
36167
|
return null;
|
|
36203
36168
|
}
|
|
36204
36169
|
}
|
|
36205
|
-
function getInputProp(prop
|
|
36170
|
+
function getInputProp(prop) {
|
|
36171
|
+
let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
36172
|
+
let scope = arguments.length > 2 ? arguments[2] : undefined;
|
|
36206
36173
|
if (prop && typeof prop === "object") {
|
|
36207
36174
|
const validations = Object.keys(prop);
|
|
36208
36175
|
const key = validations.find(v => {
|
|
36209
36176
|
let [path, match, wantedValue] = v.split(/( is | includes | not | notEmpty )/gim);
|
|
36210
|
-
const value = dot__default["default"].pick(path, {
|
|
36211
|
-
...formsValue,
|
|
36177
|
+
const value = dot__default["default"].pick(path, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
36212
36178
|
scope
|
|
36213
|
-
});
|
|
36179
|
+
}));
|
|
36214
36180
|
return _checkValue(wantedValue, match, value);
|
|
36215
36181
|
});
|
|
36216
36182
|
const label = key ? prop[key] : prop[validations[0]];
|
|
@@ -36219,29 +36185,33 @@ function getInputProp(prop, formsValue = {}, scope) {
|
|
|
36219
36185
|
return prop;
|
|
36220
36186
|
}
|
|
36221
36187
|
}
|
|
36222
|
-
function getInputLabel$1(input
|
|
36188
|
+
function getInputLabel$1(input) {
|
|
36189
|
+
let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
36190
|
+
let asText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
36223
36191
|
return /*#__PURE__*/jsxRuntime.jsx(InputLabel, {
|
|
36224
36192
|
input: input,
|
|
36225
36193
|
formsValue: formsValue,
|
|
36226
36194
|
asText: asText
|
|
36227
36195
|
});
|
|
36228
36196
|
}
|
|
36229
|
-
const InputLabel =
|
|
36230
|
-
|
|
36231
|
-
|
|
36232
|
-
|
|
36233
|
-
|
|
36197
|
+
const InputLabel = _ref4 => {
|
|
36198
|
+
var _input$meta5, _input$meta6, _input$meta7;
|
|
36199
|
+
let {
|
|
36200
|
+
input,
|
|
36201
|
+
formsValue,
|
|
36202
|
+
asText
|
|
36203
|
+
} = _ref4;
|
|
36234
36204
|
const {
|
|
36235
36205
|
t,
|
|
36236
36206
|
evaluationConfig,
|
|
36237
36207
|
scope
|
|
36238
36208
|
} = useEditContext();
|
|
36239
36209
|
const label = getInputProp(input.label, formsValue, scope);
|
|
36240
|
-
return input
|
|
36210
|
+
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, {
|
|
36241
36211
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
36242
36212
|
className: "flex",
|
|
36243
36213
|
children: [ReactHtmlParser__default["default"](label), /*#__PURE__*/jsxRuntime.jsx(antd.Popover, {
|
|
36244
|
-
content: input
|
|
36214
|
+
content: input !== null && input !== void 0 && (_input$meta6 = input.meta) !== null && _input$meta6 !== void 0 && _input$meta6.isEvaluation ? /*#__PURE__*/jsxRuntime.jsx(EvaluationPopover, {
|
|
36245
36215
|
t: t,
|
|
36246
36216
|
evaluationConfig: evaluationConfig
|
|
36247
36217
|
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -36249,7 +36219,7 @@ const InputLabel = ({
|
|
|
36249
36219
|
children: ReactHtmlParser__default["default"](input.description)
|
|
36250
36220
|
}),
|
|
36251
36221
|
placement: "top",
|
|
36252
|
-
children: !input
|
|
36222
|
+
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", {
|
|
36253
36223
|
className: "flex flex-column justify-content-center ml-1",
|
|
36254
36224
|
children: /*#__PURE__*/jsxRuntime.jsx(TooltipIcon, {
|
|
36255
36225
|
fontSize: 13
|
|
@@ -36271,7 +36241,9 @@ function getSectionLabel$1(labels, values) {
|
|
|
36271
36241
|
}
|
|
36272
36242
|
return labels;
|
|
36273
36243
|
}
|
|
36274
|
-
function getSubtitles$1(subtitles, position
|
|
36244
|
+
function getSubtitles$1(subtitles, position) {
|
|
36245
|
+
let formsValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
36246
|
+
let repeatValues = arguments.length > 4 ? arguments[4] : undefined;
|
|
36275
36247
|
let subtitle = subtitles && subtitles[position];
|
|
36276
36248
|
if (subtitle && typeof subtitle === "object") {
|
|
36277
36249
|
let newSubtitle = subtitle.default || "";
|
|
@@ -36315,14 +36287,12 @@ function getSubtitles$1(subtitles, position, formsValue = {}, repeatIndex, repea
|
|
|
36315
36287
|
function getFormTitles$1(titles, key, position) {
|
|
36316
36288
|
let tilte = titles && titles[key];
|
|
36317
36289
|
return tilte ? /*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
36318
|
-
className:
|
|
36290
|
+
className: "title-semibold-3 mb0 ".concat(position ? "mt-3" : ""),
|
|
36319
36291
|
children: tilte
|
|
36320
36292
|
}) : null;
|
|
36321
36293
|
}
|
|
36322
36294
|
const updateFormValues$1 = (repeatIndex, repeatValues, inputName, value, formsValue, name, mainForm) => {
|
|
36323
|
-
formsValue = Object.assign(formsValue, {
|
|
36324
|
-
...mainForm.getFieldsValue(true)
|
|
36325
|
-
});
|
|
36295
|
+
formsValue = Object.assign(formsValue, _objectSpread2({}, mainForm.getFieldsValue(true)));
|
|
36326
36296
|
if (typeof repeatIndex === "number" && repeatValues) {
|
|
36327
36297
|
if (!repeatValues[inputName] || !___default["default"].isEqual(repeatValues[inputName], value)) {
|
|
36328
36298
|
repeatValues[inputName] = value;
|
|
@@ -36357,14 +36327,16 @@ const updateFormValues$1 = (repeatIndex, repeatValues, inputName, value, formsVa
|
|
|
36357
36327
|
};
|
|
36358
36328
|
const inputOnBlur = [];
|
|
36359
36329
|
const inputTypeComponent$1 = {
|
|
36360
|
-
text: ({
|
|
36361
|
-
|
|
36362
|
-
|
|
36363
|
-
|
|
36364
|
-
|
|
36365
|
-
|
|
36366
|
-
|
|
36367
|
-
|
|
36330
|
+
text: (_ref5, _ref6) => {
|
|
36331
|
+
let {
|
|
36332
|
+
props,
|
|
36333
|
+
rules
|
|
36334
|
+
} = _ref5;
|
|
36335
|
+
let {
|
|
36336
|
+
inputMeta = {},
|
|
36337
|
+
t,
|
|
36338
|
+
isHighlighted
|
|
36339
|
+
} = _ref6;
|
|
36368
36340
|
const maxRule = rules.find(r => r.max);
|
|
36369
36341
|
const maxProps = {
|
|
36370
36342
|
maxLength: MAX_TEXT_AREA_LENGTH
|
|
@@ -36372,26 +36344,28 @@ const inputTypeComponent$1 = {
|
|
|
36372
36344
|
if (maxRule) {
|
|
36373
36345
|
maxProps.maxLength = maxRule.max;
|
|
36374
36346
|
}
|
|
36375
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
|
|
36376
|
-
size: "large"
|
|
36377
|
-
|
|
36347
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
|
|
36348
|
+
size: "large"
|
|
36349
|
+
}, maxProps), {}, {
|
|
36378
36350
|
allowClear: true,
|
|
36379
36351
|
autoComplete: "new-password",
|
|
36380
|
-
type: "text"
|
|
36381
|
-
|
|
36352
|
+
type: "text"
|
|
36353
|
+
}, props), {}, {
|
|
36382
36354
|
className: formatClassname([isHighlighted && "highlighted-input"]),
|
|
36383
36355
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
36384
36356
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
|
|
36385
|
-
});
|
|
36357
|
+
}));
|
|
36386
36358
|
},
|
|
36387
|
-
link: ({
|
|
36388
|
-
|
|
36389
|
-
|
|
36390
|
-
|
|
36391
|
-
|
|
36392
|
-
|
|
36393
|
-
|
|
36394
|
-
|
|
36359
|
+
link: (_ref7, _ref8) => {
|
|
36360
|
+
let {
|
|
36361
|
+
props,
|
|
36362
|
+
rules
|
|
36363
|
+
} = _ref7;
|
|
36364
|
+
let {
|
|
36365
|
+
inputMeta = {},
|
|
36366
|
+
t,
|
|
36367
|
+
isHighlighted
|
|
36368
|
+
} = _ref8;
|
|
36395
36369
|
const maxRule = rules.find(r => r.max);
|
|
36396
36370
|
const maxProps = {
|
|
36397
36371
|
maxLength: MAX_TEXT_AREA_LENGTH
|
|
@@ -36399,29 +36373,32 @@ const inputTypeComponent$1 = {
|
|
|
36399
36373
|
if (maxRule) {
|
|
36400
36374
|
maxProps.maxLength = maxRule.max;
|
|
36401
36375
|
}
|
|
36402
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
|
|
36403
|
-
size: "large"
|
|
36404
|
-
|
|
36376
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
|
|
36377
|
+
size: "large"
|
|
36378
|
+
}, maxProps), {}, {
|
|
36405
36379
|
allowClear: true,
|
|
36406
36380
|
autoComplete: "new-password",
|
|
36407
|
-
type: "text"
|
|
36408
|
-
|
|
36381
|
+
type: "text"
|
|
36382
|
+
}, props), {}, {
|
|
36409
36383
|
className: formatClassname([isHighlighted && "highlighted-input"]),
|
|
36410
36384
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
36411
36385
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
|
|
36412
|
-
});
|
|
36386
|
+
}));
|
|
36413
36387
|
},
|
|
36414
|
-
number: ({
|
|
36415
|
-
|
|
36416
|
-
|
|
36417
|
-
|
|
36418
|
-
|
|
36419
|
-
|
|
36420
|
-
|
|
36421
|
-
|
|
36422
|
-
|
|
36388
|
+
number: (_ref9, _ref10) => {
|
|
36389
|
+
var _input$meta8;
|
|
36390
|
+
let {
|
|
36391
|
+
props,
|
|
36392
|
+
rules,
|
|
36393
|
+
input
|
|
36394
|
+
} = _ref9;
|
|
36395
|
+
let {
|
|
36396
|
+
inputMeta = {},
|
|
36397
|
+
t,
|
|
36398
|
+
isHighlighted
|
|
36399
|
+
} = _ref10;
|
|
36423
36400
|
const maxRule = rules.find(r => r.max);
|
|
36424
|
-
const integerRule = !input
|
|
36401
|
+
const integerRule = !(input !== null && input !== void 0 && (_input$meta8 = input.meta) !== null && _input$meta8 !== void 0 && _input$meta8.isDecimal);
|
|
36425
36402
|
const parser = value => {
|
|
36426
36403
|
if (!value) {
|
|
36427
36404
|
return "";
|
|
@@ -36432,60 +36409,63 @@ const inputTypeComponent$1 = {
|
|
|
36432
36409
|
return value.replace(/\$\s?|(,*)/g, "");
|
|
36433
36410
|
};
|
|
36434
36411
|
if (maxRule) {
|
|
36435
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
|
|
36412
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
|
|
36436
36413
|
size: "large",
|
|
36437
36414
|
allowClear: true,
|
|
36438
|
-
autoComplete: "new-password"
|
|
36439
|
-
|
|
36415
|
+
autoComplete: "new-password"
|
|
36416
|
+
}, props), {}, {
|
|
36440
36417
|
type: "number",
|
|
36441
36418
|
parser: parser,
|
|
36442
36419
|
min: 0,
|
|
36443
36420
|
max: maxRule.max,
|
|
36444
36421
|
className: formatClassname([isHighlighted && "highlighted-input"])
|
|
36445
|
-
});
|
|
36422
|
+
}));
|
|
36446
36423
|
}
|
|
36447
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
|
|
36424
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
|
|
36448
36425
|
size: "large",
|
|
36449
36426
|
allowClear: true,
|
|
36450
36427
|
className: formatClassname([isHighlighted && "highlighted-input"]),
|
|
36451
|
-
autoComplete: "new-password"
|
|
36452
|
-
|
|
36428
|
+
autoComplete: "new-password"
|
|
36429
|
+
}, props), {}, {
|
|
36453
36430
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
36454
36431
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type number"),
|
|
36455
36432
|
min: 0,
|
|
36456
36433
|
formatter: value => numberWithCommas$1(value),
|
|
36457
36434
|
parser: parser
|
|
36458
|
-
});
|
|
36435
|
+
}));
|
|
36459
36436
|
},
|
|
36460
36437
|
// eslint-disable-next-line no-unused-vars
|
|
36461
|
-
select: ({
|
|
36462
|
-
|
|
36463
|
-
|
|
36464
|
-
|
|
36465
|
-
|
|
36466
|
-
|
|
36467
|
-
|
|
36468
|
-
|
|
36469
|
-
|
|
36470
|
-
|
|
36471
|
-
|
|
36472
|
-
|
|
36473
|
-
|
|
36474
|
-
|
|
36475
|
-
|
|
36476
|
-
|
|
36477
|
-
|
|
36478
|
-
|
|
36479
|
-
|
|
36480
|
-
|
|
36481
|
-
|
|
36482
|
-
|
|
36483
|
-
|
|
36484
|
-
|
|
36485
|
-
|
|
36486
|
-
|
|
36438
|
+
select: (_ref11, _ref12) => {
|
|
36439
|
+
var _input$meta9, _input$meta10;
|
|
36440
|
+
let {
|
|
36441
|
+
value,
|
|
36442
|
+
options,
|
|
36443
|
+
optionGroup,
|
|
36444
|
+
props,
|
|
36445
|
+
formsValue,
|
|
36446
|
+
optionsFilter,
|
|
36447
|
+
filterCond,
|
|
36448
|
+
repeatValues,
|
|
36449
|
+
repeatIndex,
|
|
36450
|
+
name,
|
|
36451
|
+
inputName,
|
|
36452
|
+
address,
|
|
36453
|
+
addressData,
|
|
36454
|
+
input,
|
|
36455
|
+
scope
|
|
36456
|
+
} = _ref11;
|
|
36457
|
+
let {
|
|
36458
|
+
forms,
|
|
36459
|
+
form,
|
|
36460
|
+
setAddress,
|
|
36461
|
+
inputMeta = {},
|
|
36462
|
+
t,
|
|
36463
|
+
isHighlighted,
|
|
36464
|
+
changeInputMeta,
|
|
36465
|
+
groupFormId
|
|
36466
|
+
} = _ref12;
|
|
36487
36467
|
let opts;
|
|
36488
|
-
const isEvaluation = input
|
|
36468
|
+
const isEvaluation = input === null || input === void 0 || (_input$meta9 = input.meta) === null || _input$meta9 === void 0 ? void 0 : _input$meta9.isEvaluation;
|
|
36489
36469
|
let defaultValue = value;
|
|
36490
36470
|
if (typeof options === "string") {
|
|
36491
36471
|
const [formName, key] = options.split(".");
|
|
@@ -36510,7 +36490,7 @@ const inputTypeComponent$1 = {
|
|
|
36510
36490
|
opts = [];
|
|
36511
36491
|
}
|
|
36512
36492
|
} else {
|
|
36513
|
-
opts = options
|
|
36493
|
+
opts = options === null || options === void 0 ? void 0 : options.filter(o => !o.onlyView);
|
|
36514
36494
|
}
|
|
36515
36495
|
opts = JSON.parse(JSON.stringify(opts || []));
|
|
36516
36496
|
opts = opts.map(o => getSelectOptions$2(o, formsValue));
|
|
@@ -36520,7 +36500,7 @@ const inputTypeComponent$1 = {
|
|
|
36520
36500
|
const uniqueDefaultKeys = getUniqueDefaultKeys(options);
|
|
36521
36501
|
|
|
36522
36502
|
// Handle default value logic
|
|
36523
|
-
if (!propHasValue$1(value) && propHasValue$1(input
|
|
36503
|
+
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)) {
|
|
36524
36504
|
// If no current value but there's a default value, use the default
|
|
36525
36505
|
value = input.meta.defaultValue;
|
|
36526
36506
|
defaultValue = value;
|
|
@@ -36553,7 +36533,7 @@ const inputTypeComponent$1 = {
|
|
|
36553
36533
|
}
|
|
36554
36534
|
opts = groupOptions;
|
|
36555
36535
|
}
|
|
36556
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
|
|
36536
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
|
|
36557
36537
|
size: "large",
|
|
36558
36538
|
autoComplete: "new-password",
|
|
36559
36539
|
allowClear: true,
|
|
@@ -36562,35 +36542,32 @@ const inputTypeComponent$1 = {
|
|
|
36562
36542
|
value: value // Use value instead of defaultValue for controlled behavior
|
|
36563
36543
|
,
|
|
36564
36544
|
filterOption: filterSelectOptions,
|
|
36565
|
-
optionFilterProp: "children"
|
|
36566
|
-
|
|
36545
|
+
optionFilterProp: "children"
|
|
36546
|
+
}, props), {}, {
|
|
36567
36547
|
className: formatClassname([isHighlighted && "highlighted-select"]),
|
|
36568
36548
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
36569
36549
|
placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp(props.placeholder, formsValue) || t("Select one option"),
|
|
36570
36550
|
onChange: (val, selectedValue) => {
|
|
36571
36551
|
// ONLY FOR SBG EVALUATON !!
|
|
36572
36552
|
if (isEvaluation && val === "na" && groupFormId) {
|
|
36553
|
+
var _formsValue$meta2;
|
|
36573
36554
|
changeInputMeta({
|
|
36574
36555
|
key: groupFormId,
|
|
36575
|
-
value: {
|
|
36576
|
-
...(formsValue?.meta?.inputs?.[groupFormId] || {}),
|
|
36556
|
+
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]) || {}), {}, {
|
|
36577
36557
|
documentation: {
|
|
36578
36558
|
notApplicable: true
|
|
36579
36559
|
}
|
|
36580
|
-
},
|
|
36560
|
+
}),
|
|
36581
36561
|
otherValues: {
|
|
36582
|
-
[groupFormId]: {
|
|
36583
|
-
...(formsValue?.[groupFormId] || {}),
|
|
36562
|
+
[groupFormId]: _objectSpread2(_objectSpread2({}, (formsValue === null || formsValue === void 0 ? void 0 : formsValue[groupFormId]) || {}), {}, {
|
|
36584
36563
|
[name]: val
|
|
36585
|
-
}
|
|
36564
|
+
})
|
|
36586
36565
|
}
|
|
36587
36566
|
});
|
|
36588
36567
|
}
|
|
36589
36568
|
if (address && selectedValue) {
|
|
36590
36569
|
dot__default["default"].str(address, selectedValue.children, addressData);
|
|
36591
|
-
setAddress({
|
|
36592
|
-
...addressData
|
|
36593
|
-
});
|
|
36570
|
+
setAddress(_objectSpread2({}, addressData));
|
|
36594
36571
|
}
|
|
36595
36572
|
if (props.onChange) {
|
|
36596
36573
|
props.onChange(val);
|
|
@@ -36621,15 +36598,15 @@ const inputTypeComponent$1 = {
|
|
|
36621
36598
|
if (og.disabled !== undefined) {
|
|
36622
36599
|
groupOtherProps.disabled = og.disabled;
|
|
36623
36600
|
}
|
|
36624
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
|
|
36625
|
-
value: og.value
|
|
36626
|
-
|
|
36601
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, _objectSpread2(_objectSpread2({
|
|
36602
|
+
value: og.value
|
|
36603
|
+
}, groupOtherProps), {}, {
|
|
36627
36604
|
children: og.label
|
|
36628
|
-
},
|
|
36605
|
+
}), "".concat(i).concat(j));
|
|
36629
36606
|
})
|
|
36630
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
|
|
36631
|
-
value: option.value
|
|
36632
|
-
|
|
36607
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, _objectSpread2(_objectSpread2({
|
|
36608
|
+
value: option.value
|
|
36609
|
+
}, otherProps), {}, {
|
|
36633
36610
|
children: isEvaluation ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
36634
36611
|
className: "flex",
|
|
36635
36612
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -36637,33 +36614,35 @@ const inputTypeComponent$1 = {
|
|
|
36637
36614
|
children: sgbEvaluationIcons[option.value]
|
|
36638
36615
|
}), option.label]
|
|
36639
36616
|
}) : option.label
|
|
36640
|
-
}, option.value);
|
|
36617
|
+
}), option.value);
|
|
36641
36618
|
})
|
|
36642
|
-
});
|
|
36619
|
+
}));
|
|
36643
36620
|
},
|
|
36644
|
-
multiselect: ({
|
|
36645
|
-
|
|
36646
|
-
|
|
36647
|
-
|
|
36648
|
-
|
|
36649
|
-
|
|
36650
|
-
|
|
36651
|
-
|
|
36652
|
-
|
|
36653
|
-
|
|
36654
|
-
|
|
36655
|
-
|
|
36656
|
-
|
|
36657
|
-
|
|
36658
|
-
|
|
36659
|
-
|
|
36660
|
-
|
|
36661
|
-
|
|
36662
|
-
|
|
36663
|
-
|
|
36664
|
-
|
|
36665
|
-
|
|
36666
|
-
|
|
36621
|
+
multiselect: (_ref13, _ref14) => {
|
|
36622
|
+
let {
|
|
36623
|
+
value,
|
|
36624
|
+
options,
|
|
36625
|
+
optionGroup,
|
|
36626
|
+
optionsFilter,
|
|
36627
|
+
filterCond,
|
|
36628
|
+
props,
|
|
36629
|
+
formsValue,
|
|
36630
|
+
repeatValues,
|
|
36631
|
+
repeatIndex,
|
|
36632
|
+
inputName,
|
|
36633
|
+
name,
|
|
36634
|
+
tags,
|
|
36635
|
+
maxWidth,
|
|
36636
|
+
staticWidth,
|
|
36637
|
+
fullWidth
|
|
36638
|
+
} = _ref13;
|
|
36639
|
+
let {
|
|
36640
|
+
forms,
|
|
36641
|
+
form,
|
|
36642
|
+
inputMeta = {},
|
|
36643
|
+
t,
|
|
36644
|
+
isHighlighted
|
|
36645
|
+
} = _ref14;
|
|
36667
36646
|
let opts;
|
|
36668
36647
|
if (typeof options === "string") {
|
|
36669
36648
|
const [formName, key] = options.split(".");
|
|
@@ -36725,17 +36704,17 @@ const inputTypeComponent$1 = {
|
|
|
36725
36704
|
staticWidth,
|
|
36726
36705
|
fullWidth
|
|
36727
36706
|
});
|
|
36728
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
|
|
36707
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2(_objectSpread2({
|
|
36729
36708
|
size: "medium",
|
|
36730
36709
|
allowClear: true,
|
|
36731
36710
|
autoComplete: "new-password",
|
|
36732
36711
|
mode: tags ? "tags" : "multiple",
|
|
36733
|
-
optionFilterProp: "children"
|
|
36734
|
-
|
|
36735
|
-
|
|
36736
|
-
|
|
36737
|
-
filterOption: filterSelectOptions
|
|
36738
|
-
|
|
36712
|
+
optionFilterProp: "children"
|
|
36713
|
+
}, tags ? {
|
|
36714
|
+
tokenSeparators: [","]
|
|
36715
|
+
} : {}), {}, {
|
|
36716
|
+
filterOption: filterSelectOptions
|
|
36717
|
+
}, props), {}, {
|
|
36739
36718
|
className: formatClassname([isHighlighted && "highlighted-select"]),
|
|
36740
36719
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
36741
36720
|
placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp(props.placeholder, formsValue) || t("Select all relevant options"),
|
|
@@ -36774,51 +36753,52 @@ const inputTypeComponent$1 = {
|
|
|
36774
36753
|
if (og.disabled !== undefined) {
|
|
36775
36754
|
groupOtherProps.disabled = og.disabled;
|
|
36776
36755
|
}
|
|
36777
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
|
|
36778
|
-
value: og.value
|
|
36779
|
-
|
|
36756
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, _objectSpread2(_objectSpread2({
|
|
36757
|
+
value: og.value
|
|
36758
|
+
}, groupOtherProps), {}, {
|
|
36780
36759
|
children: og.label
|
|
36781
|
-
},
|
|
36760
|
+
}), "".concat(i).concat(j));
|
|
36782
36761
|
})
|
|
36783
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
|
|
36784
|
-
value: option.value
|
|
36785
|
-
|
|
36762
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, _objectSpread2(_objectSpread2({
|
|
36763
|
+
value: option.value
|
|
36764
|
+
}, otherProps), {}, {
|
|
36786
36765
|
children: option.label
|
|
36787
|
-
}, i);
|
|
36766
|
+
}), i);
|
|
36788
36767
|
})
|
|
36789
|
-
});
|
|
36768
|
+
}));
|
|
36790
36769
|
},
|
|
36791
|
-
date: ({
|
|
36792
|
-
|
|
36793
|
-
|
|
36794
|
-
|
|
36795
|
-
|
|
36796
|
-
|
|
36797
|
-
|
|
36798
|
-
|
|
36799
|
-
|
|
36800
|
-
|
|
36801
|
-
|
|
36802
|
-
|
|
36803
|
-
|
|
36804
|
-
|
|
36770
|
+
date: (_ref15, _ref16) => {
|
|
36771
|
+
var _formsValue$groupForm, _value2;
|
|
36772
|
+
let {
|
|
36773
|
+
props,
|
|
36774
|
+
rules,
|
|
36775
|
+
repeatValues,
|
|
36776
|
+
formsValue,
|
|
36777
|
+
name
|
|
36778
|
+
} = _ref15;
|
|
36779
|
+
let {
|
|
36780
|
+
setFormValues,
|
|
36781
|
+
inputMeta,
|
|
36782
|
+
form,
|
|
36783
|
+
t,
|
|
36784
|
+
isHighlighted,
|
|
36785
|
+
groupFormId
|
|
36786
|
+
} = _ref16;
|
|
36805
36787
|
const lng = localStorage.getItem("datastakeLng") || "en";
|
|
36806
36788
|
const maxRule = rules.find(r => r.max);
|
|
36807
|
-
let value = groupFormId ? formsValue
|
|
36789
|
+
let value = groupFormId ? formsValue === null || formsValue === void 0 || (_formsValue$groupForm = formsValue[groupFormId]) === null || _formsValue$groupForm === void 0 ? void 0 : _formsValue$groupForm[name] : formsValue[name];
|
|
36808
36790
|
const handleDateChange = date => {
|
|
36809
36791
|
if (date) {
|
|
36810
36792
|
// const localDate = dayjs.utc(date).add(dayjs(date).utcOffset(), 'minutes');
|
|
36811
36793
|
const localDate = dayjs__default["default"].utc(date);
|
|
36812
36794
|
if (groupFormId) {
|
|
36813
|
-
const _new = {
|
|
36814
|
-
...(formsValue[groupFormId] || {}),
|
|
36795
|
+
const _new = _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
|
|
36815
36796
|
[name]: localDate
|
|
36816
|
-
};
|
|
36797
|
+
});
|
|
36817
36798
|
form.setFieldValue(groupFormId, _new);
|
|
36818
|
-
setFormValues({
|
|
36819
|
-
...formsValue,
|
|
36799
|
+
setFormValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
36820
36800
|
[groupFormId]: _new
|
|
36821
|
-
});
|
|
36801
|
+
}));
|
|
36822
36802
|
} else {
|
|
36823
36803
|
form.setFieldValue(name, localDate);
|
|
36824
36804
|
}
|
|
@@ -36827,15 +36807,13 @@ const inputTypeComponent$1 = {
|
|
|
36827
36807
|
if (groupFormId) {
|
|
36828
36808
|
if (typeof value === "string" || typeof value === "undefined") {
|
|
36829
36809
|
value = typeof value === "string" ? dayjs__default["default"].utc(value) : null;
|
|
36830
|
-
const _new = {
|
|
36831
|
-
...(formsValue[groupFormId] || {}),
|
|
36810
|
+
const _new = _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
|
|
36832
36811
|
[name]: value
|
|
36833
|
-
};
|
|
36812
|
+
});
|
|
36834
36813
|
form.setFieldValue(groupFormId, _new);
|
|
36835
|
-
setFormValues({
|
|
36836
|
-
...formsValue,
|
|
36814
|
+
setFormValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
36837
36815
|
[groupFormId]: _new
|
|
36838
|
-
});
|
|
36816
|
+
}));
|
|
36839
36817
|
}
|
|
36840
36818
|
} else {
|
|
36841
36819
|
if (typeof value === "string") {
|
|
@@ -36851,12 +36829,13 @@ const inputTypeComponent$1 = {
|
|
|
36851
36829
|
checkForMax = checkCondition$1(maxRule.condition, repeatValues, formsValue);
|
|
36852
36830
|
}
|
|
36853
36831
|
if (checkForMax) {
|
|
36854
|
-
|
|
36832
|
+
var _value;
|
|
36833
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
|
|
36855
36834
|
size: "large",
|
|
36856
36835
|
allowClear: true,
|
|
36857
|
-
autoComplete: "new-password"
|
|
36858
|
-
|
|
36859
|
-
value: value ? dayjs__default["default"](value
|
|
36836
|
+
autoComplete: "new-password"
|
|
36837
|
+
}, props), {}, {
|
|
36838
|
+
value: value ? dayjs__default["default"]((_value = value) === null || _value === void 0 ? void 0 : _value.format("YYYY-MM-DD"), "YYYY-MM-DD") : undefined,
|
|
36860
36839
|
onChange: handleDateChange,
|
|
36861
36840
|
className: formatClassname([isHighlighted && "highlighted-input"]),
|
|
36862
36841
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
@@ -36866,49 +36845,54 @@ const inputTypeComponent$1 = {
|
|
|
36866
36845
|
disabledDate: current => {
|
|
36867
36846
|
return current && current >= dayjs__default["default"]().endOf("day");
|
|
36868
36847
|
}
|
|
36869
|
-
});
|
|
36848
|
+
}));
|
|
36870
36849
|
}
|
|
36871
36850
|
}
|
|
36872
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
|
|
36851
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
|
|
36873
36852
|
size: "large",
|
|
36874
36853
|
allowClear: true,
|
|
36875
|
-
autoComplete: "new-password"
|
|
36876
|
-
|
|
36877
|
-
value: value ? dayjs__default["default"](value
|
|
36854
|
+
autoComplete: "new-password"
|
|
36855
|
+
}, props), {}, {
|
|
36856
|
+
value: value ? dayjs__default["default"]((_value2 = value) === null || _value2 === void 0 ? void 0 : _value2.format("YYYY-MM-DD"), "YYYY-MM-DD") : undefined,
|
|
36878
36857
|
onChange: handleDateChange,
|
|
36879
36858
|
className: formatClassname([isHighlighted && "highlighted-input"]),
|
|
36880
36859
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
36881
36860
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder,
|
|
36882
36861
|
format: DATE_FORMATS,
|
|
36883
36862
|
locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"]
|
|
36884
|
-
});
|
|
36863
|
+
}));
|
|
36885
36864
|
},
|
|
36886
|
-
groupExpandable: ({
|
|
36887
|
-
|
|
36888
|
-
|
|
36889
|
-
|
|
36890
|
-
|
|
36891
|
-
|
|
36892
|
-
|
|
36893
|
-
|
|
36865
|
+
groupExpandable: (_ref17, _ref18) => {
|
|
36866
|
+
var _formsValue$groupForm2;
|
|
36867
|
+
let {
|
|
36868
|
+
formsValue,
|
|
36869
|
+
name,
|
|
36870
|
+
input
|
|
36871
|
+
} = _ref17;
|
|
36872
|
+
let {
|
|
36873
|
+
groupFormId
|
|
36874
|
+
} = _ref18;
|
|
36875
|
+
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];
|
|
36894
36876
|
return /*#__PURE__*/jsxRuntime.jsx(GroupExpandable, {
|
|
36895
36877
|
input: input,
|
|
36896
36878
|
formsValue: formsValue,
|
|
36897
36879
|
data: data
|
|
36898
36880
|
});
|
|
36899
36881
|
},
|
|
36900
|
-
comment: ({
|
|
36901
|
-
|
|
36902
|
-
|
|
36903
|
-
|
|
36904
|
-
|
|
36905
|
-
|
|
36906
|
-
|
|
36907
|
-
|
|
36908
|
-
|
|
36909
|
-
|
|
36910
|
-
|
|
36911
|
-
|
|
36882
|
+
comment: (_ref19, _ref20) => {
|
|
36883
|
+
let {
|
|
36884
|
+
props: {
|
|
36885
|
+
placeholder
|
|
36886
|
+
},
|
|
36887
|
+
commentHint
|
|
36888
|
+
} = _ref19,
|
|
36889
|
+
props = _objectWithoutProperties(_ref19.props, _excluded$f);
|
|
36890
|
+
let {
|
|
36891
|
+
onChange,
|
|
36892
|
+
value,
|
|
36893
|
+
isHighlighted
|
|
36894
|
+
} = _ref20;
|
|
36895
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
|
|
36912
36896
|
allowClear: true,
|
|
36913
36897
|
value: value,
|
|
36914
36898
|
onChange: e => onChange(e.target.value),
|
|
@@ -36919,26 +36903,27 @@ const inputTypeComponent$1 = {
|
|
|
36919
36903
|
autoSize: {
|
|
36920
36904
|
minRows: 5,
|
|
36921
36905
|
maxRows: 5
|
|
36922
|
-
}
|
|
36923
|
-
|
|
36906
|
+
}
|
|
36907
|
+
}, props), {}, {
|
|
36924
36908
|
disabled: false
|
|
36925
|
-
});
|
|
36909
|
+
}));
|
|
36926
36910
|
},
|
|
36927
|
-
tableComment: ({
|
|
36928
|
-
|
|
36929
|
-
|
|
36930
|
-
|
|
36931
|
-
|
|
36932
|
-
|
|
36933
|
-
|
|
36934
|
-
|
|
36935
|
-
|
|
36936
|
-
|
|
36937
|
-
|
|
36938
|
-
|
|
36911
|
+
tableComment: (_ref21, _ref22) => {
|
|
36912
|
+
var _formsValue$meta3;
|
|
36913
|
+
let {
|
|
36914
|
+
setValues,
|
|
36915
|
+
name,
|
|
36916
|
+
onValuesChange,
|
|
36917
|
+
formsValue
|
|
36918
|
+
} = _ref21;
|
|
36919
|
+
let {
|
|
36920
|
+
form,
|
|
36921
|
+
groupFormId,
|
|
36922
|
+
isHighlighted
|
|
36923
|
+
} = _ref22;
|
|
36924
|
+
const formData = groupFormId ? getArray((formsValue[groupFormId] || {})[name] || []).map((v, i) => _objectSpread2(_objectSpread2({}, v), {}, {
|
|
36939
36925
|
key: i
|
|
36940
|
-
})) : (formsValue[name] || []).map((v, i) => ({
|
|
36941
|
-
...v,
|
|
36926
|
+
})) : (formsValue[name] || []).map((v, i) => _objectSpread2(_objectSpread2({}, v), {}, {
|
|
36942
36927
|
key: i
|
|
36943
36928
|
}));
|
|
36944
36929
|
const onUpdate = (val, i) => {
|
|
@@ -36946,121 +36931,89 @@ const inputTypeComponent$1 = {
|
|
|
36946
36931
|
[name]: formData.map((d, j) => i === j ? val : d)
|
|
36947
36932
|
};
|
|
36948
36933
|
if (groupFormId) {
|
|
36949
|
-
const _defaultData = form
|
|
36950
|
-
const _newData = {
|
|
36951
|
-
|
|
36952
|
-
..._val
|
|
36953
|
-
};
|
|
36954
|
-
onValuesChange(_newData, {
|
|
36955
|
-
...formsValue,
|
|
36934
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
36935
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
36936
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
36956
36937
|
[groupFormId]: _newData
|
|
36957
|
-
});
|
|
36958
|
-
form
|
|
36959
|
-
setValues({
|
|
36960
|
-
...formsValue,
|
|
36938
|
+
}));
|
|
36939
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
36940
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
36961
36941
|
[groupFormId]: _newData
|
|
36962
|
-
});
|
|
36942
|
+
}));
|
|
36963
36943
|
return;
|
|
36964
36944
|
}
|
|
36965
|
-
onValuesChange(_val, {
|
|
36966
|
-
|
|
36967
|
-
|
|
36968
|
-
});
|
|
36969
|
-
form?.setFieldValue(name, _val[name]);
|
|
36970
|
-
setValues({
|
|
36971
|
-
...formsValue,
|
|
36972
|
-
..._val
|
|
36973
|
-
});
|
|
36945
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
36946
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
36947
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
36974
36948
|
};
|
|
36975
36949
|
return /*#__PURE__*/jsxRuntime.jsx(Comment, {
|
|
36976
36950
|
onUpdate: onUpdate,
|
|
36977
36951
|
isHighlighted: isHighlighted,
|
|
36978
36952
|
form: form,
|
|
36979
|
-
values: groupFormId ? {
|
|
36980
|
-
...(formsValue[groupFormId] || {}),
|
|
36953
|
+
values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
|
|
36981
36954
|
meta: {
|
|
36982
|
-
inputs: (formsValue
|
|
36955
|
+
inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta3 = formsValue.meta) === null || _formsValue$meta3 === void 0 ? void 0 : _formsValue$meta3.inputs) || {})[groupFormId]
|
|
36983
36956
|
}
|
|
36984
|
-
} : formsValue,
|
|
36957
|
+
}) : formsValue,
|
|
36985
36958
|
name: name,
|
|
36986
|
-
remove:
|
|
36987
|
-
|
|
36988
|
-
|
|
36959
|
+
remove: _ref23 => {
|
|
36960
|
+
let {
|
|
36961
|
+
key
|
|
36962
|
+
} = _ref23;
|
|
36989
36963
|
const _val = {
|
|
36990
36964
|
[name]: formData.filter(v => v.key !== key)
|
|
36991
36965
|
};
|
|
36992
36966
|
if (groupFormId) {
|
|
36993
|
-
const _defaultData = form
|
|
36994
|
-
const _newData = {
|
|
36995
|
-
|
|
36996
|
-
..._val
|
|
36997
|
-
};
|
|
36998
|
-
onValuesChange(_newData, {
|
|
36999
|
-
...formsValue,
|
|
36967
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
36968
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
36969
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
37000
36970
|
[groupFormId]: _newData
|
|
37001
|
-
});
|
|
37002
|
-
form
|
|
37003
|
-
setValues({
|
|
37004
|
-
...formsValue,
|
|
36971
|
+
}));
|
|
36972
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
36973
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
37005
36974
|
[groupFormId]: _newData
|
|
37006
|
-
});
|
|
36975
|
+
}));
|
|
37007
36976
|
return;
|
|
37008
36977
|
}
|
|
37009
|
-
onValuesChange(_val, {
|
|
37010
|
-
|
|
37011
|
-
|
|
37012
|
-
});
|
|
37013
|
-
form?.setFieldValue(name, _val[name]);
|
|
37014
|
-
setValues({
|
|
37015
|
-
...formsValue,
|
|
37016
|
-
..._val
|
|
37017
|
-
});
|
|
36978
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
36979
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
36980
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
37018
36981
|
},
|
|
37019
36982
|
add: val => {
|
|
37020
36983
|
const _val = {
|
|
37021
|
-
[name]: [...formData, {
|
|
37022
|
-
...val,
|
|
36984
|
+
[name]: [...formData, _objectSpread2(_objectSpread2({}, val), {}, {
|
|
37023
36985
|
key: formData.length
|
|
37024
|
-
}]
|
|
36986
|
+
})]
|
|
37025
36987
|
};
|
|
37026
36988
|
if (groupFormId) {
|
|
37027
|
-
const _defaultData = form
|
|
37028
|
-
const _newData = {
|
|
37029
|
-
|
|
37030
|
-
|
|
37031
|
-
};
|
|
37032
|
-
form?.setFieldValue(groupFormId, _newData);
|
|
37033
|
-
onValuesChange(_newData, {
|
|
37034
|
-
...formsValue,
|
|
36989
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
36990
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
36991
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
36992
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
37035
36993
|
[groupFormId]: _newData
|
|
37036
|
-
});
|
|
37037
|
-
setValues({
|
|
37038
|
-
...formsValue,
|
|
36994
|
+
}));
|
|
36995
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
37039
36996
|
[groupFormId]: _newData
|
|
37040
|
-
});
|
|
36997
|
+
}));
|
|
37041
36998
|
return;
|
|
37042
36999
|
}
|
|
37043
|
-
form
|
|
37044
|
-
onValuesChange(_val, {
|
|
37045
|
-
|
|
37046
|
-
..._val
|
|
37047
|
-
});
|
|
37048
|
-
setValues({
|
|
37049
|
-
...formsValue,
|
|
37050
|
-
..._val
|
|
37051
|
-
});
|
|
37000
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
37001
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
37002
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
37052
37003
|
},
|
|
37053
37004
|
k: name
|
|
37054
37005
|
});
|
|
37055
37006
|
},
|
|
37056
|
-
textarea: ({
|
|
37057
|
-
|
|
37058
|
-
|
|
37059
|
-
|
|
37060
|
-
|
|
37061
|
-
|
|
37062
|
-
|
|
37063
|
-
|
|
37007
|
+
textarea: (_ref24, _ref25) => {
|
|
37008
|
+
let {
|
|
37009
|
+
props,
|
|
37010
|
+
rules
|
|
37011
|
+
} = _ref24;
|
|
37012
|
+
let {
|
|
37013
|
+
inputMeta,
|
|
37014
|
+
t,
|
|
37015
|
+
isHighlighted
|
|
37016
|
+
} = _ref25;
|
|
37064
37017
|
const maxRule = rules.find(r => r.max);
|
|
37065
37018
|
let maxLength = MAX_TEXT_AREA_LENGTH;
|
|
37066
37019
|
let rows = 5;
|
|
@@ -37087,7 +37040,7 @@ const inputTypeComponent$1 = {
|
|
|
37087
37040
|
// rows = 14;
|
|
37088
37041
|
// }
|
|
37089
37042
|
}
|
|
37090
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
|
|
37043
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
|
|
37091
37044
|
allowClear: true,
|
|
37092
37045
|
autoComplete: "new-password",
|
|
37093
37046
|
maxLength: maxLength,
|
|
@@ -37095,35 +37048,37 @@ const inputTypeComponent$1 = {
|
|
|
37095
37048
|
autoSize: {
|
|
37096
37049
|
minRows: rows,
|
|
37097
37050
|
maxRows: rows
|
|
37098
|
-
}
|
|
37099
|
-
|
|
37051
|
+
}
|
|
37052
|
+
}, props), {}, {
|
|
37100
37053
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
37101
37054
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
|
|
37102
|
-
});
|
|
37055
|
+
}));
|
|
37103
37056
|
},
|
|
37104
|
-
phoneNumber: ({
|
|
37105
|
-
|
|
37106
|
-
|
|
37107
|
-
|
|
37108
|
-
|
|
37109
|
-
|
|
37110
|
-
|
|
37111
|
-
|
|
37112
|
-
|
|
37113
|
-
|
|
37114
|
-
|
|
37115
|
-
|
|
37116
|
-
|
|
37117
|
-
|
|
37118
|
-
|
|
37057
|
+
phoneNumber: (_ref26, _ref27) => {
|
|
37058
|
+
let {
|
|
37059
|
+
name,
|
|
37060
|
+
inputName,
|
|
37061
|
+
props,
|
|
37062
|
+
value,
|
|
37063
|
+
repeatIndex,
|
|
37064
|
+
repeatValues,
|
|
37065
|
+
formsValue
|
|
37066
|
+
} = _ref26;
|
|
37067
|
+
let {
|
|
37068
|
+
setFormValues,
|
|
37069
|
+
inputMeta,
|
|
37070
|
+
t,
|
|
37071
|
+
isHighlighted
|
|
37072
|
+
} = _ref27;
|
|
37073
|
+
return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, _objectSpread2(_objectSpread2({
|
|
37119
37074
|
customSelectWidthPercentage: "20%",
|
|
37120
37075
|
t: t,
|
|
37121
37076
|
size: "large",
|
|
37122
37077
|
allowClear: true,
|
|
37123
|
-
country: formsValue
|
|
37078
|
+
country: formsValue === null || formsValue === void 0 ? void 0 : formsValue.country,
|
|
37124
37079
|
initialValue: value,
|
|
37125
|
-
name: name
|
|
37126
|
-
|
|
37080
|
+
name: name
|
|
37081
|
+
}, props), {}, {
|
|
37127
37082
|
className: formatClassname([isHighlighted && "highlighted-input"]),
|
|
37128
37083
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
37129
37084
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type Number"),
|
|
@@ -37144,26 +37099,27 @@ const inputTypeComponent$1 = {
|
|
|
37144
37099
|
}
|
|
37145
37100
|
return val;
|
|
37146
37101
|
}
|
|
37147
|
-
});
|
|
37102
|
+
}));
|
|
37148
37103
|
},
|
|
37149
|
-
switch: ({
|
|
37150
|
-
|
|
37151
|
-
|
|
37152
|
-
|
|
37153
|
-
|
|
37154
|
-
|
|
37155
|
-
|
|
37156
|
-
|
|
37157
|
-
|
|
37158
|
-
|
|
37159
|
-
|
|
37160
|
-
|
|
37161
|
-
|
|
37162
|
-
|
|
37163
|
-
|
|
37164
|
-
|
|
37165
|
-
|
|
37166
|
-
|
|
37104
|
+
switch: (_ref28, _ref29) => {
|
|
37105
|
+
let {
|
|
37106
|
+
props,
|
|
37107
|
+
value,
|
|
37108
|
+
restricted,
|
|
37109
|
+
autocomplete,
|
|
37110
|
+
formsValue,
|
|
37111
|
+
repeatValues,
|
|
37112
|
+
repeatIndex,
|
|
37113
|
+
name,
|
|
37114
|
+
inputName,
|
|
37115
|
+
replace: replaceInput,
|
|
37116
|
+
unique
|
|
37117
|
+
} = _ref28;
|
|
37118
|
+
let {
|
|
37119
|
+
form,
|
|
37120
|
+
isHighlighted
|
|
37121
|
+
} = _ref29;
|
|
37122
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
37167
37123
|
size: "default",
|
|
37168
37124
|
defaultChecked: value || false,
|
|
37169
37125
|
checked: value || false,
|
|
@@ -37191,9 +37147,7 @@ const inputTypeComponent$1 = {
|
|
|
37191
37147
|
const [formName, replaceInputName] = replaceTo.split(".");
|
|
37192
37148
|
const replaceRepeatValues = replaceInputName ? dot__default["default"].pick(formName, formsValue) : undefined;
|
|
37193
37149
|
updateFormValues$1(undefined, replaceRepeatValues, replaceInputName, isChecked ? newId : undefined, formsValue, formName, form);
|
|
37194
|
-
formsValue = Object.assign(formsValue, {
|
|
37195
|
-
...form.getFieldsValue(true)
|
|
37196
|
-
});
|
|
37150
|
+
formsValue = Object.assign(formsValue, _objectSpread2({}, form.getFieldsValue(true)));
|
|
37197
37151
|
if (oldId) {
|
|
37198
37152
|
const allRepeatValues = dot__default["default"].pick(name, formsValue);
|
|
37199
37153
|
if (allRepeatValues && Array.isArray(allRepeatValues)) {
|
|
@@ -37234,20 +37188,22 @@ const inputTypeComponent$1 = {
|
|
|
37234
37188
|
}
|
|
37235
37189
|
}
|
|
37236
37190
|
}
|
|
37237
|
-
});
|
|
37191
|
+
}));
|
|
37238
37192
|
},
|
|
37239
|
-
radioGroup: ({
|
|
37240
|
-
|
|
37241
|
-
|
|
37242
|
-
|
|
37243
|
-
|
|
37244
|
-
|
|
37245
|
-
|
|
37246
|
-
|
|
37193
|
+
radioGroup: (_ref30, _ref31) => {
|
|
37194
|
+
let {
|
|
37195
|
+
props,
|
|
37196
|
+
value,
|
|
37197
|
+
options,
|
|
37198
|
+
isRisk
|
|
37199
|
+
} = _ref30;
|
|
37200
|
+
let {
|
|
37201
|
+
isHighlighted
|
|
37202
|
+
} = _ref31;
|
|
37247
37203
|
if (isRisk) {
|
|
37248
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, {
|
|
37249
|
-
value: value
|
|
37250
|
-
|
|
37204
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, _objectSpread2(_objectSpread2({
|
|
37205
|
+
value: value
|
|
37206
|
+
}, props), {}, {
|
|
37251
37207
|
className: "is-risk-radio",
|
|
37252
37208
|
children: (options || []).map(o => {
|
|
37253
37209
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Radio, {
|
|
@@ -37261,11 +37217,11 @@ const inputTypeComponent$1 = {
|
|
|
37261
37217
|
}) : null]
|
|
37262
37218
|
}, o.value);
|
|
37263
37219
|
})
|
|
37264
|
-
});
|
|
37220
|
+
}));
|
|
37265
37221
|
}
|
|
37266
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, {
|
|
37267
|
-
value: value
|
|
37268
|
-
|
|
37222
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, _objectSpread2(_objectSpread2({
|
|
37223
|
+
value: value
|
|
37224
|
+
}, props), {}, {
|
|
37269
37225
|
className: formatClassname([isHighlighted && "highlighted-input"]),
|
|
37270
37226
|
children: (options || []).map(o => {
|
|
37271
37227
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Radio, {
|
|
@@ -37279,18 +37235,20 @@ const inputTypeComponent$1 = {
|
|
|
37279
37235
|
}) : null]
|
|
37280
37236
|
}, o.value);
|
|
37281
37237
|
})
|
|
37282
|
-
});
|
|
37238
|
+
}));
|
|
37283
37239
|
},
|
|
37284
|
-
checkboxGroup: ({
|
|
37285
|
-
|
|
37286
|
-
|
|
37287
|
-
|
|
37288
|
-
|
|
37289
|
-
|
|
37290
|
-
|
|
37291
|
-
|
|
37292
|
-
|
|
37293
|
-
|
|
37240
|
+
checkboxGroup: (_ref32, _ref33) => {
|
|
37241
|
+
let {
|
|
37242
|
+
props,
|
|
37243
|
+
value,
|
|
37244
|
+
options
|
|
37245
|
+
} = _ref32;
|
|
37246
|
+
let {
|
|
37247
|
+
isHighlighted
|
|
37248
|
+
} = _ref33;
|
|
37249
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox.Group, _objectSpread2(_objectSpread2({
|
|
37250
|
+
value: value
|
|
37251
|
+
}, props), {}, {
|
|
37294
37252
|
className: formatClassname([isHighlighted && "highlighted-input"]),
|
|
37295
37253
|
style: {
|
|
37296
37254
|
display: "grid",
|
|
@@ -37314,16 +37272,18 @@ const inputTypeComponent$1 = {
|
|
|
37314
37272
|
}) : null]
|
|
37315
37273
|
}, o.value);
|
|
37316
37274
|
})
|
|
37317
|
-
});
|
|
37275
|
+
}));
|
|
37318
37276
|
},
|
|
37319
|
-
total100: ({
|
|
37320
|
-
|
|
37321
|
-
|
|
37322
|
-
|
|
37323
|
-
|
|
37324
|
-
|
|
37325
|
-
|
|
37326
|
-
|
|
37277
|
+
total100: (_ref34, _ref35) => {
|
|
37278
|
+
let {
|
|
37279
|
+
props,
|
|
37280
|
+
name,
|
|
37281
|
+
options,
|
|
37282
|
+
value
|
|
37283
|
+
} = _ref34;
|
|
37284
|
+
let {
|
|
37285
|
+
isHighlighted
|
|
37286
|
+
} = _ref35;
|
|
37327
37287
|
value = value ? Array.isArray(value) ? value : [value] : [];
|
|
37328
37288
|
function totalValue() {
|
|
37329
37289
|
let total = 0;
|
|
@@ -37347,10 +37307,11 @@ const inputTypeComponent$1 = {
|
|
|
37347
37307
|
className: formatClassname(["total100", isHighlighted && "highlighted-input"]),
|
|
37348
37308
|
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.List, {
|
|
37349
37309
|
name: name,
|
|
37350
|
-
children: (fields, {
|
|
37351
|
-
|
|
37352
|
-
|
|
37353
|
-
|
|
37310
|
+
children: (fields, _ref36) => {
|
|
37311
|
+
let {
|
|
37312
|
+
add,
|
|
37313
|
+
remove
|
|
37314
|
+
} = _ref36;
|
|
37354
37315
|
if (fields.length === 0) {
|
|
37355
37316
|
const formData = value || [];
|
|
37356
37317
|
if (formData.length) {
|
|
@@ -37369,27 +37330,27 @@ const inputTypeComponent$1 = {
|
|
|
37369
37330
|
const v = value[field.name] || {};
|
|
37370
37331
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Space, {
|
|
37371
37332
|
className: "total",
|
|
37372
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
37373
|
-
noStyle: true
|
|
37374
|
-
|
|
37333
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
|
|
37334
|
+
noStyle: true
|
|
37335
|
+
}, field), {}, {
|
|
37375
37336
|
name: [field.name, "type"],
|
|
37376
37337
|
fieldKey: [field.fieldKey, "type"],
|
|
37377
37338
|
initialValue: v.type || null,
|
|
37378
|
-
children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
|
|
37339
|
+
children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
|
|
37379
37340
|
size: "large",
|
|
37380
37341
|
allowClear: true,
|
|
37381
37342
|
showSearch: true,
|
|
37382
37343
|
filterOption: filterSelectOptions,
|
|
37383
|
-
optionFilterProp: "children"
|
|
37384
|
-
|
|
37344
|
+
optionFilterProp: "children"
|
|
37345
|
+
}, props), {}, {
|
|
37385
37346
|
children: options.map((option, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
|
|
37386
37347
|
value: option.value,
|
|
37387
37348
|
children: option.label
|
|
37388
37349
|
}, i))
|
|
37389
|
-
})
|
|
37390
|
-
}), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
37391
|
-
noStyle: true
|
|
37392
|
-
|
|
37350
|
+
}))
|
|
37351
|
+
})), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
|
|
37352
|
+
noStyle: true
|
|
37353
|
+
}, field), {}, {
|
|
37393
37354
|
name: [field.name, "value"],
|
|
37394
37355
|
fieldKey: [field.fieldKey, "value"],
|
|
37395
37356
|
initialValue: v.value,
|
|
@@ -37398,14 +37359,14 @@ const inputTypeComponent$1 = {
|
|
|
37398
37359
|
allowClear: true,
|
|
37399
37360
|
name: "value",
|
|
37400
37361
|
formatter: value => {
|
|
37401
|
-
return value ?
|
|
37362
|
+
return value ? "".concat(value, "%") : "";
|
|
37402
37363
|
},
|
|
37403
37364
|
disabled: !v.type || null,
|
|
37404
37365
|
placeholder: props.valueplaceholder ? props.valueplaceholder : "Value",
|
|
37405
37366
|
min: 1,
|
|
37406
37367
|
max: 100 - siblingTotal(v.type || 0)
|
|
37407
37368
|
})
|
|
37408
|
-
}), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
37369
|
+
})), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
37409
37370
|
disabled: !v.value || !v.type || totalValue() >= 100,
|
|
37410
37371
|
type: "primary",
|
|
37411
37372
|
icon: /*#__PURE__*/jsxRuntime.jsx(Icons.PlusOutlined, {}),
|
|
@@ -37437,19 +37398,22 @@ const inputTypeComponent$1 = {
|
|
|
37437
37398
|
}) : null]
|
|
37438
37399
|
});
|
|
37439
37400
|
},
|
|
37440
|
-
percentage: ({
|
|
37441
|
-
|
|
37442
|
-
|
|
37443
|
-
|
|
37444
|
-
|
|
37445
|
-
|
|
37446
|
-
|
|
37447
|
-
|
|
37448
|
-
|
|
37449
|
-
|
|
37450
|
-
|
|
37451
|
-
|
|
37452
|
-
|
|
37401
|
+
percentage: (_ref37, _ref38) => {
|
|
37402
|
+
var _input$meta11;
|
|
37403
|
+
let {
|
|
37404
|
+
name,
|
|
37405
|
+
inputName,
|
|
37406
|
+
totalMax,
|
|
37407
|
+
repeatIndex,
|
|
37408
|
+
props,
|
|
37409
|
+
formsValue,
|
|
37410
|
+
input
|
|
37411
|
+
} = _ref37;
|
|
37412
|
+
let {
|
|
37413
|
+
inputMeta,
|
|
37414
|
+
t,
|
|
37415
|
+
isHighlighted
|
|
37416
|
+
} = _ref38;
|
|
37453
37417
|
const isRepeatable = Array.isArray(formsValue[name]);
|
|
37454
37418
|
let totalSiblings = 0;
|
|
37455
37419
|
if (isRepeatable && totalMax) {
|
|
@@ -37457,45 +37421,47 @@ const inputTypeComponent$1 = {
|
|
|
37457
37421
|
totl = totl + (grp[inputName] || 0);
|
|
37458
37422
|
return totl;
|
|
37459
37423
|
}, 0);
|
|
37460
|
-
} else if (Array.isArray(input
|
|
37424
|
+
} else if (Array.isArray(input === null || input === void 0 || (_input$meta11 = input.meta) === null || _input$meta11 === void 0 ? void 0 : _input$meta11.siblings)) {
|
|
37461
37425
|
totalSiblings = input.meta.siblings.reduce((totl, key) => {
|
|
37462
37426
|
totl = totl + (formsValue[key] || 0);
|
|
37463
37427
|
return totl;
|
|
37464
37428
|
}, 0);
|
|
37465
37429
|
}
|
|
37466
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
|
|
37430
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
|
|
37467
37431
|
size: "large",
|
|
37468
|
-
allowClear: true
|
|
37469
|
-
|
|
37432
|
+
allowClear: true
|
|
37433
|
+
}, props), {}, {
|
|
37470
37434
|
className: formatClassname([isHighlighted && "highlighted-cont"]),
|
|
37471
37435
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
37472
37436
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type number"),
|
|
37473
37437
|
min: 0,
|
|
37474
37438
|
max: 100 - totalSiblings,
|
|
37475
37439
|
formatter: value => {
|
|
37476
|
-
return value ?
|
|
37440
|
+
return value ? "".concat(value) : "";
|
|
37477
37441
|
},
|
|
37478
37442
|
parser: value => value.replace("%", ""),
|
|
37479
37443
|
addonAfter: "%"
|
|
37480
|
-
});
|
|
37444
|
+
}));
|
|
37481
37445
|
},
|
|
37482
|
-
drawTerritory: ({
|
|
37483
|
-
|
|
37484
|
-
|
|
37485
|
-
|
|
37486
|
-
|
|
37487
|
-
|
|
37488
|
-
|
|
37446
|
+
drawTerritory: (_ref39, _ref40) => {
|
|
37447
|
+
let {
|
|
37448
|
+
formsValue,
|
|
37449
|
+
name,
|
|
37450
|
+
addressData
|
|
37451
|
+
} = _ref39;
|
|
37452
|
+
let {
|
|
37453
|
+
setFormValues
|
|
37454
|
+
} = _ref40;
|
|
37489
37455
|
let search = formsValue.country;
|
|
37490
37456
|
if (addressData && addressData.address && Object.keys(addressData.address).length > 0) {
|
|
37491
37457
|
if (addressData.address.country) {
|
|
37492
37458
|
search = addressData.address.country;
|
|
37493
37459
|
}
|
|
37494
37460
|
if (addressData.address.level1) {
|
|
37495
|
-
search =
|
|
37461
|
+
search = "".concat(addressData.address.level1, ", ").concat(addressData.address.country);
|
|
37496
37462
|
}
|
|
37497
37463
|
if (addressData.address.level2) {
|
|
37498
|
-
search =
|
|
37464
|
+
search = "".concat(addressData.address.level2, ", ").concat(addressData.address.level1, ", ").concat(addressData.address.country);
|
|
37499
37465
|
}
|
|
37500
37466
|
} else {
|
|
37501
37467
|
const country = countriesList.countries[formsValue.country] || {};
|
|
@@ -37503,10 +37469,10 @@ const inputTypeComponent$1 = {
|
|
|
37503
37469
|
search = country.name;
|
|
37504
37470
|
}
|
|
37505
37471
|
if (formsValue.administrativeLevel1Name) {
|
|
37506
|
-
search =
|
|
37472
|
+
search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
|
|
37507
37473
|
}
|
|
37508
37474
|
if (formsValue.administrativeLevel2Name) {
|
|
37509
|
-
search =
|
|
37475
|
+
search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
|
|
37510
37476
|
}
|
|
37511
37477
|
}
|
|
37512
37478
|
return /*#__PURE__*/jsxRuntime.jsx(PolygonSelector, {
|
|
@@ -37518,32 +37484,36 @@ const inputTypeComponent$1 = {
|
|
|
37518
37484
|
searchValue: search
|
|
37519
37485
|
});
|
|
37520
37486
|
},
|
|
37521
|
-
year: ({
|
|
37522
|
-
|
|
37523
|
-
|
|
37524
|
-
|
|
37525
|
-
|
|
37487
|
+
year: (_ref41, _ref42) => {
|
|
37488
|
+
let {
|
|
37489
|
+
props
|
|
37490
|
+
} = _ref41;
|
|
37491
|
+
let {
|
|
37492
|
+
isHighlighted
|
|
37493
|
+
} = _ref42;
|
|
37526
37494
|
const lng = localStorage.getItem("datastakeLng") || "en";
|
|
37527
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
|
|
37495
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
|
|
37528
37496
|
size: "large",
|
|
37529
37497
|
allowClear: true,
|
|
37530
37498
|
locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"],
|
|
37531
|
-
picker: "year"
|
|
37532
|
-
|
|
37499
|
+
picker: "year"
|
|
37500
|
+
}, props), {}, {
|
|
37533
37501
|
className: formatClassname([isHighlighted && "highlighted-input"]),
|
|
37534
37502
|
format: "YYYY"
|
|
37535
|
-
});
|
|
37503
|
+
}));
|
|
37536
37504
|
},
|
|
37537
|
-
upload: ({
|
|
37538
|
-
|
|
37539
|
-
|
|
37540
|
-
|
|
37541
|
-
|
|
37542
|
-
|
|
37543
|
-
|
|
37544
|
-
|
|
37545
|
-
|
|
37546
|
-
|
|
37505
|
+
upload: (_ref43, _ref44) => {
|
|
37506
|
+
let {
|
|
37507
|
+
rules,
|
|
37508
|
+
value
|
|
37509
|
+
} = _ref43;
|
|
37510
|
+
let {
|
|
37511
|
+
setLoading = () => {},
|
|
37512
|
+
getApiBaseUrl,
|
|
37513
|
+
getAppHeader,
|
|
37514
|
+
t,
|
|
37515
|
+
isHighlighted
|
|
37516
|
+
} = _ref44;
|
|
37547
37517
|
const apiURL = getApiBaseUrl();
|
|
37548
37518
|
const accept = rules.length ? rules.find(rule => Object.keys(rule).includes("accept")).accept || "*" : null;
|
|
37549
37519
|
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) : []) || [];
|
|
@@ -37556,13 +37526,12 @@ const inputTypeComponent$1 = {
|
|
|
37556
37526
|
maxProps.multiple = true;
|
|
37557
37527
|
}
|
|
37558
37528
|
}
|
|
37559
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
|
|
37560
|
-
...maxProps,
|
|
37529
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({}, maxProps), {}, {
|
|
37561
37530
|
accept: accept,
|
|
37562
|
-
action:
|
|
37531
|
+
action: "".concat(apiURL, "/upload"),
|
|
37563
37532
|
beforeUpload: beforeUpload(allowedExtensions),
|
|
37564
37533
|
onChange: val => {
|
|
37565
|
-
if (val
|
|
37534
|
+
if (val !== null && val !== void 0 && val.file && typeof setLoading === "function") {
|
|
37566
37535
|
if (val.file.percent !== 100) {
|
|
37567
37536
|
setLoading(true);
|
|
37568
37537
|
} else {
|
|
@@ -37570,10 +37539,9 @@ const inputTypeComponent$1 = {
|
|
|
37570
37539
|
}
|
|
37571
37540
|
}
|
|
37572
37541
|
},
|
|
37573
|
-
headers: {
|
|
37574
|
-
Authorization:
|
|
37575
|
-
|
|
37576
|
-
},
|
|
37542
|
+
headers: _objectSpread2({
|
|
37543
|
+
Authorization: "Bearer ".concat(getToken())
|
|
37544
|
+
}, getAppHeader()),
|
|
37577
37545
|
defaultFileList: values,
|
|
37578
37546
|
children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
|
|
37579
37547
|
style: {
|
|
@@ -37584,18 +37552,20 @@ const inputTypeComponent$1 = {
|
|
|
37584
37552
|
children: t("Upload")
|
|
37585
37553
|
})]
|
|
37586
37554
|
})
|
|
37587
|
-
});
|
|
37555
|
+
}));
|
|
37588
37556
|
},
|
|
37589
|
-
imageUpload: ({
|
|
37590
|
-
|
|
37591
|
-
|
|
37592
|
-
|
|
37593
|
-
|
|
37594
|
-
|
|
37595
|
-
|
|
37596
|
-
|
|
37597
|
-
|
|
37598
|
-
|
|
37557
|
+
imageUpload: (_ref45, _ref46) => {
|
|
37558
|
+
let {
|
|
37559
|
+
rules,
|
|
37560
|
+
value
|
|
37561
|
+
} = _ref45;
|
|
37562
|
+
let {
|
|
37563
|
+
setLoading = () => {},
|
|
37564
|
+
getApiBaseUrl,
|
|
37565
|
+
getAppHeader,
|
|
37566
|
+
t,
|
|
37567
|
+
isHighlighted
|
|
37568
|
+
} = _ref46;
|
|
37599
37569
|
const apiURL = getApiBaseUrl();
|
|
37600
37570
|
const values = getImageUploadEditValue(value);
|
|
37601
37571
|
const maxRule = rules.find(r => r.max);
|
|
@@ -37606,17 +37576,18 @@ const inputTypeComponent$1 = {
|
|
|
37606
37576
|
maxProps.multiple = true;
|
|
37607
37577
|
}
|
|
37608
37578
|
}
|
|
37609
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
|
|
37610
|
-
beforeUpload: beforeUpload(allowedImageExtensions)
|
|
37611
|
-
|
|
37579
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({
|
|
37580
|
+
beforeUpload: beforeUpload(allowedImageExtensions)
|
|
37581
|
+
}, maxProps), {}, {
|
|
37612
37582
|
accept: "image/*",
|
|
37613
37583
|
classList: !values || !values.length ? "empty" : "",
|
|
37614
37584
|
listType: "picture",
|
|
37615
|
-
action:
|
|
37585
|
+
action: "".concat(apiURL, "/upload"),
|
|
37616
37586
|
onChange: val => {
|
|
37617
37587
|
if (typeof setLoading === "function") {
|
|
37618
|
-
if (val
|
|
37619
|
-
|
|
37588
|
+
if (val !== null && val !== void 0 && val.file) {
|
|
37589
|
+
var _val$file;
|
|
37590
|
+
if ((val === null || val === void 0 || (_val$file = val.file) === null || _val$file === void 0 ? void 0 : _val$file.status) === "removed") {
|
|
37620
37591
|
setLoading(false);
|
|
37621
37592
|
return;
|
|
37622
37593
|
}
|
|
@@ -37628,10 +37599,9 @@ const inputTypeComponent$1 = {
|
|
|
37628
37599
|
setLoading(false);
|
|
37629
37600
|
}
|
|
37630
37601
|
},
|
|
37631
|
-
headers: {
|
|
37632
|
-
Authorization:
|
|
37633
|
-
|
|
37634
|
-
},
|
|
37602
|
+
headers: _objectSpread2({
|
|
37603
|
+
Authorization: "Bearer ".concat(getToken())
|
|
37604
|
+
}, getAppHeader()),
|
|
37635
37605
|
defaultFileList: values,
|
|
37636
37606
|
children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
|
|
37637
37607
|
style: {
|
|
@@ -37642,18 +37612,20 @@ const inputTypeComponent$1 = {
|
|
|
37642
37612
|
children: t("Upload")
|
|
37643
37613
|
})]
|
|
37644
37614
|
})
|
|
37645
|
-
});
|
|
37615
|
+
}));
|
|
37646
37616
|
},
|
|
37647
|
-
videoUpload: ({
|
|
37648
|
-
|
|
37649
|
-
|
|
37650
|
-
|
|
37651
|
-
|
|
37652
|
-
|
|
37653
|
-
|
|
37654
|
-
|
|
37655
|
-
|
|
37656
|
-
|
|
37617
|
+
videoUpload: (_ref47, _ref48) => {
|
|
37618
|
+
let {
|
|
37619
|
+
rules,
|
|
37620
|
+
value
|
|
37621
|
+
} = _ref47;
|
|
37622
|
+
let {
|
|
37623
|
+
setLoading = () => {},
|
|
37624
|
+
getApiBaseUrl,
|
|
37625
|
+
getAppHeader,
|
|
37626
|
+
t,
|
|
37627
|
+
isHighlighted
|
|
37628
|
+
} = _ref48;
|
|
37657
37629
|
const apiURL = getApiBaseUrl();
|
|
37658
37630
|
const values = getImageUploadEditValue(value);
|
|
37659
37631
|
const maxRule = rules.find(r => r.max);
|
|
@@ -37664,21 +37636,25 @@ const inputTypeComponent$1 = {
|
|
|
37664
37636
|
maxProps.multiple = true;
|
|
37665
37637
|
}
|
|
37666
37638
|
}
|
|
37667
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
|
|
37668
|
-
itemRender: (item, fileList) =>
|
|
37669
|
-
|
|
37670
|
-
|
|
37671
|
-
|
|
37672
|
-
|
|
37673
|
-
|
|
37639
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({
|
|
37640
|
+
itemRender: (item, fileList) => {
|
|
37641
|
+
var _fileList$response;
|
|
37642
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
37643
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(EditVideoPreview, {
|
|
37644
|
+
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)
|
|
37645
|
+
}), item]
|
|
37646
|
+
});
|
|
37647
|
+
}
|
|
37648
|
+
}, maxProps), {}, {
|
|
37674
37649
|
accept: "video/*",
|
|
37675
37650
|
classList: !values || !values.length ? "empty" : "",
|
|
37676
37651
|
listType: "picture",
|
|
37677
|
-
action:
|
|
37652
|
+
action: "".concat(apiURL, "/upload"),
|
|
37678
37653
|
onChange: val => {
|
|
37679
37654
|
if (typeof setLoading === "function") {
|
|
37680
|
-
if (val
|
|
37681
|
-
|
|
37655
|
+
if (val !== null && val !== void 0 && val.file) {
|
|
37656
|
+
var _val$file2;
|
|
37657
|
+
if ((val === null || val === void 0 || (_val$file2 = val.file) === null || _val$file2 === void 0 ? void 0 : _val$file2.status) === "removed") {
|
|
37682
37658
|
setLoading(false);
|
|
37683
37659
|
return;
|
|
37684
37660
|
}
|
|
@@ -37690,10 +37666,9 @@ const inputTypeComponent$1 = {
|
|
|
37690
37666
|
setLoading(false);
|
|
37691
37667
|
}
|
|
37692
37668
|
},
|
|
37693
|
-
headers: {
|
|
37694
|
-
Authorization:
|
|
37695
|
-
|
|
37696
|
-
},
|
|
37669
|
+
headers: _objectSpread2({
|
|
37670
|
+
Authorization: "Bearer ".concat(getToken())
|
|
37671
|
+
}, getAppHeader()),
|
|
37697
37672
|
fileList: values,
|
|
37698
37673
|
defaultFileList: values,
|
|
37699
37674
|
children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
|
|
@@ -37705,28 +37680,30 @@ const inputTypeComponent$1 = {
|
|
|
37705
37680
|
children: t("Upload")
|
|
37706
37681
|
})]
|
|
37707
37682
|
})
|
|
37708
|
-
});
|
|
37683
|
+
}));
|
|
37709
37684
|
},
|
|
37710
|
-
geolocation: ({
|
|
37711
|
-
|
|
37712
|
-
|
|
37713
|
-
|
|
37714
|
-
|
|
37715
|
-
|
|
37716
|
-
|
|
37717
|
-
|
|
37718
|
-
|
|
37719
|
-
|
|
37685
|
+
geolocation: (_ref49, _ref50) => {
|
|
37686
|
+
let {
|
|
37687
|
+
value,
|
|
37688
|
+
name,
|
|
37689
|
+
props,
|
|
37690
|
+
formsValue,
|
|
37691
|
+
addressData
|
|
37692
|
+
} = _ref49;
|
|
37693
|
+
let {
|
|
37694
|
+
inputMeta,
|
|
37695
|
+
isHighlighted
|
|
37696
|
+
} = _ref50;
|
|
37720
37697
|
let search = formsValue.country;
|
|
37721
37698
|
if (addressData && Object.keys(addressData).length > 0) {
|
|
37722
37699
|
if (addressData.country) {
|
|
37723
37700
|
search = addressData.country;
|
|
37724
37701
|
}
|
|
37725
37702
|
if (addressData.level1) {
|
|
37726
|
-
search =
|
|
37703
|
+
search = "".concat(addressData.level1, ", ").concat(addressData.country);
|
|
37727
37704
|
}
|
|
37728
37705
|
if (addressData.level2) {
|
|
37729
|
-
search =
|
|
37706
|
+
search = "".concat(addressData.level2, ", ").concat(addressData.level1, ", ").concat(addressData.country);
|
|
37730
37707
|
}
|
|
37731
37708
|
} else {
|
|
37732
37709
|
const country = countriesList.countries[formsValue.country] || {};
|
|
@@ -37734,10 +37711,10 @@ const inputTypeComponent$1 = {
|
|
|
37734
37711
|
search = country.name;
|
|
37735
37712
|
}
|
|
37736
37713
|
if (formsValue.administrativeLevel1Name) {
|
|
37737
|
-
search =
|
|
37714
|
+
search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
|
|
37738
37715
|
}
|
|
37739
37716
|
if (formsValue.administrativeLevel2Name) {
|
|
37740
|
-
search =
|
|
37717
|
+
search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
|
|
37741
37718
|
}
|
|
37742
37719
|
}
|
|
37743
37720
|
return /*#__PURE__*/jsxRuntime.jsx(Geolocation, {
|
|
@@ -37751,34 +37728,36 @@ const inputTypeComponent$1 = {
|
|
|
37751
37728
|
searchValue: search
|
|
37752
37729
|
});
|
|
37753
37730
|
},
|
|
37754
|
-
ajaxSelect: ({
|
|
37755
|
-
|
|
37756
|
-
|
|
37757
|
-
|
|
37758
|
-
|
|
37759
|
-
|
|
37760
|
-
|
|
37761
|
-
|
|
37762
|
-
|
|
37763
|
-
|
|
37764
|
-
|
|
37765
|
-
|
|
37766
|
-
|
|
37767
|
-
|
|
37768
|
-
|
|
37769
|
-
|
|
37770
|
-
|
|
37771
|
-
|
|
37772
|
-
|
|
37773
|
-
|
|
37774
|
-
|
|
37775
|
-
|
|
37776
|
-
|
|
37777
|
-
|
|
37778
|
-
|
|
37779
|
-
|
|
37780
|
-
|
|
37781
|
-
|
|
37731
|
+
ajaxSelect: (_ref51, _ref52) => {
|
|
37732
|
+
let {
|
|
37733
|
+
call,
|
|
37734
|
+
automaticallyLink,
|
|
37735
|
+
name,
|
|
37736
|
+
inputName,
|
|
37737
|
+
props,
|
|
37738
|
+
formsValue,
|
|
37739
|
+
onNewSetValue,
|
|
37740
|
+
multiple,
|
|
37741
|
+
updateOptions,
|
|
37742
|
+
repeatValues,
|
|
37743
|
+
repeatIndex,
|
|
37744
|
+
value,
|
|
37745
|
+
unique,
|
|
37746
|
+
address,
|
|
37747
|
+
addressData = {},
|
|
37748
|
+
getFromLinking,
|
|
37749
|
+
input
|
|
37750
|
+
} = _ref51;
|
|
37751
|
+
let {
|
|
37752
|
+
form,
|
|
37753
|
+
forms,
|
|
37754
|
+
setAddress,
|
|
37755
|
+
changeInputMeta,
|
|
37756
|
+
inputMeta,
|
|
37757
|
+
meta,
|
|
37758
|
+
isHighlighted,
|
|
37759
|
+
groupFormId
|
|
37760
|
+
} = _ref52;
|
|
37782
37761
|
return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect, {
|
|
37783
37762
|
size: "medium",
|
|
37784
37763
|
input: input,
|
|
@@ -37815,9 +37794,7 @@ const inputTypeComponent$1 = {
|
|
|
37815
37794
|
const selectedValue = data.find(v => v.value === ev);
|
|
37816
37795
|
if (address && selectedValue) {
|
|
37817
37796
|
dot__default["default"].str(address, selectedValue.label, addressData);
|
|
37818
|
-
setAddress({
|
|
37819
|
-
...addressData
|
|
37820
|
-
});
|
|
37797
|
+
setAddress(_objectSpread2({}, addressData));
|
|
37821
37798
|
}
|
|
37822
37799
|
}
|
|
37823
37800
|
},
|
|
@@ -37826,10 +37803,11 @@ const inputTypeComponent$1 = {
|
|
|
37826
37803
|
address: true
|
|
37827
37804
|
});
|
|
37828
37805
|
},
|
|
37829
|
-
tag:
|
|
37830
|
-
|
|
37831
|
-
|
|
37832
|
-
|
|
37806
|
+
tag: _ref53 => {
|
|
37807
|
+
let {
|
|
37808
|
+
value,
|
|
37809
|
+
repeatLabel
|
|
37810
|
+
} = _ref53;
|
|
37833
37811
|
return /*#__PURE__*/jsxRuntime.jsx(TagInput, {
|
|
37834
37812
|
size: "large",
|
|
37835
37813
|
allowClear: true,
|
|
@@ -37837,26 +37815,28 @@ const inputTypeComponent$1 = {
|
|
|
37837
37815
|
newPlaceholder: repeatLabel
|
|
37838
37816
|
});
|
|
37839
37817
|
},
|
|
37840
|
-
modal: ({
|
|
37841
|
-
|
|
37842
|
-
|
|
37843
|
-
|
|
37844
|
-
|
|
37845
|
-
|
|
37846
|
-
|
|
37847
|
-
|
|
37848
|
-
|
|
37849
|
-
|
|
37850
|
-
|
|
37851
|
-
|
|
37852
|
-
|
|
37853
|
-
|
|
37854
|
-
|
|
37855
|
-
|
|
37856
|
-
|
|
37857
|
-
|
|
37858
|
-
|
|
37859
|
-
|
|
37818
|
+
modal: (_ref54, _ref55) => {
|
|
37819
|
+
let {
|
|
37820
|
+
call,
|
|
37821
|
+
automaticallyLink,
|
|
37822
|
+
name,
|
|
37823
|
+
inputName,
|
|
37824
|
+
props,
|
|
37825
|
+
formsValue,
|
|
37826
|
+
allFormsValue,
|
|
37827
|
+
onNewSetValue,
|
|
37828
|
+
repeatValues,
|
|
37829
|
+
repeatIndex,
|
|
37830
|
+
value,
|
|
37831
|
+
modalTitle,
|
|
37832
|
+
totalInputs,
|
|
37833
|
+
shownInputs,
|
|
37834
|
+
allowDupplicates
|
|
37835
|
+
} = _ref54;
|
|
37836
|
+
let {
|
|
37837
|
+
form,
|
|
37838
|
+
add
|
|
37839
|
+
} = _ref55;
|
|
37860
37840
|
return /*#__PURE__*/jsxRuntime.jsx(AjaxModal, {
|
|
37861
37841
|
allowClear: true,
|
|
37862
37842
|
call: call,
|
|
@@ -37879,40 +37859,44 @@ const inputTypeComponent$1 = {
|
|
|
37879
37859
|
allowDupplicates: allowDupplicates
|
|
37880
37860
|
});
|
|
37881
37861
|
},
|
|
37882
|
-
dataLink: ({
|
|
37883
|
-
|
|
37884
|
-
|
|
37885
|
-
|
|
37886
|
-
|
|
37887
|
-
|
|
37888
|
-
|
|
37889
|
-
|
|
37890
|
-
|
|
37891
|
-
|
|
37892
|
-
|
|
37893
|
-
|
|
37894
|
-
|
|
37895
|
-
|
|
37896
|
-
|
|
37897
|
-
|
|
37898
|
-
|
|
37899
|
-
|
|
37900
|
-
|
|
37901
|
-
|
|
37902
|
-
|
|
37903
|
-
|
|
37904
|
-
|
|
37905
|
-
|
|
37906
|
-
|
|
37907
|
-
|
|
37908
|
-
|
|
37909
|
-
|
|
37910
|
-
|
|
37911
|
-
|
|
37912
|
-
|
|
37913
|
-
|
|
37914
|
-
|
|
37915
|
-
|
|
37862
|
+
dataLink: (_ref56, _ref57) => {
|
|
37863
|
+
var _input$meta12, _input$meta15, _input$meta16, _formsValue$meta5, _input$meta18;
|
|
37864
|
+
let {
|
|
37865
|
+
setValues,
|
|
37866
|
+
name,
|
|
37867
|
+
onValuesChange,
|
|
37868
|
+
changeLinking,
|
|
37869
|
+
formsValue,
|
|
37870
|
+
input,
|
|
37871
|
+
call,
|
|
37872
|
+
automaticallyLink,
|
|
37873
|
+
inputName,
|
|
37874
|
+
props,
|
|
37875
|
+
onNewSetValue,
|
|
37876
|
+
multiple,
|
|
37877
|
+
updateOptions,
|
|
37878
|
+
repeatValues,
|
|
37879
|
+
repeatIndex,
|
|
37880
|
+
value,
|
|
37881
|
+
unique,
|
|
37882
|
+
address,
|
|
37883
|
+
addressData = {},
|
|
37884
|
+
getFromLinking
|
|
37885
|
+
} = _ref56;
|
|
37886
|
+
let {
|
|
37887
|
+
form,
|
|
37888
|
+
forms,
|
|
37889
|
+
setAddress,
|
|
37890
|
+
changeInputMeta,
|
|
37891
|
+
inputMeta,
|
|
37892
|
+
meta,
|
|
37893
|
+
isHighlighted,
|
|
37894
|
+
groupFormId
|
|
37895
|
+
} = _ref57;
|
|
37896
|
+
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") {
|
|
37897
|
+
var _formsValue$groupForm3, _input$meta13, _input$meta14;
|
|
37898
|
+
const currentValue = groupFormId ? (_formsValue$groupForm3 = formsValue[groupFormId]) === null || _formsValue$groupForm3 === void 0 ? void 0 : _formsValue$groupForm3[name] : formsValue[name];
|
|
37899
|
+
(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()::::";
|
|
37916
37900
|
return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect$1, {
|
|
37917
37901
|
size: "medium",
|
|
37918
37902
|
input: input,
|
|
@@ -37949,9 +37933,7 @@ const inputTypeComponent$1 = {
|
|
|
37949
37933
|
const selectedValue = data.find(v => v.value === ev);
|
|
37950
37934
|
if (address && selectedValue) {
|
|
37951
37935
|
dot__default["default"].str(address, selectedValue.label, addressData);
|
|
37952
|
-
setAddress({
|
|
37953
|
-
...addressData
|
|
37954
|
-
});
|
|
37936
|
+
setAddress(_objectSpread2({}, addressData));
|
|
37955
37937
|
}
|
|
37956
37938
|
}
|
|
37957
37939
|
},
|
|
@@ -37961,138 +37943,93 @@ const inputTypeComponent$1 = {
|
|
|
37961
37943
|
isDataLink: true
|
|
37962
37944
|
});
|
|
37963
37945
|
}
|
|
37964
|
-
const isSingle = input
|
|
37965
|
-
const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [{
|
|
37966
|
-
...(formsValue[groupFormId] || {})[name]
|
|
37967
|
-
}] : [] : getArray((formsValue[groupFormId] || {})[name] || []).map(v => ({
|
|
37968
|
-
...v
|
|
37969
|
-
})) : isSingle ? formsValue[name] ? [{
|
|
37970
|
-
...formsValue[name]
|
|
37971
|
-
}] : [] : (formsValue[name] || []).map(v => ({
|
|
37972
|
-
...v
|
|
37973
|
-
}));
|
|
37946
|
+
const isSingle = (input === null || input === void 0 || (_input$meta15 = input.meta) === null || _input$meta15 === void 0 ? void 0 : _input$meta15.maxRepeat) === 1;
|
|
37947
|
+
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));
|
|
37974
37948
|
const onUpdate = (editData, i) => {
|
|
37975
|
-
const val = {
|
|
37976
|
-
...formData[i],
|
|
37977
|
-
...editData
|
|
37978
|
-
};
|
|
37949
|
+
const val = _objectSpread2(_objectSpread2({}, formData[i]), editData);
|
|
37979
37950
|
const _val = isSingle ? {
|
|
37980
37951
|
[name]: val
|
|
37981
37952
|
} : {
|
|
37982
|
-
[name]: formData
|
|
37953
|
+
[name]: formData === null || formData === void 0 ? void 0 : formData.map((d, j) => i === j ? val : d)
|
|
37983
37954
|
};
|
|
37984
37955
|
if (groupFormId) {
|
|
37985
|
-
const _defaultData = form
|
|
37986
|
-
const _newData = {
|
|
37987
|
-
|
|
37988
|
-
..._val
|
|
37989
|
-
};
|
|
37990
|
-
onValuesChange(_newData, {
|
|
37991
|
-
...formsValue,
|
|
37956
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
37957
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
37958
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
37992
37959
|
[groupFormId]: _newData
|
|
37993
|
-
});
|
|
37994
|
-
form
|
|
37995
|
-
setValues({
|
|
37996
|
-
...formsValue,
|
|
37960
|
+
}));
|
|
37961
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
37962
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
37997
37963
|
[groupFormId]: _newData
|
|
37998
|
-
});
|
|
37964
|
+
}));
|
|
37999
37965
|
return;
|
|
38000
37966
|
}
|
|
38001
|
-
onValuesChange(_val, {
|
|
38002
|
-
|
|
38003
|
-
|
|
38004
|
-
});
|
|
38005
|
-
form?.setFieldValue(name, _val[name]);
|
|
38006
|
-
setValues({
|
|
38007
|
-
...formsValue,
|
|
38008
|
-
..._val
|
|
38009
|
-
});
|
|
37967
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
37968
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
37969
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
38010
37970
|
};
|
|
38011
|
-
if (input
|
|
37971
|
+
if (input !== null && input !== void 0 && (_input$meta16 = input.meta) !== null && _input$meta16 !== void 0 && _input$meta16.flat) {
|
|
37972
|
+
var _formsValue$meta4, _input$meta17;
|
|
38012
37973
|
return /*#__PURE__*/jsxRuntime.jsx(DataLinkFlat, {
|
|
38013
37974
|
form: input,
|
|
38014
37975
|
changeLinking: changeLinking,
|
|
38015
37976
|
onUpdate: onUpdate,
|
|
38016
37977
|
isHighlighted: isHighlighted,
|
|
38017
37978
|
formsValue: formsValue,
|
|
38018
|
-
values: groupFormId ? {
|
|
38019
|
-
...(formsValue[groupFormId] || {}),
|
|
37979
|
+
values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
|
|
38020
37980
|
meta: {
|
|
38021
|
-
inputs: (formsValue
|
|
37981
|
+
inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta4 = formsValue.meta) === null || _formsValue$meta4 === void 0 ? void 0 : _formsValue$meta4.inputs) || {})[groupFormId]
|
|
38022
37982
|
}
|
|
38023
|
-
} : formsValue,
|
|
37983
|
+
}) : formsValue,
|
|
38024
37984
|
name: name,
|
|
38025
37985
|
groupFormId: groupFormId,
|
|
38026
|
-
maxRepeat: input
|
|
38027
|
-
remove:
|
|
38028
|
-
|
|
38029
|
-
|
|
37986
|
+
maxRepeat: input === null || input === void 0 || (_input$meta17 = input.meta) === null || _input$meta17 === void 0 ? void 0 : _input$meta17.maxRepeat,
|
|
37987
|
+
remove: _ref58 => {
|
|
37988
|
+
let {
|
|
37989
|
+
key
|
|
37990
|
+
} = _ref58;
|
|
38030
37991
|
const _val = isSingle ? {
|
|
38031
37992
|
[name]: null
|
|
38032
37993
|
} : {
|
|
38033
37994
|
[name]: formData.filter((v, i) => i !== key)
|
|
38034
37995
|
};
|
|
38035
37996
|
if (groupFormId) {
|
|
38036
|
-
const _defaultData = form
|
|
38037
|
-
const _newData = {
|
|
38038
|
-
|
|
38039
|
-
..._val
|
|
38040
|
-
};
|
|
38041
|
-
onValuesChange(_newData, {
|
|
38042
|
-
...formsValue,
|
|
37997
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
37998
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
37999
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
38043
38000
|
[groupFormId]: _newData
|
|
38044
|
-
});
|
|
38045
|
-
form
|
|
38046
|
-
setValues({
|
|
38047
|
-
...formsValue,
|
|
38001
|
+
}));
|
|
38002
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
38003
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
38048
38004
|
[groupFormId]: _newData
|
|
38049
|
-
});
|
|
38005
|
+
}));
|
|
38050
38006
|
return;
|
|
38051
38007
|
}
|
|
38052
|
-
onValuesChange(_val, {
|
|
38053
|
-
|
|
38054
|
-
|
|
38055
|
-
});
|
|
38056
|
-
form?.setFieldValue(name, _val[name]);
|
|
38057
|
-
setValues({
|
|
38058
|
-
...formsValue,
|
|
38059
|
-
..._val
|
|
38060
|
-
});
|
|
38008
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
38009
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
38010
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
38061
38011
|
},
|
|
38062
38012
|
add: val => {
|
|
38063
38013
|
const _val = isSingle ? {
|
|
38064
38014
|
[name]: val
|
|
38065
38015
|
} : {
|
|
38066
|
-
[name]: [...formData, {
|
|
38067
|
-
...val
|
|
38068
|
-
}]
|
|
38016
|
+
[name]: [...formData, _objectSpread2({}, val)]
|
|
38069
38017
|
};
|
|
38070
38018
|
if (groupFormId) {
|
|
38071
|
-
const _defaultData = form
|
|
38072
|
-
const _newData = {
|
|
38073
|
-
|
|
38074
|
-
|
|
38075
|
-
};
|
|
38076
|
-
form?.setFieldValue(groupFormId, _newData);
|
|
38077
|
-
onValuesChange(_newData, {
|
|
38078
|
-
...formsValue,
|
|
38019
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
38020
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
38021
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
38022
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
38079
38023
|
[groupFormId]: _newData
|
|
38080
|
-
});
|
|
38081
|
-
setValues({
|
|
38082
|
-
...formsValue,
|
|
38024
|
+
}));
|
|
38025
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
38083
38026
|
[groupFormId]: _newData
|
|
38084
|
-
});
|
|
38027
|
+
}));
|
|
38085
38028
|
return;
|
|
38086
38029
|
}
|
|
38087
|
-
form
|
|
38088
|
-
onValuesChange(_val, {
|
|
38089
|
-
|
|
38090
|
-
..._val
|
|
38091
|
-
});
|
|
38092
|
-
setValues({
|
|
38093
|
-
...formsValue,
|
|
38094
|
-
..._val
|
|
38095
|
-
});
|
|
38030
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
38031
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
38032
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
38096
38033
|
},
|
|
38097
38034
|
k: name,
|
|
38098
38035
|
formData: formData
|
|
@@ -38104,101 +38041,79 @@ const inputTypeComponent$1 = {
|
|
|
38104
38041
|
onUpdate: onUpdate,
|
|
38105
38042
|
isHighlighted: isHighlighted,
|
|
38106
38043
|
formsValue: formsValue,
|
|
38107
|
-
values: groupFormId ? {
|
|
38108
|
-
...(formsValue[groupFormId] || {}),
|
|
38044
|
+
values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
|
|
38109
38045
|
meta: {
|
|
38110
|
-
inputs: (formsValue
|
|
38046
|
+
inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta5 = formsValue.meta) === null || _formsValue$meta5 === void 0 ? void 0 : _formsValue$meta5.inputs) || {})[groupFormId]
|
|
38111
38047
|
}
|
|
38112
|
-
} : formsValue,
|
|
38048
|
+
}) : formsValue,
|
|
38113
38049
|
name: name,
|
|
38114
38050
|
groupFormId: groupFormId,
|
|
38115
|
-
maxRepeat: input
|
|
38116
|
-
remove:
|
|
38117
|
-
|
|
38118
|
-
|
|
38051
|
+
maxRepeat: input === null || input === void 0 || (_input$meta18 = input.meta) === null || _input$meta18 === void 0 ? void 0 : _input$meta18.maxRepeat,
|
|
38052
|
+
remove: _ref59 => {
|
|
38053
|
+
let {
|
|
38054
|
+
key
|
|
38055
|
+
} = _ref59;
|
|
38119
38056
|
const _val = isSingle ? {
|
|
38120
38057
|
[name]: null
|
|
38121
38058
|
} : {
|
|
38122
38059
|
[name]: formData.filter((v, i) => i !== key)
|
|
38123
38060
|
};
|
|
38124
38061
|
if (groupFormId) {
|
|
38125
|
-
const _defaultData = form
|
|
38126
|
-
const _newData = {
|
|
38127
|
-
|
|
38128
|
-
..._val
|
|
38129
|
-
};
|
|
38130
|
-
onValuesChange(_newData, {
|
|
38131
|
-
...formsValue,
|
|
38062
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
38063
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
38064
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
38132
38065
|
[groupFormId]: _newData
|
|
38133
|
-
});
|
|
38134
|
-
form
|
|
38135
|
-
setValues({
|
|
38136
|
-
...formsValue,
|
|
38066
|
+
}));
|
|
38067
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
38068
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
38137
38069
|
[groupFormId]: _newData
|
|
38138
|
-
});
|
|
38070
|
+
}));
|
|
38139
38071
|
return;
|
|
38140
38072
|
}
|
|
38141
|
-
onValuesChange(_val, {
|
|
38142
|
-
|
|
38143
|
-
|
|
38144
|
-
});
|
|
38145
|
-
form?.setFieldValue(name, _val[name]);
|
|
38146
|
-
setValues({
|
|
38147
|
-
...formsValue,
|
|
38148
|
-
..._val
|
|
38149
|
-
});
|
|
38073
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
38074
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
38075
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
38150
38076
|
},
|
|
38151
38077
|
add: val => {
|
|
38152
38078
|
const _val = isSingle ? {
|
|
38153
38079
|
[name]: val
|
|
38154
38080
|
} : {
|
|
38155
|
-
[name]: [...formData, {
|
|
38156
|
-
...val
|
|
38157
|
-
}]
|
|
38081
|
+
[name]: [...formData, _objectSpread2({}, val)]
|
|
38158
38082
|
};
|
|
38159
38083
|
if (groupFormId) {
|
|
38160
|
-
const _defaultData = form
|
|
38161
|
-
const _newData = {
|
|
38162
|
-
|
|
38163
|
-
|
|
38164
|
-
};
|
|
38165
|
-
form?.setFieldValue(groupFormId, _newData);
|
|
38166
|
-
onValuesChange(_newData, {
|
|
38167
|
-
...formsValue,
|
|
38084
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
38085
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
38086
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
38087
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
38168
38088
|
[groupFormId]: _newData
|
|
38169
|
-
});
|
|
38170
|
-
setValues({
|
|
38171
|
-
...formsValue,
|
|
38089
|
+
}));
|
|
38090
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
38172
38091
|
[groupFormId]: _newData
|
|
38173
|
-
});
|
|
38092
|
+
}));
|
|
38174
38093
|
return;
|
|
38175
38094
|
}
|
|
38176
|
-
form
|
|
38177
|
-
onValuesChange(_val, {
|
|
38178
|
-
|
|
38179
|
-
..._val
|
|
38180
|
-
});
|
|
38181
|
-
setValues({
|
|
38182
|
-
...formsValue,
|
|
38183
|
-
..._val
|
|
38184
|
-
});
|
|
38095
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
38096
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
38097
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
38185
38098
|
},
|
|
38186
38099
|
k: name,
|
|
38187
38100
|
formData: formData
|
|
38188
38101
|
});
|
|
38189
38102
|
},
|
|
38190
|
-
dataLinkGroup: ({
|
|
38191
|
-
|
|
38192
|
-
|
|
38193
|
-
|
|
38194
|
-
|
|
38195
|
-
|
|
38196
|
-
|
|
38197
|
-
|
|
38198
|
-
|
|
38199
|
-
|
|
38200
|
-
|
|
38201
|
-
|
|
38103
|
+
dataLinkGroup: (_ref60, _ref61) => {
|
|
38104
|
+
let {
|
|
38105
|
+
setValues,
|
|
38106
|
+
name,
|
|
38107
|
+
onValuesChange,
|
|
38108
|
+
changeLinking,
|
|
38109
|
+
formsValue,
|
|
38110
|
+
input
|
|
38111
|
+
} = _ref60;
|
|
38112
|
+
let {
|
|
38113
|
+
form,
|
|
38114
|
+
groupFormId,
|
|
38115
|
+
isHighlighted
|
|
38116
|
+
} = _ref61;
|
|
38202
38117
|
return renderDataLinkGroup({
|
|
38203
38118
|
input,
|
|
38204
38119
|
name,
|
|
@@ -38211,51 +38126,41 @@ const inputTypeComponent$1 = {
|
|
|
38211
38126
|
isHighlighted
|
|
38212
38127
|
});
|
|
38213
38128
|
},
|
|
38214
|
-
groupCheckbox: ({
|
|
38215
|
-
|
|
38216
|
-
|
|
38217
|
-
|
|
38218
|
-
|
|
38219
|
-
|
|
38220
|
-
|
|
38221
|
-
|
|
38222
|
-
|
|
38223
|
-
|
|
38224
|
-
|
|
38129
|
+
groupCheckbox: (_ref62, _ref63) => {
|
|
38130
|
+
let {
|
|
38131
|
+
setValues,
|
|
38132
|
+
name,
|
|
38133
|
+
onValuesChange,
|
|
38134
|
+
formsValue,
|
|
38135
|
+
input
|
|
38136
|
+
} = _ref62;
|
|
38137
|
+
let {
|
|
38138
|
+
form,
|
|
38139
|
+
groupFormId,
|
|
38140
|
+
isHighlighted
|
|
38141
|
+
} = _ref63;
|
|
38225
38142
|
const formData = groupFormId ? (formsValue[groupFormId] || {})[name] || [] : formsValue[name] || [];
|
|
38226
38143
|
const onUpdate = (val, key) => {
|
|
38227
38144
|
const _val = {
|
|
38228
|
-
[name]: {
|
|
38229
|
-
...formData,
|
|
38145
|
+
[name]: _objectSpread2(_objectSpread2({}, formData), {}, {
|
|
38230
38146
|
[key]: val
|
|
38231
|
-
}
|
|
38147
|
+
})
|
|
38232
38148
|
};
|
|
38233
38149
|
if (groupFormId) {
|
|
38234
|
-
const _defaultData = form
|
|
38235
|
-
const _newData = {
|
|
38236
|
-
|
|
38237
|
-
..._val
|
|
38238
|
-
};
|
|
38239
|
-
onValuesChange(_newData, {
|
|
38240
|
-
...formsValue,
|
|
38150
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
38151
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
38152
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
38241
38153
|
[groupFormId]: _newData
|
|
38242
|
-
});
|
|
38243
|
-
form
|
|
38244
|
-
setValues({
|
|
38245
|
-
...formsValue,
|
|
38154
|
+
}));
|
|
38155
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
38156
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
38246
38157
|
[groupFormId]: _newData
|
|
38247
|
-
});
|
|
38158
|
+
}));
|
|
38248
38159
|
return;
|
|
38249
38160
|
}
|
|
38250
|
-
onValuesChange(_val, {
|
|
38251
|
-
|
|
38252
|
-
|
|
38253
|
-
});
|
|
38254
|
-
form?.setFieldValue(name, _val[name]);
|
|
38255
|
-
setValues({
|
|
38256
|
-
...formsValue,
|
|
38257
|
-
..._val
|
|
38258
|
-
});
|
|
38161
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
38162
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
38163
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
38259
38164
|
};
|
|
38260
38165
|
return /*#__PURE__*/jsxRuntime.jsx(GroupCheckbox, {
|
|
38261
38166
|
form: input,
|
|
@@ -38264,96 +38169,91 @@ const inputTypeComponent$1 = {
|
|
|
38264
38169
|
isHighlighted: isHighlighted
|
|
38265
38170
|
});
|
|
38266
38171
|
},
|
|
38267
|
-
website: ({
|
|
38268
|
-
|
|
38269
|
-
|
|
38270
|
-
|
|
38271
|
-
|
|
38272
|
-
|
|
38273
|
-
|
|
38274
|
-
|
|
38275
|
-
|
|
38276
|
-
|
|
38277
|
-
|
|
38278
|
-
|
|
38279
|
-
|
|
38280
|
-
|
|
38281
|
-
|
|
38172
|
+
website: (_ref64, _ref65) => {
|
|
38173
|
+
let {
|
|
38174
|
+
name,
|
|
38175
|
+
inputName,
|
|
38176
|
+
props,
|
|
38177
|
+
value,
|
|
38178
|
+
repeatIndex,
|
|
38179
|
+
repeatValues,
|
|
38180
|
+
formsValue
|
|
38181
|
+
} = _ref64;
|
|
38182
|
+
let {
|
|
38183
|
+
form,
|
|
38184
|
+
isHighlighted,
|
|
38185
|
+
inputMeta = {},
|
|
38186
|
+
t
|
|
38187
|
+
} = _ref65;
|
|
38188
|
+
return /*#__PURE__*/jsxRuntime.jsx(Website, _objectSpread2(_objectSpread2({
|
|
38282
38189
|
size: "large",
|
|
38283
38190
|
allowClear: true,
|
|
38284
|
-
initialValue: value
|
|
38285
|
-
|
|
38191
|
+
initialValue: value
|
|
38192
|
+
}, props), {}, {
|
|
38286
38193
|
onChange: val => updateFormValues$1(repeatIndex, repeatValues, inputName, val, formsValue, name, form),
|
|
38287
38194
|
className: formatClassname([isHighlighted && "highlighted-cont"]),
|
|
38288
38195
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
38289
38196
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || "www.example.com"
|
|
38290
|
-
});
|
|
38197
|
+
}));
|
|
38291
38198
|
},
|
|
38292
|
-
group: ({
|
|
38293
|
-
|
|
38294
|
-
|
|
38295
|
-
|
|
38296
|
-
|
|
38297
|
-
|
|
38298
|
-
|
|
38299
|
-
|
|
38300
|
-
|
|
38199
|
+
group: (_ref66, _ref67) => {
|
|
38200
|
+
let {
|
|
38201
|
+
props,
|
|
38202
|
+
groupInputs,
|
|
38203
|
+
formsValue
|
|
38204
|
+
} = _ref66;
|
|
38205
|
+
let {
|
|
38206
|
+
inputMeta,
|
|
38207
|
+
isHighlighted
|
|
38208
|
+
} = _ref67;
|
|
38209
|
+
return /*#__PURE__*/jsxRuntime.jsx(GroupInput, _objectSpread2({
|
|
38301
38210
|
formsValue: formsValue,
|
|
38302
38211
|
isHighlighted: isHighlighted,
|
|
38303
38212
|
groupInputs: groupInputs,
|
|
38304
|
-
inputMeta: inputMeta
|
|
38305
|
-
|
|
38306
|
-
});
|
|
38213
|
+
inputMeta: inputMeta
|
|
38214
|
+
}, props));
|
|
38307
38215
|
},
|
|
38308
|
-
groupInputs: ({
|
|
38309
|
-
|
|
38310
|
-
|
|
38311
|
-
|
|
38312
|
-
|
|
38313
|
-
|
|
38314
|
-
|
|
38315
|
-
|
|
38316
|
-
|
|
38216
|
+
groupInputs: (_ref68, _ref69) => {
|
|
38217
|
+
let {
|
|
38218
|
+
props,
|
|
38219
|
+
groupInputs,
|
|
38220
|
+
formsValue
|
|
38221
|
+
} = _ref68;
|
|
38222
|
+
let {
|
|
38223
|
+
inputMeta,
|
|
38224
|
+
isHighlighted
|
|
38225
|
+
} = _ref69;
|
|
38226
|
+
return /*#__PURE__*/jsxRuntime.jsx(GroupInput, _objectSpread2({
|
|
38317
38227
|
formsValue: formsValue,
|
|
38318
38228
|
isHighlighted: isHighlighted,
|
|
38319
38229
|
groupInputs: groupInputs,
|
|
38320
|
-
inputMeta: inputMeta
|
|
38321
|
-
|
|
38322
|
-
});
|
|
38230
|
+
inputMeta: inputMeta
|
|
38231
|
+
}, props));
|
|
38323
38232
|
},
|
|
38324
|
-
smartHelp: ({
|
|
38325
|
-
name,
|
|
38326
|
-
inputName,
|
|
38327
|
-
props,
|
|
38328
|
-
value,
|
|
38329
|
-
repeatIndex,
|
|
38330
|
-
repeatValues,
|
|
38331
|
-
formsValue
|
|
38332
|
-
}, {
|
|
38333
|
-
form,
|
|
38334
|
-
isHighlighted,
|
|
38335
|
-
inputMeta = {},
|
|
38336
|
-
t
|
|
38337
|
-
}) => {
|
|
38233
|
+
smartHelp: (_ref70, _ref71) => {
|
|
38338
38234
|
return /*#__PURE__*/jsxRuntime.jsx(Smart, {});
|
|
38339
38235
|
}
|
|
38340
38236
|
};
|
|
38341
38237
|
const filterForm = (f, d) => {
|
|
38342
38238
|
return f && (f.showFormIf ? showHideForm(f, d) : true);
|
|
38343
38239
|
};
|
|
38344
|
-
const checkFormHasSubsections =
|
|
38240
|
+
const checkFormHasSubsections = function () {
|
|
38241
|
+
let f = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
38242
|
+
return Object.keys(f).map(key => propHasValue$1(f[key].subSection)).includes(true);
|
|
38243
|
+
};
|
|
38345
38244
|
const mapFormGroup = (f, d) => Object.keys(f).map(key => {
|
|
38346
|
-
const {
|
|
38347
|
-
|
|
38348
|
-
|
|
38349
|
-
|
|
38350
|
-
|
|
38351
|
-
|
|
38352
|
-
|
|
38353
|
-
|
|
38354
|
-
|
|
38355
|
-
|
|
38356
|
-
|
|
38245
|
+
const _ref72 = f[key] || {},
|
|
38246
|
+
{
|
|
38247
|
+
label,
|
|
38248
|
+
description = "",
|
|
38249
|
+
excludeFromEdit,
|
|
38250
|
+
showFormIf,
|
|
38251
|
+
icon = "",
|
|
38252
|
+
position = 0,
|
|
38253
|
+
template,
|
|
38254
|
+
formClass
|
|
38255
|
+
} = _ref72,
|
|
38256
|
+
fc = _objectWithoutProperties(_ref72, _excluded2$1);
|
|
38357
38257
|
const fConf = {
|
|
38358
38258
|
id: key,
|
|
38359
38259
|
label,
|
|
@@ -38412,11 +38312,14 @@ const groupSubForms = (fConf, d) => {
|
|
|
38412
38312
|
return f;
|
|
38413
38313
|
}, {});
|
|
38414
38314
|
};
|
|
38415
|
-
const inputIsEmpty = (
|
|
38416
|
-
|
|
38315
|
+
const inputIsEmpty = function () {
|
|
38316
|
+
let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
38317
|
+
let values = arguments.length > 1 ? arguments[1] : undefined;
|
|
38318
|
+
let inputMeta = arguments.length > 2 ? arguments[2] : undefined;
|
|
38319
|
+
if (inputMeta !== null && inputMeta !== void 0 && inputMeta.notApplicable || inputMeta !== null && inputMeta !== void 0 && inputMeta.notAvailable) {
|
|
38417
38320
|
return false;
|
|
38418
38321
|
}
|
|
38419
|
-
if (input
|
|
38322
|
+
if ((input === null || input === void 0 ? void 0 : input.type) === "groupInputs") {
|
|
38420
38323
|
return true;
|
|
38421
38324
|
}
|
|
38422
38325
|
const value = values[input.dataId];
|
|
@@ -38428,26 +38331,28 @@ const inputIsEmpty = (input = {}, values, inputMeta) => {
|
|
|
38428
38331
|
}
|
|
38429
38332
|
return !value;
|
|
38430
38333
|
};
|
|
38431
|
-
const GetFormItem$1 =
|
|
38432
|
-
|
|
38433
|
-
|
|
38434
|
-
|
|
38435
|
-
|
|
38436
|
-
|
|
38437
|
-
|
|
38438
|
-
|
|
38439
|
-
|
|
38440
|
-
|
|
38441
|
-
|
|
38442
|
-
|
|
38443
|
-
|
|
38444
|
-
|
|
38445
|
-
|
|
38446
|
-
|
|
38447
|
-
|
|
38448
|
-
|
|
38449
|
-
|
|
38450
|
-
|
|
38334
|
+
const GetFormItem$1 = _ref73 => {
|
|
38335
|
+
var _inputMeta$reviews, _input$meta19, _input$meta20, _rules$find, _input$meta21;
|
|
38336
|
+
let {
|
|
38337
|
+
highlightMandatory,
|
|
38338
|
+
inputData,
|
|
38339
|
+
inputId,
|
|
38340
|
+
input,
|
|
38341
|
+
values,
|
|
38342
|
+
MainForm,
|
|
38343
|
+
options,
|
|
38344
|
+
plainForms,
|
|
38345
|
+
setValues,
|
|
38346
|
+
setAddress,
|
|
38347
|
+
i,
|
|
38348
|
+
inputKey,
|
|
38349
|
+
onValuesChange = () => {},
|
|
38350
|
+
setLoading = () => {},
|
|
38351
|
+
inputMeta = {},
|
|
38352
|
+
changeInputMeta = () => {},
|
|
38353
|
+
changeLinking = () => {},
|
|
38354
|
+
namespace
|
|
38355
|
+
} = _ref73;
|
|
38451
38356
|
const {
|
|
38452
38357
|
t,
|
|
38453
38358
|
user,
|
|
@@ -38462,44 +38367,42 @@ const GetFormItem$1 = ({
|
|
|
38462
38367
|
staticWidth,
|
|
38463
38368
|
fullWidth
|
|
38464
38369
|
} = useEditContext();
|
|
38465
|
-
const lastReview = (inputMeta
|
|
38370
|
+
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];
|
|
38466
38371
|
const [isShown, setIsShown] = React.useState(!!inputData.commentValue);
|
|
38467
38372
|
const inputLabel = getInputLabel$1(input, values);
|
|
38468
38373
|
const onClickReviewSuccess = () => {
|
|
38469
38374
|
if (!isReview) {
|
|
38470
38375
|
return;
|
|
38471
38376
|
}
|
|
38472
|
-
const reviewSuccess = lastReview
|
|
38377
|
+
const reviewSuccess = lastReview === null || lastReview === void 0 ? void 0 : lastReview.reviewSuccess;
|
|
38473
38378
|
changeInputMeta({
|
|
38474
38379
|
key: inputId,
|
|
38475
38380
|
type: input.type,
|
|
38476
|
-
value: {
|
|
38477
|
-
...inputMeta,
|
|
38381
|
+
value: _objectSpread2(_objectSpread2({}, inputMeta), {}, {
|
|
38478
38382
|
reviews: reviewSuccess ? (inputMeta.reviews || []).filter(v => v.createdAt !== lastReview.createdAt) : [...(inputMeta.reviews || []), {
|
|
38479
38383
|
reviewer: user,
|
|
38480
38384
|
createdAt: new Date().toISOString(),
|
|
38481
38385
|
reviewSuccess: true
|
|
38482
38386
|
}]
|
|
38483
|
-
}
|
|
38387
|
+
})
|
|
38484
38388
|
});
|
|
38485
38389
|
};
|
|
38486
38390
|
const onClickReviewError = () => {
|
|
38487
38391
|
if (!isReview) {
|
|
38488
38392
|
return;
|
|
38489
38393
|
}
|
|
38490
|
-
const reviewError = lastReview
|
|
38394
|
+
const reviewError = lastReview === null || lastReview === void 0 ? void 0 : lastReview.reviewError;
|
|
38491
38395
|
changeInputMeta({
|
|
38492
38396
|
key: inputId,
|
|
38493
38397
|
type: input.type,
|
|
38494
|
-
value: {
|
|
38495
|
-
...inputMeta,
|
|
38398
|
+
value: _objectSpread2(_objectSpread2({}, inputMeta), {}, {
|
|
38496
38399
|
reviews: reviewError ? (inputMeta.reviews || []).filter(v => v.createdAt !== lastReview.createdAt) : [...(inputMeta.reviews || []), {
|
|
38497
38400
|
reviewer: user,
|
|
38498
38401
|
createdAt: new Date().toISOString(),
|
|
38499
38402
|
reviewError: true,
|
|
38500
38403
|
comment: ""
|
|
38501
38404
|
}]
|
|
38502
|
-
}
|
|
38405
|
+
})
|
|
38503
38406
|
});
|
|
38504
38407
|
};
|
|
38505
38408
|
switch (input.type) {
|
|
@@ -38513,12 +38416,12 @@ const GetFormItem$1 = ({
|
|
|
38513
38416
|
case "header":
|
|
38514
38417
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38515
38418
|
className: "daf-title with-subtitle",
|
|
38516
|
-
style: input
|
|
38419
|
+
style: input === null || input === void 0 || (_input$meta19 = input.meta) === null || _input$meta19 === void 0 ? void 0 : _input$meta19.style,
|
|
38517
38420
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38518
38421
|
className: "flex",
|
|
38519
38422
|
children: [/*#__PURE__*/jsxRuntime.jsx("h1", {
|
|
38520
38423
|
children: ReactHtmlParser__default["default"](getLabel$1(input.label, values))
|
|
38521
|
-
}), !!input.description || input
|
|
38424
|
+
}), !!input.description || input !== null && input !== void 0 && (_input$meta20 = input.meta) !== null && _input$meta20 !== void 0 && _input$meta20.isEvaluation ? /*#__PURE__*/jsxRuntime.jsx(antd.Popover, {
|
|
38522
38425
|
content: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38523
38426
|
className: "tooltip-popover-cont",
|
|
38524
38427
|
children: ReactHtmlParser__default["default"](input.description)
|
|
@@ -38545,7 +38448,7 @@ const GetFormItem$1 = ({
|
|
|
38545
38448
|
const specialCharsRule = rules.find(r => r.type === "specialCharacters");
|
|
38546
38449
|
|
|
38547
38450
|
// eslint-disable-next-line no-case-declarations
|
|
38548
|
-
let maxRule = rules.find(rule => rule.max)
|
|
38451
|
+
let maxRule = (_rules$find = rules.find(rule => rule.max)) === null || _rules$find === void 0 ? void 0 : _rules$find.max;
|
|
38549
38452
|
if (!maxRule && input.type === "textarea") {
|
|
38550
38453
|
maxRule = MAX_TEXT_AREA_LENGTH;
|
|
38551
38454
|
}
|
|
@@ -38558,27 +38461,30 @@ const GetFormItem$1 = ({
|
|
|
38558
38461
|
message: requiredRule.message || ""
|
|
38559
38462
|
});
|
|
38560
38463
|
}
|
|
38561
|
-
const isHighlighted = highlightMandatory && input
|
|
38464
|
+
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);
|
|
38562
38465
|
if (requiredRule || specialCharsRule) {
|
|
38563
38466
|
if (input.type === "groupInputs") {
|
|
38564
38467
|
rules = rules.map(r => {
|
|
38565
38468
|
if (r.required) {
|
|
38566
|
-
return
|
|
38567
|
-
|
|
38568
|
-
|
|
38569
|
-
|
|
38570
|
-
|
|
38571
|
-
|
|
38572
|
-
|
|
38573
|
-
|
|
38574
|
-
for (let i = 0; i < keys.length; i++) {
|
|
38575
|
-
if (typeof getFieldValue(keys[i]) === "undefined" || getFieldValue(keys[i]) === null) {
|
|
38576
|
-
return Promise.reject(r.message);
|
|
38469
|
+
return _ref74 => {
|
|
38470
|
+
let {
|
|
38471
|
+
getFieldValue
|
|
38472
|
+
} = _ref74;
|
|
38473
|
+
return {
|
|
38474
|
+
validator() {
|
|
38475
|
+
if (inputMeta.notAvailable || inputMeta.notApplicable) {
|
|
38476
|
+
return Promise.resolve();
|
|
38577
38477
|
}
|
|
38478
|
+
const keys = Object.keys(input.inputs);
|
|
38479
|
+
for (let i = 0; i < keys.length; i++) {
|
|
38480
|
+
if (typeof getFieldValue(keys[i]) === "undefined" || getFieldValue(keys[i]) === null) {
|
|
38481
|
+
return Promise.reject(r.message);
|
|
38482
|
+
}
|
|
38483
|
+
}
|
|
38484
|
+
return Promise.resolve();
|
|
38578
38485
|
}
|
|
38579
|
-
|
|
38580
|
-
|
|
38581
|
-
});
|
|
38486
|
+
};
|
|
38487
|
+
};
|
|
38582
38488
|
}
|
|
38583
38489
|
return r;
|
|
38584
38490
|
});
|
|
@@ -38616,12 +38522,13 @@ const GetFormItem$1 = ({
|
|
|
38616
38522
|
}
|
|
38617
38523
|
}
|
|
38618
38524
|
if (input && typeof input === "object") {
|
|
38525
|
+
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;
|
|
38619
38526
|
// check if input is valid
|
|
38620
38527
|
const hideComment = namespace === "project-readiness";
|
|
38621
38528
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
38622
38529
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38623
38530
|
className: "flex-row input-cont",
|
|
38624
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
38531
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
38625
38532
|
extra: /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
38626
38533
|
children: !noActionsInputs.includes(input.type) ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38627
38534
|
className: formatClassname(["ml-4 input-actions"]),
|
|
@@ -38631,7 +38538,7 @@ const GetFormItem$1 = ({
|
|
|
38631
38538
|
title: t("Add review note"),
|
|
38632
38539
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38633
38540
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38634
|
-
className: formatClassname(["review-btn review-error-btn", lastReview
|
|
38541
|
+
className: formatClassname(["review-btn review-error-btn", (lastReview === null || lastReview === void 0 ? void 0 : lastReview.reviewError) && "primary"]),
|
|
38635
38542
|
type: "link",
|
|
38636
38543
|
onClick: onClickReviewError,
|
|
38637
38544
|
children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
|
|
@@ -38647,7 +38554,7 @@ const GetFormItem$1 = ({
|
|
|
38647
38554
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38648
38555
|
type: "link",
|
|
38649
38556
|
onClick: onClickReviewSuccess,
|
|
38650
|
-
className: formatClassname(["review-btn review-success-btn", lastReview
|
|
38557
|
+
className: formatClassname(["review-btn review-success-btn", (lastReview === null || lastReview === void 0 ? void 0 : lastReview.reviewSuccess) && "primary"]),
|
|
38651
38558
|
children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
|
|
38652
38559
|
name: "CheckSquare",
|
|
38653
38560
|
width: 16,
|
|
@@ -38684,7 +38591,7 @@ const GetFormItem$1 = ({
|
|
|
38684
38591
|
}
|
|
38685
38592
|
});
|
|
38686
38593
|
},
|
|
38687
|
-
disabled: !input.meta
|
|
38594
|
+
disabled: !((_input$meta22 = input.meta) !== null && _input$meta22 !== void 0 && _input$meta22.notApplicable),
|
|
38688
38595
|
children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
|
|
38689
38596
|
name: "NotApplicable",
|
|
38690
38597
|
width: 16,
|
|
@@ -38698,7 +38605,7 @@ const GetFormItem$1 = ({
|
|
|
38698
38605
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
38699
38606
|
className: formatClassname(["default p-0", inputMeta.notAvailable && "primary"]),
|
|
38700
38607
|
type: "link",
|
|
38701
|
-
disabled: !input.meta
|
|
38608
|
+
disabled: !((_input$meta23 = input.meta) !== null && _input$meta23 !== void 0 && _input$meta23.notAvailable),
|
|
38702
38609
|
onClick: () => {
|
|
38703
38610
|
const value = getDefaultInputValue(input);
|
|
38704
38611
|
MainForm.setFields([{
|
|
@@ -38730,14 +38637,14 @@ const GetFormItem$1 = ({
|
|
|
38730
38637
|
}), !hideComment ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
38731
38638
|
title: t("Add comment"),
|
|
38732
38639
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38733
|
-
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
38640
|
+
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
|
|
38734
38641
|
type: "link",
|
|
38735
|
-
disabled: !input.meta
|
|
38736
|
-
|
|
38737
|
-
|
|
38738
|
-
|
|
38739
|
-
|
|
38740
|
-
|
|
38642
|
+
disabled: !((_input$meta24 = input.meta) !== null && _input$meta24 !== void 0 && _input$meta24.comment)
|
|
38643
|
+
}, !isShown ? {
|
|
38644
|
+
className: "default p-0"
|
|
38645
|
+
} : {
|
|
38646
|
+
className: "p-0 primary"
|
|
38647
|
+
}), {}, {
|
|
38741
38648
|
onClick: () => {
|
|
38742
38649
|
if (inputMeta.comment !== undefined && inputMeta.comment !== null) {
|
|
38743
38650
|
return;
|
|
@@ -38756,7 +38663,7 @@ const GetFormItem$1 = ({
|
|
|
38756
38663
|
width: 16,
|
|
38757
38664
|
height: 16
|
|
38758
38665
|
})
|
|
38759
|
-
})
|
|
38666
|
+
}))
|
|
38760
38667
|
})
|
|
38761
38668
|
}) : /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
38762
38669
|
title: t("Project Readiness"),
|
|
@@ -38775,36 +38682,34 @@ const GetFormItem$1 = ({
|
|
|
38775
38682
|
}) : null]
|
|
38776
38683
|
}) : null
|
|
38777
38684
|
}),
|
|
38778
|
-
initialValue: inputMeta
|
|
38779
|
-
|
|
38780
|
-
|
|
38781
|
-
|
|
38782
|
-
|
|
38783
|
-
|
|
38784
|
-
|
|
38785
|
-
|
|
38786
|
-
|
|
38787
|
-
|
|
38788
|
-
|
|
38789
|
-
|
|
38790
|
-
if (Array.isArray(e)) {
|
|
38791
|
-
return e;
|
|
38792
|
-
}
|
|
38793
|
-
return e && e.fileList && e.fileList.map(f => {
|
|
38794
|
-
if (f.response) {
|
|
38795
|
-
return f.response;
|
|
38796
|
-
}
|
|
38797
|
-
return f;
|
|
38798
|
-
});
|
|
38685
|
+
initialValue: inputMeta === null || inputMeta === void 0 ? void 0 : inputMeta.defaultValue
|
|
38686
|
+
}, inputOnBlur.includes(input.type) ? {
|
|
38687
|
+
trigger: "onBlur"
|
|
38688
|
+
} : {}), ["total100", "group"].includes(input.type) ? {} : {
|
|
38689
|
+
name: inputId,
|
|
38690
|
+
fieldKey: inputId,
|
|
38691
|
+
initialValue: inputData.value
|
|
38692
|
+
}), ["upload"].includes(input.type) ? {
|
|
38693
|
+
valuePropName: "fileList",
|
|
38694
|
+
getValueFromEvent: e => {
|
|
38695
|
+
if (Array.isArray(e)) {
|
|
38696
|
+
return e;
|
|
38799
38697
|
}
|
|
38800
|
-
|
|
38801
|
-
|
|
38698
|
+
return e && e.fileList && e.fileList.map(f => {
|
|
38699
|
+
if (f.response) {
|
|
38700
|
+
return f.response;
|
|
38701
|
+
}
|
|
38702
|
+
return f;
|
|
38703
|
+
});
|
|
38704
|
+
}
|
|
38705
|
+
} : {}), {}, {
|
|
38706
|
+
className: formatClassname(["i-".concat(input.type, " flex-1"), input.comment && "with-comment", maxRule && "with-max-rule"]),
|
|
38802
38707
|
"data-id": inputData.name,
|
|
38803
38708
|
rules: rules,
|
|
38804
38709
|
required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false,
|
|
38805
38710
|
labelCol: 12,
|
|
38806
38711
|
label: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38807
|
-
className: formatClassname(["flex", input
|
|
38712
|
+
className: formatClassname(["flex", (input === null || input === void 0 || (_input$meta25 = input.meta) === null || _input$meta25 === void 0 ? void 0 : _input$meta25.code) && "mr-10"]),
|
|
38808
38713
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38809
38714
|
className: "mr-1",
|
|
38810
38715
|
children: getInputLabel$1(input, values)
|
|
@@ -38817,7 +38722,7 @@ const GetFormItem$1 = ({
|
|
|
38817
38722
|
config: input,
|
|
38818
38723
|
t: t,
|
|
38819
38724
|
ajaxForms: ajaxForms,
|
|
38820
|
-
linkingData: values
|
|
38725
|
+
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),
|
|
38821
38726
|
changeAjaxForms: changeAjaxForms,
|
|
38822
38727
|
getApiBaseUrl: getApiBaseUrl,
|
|
38823
38728
|
getAppHeader: getAppHeader,
|
|
@@ -38825,12 +38730,11 @@ const GetFormItem$1 = ({
|
|
|
38825
38730
|
getToken: getToken,
|
|
38826
38731
|
app: app,
|
|
38827
38732
|
valueOnlyString: true
|
|
38828
|
-
}) : inputTypeComponent$1[input.type] ? inputTypeComponent$1[input.type]({
|
|
38829
|
-
...inputData,
|
|
38733
|
+
}) : inputTypeComponent$1[input.type] ? inputTypeComponent$1[input.type](_objectSpread2(_objectSpread2({}, inputData), {}, {
|
|
38830
38734
|
maxWidth,
|
|
38831
38735
|
staticWidth,
|
|
38832
38736
|
fullWidth
|
|
38833
|
-
}, {
|
|
38737
|
+
}), {
|
|
38834
38738
|
form: MainForm,
|
|
38835
38739
|
forms: options,
|
|
38836
38740
|
allForms: plainForms,
|
|
@@ -38851,10 +38755,10 @@ const GetFormItem$1 = ({
|
|
|
38851
38755
|
staticWidth,
|
|
38852
38756
|
fullWidth
|
|
38853
38757
|
}) : console.log(input)
|
|
38854
|
-
}), input.meta
|
|
38758
|
+
})), (_input$meta26 = input.meta) !== null && _input$meta26 !== void 0 && _input$meta26.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38855
38759
|
className: "code",
|
|
38856
38760
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
38857
|
-
children: input.meta
|
|
38761
|
+
children: (_input$meta27 = input.meta) === null || _input$meta27 === void 0 ? void 0 : _input$meta27.code
|
|
38858
38762
|
})
|
|
38859
38763
|
}) : null]
|
|
38860
38764
|
}), maxRule ? ["imageUpload", "upload", "videoUpload"].includes(input.type) ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -38874,10 +38778,10 @@ const GetFormItem$1 = ({
|
|
|
38874
38778
|
className: "max-char-span",
|
|
38875
38779
|
children: t("max-char", {
|
|
38876
38780
|
chars: maxRule,
|
|
38877
|
-
filled: inputData
|
|
38781
|
+
filled: (inputData === null || inputData === void 0 || (_inputData$value = inputData.value) === null || _inputData$value === void 0 ? void 0 : _inputData$value.length) || 0
|
|
38878
38782
|
})
|
|
38879
38783
|
})
|
|
38880
|
-
}) : null, input.meta
|
|
38784
|
+
}) : null, (_input$meta28 = input.meta) !== null && _input$meta28 !== void 0 && _input$meta28.comment && isShown ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38881
38785
|
className: "input-content",
|
|
38882
38786
|
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
38883
38787
|
className: "comment-textarea",
|
|
@@ -38903,7 +38807,7 @@ const GetFormItem$1 = ({
|
|
|
38903
38807
|
},
|
|
38904
38808
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
38905
38809
|
type: "link",
|
|
38906
|
-
disabled: !input.meta
|
|
38810
|
+
disabled: !((_input$meta29 = input.meta) !== null && _input$meta29 !== void 0 && _input$meta29.comment),
|
|
38907
38811
|
className: "p-0",
|
|
38908
38812
|
children: /*#__PURE__*/jsxRuntime.jsx(Icons.DeleteOutlined, {
|
|
38909
38813
|
width: 16,
|
|
@@ -38912,12 +38816,11 @@ const GetFormItem$1 = ({
|
|
|
38912
38816
|
})
|
|
38913
38817
|
})]
|
|
38914
38818
|
}),
|
|
38915
|
-
children: inputTypeComponent$1.comment({
|
|
38916
|
-
...inputData,
|
|
38819
|
+
children: inputTypeComponent$1.comment(_objectSpread2(_objectSpread2({}, inputData), {}, {
|
|
38917
38820
|
maxWidth,
|
|
38918
38821
|
staticWidth,
|
|
38919
38822
|
fullWidth
|
|
38920
|
-
}, {
|
|
38823
|
+
}), {
|
|
38921
38824
|
form: MainForm,
|
|
38922
38825
|
forms: options,
|
|
38923
38826
|
setFormValues: setValues,
|
|
@@ -38942,16 +38845,16 @@ const GetFormItem$1 = ({
|
|
|
38942
38845
|
className: "max-char-span",
|
|
38943
38846
|
children: t("max-char", {
|
|
38944
38847
|
chars: MAX_COMMENTS_LENGTH,
|
|
38945
|
-
filled: inputData
|
|
38848
|
+
filled: (inputData === null || inputData === void 0 || (_inputData$commentVal = inputData.commentValue) === null || _inputData$commentVal === void 0 ? void 0 : _inputData$commentVal.length) || 0
|
|
38946
38849
|
})
|
|
38947
38850
|
})]
|
|
38948
|
-
}) : null, lastReview
|
|
38851
|
+
}) : null, lastReview !== null && lastReview !== void 0 && lastReview.reviewError ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38949
38852
|
className: "input-content",
|
|
38950
38853
|
children: isReview ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
38951
38854
|
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
38952
38855
|
className: "comment-textarea",
|
|
38953
|
-
initialValue: lastReview
|
|
38954
|
-
name:
|
|
38856
|
+
initialValue: (lastReview === null || lastReview === void 0 ? void 0 : lastReview.comment) || "",
|
|
38857
|
+
name: "".concat(inputId, "-reviewErrorComment"),
|
|
38955
38858
|
label: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38956
38859
|
className: "flex w-100",
|
|
38957
38860
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -38959,31 +38862,28 @@ const GetFormItem$1 = ({
|
|
|
38959
38862
|
children: t("Review note")
|
|
38960
38863
|
})
|
|
38961
38864
|
}),
|
|
38962
|
-
children: inputTypeComponent$1.comment({
|
|
38963
|
-
...inputData,
|
|
38865
|
+
children: inputTypeComponent$1.comment(_objectSpread2(_objectSpread2({}, inputData), {}, {
|
|
38964
38866
|
maxWidth,
|
|
38965
38867
|
staticWidth,
|
|
38966
38868
|
fullWidth
|
|
38967
|
-
}, {
|
|
38869
|
+
}), {
|
|
38968
38870
|
form: MainForm,
|
|
38969
38871
|
forms: options,
|
|
38970
|
-
value: lastReview
|
|
38872
|
+
value: (lastReview === null || lastReview === void 0 ? void 0 : lastReview.comment) || "",
|
|
38971
38873
|
onChange: val => {
|
|
38972
38874
|
changeInputMeta({
|
|
38973
38875
|
key: inputId,
|
|
38974
38876
|
type: input.type,
|
|
38975
|
-
value: {
|
|
38976
|
-
|
|
38977
|
-
reviews: (inputMeta?.reviews || []).map(v => {
|
|
38877
|
+
value: _objectSpread2(_objectSpread2({}, inputMeta), {}, {
|
|
38878
|
+
reviews: ((inputMeta === null || inputMeta === void 0 ? void 0 : inputMeta.reviews) || []).map(v => {
|
|
38978
38879
|
if (v.createdAt === lastReview.createdAt) {
|
|
38979
|
-
return {
|
|
38980
|
-
...v,
|
|
38880
|
+
return _objectSpread2(_objectSpread2({}, v), {}, {
|
|
38981
38881
|
comment: val
|
|
38982
|
-
};
|
|
38882
|
+
});
|
|
38983
38883
|
}
|
|
38984
38884
|
return v;
|
|
38985
38885
|
})
|
|
38986
|
-
}
|
|
38886
|
+
})
|
|
38987
38887
|
});
|
|
38988
38888
|
},
|
|
38989
38889
|
t,
|
|
@@ -38997,7 +38897,7 @@ const GetFormItem$1 = ({
|
|
|
38997
38897
|
className: "max-char-span",
|
|
38998
38898
|
children: t("max-char", {
|
|
38999
38899
|
chars: MAX_COMMENTS_LENGTH,
|
|
39000
|
-
filled: lastReview.comment
|
|
38900
|
+
filled: ((_lastReview$comment = lastReview.comment) === null || _lastReview$comment === void 0 ? void 0 : _lastReview$comment.length) || 0
|
|
39001
38901
|
})
|
|
39002
38902
|
})]
|
|
39003
38903
|
}) : /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -39018,7 +38918,7 @@ const GetFormItem$1 = ({
|
|
|
39018
38918
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
39019
38919
|
className: "flex flex-column justify-center mr-1",
|
|
39020
38920
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
39021
|
-
children: lastReview
|
|
38921
|
+
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")
|
|
39022
38922
|
})
|
|
39023
38923
|
})]
|
|
39024
38924
|
})]
|
|
@@ -39029,13 +38929,14 @@ const GetFormItem$1 = ({
|
|
|
39029
38929
|
return null;
|
|
39030
38930
|
}
|
|
39031
38931
|
};
|
|
39032
|
-
const editErrorHandler =
|
|
39033
|
-
|
|
39034
|
-
|
|
39035
|
-
|
|
38932
|
+
const editErrorHandler = _ref76 => {
|
|
38933
|
+
let {
|
|
38934
|
+
errorFields,
|
|
38935
|
+
t = s => s
|
|
38936
|
+
} = _ref76;
|
|
39036
38937
|
if (Array.isArray(errorFields) && errorFields.length) {
|
|
39037
38938
|
const name = errorFields[0].name.join(".");
|
|
39038
|
-
const element = document.querySelector(
|
|
38939
|
+
const element = document.querySelector("[data-id=\"".concat(name, "\"]"));
|
|
39039
38940
|
if (element) {
|
|
39040
38941
|
element.scrollIntoView();
|
|
39041
38942
|
antd.message.error(t("errors::please-correct-invalid-inputs"));
|
|
@@ -45245,7 +45146,7 @@ const filtersConfig$e = {
|
|
|
45245
45146
|
datastakeId: '',
|
|
45246
45147
|
name: ''
|
|
45247
45148
|
};
|
|
45248
|
-
const selectFiltersConfig$
|
|
45149
|
+
const selectFiltersConfig$d = {
|
|
45249
45150
|
country: {
|
|
45250
45151
|
type: 'select',
|
|
45251
45152
|
label: 'Country',
|
|
@@ -46022,7 +45923,7 @@ function DataStoreTable$1(_ref) {
|
|
|
46022
45923
|
goNext,
|
|
46023
45924
|
setPagination
|
|
46024
45925
|
} = useFilters({
|
|
46025
|
-
selectFiltersConfig: selectFiltersConfig$
|
|
45926
|
+
selectFiltersConfig: selectFiltersConfig$d,
|
|
46026
45927
|
view,
|
|
46027
45928
|
goTo,
|
|
46028
45929
|
location,
|
|
@@ -46116,7 +46017,7 @@ function DataStoreTable$1(_ref) {
|
|
|
46116
46017
|
rowKey: "key",
|
|
46117
46018
|
doEmptyRows: true,
|
|
46118
46019
|
selectOptions,
|
|
46119
|
-
filtersConfig: selectFiltersConfig$
|
|
46020
|
+
filtersConfig: selectFiltersConfig$d,
|
|
46120
46021
|
onFilterChange: onFiltersChange,
|
|
46121
46022
|
showFilters,
|
|
46122
46023
|
defaultFilters,
|
|
@@ -53902,7 +53803,7 @@ const checkboxConfig$d = {
|
|
|
53902
53803
|
name: "Name",
|
|
53903
53804
|
datastakeId: "ID"
|
|
53904
53805
|
};
|
|
53905
|
-
const selectFiltersConfig$
|
|
53806
|
+
const selectFiltersConfig$c = {
|
|
53906
53807
|
account: {
|
|
53907
53808
|
type: "select",
|
|
53908
53809
|
label: "Account",
|
|
@@ -53986,6 +53887,16 @@ const useGetQueryParams = ({
|
|
|
53986
53887
|
product,
|
|
53987
53888
|
...rest
|
|
53988
53889
|
} = queryParams;
|
|
53890
|
+
const parsedSearchParams = safeJsonParse(rawSearchParams);
|
|
53891
|
+
const otherParams = {
|
|
53892
|
+
...rest,
|
|
53893
|
+
...(product ? {
|
|
53894
|
+
"products.typeOfProduct": product
|
|
53895
|
+
} : {}),
|
|
53896
|
+
...(status ? {
|
|
53897
|
+
published: status === "submitted"
|
|
53898
|
+
} : {})
|
|
53899
|
+
};
|
|
53989
53900
|
return {
|
|
53990
53901
|
paginationQuery: {
|
|
53991
53902
|
skip: page,
|
|
@@ -53993,21 +53904,13 @@ const useGetQueryParams = ({
|
|
|
53993
53904
|
},
|
|
53994
53905
|
searchParams: {
|
|
53995
53906
|
qs: search,
|
|
53996
|
-
fields:
|
|
53997
|
-
},
|
|
53998
|
-
otherParams: {
|
|
53999
|
-
...rest,
|
|
54000
|
-
...(product && {
|
|
54001
|
-
"products.typeOfProduct": product
|
|
54002
|
-
}),
|
|
54003
|
-
...(status && {
|
|
54004
|
-
published: status === "submitted" ? true : false
|
|
54005
|
-
})
|
|
53907
|
+
fields: parsedSearchParams
|
|
54006
53908
|
},
|
|
53909
|
+
otherParams,
|
|
54007
53910
|
sortBy,
|
|
54008
53911
|
sortDir
|
|
54009
53912
|
};
|
|
54010
|
-
}, [queryParams]);
|
|
53913
|
+
}, [JSON.stringify(queryParams)]);
|
|
54011
53914
|
return params;
|
|
54012
53915
|
};
|
|
54013
53916
|
|
|
@@ -54070,7 +53973,6 @@ function useAdminTable({
|
|
|
54070
53973
|
const params = filterParams({
|
|
54071
53974
|
activeFilters: filter.activeFilters
|
|
54072
53975
|
});
|
|
54073
|
-
console.log(params, "params");
|
|
54074
53976
|
const {
|
|
54075
53977
|
data
|
|
54076
53978
|
} = await getData({
|
|
@@ -54123,9 +54025,6 @@ const useGetParams = ({
|
|
|
54123
54025
|
activeTab,
|
|
54124
54026
|
...rest
|
|
54125
54027
|
} = otherParams;
|
|
54126
|
-
console.log({
|
|
54127
|
-
hasPagination
|
|
54128
|
-
});
|
|
54129
54028
|
const params = React.useMemo(() => {
|
|
54130
54029
|
if (!hasPagination) {
|
|
54131
54030
|
return {
|
|
@@ -54248,7 +54147,7 @@ function UserTable(_ref) {
|
|
|
54248
54147
|
} = useAdminTable({
|
|
54249
54148
|
goTo,
|
|
54250
54149
|
location,
|
|
54251
|
-
selectFiltersConfig: selectFiltersConfig$
|
|
54150
|
+
selectFiltersConfig: selectFiltersConfig$c,
|
|
54252
54151
|
view: view$2,
|
|
54253
54152
|
defaultUrlParams: defaultUrlParams$6,
|
|
54254
54153
|
module,
|
|
@@ -54330,7 +54229,7 @@ function UserTable(_ref) {
|
|
|
54330
54229
|
pagination: filter.pagination,
|
|
54331
54230
|
selectOptions: selectOptions,
|
|
54332
54231
|
setShowFilters: setShowFilters,
|
|
54333
|
-
filtersConfig: selectFiltersConfig$
|
|
54232
|
+
filtersConfig: selectFiltersConfig$c,
|
|
54334
54233
|
onFilterChange: filter.onFiltersChange,
|
|
54335
54234
|
showFilters: showFilters,
|
|
54336
54235
|
defaultFilters: filter.defaultFilters,
|
|
@@ -54658,7 +54557,7 @@ const checkboxConfig$c = {
|
|
|
54658
54557
|
name: "Name",
|
|
54659
54558
|
datastakeId: "ID"
|
|
54660
54559
|
};
|
|
54661
|
-
const selectFiltersConfig$
|
|
54560
|
+
const selectFiltersConfig$b = {
|
|
54662
54561
|
type: {
|
|
54663
54562
|
type: "select",
|
|
54664
54563
|
label: "Type",
|
|
@@ -54997,7 +54896,7 @@ function AccountTable(_ref) {
|
|
|
54997
54896
|
} = useAdminTable({
|
|
54998
54897
|
goTo,
|
|
54999
54898
|
location,
|
|
55000
|
-
selectFiltersConfig: selectFiltersConfig$
|
|
54899
|
+
selectFiltersConfig: selectFiltersConfig$b,
|
|
55001
54900
|
view: view$1,
|
|
55002
54901
|
defaultUrlParams: defaultUrlParams$5,
|
|
55003
54902
|
module,
|
|
@@ -55125,7 +55024,7 @@ function AccountTable(_ref) {
|
|
|
55125
55024
|
doEmptyRows: true,
|
|
55126
55025
|
selectOptions: selectOptions,
|
|
55127
55026
|
setShowFilters: setShowFilters,
|
|
55128
|
-
filtersConfig: selectFiltersConfig$
|
|
55027
|
+
filtersConfig: selectFiltersConfig$b,
|
|
55129
55028
|
onFilterChange: filter.onFiltersChange,
|
|
55130
55029
|
showFilters: showFilters,
|
|
55131
55030
|
defaultFilters: filter.defaultFilters,
|
|
@@ -55161,7 +55060,7 @@ function AccountTable(_ref) {
|
|
|
55161
55060
|
});
|
|
55162
55061
|
}
|
|
55163
55062
|
|
|
55164
|
-
const selectFiltersConfig$
|
|
55063
|
+
const selectFiltersConfig$a = {
|
|
55165
55064
|
category: {
|
|
55166
55065
|
type: "select",
|
|
55167
55066
|
label: "Category",
|
|
@@ -55825,7 +55724,7 @@ function LocationTable(_ref) {
|
|
|
55825
55724
|
} = useSubjectsAdminTable({
|
|
55826
55725
|
goTo,
|
|
55827
55726
|
location,
|
|
55828
|
-
selectFiltersConfig: selectFiltersConfig$
|
|
55727
|
+
selectFiltersConfig: selectFiltersConfig$a,
|
|
55829
55728
|
view,
|
|
55830
55729
|
defaultUrlParams: defaultUrlParams$4,
|
|
55831
55730
|
module,
|
|
@@ -55907,7 +55806,7 @@ function LocationTable(_ref) {
|
|
|
55907
55806
|
selectOptions: selectOptions,
|
|
55908
55807
|
doEmptyRows: true,
|
|
55909
55808
|
setShowFilters: setShowFilters,
|
|
55910
|
-
filtersConfig: selectFiltersConfig$
|
|
55809
|
+
filtersConfig: selectFiltersConfig$a,
|
|
55911
55810
|
onFilterChange: filter.onFiltersChange,
|
|
55912
55811
|
showFilters: showFilters,
|
|
55913
55812
|
defaultFilters: filter.defaultFilters,
|
|
@@ -55937,7 +55836,7 @@ function LocationTable(_ref) {
|
|
|
55937
55836
|
});
|
|
55938
55837
|
}
|
|
55939
55838
|
|
|
55940
|
-
const selectFiltersConfig$
|
|
55839
|
+
const selectFiltersConfig$9 = {
|
|
55941
55840
|
category: {
|
|
55942
55841
|
type: "select",
|
|
55943
55842
|
label: "Category",
|
|
@@ -56502,7 +56401,7 @@ function SubjectsTable(_ref) {
|
|
|
56502
56401
|
} = useSubjectsAdminTable({
|
|
56503
56402
|
goTo,
|
|
56504
56403
|
location,
|
|
56505
|
-
selectFiltersConfig: selectFiltersConfig$
|
|
56404
|
+
selectFiltersConfig: selectFiltersConfig$9,
|
|
56506
56405
|
view,
|
|
56507
56406
|
defaultUrlParams: defaultUrlParams$3,
|
|
56508
56407
|
module,
|
|
@@ -56583,7 +56482,7 @@ function SubjectsTable(_ref) {
|
|
|
56583
56482
|
selectOptions: selectOptions,
|
|
56584
56483
|
doEmptyRows: true,
|
|
56585
56484
|
setShowFilters: setShowFilters,
|
|
56586
|
-
filtersConfig: selectFiltersConfig$
|
|
56485
|
+
filtersConfig: selectFiltersConfig$9,
|
|
56587
56486
|
onFilterChange: filter.onFiltersChange,
|
|
56588
56487
|
showFilters: showFilters,
|
|
56589
56488
|
defaultFilters: filter.defaultFilters,
|
|
@@ -57110,7 +57009,7 @@ const getColumns$2 = ({
|
|
|
57110
57009
|
return cols.filter(v => v.show);
|
|
57111
57010
|
};
|
|
57112
57011
|
const checkboxConfig$9 = {};
|
|
57113
|
-
const selectFiltersConfig$
|
|
57012
|
+
const selectFiltersConfig$8 = {
|
|
57114
57013
|
userRole: {
|
|
57115
57014
|
type: "select",
|
|
57116
57015
|
label: "Role",
|
|
@@ -57186,7 +57085,7 @@ function Users({
|
|
|
57186
57085
|
} = useFilters({
|
|
57187
57086
|
goTo,
|
|
57188
57087
|
location,
|
|
57189
|
-
selectFiltersConfig: selectFiltersConfig$
|
|
57088
|
+
selectFiltersConfig: selectFiltersConfig$8,
|
|
57190
57089
|
defaultUrlParams: defaultUrlParams$2,
|
|
57191
57090
|
module,
|
|
57192
57091
|
filtersConfig: filtersConfig$9,
|
|
@@ -57284,7 +57183,7 @@ function Users({
|
|
|
57284
57183
|
selectOptions: selectOptions,
|
|
57285
57184
|
setShowFilters: setShowFilters,
|
|
57286
57185
|
sourcesKey: "authorId",
|
|
57287
|
-
filtersConfig: selectFiltersConfig$
|
|
57186
|
+
filtersConfig: selectFiltersConfig$8,
|
|
57288
57187
|
onFilterChange: onFiltersChange,
|
|
57289
57188
|
showFilters: showFilters,
|
|
57290
57189
|
defaultFilters: defaultFilters,
|
|
@@ -57871,10 +57770,15 @@ function AdminView(_ref) {
|
|
|
57871
57770
|
})
|
|
57872
57771
|
});
|
|
57873
57772
|
try {
|
|
57874
|
-
|
|
57773
|
+
const {
|
|
57774
|
+
data
|
|
57775
|
+
} = await updateAccount({
|
|
57875
57776
|
id: editData.id,
|
|
57876
57777
|
data: newData
|
|
57877
57778
|
});
|
|
57779
|
+
console.log({
|
|
57780
|
+
data
|
|
57781
|
+
});
|
|
57878
57782
|
console.log('Checking for pending users...', {
|
|
57879
57783
|
hasPendingUsers: pendingUsers.length > 0,
|
|
57880
57784
|
hasInviteFunction: !!inviteCompanyAccount,
|
|
@@ -58594,7 +58498,7 @@ function AdminLocationScreen$1({
|
|
|
58594
58498
|
});
|
|
58595
58499
|
}
|
|
58596
58500
|
|
|
58597
|
-
const selectFiltersConfig$
|
|
58501
|
+
const selectFiltersConfig$7 = {
|
|
58598
58502
|
category: {
|
|
58599
58503
|
type: "select",
|
|
58600
58504
|
label: "Category",
|
|
@@ -58785,7 +58689,7 @@ function DocumentsTable({
|
|
|
58785
58689
|
} = useSubjectsAdminTable({
|
|
58786
58690
|
goTo,
|
|
58787
58691
|
location,
|
|
58788
|
-
selectFiltersConfig: selectFiltersConfig$
|
|
58692
|
+
selectFiltersConfig: selectFiltersConfig$7,
|
|
58789
58693
|
view,
|
|
58790
58694
|
defaultUrlParams: defaultUrlParams$1,
|
|
58791
58695
|
module,
|
|
@@ -58872,7 +58776,7 @@ function DocumentsTable({
|
|
|
58872
58776
|
selectOptions: selectOptions,
|
|
58873
58777
|
doEmptyRows: true,
|
|
58874
58778
|
setShowFilters: setShowFilters,
|
|
58875
|
-
filtersConfig: selectFiltersConfig$
|
|
58779
|
+
filtersConfig: selectFiltersConfig$7,
|
|
58876
58780
|
onFilterChange: filter.onFiltersChange,
|
|
58877
58781
|
showFilters: showFilters,
|
|
58878
58782
|
defaultFilters: filter.defaultFilters,
|
|
@@ -58937,46 +58841,24 @@ function AdminLocationScreen({
|
|
|
58937
58841
|
});
|
|
58938
58842
|
}
|
|
58939
58843
|
|
|
58940
|
-
const
|
|
58941
|
-
|
|
58942
|
-
|
|
58943
|
-
|
|
58944
|
-
|
|
58945
|
-
|
|
58946
|
-
|
|
58947
|
-
|
|
58948
|
-
|
|
58949
|
-
|
|
58950
|
-
|
|
58951
|
-
|
|
58952
|
-
|
|
58953
|
-
|
|
58954
|
-
|
|
58955
|
-
|
|
58956
|
-
|
|
58957
|
-
|
|
58958
|
-
style: {
|
|
58959
|
-
flex: 1
|
|
58960
|
-
},
|
|
58961
|
-
labelStyle: {
|
|
58962
|
-
flex: 1
|
|
58963
|
-
},
|
|
58964
|
-
getLabel: option => option.label,
|
|
58965
|
-
getValue: option => option.value
|
|
58966
|
-
},
|
|
58967
|
-
sources: {
|
|
58968
|
-
type: "select",
|
|
58969
|
-
label: "Sources",
|
|
58970
|
-
placeholder: t => t("Sources"),
|
|
58971
|
-
style: {
|
|
58972
|
-
flex: 1
|
|
58973
|
-
},
|
|
58974
|
-
labelStyle: {
|
|
58975
|
-
flex: 1
|
|
58976
|
-
},
|
|
58977
|
-
getLabel: option => option.label,
|
|
58978
|
-
getValue: option => option.value
|
|
58979
|
-
}
|
|
58844
|
+
const getSelectFiltersConfig = ({
|
|
58845
|
+
t
|
|
58846
|
+
}) => {
|
|
58847
|
+
return {
|
|
58848
|
+
eventsType: {
|
|
58849
|
+
type: "select",
|
|
58850
|
+
label: "type",
|
|
58851
|
+
placeholder: t("type"),
|
|
58852
|
+
style: {
|
|
58853
|
+
flex: 1
|
|
58854
|
+
},
|
|
58855
|
+
labelStyle: {
|
|
58856
|
+
flex: 1
|
|
58857
|
+
},
|
|
58858
|
+
getLabel: option => option.label,
|
|
58859
|
+
getValue: option => option.value
|
|
58860
|
+
}
|
|
58861
|
+
};
|
|
58980
58862
|
};
|
|
58981
58863
|
const filtersConfig$7 = {
|
|
58982
58864
|
name: "",
|
|
@@ -59137,6 +59019,11 @@ function EventsTable({
|
|
|
59137
59019
|
const {
|
|
59138
59020
|
token
|
|
59139
59021
|
} = useToken();
|
|
59022
|
+
const selectFiltersConfig = React.useMemo(() => {
|
|
59023
|
+
return getSelectFiltersConfig({
|
|
59024
|
+
t
|
|
59025
|
+
});
|
|
59026
|
+
}, [t]);
|
|
59140
59027
|
const {
|
|
59141
59028
|
filter,
|
|
59142
59029
|
activeTab,
|
|
@@ -59149,7 +59036,7 @@ function EventsTable({
|
|
|
59149
59036
|
} = useSubjectsAdminTable({
|
|
59150
59037
|
goTo,
|
|
59151
59038
|
location,
|
|
59152
|
-
selectFiltersConfig
|
|
59039
|
+
selectFiltersConfig,
|
|
59153
59040
|
view,
|
|
59154
59041
|
defaultUrlParams,
|
|
59155
59042
|
module,
|
|
@@ -59233,7 +59120,7 @@ function EventsTable({
|
|
|
59233
59120
|
selectOptions: selectOptions,
|
|
59234
59121
|
doEmptyRows: true,
|
|
59235
59122
|
setShowFilters: setShowFilters,
|
|
59236
|
-
filtersConfig: selectFiltersConfig
|
|
59123
|
+
filtersConfig: selectFiltersConfig,
|
|
59237
59124
|
onFilterChange: filter.onFiltersChange,
|
|
59238
59125
|
showFilters: showFilters,
|
|
59239
59126
|
defaultFilters: filter.defaultFilters,
|