@gravitee/ui-components 3.28.7-debug-mode-add-menu-ded8a59 → 3.28.7-debug-mode-add-menu-fd03e65

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.
@@ -0,0 +1,333 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ /*
11
+ * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
12
+ *
13
+ * Licensed under the Apache License, Version 2.0 (the "License");
14
+ * you may not use this file except in compliance with the License.
15
+ * You may obtain a copy of the License at
16
+ *
17
+ * http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * Unless required by applicable law or agreed to in writing, software
20
+ * distributed under the License is distributed on an "AS IS" BASIS,
21
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
+ * See the License for the specific language governing permissions and
23
+ * limitations under the License.
24
+ */
25
+ import { afterEach, beforeEach, describe, expect, test, jest } from '@jest/globals';
26
+ import { Page, querySelector } from '../../../testing/lib/test-utils';
27
+ import definition from '../../../testing/resources/apim-definition.json';
28
+ import policies from '../../../testing/resources/apim-policies.json';
29
+ import resourceTypes from '../../../testing/resources/apim-resource-types.json';
30
+ import './gv-design';
31
+ import apimFlowSchema from '../../../testing/resources/schemas/apim-flow.json';
32
+ describe('DESIGN', () => {
33
+ let page, component;
34
+ beforeEach(() => {
35
+ page = new Page();
36
+ component = page.create('gv-design', {});
37
+ component.policies = policies.data;
38
+ component.resourceTypes = resourceTypes.data;
39
+ component.flowSchema = {};
40
+ });
41
+ afterEach(() => {
42
+ page.clear();
43
+ });
44
+ describe('C O M M O N', () => {
45
+ test('should create element', () => {
46
+ expect(window.customElements.get('gv-design')).toBeDefined();
47
+ const element = querySelector('gv-design');
48
+ expect(element).toBeDefined();
49
+ expect(element.definedFlows.length).toEqual(0);
50
+ expect(element.definedResources.length).toEqual(0);
51
+ expect(element.definedProperties).toBeDefined();
52
+ });
53
+ test('should dispatch fetch-documentation when open documentation from menu', (done) => {
54
+ const policy = { id: 'rate-limit', name: 'Rate Limit' };
55
+ component.policies = [policy];
56
+ component.addEventListener('gv-design:fetch-documentation', (e) => {
57
+ expect(e).toBeDefined();
58
+ done();
59
+ });
60
+ component._onOpenDocumentationFromMenu({ detail: { policy } });
61
+ });
62
+ test('should not updated when _dragPolicy change', (done) => {
63
+ component.updated = jest.fn();
64
+ component._dragPolicy = { policy: 'foobar' };
65
+ component.updateComplete.then(() => {
66
+ expect(component.updated.mock.calls.length).toBe(0);
67
+ done();
68
+ });
69
+ });
70
+ test('should not updated when _dropPolicy change', (done) => {
71
+ component.updated = jest.fn();
72
+ component._dropPolicy = { policy: 'foobar' };
73
+ component.updateComplete.then(() => {
74
+ expect(component.updated.mock.calls.length).toBe(0);
75
+ done();
76
+ });
77
+ });
78
+ });
79
+ describe('A P I M', () => {
80
+ beforeEach(() => {
81
+ component.definition = definition;
82
+ });
83
+ test('should find flow by id', () => {
84
+ const flowIdFromApiDefinition = component.definition.flows[0]._id;
85
+ const flowIdFromPlanDefinition = component.definition.plans[1].flows[0]._id;
86
+ expect(component._findFlowById(flowIdFromApiDefinition)).not.toBeNull();
87
+ expect(component._findFlowById(flowIdFromPlanDefinition)).not.toBeNull();
88
+ });
89
+ test('should find collection of flow', (done) => {
90
+ const flowIdFromApiDefinition = component.definition.flows[0]._id;
91
+ const flowIdFromPlanDefinition = component.definition.plans[1].flows[0]._id;
92
+ component.updateComplete.then(() => {
93
+ expect(component._findFlowCollection(flowIdFromApiDefinition)).toEqual({
94
+ plan: undefined,
95
+ flows: component.definition.flows,
96
+ });
97
+ expect(component._findFlowCollection(flowIdFromPlanDefinition)).toEqual({
98
+ plan: component.definition.plans[1],
99
+ flows: component.definition.plans[1].flows,
100
+ });
101
+ done();
102
+ });
103
+ });
104
+ test('should delete flow from plan', () => {
105
+ const flow = component.definition.plans[1].flows[0];
106
+ expect(component.definition.plans[1].flows.length).toEqual(3);
107
+ expect(component.definition.flows.length).toEqual(3);
108
+ component._onDeleteFlow({ detail: { content: Object.assign({}, flow) } });
109
+ expect(component.definition.plans[1].flows.length).toEqual(2);
110
+ expect(component.definition.flows.length).toEqual(3);
111
+ });
112
+ test('should add flow plan', (done) => {
113
+ expect(component.definition.plans[1].flows.length).toEqual(3);
114
+ expect(component.getSelectedFlow()).toBeDefined();
115
+ component.flowSchema = {
116
+ type: 'object',
117
+ id: 'apim',
118
+ properties: {
119
+ name: {
120
+ title: 'Name',
121
+ description: 'The name of flow. If empty, the name will be generated with the path and methods',
122
+ type: 'string',
123
+ },
124
+ 'path-operator': {
125
+ type: 'object',
126
+ title: 'Path',
127
+ properties: {
128
+ operator: {
129
+ title: 'Operator path',
130
+ description: 'The operator path',
131
+ type: 'string',
132
+ enum: ['EQUALS', 'STARTS_WITH'],
133
+ default: 'STARTS_WITH',
134
+ 'x-schema-form': {
135
+ titleMap: {
136
+ EQUALS: 'Equals',
137
+ STARTS_WITH: 'Starts with',
138
+ },
139
+ },
140
+ },
141
+ path: {
142
+ title: 'Path',
143
+ description: 'The path of flow (must start by /)',
144
+ type: 'string',
145
+ pattern: '^/',
146
+ default: '/',
147
+ },
148
+ },
149
+ required: ['path', 'operator'],
150
+ },
151
+ methods: {
152
+ title: 'Methods',
153
+ description: 'The HTTP methods of flow (ALL if empty)',
154
+ type: 'array',
155
+ items: {
156
+ type: 'string',
157
+ enum: ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'],
158
+ },
159
+ },
160
+ condition: {
161
+ title: 'Condition',
162
+ description: 'The extra condition of flow',
163
+ type: 'string',
164
+ },
165
+ },
166
+ required: [],
167
+ disabled: [],
168
+ };
169
+ component.updateComplete
170
+ .then(() => component._onAddFlowPlan({ detail: { planIndex: 1 } }))
171
+ .then(() => component.updateComplete)
172
+ .then(() => {
173
+ expect(component.definition.plans[1].flows.length).toEqual(4);
174
+ const createdFlow = component.definition.plans[1].flows[3];
175
+ expect(createdFlow._dirty).toEqual(true);
176
+ expect(createdFlow.name).toEqual('');
177
+ expect(createdFlow.post).toEqual([]);
178
+ expect(createdFlow.pre).toEqual([]);
179
+ expect(createdFlow._id).toBeDefined();
180
+ expect(createdFlow['path-operator']).toBeDefined();
181
+ expect(createdFlow['path-operator'].operator).toBeDefined();
182
+ expect(createdFlow['path-operator'].path).toBeDefined();
183
+ expect(createdFlow.type).not.toBeDefined();
184
+ done();
185
+ });
186
+ });
187
+ test('should create element with definition', () => {
188
+ expect(component.definedFlows.length).toEqual(3);
189
+ expect(component.definedResources.length).toEqual(1);
190
+ expect(Object.keys(component.definedProperties).length).toEqual(3);
191
+ expect(component.definedFlows[0]._id).toBeDefined();
192
+ expect(component.definedResources[0]._id).toBeDefined();
193
+ expect(component.selectedFlowsId.length).toEqual(1);
194
+ });
195
+ });
196
+ describe('F L O W S', () => {
197
+ test('should add flow', () => __awaiter(void 0, void 0, void 0, function* () {
198
+ component.definition = { flows: [] };
199
+ component.flowSchema = {
200
+ type: 'object',
201
+ id: 'am',
202
+ properties: {
203
+ name: {
204
+ title: 'Name',
205
+ description: 'The name of flow. If empty, the name will be generated with the path and methods',
206
+ type: 'string',
207
+ default: 'New Flow',
208
+ },
209
+ type: {
210
+ title: 'Type',
211
+ description: 'The type of flow',
212
+ type: 'string',
213
+ default: 'ROOT',
214
+ enum: ['ROOT', 'LOGIN', 'CONSENT', 'REGISTER'],
215
+ },
216
+ condition: {
217
+ title: 'Condition',
218
+ description: 'The condition of flow',
219
+ type: 'string',
220
+ },
221
+ },
222
+ required: [],
223
+ disabled: [],
224
+ };
225
+ yield component._onAddFlow();
226
+ expect(component.definition.flows.length).toEqual(1);
227
+ const createdFlow = component.definition.flows[0];
228
+ expect(createdFlow._dirty).toEqual(true);
229
+ expect(createdFlow._id).toBeDefined();
230
+ expect(createdFlow.name).toEqual('New Flow');
231
+ expect(createdFlow.post).toEqual([]);
232
+ expect(createdFlow.pre).toEqual([]);
233
+ expect(createdFlow.type).toEqual('ROOT');
234
+ expect(createdFlow['path-operator']).not.toBeDefined();
235
+ }));
236
+ test('should duplicate flow', () => __awaiter(void 0, void 0, void 0, function* () {
237
+ const flow = { _id: 'f-1', name: 'ALL', post: [{ policy: 'rate-limit', name: 'Rate limit' }], pre: [] };
238
+ component.definition = { flows: [flow] };
239
+ yield component.updateComplete;
240
+ yield component._onDuplicateFlow({ detail: { content: Object.assign({}, flow) } });
241
+ const expected = Object.assign(Object.assign({}, flow), { _dirty: true, _id: expect.any(String), id: null, post: [{ _id: expect.any(String), policy: 'rate-limit', name: 'Rate limit' }] });
242
+ expect(component.definition.flows.length).toEqual(2);
243
+ expect(component.definition.flows[1]).toEqual(expected);
244
+ }));
245
+ test('should delete flow', () => {
246
+ const flow = { _id: 'foobar', name: 'ALL', post: [{ policy: 'rate-limit', name: 'Rate limit' }], pre: [] };
247
+ component.definition = { flows: [flow] };
248
+ component._onDeleteFlow({ detail: { content: Object.assign({}, flow) } });
249
+ expect(component.definition.flows.length).toEqual(0);
250
+ });
251
+ test('should update definition when submit schema form with updated flow', () => __awaiter(void 0, void 0, void 0, function* () {
252
+ const _id = 'foobar';
253
+ const flow = { _id, name: 'New flow', condition: '#method == "POST"' };
254
+ component.definition = { flows: [flow] };
255
+ yield component._onSelectFlows({ detail: { flows: [flow._id] } });
256
+ const updatedFlow = {
257
+ name: 'Updated flow',
258
+ description: 'more....',
259
+ methods: ['GET', 'POST'],
260
+ 'path-operator': { path: '/', operator: 'STARTS_WITH' },
261
+ };
262
+ component._onSubmitFlow({ detail: { values: updatedFlow } });
263
+ expect(component.definition.flows.length).toEqual(1);
264
+ expect(component.definition.flows[0]._dirty).toEqual(true);
265
+ expect(component.definition.flows[0]._id).toEqual(_id);
266
+ expect(component.definition.flows[0].name).toEqual(updatedFlow.name);
267
+ expect(component.definition.flows[0]['path-operator']).toEqual({ path: '/', operator: 'STARTS_WITH' });
268
+ expect(component.definition.flows[0].methods).toEqual(['GET', 'POST']);
269
+ }));
270
+ test('should update definition when submit flow schema', () => __awaiter(void 0, void 0, void 0, function* () {
271
+ const _id = 'foobar';
272
+ const _stepId = 'foobar-step';
273
+ const step = { _id: _stepId, name: 'step', description: 'step description', configuration: {}, policy: 'api-key' };
274
+ const flow = {
275
+ _id,
276
+ name: 'New flow',
277
+ description: 'test',
278
+ condition: '#method == "POST"',
279
+ pre: [step],
280
+ post: [],
281
+ };
282
+ component.definition = { flows: [flow] };
283
+ yield component._onSelectFlows({ detail: { flows: [flow._id] } });
284
+ const policy = policies.data.find((policy) => policy.id === 'policy-http-callout');
285
+ const flowStepSchema = component.buildSchema(policy);
286
+ const currentFlowStep = { flow, step, policy, group: 'pre', position: 0 };
287
+ yield component._setCurrentFlowStep(currentFlowStep, flowStepSchema);
288
+ const cases = [
289
+ ['updated description', 'http://localhost', 'GET'],
290
+ ['', 'http://localhost/api', 'POST'],
291
+ ['simple description', 'http://localhost:8080', 'PUT'],
292
+ ];
293
+ for (const [commonDescription, url, method] of cases) {
294
+ const values = { commonDescription, method, url };
295
+ yield component._onSubmitFlowStep({ detail: { values } });
296
+ expect(component.definition.flows.length).toEqual(1);
297
+ expect(component.definition.flows[0]._id).toEqual(_id);
298
+ expect([...component.definition.flows[0].pre]).toMatchObject([
299
+ Object.assign(Object.assign({}, step), { description: commonDescription, configuration: { method, url } }),
300
+ ]);
301
+ }
302
+ }));
303
+ test('should reset field', () => __awaiter(void 0, void 0, void 0, function* () {
304
+ component.flowSchema = apimFlowSchema;
305
+ const _id = 'foobar';
306
+ const _stepId = 'foobar-step';
307
+ const step = { _id: _stepId, name: 'step', description: 'step description', configuration: {}, policy: 'api-key' };
308
+ const flow = {
309
+ _id,
310
+ name: 'New flow',
311
+ description: 'test',
312
+ condition: '#method == "POST"',
313
+ pre: [step],
314
+ post: [],
315
+ };
316
+ const values = {
317
+ _id,
318
+ description: 'test',
319
+ pre: [step],
320
+ post: [],
321
+ };
322
+ component.definition = { flows: [flow] };
323
+ yield component._onSelectFlows({ detail: { flows: [flow._id] } });
324
+ // execute update
325
+ yield component._onSubmitFlow({ detail: { values } });
326
+ expect(component.definition.flows.length).toEqual(1);
327
+ expect(component.definition.flows[0]._id).toEqual(_id);
328
+ expect(component.definition.flows[0].name).toEqual('');
329
+ expect(component.definition.flows[0].condition).toEqual('');
330
+ }));
331
+ });
332
+ });
333
+ //# sourceMappingURL=gv-design.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gv-design.test.js","sourceRoot":"","sources":["../../../../src/policy-studio/gv-design/gv-design.test.js"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,UAAU,MAAM,iDAAiD,CAAC;AACzE,OAAO,QAAQ,MAAM,+CAA+C,CAAC;AACrE,OAAO,aAAa,MAAM,qDAAqD,CAAC;AAChF,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,MAAM,mDAAmD,CAAC;AAE/E,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,IAAI,IAAI,EAAE,SAAS,CAAC;IAEpB,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,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1,17 @@
1
+ /*
2
+ * Copyright (C) 2021 The Gravitee team (http://gravitee.io)
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export * from './gv-design';
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/policy-studio/gv-design/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,cAAc,aAAa,CAAC"}
@@ -193,18 +193,6 @@ export class GvPolicyStudio extends GvPolicyStudio_base {
193
193
  type: BooleanConstructor;
194
194
  attribute: string;
195
195
  };
196
- hideTabs: {
197
- type: BooleanConstructor;
198
- attribute: string;
199
- };
200
- hideTitle: {
201
- type: BooleanConstructor;
202
- attribute: string;
203
- };
204
- hideSave: {
205
- type: BooleanConstructor;
206
- attribute: string;
207
- };
208
196
  };
209
197
  static get styles(): import("lit").CSSResult[];
210
198
  isDirty: boolean;
@@ -441,7 +429,6 @@ export class GvPolicyStudio extends GvPolicyStudio_base {
441
429
  detail: any;
442
430
  }): void;
443
431
  render(): import("lit").TemplateResult<1>;
444
- _renderTabs(): import("lit").TemplateResult<1>;
445
432
  /**
446
433
  * Determine if the design view should be in readonly mode or not
447
434
  * It is in readonly mode if:
@@ -128,9 +128,6 @@ export class GvPolicyStudio extends KeyboardElement(LitElement) {
128
128
  canDebug: { type: Boolean, attribute: 'can-debug' },
129
129
  debugResponse: { type: Object, attribute: 'debug-response' },
130
130
  hasConditionalSteps: { type: Boolean, attribute: 'has-conditional-steps' },
131
- hideTabs: { type: Boolean, attribute: 'hide-tabs' },
132
- hideTitle: { type: Boolean, attribute: 'hide-title' },
133
- hideSave: { type: Boolean, attribute: 'hide-save' },
134
131
  };
135
132
  }
136
133
  static get styles() {
@@ -154,7 +151,6 @@ export class GvPolicyStudio extends KeyboardElement(LitElement) {
154
151
  .design,
155
152
  .properties {
156
153
  display: flex;
157
- width: 100%;
158
154
  }
159
155
 
160
156
  gv-resizable-views {
@@ -376,31 +372,29 @@ export class GvPolicyStudio extends KeyboardElement(LitElement) {
376
372
  }
377
373
  willUpdate(changedProperties) {
378
374
  return __awaiter(this, void 0, void 0, function* () {
375
+ if (changedProperties.has('configurationSchema') && this.configurationSchema) {
376
+ this._tabs.splice(1, 0, { id: 'settings', title: 'Configuration', icon: 'general:settings#2' });
377
+ }
379
378
  if (changedProperties.has('hasPolicyFilter') && this.hasPolicyFilter === true) {
380
379
  this._policyFilterOptions = [
381
380
  { id: 'onRequest', title: 'Request', icon: 'navigation:arrow-from-left' },
382
381
  { id: 'onResponse', title: 'Response', icon: 'navigation:arrow-from-right' },
383
382
  ];
384
383
  }
385
- if (this.hideTabs !== true) {
386
- if (changedProperties.has('configurationSchema') && this.configurationSchema) {
387
- this._tabs.splice(1, 0, { id: 'settings', title: 'Configuration', icon: 'general:settings#2' });
388
- }
389
- if (changedProperties.has('canDebug') && this.canDebug === true) {
390
- this._tabs = [...this._tabs, { id: 'debug', title: 'Try it', icon: 'content:send' }];
391
- }
392
- const tabsImport = [];
393
- if (changedProperties.has('hasProperties') && this.hasProperties === true) {
394
- tabsImport.push(import('../../organisms/gv-properties').then(() => ({ id: 'properties', title: 'Properties', icon: 'general:settings#1' })));
395
- }
396
- if (changedProperties.has('hasResources') && this.hasProperties === true) {
397
- tabsImport.push(import('../../organisms/gv-resources').then(() => ({ id: 'resources', title: 'Resources', icon: 'general:settings#5' })));
398
- }
399
- if (tabsImport.length > 0) {
400
- const [...tabs] = yield Promise.all(tabsImport);
401
- this._tabs = [...this._tabs, ...tabs];
402
- this.requestUpdate();
403
- }
384
+ if (changedProperties.has('canDebug') && this.canDebug === true) {
385
+ this._tabs = [...this._tabs, { id: 'debug', title: 'Try it', icon: 'content:send' }];
386
+ }
387
+ const tabsImport = [];
388
+ if (changedProperties.has('hasProperties') && this.hasProperties === true) {
389
+ tabsImport.push(import('../../organisms/gv-properties').then(() => ({ id: 'properties', title: 'Properties', icon: 'general:settings#1' })));
390
+ }
391
+ if (changedProperties.has('hasResources') && this.hasProperties === true) {
392
+ tabsImport.push(import('../../organisms/gv-resources').then(() => ({ id: 'resources', title: 'Resources', icon: 'general:settings#5' })));
393
+ }
394
+ if (tabsImport.length > 0) {
395
+ const [...tabs] = yield Promise.all(tabsImport);
396
+ this._tabs = [...this._tabs, ...tabs];
397
+ this.requestUpdate();
404
398
  }
405
399
  });
406
400
  }
@@ -1636,6 +1630,7 @@ export class GvPolicyStudio extends KeyboardElement(LitElement) {
1636
1630
  this.isDirty = true;
1637
1631
  }
1638
1632
  render() {
1633
+ const readonlyMode = this._getReadonlyModeForDesign();
1639
1634
  return html `<div class="box">
1640
1635
  <gv-policy-studio-menu
1641
1636
  class="left-menu"
@@ -1659,7 +1654,7 @@ export class GvPolicyStudio extends KeyboardElement(LitElement) {
1659
1654
  @gv-policy-studio-menu:select-flows="${this._onSelectFlows}"
1660
1655
  >
1661
1656
  <div slot="header" class="header-actions">
1662
- ${this.hideTitle !== true ? html `<div class="title">${this._definition.name}</div>` : ''}
1657
+ <div class="title">${this._definition.name}</div>
1663
1658
  ${this._flowFilterOptions != null
1664
1659
  ? html `<gv-option
1665
1660
  ?disabled="${this._currentAskConfirmation}"
@@ -1682,7 +1677,7 @@ export class GvPolicyStudio extends KeyboardElement(LitElement) {
1682
1677
  ></gv-input>
1683
1678
  </div>
1684
1679
 
1685
- ${this.readonly !== true && this.hideSave !== true
1680
+ ${this.readonly !== true
1686
1681
  ? html ` <div slot="footer" class="footer-actions">
1687
1682
  <gv-button
1688
1683
  class="btn-large"
@@ -1696,47 +1691,41 @@ export class GvPolicyStudio extends KeyboardElement(LitElement) {
1696
1691
  </div>`
1697
1692
  : ''}
1698
1693
  </gv-policy-studio-menu>
1699
- ${this._renderTabs()}
1694
+
1695
+ <gv-tabs
1696
+ .value="${this.tabId}"
1697
+ .options="${this._tabs}"
1698
+ .disabled="${this._currentAskConfirmation}"
1699
+ @gv-tabs:change="${this._onChangeTab}"
1700
+ .validator="${this._changeTabValidator.bind(this)}"
1701
+ >
1702
+ ${this._renderDesign(readonlyMode)} ${this._renderConfigurationForm(readonlyMode)} ${this._renderDebug()}
1703
+ <gv-properties
1704
+ id="properties"
1705
+ slot="content"
1706
+ class="properties"
1707
+ .provider="${this.services['dynamic-property']}"
1708
+ @gv-properties:change="${this._onPropertiesChange}"
1709
+ @gv-properties:save-provider="${this._onSaveProvider}"
1710
+ @gv-properties:switch-encrypted="${this._onSwitchEncryptedProperty}"
1711
+ ?readonly="${readonlyMode}"
1712
+ encryptable="true"
1713
+ .properties="${this.definedProperties}"
1714
+ .providers="${this.propertyProviders}"
1715
+ .dynamicPropertySchema="${this.dynamicPropertySchema}"
1716
+ ></gv-properties>
1717
+ <gv-resources
1718
+ id="resources"
1719
+ slot="content"
1720
+ class="resources"
1721
+ @gv-resources:change="${this._onResourcesChange}"
1722
+ ?readonly="${readonlyMode}"
1723
+ .resources="${this.definedResources}"
1724
+ .types="${this.resourceTypes}"
1725
+ ></gv-resources>
1726
+ </gv-tabs>
1700
1727
  </div>`;
1701
1728
  }
1702
- _renderTabs() {
1703
- const readonlyMode = this._getReadonlyModeForDesign();
1704
- if (this.hideTabs === true) {
1705
- return this._renderDesign(readonlyMode);
1706
- }
1707
- return html `<gv-tabs
1708
- .value="${this.tabId}"
1709
- .options="${this._tabs}"
1710
- .disabled="${this._currentAskConfirmation}"
1711
- @gv-tabs:change="${this._onChangeTab}"
1712
- .validator="${this._changeTabValidator.bind(this)}"
1713
- >
1714
- ${this._renderDesign(readonlyMode)} ${this._renderConfigurationForm(readonlyMode)} ${this._renderDebug()}
1715
- <gv-properties
1716
- id="properties"
1717
- slot="content"
1718
- class="properties"
1719
- .provider="${this.services['dynamic-property']}"
1720
- @gv-properties:change="${this._onPropertiesChange}"
1721
- @gv-properties:save-provider="${this._onSaveProvider}"
1722
- @gv-properties:switch-encrypted="${this._onSwitchEncryptedProperty}"
1723
- ?readonly="${readonlyMode}"
1724
- encryptable="true"
1725
- .properties="${this.definedProperties}"
1726
- .providers="${this.propertyProviders}"
1727
- .dynamicPropertySchema="${this.dynamicPropertySchema}"
1728
- ></gv-properties>
1729
- <gv-resources
1730
- id="resources"
1731
- slot="content"
1732
- class="resources"
1733
- @gv-resources:change="${this._onResourcesChange}"
1734
- ?readonly="${readonlyMode}"
1735
- .resources="${this.definedResources}"
1736
- .types="${this.resourceTypes}"
1737
- ></gv-resources>
1738
- </gv-tabs>`;
1739
- }
1740
1729
  /**
1741
1730
  * Determine if the design view should be in readonly mode or not
1742
1731
  * It is in readonly mode if: