@lowcodeunit/applications-flow-common 1.33.89-lets-get-social-ish → 1.33.95-lets-get-social-ish

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.
Files changed (48) hide show
  1. package/bundles/lowcodeunit-applications-flow-common.umd.js +1219 -646
  2. package/bundles/lowcodeunit-applications-flow-common.umd.js.map +1 -1
  3. package/bundles/lowcodeunit-applications-flow-common.umd.min.js +2 -2
  4. package/bundles/lowcodeunit-applications-flow-common.umd.min.js.map +1 -1
  5. package/esm2015/lcu.api.js +2 -1
  6. package/esm2015/lib/applications-flow.module.js +31 -4
  7. package/esm2015/lib/controls/build-pipeline-form/build-pipeline-form.component.js +15 -0
  8. package/esm2015/lib/controls/devops-source-control-form/devops-source-control-form.component.js +15 -0
  9. package/esm2015/lib/controls/processor-details-form/processor-details-form.component.js +265 -0
  10. package/esm2015/lib/controls/security-toggle/security-toggle.component.js +60 -0
  11. package/esm2015/lib/controls/source-control-form/source-control-form.component.js +59 -0
  12. package/esm2015/lib/elements/analytics-card/analytics-card.component.js +1 -1
  13. package/esm2015/lib/elements/feed-card-sm/feed-card-sm.component.js +1 -1
  14. package/esm2015/lib/elements/gh-control/gh-control.component.js +1 -1
  15. package/esm2015/lib/elements/main-feed-card/main-feed-card.component.js +1 -1
  16. package/esm2015/lib/elements/project-info-card/project-info-card.component.js +1 -1
  17. package/esm2015/lib/elements/projects/controls/tabs/apps-flow/apps-flow.component.js +8 -10
  18. package/esm2015/lib/elements/projects/projects.component.js +8 -132
  19. package/esm2015/lib/elements/slotted-card/slotted-card.component.js +4 -3
  20. package/esm2015/lib/services/eac.service.js +193 -0
  21. package/esm2015/lowcodeunit-applications-flow-common.js +6 -1
  22. package/fesm2015/lowcodeunit-applications-flow-common.js +735 -248
  23. package/fesm2015/lowcodeunit-applications-flow-common.js.map +1 -1
  24. package/lcu.api.d.ts +1 -0
  25. package/lcu.api.d.ts.map +1 -1
  26. package/lib/applications-flow.module.d.ts.map +1 -1
  27. package/lib/controls/build-pipeline-form/build-pipeline-form.component.d.ts +6 -0
  28. package/lib/controls/build-pipeline-form/build-pipeline-form.component.d.ts.map +1 -0
  29. package/lib/controls/devops-source-control-form/devops-source-control-form.component.d.ts +6 -0
  30. package/lib/controls/devops-source-control-form/devops-source-control-form.component.d.ts.map +1 -0
  31. package/lib/controls/processor-details-form/processor-details-form.component.d.ts +48 -0
  32. package/lib/controls/processor-details-form/processor-details-form.component.d.ts.map +1 -0
  33. package/lib/controls/security-toggle/security-toggle.component.d.ts +16 -0
  34. package/lib/controls/security-toggle/security-toggle.component.d.ts.map +1 -0
  35. package/lib/controls/source-control-form/source-control-form.component.d.ts +26 -0
  36. package/lib/controls/source-control-form/source-control-form.component.d.ts.map +1 -0
  37. package/lib/elements/projects/controls/tabs/apps-flow/apps-flow.component.d.ts +3 -3
  38. package/lib/elements/projects/controls/tabs/apps-flow/apps-flow.component.d.ts.map +1 -1
  39. package/lib/elements/projects/projects.component.d.ts +4 -9
  40. package/lib/elements/projects/projects.component.d.ts.map +1 -1
  41. package/lib/elements/slotted-card/slotted-card.component.d.ts +1 -0
  42. package/lib/elements/slotted-card/slotted-card.component.d.ts.map +1 -1
  43. package/lib/services/eac.service.d.ts +30 -0
  44. package/lib/services/eac.service.d.ts.map +1 -0
  45. package/lowcodeunit-applications-flow-common.d.ts +5 -0
  46. package/lowcodeunit-applications-flow-common.d.ts.map +1 -1
  47. package/lowcodeunit-applications-flow-common.metadata.json +1 -1
  48. package/package.json +1 -1
@@ -9,6 +9,8 @@ import { AppHostModule } from '@lowcodeunit/app-host-common';
9
9
  import { ENTER, COMMA } from '@angular/cdk/keycodes';
10
10
  import { map, debounceTime, switchMap } from 'rxjs/operators';
11
11
  import { BreakpointObserver } from '@angular/cdk/layout';
12
+ import { MatTooltipModule } from '@angular/material/tooltip';
13
+ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
12
14
 
