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