datastake-daf 0.6.652 → 0.6.654
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 +64 -56
- package/package.json +1 -1
- package/public/assets/images/applications/wazi-logo-big.svg +4 -0
- package/public/assets/images/applications/wazi-logo-small.svg +3 -0
- package/src/@daf/core/components/AuthForm/AuthForm.stories.js +22 -0
- package/src/@daf/core/components/AuthForm/index.jsx +27 -19
- package/src/@daf/core/components/AuthForm/style.js +2 -1
package/dist/components/index.js
CHANGED
|
@@ -4511,7 +4511,7 @@ const config$3 = {
|
|
|
4511
4511
|
ArcGis: config$5
|
|
4512
4512
|
};
|
|
4513
4513
|
|
|
4514
|
-
const _excluded$
|
|
4514
|
+
const _excluded$A = ["width", "height", "size", "name", "fill"];
|
|
4515
4515
|
const CustomIcon = _ref => {
|
|
4516
4516
|
let {
|
|
4517
4517
|
width = 14,
|
|
@@ -4520,7 +4520,7 @@ const CustomIcon = _ref => {
|
|
|
4520
4520
|
name = "",
|
|
4521
4521
|
fill = "none"
|
|
4522
4522
|
} = _ref,
|
|
4523
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4523
|
+
props = _objectWithoutProperties(_ref, _excluded$A);
|
|
4524
4524
|
const conf = config$3[name];
|
|
4525
4525
|
if (conf) {
|
|
4526
4526
|
return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -4809,7 +4809,7 @@ createCommonjsModule(function (module, exports) {
|
|
|
4809
4809
|
!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])+"]"}}}));
|
|
4810
4810
|
});
|
|
4811
4811
|
|
|
4812
|
-
const _excluded$
|
|
4812
|
+
const _excluded$z = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
|
|
4813
4813
|
dayjs__default["default"].extend(customParseFormat);
|
|
4814
4814
|
dayjs__default["default"].extend(utc);
|
|
4815
4815
|
dayjs__default["default"].extend(utc);
|
|
@@ -5185,7 +5185,7 @@ const filterCreateData = data => {
|
|
|
5185
5185
|
createdAt,
|
|
5186
5186
|
updatedAt
|
|
5187
5187
|
} = data,
|
|
5188
|
-
rest = _objectWithoutProperties(data, _excluded$
|
|
5188
|
+
rest = _objectWithoutProperties(data, _excluded$z);
|
|
5189
5189
|
const _meta = isObjectEmpty(meta) ? undefined : meta;
|
|
5190
5190
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
5191
5191
|
meta: _meta
|
|
@@ -5581,7 +5581,7 @@ SelectFilters.propTypes = {
|
|
|
5581
5581
|
apiUrl: PropTypes__default["default"].string
|
|
5582
5582
|
};
|
|
5583
5583
|
|
|
5584
|
-
const _excluded$
|
|
5584
|
+
const _excluded$y = ["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"];
|
|
5585
5585
|
function DAFTable(_ref) {
|
|
5586
5586
|
let {
|
|
5587
5587
|
columns = [],
|
|
@@ -5612,7 +5612,7 @@ function DAFTable(_ref) {
|
|
|
5612
5612
|
app,
|
|
5613
5613
|
doEmptyRows
|
|
5614
5614
|
} = _ref,
|
|
5615
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5615
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
5616
5616
|
const [source, setSource] = React.useState([]);
|
|
5617
5617
|
const projectData = (projects || []).find(p => p.id === selectedProject);
|
|
5618
5618
|
const [filtersInit, setFiltersInit] = React.useState(!loading);
|
|
@@ -6757,7 +6757,7 @@ function ComponentWithFocus(_ref) {
|
|
|
6757
6757
|
}
|
|
6758
6758
|
|
|
6759
6759
|
var _templateObject$d;
|
|
6760
|
-
const _excluded$
|
|
6760
|
+
const _excluded$x = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
|
|
6761
6761
|
function StickyTable(_ref) {
|
|
6762
6762
|
let {
|
|
6763
6763
|
size = "small",
|
|
@@ -6768,7 +6768,7 @@ function StickyTable(_ref) {
|
|
|
6768
6768
|
pagination = false,
|
|
6769
6769
|
doEmptyRows = true
|
|
6770
6770
|
} = _ref,
|
|
6771
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6771
|
+
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
6772
6772
|
const data = React__default["default"].useMemo(() => {
|
|
6773
6773
|
if (!doEmptyRows) {
|
|
6774
6774
|
return dataSource;
|
|
@@ -7264,7 +7264,7 @@ const BTN_SIZE = {
|
|
|
7264
7264
|
LG: 'large'
|
|
7265
7265
|
};
|
|
7266
7266
|
|
|
7267
|
-
const _excluded$
|
|
7267
|
+
const _excluded$w = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
|
|
7268
7268
|
function DafButton(_ref) {
|
|
7269
7269
|
let {
|
|
7270
7270
|
content = '',
|
|
@@ -7278,7 +7278,7 @@ function DafButton(_ref) {
|
|
|
7278
7278
|
style = {},
|
|
7279
7279
|
className = ''
|
|
7280
7280
|
} = _ref,
|
|
7281
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
7281
|
+
restProps = _objectWithoutProperties(_ref, _excluded$w);
|
|
7282
7282
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
|
|
7283
7283
|
icon: icon,
|
|
7284
7284
|
type: type,
|
|
@@ -7397,12 +7397,12 @@ const Style$J = dt.div`
|
|
|
7397
7397
|
}
|
|
7398
7398
|
`;
|
|
7399
7399
|
|
|
7400
|
-
const _excluded$
|
|
7400
|
+
const _excluded$v = ["children"];
|
|
7401
7401
|
const BorderedButton = _ref => {
|
|
7402
7402
|
let {
|
|
7403
7403
|
children
|
|
7404
7404
|
} = _ref,
|
|
7405
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7405
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
7406
7406
|
return /*#__PURE__*/jsxRuntime.jsx(Style$J, {
|
|
7407
7407
|
className: "d-btn-cont",
|
|
7408
7408
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -7542,12 +7542,12 @@ Badge.propTypes = {
|
|
|
7542
7542
|
props: PropTypes__default["default"].object
|
|
7543
7543
|
};
|
|
7544
7544
|
|
|
7545
|
-
const _excluded$
|
|
7545
|
+
const _excluded$u = ["icon"];
|
|
7546
7546
|
function GetIcon(_ref) {
|
|
7547
7547
|
let {
|
|
7548
7548
|
icon
|
|
7549
7549
|
} = _ref,
|
|
7550
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7550
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
7551
7551
|
let Icon = Icons__namespace.CloseOutlined;
|
|
7552
7552
|
if (Icons__namespace[icon]) {
|
|
7553
7553
|
Icon = Icons__namespace[icon];
|
|
@@ -7866,7 +7866,7 @@ GoToSelect.propTypes = {
|
|
|
7866
7866
|
t: PropTypes__default["default"].func
|
|
7867
7867
|
};
|
|
7868
7868
|
|
|
7869
|
-
const _excluded$
|
|
7869
|
+
const _excluded$t = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
|
|
7870
7870
|
const {
|
|
7871
7871
|
useToken: useToken$n
|
|
7872
7872
|
} = antd.theme;
|
|
@@ -7959,7 +7959,7 @@ function Multiselect(_ref) {
|
|
|
7959
7959
|
isSingle = false,
|
|
7960
7960
|
selectionType = SELECTION_TYPES.DEFAULT
|
|
7961
7961
|
} = _ref,
|
|
7962
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
7962
|
+
restProps = _objectWithoutProperties(_ref, _excluded$t);
|
|
7963
7963
|
const {
|
|
7964
7964
|
token
|
|
7965
7965
|
} = useToken$n();
|
|
@@ -8678,7 +8678,7 @@ DAFHeader.propTypes = {
|
|
|
8678
8678
|
filtersConfig: PropTypes__default["default"].any
|
|
8679
8679
|
};
|
|
8680
8680
|
|
|
8681
|
-
const _excluded$
|
|
8681
|
+
const _excluded$s = ["tabs", "onChange", "value", "className"];
|
|
8682
8682
|
function TabsHeader(_ref) {
|
|
8683
8683
|
let {
|
|
8684
8684
|
tabs = [],
|
|
@@ -8686,7 +8686,7 @@ function TabsHeader(_ref) {
|
|
|
8686
8686
|
value = '',
|
|
8687
8687
|
className = 'mt-2'
|
|
8688
8688
|
} = _ref,
|
|
8689
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8689
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
8690
8690
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8691
8691
|
className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
|
|
8692
8692
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
|
|
@@ -8783,7 +8783,7 @@ DrawerHeader.propTypes = {
|
|
|
8783
8783
|
tabsConfig: PropTypes__default["default"].any
|
|
8784
8784
|
};
|
|
8785
8785
|
|
|
8786
|
-
const _excluded$
|
|
8786
|
+
const _excluded$r = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
|
|
8787
8787
|
const useFooter = _ref => {
|
|
8788
8788
|
let {
|
|
8789
8789
|
leftContent,
|
|
@@ -8818,7 +8818,7 @@ const useFooter = _ref => {
|
|
|
8818
8818
|
style = {},
|
|
8819
8819
|
className = ""
|
|
8820
8820
|
} = button,
|
|
8821
|
-
restProps = _objectWithoutProperties(button, _excluded$
|
|
8821
|
+
restProps = _objectWithoutProperties(button, _excluded$r);
|
|
8822
8822
|
return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
|
|
8823
8823
|
content: label,
|
|
8824
8824
|
type: type,
|
|
@@ -11725,7 +11725,7 @@ Widget.propTypes = {
|
|
|
11725
11725
|
};
|
|
11726
11726
|
Widget.displayName = 'Widget';
|
|
11727
11727
|
|
|
11728
|
-
const _excluded$
|
|
11728
|
+
const _excluded$q = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
|
|
11729
11729
|
function ImageWidget(_ref) {
|
|
11730
11730
|
let {
|
|
11731
11731
|
loading = false,
|
|
@@ -11736,7 +11736,7 @@ function ImageWidget(_ref) {
|
|
|
11736
11736
|
noDescriptionText,
|
|
11737
11737
|
isPdf = false
|
|
11738
11738
|
} = _ref,
|
|
11739
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11739
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
11740
11740
|
const expandable = isPdf ? false : props.expandable;
|
|
11741
11741
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
11742
11742
|
loading: loading,
|
|
@@ -11796,7 +11796,7 @@ function ImageWidget(_ref) {
|
|
|
11796
11796
|
ImageWidget.displayName = 'ImageWidget';
|
|
11797
11797
|
|
|
11798
11798
|
var _templateObject$a;
|
|
11799
|
-
const _excluded$
|
|
11799
|
+
const _excluded$p = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
|
|
11800
11800
|
function FlowWidget(_ref) {
|
|
11801
11801
|
let {
|
|
11802
11802
|
title,
|
|
@@ -11808,7 +11808,7 @@ function FlowWidget(_ref) {
|
|
|
11808
11808
|
className,
|
|
11809
11809
|
direction = "horizontal"
|
|
11810
11810
|
} = _ref,
|
|
11811
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11811
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
11812
11812
|
const [activeTab, setActiveTab] = React.useState();
|
|
11813
11813
|
React.useEffect(() => {
|
|
11814
11814
|
if (defaultActiveTab) {
|
|
@@ -14876,7 +14876,7 @@ Map$3.propTypes = {
|
|
|
14876
14876
|
nameAsSiderTitle: PropTypes__default["default"].bool
|
|
14877
14877
|
};
|
|
14878
14878
|
|
|
14879
|
-
const _excluded$
|
|
14879
|
+
const _excluded$o = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
|
|
14880
14880
|
function InExpandableWidgetMap(_ref) {
|
|
14881
14881
|
let {
|
|
14882
14882
|
isExpanded,
|
|
@@ -14890,7 +14890,7 @@ function InExpandableWidgetMap(_ref) {
|
|
|
14890
14890
|
height,
|
|
14891
14891
|
widgetConfig
|
|
14892
14892
|
} = _ref,
|
|
14893
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14893
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
14894
14894
|
const [mapKey, setMapKey] = React.useState(0);
|
|
14895
14895
|
const [isMapReady, setIsMapReady] = React.useState(false);
|
|
14896
14896
|
React.useEffect(() => {
|
|
@@ -17090,14 +17090,14 @@ const MapConfig = ({
|
|
|
17090
17090
|
});
|
|
17091
17091
|
};
|
|
17092
17092
|
|
|
17093
|
-
const _excluded$
|
|
17093
|
+
const _excluded$n = ["config", "title", "loading"];
|
|
17094
17094
|
const Details = _ref => {
|
|
17095
17095
|
let {
|
|
17096
17096
|
config = [],
|
|
17097
17097
|
title,
|
|
17098
17098
|
loading = false
|
|
17099
17099
|
} = _ref,
|
|
17100
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17100
|
+
rest = _objectWithoutProperties(_ref, _excluded$n);
|
|
17101
17101
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
17102
17102
|
className: "with-border-header h-w-btn-header card",
|
|
17103
17103
|
loading: loading,
|
|
@@ -17113,14 +17113,14 @@ const Details = _ref => {
|
|
|
17113
17113
|
}));
|
|
17114
17114
|
};
|
|
17115
17115
|
|
|
17116
|
-
const _excluded$
|
|
17116
|
+
const _excluded$m = ["config", "title", "loading"];
|
|
17117
17117
|
const KeyIndicatorsDetails = _ref => {
|
|
17118
17118
|
let {
|
|
17119
17119
|
config,
|
|
17120
17120
|
title,
|
|
17121
17121
|
loading = false
|
|
17122
17122
|
} = _ref,
|
|
17123
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17123
|
+
rest = _objectWithoutProperties(_ref, _excluded$m);
|
|
17124
17124
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
17125
17125
|
className: "with-border-header h-w-btn-header",
|
|
17126
17126
|
title: title,
|
|
@@ -17150,7 +17150,7 @@ const Style$z = dt.div`
|
|
|
17150
17150
|
}
|
|
17151
17151
|
`;
|
|
17152
17152
|
|
|
17153
|
-
const _excluded$
|
|
17153
|
+
const _excluded$l = ["children", "config", "detailsTitle", "firstColumnWidth"];
|
|
17154
17154
|
const DetailsSection = _ref => {
|
|
17155
17155
|
let {
|
|
17156
17156
|
children,
|
|
@@ -17158,7 +17158,7 @@ const DetailsSection = _ref => {
|
|
|
17158
17158
|
detailsTitle,
|
|
17159
17159
|
firstColumnWidth = "250px"
|
|
17160
17160
|
} = _ref,
|
|
17161
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17161
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
17162
17162
|
return /*#__PURE__*/jsxRuntime.jsx(Style$z, {
|
|
17163
17163
|
firstColumnWidth: firstColumnWidth,
|
|
17164
17164
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -17334,14 +17334,14 @@ const getGoalConfig = () => {
|
|
|
17334
17334
|
};
|
|
17335
17335
|
|
|
17336
17336
|
var _templateObject$9;
|
|
17337
|
-
const _excluded$
|
|
17337
|
+
const _excluded$k = ["title", "activeSdgGoals", "t"];
|
|
17338
17338
|
function SDGWidget(_ref) {
|
|
17339
17339
|
let {
|
|
17340
17340
|
title = "Sustainable Development Goals",
|
|
17341
17341
|
activeSdgGoals = [],
|
|
17342
17342
|
t = key => key
|
|
17343
17343
|
} = _ref,
|
|
17344
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17344
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
17345
17345
|
const sdgConfig = getGoalConfig();
|
|
17346
17346
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
17347
17347
|
title: title,
|
|
@@ -17639,7 +17639,7 @@ function SdgList({
|
|
|
17639
17639
|
});
|
|
17640
17640
|
}
|
|
17641
17641
|
|
|
17642
|
-
const _excluded$
|
|
17642
|
+
const _excluded$j = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
|
|
17643
17643
|
const {
|
|
17644
17644
|
Meta
|
|
17645
17645
|
} = antd.Card;
|
|
@@ -17659,7 +17659,7 @@ function ProjectWidget(_ref) {
|
|
|
17659
17659
|
hideSDGList = false,
|
|
17660
17660
|
t = x => x
|
|
17661
17661
|
} = _ref,
|
|
17662
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17662
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
17663
17663
|
const [isHovered, setIsHovered] = React__default["default"].useState(false);
|
|
17664
17664
|
const {
|
|
17665
17665
|
token
|
|
@@ -17931,13 +17931,13 @@ const WidgetCard = _ref => {
|
|
|
17931
17931
|
});
|
|
17932
17932
|
};
|
|
17933
17933
|
|
|
17934
|
-
const _excluded$
|
|
17934
|
+
const _excluded$i = ["title", "children"];
|
|
17935
17935
|
const CarouselWidget = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
17936
17936
|
let {
|
|
17937
17937
|
title,
|
|
17938
17938
|
children
|
|
17939
17939
|
} = _ref,
|
|
17940
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17940
|
+
rest = _objectWithoutProperties(_ref, _excluded$i);
|
|
17941
17941
|
/**
|
|
17942
17942
|
* Handles carousel slide change events
|
|
17943
17943
|
* @param {number} currentSlide - The index of the current slide after change
|
|
@@ -18058,7 +18058,7 @@ const StyledCarouselWrapper = dt.div`
|
|
|
18058
18058
|
|
|
18059
18059
|
`;
|
|
18060
18060
|
|
|
18061
|
-
const _excluded$
|
|
18061
|
+
const _excluded$h = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows"];
|
|
18062
18062
|
function ImageCarousel(_ref) {
|
|
18063
18063
|
let {
|
|
18064
18064
|
title,
|
|
@@ -18071,7 +18071,7 @@ function ImageCarousel(_ref) {
|
|
|
18071
18071
|
arrowHoverIconColor = "#1890ff",
|
|
18072
18072
|
customArrows = false
|
|
18073
18073
|
} = _ref,
|
|
18074
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18074
|
+
rest = _objectWithoutProperties(_ref, _excluded$h);
|
|
18075
18075
|
const [previewVisible, setPreviewVisible] = React.useState(false);
|
|
18076
18076
|
const [current, setCurrent] = React.useState(0);
|
|
18077
18077
|
const carouselRef = React.useRef(null);
|
|
@@ -23419,7 +23419,7 @@ const RepeatableModals = ({
|
|
|
23419
23419
|
}) : null;
|
|
23420
23420
|
};
|
|
23421
23421
|
|
|
23422
|
-
const _excluded$
|
|
23422
|
+
const _excluded$g = ["viewGroup"],
|
|
23423
23423
|
_excluded2 = ["label", "icon", "position"];
|
|
23424
23424
|
const Content = _ref => {
|
|
23425
23425
|
let {
|
|
@@ -23488,7 +23488,7 @@ const Content = _ref => {
|
|
|
23488
23488
|
if (groups[gKey].viewGroup === key) {
|
|
23489
23489
|
// eslint-disable-next-line no-unused-vars
|
|
23490
23490
|
const _groups$gKey = groups[gKey],
|
|
23491
|
-
gCfg = _objectWithoutProperties(_groups$gKey, _excluded$
|
|
23491
|
+
gCfg = _objectWithoutProperties(_groups$gKey, _excluded$g);
|
|
23492
23492
|
items[gKey] = gCfg;
|
|
23493
23493
|
}
|
|
23494
23494
|
return items;
|
|
@@ -39718,7 +39718,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
|
|
|
39718
39718
|
});
|
|
39719
39719
|
};
|
|
39720
39720
|
|
|
39721
|
-
const _excluded$
|
|
39721
|
+
const _excluded$f = ["icon"];
|
|
39722
39722
|
function DynamicForm(_ref) {
|
|
39723
39723
|
var _data$meta;
|
|
39724
39724
|
let {
|
|
@@ -40308,7 +40308,7 @@ function DynamicForm(_ref) {
|
|
|
40308
40308
|
let {
|
|
40309
40309
|
icon: Icon
|
|
40310
40310
|
} = _ref3,
|
|
40311
|
-
form = _objectWithoutProperties(_ref3, _excluded$
|
|
40311
|
+
form = _objectWithoutProperties(_ref3, _excluded$f);
|
|
40312
40312
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
|
|
40313
40313
|
type: "link",
|
|
40314
40314
|
size: "large",
|
|
@@ -40523,7 +40523,7 @@ const Navigation = _ref => {
|
|
|
40523
40523
|
}) : null;
|
|
40524
40524
|
};
|
|
40525
40525
|
|
|
40526
|
-
const
|
|
40526
|
+
const StyledSelect = dt(antd.Select)`
|
|
40527
40527
|
width: 100%;
|
|
40528
40528
|
|
|
40529
40529
|
.ant-select-arrow {
|
|
@@ -40531,6 +40531,7 @@ const SelectStyle = dt.div`
|
|
|
40531
40531
|
}
|
|
40532
40532
|
`;
|
|
40533
40533
|
|
|
40534
|
+
const _excluded$e = ["onChange", "value"];
|
|
40534
40535
|
function AuthForm(_ref) {
|
|
40535
40536
|
var _steps$currentStep;
|
|
40536
40537
|
let {
|
|
@@ -40630,7 +40631,6 @@ function AuthForm(_ref) {
|
|
|
40630
40631
|
});
|
|
40631
40632
|
};
|
|
40632
40633
|
const renderField = field => {
|
|
40633
|
-
var _field$options;
|
|
40634
40634
|
let inputNode = null;
|
|
40635
40635
|
switch (field.type) {
|
|
40636
40636
|
case "input":
|
|
@@ -40652,17 +40652,20 @@ function AuthForm(_ref) {
|
|
|
40652
40652
|
}, field.props));
|
|
40653
40653
|
break;
|
|
40654
40654
|
case "select":
|
|
40655
|
-
|
|
40656
|
-
|
|
40655
|
+
{
|
|
40656
|
+
var _field$options;
|
|
40657
|
+
const _ref3 = field.props || {},
|
|
40658
|
+
restSelectProps = _objectWithoutProperties(_ref3, _excluded$e);
|
|
40659
|
+
inputNode = /*#__PURE__*/jsxRuntime.jsx(StyledSelect, _objectSpread2(_objectSpread2({
|
|
40657
40660
|
placeholder: field.placeholder
|
|
40658
|
-
},
|
|
40661
|
+
}, restSelectProps), {}, {
|
|
40659
40662
|
children: (_field$options = field.options) === null || _field$options === void 0 ? void 0 : _field$options.map(opt => /*#__PURE__*/jsxRuntime.jsx(antd.Select.Option, {
|
|
40660
40663
|
value: opt.value,
|
|
40661
40664
|
children: opt.label
|
|
40662
40665
|
}, opt.value))
|
|
40663
|
-
}))
|
|
40664
|
-
|
|
40665
|
-
|
|
40666
|
+
}));
|
|
40667
|
+
break;
|
|
40668
|
+
}
|
|
40666
40669
|
case "custom":
|
|
40667
40670
|
inputNode = field.component;
|
|
40668
40671
|
break;
|
|
@@ -40671,16 +40674,21 @@ function AuthForm(_ref) {
|
|
|
40671
40674
|
placeholder: field.placeholder
|
|
40672
40675
|
}, field.props));
|
|
40673
40676
|
}
|
|
40674
|
-
|
|
40677
|
+
const formItemProps = {
|
|
40678
|
+
key: field.name,
|
|
40675
40679
|
name: field.name,
|
|
40676
40680
|
label: field.label,
|
|
40677
40681
|
rules: field.rules,
|
|
40678
40682
|
style: {
|
|
40679
40683
|
marginBottom: 0
|
|
40680
|
-
}
|
|
40681
|
-
|
|
40684
|
+
}
|
|
40685
|
+
};
|
|
40686
|
+
if (field.valuePropName && field.type !== 'select') {
|
|
40687
|
+
formItemProps.valuePropName = field.valuePropName;
|
|
40688
|
+
}
|
|
40689
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, _objectSpread2(_objectSpread2({}, formItemProps), {}, {
|
|
40682
40690
|
children: inputNode
|
|
40683
|
-
}
|
|
40691
|
+
}));
|
|
40684
40692
|
};
|
|
40685
40693
|
const handleValuesChange = changedValues => {
|
|
40686
40694
|
const changedFieldNames = Object.keys(changedValues);
|
package/package.json
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="121" height="26" viewBox="0 0 121 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12.5002 0.365234C19.4038 0.365235 25.0002 5.96168 25.0002 12.8652C25.0002 19.4287 19.9411 24.8109 13.51 25.3252C13.1459 25.3598 12.7789 25.3779 12.4104 25.3799H12.1057C5.42413 25.3799 0.00725336 19.9638 0.00708008 13.2822C0.00254931 13.1439 0.000244172 13.0047 0.000244141 12.8652C0.000244141 5.96168 5.59669 0.365234 12.5002 0.365234ZM12.1643 5.69238C8.5357 5.69238 5.65759 8.83226 5.65747 12.624V13.8604C5.65747 17.6522 8.53562 20.792 12.1643 20.792C15.7927 20.7917 18.6711 17.652 18.6711 13.8604V12.624C18.671 8.83245 15.7926 5.69271 12.1643 5.69238ZM12.1643 6.79199C15.115 6.79232 17.5704 9.36741 17.5706 12.624V13.8604C17.5706 17.1171 15.1151 19.6921 12.1643 19.6924C9.21325 19.6924 6.75708 17.1173 6.75708 13.8604V12.624C6.7572 9.3672 9.21333 6.79199 12.1643 6.79199ZM11.762 9.77441L8.86157 12.8818L8.51099 13.2578L8.86157 13.6328L11.762 16.7402L12.1643 17.1709L12.5667 16.7402L15.467 13.6328L15.8176 13.2578L15.467 12.8818L12.5667 9.77441L12.1643 9.34375L11.762 9.77441ZM13.7981 13.8076L12.1633 15.5576L10.5295 13.8076H13.7981ZM13.7981 12.707H10.5295L12.1633 10.9561L13.7981 12.707Z" fill="#9C7C40"/>
|
|
3
|
+
<path d="M48.2969 8.0332L43.4805 25.3652H38.4707L31.7559 0H37.2578L41.248 18.3691H41.3887L46.1348 0H50.6172L55.3633 18.3691H55.5039L59.5117 0H65.0137L58.2812 25.3652H53.2715L48.4551 8.0332H48.2969ZM82.0996 25.3652L80.166 19.2129H71.2539L69.3203 25.3652H63.8711L72.6777 0H78.918L87.7422 25.3652H82.0996ZM75.6484 4.85156L72.3965 15.2402H79.0234L75.7715 4.85156H75.6484ZM89.7988 25.3652V21.9023L102.684 4.51758V4.37695H90.0977V0H109.029V3.44531L96.1973 20.8477V20.9707H109.381V25.3652H89.7988ZM118.363 25.3652H113.055V0H118.363V25.3652Z" fill="#2D2D35"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="25" height="26" viewBox="0 0 25 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12.5002 0C19.4038 2.39999e-07 25.0002 5.59644 25.0002 12.5C25.0002 19.0635 19.9411 24.4456 13.51 24.96C13.1459 24.9946 12.7789 25.0126 12.4104 25.0146H12.1057C5.42413 25.0146 0.00725336 19.5985 0.00708008 12.917C0.00254931 12.7787 0.000244172 12.6394 0.000244141 12.5C0.000244141 5.59644 5.59669 0 12.5002 0ZM12.1643 5.32715C8.5357 5.32715 5.65759 8.46702 5.65747 12.2588V13.4951C5.65747 17.287 8.53562 20.4268 12.1643 20.4268C15.7927 20.4264 18.6711 17.2868 18.6711 13.4951V12.2588C18.671 8.46722 15.7926 5.32748 12.1643 5.32715ZM12.1643 6.42676C15.115 6.42709 17.5704 9.00217 17.5706 12.2588V13.4951C17.5706 16.7518 15.1151 19.3268 12.1643 19.3271C9.21325 19.3271 6.75708 16.7521 6.75708 13.4951V12.2588C6.7572 9.00197 9.21333 6.42676 12.1643 6.42676ZM11.762 9.40918L8.86157 12.5166L8.51099 12.8926L8.86157 13.2676L11.762 16.375L12.1643 16.8057L12.5667 16.375L15.467 13.2676L15.8176 12.8926L15.467 12.5166L12.5667 9.40918L12.1643 8.97852L11.762 9.40918ZM13.7981 13.4424L12.1633 15.1924L10.5295 13.4424H13.7981ZM13.7981 12.3418H10.5295L12.1633 10.5908L13.7981 12.3418Z" fill="#9C7C40"/>
|
|
3
|
+
</svg>
|
|
@@ -168,6 +168,14 @@ export const CompleteForm = {
|
|
|
168
168
|
},
|
|
169
169
|
};
|
|
170
170
|
|
|
171
|
+
const legalFormOptions = [
|
|
172
|
+
{ value: 'privateCompany', label: 'Private Limited Company' },
|
|
173
|
+
{ value: 'publicCompany', label: 'Public limited company' },
|
|
174
|
+
{ value: 'stockCompany', label: 'Simplified joint stock company' },
|
|
175
|
+
{ value: 'stateOwnedCompany', label: 'State-owned company' },
|
|
176
|
+
{ value: 'cooperative', label: 'Cooperative' },
|
|
177
|
+
]
|
|
178
|
+
|
|
171
179
|
export const MultiStepForm = {
|
|
172
180
|
name: "Multi-Step Form",
|
|
173
181
|
args: {
|
|
@@ -222,6 +230,20 @@ export const MultiStepForm = {
|
|
|
222
230
|
placeholder: "Confirm your password",
|
|
223
231
|
required: true,
|
|
224
232
|
},
|
|
233
|
+
{
|
|
234
|
+
name: "organisationLegalForm",
|
|
235
|
+
label: "Organisation Legal Form",
|
|
236
|
+
type: "select",
|
|
237
|
+
placeholder: "Select legal form",
|
|
238
|
+
options: legalFormOptions, // Should be [{value: "...", label: "..."}, ...]
|
|
239
|
+
required: true,
|
|
240
|
+
rules: [
|
|
241
|
+
{
|
|
242
|
+
required: true,
|
|
243
|
+
message: "Organisation legal form should not be empty"
|
|
244
|
+
},
|
|
245
|
+
]
|
|
246
|
+
}
|
|
225
247
|
],
|
|
226
248
|
},
|
|
227
249
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect, useCallback } from "react";
|
|
2
2
|
import { Form, Input, Select } from "antd";
|
|
3
3
|
import BorderedButton from "../Button/BorderedButton/index.jsx";
|
|
4
|
-
import {
|
|
4
|
+
import { StyledSelect } from "./style";
|
|
5
5
|
|
|
6
6
|
function AuthForm ({
|
|
7
7
|
steps,
|
|
@@ -130,19 +130,23 @@ function AuthForm ({
|
|
|
130
130
|
case "textarea":
|
|
131
131
|
inputNode = <Input.TextArea placeholder={field.placeholder} {...field.props} />;
|
|
132
132
|
break;
|
|
133
|
-
case "select":
|
|
133
|
+
case "select": {
|
|
134
|
+
const { onChange: fieldOnChange, value: fieldValue, ...restSelectProps } = field.props || {};
|
|
135
|
+
|
|
134
136
|
inputNode = (
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
<StyledSelect
|
|
138
|
+
placeholder={field.placeholder}
|
|
139
|
+
{...restSelectProps}
|
|
140
|
+
>
|
|
141
|
+
{field.options?.map((opt) => (
|
|
142
|
+
<Select.Option key={opt.value} value={opt.value}>
|
|
143
|
+
{opt.label}
|
|
144
|
+
</Select.Option>
|
|
145
|
+
))}
|
|
146
|
+
</StyledSelect>
|
|
144
147
|
);
|
|
145
148
|
break;
|
|
149
|
+
}
|
|
146
150
|
case "custom":
|
|
147
151
|
inputNode = field.component;
|
|
148
152
|
break;
|
|
@@ -150,15 +154,19 @@ function AuthForm ({
|
|
|
150
154
|
inputNode = <Input placeholder={field.placeholder} {...field.props} />;
|
|
151
155
|
}
|
|
152
156
|
|
|
157
|
+
const formItemProps = {
|
|
158
|
+
key: field.name,
|
|
159
|
+
name: field.name,
|
|
160
|
+
label: field.label,
|
|
161
|
+
rules: field.rules,
|
|
162
|
+
style: { marginBottom: 0 }
|
|
163
|
+
};
|
|
164
|
+
if (field.valuePropName && field.type !== 'select') {
|
|
165
|
+
formItemProps.valuePropName = field.valuePropName;
|
|
166
|
+
}
|
|
167
|
+
|
|
153
168
|
return (
|
|
154
|
-
<Form.Item
|
|
155
|
-
key={field.name}
|
|
156
|
-
name={field.name}
|
|
157
|
-
label={field.label}
|
|
158
|
-
rules={field.rules}
|
|
159
|
-
style={{ marginBottom: 0 }}
|
|
160
|
-
valuePropName={field.valuePropName}
|
|
161
|
-
>
|
|
169
|
+
<Form.Item {...formItemProps}>
|
|
162
170
|
{inputNode}
|
|
163
171
|
</Form.Item>
|
|
164
172
|
);
|