@undp/carbon-library 1.0.134-CARBON-332.1 → 1.0.134-CARBON-332.2

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -18136,7 +18136,7 @@ var Social = function (props) {
18136
18136
  };
18137
18137
 
18138
18138
  var SocialEnvironmentalRisk = function (props) {
18139
- var onFormSubmit = props.onFormSubmit, translator = props.translator;
18139
+ var onFormSubmit = props.onFormSubmit, SocialEnvironmentalRiskData = props.SocialEnvironmentalRiskData, viewOnly = props.viewOnly, translator = props.translator;
18140
18140
  translator.setDefaultNamespace("socialEnvironmentalRisk");
18141
18141
  var t = translator.t;
18142
18142
  var form = antd.Form.useForm()[0];
@@ -18144,345 +18144,391 @@ var SocialEnvironmentalRisk = function (props) {
18144
18144
  React.useEffect(function () {
18145
18145
  onFormSubmit(socialEnvironmentalFormDetails);
18146
18146
  }, [socialEnvironmentalFormDetails]);
18147
+ React.useEffect(function () {
18148
+ if (SocialEnvironmentalRiskData && !viewOnly) {
18149
+ setSocialEnvironmentalFormDetails(SocialEnvironmentalRiskData);
18150
+ form.setFieldsValue(SocialEnvironmentalRiskData);
18151
+ }
18152
+ else if (SocialEnvironmentalRiskData && viewOnly) {
18153
+ checkHeaderAvailability();
18154
+ }
18155
+ }, [SocialEnvironmentalRiskData]);
18156
+ var checkHeaderAvailability = function () {
18157
+ SocialEnvironmentalDetails.forEach(function (section) {
18158
+ section.isTitleVisible = false;
18159
+ section.forEach(function (subSection) {
18160
+ subSection.isTitleVisible = false;
18161
+ subSection.forEach(function (element) {
18162
+ if (SocialEnvironmentalRiskData.hasOwnProperty(element === null || element === void 0 ? void 0 : element.name)) {
18163
+ subSection.isTitleVisible = true;
18164
+ }
18165
+ });
18166
+ if (subSection.isTitleVisible) {
18167
+ section.isTitleVisible = true;
18168
+ }
18169
+ });
18170
+ });
18171
+ };
18147
18172
  var SocialEnvironmentalDetails = [
18148
18173
  {
18149
- subHeader: t("humanRightsSubHeader"),
18150
- title: t("humanRights"),
18151
- subItems: [
18152
- {
18153
- label: t("humanRightsQ1"),
18154
- name: "humanRightsQ1",
18155
- },
18156
- {
18157
- label: t("humanRightsQ2"),
18158
- name: "humanRightsQ2",
18159
- },
18160
- {
18161
- label: t("humanRightsQ3"),
18162
- name: "humanRightsQ3",
18163
- },
18164
- {
18165
- label: t("humanRightsQ4"),
18166
- name: "humanRightsQ4",
18167
- },
18168
- {
18169
- label: t("humanRightsQ5"),
18170
- name: "humanRightsQ5",
18171
- },
18172
- {
18173
- label: t("humanRightsQ6"),
18174
- name: "humanRightsQ6",
18175
- },
18176
- {
18177
- label: t("humanRightsQ7"),
18178
- name: "humanRightsQ7",
18179
- },
18180
- ],
18181
- },
18182
- {
18183
- title: t("genderEqalityWomenEmpower"),
18184
- subItems: [
18185
- {
18186
- label: t("genderEqalityWomenEmpowerQ1"),
18187
- name: "genderEqalityWomenEmpowerQ1",
18188
- },
18189
- {
18190
- label: t("genderEqalityWomenEmpowerQ2"),
18191
- name: "genderEqalityWomenEmpowerQ2",
18192
- },
18193
- {
18194
- label: t("genderEqalityWomenEmpowerQ3"),
18195
- name: "genderEqalityWomenEmpowerQ3",
18196
- },
18197
- {
18198
- label: t("genderEqalityWomenEmpowerQ4"),
18199
- name: "genderEqalityWomenEmpowerQ4",
18200
- },
18201
- {
18202
- label: t("genderEqalityWomenEmpowerQ5"),
18203
- name: "genderEqalityWomenEmpowerQ5",
18204
- },
18205
- ],
18206
- },
18207
- {
18208
- title: t("accountability"),
18209
- subItems: [
18210
- {
18211
- label: t("accountabilityQ1"),
18212
- name: "accountabilityQ1",
18213
- },
18214
- {
18215
- label: t("accountabilityQ2"),
18216
- name: "AccountabilityQ2",
18217
- },
18218
- {
18219
- label: t("accountabilityQ3"),
18220
- name: "accountabilityQ3",
18221
- },
18222
- ],
18223
- },
18224
- {
18225
- subHeader: t("standard1SubHeader"),
18226
- title: t("standard1"),
18227
- subItems: [
18228
- {
18229
- label: t("standard1Q1"),
18230
- name: "standard1Q1",
18231
- },
18232
- {
18233
- label: t("standard1Q2"),
18234
- name: "standard1Q2",
18235
- },
18236
- {
18237
- label: t("standard1Q3"),
18238
- name: "standard1Q3",
18239
- },
18240
- {
18241
- label: t("standard1Q4"),
18242
- name: "standard1Q4",
18243
- },
18244
- {
18245
- label: t("standard1Q5"),
18246
- name: "standard1Q5",
18247
- },
18248
- {
18249
- label: t("standard1Q6"),
18250
- name: "standard1Q6",
18251
- },
18252
- {
18253
- label: t("standard1Q7"),
18254
- name: "standard1Q7",
18255
- },
18256
- {
18257
- label: t("standard1Q8"),
18258
- name: "standard1Q8",
18259
- },
18260
- {
18261
- label: t("standard1Q9"),
18262
- name: "standard1Q9",
18263
- },
18264
- {
18265
- label: t("standard1Q10"),
18266
- name: "standard1Q10",
18267
- },
18268
- {
18269
- label: t("standard1Q11"),
18270
- name: "standard1Q11",
18271
- },
18272
- {
18273
- label: t("standard1Q12"),
18274
- name: "standard1Q12",
18275
- },
18276
- {
18277
- label: t("standard1Q13"),
18278
- name: "standard1Q13",
18279
- },
18280
- {
18281
- label: t("standard1Q14"),
18282
- name: "standard1Q14",
18283
- },
18284
- ],
18285
- },
18286
- {
18287
- title: t("standard2"),
18174
+ title: t("humanRightsSubHeader"),
18175
+ isTitleVisible: true,
18288
18176
  subItems: [
18289
18177
  {
18290
- label: t("standard2Q1"),
18291
- name: "standard2Q1",
18292
- },
18293
- {
18294
- label: t("standard2Q2"),
18295
- name: "standard2Q2",
18296
- },
18297
- {
18298
- label: t("standard2Q3"),
18299
- name: "standard2Q3",
18300
- },
18301
- {
18302
- label: t("standard2Q4"),
18303
- name: "standard2Q4",
18304
- },
18305
- ],
18306
- },
18307
- {
18308
- title: t("standard3"),
18309
- subItems: [
18310
- {
18311
- label: t("standard3Q1"),
18312
- name: "standard3Q1",
18313
- },
18314
- {
18315
- label: t("standard3Q2"),
18316
- name: "standard3Q2",
18317
- },
18318
- {
18319
- label: t("standard3Q3"),
18320
- name: "standard3Q3",
18321
- },
18322
- {
18323
- label: t("standard3Q4"),
18324
- name: "standard3Q4",
18325
- },
18326
- {
18327
- label: t("standard3Q5"),
18328
- name: "standard3Q5",
18329
- },
18330
- {
18331
- label: t("standard3Q6"),
18332
- name: "standard3Q6",
18333
- },
18334
- {
18335
- label: t("standard3Q7"),
18336
- name: "standard3Q7",
18337
- },
18338
- {
18339
- label: t("standard3Q8"),
18340
- name: "standard3Q8",
18341
- },
18342
- ],
18343
- },
18344
- {
18345
- title: t("standard4"),
18346
- subItems: [
18347
- {
18348
- label: t("standard4Q1"),
18349
- name: "standard4Q1",
18350
- },
18351
- {
18352
- label: t("standard4Q2"),
18353
- name: "standard4Q2",
18354
- },
18355
- {
18356
- label: t("standard4Q3"),
18357
- name: "standard4Q3",
18358
- },
18359
- {
18360
- label: t("standard4Q4"),
18361
- name: "standard4Q4",
18362
- },
18363
- {
18364
- label: t("standard4Q5"),
18365
- name: "standard4Q5",
18366
- },
18367
- ],
18368
- },
18369
- {
18370
- title: t("standard5"),
18371
- subItems: [
18372
- {
18373
- label: t("standard5Q1"),
18374
- name: "standard5Q1",
18375
- },
18376
- {
18377
- label: t("standard5Q2"),
18378
- name: "standard5Q2",
18379
- },
18380
- {
18381
- label: t("standard5Q3"),
18382
- name: "standard5Q3",
18383
- },
18384
- {
18385
- label: t("standard5Q4"),
18386
- name: "standard5Q4",
18387
- },
18388
- ],
18389
- },
18390
- {
18391
- title: t("standard6"),
18392
- subItems: [
18393
- {
18394
- label: t("standard6Q1"),
18395
- name: "standard6Q1",
18396
- },
18397
- {
18398
- label: t("standard6Q2"),
18399
- name: "standard6Q2",
18400
- },
18401
- {
18402
- label: t("standard6Q3"),
18403
- name: "standard6Q3",
18404
- },
18405
- {
18406
- label: t("standard6Q4"),
18407
- name: "standard6Q4",
18408
- },
18409
- {
18410
- label: t("standard6Q5"),
18411
- name: "standard6Q5",
18412
- },
18413
- {
18414
- label: t("standard6Q6"),
18415
- name: "standard6Q6",
18416
- },
18417
- {
18418
- label: t("standard6Q7"),
18419
- name: "standard6Q7",
18178
+ title: t("humanRights"),
18179
+ isTitleVisible: true,
18180
+ subItems: [
18181
+ {
18182
+ label: t("humanRightsQ1"),
18183
+ name: "humanRightsQ1",
18184
+ },
18185
+ {
18186
+ label: t("humanRightsQ2"),
18187
+ name: "humanRightsQ2",
18188
+ },
18189
+ {
18190
+ label: t("humanRightsQ3"),
18191
+ name: "humanRightsQ3",
18192
+ },
18193
+ {
18194
+ label: t("humanRightsQ4"),
18195
+ name: "humanRightsQ4",
18196
+ },
18197
+ {
18198
+ label: t("humanRightsQ5"),
18199
+ name: "humanRightsQ5",
18200
+ },
18201
+ {
18202
+ label: t("humanRightsQ6"),
18203
+ name: "humanRightsQ6",
18204
+ },
18205
+ {
18206
+ label: t("humanRightsQ7"),
18207
+ name: "humanRightsQ7",
18208
+ },
18209
+ ],
18420
18210
  },
18421
18211
  {
18422
- label: t("standard6Q8"),
18423
- name: "standard6Q8",
18212
+ title: t("genderEqalityWomenEmpower"),
18213
+ isTitleVisible: true,
18214
+ subItems: [
18215
+ {
18216
+ label: t("genderEqalityWomenEmpowerQ1"),
18217
+ name: "genderEqalityWomenEmpowerQ1",
18218
+ },
18219
+ {
18220
+ label: t("genderEqalityWomenEmpowerQ2"),
18221
+ name: "genderEqalityWomenEmpowerQ2",
18222
+ },
18223
+ {
18224
+ label: t("genderEqalityWomenEmpowerQ3"),
18225
+ name: "genderEqalityWomenEmpowerQ3",
18226
+ },
18227
+ {
18228
+ label: t("genderEqalityWomenEmpowerQ4"),
18229
+ name: "genderEqalityWomenEmpowerQ4",
18230
+ },
18231
+ {
18232
+ label: t("genderEqalityWomenEmpowerQ5"),
18233
+ name: "genderEqalityWomenEmpowerQ5",
18234
+ },
18235
+ ],
18424
18236
  },
18425
18237
  {
18426
- label: t("standard6Q9"),
18427
- name: "standard6Q9",
18238
+ title: t("accountability"),
18239
+ isTitleVisible: true,
18240
+ subItems: [
18241
+ {
18242
+ label: t("accountabilityQ1"),
18243
+ name: "accountabilityQ1",
18244
+ },
18245
+ {
18246
+ label: t("accountabilityQ2"),
18247
+ name: "AccountabilityQ2",
18248
+ },
18249
+ {
18250
+ label: t("accountabilityQ3"),
18251
+ name: "accountabilityQ3",
18252
+ },
18253
+ ],
18428
18254
  },
18429
18255
  ],
18430
18256
  },
18431
18257
  {
18432
- title: t("standard7"),
18258
+ title: t("standardSubHeader"),
18259
+ isTitleVisible: true,
18433
18260
  subItems: [
18434
18261
  {
18435
- label: t("standard7Q1"),
18436
- name: "standard7Q1",
18437
- },
18438
- {
18439
- label: t("standard7Q2"),
18440
- name: "standard7Q2",
18441
- },
18442
- {
18443
- label: t("standard7Q3"),
18444
- name: "standard7Q3",
18445
- },
18446
- {
18447
- label: t("standard7Q4"),
18448
- name: "standard7Q4",
18449
- },
18450
- {
18451
- label: t("standard7Q5"),
18452
- name: "standard7Q5",
18262
+ title: t("standard1"),
18263
+ isTitleVisible: true,
18264
+ subItems: [
18265
+ {
18266
+ label: t("standard1Q1"),
18267
+ name: "standard1Q1",
18268
+ },
18269
+ {
18270
+ label: t("standard1Q2"),
18271
+ name: "standard1Q2",
18272
+ },
18273
+ {
18274
+ label: t("standard1Q3"),
18275
+ name: "standard1Q3",
18276
+ },
18277
+ {
18278
+ label: t("standard1Q4"),
18279
+ name: "standard1Q4",
18280
+ },
18281
+ {
18282
+ label: t("standard1Q5"),
18283
+ name: "standard1Q5",
18284
+ },
18285
+ {
18286
+ label: t("standard1Q6"),
18287
+ name: "standard1Q6",
18288
+ },
18289
+ {
18290
+ label: t("standard1Q7"),
18291
+ name: "standard1Q7",
18292
+ },
18293
+ {
18294
+ label: t("standard1Q8"),
18295
+ name: "standard1Q8",
18296
+ },
18297
+ {
18298
+ label: t("standard1Q9"),
18299
+ name: "standard1Q9",
18300
+ },
18301
+ {
18302
+ label: t("standard1Q10"),
18303
+ name: "standard1Q10",
18304
+ },
18305
+ {
18306
+ label: t("standard1Q11"),
18307
+ name: "standard1Q11",
18308
+ },
18309
+ {
18310
+ label: t("standard1Q12"),
18311
+ name: "standard1Q12",
18312
+ },
18313
+ {
18314
+ label: t("standard1Q13"),
18315
+ name: "standard1Q13",
18316
+ },
18317
+ {
18318
+ label: t("standard1Q14"),
18319
+ name: "standard1Q14",
18320
+ },
18321
+ ],
18453
18322
  },
18454
18323
  {
18455
- label: t("standard7Q6"),
18456
- name: "standard7Q6",
18324
+ title: t("standard2"),
18325
+ isTitleVisible: true,
18326
+ subItems: [
18327
+ {
18328
+ label: t("standard2Q1"),
18329
+ name: "standard2Q1",
18330
+ },
18331
+ {
18332
+ label: t("standard2Q2"),
18333
+ name: "standard2Q2",
18334
+ },
18335
+ {
18336
+ label: t("standard2Q3"),
18337
+ name: "standard2Q3",
18338
+ },
18339
+ {
18340
+ label: t("standard2Q4"),
18341
+ name: "standard2Q4",
18342
+ },
18343
+ ],
18457
18344
  },
18458
- ],
18459
- },
18460
- {
18461
- title: t("standard8"),
18462
- subItems: [
18463
18345
  {
18464
- label: t("standard8Q1"),
18465
- name: "standard8Q1",
18346
+ title: t("standard3"),
18347
+ isTitleVisible: true,
18348
+ subItems: [
18349
+ {
18350
+ label: t("standard3Q1"),
18351
+ name: "standard3Q1",
18352
+ },
18353
+ {
18354
+ label: t("standard3Q2"),
18355
+ name: "standard3Q2",
18356
+ },
18357
+ {
18358
+ label: t("standard3Q3"),
18359
+ name: "standard3Q3",
18360
+ },
18361
+ {
18362
+ label: t("standard3Q4"),
18363
+ name: "standard3Q4",
18364
+ },
18365
+ {
18366
+ label: t("standard3Q5"),
18367
+ name: "standard3Q5",
18368
+ },
18369
+ {
18370
+ label: t("standard3Q6"),
18371
+ name: "standard3Q6",
18372
+ },
18373
+ {
18374
+ label: t("standard3Q7"),
18375
+ name: "standard3Q7",
18376
+ },
18377
+ {
18378
+ label: t("standard3Q8"),
18379
+ name: "standard3Q8",
18380
+ },
18381
+ ],
18466
18382
  },
18467
18383
  {
18468
- label: t("standard8Q2"),
18469
- name: "standard8Q2",
18384
+ title: t("standard4"),
18385
+ isTitleVisible: true,
18386
+ subItems: [
18387
+ {
18388
+ label: t("standard4Q1"),
18389
+ name: "standard4Q1",
18390
+ },
18391
+ {
18392
+ label: t("standard4Q2"),
18393
+ name: "standard4Q2",
18394
+ },
18395
+ {
18396
+ label: t("standard4Q3"),
18397
+ name: "standard4Q3",
18398
+ },
18399
+ {
18400
+ label: t("standard4Q4"),
18401
+ name: "standard4Q4",
18402
+ },
18403
+ {
18404
+ label: t("standard4Q5"),
18405
+ name: "standard4Q5",
18406
+ },
18407
+ ],
18470
18408
  },
18471
18409
  {
18472
- label: t("standard8Q3"),
18473
- name: "standard8Q3",
18410
+ title: t("standard5"),
18411
+ isTitleVisible: true,
18412
+ subItems: [
18413
+ {
18414
+ label: t("standard5Q1"),
18415
+ name: "standard5Q1",
18416
+ },
18417
+ {
18418
+ label: t("standard5Q2"),
18419
+ name: "standard5Q2",
18420
+ },
18421
+ {
18422
+ label: t("standard5Q3"),
18423
+ name: "standard5Q3",
18424
+ },
18425
+ {
18426
+ label: t("standard5Q4"),
18427
+ name: "standard5Q4",
18428
+ },
18429
+ ],
18474
18430
  },
18475
18431
  {
18476
- label: t("standard8Q4"),
18477
- name: "standard8Q4",
18432
+ title: t("standard6"),
18433
+ isTitleVisible: true,
18434
+ subItems: [
18435
+ {
18436
+ label: t("standard6Q1"),
18437
+ name: "standard6Q1",
18438
+ },
18439
+ {
18440
+ label: t("standard6Q2"),
18441
+ name: "standard6Q2",
18442
+ },
18443
+ {
18444
+ label: t("standard6Q3"),
18445
+ name: "standard6Q3",
18446
+ },
18447
+ {
18448
+ label: t("standard6Q4"),
18449
+ name: "standard6Q4",
18450
+ },
18451
+ {
18452
+ label: t("standard6Q5"),
18453
+ name: "standard6Q5",
18454
+ },
18455
+ {
18456
+ label: t("standard6Q6"),
18457
+ name: "standard6Q6",
18458
+ },
18459
+ {
18460
+ label: t("standard6Q7"),
18461
+ name: "standard6Q7",
18462
+ },
18463
+ {
18464
+ label: t("standard6Q8"),
18465
+ name: "standard6Q8",
18466
+ },
18467
+ {
18468
+ label: t("standard6Q9"),
18469
+ name: "standard6Q9",
18470
+ },
18471
+ ],
18478
18472
  },
18479
18473
  {
18480
- label: t("standard8Q5"),
18481
- name: "standard8Q5",
18474
+ title: t("standard7"),
18475
+ isTitleVisible: true,
18476
+ subItems: [
18477
+ {
18478
+ label: t("standard7Q1"),
18479
+ name: "standard7Q1",
18480
+ },
18481
+ {
18482
+ label: t("standard7Q2"),
18483
+ name: "standard7Q2",
18484
+ },
18485
+ {
18486
+ label: t("standard7Q3"),
18487
+ name: "standard7Q3",
18488
+ },
18489
+ {
18490
+ label: t("standard7Q4"),
18491
+ name: "standard7Q4",
18492
+ },
18493
+ {
18494
+ label: t("standard7Q5"),
18495
+ name: "standard7Q5",
18496
+ },
18497
+ {
18498
+ label: t("standard7Q6"),
18499
+ name: "standard7Q6",
18500
+ },
18501
+ ],
18482
18502
  },
18483
18503
  {
18484
- label: t("standard8Q6"),
18485
- name: "standard8Q6",
18504
+ title: t("standard8"),
18505
+ isTitleVisible: true,
18506
+ subItems: [
18507
+ {
18508
+ label: t("standard8Q1"),
18509
+ name: "standard8Q1",
18510
+ },
18511
+ {
18512
+ label: t("standard8Q2"),
18513
+ name: "standard8Q2",
18514
+ },
18515
+ {
18516
+ label: t("standard8Q3"),
18517
+ name: "standard8Q3",
18518
+ },
18519
+ {
18520
+ label: t("standard8Q4"),
18521
+ name: "standard8Q4",
18522
+ },
18523
+ {
18524
+ label: t("standard8Q5"),
18525
+ name: "standard8Q5",
18526
+ },
18527
+ {
18528
+ label: t("standard8Q6"),
18529
+ name: "standard8Q6",
18530
+ },
18531
+ ],
18486
18532
  },
18487
18533
  ],
18488
18534
  },
@@ -18494,21 +18540,45 @@ var SocialEnvironmentalRisk = function (props) {
18494
18540
  });
18495
18541
  }); };
