datastake-daf 0.6.274 → 0.6.276

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.
@@ -27307,11 +27307,12 @@ const Content = _ref => {
27307
27307
  getApiBaseUrl,
27308
27308
  getAppHeader,
27309
27309
  user,
27310
- evaluationConfig = []
27310
+ evaluationConfig = [],
27311
+ fullWidth = false
27311
27312
  } = _ref;
27312
27313
  const groupSingle = grps => {
27313
27314
  const form = Object.keys(grps).reduce((f, gKey) => {
27314
- if (grps[gKey].type !== 'modal' && !isGroupInput(grps[gKey], false, data) && !isGroupInput(grps[gKey], true, data) && grps[gKey].display !== 'group' && !grps[gKey].viewGroup && !grps[gKey].component) {
27315
+ if (grps[gKey].type !== "modal" && !isGroupInput(grps[gKey], false, data) && !isGroupInput(grps[gKey], true, data) && grps[gKey].display !== "group" && !grps[gKey].viewGroup && !grps[gKey].component) {
27315
27316
  var _grps$gKey, _grps$gKey2, _grps$gKey4, _grps$gKey5;
27316
27317
  if (grps[gKey].group && !f[grps[gKey].group]) {
27317
27318
  f[grps[gKey].group] = {};
@@ -27362,7 +27363,7 @@ const Content = _ref => {
27362
27363
  };
27363
27364
  const getComponent = (component, key, config) => {
27364
27365
  switch (component) {
27365
- case 'repeatableModals':
27366
+ case "repeatableModals":
27366
27367
  return /*#__PURE__*/jsxRuntime.jsx(RepeatableModals, {
27367
27368
  app: app,
27368
27369
  t: t,
@@ -27385,9 +27386,9 @@ const Content = _ref => {
27385
27386
  });
27386
27387
  }
27387
27388
  };
27388
- const isDisplayGroup = input => input.display && input.display === 'group';
27389
- const isSingleModal = input => input.type && input.type === 'modal';
27390
- const hasComponent = input => input.component && typeof input.component === 'string';
27389
+ const isDisplayGroup = input => input.display && input.display === "group";
27390
+ const isSingleModal = input => input.type && input.type === "modal";
27391
+ const hasComponent = input => input.component && typeof input.component === "string";
27391
27392
  const typeRender = (groups, singleGroupsKeys, addedContent) => {
27392
27393
  const _length = Object.keys(groups || {}).length;
27393
27394
  const isEven = _length % 2 === 0;
@@ -27426,10 +27427,9 @@ const Content = _ref => {
27426
27427
  getToken: getToken,
27427
27428
  evaluationConfig: evaluationConfig,
27428
27429
  ajaxOptions: ajaxOptions
27429
- }, key)
27430
-
27430
+ }, key) :
27431
27431
  // repeatable group
27432
- : isGroupInput(groups[key], true, data) ? /*#__PURE__*/jsxRuntime.jsx(RepeatableGroup, {
27432
+ isGroupInput(groups[key], true, data) ? /*#__PURE__*/jsxRuntime.jsx(RepeatableGroup, {
27433
27433
  app: app,
27434
27434
  t: t,
27435
27435
  ajaxForms: ajaxForms,
@@ -27445,9 +27445,9 @@ const Content = _ref => {
27445
27445
  linkingData: linkingData,
27446
27446
  linkingForms: linkingForms,
27447
27447
  ajaxOptions: ajaxOptions
27448
- }, key)
27448
+ }, key) :
27449
27449
  // single inputs grouped
27450
- : singleGroupsKeys.includes(key) ? (() => {
27450
+ singleGroupsKeys.includes(key) ? (() => {
27451
27451
  if (!addedContent.includes(key)) {
27452
27452
  var _groups$key;
27453
27453
  const currentGroup = Object.keys(groupSingle(groups)).find(k => Object.keys(groupSingle(groups)[k]).includes(key));
@@ -27481,7 +27481,7 @@ const Content = _ref => {
27481
27481
  data: data,
27482
27482
  allData: data,
27483
27483
  linkingData: linkingData,
27484
- className: isEven ? ind === _length - 1 || ind === _length - 2 ? 'last' : undefined : ind === _length - 1 ? 'last' : undefined,
27484
+ className: isEven ? ind === _length - 1 || ind === _length - 2 ? "last" : undefined : ind === _length - 1 ? "last" : undefined,
27485
27485
  linkingForms: linkingForms,
27486
27486
  ajaxOptions: ajaxOptions,
27487
27487
  evaluationConfig: evaluationConfig,
@@ -27489,9 +27489,9 @@ const Content = _ref => {
27489
27489
  }, key)]
27490
27490
  }, "".concat(currentGroup, "-").concat(Date.now()));
27491
27491
  }
27492
- })()
27492
+ })() :
27493
27493
  // display group
27494
- : isDisplayGroup(groups[key]) ? /*#__PURE__*/jsxRuntime.jsxs("div", {
27494
+ isDisplayGroup(groups[key]) ? /*#__PURE__*/jsxRuntime.jsxs("div", {
27495
27495
  className: "group display",
27496
27496
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
27497
27497
  className: "title",
@@ -27499,10 +27499,9 @@ const Content = _ref => {
27499
27499
  children: groups[key].label
27500
27500
  })
27501
27501
  }), typeRender(getDisplayGroupConfig(groups, key), singleGroupsKeys, addedContent)]
27502
- }, key)
27503
-
27502
+ }, key) :
27504
27503
  // single modal
