ngx-cho-components 2.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.
@@ -1,120 +1,210 @@
1
+ import { TitleCasePipe, NgTemplateOutlet, DatePipe } from '@angular/common';
1
2
  import * as i0 from '@angular/core';
2
- import { Input, Component, 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 {
13
+ constructor() {
14
+ this.address = input.required();
15
+ }
10
16
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoAddressInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.24", 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"] }] }); }
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
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
- imports: [TitleCasePipe, NgIf],
38
+ standalone: true,
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,
37
57
  }]
38
- }], propDecorators: { address: [{
39
- type: Input
40
- }] } });
58
+ }] });
41
59
 
42
60
  class ChoCardFiltersComponent {
43
61
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
44
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.24", type: ChoCardFiltersComponent, isStandalone: true, selector: "cho-card-filters", host: { classAttribute: "card-filters" }, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
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 }); }
45
63
  }
46
64
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardFiltersComponent, decorators: [{
47
65
  type: Component,
48
66
  args: [{
49
67
  selector: 'cho-card-filters',
68
+ standalone: true,
50
69
  changeDetection: ChangeDetectionStrategy.OnPush,
51
70
  imports: [],
52
- host: { class: 'card-filters' },
53
- template: ` <ng-content /> `,
71
+ host: { class: 'cho-card-filters' },
72
+ template: `<ng-content />`,
54
73
  }]
55
74
  }] });
56
75
 
57
76
  class ChoCardToolbarComponent {
58
77
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
59
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.24", type: ChoCardToolbarComponent, isStandalone: true, selector: "cho-card-toolbar", host: { classAttribute: "card-toolbar" }, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
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 }); }
60
79
  }
61
80
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardToolbarComponent, decorators: [{
62
81
  type: Component,
63
82
  args: [{
64
83
  selector: 'cho-card-toolbar',
84
+ standalone: true,
65
85
  changeDetection: ChangeDetectionStrategy.OnPush,
66
86
  imports: [],
67
- host: { class: 'card-toolbar' },
68
- 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 />`,
69
91
  }]
70
92
  }] });
71
93
 
72
94
  class ChoCardHeaderComponent {
73
95
  constructor() {
96
+ this.headingLevel = input(3);
74
97
  this.headerText = input();
75
98
  this.toolbar = input();
76
99
  }
77
100
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
78
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.24", 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: `
79
- <div class="card-header">
80
- <h3 class="card-title">
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>
81
137
  @if (headerText()) {
82
138
  {{ headerText() }}
83
139
  } @else {
84
140
  <ng-content />
85
141
  }
86
- </h3>
142
+ </ng-template>
87
143
 
88
144
  @if (toolbar()) {
89
145
  <cho-card-toolbar>
90
146
  <ng-container *ngTemplateOutlet="toolbar()!" />
91
147
  </cho-card-toolbar>
92
148
  }
93
- </div>
149
+ </header>
94
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 }); }
95
151
  }
96
152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardHeaderComponent, decorators: [{
97
153
  type: Component,
98
154
  args: [{
99
155
  selector: 'cho-card-header',
156
+ standalone: true,
100
157
  changeDetection: ChangeDetectionStrategy.OnPush,
101
158
  imports: [NgTemplateOutlet, ChoCardToolbarComponent],
102
159
  template: `
103
- <div class="card-header">
104
- <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>
105
195
  @if (headerText()) {
106
196
  {{ headerText() }}
107
197
  } @else {
108
198
  <ng-content />
109
199
  }
110
- </h3>
200
+ </ng-template>
111
201
 
112
202
  @if (toolbar()) {
113
203
  <cho-card-toolbar>
114
204
  <ng-container *ngTemplateOutlet="toolbar()!" />
115
205
  </cho-card-toolbar>
116
206
  }
117
- </div>
207
+ </header>
118
208
  `,
119
209
  }]
120
210
  }] });
@@ -139,117 +229,110 @@ class ChoCardTabsComponent {
139
229
  }
