@backstage/plugin-scaffolder 1.9.0-next.0 → 1.9.0-next.1

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.
@@ -298,30 +298,40 @@ const EntityPicker = (props) => {
298
298
  onChange(entityRefs[0]);
299
299
  }
300
300
  }, [entityRefs, onChange]);
301
- return /* @__PURE__ */ React.createElement(FormControl, {
302
- margin: "normal",
303
- required,
304
- error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !formData
305
- }, /* @__PURE__ */ React.createElement(Autocomplete, {
306
- disabled: (entityRefs == null ? void 0 : entityRefs.length) === 1,
307
- id: idSchema == null ? void 0 : idSchema.$id,
308
- value: formData || "",
309
- loading,
310
- onChange: onSelect,
311
- options: entityRefs || [],
312
- autoSelect: true,
313
- freeSolo: (_e = (_d = uiSchema["ui:options"]) == null ? void 0 : _d.allowArbitraryValues) != null ? _e : true,
314
- renderInput: (params) => /* @__PURE__ */ React.createElement(TextField, {
315
- ...params,
316
- label: title,
317
- margin: "dense",
318
- helperText: description,
319
- FormHelperTextProps: { margin: "dense", style: { marginLeft: 0 } },
320
- variant: "outlined",
301
+ return /* @__PURE__ */ React.createElement(
302
+ FormControl,
303
+ {
304
+ margin: "normal",
321
305
  required,
322
- InputProps: params.InputProps
323
- })
324
- }));
306
+ error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !formData
307
+ },
308
+ /* @__PURE__ */ React.createElement(
309
+ Autocomplete,
310
+ {
311
+ disabled: (entityRefs == null ? void 0 : entityRefs.length) === 1,
312
+ id: idSchema == null ? void 0 : idSchema.$id,
313
+ value: formData || "",
314
+ loading,
315
+ onChange: onSelect,
316
+ options: entityRefs || [],
317
+ autoSelect: true,
318
+ freeSolo: (_e = (_d = uiSchema["ui:options"]) == null ? void 0 : _d.allowArbitraryValues) != null ? _e : true,
319
+ renderInput: (params) => /* @__PURE__ */ React.createElement(
320
+ TextField,
321
+ {
322
+ ...params,
323
+ label: title,
324
+ margin: "dense",
325
+ helperText: description,
326
+ FormHelperTextProps: { margin: "dense", style: { marginLeft: 0 } },
327
+ variant: "outlined",
328
+ required,
329
+ InputProps: params.InputProps
330
+ }
331
+ )
332
+ }
333
+ )
334
+ );
325
335
  };
326
336
 
327
337
  const EntityNamePickerFieldSchema = makeFieldSchemaFromZod(z.string());
@@ -338,18 +348,21 @@ const EntityNamePicker = (props) => {
338
348
  idSchema,
339
349
  placeholder
340
350
  } = props;
341
- return /* @__PURE__ */ React.createElement(TextField, {
342
- id: idSchema == null ? void 0 : idSchema.$id,
343
- label: title,
344
- placeholder,
345
- helperText: description,
346
- required,
347
- value: formData != null ? formData : "",
348
- onChange: ({ target: { value } }) => onChange(value),
349
- margin: "normal",
350
- error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !formData,
351
- inputProps: { autoFocus }
352
- });
351
+ return /* @__PURE__ */ React.createElement(
352
+ TextField,
353
+ {
354
+ id: idSchema == null ? void 0 : idSchema.$id,
355
+ label: title,
356
+ placeholder,
357
+ helperText: description,
358
+ required,
359
+ value: formData != null ? formData : "",
360
+ onChange: ({ target: { value } }) => onChange(value),
361
+ margin: "normal",
362
+ error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !formData,
363
+ inputProps: { autoFocus }
364
+ }
365
+ );
353
366
  };
354
367
 
355
368
  const entityNamePickerValidation = (value, validation) => {
@@ -414,27 +427,31 @@ const EntityTagsPicker = (props) => {
414
427
  }
415
428
  };
416
429
  useEffectOnce(() => onChange(formData || []));
417
- return /* @__PURE__ */ React.createElement(FormControl$1, {
418
- margin: "normal"
419
- }, /* @__PURE__ */ React.createElement(Autocomplete$1, {
420
- multiple: true,
421
- freeSolo: true,
422
- filterSelectedOptions: true,
423
- onChange: setTags,
424
- value: formData || [],
425
- inputValue,
426
- loading,
427
- options: tagOptions,
428
- ChipProps: { size: "small" },
429
- renderOption: (option) => showCounts ? `${option} (${existingTags == null ? void 0 : existingTags[option]})` : option,
430
- renderInput: (params) => /* @__PURE__ */ React.createElement(TextField, {
431
- ...params,
432
- label: "Tags",
433
- onChange: (e) => setInputValue(e.target.value),
434
- error: inputError,
435
- helperText: helperText != null ? helperText : "Add any relevant tags, hit 'Enter' to add new tags. Valid format: [a-z0-9+#] separated by [-], at most 63 characters"
436
- })
437
- }));
430
+ return /* @__PURE__ */ React.createElement(FormControl$1, { margin: "normal" }, /* @__PURE__ */ React.createElement(
431
+ Autocomplete$1,
432
+ {
433
+ multiple: true,
434
+ freeSolo: true,
435
+ filterSelectedOptions: true,
436
+ onChange: setTags,
437
+ value: formData || [],
438
+ inputValue,
439
+ loading,
440
+ options: tagOptions,
441
+ ChipProps: { size: "small" },
442
+ renderOption: (option) => showCounts ? `${option} (${existingTags == null ? void 0 : existingTags[option]})` : option,
443
+ renderInput: (params) => /* @__PURE__ */ React.createElement(
444
+ TextField,
445
+ {
446
+ ...params,
447
+ label: "Tags",
448
+ onChange: (e) => setInputValue(e.target.value),
449
+ error: inputError,
450
+ helperText: helperText != null ? helperText : "Add any relevant tags, hit 'Enter' to add new tags. Valid format: [a-z0-9+#] separated by [-], at most 63 characters"
451
+ }
452
+ )
453
+ }
454
+ ));
438
455
  };
439
456
 
440
457
  const OwnerPickerFieldSchema = makeFieldSchemaFromZod(
@@ -471,61 +488,82 @@ const OwnerPicker = (props) => {
471
488
  ...defaultNamespace !== void 0 ? { defaultNamespace } : {}
472
489
  }
473
490
  };
474
- return /* @__PURE__ */ React.createElement(EntityPicker, {
475
- ...restProps,
476
- schema: { title, description },
477
- uiSchema: ownerUiSchema
478
- });
491
+ return /* @__PURE__ */ React.createElement(
492
+ EntityPicker,
493
+ {
494
+ ...restProps,
495
+ schema: { title, description },
496
+ uiSchema: ownerUiSchema
497
+ }
498
+ );
479
499
  };
