ngx-cho-components 1.0.0 → 3.3.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 (41) hide show
  1. package/README.md +35 -119
  2. package/fesm2022/ngx-cho-components.mjs +736 -279
  3. package/fesm2022/ngx-cho-components.mjs.map +1 -1
  4. package/lib/cho-address-info.component.d.ts +2 -2
  5. package/lib/cho-card-header.component.d.ts +4 -2
  6. package/lib/cho-card-tabs.component.d.ts +1 -1
  7. package/lib/cho-card.component.d.ts +14 -16
  8. package/lib/cho-component.types.d.ts +2 -0
  9. package/lib/cho-detail-page.component.d.ts +26 -0
  10. package/lib/cho-details-card.component.d.ts +4 -4
  11. package/lib/cho-email-info.component.d.ts +2 -6
  12. package/lib/cho-pager.component.d.ts +23 -0
  13. package/lib/cho-phone-info.component.d.ts +2 -2
  14. package/lib/cho-radio-group.component.d.ts +13 -12
  15. package/lib/cho-review-status-alert.component.d.ts +3 -3
  16. package/lib/cho-search-card.component.d.ts +41 -0
  17. package/lib/index.d.ts +5 -5
  18. package/package.json +15 -10
  19. package/styles/_cards.scss +116 -0
  20. package/styles/_contact-info.scss +9 -0
  21. package/styles/_detail-page.scss +31 -0
  22. package/styles/_forms.scss +33 -0
  23. package/styles/_index.scss +8 -0
  24. package/styles/_pager.scss +45 -0
  25. package/styles/_responsive.scss +26 -0
  26. package/styles/_search-card.scss +44 -0
  27. package/styles/_status.scss +9 -0
  28. package/esm2022/lib/cho-address-info.component.mjs +0 -37
  29. package/esm2022/lib/cho-card-filters.component.mjs +0 -18
  30. package/esm2022/lib/cho-card-header.component.mjs +0 -55
  31. package/esm2022/lib/cho-card-tabs.component.mjs +0 -63
  32. package/esm2022/lib/cho-card-toolbar.component.mjs +0 -18
  33. package/esm2022/lib/cho-card.component.mjs +0 -123
  34. package/esm2022/lib/cho-details-card.component.mjs +0 -52
  35. package/esm2022/lib/cho-email-info.component.mjs +0 -36
  36. package/esm2022/lib/cho-phone-info.component.mjs +0 -29
  37. package/esm2022/lib/cho-radio-group.component.mjs +0 -70
  38. package/esm2022/lib/cho-review-status-alert.component.mjs +0 -31
  39. package/esm2022/lib/index.mjs +0 -12
  40. package/esm2022/ngx-cho-components.mjs +0 -5
  41. package/esm2022/public-api.mjs +0 -5
@@ -1,102 +1,155 @@
1
+ import { TitleCasePipe, NgTemplateOutlet, DatePipe } from '@angular/common';
1
2
  import * as i0 from '@angular/core';
2
- import { Component, Input, ChangeDetectionStrategy, input, inject, output, viewChild, computed, signal, effect, ContentChild, EventEmitter, Output } from '@angular/core';
3
- import { TitleCasePipe, NgIf, NgTemplateOutlet, NgFor, DatePipe } from '@angular/common';
4
- import { ChoNavigationService, ChoRouteParamService } from 'ngx-cho-common';
5
- import * as i1 from '@angular/platform-browser';
6
- import * as i1$1 from '@angular/forms';
3
+ import { input, ChangeDetectionStrategy, Component, inject, output, TemplateRef, Directive, contentChild, linkedSignal, computed, signal, effect } from '@angular/core';
4
+ import { ChoNavigationService, ChoRouteParamService, CHO_PAGE_SIZE_OPTIONS, CHO_DEFAULT_PAGE_SIZE } from 'ngx-cho-common';
5
+ import * as i1 from 'primeng/button';
6
+ import { ButtonModule } from 'primeng/button';
7
+ import * as i1$1 from 'primeng/paginator';
8
+ import { PaginatorModule } from 'primeng/paginator';
9
+ import * as i1$2 from '@angular/forms';
7
10
  import { FormsModule } from '@angular/forms';
8
11
 