140
230
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
141
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: `
142
- <div class="card-tabs">
232
+ <nav class="cho-card-tabs" aria-label="Card views">
143
233
  <ul>
144
234
  @for (tab of tabs(); track tab.value) {
145
235
  <li (click)="onSelect(tab.value)">
146
- <a
147
- class="nav-link text-active-primary"
148
- [class.active]="activeTab === tab.value">
236
+ <a class="cho-card-tabs__link" [class.active]="activeTab === tab.value">
149
237
  {{ tab.label }}
150
238
  </a>
151
239
  </li>
152
240
  }
153
241
  </ul>
154
- </div>
242
+ </nav>
155
243
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
156
244
  }
157
245
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardTabsComponent, decorators: [{
158
246
  type: Component,
159
247
  args: [{
160
248
  selector: 'cho-card-tabs',
249
+ standalone: true,
161
250
  changeDetection: ChangeDetectionStrategy.OnPush,
162
251
  imports: [],
163
252
  template: `
164
- <div class="card-tabs">
253
+ <nav class="cho-card-tabs" aria-label="Card views">
165
254
  <ul>
166
255
  @for (tab of tabs(); track tab.value) {
167
256
  <li (click)="onSelect(tab.value)">
168
- <a
169
- class="nav-link text-active-primary"
170
- [class.active]="activeTab === tab.value">
257
+ <a class="cho-card-tabs__link" [class.active]="activeTab === tab.value">
171
258
  {{ tab.label }}
172
259
  </a>
173
260
  </li>
174
261
  }
175
262
  </ul>
176
- </div>
263
+ </nav>
177
264
  `,
178
265
  }]
179
266
  }] });
180
267
 
181
268
  class ChoCardComponent {
182
269
  constructor() {
270
+ this.content = input();
271
+ this.contentPadding = input('comfortable');
272
+ this.embedded = input(false);
273
+ this.filters = input();
183
274
  this.header = input();
184
275
  this.headerText = input();
185
- this.toolbar = input();
186
- this.filters = input();
187
- this.content = input();
276
+ this.headingLevel = input(3);
277
+ this.hideHeader = input(false);
278
+ this.showBody = input(true);
188
279
  this.tabs = input();
280
+ this.tabsContent = input();
281
+ this.toolbar = input();
189
282
  this.tabSelect = output();
190
- // used for projected content detection
191
- this.contentWrapper = viewChild('contentWrapper');
192
- this.hasContent = computed(() => this.content() || this._hasProjectedContent());
193
- this.hasFilters = computed(() => !!this.filters());
194
- this.hasHeader = computed(() => !!this.header() || !!this.headerText());
195
- this.hasTabs = computed(() => !!this.tabs() && this.tabs().length > 0);
196
- this.hasToolbar = computed(() => !!this.toolbar());
197
- this._hasProjectedContent = signal(false);
198
- effect(() => this.detectProjectedContent(), { allowSignalWrites: true });
199
- }
200
- detectProjectedContent() {
201
- const wrapper = this.contentWrapper();
202
- if (wrapper) {
203
- const element = wrapper.nativeElement;
204
- const hasRealContent = Array.from(element.childNodes).some((node) => {
205
- if (node.nodeType === Node.ELEMENT_NODE)
206
- return true;
207
- if (node.nodeType === Node.TEXT_NODE) {
208
- return node.textContent?.trim().length > 0;
209
- }
210
- return false;
211
- });
212
- this._hasProjectedContent.set(hasRealContent);
213
- }
214
283
  }
215
284
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
216
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.24", 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: `
217
- <div class="card mb-3">
218
- @if (hasHeader()) {
219
- <cho-card-header [toolbar]="toolbar()" [headerText]="headerText()">
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()">
220
292
  <ng-container *ngTemplateOutlet="header()!" />
221
293
  </cho-card-header>
222
- } @else if (hasToolbar()) {
294
+ } @else if (!hideHeader() && toolbar()) {
223
295
  <cho-card-toolbar>
224
296
  <ng-container *ngTemplateOutlet="toolbar()!" />
225
297
  </cho-card-toolbar>
226
298
  }
227
299
 