480
500
 
481
501
  const GithubRepoPicker = (props) => {
482
502
  const { allowedOwners = [], rawErrors, state, onChange } = props;
483
503
  const ownerItems = allowedOwners ? allowedOwners.map((i) => ({ label: i, value: i })) : [{ label: "Loading...", value: "loading" }];
484
504
  const { owner } = state;
485
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(FormControl, {
486
- margin: "normal",
487
- required: true,
488
- error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !owner
489
- }, (allowedOwners == null ? void 0 : allowedOwners.length) ? /* @__PURE__ */ React.createElement(Select, {
490
- native: true,
491
- label: "Owner Available",
492
- onChange: (s) => onChange({ owner: String(Array.isArray(s) ? s[0] : s) }),
493
- disabled: allowedOwners.length === 1,
494
- selected: owner,
495
- items: ownerItems
496
- }) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, {
497
- htmlFor: "ownerInput"
498
- }, "Owner"), /* @__PURE__ */ React.createElement(Input, {
499
- id: "ownerInput",
500
- onChange: (e) => onChange({ owner: e.target.value }),
501
- value: owner
502
- })), /* @__PURE__ */ React.createElement(FormHelperText, null, "The organization, user or project that this repo will belong to")));
505
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
506
+ FormControl,
507
+ {
508
+ margin: "normal",
509
+ required: true,
510
+ error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !owner
511
+ },
512
+ (allowedOwners == null ? void 0 : allowedOwners.length) ? /* @__PURE__ */ React.createElement(
513
+ Select,
514
+ {
515
+ native: true,
516
+ label: "Owner Available",
517
+ onChange: (s) => onChange({ owner: String(Array.isArray(s) ? s[0] : s) }),
518
+ disabled: allowedOwners.length === 1,
519
+ selected: owner,
520
+ items: ownerItems
521
+ }
522
+ ) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "ownerInput" }, "Owner"), /* @__PURE__ */ React.createElement(
523
+ Input,
524
+ {
525
+ id: "ownerInput",
526
+ onChange: (e) => onChange({ owner: e.target.value }),
527
+ value: owner
528
+ }
529
+ )),
530
+ /* @__PURE__ */ React.createElement(FormHelperText, null, "The organization, user or project that this repo will belong to")
531
+ ));
503
532
  };
504
533
 
505
534
  const GitlabRepoPicker = (props) => {
506
535
  const { allowedOwners = [], state, onChange, rawErrors } = props;
507
536
  const ownerItems = allowedOwners ? allowedOwners.map((i) => ({ label: i, value: i })) : [{ label: "Loading...", value: "loading" }];
508
537
  const { owner } = state;
509
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(FormControl, {
510
- margin: "normal",
511
- required: true,
512
- error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !owner
513
- }, (allowedOwners == null ? void 0 : allowedOwners.length) ? /* @__PURE__ */ React.createElement(Select, {
514
- native: true,
515
- label: "Owner Available",
516
- onChange: (selected) => onChange({
517
- owner: String(Array.isArray(selected) ? selected[0] : selected)
518
- }),
519
- disabled: allowedOwners.length === 1,
520
- selected: owner,
521
- items: ownerItems
522
- }) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, {
523
- htmlFor: "ownerInput"
524
- }, "Owner"), /* @__PURE__ */ React.createElement(Input, {
525
- id: "ownerInput",
526
- onChange: (e) => onChange({ owner: e.target.value }),
527
- value: owner
528
- })), /* @__PURE__ */ React.createElement(FormHelperText, null, "GitLab namespace where this repository will belong to. It can be the name of organization, group, subgroup, user, or the project.")));
538
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
539
+ FormControl,
540
+ {
541
+ margin: "normal",
542
+ required: true,
543
+ error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !owner
544
+ },
545
+ (allowedOwners == null ? void 0 : allowedOwners.length) ? /* @__PURE__ */ React.createElement(
546
+ Select,
547
+ {
548
+ native: true,
549
+ label: "Owner Available",
550
+ onChange: (selected) => onChange({
551
+ owner: String(Array.isArray(selected) ? selected[0] : selected)
552
+ }),
553
+ disabled: allowedOwners.length === 1,
554
+ selected: owner,
555
+ items: ownerItems
556
+ }
557
+ ) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "ownerInput" }, "Owner"), /* @__PURE__ */ React.createElement(
558
+ Input,
559
+ {
560
+ id: "ownerInput",
561
+ onChange: (e) => onChange({ owner: e.target.value }),
562
+ value: owner
563
+ }
564
+ )),
565
+ /* @__PURE__ */ React.createElement(FormHelperText, null, "GitLab namespace where this repository will belong to. It can be the name of organization, group, subgroup, user, or the project.")
566
+ ));
529
567
  };
530
568
 