9
12
  class ChoAddressInfoComponent {
10
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoAddressInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ChoAddressInfoComponent, isStandalone: true, selector: "cho-address-info", inputs: { address: "address" }, ngImport: i0, template: `<p *ngIf="address.addressLine1" class="m-0">
12
- {{ address.addressLine1 | titlecase }}
13
- </p>
14
- <p *ngIf="address.addressLine2" class="m-0">
15
- {{ address.addressLine2 | titlecase }}
16
- </p>
17
- <p *ngIf="address.city" class="m-0">
18
- {{ address.city | titlecase }}, {{ address.stateProvinceCode }}
19
- {{ address.postalCode }}
20
- </p> `, isInline: true, dependencies: [{ kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
13
+ constructor() {
14
+ this.address = input.required();
15
+ }
16
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoAddressInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.24", type: ChoAddressInfoComponent, isStandalone: true, selector: "cho-address-info", inputs: { address: { classPropertyName: "address", publicName: "address", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
18
+ <div class="cho-contact-info">
19
+ @if (address().addressLine1) {
20
+ <p class="cho-contact-info__line">{{ address().addressLine1 | titlecase }}</p>
21
+ }
22
+ @if (address().addressLine2) {
23
+ <p class="cho-contact-info__line">{{ address().addressLine2 | titlecase }}</p>
24
+ }
25
+ @if (address().city) {
26
+ <p class="cho-contact-info__line">
27
+ {{ address().city | titlecase }}, {{ address().stateProvinceCode }}
28
+ {{ address().postalCode }}
29
+ </p>
30
+ }
31
+ </div>
32
+ `, isInline: true, dependencies: [{ kind: "pipe", type: TitleCasePipe, name: "titlecase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21
33
  }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoAddressInfoComponent, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoAddressInfoComponent, decorators: [{
23
35
  type: Component,
24
36
  args: [{
25
37
  selector: 'cho-address-info',
26
- template: `<p *ngIf="address.addressLine1" class="m-0">
27
- {{ address.addressLine1 | titlecase }}
28
- </p>
29
- <p *ngIf="address.addressLine2" class="m-0">
30
- {{ address.addressLine2 | titlecase }}
31
- </p>
32
- <p *ngIf="address.city" class="m-0">
33
- {{ address.city | titlecase }}, {{ address.stateProvinceCode }}
34
- {{ address.postalCode }}
35
- </p> `,
36
38
  standalone: true,
37
- imports: [TitleCasePipe, NgIf],
39
+ imports: [TitleCasePipe],
40
+ template: `
41
+ <div class="cho-contact-info">
42
+ @if (address().addressLine1) {
43
+ <p class="cho-contact-info__line">{{ address().addressLine1 | titlecase }}</p>
44
+ }
45
+ @if (address().addressLine2) {
46
+ <p class="cho-contact-info__line">{{ address().addressLine2 | titlecase }}</p>
47
+ }
48
+ @if (address().city) {
49
+ <p class="cho-contact-info__line">
50
+ {{ address().city | titlecase }}, {{ address().stateProvinceCode }}
51
+ {{ address().postalCode }}
52
+ </p>
53
+ }
54
+ </div>
55
+ `,
56
+ changeDetection: ChangeDetectionStrategy.OnPush,
38
57
  }]
39
- }], propDecorators: { address: [{
40
- type: Input
41
- }] } });
58
+ }] });
42
59
 
43
60
  class ChoCardFiltersComponent {
44
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoCardFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
45
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ChoCardFiltersComponent, isStandalone: true, selector: "cho-card-filters", host: { classAttribute: "card-filters" }, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
61
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
62
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.24", type: ChoCardFiltersComponent, isStandalone: true, selector: "cho-card-filters", host: { classAttribute: "cho-card-filters" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
46
63
  }
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoCardFiltersComponent, decorators: [{
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardFiltersComponent, decorators: [{
48
65
  type: Component,
49
66
  args: [{
50
67
  selector: 'cho-card-filters',
51
68
  standalone: true,
52
69
  changeDetection: ChangeDetectionStrategy.OnPush,
53
70
  imports: [],
54
- host: { class: 'card-filters' },
55
- template: ` <ng-content /> `,
71
+ host: { class: 'cho-card-filters' },
72
+ template: `<ng-content />`,
56
73
  }]
57
74
  }] });
58
75
 
59
76
  class ChoCardToolbarComponent {
60
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoCardToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
61
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ChoCardToolbarComponent, isStandalone: true, selector: "cho-card-toolbar", host: { classAttribute: "card-toolbar" }, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
77
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
78
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.24", type: ChoCardToolbarComponent, isStandalone: true, selector: "cho-card-toolbar", host: { classAttribute: "cho-card-toolbar cho-action-row cho-action-row--responsive cho-action-row--primary-right" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
62
79
  }
63
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoCardToolbarComponent, decorators: [{
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardToolbarComponent, decorators: [{
64
81
  type: Component,
65
82
  args: [{
66
83
  selector: 'cho-card-toolbar',
67
84
  standalone: true,
68
85
  changeDetection: ChangeDetectionStrategy.OnPush,
69
86
  imports: [],
70
- host: { class: 'card-toolbar' },
71
- template: ` <ng-content /> `,
87
+ host: {
88
+ class: 'cho-card-toolbar cho-action-row cho-action-row--responsive cho-action-row--primary-right',
89
+ },
90
+ template: `<ng-content />`,
72
91
  }]
73
92
  }] });
74
93
 
75
94
  class ChoCardHeaderComponent {
76
95
  constructor() {
96
+ this.headingLevel = input(3);
77
97
  this.headerText = input();
78
98
  this.toolbar = input();
79
99
  }
80
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoCardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
81
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ChoCardHeaderComponent, isStandalone: true, selector: "cho-card-header", inputs: { headerText: { classPropertyName: "headerText", publicName: "headerText", isSignal: true, isRequired: false, transformFunction: null }, toolbar: { classPropertyName: "toolbar", publicName: "toolbar", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
82
- <div class="card-header">
83
- <h3 class="card-title">
100
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
101
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.24", type: ChoCardHeaderComponent, isStandalone: true, selector: "cho-card-header", inputs: { headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, headerText: { classPropertyName: "headerText", publicName: "headerText", isSignal: true, isRequired: false, transformFunction: null }, toolbar: { classPropertyName: "toolbar", publicName: "toolbar", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
102
+ <header class="cho-card-header">
103
+ @switch (headingLevel()) {
104
+ @case (1) {
105
+ <h1 class="cho-card-header__title">
106
+ <ng-container *ngTemplateOutlet="title" />
107
+ </h1>
108
+ }
109
+ @case (2) {
110
+ <h2 class="cho-card-header__title">
111
+ <ng-container *ngTemplateOutlet="title" />
112
+ </h2>
113
+ }
114
+ @case (4) {
115
+ <h4 class="cho-card-header__title">
116
+ <ng-container *ngTemplateOutlet="title" />
117
+ </h4>
118
+ }
119
+ @case (5) {
120
+ <h5 class="cho-card-header__title">
121
+ <ng-container *ngTemplateOutlet="title" />
122
+ </h5>
123
+ }
124
+ @case (6) {
125
+ <h6 class="cho-card-header__title">
126
+ <ng-container *ngTemplateOutlet="title" />
127
+ </h6>
128
+ }
129
+ @default {
130
+ <h3 class="cho-card-header__title">
131
+ <ng-container *ngTemplateOutlet="title" />
132
+ </h3>
133
+ }
134
+ }
135
+
136
+ <ng-template #title>
84
137
  @if (headerText()) {
85
138
  {{ headerText() }}
86
139
  } @else {
87
140
  <ng-content />
88
141
  }
89
- </h3>
142
+ </ng-template>
90
143
 
91
144
  @if (toolbar()) {
92
145
  <cho-card-toolbar>
93
146
  <ng-container *ngTemplateOutlet="toolbar()!" />
94
147
  </cho-card-toolbar>
95
148
  }
96
- </div>
149
+ </header>
97
150
  `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ChoCardToolbarComponent, selector: "cho-card-toolbar" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
98
151
  }
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoCardHeaderComponent, decorators: [{
152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardHeaderComponent, decorators: [{
100
153
  type: Component,
101
154
  args: [{
102
155
  selector: 'cho-card-header',
@@ -104,21 +157,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
104
157
  changeDetection: ChangeDetectionStrategy.OnPush,
105
158
  imports: [NgTemplateOutlet, ChoCardToolbarComponent],
106
159
  template: `
107
- <div class="card-header">
108
- <h3 class="card-title">
160
+ <header class="cho-card-header">
161
+ @switch (headingLevel()) {
162
+ @case (1) {
163
+ <h1 class="cho-card-header__title">
164
+ <ng-container *ngTemplateOutlet="title" />
165
+ </h1>
166
+ }
167
+ @case (2) {
168
+ <h2 class="cho-card-header__title">
169
+ <ng-container *ngTemplateOutlet="title" />
170
+ </h2>
171
+ }
172
+ @case (4) {
173
+ <h4 class="cho-card-header__title">
174
+ <ng-container *ngTemplateOutlet="title" />
175
+ </h4>
176
+ }
177
+ @case (5) {
178
+ <h5 class="cho-card-header__title">
179
+ <ng-container *ngTemplateOutlet="title" />
180
+ </h5>
181
+ }
182
+ @case (6) {
183
+ <h6 class="cho-card-header__title">
184
+ <ng-container *ngTemplateOutlet="title" />
185
+ </h6>
186
+ }
187
+ @default {
188
+ <h3 class="cho-card-header__title">
189
+ <ng-container *ngTemplateOutlet="title" />
190
+ </h3>
191
+ }
192
+ }
193
+
194
+ <ng-template #title>
109
195
  @if (headerText()) {
110
196
  {{ headerText() }}
111
197
  } @else {
112
198
  <ng-content />
113
199
  }
114
- </h3>
200
+ </ng-template>
115
201
 
116
202
  @if (toolbar()) {
117
203
  <cho-card-toolbar>
118
204
  <ng-container *ngTemplateOutlet="toolbar()!" />
119
205
  </cho-card-toolbar>
120
206
  }
121
- </div>
207
+ </header>
122
208
  `,
123
209
  }]
124
210
  }] });
@@ -141,24 +227,22 @@ class ChoCardTabsComponent {
141
227
  });
142
228
  this.tabSelect.emit(this.activeTab);
143
229
  }
144
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoCardTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
145
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ChoCardTabsComponent, isStandalone: true, selector: "cho-card-tabs", inputs: { tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabSelect: "tabSelect" }, ngImport: i0, template: `
146
- <div class="card-tabs">
230
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
231
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.24", type: ChoCardTabsComponent, isStandalone: true, selector: "cho-card-tabs", inputs: { tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabSelect: "tabSelect" }, ngImport: i0, template: `
232
+ <nav class="cho-card-tabs" aria-label="Card views">
147
233
  <ul>
148
234
  @for (tab of tabs(); track tab.value) {
149
235
  <li (click)="onSelect(tab.value)">
150
- <a
151
- class="nav-link text-active-primary"
152
- [class.active]="activeTab === tab.value">
236
+ <a class="cho-card-tabs__link" [class.active]="activeTab === tab.value">
153
237
  {{ tab.label }}
154
238
  </a>
155
239
  </li>
156
240
  }
