@gravitee/ui-policy-studio-angular 7.1.0 → 7.2.0

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 (43) hide show
  1. package/esm2020/lib/components/flow-details/gio-ps-flow-details.component.mjs +5 -5
  2. package/esm2020/lib/components/flows-menu/gio-ps-flows-menu.component.mjs +33 -6
  3. package/esm2020/lib/gio-policy-studio.component.mjs +36 -8
  4. package/esm2020/lib/gio-policy-studio.model.mjs +17 -0
  5. package/esm2020/lib/models/ConnectorsInfo.mjs +2 -0
  6. package/esm2020/lib/models/index.mjs +3 -1
  7. package/esm2020/lib/models/plan/Plan.mjs +17 -0
  8. package/esm2020/lib/models/plan/index.mjs +17 -0
  9. package/esm2020/public-api.mjs +3 -3
  10. package/esm2020/testing/lib/models/flow/ApiType.mjs +2 -0
  11. package/esm2020/testing/lib/models/flow/FlowExecution.mjs +17 -0
  12. package/esm2020/testing/lib/models/flow/index.mjs +22 -0
  13. package/esm2020/testing/lib/models/index-testing.mjs +2 -1
  14. package/esm2020/testing/lib/models/plan/Plan.fixture.mjs +30 -0
  15. package/esm2020/testing/lib/models/plan/Plan.mjs +17 -0
  16. package/esm2020/testing/lib/models/plan/index-testing.mjs +17 -0
  17. package/esm2020/testing/testing/harnesses/div.harness.mjs +8 -5
  18. package/fesm2015/gravitee-ui-policy-studio-angular-testing.mjs +50 -5
  19. package/fesm2015/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
  20. package/fesm2015/gravitee-ui-policy-studio-angular.mjs +82 -17
  21. package/fesm2015/gravitee-ui-policy-studio-angular.mjs.map +1 -1
  22. package/fesm2020/gravitee-ui-policy-studio-angular-testing.mjs +53 -5
  23. package/fesm2020/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
  24. package/fesm2020/gravitee-ui-policy-studio-angular.mjs +103 -17
  25. package/fesm2020/gravitee-ui-policy-studio-angular.mjs.map +1 -1
  26. package/lib/components/flow-details/gio-ps-flow-details.component.d.ts +3 -3
  27. package/lib/components/flows-menu/gio-ps-flows-menu.component.d.ts +18 -4
  28. package/lib/gio-policy-studio.component.d.ts +7 -7
  29. package/lib/gio-policy-studio.model.d.ts +10 -0
  30. package/lib/models/ConnectorsInfo.d.ts +4 -0
  31. package/lib/models/index.d.ts +2 -0
  32. package/lib/models/plan/Plan.d.ts +5 -0
  33. package/lib/models/plan/index.d.ts +1 -0
  34. package/package.json +1 -1
  35. package/public-api.d.ts +2 -2
  36. package/testing/lib/models/flow/ApiType.d.ts +1 -0
  37. package/testing/lib/models/flow/FlowExecution.d.ts +11 -0
  38. package/testing/lib/models/flow/index.d.ts +6 -0
  39. package/testing/lib/models/index-testing.d.ts +1 -0
  40. package/testing/lib/models/plan/Plan.d.ts +5 -0
  41. package/testing/lib/models/plan/Plan.fixture.d.ts +2 -0
  42. package/testing/lib/models/plan/index-testing.d.ts +1 -0
  43. package/testing/testing/harnesses/div.harness.d.ts +7 -2