531
569
  const AzureRepoPicker = (props) => {
@@ -539,41 +577,59 @@ const AzureRepoPicker = (props) => {
539
577
  const organizationItems = allowedOrganizations ? allowedOrganizations.map((i) => ({ label: i, value: i })) : [{ label: "Loading...", value: "loading" }];
540
578
  const ownerItems = allowedOwners ? allowedOwners.map((i) => ({ label: i, value: i })) : [{ label: "Loading...", value: "loading" }];
541
579
  const { organization, owner } = state;
542
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(FormControl, {
543
- margin: "normal",
544
- required: true,
545
- error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !organization
546
- }, (allowedOrganizations == null ? void 0 : allowedOrganizations.length) ? /* @__PURE__ */ React.createElement(Select, {
547
- native: true,
548
- label: "Organization",
549
- onChange: (s) => onChange({ organization: String(Array.isArray(s) ? s[0] : s) }),
550
- disabled: allowedOrganizations.length === 1,
551
- selected: organization,
552
- items: organizationItems
553
- }) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, {
554
- htmlFor: "orgInput"
555
- }, "Organization"), /* @__PURE__ */ React.createElement(Input, {
556
- id: "orgInput",
557
- onChange: (e) => onChange({ organization: e.target.value }),
558
- value: organization
559
- })), /* @__PURE__ */ React.createElement(FormHelperText, null, "The Organization that this repo will belong to")), /* @__PURE__ */ React.createElement(FormControl, {
560
- margin: "normal",
561
- required: true,
562
- error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !owner
563
- }, (allowedOwners == null ? void 0 : allowedOwners.length) ? /* @__PURE__ */ React.createElement(Select, {
564
- native: true,
565
- label: "Owner",
566
- onChange: (s) => onChange({ owner: String(Array.isArray(s) ? s[0] : s) }),
567
- disabled: allowedOwners.length === 1,
568
- selected: owner,
569
- items: ownerItems
570
- }) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, {
571
- htmlFor: "ownerInput"
572
- }, "Project"), /* @__PURE__ */ React.createElement(Input, {
573
- id: "ownerInput",
574
- onChange: (e) => onChange({ owner: e.target.value }),
575
- value: owner
576
- })), /* @__PURE__ */ React.createElement(FormHelperText, null, "The Project that this repo will belong to")));
580
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
581
+ FormControl,
582
+ {
583
+ margin: "normal",
584
+ required: true,
585
+ error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !organization
586
+ },
587
+ (allowedOrganizations == null ? void 0 : allowedOrganizations.length) ? /* @__PURE__ */ React.createElement(
588
+ Select,
589
+ {
590
+ native: true,
591
+ label: "Organization",
592
+ onChange: (s) => onChange({ organization: String(Array.isArray(s) ? s[0] : s) }),
593
+ disabled: allowedOrganizations.length === 1,
594
+ selected: organization,
595
+ items: organizationItems
596
+ }
597
+ ) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "orgInput" }, "Organization"), /* @__PURE__ */ React.createElement(
598
+ Input,
599
+ {
600
+ id: "orgInput",
601
+ onChange: (e) => onChange({ organization: e.target.value }),
602
+ value: organization
603
+ }
604
+ )),
605
+ /* @__PURE__ */ React.createElement(FormHelperText, null, "The Organization that this repo will belong to")
606
+ ), /* @__PURE__ */ React.createElement(
607
+ FormControl,
608
+ {
609
+ margin: "normal",
610
+ required: true,
611
+ error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !owner
612
+ },
613
+ (allowedOwners == null ? void 0 : allowedOwners.length) ? /* @__PURE__ */ React.createElement(
614
+ Select,
615
+ {
616
+ native: true,
617
+ label: "Owner",
618
+ onChange: (s) => onChange({ owner: String(Array.isArray(s) ? s[0] : s) }),
619
+ disabled: allowedOwners.length === 1,
620
+ selected: owner,
621
+ items: ownerItems
622
+ }
623
+ ) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "ownerInput" }, "Project"), /* @__PURE__ */ React.createElement(
624
+ Input,
625
+ {
626
+ id: "ownerInput",
627
+ onChange: (e) => onChange({ owner: e.target.value }),
628
+ value: owner
629
+ }
630
+ )),
631
+ /* @__PURE__ */ React.createElement(FormHelperText, null, "The Project that this repo will belong to")
632
+ ));
577
633
  };
578
634
 
579
635
  const BitbucketRepoPicker = (props) => {
@@ -585,59 +641,80 @@ const BitbucketRepoPicker = (props) => {
585
641
  onChange({ workspace: allowedOwners[0] });
586
642
  }
587
643
  }, [allowedOwners, host, onChange]);
588
- return /* @__PURE__ */ React.createElement(React.Fragment, null, host === "bitbucket.org" && /* @__PURE__ */ React.createElement(FormControl, {
589
- margin: "normal",
590
- required: true,
591
- error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !workspace
592
- }, (allowedOwners == null ? void 0 : allowedOwners.length) ? /* @__PURE__ */ React.createElement(Select, {
593
- native: true,
594
- label: "Allowed Workspaces",
595
- onChange: (s) => onChange({ workspace: String(Array.isArray(s) ? s[0] : s) }),
596
- disabled: allowedOwners.length === 1,
597
- selected: workspace,
598
- items: ownerItems
599
- }) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, {
600
- htmlFor: "workspaceInput"
601
- }, "Workspace"), /* @__PURE__ */ React.createElement(Input, {
602
- id: "workspaceInput",
603
- onChange: (e) => onChange({ workspace: e.target.value }),
604
- value: workspace
605
- })), /* @__PURE__ */ React.createElement(FormHelperText, null, "The Organization that this repo will belong to")), /* @__PURE__ */ React.createElement(FormControl, {
606
- margin: "normal",
607
- required: true,
608
- error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !project
609
- }, /* @__PURE__ */ React.createElement(InputLabel, {
610
- htmlFor: "projectInput"
611
- }, "Project"), /* @__PURE__ */ React.createElement(Input, {
612
- id: "projectInput",
613
- onChange: (e) => onChange({ project: e.target.value }),
614
- value: project
615
- }), /* @__PURE__ */ React.createElement(FormHelperText, null, "The Project that this repo will belong to")));
644
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, host === "bitbucket.org" && /* @__PURE__ */ React.createElement(
645
+ FormControl,
646
+ {
647
+ margin: "normal",
648
+ required: true,
649
+ error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !workspace
650
+ },
651
+ (allowedOwners == null ? void 0 : allowedOwners.length) ? /* @__PURE__ */ React.createElement(
652
+ Select,
653
+ {
654
+ native: true,
655
+ label: "Allowed Workspaces",
656
+ onChange: (s) => onChange({ workspace: String(Array.isArray(s) ? s[0] : s) }),
657
+ disabled: allowedOwners.length === 1,
658
+ selected: workspace,
659
+ items: ownerItems
660
+ }
661
+ ) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "workspaceInput" }, "Workspace"), /* @__PURE__ */ React.createElement(
662
+ Input,
663
+ {
664
+ id: "workspaceInput",
665
+ onChange: (e) => onChange({ workspace: e.target.value }),
666
+ value: workspace
667
+ }
668
+ )),
669
+ /* @__PURE__ */ React.createElement(FormHelperText, null, "The Organization that this repo will belong to")
670
+ ), /* @__PURE__ */ React.createElement(
671
+ FormControl,
672
+ {
673
+ margin: "normal",
674
+ required: true,
675
+ error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !project
676
+ },
677
+ /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "projectInput" }, "Project"),
678
+ /* @__PURE__ */ React.createElement(
679
+ Input,
680
+ {
681
+ id: "projectInput",
682
+ onChange: (e) => onChange({ project: e.target.value }),
683
+ value: project
684
+ }
685
+ ),
686
+ /* @__PURE__ */ React.createElement(FormHelperText, null, "The Project that this repo will belong to")
687
+ ));
616
688
  };
617
689
 