27505
- : isSingleModal(groups[key]) ? /*#__PURE__*/jsxRuntime.jsxs("div", {
27504
+ isSingleModal(groups[key]) ? /*#__PURE__*/jsxRuntime.jsxs("div", {
27506
27505
  className: "group",
27507
27506
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
27508
27507
  className: "title",
@@ -27538,18 +27537,18 @@ const Content = _ref => {
27538
27537
  };
27539
27538
  React.useEffect(() => {
27540
27539
  setTimeout(() => {
27541
- const groups = Array.from(document.getElementsByClassName('group'));
27542
- const rows = Array.from(document.querySelectorAll('.repetable-row-extra'));
27540
+ const groups = Array.from(document.getElementsByClassName("group"));
27541
+ const rows = Array.from(document.querySelectorAll(".repetable-row-extra"));
27543
27542
  rows.forEach(row => {
27544
- const inputs = Array.from(row.querySelectorAll('.input'));
27543
+ const inputs = Array.from(row.querySelectorAll(".input"));
27545
27544
  const lasts = getLastRow(inputs.map((i, ind) => ind), 4);
27546
27545
  if (lasts) {
27547
- lasts.forEach(index => inputs[index].classList.add('last'));
27546
+ lasts.forEach(index => inputs[index].classList.add("last"));
27548
27547
  }
27549
27548
  });
27550
27549
  groups.forEach(group => {
27551
27550
  // const isRepeatable = Array.from(group.classList).includes('repeatable');
27552
- const inputs = Array.from(group.querySelectorAll('.input'));
27551
+ const inputs = Array.from(group.querySelectorAll(".input"));
27553
27552
  // if (inputs.length && !isRepeatable) {
27554
27553
  // if (inputs.length % 2 === 0) {
27555
27554
  // inputs[inputs.length - 1].classList.add('last');
@@ -27570,8 +27569,8 @@ const Content = _ref => {
27570
27569
  React.useState({});
27571
27570
  const renderContent = function (f) {
27572
27571
  if (f) {
27573
- const alertType = ['error', 'warning', 'info', 'success'];
27574
- if (f.alertConf && f.alertConf.type === 'warning') {
27572
+ const alertType = ["error", "warning", "info", "success"];
27573
+ if (f.alertConf && f.alertConf.type === "warning") {
27575
27574
  return /*#__PURE__*/jsxRuntime.jsx(antd.Alert, {
27576
27575
  message: f.alertConf.text,
27577
27576
  type: f.alertConf.type,
@@ -27592,15 +27591,15 @@ const Content = _ref => {
27592
27591
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
27593
27592
  className: "wrapper",
27594
27593
  style: {
27595
- width: 700
27594
+ width: fullWidth ? "100%" : 700
27596
27595
  },
27597
27596
  children: [f.alertConf ? /*#__PURE__*/jsxRuntime.jsx(antd.Alert, {
27598
27597
  className: "w-100",
27599
27598
  style: {
27600
- marginBottom: '20px'
27599
+ marginBottom: "20px"
27601
27600
  },
27602
27601
  message: f.alertConf.text,
27603
- type: alertType.includes(f.alertConf.type) ? f.alertConf.type : 'info',
27602
+ type: alertType.includes(f.alertConf.type) ? f.alertConf.type : "info",
27604
27603
  showIcon: true
27605
27604
  }) : null, typeRender(groups, singleGroupsKeys, addedContent)]
27606
27605
  }, Date.now())
@@ -33795,7 +33794,8 @@ const EditForm = _ref => {
33795
33794
  errors = {},
33796
33795
  changeErrors = () => {},
33797
33796
  evaluationConfig = [],
33798
- staticWidth = "614px"
33797
+ staticWidth = "614px",
33798
+ fullWidth = false
33799
33799
  } = _ref;
33800
33800
  const [isSubmitting] = React.useState(false);
33801
33801
  const formData = JSON.parse(JSON.stringify(convertUndefinedToNull(data) || {}));
@@ -34013,9 +34013,9 @@ const EditForm = _ref => {
34013
34013
  name: id,
34014
34014
  layout: "vertical",
34015
34015
  style: {
34016
- maxWidth: 700
34016
+ maxWidth: fullWidth ? "unset" : 700
34017
34017
  },
34018
- className: "main-form".concat(formClass ? " ".concat(formClass) : ""),
34018
+ className: "main-form".concat(formClass ? " ".concat(formClass) : "", " "),
34019
34019
  onValuesChange: (_changedValue, _allValues) => {
34020
34020
  const changedValue = _objectSpread2({}, _changedValue);
34021
34021
  const allValues = _objectSpread2({}, _allValues);
@@ -61514,6 +61514,32 @@ function DataPoint(_ref) {
61514
61514
  });
61515
61515
  }
61516
61516
 
61517
+ const CountryFlag = _ref => {
61518
+ let {
61519
+ countryName,
61520
+ code,
61521
+ hasTooltip = true
61522
+ } = _ref;
61523
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
61524
+ title: countryName,
61525
+ visible: hasTooltip || !countryName,
61526
+ children: /*#__PURE__*/jsxRuntime.jsx("img", {
61527
+ alt: code,
61528
+ style: {
61529
+ width: 24,
61530
+ borderRadius: 100,
61531
+ height: 24
61532
+ },
61533
+ src: "https://flagcdn.com/w80/".concat(code.toLowerCase(), ".png")
61534
+ })
61535
+ });
61536
+ };
61537
+ CountryFlag.propTypes = {
61538
+ countryName: PropTypes__default["default"].string.isRequired,
61539
+ code: PropTypes__default["default"].string.isRequired,
61540
+ hasTooltip: PropTypes__default["default"].bool
61541
+ };
61542
+
61517
61543
  exports.AccountTable = AccountTable;
61518
61544
  exports.ActionWidget = ActionWidget;
61519
61545
  exports.AdminDashboard = AdminDashboard;
@@ -61531,6 +61557,7 @@ exports.Button = DafButton;
61531
61557
  exports.CarouselWidget = CarouselWidget;
61532
61558
  exports.ColumnChart = ColumnChart;
61533
61559
  exports.ComponentWithFocus = ComponentWithFocus;
61560
+ exports.CountryFlag = CountryFlag;
61534
61561
  exports.CustomIcon = CustomIcon;
61535
61562
  exports.DafDashboardDetails = Details;
61536
61563
  exports.DafTheme = DafTheme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.274",
3
+ "version": "0.6.276",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -93,6 +93,7 @@ const EForm = () => {
93
93
  data={editValues}
94
94
  getAppHeader={storyData.getAppHeader}
95
95
  getApiBaseUrl={storyData.getApiBaseUrl}
96
+ fullWidth={true}
96
97
  evaluationConfig={
97
98
  [
98
99
  // {
@@ -53,6 +53,7 @@
53
53
  line-height: 20px !important;
54
54
  color: #001529;
55
55
  }
56
+
56
57
  .ant-page-header {
57
58
  .ant-page-header-heading-left {
58
59
  overflow: initial;
@@ -355,6 +356,7 @@
355
356
  overflow: auto;
356
357
  flex-direction: column;
357
358
  padding: 20px 100px 0 100px;
359
+
358
360
  &.has-section {
359
361
  width: calc(100% - 200px);
360
362
  }
@@ -366,6 +368,10 @@
366
368
  min-height: 100%;
367
369
  margin: auto;
368
370
 
371
+ &.full-width-form {
372
+ max-width: unset;
373
+ }
374
+
369
375
  @media screen and (max-width: 1200px) {
370
376
  min-width: 700px;
371
377
  }
@@ -375,16 +381,16 @@
375
381
  }
376
382
 
377
383
  .with-comment {
378
- & > .ant-form-item-label > label {
384
+ &>.ant-form-item-label>label {
379
385
  width: 100%;
380
386
 
381
- & > span {
387
+ &>span {
382
388
  display: flex;
383
389
  justify-content: space-between;
384
390
  width: 100%;
385
391
 
386
- & > span {
387
- & > button {
392
+ &>span {
393
+ &>button {
388
394
  line-height: 1;
389
395
  height: inherit;
390
396
  font-size: 14px;
@@ -394,7 +400,7 @@
394
400
  }
395
401
  }
396
402
 
397
- &.i-radioGroup > .ant-form-item-label > label > span {
403
+ &.i-radioGroup>.ant-form-item-label>label>span {
398
404
  font-style: normal;
399
405
  font-weight: bold;
400
406
  font-size: 18px;
@@ -473,20 +479,25 @@
473
479
  width: 100%;
474
480
  display: flex;
475
481
  flex-direction: column;
482
+
476
483
  .ant-transfer-list {
477
484
  height: 300px;
485
+
478
486
  .ant-transfer-list-body {
479
487
  overflow-y: auto;
488
+
480
489
  .ant-transfer-list-body-customize-wrapper {
481
490
  padding: 0;
482
491
  }
483
492
  }
493
+
484
494
  .ant-transfer-list-header {
485
495
  .ant-transfer-list-header-selected {
486
496
  display: flex;
487
497
  flex-direction: row-reverse;
488
498
  width: 100%;
489
499
  justify-content: space-between;
500
+
490
501
  .ant-transfer-list-header-title {
491
502
  position: inherit;
492
503
  font-size: var(--font-size-lg);
@@ -496,13 +507,16 @@
496
507
  }
497
508
  }
498
509
  }
510
+
499
511
  .ant-transfer-operation {
500
512
  display: flex;
501
513
  justify-content: space-around;
502
514
  width: 100px;
503
515
  margin: 10px;
516
+
504
517
  button {
505
518
  transform: rotate(90deg);
519
+
506
520
  .anticon {
507
521
  position: absolute;
508
522
  top: 4px;
@@ -513,6 +527,7 @@
513
527
  }
514
528
  }
515
529
  }
530
+
516
531
  .ant-row.ant-form-item.comment-textarea {
517
532
  margin-top: -12px;
518
533
 
@@ -556,7 +571,8 @@
556
571
  align-self: stretch;
557
572
  flex-grow: 0;
558
573
  }
559
- .i-transfer > .ant-form-item-label > label {
574
+
575
+ .i-transfer>.ant-form-item-label>label {
560
576
  padding: 14px 0;
561
577
  }
562
578
 
@@ -568,7 +584,7 @@
568
584
  }
569
585
 
570
586
  .i-modal {
571
- & > .ant-col.ant-form-item-label label {
587
+ &>.ant-col.ant-form-item-label label {
572
588
  margin-top: 1.5rem !important;
573
589
  font-size: 18px;
574
590
  font-weight: 700;
@@ -576,7 +592,7 @@
576
592
  line-height: 22px;
577
593
  color: #001529;
578
594
 
579
- span > span {
595
+ span>span {
580
596
  font-size: 18px;
581
597
  font-weight: 700;
582
598
  font-style: normal;
@@ -600,6 +616,7 @@
600
616
  line-height: var(--size);
601
617
  min-height: 32px;
602
618
  padding: 5px 0;
619
+
603
620
  &.even {
604
621
  background: #f9fafc;
605
622
  }
@@ -701,20 +718,25 @@
701
718
  }
702
719
  }
703
720
  }
721
+
704
722
  .total100 {
705
723
  display: flex;
706
724
  flex-direction: column;
707
725
  width: 100%;
726
+
708
727
  .ant-space-item:nth-of-type(3n) {
709
728
  flex-grow: initial;
710
729
  }
730
+
711
731
  .ant-space-item:not(:last-of-type) {
712
732
  width: calc(50% - 4px);
713
733
  }
734
+
714
735
  .ant-space {
715
736
  margin-top: 8px;
716
737
  }
717
738
  }
739
+
718
740
  .risk-plan {
719
741
  display: flex;
720
742
  flex-direction: row;
@@ -725,10 +747,12 @@
725
747
  border-radius: 2px;
726
748
  color: #001529;
727
749
  flex-wrap: wrap;
750
+
728
751
  .subScore {
729
752
  display: flex;
730
753
  min-width: 100px;
731
754
  padding-top: 3.5px;
755
+
732
756
  p {
733
757
  margin: 0;
734
758
  margin-bottom: 4px;
@@ -752,10 +776,12 @@
752
776
  }
753
777
  }
754
778
  }
779
+
755
780
  .risk-name {
756
781
  color: #001529;
757
782
  font-style: italic;
758
783
  }
784
+
759
785
  .i-imageUpload {
760
786
  margin-top: 22px;
761
787
  }
@@ -908,9 +934,11 @@
908
934
  line-height: 20px !important;
909
935
  color: #001529;
910
936
  }
937
+
911
938
  .ant-page-header {
912
939
  .ant-space {
913
940
  width: 100%;
941
+
914
942
  .ant-space-item {
915
943
  width: 100%;
916
944
  }
@@ -1238,6 +1266,10 @@
1238
1266
  min-height: 100%;
1239
1267
  margin: auto;
1240
1268
 
1269
+ &.full-width-form {
1270
+ max-width: unset;
1271
+ }
1272
+
1241
1273
  .ant-input-number-group-wrapper {
1242
1274
  width: 100%;
1243
1275
  }
@@ -1258,13 +1290,13 @@
1258
1290
  .ant-form-item-label label {
1259
1291
  width: 100%;
1260
1292
 
1261
- & > span {
1293
+ &>span {
1262
1294
  display: flex;
1263
1295
  justify-content: space-between;
1264
1296
  width: 100%;
1265
1297
 
1266
- & > span {
1267
- & > button {
1298
+ &>span {
1299
+ &>button {
1268
1300
  line-height: 1;
1269
1301
  height: inherit;
1270
1302
  font-size: 14px;
@@ -1274,7 +1306,7 @@
1274
1306
  }
1275
1307
  }
1276
1308
 
1277
- &.i-radioGroup > .ant-form-item-label > label > span {
1309
+ &.i-radioGroup>.ant-form-item-label>label>span {
1278
1310
  font-style: normal;
1279
1311
  font-weight: bold;
1280
1312
  font-size: 18px;
@@ -1353,20 +1385,25 @@
1353
1385
  width: 100%;
1354
1386
  display: flex;
1355
1387
  flex-direction: column;
1388
+
1356
1389
  .ant-transfer-list {
1357
1390
  height: 300px;
1391
+
1358
1392
  .ant-transfer-list-body {
1359
1393
  overflow-y: auto;
1394
+
1360
1395
  .ant-transfer-list-body-customize-wrapper {
1361
1396
  padding: 0;
1362
1397
  }
1363
1398
  }
1399
+
1364
1400
  .ant-transfer-list-header {
1365
1401
  .ant-transfer-list-header-selected {
1366
1402
  display: flex;
1367
1403
  flex-direction: row-reverse;
1368
1404
  width: 100%;
1369
1405
  justify-content: space-between;
1406
+
1370
1407
  .ant-transfer-list-header-title {
1371
1408
  position: inherit;
1372
1409
  font-size: var(--font-size-lg);
@@ -1376,13 +1413,16 @@
1376
1413
  }
1377
1414
  }
1378
1415
  }
1416
+
1379
1417
  .ant-transfer-operation {
1380
1418
  display: flex;
1381
1419
  justify-content: space-around;
1382
1420
  width: 100px;
1383
1421
  margin: 10px;
1422
+
1384
1423
  button {
1385
1424
  transform: rotate(90deg);
1425
+
1386
1426
  .anticon {
1387
1427
  position: absolute;
1388
1428
  top: 4px;
@@ -1410,6 +1450,7 @@
1410
1450
  display: none;
1411
1451
  }
1412
1452
  }
1453
+
1413
1454
  .ant-form-item-control-input {
1414
1455
  max-width: 100%;
1415
1456
  }
@@ -1456,7 +1497,7 @@
1456
1497
  flex: 1;
1457
1498
  }
1458
1499
 
1459
- .i-transfer > .ant-form-item-label > label {
1500
+ .i-transfer>.ant-form-item-label>label {
1460
1501
  padding: 14px 0;
1461
1502
  }
1462
1503
 
@@ -1499,7 +1540,7 @@
1499
1540
  }
1500
1541
 
1501
1542
  .i-modal {
1502
- & > .ant-col.ant-form-item-label label {
1543
+ &>.ant-col.ant-form-item-label label {
1503
1544
  margin-top: 1.5rem !important;
1504
1545
  font-size: 18px;
1505
1546
  font-weight: 700;
@@ -1507,7 +1548,7 @@
1507
1548
  line-height: 22px;
1508
1549
  color: #001529;
1509
1550
 
1510
- span > span {
1551
+ span>span {
1511
1552
  font-size: 18px;
1512
1553
  font-weight: 700;
1513
1554
  font-style: normal;
@@ -1563,6 +1604,7 @@
1563
1604
  .ajax-modal-view {
1564
1605
  padding-top: 0px;
1565
1606
  }
1607
+
1566
1608
  .total-inputs-1 {
1567
1609
  .ajax-modal-view {
1568
1610
  .remove-button-row {
@@ -1827,16 +1869,20 @@
1827
1869
  display: flex;
1828
1870
  flex-direction: column;
1829
1871
  width: 100%;
1872
+
1830
1873
  .ant-space-item:nth-of-type(3n) {
1831
1874
  flex-grow: initial;
1832
1875
  }
1876
+
1833
1877
  .ant-space-item:not(:last-of-type) {
1834
1878
  width: calc(50% - 4px);
1835
1879
  }
1880
+
1836
1881
  .ant-space {
1837
1882
  margin-top: 8px;
1838
1883
  }
1839
1884
  }
1885
+
1840
1886
  .risk-plan {
1841
1887
  padding: var(--size-lg);
1842
1888
  border-radius: 4px;
@@ -1908,11 +1954,11 @@
1908
1954
  }
1909
1955
 
1910
1956
  .ant-upload-list {
1911
- width: var(--static-width, 614px) !important;
1957
+ width: var(--static-width, 614px) !important;
1912
1958
  }
1913
1959
 
1914
1960
  .ant-select-selector {
1915
- width: var(--static-width) !important;
1961
+ width: var(--static-width) !important;
1916
1962
  }
1917
1963
 
1918
1964
  .ant-upload-list-item-container {
@@ -2082,4 +2128,4 @@
2082
2128
  flex: 1;
2083
2129
  }
2084
2130
  }
2085
- }
2131
+ }
@@ -54,6 +54,7 @@ export const EditForm = ({
54
54
  changeErrors = () => {},
55
55
  evaluationConfig = [],
56
56
  staticWidth = "614px",
57
+ fullWidth = false,
57
58
  }) => {
58
59
  const [isSubmitting] = useState(false);
59
60
  const formData = JSON.parse(JSON.stringify(convertUndefinedToNull(data) || {}));
@@ -342,8 +343,8 @@ export const EditForm = ({
342
343
  key={id}
343
344
  name={id}
344
345
  layout="vertical"
345
- style={{ maxWidth: 700 }}
346
- className={`main-form${formClass ? ` ${formClass}` : ""}`}
346
+ style={{ maxWidth: fullWidth ? "unset" : 700 }}
347
+ className={`main-form${formClass ? ` ${formClass}` : ""} `}
347
348
  onValuesChange={(_changedValue, _allValues) => {
348
349
  const changedValue = { ..._changedValue };
349
350
  const allValues = { ..._allValues };
@@ -0,0 +1,23 @@
1
+ import React from 'react'
2
+ import { Tooltip } from 'antd'
3
+ import PropTypes from 'prop-types'
4
+
5
+ const CountryFlag = ({ countryName, code, hasTooltip = true }) => {
6
+ return (
7
+ <Tooltip title={countryName} visible={hasTooltip || !countryName}>
8
+ <img
9
+ alt={code}
10
+ style={{ width: 24, borderRadius: 100, height: 24 }}
11
+ src={`https://flagcdn.com/w80/${code.toLowerCase()}.png`}
12
+ />
13
+ </Tooltip>
14
+ )
15
+ }
16
+
17
+ CountryFlag.propTypes = {
18
+ countryName: PropTypes.string.isRequired,
19
+ code: PropTypes.string.isRequired,
20
+ hasTooltip: PropTypes.bool,
21
+ }
22
+
23
+ export default CountryFlag
@@ -35,6 +35,7 @@ const ViewForm = ({ evalConfig }) => {
35
35
  user={{ language: "en" }}
36
36
  getApiBaseUrl={storyData.getApiBaseUrl}
37
37
  evaluationConfig={evalConfig}
38
+ fullWidth={true}
38
39
  />
39
40
  );
40
41
  };