@@ -1 +1 @@
1
- {"version":3,"file":"gravitee-ui-policy-studio-angular-testing.mjs","sources":["../../../projects/ui-policy-studio-angular/src/lib/models/flow/Flow.fixture.ts","../../../projects/ui-policy-studio-angular/src/lib/models/flow/index-testing.ts","../../../projects/ui-policy-studio-angular/src/lib/models/index-testing.ts","../../../projects/ui-policy-studio-angular/src/testing/stories-resources/index.ts","../../../projects/ui-policy-studio-angular/src/testing/harnesses/div.harness.ts","../../../projects/ui-policy-studio-angular/src/testing/harnesses/index.ts","../../../projects/ui-policy-studio-angular/src/testing/index.ts","../../../projects/ui-policy-studio-angular/src/public-testing-api.ts","../../../projects/ui-policy-studio-angular/src/gravitee-ui-policy-studio-angular-testing.ts"],"sourcesContent":["/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isFunction } from 'lodash';\n\nimport { Flow } from './Flow';\nimport { ChannelSelector } from './Selector';\n\nexport function fakeChannelFlow(modifier?: Partial<Flow> | ((baseApi: Flow) => Flow)): Flow {\n const channelSelector: ChannelSelector = {\n type: 'CHANNEL',\n channel: 'channel',\n channelOperator: 'EQUALS',\n entrypoints: ['entrypoint'],\n operations: ['PUBLISH'],\n };\n\n const base: Flow = {\n name: 'Flow name',\n selectors: [channelSelector],\n request: [],\n response: [],\n subscribe: [],\n publish: [],\n enabled: true,\n };\n\n if (isFunction(modifier)) {\n return modifier(base);\n }\n\n return {\n ...base,\n ...modifier,\n };\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './Flow.fixture';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './flow/index-testing';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport _apimPolicies from './apim-policies.json';\nimport _apimResourceTypes from './apim-resource-types.json';\nimport _apimDefinition from './apim-definition.json';\nimport _apimFlow from './apim-flow.json';\nimport _apimPropertyProviders from './apim-property-providers.json';\n\nexport const apimPolicies = _apimPolicies;\nexport const apimResourceTypes = _apimResourceTypes;\nexport const apimDefinition = _apimDefinition;\nexport const apimFlow = _apimFlow;\nexport const apimPropertyProviders = _apimPropertyProviders;\n","/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AsyncFactoryFn, BaseHarnessFilters, ComponentHarness, HarnessPredicate, HarnessQuery } from '@angular/cdk/testing';\n\nexport type DivHarnessFilters = BaseHarnessFilters;\n\nexport class DivHarness extends ComponentHarness {\n public static hostSelector = 'div';\n\n /**\n * Get Harness with the given filter.\n *\n * @param options Options for filtering which input instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n public static with(options: DivHarnessFilters = {}): HarnessPredicate<DivHarness> {\n return new HarnessPredicate(DivHarness, options);\n }\n\n public childLocatorFor<T extends ComponentHarness>(query: HarnessQuery<T>): AsyncFactoryFn<T> {\n return this.locatorFor(query);\n }\n\n public childLocatorForAll<T extends ComponentHarness>(query: HarnessQuery<T>): AsyncFactoryFn<T[]> {\n return this.locatorForAll(query);\n }\n\n public async getText(): Promise<string> {\n const hostText = await (await this.host()).text();\n return hostText;\n }\n}\n","/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './div.harness';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './stories-resources';\nexport * from './harnesses';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './lib/models/index-testing';\nexport * from './testing';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-testing-api';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;SAoBgB,eAAe,CAAC,QAAoD;IAClF,MAAM,eAAe,GAAoB;QACvC,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AsB;QACvE,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;KAC/B;IAEM,kBAAkB,CAA6B,KAAsB;QAC1E,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KAClC;IAEM,MAAM,OAAO;QAClB,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC;QAClD,OAAO,QAAQ,CAAC;KACjB;;AAvBa,uBAAY,GAAG,KAAK;;ACpBpC;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"gravitee-ui-policy-studio-angular-testing.mjs","sources":["../../../projects/ui-policy-studio-angular/src/lib/models/flow/Flow.fixture.ts","../../../projects/ui-policy-studio-angular/src/lib/models/flow/index-testing.ts","../../../projects/ui-policy-studio-angular/src/lib/models/plan/Plan.fixture.ts","../../../projects/ui-policy-studio-angular/src/lib/models/plan/index-testing.ts","../../../projects/ui-policy-studio-angular/src/lib/models/index-testing.ts","../../../projects/ui-policy-studio-angular/src/testing/stories-resources/index.ts","../../../projects/ui-policy-studio-angular/src/testing/harnesses/div.harness.ts","../../../projects/ui-policy-studio-angular/src/testing/harnesses/index.ts","../../../projects/ui-policy-studio-angular/src/testing/index.ts","../../../projects/ui-policy-studio-angular/src/public-testing-api.ts","../../../projects/ui-policy-studio-angular/src/gravitee-ui-policy-studio-angular-testing.ts"],"sourcesContent":["/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isFunction } from 'lodash';\n\nimport { Flow } from './Flow';\nimport { ChannelSelector } from './Selector';\n\nexport function fakeChannelFlow(modifier?: Partial<Flow> | ((baseApi: Flow) => Flow)): Flow {\n const channelSelector: ChannelSelector = {\n type: 'CHANNEL',\n channel: 'channel',\n channelOperator: 'EQUALS',\n entrypoints: ['entrypoint'],\n operations: ['PUBLISH'],\n };\n\n const base: Flow = {\n name: 'Flow name',\n selectors: [channelSelector],\n request: [],\n response: [],\n subscribe: [],\n publish: [],\n enabled: true,\n };\n\n if (isFunction(modifier)) {\n return modifier(base);\n }\n\n return {\n ...base,\n ...modifier,\n };\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './Flow.fixture';\n","/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isFunction } from 'lodash';\n\nimport { Plan } from './Plan';\n\nexport function fakePlan(modifier?: Partial<Plan> | ((base: Plan) => Plan)): Plan {\n const base: Plan = {\n name: 'Keyless plan',\n flows: [],\n };\n\n if (isFunction(modifier)) {\n return modifier(base);\n }\n\n return {\n ...base,\n ...modifier,\n };\n}\n","/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './Plan.fixture';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './flow/index-testing';\nexport * from './plan/index-testing';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport _apimPolicies from './apim-policies.json';\nimport _apimResourceTypes from './apim-resource-types.json';\nimport _apimDefinition from './apim-definition.json';\nimport _apimFlow from './apim-flow.json';\nimport _apimPropertyProviders from './apim-property-providers.json';\n\nexport const apimPolicies = _apimPolicies;\nexport const apimResourceTypes = _apimResourceTypes;\nexport const apimDefinition = _apimDefinition;\nexport const apimFlow = _apimFlow;\nexport const apimPropertyProviders = _apimPropertyProviders;\n","/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AsyncFactoryFn, BaseHarnessFilters, ComponentHarness, HarnessPredicate, HarnessQuery, TestElement } from '@angular/cdk/testing';\n\nexport type DivHarnessFilters = BaseHarnessFilters & {\n /** Filters based on the text */\n text?: string | RegExp;\n};\n\nexport class DivHarness extends ComponentHarness {\n public static hostSelector = 'div';\n\n /**\n * Get Harness with the given filter.\n *\n * @param options Options for filtering which input instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n public static with(options: DivHarnessFilters = {}): HarnessPredicate<DivHarness> {\n return new HarnessPredicate(DivHarness, options).addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getText(), text),\n );\n }\n\n public childLocatorFor<T extends ComponentHarness>(query: HarnessQuery<T>): AsyncFactoryFn<T> {\n return this.locatorFor(query);\n }\n\n public childLocatorForAll<T extends ComponentHarness>(query: HarnessQuery<T>): AsyncFactoryFn<T[]> {\n return this.locatorForAll(query);\n }\n\n public async getText(option?: { childSelector?: string }): Promise<string | null> {\n let element: TestElement | null = await this.host();\n if (option?.childSelector) {\n element = await this.locatorForOptional(option.childSelector)();\n }\n\n return element ? element.text() : null;\n }\n}\n","/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './div.harness';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './stories-resources';\nexport * from './harnesses';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './lib/models/index-testing';\nexport * from './testing';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-testing-api';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;SAoBgB,eAAe,CAAC,QAAoD;IAClF,MAAM,eAAe,GAAoB;QACvC,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,SAAS;QAClB,eAAe,EAAE,QAAQ;QACzB,WAAW,EAAE,CAAC,YAAY,CAAC;QAC3B,UAAU,EAAE,CAAC,SAAS,CAAC;KACxB,CAAC;IAEF,MAAM,IAAI,GAAS;QACjB,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,CAAC,eAAe,CAAC;QAC5B,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,EAAE;QACb,OAAO,EAAE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,IAAI,EAAE,CAAC,OAAO,EAAE,IAAI,KAC7F,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CACxD,CAAC;KACH;IAEM,eAAe,CAA6B,KAAsB;QACvE,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;KAC/B;IAEM,kBAAkB,CAA6B,KAAsB;QAC1E,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KAClC;IAEM,MAAM,OAAO,CAAC,MAAmC;QACtD,IAAI,OAAO,GAAuB,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QACpD,IAAI,MAAM,EAAE,aAAa,EAAE;YACzB,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;SACjE;QAED,OAAO,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC;KACxC;;AA7Ba,uBAAY,GAAG,KAAK;;ACvBpC;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;"}
@@ -1,13 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, NgModule } from '@angular/core';
2
+ import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
3
3
  import * as i2 from '@angular/material/button';
4
4
  import { MatButtonModule } from '@angular/material/button';
5
5
  import { GioIconsModule } from '@gravitee/ui-particles-angular';
6
- import * as i6 from '@angular/common';
6
+ import * as i4 from '@angular/common';
7
7
  import { CommonModule } from '@angular/common';
8
8
  import * as i3 from '@angular/material/tooltip';
9
9
  import { MatTooltipModule } from '@angular/material/tooltip';
10
- import { capitalize } from 'lodash';
10
+ import { capitalize, uniqueId } from 'lodash';
11
11
  import * as i1 from '@angular/material/icon';
12
12
 
13
13
  /*
@@ -74,6 +74,38 @@ import * as i1 from '@angular/material/icon';
74
74
  * limitations under the License.
75
75
  */
76
76
 
77
+ /*
78
+ * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
79
+ *
80
+ * Licensed under the Apache License, Version 2.0 (the "License");
81
+ * you may not use this file except in compliance with the License.
82
+ * You may obtain a copy of the License at
83
+ *
84
+ * http://www.apache.org/licenses/LICENSE-2.0
85
+ *
86
+ * Unless required by applicable law or agreed to in writing, software
87
+ * distributed under the License is distributed on an "AS IS" BASIS,
88
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89
+ * See the License for the specific language governing permissions and
90
+ * limitations under the License.
91
+ */
92
+
93
+ /*
94
+ * Copyright (C) 2022 The Gravitee team (http://gravitee.io)
95
+ *
96
+ * Licensed under the Apache License, Version 2.0 (the "License");
97
+ * you may not use this file except in compliance with the License.
98
+ * You may obtain a copy of the License at
99
+ *
100
+ * http://www.apache.org/licenses/LICENSE-2.0
101
+ *
102
+ * Unless required by applicable law or agreed to in writing, software
103
+ * distributed under the License is distributed on an "AS IS" BASIS,
104
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
105
+ * See the License for the specific language governing permissions and
106
+ * limitations under the License.
107
+ */
108
+
77
109
  /*
78
110
  * Copyright (C) 2022 The Gravitee team (http://gravitee.io)
79
111
  *
@@ -91,16 +123,42 @@ import * as i1 from '@angular/material/icon';
91
123
  */
92
124
  class GioPolicyStudioFlowsMenuComponent {
93
125
  constructor() {
94
- this.flows = [];
126
+ this.flowsGroups = [];
127
+ this.selectedFlow = undefined;
128
+ this.selectedFlowChange = new EventEmitter();
129
+ this.flowGroupVMSelected = [];
130
+ }
131
+ ngOnChanges(changes) {
132
+ if (changes.flowsGroups || changes.selectedFlow) {
133
+ this.flowGroupVMSelected = this.flowsGroups.map(flowGroup => {
134
+ return {
135
+ ...flowGroup,
136
+ flows: flowGroup.flows.map(flow => {
137
+ return {
138
+ ...flow,
139
+ selected: this.selectedFlow?._id === flow._id,
140
+ mouseOver: false,
141
+ };
142
+ }),
143
+ };
144
+ });
145
+ }
146
+ }
147
+ selectFlow(flow) {
148
+ this.selectedFlowChange.emit(flow);
95
149
  }
96
150
  }
97
151
  GioPolicyStudioFlowsMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioPolicyStudioFlowsMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
98
- GioPolicyStudioFlowsMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioPolicyStudioFlowsMenuComponent, selector: "gio-ps-flows-menu", inputs: { flows: "flows" }, ngImport: i0, template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <div class=\"header__label\">\n Flows <mat-icon svgIcon=\"gio:info\" matTooltip=\"Flows allow you to apply different policies on your API event phases\"></mat-icon>\n </div>\n <div class=\"header__configBtn\">\n <button mat-stroked-button mat-icon-button><mat-icon svgIcon=\"gio:settings\"></mat-icon></button>\n </div>\n</div>\n\n<div class=\"list\">\n <div class=\"list__flowsGroup\">\n <div class=\"list__flowsGroup__header\">\n <div class=\"list__flowsGroup__header__label\">Common flows</div>\n <div class=\"list__flowsGroup__header__addBtn\">\n <button mat-icon-button><mat-icon svgIcon=\"gio:plus\" matTooltip=\"New flow\"></mat-icon></button>\n </div>\n </div>\n </div>\n</div>\n", styles: [".header{display:flex;align-items:center;margin-bottom:16px}.header__label{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;display:flex;flex:1 1 auto;align-items:center;margin-bottom:0;gap:8px}.header__configBtn{margin-left:8px}.list__flowsGroup__header{display:flex;align-items:center;padding:8px;border-radius:8px;margin-bottom:16px;background-color:#e9f6ff}.list__flowsGroup__header__label{font:600 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;display:flex;flex:1 1 auto;align-items:center;gap:8px}.list__flowsGroup__header__addBtn{margin-left:8px}\n"], components: [{ type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
152
+ GioPolicyStudioFlowsMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioPolicyStudioFlowsMenuComponent, selector: "gio-ps-flows-menu", inputs: { flowsGroups: "flowsGroups", selectedFlow: "selectedFlow" }, outputs: { selectedFlowChange: "selectedFlowChange" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <div class=\"header__label\">\n Flows <mat-icon svgIcon=\"gio:info\" matTooltip=\"Flows allow you to apply different policies on your API event phases\"></mat-icon>\n </div>\n <div class=\"header__configBtn\">\n <button mat-stroked-button mat-icon-button><mat-icon svgIcon=\"gio:settings\"></mat-icon></button>\n </div>\n</div>\n\n<div class=\"list\">\n <div *ngFor=\"let flowGroups of flowGroupVMSelected\" class=\"list__flowsGroup\">\n <div class=\"list__flowsGroup__header\">\n <div class=\"list__flowsGroup__header__label\">\n <mat-icon *ngIf=\"flowGroups.icon\" [svgIcon]=\"flowGroups.icon\"></mat-icon>\n <span>{{ flowGroups.name }}</span>\n </div>\n <div class=\"list__flowsGroup__header__addBtn\">\n <button mat-icon-button><mat-icon svgIcon=\"gio:plus\" matTooltip=\"New flow\"></mat-icon></button>\n </div>\n </div>\n\n <div\n *ngFor=\"let flow of flowGroups.flows\"\n class=\"list__flowsGroup__flow\"\n [class.selected]=\"flow.selected\"\n (click)=\"selectFlow(flow)\"\n (mouseout)=\"flow.mouseOver = false\"\n (mouseover)=\"flow.mouseOver = true\"\n >\n <div *ngIf=\"flow.name\" class=\"list__flowsGroup__flow__name\" [attr.title]=\"flow.name\">\n {{ flow.name }}\n </div>\n <div class=\"list__flowsGroup__flow__infos\">\n <div class=\"list__flowsGroup__flow__infos__badges\">\n <span [ngClass]=\"flow.mouseOver || flow.selected ? 'gio-badge-white' : 'gio-badge-neutral'\">SUB</span>\n </div>\n <div class=\"list__flowsGroup__flow__infos__channelName\">My channel</div>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:flex;max-height:100%;flex-direction:column;padding-top:16px}.header{display:flex;align-items:center;padding:0 16px;margin-bottom:16px}.header__label{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;display:flex;flex:1 1 auto;align-items:center;margin-bottom:0;gap:8px}.header__configBtn{margin-left:8px}.list{padding:0 16px;overflow-y:overlay}.list__flowsGroup{display:flex;flex-direction:column;padding-bottom:8px;gap:8px}.list__flowsGroup__header{display:flex;align-items:center;padding:8px 8px 8px 10px;border-radius:8px;background-color:#e9f6ff}.list__flowsGroup__header__label{font:600 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;display:flex;flex:1 1 auto;align-items:center;gap:8px}.list__flowsGroup__header__label>mat-icon{width:22px;height:22px;flex:0 0 auto}.list__flowsGroup__header__label>span{display:-webkit-box;overflow:hidden;flex:1 1 auto;-webkit-box-orient:vertical;-webkit-line-clamp:2}.list__flowsGroup__header__addBtn{margin-left:8px}.list__flowsGroup__flow{display:flex;height:68px;flex-direction:column;justify-content:center;padding:8px;border-radius:8px;gap:8px}.list__flowsGroup__flow:hover,.list__flowsGroup__flow.selected{background-color:#e7e8ef;cursor:pointer}.list__flowsGroup__flow__name{overflow:hidden;padding-left:4px;text-overflow:ellipsis;white-space:nowrap}.list__flowsGroup__flow__infos{display:flex;align-items:center}.list__flowsGroup__flow__infos__badges{flex:0 0 auto}.list__flowsGroup__flow__infos__channelName{flex:1 1 auto}\n"], components: [{ type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
99
153
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioPolicyStudioFlowsMenuComponent, decorators: [{
100
154
  type: Component,
101
- args: [{ selector: 'gio-ps-flows-menu', template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <div class=\"header__label\">\n Flows <mat-icon svgIcon=\"gio:info\" matTooltip=\"Flows allow you to apply different policies on your API event phases\"></mat-icon>\n </div>\n <div class=\"header__configBtn\">\n <button mat-stroked-button mat-icon-button><mat-icon svgIcon=\"gio:settings\"></mat-icon></button>\n </div>\n</div>\n\n<div class=\"list\">\n <div class=\"list__flowsGroup\">\n <div class=\"list__flowsGroup__header\">\n <div class=\"list__flowsGroup__header__label\">Common flows</div>\n <div class=\"list__flowsGroup__header__addBtn\">\n <button mat-icon-button><mat-icon svgIcon=\"gio:plus\" matTooltip=\"New flow\"></mat-icon></button>\n </div>\n </div>\n </div>\n</div>\n", styles: [".header{display:flex;align-items:center;margin-bottom:16px}.header__label{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;display:flex;flex:1 1 auto;align-items:center;margin-bottom:0;gap:8px}.header__configBtn{margin-left:8px}.list__flowsGroup__header{display:flex;align-items:center;padding:8px;border-radius:8px;margin-bottom:16px;background-color:#e9f6ff}.list__flowsGroup__header__label{font:600 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;display:flex;flex:1 1 auto;align-items:center;gap:8px}.list__flowsGroup__header__addBtn{margin-left:8px}\n"] }]
102
- }], propDecorators: { flows: [{
155
+ args: [{ selector: 'gio-ps-flows-menu', template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <div class=\"header__label\">\n Flows <mat-icon svgIcon=\"gio:info\" matTooltip=\"Flows allow you to apply different policies on your API event phases\"></mat-icon>\n </div>\n <div class=\"header__configBtn\">\n <button mat-stroked-button mat-icon-button><mat-icon svgIcon=\"gio:settings\"></mat-icon></button>\n </div>\n</div>\n\n<div class=\"list\">\n <div *ngFor=\"let flowGroups of flowGroupVMSelected\" class=\"list__flowsGroup\">\n <div class=\"list__flowsGroup__header\">\n <div class=\"list__flowsGroup__header__label\">\n <mat-icon *ngIf=\"flowGroups.icon\" [svgIcon]=\"flowGroups.icon\"></mat-icon>\n <span>{{ flowGroups.name }}</span>\n </div>\n <div class=\"list__flowsGroup__header__addBtn\">\n <button mat-icon-button><mat-icon svgIcon=\"gio:plus\" matTooltip=\"New flow\"></mat-icon></button>\n </div>\n </div>\n\n <div\n *ngFor=\"let flow of flowGroups.flows\"\n class=\"list__flowsGroup__flow\"\n [class.selected]=\"flow.selected\"\n (click)=\"selectFlow(flow)\"\n (mouseout)=\"flow.mouseOver = false\"\n (mouseover)=\"flow.mouseOver = true\"\n >\n <div *ngIf=\"flow.name\" class=\"list__flowsGroup__flow__name\" [attr.title]=\"flow.name\">\n {{ flow.name }}\n </div>\n <div class=\"list__flowsGroup__flow__infos\">\n <div class=\"list__flowsGroup__flow__infos__badges\">\n <span [ngClass]=\"flow.mouseOver || flow.selected ? 'gio-badge-white' : 'gio-badge-neutral'\">SUB</span>\n </div>\n <div class=\"list__flowsGroup__flow__infos__channelName\">My channel</div>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:flex;max-height:100%;flex-direction:column;padding-top:16px}.header{display:flex;align-items:center;padding:0 16px;margin-bottom:16px}.header__label{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;display:flex;flex:1 1 auto;align-items:center;margin-bottom:0;gap:8px}.header__configBtn{margin-left:8px}.list{padding:0 16px;overflow-y:overlay}.list__flowsGroup{display:flex;flex-direction:column;padding-bottom:8px;gap:8px}.list__flowsGroup__header{display:flex;align-items:center;padding:8px 8px 8px 10px;border-radius:8px;background-color:#e9f6ff}.list__flowsGroup__header__label{font:600 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;display:flex;flex:1 1 auto;align-items:center;gap:8px}.list__flowsGroup__header__label>mat-icon{width:22px;height:22px;flex:0 0 auto}.list__flowsGroup__header__label>span{display:-webkit-box;overflow:hidden;flex:1 1 auto;-webkit-box-orient:vertical;-webkit-line-clamp:2}.list__flowsGroup__header__addBtn{margin-left:8px}.list__flowsGroup__flow{display:flex;height:68px;flex-direction:column;justify-content:center;padding:8px;border-radius:8px;gap:8px}.list__flowsGroup__flow:hover,.list__flowsGroup__flow.selected{background-color:#e7e8ef;cursor:pointer}.list__flowsGroup__flow__name{overflow:hidden;padding-left:4px;text-overflow:ellipsis;white-space:nowrap}.list__flowsGroup__flow__infos{display:flex;align-items:center}.list__flowsGroup__flow__infos__badges{flex:0 0 auto}.list__flowsGroup__flow__infos__channelName{flex:1 1 auto}\n"] }]
156
+ }], propDecorators: { flowsGroups: [{
157
+ type: Input
158
+ }], selectedFlow: [{
103
159
  type: Input
160
+ }], selectedFlowChange: [{
161
+ type: Output
104
162
  }] } });
105
163
 
106
164
  /*
@@ -120,15 +178,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
120
178
  */
121
179
  class GioPolicyStudioDetailsComponent {
122
180
  constructor() {
123
- this.flows = [];
181
+ this.flow = undefined;
124
182
  }
125
183
  }
126
184
  GioPolicyStudioDetailsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioPolicyStudioDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
127
- GioPolicyStudioDetailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioPolicyStudioDetailsComponent, selector: "gio-ps-flow-details", inputs: { flows: "flows" }, ngImport: i0, template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<ng-container *ngIf=\"flows.length; else emptyFlows\">\n <div class=\"header\">\n <div class=\"mat-h4\">Flow details</div>\n </div>\n\n <div class=\"content\">\uD83D\uDEA7 Work in progress \uD83D\uDEA7</div>\n</ng-container>\n\n<ng-template #emptyFlows>\n <div class=\"emptyFlows\">\n <h2>No flows yet</h2>\n <p class=\"mat-body-1\">Flows allow you to customize the behavior of your API event phases through configurable policies</p>\n </div>\n</ng-template>\n", styles: [".emptyFlows{display:flex;width:500px;height:100%;flex-direction:column;justify-content:center;margin:auto;text-align:center}\n"], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
185
+ GioPolicyStudioDetailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioPolicyStudioDetailsComponent, selector: "gio-ps-flow-details", inputs: { flow: "flow" }, ngImport: i0, template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<ng-container *ngIf=\"flow; else emptyFlows\">\n <div class=\"header\">\n <div class=\"mat-h4\">Flow details</div>\n </div>\n\n <div class=\"content\">\n \uD83D\uDEA7 Work in progress \uD83D\uDEA7 <br />\n {{ flow | json }}\n </div>\n</ng-container>\n\n<ng-template #emptyFlows>\n <div class=\"emptyFlows\">\n <h2>No flows yet</h2>\n <p class=\"mat-body-1\">Flows allow you to customize the behavior of your API event phases through configurable policies</p>\n </div>\n</ng-template>\n", styles: [".emptyFlows{display:flex;width:500px;height:100%;flex-direction:column;justify-content:center;margin:auto;text-align:center}\n"], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "json": i4.JsonPipe } });
128
186
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioPolicyStudioDetailsComponent, decorators: [{
129
187
  type: Component,
130
- args: [{ selector: 'gio-ps-flow-details', template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<ng-container *ngIf=\"flows.length; else emptyFlows\">\n <div class=\"header\">\n <div class=\"mat-h4\">Flow details</div>\n </div>\n\n <div class=\"content\">\uD83D\uDEA7 Work in progress \uD83D\uDEA7</div>\n</ng-container>\n\n<ng-template #emptyFlows>\n <div class=\"emptyFlows\">\n <h2>No flows yet</h2>\n <p class=\"mat-body-1\">Flows allow you to customize the behavior of your API event phases through configurable policies</p>\n </div>\n</ng-template>\n", styles: [".emptyFlows{display:flex;width:500px;height:100%;flex-direction:column;justify-content:center;margin:auto;text-align:center}\n"] }]
131
- }], propDecorators: { flows: [{
188
+ args: [{ selector: 'gio-ps-flow-details', template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<ng-container *ngIf=\"flow; else emptyFlows\">\n <div class=\"header\">\n <div class=\"mat-h4\">Flow details</div>\n </div>\n\n <div class=\"content\">\n \uD83D\uDEA7 Work in progress \uD83D\uDEA7 <br />\n {{ flow | json }}\n </div>\n</ng-container>\n\n<ng-template #emptyFlows>\n <div class=\"emptyFlows\">\n <h2>No flows yet</h2>\n <p class=\"mat-body-1\">Flows allow you to customize the behavior of your API event phases through configurable policies</p>\n </div>\n</ng-template>\n", styles: [".emptyFlows{display:flex;width:500px;height:100%;flex-direction:column;justify-content:center;margin:auto;text-align:center}\n"] }]
189
+ }], propDecorators: { flow: [{
132
190
  type: Input
133
191
  }] } });