157
241
  </ul>
158
- </div>
242
+ </nav>
159
243
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
160
244
  }
161
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoCardTabsComponent, decorators: [{
245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardTabsComponent, decorators: [{
162
246
  type: Component,
163
247
  args: [{
164
248
  selector: 'cho-card-tabs',
@@ -166,92 +250,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
166
250
  changeDetection: ChangeDetectionStrategy.OnPush,
167
251
  imports: [],
168
252
  template: `
169
- <div class="card-tabs">
253
+ <nav class="cho-card-tabs" aria-label="Card views">
170
254
  <ul>
171
255
  @for (tab of tabs(); track tab.value) {
172
256
  <li (click)="onSelect(tab.value)">
173
- <a
174
- class="nav-link text-active-primary"
175
- [class.active]="activeTab === tab.value">
257
+ <a class="cho-card-tabs__link" [class.active]="activeTab === tab.value">
176
258
  {{ tab.label }}
177
259
  </a>
178
260
  </li>
179
261
  }
180
262
  </ul>
181
- </div>
263
+ </nav>
182
264
  `,
183
265
  }]
184
266
  }] });
185
267
 
186
268
  class ChoCardComponent {
187
269
  constructor() {
270
+ this.content = input();
271
+ this.contentPadding = input('comfortable');
272
+ this.embedded = input(false);
273
+ this.filters = input();
188
274
  this.header = input();
189
275
  this.headerText = input();
190
- this.toolbar = input();
191
- this.filters = input();
192
- this.content = input();
276
+ this.headingLevel = input(3);
277
+ this.hideHeader = input(false);
278
+ this.showBody = input(true);
193
279
  this.tabs = input();
280
+ this.tabsContent = input();
281
+ this.toolbar = input();
194
282
  this.tabSelect = output();
195
- // used for projected content detection
196
- this.contentWrapper = viewChild('contentWrapper');
197
- this.hasContent = computed(() => this.content() || this._hasProjectedContent());
198
- this.hasFilters = computed(() => !!this.filters());
199
- this.hasHeader = computed(() => !!this.header() || !!this.headerText());
200
- this.hasTabs = computed(() => !!this.tabs() && this.tabs().length > 0);
201
- this.hasToolbar = computed(() => !!this.toolbar());
202
- this._hasProjectedContent = signal(false);
203
- effect(() => this.detectProjectedContent(), { allowSignalWrites: true });
204
283
  }
205
- detectProjectedContent() {
206
- const wrapper = this.contentWrapper();
207
- if (wrapper) {
208
- const element = wrapper.nativeElement;
209
- const hasRealContent = Array.from(element.childNodes).some((node) => {
210
- if (node.nodeType === Node.ELEMENT_NODE)
211
- return true;
212
- if (node.nodeType === Node.TEXT_NODE) {
213
- return node.textContent?.trim().length > 0;
214
- }
215
- return false;
216
- });
217
- this._hasProjectedContent.set(hasRealContent);
218
- }
219
- }
220
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
221
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ChoCardComponent, isStandalone: true, selector: "cho-card", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, headerText: { classPropertyName: "headerText", publicName: "headerText", isSignal: true, isRequired: false, transformFunction: null }, toolbar: { classPropertyName: "toolbar", publicName: "toolbar", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabSelect: "tabSelect" }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: `
222
- <div class="card mb-3">
223
- @if (hasHeader()) {
224
- <cho-card-header [toolbar]="toolbar()" [headerText]="headerText()">
284
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
285
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.24", type: ChoCardComponent, isStandalone: true, selector: "cho-card", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, contentPadding: { classPropertyName: "contentPadding", publicName: "contentPadding", isSignal: true, isRequired: false, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, headerText: { classPropertyName: "headerText", publicName: "headerText", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null }, showBody: { classPropertyName: "showBody", publicName: "showBody", isSignal: true, isRequired: false, transformFunction: null }, tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null }, tabsContent: { classPropertyName: "tabsContent", publicName: "tabsContent", isSignal: true, isRequired: false, transformFunction: null }, toolbar: { classPropertyName: "toolbar", publicName: "toolbar", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabSelect: "tabSelect" }, ngImport: i0, template: `
286
+ <section class="cho-card" [class.cho-card--embedded]="embedded()">
287
+ @if (!hideHeader() && (header() || headerText())) {
288
+ <cho-card-header
289
+ [headingLevel]="headingLevel()"
290
+ [toolbar]="toolbar()"
291
+ [headerText]="headerText()">
225
292
  <ng-container *ngTemplateOutlet="header()!" />
226
293
  </cho-card-header>
227
- } @else if (hasToolbar()) {
294
+ } @else if (!hideHeader() && toolbar()) {
228
295
  <cho-card-toolbar>
229
296
  <ng-container *ngTemplateOutlet="toolbar()!" />
230
297
  </cho-card-toolbar>
231
298
  }
232
299
 
233
- @if (hasFilters()) {
300
+ @if (filters()) {
234
301
  <cho-card-filters>
235
302
  <ng-container *ngTemplateOutlet="filters()!" />
236
303
  </cho-card-filters>
237
304
  }
238
305
 
239
- @if (hasTabs()) {
306
+ @if (tabsContent()) {
307
+ <div class="cho-card__tabs">
308
+ <ng-container *ngTemplateOutlet="tabsContent()!" />
309
+ </div>
310
+ } @else if (tabs()?.length) {
240
311
  <cho-card-tabs [tabs]="tabs()!" (tabSelect)="tabSelect.emit($event)">
241
312
  </cho-card-tabs>
242
313
  }
243
314
 
244
- <div class="card-body" #contentWrapper [hidden]="!hasContent()">
245
- @if (content()) {
246
- <ng-container *ngTemplateOutlet="content()!" />
247
- } @else {
248
- <ng-content />
249
- }
250
- </div>
251
- </div>
252
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ChoCardHeaderComponent, selector: "cho-card-header", inputs: ["headerText", "toolbar"] }, { kind: "component", type: ChoCardToolbarComponent, selector: "cho-card-toolbar" }, { kind: "component", type: ChoCardFiltersComponent, selector: "cho-card-filters" }, { kind: "component", type: ChoCardTabsComponent, selector: "cho-card-tabs", inputs: ["tabs"], outputs: ["tabSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
315
+ @if (showBody()) {
316
+ <div
317
+ class="cho-card__body"
318
+ [class.cho-card__body--compact]="contentPadding() === 'compact'"
319
+ [class.cho-card__body--comfortable]="contentPadding() === 'comfortable'"
320
+ [class.cho-card__body--none]="contentPadding() === 'none'">
321
+ @if (content()) {
322
+ <ng-container *ngTemplateOutlet="content()!" />
323
+ } @else {
324
+ <ng-content />
325
+ }
326
+ </div>
327
+ }
328
+ </section>
329
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ChoCardHeaderComponent, selector: "cho-card-header", inputs: ["headingLevel", "headerText", "toolbar"] }, { kind: "component", type: ChoCardToolbarComponent, selector: "cho-card-toolbar" }, { kind: "component", type: ChoCardFiltersComponent, selector: "cho-card-filters" }, { kind: "component", type: ChoCardTabsComponent, selector: "cho-card-tabs", inputs: ["tabs"], outputs: ["tabSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
253
330
  }
254
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoCardComponent, decorators: [{
331
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardComponent, decorators: [{
255
332
  type: Component,
256
333
  args: [{
257
334
  selector: 'cho-card',
@@ -265,240 +342,620 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
265
342
  ChoCardTabsComponent,
266
343
  ],
267
344
  template: `
268
- <div class="card mb-3">
269
- @if (hasHeader()) {
270
- <cho-card-header [toolbar]="toolbar()" [headerText]="headerText()">
345
+ <section class="cho-card" [class.cho-card--embedded]="embedded()">
346
+ @if (!hideHeader() && (header() || headerText())) {
347
+ <cho-card-header
348
+ [headingLevel]="headingLevel()"
349
+ [toolbar]="toolbar()"
350
+ [headerText]="headerText()">
271
351
  <ng-container *ngTemplateOutlet="header()!" />
272
352
  </cho-card-header>
273
- } @else if (hasToolbar()) {
353
+ } @else if (!hideHeader() && toolbar()) {
274
354
  <cho-card-toolbar>
275
355
  <ng-container *ngTemplateOutlet="toolbar()!" />
276
356
  </cho-card-toolbar>
277
357
  }
278
358
 
279
- @if (hasFilters()) {
359
+ @if (filters()) {
280
360
  <cho-card-filters>
281
361
  <ng-container *ngTemplateOutlet="filters()!" />
282
362
  </cho-card-filters>
283
363
  }
284
364
 
285
- @if (hasTabs()) {
365
+ @if (tabsContent()) {
366
+ <div class="cho-card__tabs">
367
+ <ng-container *ngTemplateOutlet="tabsContent()!" />
368
+ </div>
369
+ } @else if (tabs()?.length) {
286
370
  <cho-card-tabs [tabs]="tabs()!" (tabSelect)="tabSelect.emit($event)">
287
371
  </cho-card-tabs>
288
372
  }
289
373
 
290
- <div class="card-body" #contentWrapper [hidden]="!hasContent()">
291
- @if (content()) {
292
- <ng-container *ngTemplateOutlet="content()!" />
293
- } @else {
294
- <ng-content />
295
- }
296
- </div>
297
- </div>
374
+ @if (showBody()) {
375
+ <div
376
+ class="cho-card__body"
377
+ [class.cho-card__body--compact]="contentPadding() === 'compact'"
378
+ [class.cho-card__body--comfortable]="contentPadding() === 'comfortable'"
379
+ [class.cho-card__body--none]="contentPadding() === 'none'">
380
+ @if (content()) {
381
+ <ng-container *ngTemplateOutlet="content()!" />
382
+ } @else {
383
+ <ng-content />
384
+ }
385
+ </div>
386
+ }
387
+ </section>
298
388
  `,
299
389
  }]
300
- }], ctorParameters: () => [] });
390
+ }] });
391
+
392
+ class ChoDetailPageToolbarDirective {
393
+ constructor() {
394
+ this.templateRef = inject((TemplateRef));
395
+ }
396
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoDetailPageToolbarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
397
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.24", type: ChoDetailPageToolbarDirective, isStandalone: true, selector: "ng-template[choDetailPageToolbar]", ngImport: i0 }); }
398
+ }
399
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoDetailPageToolbarDirective, decorators: [{
400
+ type: Directive,
401
+ args: [{ selector: 'ng-template[choDetailPageToolbar]', standalone: true }]
402
+ }] });
403
+ class ChoDetailPageTabsDirective {
404
+ constructor() {
405
+ this.templateRef = inject((TemplateRef));
406
+ }
407
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoDetailPageTabsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
408
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.24", type: ChoDetailPageTabsDirective, isStandalone: true, selector: "ng-template[choDetailPageTabs]", ngImport: i0 }); }
409
+ }
410
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoDetailPageTabsDirective, decorators: [{
411
+ type: Directive,
412
+ args: [{ selector: 'ng-template[choDetailPageTabs]', standalone: true }]
413
+ }] });
414
+ class ChoDetailPageComponent {
415
+ constructor() {
416
+ this.backIcon = input('pi pi-arrow-left');
417
+ this.backLabel = input('Back');
418
+ this.contentPadding = input('comfortable');
419
+ this.headingLevel = input(1);
420
+ this.pageTitle = input.required();
421
+ this.showBackButton = input(true);
422
+ this.back = output();
423
+ this.tabs = contentChild(ChoDetailPageTabsDirective);
424
+ this.toolbar = contentChild(ChoDetailPageToolbarDirective);
425
+ }
426
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoDetailPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
427
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.24", type: ChoDetailPageComponent, isStandalone: true, selector: "cho-detail-page", inputs: { backIcon: { classPropertyName: "backIcon", publicName: "backIcon", isSignal: true, isRequired: false, transformFunction: null }, backLabel: { classPropertyName: "backLabel", publicName: "backLabel", isSignal: true, isRequired: false, transformFunction: null }, contentPadding: { classPropertyName: "contentPadding", publicName: "contentPadding", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: true, transformFunction: null }, showBackButton: { classPropertyName: "showBackButton", publicName: "showBackButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { back: "back" }, queries: [{ propertyName: "tabs", first: true, predicate: ChoDetailPageTabsDirective, descendants: true, isSignal: true }, { propertyName: "toolbar", first: true, predicate: ChoDetailPageToolbarDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
428
+ <cho-card
429
+ [contentPadding]="'none'"
430
+ [headingLevel]="headingLevel()"
431
+ [headerText]="pageTitle()"
432
+ [showBody]="false"
433
+ [tabsContent]="tabs()?.templateRef"
434
+ [toolbar]="pageToolbar">
435
+ </cho-card>
436
+
437
+ <ng-template #pageToolbar>
438
+ @if (toolbar(); as projectedToolbar) {
439
+ <ng-container [ngTemplateOutlet]="projectedToolbar.templateRef" />
440
+ }
441
+
442
+ @if (showBackButton()) {
443
+ <p-button
444
+ type="button"
445
+ severity="secondary"
446
+ [outlined]="true"
447
+ [icon]="backIcon()"
448
+ [label]="backLabel()"
449
+ (onClick)="back.emit()" />
450
+ }
451
+ </ng-template>
452
+
453
+ <div
454
+ class="cho-detail-page__body"
455
+ [class.cho-detail-page__body--compact]="contentPadding() === 'compact'"
456
+ [class.cho-detail-page__body--comfortable]="contentPadding() === 'comfortable'"
457
+ [class.cho-detail-page__body--none]="contentPadding() === 'none'">
458
+ <ng-content />
459
+ </div>
460
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ChoCardComponent, selector: "cho-card", inputs: ["content", "contentPadding", "embedded", "filters", "header", "headerText", "headingLevel", "hideHeader", "showBody", "tabs", "tabsContent", "toolbar"], outputs: ["tabSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
461
+ }
462
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoDetailPageComponent, decorators: [{
463
+ type: Component,
464
+ args: [{
465
+ selector: 'cho-detail-page',
466
+ standalone: true,
467
+ imports: [NgTemplateOutlet, ButtonModule, ChoCardComponent],
468
+ template: `
469
+ <cho-card
470
+ [contentPadding]="'none'"
471
+ [headingLevel]="headingLevel()"
472
+ [headerText]="pageTitle()"
473
+ [showBody]="false"
474
+ [tabsContent]="tabs()?.templateRef"
475
+ [toolbar]="pageToolbar">
476
+ </cho-card>
477
+
478
+ <ng-template #pageToolbar>
479
+ @if (toolbar(); as projectedToolbar) {
480
+ <ng-container [ngTemplateOutlet]="projectedToolbar.templateRef" />
481
+ }
482
+
483
+ @if (showBackButton()) {
484
+ <p-button
485
+ type="button"
486
+ severity="secondary"
487
+ [outlined]="true"
488
+ [icon]="backIcon()"
489
+ [label]="backLabel()"
490
+ (onClick)="back.emit()" />
491
+ }
492
+ </ng-template>
493
+
494
+ <div
495
+ class="cho-detail-page__body"
496
+ [class.cho-detail-page__body--compact]="contentPadding() === 'compact'"
497
+ [class.cho-detail-page__body--comfortable]="contentPadding() === 'comfortable'"
498
+ [class.cho-detail-page__body--none]="contentPadding() === 'none'">
499
+ <ng-content />
500
+ </div>
501
+ `,
502
+ changeDetection: ChangeDetectionStrategy.OnPush,
503
+ }]
504
+ }] });
301
505
 
302
506
  class ChoDetailsCardComponent {
303
507
  constructor() {
304
- this.cardTitle = '';
305
- this.toolbar = null;
508
+ this.cardTitle = input('');
509
+ this.contentPadding = input('comfortable');
306
510
  }
307
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoDetailsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
308
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ChoDetailsCardComponent, isStandalone: true, selector: "cho-details-card", inputs: { cardTitle: "cardTitle" }, queries: [{ propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true }], ngImport: i0, template: `
309
- <div class="card mb-3">
310
- <div class="card-header">
311
- <h3 class="card-title">{{ cardTitle }}</h3>
312
-
313
- <div class="card-toolbar">
314
- <ng-content #toolbar select="[toolbar]"></ng-content>
315
- </div>
316
- </div>
317
-
318
- <div class="card-body">
319
- <ng-content></ng-content>
320
- </div>
321
- </div>
322
- `, isInline: true }); }
511
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoDetailsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
512
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.24", type: ChoDetailsCardComponent, isStandalone: true, selector: "cho-details-card", inputs: { cardTitle: { classPropertyName: "cardTitle", publicName: "cardTitle", isSignal: true, isRequired: false, transformFunction: null }, contentPadding: { classPropertyName: "contentPadding", publicName: "contentPadding", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
513
+ <cho-card
514
+ [content]="content"
515
+ [contentPadding]="contentPadding()"
516
+ [headerText]="cardTitle()"
517
+ [toolbar]="toolbar">
518
+ </cho-card>
519
+
520
+ <ng-template #toolbar><ng-content select="[toolbar]" /></ng-template>
521
+ <ng-template #content><ng-content /></ng-template>
522
+ `, isInline: true, dependencies: [{ kind: "component", type: ChoCardComponent, selector: "cho-card", inputs: ["content", "contentPadding", "embedded", "filters", "header", "headerText", "headingLevel", "hideHeader", "showBody", "tabs", "tabsContent", "toolbar"], outputs: ["tabSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
323
523
  }
324
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoDetailsCardComponent, decorators: [{
524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoDetailsCardComponent, decorators: [{
325
525
  type: Component,
326
526
  args: [{
327
527
  selector: 'cho-details-card',
328
528
  standalone: true,
329
- template: `
330
- <div class="card mb-3">
331
- <div class="card-header">
332
- <h3 class="card-title">{{ cardTitle }}</h3>
333
-
334
- <div class="card-toolbar">
335
- <ng-content #toolbar select="[toolbar]"></ng-content>
336
- </div>
337
- </div>
338
-
339
- <div class="card-body">
340
- <ng-content></ng-content>
341
- </div>
342
- </div>
529
+ imports: [ChoCardComponent],
530
+ template: `
531
+ <cho-card
532
+ [content]="content"
533
+ [contentPadding]="contentPadding()"
534
+ [headerText]="cardTitle()"
535
+ [toolbar]="toolbar">
536
+ </cho-card>
537
+
538
+ <ng-template #toolbar><ng-content select="[toolbar]" /></ng-template>
539
+ <ng-template #content><ng-content /></ng-template>
343
540
  `,