618
690
  const GerritRepoPicker = (props) => {
619
691
  const { onChange, rawErrors, state } = props;
620
692
  const { workspace, owner } = state;
621
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(FormControl, {
622
- margin: "normal",
623
- error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !workspace
624
- }, /* @__PURE__ */ React.createElement(InputLabel, {
625
- htmlFor: "ownerInput"
626
- }, "Owner"), /* @__PURE__ */ React.createElement(Input, {
627
- id: "ownerInput",
628
- onChange: (e) => onChange({ owner: e.target.value }),
629
- value: owner
630
- }), /* @__PURE__ */ React.createElement(FormHelperText, null, "The owner of the project (optional)")), /* @__PURE__ */ React.createElement(FormControl, {
631
- margin: "normal",
632
- required: true,
633
- error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !workspace
634
- }, /* @__PURE__ */ React.createElement(InputLabel, {
635
- htmlFor: "parentInput"
636
- }, "Parent"), /* @__PURE__ */ React.createElement(Input, {
637
- id: "parentInput",
638
- onChange: (e) => onChange({ workspace: e.target.value }),
639
- value: workspace
640
- }), /* @__PURE__ */ React.createElement(FormHelperText, null, "The project parent that the repo will belong to")));
693
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(FormControl, { margin: "normal", error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !workspace }, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "ownerInput" }, "Owner"), /* @__PURE__ */ React.createElement(
694
+ Input,
695
+ {
696
+ id: "ownerInput",
697
+ onChange: (e) => onChange({ owner: e.target.value }),
698
+ value: owner
699
+ }
700
+ ), /* @__PURE__ */ React.createElement(FormHelperText, null, "The owner of the project (optional)")), /* @__PURE__ */ React.createElement(
701
+ FormControl,
702
+ {
703
+ margin: "normal",
704
+ required: true,
705
+ error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !workspace
706
+ },
707
+ /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "parentInput" }, "Parent"),
708
+ /* @__PURE__ */ React.createElement(
709
+ Input,
710
+ {
711
+ id: "parentInput",
712
+ onChange: (e) => onChange({ workspace: e.target.value }),
713
+ value: workspace
714
+ }
715
+ ),
716
+ /* @__PURE__ */ React.createElement(FormHelperText, null, "The project parent that the repo will belong to")
717
+ ));
641
718
  };
642
719
 
643
720
  const RepoUrlPickerHost = (props) => {
@@ -663,19 +740,27 @@ const RepoUrlPickerHost = (props) => {
663
740
  if (loading) {
664
741
  return /* @__PURE__ */ React.createElement(Progress, null);
665
742
  }
666
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(FormControl, {
667
- margin: "normal",
668
- required: true,
669
- error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !host
670
- }, /* @__PURE__ */ React.createElement(Select, {
671
- native: true,
672
- disabled: (hosts == null ? void 0 : hosts.length) === 1,
673
- label: "Host",
674
- onChange: (s) => onChange(String(Array.isArray(s) ? s[0] : s)),
675
- selected: host,
676
- items: hostsOptions,
677
- "data-testid": "host-select"
678
- }), /* @__PURE__ */ React.createElement(FormHelperText, null, "The host where the repository will be created")));
743
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
744
+ FormControl,
745
+ {
746
+ margin: "normal",
747
+ required: true,
748
+ error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !host
749
+ },
750
+ /* @__PURE__ */ React.createElement(
751
+ Select,
752
+ {
753
+ native: true,
754
+ disabled: (hosts == null ? void 0 : hosts.length) === 1,
755
+ label: "Host",
756
+ onChange: (s) => onChange(String(Array.isArray(s) ? s[0] : s)),
757
+ selected: host,
758
+ items: hostsOptions,
759
+ "data-testid": "host-select"
760
+ }
761
+ ),
762
+ /* @__PURE__ */ React.createElement(FormHelperText, null, "The host where the repository will be created")
763
+ ));
679
764
  };
680
765
 
681
766
  const RepoUrlPickerRepoName = (props) => {
@@ -688,24 +773,33 @@ const RepoUrlPickerRepoName = (props) => {
688
773
  }
689
774
  }, [allowedRepos, repoName, onChange]);
690
775
  const repoItems = allowedRepos ? allowedRepos.map((i) => ({ label: i, value: i })) : [{ label: "Loading...", value: "loading" }];
691
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(FormControl, {
692
- margin: "normal",
693
- required: true,
694
- error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !repoName
695
- }, (allowedRepos == null ? void 0 : allowedRepos.length) ? /* @__PURE__ */ React.createElement(Select, {
696
- native: true,
697
- label: "Repositories Available",
698
- onChange: (selected) => String(Array.isArray(selected) ? selected[0] : selected),
699
- disabled: allowedRepos.length === 1,
700
- selected: repoName,
701
- items: repoItems
702
- }) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, {
703
- htmlFor: "repoNameInput"
704
- }, "Repository"), /* @__PURE__ */ React.createElement(Input, {
705
- id: "repoNameInput",
706
- onChange: (e) => onChange(String(e.target.value)),
707
- value: repoName
708
- })), /* @__PURE__ */ React.createElement(FormHelperText, null, "The name of the repository")));
776
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
777
+ FormControl,
778
+ {
779
+ margin: "normal",
780
+ required: true,
781
+ error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !repoName
782
+ },
783
+ (allowedRepos == null ? void 0 : allowedRepos.length) ? /* @__PURE__ */ React.createElement(
784
+ Select,
785
+ {
786
+ native: true,
787
+ label: "Repositories Available",
788
+ onChange: (selected) => String(Array.isArray(selected) ? selected[0] : selected),
789
+ disabled: allowedRepos.length === 1,
790
+ selected: repoName,
791
+ items: repoItems
792
+ }
793
+ ) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputLabel, { htmlFor: "repoNameInput" }, "Repository"), /* @__PURE__ */ React.createElement(
794
+ Input,
795
+ {
796
+ id: "repoNameInput",
797
+ onChange: (e) => onChange(String(e.target.value)),
798
+ value: repoName
799
+ }
800
+ )),
801
+ /* @__PURE__ */ React.createElement(FormHelperText, null, "The name of the repository")
802
+ ));
709
803
  };
710
804
 