134
192
 
@@ -157,31 +215,59 @@ class GioPolicyStudioComponent {
157
215
  * List of endpoints to display
158
216
  */
159
217
  this.endpointsInfo = [];
160
- this.flows = [];
218
+ this.commonFlows = [];
219
+ this.plans = [];
161
220
  this.connectorsTooltip = '';
221
+ this.selectedFlow = undefined;
222
+ this.flowsGroups = [];
162
223
  }
163
224
  ngOnChanges(changes) {
164
225
  if (changes.entrypointsInfo || changes.endpointsInfo) {
165
- this.connectorsTooltip = `Entrypoints: ${this.entrypointsInfo
226
+ this.connectorsTooltip = `Entrypoints: ${(this.entrypointsInfo ?? []).map(e => capitalize(e.type)).join(', ')}\nEndpoints: ${(this.endpointsInfo ?? [])
166
227
  .map(e => capitalize(e.type))
167
- .join(', ')}\nEndpoints: ${this.endpointsInfo.map(e => capitalize(e.type)).join(', ')}`;
228
+ .join(', ')}`;
229
+ }
230
+ if (changes.commonFlows || changes.plans) {
231
+ this.flowsGroups = getFlowsGroups(this.commonFlows, this.plans);
232
+ // Select first flow by default on first load
233
+ if (changes.commonFlows?.isFirstChange() || changes.plans?.isFirstChange()) {
234
+ this.selectedFlow = this.flowsGroups[0].flows[0];
235
+ }
168
236
  }
169
237
  }