541
+ changeDetection: ChangeDetectionStrategy.OnPush,
344
542
  }]
345
- }], propDecorators: { cardTitle: [{
346
- type: Input
347
- }], toolbar: [{
348
- type: ContentChild,
349
- args: ['toolbar']
350
- }] } });
543
+ }] });
351
544
 
352
545
  class ChoEmailInfoComponent {
353
- constructor(sanitizer) {
354
- this.sanitizer = sanitizer;
355
- this.sanitizedEmailLink = this.email?.emailAddress
356
- ? this.sanitizer.bypassSecurityTrustUrl(`mailto:${this.email.emailAddress}`)
357
- : '';
546
+ constructor() {
547
+ this.email = input();
358
548
  }
359
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoEmailInfoComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
360
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ChoEmailInfoComponent, isStandalone: true, selector: "cho-email-info", inputs: { email: "email" }, ngImport: i0, template: `<ng-container *ngIf="email; else empty"
361
- ><span *ngIf="email.emailTypeCode">{{ email.emailTypeCode[0] }}: </span>
362
- <a [href]="sanitizedEmailLink">{{ email.emailAddress }}</a>
363
- <small *ngIf="email.description"> ({{ email.description }})</small></ng-container
364
- >
365
- <ng-template #empty><span>--</span></ng-template>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
549
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoEmailInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
550
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.24", type: ChoEmailInfoComponent, isStandalone: true, selector: "cho-email-info", inputs: { email: { classPropertyName: "email", publicName: "email", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
551
+ @if (email(); as currentEmail) {
552
+ <span class="cho-contact-info">
553
+ @if (currentEmail.emailTypeCode) {
554
+ <span>{{ currentEmail.emailTypeCode[0] }}: </span>
555
+ }
556
+ <a [href]="'mailto:' + currentEmail.emailAddress">{{
557
+ currentEmail.emailAddress
558
+ }}</a>
559
+ @if (currentEmail.description) {
560
+ <small> ({{ currentEmail.description }})</small>
561
+ }
562
+ </span>
563
+ } @else {
564
+ <span>--</span>
565
+ }
566
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
366
567
  }
367
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoEmailInfoComponent, decorators: [{
568
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoEmailInfoComponent, decorators: [{
368
569
  type: Component,
369
570
  args: [{
370
571
  selector: 'cho-email-info',
371
- template: `<ng-container *ngIf="email; else empty"
372
- ><span *ngIf="email.emailTypeCode">{{ email.emailTypeCode[0] }}: </span>
373
- <a [href]="sanitizedEmailLink">{{ email.emailAddress }}</a>
374
- <small *ngIf="email.description"> ({{ email.description }})</small></ng-container
375
- >
376
- <ng-template #empty><span>--</span></ng-template>`,
377
572
  standalone: true,
378
- imports: [NgIf],
573
+ template: `
574
+ @if (email(); as currentEmail) {
575
+ <span class="cho-contact-info">
576
+ @if (currentEmail.emailTypeCode) {
577
+ <span>{{ currentEmail.emailTypeCode[0] }}: </span>
578
+ }
579
+ <a [href]="'mailto:' + currentEmail.emailAddress">{{
580
+ currentEmail.emailAddress
581
+ }}</a>
582
+ @if (currentEmail.description) {
583
+ <small> ({{ currentEmail.description }})</small>
584
+ }
585
+ </span>
586
+ } @else {
587
+ <span>--</span>
588
+ }
589
+ `,
590
+ changeDetection: ChangeDetectionStrategy.OnPush,
379
591
  }]