228
- @if (hasFilters()) {
300
+ @if (filters()) {
229
301
  <cho-card-filters>
230
302
  <ng-container *ngTemplateOutlet="filters()!" />
231
303
  </cho-card-filters>
232
304
  }
233
305
 
234
- @if (hasTabs()) {
306
+ @if (tabsContent()) {
307
+ <div class="cho-card__tabs">
308
+ <ng-container *ngTemplateOutlet="tabsContent()!" />
309
+ </div>
310
+ } @else if (tabs()?.length) {
235
311
  <cho-card-tabs [tabs]="tabs()!" (tabSelect)="tabSelect.emit($event)">
236
312
  </cho-card-tabs>
237
313
  }
238
314
 
239
- <div class="card-body" #contentWrapper [hidden]="!hasContent()">
240
- @if (content()) {
241
- <ng-container *ngTemplateOutlet="content()!" />
242
- } @else {
243
- <ng-content />
244
- }
245
- </div>
246
- </div>
247
- `, 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 }); }
248
330
  }
249
331
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoCardComponent, decorators: [{
250
332
  type: Component,
251
333
  args: [{
252
334
  selector: 'cho-card',
335
+ standalone: true,
253
336
  changeDetection: ChangeDetectionStrategy.OnPush,
254
337
  imports: [
255
338
  NgTemplateOutlet,
@@ -259,236 +342,620 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImpo
259
342
  ChoCardTabsComponent,
260
343
  ],
261
344
  template: `
262
- <div class="card mb-3">
263
- @if (hasHeader()) {
264
- <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()">
265
351
  <ng-container *ngTemplateOutlet="header()!" />
266
352
  </cho-card-header>
267
- } @else if (hasToolbar()) {
353
+ } @else if (!hideHeader() && toolbar()) {
268
354
  <cho-card-toolbar>
269
355
  <ng-container *ngTemplateOutlet="toolbar()!" />
270
356
  </cho-card-toolbar>
271
357
  }
272
358
 
273
- @if (hasFilters()) {
359
+ @if (filters()) {
274
360
  <cho-card-filters>
275
361
  <ng-container *ngTemplateOutlet="filters()!" />
276
362
  </cho-card-filters>
277
363
  }
278
364
 
279
- @if (hasTabs()) {
365
+ @if (tabsContent()) {
366
+ <div class="cho-card__tabs">
367
+ <ng-container *ngTemplateOutlet="tabsContent()!" />
368
+ </div>
369
+ } @else if (tabs()?.length) {
280
370
  <cho-card-tabs [tabs]="tabs()!" (tabSelect)="tabSelect.emit($event)">
281
371
  </cho-card-tabs>
282
372
  }
283
373
 
284
- <div class="card-body" #contentWrapper [hidden]="!hasContent()">
285
- @if (content()) {
286
- <ng-container *ngTemplateOutlet="content()!" />
287
- } @else {
288
- <ng-content />
289
- }
290
- </div>
291
- </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>
292
388
  `,
293
389
  }]
294
- }], 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
+ }] });
295
505
 
296
506
  class ChoDetailsCardComponent {
297
507
  constructor() {
298
- this.cardTitle = '';
299
- this.toolbar = null;
508
+ this.cardTitle = input('');
509
+ this.contentPadding = input('comfortable');
300
510
  }
301
511
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoDetailsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
302
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.24", type: ChoDetailsCardComponent, isStandalone: true, selector: "cho-details-card", inputs: { cardTitle: "cardTitle" }, queries: [{ propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true }], ngImport: i0, template: `
303
- <div class="card mb-3">
304
- <div class="card-header">
305
- <h3 class="card-title">{{ cardTitle }}</h3>
306
-
307
- <div class="card-toolbar">
308
- <ng-content #toolbar select="[toolbar]"></ng-content>
309
- </div>
310
- </div>
311
-
312
- <div class="card-body">
313
- <ng-content></ng-content>
314
- </div>
315
- </div>
316
- `, isInline: true }); }
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 }); }
317
523
  }
318
524
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoDetailsCardComponent, decorators: [{
319
525
  type: Component,
320
526
  args: [{
321
527
  selector: 'cho-details-card',
322
528
  standalone: true,
323
- template: `
324
- <div class="card mb-3">
325
- <div class="card-header">
326
- <h3 class="card-title">{{ cardTitle }}</h3>
327
-
328
- <div class="card-toolbar">
329
- <ng-content #toolbar select="[toolbar]"></ng-content>
330
- </div>
331
- </div>
332
-
333
- <div class="card-body">
334
- <ng-content></ng-content>
335
- </div>
336
- </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>
337
540
  `,
541
+ changeDetection: ChangeDetectionStrategy.OnPush,
338
542
  }]
339
- }], propDecorators: { cardTitle: [{
340
- type: Input
341
- }], toolbar: [{
342
- type: ContentChild,
343
- args: ['toolbar']
344
- }] } });
543
+ }] });
345
544
 
346
545
  class ChoEmailInfoComponent {
347
- constructor(sanitizer) {
348
- this.sanitizer = sanitizer;
349
- this.sanitizedEmailLink = this.email?.emailAddress
350
- ? this.sanitizer.bypassSecurityTrustUrl(`mailto:${this.email.emailAddress}`)
351
- : '';
546
+ constructor() {
547
+ this.email = input();
352
548
  }
353
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoEmailInfoComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
354
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.24", type: ChoEmailInfoComponent, isStandalone: true, selector: "cho-email-info", inputs: { email: "email" }, ngImport: i0, template: `<ng-container *ngIf="email; else empty"
355
- ><span *ngIf="email.emailTypeCode">{{ email.emailTypeCode[0] }}: </span>
356
- <a [href]="sanitizedEmailLink">{{ email.emailAddress }}</a>
357
- <small *ngIf="email.description"> ({{ email.description }})</small></ng-container
358
- >
359
- <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 }); }
360
567
  }