170
238
  }
171
239
  GioPolicyStudioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioPolicyStudioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
172
- GioPolicyStudioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioPolicyStudioComponent, selector: "gio-policy-studio", inputs: { apiType: "apiType", entrypointsInfo: "entrypointsInfo", endpointsInfo: "endpointsInfo", flows: "flows" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <div class=\"header__apiInfo\">\n <span class=\"gio-badge-primary\">\n {{ apiType | titlecase }}\n </span>\n <span\n class=\"gio-badge-neutral\"\n [matTooltip]=\"connectorsTooltip\"\n matTooltipPosition=\"right\"\n matTooltipClass=\"gio-policy-studio__tooltip-line-break\"\n >\n <mat-icon *ngFor=\"let entrypoint of entrypointsInfo\" class=\"gio-left\" [svgIcon]=\"entrypoint.icon\"></mat-icon>\n <mat-icon *ngFor=\"let endpoint of endpointsInfo\" class=\"gio-left\" [svgIcon]=\"endpoint.icon\"></mat-icon>\n </span>\n </div>\n\n <div class=\"header__btn\">\n <button mat-stroked-button color=\"primary\">Save</button>\n </div>\n</div>\n\n<div class=\"wrapper\">\n <div class=\"wrapper__flowsMenu\">\n <gio-ps-flows-menu [flows]=\"flows\"></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details></gio-ps-flow-details>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column;padding:8px;background-color:#fff}::ng-deep .gio-policy-studio__tooltip-line-break{white-space:pre-line}.header{display:flex;align-items:center;padding-bottom:16px}.header__apiInfo{flex:1 1 auto}.wrapper{display:flex;height:100%;flex-direction:row;gap:16px}.wrapper__flowsMenu{flex:0 1 400px;padding:16px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__flowDetails{flex:1 1 auto;padding:16px;border:1px solid #d3d5dc;border-radius:8px}\n"], components: [{ type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: GioPolicyStudioFlowsMenuComponent, selector: "gio-ps-flows-menu", inputs: ["flows"] }, { type: GioPolicyStudioDetailsComponent, selector: "gio-ps-flow-details", inputs: ["flows"] }], directives: [{ type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "titlecase": i6.TitleCasePipe } });
240
+ GioPolicyStudioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioPolicyStudioComponent, selector: "gio-policy-studio", inputs: { apiType: "apiType", entrypointsInfo: "entrypointsInfo", endpointsInfo: "endpointsInfo", commonFlows: "commonFlows", plans: "plans" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <div class=\"header__apiInfo\">\n <span class=\"gio-badge-primary\">\n {{ apiType | titlecase }}\n </span>\n <span\n class=\"gio-badge-neutral\"\n [matTooltip]=\"connectorsTooltip\"\n matTooltipPosition=\"right\"\n matTooltipClass=\"gio-policy-studio__tooltip-line-break\"\n >\n <mat-icon *ngFor=\"let entrypoint of entrypointsInfo\" class=\"gio-left\" [svgIcon]=\"entrypoint.icon\"></mat-icon>\n <mat-icon *ngFor=\"let endpoint of endpointsInfo\" class=\"gio-left\" [svgIcon]=\"endpoint.icon\"></mat-icon>\n </span>\n </div>\n\n <div class=\"header__btn\">\n <button mat-stroked-button color=\"primary\">Save</button>\n </div>\n</div>\n\n<div class=\"wrapper\">\n <div class=\"wrapper__flowsMenu\">\n <gio-ps-flows-menu [flowsGroups]=\"flowsGroups\" [(selectedFlow)]=\"selectedFlow\"></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details [flow]=\"selectedFlow\"></gio-ps-flow-details>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column;padding:8px;background-color:#fff}::ng-deep .gio-policy-studio__tooltip-line-break{white-space:pre-line}.header{display:flex;align-items:center;padding-bottom:16px}.header__apiInfo{flex:1 1 auto}.wrapper{display:flex;min-height:0;flex-direction:row;gap:16px}.wrapper__flowsMenu{max-width:400px;flex:0 1 400px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__flowDetails{flex:1 1 auto;padding:16px;border:1px solid #d3d5dc;border-radius:8px}\n"], components: [{ type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: GioPolicyStudioFlowsMenuComponent, selector: "gio-ps-flows-menu", inputs: ["flowsGroups", "selectedFlow"], outputs: ["selectedFlowChange"] }, { type: GioPolicyStudioDetailsComponent, selector: "gio-ps-flow-details", inputs: ["flow"] }], directives: [{ type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "titlecase": i4.TitleCasePipe } });
173
241
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioPolicyStudioComponent, decorators: [{
174
242
  type: Component,
175
- args: [{ selector: 'gio-policy-studio', template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <div class=\"header__apiInfo\">\n <span class=\"gio-badge-primary\">\n {{ apiType | titlecase }}\n </span>\n <span\n class=\"gio-badge-neutral\"\n [matTooltip]=\"connectorsTooltip\"\n matTooltipPosition=\"right\"\n matTooltipClass=\"gio-policy-studio__tooltip-line-break\"\n >\n <mat-icon *ngFor=\"let entrypoint of entrypointsInfo\" class=\"gio-left\" [svgIcon]=\"entrypoint.icon\"></mat-icon>\n <mat-icon *ngFor=\"let endpoint of endpointsInfo\" class=\"gio-left\" [svgIcon]=\"endpoint.icon\"></mat-icon>\n </span>\n </div>\n\n <div class=\"header__btn\">\n <button mat-stroked-button color=\"primary\">Save</button>\n </div>\n</div>\n\n<div class=\"wrapper\">\n <div class=\"wrapper__flowsMenu\">\n <gio-ps-flows-menu [flows]=\"flows\"></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details></gio-ps-flow-details>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column;padding:8px;background-color:#fff}::ng-deep .gio-policy-studio__tooltip-line-break{white-space:pre-line}.header{display:flex;align-items:center;padding-bottom:16px}.header__apiInfo{flex:1 1 auto}.wrapper{display:flex;height:100%;flex-direction:row;gap:16px}.wrapper__flowsMenu{flex:0 1 400px;padding:16px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__flowDetails{flex:1 1 auto;padding:16px;border:1px solid #d3d5dc;border-radius:8px}\n"] }]
243
+ args: [{ selector: 'gio-policy-studio', template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <div class=\"header__apiInfo\">\n <span class=\"gio-badge-primary\">\n {{ apiType | titlecase }}\n </span>\n <span\n class=\"gio-badge-neutral\"\n [matTooltip]=\"connectorsTooltip\"\n matTooltipPosition=\"right\"\n matTooltipClass=\"gio-policy-studio__tooltip-line-break\"\n >\n <mat-icon *ngFor=\"let entrypoint of entrypointsInfo\" class=\"gio-left\" [svgIcon]=\"entrypoint.icon\"></mat-icon>\n <mat-icon *ngFor=\"let endpoint of endpointsInfo\" class=\"gio-left\" [svgIcon]=\"endpoint.icon\"></mat-icon>\n </span>\n </div>\n\n <div class=\"header__btn\">\n <button mat-stroked-button color=\"primary\">Save</button>\n </div>\n</div>\n\n<div class=\"wrapper\">\n <div class=\"wrapper__flowsMenu\">\n <gio-ps-flows-menu [flowsGroups]=\"flowsGroups\" [(selectedFlow)]=\"selectedFlow\"></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details [flow]=\"selectedFlow\"></gio-ps-flow-details>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column;padding:8px;background-color:#fff}::ng-deep .gio-policy-studio__tooltip-line-break{white-space:pre-line}.header{display:flex;align-items:center;padding-bottom:16px}.header__apiInfo{flex:1 1 auto}.wrapper{display:flex;min-height:0;flex-direction:row;gap:16px}.wrapper__flowsMenu{max-width:400px;flex:0 1 400px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__flowDetails{flex:1 1 auto;padding:16px;border:1px solid #d3d5dc;border-radius:8px}\n"] }]
176
244
  }], propDecorators: { apiType: [{
177
245
  type: Input
178
246
  }], entrypointsInfo: [{
179
247
  type: Input
180
248
  }], endpointsInfo: [{
181
249
  type: Input
182
- }], flows: [{
250
+ }], commonFlows: [{
251
+ type: Input
252
+ }], plans: [{
183
253
  type: Input
184
254
  }] } });