380
- }], ctorParameters: () => [{ type: i1.DomSanitizer }], propDecorators: { email: [{
381
- type: Input
382
- }] } });
592
+ }] });
383
593
 
384
594
  class ChoPhoneInfoComponent {
385
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoPhoneInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
386
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ChoPhoneInfoComponent, isStandalone: true, selector: "cho-phone-info", inputs: { phone: "phone" }, ngImport: i0, template: ` <ng-container *ngIf="phone; else empty"
387
- ><span *ngIf="phone.phoneTypeCode">{{ phone.phoneTypeCode[0] }}: </span>
388
- {{ phone.phoneNumber }}
389
- <small *ngIf="phone.description"> ({{ phone.description }})</small></ng-container
390
- >
391
- <ng-template #empty><span>--</span></ng-template>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
595
+ constructor() {
596
+ this.phone = input();
597
+ }
598
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoPhoneInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
599
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.24", type: ChoPhoneInfoComponent, isStandalone: true, selector: "cho-phone-info", inputs: { phone: { classPropertyName: "phone", publicName: "phone", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
600
+ @if (phone(); as currentPhone) {
601
+ <span class="cho-contact-info">
602
+ @if (currentPhone.phoneTypeCode) {
603
+ <span>{{ currentPhone.phoneTypeCode[0] }}: </span>
604
+ }
605
+ {{ currentPhone.phoneNumber }}
606
+ @if (currentPhone.description) {
607
+ <small> ({{ currentPhone.description }})</small>
608
+ }
609
+ </span>
610
+ } @else {
611
+ <span>--</span>
612
+ }
613
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
392
614
  }
393
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoPhoneInfoComponent, decorators: [{
615
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoPhoneInfoComponent, decorators: [{
394
616
  type: Component,
395
617
  args: [{
396
618
  selector: 'cho-phone-info',
397
- template: ` <ng-container *ngIf="phone; else empty"
398
- ><span *ngIf="phone.phoneTypeCode">{{ phone.phoneTypeCode[0] }}: </span>
399
- {{ phone.phoneNumber }}
400
- <small *ngIf="phone.description"> ({{ phone.description }})</small></ng-container
401
- >
402
- <ng-template #empty><span>--</span></ng-template>`,
403
619
  standalone: true,
404
- imports: [NgIf],
620
+ template: `
621
+ @if (phone(); as currentPhone) {
622
+ <span class="cho-contact-info">
623
+ @if (currentPhone.phoneTypeCode) {
624
+ <span>{{ currentPhone.phoneTypeCode[0] }}: </span>
625
+ }
626
+ {{ currentPhone.phoneNumber }}
627
+ @if (currentPhone.description) {
628
+ <small> ({{ currentPhone.description }})</small>
629
+ }
630
+ </span>
631
+ } @else {
632
+ <span>--</span>
633
+ }
634
+ `,
635
+ changeDetection: ChangeDetectionStrategy.OnPush,
405
636
  }]