361
568
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoEmailInfoComponent, decorators: [{
362
569
  type: Component,
363
570
  args: [{
364
571
  selector: 'cho-email-info',
365
- template: `<ng-container *ngIf="email; else empty"
366
- ><span *ngIf="email.emailTypeCode">{{ email.emailTypeCode[0] }}: </span>
367
- <a [href]="sanitizedEmailLink">{{ email.emailAddress }}</a>
368
- <small *ngIf="email.description"> ({{ email.description }})</small></ng-container
369
- >
370
- <ng-template #empty><span>--</span></ng-template>`,
371
- imports: [NgIf],
572
+ standalone: true,
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,
372
591
  }]
373
- }], ctorParameters: () => [{ type: i1.DomSanitizer }], propDecorators: { email: [{
374
- type: Input
375
- }] } });
592
+ }] });
376
593
 
377
594
  class ChoPhoneInfoComponent {
595
+ constructor() {
596
+ this.phone = input();
597
+ }
378
598
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoPhoneInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
379
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.24", type: ChoPhoneInfoComponent, isStandalone: true, selector: "cho-phone-info", inputs: { phone: "phone" }, ngImport: i0, template: ` <ng-container *ngIf="phone; else empty"
380
- ><span *ngIf="phone.phoneTypeCode">{{ phone.phoneTypeCode[0] }}: </span>
381
- {{ phone.phoneNumber }}
382
- <small *ngIf="phone.description"> ({{ phone.description }})</small></ng-container
383
- >
384
- <ng-template #empty><span>--</span></ng-template>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
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 }); }
385
614
  }
386
615
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoPhoneInfoComponent, decorators: [{
387
616
  type: Component,
388
617
  args: [{
389
618
  selector: 'cho-phone-info',
390
- template: ` <ng-container *ngIf="phone; else empty"
391
- ><span *ngIf="phone.phoneTypeCode">{{ phone.phoneTypeCode[0] }}: </span>
392
- {{ phone.phoneNumber }}
393
- <small *ngIf="phone.description"> ({{ phone.description }})</small></ng-container
394
- >
395
- <ng-template #empty><span>--</span></ng-template>`,
396
- imports: [NgIf],
619
+ standalone: true,
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,
397
636
  }]
398
- }], propDecorators: { phone: [{
399
- type: Input
400
- }] } });
637
+ }] });
401
638
 