255
+ const getFlowsGroups = (commonFlows = [], plans = []) => {
256
+ const commFlowsGroup = {
257
+ _id: 'flowsGroup_commonFlow',
258
+ name: 'Common flows',
259
+ flows: commonFlows.map(flow => ({ ...flow, _id: uniqueId('flow_') })),
260
+ };
261
+ return [
262
+ ...plans.map(plan => ({
263
+ _id: uniqueId('flowsGroup_'),
264
+ name: plan.name,
265
+ icon: 'gio:shield',
266
+ flows: plan.flows.map(flow => ({ ...flow, _id: uniqueId('flow_') })),
267
+ })),
268
+ commFlowsGroup,
269
+ ];
270
+ };
185
271
 
186
272
  /*
187
273
  * Copyright (C) 2022 The Gravitee team (http://gravitee.io)
@@ -1 +1 @@
1
- {"version":3,"file":"gravitee-ui-policy-studio-angular.mjs","sources":["../../../projects/ui-policy-studio-angular/src/lib/models/flow/FlowExecution.ts","../../../projects/ui-policy-studio-angular/src/lib/models/flow/HttpMethod.ts","../../../projects/ui-policy-studio-angular/src/lib/models/flow/index.ts","../../../projects/ui-policy-studio-angular/src/lib/models/index.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flows-menu/gio-ps-flows-menu.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flows-menu/gio-ps-flows-menu.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details/gio-ps-flow-details.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details/gio-ps-flow-details.component.html","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.component.ts","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.component.html","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.module.ts","../../../projects/ui-policy-studio-angular/src/public-api.ts","../../../projects/ui-policy-studio-angular/src/gravitee-ui-policy-studio-angular.ts"],"sourcesContent":["/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * API's flow mode.\n */\nexport type FlowMode = 'BEST_MATCH' | 'DEFAULT';\n\nexport interface FlowExecution {\n mode?: FlowMode;\n /**\n * Is the flow execution match required.\n */\n matchRequired?: boolean;\n}\n","/*\n * Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type HttpMethod = 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE' | 'OTHER';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './ApiType';\nexport * from './Flow';\nexport * from './FlowExecution';\nexport * from './HttpMethod';\nexport * from './Selector';\nexport * from './Step';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './flow';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Component, Input } from '@angular/core';\n\nimport { Flow } from '../../models';\n\n@Component({\n selector: 'gio-ps-flows-menu',\n templateUrl: './gio-ps-flows-menu.component.html',\n styleUrls: ['./gio-ps-flows-menu.component.scss'],\n})\nexport class GioPolicyStudioFlowsMenuComponent {\n @Input()\n public flows: Flow[] = [];\n}\n","<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <div class=\"header__label\">\n Flows <mat-icon svgIcon=\"gio:info\" matTooltip=\"Flows allow you to apply different policies on your API event phases\"></mat-icon>\n </div>\n <div class=\"header__configBtn\">\n <button mat-stroked-button mat-icon-button><mat-icon svgIcon=\"gio:settings\"></mat-icon></button>\n </div>\n</div>\n\n<div class=\"list\">\n <div class=\"list__flowsGroup\">\n <div class=\"list__flowsGroup__header\">\n <div class=\"list__flowsGroup__header__label\">Common flows</div>\n <div class=\"list__flowsGroup__header__addBtn\">\n <button mat-icon-button><mat-icon svgIcon=\"gio:plus\" matTooltip=\"New flow\"></mat-icon></button>\n </div>\n </div>\n </div>\n</div>\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Component, Input } from '@angular/core';\n\nimport { Flow } from '../../models';\n\n@Component({\n selector: 'gio-ps-flow-details',\n templateUrl: './gio-ps-flow-details.component.html',\n styleUrls: ['./gio-ps-flow-details.component.scss'],\n})\nexport class GioPolicyStudioDetailsComponent {\n @Input()\n public flows: Flow[] = [];\n}\n","<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<ng-container *ngIf=\"flows.length; else emptyFlows\">\n <div class=\"header\">\n <div class=\"mat-h4\">Flow details</div>\n </div>\n\n <div class=\"content\">🚧 Work in progress 🚧</div>\n</ng-container>\n\n<ng-template #emptyFlows>\n <div class=\"emptyFlows\">\n <h2>No flows yet</h2>\n <p class=\"mat-body-1\">Flows allow you to customize the behavior of your API event phases through configurable policies</p>\n </div>\n</ng-template>\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Component, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { capitalize } from 'lodash';\n\nimport { ApiType, Flow } from './models';\n\nexport interface ConnectorsInfo {\n type: string;\n icon: string;\n}\n\n@Component({\n selector: 'gio-policy-studio',\n templateUrl: './gio-policy-studio.component.html',\n styleUrls: ['./gio-policy-studio.component.scss'],\n})\nexport class GioPolicyStudioComponent implements OnChanges {\n @Input()\n public apiType!: ApiType;\n\n /**\n * List of entrypoints to display\n */\n @Input()\n public entrypointsInfo: ConnectorsInfo[] = [];\n\n /**\n * List of endpoints to display\n */\n @Input()\n public endpointsInfo: ConnectorsInfo[] = [];\n\n @Input()\n public flows: Flow[] = [];\n\n public connectorsTooltip = '';\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.entrypointsInfo || changes.endpointsInfo) {\n this.connectorsTooltip = `Entrypoints: ${this.entrypointsInfo\n .map(e => capitalize(e.type))\n .join(', ')}\\nEndpoints: ${this.endpointsInfo.map(e => capitalize(e.type)).join(', ')}`;\n }\n }\n}\n","<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <div class=\"header__apiInfo\">\n <span class=\"gio-badge-primary\">\n {{ apiType | titlecase }}\n </span>\n <span\n class=\"gio-badge-neutral\"\n [matTooltip]=\"connectorsTooltip\"\n matTooltipPosition=\"right\"\n matTooltipClass=\"gio-policy-studio__tooltip-line-break\"\n >\n <mat-icon *ngFor=\"let entrypoint of entrypointsInfo\" class=\"gio-left\" [svgIcon]=\"entrypoint.icon\"></mat-icon>\n <mat-icon *ngFor=\"let endpoint of endpointsInfo\" class=\"gio-left\" [svgIcon]=\"endpoint.icon\"></mat-icon>\n </span>\n </div>\n\n <div class=\"header__btn\">\n <button mat-stroked-button color=\"primary\">Save</button>\n </div>\n</div>\n\n<div class=\"wrapper\">\n <div class=\"wrapper__flowsMenu\">\n <gio-ps-flows-menu [flows]=\"flows\"></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details></gio-ps-flow-details>\n </div>\n</div>\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { GioIconsModule } from '@gravitee/ui-particles-angular';\nimport { CommonModule } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { GioPolicyStudioComponent } from './gio-policy-studio.component';\nimport { GioPolicyStudioFlowsMenuComponent } from './components/flows-menu/gio-ps-flows-menu.component';\nimport { GioPolicyStudioDetailsComponent } from './components/flow-details/gio-ps-flow-details.component';\n\n@NgModule({\n declarations: [GioPolicyStudioComponent, GioPolicyStudioFlowsMenuComponent, GioPolicyStudioDetailsComponent],\n imports: [CommonModule, MatButtonModule, MatTooltipModule, GioIconsModule],\n exports: [GioPolicyStudioComponent],\n})\nexport class GioPolicyStudioModule {}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * Public API Surface of ui-policy-studio-angular\n */\nexport * from './lib/models';\nexport * from './lib/gio-policy-studio.module';\nexport * from './lib/gio-policy-studio.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;MAwBa,iCAAiC;IAL9C;QAOS,UAAK,GAAW,EAAE,CAAC;KAC3B;;+HAHY,iCAAiC;mHAAjC,iCAAiC,qFCxB9C,m5CAqCA;4FDba,iCAAiC;kBAL7C,SAAS;+BACE,mBAAmB;8BAMtB,KAAK;sBADX,KAAK;;;AEzBR;;;;;;;;;;;;;;;MAwBa,+BAA+B;IAL5C;QAOS,UAAK,GAAW,EAAE,CAAC;KAC3B;;6HAHY,+BAA+B;iHAA/B,+BAA+B,uFCxB5C,2nCA+BA;4FDPa,+BAA+B;kBAL3C,SAAS;+BACE,qBAAqB;8BAMxB,KAAK;sBADX,KAAK;;;AEzBR;;;;;;;;;;;;;;;MA8Ba,wBAAwB;IALrC;;;;QAaS,oBAAe,GAAqB,EAAE,CAAC;;;;QAMvC,kBAAa,GAAqB,EAAE,CAAC;QAGrC,UAAK,GAAW,EAAE,CAAC;QAEnB,sBAAiB,GAAG,EAAE,CAAC;KAS/B;IAPQ,WAAW,CAAC,OAAsB;QACvC,IAAI,OAAO,CAAC,eAAe,IAAI,OAAO,CAAC,aAAa,EAAE;YACpD,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,IAAI,CAAC,eAAe;iBAC1D,GAAG,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;iBAC5B,IAAI,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;SAC3F;KACF;;sHA3BU,wBAAwB;0GAAxB,wBAAwB,kMC9BrC,6lDAgDA;4FDlBa,wBAAwB;kBALpC,SAAS;+BACE,mBAAmB;8BAMtB,OAAO;sBADb,KAAK;gBAOC,eAAe;sBADrB,KAAK;gBAOC,aAAa;sBADnB,KAAK;gBAIC,KAAK;sBADX,KAAK;;;AE9CR;;;;;;;;;;;;;;;MA8Ba,qBAAqB;;mHAArB,qBAAqB;oHAArB,qBAAqB,iBAJjB,wBAAwB,EAAE,iCAAiC,EAAE,+BAA+B,aACjG,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,aAC/D,wBAAwB;oHAEvB,qBAAqB,YAHvB,CAAC,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,CAAC;4FAG/D,qBAAqB;kBALjC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,wBAAwB,EAAE,iCAAiC,EAAE,+BAA+B,CAAC;oBAC5G,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,CAAC;oBAC1E,OAAO,EAAE,CAAC,wBAAwB,CAAC;iBACpC;;;AC7BD;;;;;;;;;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"gravitee-ui-policy-studio-angular.mjs","sources":["../../../projects/ui-policy-studio-angular/src/lib/models/flow/FlowExecution.ts","../../../projects/ui-policy-studio-angular/src/lib/models/flow/HttpMethod.ts","../../../projects/ui-policy-studio-angular/src/lib/models/flow/index.ts","../../../projects/ui-policy-studio-angular/src/lib/models/plan/Plan.ts","../../../projects/ui-policy-studio-angular/src/lib/models/plan/index.ts","../../../projects/ui-policy-studio-angular/src/lib/models/index.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flows-menu/gio-ps-flows-menu.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flows-menu/gio-ps-flows-menu.component.html","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details/gio-ps-flow-details.component.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details/gio-ps-flow-details.component.html","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.component.ts","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.component.html","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.module.ts","../../../projects/ui-policy-studio-angular/src/public-api.ts","../../../projects/ui-policy-studio-angular/src/gravitee-ui-policy-studio-angular.ts"],"sourcesContent":["/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * API's flow mode.\n */\nexport type FlowMode = 'BEST_MATCH' | 'DEFAULT';\n\nexport interface FlowExecution {\n mode?: FlowMode;\n /**\n * Is the flow execution match required.\n */\n matchRequired?: boolean;\n}\n","/*\n * Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type HttpMethod = 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE' | 'OTHER';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './ApiType';\nexport * from './Flow';\nexport * from './FlowExecution';\nexport * from './HttpMethod';\nexport * from './Selector';\nexport * from './Step';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Flow } from '../flow';\n\nexport interface Plan {\n name: string;\n flows: Flow[];\n}\n","/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './Plan';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './flow';\nexport * from './ConnectorsInfo';\nexport * from './plan';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';\n\nimport { FlowGroupVM, FlowVM } from '../../gio-policy-studio.model';\n\ninterface FlowGroupMenuVM extends FlowGroupVM {\n flows: FlowMenuVM[];\n}\n\ninterface FlowMenuVM extends FlowVM {\n selected: boolean;\n mouseOver: boolean;\n}\n\n@Component({\n selector: 'gio-ps-flows-menu',\n templateUrl: './gio-ps-flows-menu.component.html',\n styleUrls: ['./gio-ps-flows-menu.component.scss'],\n})\nexport class GioPolicyStudioFlowsMenuComponent implements OnChanges {\n @Input()\n public flowsGroups: FlowGroupVM[] = [];\n\n @Input()\n public selectedFlow?: FlowVM = undefined;\n\n @Output()\n public selectedFlowChange = new EventEmitter<FlowVM>();\n\n public flowGroupVMSelected: FlowGroupMenuVM[] = [];\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.flowsGroups || changes.selectedFlow) {\n this.flowGroupVMSelected = this.flowsGroups.map(flowGroup => {\n return {\n ...flowGroup,\n flows: flowGroup.flows.map(flow => {\n return {\n ...flow,\n selected: this.selectedFlow?._id === flow._id,\n mouseOver: false,\n };\n }),\n };\n });\n }\n }\n\n public selectFlow(flow: FlowVM): void {\n this.selectedFlowChange.emit(flow);\n }\n}\n","<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <div class=\"header__label\">\n Flows <mat-icon svgIcon=\"gio:info\" matTooltip=\"Flows allow you to apply different policies on your API event phases\"></mat-icon>\n </div>\n <div class=\"header__configBtn\">\n <button mat-stroked-button mat-icon-button><mat-icon svgIcon=\"gio:settings\"></mat-icon></button>\n </div>\n</div>\n\n<div class=\"list\">\n <div *ngFor=\"let flowGroups of flowGroupVMSelected\" class=\"list__flowsGroup\">\n <div class=\"list__flowsGroup__header\">\n <div class=\"list__flowsGroup__header__label\">\n <mat-icon *ngIf=\"flowGroups.icon\" [svgIcon]=\"flowGroups.icon\"></mat-icon>\n <span>{{ flowGroups.name }}</span>\n </div>\n <div class=\"list__flowsGroup__header__addBtn\">\n <button mat-icon-button><mat-icon svgIcon=\"gio:plus\" matTooltip=\"New flow\"></mat-icon></button>\n </div>\n </div>\n\n <div\n *ngFor=\"let flow of flowGroups.flows\"\n class=\"list__flowsGroup__flow\"\n [class.selected]=\"flow.selected\"\n (click)=\"selectFlow(flow)\"\n (mouseout)=\"flow.mouseOver = false\"\n (mouseover)=\"flow.mouseOver = true\"\n >\n <div *ngIf=\"flow.name\" class=\"list__flowsGroup__flow__name\" [attr.title]=\"flow.name\">\n {{ flow.name }}\n </div>\n <div class=\"list__flowsGroup__flow__infos\">\n <div class=\"list__flowsGroup__flow__infos__badges\">\n <span [ngClass]=\"flow.mouseOver || flow.selected ? 'gio-badge-white' : 'gio-badge-neutral'\">SUB</span>\n </div>\n <div class=\"list__flowsGroup__flow__infos__channelName\">My channel</div>\n </div>\n </div>\n </div>\n</div>\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Component, Input } from '@angular/core';\n\nimport { FlowVM } from '../../gio-policy-studio.model';\n\n@Component({\n selector: 'gio-ps-flow-details',\n templateUrl: './gio-ps-flow-details.component.html',\n styleUrls: ['./gio-ps-flow-details.component.scss'],\n})\nexport class GioPolicyStudioDetailsComponent {\n @Input()\n public flow?: FlowVM = undefined;\n}\n","<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<ng-container *ngIf=\"flow; else emptyFlows\">\n <div class=\"header\">\n <div class=\"mat-h4\">Flow details</div>\n </div>\n\n <div class=\"content\">\n 🚧 Work in progress 🚧 <br />\n {{ flow | json }}\n </div>\n</ng-container>\n\n<ng-template #emptyFlows>\n <div class=\"emptyFlows\">\n <h2>No flows yet</h2>\n <p class=\"mat-body-1\">Flows allow you to customize the behavior of your API event phases through configurable policies</p>\n </div>\n</ng-template>\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Component, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { capitalize, uniqueId } from 'lodash';\n\nimport { ApiType, ConnectorsInfo, Flow, Plan } from './models';\nimport { FlowGroupVM, FlowVM } from './gio-policy-studio.model';\n\n@Component({\n selector: 'gio-policy-studio',\n templateUrl: './gio-policy-studio.component.html',\n styleUrls: ['./gio-policy-studio.component.scss'],\n})\nexport class GioPolicyStudioComponent implements OnChanges {\n @Input()\n public apiType!: ApiType;\n\n /**\n * List of entrypoints to display\n */\n @Input()\n public entrypointsInfo: ConnectorsInfo[] = [];\n\n /**\n * List of endpoints to display\n */\n @Input()\n public endpointsInfo: ConnectorsInfo[] = [];\n\n @Input()\n public commonFlows: Flow[] = [];\n\n @Input()\n public plans: Plan[] = [];\n\n public connectorsTooltip = '';\n\n public selectedFlow?: FlowVM = undefined;\n\n public flowsGroups: FlowGroupVM[] = [];\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.entrypointsInfo || changes.endpointsInfo) {\n this.connectorsTooltip = `Entrypoints: ${(this.entrypointsInfo ?? []).map(e => capitalize(e.type)).join(', ')}\\nEndpoints: ${(\n this.endpointsInfo ?? []\n )\n .map(e => capitalize(e.type))\n .join(', ')}`;\n }\n\n if (changes.commonFlows || changes.plans) {\n this.flowsGroups = getFlowsGroups(this.commonFlows, this.plans);\n\n // Select first flow by default on first load\n if (changes.commonFlows?.isFirstChange() || changes.plans?.isFirstChange()) {\n this.selectedFlow = this.flowsGroups[0].flows[0];\n }\n }\n }\n}\n\nconst getFlowsGroups = (commonFlows: Flow[] = [], plans: Plan[] = []): FlowGroupVM[] => {\n const commFlowsGroup: FlowGroupVM = {\n _id: 'flowsGroup_commonFlow',\n name: 'Common flows',\n flows: commonFlows.map(flow => ({ ...flow, _id: uniqueId('flow_') })),\n };\n\n return [\n ...plans.map(plan => ({\n _id: uniqueId('flowsGroup_'),\n name: plan.name,\n icon: 'gio:shield',\n flows: plan.flows.map(flow => ({ ...flow, _id: uniqueId('flow_') })),\n })),\n commFlowsGroup,\n ];\n};\n","<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"header\">\n <div class=\"header__apiInfo\">\n <span class=\"gio-badge-primary\">\n {{ apiType | titlecase }}\n </span>\n <span\n class=\"gio-badge-neutral\"\n [matTooltip]=\"connectorsTooltip\"\n matTooltipPosition=\"right\"\n matTooltipClass=\"gio-policy-studio__tooltip-line-break\"\n >\n <mat-icon *ngFor=\"let entrypoint of entrypointsInfo\" class=\"gio-left\" [svgIcon]=\"entrypoint.icon\"></mat-icon>\n <mat-icon *ngFor=\"let endpoint of endpointsInfo\" class=\"gio-left\" [svgIcon]=\"endpoint.icon\"></mat-icon>\n </span>\n </div>\n\n <div class=\"header__btn\">\n <button mat-stroked-button color=\"primary\">Save</button>\n </div>\n</div>\n\n<div class=\"wrapper\">\n <div class=\"wrapper__flowsMenu\">\n <gio-ps-flows-menu [flowsGroups]=\"flowsGroups\" [(selectedFlow)]=\"selectedFlow\"></gio-ps-flows-menu>\n </div>\n\n <div class=\"wrapper__flowDetails\">\n <gio-ps-flow-details [flow]=\"selectedFlow\"></gio-ps-flow-details>\n </div>\n</div>\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { GioIconsModule } from '@gravitee/ui-particles-angular';\nimport { CommonModule } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { GioPolicyStudioComponent } from './gio-policy-studio.component';\nimport { GioPolicyStudioFlowsMenuComponent } from './components/flows-menu/gio-ps-flows-menu.component';\nimport { GioPolicyStudioDetailsComponent } from './components/flow-details/gio-ps-flow-details.component';\n\n@NgModule({\n declarations: [GioPolicyStudioComponent, GioPolicyStudioFlowsMenuComponent, GioPolicyStudioDetailsComponent],\n imports: [CommonModule, MatButtonModule, MatTooltipModule, GioIconsModule],\n exports: [GioPolicyStudioComponent],\n})\nexport class GioPolicyStudioModule {}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * Public API Surface of ui-policy-studio-angular\n */\nexport * from './lib/models';\nexport { GioPolicyStudioModule } from './lib/gio-policy-studio.module';\nexport { GioPolicyStudioComponent } from './lib/gio-policy-studio.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public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AC,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,CAAC;oBAC1E,OAAO,EAAE,CAAC,wBAAwB,CAAC;iBACpC;;;AC7BD;;;;;;;;;;;;;;;;ACAA;;;;;;"}
@@ -1,7 +1,7 @@
1
- import { Flow } from '../../models';
1
+ import { FlowVM } from '../../gio-policy-studio.model';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class GioPolicyStudioDetailsComponent {
4
- flows: Flow[];
4
+ flow?: FlowVM;
5
5
  static ɵfac: i0.ɵɵFactoryDeclaration<GioPolicyStudioDetailsComponent, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<GioPolicyStudioDetailsComponent, "gio-ps-flow-details", never, { "flows": "flows"; }, {}, never, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<GioPolicyStudioDetailsComponent, "gio-ps-flow-details", never, { "flow": "flow"; }, {}, never, never>;
7
7
  }
