@gravitee/ui-policy-studio-angular 16.1.0-apim-11657-adapt-ui-for-llm-b7068ef → 16.1.0-bump-storybook-9b78ad4

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.
@@ -152,28 +152,6 @@ function fakeMcpFlow(modifier) {
152
152
  ...modifier,
153
153
  };
154
154
  }
155
- function fakeLlmFlow(modifier) {
156
- const httpSelector = {
157
- type: 'HTTP',
158
- path: '/path',
159
- pathOperator: 'EQUALS',
160
- methods: ['GET'],
161
- };
162
- const base = {
163
- name: 'Flow name',
164
- selectors: [httpSelector],
165
- request: [],
166
- response: [],
167
- enabled: true,
168
- };
169
- if (isFunction(modifier)) {
170
- return modifier(base);
171
- }
172
- return {
173
- ...base,
174
- ...modifier,
175
- };
176
- }
177
155
 
178
156
  /*
179
157
  * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
@@ -351,7 +329,6 @@ function fakeTestPolicy(modifier) {
351
329
  flowPhaseCompatibility: {
352
330
  HTTP_PROXY: ['REQUEST', 'RESPONSE'],
353
331
  HTTP_MCP_PROXY: ['REQUEST', 'RESPONSE'],
354
- HTTP_LLM_PROXY: ['REQUEST', 'RESPONSE'],
355
332
  HTTP_MESSAGE: ['REQUEST', 'RESPONSE', 'SUBSCRIBE', 'PUBLISH'],
356
333
  NATIVE_KAFKA: ['CONNECT', 'INTERACT', 'PUBLISH', 'SUBSCRIBE'],
357
334
  },
@@ -790,36 +767,6 @@ function fakeMCPProxyEndpoint(modifier) {
790
767
  ...modifier,
791
768
  };
792
769
  }
793
- function fakeLlmProxyEntrypoint(modifier) {
794
- const base = {
795
- type: 'llm-proxy',
796
- name: 'LLM Proxy',
797
- supportedModes: ['REQUEST_RESPONSE'],
798
- icon: 'gio:language',
799
- };
800
- if (isFunction(modifier)) {
801
- return modifier(base);
802
- }
803
- return {
804
- ...base,
805
- ...modifier,
806
- };
807
- }
808
- function fakeLlmProxyEndpoint(modifier) {
809
- const base = {
810
- type: 'llm-proxy',
811
- name: 'LLM Proxy',
812
- supportedModes: ['REQUEST_RESPONSE'],
813
- icon: 'gio:language',
814
- };
815
- if (isFunction(modifier)) {
816
- return modifier(base);
817
- }
818
- return {
819
- ...base,
820
- ...modifier,
821
- };
822
- }
823
770
 
824
771
  /*
825
772
  * Copyright (C) 2022 The Gravitee team (http://gravitee.io)
@@ -1764,99 +1711,6 @@ class GioPolicyStudioFlowMcpFormDialogHarness extends ComponentHarness {
1764
1711
  }
1765
1712
  }
1766
1713
 
1767
- /*
1768
- * Copyright (C) 2022 The Gravitee team (http://gravitee.io)
1769
- *
1770
- * Licensed under the Apache License, Version 2.0 (the "License");
1771
- * you may not use this file except in compliance with the License.
1772
- * You may obtain a copy of the License at
1773
- *
1774
- * http://www.apache.org/licenses/LICENSE-2.0
1775
- *
1776
- * Unless required by applicable law or agreed to in writing, software
1777
- * distributed under the License is distributed on an "AS IS" BASIS,
1778
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1779
- * See the License for the specific language governing permissions and
1780
- * limitations under the License.
1781
- */
1782
- class GioPolicyStudioFlowLlmFormDialogHarness extends ComponentHarness {
1783
- constructor() {
1784
- super(...arguments);
1785
- this.getSaveBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__saveBtn' }));
1786
- this.getCancelBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__cancelBtn' }));
1787
- this.nameInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="name"]' }));
1788
- this.pathOperatorInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="pathOperator"]' }));
1789
- this.pathInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="path"]' }));
1790
- this.methodsInput = this.locatorFor(GioFormTagsInputHarness.with({ selector: '[formControlName="methods"]' }));
1791
- this.conditionInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="condition"]' }));
1792
- }
1793
- static { this.hostSelector = 'gio-ps-flow-llm-form-dialog'; }
1794
- async setFlowFormValues(flow) {
1795
- if (flow.name) {
1796
- const nameInput = await this.nameInput();
1797
- await nameInput.setValue(flow.name);
1798
- }
1799
- if (flow.pathOperator) {
1800
- const pathOperatorInput = await this.pathOperatorInput();
1801
- await pathOperatorInput.open();
1802
- // Unselect all options before selecting the new one
1803
- for (const option of await pathOperatorInput.getOptions()) {
1804
- if (await option.isSelected()) {
1805
- await option.click();
1806
- }
1807
- }
1808
- await pathOperatorInput.clickOptions({ text: new RegExp(flow.pathOperator, 'i') });
1809
- }
1810
- if (flow.path) {
1811
- const input = await this.pathInput();
1812
- await input.setValue(flow.path);
1813
- }
1814
- if (flow.methods) {
1815
- const methodsInput = await this.methodsInput();
1816
- await methodsInput.removeTag('ALL');
1817
- for (const method of flow.methods) {
1818
- await methodsInput.addTag(method);
1819
- }
1820
- }
1821
- if (flow.condition) {
1822
- const conditionInput = await this.conditionInput();
1823
- await conditionInput.setValue(flow.condition);
1824
- }
1825
- }
1826
- async getFlowFormValues() {
1827
- return {
1828
- name: await this.getFlowName(),
1829
- pathOperator: await this.getPathOperator(),
1830
- path: await this.getFlowPath(),
1831
- methods: await this.getMethods(),
1832
- condition: await this.getCondition(),
1833
- };
1834
- }
1835
- async getFlowName() {
1836
- return this.nameInput().then(input => input.getValue());
1837
- }
1838
- async getFlowPath() {
1839
- return this.pathInput().then(input => input.getValue());
1840
- }
1841
- async getPathOperator() {
1842
- return this.pathOperatorInput().then(input => input.getValueText());
1843
- }
1844
- async getMethods() {
1845
- return this.methodsInput().then(input => input.getTags());
1846
- }
1847
- async getCondition() {
1848
- return this.conditionInput().then(input => input.getValue());
1849
- }
1850
- async save() {
1851
- const button = await this.getSaveBtn();
1852
- await button.click();
1853
- }
1854
- async cancel() {
1855
- const button = await this.getCancelBtn();
1856
- await button.click();
1857
- }
1858
- }
1859
-
1860
1714
  /*
1861
1715
  * Copyright (C) 2022 The Gravitee team (http://gravitee.io)
1862
1716
  *
@@ -2017,13 +1871,7 @@ class GioPolicyStudioHarness extends ComponentHarness {
2017
1871
  return;
2018
1872
  }
2019
1873
  if (httpSelector) {
2020
- let flowFormNewDialog = await this.documentRootLocatorFactory().locatorForOptional(GioPolicyStudioFlowProxyFormDialogHarness)();
2021
- if (!flowFormNewDialog) {
2022
- flowFormNewDialog = await this.documentRootLocatorFactory().locatorForOptional(GioPolicyStudioFlowLlmFormDialogHarness)();
2023
- }
2024
- if (!flowFormNewDialog) {
2025
- throw new Error('No Proxy or LLM flow form dialog found.');
2026
- }
1874
+ const flowFormNewDialog = await this.documentRootLocatorFactory().locatorFor(GioPolicyStudioFlowProxyFormDialogHarness)();
2027
1875
  await flowFormNewDialog.setFlowFormValues({
2028
1876
  name: flow.name,
2029
1877
  path: httpSelector?.path,
@@ -2133,5 +1981,5 @@ class GioPolicyGroupStudioHarness extends ComponentHarness {
2133
1981
  * Generated bundle index. Do not edit.
2134
1982
  */