406
- }], propDecorators: { phone: [{
407
- type: Input
408
- }] } });
637
+ }] });
409
638
 
410
- class ChoRadioGroupComponent {
639
+ class ChoPagerComponent {
411
640
  constructor() {
412
- this.label = '';
413
- this.options = [];
414
- this.groupName = '';
415
- this.defaultValue = null;
416
- this.selectionChange = new EventEmitter();
417
- this.selectedOption = this.defaultValue;
641
+ this.defaultPageSizeOptions = inject(CHO_PAGE_SIZE_OPTIONS);
642
+ this.navigationService = inject(ChoNavigationService);
643
+ this.instance = input.required();
644
+ this.alwaysShow = input(false);
645
+ this.currentPageReportTemplate = input('{totalRecords} result(s)');
646
+ this.pageSizeOptions = input();
647
+ this.syncQueryParams = input(true);
648
+ this.totalItems = input();
649
+ this.pagingChanged = output();
650
+ this.activePager = linkedSignal(() => this.instance());
651
+ this.first = computed(() => Math.max(this.activePager().currentPage - 1, 0) * this.rows());
652
+ this.pageSizeValues = computed(() => {
653
+ const configuredOptions = this.pageSizeOptions();
654
+ return [...(configuredOptions?.length ? configuredOptions : this.defaultPageSizeOptions)];
655
+ });
656
+ this.rows = computed(() => this.getPositiveInteger(this.activePager().itemsPerPage, CHO_DEFAULT_PAGE_SIZE));
657
+ this.totalRecords = computed(() => this.totalItems() ?? this.activePager().totalItems ?? 0);
418
658
  }
419
- emitSelection() {
420
- if (this.selectedOption !== undefined) {
421
- this.selectionChange.emit(this.selectedOption);
659
+ onPageChanged(event) {
660
+ const rows = this.getPositiveInteger(event.rows, this.rows());
661
+ const requestedPage = typeof event.page === 'number'
662
+ ? event.page + 1
663
+ : Math.floor(Math.max(event.first ?? 0, 0) / rows) + 1;
664
+ const maximumPage = Math.max(Math.ceil(this.totalRecords() / rows), 1);
665
+ const nextPager = {
666
+ ...this.activePager(),
667
+ currentPage: Math.min(Math.max(requestedPage, 1), maximumPage),
668
+ itemsPerPage: rows,
669
+ };
670
+ this.activePager.set(nextPager);
671
+ if (this.syncQueryParams()) {
672
+ this.navigationService.setQueryParams({
673
+ p: nextPager.currentPage,
674
+ pp: nextPager.itemsPerPage,
675
+ });
422
676
  }
677
+ this.pagingChanged.emit(nextPager);
678
+ }
679
+ getPositiveInteger(value, fallback) {
680
+ const numberValue = Number(value);
681
+ return Number.isSafeInteger(numberValue) && numberValue > 0 ? numberValue : fallback;
423
682
  }
424
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoRadioGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
425
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ChoRadioGroupComponent, isStandalone: true, selector: "cho-radio-group", inputs: { label: "label", options: "options", groupName: "groupName", defaultValue: "defaultValue" }, outputs: { selectionChange: "selectionChange" }, ngImport: i0, template: `
426
- <div>
427
- <label class="form-label">{{ label }}</label>
428
- <div *ngFor="let option of options" class="form-check form-check-inline">
429
- <input
430
- class="form-check-input"
431
- type="radio"
432
- [name]="groupName"
433
- [value]="option.value"
434
- [(ngModel)]="selectedOption"
435
- (change)="emitSelection()" />
436
- {{ option.label }}
437
- </div>
438
- </div>
439
- `, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
683
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoPagerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
684
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.24", type: ChoPagerComponent, isStandalone: true, selector: "cho-pager", inputs: { instance: { classPropertyName: "instance", publicName: "instance", isSignal: true, isRequired: true, transformFunction: null }, alwaysShow: { classPropertyName: "alwaysShow", publicName: "alwaysShow", isSignal: true, isRequired: false, transformFunction: null }, currentPageReportTemplate: { classPropertyName: "currentPageReportTemplate", publicName: "currentPageReportTemplate", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, syncQueryParams: { classPropertyName: "syncQueryParams", publicName: "syncQueryParams", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pagingChanged: "pagingChanged" }, ngImport: i0, template: `
685
+ <div class="cho-pager">
686
+ <p-paginator
687
+ [first]="first()"
688
+ [rows]="rows()"
689
+ [totalRecords]="totalRecords()"
690
+ [rowsPerPageOptions]="pageSizeValues()"
691
+ dropdownAppendTo="body"
692
+ [showCurrentPageReport]="true"
693
+ [currentPageReportTemplate]="currentPageReportTemplate()"
694
+ [showFirstLastIcon]="true"
695
+ [alwaysShow]="alwaysShow()"
696
+ (onPageChange)="onPageChanged($event)" />
697
+ </div>
698
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: PaginatorModule }, { kind: "component", type: i1$1.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first"], outputs: ["onPageChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
440
699
  }
441
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoRadioGroupComponent, decorators: [{
700
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoPagerComponent, decorators: [{
442
701
  type: Component,
443
702
  args: [{
444
- selector: 'cho-radio-group',
445
- template: `
446
- <div>
447
- <label class="form-label">{{ label }}</label>
448
- <div *ngFor="let option of options" class="form-check form-check-inline">
449
- <input
450
- class="form-check-input"
451
- type="radio"
452
- [name]="groupName"
453
- [value]="option.value"
454
- [(ngModel)]="selectedOption"
455
- (change)="emitSelection()" />
456
- {{ option.label }}
457
- </div>
458
- </div>
703
+ selector: 'cho-pager',
704
+ standalone: true,
705
+ imports: [PaginatorModule],
706
+ template: `
707
+ <div class="cho-pager">
708
+ <p-paginator
709
+ [first]="first()"
710
+ [rows]="rows()"
711
+ [totalRecords]="totalRecords()"
712
+ [rowsPerPageOptions]="pageSizeValues()"
713
+ dropdownAppendTo="body"
714
+ [showCurrentPageReport]="true"
715
+ [currentPageReportTemplate]="currentPageReportTemplate()"
716
+ [showFirstLastIcon]="true"
717
+ [alwaysShow]="alwaysShow()"
718
+ (onPageChange)="onPageChanged($event)" />
719
+ </div>
459
720
  `,
721
+ changeDetection: ChangeDetectionStrategy.OnPush,
722
+ }]
723
+ }] });
724
+
725
+ class ChoRadioGroupComponent {
726
+ constructor() {
727
+ this.defaultValue = input(null);
728
+ this.groupName = input('');
729
+ this.label = input('');
730
+ this.options = input([]);
731
+ this.selectionChange = output();
732
+ this.selectedOption = signal(null);
733
+ effect(() => this.selectedOption.set(this.defaultValue()), { allowSignalWrites: true });
734
+ }
735
+ select(value) {
736
+ this.selectedOption.set(value);
737
+ this.selectionChange.emit(value);
738
+ }
739
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoRadioGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
740
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.24", type: ChoRadioGroupComponent, isStandalone: true, selector: "cho-radio-group", inputs: { defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, groupName: { classPropertyName: "groupName", publicName: "groupName", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectionChange: "selectionChange" }, ngImport: i0, template: `
741
+ <fieldset class="cho-radio-group">
742
+ <legend class="cho-radio-group__label">{{ label() }}</legend>
743
+ @for (option of options(); track option.value) {
744
+ <label class="cho-radio-group__option">
745
+ <input
746
+ class="cho-radio-group__input"
747
+ type="radio"
748
+ [name]="groupName()"
749
+ [value]="option.value"
750
+ [ngModel]="selectedOption()"
751
+ (ngModelChange)="select($event)" />
752
+ <span>{{ option.label }}</span>
753
+ </label>
754
+ }
755
+ </fieldset>
756
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
757
+ }
758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoRadioGroupComponent, decorators: [{
759
+ type: Component,
760
+ args: [{
761
+ selector: 'cho-radio-group',
460
762
  standalone: true,
461
- imports: [NgFor, FormsModule],
763
+ imports: [FormsModule],
764
+ template: `
765
+ <fieldset class="cho-radio-group">
766
+ <legend class="cho-radio-group__label">{{ label() }}</legend>
767
+ @for (option of options(); track option.value) {
768
+ <label class="cho-radio-group__option">
769
+ <input
770
+ class="cho-radio-group__input"
771
+ type="radio"
772
+ [name]="groupName()"
773
+ [value]="option.value"
774
+ [ngModel]="selectedOption()"
775
+ (ngModelChange)="select($event)" />
776
+ <span>{{ option.label }}</span>
777
+ </label>
778
+ }
779
+ </fieldset>
780
+ `,
781
+ changeDetection: ChangeDetectionStrategy.OnPush,
462
782
  }]
463
- }], propDecorators: { label: [{
464
- type: Input
465
- }], options: [{
466
- type: Input
467
- }], groupName: [{
468
- type: Input
469
- }], defaultValue: [{
470
- type: Input
471
- }], selectionChange: [{
472
- type: Output
473
- }] } });
783
+ }], ctorParameters: () => [] });
474
784
 
475
785
  class ChoReviewStatusAlertComponent {
476
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoReviewStatusAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
477
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ChoReviewStatusAlertComponent, isStandalone: true, selector: "cho-review-status-alert", inputs: { reviewedBy: "reviewedBy", reviewedDateTime: "reviewedDateTime" }, ngImport: i0, template: `
478
- <div class="alert alert-info" *ngIf="reviewedDateTime">
479
- Review completed by {{ reviewedBy }} on {{ reviewedDateTime | date : 'shortDate' }} at
480
- {{ reviewedDateTime | date : 'shortTime' }}.
481
- </div>
482
- `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: DatePipe, name: "date" }] }); }
786
+ constructor() {
787
+ this.reviewedBy = input();
788
+ this.reviewedDateTime = input();
789
+ }
790
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoReviewStatusAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
791
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.24", type: ChoReviewStatusAlertComponent, isStandalone: true, selector: "cho-review-status-alert", inputs: { reviewedBy: { classPropertyName: "reviewedBy", publicName: "reviewedBy", isSignal: true, isRequired: false, transformFunction: null }, reviewedDateTime: { classPropertyName: "reviewedDateTime", publicName: "reviewedDateTime", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
792
+ @if (reviewedDateTime(); as completedAt) {
793
+ <div class="cho-review-status" role="status">
794
+ Review completed by {{ reviewedBy() }} on {{ completedAt | date: 'shortDate' }} at
795
+ {{ completedAt | date: 'shortTime' }}.
796
+ </div>
797
+ }
798
+ `, isInline: true, dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
483
799
  }
484
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChoReviewStatusAlertComponent, decorators: [{
800
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoReviewStatusAlertComponent, decorators: [{
485
801
  type: Component,
486
802
  args: [{
487
803
  selector: 'cho-review-status-alert',
488
- template: `
489
- <div class="alert alert-info" *ngIf="reviewedDateTime">
490
- Review completed by {{ reviewedBy }} on {{ reviewedDateTime | date : 'shortDate' }} at
491
- {{ reviewedDateTime | date : 'shortTime' }}.
492
- </div>
804
+ standalone: true,
805
+ imports: [DatePipe],
806
+ template: `
807
+ @if (reviewedDateTime(); as completedAt) {
808
+ <div class="cho-review-status" role="status">
809
+ Review completed by {{ reviewedBy() }} on {{ completedAt | date: 'shortDate' }} at
810
+ {{ completedAt | date: 'shortTime' }}.
811
+ </div>
812
+ }
493
813
  `,