@@ -1,7 +1,21 @@
1
- import { Flow } from '../../models';
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { FlowGroupVM, FlowVM } from '../../gio-policy-studio.model';
2
3
  import * as i0 from "@angular/core";
3
- export declare class GioPolicyStudioFlowsMenuComponent {
4
- flows: Flow[];
4
+ interface FlowGroupMenuVM extends FlowGroupVM {
5
+ flows: FlowMenuVM[];
6
+ }
7
+ interface FlowMenuVM extends FlowVM {
8
+ selected: boolean;
9
+ mouseOver: boolean;
10
+ }
11
+ export declare class GioPolicyStudioFlowsMenuComponent implements OnChanges {
12
+ flowsGroups: FlowGroupVM[];
13
+ selectedFlow?: FlowVM;
14
+ selectedFlowChange: EventEmitter<FlowVM>;
15
+ flowGroupVMSelected: FlowGroupMenuVM[];
16
+ ngOnChanges(changes: SimpleChanges): void;
17
+ selectFlow(flow: FlowVM): void;
5
18
  static ɵfac: i0.ɵɵFactoryDeclaration<GioPolicyStudioFlowsMenuComponent, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<GioPolicyStudioFlowsMenuComponent, "gio-ps-flows-menu", never, { "flows": "flows"; }, {}, never, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<GioPolicyStudioFlowsMenuComponent, "gio-ps-flows-menu", never, { "flowsGroups": "flowsGroups"; "selectedFlow": "selectedFlow"; }, { "selectedFlowChange": "selectedFlowChange"; }, never, never>;
7
20
  }
21
+ export {};
@@ -1,10 +1,7 @@
1
1
  import { OnChanges, SimpleChanges } from '@angular/core';
2
- import { ApiType, Flow } from './models';
2
+ import { ApiType, ConnectorsInfo, Flow, Plan } from './models';
3
+ import { FlowGroupVM, FlowVM } from './gio-policy-studio.model';
3
4
  import * as i0 from "@angular/core";
4
- export interface ConnectorsInfo {
5
- type: string;
6
- icon: string;
7
- }
8
5
  export declare class GioPolicyStudioComponent implements OnChanges {
9
6
  apiType: ApiType;
10
7
  /**
@@ -15,9 +12,12 @@ export declare class GioPolicyStudioComponent implements OnChanges {
15
12
  * List of endpoints to display
16
13
  */
17
14
  endpointsInfo: ConnectorsInfo[];
18
- flows: Flow[];
15
+ commonFlows: Flow[];
16
+ plans: Plan[];
19
17
  connectorsTooltip: string;
18
+ selectedFlow?: FlowVM;
19
+ flowsGroups: FlowGroupVM[];
20
20
  ngOnChanges(changes: SimpleChanges): void;
21
21
  static ɵfac: i0.ɵɵFactoryDeclaration<GioPolicyStudioComponent, never>;
22
- static ɵcmp: i0.ɵɵComponentDeclaration<GioPolicyStudioComponent, "gio-policy-studio", never, { "apiType": "apiType"; "entrypointsInfo": "entrypointsInfo"; "endpointsInfo": "endpointsInfo"; "flows": "flows"; }, {}, never, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<GioPolicyStudioComponent, "gio-policy-studio", never, { "apiType": "apiType"; "entrypointsInfo": "entrypointsInfo"; "endpointsInfo": "endpointsInfo"; "commonFlows": "commonFlows"; "plans": "plans"; }, {}, never, never>;
23
23
  }
@@ -0,0 +1,10 @@
1
+ import { Flow } from './models';
2
+ export interface FlowVM extends Flow {
3
+ _id: string;
4
+ }
5
+ export interface FlowGroupVM {
6
+ _id: string;
7
+ name: string;
8
+ icon?: string;
9
+ flows: FlowVM[];
10
+ }
@@ -0,0 +1,4 @@
1
+ export interface ConnectorsInfo {
2
+ type: string;
3
+ icon: string;
4
+ }
@@ -1 +1,3 @@
1
1
  export * from './flow';
2
+ export * from './ConnectorsInfo';
3
+ export * from './plan';
@@ -0,0 +1,5 @@
1
+ import { Flow } from '../flow';
2
+ export interface Plan {
3
+ name: string;
4
+ flows: Flow[];
5
+ }
@@ -0,0 +1 @@
1
+ export * from './Plan';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravitee/ui-policy-studio-angular",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "Gravitee.io - UI Policy Studio Angular",
5
5
  "repository": {
6
6
  "type": "git",
package/public-api.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from './lib/models';
2
- export * from './lib/gio-policy-studio.module';
3
- export * from './lib/gio-policy-studio.component';
2
+ export { GioPolicyStudioModule } from './lib/gio-policy-studio.module';
3
+ export { GioPolicyStudioComponent } from './lib/gio-policy-studio.component';
@@ -0,0 +1 @@
1
+ export declare type ApiType = 'MESSAGE' | 'PROXY';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * API's flow mode.
3
+ */
4
+ export declare type FlowMode = 'BEST_MATCH' | 'DEFAULT';
5
+ export interface FlowExecution {
6
+ mode?: FlowMode;
7
+ /**
8
+ * Is the flow execution match required.
9
+ */
10
+ matchRequired?: boolean;
11
+ }
@@ -0,0 +1,6 @@
1
+ export * from './ApiType';
2
+ export * from './Flow';
3
+ export * from './FlowExecution';
4
+ export * from './HttpMethod';
5
+ export * from './Selector';
6
+ export * from './Step';
@@ -1 +1,2 @@
1
1
  export * from './flow/index-testing';
2
+ export * from './plan/index-testing';
@@ -0,0 +1,5 @@
1
+ import { Flow } from '../flow';
2
+ export interface Plan {
3
+ name: string;
4
+ flows: Flow[];
5
+ }
@@ -0,0 +1,2 @@
1
+ import { Plan } from './Plan';
2
+ export declare function fakePlan(modifier?: Partial<Plan> | ((base: Plan) => Plan)): Plan;
@@ -0,0 +1 @@
1
+ export * from './Plan.fixture';