13
15
  /**
14
16
  * Model for form values
@@ -625,78 +627,6 @@ ApplicationsFlowStateContext.ctorParameters = () => [
625
627
  { type: Injector }
626
628
  ];
627
629
 
628
- class ApplicationsFlowState {
629
- constructor() {
630
- this.GitHub = {};
631
- this.HostingDetails = {};
632
- this.Loading = true;
633
- // this.Projects = [];
634
- }
635
- }
636
- // export class ProjectState {
637
- // public ActionsSet?: { [id: string]: DevOpsAction };
638
- // public Applications?: ApplicationState[];
639
- // public Description?: string;
640
- // public Host?: string;
641
- // public ID?: string;
642
- // public Image?: string;
643
- // public LCUs?: GitHubLowCodeUnit[];
644
- // public Name?: string;
645
- // public PreventInheritedApplications?: boolean;
646
- // public Runs?: GitHubWorkflowRun[];
647
- // }
648
- // export class ApplicationState {
649
- // public IsPrivate?: boolean;
650
- // public Name?: string;
651
- // public Organization?: string;
652
- // public PathRegex?: string;
653
- // public Priority?: number;
654
- // public Repository?: string;
655
- // public Version?: string;
656
- // }
657
- class GitHubSetupState {
658
- }
659
- class GitHubBranch {
660
- }
661
- // export class GitHubLowCodeUnit {
662
- // public Branch?: string;
663
- // public ID?: string;
664
- // public Lookup?: string;
665
- // public Organization?: string;
666
- // public Repository?: string;
667
- // }
668
- class GitHubOrganization {
669
- }
670
- class GitHubRepository {
671
- }
672
- class GitHubWorkflowRun {
673
- }
674
- class UnpackLowCodeUnitRequest {
675
- }
676
- // export class DevOpsAction {
677
- // public Details?: string;
678
- // public ID?: string;
679
- // public Name?: string;
680
- // public Overwrite?: boolean;
681
- // public Path?: string;
682
- // public Template?: string;
683
- // }
684
- class ProjectHostingDetails {
685
- }
686
- class ProjectHostingOption {
687
- }
688
- class ProjectHostingOptionInput {
689
- }
690
- // export class EstablishProjectRequest {
691
- // public Branch?: string;
692
- // public BuildScript?: string;
693
- // public HostingOption?: string;
694
- // public Organization?: string;
695
- // public OutputFolder?: string;
696
- // public ProjectName?: string;
697
- // public Repository?: string;
698
- // }
699
-
700
630
  class SaveApplicationAsCodeEventRequest {
701
631
  }
702
632
  class SaveDFSModifierEventRequest {
@@ -778,147 +708,237 @@ ApplicationsFlowEventsService.decorators = [
778
708
  ];
779
709
  ApplicationsFlowEventsService.ctorParameters = () => [];
780
710
 
781
- class ApplicationsFlowProjectsElementState {
711
+ class ApplicationsFlowState {
712
+ constructor() {
713
+ this.GitHub = {};
714
+ this.HostingDetails = {};
715
+ this.Loading = true;
716
+ // this.Projects = [];
717
+ }
782
718
  }
783
- class ApplicationsFlowProjectsContext extends LCUElementContext {
719
+ // export class ProjectState {
720
+ // public ActionsSet?: { [id: string]: DevOpsAction };
721
+ // public Applications?: ApplicationState[];
722
+ // public Description?: string;
723
+ // public Host?: string;
724
+ // public ID?: string;
725
+ // public Image?: string;
726
+ // public LCUs?: GitHubLowCodeUnit[];
727
+ // public Name?: string;
728
+ // public PreventInheritedApplications?: boolean;
729
+ // public Runs?: GitHubWorkflowRun[];
730
+ // }
731
+ // export class ApplicationState {
732
+ // public IsPrivate?: boolean;
733
+ // public Name?: string;
734
+ // public Organization?: string;
735
+ // public PathRegex?: string;
736
+ // public Priority?: number;
737
+ // public Repository?: string;
738
+ // public Version?: string;
739
+ // }
740
+ class GitHubSetupState {
784
741
  }
785
- const SELECTOR_APPLICATIONS_FLOW_PROJECTS_ELEMENT = 'applications-flow-projects-element';
786
- class ApplicationsFlowProjectsElementComponent extends LcuElementComponent {
742
+ class GitHubBranch {
743
+ }
744
+ // export class GitHubLowCodeUnit {
745
+ // public Branch?: string;
746
+ // public ID?: string;
747
+ // public Lookup?: string;
748
+ // public Organization?: string;
749
+ // public Repository?: string;
750
+ // }
751
+ class GitHubOrganization {
752
+ }
753
+ class GitHubRepository {
754
+ }
755
+ class GitHubWorkflowRun {
756
+ }
757
+ class UnpackLowCodeUnitRequest {
758
+ }
759
+ // export class DevOpsAction {
760
+ // public Details?: string;
761
+ // public ID?: string;
762
+ // public Name?: string;
763
+ // public Overwrite?: boolean;
764
+ // public Path?: string;
765
+ // public Template?: string;
766
+ // }
767
+ class ProjectHostingDetails {
768
+ }
769
+ class ProjectHostingOption {
770
+ }
771
+ class ProjectHostingOptionInput {
772
+ }
773
+ // export class EstablishProjectRequest {
774
+ // public Branch?: string;
775
+ // public BuildScript?: string;
776
+ // public HostingOption?: string;
777
+ // public Organization?: string;
778
+ // public OutputFolder?: string;
779
+ // public ProjectName?: string;
780
+ // public Repository?: string;
781
+ // }
782
+
783
+ class EaCService {
787
784
  // Constructors
788
- constructor(injector, appsFlowSvc, projectService, appsFlowEventsSvc) {
789
- super(injector);
790
- this.injector = injector;
791
- this.appsFlowSvc = appsFlowSvc;
792
- this.projectService = projectService;
785
+ constructor(appsFlowEventsSvc, projectService) {
793
786
  this.appsFlowEventsSvc = appsFlowEventsSvc;
787
+ this.projectService = projectService;
794
788
  this.State = new ApplicationsFlowState();
795
789
  this.setServices();
796
790
  }
797
- // Properties
798
- get ActiveEnvironment() {
799
- var _a, _b;
800
- return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[this.ActiveEnvironmentLookup];
801
- }
802
- get ActiveEnvironmentLookup() {
803
- var _a, _b;
804
- // TODO: Eventually support multiple environments
805
- const envLookups = Object.keys(((_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments) || {});
806
- return envLookups[0];
807
- }
808
- get CreatingProject() {
809
- return this.projectService.CreatingProject;
810
- }
811
- get EditingProject() {
812
- var _a, _b, _c, _d;
813
- return ((_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Projects) ? (_d = (_c = this.State) === null || _c === void 0 ? void 0 : _c.EaC) === null || _d === void 0 ? void 0 : _d.Projects[this.EditingProjectLookup] : null;
814
- }
815
- get EditingProjectLookup() {
816
- return this.projectService.EditingProjectLookup;
817
- }
818
- get ProjectLookups() {
819
- var _a, _b;
820
- return Object.keys(((_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Projects) || {});
821
- }
822
- // Life Cycle
823
- ngOnDestroy() { }
824
- ngOnInit() {
825
- super.ngOnInit();
826
- this.handleStateChange().then((eac) => { });
827
- // this.setupProjectMonitor();
828
- }
829
791
  // API Methods
830
- ActiveEnterpriseChanged(event) {
792
+ DeleteApplication(appLookup, appName) {
831
793
  return __awaiter(this, void 0, void 0, function* () {
832
- yield this.projectService.SetActiveEnterprise(this.State, event.value);
833
- });
834
- }
835
- ConfigureDevOpsAction(devOpsActionLookup) {
836
- this.State.Loading = true;
837
- this.appsFlowSvc
838
- .ConfigureDevOpsAction(devOpsActionLookup)
839
- .subscribe((response) => {
840
- if (response.Status.Code === 0) {
841
- this.projectService.LoadEnterpriseAsCode(this.State);
842
- }
843
- else {
844
- this.State.Loading = false;
794
+ if (confirm(`Are you sure you want to delete application '${appName}'?`)) {
795
+ yield this.projectService.DeleteApplication(this.State, appLookup);
845
796
  }
846
797
  });
847
798
  }
848
- // Helpers
849
- handleStateChange() {
850
- var _a;
799
+ DeleteDevOpsAction(doaLookup) {
851
800
  return __awaiter(this, void 0, void 0, function* () {
852
- this.State.Loading = true;
853
- yield this.projectService.HasValidConnection(this.State);
854
- yield this.projectService.EnsureUserEnterprise(this.State);
855
- yield this.projectService.ListEnterprises(this.State);
856
- if (((_a = this.State.Enterprises) === null || _a === void 0 ? void 0 : _a.length) > 0) {
857
- yield this.projectService.GetActiveEnterprise(this.State);
801
+ if (confirm(`Are you sure you want to delete DevOps action '${doaLookup}'?`)) {
802
+ yield this.projectService.DeleteDevOpsAction(this.State, doaLookup);
858
803
  }
859
804
  });
860
805
  }
861
- handleSaveApplication(req) {
862
- var _a;
806
+ DeleteProject(projectLookup) {
863
807
  return __awaiter(this, void 0, void 0, function* () {
864
- const saveEaC = {
865
- EnterpriseLookup: this.State.EaC.EnterpriseLookup,
866
- Applications: {},
867
- Projects: {},
868
- };
869
- const existingProj = Object.assign({}, this.State.EaC.Projects[req.ProjectLookup]);
870
- if (((_a = existingProj.ApplicationLookups) === null || _a === void 0 ? void 0 : _a.indexOf(req.ApplicationLookup)) < 0) {
871
- if (!existingProj.ApplicationLookups) {
872
- existingProj.ApplicationLookups = [];
873
- }
874
- existingProj.ApplicationLookups.push(req.ApplicationLookup);
875
- saveEaC.Projects[req.ProjectLookup] = existingProj;
876
- }
877
- if (req.Application) {
878
- saveEaC.Applications[req.ApplicationLookup] = req.Application;
808
+ if (confirm(`Are you sure you want to delete Project '${projectLookup}'?`)) {
809
+ yield this.projectService.DeleteProject(this.State, projectLookup);
879
810
  }
880
- yield this.projectService.SaveEnterpriseAsCode(this.State, saveEaC);
881
811
  });
882
812
  }
883
- handleSaveDFSModifier(req) {
813
+ DeleteSourceControl(scLookup) {
884
814
  return __awaiter(this, void 0, void 0, function* () {
885
- const saveEaC = {
886
- EnterpriseLookup: this.State.EaC.EnterpriseLookup,
887
- Modifiers: {},
888
- Projects: {},
889
- };
890
- if (req.Modifier) {
891
- saveEaC.Modifiers[req.ModifierLookup] = req.Modifier;
892
- }
893
- if (req.ProjectLookup) {
894
- saveEaC.Projects[req.ProjectLookup] = {
895
- ModifierLookups: [req.ModifierLookup],
896
- };
815
+ if (confirm(`Are you sure you want to delete Source Control '${scLookup}'?`)) {
816
+ yield this.projectService.DeleteSourceControl(this.State, scLookup);
897
817
  }
898
- yield this.projectService.SaveEnterpriseAsCode(this.State, saveEaC);
899
818
  });
900
819
  }
901
- handleSaveEnvironment(req) {
820
+ // this.appsFlowEventsSvc.EnsureUserEnterpriseEvent.subscribe(async () => {
821
+ // await this.projectService.EnsureUserEnterprise(this.State);
822
+ // });
823
+ EnsureUserEnterprise(appLookup, appName) {
902
824
  return __awaiter(this, void 0, void 0, function* () {
903
- const saveEaC = {
904
- EnterpriseLookup: this.State.EaC.EnterpriseLookup,
905
- DataTokens: {},
906
- Environments: {},
907
- };
908
- if (req.Environment) {
909
- saveEaC.Environments[req.EnvironmentLookup] = req.Environment;
910
- }
911
- if (req.EnterpriseDataTokens) {
912
- saveEaC.DataTokens = req.EnterpriseDataTokens;
913
- }
914
- yield this.projectService.SaveEnterpriseAsCode(this.State, saveEaC);
825
+ yield this.projectService.EnsureUserEnterprise(this.State);
826
+ });
827
+ }
828
+ LoadEnterpriseAsCode() {
829
+ return __awaiter(this, void 0, void 0, function* () {
830
+ yield this.projectService.LoadEnterpriseAsCode(this.State);
831
+ });
832
+ }
833
+ SaveApplicationAsCode(req) {
834
+ return __awaiter(this, void 0, void 0, function* () {
835
+ yield this.handleSaveApplication(req);
836
+ });
837
+ }
838
+ SaveDFSModifierEvent(req) {
839
+ return __awaiter(this, void 0, void 0, function* () {
840
+ yield this.handleSaveDFSModifier(req);
841
+ });
842
+ }
843
+ SaveEnterpriseAsCode(eac) {
844
+ return __awaiter(this, void 0, void 0, function* () {
845
+ yield this.projectService.SaveEnterpriseAsCode(this.State, eac);
846
+ });
847
+ }
848
+ SaveEnvironmentAsCode(req) {
849
+ return __awaiter(this, void 0, void 0, function* () {
850
+ yield this.handleSaveEnvironment(req);
851
+ });
852
+ }
853
+ SaveProjectAsCode(req) {
854
+ return __awaiter(this, void 0, void 0, function* () {
855
+ yield this.handleSaveProject(req.ProjectLookup, req.Project);
856
+ });
857
+ }
858
+ SetCreatingProject(creatingProject) {
859
+ return __awaiter(this, void 0, void 0, function* () {
860
+ this.projectService.SetCreatingProject(creatingProject);
861
+ });
862
+ }
863
+ SetEditProjectSettings(projectLookup) {
864
+ return __awaiter(this, void 0, void 0, function* () {
865
+ yield this.projectService.SetEditProjectSettings(this.State, projectLookup);
866
+ });
867
+ }
868
+ UnpackLowCodeUnit(req) {
869
+ return __awaiter(this, void 0, void 0, function* () {
870
+ if (confirm(`Are you sure you want to unpack application '${req.ApplicationName}' with version '${req.Version}'?`)) {
871
+ yield this.projectService.UnpackLowCodeUnit(this.State, req);
872
+ }
873
+ });
874
+ }
875
+ setServices() {
876
+ // this.appsFlowEventsSvc.ListProjectsEvent.subscribe((withLoading) => {
877
+ // this.projectService.ListProjects(this.State, withLoading);
878
+ // });
879
+ }
880
+ // Helpers
881
+ handleSaveApplication(req) {
882
+ var _a;
883
+ return __awaiter(this, void 0, void 0, function* () {
884
+ const saveEaC = {
885
+ EnterpriseLookup: this.State.EaC.EnterpriseLookup,
886
+ Applications: {},
887
+ Projects: {},
888
+ };
889
+ const existingProj = Object.assign({}, this.State.EaC.Projects[req.ProjectLookup]);
890
+ if (((_a = existingProj.ApplicationLookups) === null || _a === void 0 ? void 0 : _a.indexOf(req.ApplicationLookup)) < 0) {
891
+ if (!existingProj.ApplicationLookups) {
892
+ existingProj.ApplicationLookups = [];
893
+ }
894
+ existingProj.ApplicationLookups.push(req.ApplicationLookup);
895
+ saveEaC.Projects[req.ProjectLookup] = existingProj;
896
+ }
897
+ if (req.Application) {
898
+ saveEaC.Applications[req.ApplicationLookup] = req.Application;
899
+ }
900
+ yield this.projectService.SaveEnterpriseAsCode(this.State, saveEaC);
901
+ });
902
+ }
903
+ handleSaveDFSModifier(req) {
904
+ return __awaiter(this, void 0, void 0, function* () {
905
+ const saveEaC = {
906
+ EnterpriseLookup: this.State.EaC.EnterpriseLookup,
907
+ Modifiers: {},
908
+ Projects: {},
909
+ };
910
+ if (req.Modifier) {
911
+ saveEaC.Modifiers[req.ModifierLookup] = req.Modifier;
912
+ }
913
+ if (req.ProjectLookup) {
914
+ saveEaC.Projects[req.ProjectLookup] = {
915
+ ModifierLookups: [req.ModifierLookup],
916
+ };
917
+ }
918
+ yield this.projectService.SaveEnterpriseAsCode(this.State, saveEaC);
919
+ });
920
+ }
921
+ handleSaveEnvironment(req) {
922
+ return __awaiter(this, void 0, void 0, function* () {
923
+ const saveEaC = {
924
+ EnterpriseLookup: this.State.EaC.EnterpriseLookup,
925
+ DataTokens: {},
926
+ Environments: {},
927
+ };
928
+ if (req.Environment) {
929
+ saveEaC.Environments[req.EnvironmentLookup] = req.Environment;
930
+ }
931
+ if (req.EnterpriseDataTokens) {
932
+ saveEaC.DataTokens = req.EnterpriseDataTokens;
933
+ }
934
+ yield this.projectService.SaveEnterpriseAsCode(this.State, saveEaC);
915
935
  });
916
936
  }
917
937
  handleSaveProject(projectLookup, project) {
918
938
  var _a;
919
939
  return __awaiter(this, void 0, void 0, function* () {
920
940
  const projHosts = {};
921
- (_a = project === null || project === void 0 ? void 0 : project.Hosts) === null || _a === void 0 ? void 0 : _a.forEach(host => {
941
+ (_a = project === null || project === void 0 ? void 0 : project.Hosts) === null || _a === void 0 ? void 0 : _a.forEach((host) => {
922
942
  projHosts[host] = this.State.EaC.Hosts[host];
923
943
  });
924
944
  const saveEaC = {
@@ -933,54 +953,98 @@ class ApplicationsFlowProjectsElementComponent extends LcuElementComponent {
933
953
  this.appsFlowEventsSvc.SetEditProjectSettings(projectLookup);
934
954
  });
935
955
  }
936
- setServices() {
937
- this.appsFlowEventsSvc.DeleteApplicationEvent.subscribe((appLookup) => __awaiter(this, void 0, void 0, function* () {
938
- yield this.projectService.DeleteApplication(this.State, appLookup);
939
- }));
940
- this.appsFlowEventsSvc.DeleteDevOpsActionEvent.subscribe((doaLookup) => __awaiter(this, void 0, void 0, function* () {
941
- yield this.projectService.DeleteDevOpsAction(this.State, doaLookup);
942
- }));
943
- this.appsFlowEventsSvc.DeleteProjectEvent.subscribe((projectLookup) => __awaiter(this, void 0, void 0, function* () {
944
- yield this.projectService.DeleteProject(this.State, projectLookup);
945
- }));
946
- this.appsFlowEventsSvc.DeleteSourceControlEvent.subscribe((scLookup) => __awaiter(this, void 0, void 0, function* () {
947
- yield this.projectService.DeleteSourceControl(this.State, scLookup);
948
- }));
949
- this.appsFlowEventsSvc.EnsureUserEnterpriseEvent.subscribe(() => __awaiter(this, void 0, void 0, function* () {
950
- yield this.projectService.EnsureUserEnterprise(this.State);
951
- }));
952
- // this.appsFlowEventsSvc.ListProjectsEvent.subscribe((withLoading) => {
953
- // this.projectService.ListProjects(this.State, withLoading);
954
- // });
955
- this.appsFlowEventsSvc.LoadEnterpriseAsCodeEvent.subscribe(() => __awaiter(this, void 0, void 0, function* () {
956
- yield this.projectService.LoadEnterpriseAsCode(this.State);
957
- }));
958
- this.appsFlowEventsSvc.SaveEnterpriseAsCodeEvent.subscribe((eac) => __awaiter(this, void 0, void 0, function* () {
959
- yield this.projectService.SaveEnterpriseAsCode(this.State, eac);
960
- }));
961
- this.appsFlowEventsSvc.SaveApplicationAsCodeEvent.subscribe((req) => __awaiter(this, void 0, void 0, function* () {
962
- yield this.handleSaveApplication(req);
963
- }));
964
- this.appsFlowEventsSvc.SaveDFSModifierEvent.subscribe((req) => __awaiter(this, void 0, void 0, function* () {
965
- yield this.handleSaveDFSModifier(req);
966
- }));
967
- this.appsFlowEventsSvc.SaveEnvironmentAsCodeEvent.subscribe((req) => __awaiter(this, void 0, void 0, function* () {
968
- yield this.handleSaveEnvironment(req);
969
- }));
970
- this.appsFlowEventsSvc.SaveProjectAsCodeEvent.subscribe((req) => __awaiter(this, void 0, void 0, function* () {
971
- yield this.handleSaveProject(req.ProjectLookup, req.Project);
972
- }));
973
- this.appsFlowEventsSvc.SetCreatingProjectEvent.subscribe((creatingProject) => {
974
- this.projectService.SetCreatingProject(creatingProject);
956
+ }
957
+ EaCService.ɵprov = ɵɵdefineInjectable({ factory: function EaCService_Factory() { return new EaCService(ɵɵinject(ApplicationsFlowEventsService), ɵɵinject(ProjectService)); }, token: EaCService, providedIn: "root" });
958
+ EaCService.decorators = [
959
+ { type: Injectable, args: [{
960
+ providedIn: 'root',
961
+ },] }
962
+ ];
963
+ EaCService.ctorParameters = () => [
964
+ { type: ApplicationsFlowEventsService },
965
+ { type: ProjectService }
966
+ ];
967
+
968
+ class ApplicationsFlowProjectsElementState {
969
+ }
970
+ class ApplicationsFlowProjectsContext extends LCUElementContext {
971
+ }
972
+ const SELECTOR_APPLICATIONS_FLOW_PROJECTS_ELEMENT = 'applications-flow-projects-element';
973
+ class ApplicationsFlowProjectsElementComponent extends LcuElementComponent {
974
+ // Constructors
975
+ constructor(injector, appsFlowSvc, projectService, eacSvc) {
976
+ super(injector);
977
+ this.injector = injector;
978
+ this.appsFlowSvc = appsFlowSvc;
979
+ this.projectService = projectService;
980
+ this.eacSvc = eacSvc;
981
+ }
982
+ // Properties
983
+ get ActiveEnvironment() {
984
+ var _a, _b;
985
+ return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[this.ActiveEnvironmentLookup];
986
+ }
987
+ get ActiveEnvironmentLookup() {
988
+ var _a, _b;
989
+ // TODO: Eventually support multiple environments
990
+ const envLookups = Object.keys(((_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments) || {});
991
+ return envLookups[0];
992
+ }
993
+ get CreatingProject() {
994
+ return this.projectService.CreatingProject;
995
+ }
996
+ get EditingProject() {
997
+ var _a, _b, _c, _d;
998
+ return ((_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Projects) ? (_d = (_c = this.State) === null || _c === void 0 ? void 0 : _c.EaC) === null || _d === void 0 ? void 0 : _d.Projects[this.EditingProjectLookup] : null;
999
+ }
1000
+ get EditingProjectLookup() {
1001
+ return this.projectService.EditingProjectLookup;
1002
+ }
1003
+ get ProjectLookups() {
1004
+ var _a, _b;
1005
+ return Object.keys(((_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Projects) || {});
1006
+ }
1007
+ get State() {
1008
+ return this.eacSvc.State;
1009
+ }
1010
+ // Life Cycle
1011
+ ngOnDestroy() { }
1012
+ ngOnInit() {
1013
+ super.ngOnInit();
1014
+ this.handleStateChange().then((eac) => { });
1015
+ // this.setupProjectMonitor();
1016
+ }
1017
+ // API Methods
1018
+ ActiveEnterpriseChanged(event) {
1019
+ return __awaiter(this, void 0, void 0, function* () {
1020
+ yield this.projectService.SetActiveEnterprise(this.State, event.value);
975
1021
  });
976
- this.appsFlowEventsSvc.SetEditProjectSettingsEvent.subscribe((projectLookup) => __awaiter(this, void 0, void 0, function* () {
977
- yield this.projectService.SetEditProjectSettings(this.State, projectLookup);
978
- }));
979
- this.appsFlowEventsSvc.UnpackLowCodeUnitEvent.subscribe((req) => __awaiter(this, void 0, void 0, function* () {
980
- if (confirm(`Are you sure you want to unpack application '${req.ApplicationName}' with version '${req.Version}'?`)) {
981
- yield this.projectService.UnpackLowCodeUnit(this.State, req);
1022
+ }
1023
+ ConfigureDevOpsAction(devOpsActionLookup) {
1024
+ this.State.Loading = true;
1025
+ this.appsFlowSvc
1026
+ .ConfigureDevOpsAction(devOpsActionLookup)
1027
+ .subscribe((response) => {
1028
+ if (response.Status.Code === 0) {
1029
+ this.projectService.LoadEnterpriseAsCode(this.State);
982
1030
  }
983
- }));
1031
+ else {
1032
+ this.State.Loading = false;
1033
+ }
1034
+ });
1035
+ }
1036
+ // Helpers
1037
+ handleStateChange() {
1038
+ var _a;
1039
+ return __awaiter(this, void 0, void 0, function* () {
1040
+ this.State.Loading = true;
1041
+ yield this.projectService.HasValidConnection(this.State);
1042
+ yield this.projectService.EnsureUserEnterprise(this.State);
1043
+ yield this.projectService.ListEnterprises(this.State);
1044
+ if (((_a = this.State.Enterprises) === null || _a === void 0 ? void 0 : _a.length) > 0) {
1045
+ yield this.projectService.GetActiveEnterprise(this.State);
1046
+ }
1047
+ });
984
1048
  }
985
1049
  }
986
1050
  ApplicationsFlowProjectsElementComponent.decorators = [
@@ -994,7 +1058,7 @@ ApplicationsFlowProjectsElementComponent.ctorParameters = () => [
994
1058
  { type: Injector },
995
1059
  { type: ApplicationsFlowService },
996
1060
  { type: ProjectService },
997
- { type: ApplicationsFlowEventsService }
1061
+ { type: EaCService }
998
1062
  ];
999
1063
 
1000
1064
  class HostingDetailsFormGroupComponent {
@@ -1818,10 +1882,10 @@ GeneralComponent.propDecorators = {
1818
1882
 
1819
1883
  class AppsFlowComponent {
1820
1884
  // Constructors
1821
- constructor(formBldr, appsFlowSvc, appsFlowEventsSvc) {
1885
+ constructor(formBldr, appsFlowSvc, eacSvc) {
1822
1886
  this.formBldr = formBldr;
1823
1887
  this.appsFlowSvc = appsFlowSvc;
1824
- this.appsFlowEventsSvc = appsFlowEventsSvc;
1888
+ this.eacSvc = eacSvc;
1825
1889
  this.EditingApplicationLookup = null;
1826
1890
  this.redirectTooltip = '';
1827
1891
  // this.IsPermanent = false;
@@ -2034,9 +2098,7 @@ class AppsFlowComponent {
2034
2098
  this.SetEditingApplication(Guid.CreateRaw());
2035
2099
  }
2036
2100
  DeleteApplication(appLookup, appName) {
2037
- if (confirm(`Are you sure you want to delete application '${appName}'?`)) {
2038
- this.appsFlowEventsSvc.DeleteApplication(appLookup);
2039
- }
2101
+ this.eacSvc.DeleteApplication(appLookup, appName);
2040
2102
  }
2041
2103
  LCUTypeChanged(event) {
2042
2104
  this.LCUType = event.value;
@@ -2175,7 +2237,7 @@ class AppsFlowComponent {
2175
2237
  else if (app) {
2176
2238
  app.SourceControlLookup = null;
2177
2239
  }
2178
- this.appsFlowEventsSvc.SaveApplicationAsCode(saveAppReq);
2240
+ this.eacSvc.SaveApplicationAsCode(saveAppReq);
2179
2241
  }
2180
2242
  SetEditingApplication(appLookup) {
2181
2243
  this.EditingApplicationLookup = appLookup;
@@ -2195,7 +2257,7 @@ class AppsFlowComponent {
2195
2257
  }
2196
2258
  Unpack(appLookup, app) {
2197
2259
  var _a, _b, _c;
2198
- this.appsFlowEventsSvc.UnpackLowCodeUnit({
2260
+ this.eacSvc.UnpackLowCodeUnit({
2199
2261
  ApplicationLookup: appLookup,
2200
2262
  ApplicationName: (_a = app.Application) === null || _a === void 0 ? void 0 : _a.Name,
2201
2263
  Version: ((_b = app.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Version) || ((_c = app.LowCodeUnit) === null || _c === void 0 ? void 0 : _c.Build),
@@ -2395,7 +2457,7 @@ AppsFlowComponent.decorators = [
2395
2457
  AppsFlowComponent.ctorParameters = () => [
2396
2458
  { type: FormBuilder },
2397
2459
  { type: ApplicationsFlowService },
2398
- { type: ApplicationsFlowEventsService }
2460
+ { type: EaCService }
2399
2461
  ];
2400
2462
  AppsFlowComponent.propDecorators = {
2401
2463
  Data: [{ type: Input, args: ['data',] }],
@@ -3564,8 +3626,8 @@ class SlottedCardComponent {
3564
3626
  SlottedCardComponent.decorators = [
3565
3627
  { type: Component, args: [{
3566
3628
  selector: 'lcu-slotted-card',
3567
- template: "<mat-card class=\"col-info-card\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title class=\"card-title\">{{ Title }}</mat-card-title>\n <mat-icon class=\"header-icon\">{{ Icon }}</mat-icon>\n </mat-card-header>\n \n <mat-card-content>\n\n <div class=\"slot-main-container\">\n\n <div class=\"header-description\">{{ MainSlotDescription }}</div>\n\n <div class=\"slot-main\">\n <ng-content></ng-content>\n </div>\n \n </div>\n\n <div *ngIf=\"SecondarySlotDescription\" class=\"slot-secondary-container\">\n\n <div class=\"header-description\">{{ SecondarySlotDescription }}</div>\n\n <div class=\"slot-secondary\">\n <ng-content select=\"[secondary]\"></ng-content>\n </div>\n \n </div>\n \n </mat-card-content>\n\n <mat-card-actions *ngIf=\"ActionText\" fxLayoutAlign=\"center\">\n <button mat-button class=\"slotted-card-action-btn\" click=\"MainActionClickEvent()\">{{ ActionText }}</button>\n </mat-card-actions>\n\n </mat-card>\n\n\n",
3568
- styles: [".col-info-card{background-color:#fff;border:2px solid #d3d3d3;margin:20px;padding:0}.header-icon{margin-right:10px}.card-title{font-size:30px;margin-bottom:0}.header-description{background-color:#d3d3d3;margin-left:-2px;padding:10px}mat-card-actions{margin-bottom:0!important;margin-left:-1px!important;margin-right:0!important}.slotted-card-action-btn{border-radius:0 0 2px 2px;border-top:1px solid #d3d3d3;width:100%}"]
3629
+ template: "<mat-card class=\"col-info-card\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title class=\"card-title\">{{ Title }}</mat-card-title>\n <mat-icon class=\"header-icon\">{{ Icon }}</mat-icon>\n </mat-card-header>\n \n <mat-card-content>\n\n <div class=\"slot-main-container\">\n\n <div class=\"header-description\">{{ MainSlotDescription }}</div>\n\n <div class=\"slot-main\">\n <ng-content></ng-content>\n </div>\n \n </div>\n\n <div *ngIf=\"SecondarySlotDescription\" class=\"slot-secondary-container\">\n\n <div class=\"header-description\">{{ SecondarySlotDescription }}</div>\n\n <div class=\"slot-secondary\">\n <ng-content select=\"[secondary]\"></ng-content>\n </div>\n \n </div>\n \n </mat-card-content>\n\n <mat-card-actions *ngIf=\"ActionText\" fxLayoutAlign=\"center\">\n <a mat-button class=\"slotted-card-action-btn\" [href]=\"ActionPath\">{{ ActionText }}</a>\n </mat-card-actions>\n\n </mat-card>\n\n\n",
3630
+ styles: [".col-info-card{border:2px solid #d3d3d3;margin:20px;padding:0}.header-icon{margin-right:10px}.card-title{font-size:30px;margin-bottom:0}.header-description{background-color:#d3d3d3;margin-left:-2px;padding:10px}mat-card-actions{margin-bottom:0!important;margin-left:-1px!important;margin-right:0!important}.slotted-card-action-btn{border-radius:0 0 2px 2px;border-top:1px solid #d3d3d3;width:100%}"]
3569
3631
  },] }
3570
3632
  ];
3571
3633
  SlottedCardComponent.ctorParameters = () => [];
@@ -3575,6 +3637,7 @@ SlottedCardComponent.propDecorators = {
3575
3637
  MainSlotDescription: [{ type: Input, args: ['main-slot-description',] }],
3576
3638
  SecondarySlotDescription: [{ type: Input, args: ['secondary-slot-description',] }],
3577
3639
  ActionText: [{ type: Input, args: ['action-text',] }],
3640
+ ActionPath: [{ type: Input, args: ['action-path',] }],
3578
3641
  MainActionClicked: [{ type: Output, args: ['main-action-clicked',] }]
3579
3642
  };
3580
3643
 
@@ -3596,7 +3659,7 @@ ProjectInfoCardComponent.decorators = [
3596
3659
  { type: Component, args: [{
3597
3660
  selector: 'lcu-project-info-card',
3598
3661
  template: "<mat-card class=\"project-info-card\">\n\n <div class=\"header-img-container\" fxLayout=\"row\" >\n <div class=\"round-project-img\" fxLayoutAlign=\"center center\">\n <mat-icon class=\"temp-icon\">flutter_dash</mat-icon>\n </div>\n </div>\n\n <div class=\"icon-btn-container\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\" >\n <button mat-icon-button id=\"left-icon\" (click)=\"LeftIconClicked()\">\n <mat-icon>settings</mat-icon>\n </button>\n <button mat-icon-button id=\"right-icon\" (click)=\"RightIconClicked()\">\n <mat-icon>share</mat-icon>\n </button>\n </div>\n\n <mat-card-header class=\"project-card-header\" fxLayoutAlign=\"center center\">\n\n <mat-card-title class=\"project-card-name\" *ngIf=\"Name\">{{Name}}</mat-card-title>\n\n <mat-card-subtitle class=\"project-card-description\" *ngIf=\"Description\">{{Description}}</mat-card-subtitle>\n\n <mat-card-subtitle class=\"project-card-host\">\n <a class=\"host-anchor\" *ngIf=\"Subtext\" [href]=\"Subtext\" target=\"_blank\">{{Subtext}}</a>\n </mat-card-subtitle>\n\n </mat-card-header>\n <mat-card-content class=\"card-content-container\">\n <div class=\"stats-container\">\n <ng-content select=\"[stats]\"></ng-content>\n </div>\n\n <div class=\"promo-container\">\n <ng-content select=\"[promo]\"></ng-content>\n </div>\n\n </mat-card-content>\n <mat-card-actions class=\"actions-container\">\n <ng-content select=\"[action]\"></ng-content>\n \n </mat-card-actions>\n </mat-card>\n \n",
3599
- styles: [".project-info-card{background-color:#fff;border:2px solid #d3d3d3;margin:20px;padding:0}.round-project-img{background-color:#dfeff2;border:2px solid #fff;border-radius:40px;height:75px;margin-top:20px;text-align:center;width:75px}.temp-icon{font-size:50px;height:50px;width:50px}.icon-btn-container{margin:5px}.project-card-header{margin-top:50px;text-align:center}.host-anchor{color:#4a918e;text-decoration:none}.header-img-container{background-color:#a4bab3;border-radius:2px 2px 0 0;height:60px;justify-content:center;margin-right:-.5px;margin-top:-.5px!important}.project-card-name{font-size:30px;font-weight:600}.card-content-container{margin-bottom:0!important}.stats-container{border-bottom:1px solid #d3d3d3;border-top:1px solid #d3d3d3}mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}.actions-container{padding:0!important}.info-card-btn{border-radius:0 0 2px 2px;border-top:1px solid #d3d3d3;width:100%}"]
3662
+ styles: [".project-info-card{border:2px solid #d3d3d3;margin:20px;padding:0}.round-project-img{background-color:#dfeff2;border:2px solid #fff;border-radius:40px;height:75px;margin-top:20px;text-align:center;width:75px}.temp-icon{font-size:50px;height:50px;width:50px}.icon-btn-container{margin:5px}.project-card-header{margin-top:50px;text-align:center}.host-anchor{color:#4a918e;text-decoration:none}.header-img-container{background-color:#a4bab3;border-radius:2px 2px 0 0;height:60px;justify-content:center;margin-right:-.5px;margin-top:-.5px!important}.project-card-name{font-size:30px;font-weight:600}.card-content-container{margin-bottom:0!important}.stats-container{border-bottom:1px solid #d3d3d3;border-top:1px solid #d3d3d3}mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}.actions-container{padding:0!important}.info-card-btn{border-radius:0 0 2px 2px;border-top:1px solid #d3d3d3;width:100%}"]
3600
3663
  },] }
3601
3664
  ];
3602
3665
  ProjectInfoCardComponent.ctorParameters = () => [];
@@ -3619,7 +3682,7 @@ AnalyticsCardComponent.decorators = [
3619
3682
  { type: Component, args: [{
3620
3683
  selector: 'lcu-analytics-card',
3621
3684
  template: "<mat-card class=\"analytics-card\">\n <mat-card-header>\n <mat-card-title *ngIf=\"Title\">{{Title}}</mat-card-title>\n <mat-card-subtitle *ngIf=\"Subtext\">{{Subtext}}</mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <!-- <ng-container *ngFor=\"let atics of analytics \"> -->\n \n <div class=\"analytic-container\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n <div fxLayout=\"column\">\n <div class=\"analytic-number\">57</div>\n <div class=\"analytic-name\">Unique Visitors</div>\n </div>\n\n <div class=\"percent-change increase\" fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <mat-icon>arrow_drop_up</mat-icon>\n <div>{{ .16 | percent}}</div>\n </div>\n\n <!-- <div class=\"percent-change decrease\" fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <mat-icon>arrow_drop_down</mat-icon>\n <div>16</div>\n </div> -->\n </div>\n\n <!-- </ng-container> -->\n </mat-card-content>\n <!-- <mat-card-actions>\n <button mat-button>LIKE</button>\n <button mat-button>SHARE</button>\n </mat-card-actions> -->\n </mat-card>\n",
3622
- styles: [".analytics-card{background-color:#fff;border:2px solid #d3d3d3;margin:20px;padding:10px}.increase{color:green}.decrease{color:red}"]
3685
+ styles: [".analytics-card{border:2px solid #d3d3d3;margin:20px;padding:10px}.increase{color:green}.decrease{color:red}"]
3623
3686
  },] }
3624
3687
  ];
3625
3688
  AnalyticsCardComponent.ctorParameters = () => [];
@@ -3648,7 +3711,7 @@ FeedCardSmComponent.decorators = [
3648
3711
  { type: Component, args: [{
3649
3712
  selector: 'lcu-feed-card-sm',
3650
3713
  template: "<mat-card class=\"social-card\">\n <div class=\"feed-card-container\" fxLayout=\"row\">\n <mat-icon *ngIf=\"Icon\" [style.color]=\"IconColor\">{{Icon}}</mat-icon>\n <div class=\"feed-card-main-content\">\n <mat-card-title *ngIf=\"Title\">{{Title}}</mat-card-title>\n <div *ngIf=\"Subtext\">{{Subtext}}</div>\n <div *ngIf=\"Description\">{{Description}}</div>\n <ng-content select=\"[more-details]\"></ng-content>\n </div>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"end\">\n <ng-content select=\"[actions]\"></ng-content>\n </mat-card-actions>\n </mat-card>\n",
3651
- styles: [".social-card{background-color:#fff;border:2px solid #d3d3d3;margin:20px;padding:15px 5px}mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}.main-slot-container{padding:10px}.slot-header{align-items:center}.slot-content{width:100%}.slot-name{font-size:22px;font-weight:600;padding-left:5px}.slot-description{font-size:12px;margin-right:10px}.slot-action-anchor{color:#000;font-size:10px;text-decoration:none}.action-icon{font-size:25px;height:25px;width:25px}.gold-icon{color:#d4af37}.upgrade-text{cursor:pointer;font-weight:700;margin-left:10px}"]
3714
+ styles: [".social-card{border:2px solid #d3d3d3;margin:20px;padding:15px 5px}mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}.main-slot-container{padding:10px}.slot-header{align-items:center}.slot-content{width:100%}.slot-name{font-size:22px;font-weight:600;padding-left:5px}.slot-description{font-size:12px;margin-right:10px}.slot-action-anchor{color:#000;font-size:10px;text-decoration:none}.action-icon{font-size:25px;height:25px;width:25px}.gold-icon{color:#d4af37}.upgrade-text{cursor:pointer;font-weight:700;margin-left:10px}"]
3652
3715
  },] }
3653
3716
  ];
3654
3717
  FeedCardSmComponent.ctorParameters = () => [];
@@ -3725,7 +3788,7 @@ GhControlComponent.decorators = [
3725
3788
  { type: Component, args: [{
3726
3789
  selector: 'lcu-gh-control',
3727
3790
  template: "<mat-card class=\"social-card\">\n <div class=\"gh-card-container\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-icon fxFlex=\"15%\" class=\"gh-icon\">error_outline</mat-icon>\n <div fxFlex=\"70%\"class=\"gh-card-main-content\">\n <mat-form-field appearance=\"fill\" class=\"gh-input\">\n <mat-label>{{InputLabel}}</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"value\">\n <!-- <button *ngIf=\"value\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"value=''\">\n <mat-icon>close</mat-icon>\n </button> -->\n </mat-form-field>\n </div>\n <button fxFlex=\"15%\" mat-button (click)=\"Submit()\" id=\"submit-btn\">Submit</button>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <button mat-button (click)=\"CreatePullRequest()\" id=\"pr-btn\">Pull Request</button>\n <button mat-button (click)=\"OpenIssue()\" id=\"oi-btn\">Open Issue</button>\n <button mat-button (click)=\"CreateFeatureBranch()\" id=\"fb-btn\">Feature Branch</button>\n <button mat-icon-button (click)=\"OpenMoreInfo()\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n </mat-card-actions>\n </mat-card>",
3728
- styles: [".social-card{background-color:#fff;border:2px solid #d3d3d3;margin:20px;padding:15px 5px}mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}.main-slot-container{padding:10px}.slot-header{align-items:center}.slot-content{width:100%}.slot-name{font-size:22px;font-weight:600;padding-left:5px}.slot-description{font-size:12px;margin-right:10px}.slot-action-anchor{color:#000;font-size:10px;text-decoration:none}.action-icon{font-size:25px;height:25px;width:25px}.gold-icon{color:#d4af37}.upgrade-text{cursor:pointer;font-weight:700;margin-left:10px}.gh-icon{font-size:60px;height:60px;text-align:center;width:60px}.gh-input{width:90%}.selected{border:1px solid green}::ng-deep .mat-form-field-flex{border:1px solid;border-radius:30px!important}::ng-deep .mat-form-field-wrapper{padding-bottom:0!important}"]
3791
+ styles: [".social-card{border:2px solid #d3d3d3;margin:20px;padding:15px 5px}mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}.main-slot-container{padding:10px}.slot-header{align-items:center}.slot-content{width:100%}.slot-name{font-size:22px;font-weight:600;padding-left:5px}.slot-description{font-size:12px;margin-right:10px}.slot-action-anchor{color:#000;font-size:10px;text-decoration:none}.action-icon{font-size:25px;height:25px;width:25px}.gold-icon{color:#d4af37}.upgrade-text{cursor:pointer;font-weight:700;margin-left:10px}.gh-icon{font-size:60px;height:60px;text-align:center;width:60px}.gh-input{width:90%}.selected{border:1px solid green}::ng-deep .mat-form-field-flex{border:1px solid;border-radius:30px!important}::ng-deep .mat-form-field-wrapper{padding-bottom:0!important}"]
3729
3792
  },] }
3730
3793
  ];
3731
3794
  GhControlComponent.ctorParameters = () => [];
@@ -3742,7 +3805,7 @@ MainFeedCardComponent.decorators = [
3742
3805
  { type: Component, args: [{
3743
3806
  selector: 'lcu-main-feed-card',
3744
3807
  template: "<mat-card class=\"social-card\">\n <mat-card-header fxLayout=\"row\">\n <div *ngIf=\"Avatar\" mat-card-avatar class=\"example-header-image\" [style.backgroundImage]=\"Avatar\" fxFlex=\"10%\"></div>\n <div class=\"header-main-content-container\" fxFlex=\"80%\">\n <mat-card-title *ngIf=\"Title\">{{Title}}</mat-card-title>\n <div *ngIf=\"Subtext\">{{Subtext}}</div>\n <div *ngIf=\"TimeAgo\">{{TimeAgo}}</div>\n </div>\n <div fxFlex=\"10%\">\n <button mat-icon-button (click)=\"MoreClicked()\" >\n <mat-icon>more_horiz</mat-icon>\n </button>\n </div>\n\n </mat-card-header>\n \n <div class=\"feed-card-container\" fxLayout=\"row\">\n <div class=\"feed-card-main-content\">\n <ng-content select=\"[tabs]\"></ng-content>\n </div>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <ng-content select=\"[actions]\"></ng-content>\n \n\n </mat-card-actions>\n </mat-card>\n",
3745
- styles: [".social-card{background-color:#fff;border:2px solid #d3d3d3;margin:20px;padding:15px 5px}mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}.main-slot-container{padding:10px}.slot-header{align-items:center}.slot-content{width:100%}.slot-name{font-size:22px;font-weight:600;padding-left:5px}.slot-description{font-size:12px;margin-right:10px}.slot-action-anchor{color:#000;font-size:10px;text-decoration:none}.action-icon{font-size:25px;height:25px;width:25px}.gold-icon{color:#d4af37}.upgrade-text{cursor:pointer;font-weight:700;margin-left:10px}.example-header-image{background-size:cover}"]
3808
+ styles: [".social-card{border:2px solid #d3d3d3;margin:20px;padding:15px 5px}mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}.main-slot-container{padding:10px}.slot-header{align-items:center}.slot-content{width:100%}.slot-name{font-size:22px;font-weight:600;padding-left:5px}.slot-description{font-size:12px;margin-right:10px}.slot-action-anchor{color:#000;font-size:10px;text-decoration:none}.action-icon{font-size:25px;height:25px;width:25px}.gold-icon{color:#d4af37}.upgrade-text{cursor:pointer;font-weight:700;margin-left:10px}.example-header-image{background-size:cover}"]
3746
3809
  },] }
3747
3810
  ];
3748
3811
  MainFeedCardComponent.ctorParameters = () => [];
@@ -3833,6 +3896,411 @@ CardCarouselComponent.propDecorators = {
3833
3896
  Stats: [{ type: Input, args: ['stats',] }]
3834
3897
  };
3835
3898
 
3899
+ class SecurityToggleComponent {
3900
+ constructor(formBldr) {
3901
+ this.formBldr = formBldr;
3902
+ }
3903
+ get IsPrivateFormControl() {
3904
+ var _a;
3905
+ return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isPrivate;
3906
+ }
3907
+ ngOnInit() {
3908
+ this.setupSecurityFormGroup();
3909
+ }
3910
+ SecuritySubmit() {
3911
+ console.log("submitting values");
3912
+ }
3913
+ setupSecurityFormGroup() {
3914
+ var _a, _b;
3915
+ this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
3916
+ if (this.EditingApplication != null) {
3917
+ // this.SecurityFormGroup = this.formBldr.group({
3918
+ // name: [this.EditingApplication.Application?.Name, Validators.required],
3919
+ // description: [
3920
+ // this.EditingApplication.Application?.Description,
3921
+ // Validators.required,
3922
+ // ],
3923
+ // route: [
3924
+ // this.EditingApplication.LookupConfig?.PathRegex.replace('.*', '') ||
3925
+ // '/',
3926
+ // Validators.required,
3927
+ // ],
3928
+ // // priority: [
3929
+ // // this.EditingApplication.Application?.Priority || 10000,
3930
+ // // Validators.required,
3931
+ // // ],
3932
+ // procType: [this.ProcessorType, [Validators.required]],
3933
+ // });
3934
+ }
3935
+ this.setupSecurityForm();
3936
+ }
3937
+ setupSecurityForm() {
3938
+ var _a, _b;
3939
+ this.SecurityFormGroup.addControl('isPrivate', this.formBldr.control(((_a = this.EditingApplication.LookupConfig) === null || _a === void 0 ? void 0 : _a.IsPrivate) || false, [Validators.required]));
3940
+ this.SecurityFormGroup.addControl('isTriggerSignIn', this.formBldr.control(((_b = this.EditingApplication.LookupConfig) === null || _b === void 0 ? void 0 : _b.IsTriggerSignIn) || false, [Validators.required]));
3941
+ }
3942
+ }
3943
+ SecurityToggleComponent.decorators = [
3944
+ { type: Component, args: [{
3945
+ selector: 'lcu-security-toggle',
3946
+ template: "<form class=\"security-form\" [formGroup]=\"SecurityFormGroup\" (ngSubmit)=\"SecuritySubmit()\">\n <mat-card class=\"spread flow-card\">\n <mat-card-header>\n <mat-card-title> Security Settings </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-slide-toggle\n formControlName=\"isPrivate\"\n matTooltip=\"Is Secure Application?\"\n >\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Secured Application is one that requires the user to be authenticated to use the application. The application is hosted behind an identity wall.\"\n >\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <div>\n <div *ngIf=\"IsPrivateFormControl.value\">\n <div>\n <mat-slide-toggle formControlName=\"isTriggerSignIn\">\n Is Trigger Sign In Application?\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Trigger Sign In Application will direct the user to sign in if they are not already.\"\n >\n info_outline\n </mat-icon>\n </div>\n </div>\n </div>\n </mat-card-content>\n \n <mat-card-actions>\n <!-- [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\" -->\n <button mat-raised-button type=\"submit\" >Save Security Settings</button>\n </mat-card-actions>\n </mat-card>\n</form>\n",
3947
+ styles: ["::ng-deep .mat-tooltip{color:#000!important}"]
3948
+ },] }
3949
+ ];
3950
+ SecurityToggleComponent.ctorParameters = () => [
3951
+ { type: FormBuilder }
3952
+ ];
3953
+ SecurityToggleComponent.propDecorators = {
3954
+ EditingApplication: [{ type: Input, args: ['editing-application',] }]
3955
+ };
3956
+
3957
+ class ProcessorDetailsFormComponent {
3958
+ constructor(formBldr) {
3959
+ this.formBldr = formBldr;
3960
+ // this.EditingApplicationLookup = null;
3961
+ this.redirectTooltip = '';
3962
+ }
3963
+ get BuildFormControl() {
3964
+ var _a;
3965
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.build;
3966
+ }
3967
+ get ClientIDFormControl() {
3968
+ var _a;
3969
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientId;
3970
+ }
3971
+ get DefaultFileFormControl() {
3972
+ var _a;
3973
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.defaultFile;
3974
+ }
3975
+ get InboundPathFormControl() {
3976
+ var _a;
3977
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.inboundPath;
3978
+ }
3979
+ get TokenLookupFormControl() {
3980
+ var _a;
3981
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.tokenLookup;
3982
+ }
3983
+ get RedirectFormControl() {
3984
+ var _a;
3985
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.redirect;
3986
+ }
3987
+ get ScopesFormControl() {
3988
+ var _a;
3989
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.scopes;
3990
+ }
3991
+ get SecurityFormControl() {
3992
+ var _a;
3993
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.security;
3994
+ }
3995
+ get SPARootFormControl() {
3996
+ var _a;
3997
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.spaRoot;
3998
+ }
3999
+ get PermanentFormControl() {
4000
+ var _a;
4001
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.permanent;
4002
+ }
4003
+ get PreserveMethodFormControl() {
4004
+ var _a;
4005
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.preserveMethod;
4006
+ }
4007
+ ngOnInit() {
4008
+ this.setupProcessorDetailsForm();
4009
+ }
4010
+ DetermineTooltipText() {
4011
+ let permanentValue = this.PermanentFormControl.value;
4012
+ let preserveValue = this.PreserveMethodFormControl.value;
4013
+ if (permanentValue === true && preserveValue === false) {
4014
+ this.redirectTooltip = '301 – Permanent and Not Preserve';
4015
+ }
4016
+ else if (permanentValue === false && preserveValue === false) {
4017
+ this.redirectTooltip = '302 – Not Permanent and Not Preserve';
4018
+ }
4019
+ else if (permanentValue === false && preserveValue === true) {
4020
+ this.redirectTooltip = '307 – Not Permanent and Preserve';
4021
+ }
4022
+ else if (permanentValue === true && preserveValue === true) {
4023
+ this.redirectTooltip = '308 – Permanent and Preserve';
4024
+ }
4025
+ }
4026
+ SubmitProcessorDetails() {
4027
+ }
4028
+ ProcessorTypeChanged(event) {
4029
+ this.ProcessorType = event.value;
4030
+ this.setupProcessorTypeSubForm();
4031
+ }
4032
+ LCUTypeChanged(event) {
4033
+ this.LCUType = event.value;
4034
+ this.setupLcuTypeSubForm();
4035
+ }
4036
+ //HELPERS
4037
+ cleanupLcuTypeSubForm() {
4038
+ this.ProcessorDetailsFormGroup.removeControl('methods');
4039
+ this.ProcessorDetailsFormGroup.removeControl('apiRoot');
4040
+ this.ProcessorDetailsFormGroup.removeControl('security');
4041
+ this.ProcessorDetailsFormGroup.removeControl('spaRoot');
4042
+ this.ProcessorDetailsFormGroup.removeControl('applicationId');
4043
+ this.ProcessorDetailsFormGroup.removeControl('build');
4044
+ this.ProcessorDetailsFormGroup.removeControl('clientId');
4045
+ this.ProcessorDetailsFormGroup.removeControl('clientSecret');
4046
+ this.ProcessorDetailsFormGroup.removeControl('zipFile');
4047
+ }
4048
+ cleanupProcessorTypeSubForm() {
4049
+ this.ProcessorDetailsFormGroup.removeControl('defaultFile');
4050
+ // this.ApplicationFormGroup.removeControl('dfsLcuType');
4051
+ // this.ApplicationFormGroup.removeControl('oauthLcuType');
4052
+ this.ProcessorDetailsFormGroup.removeControl('scopes');
4053
+ this.ProcessorDetailsFormGroup.removeControl('tokenLookup');
4054
+ this.ProcessorDetailsFormGroup.removeControl('inboundPath');
4055
+ this.ProcessorDetailsFormGroup.removeControl('proxyLcuType');
4056
+ this.ProcessorDetailsFormGroup.removeControl('redirect');
4057
+ this.ProcessorDetailsFormGroup.removeControl('permanent');
4058
+ this.ProcessorDetailsFormGroup.removeControl('preserveMethod');
4059
+ this.cleanupLcuTypeSubForm();
4060
+ }
4061
+ setupLcuTypeSubForm() {
4062
+ this.cleanupLcuTypeSubForm();
4063
+ // this.ApplicationFormGroup.removeControl('package');
4064
+ // this.ApplicationFormGroup.removeControl('version');
4065
+ if (this.LCUType) {
4066
+ switch (this.LCUType) {
4067
+ case 'API':
4068
+ this.setupLCUAPIForm();
4069
+ break;
4070
+ case 'ApplicationPointer':
4071
+ this.setupLCUApplicationPointerForm();
4072
+ break;
4073
+ case 'GitHub':
4074
+ this.setupLCUGitHubForm();
4075
+ break;
4076
+ case 'GitHubOAuth':
4077
+ this.setupLCUGitHubOAuthForm();
4078
+ break;
4079
+ // case 'NPM':
4080
+ // this.setupLCUNPMForm();
4081
+ // break;
4082
+ case 'SPA':
4083
+ this.setupLCUSPAForm();
4084
+ break;
4085
+ case 'Zip':
4086
+ this.setupLCUZipForm();
4087
+ break;
4088
+ }
4089
+ }
4090
+ }
4091
+ setupProcessorDetailsForm() {
4092
+ var _a, _b, _c, _d, _e;
4093
+ this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
4094
+ if (this.EditingApplication != null) {
4095
+ this.ProcessorDetailsFormGroup = this.formBldr.group({
4096
+ name: [(_c = this.EditingApplication.Application) === null || _c === void 0 ? void 0 : _c.Name, Validators.required],
4097
+ description: [
4098
+ (_d = this.EditingApplication.Application) === null || _d === void 0 ? void 0 : _d.Description,
4099
+ Validators.required,
4100
+ ],
4101
+ route: [
4102
+ ((_e = this.EditingApplication.LookupConfig) === null || _e === void 0 ? void 0 : _e.PathRegex.replace('.*', '')) ||
4103
+ '/',
4104
+ Validators.required,
4105
+ ],
4106
+ // priority: [
4107
+ // this.EditingApplication.Application?.Priority || 10000,
4108
+ // Validators.required,
4109
+ // ],
4110
+ procType: [this.ProcessorType, [Validators.required]],
4111
+ });
4112
+ }
4113
+ }
4114
+ setupLCUGitHubForm() {
4115
+ var _a;
4116
+ this.ProcessorDetailsFormGroup.addControl('build', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Build) || 'latest', [Validators.required]));
4117
+ }
4118
+ setupLCUApplicationPointerForm() {
4119
+ var _a;
4120
+ this.ProcessorDetailsFormGroup.addControl('applicationId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ApplicationID) || '', [Validators.required]));
4121
+ }
4122
+ setupLCUNPMForm() {
4123
+ // this.ApplicationFormGroup.addControl(
4124
+ // 'package',
4125
+ // this.formBldr.control(
4126
+ // this.EditingApplication.LowCodeUnit?.Package || '',
4127
+ // [Validators.required]
4128
+ // )
4129
+ // );
4130
+ // this.ApplicationFormGroup.addControl(
4131
+ // 'version',
4132
+ // this.formBldr.control(
4133
+ // this.EditingApplication.LowCodeUnit?.Version || '',
4134
+ // [Validators.required]
4135
+ // )
4136
+ // );
4137
+ }
4138
+ setupLCUSPAForm() {
4139
+ var _a;
4140
+ this.ProcessorDetailsFormGroup.addControl('spaRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SPARoot) || '', [Validators.required]));
4141
+ }
4142
+ setupLCUAPIForm() {
4143
+ var _a, _b, _c, _d;
4144
+ this.ProcessorDetailsFormGroup.addControl('methods', this.formBldr.control(((_b = (_a = this.EditingApplication.LookupConfig) === null || _a === void 0 ? void 0 : _a.AllowedMethods) === null || _b === void 0 ? void 0 : _b.join(' ')) || '', []));
4145
+ this.ProcessorDetailsFormGroup.addControl('apiRoot', this.formBldr.control(((_c = this.EditingApplication.LowCodeUnit) === null || _c === void 0 ? void 0 : _c.APIRoot) || '', [Validators.required]));
4146
+ this.ProcessorDetailsFormGroup.addControl('security', this.formBldr.control(((_d = this.EditingApplication.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Security) || '', [Validators.required]));
4147
+ }
4148
+ setupLCUGitHubOAuthForm() {
4149
+ var _a, _b;
4150
+ this.ProcessorDetailsFormGroup.addControl('clientId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ClientID) || '', [Validators.required]));
4151
+ this.ProcessorDetailsFormGroup.addControl('clientSecret', this.formBldr.control(((_b = this.EditingApplication.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.ClientSecret) || '', [Validators.required]));
4152
+ }
4153
+ setupProxyForm() {
4154
+ var _a, _b;
4155
+ this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
4156
+ this.ProcessorDetailsFormGroup.addControl('inboundPath', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.InboundPath) || '', [Validators.required]));
4157
+ this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
4158
+ }
4159
+ setupRedirectForm() {
4160
+ var _a, _b, _c;
4161
+ this.ProcessorDetailsFormGroup.addControl('redirect', this.formBldr.control(((_a = this.EditingApplication.Processor) === null || _a === void 0 ? void 0 : _a.Redirect) || '', [
4162
+ Validators.required,
4163
+ ]));
4164
+ this.ProcessorDetailsFormGroup.addControl('permanent', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.Permanent) || false, []));
4165
+ this.ProcessorDetailsFormGroup.addControl('preserveMethod', this.formBldr.control(((_c = this.EditingApplication.Processor) === null || _c === void 0 ? void 0 : _c.PreserveMethod) || false, []));
4166
+ this.DetermineTooltipText();
4167
+ }
4168
+ setupOAuthForm() {
4169
+ var _a, _b, _c, _d;
4170
+ this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
4171
+ this.ProcessorDetailsFormGroup.addControl('scopes', this.formBldr.control(((_c = (_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.Scopes) === null || _c === void 0 ? void 0 : _c.Join(' ')) || '', [Validators.required]));
4172
+ this.ProcessorDetailsFormGroup.addControl('tokenLookup', this.formBldr.control(((_d = this.EditingApplication.Processor) === null || _d === void 0 ? void 0 : _d.TokenLookup) || '', [Validators.required]));
4173
+ this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
4174
+ }
4175
+ setupLCUZipForm() {
4176
+ var _a;
4177
+ this.ProcessorDetailsFormGroup.addControl('zipFile', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ZipFile) || '', [Validators.required]));
4178
+ }
4179
+ setupDfsForm() {
4180
+ var _a, _b;
4181
+ this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
4182
+ this.ProcessorDetailsFormGroup.addControl('defaultFile', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.DefaultFile) || 'index.html', [Validators.required]));
4183
+ this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
4184
+ }
4185
+ setupProcessorTypeSubForm() {
4186
+ this.cleanupProcessorTypeSubForm();
4187
+ if (this.ProcessorType) {
4188
+ switch (this.ProcessorType) {
4189
+ case 'DFS':
4190
+ this.setupDfsForm();
4191
+ break;
4192
+ case 'OAuth':
4193
+ this.setupOAuthForm();
4194
+ break;
4195
+ case 'Proxy':
4196
+ this.setupProxyForm();
4197
+ break;
4198
+ case 'Redirect':
4199
+ this.setupRedirectForm();
4200
+ break;
4201
+ }
4202
+ }
4203
+ this.setupLcuTypeSubForm();
4204
+ }
4205
+ }
4206
+ ProcessorDetailsFormComponent.decorators = [
4207
+ { type: Component, args: [{
4208
+ selector: 'lcu-processor-details-form',
4209
+ template: "<form class=\"processor-details-form\" [formGroup]=\"ProcessorDetailsFormGroup\" (ngSubmit)=\"SubmitProcessorDetails()\">\n<mat-card class=\"spread flow-card\">\n <mat-card-header>\n <mat-card-title> Processor Details </mat-card-title>\n </mat-card-header>\n\n <mat-card-content>\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"procType\"\n (selectionChange)=\"ProcessorTypeChanged($event)\"\n required\n >\n <mat-option value=\"DFS\">View Package</mat-option>\n\n <mat-option value=\"Redirect\">Redirect</mat-option>\n\n <mat-option value=\"Proxy\">Proxy</mat-option>\n\n <mat-option value=\"OAuth\">OAuth</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"ProcessorType\">\n <div *ngSwitchCase=\"'DFS'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Default File\"\n formControlName=\"defaultFile\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"NPM\">NPM</mat-option>\n\n <mat-option value=\"GitHub\">GitHub</mat-option>\n\n <!-- <mat-option value=\"Zip\">Zip</mat-option> -->\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHub'\">\n <lcu-source-control-form-controls\n [build-path]=\"EditingApplication?.LowCodeUnit?.Path\"\n [form-group]=\"ProcessorDetailsFormGroup\"\n [source-control]=\"DefaultSourceControl\"\n [use-branches]=\"false\"\n [use-build-path]=\"true\"\n ></lcu-source-control-form-controls>\n\n <mat-form-field\n class=\"mat-full-width\"\n *ngIf=\"\n SourceControlFormControls?.RepositoryFormControl?.valid\n \"\n >\n <input\n matInput\n placeholder=\"Build\"\n formControlName=\"build\"\n required\n />\n\n <mat-hint>\n Current Build:\n {{ EditingApplication?.LowCodeUnit?.CurrentBuild }}\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'NPM'\">\n <lcu-npm-package-select\n [npm-package]=\"EditingApplication?.LowCodeUnit?.Package\"\n [npm-package-version]=\"\n EditingApplication?.LowCodeUnit?.Version\n \"\n [form-group]=\"ProcessorDetailsFormGroup\"\n ></lcu-npm-package-select>\n\n <mat-hint>\n Current Version:\n {{ EditingApplication?.LowCodeUnit?.CurrentVersion }}\n </mat-hint>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'OAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Scopes (space separated)\"\n formControlName=\"scopes\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Token Lookup\"\n formControlName=\"tokenLookup\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"GitHubOAuth\">GitHub</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHubOAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client ID\"\n formControlName=\"clientId\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client Secret\"\n formControlName=\"clientSecret\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Proxy'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Inbound Path\"\n formControlName=\"inboundPath\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"API\">API</mat-option>\n\n <mat-option value=\"SPA\">Single Page Application</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'API'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"API Root\"\n formControlName=\"apiRoot\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Allowed Methods (separate with spaces)\"\n formControlName=\"methods\"\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Security ({header}~{value})\"\n formControlName=\"security\"\n required\n />\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'SPA'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"SPA Root\"\n formControlName=\"spaRoot\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Redirect'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Redirect URL\"\n formControlName=\"redirect\"\n required\n />\n </mat-form-field>\n\n <div>\n <mat-slide-toggle \n class=\"spread\" \n formControlName=\"permanent\">\n Is Permanent?\n </mat-slide-toggle>\n\n <mat-slide-toggle\n class=\"spread\"\n formControlName=\"preserveMethod\"\n >\n Preserve Method?\n </mat-slide-toggle>\n\n <mat-icon\n class=\"spread\"\n matSuffix\n (mouseenter)=\"DetermineTooltipText()\"\n matTooltip={{redirectTooltip}}\n >\n info_outline\n </mat-icon>\n\n <!-- <mat-icon\n *ngIf=\"!IsPermanent && !IsPreserve\"\n\n class=\"spread\"\n matSuffix\n matTooltip=\"302 \u2013 Not Permanent and Not Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n <!-- <mat-icon\n *ngIf=\"!IsPermanent && IsPreserve\"\n class=\"spread\"\n matSuffix\n matTooltip=\"307 \u2013 Not Permanent and Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n <!-- <mat-icon\n *ngIf=\"IsPermanent && IsPreserve\"\n class=\"spread\"\n matSuffix\n matTooltip=\"308 \u2013 Permanent and Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n \n\n <!-- <mat-icon\n class=\"spread\"\n matSuffix\n matTooltip=\"Values used to control the redirect type. Permanent and Not Preserve = 301; Not Permanent and Not Preserve = 302; Permanent and Preserve = 308; Not Permanent and Not Preserve = 307;\"\n >\n info_outline\n </mat-icon> -->\n </div>\n </div>\n </div>\n </mat-card-content>\n <mat-card-actions>\n <!-- [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\" -->\n <button mat-raised-button type=\"submit\" >Save Security Settings</button>\n </mat-card-actions>\n</mat-card>\n</form>\n \n",
4210
+ styles: [""]
4211
+ },] }
4212
+ ];
4213
+ ProcessorDetailsFormComponent.ctorParameters = () => [
4214
+ { type: FormBuilder }
4215
+ ];
4216
+ ProcessorDetailsFormComponent.propDecorators = {
4217
+ EditingApplication: [{ type: Input, args: ['editing-application',] }]
4218
+ };
4219
+
4220
+ class SourceControlFormComponent {
4221
+ constructor(formBldr) {
4222
+ this.formBldr = formBldr;
4223
+ }
4224
+ get HasBuildFormControl() {
4225
+ var _a;
4226
+ return (_a = this.SourceControlFormGroup) === null || _a === void 0 ? void 0 : _a.controls.hasBuild;
4227
+ }
4228
+ get SourceControlLookupFormControl() {
4229
+ var _a;
4230
+ return (_a = this.SourceControlFormGroup) === null || _a === void 0 ? void 0 : _a.controls.sourceControlLookup;
4231
+ }
4232
+ get SourceControlLookups() {
4233
+ return Object.keys(this.SourceControls || {});
4234
+ }
4235
+ get SourceControls() {
4236
+ console.log("Environment: ", this.Environment);
4237
+ return this.Environment.Sources || {};
4238
+ }
4239
+ ngOnInit() {
4240
+ this.setupSourceControlForm();
4241
+ }
4242
+ SourceControlLookupChanged(event) {
4243
+ // TODO: Anything to do here on change?
4244
+ console.log("sourceControlLookupChanged: ", event);
4245
+ }
4246
+ SubmitSourceControl() {
4247
+ }
4248
+ //HELPER
4249
+ setupSourceControlForm() {
4250
+ var _a, _b;
4251
+ this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
4252
+ this.setupBuildForm();
4253
+ }
4254
+ setupBuildForm() {
4255
+ var _a, _b;
4256
+ this.SourceControlFormGroup.addControl('hasBuild', this.formBldr.control(!!((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SourceControlLookup) || false, [Validators.required]));
4257
+ this.SourceControlFormGroup.addControl('sourceControlLookup', this.formBldr.control(((_b = this.EditingApplication.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.SourceControlLookup) || '', []));
4258
+ }
4259
+ }
4260
+ SourceControlFormComponent.decorators = [
4261
+ { type: Component, args: [{
4262
+ selector: 'lcu-source-control-form',
4263
+ template: "<form class=\"source-control-form\" [formGroup]=\"SourceControlFormGroup\" (ngSubmit)=\"SubmitSourceControl()\">\n\n<mat-card class=\"spread flow-card\" *ngIf=\"ProcessorType != 'Redirect'\">\n <mat-card-header>\n <mat-card-title *ngIf=\"!HasBuildFormControl.value\">\n Build & Source\n </mat-card-title>\n\n <mat-card-title *ngIf=\"HasBuildFormControl.value\">\n Source Control\n </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-slide-toggle\n formControlName=\"hasBuild\"\n matTooltip=\"Has Build?\"\n >\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"Configure source control, DevOps CI/CD, and artifacts.\"\n >\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <mat-form-field\n class=\"mat-full-width\"\n *ngIf=\"\n HasBuildFormControl.value && SourceControlLookups?.length > 0\n \"\n >\n <mat-select\n formControlName=\"sourceControlLookup\"\n placeholder=\"Source Control\"\n (selectionChange)=\"SourceControlLookupChanged($event)\"\n [disabled]=\"\n SourceControlFormControls?.Loading || HostingDetails?.Loading\n \"\n >\n <ng-container\n *ngFor=\"let srcCtrlLookup of SourceControlLookups\"\n >\n <mat-option\n [value]=\"srcCtrlLookup\"\n *ngIf=\"SourceControls[srcCtrlLookup]; let srcCtrl\"\n >\n {{ srcCtrl.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <div *ngIf=\"HasBuildFormControl?.value\">\n <h3>\n @{{\n SourceControlFormControls?.OrganizationFormControl?.value ||\n SourceControl?.Organization\n }}/{{\n SourceControlFormControls?.RepositoryFormControl?.value ||\n SourceControl?.Repository\n }}\n </h3>\n\n <p>Organization and Repository pulled from build settings</p>\n\n <mat-hint>\n CurrentBuild:\n {{ EditingApplication?.LowCodeUnit?.CurrentBuild }}\n </mat-hint>\n </div>\n </mat-form-field>\n\n <div *ngIf=\"SourceControlLookups?.length < 0\">\n <h3>\n Create source control locations under the DevOps tab above.\n </h3>\n </div>\n </mat-card-content>\n <mat-card-actions>\n <!-- [disabled]=\"!SourceControlFormGroup.valid || !SourceControlFormGroup.dirty\" -->\n <button mat-raised-button type=\"submit\" >Save</button>\n </mat-card-actions>\n </mat-card>\n</form>\n",
4264
+ styles: [""]
4265
+ },] }
4266
+ ];
4267
+ SourceControlFormComponent.ctorParameters = () => [
4268
+ { type: FormBuilder }
4269
+ ];
4270
+ SourceControlFormComponent.propDecorators = {
4271
+ EditingApplication: [{ type: Input, args: ['editing-application',] }],
4272
+ Environment: [{ type: Input, args: ['environment',] }],
4273
+ SourceControlFormControls: [{ type: ViewChild, args: [SourceControlFormControlsComponent,] }]
4274
+ };
4275
+
4276
+ class BuildPipelineFormComponent {
4277
+ constructor() { }
4278
+ ngOnInit() {
4279
+ }
4280
+ }
4281
+ BuildPipelineFormComponent.decorators = [
4282
+ { type: Component, args: [{
4283
+ selector: 'lcu-build-pipeline-form',
4284
+ template: "<p>build-pipeline-form works!</p>\n",
4285
+ styles: [""]
4286
+ },] }
4287
+ ];
4288
+ BuildPipelineFormComponent.ctorParameters = () => [];
4289
+
4290
+ class DevopsSourceControlFormComponent {
4291
+ constructor() { }
4292
+ ngOnInit() {
4293
+ }
4294
+ }
4295
+ DevopsSourceControlFormComponent.decorators = [
4296
+ { type: Component, args: [{
4297
+ selector: 'lcu-devops-source-control-form',
4298
+ template: "<p>devops-source-control-form works!</p>\n",
4299
+ styles: [""]
4300
+ },] }
4301
+ ];
4302
+ DevopsSourceControlFormComponent.ctorParameters = () => [];
4303
+
3836
4304
  class ApplicationsFlowModule {
3837
4305
  static forRoot() {
3838
4306
  return {
@@ -3844,6 +4312,7 @@ class ApplicationsFlowModule {
3844
4312
  NPMService,
3845
4313
  FormsService,
3846
4314
  ApplicationsFlowEventsService,
4315
+ EaCService
3847
4316
  ],
3848
4317
  };
3849
4318
  }
@@ -3882,7 +4351,12 @@ ApplicationsFlowModule.decorators = [
3882
4351
  GhControlComponent,
3883
4352
  MainFeedCardComponent,
3884
4353
  TwoColumnHeaderComponent,
3885
- CardCarouselComponent
4354
+ CardCarouselComponent,
4355
+ SecurityToggleComponent,
4356
+ ProcessorDetailsFormComponent,
4357
+ SourceControlFormComponent,
4358
+ BuildPipelineFormComponent,
4359
+ DevopsSourceControlFormComponent
3886
4360
  ],
3887
4361
  imports: [
3888
4362
  FathymSharedModule,
@@ -3891,6 +4365,9 @@ ApplicationsFlowModule.decorators = [
3891
4365
  FlexLayoutModule,
3892
4366
  MaterialModule,
3893
4367
  AppHostModule,
4368
+ MatTooltipModule,
4369
+ MatSlideToggleModule
4370
+ // LazyElementModule,
3894
4371
  ],
3895
4372
  exports: [
3896
4373
  ApplicationsFlowProjectsElementComponent,
@@ -3924,7 +4401,12 @@ ApplicationsFlowModule.decorators = [
3924
4401
  GhControlComponent,
3925
4402
  MainFeedCardComponent,
3926
4403
  TwoColumnHeaderComponent,
3927
- CardCarouselComponent
4404
+ CardCarouselComponent,
4405
+ SecurityToggleComponent,
4406
+ ProcessorDetailsFormComponent,
4407
+ SourceControlFormComponent,
4408
+ BuildPipelineFormComponent,
4409
+ DevopsSourceControlFormComponent
3928
4410
  ],
3929
4411
  entryComponents: [
3930
4412
  ApplicationsFlowProjectsElementComponent,
@@ -3956,7 +4438,12 @@ ApplicationsFlowModule.decorators = [
3956
4438
  GhControlComponent,
3957
4439
  MainFeedCardComponent,
3958
4440
  TwoColumnHeaderComponent,
3959
- CardCarouselComponent
4441
+ CardCarouselComponent,
4442
+ SecurityToggleComponent,
4443
+ ProcessorDetailsFormComponent,
4444
+ SourceControlFormComponent,
4445
+ BuildPipelineFormComponent,
4446
+ DevopsSourceControlFormComponent
3960
4447
  ],
3961
4448
  },] }
3962
4449
  ];
@@ -3989,5 +4476,5 @@ class FormModel {
3989
4476
  * Generated bundle index. Do not edit.
3990
4477
  */
