diff --git a/angular.json b/angular.json index 3a10b14..56775dd 100644 --- a/angular.json +++ b/angular.json @@ -44,7 +44,7 @@ "projectType": "application", "root": "projects/wc", "sourceRoot": "projects/wc/src", - "prefix": "wc", + "prefix": "pm", "architect": { "build": { "builder": "ngx-build-plus:browser", diff --git a/projects/wc/src/app/components/dynamic-select/dynamic-select.component.spec.ts b/projects/wc/src/app/components/dynamic-select/dynamic-select.component.spec.ts index 6771d0e..d2e74e3 100644 --- a/projects/wc/src/app/components/dynamic-select/dynamic-select.component.spec.ts +++ b/projects/wc/src/app/components/dynamic-select/dynamic-select.component.spec.ts @@ -84,7 +84,7 @@ describe('DynamicSelectComponent', () => { fixture.detectChanges(); - expect(component.testId()).toBe('dynamic-select-getData'); + expect(component.testId()).toBe('pm-dynamic-select-getData'); }); it('should generate default testId without operation name', () => { @@ -104,7 +104,7 @@ describe('DynamicSelectComponent', () => { fixture.detectChanges(); - expect(component.testId()).toBe('dynamic-select'); + expect(component.testId()).toBe('pm-dynamic-select'); }); it('should generate optionTestId with value', () => { @@ -125,7 +125,7 @@ describe('DynamicSelectComponent', () => { fixture.detectChanges(); expect(component.optionTestId('option1')).toBe( - 'dynamic-select-getData-option-option1', + 'pm-dynamic-select-getData-option-option1', ); }); @@ -147,7 +147,7 @@ describe('DynamicSelectComponent', () => { fixture.detectChanges(); expect(component.optionTestId('')).toBe( - 'dynamic-select-getData-option-empty', + 'pm-dynamic-select-getData-option-empty', ); }); @@ -169,7 +169,7 @@ describe('DynamicSelectComponent', () => { fixture.detectChanges(); expect(component.optionTestId(null)).toBe( - 'dynamic-select-getData-option-empty', + 'pm-dynamic-select-getData-option-empty', ); }); @@ -191,7 +191,7 @@ describe('DynamicSelectComponent', () => { fixture.detectChanges(); expect(component.optionTestId(undefined)).toBe( - 'dynamic-select-getData-option-empty', + 'pm-dynamic-select-getData-option-empty', ); }); }); diff --git a/projects/wc/src/app/components/dynamic-select/dynamic-select.component.ts b/projects/wc/src/app/components/dynamic-select/dynamic-select.component.ts index d3ef342..409411e 100644 --- a/projects/wc/src/app/components/dynamic-select/dynamic-select.component.ts +++ b/projects/wc/src/app/components/dynamic-select/dynamic-select.component.ts @@ -20,7 +20,7 @@ import { OptionComponent, SelectComponent } from '@ui5/webcomponents-ngx'; import { Observable, map } from 'rxjs'; @Component({ - selector: 'dynamic-select', + selector: 'pm-dynamic-select', imports: [SelectComponent, OptionComponent], templateUrl: './dynamic-select.component.html', styleUrl: './dynamic-select.component.scss', @@ -45,7 +45,7 @@ export class DynamicSelectComponent { testId = computed(() => { const definition = this.dynamicValuesDefinition(); const operation = definition.operation?.trim(); - return operation ? `dynamic-select-${operation}` : 'dynamic-select'; + return operation ? `pm-dynamic-select-${operation}` : 'pm-dynamic-select'; }); private resourceService = inject(ResourceService); diff --git a/projects/wc/src/app/components/error/error.component.ts b/projects/wc/src/app/components/error/error.component.ts index 174e0b0..83437b5 100644 --- a/projects/wc/src/app/components/error/error.component.ts +++ b/projects/wc/src/app/components/error/error.component.ts @@ -1,7 +1,6 @@ import { ButtonConfig, ErrorConfig } from './models/error.model'; import { ChangeDetectionStrategy, - ChangeDetectorRef, Component, OnInit, ViewEncapsulation, @@ -20,7 +19,7 @@ import { } from '@ui5/webcomponents-ngx'; @Component({ - selector: 'app-error', + selector: 'pm-error', standalone: true, templateUrl: './error.component.html', encapsulation: ViewEncapsulation.ShadowDom, diff --git a/projects/wc/src/app/components/generic-ui/detail-view/detail-view.component.html b/projects/wc/src/app/components/generic-ui/detail-view/detail-view.component.html index 0ab407d..5cccbb1 100644 --- a/projects/wc/src/app/components/generic-ui/detail-view/detail-view.component.html +++ b/projects/wc/src/app/components/generic-ui/detail-view/detail-view.component.html @@ -50,7 +50,7 @@ @for (field of viewField.group.fields; let last = $last; track field.label) { {{ field.label }}: - {{ viewField.label }}

- } @else if (field.dynamicValuesDefinition) { - Actions - + No Resources There are currently no items to show. @@ -87,7 +87,7 @@ ) {

{{ field.label }}: - } @else { - + /> } } @@ -130,7 +130,7 @@ @if (hasUiCreateViewFields()) { - } - @if (displayType === 'secret') { - + > } @else if (displayType === 'boolIcon' && isBoolLike()) { - + > } @else if (displayType === 'link' && isUrlValue()) { - + > } @else { {{ value() }} } diff --git a/projects/wc/src/app/components/generic-ui/value-cell/value-cell.component.spec.ts b/projects/wc/src/app/components/generic-ui/value-cell/value-cell.component.spec.ts index a18d4be..e0e97c0 100644 --- a/projects/wc/src/app/components/generic-ui/value-cell/value-cell.component.spec.ts +++ b/projects/wc/src/app/components/generic-ui/value-cell/value-cell.component.spec.ts @@ -76,7 +76,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeTruthy(); + expect(compiled.querySelector('pm-boolean-value')).toBeTruthy(); expect(component.isBoolLike()).toBe(true); expect(component.boolValue()).toBe(true); }); @@ -87,7 +87,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeTruthy(); + expect(compiled.querySelector('pm-boolean-value')).toBeTruthy(); expect(component.isBoolLike()).toBe(true); expect(component.boolValue()).toBe(false); }); @@ -98,7 +98,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeTruthy(); + expect(compiled.querySelector('pm-boolean-value')).toBeTruthy(); expect(component.isBoolLike()).toBe(true); expect(component.boolValue()).toBe(true); }); @@ -109,7 +109,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeTruthy(); + expect(compiled.querySelector('pm-link-value')).toBeTruthy(); expect(component.isUrlValue()).toBe(true); expect(component.stringValue()).toBe('https://example.com'); }); @@ -120,7 +120,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeTruthy(); + expect(compiled.querySelector('pm-link-value')).toBeTruthy(); expect(component.isUrlValue()).toBe(true); }); @@ -128,8 +128,8 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent('cluster-a'); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(compiled.textContent.trim()).toBe('cluster-a'); expect(component.isBoolLike()).toBe(false); expect(component.isUrlValue()).toBe(false); @@ -139,8 +139,8 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent(''); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(component.isBoolLike()).toBe(false); expect(component.isUrlValue()).toBe(false); }); @@ -149,8 +149,8 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent(' '); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(component.isBoolLike()).toBe(false); expect(component.isUrlValue()).toBe(false); }); @@ -161,8 +161,8 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(compiled.textContent.trim()).toBe('not-a-url'); expect(component.isUrlValue()).toBe(false); }); @@ -171,8 +171,8 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent(null); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(component.isBoolLike()).toBe(false); expect(component.isUrlValue()).toBe(false); }); @@ -181,8 +181,8 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent(123); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(compiled.textContent.trim()).toBe('123'); }); @@ -240,7 +240,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-secret-value')).toBeTruthy(); + expect(compiled.querySelector('pm-secret-value')).toBeTruthy(); expect(component.displayAs()).toBe('secret'); }); @@ -250,7 +250,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-secret-value')).toBeFalsy(); + expect(compiled.querySelector('pm-secret-value')).toBeFalsy(); expect(component.displayAs()).toBe('link'); }); @@ -258,7 +258,7 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent('plain-text'); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-secret-value')).toBeFalsy(); + expect(compiled.querySelector('pm-secret-value')).toBeFalsy(); expect(component.displayAs()).toBeUndefined(); }); @@ -345,7 +345,7 @@ describe('ValueCellComponent', () => { component.isVisible.set(true); fixture.detectChanges(); - const secretValueComponent = compiled.querySelector('wc-secret-value'); + const secretValueComponent = compiled.querySelector('pm-secret-value'); expect(secretValueComponent).toBeTruthy(); }); }); @@ -430,9 +430,9 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); - expect(compiled.querySelector('wc-secret-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-secret-value')).toBeFalsy(); expect(compiled.textContent.trim()).toContain('test-value'); }); @@ -442,7 +442,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeTruthy(); + expect(compiled.querySelector('pm-link-value')).toBeTruthy(); }); }); @@ -453,7 +453,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeTruthy(); + expect(compiled.querySelector('pm-boolean-value')).toBeTruthy(); expect(component.isBoolLike()).toBe(true); expect(component.boolValue()).toBe(true); }); @@ -464,7 +464,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeTruthy(); + expect(compiled.querySelector('pm-boolean-value')).toBeTruthy(); expect(component.isBoolLike()).toBe(true); expect(component.boolValue()).toBe(false); }); @@ -475,7 +475,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeTruthy(); + expect(compiled.querySelector('pm-boolean-value')).toBeTruthy(); expect(component.isBoolLike()).toBe(true); expect(component.boolValue()).toBe(true); }); @@ -486,7 +486,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeTruthy(); + expect(compiled.querySelector('pm-boolean-value')).toBeTruthy(); expect(component.isBoolLike()).toBe(true); expect(component.boolValue()).toBe(false); }); @@ -497,7 +497,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeTruthy(); + expect(compiled.querySelector('pm-boolean-value')).toBeTruthy(); expect(component.isBoolLike()).toBe(true); expect(component.boolValue()).toBe(true); }); @@ -508,7 +508,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); expect(component.isBoolLike()).toBe(false); expect(component.boolValue()).toBeUndefined(); }); @@ -517,7 +517,7 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent('no'); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); expect(component.isBoolLike()).toBe(false); expect(component.boolValue()).toBeUndefined(); }); @@ -526,7 +526,7 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent('1'); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); expect(component.isBoolLike()).toBe(false); expect(component.boolValue()).toBeUndefined(); }); @@ -535,7 +535,7 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent('0'); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); expect(component.isBoolLike()).toBe(false); expect(component.boolValue()).toBeUndefined(); }); @@ -547,7 +547,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeTruthy(); + expect(compiled.querySelector('pm-boolean-value')).toBeTruthy(); expect(component.isBoolLike()).toBe(true); expect(component.boolValue()).toBe(true); }); @@ -559,7 +559,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeTruthy(); + expect(compiled.querySelector('pm-boolean-value')).toBeTruthy(); expect(component.isBoolLike()).toBe(true); expect(component.boolValue()).toBe(false); }); @@ -572,7 +572,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeTruthy(); + expect(compiled.querySelector('pm-link-value')).toBeTruthy(); expect(component.isUrlValue()).toBe(true); expect(component.stringValue()).toBe('https://example.com'); }); @@ -583,7 +583,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeTruthy(); + expect(compiled.querySelector('pm-link-value')).toBeTruthy(); expect(component.isUrlValue()).toBe(true); expect(component.stringValue()).toBe('http://example.com'); }); @@ -594,7 +594,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeTruthy(); + expect(compiled.querySelector('pm-link-value')).toBeTruthy(); expect(component.isUrlValue()).toBe(true); expect(component.stringValue()).toBe('ftp://example.com'); }); @@ -605,7 +605,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeTruthy(); + expect(compiled.querySelector('pm-link-value')).toBeTruthy(); expect(component.isUrlValue()).toBe(true); expect(component.stringValue()).toBe('https://example.com:8080'); }); @@ -619,7 +619,7 @@ describe('ValueCellComponent', () => { ); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeTruthy(); + expect(compiled.querySelector('pm-link-value')).toBeTruthy(); expect(component.isUrlValue()).toBe(true); expect(component.stringValue()).toBe( 'https://example.com/path/to/resource', @@ -635,7 +635,7 @@ describe('ValueCellComponent', () => { ); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeTruthy(); + expect(compiled.querySelector('pm-link-value')).toBeTruthy(); expect(component.isUrlValue()).toBe(true); expect(component.stringValue()).toBe( 'https://example.com?param=value&other=test', @@ -648,7 +648,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeTruthy(); + expect(compiled.querySelector('pm-link-value')).toBeTruthy(); expect(component.isUrlValue()).toBe(true); expect(component.stringValue()).toBe('https://example.com#section'); }); @@ -657,7 +657,7 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent('example.com'); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(component.isUrlValue()).toBe(false); }); @@ -665,7 +665,7 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent('www.example.com'); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(component.isUrlValue()).toBe(false); }); @@ -675,7 +675,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeTruthy(); + expect(compiled.querySelector('pm-link-value')).toBeTruthy(); expect(component.isUrlValue()).toBe(true); }); @@ -685,7 +685,7 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeTruthy(); + expect(compiled.querySelector('pm-link-value')).toBeTruthy(); expect(component.isUrlValue()).toBe(true); }); @@ -693,7 +693,7 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent('https://'); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(component.isUrlValue()).toBe(false); }); @@ -701,7 +701,7 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent('https://example.com with spaces'); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(component.isUrlValue()).toBe(false); }); }); @@ -711,8 +711,8 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent(' '); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(component.stringValue()).toBeUndefined(); }); @@ -720,8 +720,8 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent('\t\n\r'); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(component.stringValue()).toBeUndefined(); }); @@ -729,8 +729,8 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent(' test '); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(component.stringValue()).toBe(' test '); }); @@ -738,8 +738,8 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent(123); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(component.stringValue()).toBeUndefined(); }); @@ -748,8 +748,8 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent(obj); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(component.stringValue()).toBeUndefined(); }); @@ -758,8 +758,8 @@ describe('ValueCellComponent', () => { const { fixture } = makeComponent(arr); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(component.stringValue()).toBeUndefined(); }); }); @@ -771,8 +771,8 @@ describe('ValueCellComponent', () => { }); const compiled = fixture.nativeElement; - expect(compiled.querySelector('wc-boolean-value')).toBeTruthy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeTruthy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); }); it('should render plain text when no special rendering is needed', () => { @@ -782,8 +782,8 @@ describe('ValueCellComponent', () => { const compiled = fixture.nativeElement; const span = compiled.querySelector('span'); - expect(compiled.querySelector('wc-boolean-value')).toBeFalsy(); - expect(compiled.querySelector('wc-link-value')).toBeFalsy(); + expect(compiled.querySelector('pm-boolean-value')).toBeFalsy(); + expect(compiled.querySelector('pm-link-value')).toBeFalsy(); expect(span.classList.contains('label-value')).toBe(false); expect(compiled.textContent.trim()).toBe('some-text'); }); diff --git a/projects/wc/src/app/components/generic-ui/value-cell/value-cell.component.ts b/projects/wc/src/app/components/generic-ui/value-cell/value-cell.component.ts index d11f4c9..641c8bf 100644 --- a/projects/wc/src/app/components/generic-ui/value-cell/value-cell.component.ts +++ b/projects/wc/src/app/components/generic-ui/value-cell/value-cell.component.ts @@ -21,7 +21,7 @@ import '@ui5/webcomponents-icons/dist/show.js'; import { IconComponent } from '@ui5/webcomponents-ngx'; @Component({ - selector: 'value-cell', + selector: 'pm-value-cell', standalone: true, imports: [ IconComponent, diff --git a/projects/wc/src/app/components/organization-management/organization-management.component.ts b/projects/wc/src/app/components/organization-management/organization-management.component.ts index 8a8b917..950fc1b 100644 --- a/projects/wc/src/app/components/organization-management/organization-management.component.ts +++ b/projects/wc/src/app/components/organization-management/organization-management.component.ts @@ -42,7 +42,7 @@ import { } from '@ui5/webcomponents-ngx'; @Component({ - selector: 'organization-management', + selector: 'pm-organization-management', standalone: true, imports: [ LabelComponent, diff --git a/projects/wc/src/app/components/welcome/welcome.component.ts b/projects/wc/src/app/components/welcome/welcome.component.ts index 65134bf..292f2b3 100644 --- a/projects/wc/src/app/components/welcome/welcome.component.ts +++ b/projects/wc/src/app/components/welcome/welcome.component.ts @@ -18,13 +18,13 @@ interface Header { } @Component({ - selector: 'app-welcome', + selector: 'pm-welcome', template: `
Welcome to the {{ header()?.title }}!
@if (enhancedContext(); as enhancedContext) { - diff --git a/projects/wc/src/app/utils/ui5-configuration.ts b/projects/wc/src/app/utils/ui5-configuration.ts new file mode 100644 index 0000000..7aff4ba --- /dev/null +++ b/projects/wc/src/app/utils/ui5-configuration.ts @@ -0,0 +1,3 @@ +import { ignoreCustomElements } from '@ui5/webcomponents-base/dist/IgnoreCustomElements.js'; + +ignoreCustomElements('pm-'); diff --git a/projects/wc/src/main.ts b/projects/wc/src/main.ts index 34201da..ba04d4f 100644 --- a/projects/wc/src/main.ts +++ b/projects/wc/src/main.ts @@ -1,5 +1,6 @@ -import '@angular/localize/init'; import { appConfig } from './app/app.config'; +import './app/utils/ui5-configuration'; +import '@angular/localize/init'; import { createApplication } from '@angular/platform-browser'; createApplication(appConfig).catch((err) => console.error(err));