datastake-daf 0.6.759 → 0.6.760
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 +924 -1046
- package/dist/constants/index.js +76 -0
- package/dist/pages/index.js +133 -311
- package/dist/services/index.js +91 -0
- package/dist/utils/index.js +388 -0
- package/package.json +1 -1
- package/rollup.config.js +20 -0
- package/src/@daf/core/components/EditForm/storyConfig2.js +866 -25029
- package/src/@daf/core/components/Screens/FindInformation/index.js +2 -1
- package/src/@daf/core/components/Screens/Users/columns.js +0 -6
- package/src/@daf/core/components/Table/NavigationAction/index.jsx +24 -0
- package/src/@daf/pages/Dashboards/SupplyChain/index.jsx +2 -2
- package/src/@daf/pages/Documents/columns.js +5 -22
- package/src/@daf/pages/Documents/index.jsx +2 -3
- package/src/@daf/pages/Events/Activities/columns.js +7 -59
- package/src/@daf/pages/Events/Activities/index.jsx +2 -3
- package/src/@daf/pages/Events/Incidents/columns.js +7 -61
- package/src/@daf/pages/Events/Incidents/index.jsx +2 -3
- package/src/@daf/pages/Events/columns.js +6 -47
- package/src/@daf/pages/Events/helper.js +14 -0
- package/src/@daf/pages/Events/index.jsx +2 -3
- package/src/@daf/pages/Locations/MineSite/columns.js +7 -12
- package/src/@daf/pages/Locations/MineSite/index.jsx +5 -4
- package/src/@daf/pages/Locations/columns.js +6 -32
- package/src/@daf/pages/Locations/index.jsx +2 -3
- package/src/@daf/pages/Partners/index.jsx +11 -0
- package/src/@daf/pages/Stakeholders/Operators/columns.js +2 -8
- package/src/@daf/pages/Stakeholders/Operators/index.jsx +2 -2
- package/src/@daf/pages/Stakeholders/Workers/columns.js +10 -49
- package/src/@daf/pages/Stakeholders/Workers/index.jsx +2 -3
- package/src/@daf/pages/Stakeholders/columns.js +4 -25
- package/src/@daf/pages/Stakeholders/index.jsx +2 -3
- package/src/@daf/pages/Summary/Minesite/components/LocationMap/index.js +0 -1
- package/src/@daf/pages/Summary/Minesite/index.jsx +2 -0
- package/src/@daf/pages/Summary/Operator/index.jsx +3 -1
- package/src/@daf/services/PartnerService.js +76 -0
- package/src/@daf/utils/tags.js +26 -0
- package/src/constants/breadCrumbs.js +22 -0
- package/src/constants.js +2 -0
- package/src/helpers/breadCrumbs.js +347 -0
- package/src/index.js +1 -1
- package/src/services.js +2 -1
- package/src/utils.js +5 -1
- package/dist/style/datastake/mapbox-gl.css +0 -330
package/dist/components/index.js
CHANGED
|
@@ -4754,7 +4754,7 @@ const config$2 = {
|
|
|
4754
4754
|
SpacingWidth: config$3
|
|
4755
4755
|
};
|
|
4756
4756
|
|
|
4757
|
-
const _excluded$
|
|
4757
|
+
const _excluded$B = ["width", "height", "size", "name", "fill"];
|
|
4758
4758
|
const CustomIcon = _ref => {
|
|
4759
4759
|
let {
|
|
4760
4760
|
width = 14,
|
|
@@ -4763,7 +4763,7 @@ const CustomIcon = _ref => {
|
|
|
4763
4763
|
name = "",
|
|
4764
4764
|
fill = "none"
|
|
4765
4765
|
} = _ref,
|
|
4766
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4766
|
+
props = _objectWithoutProperties(_ref, _excluded$B);
|
|
4767
4767
|
const conf = config$2[name];
|
|
4768
4768
|
if (conf) {
|
|
4769
4769
|
return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -5052,7 +5052,7 @@ createCommonjsModule(function (module, exports) {
|
|
|
5052
5052
|
!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])+"]"}}}));
|
|
5053
5053
|
});
|
|
5054
5054
|
|
|
5055
|
-
const _excluded$
|
|
5055
|
+
const _excluded$A = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
|
|
5056
5056
|
dayjs__default["default"].extend(customParseFormat);
|
|
5057
5057
|
dayjs__default["default"].extend(utc);
|
|
5058
5058
|
dayjs__default["default"].extend(utc);
|
|
@@ -5428,7 +5428,7 @@ const filterCreateData = data => {
|
|
|
5428
5428
|
createdAt,
|
|
5429
5429
|
updatedAt
|
|
5430
5430
|
} = data,
|
|
5431
|
-
rest = _objectWithoutProperties(data, _excluded$
|
|
5431
|
+
rest = _objectWithoutProperties(data, _excluded$A);
|
|
5432
5432
|
const _meta = isObjectEmpty(meta) ? undefined : meta;
|
|
5433
5433
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
5434
5434
|
meta: _meta
|
|
@@ -5824,7 +5824,7 @@ SelectFilters.propTypes = {
|
|
|
5824
5824
|
apiUrl: PropTypes__default["default"].string
|
|
5825
5825
|
};
|
|
5826
5826
|
|
|
5827
|
-
const _excluded$
|
|
5827
|
+
const _excluded$z = ["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"];
|
|
5828
5828
|
function DAFTable(_ref) {
|
|
5829
5829
|
let {
|
|
5830
5830
|
columns = [],
|
|
@@ -5855,7 +5855,7 @@ function DAFTable(_ref) {
|
|
|
5855
5855
|
app,
|
|
5856
5856
|
doEmptyRows
|
|
5857
5857
|
} = _ref,
|
|
5858
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5858
|
+
rest = _objectWithoutProperties(_ref, _excluded$z);
|
|
5859
5859
|
const [source, setSource] = React.useState([]);
|
|
5860
5860
|
const projectData = (projects || []).find(p => p.id === selectedProject);
|
|
5861
5861
|
const [filtersInit, setFiltersInit] = React.useState(!loading);
|
|
@@ -6588,8 +6588,8 @@ Pagination.propTypes = {
|
|
|
6588
6588
|
isMobile: PropTypes__default["default"].bool
|
|
6589
6589
|
};
|
|
6590
6590
|
|
|
6591
|
-
var _templateObject$
|
|
6592
|
-
const Style$S = styled__default["default"].div(_templateObject$
|
|
6591
|
+
var _templateObject$f;
|
|
6592
|
+
const Style$S = styled__default["default"].div(_templateObject$f || (_templateObject$f = _taggedTemplateLiteral(["\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n\n\t.p-placeholder {\n\t\tposition: absolute;\n\t\ttop: 0px;\n\t\tleft: 0px;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tbackground: transparent;\n\t\tz-index: 100;\n\t}\n"])));
|
|
6593
6593
|
|
|
6594
6594
|
/**
|
|
6595
6595
|
* ComponentWithFocus
|
|
@@ -6661,8 +6661,8 @@ function ComponentWithFocus(_ref) {
|
|
|
6661
6661
|
});
|
|
6662
6662
|
}
|
|
6663
6663
|
|
|
6664
|
-
var _templateObject$
|
|
6665
|
-
const _excluded$
|
|
6664
|
+
var _templateObject$e;
|
|
6665
|
+
const _excluded$y = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
|
|
6666
6666
|
function StickyTable(_ref) {
|
|
6667
6667
|
let {
|
|
6668
6668
|
size = "small",
|
|
@@ -6673,7 +6673,7 @@ function StickyTable(_ref) {
|
|
|
6673
6673
|
pagination = false,
|
|
6674
6674
|
doEmptyRows = true
|
|
6675
6675
|
} = _ref,
|
|
6676
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6676
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
6677
6677
|
const data = React__default["default"].useMemo(() => {
|
|
6678
6678
|
if (!doEmptyRows) {
|
|
6679
6679
|
return dataSource;
|
|
@@ -6719,7 +6719,7 @@ function StickyTable(_ref) {
|
|
|
6719
6719
|
})
|
|
6720
6720
|
});
|
|
6721
6721
|
}
|
|
6722
|
-
const Style$R = styled__default["default"].div(_templateObject$
|
|
6722
|
+
const Style$R = styled__default["default"].div(_templateObject$e || (_templateObject$e = _taggedTemplateLiteral(["\n\tmax-width: calc(100% - 48px);\n\tmargin-left: var(--size-lg);\n\toverflow: hidden;\n\n\t.daf-table {\n\t\tpadding: 0px;\n\t\tmargin-top: 0px;\n\n\t\t.ant-tag {\n\t\t\ttext-align: center;\n\t\t}\n\t}\n\n\t.daf-select-filters .filters {\n\t\tpadding-top: 16px;\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\t}\n\n\t.daf-table {\n\t\tpadding-top: 16px;\n\t}\n"])));
|
|
6723
6723
|
StickyTable.propTypes = {
|
|
6724
6724
|
size: PropTypes__default["default"].any,
|
|
6725
6725
|
maxHeight: PropTypes__default["default"].number,
|
|
@@ -7155,6 +7155,35 @@ MoreOptions.propTypes = {
|
|
|
7155
7155
|
limit: PropTypes__default["default"].number
|
|
7156
7156
|
};
|
|
7157
7157
|
|
|
7158
|
+
const NavigationAction = _ref => {
|
|
7159
|
+
let {
|
|
7160
|
+
onClick,
|
|
7161
|
+
theme
|
|
7162
|
+
} = _ref;
|
|
7163
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7164
|
+
style: {
|
|
7165
|
+
display: "flex",
|
|
7166
|
+
justifyContent: "center"
|
|
7167
|
+
},
|
|
7168
|
+
children: /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
7169
|
+
onClick: onClick,
|
|
7170
|
+
style: {
|
|
7171
|
+
cursor: 'pointer',
|
|
7172
|
+
border: 'none',
|
|
7173
|
+
background: 'transparent',
|
|
7174
|
+
padding: 0,
|
|
7175
|
+
display: 'flex',
|
|
7176
|
+
alignItems: 'center'
|
|
7177
|
+
},
|
|
7178
|
+
children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
|
|
7179
|
+
name: "Link",
|
|
7180
|
+
size: 15,
|
|
7181
|
+
color: theme.baseGray70
|
|
7182
|
+
})
|
|
7183
|
+
})
|
|
7184
|
+
});
|
|
7185
|
+
};
|
|
7186
|
+
|
|
7158
7187
|
const BTN_TYPES = {
|
|
7159
7188
|
DASHED: 'dashed',
|
|
7160
7189
|
DEFAULT: 'default',
|
|
@@ -7169,7 +7198,7 @@ const BTN_SIZE = {
|
|
|
7169
7198
|
LG: 'large'
|
|
7170
7199
|
};
|
|
7171
7200
|
|
|
7172
|
-
const _excluded$
|
|
7201
|
+
const _excluded$x = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
|
|
7173
7202
|
function DafButton(_ref) {
|
|
7174
7203
|
let {
|
|
7175
7204
|
content = '',
|
|
@@ -7183,7 +7212,7 @@ function DafButton(_ref) {
|
|
|
7183
7212
|
style = {},
|
|
7184
7213
|
className = ''
|
|
7185
7214
|
} = _ref,
|
|
7186
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
7215
|
+
restProps = _objectWithoutProperties(_ref, _excluded$x);
|
|
7187
7216
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
|
|
7188
7217
|
icon: icon,
|
|
7189
7218
|
type: type,
|
|
@@ -7302,12 +7331,12 @@ const Style$Q = styled__default["default"].div`
|
|
|
7302
7331
|
}
|
|
7303
7332
|
`;
|
|
7304
7333
|
|
|
7305
|
-
const _excluded$
|
|
7334
|
+
const _excluded$w = ["children"];
|
|
7306
7335
|
const BorderedButton = _ref => {
|
|
7307
7336
|
let {
|
|
7308
7337
|
children
|
|
7309
7338
|
} = _ref,
|
|
7310
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7339
|
+
props = _objectWithoutProperties(_ref, _excluded$w);
|
|
7311
7340
|
return /*#__PURE__*/jsxRuntime.jsx(Style$Q, {
|
|
7312
7341
|
className: "d-btn-cont",
|
|
7313
7342
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -7316,7 +7345,7 @@ const BorderedButton = _ref => {
|
|
|
7316
7345
|
});
|
|
7317
7346
|
};
|
|
7318
7347
|
|
|
7319
|
-
var _templateObject$
|
|
7348
|
+
var _templateObject$d;
|
|
7320
7349
|
const variantConfig = {
|
|
7321
7350
|
default: {
|
|
7322
7351
|
className: "default-badge",
|
|
@@ -7434,7 +7463,7 @@ function Badge(_ref) {
|
|
|
7434
7463
|
})
|
|
7435
7464
|
});
|
|
7436
7465
|
}
|
|
7437
|
-
const Style$P = styled__default["default"].div(_templateObject$
|
|
7466
|
+
const Style$P = styled__default["default"].div(_templateObject$d || (_templateObject$d = _taggedTemplateLiteral(["\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 4px;\n\tpadding: 4px;\n\tmax-width: 100%;\n\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n\n\t> svg {\n\t\tflex-shrink: 0;\n\t}\n\n\t> span {\n\t\tall: unset;\n\t\tmargin-left: 4px;\n\t\tfont-weight: 600;\n\t\tfont-size: 12px;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t\tdisplay: block;\n\t\tmax-width: 100%;\n\t}\n"])));
|
|
7438
7467
|
Badge.propTypes = {
|
|
7439
7468
|
children: PropTypes__default["default"].node,
|
|
7440
7469
|
className: PropTypes__default["default"].string,
|
|
@@ -7447,12 +7476,12 @@ Badge.propTypes = {
|
|
|
7447
7476
|
props: PropTypes__default["default"].object
|
|
7448
7477
|
};
|
|
7449
7478
|
|
|
7450
|
-
const _excluded$
|
|
7479
|
+
const _excluded$v = ["icon"];
|
|
7451
7480
|
function GetIcon(_ref) {
|
|
7452
7481
|
let {
|
|
7453
7482
|
icon
|
|
7454
7483
|
} = _ref,
|
|
7455
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7484
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
7456
7485
|
let Icon = Icons__namespace.CloseOutlined;
|
|
7457
7486
|
if (Icons__namespace[icon]) {
|
|
7458
7487
|
Icon = Icons__namespace[icon];
|
|
@@ -7771,7 +7800,7 @@ GoToSelect.propTypes = {
|
|
|
7771
7800
|
t: PropTypes__default["default"].func
|
|
7772
7801
|
};
|
|
7773
7802
|
|
|
7774
|
-
const _excluded$
|
|
7803
|
+
const _excluded$u = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
|
|
7775
7804
|
const {
|
|
7776
7805
|
useToken: useToken$n
|
|
7777
7806
|
} = antd.theme;
|
|
@@ -7864,7 +7893,7 @@ function Multiselect(_ref) {
|
|
|
7864
7893
|
isSingle = false,
|
|
7865
7894
|
selectionType = SELECTION_TYPES.DEFAULT
|
|
7866
7895
|
} = _ref,
|
|
7867
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
7896
|
+
restProps = _objectWithoutProperties(_ref, _excluded$u);
|
|
7868
7897
|
const {
|
|
7869
7898
|
token
|
|
7870
7899
|
} = useToken$n();
|
|
@@ -8583,7 +8612,7 @@ DAFHeader.propTypes = {
|
|
|
8583
8612
|
filtersConfig: PropTypes__default["default"].any
|
|
8584
8613
|
};
|
|
8585
8614
|
|
|
8586
|
-
const _excluded$
|
|
8615
|
+
const _excluded$t = ["tabs", "onChange", "value", "className"];
|
|
8587
8616
|
function TabsHeader(_ref) {
|
|
8588
8617
|
let {
|
|
8589
8618
|
tabs = [],
|
|
@@ -8591,7 +8620,7 @@ function TabsHeader(_ref) {
|
|
|
8591
8620
|
value = '',
|
|
8592
8621
|
className = 'mt-2'
|
|
8593
8622
|
} = _ref,
|
|
8594
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8623
|
+
rest = _objectWithoutProperties(_ref, _excluded$t);
|
|
8595
8624
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8596
8625
|
className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
|
|
8597
8626
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
|
|
@@ -8688,14 +8717,16 @@ DrawerHeader.propTypes = {
|
|
|
8688
8717
|
tabsConfig: PropTypes__default["default"].any
|
|
8689
8718
|
};
|
|
8690
8719
|
|
|
8691
|
-
const
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8720
|
+
const _excluded$s = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
|
|
8721
|
+
const useFooter = _ref => {
|
|
8722
|
+
let {
|
|
8723
|
+
leftContent,
|
|
8724
|
+
centerContent,
|
|
8725
|
+
rightContent,
|
|
8726
|
+
actionButtons,
|
|
8727
|
+
app,
|
|
8728
|
+
isViewMode
|
|
8729
|
+
} = _ref;
|
|
8699
8730
|
const renderFooterContent = React.useMemo(() => {
|
|
8700
8731
|
const FooterContent = () => /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8701
8732
|
className: "daf-footer-content",
|
|
@@ -8711,18 +8742,18 @@ const useFooter = ({
|
|
|
8711
8742
|
className: "daf-footer-actions",
|
|
8712
8743
|
children: actionButtons.map((button, index) => {
|
|
8713
8744
|
const {
|
|
8714
|
-
|
|
8715
|
-
|
|
8716
|
-
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
return /*#__PURE__*/jsxRuntime.jsx(DafButton, {
|
|
8745
|
+
label,
|
|
8746
|
+
onClick,
|
|
8747
|
+
icon,
|
|
8748
|
+
type = BTN_TYPES.PRIMARY,
|
|
8749
|
+
tooltip,
|
|
8750
|
+
disabled = false,
|
|
8751
|
+
loading = false,
|
|
8752
|
+
style = {},
|
|
8753
|
+
className = ""
|
|
8754
|
+
} = button,
|
|
8755
|
+
restProps = _objectWithoutProperties(button, _excluded$s);
|
|
8756
|
+
return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
|
|
8726
8757
|
content: label,
|
|
8727
8758
|
type: type,
|
|
8728
8759
|
size: BTN_SIZE.MD,
|
|
@@ -8734,9 +8765,8 @@ const useFooter = ({
|
|
|
8734
8765
|
loading: loading,
|
|
8735
8766
|
title: tooltip,
|
|
8736
8767
|
style: style,
|
|
8737
|
-
className: className
|
|
8738
|
-
|
|
8739
|
-
}, index);
|
|
8768
|
+
className: className
|
|
8769
|
+
}, restProps), index);
|
|
8740
8770
|
})
|
|
8741
8771
|
})]
|
|
8742
8772
|
})]
|
|
@@ -8749,180 +8779,8 @@ const useFooter = ({
|
|
|
8749
8779
|
};
|
|
8750
8780
|
};
|
|
8751
8781
|
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
background: #ffffff;
|
|
8755
|
-
border-top: 1px solid #e8e8e8;
|
|
8756
|
-
border-left: none;
|
|
8757
|
-
border-right: none;
|
|
8758
|
-
border-bottom: none;
|
|
8759
|
-
border-radius: 0;
|
|
8760
|
-
padding: 24px;
|
|
8761
|
-
margin: 0;
|
|
8762
|
-
box-shadow: none;
|
|
8763
|
-
z-index: 100;
|
|
8764
|
-
position: relative;
|
|
8765
|
-
min-height: 80px;
|
|
8766
|
-
|
|
8767
|
-
&.daf-footer-fixed {
|
|
8768
|
-
position: fixed;
|
|
8769
|
-
bottom: 0;
|
|
8770
|
-
left: 0;
|
|
8771
|
-
right: 0;
|
|
8772
|
-
z-index: 1000;
|
|
8773
|
-
}
|
|
8774
|
-
|
|
8775
|
-
.daf-footer-content {
|
|
8776
|
-
display: flex;
|
|
8777
|
-
align-items: center;
|
|
8778
|
-
justify-content: space-between;
|
|
8779
|
-
width: 100%;
|
|
8780
|
-
min-height: 32px;
|
|
8781
|
-
|
|
8782
|
-
.daf-footer-left {
|
|
8783
|
-
flex: 1;
|
|
8784
|
-
display: flex;
|
|
8785
|
-
align-items: center;
|
|
8786
|
-
justify-content: flex-start;
|
|
8787
|
-
}
|
|
8788
|
-
|
|
8789
|
-
.daf-footer-center {
|
|
8790
|
-
flex: 1;
|
|
8791
|
-
display: flex;
|
|
8792
|
-
align-items: center;
|
|
8793
|
-
justify-content: center;
|
|
8794
|
-
}
|
|
8795
|
-
|
|
8796
|
-
.daf-footer-right {
|
|
8797
|
-
flex: 1;
|
|
8798
|
-
display: flex;
|
|
8799
|
-
align-items: center;
|
|
8800
|
-
justify-content: flex-end;
|
|
8801
|
-
gap: 12px;
|
|
8802
|
-
|
|
8803
|
-
.daf-footer-actions {
|
|
8804
|
-
.ant-btn {
|
|
8805
|
-
height: 40px;
|
|
8806
|
-
padding: 0 24px;
|
|
8807
|
-
border-radius: 6px;
|
|
8808
|
-
font-weight: 500;
|
|
8809
|
-
font-size: 14px;
|
|
8810
|
-
transition: all 0.3s ease;
|
|
8811
|
-
border: 1px solid transparent;
|
|
8812
|
-
|
|
8813
|
-
&.ant-btn-primary {
|
|
8814
|
-
background-color: var(--color-primary-70);
|
|
8815
|
-
color: #ffffff;
|
|
8816
|
-
border-color: var(--color-primary-70);
|
|
8817
|
-
|
|
8818
|
-
&:hover {
|
|
8819
|
-
background-color: var(--color-primary-60);
|
|
8820
|
-
border-color: var(--color-primary-60);
|
|
8821
|
-
}
|
|
8822
|
-
|
|
8823
|
-
&:active {
|
|
8824
|
-
background-color: var(--color-primary-80);
|
|
8825
|
-
border-color: var(--color-primary-80);
|
|
8826
|
-
}
|
|
8827
|
-
|
|
8828
|
-
&:disabled {
|
|
8829
|
-
background-color: #f5f5f5;
|
|
8830
|
-
color: #bfbfbf;
|
|
8831
|
-
border-color: #d9d9d9;
|
|
8832
|
-
}
|
|
8833
|
-
}
|
|
8834
|
-
|
|
8835
|
-
&.ant-btn-default {
|
|
8836
|
-
background: #ffffff;
|
|
8837
|
-
color: #666666;
|
|
8838
|
-
border-color: #d9d9d9;
|
|
8839
|
-
|
|
8840
|
-
&:hover {
|
|
8841
|
-
border-color: var(--color-primary-70);
|
|
8842
|
-
color: var(--color-primary-70);
|
|
8843
|
-
}
|
|
8844
|
-
|
|
8845
|
-
&:active {
|
|
8846
|
-
border-color: var(--color-primary-80);
|
|
8847
|
-
color: var(--color-primary-80);
|
|
8848
|
-
}
|
|
8849
|
-
|
|
8850
|
-
&:disabled {
|
|
8851
|
-
background-color: #f5f5f5;
|
|
8852
|
-
color: #bfbfbf;
|
|
8853
|
-
border-color: #d9d9d9;
|
|
8854
|
-
}
|
|
8855
|
-
}
|
|
8856
|
-
|
|
8857
|
-
&.ant-btn-ghost {
|
|
8858
|
-
background: transparent;
|
|
8859
|
-
color: #666666;
|
|
8860
|
-
border-color: #d9d9d9;
|
|
8861
|
-
|
|
8862
|
-
&:hover {
|
|
8863
|
-
border-color: var(--color-primary-70);
|
|
8864
|
-
color: var(--color-primary-70);
|
|
8865
|
-
background: rgba(0, 0, 0, 0.02);
|
|
8866
|
-
}
|
|
8867
|
-
|
|
8868
|
-
&:active {
|
|
8869
|
-
border-color: var(--color-primary-80);
|
|
8870
|
-
color: var(--color-primary-80);
|
|
8871
|
-
}
|
|
8872
|
-
|
|
8873
|
-
&:disabled {
|
|
8874
|
-
color: #bfbfbf;
|
|
8875
|
-
border-color: #d9d9d9;
|
|
8876
|
-
}
|
|
8877
|
-
}
|
|
8878
|
-
}
|
|
8879
|
-
}
|
|
8880
|
-
}
|
|
8881
|
-
}
|
|
8882
|
-
}
|
|
8883
|
-
|
|
8884
|
-
/* Responsive design */
|
|
8885
|
-
@media (max-width: 768px) {
|
|
8886
|
-
.daf-footer {
|
|
8887
|
-
margin: 0;
|
|
8888
|
-
padding: 16px;
|
|
8889
|
-
|
|
8890
|
-
.daf-footer-content {
|
|
8891
|
-
flex-direction: column;
|
|
8892
|
-
gap: 16px;
|
|
8893
|
-
align-items: stretch;
|
|
8894
|
-
|
|
8895
|
-
.daf-footer-left,
|
|
8896
|
-
.daf-footer-center,
|
|
8897
|
-
.daf-footer-right {
|
|
8898
|
-
flex: none;
|
|
8899
|
-
justify-content: center;
|
|
8900
|
-
}
|
|
8901
|
-
|
|
8902
|
-
.daf-footer-right {
|
|
8903
|
-
.daf-footer-actions {
|
|
8904
|
-
justify-content: center;
|
|
8905
|
-
}
|
|
8906
|
-
}
|
|
8907
|
-
}
|
|
8908
|
-
}
|
|
8909
|
-
}
|
|
8910
|
-
|
|
8911
|
-
/* App-specific styling */
|
|
8912
|
-
&.sbg-app {
|
|
8913
|
-
.daf-footer {
|
|
8914
|
-
background: #f8f9fa;
|
|
8915
|
-
border-color: #e9ecef;
|
|
8916
|
-
}
|
|
8917
|
-
}
|
|
8918
|
-
|
|
8919
|
-
&.nashiriki-app {
|
|
8920
|
-
.daf-footer {
|
|
8921
|
-
background: #fff;
|
|
8922
|
-
border-color: #d9d9d9;
|
|
8923
|
-
}
|
|
8924
|
-
}
|
|
8925
|
-
`;
|
|
8782
|
+
var _templateObject$c;
|
|
8783
|
+
const FooterContainer = styled__default["default"].div(_templateObject$c || (_templateObject$c = _taggedTemplateLiteral(["\n\t.daf-footer {\n\t\tbackground: #ffffff;\n\t\tborder-top: 1px solid #e8e8e8;\n\t\tborder-left: none;\n\t\tborder-right: none;\n\t\tborder-bottom: none;\n\t\tborder-radius: 0;\n\t\tpadding: 24px;\n\t\tmargin: 0;\n\t\tbox-shadow: none;\n\t\tz-index: 100;\n\t\tposition: relative;\n\t\tmin-height: 80px;\n\n\t\t&.daf-footer-fixed {\n\t\t\tposition: fixed;\n\t\t\tbottom: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tz-index: 1000;\n\t\t}\n\n\t\t.daf-footer-content {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\twidth: 100%;\n\t\t\tmin-height: 32px;\n\n\t\t\t.daf-footer-left {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: flex-start;\n\t\t\t}\n\n\t\t\t.daf-footer-center {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t}\n\n\t\t\t.daf-footer-right {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: flex-end;\n\t\t\t\tgap: 12px;\n\n\t\t\t\t.daf-footer-actions {\n\t\t\t\t\t.ant-btn {\n\t\t\t\t\t\theight: 40px;\n\t\t\t\t\t\tpadding: 0 24px;\n\t\t\t\t\t\tborder-radius: 6px;\n\t\t\t\t\t\tfont-weight: 500;\n\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\ttransition: all 0.3s ease;\n\t\t\t\t\t\tborder: 1px solid transparent;\n\n\t\t\t\t\t\t&.ant-btn-primary {\n\t\t\t\t\t\t\tbackground-color: var(--color-primary-70);\n\t\t\t\t\t\t\tcolor: #ffffff;\n\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tbackground-color: var(--color-primary-60);\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-60);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tbackground-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tbackground-color: #f5f5f5;\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.ant-btn-default {\n\t\t\t\t\t\t\tbackground: #ffffff;\n\t\t\t\t\t\t\tcolor: #666666;\n\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-70);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tbackground-color: #f5f5f5;\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.ant-btn-ghost {\n\t\t\t\t\t\t\tbackground: transparent;\n\t\t\t\t\t\t\tcolor: #666666;\n\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-70);\n\t\t\t\t\t\t\t\tbackground: rgba(0, 0, 0, 0.02);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Responsive design */\n\t@media (max-width: 768px) {\n\t\t.daf-footer {\n\t\t\tmargin: 0;\n\t\t\tpadding: 16px;\n\n\t\t\t.daf-footer-content {\n\t\t\t\tflex-direction: column;\n\t\t\t\tgap: 16px;\n\t\t\t\talign-items: stretch;\n\n\t\t\t\t.daf-footer-left,\n\t\t\t\t.daf-footer-center,\n\t\t\t\t.daf-footer-right {\n\t\t\t\t\tflex: none;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.daf-footer-right {\n\t\t\t\t\t.daf-footer-actions {\n\t\t\t\t\t\tjustify-content: center;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/* App-specific styling */\n\t&.sbg-app {\n\t\t.daf-footer {\n\t\t\tbackground: #f8f9fa;\n\t\t\tborder-color: #e9ecef;\n\t\t}\n\t}\n\n\t&.nashiriki-app {\n\t\t.daf-footer {\n\t\t\tbackground: #fff;\n\t\t\tborder-color: #d9d9d9;\n\t\t}\n\t}\n"])));
|
|
8926
8784
|
|
|
8927
8785
|
function DAFFooter(_ref) {
|
|
8928
8786
|
let {
|
|
@@ -9792,8 +9650,9 @@ const determineHasChildren = ({
|
|
|
9792
9650
|
|
|
9793
9651
|
const sortByPosition = (items, getConfig) => {
|
|
9794
9652
|
return items.sort((a, b) => {
|
|
9795
|
-
|
|
9796
|
-
const
|
|
9653
|
+
var _getConfig, _getConfig2;
|
|
9654
|
+
const positionA = ((_getConfig = getConfig(a)) === null || _getConfig === void 0 ? void 0 : _getConfig.position) || 0;
|
|
9655
|
+
const positionB = ((_getConfig2 = getConfig(b)) === null || _getConfig2 === void 0 ? void 0 : _getConfig2.position) || 0;
|
|
9797
9656
|
return positionA - positionB;
|
|
9798
9657
|
});
|
|
9799
9658
|
};
|
|
@@ -9810,7 +9669,7 @@ const resolveDynamicLabel = (labelConfig, item, defaultLabel) => {
|
|
|
9810
9669
|
const parts = labelKey.split(' is ');
|
|
9811
9670
|
if (parts.length === 2) {
|
|
9812
9671
|
const [conditionKey, conditionValue] = parts;
|
|
9813
|
-
if (item
|
|
9672
|
+
if ((item === null || item === void 0 ? void 0 : item[conditionKey]) === conditionValue) {
|
|
9814
9673
|
return labelConfig[labelKey];
|
|
9815
9674
|
}
|
|
9816
9675
|
}
|
|
@@ -11774,7 +11633,7 @@ Widget.propTypes = {
|
|
|
11774
11633
|
};
|
|
11775
11634
|
Widget.displayName = 'Widget';
|
|
11776
11635
|
|
|
11777
|
-
const _excluded$
|
|
11636
|
+
const _excluded$r = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
|
|
11778
11637
|
function ImageWidget(_ref) {
|
|
11779
11638
|
let {
|
|
11780
11639
|
loading = false,
|
|
@@ -11785,7 +11644,7 @@ function ImageWidget(_ref) {
|
|
|
11785
11644
|
noDescriptionText,
|
|
11786
11645
|
isPdf = false
|
|
11787
11646
|
} = _ref,
|
|
11788
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11647
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
11789
11648
|
const expandable = isPdf ? false : props.expandable;
|
|
11790
11649
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
11791
11650
|
loading: loading,
|
|
@@ -11845,7 +11704,7 @@ function ImageWidget(_ref) {
|
|
|
11845
11704
|
ImageWidget.displayName = 'ImageWidget';
|
|
11846
11705
|
|
|
11847
11706
|
var _templateObject$b;
|
|
11848
|
-
const _excluded$
|
|
11707
|
+
const _excluded$q = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
|
|
11849
11708
|
function FlowWidget(_ref) {
|
|
11850
11709
|
let {
|
|
11851
11710
|
title,
|
|
@@ -11857,7 +11716,7 @@ function FlowWidget(_ref) {
|
|
|
11857
11716
|
className,
|
|
11858
11717
|
direction = "horizontal"
|
|
11859
11718
|
} = _ref,
|
|
11860
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11719
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
11861
11720
|
const [activeTab, setActiveTab] = React.useState();
|
|
11862
11721
|
React.useEffect(() => {
|
|
11863
11722
|
if (defaultActiveTab) {
|
|
@@ -15299,7 +15158,7 @@ Map$3.propTypes = {
|
|
|
15299
15158
|
link: PropTypes__default["default"].any
|
|
15300
15159
|
};
|
|
15301
15160
|
|
|
15302
|
-
const _excluded$
|
|
15161
|
+
const _excluded$p = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
|
|
15303
15162
|
function InExpandableWidgetMap(_ref) {
|
|
15304
15163
|
let {
|
|
15305
15164
|
isExpanded,
|
|
@@ -15313,7 +15172,7 @@ function InExpandableWidgetMap(_ref) {
|
|
|
15313
15172
|
height,
|
|
15314
15173
|
widgetConfig
|
|
15315
15174
|
} = _ref,
|
|
15316
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15175
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
15317
15176
|
const [mapKey, setMapKey] = React.useState(0);
|
|
15318
15177
|
const [isMapReady, setIsMapReady] = React.useState(false);
|
|
15319
15178
|
React.useEffect(() => {
|
|
@@ -17513,14 +17372,14 @@ const MapConfig = ({
|
|
|
17513
17372
|
});
|
|
17514
17373
|
};
|
|
17515
17374
|
|
|
17516
|
-
const _excluded$
|
|
17375
|
+
const _excluded$o = ["config", "title", "loading"];
|
|
17517
17376
|
const Details = _ref => {
|
|
17518
17377
|
let {
|
|
17519
17378
|
config = [],
|
|
17520
17379
|
title,
|
|
17521
17380
|
loading = false
|
|
17522
17381
|
} = _ref,
|
|
17523
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17382
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
17524
17383
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
17525
17384
|
className: "with-border-header h-w-btn-header card",
|
|
17526
17385
|
loading: loading,
|
|
@@ -17536,14 +17395,14 @@ const Details = _ref => {
|
|
|
17536
17395
|
}));
|
|
17537
17396
|
};
|
|
17538
17397
|
|
|
17539
|
-
const _excluded$
|
|
17398
|
+
const _excluded$n = ["config", "title", "loading"];
|
|
17540
17399
|
const KeyIndicatorsDetails = _ref => {
|
|
17541
17400
|
let {
|
|
17542
17401
|
config,
|
|
17543
17402
|
title,
|
|
17544
17403
|
loading = false
|
|
17545
17404
|
} = _ref,
|
|
17546
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17405
|
+
rest = _objectWithoutProperties(_ref, _excluded$n);
|
|
17547
17406
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
17548
17407
|
className: "with-border-header h-w-btn-header",
|
|
17549
17408
|
title: title,
|
|
@@ -17573,7 +17432,7 @@ const Style$F = styled__default["default"].div`
|
|
|
17573
17432
|
}
|
|
17574
17433
|
`;
|
|
17575
17434
|
|
|
17576
|
-
const _excluded$
|
|
17435
|
+
const _excluded$m = ["children", "config", "detailsTitle", "firstColumnWidth"];
|
|
17577
17436
|
const DetailsSection = _ref => {
|
|
17578
17437
|
let {
|
|
17579
17438
|
children,
|
|
@@ -17581,7 +17440,7 @@ const DetailsSection = _ref => {
|
|
|
17581
17440
|
detailsTitle,
|
|
17582
17441
|
firstColumnWidth = "250px"
|
|
17583
17442
|
} = _ref,
|
|
17584
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17443
|
+
rest = _objectWithoutProperties(_ref, _excluded$m);
|
|
17585
17444
|
return /*#__PURE__*/jsxRuntime.jsx(Style$F, {
|
|
17586
17445
|
firstColumnWidth: firstColumnWidth,
|
|
17587
17446
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -17757,14 +17616,14 @@ const getGoalConfig = () => {
|
|
|
17757
17616
|
};
|
|
17758
17617
|
|
|
17759
17618
|
var _templateObject$9;
|
|
17760
|
-
const _excluded$
|
|
17619
|
+
const _excluded$l = ["title", "activeSdgGoals", "t"];
|
|
17761
17620
|
function SDGWidget(_ref) {
|
|
17762
17621
|
let {
|
|
17763
17622
|
title = "Sustainable Development Goals",
|
|
17764
17623
|
activeSdgGoals = [],
|
|
17765
17624
|
t = key => key
|
|
17766
17625
|
} = _ref,
|
|
17767
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17626
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
17768
17627
|
const sdgConfig = getGoalConfig();
|
|
17769
17628
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
17770
17629
|
title: title,
|
|
@@ -18062,7 +17921,7 @@ function SdgList({
|
|
|
18062
17921
|
});
|
|
18063
17922
|
}
|
|
18064
17923
|
|
|
18065
|
-
const _excluded$
|
|
17924
|
+
const _excluded$k = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
|
|
18066
17925
|
const {
|
|
18067
17926
|
Meta
|
|
18068
17927
|
} = antd.Card;
|
|
@@ -18082,7 +17941,7 @@ function ProjectWidget(_ref) {
|
|
|
18082
17941
|
hideSDGList = false,
|
|
18083
17942
|
t = x => x
|
|
18084
17943
|
} = _ref,
|
|
18085
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17944
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
18086
17945
|
const [isHovered, setIsHovered] = React__default["default"].useState(false);
|
|
18087
17946
|
const {
|
|
18088
17947
|
token
|
|
@@ -18354,13 +18213,13 @@ const WidgetCard = _ref => {
|
|
|
18354
18213
|
});
|
|
18355
18214
|
};
|
|
18356
18215
|
|
|
18357
|
-
const _excluded$
|
|
18216
|
+
const _excluded$j = ["title", "children"];
|
|
18358
18217
|
const CarouselWidget = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
18359
18218
|
let {
|
|
18360
18219
|
title,
|
|
18361
18220
|
children
|
|
18362
18221
|
} = _ref,
|
|
18363
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18222
|
+
rest = _objectWithoutProperties(_ref, _excluded$j);
|
|
18364
18223
|
/**
|
|
18365
18224
|
* Handles carousel slide change events
|
|
18366
18225
|
* @param {number} currentSlide - The index of the current slide after change
|
|
@@ -18524,7 +18383,7 @@ const EmptyStateContainer = styled__default["default"].div`
|
|
|
18524
18383
|
}
|
|
18525
18384
|
`;
|
|
18526
18385
|
|
|
18527
|
-
const _excluded$
|
|
18386
|
+
const _excluded$i = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
|
|
18528
18387
|
function ImageCarousel(_ref) {
|
|
18529
18388
|
let {
|
|
18530
18389
|
title,
|
|
@@ -18539,7 +18398,7 @@ function ImageCarousel(_ref) {
|
|
|
18539
18398
|
emptyLogo = antd.Empty.PRESENTED_IMAGE_SIMPLE,
|
|
18540
18399
|
emptyText = "No Image"
|
|
18541
18400
|
} = _ref,
|
|
18542
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18401
|
+
rest = _objectWithoutProperties(_ref, _excluded$i);
|
|
18543
18402
|
const [previewVisible, setPreviewVisible] = React.useState(false);
|
|
18544
18403
|
const [current, setCurrent] = React.useState(0);
|
|
18545
18404
|
const carouselRef = React.useRef(null);
|
|
@@ -19179,7 +19038,8 @@ function _checkValue(wantedValue, match, fieldValue) {
|
|
|
19179
19038
|
}
|
|
19180
19039
|
return false;
|
|
19181
19040
|
}
|
|
19182
|
-
function getInputProp$1(prop
|
|
19041
|
+
function getInputProp$1(prop) {
|
|
19042
|
+
let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
19183
19043
|
if (prop && typeof prop === 'object') {
|
|
19184
19044
|
const validations = Object.keys(prop);
|
|
19185
19045
|
const key = validations.find(v => {
|
|
@@ -19193,7 +19053,9 @@ function getInputProp$1(prop, formsValue = {}) {
|
|
|
19193
19053
|
return prop;
|
|
19194
19054
|
}
|
|
19195
19055
|
}
|
|
19196
|
-
function getInputLabel$2(input
|
|
19056
|
+
function getInputLabel$2(input) {
|
|
19057
|
+
let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
19058
|
+
let asText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
19197
19059
|
const label = getInputProp$1(input.label, formsValue);
|
|
19198
19060
|
return input.description && typeof input.description === 'string' && !asText ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
19199
19061
|
children: [ReactHtmlParser__default["default"](label), /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
@@ -19400,14 +19262,22 @@ const sgbEvaluationIcons = getSgbEvaluationIcons(22, 22);
|
|
|
19400
19262
|
const types = {
|
|
19401
19263
|
MODAL: 'modal'
|
|
19402
19264
|
};
|
|
19403
|
-
const isGroupInput = (group
|
|
19265
|
+
const isGroupInput = function (group) {
|
|
19266
|
+
var _group$meta;
|
|
19267
|
+
let repeatable = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
19268
|
+
let data = arguments.length > 2 ? arguments[2] : undefined;
|
|
19404
19269
|
let resp = group.inputs && Object.keys(group.inputs).length && group.repeatable === repeatable && group.type !== 'groupInputs' && group.type !== 'group' && group.type !== 'dataLinkGroup' && group.display !== 'group' && !group.viewGroup && !group.component;
|
|
19405
|
-
if (group.showIf || group
|
|
19270
|
+
if (group.showIf || group !== null && group !== void 0 && (_group$meta = group.meta) !== null && _group$meta !== void 0 && _group$meta.excludeFromView) {
|
|
19406
19271
|
resp = resp && showHideInput$3(group, data);
|
|
19407
19272
|
}
|
|
19408
19273
|
return resp;
|
|
19409
19274
|
};
|
|
19410
|
-
const repeatObjects = (obj
|
|
19275
|
+
const repeatObjects = function (obj) {
|
|
19276
|
+
let fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : () => {};
|
|
19277
|
+
let filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
19278
|
+
let sort = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
19279
|
+
return filter ? Object.keys(obj).filter(key => filter(obj[key])).map(fn) : sort ? Object.keys(obj).sort(sort).map(fn) : Object.keys(obj).map(fn);
|
|
19280
|
+
};
|
|
19411
19281
|
const conditions = new RegExp(/( is | and | not | notEmpty | includes )/gm);
|
|
19412
19282
|
const getLastRow = (arr, cols) => {
|
|
19413
19283
|
let currentInd = -1;
|
|
@@ -19473,28 +19343,32 @@ const checkCondition$3 = (condition, formsValue, repeatValues, input) => {
|
|
|
19473
19343
|
}
|
|
19474
19344
|
};
|
|
19475
19345
|
const showHideInput$3 = (input, formsValue, repeatValues) => {
|
|
19476
|
-
|
|
19346
|
+
var _input$meta, _input$meta2, _input$meta5, _input$meta7;
|
|
19347
|
+
if (input.showIf && !(input !== null && input !== void 0 && (_input$meta = input.meta) !== null && _input$meta !== void 0 && _input$meta.excludeFromView) && !['h2', 'h3', 'h4', 'h5', 'h6'].includes(input.type)) {
|
|
19477
19348
|
const isOrCond = input.showIf.indexOf('OR') >= 0;
|
|
19478
19349
|
const allParts = input.showIf.split(/( OR | && )/gmi).filter(c => !['OR', '&&'].includes(c.trim()));
|
|
19479
19350
|
const parts = allParts.map(condition => checkCondition$3(condition, formsValue, repeatValues, input));
|
|
19480
19351
|
return parts.length > 0 && (isOrCond && parts.filter(p => p).length >= 1 || parts.filter(p => !p).length === 0);
|
|
19481
19352
|
}
|
|
19482
|
-
if (typeof input
|
|
19483
|
-
|
|
19484
|
-
const
|
|
19353
|
+
if (typeof (input === null || input === void 0 || (_input$meta2 = input.meta) === null || _input$meta2 === void 0 ? void 0 : _input$meta2.excludeFromView) === 'string') {
|
|
19354
|
+
var _input$meta3, _input$meta4;
|
|
19355
|
+
const isOrCond = (input === null || input === void 0 || (_input$meta3 = input.meta) === null || _input$meta3 === void 0 ? void 0 : _input$meta3.excludeFromView.indexOf('OR')) >= 0;
|
|
19356
|
+
const allParts = input === null || input === void 0 || (_input$meta4 = input.meta) === null || _input$meta4 === void 0 ? void 0 : _input$meta4.excludeFromView.split(/( OR | && )/gmi).filter(c => !['OR', '&&'].includes(c.trim()));
|
|
19485
19357
|
const parts = allParts.map(condition => checkCondition$3(condition, formsValue, repeatValues, input));
|
|
19486
19358
|
const excludeFromView = parts.length > 0 && (isOrCond && parts.filter(p => p).length >= 1 || parts.filter(p => !p).length === 0);
|
|
19487
19359
|
return !excludeFromView;
|
|
19488
19360
|
}
|
|
19489
|
-
if (typeof input
|
|
19490
|
-
|
|
19361
|
+
if (typeof (input === null || input === void 0 || (_input$meta5 = input.meta) === null || _input$meta5 === void 0 ? void 0 : _input$meta5.excludeFromView) === 'boolean') {
|
|
19362
|
+
var _input$meta6;
|
|
19363
|
+
return !(input !== null && input !== void 0 && (_input$meta6 = input.meta) !== null && _input$meta6 !== void 0 && _input$meta6.excludeFromView);
|
|
19491
19364
|
}
|
|
19492
|
-
if (input
|
|
19365
|
+
if (input !== null && input !== void 0 && (_input$meta7 = input.meta) !== null && _input$meta7 !== void 0 && _input$meta7.excludeFromView || ['h2', 'h3', 'h4', 'h5', 'h6'].includes(input.type)) {
|
|
19493
19366
|
return false;
|
|
19494
19367
|
}
|
|
19495
19368
|
return true;
|
|
19496
19369
|
};
|
|
19497
|
-
const groupSubsections = (form
|
|
19370
|
+
const groupSubsections = function (form) {
|
|
19371
|
+
let onlyConf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
19498
19372
|
return Object.keys(form).reduce((f, fKey) => {
|
|
19499
19373
|
if (form[fKey].subSection) {
|
|
19500
19374
|
let subName = form[fKey].subSection;
|
|
@@ -19531,25 +19405,27 @@ const groupSubsections = (form, onlyConf = false) => {
|
|
|
19531
19405
|
return f;
|
|
19532
19406
|
}, {});
|
|
19533
19407
|
};
|
|
19534
|
-
const renderPlaceholder =
|
|
19535
|
-
|
|
19536
|
-
|
|
19537
|
-
|
|
19538
|
-
|
|
19539
|
-
|
|
19540
|
-
|
|
19541
|
-
|
|
19542
|
-
|
|
19408
|
+
const renderPlaceholder = _ref => {
|
|
19409
|
+
var _data$meta, _data$meta2, _config$meta;
|
|
19410
|
+
let {
|
|
19411
|
+
data,
|
|
19412
|
+
config,
|
|
19413
|
+
name,
|
|
19414
|
+
withPlaceholder = true,
|
|
19415
|
+
parent,
|
|
19416
|
+
t
|
|
19417
|
+
} = _ref;
|
|
19418
|
+
if ((((data === null || data === void 0 || (_data$meta = data.meta) === null || _data$meta === void 0 ? void 0 : _data$meta.inputs) || {})[name] || {}).notApplicable) {
|
|
19543
19419
|
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
19544
19420
|
className: "text-muted",
|
|
19545
19421
|
children: t('Not applicable')
|
|
19546
|
-
},
|
|
19422
|
+
}, "".concat(parent, "-").concat(name));
|
|
19547
19423
|
}
|
|
19548
|
-
if (((data
|
|
19424
|
+
if ((((data === null || data === void 0 || (_data$meta2 = data.meta) === null || _data$meta2 === void 0 ? void 0 : _data$meta2.inputs) || {})[name] || {}).notAvailable) {
|
|
19549
19425
|
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
19550
19426
|
className: "text-muted",
|
|
19551
19427
|
children: t('No available information')
|
|
19552
|
-
},
|
|
19428
|
+
}, "".concat(parent, "-").concat(name));
|
|
19553
19429
|
}
|
|
19554
19430
|
if (!withPlaceholder) {
|
|
19555
19431
|
return '';
|
|
@@ -19557,9 +19433,9 @@ const renderPlaceholder = ({
|
|
|
19557
19433
|
return config.noValue ? /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
19558
19434
|
className: "text-muted",
|
|
19559
19435
|
children: config.noValue
|
|
19560
|
-
},
|
|
19436
|
+
}, "".concat(parent, "-").concat(name)) : /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
19561
19437
|
className: "text-muted flex",
|
|
19562
|
-
children: [t('Not answered'), config
|
|
19438
|
+
children: [t('Not answered'), config !== null && config !== void 0 && (_config$meta = config.meta) !== null && _config$meta !== void 0 && _config$meta.mandatory ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
19563
19439
|
className: "ml-1",
|
|
19564
19440
|
style: {
|
|
19565
19441
|
marginTop: -1
|
|
@@ -19571,9 +19447,10 @@ const renderPlaceholder = ({
|
|
|
19571
19447
|
color: "#FFC069"
|
|
19572
19448
|
})
|
|
19573
19449
|
}) : null]
|
|
19574
|
-
},
|
|
19450
|
+
}, "".concat(parent, "-").concat(name));
|
|
19575
19451
|
};
|
|
19576
|
-
function getSelectOptions$2(option
|
|
19452
|
+
function getSelectOptions$2(option) {
|
|
19453
|
+
let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
19577
19454
|
if (typeof option.label === 'object') {
|
|
19578
19455
|
const validations = Object.keys(option.label);
|
|
19579
19456
|
const key = validations.find(v => {
|
|
@@ -19602,13 +19479,15 @@ function numberWithCommas$1(x) {
|
|
|
19602
19479
|
}
|
|
19603
19480
|
const noLabelInputTypes = ['ajaxSubGroup', 'subGroup', 'group', 'groupExpandable'];
|
|
19604
19481
|
const excludedKeys$1 = ['id', 'label', 'position', 'subTitle'];
|
|
19605
|
-
const renderDate =
|
|
19606
|
-
|
|
19607
|
-
|
|
19608
|
-
|
|
19609
|
-
|
|
19482
|
+
const renderDate = _ref2 => {
|
|
19483
|
+
var _input$meta8;
|
|
19484
|
+
let {
|
|
19485
|
+
item,
|
|
19486
|
+
inputName,
|
|
19487
|
+
input
|
|
19488
|
+
} = _ref2;
|
|
19610
19489
|
const date = moment__default["default"].parseZone(item[inputName] ? item[inputName].toString() : null);
|
|
19611
|
-
if (input
|
|
19490
|
+
if (input !== null && input !== void 0 && (_input$meta8 = input.meta) !== null && _input$meta8 !== void 0 && _input$meta8.checkExpiry) {
|
|
19612
19491
|
const expired = date.isBefore(moment__default["default"]());
|
|
19613
19492
|
if (expired) {
|
|
19614
19493
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -23906,7 +23785,7 @@ const RepeatableModals = ({
|
|
|
23906
23785
|
}) : null;
|
|
23907
23786
|
};
|
|
23908
23787
|
|
|
23909
|
-
const _excluded$
|
|
23788
|
+
const _excluded$h = ["viewGroup"],
|
|
23910
23789
|
_excluded2 = ["label", "icon", "position"];
|
|
23911
23790
|
const Content$1 = _ref => {
|
|
23912
23791
|
let {
|
|
@@ -23975,7 +23854,7 @@ const Content$1 = _ref => {
|
|
|
23975
23854
|
if (groups[gKey].viewGroup === key) {
|
|
23976
23855
|
// eslint-disable-next-line no-unused-vars
|
|
23977
23856
|
const _groups$gKey = groups[gKey],
|
|
23978
|
-
gCfg = _objectWithoutProperties(_groups$gKey, _excluded$
|
|
23857
|
+
gCfg = _objectWithoutProperties(_groups$gKey, _excluded$h);
|
|
23979
23858
|
items[gKey] = gCfg;
|
|
23980
23859
|
}
|
|
23981
23860
|
return items;
|
|
@@ -37806,7 +37685,7 @@ function AjaxSelect(props) {
|
|
|
37806
37685
|
}, props));
|
|
37807
37686
|
}
|
|
37808
37687
|
|
|
37809
|
-
|
|
37688
|
+
const _excluded$g = ["placeholder"];
|
|
37810
37689
|
const propHasValue = val => {
|
|
37811
37690
|
if (Array.isArray(val)) {
|
|
37812
37691
|
return val.length > 0 ? true : false;
|
|
@@ -37824,14 +37703,14 @@ const checkCondition = (condition, repeatValues, formsValue) => {
|
|
|
37824
37703
|
return isShown;
|
|
37825
37704
|
};
|
|
37826
37705
|
function showHideInput(input, formsValue, repeatIndex, repeatValues, setValues, ref) {
|
|
37827
|
-
|
|
37706
|
+
var _input$meta;
|
|
37707
|
+
if ((input === null || input === void 0 || (_input$meta = input.meta) === null || _input$meta === void 0 ? void 0 : _input$meta.hidden) === true) {
|
|
37708
|
+
var _input$meta2;
|
|
37828
37709
|
// Set default value for hidden fields
|
|
37829
|
-
if (input
|
|
37710
|
+
if ((input === null || input === void 0 || (_input$meta2 = input.meta) === null || _input$meta2 === void 0 ? void 0 : _input$meta2.defaultValue) !== undefined && !propHasValue(formsValue[ref])) {
|
|
37830
37711
|
formsValue[ref] = input.meta.defaultValue;
|
|
37831
37712
|
if (setValues && typeof setValues === 'function') {
|
|
37832
|
-
setValues({
|
|
37833
|
-
...formsValue
|
|
37834
|
-
});
|
|
37713
|
+
setValues(_objectSpread2({}, formsValue));
|
|
37835
37714
|
}
|
|
37836
37715
|
}
|
|
37837
37716
|
return false;
|
|
@@ -37890,35 +37769,35 @@ function getInputHeadLines(type, i, input, values) {
|
|
|
37890
37769
|
switch (type) {
|
|
37891
37770
|
case "h2":
|
|
37892
37771
|
return /*#__PURE__*/jsxRuntime.jsx("h2", {
|
|
37893
|
-
className:
|
|
37772
|
+
className: "title-semibold-2 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
|
|
37894
37773
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
37895
37774
|
children: getInputLabel(input, values)
|
|
37896
37775
|
})
|
|
37897
37776
|
});
|
|
37898
37777
|
case "h3":
|
|
37899
37778
|
return /*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
37900
|
-
className:
|
|
37779
|
+
className: "title-semibold-3 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
|
|
37901
37780
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
37902
37781
|
children: getInputLabel(input, values)
|
|
37903
37782
|
})
|
|
37904
37783
|
});
|
|
37905
37784
|
case "h4":
|
|
37906
37785
|
return /*#__PURE__*/jsxRuntime.jsx("h4", {
|
|
37907
|
-
className:
|
|
37786
|
+
className: "title-semibold-4 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
|
|
37908
37787
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
37909
37788
|
children: getInputLabel(input, values)
|
|
37910
37789
|
})
|
|
37911
37790
|
});
|
|
37912
37791
|
case "h5":
|
|
37913
37792
|
return /*#__PURE__*/jsxRuntime.jsx("h5", {
|
|
37914
|
-
className:
|
|
37793
|
+
className: "title-semibold-5 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
|
|
37915
37794
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
37916
37795
|
children: getInputLabel(input, values)
|
|
37917
37796
|
})
|
|
37918
37797
|
});
|
|
37919
37798
|
case "h6":
|
|
37920
37799
|
return /*#__PURE__*/jsxRuntime.jsx("h6", {
|
|
37921
|
-
className:
|
|
37800
|
+
className: "title-semibold-6 ".concat(input.marginBottom || "", " ").concat(input.groupHeader || "", " ").concat(i ? input.marginTop || "" : ""),
|
|
37922
37801
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
37923
37802
|
children: getInputLabel(input, values)
|
|
37924
37803
|
})
|
|
@@ -37927,7 +37806,9 @@ function getInputHeadLines(type, i, input, values) {
|
|
|
37927
37806
|
return null;
|
|
37928
37807
|
}
|
|
37929
37808
|
}
|
|
37930
|
-
function getInputLabel(input
|
|
37809
|
+
function getInputLabel(input) {
|
|
37810
|
+
let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
37811
|
+
let asText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
37931
37812
|
if (typeof input.label === "object") {
|
|
37932
37813
|
const validations = Object.keys(input.label);
|
|
37933
37814
|
const key = validations.find(v => {
|
|
@@ -37985,7 +37866,8 @@ function getInputLabel(input, formsValue = {}, asText = false) {
|
|
|
37985
37866
|
}) : ReactHtmlParser__default["default"](input.label);
|
|
37986
37867
|
}
|
|
37987
37868
|
}
|
|
37988
|
-
function getSelectOptions$1(option
|
|
37869
|
+
function getSelectOptions$1(option) {
|
|
37870
|
+
let formsValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
37989
37871
|
if (typeof option.label === "object") {
|
|
37990
37872
|
const validations = Object.keys(option.label);
|
|
37991
37873
|
const key = validations.find(v => {
|
|
@@ -38009,7 +37891,9 @@ function getSectionLabel(labels, values) {
|
|
|
38009
37891
|
}
|
|
38010
37892
|
return labels;
|
|
38011
37893
|
}
|
|
38012
|
-
function getSubtitles(subtitles, position
|
|
37894
|
+
function getSubtitles(subtitles, position) {
|
|
37895
|
+
let formsValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
37896
|
+
let repeatValues = arguments.length > 4 ? arguments[4] : undefined;
|
|
38013
37897
|
let subtitle = subtitles && subtitles[position];
|
|
38014
37898
|
if (subtitle && typeof subtitle === "object") {
|
|
38015
37899
|
let newSubtitle = subtitle.default || "";
|
|
@@ -38053,14 +37937,12 @@ function getSubtitles(subtitles, position, formsValue = {}, repeatIndex, repeatV
|
|
|
38053
37937
|
function getFormTitles(titles, key, position) {
|
|
38054
37938
|
let tilte = titles && titles[key];
|
|
38055
37939
|
return tilte ? /*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
38056
|
-
className:
|
|
37940
|
+
className: "title-semibold-3 mb0 ".concat(position ? "mt-3" : ""),
|
|
38057
37941
|
children: tilte
|
|
38058
37942
|
}) : null;
|
|
38059
37943
|
}
|
|
38060
37944
|
const updateFormValues = (repeatIndex, repeatValues, inputName, value, formsValue, name, mainForm) => {
|
|
38061
|
-
formsValue = Object.assign(formsValue, {
|
|
38062
|
-
...mainForm.getFieldsValue(true)
|
|
38063
|
-
});
|
|
37945
|
+
formsValue = Object.assign(formsValue, _objectSpread2({}, mainForm.getFieldsValue(true)));
|
|
38064
37946
|
if (typeof repeatIndex === "number" && repeatValues) {
|
|
38065
37947
|
if (!repeatValues[inputName] || !___default["default"].isEqual(repeatValues[inputName], value)) {
|
|
38066
37948
|
repeatValues[inputName] = value;
|
|
@@ -38094,48 +37976,52 @@ const updateFormValues = (repeatIndex, repeatValues, inputName, value, formsValu
|
|
|
38094
37976
|
}
|
|
38095
37977
|
};
|
|
38096
37978
|
const inputTypeComponent = {
|
|
38097
|
-
text: ({
|
|
38098
|
-
|
|
38099
|
-
|
|
38100
|
-
|
|
38101
|
-
|
|
38102
|
-
|
|
38103
|
-
|
|
37979
|
+
text: (_ref, _ref2) => {
|
|
37980
|
+
let {
|
|
37981
|
+
props,
|
|
37982
|
+
rules
|
|
37983
|
+
} = _ref;
|
|
37984
|
+
let {
|
|
37985
|
+
inputMeta = {},
|
|
37986
|
+
t
|
|
37987
|
+
} = _ref2;
|
|
38104
37988
|
const maxRule = rules.find(r => r.max);
|
|
38105
37989
|
const maxProps = {};
|
|
38106
37990
|
if (maxRule) {
|
|
38107
37991
|
maxProps.maxLength = maxRule.max;
|
|
38108
37992
|
}
|
|
38109
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
|
|
38110
|
-
size: "medium"
|
|
38111
|
-
|
|
37993
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
|
|
37994
|
+
size: "medium"
|
|
37995
|
+
}, maxProps), {}, {
|
|
38112
37996
|
allowClear: true,
|
|
38113
37997
|
autoComplete: "new-password",
|
|
38114
|
-
type: "text"
|
|
38115
|
-
|
|
37998
|
+
type: "text"
|
|
37999
|
+
}, props), {}, {
|
|
38116
38000
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
38117
38001
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
|
|
38118
|
-
});
|
|
38002
|
+
}));
|
|
38119
38003
|
},
|
|
38120
|
-
drawTerritory: ({
|
|
38121
|
-
|
|
38122
|
-
|
|
38123
|
-
|
|
38124
|
-
|
|
38125
|
-
|
|
38126
|
-
|
|
38127
|
-
|
|
38128
|
-
|
|
38004
|
+
drawTerritory: (_ref3, _ref4) => {
|
|
38005
|
+
let {
|
|
38006
|
+
formsValue,
|
|
38007
|
+
name,
|
|
38008
|
+
addressData,
|
|
38009
|
+
onValuesChange
|
|
38010
|
+
} = _ref3;
|
|
38011
|
+
let {
|
|
38012
|
+
setFormValues,
|
|
38013
|
+
form
|
|
38014
|
+
} = _ref4;
|
|
38129
38015
|
let search = formsValue.country;
|
|
38130
38016
|
if (addressData && addressData.address && Object.keys(addressData.address).length > 0) {
|
|
38131
38017
|
if (addressData.address.country) {
|
|
38132
38018
|
search = addressData.address.country;
|
|
38133
38019
|
}
|
|
38134
38020
|
if (addressData.address.level1) {
|
|
38135
|
-
search =
|
|
38021
|
+
search = "".concat(addressData.address.level1, ", ").concat(addressData.address.country);
|
|
38136
38022
|
}
|
|
38137
38023
|
if (addressData.address.level2) {
|
|
38138
|
-
search =
|
|
38024
|
+
search = "".concat(addressData.address.level2, ", ").concat(addressData.address.level1, ", ").concat(addressData.address.country);
|
|
38139
38025
|
}
|
|
38140
38026
|
} else {
|
|
38141
38027
|
const country = countriesList.countries[formsValue.country] || {};
|
|
@@ -38143,10 +38029,10 @@ const inputTypeComponent = {
|
|
|
38143
38029
|
search = country.name;
|
|
38144
38030
|
}
|
|
38145
38031
|
if (formsValue.administrativeLevel1Name) {
|
|
38146
|
-
search =
|
|
38032
|
+
search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
|
|
38147
38033
|
}
|
|
38148
38034
|
if (formsValue.administrativeLevel2Name) {
|
|
38149
|
-
search =
|
|
38035
|
+
search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
|
|
38150
38036
|
}
|
|
38151
38037
|
}
|
|
38152
38038
|
console.log("search", {
|
|
@@ -38166,10 +38052,9 @@ const inputTypeComponent = {
|
|
|
38166
38052
|
const allFormValues = form && typeof form.getFieldsValue === 'function' ? form.getFieldsValue(true) : formsValue;
|
|
38167
38053
|
|
|
38168
38054
|
// Create the updated values
|
|
38169
|
-
const updatedValues = {
|
|
38170
|
-
...allFormValues,
|
|
38055
|
+
const updatedValues = _objectSpread2(_objectSpread2({}, allFormValues), {}, {
|
|
38171
38056
|
[name]: val
|
|
38172
|
-
};
|
|
38057
|
+
});
|
|
38173
38058
|
|
|
38174
38059
|
// Call onValuesChange with the change and all values
|
|
38175
38060
|
if (typeof onValuesChange === 'function') {
|
|
@@ -38184,39 +38069,44 @@ const inputTypeComponent = {
|
|
|
38184
38069
|
searchValue: search
|
|
38185
38070
|
});
|
|
38186
38071
|
},
|
|
38187
|
-
link: ({
|
|
38188
|
-
|
|
38189
|
-
|
|
38190
|
-
|
|
38191
|
-
|
|
38192
|
-
|
|
38193
|
-
|
|
38072
|
+
link: (_ref5, _ref6) => {
|
|
38073
|
+
let {
|
|
38074
|
+
props,
|
|
38075
|
+
rules
|
|
38076
|
+
} = _ref5;
|
|
38077
|
+
let {
|
|
38078
|
+
inputMeta = {},
|
|
38079
|
+
t
|
|
38080
|
+
} = _ref6;
|
|
38194
38081
|
const maxRule = rules.find(r => r.max);
|
|
38195
38082
|
const maxProps = {};
|
|
38196
38083
|
if (maxRule) {
|
|
38197
38084
|
maxProps.maxLength = maxRule.max;
|
|
38198
38085
|
}
|
|
38199
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Input, {
|
|
38200
|
-
size: "medium"
|
|
38201
|
-
|
|
38086
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Input, _objectSpread2(_objectSpread2(_objectSpread2({
|
|
38087
|
+
size: "medium"
|
|
38088
|
+
}, maxProps), {}, {
|
|
38202
38089
|
allowClear: true,
|
|
38203
38090
|
autoComplete: "new-password",
|
|
38204
|
-
type: "text"
|
|
38205
|
-
|
|
38091
|
+
type: "text"
|
|
38092
|
+
}, props), {}, {
|
|
38206
38093
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
38207
38094
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
|
|
38208
|
-
});
|
|
38095
|
+
}));
|
|
38209
38096
|
},
|
|
38210
|
-
number: ({
|
|
38211
|
-
|
|
38212
|
-
|
|
38213
|
-
|
|
38214
|
-
|
|
38215
|
-
|
|
38216
|
-
|
|
38217
|
-
|
|
38097
|
+
number: (_ref7, _ref8) => {
|
|
38098
|
+
var _input$meta3;
|
|
38099
|
+
let {
|
|
38100
|
+
props,
|
|
38101
|
+
rules,
|
|
38102
|
+
input
|
|
38103
|
+
} = _ref7;
|
|
38104
|
+
let {
|
|
38105
|
+
inputMeta = {},
|
|
38106
|
+
t
|
|
38107
|
+
} = _ref8;
|
|
38218
38108
|
const maxRule = rules.find(r => r.max);
|
|
38219
|
-
const integerRule = !input
|
|
38109
|
+
const integerRule = !(input !== null && input !== void 0 && (_input$meta3 = input.meta) !== null && _input$meta3 !== void 0 && _input$meta3.isDecimal);
|
|
38220
38110
|
const parser = value => {
|
|
38221
38111
|
if (!value) {
|
|
38222
38112
|
return "";
|
|
@@ -38227,50 +38117,53 @@ const inputTypeComponent = {
|
|
|
38227
38117
|
return value.replace(/\$\s?|(,*)/g, "");
|
|
38228
38118
|
};
|
|
38229
38119
|
if (maxRule) {
|
|
38230
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
|
|
38120
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
|
|
38231
38121
|
allowClear: true,
|
|
38232
|
-
autoComplete: "new-password"
|
|
38233
|
-
|
|
38122
|
+
autoComplete: "new-password"
|
|
38123
|
+
}, props), {}, {
|
|
38234
38124
|
type: "number",
|
|
38235
38125
|
min: 0,
|
|
38236
38126
|
max: maxRule.max,
|
|
38237
38127
|
parser: parser
|
|
38238
|
-
});
|
|
38128
|
+
}));
|
|
38239
38129
|
}
|
|
38240
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
|
|
38130
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
|
|
38241
38131
|
allowClear: true,
|
|
38242
|
-
autoComplete: "new-password"
|
|
38243
|
-
|
|
38132
|
+
autoComplete: "new-password"
|
|
38133
|
+
}, props), {}, {
|
|
38244
38134
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
38245
38135
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type number"),
|
|
38246
38136
|
min: 0,
|
|
38247
38137
|
formatter: value => numberWithCommas$1(value),
|
|
38248
38138
|
parser: parser
|
|
38249
|
-
});
|
|
38139
|
+
}));
|
|
38250
38140
|
},
|
|
38251
|
-
select: ({
|
|
38252
|
-
|
|
38253
|
-
|
|
38254
|
-
|
|
38255
|
-
|
|
38256
|
-
|
|
38257
|
-
|
|
38258
|
-
|
|
38259
|
-
|
|
38260
|
-
|
|
38261
|
-
|
|
38262
|
-
|
|
38263
|
-
|
|
38264
|
-
|
|
38265
|
-
|
|
38266
|
-
|
|
38267
|
-
|
|
38268
|
-
|
|
38269
|
-
|
|
38270
|
-
|
|
38271
|
-
|
|
38272
|
-
|
|
38273
|
-
|
|
38141
|
+
select: (_ref9, _ref10) => {
|
|
38142
|
+
var _input$meta4;
|
|
38143
|
+
let {
|
|
38144
|
+
value,
|
|
38145
|
+
options,
|
|
38146
|
+
optionGroup,
|
|
38147
|
+
props,
|
|
38148
|
+
formsValue,
|
|
38149
|
+
optionsFilter,
|
|
38150
|
+
filterCond,
|
|
38151
|
+
repeatValues,
|
|
38152
|
+
repeatIndex,
|
|
38153
|
+
name,
|
|
38154
|
+
inputName,
|
|
38155
|
+
address,
|
|
38156
|
+
addressData,
|
|
38157
|
+
input
|
|
38158
|
+
} = _ref9;
|
|
38159
|
+
let {
|
|
38160
|
+
forms,
|
|
38161
|
+
form,
|
|
38162
|
+
setAddress,
|
|
38163
|
+
inputMeta = {},
|
|
38164
|
+
t,
|
|
38165
|
+
changeInputMeta
|
|
38166
|
+
} = _ref10;
|
|
38274
38167
|
let opts;
|
|
38275
38168
|
if (typeof options === "string") {
|
|
38276
38169
|
const [formName, key] = options.split(".");
|
|
@@ -38326,18 +38219,19 @@ const inputTypeComponent = {
|
|
|
38326
38219
|
}
|
|
38327
38220
|
opts = groupOptions;
|
|
38328
38221
|
}
|
|
38329
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
|
|
38222
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
|
|
38330
38223
|
autoComplete: "new-password",
|
|
38331
38224
|
allowClear: true,
|
|
38332
38225
|
showSearch: true,
|
|
38333
|
-
defaultValue: input
|
|
38226
|
+
defaultValue: input === null || input === void 0 || (_input$meta4 = input.meta) === null || _input$meta4 === void 0 ? void 0 : _input$meta4.defaultValue,
|
|
38334
38227
|
filterOption: filterSelectOptions,
|
|
38335
|
-
optionFilterProp: "children"
|
|
38336
|
-
|
|
38228
|
+
optionFilterProp: "children"
|
|
38229
|
+
}, props), {}, {
|
|
38337
38230
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
38338
38231
|
placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp$1(props.placeholder, formsValue) || t("Select one option"),
|
|
38339
38232
|
onChange: (val, selectedValue) => {
|
|
38340
|
-
|
|
38233
|
+
var _input$meta5;
|
|
38234
|
+
if (typeof (input === null || input === void 0 || (_input$meta5 = input.meta) === null || _input$meta5 === void 0 ? void 0 : _input$meta5.onChange) === "string") {
|
|
38341
38235
|
const [value, otherKey, otherVal] = input.meta.onChange.split(".");
|
|
38342
38236
|
if (val === value) {
|
|
38343
38237
|
changeInputMeta({
|
|
@@ -38351,9 +38245,7 @@ const inputTypeComponent = {
|
|
|
38351
38245
|
}
|
|
38352
38246
|
if (address && selectedValue) {
|
|
38353
38247
|
dot__default["default"].str(address, selectedValue.children, addressData);
|
|
38354
|
-
setAddress({
|
|
38355
|
-
...addressData
|
|
38356
|
-
});
|
|
38248
|
+
setAddress(_objectSpread2({}, addressData));
|
|
38357
38249
|
}
|
|
38358
38250
|
if (props.onChange) {
|
|
38359
38251
|
props.onChange(val);
|
|
@@ -38365,33 +38257,35 @@ const inputTypeComponent = {
|
|
|
38365
38257
|
value: og.value,
|
|
38366
38258
|
disabled: og.disabled,
|
|
38367
38259
|
children: og.label
|
|
38368
|
-
},
|
|
38260
|
+
}, "".concat(i).concat(j)))
|
|
38369
38261
|
}, i) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
|
|
38370
38262
|
value: option.value,
|
|
38371
38263
|
disabled: option.disabled,
|
|
38372
38264
|
children: option.label
|
|
38373
38265
|
}, i))
|
|
38374
|
-
});
|
|
38266
|
+
}));
|
|
38375
38267
|
},
|
|
38376
|
-
multiselect: ({
|
|
38377
|
-
|
|
38378
|
-
|
|
38379
|
-
|
|
38380
|
-
|
|
38381
|
-
|
|
38382
|
-
|
|
38383
|
-
|
|
38384
|
-
|
|
38385
|
-
|
|
38386
|
-
|
|
38387
|
-
|
|
38388
|
-
|
|
38389
|
-
|
|
38390
|
-
|
|
38391
|
-
|
|
38392
|
-
|
|
38393
|
-
|
|
38394
|
-
|
|
38268
|
+
multiselect: (_ref11, _ref12) => {
|
|
38269
|
+
let {
|
|
38270
|
+
value,
|
|
38271
|
+
options,
|
|
38272
|
+
optionGroup,
|
|
38273
|
+
optionsFilter,
|
|
38274
|
+
filterCond,
|
|
38275
|
+
props,
|
|
38276
|
+
formsValue,
|
|
38277
|
+
repeatValues,
|
|
38278
|
+
repeatIndex,
|
|
38279
|
+
inputName,
|
|
38280
|
+
name,
|
|
38281
|
+
tags
|
|
38282
|
+
} = _ref11;
|
|
38283
|
+
let {
|
|
38284
|
+
forms,
|
|
38285
|
+
form,
|
|
38286
|
+
inputMeta = {},
|
|
38287
|
+
t
|
|
38288
|
+
} = _ref12;
|
|
38395
38289
|
let opts;
|
|
38396
38290
|
if (typeof options === "string") {
|
|
38397
38291
|
const [formName, key] = options.split(".");
|
|
@@ -38448,16 +38342,16 @@ const inputTypeComponent = {
|
|
|
38448
38342
|
}
|
|
38449
38343
|
opts = groupOptions;
|
|
38450
38344
|
}
|
|
38451
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
|
|
38345
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2(_objectSpread2({
|
|
38452
38346
|
allowClear: true,
|
|
38453
38347
|
autoComplete: "new-password",
|
|
38454
38348
|
mode: tags ? "tags" : "multiple",
|
|
38455
|
-
optionFilterProp: "children"
|
|
38456
|
-
|
|
38457
|
-
|
|
38458
|
-
|
|
38459
|
-
filterOption: filterSelectOptions
|
|
38460
|
-
|
|
38349
|
+
optionFilterProp: "children"
|
|
38350
|
+
}, tags ? {
|
|
38351
|
+
tokenSeparators: [",", "\n", "\t"]
|
|
38352
|
+
} : {}), {}, {
|
|
38353
|
+
filterOption: filterSelectOptions
|
|
38354
|
+
}, props), {}, {
|
|
38461
38355
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
38462
38356
|
placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp$1(props.placeholder, formsValue) || t("Select all relevant options"),
|
|
38463
38357
|
children: (opts || []).map((option, i) => option.items ? /*#__PURE__*/jsxRuntime.jsx(antd.Select.OptGroup, {
|
|
@@ -38466,42 +38360,42 @@ const inputTypeComponent = {
|
|
|
38466
38360
|
value: og.value,
|
|
38467
38361
|
disabled: og.disabled,
|
|
38468
38362
|
children: og.label
|
|
38469
|
-
},
|
|
38363
|
+
}, "".concat(i).concat(j)))
|
|
38470
38364
|
}, i) : /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
|
|
38471
38365
|
value: option.value,
|
|
38472
38366
|
disabled: option.disabled,
|
|
38473
38367
|
children: option.label
|
|
38474
38368
|
}, i))
|
|
38475
|
-
});
|
|
38369
|
+
}));
|
|
38476
38370
|
},
|
|
38477
|
-
date: ({
|
|
38478
|
-
|
|
38479
|
-
|
|
38480
|
-
|
|
38481
|
-
|
|
38482
|
-
|
|
38483
|
-
|
|
38484
|
-
|
|
38485
|
-
|
|
38486
|
-
|
|
38487
|
-
|
|
38488
|
-
|
|
38489
|
-
|
|
38371
|
+
date: (_ref13, _ref14) => {
|
|
38372
|
+
let {
|
|
38373
|
+
props,
|
|
38374
|
+
rules,
|
|
38375
|
+
repeatValues,
|
|
38376
|
+
formsValue,
|
|
38377
|
+
name
|
|
38378
|
+
} = _ref13;
|
|
38379
|
+
let {
|
|
38380
|
+
inputMeta,
|
|
38381
|
+
t,
|
|
38382
|
+
groupFormId,
|
|
38383
|
+
form,
|
|
38384
|
+
setFormValues
|
|
38385
|
+
} = _ref14;
|
|
38490
38386
|
const lng = localStorage.getItem("datastakeLng") || "en";
|
|
38491
38387
|
const maxRule = rules.find(r => r.max);
|
|
38492
38388
|
const handleDateChange = date => {
|
|
38493
38389
|
if (date) {
|
|
38494
38390
|
const localDate = dayjs__default["default"].utc(date);
|
|
38495
38391
|
if (groupFormId) {
|
|
38496
|
-
const _new = {
|
|
38497
|
-
...(formsValue[groupFormId] || {}),
|
|
38392
|
+
const _new = _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
|
|
38498
38393
|
[name]: localDate
|
|
38499
|
-
};
|
|
38394
|
+
});
|
|
38500
38395
|
form.setFieldValue(groupFormId, _new);
|
|
38501
|
-
setFormValues({
|
|
38502
|
-
...formsValue,
|
|
38396
|
+
setFormValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
38503
38397
|
[groupFormId]: _new
|
|
38504
|
-
});
|
|
38398
|
+
}));
|
|
38505
38399
|
} else {
|
|
38506
38400
|
form.setFieldValue(name, localDate);
|
|
38507
38401
|
}
|
|
@@ -38513,10 +38407,10 @@ const inputTypeComponent = {
|
|
|
38513
38407
|
checkForMax = checkCondition(maxRule.condition, repeatValues, formsValue);
|
|
38514
38408
|
}
|
|
38515
38409
|
if (checkForMax) {
|
|
38516
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
|
|
38410
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
|
|
38517
38411
|
allowClear: true,
|
|
38518
|
-
autoComplete: "new-password"
|
|
38519
|
-
|
|
38412
|
+
autoComplete: "new-password"
|
|
38413
|
+
}, props), {}, {
|
|
38520
38414
|
onChange: handleDateChange,
|
|
38521
38415
|
format: DATE_FORMATS,
|
|
38522
38416
|
locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"],
|
|
@@ -38525,31 +38419,33 @@ const inputTypeComponent = {
|
|
|
38525
38419
|
disabledDate: current => {
|
|
38526
38420
|
return current && current >= dayjs__default["default"]().endOf("day");
|
|
38527
38421
|
}
|
|
38528
|
-
});
|
|
38422
|
+
}));
|
|
38529
38423
|
}
|
|
38530
38424
|
}
|
|
38531
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
|
|
38425
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
|
|
38532
38426
|
allowClear: true,
|
|
38533
|
-
autoComplete: "new-password"
|
|
38534
|
-
|
|
38427
|
+
autoComplete: "new-password"
|
|
38428
|
+
}, props), {}, {
|
|
38535
38429
|
onChange: handleDateChange,
|
|
38536
38430
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Select date"),
|
|
38537
38431
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
38538
38432
|
format: DATE_FORMATS,
|
|
38539
38433
|
locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"]
|
|
38540
|
-
});
|
|
38434
|
+
}));
|
|
38541
38435
|
},
|
|
38542
|
-
comment: ({
|
|
38543
|
-
|
|
38544
|
-
|
|
38545
|
-
|
|
38546
|
-
|
|
38547
|
-
|
|
38548
|
-
|
|
38549
|
-
|
|
38550
|
-
|
|
38551
|
-
|
|
38552
|
-
|
|
38436
|
+
comment: (_ref15, _ref16) => {
|
|
38437
|
+
let {
|
|
38438
|
+
props: {
|
|
38439
|
+
placeholder
|
|
38440
|
+
},
|
|
38441
|
+
commentHint
|
|
38442
|
+
} = _ref15,
|
|
38443
|
+
props = _objectWithoutProperties(_ref15.props, _excluded$g);
|
|
38444
|
+
let {
|
|
38445
|
+
onChange,
|
|
38446
|
+
value
|
|
38447
|
+
} = _ref16;
|
|
38448
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
|
|
38553
38449
|
allowClear: true,
|
|
38554
38450
|
value: value,
|
|
38555
38451
|
onChange: e => onChange(e.target.value),
|
|
@@ -38559,56 +38455,60 @@ const inputTypeComponent = {
|
|
|
38559
38455
|
autoSize: {
|
|
38560
38456
|
minRows: 5,
|
|
38561
38457
|
maxRows: 5
|
|
38562
|
-
}
|
|
38563
|
-
|
|
38458
|
+
}
|
|
38459
|
+
}, props), {}, {
|
|
38564
38460
|
disabled: false
|
|
38565
|
-
});
|
|
38461
|
+
}));
|
|
38566
38462
|
},
|
|
38567
|
-
textarea: ({
|
|
38568
|
-
|
|
38569
|
-
|
|
38570
|
-
|
|
38571
|
-
|
|
38572
|
-
|
|
38573
|
-
|
|
38463
|
+
textarea: (_ref17, _ref18) => {
|
|
38464
|
+
let {
|
|
38465
|
+
props,
|
|
38466
|
+
rules
|
|
38467
|
+
} = _ref17;
|
|
38468
|
+
let {
|
|
38469
|
+
inputMeta,
|
|
38470
|
+
t
|
|
38471
|
+
} = _ref18;
|
|
38574
38472
|
const maxRule = rules.find(r => r.max);
|
|
38575
38473
|
let maxLength = MAX_TEXT_AREA_LENGTH;
|
|
38576
38474
|
if (maxRule) {
|
|
38577
38475
|
maxLength = maxRule.max;
|
|
38578
38476
|
}
|
|
38579
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, {
|
|
38477
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Input.TextArea, _objectSpread2(_objectSpread2({
|
|
38580
38478
|
allowClear: true,
|
|
38581
38479
|
autoComplete: "new-password",
|
|
38582
38480
|
maxLength: maxLength,
|
|
38583
38481
|
autoSize: {
|
|
38584
38482
|
minRows: 5,
|
|
38585
38483
|
maxRows: 5
|
|
38586
|
-
}
|
|
38587
|
-
|
|
38484
|
+
}
|
|
38485
|
+
}, props), {}, {
|
|
38588
38486
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
38589
38487
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || t("Type")
|
|
38590
|
-
});
|
|
38488
|
+
}));
|
|
38591
38489
|
},
|
|
38592
|
-
phoneNumber: ({
|
|
38593
|
-
|
|
38594
|
-
|
|
38595
|
-
|
|
38596
|
-
|
|
38597
|
-
|
|
38598
|
-
|
|
38599
|
-
|
|
38600
|
-
|
|
38601
|
-
|
|
38602
|
-
|
|
38603
|
-
|
|
38604
|
-
|
|
38490
|
+
phoneNumber: (_ref19, _ref20) => {
|
|
38491
|
+
let {
|
|
38492
|
+
name,
|
|
38493
|
+
inputName,
|
|
38494
|
+
props,
|
|
38495
|
+
value,
|
|
38496
|
+
repeatIndex,
|
|
38497
|
+
repeatValues,
|
|
38498
|
+
formsValue
|
|
38499
|
+
} = _ref19;
|
|
38500
|
+
let {
|
|
38501
|
+
setFormValues,
|
|
38502
|
+
t
|
|
38503
|
+
} = _ref20;
|
|
38504
|
+
return /*#__PURE__*/jsxRuntime.jsx(PhoneInput, _objectSpread2(_objectSpread2({
|
|
38605
38505
|
t: t,
|
|
38606
38506
|
doChangeErrors: false,
|
|
38607
38507
|
allowClear: true,
|
|
38608
|
-
country: formsValue
|
|
38508
|
+
country: formsValue === null || formsValue === void 0 ? void 0 : formsValue.country,
|
|
38609
38509
|
formsValue: formsValue,
|
|
38610
|
-
initialValue: value
|
|
38611
|
-
|
|
38510
|
+
initialValue: value
|
|
38511
|
+
}, props), {}, {
|
|
38612
38512
|
onChange: val => {
|
|
38613
38513
|
if (repeatValues) {
|
|
38614
38514
|
const inputValues = Array.isArray(formsValue[name]) ? formsValue[name] || [] : [];
|
|
@@ -38624,24 +38524,25 @@ const inputTypeComponent = {
|
|
|
38624
38524
|
setFormValues(formsValue);
|
|
38625
38525
|
}
|
|
38626
38526
|
}
|
|
38627
|
-
});
|
|
38527
|
+
}));
|
|
38628
38528
|
},
|
|
38629
|
-
switch: ({
|
|
38630
|
-
|
|
38631
|
-
|
|
38632
|
-
|
|
38633
|
-
|
|
38634
|
-
|
|
38635
|
-
|
|
38636
|
-
|
|
38637
|
-
|
|
38638
|
-
|
|
38639
|
-
|
|
38640
|
-
|
|
38641
|
-
|
|
38642
|
-
|
|
38643
|
-
|
|
38644
|
-
|
|
38529
|
+
switch: (_ref21, _ref22) => {
|
|
38530
|
+
let {
|
|
38531
|
+
props,
|
|
38532
|
+
value,
|
|
38533
|
+
restricted,
|
|
38534
|
+
autocomplete,
|
|
38535
|
+
formsValue,
|
|
38536
|
+
repeatIndex,
|
|
38537
|
+
name,
|
|
38538
|
+
inputName,
|
|
38539
|
+
replace
|
|
38540
|
+
} = _ref21;
|
|
38541
|
+
let {
|
|
38542
|
+
form,
|
|
38543
|
+
setFormValues
|
|
38544
|
+
} = _ref22;
|
|
38545
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Switch, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
38645
38546
|
defaultChecked: value || false,
|
|
38646
38547
|
checked: value || false,
|
|
38647
38548
|
onChange: isChecked => {
|
|
@@ -38683,14 +38584,15 @@ const inputTypeComponent = {
|
|
|
38683
38584
|
setFormValues(formsValue);
|
|
38684
38585
|
}
|
|
38685
38586
|
}
|
|
38686
|
-
});
|
|
38587
|
+
}));
|
|
38687
38588
|
},
|
|
38688
|
-
total100:
|
|
38689
|
-
|
|
38690
|
-
|
|
38691
|
-
|
|
38692
|
-
|
|
38693
|
-
|
|
38589
|
+
total100: _ref23 => {
|
|
38590
|
+
let {
|
|
38591
|
+
props,
|
|
38592
|
+
name,
|
|
38593
|
+
options,
|
|
38594
|
+
value
|
|
38595
|
+
} = _ref23;
|
|
38694
38596
|
value = value ? Array.isArray(value) ? value : [value] : [];
|
|
38695
38597
|
function totalValue() {
|
|
38696
38598
|
let total = 0;
|
|
@@ -38714,10 +38616,11 @@ const inputTypeComponent = {
|
|
|
38714
38616
|
className: "total100",
|
|
38715
38617
|
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.List, {
|
|
38716
38618
|
name: name,
|
|
38717
|
-
children: (fields, {
|
|
38718
|
-
|
|
38719
|
-
|
|
38720
|
-
|
|
38619
|
+
children: (fields, _ref24) => {
|
|
38620
|
+
let {
|
|
38621
|
+
add,
|
|
38622
|
+
remove
|
|
38623
|
+
} = _ref24;
|
|
38721
38624
|
if (fields.length === 0) {
|
|
38722
38625
|
const formData = value || [];
|
|
38723
38626
|
if (formData.length) {
|
|
@@ -38736,26 +38639,26 @@ const inputTypeComponent = {
|
|
|
38736
38639
|
const v = value[field.name];
|
|
38737
38640
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Space, {
|
|
38738
38641
|
className: "total",
|
|
38739
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
38740
|
-
noStyle: true
|
|
38741
|
-
|
|
38642
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
|
|
38643
|
+
noStyle: true
|
|
38644
|
+
}, field), {}, {
|
|
38742
38645
|
name: [field.name, "type"],
|
|
38743
38646
|
fieldKey: [field.fieldKey, "type"],
|
|
38744
38647
|
initialValue: v.type,
|
|
38745
|
-
children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
|
|
38648
|
+
children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, _objectSpread2(_objectSpread2({
|
|
38746
38649
|
allowClear: true,
|
|
38747
38650
|
showSearch: true,
|
|
38748
38651
|
filterOption: filterSelectOptions,
|
|
38749
|
-
optionFilterProp: "children"
|
|
38750
|
-
|
|
38652
|
+
optionFilterProp: "children"
|
|
38653
|
+
}, props), {}, {
|
|
38751
38654
|
children: options.map((option, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
|
|
38752
38655
|
value: option.value,
|
|
38753
38656
|
children: option.label
|
|
38754
38657
|
}, i))
|
|
38755
|
-
})
|
|
38756
|
-
}), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
38757
|
-
noStyle: true
|
|
38758
|
-
|
|
38658
|
+
}))
|
|
38659
|
+
})), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({
|
|
38660
|
+
noStyle: true
|
|
38661
|
+
}, field), {}, {
|
|
38759
38662
|
name: [field.name, "value"],
|
|
38760
38663
|
fieldKey: [field.fieldKey, "value"],
|
|
38761
38664
|
initialValue: v.value,
|
|
@@ -38763,14 +38666,14 @@ const inputTypeComponent = {
|
|
|
38763
38666
|
allowClear: true,
|
|
38764
38667
|
name: "value",
|
|
38765
38668
|
formatter: value => {
|
|
38766
|
-
return value ?
|
|
38669
|
+
return value ? "".concat(value, "%") : "";
|
|
38767
38670
|
},
|
|
38768
38671
|
disabled: !v.type,
|
|
38769
38672
|
placeholder: props.valueplaceholder ? props.valueplaceholder : "Value",
|
|
38770
38673
|
min: 1,
|
|
38771
38674
|
max: 100 - siblingTotal(v.type)
|
|
38772
38675
|
})
|
|
38773
|
-
}), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
38676
|
+
})), fields.length - 1 === i ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
38774
38677
|
disabled: !v.value || !v.type || totalValue() >= 100,
|
|
38775
38678
|
type: "primary",
|
|
38776
38679
|
icon: /*#__PURE__*/jsxRuntime.jsx(Icons.PlusOutlined, {}),
|
|
@@ -38802,18 +38705,21 @@ const inputTypeComponent = {
|
|
|
38802
38705
|
}) : null]
|
|
38803
38706
|
});
|
|
38804
38707
|
},
|
|
38805
|
-
percentage: ({
|
|
38806
|
-
|
|
38807
|
-
|
|
38808
|
-
|
|
38809
|
-
|
|
38810
|
-
|
|
38811
|
-
|
|
38812
|
-
|
|
38813
|
-
|
|
38814
|
-
|
|
38815
|
-
|
|
38816
|
-
|
|
38708
|
+
percentage: (_ref25, _ref26) => {
|
|
38709
|
+
var _input$meta6;
|
|
38710
|
+
let {
|
|
38711
|
+
name,
|
|
38712
|
+
inputName,
|
|
38713
|
+
totalMax,
|
|
38714
|
+
repeatIndex,
|
|
38715
|
+
props,
|
|
38716
|
+
formsValue,
|
|
38717
|
+
input
|
|
38718
|
+
} = _ref25;
|
|
38719
|
+
let {
|
|
38720
|
+
inputMeta,
|
|
38721
|
+
t
|
|
38722
|
+
} = _ref26;
|
|
38817
38723
|
const isRepeatable = Array.isArray(formsValue[name]);
|
|
38818
38724
|
let totalSiblings = 0;
|
|
38819
38725
|
if (isRepeatable && totalMax) {
|
|
@@ -38821,15 +38727,15 @@ const inputTypeComponent = {
|
|
|
38821
38727
|
totl = totl + (grp[inputName] || 0);
|
|
38822
38728
|
return totl;
|
|
38823
38729
|
}, 0);
|
|
38824
|
-
} else if (Array.isArray(input
|
|
38730
|
+
} else if (Array.isArray(input === null || input === void 0 || (_input$meta6 = input.meta) === null || _input$meta6 === void 0 ? void 0 : _input$meta6.siblings)) {
|
|
38825
38731
|
totalSiblings = input.meta.siblings.reduce((totl, key) => {
|
|
38826
38732
|
totl = totl + (formsValue[key] || 0);
|
|
38827
38733
|
return totl;
|
|
38828
38734
|
}, 0);
|
|
38829
38735
|
}
|
|
38830
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, {
|
|
38831
|
-
allowClear: true
|
|
38832
|
-
|
|
38736
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.InputNumber, _objectSpread2(_objectSpread2({
|
|
38737
|
+
allowClear: true
|
|
38738
|
+
}, props), {}, {
|
|
38833
38739
|
style: {
|
|
38834
38740
|
width: "100%"
|
|
38835
38741
|
},
|
|
@@ -38838,33 +38744,36 @@ const inputTypeComponent = {
|
|
|
38838
38744
|
min: 0,
|
|
38839
38745
|
max: 100 - totalSiblings,
|
|
38840
38746
|
formatter: value => {
|
|
38841
|
-
return value ?
|
|
38747
|
+
return value ? "".concat(value) : "";
|
|
38842
38748
|
},
|
|
38843
38749
|
parser: value => value.replace("%", ""),
|
|
38844
38750
|
addonAfter: "%"
|
|
38845
|
-
});
|
|
38751
|
+
}));
|
|
38846
38752
|
},
|
|
38847
|
-
year:
|
|
38848
|
-
|
|
38849
|
-
|
|
38753
|
+
year: _ref27 => {
|
|
38754
|
+
let {
|
|
38755
|
+
props
|
|
38756
|
+
} = _ref27;
|
|
38850
38757
|
const lng = localStorage.getItem("datastakeLng") || "en";
|
|
38851
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, {
|
|
38758
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.DatePicker, _objectSpread2(_objectSpread2({
|
|
38852
38759
|
allowClear: true,
|
|
38853
38760
|
locale: lng === "fr" ? localeFr__default["default"] : localeEn__default["default"],
|
|
38854
|
-
picker: "year"
|
|
38855
|
-
|
|
38761
|
+
picker: "year"
|
|
38762
|
+
}, props), {}, {
|
|
38856
38763
|
format: "YYYY"
|
|
38857
|
-
});
|
|
38764
|
+
}));
|
|
38858
38765
|
},
|
|
38859
|
-
upload: ({
|
|
38860
|
-
|
|
38861
|
-
|
|
38862
|
-
|
|
38863
|
-
|
|
38864
|
-
|
|
38865
|
-
|
|
38866
|
-
|
|
38867
|
-
|
|
38766
|
+
upload: (_ref28, _ref29) => {
|
|
38767
|
+
let {
|
|
38768
|
+
rules,
|
|
38769
|
+
value
|
|
38770
|
+
} = _ref28;
|
|
38771
|
+
let {
|
|
38772
|
+
setLoading,
|
|
38773
|
+
t,
|
|
38774
|
+
getApiBaseUrl,
|
|
38775
|
+
getAppHeader
|
|
38776
|
+
} = _ref29;
|
|
38868
38777
|
const apiURL = getApiBaseUrl();
|
|
38869
38778
|
const accept = rules.length ? rules.find(rule => Object.keys(rule).includes("accept")).accept || "*" : null;
|
|
38870
38779
|
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) : []) || [];
|
|
@@ -38877,13 +38786,12 @@ const inputTypeComponent = {
|
|
|
38877
38786
|
}
|
|
38878
38787
|
}
|
|
38879
38788
|
const allowedExtensions = accept && accept !== "*" ? accept.split(",").map(ext => ext.trim().toLowerCase()) : [];
|
|
38880
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
|
|
38881
|
-
...maxProps,
|
|
38789
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({}, maxProps), {}, {
|
|
38882
38790
|
accept: accept,
|
|
38883
|
-
action:
|
|
38791
|
+
action: "".concat(apiURL, "/upload"),
|
|
38884
38792
|
beforeUpload: beforeUpload(allowedExtensions),
|
|
38885
38793
|
onChange: val => {
|
|
38886
|
-
if (val
|
|
38794
|
+
if (val !== null && val !== void 0 && val.file && typeof setLoading === "function") {
|
|
38887
38795
|
if (val.file.percent !== 100) {
|
|
38888
38796
|
setLoading(true);
|
|
38889
38797
|
} else {
|
|
@@ -38891,10 +38799,9 @@ const inputTypeComponent = {
|
|
|
38891
38799
|
}
|
|
38892
38800
|
}
|
|
38893
38801
|
},
|
|
38894
|
-
headers: {
|
|
38895
|
-
Authorization:
|
|
38896
|
-
|
|
38897
|
-
},
|
|
38802
|
+
headers: _objectSpread2({
|
|
38803
|
+
Authorization: "Bearer ".concat(getToken())
|
|
38804
|
+
}, getAppHeader()),
|
|
38898
38805
|
defaultFileList: values,
|
|
38899
38806
|
children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
|
|
38900
38807
|
style: {
|
|
@@ -38904,17 +38811,19 @@ const inputTypeComponent = {
|
|
|
38904
38811
|
children: t("Upload")
|
|
38905
38812
|
})]
|
|
38906
38813
|
})
|
|
38907
|
-
});
|
|
38814
|
+
}));
|
|
38908
38815
|
},
|
|
38909
|
-
imageUpload: ({
|
|
38910
|
-
|
|
38911
|
-
|
|
38912
|
-
|
|
38913
|
-
|
|
38914
|
-
|
|
38915
|
-
|
|
38916
|
-
|
|
38917
|
-
|
|
38816
|
+
imageUpload: (_ref30, _ref31) => {
|
|
38817
|
+
let {
|
|
38818
|
+
rules,
|
|
38819
|
+
value
|
|
38820
|
+
} = _ref30;
|
|
38821
|
+
let {
|
|
38822
|
+
setLoading,
|
|
38823
|
+
getApiBaseUrl,
|
|
38824
|
+
getAppHeader,
|
|
38825
|
+
t
|
|
38826
|
+
} = _ref31;
|
|
38918
38827
|
const apiURL = getApiBaseUrl();
|
|
38919
38828
|
const values = getImageUploadEditValue(value);
|
|
38920
38829
|
const maxRule = rules.find(r => r.max);
|
|
@@ -38925,17 +38834,17 @@ const inputTypeComponent = {
|
|
|
38925
38834
|
maxProps.multiple = true;
|
|
38926
38835
|
}
|
|
38927
38836
|
}
|
|
38928
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
|
|
38929
|
-
...maxProps,
|
|
38837
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({}, maxProps), {}, {
|
|
38930
38838
|
beforeUpload: beforeUpload(allowedImageExtensions),
|
|
38931
38839
|
accept: "image/*",
|
|
38932
38840
|
classList: !values || !values.length ? "empty" : "",
|
|
38933
38841
|
listType: "picture",
|
|
38934
|
-
action:
|
|
38842
|
+
action: "".concat(apiURL, "/upload"),
|
|
38935
38843
|
onChange: val => {
|
|
38936
38844
|
if (typeof setLoading === "function") {
|
|
38937
|
-
if (val
|
|
38938
|
-
|
|
38845
|
+
if (val !== null && val !== void 0 && val.file) {
|
|
38846
|
+
var _val$file;
|
|
38847
|
+
if ((val === null || val === void 0 || (_val$file = val.file) === null || _val$file === void 0 ? void 0 : _val$file.status) === "removed") {
|
|
38939
38848
|
setLoading(false);
|
|
38940
38849
|
return;
|
|
38941
38850
|
}
|
|
@@ -38947,10 +38856,9 @@ const inputTypeComponent = {
|
|
|
38947
38856
|
setLoading(false);
|
|
38948
38857
|
}
|
|
38949
38858
|
},
|
|
38950
|
-
headers: {
|
|
38951
|
-
Authorization:
|
|
38952
|
-
|
|
38953
|
-
},
|
|
38859
|
+
headers: _objectSpread2({
|
|
38860
|
+
Authorization: "Bearer ".concat(getToken())
|
|
38861
|
+
}, getAppHeader()),
|
|
38954
38862
|
defaultFileList: values,
|
|
38955
38863
|
children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
|
|
38956
38864
|
style: {
|
|
@@ -38960,17 +38868,19 @@ const inputTypeComponent = {
|
|
|
38960
38868
|
children: t("Upload")
|
|
38961
38869
|
})]
|
|
38962
38870
|
})
|
|
38963
|
-
});
|
|
38871
|
+
}));
|
|
38964
38872
|
},
|
|
38965
|
-
videoUpload: ({
|
|
38966
|
-
|
|
38967
|
-
|
|
38968
|
-
|
|
38969
|
-
|
|
38970
|
-
|
|
38971
|
-
|
|
38972
|
-
|
|
38973
|
-
|
|
38873
|
+
videoUpload: (_ref32, _ref33) => {
|
|
38874
|
+
let {
|
|
38875
|
+
rules,
|
|
38876
|
+
value
|
|
38877
|
+
} = _ref32;
|
|
38878
|
+
let {
|
|
38879
|
+
setLoading = () => {},
|
|
38880
|
+
getApiBaseUrl,
|
|
38881
|
+
getAppHeader,
|
|
38882
|
+
t
|
|
38883
|
+
} = _ref33;
|
|
38974
38884
|
const apiURL = getApiBaseUrl();
|
|
38975
38885
|
const values = getImageUploadEditValue(value);
|
|
38976
38886
|
const maxRule = rules.find(r => r.max);
|
|
@@ -38981,21 +38891,25 @@ const inputTypeComponent = {
|
|
|
38981
38891
|
maxProps.multiple = true;
|
|
38982
38892
|
}
|
|
38983
38893
|
}
|
|
38984
|
-
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, {
|
|
38985
|
-
itemRender: (item, fileList) =>
|
|
38986
|
-
|
|
38987
|
-
|
|
38988
|
-
|
|
38989
|
-
|
|
38990
|
-
|
|
38894
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Upload, _objectSpread2(_objectSpread2({
|
|
38895
|
+
itemRender: (item, fileList) => {
|
|
38896
|
+
var _fileList$response;
|
|
38897
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
38898
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(EditVideoPreview, {
|
|
38899
|
+
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)
|
|
38900
|
+
}), item]
|
|
38901
|
+
});
|
|
38902
|
+
}
|
|
38903
|
+
}, maxProps), {}, {
|
|
38991
38904
|
accept: "video/*",
|
|
38992
38905
|
classList: !values || !values.length ? "empty" : "",
|
|
38993
38906
|
listType: "picture",
|
|
38994
|
-
action:
|
|
38907
|
+
action: "".concat(apiURL, "/upload"),
|
|
38995
38908
|
onChange: val => {
|
|
38996
38909
|
if (typeof setLoading === "function") {
|
|
38997
|
-
if (val
|
|
38998
|
-
|
|
38910
|
+
if (val !== null && val !== void 0 && val.file) {
|
|
38911
|
+
var _val$file2;
|
|
38912
|
+
if ((val === null || val === void 0 || (_val$file2 = val.file) === null || _val$file2 === void 0 ? void 0 : _val$file2.status) === "removed") {
|
|
38999
38913
|
setLoading(false);
|
|
39000
38914
|
return;
|
|
39001
38915
|
}
|
|
@@ -39007,10 +38921,9 @@ const inputTypeComponent = {
|
|
|
39007
38921
|
setLoading(false);
|
|
39008
38922
|
}
|
|
39009
38923
|
},
|
|
39010
|
-
headers: {
|
|
39011
|
-
Authorization:
|
|
39012
|
-
|
|
39013
|
-
},
|
|
38924
|
+
headers: _objectSpread2({
|
|
38925
|
+
Authorization: "Bearer ".concat(getToken())
|
|
38926
|
+
}, getAppHeader()),
|
|
39014
38927
|
defaultFileList: values,
|
|
39015
38928
|
children: /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
|
|
39016
38929
|
style: {
|
|
@@ -39020,17 +38933,19 @@ const inputTypeComponent = {
|
|
|
39020
38933
|
children: t("Upload")
|
|
39021
38934
|
})]
|
|
39022
38935
|
})
|
|
39023
|
-
});
|
|
38936
|
+
}));
|
|
39024
38937
|
},
|
|
39025
|
-
geolocation: ({
|
|
39026
|
-
|
|
39027
|
-
|
|
39028
|
-
|
|
39029
|
-
|
|
39030
|
-
|
|
39031
|
-
|
|
39032
|
-
|
|
39033
|
-
|
|
38938
|
+
geolocation: (_ref34, _ref35) => {
|
|
38939
|
+
let {
|
|
38940
|
+
value,
|
|
38941
|
+
name,
|
|
38942
|
+
formsValue,
|
|
38943
|
+
addressData,
|
|
38944
|
+
props
|
|
38945
|
+
} = _ref34;
|
|
38946
|
+
let {
|
|
38947
|
+
inputMeta
|
|
38948
|
+
} = _ref35;
|
|
39034
38949
|
let search = formsValue.country;
|
|
39035
38950
|
if (addressData && Object.keys(addressData).length > 0) {
|
|
39036
38951
|
const country = countriesList.countries[formsValue.country] || {};
|
|
@@ -39038,10 +38953,10 @@ const inputTypeComponent = {
|
|
|
39038
38953
|
search = addressData.country;
|
|
39039
38954
|
}
|
|
39040
38955
|
if (addressData.level1) {
|
|
39041
|
-
search =
|
|
38956
|
+
search = "".concat(addressData.level1, ", ").concat(addressData.country || country.name);
|
|
39042
38957
|
}
|
|
39043
38958
|
if (addressData.level2) {
|
|
39044
|
-
search =
|
|
38959
|
+
search = "".concat(addressData.level2, ", ").concat(addressData.level1, ", ").concat(addressData.country || country.name);
|
|
39045
38960
|
}
|
|
39046
38961
|
} else {
|
|
39047
38962
|
const country = countriesList.countries[formsValue.country] || {};
|
|
@@ -39049,10 +38964,10 @@ const inputTypeComponent = {
|
|
|
39049
38964
|
search = country.name;
|
|
39050
38965
|
}
|
|
39051
38966
|
if (formsValue.administrativeLevel1Name) {
|
|
39052
|
-
search =
|
|
38967
|
+
search = "".concat(search, " ").concat(formsValue.administrativeLevel1Name);
|
|
39053
38968
|
}
|
|
39054
38969
|
if (formsValue.administrativeLevel2Name) {
|
|
39055
|
-
search =
|
|
38970
|
+
search = "".concat(search, " ").concat(formsValue.administrativeLevel2Name);
|
|
39056
38971
|
}
|
|
39057
38972
|
}
|
|
39058
38973
|
return /*#__PURE__*/jsxRuntime.jsx(Geolocation, {
|
|
@@ -39065,33 +38980,35 @@ const inputTypeComponent = {
|
|
|
39065
38980
|
searchValue: search
|
|
39066
38981
|
});
|
|
39067
38982
|
},
|
|
39068
|
-
ajaxSelect: ({
|
|
39069
|
-
|
|
39070
|
-
|
|
39071
|
-
|
|
39072
|
-
|
|
39073
|
-
|
|
39074
|
-
|
|
39075
|
-
|
|
39076
|
-
|
|
39077
|
-
|
|
39078
|
-
|
|
39079
|
-
|
|
39080
|
-
|
|
39081
|
-
|
|
39082
|
-
|
|
39083
|
-
|
|
39084
|
-
|
|
39085
|
-
|
|
39086
|
-
|
|
39087
|
-
|
|
39088
|
-
|
|
39089
|
-
|
|
39090
|
-
|
|
39091
|
-
|
|
39092
|
-
|
|
39093
|
-
|
|
39094
|
-
|
|
38983
|
+
ajaxSelect: (_ref36, _ref37) => {
|
|
38984
|
+
let {
|
|
38985
|
+
call,
|
|
38986
|
+
automaticallyLink,
|
|
38987
|
+
name,
|
|
38988
|
+
preSelected,
|
|
38989
|
+
inputName,
|
|
38990
|
+
props,
|
|
38991
|
+
formsValue,
|
|
38992
|
+
onNewSetValue,
|
|
38993
|
+
multiple,
|
|
38994
|
+
updateOptions,
|
|
38995
|
+
repeatValues,
|
|
38996
|
+
repeatIndex,
|
|
38997
|
+
value,
|
|
38998
|
+
unique,
|
|
38999
|
+
address,
|
|
39000
|
+
addressData = {},
|
|
39001
|
+
input
|
|
39002
|
+
} = _ref36;
|
|
39003
|
+
let {
|
|
39004
|
+
form,
|
|
39005
|
+
forms,
|
|
39006
|
+
setAddress,
|
|
39007
|
+
changeInputMeta,
|
|
39008
|
+
inputMeta = {},
|
|
39009
|
+
meta,
|
|
39010
|
+
setFormValues
|
|
39011
|
+
} = _ref37;
|
|
39095
39012
|
return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect, {
|
|
39096
39013
|
preSelected: preSelected,
|
|
39097
39014
|
input: input,
|
|
@@ -39127,40 +39044,41 @@ const inputTypeComponent = {
|
|
|
39127
39044
|
const selectedValue = data.find(v => v.value === ev);
|
|
39128
39045
|
if (address && selectedValue) {
|
|
39129
39046
|
dot__default["default"].str(address, selectedValue.label, addressData);
|
|
39130
|
-
setAddress({
|
|
39131
|
-
...addressData
|
|
39132
|
-
});
|
|
39047
|
+
setAddress(_objectSpread2({}, addressData));
|
|
39133
39048
|
}
|
|
39134
39049
|
}
|
|
39135
39050
|
},
|
|
39136
39051
|
setAddress: setAddress
|
|
39137
39052
|
});
|
|
39138
39053
|
},
|
|
39139
|
-
tag:
|
|
39140
|
-
|
|
39141
|
-
|
|
39142
|
-
|
|
39054
|
+
tag: _ref38 => {
|
|
39055
|
+
let {
|
|
39056
|
+
value,
|
|
39057
|
+
repeatLabel
|
|
39058
|
+
} = _ref38;
|
|
39143
39059
|
return /*#__PURE__*/jsxRuntime.jsx(TagInput$1, {
|
|
39144
39060
|
allowClear: true,
|
|
39145
39061
|
value: value || [],
|
|
39146
39062
|
newPlaceholder: repeatLabel
|
|
39147
39063
|
});
|
|
39148
39064
|
},
|
|
39149
|
-
modal: ({
|
|
39150
|
-
|
|
39151
|
-
|
|
39152
|
-
|
|
39153
|
-
|
|
39154
|
-
|
|
39155
|
-
|
|
39156
|
-
|
|
39157
|
-
|
|
39158
|
-
|
|
39159
|
-
|
|
39160
|
-
|
|
39161
|
-
|
|
39162
|
-
|
|
39163
|
-
|
|
39065
|
+
modal: (_ref39, _ref40) => {
|
|
39066
|
+
let {
|
|
39067
|
+
call,
|
|
39068
|
+
automaticallyLink,
|
|
39069
|
+
name,
|
|
39070
|
+
inputName,
|
|
39071
|
+
props,
|
|
39072
|
+
formsValue,
|
|
39073
|
+
onNewSetValue,
|
|
39074
|
+
repeatValues,
|
|
39075
|
+
repeatIndex,
|
|
39076
|
+
value,
|
|
39077
|
+
modalTitle
|
|
39078
|
+
} = _ref39;
|
|
39079
|
+
let {
|
|
39080
|
+
form
|
|
39081
|
+
} = _ref40;
|
|
39164
39082
|
return /*#__PURE__*/jsxRuntime.jsx(AjaxModal$2, {
|
|
39165
39083
|
allowClear: true,
|
|
39166
39084
|
call: call,
|
|
@@ -39178,63 +39096,69 @@ const inputTypeComponent = {
|
|
|
39178
39096
|
buttonText: modalTitle
|
|
39179
39097
|
});
|
|
39180
39098
|
},
|
|
39181
|
-
website: ({
|
|
39182
|
-
|
|
39183
|
-
|
|
39184
|
-
|
|
39185
|
-
|
|
39186
|
-
|
|
39187
|
-
|
|
39188
|
-
|
|
39189
|
-
|
|
39190
|
-
|
|
39191
|
-
|
|
39192
|
-
|
|
39193
|
-
|
|
39194
|
-
|
|
39099
|
+
website: (_ref41, _ref42) => {
|
|
39100
|
+
let {
|
|
39101
|
+
name,
|
|
39102
|
+
inputName,
|
|
39103
|
+
props,
|
|
39104
|
+
value,
|
|
39105
|
+
repeatIndex,
|
|
39106
|
+
repeatValues,
|
|
39107
|
+
formsValue
|
|
39108
|
+
} = _ref41;
|
|
39109
|
+
let {
|
|
39110
|
+
form,
|
|
39111
|
+
inputMeta = {},
|
|
39112
|
+
t
|
|
39113
|
+
} = _ref42;
|
|
39114
|
+
return /*#__PURE__*/jsxRuntime.jsx(Website, _objectSpread2(_objectSpread2({
|
|
39195
39115
|
allowClear: true,
|
|
39196
39116
|
initialValue: value,
|
|
39197
|
-
t: t
|
|
39198
|
-
|
|
39117
|
+
t: t
|
|
39118
|
+
}, props), {}, {
|
|
39199
39119
|
onChange: val => updateFormValues(repeatIndex, repeatValues, inputName, val, formsValue, name, form),
|
|
39200
39120
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
39201
39121
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || "www.example.com"
|
|
39202
|
-
});
|
|
39122
|
+
}));
|
|
39203
39123
|
},
|
|
39204
|
-
dataLink: ({
|
|
39205
|
-
|
|
39206
|
-
|
|
39207
|
-
|
|
39208
|
-
|
|
39209
|
-
|
|
39210
|
-
|
|
39211
|
-
|
|
39212
|
-
|
|
39213
|
-
|
|
39214
|
-
|
|
39215
|
-
|
|
39216
|
-
|
|
39217
|
-
|
|
39218
|
-
|
|
39219
|
-
|
|
39220
|
-
|
|
39221
|
-
|
|
39222
|
-
|
|
39223
|
-
|
|
39224
|
-
|
|
39225
|
-
|
|
39226
|
-
|
|
39227
|
-
|
|
39228
|
-
|
|
39229
|
-
|
|
39230
|
-
|
|
39231
|
-
|
|
39232
|
-
|
|
39233
|
-
|
|
39234
|
-
|
|
39235
|
-
|
|
39236
|
-
|
|
39237
|
-
|
|
39124
|
+
dataLink: (_ref43, _ref44) => {
|
|
39125
|
+
var _input$meta7, _input$meta10, _formsValue$meta, _input$meta11;
|
|
39126
|
+
let {
|
|
39127
|
+
setValues,
|
|
39128
|
+
name,
|
|
39129
|
+
onValuesChange,
|
|
39130
|
+
formsValue,
|
|
39131
|
+
input,
|
|
39132
|
+
changeLinking,
|
|
39133
|
+
call,
|
|
39134
|
+
automaticallyLink,
|
|
39135
|
+
inputName,
|
|
39136
|
+
props,
|
|
39137
|
+
onNewSetValue,
|
|
39138
|
+
multiple,
|
|
39139
|
+
updateOptions,
|
|
39140
|
+
repeatValues,
|
|
39141
|
+
repeatIndex,
|
|
39142
|
+
value,
|
|
39143
|
+
unique,
|
|
39144
|
+
address,
|
|
39145
|
+
addressData = {},
|
|
39146
|
+
getFromLinking
|
|
39147
|
+
} = _ref43;
|
|
39148
|
+
let {
|
|
39149
|
+
form,
|
|
39150
|
+
groupFormId,
|
|
39151
|
+
setAddress,
|
|
39152
|
+
isHighlighted,
|
|
39153
|
+
changeInputMeta,
|
|
39154
|
+
meta,
|
|
39155
|
+
inputMeta,
|
|
39156
|
+
forms
|
|
39157
|
+
} = _ref44;
|
|
39158
|
+
if ((input === null || input === void 0 || (_input$meta7 = input.meta) === null || _input$meta7 === void 0 || (_input$meta7 = _input$meta7.optionsView) === null || _input$meta7 === void 0 ? void 0 : _input$meta7.editInputType) === "ajaxSelect") {
|
|
39159
|
+
var _formsValue$groupForm, _input$meta8, _input$meta9;
|
|
39160
|
+
const currentValue = groupFormId ? (_formsValue$groupForm = formsValue[groupFormId]) === null || _formsValue$groupForm === void 0 ? void 0 : _formsValue$groupForm[name] : formsValue[name];
|
|
39161
|
+
(input === null || input === void 0 || (_input$meta8 = input.meta) === null || _input$meta8 === void 0 || (_input$meta8 = _input$meta8.optionsView) === null || _input$meta8 === void 0 ? void 0 : _input$meta8.call) || (input === null || input === void 0 || (_input$meta9 = input.meta) === null || _input$meta9 === void 0 ? void 0 : _input$meta9.call) || "default::list()::::";
|
|
39238
39162
|
return /*#__PURE__*/jsxRuntime.jsx(AjaxSelect$1, {
|
|
39239
39163
|
size: "medium",
|
|
39240
39164
|
input: input,
|
|
@@ -39271,9 +39195,7 @@ const inputTypeComponent = {
|
|
|
39271
39195
|
const selectedValue = data.find(v => v.value === ev);
|
|
39272
39196
|
if (address && selectedValue) {
|
|
39273
39197
|
dot__default["default"].str(address, selectedValue.label, addressData);
|
|
39274
|
-
setAddress({
|
|
39275
|
-
...addressData
|
|
39276
|
-
});
|
|
39198
|
+
setAddress(_objectSpread2({}, addressData));
|
|
39277
39199
|
}
|
|
39278
39200
|
}
|
|
39279
39201
|
},
|
|
@@ -39283,188 +39205,149 @@ const inputTypeComponent = {
|
|
|
39283
39205
|
isDataLink: true
|
|
39284
39206
|
});
|
|
39285
39207
|
}
|
|
39286
|
-
const isSingle = input
|
|
39287
|
-
const formData = groupFormId ? isSingle ? (formsValue[groupFormId] || {})[name] ? [{
|
|
39288
|
-
...(formsValue[groupFormId] || {})[name]
|
|
39289
|
-
}] : [] : getArray((formsValue[groupFormId] || {})[name] || []).map(v => ({
|
|
39290
|
-
...v
|
|
39291
|
-
})) : isSingle ? formsValue[name] ? [{
|
|
39292
|
-
...formsValue[name]
|
|
39293
|
-
}] : [] : (formsValue[name] || []).map(v => ({
|
|
39294
|
-
...v
|
|
39295
|
-
}));
|
|
39208
|
+
const isSingle = (input === null || input === void 0 || (_input$meta10 = input.meta) === null || _input$meta10 === void 0 ? void 0 : _input$meta10.maxRepeat) === 1;
|
|
39209
|
+
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));
|
|
39296
39210
|
const onUpdate = (val, i) => {
|
|
39297
39211
|
const _val = isSingle ? {
|
|
39298
39212
|
[name]: val
|
|
39299
39213
|
} : {
|
|
39300
|
-
[name]: formData
|
|
39214
|
+
[name]: formData === null || formData === void 0 ? void 0 : formData.map((d, j) => i === j ? val : d)
|
|
39301
39215
|
};
|
|
39302
39216
|
if (groupFormId) {
|
|
39303
|
-
const _defaultData = form
|
|
39304
|
-
const _newData = {
|
|
39305
|
-
|
|
39306
|
-
..._val
|
|
39307
|
-
};
|
|
39308
|
-
onValuesChange(_newData, {
|
|
39309
|
-
...formsValue,
|
|
39217
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
39218
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
39219
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
39310
39220
|
[groupFormId]: _newData
|
|
39311
|
-
});
|
|
39312
|
-
form
|
|
39313
|
-
setValues({
|
|
39314
|
-
...formsValue,
|
|
39221
|
+
}));
|
|
39222
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
39223
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
39315
39224
|
[groupFormId]: _newData
|
|
39316
|
-
});
|
|
39225
|
+
}));
|
|
39317
39226
|
return;
|
|
39318
39227
|
}
|
|
39319
|
-
onValuesChange(_val, {
|
|
39320
|
-
|
|
39321
|
-
|
|
39322
|
-
});
|
|
39323
|
-
form?.setFieldValue(name, _val[name]);
|
|
39324
|
-
setValues({
|
|
39325
|
-
...formsValue,
|
|
39326
|
-
..._val
|
|
39327
|
-
});
|
|
39228
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
39229
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
39230
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
39328
39231
|
};
|
|
39329
39232
|
return /*#__PURE__*/jsxRuntime.jsx(DataLink, {
|
|
39330
39233
|
form: input,
|
|
39331
39234
|
formsValue: formsValue,
|
|
39332
39235
|
onUpdate: onUpdate,
|
|
39333
39236
|
isHighlighted: isHighlighted,
|
|
39334
|
-
values: groupFormId ? {
|
|
39335
|
-
...(formsValue[groupFormId] || {}),
|
|
39237
|
+
values: groupFormId ? _objectSpread2(_objectSpread2({}, formsValue[groupFormId] || {}), {}, {
|
|
39336
39238
|
meta: {
|
|
39337
|
-
inputs: (formsValue
|
|
39239
|
+
inputs: ((formsValue === null || formsValue === void 0 || (_formsValue$meta = formsValue.meta) === null || _formsValue$meta === void 0 ? void 0 : _formsValue$meta.inputs) || {})[groupFormId]
|
|
39338
39240
|
}
|
|
39339
|
-
} : formsValue,
|
|
39241
|
+
}) : formsValue,
|
|
39340
39242
|
name: name,
|
|
39341
39243
|
groupFormId: groupFormId,
|
|
39342
|
-
maxRepeat: input
|
|
39343
|
-
remove:
|
|
39344
|
-
|
|
39345
|
-
|
|
39244
|
+
maxRepeat: input === null || input === void 0 || (_input$meta11 = input.meta) === null || _input$meta11 === void 0 ? void 0 : _input$meta11.maxRepeat,
|
|
39245
|
+
remove: _ref45 => {
|
|
39246
|
+
let {
|
|
39247
|
+
key
|
|
39248
|
+
} = _ref45;
|
|
39346
39249
|
const _val = isSingle ? {
|
|
39347
39250
|
[name]: null
|
|
39348
39251
|
} : {
|
|
39349
39252
|
[name]: formData.filter((v, i) => i !== key)
|
|
39350
39253
|
};
|
|
39351
39254
|
if (groupFormId) {
|
|
39352
|
-
const _defaultData = form
|
|
39353
|
-
const _newData = {
|
|
39354
|
-
|
|
39355
|
-
..._val
|
|
39356
|
-
};
|
|
39357
|
-
onValuesChange(_newData, {
|
|
39358
|
-
...formsValue,
|
|
39255
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
39256
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
39257
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
39359
39258
|
[groupFormId]: _newData
|
|
39360
|
-
});
|
|
39361
|
-
form
|
|
39362
|
-
setValues({
|
|
39363
|
-
...formsValue,
|
|
39259
|
+
}));
|
|
39260
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
39261
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
39364
39262
|
[groupFormId]: _newData
|
|
39365
|
-
});
|
|
39263
|
+
}));
|
|
39366
39264
|
return;
|
|
39367
39265
|
}
|
|
39368
|
-
onValuesChange(_val, {
|
|
39369
|
-
|
|
39370
|
-
|
|
39371
|
-
});
|
|
39372
|
-
form?.setFieldValue(name, _val[name]);
|
|
39373
|
-
setValues({
|
|
39374
|
-
...formsValue,
|
|
39375
|
-
..._val
|
|
39376
|
-
});
|
|
39266
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
39267
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
39268
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
39377
39269
|
},
|
|
39378
39270
|
add: val => {
|
|
39379
39271
|
const _val = isSingle ? {
|
|
39380
39272
|
[name]: val
|
|
39381
39273
|
} : {
|
|
39382
|
-
[name]: [...formData, {
|
|
39383
|
-
...val
|
|
39384
|
-
}]
|
|
39274
|
+
[name]: [...formData, _objectSpread2({}, val)]
|
|
39385
39275
|
};
|
|
39386
39276
|
if (groupFormId) {
|
|
39387
|
-
const _defaultData = form
|
|
39388
|
-
const _newData = {
|
|
39389
|
-
|
|
39390
|
-
|
|
39391
|
-
};
|
|
39392
|
-
form?.setFieldValue(groupFormId, _newData);
|
|
39393
|
-
onValuesChange(_newData, {
|
|
39394
|
-
...formsValue,
|
|
39277
|
+
const _defaultData = (form === null || form === void 0 ? void 0 : form.getFieldValue(groupFormId)) || {};
|
|
39278
|
+
const _newData = _objectSpread2(_objectSpread2({}, _defaultData), _val);
|
|
39279
|
+
form === null || form === void 0 || form.setFieldValue(groupFormId, _newData);
|
|
39280
|
+
onValuesChange(_newData, _objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
39395
39281
|
[groupFormId]: _newData
|
|
39396
|
-
});
|
|
39397
|
-
setValues({
|
|
39398
|
-
...formsValue,
|
|
39282
|
+
}));
|
|
39283
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), {}, {
|
|
39399
39284
|
[groupFormId]: _newData
|
|
39400
|
-
});
|
|
39285
|
+
}));
|
|
39401
39286
|
return;
|
|
39402
39287
|
}
|
|
39403
|
-
form
|
|
39404
|
-
onValuesChange(_val, {
|
|
39405
|
-
|
|
39406
|
-
..._val
|
|
39407
|
-
});
|
|
39408
|
-
setValues({
|
|
39409
|
-
...formsValue,
|
|
39410
|
-
..._val
|
|
39411
|
-
});
|
|
39288
|
+
form === null || form === void 0 || form.setFieldValue(name, _val[name]);
|
|
39289
|
+
onValuesChange(_val, _objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
39290
|
+
setValues(_objectSpread2(_objectSpread2({}, formsValue), _val));
|
|
39412
39291
|
},
|
|
39413
39292
|
k: name,
|
|
39414
39293
|
formData: formData
|
|
39415
39294
|
});
|
|
39416
39295
|
},
|
|
39417
|
-
internallink: ({
|
|
39418
|
-
|
|
39419
|
-
|
|
39420
|
-
|
|
39421
|
-
|
|
39422
|
-
|
|
39423
|
-
|
|
39424
|
-
|
|
39425
|
-
|
|
39426
|
-
|
|
39427
|
-
|
|
39428
|
-
|
|
39429
|
-
|
|
39430
|
-
|
|
39296
|
+
internallink: (_ref46, _ref47) => {
|
|
39297
|
+
let {
|
|
39298
|
+
name,
|
|
39299
|
+
inputName,
|
|
39300
|
+
props,
|
|
39301
|
+
value,
|
|
39302
|
+
repeatIndex,
|
|
39303
|
+
repeatValues,
|
|
39304
|
+
formsValue
|
|
39305
|
+
} = _ref46;
|
|
39306
|
+
let {
|
|
39307
|
+
form,
|
|
39308
|
+
inputMeta = {},
|
|
39309
|
+
t
|
|
39310
|
+
} = _ref47;
|
|
39311
|
+
return /*#__PURE__*/jsxRuntime.jsx(Website, _objectSpread2(_objectSpread2({
|
|
39431
39312
|
allowClear: true,
|
|
39432
39313
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
39433
39314
|
placeholder: getMetaPlaceholer(inputMeta, t) || props.placeholder || "www.example.com",
|
|
39434
|
-
initialValue: value
|
|
39435
|
-
|
|
39315
|
+
initialValue: value
|
|
39316
|
+
}, props), {}, {
|
|
39436
39317
|
onChange: val => updateFormValues(repeatIndex, repeatValues, inputName, val, formsValue, name, form)
|
|
39437
|
-
});
|
|
39318
|
+
}));
|
|
39438
39319
|
},
|
|
39439
|
-
group:
|
|
39440
|
-
|
|
39441
|
-
|
|
39442
|
-
|
|
39443
|
-
|
|
39444
|
-
|
|
39445
|
-
|
|
39446
|
-
});
|
|
39320
|
+
group: _ref48 => {
|
|
39321
|
+
let {
|
|
39322
|
+
props,
|
|
39323
|
+
groupInputs
|
|
39324
|
+
} = _ref48;
|
|
39325
|
+
return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, _objectSpread2({
|
|
39326
|
+
groupInputs: groupInputs
|
|
39327
|
+
}, props));
|
|
39447
39328
|
},
|
|
39448
|
-
groupInputs: ({
|
|
39449
|
-
|
|
39450
|
-
|
|
39451
|
-
|
|
39452
|
-
|
|
39453
|
-
|
|
39454
|
-
|
|
39329
|
+
groupInputs: (_ref49, _ref50) => {
|
|
39330
|
+
let {
|
|
39331
|
+
props,
|
|
39332
|
+
groupInputs
|
|
39333
|
+
} = _ref49;
|
|
39334
|
+
let {
|
|
39335
|
+
inputMeta
|
|
39336
|
+
} = _ref50;
|
|
39337
|
+
return /*#__PURE__*/jsxRuntime.jsx(GroupInput$1, _objectSpread2({
|
|
39455
39338
|
groupInputs: groupInputs,
|
|
39456
|
-
inputMeta: inputMeta
|
|
39457
|
-
|
|
39458
|
-
});
|
|
39339
|
+
inputMeta: inputMeta
|
|
39340
|
+
}, props));
|
|
39459
39341
|
},
|
|
39460
|
-
radioGroup:
|
|
39461
|
-
|
|
39462
|
-
|
|
39463
|
-
|
|
39464
|
-
|
|
39465
|
-
|
|
39466
|
-
|
|
39467
|
-
|
|
39342
|
+
radioGroup: _ref51 => {
|
|
39343
|
+
let {
|
|
39344
|
+
props,
|
|
39345
|
+
value,
|
|
39346
|
+
options
|
|
39347
|
+
} = _ref51;
|
|
39348
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Radio.Group, _objectSpread2(_objectSpread2({
|
|
39349
|
+
value: value
|
|
39350
|
+
}, props), {}, {
|
|
39468
39351
|
children: (options || []).map(o => {
|
|
39469
39352
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Radio, {
|
|
39470
39353
|
value: o.value,
|
|
@@ -39477,16 +39360,17 @@ const inputTypeComponent = {
|
|
|
39477
39360
|
}) : null]
|
|
39478
39361
|
}, o.value);
|
|
39479
39362
|
})
|
|
39480
|
-
});
|
|
39363
|
+
}));
|
|
39481
39364
|
},
|
|
39482
|
-
checkboxGroup:
|
|
39483
|
-
|
|
39484
|
-
|
|
39485
|
-
|
|
39486
|
-
|
|
39487
|
-
|
|
39488
|
-
|
|
39489
|
-
|
|
39365
|
+
checkboxGroup: _ref52 => {
|
|
39366
|
+
let {
|
|
39367
|
+
props,
|
|
39368
|
+
value,
|
|
39369
|
+
options
|
|
39370
|
+
} = _ref52;
|
|
39371
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox.Group, _objectSpread2(_objectSpread2({
|
|
39372
|
+
value: value
|
|
39373
|
+
}, props), {}, {
|
|
39490
39374
|
children: (options || []).map(o => {
|
|
39491
39375
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Checkbox, {
|
|
39492
39376
|
value: o.value,
|
|
@@ -39499,28 +39383,30 @@ const inputTypeComponent = {
|
|
|
39499
39383
|
}) : null]
|
|
39500
39384
|
}, o.value);
|
|
39501
39385
|
})
|
|
39502
|
-
});
|
|
39386
|
+
}));
|
|
39503
39387
|
}
|
|
39504
39388
|
};
|
|
39505
|
-
const GetFormItem =
|
|
39506
|
-
|
|
39507
|
-
|
|
39508
|
-
|
|
39509
|
-
|
|
39510
|
-
|
|
39511
|
-
|
|
39512
|
-
|
|
39513
|
-
|
|
39514
|
-
|
|
39515
|
-
|
|
39516
|
-
|
|
39517
|
-
|
|
39518
|
-
|
|
39519
|
-
|
|
39520
|
-
|
|
39521
|
-
|
|
39522
|
-
|
|
39523
|
-
|
|
39389
|
+
const GetFormItem = _ref53 => {
|
|
39390
|
+
var _find, _input$meta12, _input$meta13, _input$meta14, _input$meta15, _input$meta16, _input$meta17, _input$meta18, _inputData$value, _input$meta19, _input$meta20, _inputData$commentVal;
|
|
39391
|
+
let {
|
|
39392
|
+
code,
|
|
39393
|
+
inputData,
|
|
39394
|
+
inputId,
|
|
39395
|
+
input,
|
|
39396
|
+
setLoading,
|
|
39397
|
+
values,
|
|
39398
|
+
MainForm,
|
|
39399
|
+
options,
|
|
39400
|
+
plainForms,
|
|
39401
|
+
setValues,
|
|
39402
|
+
alertError,
|
|
39403
|
+
setAddress,
|
|
39404
|
+
inputMeta = {},
|
|
39405
|
+
inputKey,
|
|
39406
|
+
changeInputMeta = () => {},
|
|
39407
|
+
i,
|
|
39408
|
+
isCreate = false
|
|
39409
|
+
} = _ref53;
|
|
39524
39410
|
const {
|
|
39525
39411
|
t,
|
|
39526
39412
|
getAppHeader,
|
|
@@ -39536,7 +39422,7 @@ const GetFormItem = ({
|
|
|
39536
39422
|
case "h6":
|
|
39537
39423
|
return getInputHeadLines(input.type, i, input, values);
|
|
39538
39424
|
default:
|
|
39539
|
-
const rules = inputMeta
|
|
39425
|
+
const rules = inputMeta !== null && inputMeta !== void 0 && inputMeta.notApplicable || inputMeta !== null && inputMeta !== void 0 && inputMeta.notAvailable ? [] : inputData.rules ? inputData.rules.filter(rule => !Object.keys(rule).includes("accept") && !Object.keys(rule).includes("max")) : [];
|
|
39540
39426
|
const requiredRule = rules.find(r => r.required);
|
|
39541
39427
|
if (requiredRule && input.type === "text") {
|
|
39542
39428
|
rules.push({
|
|
@@ -39545,47 +39431,45 @@ const GetFormItem = ({
|
|
|
39545
39431
|
});
|
|
39546
39432
|
}
|
|
39547
39433
|
const noLabel = ["message"].includes(input.type);
|
|
39548
|
-
let maxRule = (inputData
|
|
39434
|
+
let maxRule = (_find = ((inputData === null || inputData === void 0 ? void 0 : inputData.rules) || []).find(rule => rule.max)) === null || _find === void 0 ? void 0 : _find.max;
|
|
39549
39435
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
39550
39436
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
39551
39437
|
className: "flex input-cont",
|
|
39552
|
-
children: /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
39553
|
-
initialValue: inputMeta
|
|
39554
|
-
|
|
39555
|
-
|
|
39556
|
-
|
|
39557
|
-
|
|
39558
|
-
|
|
39559
|
-
|
|
39560
|
-
|
|
39561
|
-
|
|
39562
|
-
|
|
39563
|
-
return e;
|
|
39564
|
-
}
|
|
39565
|
-
return e && e.fileList && e.fileList.map(f => {
|
|
39566
|
-
if (f.response) {
|
|
39567
|
-
return f.response;
|
|
39568
|
-
}
|
|
39569
|
-
return f;
|
|
39570
|
-
});
|
|
39438
|
+
children: /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
39439
|
+
initialValue: inputMeta === null || inputMeta === void 0 ? void 0 : inputMeta.defaultValue
|
|
39440
|
+
}, ["total100", "group"].includes(input.type) ? {} : {
|
|
39441
|
+
name: inputId,
|
|
39442
|
+
fieldKey: inputId,
|
|
39443
|
+
initialValue: inputData.value
|
|
39444
|
+
}), ["upload", "imageUpload", "videoUpload"].includes(input.type) ? {
|
|
39445
|
+
valuePropName: "fileList",
|
|
39446
|
+
getValueFromEvent: e => {
|
|
39447
|
+
if (Array.isArray(e)) {
|
|
39448
|
+
return e;
|
|
39571
39449
|
}
|
|
39572
|
-
|
|
39450
|
+
return e && e.fileList && e.fileList.map(f => {
|
|
39451
|
+
if (f.response) {
|
|
39452
|
+
return f.response;
|
|
39453
|
+
}
|
|
39454
|
+
return f;
|
|
39455
|
+
});
|
|
39456
|
+
}
|
|
39457
|
+
} : {}), {}, {
|
|
39573
39458
|
style: input.showOnView === false ? {
|
|
39574
39459
|
display: "none"
|
|
39575
|
-
} : {}
|
|
39576
|
-
|
|
39577
|
-
|
|
39578
|
-
|
|
39579
|
-
|
|
39580
|
-
|
|
39581
|
-
|
|
39582
|
-
|
|
39583
|
-
|
|
39584
|
-
|
|
39585
|
-
|
|
39586
|
-
|
|
39587
|
-
|
|
39588
|
-
className: input.comment ? `flex-1 with-comment i-${input.type}` : `i-${input.type} flex-1`,
|
|
39460
|
+
} : {}
|
|
39461
|
+
}, ["switch"].includes(input.type) ? {
|
|
39462
|
+
labelCol: {
|
|
39463
|
+
span: 20
|
|
39464
|
+
},
|
|
39465
|
+
style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
|
|
39466
|
+
display: "none"
|
|
39467
|
+
} : {}), {}, {
|
|
39468
|
+
flexDirection: "row",
|
|
39469
|
+
justifyContent: "space-between"
|
|
39470
|
+
})
|
|
39471
|
+
} : {}), {}, {
|
|
39472
|
+
className: input.comment ? "flex-1 with-comment i-".concat(input.type) : "i-".concat(input.type, " flex-1"),
|
|
39589
39473
|
"data-id": inputData.name,
|
|
39590
39474
|
rules: rules,
|
|
39591
39475
|
required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
|
|
@@ -39596,8 +39480,8 @@ const GetFormItem = ({
|
|
|
39596
39480
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
39597
39481
|
className: "mr-1",
|
|
39598
39482
|
children: getInputLabel(input, values)
|
|
39599
|
-
}), !!input
|
|
39600
|
-
title: input
|
|
39483
|
+
}), !!(input !== null && input !== void 0 && (_input$meta12 = input.meta) !== null && _input$meta12 !== void 0 && _input$meta12.tooltip) && /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
39484
|
+
title: input === null || input === void 0 || (_input$meta13 = input.meta) === null || _input$meta13 === void 0 ? void 0 : _input$meta13.tooltip,
|
|
39601
39485
|
trigger: "hover",
|
|
39602
39486
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
39603
39487
|
className: "flex flex-column justify-content-center",
|
|
@@ -39615,7 +39499,7 @@ const GetFormItem = ({
|
|
|
39615
39499
|
title: t("Not applicable"),
|
|
39616
39500
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
39617
39501
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
39618
|
-
disabled: !input
|
|
39502
|
+
disabled: !(input !== null && input !== void 0 && (_input$meta14 = input.meta) !== null && _input$meta14 !== void 0 && _input$meta14.notApplicable),
|
|
39619
39503
|
className: formatClassname(["default p-0", inputMeta.notApplicable && "primary"]),
|
|
39620
39504
|
type: "link",
|
|
39621
39505
|
onClick: () => {
|
|
@@ -39650,7 +39534,7 @@ const GetFormItem = ({
|
|
|
39650
39534
|
title: t("No available information"),
|
|
39651
39535
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
39652
39536
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
39653
|
-
disabled: !input
|
|
39537
|
+
disabled: !(input !== null && input !== void 0 && (_input$meta15 = input.meta) !== null && _input$meta15 !== void 0 && _input$meta15.notAvailable),
|
|
39654
39538
|
className: formatClassname(["default p-0", inputMeta.notAvailable && "primary"]),
|
|
39655
39539
|
type: "link",
|
|
39656
39540
|
onClick: () => {
|
|
@@ -39684,14 +39568,14 @@ const GetFormItem = ({
|
|
|
39684
39568
|
}), /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
39685
39569
|
title: t("Add comment"),
|
|
39686
39570
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
39687
|
-
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
39571
|
+
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
|
|
39688
39572
|
type: "link",
|
|
39689
|
-
disabled: !input
|
|
39690
|
-
|
|
39691
|
-
|
|
39692
|
-
|
|
39693
|
-
|
|
39694
|
-
|
|
39573
|
+
disabled: !(input !== null && input !== void 0 && (_input$meta16 = input.meta) !== null && _input$meta16 !== void 0 && _input$meta16.comment)
|
|
39574
|
+
}, !isShown ? {
|
|
39575
|
+
className: "default p-0"
|
|
39576
|
+
} : {
|
|
39577
|
+
className: "p-0 primary"
|
|
39578
|
+
}), {}, {
|
|
39695
39579
|
onClick: () => {
|
|
39696
39580
|
setIsShown(true);
|
|
39697
39581
|
changeInputMeta({
|
|
@@ -39707,18 +39591,18 @@ const GetFormItem = ({
|
|
|
39707
39591
|
width: 16,
|
|
39708
39592
|
height: 16
|
|
39709
39593
|
})
|
|
39710
|
-
})
|
|
39594
|
+
}))
|
|
39711
39595
|
})
|
|
39712
39596
|
})]
|
|
39713
|
-
}), input.meta
|
|
39597
|
+
}), (_input$meta17 = input.meta) !== null && _input$meta17 !== void 0 && _input$meta17.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
39714
39598
|
className: "code",
|
|
39715
39599
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
39716
|
-
children: input.meta
|
|
39600
|
+
children: (_input$meta18 = input.meta) === null || _input$meta18 === void 0 ? void 0 : _input$meta18.code
|
|
39717
39601
|
})
|
|
39718
39602
|
}) : code ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
39719
39603
|
className: "code",
|
|
39720
39604
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
39721
|
-
children:
|
|
39605
|
+
children: "".concat(code, ".").concat(i + 1)
|
|
39722
39606
|
})
|
|
39723
39607
|
}) : null]
|
|
39724
39608
|
})
|
|
@@ -39738,7 +39622,7 @@ const GetFormItem = ({
|
|
|
39738
39622
|
getAppHeader,
|
|
39739
39623
|
getApiBaseUrl
|
|
39740
39624
|
}) : console.log(input)
|
|
39741
|
-
})
|
|
39625
|
+
}))
|
|
39742
39626
|
}), alertError ? /*#__PURE__*/jsxRuntime.jsx(antd.Alert, {
|
|
39743
39627
|
message: alertError.message,
|
|
39744
39628
|
type: "error",
|
|
@@ -39767,10 +39651,10 @@ const GetFormItem = ({
|
|
|
39767
39651
|
className: "max-char-span",
|
|
39768
39652
|
children: t("max-char", {
|
|
39769
39653
|
chars: maxRule,
|
|
39770
|
-
filled: inputData
|
|
39654
|
+
filled: (inputData === null || inputData === void 0 || (_inputData$value = inputData.value) === null || _inputData$value === void 0 ? void 0 : _inputData$value.length) || 0
|
|
39771
39655
|
})
|
|
39772
39656
|
})
|
|
39773
|
-
}) : null, input.meta
|
|
39657
|
+
}) : null, (_input$meta19 = input.meta) !== null && _input$meta19 !== void 0 && _input$meta19.comment && isShown ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
39774
39658
|
className: "input-content dynamic-form-comment",
|
|
39775
39659
|
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
39776
39660
|
className: "comment-textarea",
|
|
@@ -39796,7 +39680,7 @@ const GetFormItem = ({
|
|
|
39796
39680
|
},
|
|
39797
39681
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
39798
39682
|
type: "link",
|
|
39799
|
-
disabled: !input.meta
|
|
39683
|
+
disabled: !((_input$meta20 = input.meta) !== null && _input$meta20 !== void 0 && _input$meta20.comment),
|
|
39800
39684
|
className: "p-0",
|
|
39801
39685
|
children: /*#__PURE__*/jsxRuntime.jsx(Icons.DeleteOutlined, {
|
|
39802
39686
|
width: 16,
|
|
@@ -39827,7 +39711,7 @@ const GetFormItem = ({
|
|
|
39827
39711
|
className: "max-char-span",
|
|
39828
39712
|
children: t("max-char", {
|
|
39829
39713
|
chars: MAX_COMMENTS_LENGTH,
|
|
39830
|
-
filled: inputData
|
|
39714
|
+
filled: (inputData === null || inputData === void 0 || (_inputData$commentVal = inputData.commentValue) === null || _inputData$commentVal === void 0 ? void 0 : _inputData$commentVal.length) || 0
|
|
39831
39715
|
})
|
|
39832
39716
|
})]
|
|
39833
39717
|
}) : null]
|
|
@@ -39847,22 +39731,23 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
|
|
|
39847
39731
|
const formId = form.dataId || k;
|
|
39848
39732
|
const allInputs = Object.keys(form.inputs).filter(i => {
|
|
39849
39733
|
const input = form.inputs[i];
|
|
39850
|
-
return !excludedKeys.includes(i) && !input.excludeFromEdit && showHideInput(input, values, undefined, undefined, setValues,
|
|
39734
|
+
return !excludedKeys.includes(i) && !input.excludeFromEdit && showHideInput(input, values, undefined, undefined, setValues, "".concat(formId, ".").concat(i));
|
|
39851
39735
|
});
|
|
39852
39736
|
return allInputs.length ? /*#__PURE__*/jsxRuntime.jsxs(React__default["default"].Fragment, {
|
|
39853
39737
|
children: [getFormTitles(formTitles, formId, i), ['h2', 'h3', 'h4', 'h5', 'h6'].includes(form.type) ? getInputHeadLines(form.type, i, form, values) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
39854
39738
|
children: [!form.repeatable ? /*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
39855
|
-
className:
|
|
39739
|
+
className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " mb0 ").concat(i ? 'mt-3' : ''),
|
|
39856
39740
|
children: getInputLabel(form, values)
|
|
39857
39741
|
}) : !form.hideSectionLabel ? /*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
39858
|
-
className:
|
|
39742
|
+
className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " mb0 ").concat(i ? 'mt-3' : ''),
|
|
39859
39743
|
children: form.sectionLabel ? getSectionLabel(form.sectionLabel, values) : form.label ? getInputLabel(form, values) : camelCaseToTitle(k)
|
|
39860
39744
|
}) : null, /*#__PURE__*/jsxRuntime.jsx(antd.Form.List, {
|
|
39861
39745
|
name: formId,
|
|
39862
|
-
children: (fields, {
|
|
39863
|
-
|
|
39864
|
-
|
|
39865
|
-
|
|
39746
|
+
children: (fields, _ref) => {
|
|
39747
|
+
let {
|
|
39748
|
+
add,
|
|
39749
|
+
remove
|
|
39750
|
+
} = _ref;
|
|
39866
39751
|
const formData = form.repeatable ? values[formId] || [] : values[formId] ? [values[formId]] : [];
|
|
39867
39752
|
if (fields.length === 0) {
|
|
39868
39753
|
const formInputs = form.inputs;
|
|
@@ -39913,7 +39798,7 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
|
|
|
39913
39798
|
padding: '0px 5px',
|
|
39914
39799
|
color: '#2E90FA'
|
|
39915
39800
|
},
|
|
39916
|
-
children:
|
|
39801
|
+
children: "#".concat(field.name + 1)
|
|
39917
39802
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
39918
39803
|
className: "remove-button-for-repeatable",
|
|
39919
39804
|
children: (formData.filter(k => Object.keys(k).length > 0).length >= 1 || fields.length > 1) && (typeof form.canDelete !== 'function' || form.canDelete(Array.isArray(values[formId]) ? values[formId][field.name] || {} : values[formId] || {})) ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
@@ -39935,8 +39820,8 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
|
|
|
39935
39820
|
const inputId = input.dataId || inp;
|
|
39936
39821
|
const inputValues = Array.isArray(values[formId]) ? values[formId][field.name] || {} : values[formId] || {};
|
|
39937
39822
|
const value = inputValues[inputId];
|
|
39938
|
-
const commentValue = inputValues[
|
|
39939
|
-
const inputData = getData(formId, input, value, commentValue,
|
|
39823
|
+
const commentValue = inputValues["".concat(inputId, "Comment")];
|
|
39824
|
+
const inputData = getData(formId, input, value, commentValue, "".concat(formId, "[").concat(field.name, "].").concat(inputId), "".concat(formId, ".").concat(inputId));
|
|
39940
39825
|
const subtitles = form.subtitles || null;
|
|
39941
39826
|
inputData.repeatIndex = field.name;
|
|
39942
39827
|
inputData.inputName = inputId;
|
|
@@ -39957,64 +39842,59 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
|
|
|
39957
39842
|
message: requiredRule.message || ''
|
|
39958
39843
|
});
|
|
39959
39844
|
}
|
|
39960
|
-
return showHideInput(input, values, field.name, inputValues, setValues,
|
|
39845
|
+
return showHideInput(input, values, field.name, inputValues, setValues, "".concat(formId, "[").concat(field.name, "].").concat(inputId)) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
|
|
39961
39846
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
39962
|
-
className: form.repeatable ?
|
|
39847
|
+
className: form.repeatable ? "inputs" : "",
|
|
39963
39848
|
children: [getSubtitles(subtitles, input.position, values, field.name, inputValues), ['h2', 'h3', 'h4', 'h5', 'h6'].includes(input.type) ? getInputHeadLines(input.type, i, input, values) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
39964
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
39965
|
-
|
|
39966
|
-
|
|
39967
|
-
|
|
39968
|
-
|
|
39969
|
-
|
|
39970
|
-
|
|
39971
|
-
|
|
39972
|
-
|
|
39973
|
-
|
|
39974
|
-
|
|
39975
|
-
if (Array.isArray(e)) {
|
|
39976
|
-
return e;
|
|
39977
|
-
}
|
|
39978
|
-
return e && e.fileList && e.fileList.map(f => {
|
|
39979
|
-
if (f.response) {
|
|
39980
|
-
return f.response;
|
|
39981
|
-
}
|
|
39982
|
-
return f;
|
|
39983
|
-
});
|
|
39849
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, field), {}, {
|
|
39850
|
+
required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
|
|
39851
|
+
}, ['total100', 'group'].includes(input.type) ? {} : {
|
|
39852
|
+
name: [field.name, inputId],
|
|
39853
|
+
fieldKey: [field.fieldKey, inputId],
|
|
39854
|
+
initialValue: inputData.value
|
|
39855
|
+
}), ['upload'].includes(input.type) ? {
|
|
39856
|
+
valuePropName: "fileList",
|
|
39857
|
+
getValueFromEvent: e => {
|
|
39858
|
+
if (Array.isArray(e)) {
|
|
39859
|
+
return e;
|
|
39984
39860
|
}
|
|
39985
|
-
|
|
39861
|
+
return e && e.fileList && e.fileList.map(f => {
|
|
39862
|
+
if (f.response) {
|
|
39863
|
+
return f.response;
|
|
39864
|
+
}
|
|
39865
|
+
return f;
|
|
39866
|
+
});
|
|
39867
|
+
}
|
|
39868
|
+
} : {}), {}, {
|
|
39986
39869
|
style: input.showOnView === false ? {
|
|
39987
39870
|
display: 'none'
|
|
39988
|
-
} : {}
|
|
39989
|
-
|
|
39990
|
-
|
|
39991
|
-
|
|
39992
|
-
|
|
39993
|
-
|
|
39994
|
-
|
|
39995
|
-
|
|
39996
|
-
|
|
39997
|
-
|
|
39998
|
-
|
|
39999
|
-
|
|
40000
|
-
} : {}),
|
|
39871
|
+
} : {}
|
|
39872
|
+
}, ['switch'].includes(input.type) ? {
|
|
39873
|
+
labelCol: {
|
|
39874
|
+
span: 20
|
|
39875
|
+
},
|
|
39876
|
+
style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
|
|
39877
|
+
display: 'none'
|
|
39878
|
+
} : {}), {}, {
|
|
39879
|
+
flexDirection: 'row',
|
|
39880
|
+
justifyContent: 'space-between'
|
|
39881
|
+
})
|
|
39882
|
+
} : {}), {}, {
|
|
40001
39883
|
label: getInputLabel(input, values),
|
|
40002
39884
|
rules: rules,
|
|
40003
|
-
className: input.comment ?
|
|
39885
|
+
className: input.comment ? "with-comment i-".concat(input.type) : "i-".concat(input.type),
|
|
40004
39886
|
extra: input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
40005
39887
|
disabled: inputData.props.disabled,
|
|
40006
39888
|
type: "link",
|
|
40007
39889
|
onClick: () => {
|
|
40008
39890
|
const inputValues = Array.isArray(values[formId]) ? values[formId][field.name] || {} : values[formId] || {};
|
|
40009
|
-
inputValues[
|
|
39891
|
+
inputValues["".concat(inputData.inputName, "Comment")] = !inputData.commentValue ? '' : undefined;
|
|
40010
39892
|
if (Array.isArray(values[formId])) {
|
|
40011
39893
|
values[formId][field.name] = inputValues;
|
|
40012
39894
|
} else {
|
|
40013
39895
|
values[formId] = inputValues;
|
|
40014
39896
|
}
|
|
40015
|
-
setValues({
|
|
40016
|
-
...values
|
|
40017
|
-
});
|
|
39897
|
+
setValues(_objectSpread2({}, values));
|
|
40018
39898
|
},
|
|
40019
39899
|
children: t(!inputData.commentValue ? 'Add Comment' : 'Remove Comment')
|
|
40020
39900
|
}) : null,
|
|
@@ -40031,9 +39911,9 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
|
|
|
40031
39911
|
getAppHeader,
|
|
40032
39912
|
getApiBaseUrl
|
|
40033
39913
|
}) : console.log(input)
|
|
40034
|
-
}), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
40035
|
-
name: [field.name,
|
|
40036
|
-
fieldKey: [field.fieldKey,
|
|
39914
|
+
})), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
39915
|
+
name: [field.name, "".concat(inputData.inputName, "Comment")],
|
|
39916
|
+
fieldKey: [field.fieldKey, "".concat(inputData.inputName, "Comment")],
|
|
40037
39917
|
initialValue: inputData.commentValue,
|
|
40038
39918
|
hidden: !inputData.commentValue,
|
|
40039
39919
|
children: inputTypeComponent.comment(inputData, {
|
|
@@ -40047,10 +39927,10 @@ function renderRepeatable(options, k, setValues, values, excludedKeys, i, formTi
|
|
|
40047
39927
|
}) : null]
|
|
40048
39928
|
})]
|
|
40049
39929
|
}, ii)
|
|
40050
|
-
},
|
|
39930
|
+
}, "".concat(i).concat(ii)) : null;
|
|
40051
39931
|
})
|
|
40052
39932
|
})]
|
|
40053
|
-
},
|
|
39933
|
+
}, "".concat(formId, "-").concat(field.name))), form.repeatable ? /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
|
|
40054
39934
|
type: "dashed",
|
|
40055
39935
|
style: {
|
|
40056
39936
|
margin: '10px 0px 30px',
|
|
@@ -40079,7 +39959,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
|
|
|
40079
39959
|
const hasLabel = label && (typeof label === 'string' && (label || '').trim() !== '' || typeof label === 'object') ? true : false;
|
|
40080
39960
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
40081
39961
|
children: [hasLabel ? /*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
40082
|
-
className:
|
|
39962
|
+
className: "".concat(form.titleClass ? form.titleClass : 'title-semibold-4', " ").concat(i ? 'mt-3 mb-1' : ''),
|
|
40083
39963
|
children: label
|
|
40084
39964
|
}) : null, /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
40085
39965
|
className: hasLabel ? "mb-4" : "",
|
|
@@ -40088,8 +39968,8 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
|
|
|
40088
39968
|
const inputId = input.dataId || inp;
|
|
40089
39969
|
const inputValues = Array.isArray(values[formId]) ? values[formId] || {} : values[formId] || {};
|
|
40090
39970
|
const value = inputValues[inputId];
|
|
40091
|
-
const commentValue = inputValues[
|
|
40092
|
-
const inputData = getData(formId, input, value, commentValue,
|
|
39971
|
+
const commentValue = inputValues["".concat(inputId, "Comment")];
|
|
39972
|
+
const inputData = getData(formId, input, value, commentValue, "".concat(formId, ".").concat(inputId), "".concat(formId, ".").concat(inputId));
|
|
40093
39973
|
const subtitles = form.subtitles || null;
|
|
40094
39974
|
inputData.repeatIndex = undefined;
|
|
40095
39975
|
inputData.inputName = inputId;
|
|
@@ -40110,62 +39990,58 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
|
|
|
40110
39990
|
message: requiredRule.message || ''
|
|
40111
39991
|
});
|
|
40112
39992
|
}
|
|
40113
|
-
return showHideInput(input, values, undefined, inputValues, setValues,
|
|
39993
|
+
return showHideInput(input, values, undefined, inputValues, setValues, "".concat(formId, ".").concat(inputId)) ? /*#__PURE__*/jsxRuntime.jsx(React__default["default"].Fragment, {
|
|
40114
39994
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
40115
39995
|
children: [getSubtitles(subtitles, input.position, values, undefined, inputValues), ['h2', 'h3', 'h4', 'h5', 'h6'].includes(input.type) ? getInputHeadLines(input.type, i, input, values) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
40116
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
40117
|
-
required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
|
|
40118
|
-
|
|
40119
|
-
|
|
40120
|
-
|
|
40121
|
-
|
|
40122
|
-
|
|
40123
|
-
|
|
40124
|
-
|
|
40125
|
-
|
|
40126
|
-
|
|
40127
|
-
return e;
|
|
40128
|
-
}
|
|
40129
|
-
return e && e.fileList && e.fileList.map(f => {
|
|
40130
|
-
if (f.response) {
|
|
40131
|
-
return f.response;
|
|
40132
|
-
}
|
|
40133
|
-
return f;
|
|
40134
|
-
});
|
|
39996
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
39997
|
+
required: inputData.rules && inputData.rules instanceof Array && inputData.rules.filter(r => r.required).length > 0 ? true : false
|
|
39998
|
+
}, ['total100', 'group'].includes(input.type) ? {} : {
|
|
39999
|
+
name: [formId, inputId],
|
|
40000
|
+
fieldKey: [formId, inputId],
|
|
40001
|
+
initialValue: inputData.value
|
|
40002
|
+
}), ['upload'].includes(input.type) ? {
|
|
40003
|
+
valuePropName: "fileList",
|
|
40004
|
+
getValueFromEvent: e => {
|
|
40005
|
+
if (Array.isArray(e)) {
|
|
40006
|
+
return e;
|
|
40135
40007
|
}
|
|
40136
|
-
|
|
40008
|
+
return e && e.fileList && e.fileList.map(f => {
|
|
40009
|
+
if (f.response) {
|
|
40010
|
+
return f.response;
|
|
40011
|
+
}
|
|
40012
|
+
return f;
|
|
40013
|
+
});
|
|
40014
|
+
}
|
|
40015
|
+
} : {}), {}, {
|
|
40137
40016
|
style: input.showOnView === false ? {
|
|
40138
40017
|
display: 'none'
|
|
40139
|
-
} : {}
|
|
40140
|
-
|
|
40141
|
-
|
|
40142
|
-
|
|
40143
|
-
|
|
40144
|
-
|
|
40145
|
-
|
|
40146
|
-
|
|
40147
|
-
|
|
40148
|
-
|
|
40149
|
-
|
|
40150
|
-
|
|
40151
|
-
} : {}),
|
|
40018
|
+
} : {}
|
|
40019
|
+
}, ['switch'].includes(input.type) ? {
|
|
40020
|
+
labelCol: {
|
|
40021
|
+
span: 20
|
|
40022
|
+
},
|
|
40023
|
+
style: _objectSpread2(_objectSpread2({}, input.showOnView === false ? {
|
|
40024
|
+
display: 'none'
|
|
40025
|
+
} : {}), {}, {
|
|
40026
|
+
flexDirection: 'row',
|
|
40027
|
+
justifyContent: 'space-between'
|
|
40028
|
+
})
|
|
40029
|
+
} : {}), {}, {
|
|
40152
40030
|
label: getInputLabel(input, values),
|
|
40153
40031
|
rules: rules,
|
|
40154
|
-
className: input.comment ?
|
|
40032
|
+
className: input.comment ? "with-comment i-".concat(input.type) : "i-".concat(input.type),
|
|
40155
40033
|
extra: input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
40156
40034
|
disabled: inputData.props.disabled,
|
|
40157
40035
|
type: "link",
|
|
40158
40036
|
onClick: () => {
|
|
40159
40037
|
const inputValues = Array.isArray(values[formId]) ? values[formId] || {} : values[formId] || {};
|
|
40160
|
-
inputValues[
|
|
40038
|
+
inputValues["".concat(inputData.inputName, "Comment")] = !inputData.commentValue ? '' : undefined;
|
|
40161
40039
|
if (Array.isArray(values[formId])) {
|
|
40162
40040
|
values[formId] = inputValues;
|
|
40163
40041
|
} else {
|
|
40164
40042
|
values[formId] = inputValues;
|
|
40165
40043
|
}
|
|
40166
|
-
setValues({
|
|
40167
|
-
...values
|
|
40168
|
-
});
|
|
40044
|
+
setValues(_objectSpread2({}, values));
|
|
40169
40045
|
},
|
|
40170
40046
|
children: t(!inputData.commentValue ? 'Add Comment' : 'Remove Comment')
|
|
40171
40047
|
}) : null,
|
|
@@ -40180,9 +40056,9 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
|
|
|
40180
40056
|
getAppHeader,
|
|
40181
40057
|
getApiBaseUrl
|
|
40182
40058
|
}) : console.log(input)
|
|
40183
|
-
}), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
40184
|
-
name: [formId,
|
|
40185
|
-
fieldKey: [formId,
|
|
40059
|
+
})), input.comment ? /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
40060
|
+
name: [formId, "".concat(inputData.inputName, "Comment")],
|
|
40061
|
+
fieldKey: [formId, "".concat(inputData.inputName, "Comment")],
|
|
40186
40062
|
initialValue: inputData.commentValue,
|
|
40187
40063
|
hidden: !inputData.commentValue,
|
|
40188
40064
|
children: inputTypeComponent.comment(inputData, {
|
|
@@ -40196,7 +40072,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
|
|
|
40196
40072
|
}) : null]
|
|
40197
40073
|
})]
|
|
40198
40074
|
}, ii)
|
|
40199
|
-
},
|
|
40075
|
+
}, "".concat(i).concat(ii)) : null;
|
|
40200
40076
|
})
|
|
40201
40077
|
})]
|
|
40202
40078
|
});
|
|
@@ -57454,7 +57330,8 @@ function FindInformation(_ref) {
|
|
|
57454
57330
|
t = s => s,
|
|
57455
57331
|
goTo = () => {},
|
|
57456
57332
|
getRedirectLink = () => {},
|
|
57457
|
-
renderBreadCrumbs = () => {}
|
|
57333
|
+
renderBreadCrumbs = () => {},
|
|
57334
|
+
breadcrumbs = []
|
|
57458
57335
|
} = _ref;
|
|
57459
57336
|
const {
|
|
57460
57337
|
defaultTab,
|
|
@@ -57478,7 +57355,7 @@ function FindInformation(_ref) {
|
|
|
57478
57355
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
57479
57356
|
className: "daf-create-view semibold form-input-output",
|
|
57480
57357
|
children: [/*#__PURE__*/jsxRuntime.jsx(DAFHeader, {
|
|
57481
|
-
breadcrumbs: breadCrumbs,
|
|
57358
|
+
breadcrumbs: breadcrumbs || breadCrumbs,
|
|
57482
57359
|
title: t("Find Information"),
|
|
57483
57360
|
supportText: t("Identify available information sources among users of compatible applications and connected databases.")
|
|
57484
57361
|
}), activeTab === "locations" && /*#__PURE__*/jsxRuntime.jsx(Locations, {
|
|
@@ -61870,6 +61747,7 @@ exports.MoreTags = MoreTags;
|
|
|
61870
61747
|
exports.MultiBarProgress = MultiBarProgress;
|
|
61871
61748
|
exports.MultiColorProgressBar = MultiColorProgressBar;
|
|
61872
61749
|
exports.Multiselect = Multiselect;
|
|
61750
|
+
exports.NavigationAction = NavigationAction;
|
|
61873
61751
|
exports.NotFound = NotFound;
|
|
61874
61752
|
exports.PLACEHOLDER = PLACEHOLDER;
|
|
61875
61753
|
exports.Pagination = Pagination;
|