711
805
  function serializeRepoPickerUrl(data) {
@@ -757,9 +851,7 @@ const SecretsContext = createContext(
757
851
  );
758
852
  const SecretsContextProvider = ({ children }) => {
759
853
  const [secrets, setSecrets] = useState({});
760
- return /* @__PURE__ */ React.createElement(SecretsContext.Provider, {
761
- value: { secrets, setSecrets }
762
- }, children);
854
+ return /* @__PURE__ */ React.createElement(SecretsContext.Provider, { value: { secrets, setSecrets } }, children);
763
855
  };
764
856
  const useTemplateSecrets = () => {
765
857
  const value = useContext(SecretsContext);
@@ -896,42 +988,63 @@ const RepoUrlPicker = (props) => {
896
988
  [state, uiSchema]
897
989
  );
898
990
  const hostType = (_b = state.host && ((_a = integrationApi.byHost(state.host)) == null ? void 0 : _a.type)) != null ? _b : null;
899
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(RepoUrlPickerHost, {
900
- host: state.host,
901
- hosts: allowedHosts,
902
- onChange: (host) => setState((prevState) => ({ ...prevState, host })),
903
- rawErrors
904
- }), hostType === "github" && /* @__PURE__ */ React.createElement(GithubRepoPicker, {
905
- allowedOwners,
906
- onChange: updateLocalState,
907
- rawErrors,
908
- state
909
- }), hostType === "gitlab" && /* @__PURE__ */ React.createElement(GitlabRepoPicker, {
910
- allowedOwners,
911
- rawErrors,
912
- state,
913
- onChange: updateLocalState
914
- }), hostType === "bitbucket" && /* @__PURE__ */ React.createElement(BitbucketRepoPicker, {
915
- allowedOwners,
916
- rawErrors,
917
- state,
918
- onChange: updateLocalState
919
- }), hostType === "azure" && /* @__PURE__ */ React.createElement(AzureRepoPicker, {
920
- allowedOrganizations,
921
- allowedOwners,
922
- rawErrors,
923
- state,
924
- onChange: updateLocalState
925
- }), hostType === "gerrit" && /* @__PURE__ */ React.createElement(GerritRepoPicker, {
926
- rawErrors,
927
- state,
928
- onChange: updateLocalState
929
- }), /* @__PURE__ */ React.createElement(RepoUrlPickerRepoName, {
930
- repoName: state.repoName,
931
- allowedRepos,
932
- onChange: (repo) => setState((prevState) => ({ ...prevState, repoName: repo })),
933
- rawErrors
934
- }));
991
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
992
+ RepoUrlPickerHost,
993
+ {
994
+ host: state.host,
995
+ hosts: allowedHosts,
996
+ onChange: (host) => setState((prevState) => ({ ...prevState, host })),
997
+ rawErrors
998
+ }
999
+ ), hostType === "github" && /* @__PURE__ */ React.createElement(
1000
+ GithubRepoPicker,
1001
+ {
1002
+ allowedOwners,
1003
+ onChange: updateLocalState,
1004
+ rawErrors,
1005
+ state
1006
+ }
1007
+ ), hostType === "gitlab" && /* @__PURE__ */ React.createElement(
1008
+ GitlabRepoPicker,
1009
+ {
1010
+ allowedOwners,
1011
+ rawErrors,
1012
+ state,
1013
+ onChange: updateLocalState
1014
+ }
1015
+ ), hostType === "bitbucket" && /* @__PURE__ */ React.createElement(
1016
+ BitbucketRepoPicker,
1017
+ {
1018
+ allowedOwners,
1019
+ rawErrors,
1020
+ state,
1021
+ onChange: updateLocalState
1022
+ }
1023
+ ), hostType === "azure" && /* @__PURE__ */ React.createElement(
1024
+ AzureRepoPicker,
1025
+ {
1026
+ allowedOrganizations,
1027
+ allowedOwners,
1028
+ rawErrors,
1029
+ state,
1030
+ onChange: updateLocalState
1031
+ }
1032
+ ), hostType === "gerrit" && /* @__PURE__ */ React.createElement(
1033
+ GerritRepoPicker,
1034
+ {
1035
+ rawErrors,
1036
+ state,
1037
+ onChange: updateLocalState
1038
+ }
1039
+ ), /* @__PURE__ */ React.createElement(
1040
+ RepoUrlPickerRepoName,
1041
+ {
1042
+ repoName: state.repoName,
1043
+ allowedRepos,
1044
+ onChange: (repo) => setState((prevState) => ({ ...prevState, repoName: repo })),
1045
+ rawErrors
1046
+ }
1047
+ ));
935
1048
  };
936
1049
 