402
- class ChoRadioGroupComponent {
639
+ class ChoPagerComponent {
403
640
  constructor() {
404
- this.label = '';
405
- this.options = [];
406
- this.groupName = '';
407
- this.defaultValue = null;
408
- this.selectionChange = new EventEmitter();
409
- 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);
410
658
  }
411
- emitSelection() {
412
- if (this.selectedOption !== undefined) {
413
- 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
+ });
414
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;
682
+ }
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 }); }
699
+ }
700
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoPagerComponent, decorators: [{
701
+ type: Component,
702
+ args: [{
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>
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);
415
738
  }
416
739
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoRadioGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
417
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.24", type: ChoRadioGroupComponent, isStandalone: true, selector: "cho-radio-group", inputs: { label: "label", options: "options", groupName: "groupName", defaultValue: "defaultValue" }, outputs: { selectionChange: "selectionChange" }, ngImport: i0, template: `
418
- <div>
419
- <label class="form-label">{{ label }}</label>
420
- <div *ngFor="let option of options" class="form-check form-check-inline">
421
- <input
422
- class="form-check-input"
423
- type="radio"
424
- [name]="groupName"
425
- [value]="option.value"
426
- [(ngModel)]="selectedOption"
427
- (change)="emitSelection()" />
428
- {{ option.label }}
429
- </div>
430
- </div>
431
- `, 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"] }] }); }
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 }); }
432
757
  }
433
758
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoRadioGroupComponent, decorators: [{
434
759
  type: Component,
435
760
  args: [{
436
761
  selector: 'cho-radio-group',
437
- template: `
438
- <div>
439
- <label class="form-label">{{ label }}</label>
440
- <div *ngFor="let option of options" class="form-check form-check-inline">
441
- <input
442
- class="form-check-input"
443
- type="radio"
444
- [name]="groupName"
445
- [value]="option.value"
446
- [(ngModel)]="selectedOption"
447
- (change)="emitSelection()" />
448
- {{ option.label }}
449
- </div>
450
- </div>
762
+ standalone: true,
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>
451
780
  `,
452
- imports: [NgFor, FormsModule],
781
+ changeDetection: ChangeDetectionStrategy.OnPush,
453
782
  }]
454
- }], propDecorators: { label: [{
455
- type: Input
456
- }], options: [{
457
- type: Input
458
- }], groupName: [{
459
- type: Input
460
- }], defaultValue: [{
461
- type: Input
462
- }], selectionChange: [{
463
- type: Output
464
- }] } });
783
+ }], ctorParameters: () => [] });
465
784
 
466
785
  class ChoReviewStatusAlertComponent {
786
+ constructor() {
787
+ this.reviewedBy = input();
788
+ this.reviewedDateTime = input();
789
+ }
467
790
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoReviewStatusAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
468
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.24", type: ChoReviewStatusAlertComponent, isStandalone: true, selector: "cho-review-status-alert", inputs: { reviewedBy: "reviewedBy", reviewedDateTime: "reviewedDateTime" }, ngImport: i0, template: `
469
- <div class="alert alert-info" *ngIf="reviewedDateTime">
470
- Review completed by {{ reviewedBy }} on {{ reviewedDateTime | date: 'shortDate' }} at
471
- {{ reviewedDateTime | date: 'shortTime' }}.
472
- </div>
473
- `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: DatePipe, name: "date" }] }); }
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 }); }
474
799
  }
475
800
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImport: i0, type: ChoReviewStatusAlertComponent, decorators: [{
476
801
  type: Component,
477
802
  args: [{
478
803
  selector: 'cho-review-status-alert',
479
- template: `
480
- <div class="alert alert-info" *ngIf="reviewedDateTime">
481
- Review completed by {{ reviewedBy }} on {{ reviewedDateTime | date: 'shortDate' }} at
482
- {{ reviewedDateTime | date: 'shortTime' }}.
483
- </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
+ }
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',
919
+ standalone: true,
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>
484
955
  `,
485
- imports: [NgIf, DatePipe],
956
+ changeDetection: ChangeDetectionStrategy.OnPush,
486
957
  }]
487
- }], propDecorators: { reviewedBy: [{
488
- type: Input
489
- }], reviewedDateTime: [{
490
- type: Input
491
- }] } });
958
+ }] });
492
959
 
493
960
  /*
494
961
  * Public API Surface of ngx-cho-components
@@ -498,5 +965,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImpo
498
965
  * Generated bundle index. Do not edit.
499
966
  */
500
967
 
501
- 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 };
502
969
  //# sourceMappingURL=ngx-cho-components.mjs.map