Skip to content

Commit 77d0193

Browse files
authored
Merge branch 'master' into bug/tor/dropdownFix
2 parents f449ffa + e9a2c18 commit 77d0193

File tree

13 files changed

+25
-39
lines changed

13 files changed

+25
-39
lines changed

packages/angular-sdk-components/src/lib/_components/designSystemExtension/material-case-summary/material-case-summary.component.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
}
5050

5151
.psdk-case-summary-fields {
52-
padding: calc(2 * 0.5rem);
52+
// padding: calc(2 * 0.5rem);
5353
display: grid;
5454
grid-row-gap: calc(2 * 0.5rem);
5555
}
@@ -90,6 +90,7 @@
9090
grid-template-columns: 1fr;
9191
grid-column-gap: calc(2 * 0.5rem);
9292
grid-row-gap: calc(1 * 0.5rem);
93+
margin: 0;
9394
}
9495

9596
.psdk-csf-secondary-field {

packages/angular-sdk-components/src/lib/_components/field/date-time/date-time.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class DateTimeComponent implements OnInit, OnDestroy {
7676
) {}
7777

7878
ngOnInit(): void {
79-
this.placeholder = `${this.theDateFormat.dateFormatStringLC}, hh:mm a`;
79+
this.placeholder = `${this.theDateFormat.dateFormatStringLC}, hh:mm A`;
8080
// First thing in initialization is registering and subscribing to the AngularPConnect service
8181
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
8282
this.controlName$ = this.angularPConnect.getComponentID(this);
@@ -143,7 +143,7 @@ export class DateTimeComponent implements OnInit, OnDestroy {
143143

144144
if (this.displayMode$ === 'DISPLAY_ONLY' || this.displayMode$ === 'STACKED_LARGE_VAL') {
145145
this.formattedValue$ = format(this.value$, 'datetime', {
146-
format: `${this.theDateFormat.dateFormatString} hh:mm a`
146+
format: `${this.theDateFormat.dateFormatString} hh:mm A`
147147
});
148148
}
149149

packages/angular-sdk-components/src/lib/_components/field/percentage/percentage.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class PercentageComponent implements OnInit, OnDestroy {
134134
this.propName = this.pConn$.getStateProps().value;
135135

136136
if (this.displayMode$ === 'DISPLAY_ONLY' || this.displayMode$ === 'STACKED_LARGE_VAL') {
137-
this.formattedValue = format(nValue, 'percentage');
137+
this.formattedValue = nValue ? format(nValue, 'percentage') : '';
138138
}
139139

140140
// timeout and detectChanges to avoid ExpressionChangedAfterItHasBeenCheckedError

packages/angular-sdk-components/src/lib/_components/field/time/time.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class TimeComponent implements OnInit, OnDestroy {
129129

130130
if (this.displayMode$ === 'DISPLAY_ONLY' || this.displayMode$ === 'STACKED_LARGE_VAL') {
131131
this.formattedValue$ = format(this.value$, 'timeonly', {
132-
format: 'hh:mm a'
132+
format: 'hh:mm A'
133133
});
134134
}
135135

packages/angular-sdk-components/src/lib/_components/infra/view/view.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div *ngIf="visibility$ !== false" class="ng-view-top">
2-
<div *ngIf="showLabel$ && label$ && templateName$ !== 'SimpleTable' && templateName$ !== 'DefaultForm'" class="template-title-container">
2+
<div *ngIf="showLabel$ && label$ && !noHeaderTemplates.includes(templateName$)" class="template-title-container">
33
<span>{{ label$ }}</span>
44
</div>
55

packages/angular-sdk-components/src/lib/_components/infra/view/view.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { getAllFields } from '../../template/utils';
77
import { ReferenceComponent } from '../reference/reference.component';
88
import { ComponentMapperComponent } from '../../../_bridge/component-mapper/component-mapper.component';
99

10+
const NO_HEADER_TEMPLATES = ['SubTabs', 'SimpleTable', 'Confirmation', 'DynamicTabs', 'DetailsSubTabs'];
11+
1012
/**
1113
* WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
1214
* Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and
@@ -77,13 +79,15 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
7779

7880
angularPConnectData: AngularPConnectData = {};
7981

82+
noHeaderTemplates = NO_HEADER_TEMPLATES;
83+
8084
configProps$: ViewProps;
8185
inheritedProps$: any;
8286
arChildren$: any[];
8387
templateName$: string;
8488
title$ = '';
8589
label$ = '';
86-
showLabel$ = true;
90+
showLabel$ = false;
8791
visibility$ = true;
8892

8993
constructor(

packages/angular-sdk-components/src/lib/_components/template/default-form/default-form.component.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
<!-- When adding a component here, add the same component in 'region' template as well -->
2-
<div *ngIf="!NO_HEADER_TEMPLATES.includes(template) && showLabel">
3-
<div class="template-title-container">{{ label }}</div>
4-
</div>
51
<div *ngIf="instructions" class="psdk-default-form-instruction-text">
62
<div key="instructions" id="instruction-text" [innerHTML]="instructions"></div>
73
</div>

packages/angular-sdk-components/src/lib/_components/template/default-form/default-form.component.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { FormTemplateBaseComponent } from '../form-template-base/form-template-b
99
interface DefaultFormProps {
1010
// If any, enter additional props that only exist on this component
1111
NumCols: string;
12-
template: string;
1312
instructions: string;
1413
}
1514

@@ -26,32 +25,14 @@ export class DefaultFormComponent extends FormTemplateBaseComponent implements O
2625

2726
arChildren$: any[];
2827
divClass$: string;
29-
template: any;
30-
showLabel: any;
31-
label: any;
3228
instructions: string;
3329

34-
NO_HEADER_TEMPLATES = [
35-
'SubTabs',
36-
'SimpleTable',
37-
'Details',
38-
'DetailsTwoColumn',
39-
'DetailsThreeColumn',
40-
'NarrowWideDetails',
41-
'WideNarrowDetails',
42-
'Confirmation'
43-
];
44-
4530
constructor(private templateUtils: TemplateUtils) {
4631
super();
4732
}
4833

4934
ngOnInit(): void {
5035
const configProps = this.pConn$.getConfigProps() as DefaultFormProps;
51-
this.template = configProps?.template;
52-
const propToUse: any = { ...this.pConn$.getInheritedProps() };
53-
this.showLabel = propToUse?.showLabel;
54-
this.label = propToUse?.label;
5536
const kids = this.pConn$.getChildren();
5637
this.instructions = this.templateUtils.getInstructions(this.pConn$, configProps?.instructions);
5738

packages/angular-sdk-components/src/lib/_components/template/dynamic-tabs/dynamic-tabs.component.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<div *ngIf="propsToUse.showLabel && propsToUse.label" class="template-title-container">
2+
<span>{{ propsToUse.label }}</span>
3+
</div>
14
<mat-tab-group id="dynamic-tabs" mat-stretch-tabs="false" animationDuration="0">
25
<mat-tab *ngFor="let tab of tabsItems" [label]="tab.name">
36
<component-mapper name="View" [props]="{ pConn$: tab.content.getPConnect() }"></component-mapper>

packages/angular-sdk-components/src/lib/_components/template/dynamic-tabs/dynamic-tabs.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { ComponentMapperComponent } from '../../../_bridge/component-mapper/comp
99
interface DynamicTabsProps {
1010
referenceList: string;
1111
template: string;
12+
label?: string;
13+
showLabel?: boolean;
1214
}
1315

1416
@Component({
@@ -24,6 +26,7 @@ export class DynamicTabsComponent implements OnInit, OnDestroy {
2426

2527
angularPConnectData: AngularPConnectData = {};
2628
tabsItems: any[];
29+
propsToUse: any;
2730

2831
constructor(private angularPConnect: AngularPConnectService) {}
2932

@@ -54,7 +57,9 @@ export class DynamicTabsComponent implements OnInit, OnDestroy {
5457
}
5558

5659
updateSelf() {
57-
const { referenceList } = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as DynamicTabsProps;
60+
const { referenceList, label, showLabel } = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as DynamicTabsProps;
61+
62+
this.propsToUse = { label, showLabel, ...this.pConn$.getInheritedProps() };
5863

5964
const { tablabel } = this.pConn$.getComponentConfig();
6065
const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel);

0 commit comments

Comments
 (0)