2135
1983
 
2136
- export { GioPolicyGroupStudioHarness, GioPolicyStudioHarness, POLICIES_V4_UNREGISTERED_ICON, fakeAllPolicies, fakeBestMatchFlowExecution, fakeChannelFlow, fakeConditionedChannelFlow, fakeConditionedHttpFlow, fakeDefaultFlowExecution, fakeHTTPGetMessageEntrypoint, fakeHTTPPostMessageEntrypoint, fakeHTTPProxyEndpoint, fakeHTTPProxyEntrypoint, fakeHttpFlow, fakeJsonToXmlStep, fakeKafkaMessageEndpoint, fakeKafkaNativeEndpoint, fakeKafkaNativeEntrypoint, fakeLlmFlow, fakeLlmProxyEndpoint, fakeLlmProxyEntrypoint, fakeMCPProxyEndpoint, fakeMCPProxyEntrypoint, fakeMcpFlow, fakeMockMessageEndpoint, fakeNativeFlow, fakePlan, fakeRateLimitStep, fakeSSEMessageEntrypoint, fakeSharedPolicyGroupPolicyStep, fakeTestPolicy, fakeTestPolicyStep, fakeWebhookMessageEntrypoint, fakeWebsocketMessageEntrypoint };
1984
+ export { GioPolicyGroupStudioHarness, GioPolicyStudioHarness, POLICIES_V4_UNREGISTERED_ICON, fakeAllPolicies, fakeBestMatchFlowExecution, fakeChannelFlow, fakeConditionedChannelFlow, fakeConditionedHttpFlow, fakeDefaultFlowExecution, fakeHTTPGetMessageEntrypoint, fakeHTTPPostMessageEntrypoint, fakeHTTPProxyEndpoint, fakeHTTPProxyEntrypoint, fakeHttpFlow, fakeJsonToXmlStep, fakeKafkaMessageEndpoint, fakeKafkaNativeEndpoint, fakeKafkaNativeEntrypoint, fakeMCPProxyEndpoint, fakeMCPProxyEntrypoint, fakeMcpFlow, fakeMockMessageEndpoint, fakeNativeFlow, fakePlan, fakeRateLimitStep, fakeSSEMessageEntrypoint, fakeSharedPolicyGroupPolicyStep, fakeTestPolicy, fakeTestPolicyStep, fakeWebhookMessageEntrypoint, fakeWebsocketMessageEntrypoint };
2137
1985
  //# sourceMappingURL=gravitee-ui-policy-studio-angular-testing.mjs.map