18496
18542
  return (React.createElement("div", { className: "social-environment-tab-item" },
18497
- React.createElement(antd.Form, { name: "SocialEnvironmentalDetails", labelWrap: true, form: form, labelAlign: "left", labelCol: { md: 16, lg: 18, xl: 18 }, wrapperCol: { md: 8, lg: 6, xl: 6 }, layout: "horizontal", onValuesChange: SocialEnvironmentalDetailsChanged }, SocialEnvironmentalDetails.map(function (section) {
18498
- return (React.createElement(React.Fragment, null,
18499
- section.subHeader && (React.createElement("div", { style: { marginBottom: "15px" } },
18500
- React.createElement("label", { className: "co-sub-header-text" }, section.subHeader))),
18501
- React.createElement("div", { style: { marginBottom: "15px" } },
18502
- React.createElement("label", { className: "co-sub-title-text" }, section.title)),
18503
- section.subItems.map(function (element) {
18504
- return (React.createElement(antd.Form.Item, { className: "mg-left-2", label: element.label, name: element.name },
18505
- React.createElement(antd.Radio.Group, { size: "middle" },
18506
- React.createElement("div", { className: "radio-container" },
18507
- React.createElement(antd.Radio.Button, { className: "radio", value: exports.RadioButtonStatus.YES }, t("yes"))),
18508
- React.createElement("div", { className: "radio-container" },
18509
- React.createElement(antd.Radio.Button, { className: "radio", value: exports.RadioButtonStatus.NO }, t("no"))))));
18510
- })));
18511
- }))));
18543
+ viewOnly && !SocialEnvironmentalRiskData && (React.createElement(antd.Empty, { image: antd.Empty.PRESENTED_IMAGE_SIMPLE })),
18544
+ ((viewOnly && SocialEnvironmentalRiskData) || !viewOnly) && (React.createElement(antd.Form, { name: "SocialEnvironmentalDetails", labelWrap: true, form: form, labelAlign: "left", labelCol: { md: 16, lg: 18, xl: 18 }, wrapperCol: { md: 8, lg: 6, xl: 6 }, layout: "horizontal", onValuesChange: SocialEnvironmentalDetailsChanged },
18545
+ !viewOnly &&
18546
+ SocialEnvironmentalDetails.map(function (section) {
18547
+ return (React.createElement(React.Fragment, null,
18548
+ React.createElement("div", { style: { marginBottom: "15px" } },
18549
+ React.createElement("label", { className: "co-sub-header-text" }, section.title)),
18550
+ section.subItems.map(function (subSection) {
18551
+ return (React.createElement(React.Fragment, null,
18552
+ React.createElement("div", { style: { marginBottom: "15px" } },
18553
+ React.createElement("label", { className: "co-sub-title-text" }, subSection.title)),
18554
+ subSection.subItems.map(function (element) {
18555
+ return (React.createElement(antd.Form.Item, { className: "mg-left-2", label: element.label, name: element.name },
18556
+ React.createElement(antd.Radio.Group, { size: "middle" },
18557
+ React.createElement("div", { className: "radio-container" },
18558
+ React.createElement(antd.Radio.Button, { className: "radio", value: exports.RadioButtonStatus.YES }, t("yes"))),
18559
+ React.createElement("div", { className: "radio-container" },
18560
+ React.createElement(antd.Radio.Button, { className: "radio", value: exports.RadioButtonStatus.NO }, t("no"))))));
18561
+ })));
18562
+ })));
18563
+ }),
18564
+ viewOnly &&
18565
+ SocialEnvironmentalRiskData &&
18566
+ SocialEnvironmentalDetails.map(function (section) {
18567
+ return (React.createElement(React.Fragment, null,
18568
+ section.isTitleVisible && (React.createElement("div", { style: { marginBottom: "15px" } },
18569
+ React.createElement("label", { className: "co-sub-header-text" }, section.title))),
18570
+ section.subItems.map(function (subSection) {
18571
+ return (React.createElement(React.Fragment, null,
18572
+ subSection.isTitleVisible && (React.createElement("div", { style: { marginBottom: "15px" } },
18573
+ React.createElement("label", { className: "co-sub-title-text" }, subSection.title))),
18574
+ subSection.subItems.map(function (element) {
18575
+ return (React.createElement(antd.Form.Item, { className: "mg-left-2", label: element.label, name: element.name },
18576
+ React.createElement(antd.Radio.Group, { size: "middle" },
18577
+ React.createElement("div", { className: "radio-container" },
18578
+ React.createElement(antd.Radio.Button, { className: "radio" }, SocialEnvironmentalRiskData[element.name])))));
18579
+ })));
18580
+ })));
18581
+ })))));
18512
18582
  };
18513
18583
 
18514
18584
  var CoBenifitsComponent = function (props) {
@@ -18598,7 +18668,8 @@ var CoBenifitsComponent = function (props) {
18598
18668
  {
18599
18669
  label: t("coBenifits:socialEnvironmentalRisk"),
18600
18670
  key: "8",
18601
- children: (React.createElement(SocialEnvironmentalRisk, { onFormSubmit: onSocialEnvironmentalFormSubmit, translator: translator })),
18671
+ children: (React.createElement(SocialEnvironmentalRisk, { onFormSubmit: onSocialEnvironmentalFormSubmit, SocialEnvironmentalRiskData: (viewOnly && (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.socialEnvironmentDetails)) ||
18672
+ (!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.socialEnvironmentDetails)), viewOnly: viewOnly || false, translator: translator })),
18602
18673
  },
18603
18674
  ];
18604
18675
  var onCoBenefitSubmit = function () {