3991
4478
 
3992
- export { ActionsModel, ApplicationsFlowModule, ApplicationsFlowProjectsContext, ApplicationsFlowProjectsElementComponent, ApplicationsFlowProjectsElementState, ApplicationsFlowService, ApplicationsFlowState, ApplicationsFlowStateContext, BaseFormConfigModel, CardFormConfigModel, CreateProjectWizardComponent, DevSettingsPresetModel, DomainModel, DynamicTabsModel, FormActionsModel, FormModel, FormValuesModel, FormsService, GitAuthComponent, GitHubBranch, GitHubOrganization, GitHubRepository, GitHubSetupState, GitHubWorkflowRun, HostingDetailsFormGroupComponent, NPMService, ProjectActionsModel, ProjectHostingDetails, ProjectHostingOption, ProjectHostingOptionInput, ProjectNameComponent, ProjectService, RootDirectoryComponent, SELECTOR_APPLICATIONS_FLOW_PROJECTS_ELEMENT, SourceControlFormControlsComponent, ThreeColumnComponent, UnpackLowCodeUnitRequest, ApplicationsFlowEventsService as ɵa, DynamicTabsComponent as ɵb, HeaderComponent as ɵc, ProjectTabsComponent as ɵd, GeneralComponent as ɵe, DomainsComponent as ɵf, ProjectItemsComponent as ɵg, BuildsComponent as ɵh, RecentActivitiesComponent as ɵi, FormCardComponent as ɵj, BaseFormComponent as ɵk, BaseFormTestComponent as ɵl, AppsFlowComponent as ɵm, DevOpsComponent as ɵn, DFSModifiersComponent as ɵo, NpmPackageSelectComponent as ɵp, ColumnInfoCardComponent as ɵq, SlottedCardComponent as ɵr, ProjectInfoCardComponent as ɵs, AnalyticsCardComponent as ɵt, FeedCardSmComponent as ɵu, GhControlComponent as ɵv, MainFeedCardComponent as ɵw, TwoColumnHeaderComponent as ɵx, CardCarouselComponent as ɵy };
4479
+ export { ActionsModel, ApplicationsFlowModule, ApplicationsFlowProjectsContext, ApplicationsFlowProjectsElementComponent, ApplicationsFlowProjectsElementState, ApplicationsFlowService, ApplicationsFlowState, ApplicationsFlowStateContext, BaseFormConfigModel, CardFormConfigModel, CreateProjectWizardComponent, DevSettingsPresetModel, DomainModel, DynamicTabsModel, EaCService, FormActionsModel, FormModel, FormValuesModel, FormsService, GitAuthComponent, GitHubBranch, GitHubOrganization, GitHubRepository, GitHubSetupState, GitHubWorkflowRun, HostingDetailsFormGroupComponent, NPMService, ProjectActionsModel, ProjectHostingDetails, ProjectHostingOption, ProjectHostingOptionInput, ProjectNameComponent, ProjectService, RootDirectoryComponent, SELECTOR_APPLICATIONS_FLOW_PROJECTS_ELEMENT, SourceControlFormControlsComponent, ThreeColumnComponent, UnpackLowCodeUnitRequest, ApplicationsFlowEventsService as ɵa, DynamicTabsComponent as ɵb, ProcessorDetailsFormComponent as ɵba, SourceControlFormComponent as ɵbb, BuildPipelineFormComponent as ɵbc, DevopsSourceControlFormComponent as ɵbd, HeaderComponent as ɵc, ProjectTabsComponent as ɵd, GeneralComponent as ɵe, DomainsComponent as ɵf, ProjectItemsComponent as ɵg, BuildsComponent as ɵh, RecentActivitiesComponent as ɵi, FormCardComponent as ɵj, BaseFormComponent as ɵk, BaseFormTestComponent as ɵl, AppsFlowComponent as ɵm, DevOpsComponent as ɵn, DFSModifiersComponent as ɵo, NpmPackageSelectComponent as ɵp, ColumnInfoCardComponent as ɵq, SlottedCardComponent as ɵr, ProjectInfoCardComponent as ɵs, AnalyticsCardComponent as ɵt, FeedCardSmComponent as ɵu, GhControlComponent as ɵv, MainFeedCardComponent as ɵw, TwoColumnHeaderComponent as ɵx, CardCarouselComponent as ɵy, SecurityToggleComponent as ɵz };
3993
4480
  //# sourceMappingURL=lowcodeunit-applications-flow-common.js.map