@gravitee/ui-policy-studio-angular 12.15.0 → 12.15.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.
- package/esm2022/lib/environment-flow-studio/gio-environment-flow-studio.component.mjs +145 -0
- package/esm2022/public-api.mjs +2 -1
- package/esm2022/testing/lib/environment-flow-studio/gio-environment-flow-studio.harness.mjs +53 -0
- package/esm2022/testing/public-testing-api.mjs +2 -1
- package/fesm2022/gravitee-ui-policy-studio-angular-testing.mjs +49 -1
- package/fesm2022/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
- package/fesm2022/gravitee-ui-policy-studio-angular.mjs +140 -2
- package/fesm2022/gravitee-ui-policy-studio-angular.mjs.map +1 -1
- package/lib/environment-flow-studio/gio-environment-flow-studio.component.d.ts +54 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/testing/lib/environment-flow-studio/gio-environment-flow-studio.harness.d.ts +21 -0
- package/testing/public-testing-api.d.ts +1 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { ApiType, ConnectorInfo, ExecutionPhase, Policy, PolicyDocumentationFetcher, PolicySchemaFetcher, Step } from '../models';
|
|
3
|
+
import { GioPolicyStudioService } from '../policy-studio/gio-policy-studio.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type EnvironmentFlowOutput = Step[];
|
|
6
|
+
type PhaseVM = {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
startConnectorName: string;
|
|
10
|
+
endConnectorName: string;
|
|
11
|
+
};
|
|
12
|
+
export declare class GioEnvironmentFlowStudioComponent implements OnChanges {
|
|
13
|
+
private readonly policyStudioService;
|
|
14
|
+
/**
|
|
15
|
+
* List of policies usable in the studio
|
|
16
|
+
*/
|
|
17
|
+
policies: Policy[];
|
|
18
|
+
/**
|
|
19
|
+
* Type of the API targeted by the environment flow
|
|
20
|
+
*/
|
|
21
|
+
apiType: ApiType;
|
|
22
|
+
/**
|
|
23
|
+
* Execution phase targeted by the environment flow
|
|
24
|
+
*/
|
|
25
|
+
executionPhase: ExecutionPhase;
|
|
26
|
+
/**
|
|
27
|
+
* Called when Environment-flow Studio needs to fetch the policy schema
|
|
28
|
+
* @returns Observable of the policy schema
|
|
29
|
+
*/
|
|
30
|
+
policySchemaFetcher: PolicySchemaFetcher;
|
|
31
|
+
/**
|
|
32
|
+
* Called when Environment-flow Studio needs to fetch the policy documentation
|
|
33
|
+
* @returns Observable of the policy documentation
|
|
34
|
+
*/
|
|
35
|
+
policyDocumentationFetcher: PolicyDocumentationFetcher;
|
|
36
|
+
/**
|
|
37
|
+
* Output event when the environment flow changes
|
|
38
|
+
*/
|
|
39
|
+
environmentFlowChange: EventEmitter<EnvironmentFlowOutput>;
|
|
40
|
+
protected isLoading: boolean;
|
|
41
|
+
protected readOnly: boolean;
|
|
42
|
+
protected startConnector: (name: string) => ConnectorInfo[];
|
|
43
|
+
protected endConnector: (name: string) => ConnectorInfo[];
|
|
44
|
+
protected phase?: PhaseVM;
|
|
45
|
+
protected steps: Step[];
|
|
46
|
+
protected trialUrl: string | undefined;
|
|
47
|
+
private phases;
|
|
48
|
+
constructor(policyStudioService: GioPolicyStudioService);
|
|
49
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
50
|
+
protected onStepsChange(steps: Step[]): void;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GioEnvironmentFlowStudioComponent, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GioEnvironmentFlowStudioComponent, "gio-environment-flow-studio", never, { "policies": { "alias": "policies"; "required": false; }; "apiType": { "alias": "apiType"; "required": true; }; "executionPhase": { "alias": "executionPhase"; "required": true; }; "policySchemaFetcher": { "alias": "policySchemaFetcher"; "required": true; }; "policyDocumentationFetcher": { "alias": "policyDocumentationFetcher"; "required": true; }; }, { "environmentFlowChange": "environmentFlowChange"; }, never, never, true, never>;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentHarness } from '@angular/cdk/testing';
|
|
2
|
+
import { GioPolicyStudioDetailsPhaseHarness, PhaseType } from '../components/flow-details-phase/gio-ps-flow-details-phase.harness';
|
|
3
|
+
import { StepForm } from '../components/step-form/gio-ps-step-form.harness';
|
|
4
|
+
export declare class GioEnvironmentFlowStudioHarness extends ComponentHarness {
|
|
5
|
+
static hostSelector: string;
|
|
6
|
+
private phaseHarness;
|
|
7
|
+
/**
|
|
8
|
+
* Get flow phase harness
|
|
9
|
+
* @param phaseType Phase type to get
|
|
10
|
+
*/
|
|
11
|
+
getFlowPhase(phaseType: PhaseType): Promise<GioPolicyStudioDetailsPhaseHarness>;
|
|
12
|
+
clickAddStep(index: number): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Add a step to a phase
|
|
15
|
+
* @param index Index where to add the step. (Add button index)
|
|
16
|
+
* @param stepConfig Step to add
|
|
17
|
+
*/
|
|
18
|
+
addStep(index: number, stepConfig: {
|
|
19
|
+
policyName: string;
|
|
20
|
+
} & StepForm): Promise<void>;
|
|
21
|
+
}
|