937
1050
  const repoPickerValidation = (value, validation, context) => {
@@ -1008,28 +1121,38 @@ const OwnedEntityPicker = (props) => {
1008
1121
  const onSelect = (_, value) => {
1009
1122
  onChange(value || "");
1010
1123
  };
1011
- return /* @__PURE__ */ React.createElement(FormControl, {
1012
- margin: "normal",
1013
- required,
1014
- error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !formData
1015
- }, /* @__PURE__ */ React.createElement(Autocomplete, {
1016
- id: idSchema == null ? void 0 : idSchema.$id,
1017
- value: formData || "",
1018
- loading,
1019
- onChange: onSelect,
1020
- options: entityRefs || [],
1021
- autoSelect: true,
1022
- freeSolo: allowArbitraryValues,
1023
- renderInput: (params) => /* @__PURE__ */ React.createElement(TextField, {
1024
- ...params,
1025
- label: title,
1124
+ return /* @__PURE__ */ React.createElement(
1125
+ FormControl,
1126
+ {
1026
1127
  margin: "normal",
1027
- helperText: description,
1028
- variant: "outlined",
1029
1128
  required,
1030
- InputProps: params.InputProps
1031
- })
1032
- }));
1129
+ error: (rawErrors == null ? void 0 : rawErrors.length) > 0 && !formData
1130
+ },
1131
+ /* @__PURE__ */ React.createElement(
1132
+ Autocomplete,
1133
+ {
1134
+ id: idSchema == null ? void 0 : idSchema.$id,
1135
+ value: formData || "",
1136
+ loading,
1137
+ onChange: onSelect,
1138
+ options: entityRefs || [],
1139
+ autoSelect: true,
1140
+ freeSolo: allowArbitraryValues,
1141
+ renderInput: (params) => /* @__PURE__ */ React.createElement(
1142
+ TextField,
1143
+ {
1144
+ ...params,
1145
+ label: title,
1146
+ margin: "normal",
1147
+ helperText: description,
1148
+ variant: "outlined",
1149
+ required,
1150
+ InputProps: params.InputProps
1151
+ }
1152
+ )
1153
+ }
1154
+ )
1155
+ );
1033
1156
  };
1034
1157
  function useOwnedEntities(allowedKinds) {
1035
1158
  const identityApi = useApi(identityApiRef);
@@ -1222,7 +1345,7 @@ const OwnerPickerFieldExtension = scaffolderPlugin.provide(
1222
1345
  const ScaffolderPage = scaffolderPlugin.provide(
1223
1346
  createRoutableExtension({
1224
1347
  name: "ScaffolderPage",
1225
- component: () => import('./Router-c72ed8e0.esm.js').then((m) => m.Router),
1348
+ component: () => import('./Router-95a01240.esm.js').then((m) => m.Router),
1226
1349
  mountPoint: rootRouteRef
1227
1350
  })
1228
1351
  );
@@ -1243,17 +1366,13 @@ const EntityTagsPickerFieldExtension = scaffolderPlugin.provide(
1243
1366
  const NextScaffolderPage = scaffolderPlugin.provide(
1244
1367
  createRoutableExtension({
1245
1368
  name: "NextScaffolderPage",
1246
- component: () => import('./index-36d7755a.esm.js').then((m) => m.Router),
1369
+ component: () => import('./index-cb47594c.esm.js').then((m) => m.Router),
1247
1370
  mountPoint: nextRouteRef
1248
1371
  })
1249
1372
  );
1250
1373
 
1251
- const icon = /* @__PURE__ */ React.createElement(CheckBoxOutlineBlankIcon, {
1252
- fontSize: "small"
1253
- });
1254
- const checkedIcon = /* @__PURE__ */ React.createElement(CheckBoxIcon, {
1255
- fontSize: "small"
1256
- });
1374
+ const icon = /* @__PURE__ */ React.createElement(CheckBoxOutlineBlankIcon, { fontSize: "small" });
1375
+ const checkedIcon = /* @__PURE__ */ React.createElement(CheckBoxIcon, { fontSize: "small" });
1257
1376
  const TemplateTypePicker = () => {
1258
1377
  const alertApi = useApi(alertApiRef);
1259
1378
  const { error, loading, availableTypes, selectedTypes, setSelectedTypes } = useEntityTypeFilter();
@@ -1268,34 +1387,33 @@ const TemplateTypePicker = () => {
1268
1387
  });
1269
1388
  return null;
1270
1389
  }
1271
- return /* @__PURE__ */ React.createElement(Box, {
1272
- pb: 1,
1273
- pt: 1
1274
- }, /* @__PURE__ */ React.createElement(Typography, {
1275
- variant: "button"
1276
- }, "Categories"), /* @__PURE__ */ React.createElement(Autocomplete$1, {
1277
- multiple: true,
1278
- "aria-label": "Categories",
1279
- options: availableTypes,
1280
- value: selectedTypes,
1281
- onChange: (_, value) => setSelectedTypes(value),
1282
- renderOption: (option, { selected }) => /* @__PURE__ */ React.createElement(FormControlLabel, {
1283
- control: /* @__PURE__ */ React.createElement(Checkbox, {
1284
- icon,
1285
- checkedIcon,
1286
- checked: selected
1287
- }),
1288
- label: capitalize(option)
1289
- }),
1290
- size: "small",
1291
- popupIcon: /* @__PURE__ */ React.createElement(ExpandMoreIcon, {
1292
- "data-testid": "categories-picker-expand"
1293
- }),
1294
- renderInput: (params) => /* @__PURE__ */ React.createElement(TextField, {
1295
- ...params,
1296
- variant: "outlined"
1297
- })
1298
- }));
1390
+ return /* @__PURE__ */ React.createElement(Box, { pb: 1, pt: 1 }, /* @__PURE__ */ React.createElement(Typography, { variant: "button" }, "Categories"), /* @__PURE__ */ React.createElement(
1391
+ Autocomplete$1,
1392
+ {
1393
+ multiple: true,
1394
+ "aria-label": "Categories",
1395
+ options: availableTypes,
1396
+ value: selectedTypes,
1397
+ onChange: (_, value) => setSelectedTypes(value),
1398
+ renderOption: (option, { selected }) => /* @__PURE__ */ React.createElement(
1399
+ FormControlLabel,
1400
+ {
1401
+ control: /* @__PURE__ */ React.createElement(
1402
+ Checkbox,
1403
+ {
1404
+ icon,
1405
+ checkedIcon,
1406
+ checked: selected
1407
+ }
1408
+ ),
1409
+ label: capitalize(option)
1410
+ }
1411
+ ),
1412
+ size: "small",
1413
+ popupIcon: /* @__PURE__ */ React.createElement(ExpandMoreIcon, { "data-testid": "categories-picker-expand" }),
1414
+ renderInput: (params) => /* @__PURE__ */ React.createElement(TextField, { ...params, variant: "outlined" })
1415
+ }
1416
+ ));
1299
1417
  };
1300
1418
 
1301
1419
  function reducer(draft, action) {
@@ -1429,11 +1547,14 @@ const TaskErrors = ({ error }) => {
1429
1547
  useEffect(() => {
1430
1548
  id.current = String(Math.random());
1431
1549
  }, [error]);
1432
- return error ? /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(DismissableBanner, {
1433
- id: id.current,
1434
- variant: "warning",
1435
- message: error.message
1436
- })) : null;
1550
+ return error ? /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(
1551
+ DismissableBanner,
1552
+ {
1553
+ id: id.current,
1554
+ variant: "warning",
1555
+ message: error.message
1556
+ }
1557
+ )) : null;
1437
1558
  };
1438
1559
 
1439
1560
  const useStyles$1 = makeStyles({
@@ -1449,21 +1570,7 @@ const useStyles$1 = makeStyles({
1449
1570
  const IconLink = (props) => {
1450
1571
  const { href, text, Icon, ...linkProps } = props;
1451
1572
  const classes = useStyles$1();
1452
- return /* @__PURE__ */ React.createElement(Grid, {
1453
- container: true,
1454
- direction: "row",
1455
- spacing: 1
1456
- }, /* @__PURE__ */ React.createElement(Grid, {
1457
- item: true
1458
- }, /* @__PURE__ */ React.createElement(Typography, {
1459
- component: "div",
1460
- className: classes.svgIcon
1461
- }, Icon ? /* @__PURE__ */ React.createElement(Icon, null) : /* @__PURE__ */ React.createElement(LanguageIcon, null))), /* @__PURE__ */ React.createElement(Grid, {
1462
- item: true
1463
- }, /* @__PURE__ */ React.createElement(Link, {
1464
- to: href,
1465
- ...linkProps
1466
- }, text || href)));
1573
+ return /* @__PURE__ */ React.createElement(Grid, { container: true, direction: "row", spacing: 1 }, /* @__PURE__ */ React.createElement(Grid, { item: true }, /* @__PURE__ */ React.createElement(Typography, { component: "div", className: classes.svgIcon }, Icon ? /* @__PURE__ */ React.createElement(Icon, null) : /* @__PURE__ */ React.createElement(LanguageIcon, null))), /* @__PURE__ */ React.createElement(Grid, { item: true }, /* @__PURE__ */ React.createElement(Link, { to: href, ...linkProps }, text || href)));
1467
1574
  };
1468
1575
 
1469
1576
  const TaskPageLinks = ({ output }) => {
@@ -1474,10 +1581,7 @@ const TaskPageLinks = ({ output }) => {
1474
1581
  var _a;
1475
1582
  return key ? (_a = app.getSystemIcon(key)) != null ? _a : LanguageIcon : LanguageIcon;
1476
1583
  };
1477
- return /* @__PURE__ */ React.createElement(Box, {
1478
- px: 3,
1479
- pb: 3
1480
- }, links.filter(({ url, entityRef }) => url || entityRef).map(({ url, entityRef, title, icon }) => {
1584
+ return /* @__PURE__ */ React.createElement(Box, { px: 3, pb: 3 }, links.filter(({ url, entityRef }) => url || entityRef).map(({ url, entityRef, title, icon }) => {
1481
1585
  if (entityRef) {
1482
1586
  const entityName = parseEntityRef(entityRef, {
1483
1587
  defaultKind: "<unknown>",
@@ -1487,13 +1591,16 @@ const TaskPageLinks = ({ output }) => {
1487
1591
  return { title, icon, url: target };
1488
1592
  }
1489
1593
  return { title, icon, url };
1490
- }).map(({ url, title, icon }, i) => /* @__PURE__ */ React.createElement(IconLink, {
1491
- key: `output-link-${i}`,
1492
- href: url,
1493
- text: title != null ? title : url,
1494
- Icon: iconResolver(icon),
1495
- target: "_blank"
1496
- })));
1594
+ }).map(({ url, title, icon }, i) => /* @__PURE__ */ React.createElement(
1595
+ IconLink,
1596
+ {
1597
+ key: `output-link-${i}`,
1598
+ href: url,
1599
+ text: title != null ? title : url,
1600
+ Icon: iconResolver(icon),
1601
+ target: "_blank"
1602
+ }
1603
+ )));
1497
1604
  };
1498
1605
 
1499
1606
  const humanizeDuration = require("humanize-duration");
@@ -1535,9 +1642,7 @@ const StepTimeTicker = ({ step }) => {
1535
1642
  const formatted = Interval.fromDateTimes(startedAt, end).toDuration().valueOf();
1536
1643
  setTime(humanizeDuration(formatted, { round: true }));
1537
1644
  }, 1e3);
1538
- return /* @__PURE__ */ React.createElement(Typography$1, {
1539
- variant: "caption"
1540
- }, time);
1645
+ return /* @__PURE__ */ React.createElement(Typography$1, { variant: "caption" }, time);
1541
1646
  };
1542
1647
  const useStepIconStyles = makeStyles$1(
1543
1648
  (theme) => createStyles({
@@ -1560,9 +1665,7 @@ function TaskStepIconComponent(props) {
1560
1665
  const { active, completed, error } = props;
1561
1666
  const getMiddle = () => {
1562
1667
  if (active) {
1563
- return /* @__PURE__ */ React.createElement(CircularProgress, {
1564
- size: "24px"
1565
- });
1668
+ return /* @__PURE__ */ React.createElement(CircularProgress, { size: "24px" });
1566
1669
  }
1567
1670
  if (completed) {
1568
1671
  return /* @__PURE__ */ React.createElement(Check, null);
@@ -1572,51 +1675,48 @@ function TaskStepIconComponent(props) {
1572
1675
  }
1573
1676
  return /* @__PURE__ */ React.createElement(FiberManualRecordIcon, null);
1574
1677
  };
1575
- return /* @__PURE__ */ React.createElement("div", {
1576
- className: classNames(classes.root, {
1577
- [classes.completed]: completed,
1578
- [classes.error]: error
1579
- })
1580
- }, getMiddle());
1678
+ return /* @__PURE__ */ React.createElement(
1679
+ "div",
1680
+ {
1681
+ className: classNames(classes.root, {
1682
+ [classes.completed]: completed,
1683
+ [classes.error]: error
1684
+ })
1685
+ },
1686
+ getMiddle()
1687
+ );
1581
1688
  }
1582
1689
  const TaskStatusStepper = memo(
1583
1690
  (props) => {
1584
1691
  const { steps, currentStepId, onUserStepChange } = props;
1585
1692
  const classes = useStyles(props);
1586
- return /* @__PURE__ */ React.createElement("div", {
1587
- className: classes.root
1588
- }, /* @__PURE__ */ React.createElement(Stepper, {
1589
- activeStep: steps.findIndex((s) => s.id === currentStepId),
1590
- orientation: "vertical",
1591
- nonLinear: true
1592
- }, steps.map((step, index) => {
1593
- const isCompleted = step.status === "completed";
1594
- const isFailed = step.status === "failed";
1595
- const isActive = step.status === "processing";
1596
- const isSkipped = step.status === "skipped";
1597
- return /* @__PURE__ */ React.createElement(Step, {
1598
- key: String(index),
1599
- expanded: true
1600
- }, /* @__PURE__ */ React.createElement(StepButton, {
1601
- onClick: () => onUserStepChange(step.id)
1602
- }, /* @__PURE__ */ React.createElement(StepLabel, {
1603
- StepIconProps: {
1604
- completed: isCompleted,
1605
- error: isFailed,
1606
- active: isActive
1607
- },
1608
- StepIconComponent: TaskStepIconComponent,
1609
- className: classes.stepWrapper
1610
- }, /* @__PURE__ */ React.createElement("div", {
1611
- className: classes.labelWrapper
1612
- }, /* @__PURE__ */ React.createElement(Typography$1, {
1613
- variant: "subtitle2"
1614
- }, step.name), isSkipped ? /* @__PURE__ */ React.createElement(Typography$1, {
1615
- variant: "caption"
1616
- }, "Skipped") : /* @__PURE__ */ React.createElement(StepTimeTicker, {
1617
- step
1618
- })))));
1619
- })));
1693
+ return /* @__PURE__ */ React.createElement("div", { className: classes.root }, /* @__PURE__ */ React.createElement(
1694
+ Stepper,
1695
+ {
1696
+ activeStep: steps.findIndex((s) => s.id === currentStepId),
1697
+ orientation: "vertical",
1698
+ nonLinear: true
1699
+ },
1700
+ steps.map((step, index) => {
1701
+ const isCompleted = step.status === "completed";
1702
+ const isFailed = step.status === "failed";
1703
+ const isActive = step.status === "processing";
1704
+ const isSkipped = step.status === "skipped";
1705
+ return /* @__PURE__ */ React.createElement(Step, { key: String(index), expanded: true }, /* @__PURE__ */ React.createElement(StepButton, { onClick: () => onUserStepChange(step.id) }, /* @__PURE__ */ React.createElement(
1706
+ StepLabel,
1707
+ {
1708
+ StepIconProps: {
1709
+ completed: isCompleted,
1710
+ error: isFailed,
1711
+ active: isActive
1712
+ },
1713
+ StepIconComponent: TaskStepIconComponent,
1714
+ className: classes.stepWrapper
1715
+ },
1716
+ /* @__PURE__ */ React.createElement("div", { className: classes.labelWrapper }, /* @__PURE__ */ React.createElement(Typography$1, { variant: "subtitle2" }, step.name), isSkipped ? /* @__PURE__ */ React.createElement(Typography$1, { variant: "caption" }, "Skipped") : /* @__PURE__ */ React.createElement(StepTimeTicker, { step }))
1717
+ )));
1718
+ })
1719
+ ));
1620
1720
  }
1621
1721
  );
1622
1722
  const hasLinks = ({ links = [] }) => links.length > 0;
@@ -1685,44 +1785,39 @@ const TaskPage = ({ loadingText }) => {
1685
1785
  })}`
1686
1786
  );
1687
1787
  };
1688
- return /* @__PURE__ */ React.createElement(Page, {
1689
- themeId: "home"
1690
- }, /* @__PURE__ */ React.createElement(Header, {
1691
- pageTitleOverride: `Task ${taskId}`,
1692
- title: "Task Activity",
1693
- subtitle: `Activity for task: ${taskId}`
1694
- }), /* @__PURE__ */ React.createElement(Content, null, taskNotFound ? /* @__PURE__ */ React.createElement(ErrorPage, {
1695
- status: "404",
1696
- statusMessage: "Task not found",
1697
- additionalInfo: "No task found with this ID"
1698
- }) : /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Grid$1, {
1699
- container: true
1700
- }, /* @__PURE__ */ React.createElement(Grid$1, {
1701
- item: true,
1702
- xs: 3
1703
- }, /* @__PURE__ */ React.createElement(Paper, null, /* @__PURE__ */ React.createElement(TaskStatusStepper, {
1704
- steps,
1705
- currentStepId,
1706
- onUserStepChange: setUserSelectedStepId
1707
- }), output && hasLinks(output) && /* @__PURE__ */ React.createElement(TaskPageLinks, {
1708
- output
1709
- }), /* @__PURE__ */ React.createElement(Button, {
1710
- className: classes.button,
1711
- onClick: handleStartOver,
1712
- disabled: !completed,
1713
- variant: "contained",
1714
- color: "primary"
1715
- }, "Start Over"))), /* @__PURE__ */ React.createElement(Grid$1, {
1716
- item: true,
1717
- xs: 9
1718
- }, !currentStepId && /* @__PURE__ */ React.createElement(Progress, null), /* @__PURE__ */ React.createElement("div", {
1719
- style: { height: "80vh" }
1720
- }, /* @__PURE__ */ React.createElement(TaskErrors, {
1721
- error: taskStream.error
1722
- }), /* @__PURE__ */ React.createElement(LogViewer, {
1723
- text: logAsString
1724
- })))))));
1788
+ return /* @__PURE__ */ React.createElement(Page, { themeId: "home" }, /* @__PURE__ */ React.createElement(
1789
+ Header,
1790
+ {
1791
+ pageTitleOverride: `Task ${taskId}`,
1792
+ title: "Task Activity",
1793
+ subtitle: `Activity for task: ${taskId}`
1794
+ }
1795
+ ), /* @__PURE__ */ React.createElement(Content, null, taskNotFound ? /* @__PURE__ */ React.createElement(
1796
+ ErrorPage,
1797
+ {
1798
+ status: "404",
1799
+ statusMessage: "Task not found",
1800
+ additionalInfo: "No task found with this ID"
1801
+ }
1802
+ ) : /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Grid$1, { container: true }, /* @__PURE__ */ React.createElement(Grid$1, { item: true, xs: 3 }, /* @__PURE__ */ React.createElement(Paper, null, /* @__PURE__ */ React.createElement(
1803
+ TaskStatusStepper,
1804
+ {
1805
+ steps,
1806
+ currentStepId,
1807
+ onUserStepChange: setUserSelectedStepId
1808
+ }
1809
+ ), output && hasLinks(output) && /* @__PURE__ */ React.createElement(TaskPageLinks, { output }), /* @__PURE__ */ React.createElement(
1810
+ Button,
1811
+ {
1812
+ className: classes.button,
1813
+ onClick: handleStartOver,
1814
+ disabled: !completed,
1815
+ variant: "contained",
1816
+ color: "primary"
1817
+ },
1818
+ "Start Over"
1819
+ ))), /* @__PURE__ */ React.createElement(Grid$1, { item: true, xs: 9 }, !currentStepId && /* @__PURE__ */ React.createElement(Progress, null), /* @__PURE__ */ React.createElement("div", { style: { height: "80vh" } }, /* @__PURE__ */ React.createElement(TaskErrors, { error: taskStream.error }), /* @__PURE__ */ React.createElement(LogViewer, { text: logAsString })))))));
1725
1820
  };
1726
1821
 
1727
1822
  export { OwnerPickerFieldSchema as $, OwnedEntityPickerSchema as A, nextSelectedTemplateRouteRef as B, nextRouteRef as C, ScaffolderClient as D, EntityPicker as E, FIELD_EXTENSION_WRAPPER_KEY as F, createScaffolderFieldExtension as G, ScaffolderFieldExtensions as H, createScaffolderLayout as I, ScaffolderLayouts as J, EntityPickerFieldExtension as K, LAYOUTS_WRAPPER_KEY as L, EntityNamePickerFieldExtension as M, EntityTagsPickerFieldExtension as N, OwnerPicker as O, OwnerPickerFieldExtension as P, OwnedEntityPickerFieldExtension as Q, RepoUrlPicker as R, SecretsContext as S, TemplateTypePicker as T, RepoUrlPickerFieldExtension as U, ScaffolderPage as V, scaffolderPlugin as W, NextScaffolderPage as X, createNextScaffolderFieldExtension as Y, makeFieldSchemaFromZod as Z, EntityPickerFieldSchema as _, actionsRouteRef as a, RepoUrlPickerFieldSchema as a0, OwnedEntityPickerFieldSchema as a1, EntityTagsPickerFieldSchema as a2, useTemplateSecrets as a3, scaffolderListTaskRouteRef as b, scaffolderApiRef as c, scaffolderTaskRouteRef as d, editRouteRef as e, rootRouteRef as f, TaskStatusStepper as g, TaskPageLinks as h, FIELD_EXTENSION_KEY as i, LAYOUTS_KEY as j, SecretsContextProvider as k, legacySelectedTemplateRouteRef as l, TaskPage as m, EntityPickerSchema as n, EntityNamePicker as o, entityNamePickerValidation as p, EntityNamePickerSchema as q, registerComponentRouteRef as r, selectedTemplateRouteRef as s, EntityTagsPicker as t, EntityTagsPickerSchema as u, viewTechDocRouteRef as v, repoPickerValidation as w, RepoUrlPickerSchema as x, OwnerPickerSchema as y, OwnedEntityPicker as z };
1728
- //# sourceMappingURL=index-ed1a1fba.esm.js.map
1823
+ //# sourceMappingURL=index-102258f6.esm.js.map