814
+ changeDetection: ChangeDetectionStrategy.OnPush,
815
+ }]
816
+ }] });
817
+
818
+ class ChoSearchCardFiltersDirective {
819
+ constructor() {
820
+ this.templateRef = inject((TemplateRef));
821
+ }
822
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoSearchCardFiltersDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
823
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.24", type: ChoSearchCardFiltersDirective, isStandalone: true, selector: "ng-template[choSearchCardFilters]", ngImport: i0 }); }
824
+ }
825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoSearchCardFiltersDirective, decorators: [{
826
+ type: Directive,
827
+ args: [{ selector: 'ng-template[choSearchCardFilters]', standalone: true }]
828
+ }] });
829
+ class ChoSearchCardToolbarDirective {
830
+ constructor() {
831
+ this.templateRef = inject((TemplateRef));
832
+ }
833
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoSearchCardToolbarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
834
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.24", type: ChoSearchCardToolbarDirective, isStandalone: true, selector: "ng-template[choSearchCardToolbar]", ngImport: i0 }); }
835
+ }
836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoSearchCardToolbarDirective, decorators: [{
837
+ type: Directive,
838
+ args: [{ selector: 'ng-template[choSearchCardToolbar]', standalone: true }]
839
+ }] });
840
+ class ChoSearchCardTabsDirective {
841
+ constructor() {
842
+ this.templateRef = inject((TemplateRef));
843
+ }
844
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoSearchCardTabsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
845
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.24", type: ChoSearchCardTabsDirective, isStandalone: true, selector: "ng-template[choSearchCardTabs]", ngImport: i0 }); }
846
+ }
847
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoSearchCardTabsDirective, decorators: [{
848
+ type: Directive,
849
+ args: [{ selector: 'ng-template[choSearchCardTabs]', standalone: true }]
850
+ }] });
851
+ class ChoSearchCardContentDirective {
852
+ constructor() {
853
+ this.templateRef = inject((TemplateRef));
854
+ }
855
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoSearchCardContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
856
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.24", type: ChoSearchCardContentDirective, isStandalone: true, selector: "ng-template[choSearchCardContent]", ngImport: i0 }); }
857
+ }
858
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoSearchCardContentDirective, decorators: [{
859
+ type: Directive,
860
+ args: [{ selector: 'ng-template[choSearchCardContent]', standalone: true }]
861
+ }] });
862
+ class ChoSearchCardComponent {
863
+ constructor() {
864
+ this.cardTitle = input('');
865
+ this.contentPadding = input('comfortable');
866
+ this.embedded = input(false);
867
+ this.headingLevel = input(3);
868
+ this.hideHeader = input(false);
869
+ this.pager = input();
870
+ this.pageSizeOptions = input();
871
+ this.syncPagerQueryParams = input(true);
872
+ this.pagingChanged = output();
873
+ this.content = contentChild(ChoSearchCardContentDirective);
874
+ this.filters = contentChild(ChoSearchCardFiltersDirective);
875
+ this.tabs = contentChild(ChoSearchCardTabsDirective);
876
+ this.toolbar = contentChild(ChoSearchCardToolbarDirective);
877
+ }
878
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoSearchCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
879
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.24", type: ChoSearchCardComponent, isStandalone: true, selector: "cho-search-card", inputs: { cardTitle: { classPropertyName: "cardTitle", publicName: "cardTitle", isSignal: true, isRequired: false, transformFunction: null }, contentPadding: { classPropertyName: "contentPadding", publicName: "contentPadding", isSignal: true, isRequired: false, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null }, pager: { classPropertyName: "pager", publicName: "pager", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, syncPagerQueryParams: { classPropertyName: "syncPagerQueryParams", publicName: "syncPagerQueryParams", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pagingChanged: "pagingChanged" }, queries: [{ propertyName: "content", first: true, predicate: ChoSearchCardContentDirective, descendants: true, isSignal: true }, { propertyName: "filters", first: true, predicate: ChoSearchCardFiltersDirective, descendants: true, isSignal: true }, { propertyName: "tabs", first: true, predicate: ChoSearchCardTabsDirective, descendants: true, isSignal: true }, { propertyName: "toolbar", first: true, predicate: ChoSearchCardToolbarDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
880
+ <cho-card
881
+ [content]="cardContent"
882
+ [contentPadding]="'none'"
883
+ [embedded]="embedded()"
884
+ [filters]="filters()?.templateRef"
885
+ [headingLevel]="headingLevel()"
886
+ [headerText]="cardTitle()"
887
+ [hideHeader]="embedded() || hideHeader()"
888
+ [tabsContent]="embedded() ? undefined : tabs()?.templateRef"
889
+ [toolbar]="toolbar()?.templateRef">
890
+ </cho-card>
891
+
892
+ <ng-template #cardContent>
893
+ <div
894
+ class="cho-search-card__content"
895
+ [class.cho-search-card__content--compact]="contentPadding() === 'compact'"
896
+ [class.cho-search-card__content--comfortable]="contentPadding() === 'comfortable'"
897
+ [class.cho-search-card__content--none]="contentPadding() === 'none'">
898
+ @if (content(); as projectedContent) {
899
+ <ng-container [ngTemplateOutlet]="projectedContent.templateRef" />
900
+ } @else {
901
+ <ng-content />
902
+ }
903
+
904
+ @if (pager(); as currentPager) {
905
+ <cho-pager
906
+ [instance]="currentPager"
907
+ [pageSizeOptions]="pageSizeOptions()"
908
+ [syncQueryParams]="syncPagerQueryParams()"
909
+ (pagingChanged)="pagingChanged.emit($event)" />
910
+ }
911
+ </div>
912
+ </ng-template>
913
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ChoCardComponent, selector: "cho-card", inputs: ["content", "contentPadding", "embedded", "filters", "header", "headerText", "headingLevel", "hideHeader", "showBody", "tabs", "tabsContent", "toolbar"], outputs: ["tabSelect"] }, { kind: "component", type: ChoPagerComponent, selector: "cho-pager", inputs: ["instance", "alwaysShow", "currentPageReportTemplate", "pageSizeOptions", "syncQueryParams", "totalItems"], outputs: ["pagingChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
914
+ }
915
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoSearchCardComponent, decorators: [{
916
+ type: Component,
917
+ args: [{
918
+ selector: 'cho-search-card',
494
919
  standalone: true,
495
- imports: [NgIf, DatePipe],
920
+ imports: [NgTemplateOutlet, ChoCardComponent, ChoPagerComponent],
921
+ template: `
922
+ <cho-card
923
+ [content]="cardContent"
924
+ [contentPadding]="'none'"
925
+ [embedded]="embedded()"
926
+ [filters]="filters()?.templateRef"
927
+ [headingLevel]="headingLevel()"
928
+ [headerText]="cardTitle()"
929
+ [hideHeader]="embedded() || hideHeader()"
930
+ [tabsContent]="embedded() ? undefined : tabs()?.templateRef"
931
+ [toolbar]="toolbar()?.templateRef">
932
+ </cho-card>
933
+
934
+ <ng-template #cardContent>
935
+ <div
936
+ class="cho-search-card__content"
937
+ [class.cho-search-card__content--compact]="contentPadding() === 'compact'"
938
+ [class.cho-search-card__content--comfortable]="contentPadding() === 'comfortable'"
939
+ [class.cho-search-card__content--none]="contentPadding() === 'none'">
940
+ @if (content(); as projectedContent) {
941
+ <ng-container [ngTemplateOutlet]="projectedContent.templateRef" />
942
+ } @else {
943
+ <ng-content />
944
+ }
945
+
946
+ @if (pager(); as currentPager) {
947
+ <cho-pager
948
+ [instance]="currentPager"
949
+ [pageSizeOptions]="pageSizeOptions()"
950
+ [syncQueryParams]="syncPagerQueryParams()"
951
+ (pagingChanged)="pagingChanged.emit($event)" />
952
+ }
953
+ </div>
954
+ </ng-template>
955
+ `,
956
+ changeDetection: ChangeDetectionStrategy.OnPush,
496
957
  }]
497
- }], propDecorators: { reviewedBy: [{
498
- type: Input
499
- }], reviewedDateTime: [{
500
- type: Input
501
- }] } });
958
+ }] });
502
959
 
503
960
  /*
504
961
  * Public API Surface of ngx-cho-components
@@ -508,5 +965,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
508
965
  * Generated bundle index. Do not edit.
509
966
  */
510
967
 
511
- export { ChoAddressInfoComponent, ChoCardComponent, ChoCardFiltersComponent, ChoCardHeaderComponent, ChoCardTabsComponent, ChoCardToolbarComponent, ChoDetailsCardComponent, ChoEmailInfoComponent, ChoPhoneInfoComponent, ChoRadioGroupComponent, ChoReviewStatusAlertComponent };
968
+ export { ChoAddressInfoComponent, ChoCardComponent, ChoDetailPageComponent, ChoDetailPageTabsDirective, ChoDetailPageToolbarDirective, ChoDetailsCardComponent, ChoEmailInfoComponent, ChoPagerComponent, ChoPhoneInfoComponent, ChoRadioGroupComponent, ChoReviewStatusAlertComponent, ChoSearchCardComponent, ChoSearchCardContentDirective, ChoSearchCardFiltersDirective, ChoSearchCardTabsDirective, ChoSearchCardToolbarDirective };
512
969
  //# sourceMappingURL=ngx-cho-components.mjs.map