@intellegens/cornerstone-client-angular-material 0.0.0-experimental-upgrade-20260302-1
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.
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @intellegens/cornerstone-client-angular-material
|
|
2
|
+
|
|
3
|
+
Contains directives and overrides which improve `Angular Material UI` if used with `@intellegens/cornerstone-client-angular` and `@intellegens/cornerstone-client` libraries.
|
|
4
|
+
|
|
5
|
+
## MatPaginatorIntlOverrides
|
|
6
|
+
|
|
7
|
+
Custom paginator service to adjust the label for the paginator.
|
|
8
|
+
|
|
9
|
+
Used on `MatTablePaginationDirective`:
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
@Directive({
|
|
13
|
+
selector: 'mat-paginator',
|
|
14
|
+
providers: [{ provide: MatPaginatorIntl, useClass: MatPaginatorIntlOverrides }],
|
|
15
|
+
standalone: true,
|
|
16
|
+
})
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## MatTableSortDirective
|
|
20
|
+
|
|
21
|
+
Directive used to pass data to the `CollectionViewAdapter` and reverse the default direction of shown table header sorting arrows.
|
|
22
|
+
|
|
23
|
+
Usage example:
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<table mat-table matSort [adapter]="_adapter" [dataSource]="_tableDataSource">
|
|
27
|
+
<!-- table contents -->
|
|
28
|
+
</table>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## MatTablePaginationDirective
|
|
32
|
+
|
|
33
|
+
Directive used to pass data to the `CollectionViewAdapter`, uses `MatPaginatorIntlOverrides` to change pagination UI.
|
|
34
|
+
|
|
35
|
+
Usage example:
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<mat-paginator
|
|
39
|
+
[adapter]="_adapter"
|
|
40
|
+
[pageSizeOptions]="[10, 20, 50]"
|
|
41
|
+
[pageSize]="_adapter.pageSize"
|
|
42
|
+
[pageIndex]="(currentPage ?? 1) - 1"
|
|
43
|
+
[length]="_totalItemsCount()"
|
|
44
|
+
(page)="$event"
|
|
45
|
+
></mat-paginator>
|
|
46
|
+
```
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, inject, input, Directive, contentChild, TemplateRef, output, signal, effect, Component } from '@angular/core';
|
|
3
|
+
import { MatPaginatorIntl, MatPaginator } from '@angular/material/paginator';
|
|
4
|
+
import { MatSort } from '@angular/material/sort';
|
|
5
|
+
import { ReadSelectedOrderingDirection } from '@intellegens/cornerstone-client-angular';
|
|
6
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
7
|
+
import * as i1 from '@angular/common';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
9
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
10
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
11
|
+
import { MatCardModule } from '@angular/material/card';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Custom paginator service to adjust the label for the paginator.
|
|
15
|
+
*/
|
|
16
|
+
class MatPaginatorIntlOverrides extends MatPaginatorIntl {
|
|
17
|
+
getRangeLabel = (page, pageSize, length) => {
|
|
18
|
+
if (length === 0) {
|
|
19
|
+
return 'Page 1 of 1';
|
|
20
|
+
}
|
|
21
|
+
const isLengthValid = length && length !== -1;
|
|
22
|
+
return isLengthValid ? `Page ${page + 1} of ${Math.ceil(length / pageSize)}` : `Page ${page + 1}`;
|
|
23
|
+
};
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MatPaginatorIntlOverrides, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
25
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MatPaginatorIntlOverrides });
|
|
26
|
+
}
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MatPaginatorIntlOverrides, decorators: [{
|
|
28
|
+
type: Injectable
|
|
29
|
+
}] });
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Directive used to pass data to the `CollectionViewAdapter`, uses `MatPaginatorIntlOverrides` to change pagination UI.
|
|
33
|
+
*/
|
|
34
|
+
class MatTablePaginationDirective {
|
|
35
|
+
_matPaginator = inject(MatPaginator);
|
|
36
|
+
adapter = input(...(ngDevMode ? [undefined, { debugName: "adapter" }] : []));
|
|
37
|
+
_subscription;
|
|
38
|
+
ngOnInit() {
|
|
39
|
+
this._subscription = this._matPaginator.page.subscribe((event) => {
|
|
40
|
+
const adapter = this.adapter();
|
|
41
|
+
if (!adapter)
|
|
42
|
+
return;
|
|
43
|
+
const targetPage = event.pageIndex + 1;
|
|
44
|
+
if (event.pageSize !== adapter.pageSize) {
|
|
45
|
+
adapter.setPageSize(event.pageSize);
|
|
46
|
+
}
|
|
47
|
+
else if (targetPage !== adapter.currentPage) {
|
|
48
|
+
adapter.jumpToPage(targetPage);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
ngOnDestroy() {
|
|
53
|
+
this._subscription?.unsubscribe();
|
|
54
|
+
}
|
|
55
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MatTablePaginationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
56
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: MatTablePaginationDirective, isStandalone: true, selector: "mat-paginator", inputs: { adapter: { classPropertyName: "adapter", publicName: "adapter", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: MatPaginatorIntl, useClass: MatPaginatorIntlOverrides }], ngImport: i0 });
|
|
57
|
+
}
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MatTablePaginationDirective, decorators: [{
|
|
59
|
+
type: Directive,
|
|
60
|
+
args: [{
|
|
61
|
+
selector: 'mat-paginator',
|
|
62
|
+
providers: [{ provide: MatPaginatorIntl, useClass: MatPaginatorIntlOverrides }],
|
|
63
|
+
standalone: true,
|
|
64
|
+
}]
|
|
65
|
+
}], propDecorators: { adapter: [{ type: i0.Input, args: [{ isSignal: true, alias: "adapter", required: false }] }] } });
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Directive used to pass data to the `CollectionViewAdapter` and reverse the default direction of shown table header sorting arrows
|
|
69
|
+
*/
|
|
70
|
+
class MatTableSortDirective {
|
|
71
|
+
_matSort = inject(MatSort);
|
|
72
|
+
adapter = input(...(ngDevMode ? [undefined, { debugName: "adapter" }] : []));
|
|
73
|
+
ngOnInit() {
|
|
74
|
+
this._matSort.disableClear = true; // removes "unsorted" option, syncs column header arrows with actual current sort direction
|
|
75
|
+
// tell MatSort our starting sort direction
|
|
76
|
+
const adapter = this.adapter();
|
|
77
|
+
if (adapter) {
|
|
78
|
+
// TODO: handle multiple columns - for now it only supports ordering by one column
|
|
79
|
+
const initialSort = adapter.getCurrentOrdering()[0];
|
|
80
|
+
this._matSort.active = (initialSort.orderByPath && initialSort.orderByPath[0]) || '';
|
|
81
|
+
this._matSort.direction = initialSort.orderDirection === ReadSelectedOrderingDirection.Ascending ? 'desc' : 'asc'; // show reverse arrows
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
_subscription = this._matSort.sortChange.subscribe((event) => {
|
|
85
|
+
const adapter = this.adapter();
|
|
86
|
+
if (adapter && event?.active) {
|
|
87
|
+
const newDirection = event.direction == 'desc' ? ReadSelectedOrderingDirection.Ascending : ReadSelectedOrderingDirection.Descending; // show reverse arrows
|
|
88
|
+
adapter.setOrdering([event.active], newDirection);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
ngOnDestroy() {
|
|
92
|
+
this._subscription.unsubscribe();
|
|
93
|
+
}
|
|
94
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MatTableSortDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
95
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: MatTableSortDirective, isStandalone: true, selector: "mat-table[matSort], table[mat-table][matSort]", inputs: { adapter: { classPropertyName: "adapter", publicName: "adapter", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
96
|
+
}
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MatTableSortDirective, decorators: [{
|
|
98
|
+
type: Directive,
|
|
99
|
+
args: [{
|
|
100
|
+
selector: 'mat-table[matSort], table[mat-table][matSort]',
|
|
101
|
+
standalone: true,
|
|
102
|
+
}]
|
|
103
|
+
}], propDecorators: { adapter: [{ type: i0.Input, args: [{ isSignal: true, alias: "adapter", required: false }] }] } });
|
|
104
|
+
|
|
105
|
+
class ModalService {
|
|
106
|
+
_matDialog = inject(MatDialog);
|
|
107
|
+
_modalsStack = [];
|
|
108
|
+
_nextModalStackId = 0;
|
|
109
|
+
openModal(Component, inputs) {
|
|
110
|
+
return new Promise(resolve => {
|
|
111
|
+
// hide parent modal backdrop
|
|
112
|
+
if (this._modalsStack.length > 0) {
|
|
113
|
+
const parentDialog = this._modalsStack[this._modalsStack.length - 1];
|
|
114
|
+
const overlayRef = parentDialog.dialogRef._ref?.overlayRef;
|
|
115
|
+
if (overlayRef && overlayRef.backdropElement) {
|
|
116
|
+
overlayRef.backdropElement.style.display = 'none';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// new dialog using configured container component
|
|
120
|
+
const dialogRef = this._matDialog.open(Component, {
|
|
121
|
+
maxWidth: 'none',
|
|
122
|
+
});
|
|
123
|
+
const componentRef = dialogRef.componentRef;
|
|
124
|
+
const componentInstance = componentRef.instance;
|
|
125
|
+
const closeOnBackdrop = componentInstance.closeOnBackdrop ?? true;
|
|
126
|
+
const closeOnEscapeKey = componentInstance.closeOnEscapeKey ?? true;
|
|
127
|
+
// disable MatDialog default closing backdrop-click/escape-key behavior
|
|
128
|
+
if (!closeOnBackdrop || !closeOnEscapeKey) {
|
|
129
|
+
dialogRef.disableClose = true;
|
|
130
|
+
}
|
|
131
|
+
// set modal component stack Id
|
|
132
|
+
const id = `${this._nextModalStackId++}`;
|
|
133
|
+
componentInstance.modalStackId = id;
|
|
134
|
+
// set modal component inputs
|
|
135
|
+
if (inputs !== undefined) {
|
|
136
|
+
for (const key of Object.keys(inputs)) {
|
|
137
|
+
if (key in componentInstance && componentInstance[key] instanceof Function) {
|
|
138
|
+
componentRef?.setInput(key, inputs[key]);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// add to stack
|
|
143
|
+
this._modalsStack.push({
|
|
144
|
+
id,
|
|
145
|
+
resolve,
|
|
146
|
+
dialogRef,
|
|
147
|
+
componentRef: dialogRef.componentRef?.instance,
|
|
148
|
+
});
|
|
149
|
+
// handle dialog closed via backdrop click
|
|
150
|
+
dialogRef.backdropClick().subscribe(() => {
|
|
151
|
+
if (closeOnBackdrop) {
|
|
152
|
+
dialogRef.close();
|
|
153
|
+
const index = this._modalsStack.findIndex(item => item.dialogRef === dialogRef);
|
|
154
|
+
if (index !== -1) {
|
|
155
|
+
// dialog was closed without submitModal/closeModal
|
|
156
|
+
const item = this._modalsStack[index];
|
|
157
|
+
item.resolve(undefined);
|
|
158
|
+
this._modalsStack.splice(index, 1);
|
|
159
|
+
// restore parent dialog backdrop
|
|
160
|
+
if (this._modalsStack.length > 0) {
|
|
161
|
+
const parentDialog = this._modalsStack[this._modalsStack.length - 1];
|
|
162
|
+
const overlayRef = parentDialog.dialogRef._ref?.overlayRef;
|
|
163
|
+
if (overlayRef && overlayRef.backdropElement) {
|
|
164
|
+
overlayRef.backdropElement.style.display = '';
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
// handle dialog closed via Esc key-press
|
|
171
|
+
dialogRef.keydownEvents().subscribe(event => {
|
|
172
|
+
if (event.key === 'Escape') {
|
|
173
|
+
if (closeOnEscapeKey) {
|
|
174
|
+
dialogRef.close();
|
|
175
|
+
const index = this._modalsStack.findIndex(item => item.dialogRef === dialogRef);
|
|
176
|
+
if (index !== -1) {
|
|
177
|
+
// dialog was closed without submitModal/closeModal
|
|
178
|
+
const item = this._modalsStack[index];
|
|
179
|
+
item.resolve(undefined);
|
|
180
|
+
this._modalsStack.splice(index, 1);
|
|
181
|
+
// restore parent dialog backdrop
|
|
182
|
+
if (this._modalsStack.length > 0) {
|
|
183
|
+
const parentDialog = this._modalsStack[this._modalsStack.length - 1];
|
|
184
|
+
const overlayRef = parentDialog.dialogRef._ref?.overlayRef;
|
|
185
|
+
if (overlayRef && overlayRef.backdropElement) {
|
|
186
|
+
overlayRef.backdropElement.style.display = '';
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
submitModal(data) {
|
|
196
|
+
if (this._modalsStack.length === 0)
|
|
197
|
+
return;
|
|
198
|
+
const currentItem = this._modalsStack.pop();
|
|
199
|
+
currentItem.resolve(data);
|
|
200
|
+
currentItem.dialogRef.close();
|
|
201
|
+
// restore parent dialog backdrop
|
|
202
|
+
if (this._modalsStack.length > 0) {
|
|
203
|
+
const parentDialog = this._modalsStack[this._modalsStack.length - 1];
|
|
204
|
+
const overlayRef = parentDialog.dialogRef._ref?.overlayRef;
|
|
205
|
+
if (overlayRef && overlayRef.backdropElement) {
|
|
206
|
+
overlayRef.backdropElement.style.display = '';
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
closeModal() {
|
|
211
|
+
if (this._modalsStack.length === 0)
|
|
212
|
+
return;
|
|
213
|
+
const currentItem = this._modalsStack.pop();
|
|
214
|
+
currentItem.resolve(undefined);
|
|
215
|
+
if (currentItem.dialogRef.disableClose) {
|
|
216
|
+
currentItem.dialogRef.disableClose = false;
|
|
217
|
+
}
|
|
218
|
+
currentItem.dialogRef.close();
|
|
219
|
+
// restore parent dialog backdrop
|
|
220
|
+
if (this._modalsStack.length > 0) {
|
|
221
|
+
const parentDialog = this._modalsStack[this._modalsStack.length - 1];
|
|
222
|
+
const overlayRef = parentDialog.dialogRef._ref?.overlayRef;
|
|
223
|
+
if (overlayRef && overlayRef.backdropElement) {
|
|
224
|
+
overlayRef.backdropElement.style.display = '';
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
getModalConfig(modalStackId) {
|
|
229
|
+
return this._modalsStack.find(item => item.id === modalStackId)?.componentRef;
|
|
230
|
+
}
|
|
231
|
+
getBreadcrumbs(modalStackId) {
|
|
232
|
+
const breadcrumbs = [];
|
|
233
|
+
for (const item of this._modalsStack) {
|
|
234
|
+
const breadcrumb = item.componentRef.breadcrumb;
|
|
235
|
+
if (breadcrumb)
|
|
236
|
+
breadcrumbs.push(breadcrumb());
|
|
237
|
+
if (item.id === modalStackId)
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
return breadcrumbs;
|
|
241
|
+
}
|
|
242
|
+
closeOnButton(modalStackId) {
|
|
243
|
+
return this._modalsStack.find(item => item.id === modalStackId)?.componentRef.closeOnButton;
|
|
244
|
+
}
|
|
245
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
246
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ModalService, providedIn: 'root' });
|
|
247
|
+
}
|
|
248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ModalService, decorators: [{
|
|
249
|
+
type: Injectable,
|
|
250
|
+
args: [{
|
|
251
|
+
providedIn: 'root',
|
|
252
|
+
}]
|
|
253
|
+
}] });
|
|
254
|
+
|
|
255
|
+
class SearchInputComponent {
|
|
256
|
+
searchAdapter = input.required(...(ngDevMode ? [{ debugName: "searchAdapter" }] : []));
|
|
257
|
+
_inputTemplate = contentChild.required(TemplateRef);
|
|
258
|
+
isFocused = output();
|
|
259
|
+
_inputValue = signal('', ...(ngDevMode ? [{ debugName: "_inputValue" }] : []));
|
|
260
|
+
_showInputField = true;
|
|
261
|
+
ngOnInit() {
|
|
262
|
+
this.searchAdapter().onChange.addEventListener(() => {
|
|
263
|
+
this._inputValue.set(this.searchAdapter().searchText); // updates input field on change
|
|
264
|
+
if (!this.searchAdapter().multiselect && this.searchAdapter().selectedItems.length > 0) {
|
|
265
|
+
this._showInputField = false;
|
|
266
|
+
}
|
|
267
|
+
else
|
|
268
|
+
this._showInputField = true;
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
_onInput = effect(() => {
|
|
272
|
+
this.searchAdapter().searchText = this._inputValue();
|
|
273
|
+
}, ...(ngDevMode ? [{ debugName: "_onInput" }] : []));
|
|
274
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
275
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.15", type: SearchInputComponent, isStandalone: true, selector: "app-search-input-component", inputs: { searchAdapter: { classPropertyName: "searchAdapter", publicName: "searchAdapter", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { isFocused: "isFocused" }, queries: [{ propertyName: "_inputTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container\n *ngIf=\"_showInputField\"\n [ngTemplateOutlet]=\"_inputTemplate()\"\n [ngTemplateOutletContext]=\"{ inputValue: _inputValue, onFocus: isFocused }\"\n></ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
276
|
+
}
|
|
277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchInputComponent, decorators: [{
|
|
278
|
+
type: Component,
|
|
279
|
+
args: [{ selector: 'app-search-input-component', standalone: true, imports: [CommonModule], template: "<ng-container\n *ngIf=\"_showInputField\"\n [ngTemplateOutlet]=\"_inputTemplate()\"\n [ngTemplateOutletContext]=\"{ inputValue: _inputValue, onFocus: isFocused }\"\n></ng-container>\n" }]
|
|
280
|
+
}], propDecorators: { searchAdapter: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchAdapter", required: true }] }], _inputTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], isFocused: [{ type: i0.Output, args: ["isFocused"] }] } });
|
|
281
|
+
|
|
282
|
+
class SearchClearButtonComponent {
|
|
283
|
+
searchAdapter = input.required(...(ngDevMode ? [{ debugName: "searchAdapter" }] : []));
|
|
284
|
+
_buttonTemplate = contentChild.required(TemplateRef);
|
|
285
|
+
_showButton = false;
|
|
286
|
+
ngOnInit() {
|
|
287
|
+
this.searchAdapter().onChange.addEventListener(() => {
|
|
288
|
+
// show button when there is text in the input field
|
|
289
|
+
if (this.searchAdapter().searchText.length > 0) {
|
|
290
|
+
this._showButton = true;
|
|
291
|
+
// if single-select mode and an item is selected
|
|
292
|
+
if (this.searchAdapter().selectedItems.length > 0 && !this.searchAdapter().multiselect) {
|
|
293
|
+
this._showButton = false;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
else
|
|
297
|
+
this._showButton = false;
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
_clearAll() {
|
|
301
|
+
this.searchAdapter().searchText = '';
|
|
302
|
+
this.searchAdapter().selectedItems = [];
|
|
303
|
+
}
|
|
304
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchClearButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
305
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.15", type: SearchClearButtonComponent, isStandalone: true, selector: "app-search-clear-button-component", inputs: { searchAdapter: { classPropertyName: "searchAdapter", publicName: "searchAdapter", isSignal: true, isRequired: true, transformFunction: null } }, queries: [{ propertyName: "_buttonTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *ngIf=\"_showButton\" [ngTemplateOutlet]=\"_buttonTemplate()\" [ngTemplateOutletContext]=\"{ onClear: _clearAll.bind(this) }\"></ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }] });
|
|
306
|
+
}
|
|
307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchClearButtonComponent, decorators: [{
|
|
308
|
+
type: Component,
|
|
309
|
+
args: [{ selector: 'app-search-clear-button-component', standalone: true, imports: [CommonModule, MatIconModule, MatButtonModule], template: "<ng-container *ngIf=\"_showButton\" [ngTemplateOutlet]=\"_buttonTemplate()\" [ngTemplateOutletContext]=\"{ onClear: _clearAll.bind(this) }\"></ng-container>\n" }]
|
|
310
|
+
}], propDecorators: { searchAdapter: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchAdapter", required: true }] }], _buttonTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
|
|
311
|
+
|
|
312
|
+
class SearchShowResultsButtonComponent {
|
|
313
|
+
searchAdapter = input.required(...(ngDevMode ? [{ debugName: "searchAdapter" }] : []));
|
|
314
|
+
showResults = output();
|
|
315
|
+
_buttonTemplate = contentChild.required(TemplateRef);
|
|
316
|
+
_showButton = false;
|
|
317
|
+
ngOnInit() {
|
|
318
|
+
this.searchAdapter().onChange.addEventListener(() => {
|
|
319
|
+
// if single-select mode and an item is selected
|
|
320
|
+
if (this.searchAdapter().selectedItems.length > 0 && !this.searchAdapter().multiselect) {
|
|
321
|
+
this._showButton = true;
|
|
322
|
+
}
|
|
323
|
+
else
|
|
324
|
+
this._showButton = false;
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchShowResultsButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
328
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.15", type: SearchShowResultsButtonComponent, isStandalone: true, selector: "app-search-show-results-button-component", inputs: { searchAdapter: { classPropertyName: "searchAdapter", publicName: "searchAdapter", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { showResults: "showResults" }, queries: [{ propertyName: "_buttonTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: "<div *ngIf=\"_showButton\" style=\"position: relative; display: inline-block\">\n <div class=\"hover-area\" (mouseleave)=\"showResults.emit(false)\"></div>\n <ng-container [ngTemplateOutlet]=\"_buttonTemplate()\" [ngTemplateOutletContext]=\"{ onClick: showResults }\"></ng-container>\n</div>\n", styles: [".hover-area{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:500%;height:500%}.hover-area:hover{pointer-events:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }] });
|
|
329
|
+
}
|
|
330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchShowResultsButtonComponent, decorators: [{
|
|
331
|
+
type: Component,
|
|
332
|
+
args: [{ selector: 'app-search-show-results-button-component', standalone: true, imports: [CommonModule, MatIconModule, MatButtonModule], template: "<div *ngIf=\"_showButton\" style=\"position: relative; display: inline-block\">\n <div class=\"hover-area\" (mouseleave)=\"showResults.emit(false)\"></div>\n <ng-container [ngTemplateOutlet]=\"_buttonTemplate()\" [ngTemplateOutletContext]=\"{ onClick: showResults }\"></ng-container>\n</div>\n", styles: [".hover-area{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:500%;height:500%}.hover-area:hover{pointer-events:auto}\n"] }]
|
|
333
|
+
}], propDecorators: { searchAdapter: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchAdapter", required: true }] }], showResults: [{ type: i0.Output, args: ["showResults"] }], _buttonTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
|
|
334
|
+
|
|
335
|
+
class SearchResultListComponent {
|
|
336
|
+
searchAdapter = input.required(...(ngDevMode ? [{ debugName: "searchAdapter" }] : []));
|
|
337
|
+
isHovering = output();
|
|
338
|
+
_itemTemplate = contentChild.required(TemplateRef);
|
|
339
|
+
_searchResults = signal([], ...(ngDevMode ? [{ debugName: "_searchResults" }] : []));
|
|
340
|
+
_beforeFirstResults = true;
|
|
341
|
+
_beforeFirstResultsMessage = 'Type at least 3 characters to search ...';
|
|
342
|
+
ngOnInit() {
|
|
343
|
+
this.searchAdapter().onChange.addEventListener(() => {
|
|
344
|
+
this._searchResults.set(this.searchAdapter().searchResults);
|
|
345
|
+
if (this.searchAdapter().searchResults.length > 0 && this._beforeFirstResults) {
|
|
346
|
+
// stop showing _beforeFirstResultsMessage
|
|
347
|
+
this._beforeFirstResults = false;
|
|
348
|
+
}
|
|
349
|
+
if (this._beforeFirstResults === false && this.searchAdapter().searchText.length === 0) {
|
|
350
|
+
// restore _beforeFirstResultsMessage
|
|
351
|
+
this._beforeFirstResults = true;
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
_onItemClick(item) {
|
|
356
|
+
this.searchAdapter().addToSelection(item);
|
|
357
|
+
}
|
|
358
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchResultListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
359
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.15", type: SearchResultListComponent, isStandalone: true, selector: "app-search-result-list-component", inputs: { searchAdapter: { classPropertyName: "searchAdapter", publicName: "searchAdapter", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { isHovering: "isHovering" }, queries: [{ propertyName: "_itemTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: "<div (mouseenter)=\"isHovering.emit(true)\" (mouseleave)=\"isHovering.emit(false)\">\n <ng-container\n [ngTemplateOutlet]=\"_itemTemplate()\"\n [ngTemplateOutletContext]=\"{\n searchResults: _searchResults(),\n beforeFirstResults: _beforeFirstResults,\n beforeFirstResultsMessage: _beforeFirstResultsMessage,\n onItemClick: _onItemClick.bind(this)\n }\"\n ></ng-container>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatCardModule }] });
|
|
360
|
+
}
|
|
361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchResultListComponent, decorators: [{
|
|
362
|
+
type: Component,
|
|
363
|
+
args: [{ selector: 'app-search-result-list-component', standalone: true, imports: [CommonModule, MatIconModule, MatCardModule], template: "<div (mouseenter)=\"isHovering.emit(true)\" (mouseleave)=\"isHovering.emit(false)\">\n <ng-container\n [ngTemplateOutlet]=\"_itemTemplate()\"\n [ngTemplateOutletContext]=\"{\n searchResults: _searchResults(),\n beforeFirstResults: _beforeFirstResults,\n beforeFirstResultsMessage: _beforeFirstResultsMessage,\n onItemClick: _onItemClick.bind(this)\n }\"\n ></ng-container>\n</div>\n" }]
|
|
364
|
+
}], propDecorators: { searchAdapter: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchAdapter", required: true }] }], isHovering: [{ type: i0.Output, args: ["isHovering"] }], _itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
|
|
365
|
+
|
|
366
|
+
class SearchSelectionListComponent {
|
|
367
|
+
searchAdapter = input.required(...(ngDevMode ? [{ debugName: "searchAdapter" }] : []));
|
|
368
|
+
_itemTemplate = contentChild.required(TemplateRef);
|
|
369
|
+
_selectedItems = signal([], ...(ngDevMode ? [{ debugName: "_selectedItems" }] : []));
|
|
370
|
+
ngOnInit() {
|
|
371
|
+
this.searchAdapter().onChange.addEventListener(() => {
|
|
372
|
+
this._selectedItems.set(this.searchAdapter().selectedItems);
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
_onRemoveClick(item) {
|
|
376
|
+
this.searchAdapter().removeFromSelection(item);
|
|
377
|
+
}
|
|
378
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchSelectionListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
379
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.15", type: SearchSelectionListComponent, isStandalone: true, selector: "app-search-selection-list-component", inputs: { searchAdapter: { classPropertyName: "searchAdapter", publicName: "searchAdapter", isSignal: true, isRequired: true, transformFunction: null } }, queries: [{ propertyName: "_itemTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: "<div *ngFor=\"let item of _selectedItems()\" [style.width]=\"!searchAdapter().multiselect ? '100%' : 'auto'\">\n <ng-container [ngTemplateOutlet]=\"_itemTemplate()\" [ngTemplateOutletContext]=\"{ $implicit: item, onRemove: _onRemoveClick.bind(this) }\"></ng-container>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }] });
|
|
380
|
+
}
|
|
381
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchSelectionListComponent, decorators: [{
|
|
382
|
+
type: Component,
|
|
383
|
+
args: [{ selector: 'app-search-selection-list-component', standalone: true, imports: [CommonModule, MatIconModule, MatButtonModule], template: "<div *ngFor=\"let item of _selectedItems()\" [style.width]=\"!searchAdapter().multiselect ? '100%' : 'auto'\">\n <ng-container [ngTemplateOutlet]=\"_itemTemplate()\" [ngTemplateOutletContext]=\"{ $implicit: item, onRemove: _onRemoveClick.bind(this) }\"></ng-container>\n</div>\n" }]
|
|
384
|
+
}], propDecorators: { searchAdapter: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchAdapter", required: true }] }], _itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
|
|
385
|
+
|
|
386
|
+
/*
|
|
387
|
+
* Public API Surface of cornerstone-client-angular-material
|
|
388
|
+
*/
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Generated bundle index. Do not edit.
|
|
392
|
+
*/
|
|
393
|
+
|
|
394
|
+
export { MatPaginatorIntlOverrides, MatTablePaginationDirective, MatTableSortDirective, ModalService, SearchClearButtonComponent, SearchInputComponent, SearchResultListComponent, SearchSelectionListComponent, SearchShowResultsButtonComponent };
|
|
395
|
+
//# sourceMappingURL=intellegens-cornerstone-client-angular-material.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intellegens-cornerstone-client-angular-material.mjs","sources":["../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/overrides/MatPaginatorIntlOverrides/index.ts","../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/directives/MatTablePaginationDirective/index.ts","../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/directives/MatTableSortDirective/index.ts","../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/services/ModalService/index.ts","../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/components/Search/SearchInput/SearchInputComponent.ts","../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/components/Search/SearchInput/SearchInputComponent.html","../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/components/Search/SearchClearButton/SearchClearButtonComponent.ts","../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/components/Search/SearchClearButton/SearchClearButtonComponent.html","../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/components/Search/SearchShowResultsButton/SearchShowResultsButtonComponent.ts","../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/components/Search/SearchShowResultsButton/SearchShowResultsButtonComponent.html","../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/components/Search/SearchResultList/SearchResultListComponent.ts","../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/components/Search/SearchResultList/SearchResultListComponent.html","../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/components/Search/SearchSelectionList/SearchSelectionListComponent.ts","../../../../projects/intellegens/cornerstone-client-angular-material/src/lib/components/Search/SearchSelectionList/SearchSelectionListComponent.html","../../../../projects/intellegens/cornerstone-client-angular-material/src/public-api.ts","../../../../projects/intellegens/cornerstone-client-angular-material/src/intellegens-cornerstone-client-angular-material.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { MatPaginatorIntl } from '@angular/material/paginator';\n\n/**\n * Custom paginator service to adjust the label for the paginator.\n */\n@Injectable()\nexport class MatPaginatorIntlOverrides extends MatPaginatorIntl {\n override getRangeLabel = (page: number, pageSize: number, length: number) => {\n if (length === 0) {\n return 'Page 1 of 1';\n }\n const isLengthValid = length && length !== -1;\n return isLengthValid ? `Page ${page + 1} of ${Math.ceil(length / pageSize)}` : `Page ${page + 1}`;\n };\n}\n","import { Directive, InputSignal, inject, input } from '@angular/core';\nimport { MatPaginator, MatPaginatorIntl, PageEvent } from '@angular/material/paginator';\nimport { MatPaginatorIntlOverrides } from '../../overrides'; // using path alias results in `Could not resolve \"@overrides\"` in app\nimport { Subscription } from 'rxjs';\nimport { CollectionViewAdapter } from '@intellegens/cornerstone-client-angular';\n\n/**\n * Directive used to pass data to the `CollectionViewAdapter`, uses `MatPaginatorIntlOverrides` to change pagination UI.\n */\n@Directive({\n selector: 'mat-paginator',\n providers: [{ provide: MatPaginatorIntl, useClass: MatPaginatorIntlOverrides }],\n standalone: true,\n})\nexport class MatTablePaginationDirective {\n private _matPaginator = inject(MatPaginator);\n public adapter: InputSignal<CollectionViewAdapter<any, any, any> | undefined> = input();\n private _subscription?: Subscription;\n ngOnInit() {\n this._subscription = this._matPaginator.page.subscribe((event: PageEvent) => {\n const adapter = this.adapter();\n if (!adapter) return;\n const targetPage = event.pageIndex + 1;\n if (event.pageSize !== adapter.pageSize) {\n adapter.setPageSize(event.pageSize);\n } else if (targetPage !== adapter.currentPage) {\n adapter.jumpToPage(targetPage);\n }\n });\n }\n ngOnDestroy() {\n this._subscription?.unsubscribe();\n }\n}\n","import { Directive, inject, input, InputSignal } from '@angular/core';\nimport { MatSort, Sort } from '@angular/material/sort';\nimport { CollectionViewAdapter, ReadSelectedOrderingDirection } from '@intellegens/cornerstone-client-angular';\n\n/**\n * Directive used to pass data to the `CollectionViewAdapter` and reverse the default direction of shown table header sorting arrows\n */\n@Directive({\n selector: 'mat-table[matSort], table[mat-table][matSort]',\n standalone: true,\n})\nexport class MatTableSortDirective {\n private _matSort = inject(MatSort);\n public adapter: InputSignal<CollectionViewAdapter<any, any, any> | undefined> = input();\n ngOnInit() {\n this._matSort.disableClear = true; // removes \"unsorted\" option, syncs column header arrows with actual current sort direction\n // tell MatSort our starting sort direction\n const adapter = this.adapter();\n if (adapter) {\n // TODO: handle multiple columns - for now it only supports ordering by one column\n const initialSort = adapter.getCurrentOrdering()[0];\n this._matSort.active = (initialSort.orderByPath && initialSort.orderByPath[0]) || '';\n this._matSort.direction = initialSort.orderDirection === ReadSelectedOrderingDirection.Ascending ? 'desc' : 'asc'; // show reverse arrows\n }\n }\n private _subscription = this._matSort.sortChange.subscribe((event: Sort) => {\n const adapter = this.adapter();\n if (adapter && event?.active) {\n const newDirection = event.direction == 'desc' ? ReadSelectedOrderingDirection.Ascending : ReadSelectedOrderingDirection.Descending; // show reverse arrows\n adapter.setOrdering([event.active], newDirection);\n }\n });\n ngOnDestroy() {\n this._subscription.unsubscribe();\n }\n}\n","import { Injectable, inject, Type, InputSignal } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { type IModalComponent } from '../../interfaces';\n\ntype ModalStackItem = {\n id: string;\n resolve: (value: any) => void;\n dialogRef: MatDialogRef<any>;\n componentRef: IModalComponent;\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ModalService {\n private _matDialog = inject(MatDialog);\n private _modalsStack: ModalStackItem[] = [];\n private _nextModalStackId = 0;\n\n public openModal<TComponent extends IModalComponent, TResult>(\n Component: Type<TComponent>,\n inputs?: Partial<{ [key in keyof TComponent]: TComponent[key] extends InputSignal<infer T> ? T : never }>,\n ): Promise<TResult | undefined> {\n return new Promise<TResult | undefined>(resolve => {\n // hide parent modal backdrop\n if (this._modalsStack.length > 0) {\n const parentDialog = this._modalsStack[this._modalsStack.length - 1];\n const overlayRef = (parentDialog.dialogRef as any)._ref?.overlayRef;\n if (overlayRef && overlayRef.backdropElement) {\n overlayRef.backdropElement.style.display = 'none';\n }\n }\n\n // new dialog using configured container component\n const dialogRef = this._matDialog.open(Component, {\n maxWidth: 'none',\n });\n const componentRef = dialogRef.componentRef;\n const componentInstance = componentRef!.instance as TComponent;\n\n const closeOnBackdrop = componentInstance.closeOnBackdrop ?? true;\n const closeOnEscapeKey = componentInstance.closeOnEscapeKey ?? true;\n\n // disable MatDialog default closing backdrop-click/escape-key behavior\n if (!closeOnBackdrop || !closeOnEscapeKey) {\n dialogRef.disableClose = true;\n }\n\n // set modal component stack Id\n const id = `${this._nextModalStackId++}`;\n componentInstance.modalStackId = id;\n // set modal component inputs\n if (inputs !== undefined) {\n for (const key of Object.keys(inputs) as (keyof Partial<TComponent>)[]) {\n if (key in componentInstance && componentInstance[key] instanceof Function) {\n componentRef?.setInput(key as string, inputs[key]);\n }\n }\n }\n\n // add to stack\n this._modalsStack.push({\n id,\n resolve,\n dialogRef,\n componentRef: dialogRef.componentRef?.instance as IModalComponent,\n });\n\n // handle dialog closed via backdrop click\n dialogRef.backdropClick().subscribe(() => {\n if (closeOnBackdrop) {\n dialogRef.close();\n const index = this._modalsStack.findIndex(item => item.dialogRef === dialogRef);\n\n if (index !== -1) {\n // dialog was closed without submitModal/closeModal\n const item = this._modalsStack[index];\n item.resolve(undefined);\n this._modalsStack.splice(index, 1);\n\n // restore parent dialog backdrop\n if (this._modalsStack.length > 0) {\n const parentDialog = this._modalsStack[this._modalsStack.length - 1];\n const overlayRef = (parentDialog.dialogRef as any)._ref?.overlayRef;\n if (overlayRef && overlayRef.backdropElement) {\n overlayRef.backdropElement.style.display = '';\n }\n }\n }\n }\n });\n // handle dialog closed via Esc key-press\n dialogRef.keydownEvents().subscribe(event => {\n if (event.key === 'Escape') {\n if (closeOnEscapeKey) {\n dialogRef.close();\n const index = this._modalsStack.findIndex(item => item.dialogRef === dialogRef);\n\n if (index !== -1) {\n // dialog was closed without submitModal/closeModal\n const item = this._modalsStack[index];\n item.resolve(undefined);\n this._modalsStack.splice(index, 1);\n\n // restore parent dialog backdrop\n if (this._modalsStack.length > 0) {\n const parentDialog = this._modalsStack[this._modalsStack.length - 1];\n const overlayRef = (parentDialog.dialogRef as any)._ref?.overlayRef;\n if (overlayRef && overlayRef.backdropElement) {\n overlayRef.backdropElement.style.display = '';\n }\n }\n }\n }\n }\n });\n });\n }\n\n public submitModal<T>(data: T): void {\n if (this._modalsStack.length === 0) return;\n\n const currentItem = this._modalsStack.pop()!;\n currentItem.resolve(data);\n currentItem.dialogRef.close();\n\n // restore parent dialog backdrop\n if (this._modalsStack.length > 0) {\n const parentDialog = this._modalsStack[this._modalsStack.length - 1];\n const overlayRef = (parentDialog.dialogRef as any)._ref?.overlayRef;\n if (overlayRef && overlayRef.backdropElement) {\n overlayRef.backdropElement.style.display = '';\n }\n }\n }\n\n public closeModal(): void {\n if (this._modalsStack.length === 0) return;\n\n const currentItem = this._modalsStack.pop()!;\n currentItem.resolve(undefined);\n if (currentItem.dialogRef.disableClose) {\n currentItem.dialogRef.disableClose = false;\n }\n currentItem.dialogRef.close();\n\n // restore parent dialog backdrop\n if (this._modalsStack.length > 0) {\n const parentDialog = this._modalsStack[this._modalsStack.length - 1];\n const overlayRef = (parentDialog.dialogRef as any)._ref?.overlayRef;\n if (overlayRef && overlayRef.backdropElement) {\n overlayRef.backdropElement.style.display = '';\n }\n }\n }\n\n public getModalConfig(modalStackId: string | undefined): IModalComponent | undefined {\n return this._modalsStack.find(item => item.id === modalStackId)?.componentRef;\n }\n\n public getBreadcrumbs(modalStackId: string | undefined): string[] {\n const breadcrumbs: string[] = [];\n for (const item of this._modalsStack) {\n const breadcrumb = item.componentRef.breadcrumb;\n if (breadcrumb) breadcrumbs.push(breadcrumb());\n if (item.id === modalStackId) break;\n }\n return breadcrumbs;\n }\n\n public closeOnButton(modalStackId: string | undefined): boolean | undefined {\n return this._modalsStack.find(item => item.id === modalStackId)?.componentRef.closeOnButton;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, contentChild, effect, input, output, signal, TemplateRef } from '@angular/core';\nimport { IGlobalSearchable, SearchAdapter } from '@intellegens/cornerstone-client-angular';\n\n@Component({\n selector: 'app-search-input-component',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './SearchInputComponent.html',\n})\nexport class SearchInputComponent<TKey, TDto extends IGlobalSearchable<TKey>> {\n public searchAdapter = input.required<SearchAdapter<TKey, TDto>>();\n protected _inputTemplate = contentChild.required<TemplateRef<any>>(TemplateRef);\n public isFocused = output<boolean>();\n\n protected _inputValue = signal<string>('');\n protected _showInputField = true;\n\n public ngOnInit() {\n this.searchAdapter().onChange.addEventListener(() => {\n this._inputValue.set(this.searchAdapter().searchText); // updates input field on change\n\n if (!this.searchAdapter().multiselect && this.searchAdapter().selectedItems.length > 0) {\n this._showInputField = false;\n } else this._showInputField = true;\n });\n }\n\n private _onInput = effect(() => {\n this.searchAdapter().searchText = this._inputValue();\n });\n}\n","<ng-container\n *ngIf=\"_showInputField\"\n [ngTemplateOutlet]=\"_inputTemplate()\"\n [ngTemplateOutletContext]=\"{ inputValue: _inputValue, onFocus: isFocused }\"\n></ng-container>\n","import { CommonModule } from '@angular/common';\nimport { Component, contentChild, input, TemplateRef } from '@angular/core';\nimport { IGlobalSearchable, SearchAdapter } from '@intellegens/cornerstone-client-angular';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n selector: 'app-search-clear-button-component',\n standalone: true,\n imports: [CommonModule, MatIconModule, MatButtonModule],\n templateUrl: './SearchClearButtonComponent.html',\n})\nexport class SearchClearButtonComponent<TKey, TDto extends IGlobalSearchable<TKey>> {\n public searchAdapter = input.required<SearchAdapter<TKey, TDto>>();\n protected _buttonTemplate = contentChild.required<TemplateRef<any>>(TemplateRef);\n\n protected _showButton = false;\n public ngOnInit() {\n this.searchAdapter().onChange.addEventListener(() => {\n // show button when there is text in the input field\n if (this.searchAdapter().searchText.length > 0) {\n this._showButton = true;\n\n // if single-select mode and an item is selected\n if (this.searchAdapter().selectedItems.length > 0 && !this.searchAdapter().multiselect) {\n this._showButton = false;\n }\n } else this._showButton = false;\n });\n }\n\n protected _clearAll() {\n this.searchAdapter().searchText = '';\n this.searchAdapter().selectedItems = [];\n }\n}\n","<ng-container *ngIf=\"_showButton\" [ngTemplateOutlet]=\"_buttonTemplate()\" [ngTemplateOutletContext]=\"{ onClear: _clearAll.bind(this) }\"></ng-container>\n","import { CommonModule } from '@angular/common';\nimport { Component, contentChild, input, output, TemplateRef } from '@angular/core';\nimport { IGlobalSearchable, SearchAdapter } from '@intellegens/cornerstone-client-angular';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n selector: 'app-search-show-results-button-component',\n standalone: true,\n imports: [CommonModule, MatIconModule, MatButtonModule],\n templateUrl: './SearchShowResultsButtonComponent.html',\n styleUrl: './SearchShowResultsButtonComponent.css',\n})\nexport class SearchShowResultsButtonComponent<TKey, TDto extends IGlobalSearchable<TKey>> {\n public searchAdapter = input.required<SearchAdapter<TKey, TDto>>();\n public showResults = output<boolean>();\n protected _buttonTemplate = contentChild.required<TemplateRef<any>>(TemplateRef);\n\n protected _showButton = false;\n public ngOnInit() {\n this.searchAdapter().onChange.addEventListener(() => {\n // if single-select mode and an item is selected\n if (this.searchAdapter().selectedItems.length > 0 && !this.searchAdapter().multiselect) {\n this._showButton = true;\n } else this._showButton = false;\n });\n }\n}\n","<div *ngIf=\"_showButton\" style=\"position: relative; display: inline-block\">\n <div class=\"hover-area\" (mouseleave)=\"showResults.emit(false)\"></div>\n <ng-container [ngTemplateOutlet]=\"_buttonTemplate()\" [ngTemplateOutletContext]=\"{ onClick: showResults }\"></ng-container>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, contentChild, input, output, signal, TemplateRef } from '@angular/core';\nimport { IGlobalSearchable, SearchAdapter } from '@intellegens/cornerstone-client-angular';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatCardModule } from '@angular/material/card';\n\n@Component({\n selector: 'app-search-result-list-component',\n standalone: true,\n imports: [CommonModule, MatIconModule, MatCardModule],\n templateUrl: './SearchResultListComponent.html',\n})\nexport class SearchResultListComponent<TKey, TDto extends IGlobalSearchable<TKey>> {\n public searchAdapter = input.required<SearchAdapter<TKey, TDto>>();\n public isHovering = output<boolean>();\n protected _itemTemplate = contentChild.required<TemplateRef<any>>(TemplateRef);\n\n protected _searchResults = signal<TDto[]>([]);\n protected _beforeFirstResults = true;\n protected _beforeFirstResultsMessage = 'Type at least 3 characters to search ...';\n\n public ngOnInit() {\n this.searchAdapter().onChange.addEventListener(() => {\n this._searchResults.set(this.searchAdapter().searchResults);\n if (this.searchAdapter().searchResults.length > 0 && this._beforeFirstResults) {\n // stop showing _beforeFirstResultsMessage\n this._beforeFirstResults = false;\n }\n if (this._beforeFirstResults === false && this.searchAdapter().searchText.length === 0) {\n // restore _beforeFirstResultsMessage\n this._beforeFirstResults = true;\n }\n });\n }\n\n protected _onItemClick(item: TDto) {\n this.searchAdapter().addToSelection(item);\n }\n}\n","<div (mouseenter)=\"isHovering.emit(true)\" (mouseleave)=\"isHovering.emit(false)\">\n <ng-container\n [ngTemplateOutlet]=\"_itemTemplate()\"\n [ngTemplateOutletContext]=\"{\n searchResults: _searchResults(),\n beforeFirstResults: _beforeFirstResults,\n beforeFirstResultsMessage: _beforeFirstResultsMessage,\n onItemClick: _onItemClick.bind(this)\n }\"\n ></ng-container>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, contentChild, input, signal, TemplateRef } from '@angular/core';\nimport { IGlobalSearchable, SearchAdapter } from '@intellegens/cornerstone-client';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n selector: 'app-search-selection-list-component',\n standalone: true,\n imports: [CommonModule, MatIconModule, MatButtonModule],\n templateUrl: './SearchSelectionListComponent.html',\n})\nexport class SearchSelectionListComponent<TKey, TDto extends IGlobalSearchable<TKey>> {\n public searchAdapter = input.required<SearchAdapter<TKey, TDto>>();\n protected _itemTemplate = contentChild.required<TemplateRef<any>>(TemplateRef);\n\n protected _selectedItems = signal<TDto[]>([]);\n\n public ngOnInit() {\n this.searchAdapter().onChange.addEventListener(() => {\n this._selectedItems.set(this.searchAdapter().selectedItems);\n });\n }\n\n protected _onRemoveClick(item: TDto) {\n this.searchAdapter().removeFromSelection(item);\n }\n}\n","<div *ngFor=\"let item of _selectedItems()\" [style.width]=\"!searchAdapter().multiselect ? '100%' : 'auto'\">\n <ng-container [ngTemplateOutlet]=\"_itemTemplate()\" [ngTemplateOutletContext]=\"{ $implicit: item, onRemove: _onRemoveClick.bind(this) }\"></ng-container>\n</div>\n","/*\n * Public API Surface of cornerstone-client-angular-material\n */\n\nexport * from './lib/';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAGA;;AAEG;AAEG,MAAO,yBAA0B,SAAQ,gBAAgB,CAAA;IACpD,aAAa,GAAG,CAAC,IAAY,EAAE,QAAgB,EAAE,MAAc,KAAI;AAC1E,QAAA,IAAI,MAAM,KAAK,CAAC,EAAE;AAChB,YAAA,OAAO,aAAa;QACtB;QACA,MAAM,aAAa,GAAG,MAAM,IAAI,MAAM,KAAK,CAAC,CAAC;QAC7C,OAAO,aAAa,GAAG,CAAA,KAAA,EAAQ,IAAI,GAAG,CAAC,CAAA,IAAA,EAAO,IAAI,CA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AEd/E;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InputSignal, Type, TemplateRef } from '@angular/core';
|
|
3
|
+
import { CollectionViewAdapter, IGlobalSearchable, SearchAdapter } from '@intellegens/cornerstone-client-angular';
|
|
4
|
+
import { MatPaginatorIntl } from '@angular/material/paginator';
|
|
5
|
+
import { IGlobalSearchable as IGlobalSearchable$1, SearchAdapter as SearchAdapter$1 } from '@intellegens/cornerstone-client';
|
|
6
|
+
|
|
7
|
+
interface IModalComponent {
|
|
8
|
+
modalStackId?: string;
|
|
9
|
+
breadcrumb: InputSignal<string>;
|
|
10
|
+
closeOnBackdrop?: boolean;
|
|
11
|
+
closeOnEscapeKey?: boolean;
|
|
12
|
+
closeOnButton?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Directive used to pass data to the `CollectionViewAdapter`, uses `MatPaginatorIntlOverrides` to change pagination UI.
|
|
17
|
+
*/
|
|
18
|
+
declare class MatTablePaginationDirective {
|
|
19
|
+
private _matPaginator;
|
|
20
|
+
adapter: InputSignal<CollectionViewAdapter<any, any, any> | undefined>;
|
|
21
|
+
private _subscription?;
|
|
22
|
+
ngOnInit(): void;
|
|
23
|
+
ngOnDestroy(): void;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatTablePaginationDirective, never>;
|
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatTablePaginationDirective, "mat-paginator", never, { "adapter": { "alias": "adapter"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Directive used to pass data to the `CollectionViewAdapter` and reverse the default direction of shown table header sorting arrows
|
|
30
|
+
*/
|
|
31
|
+
declare class MatTableSortDirective {
|
|
32
|
+
private _matSort;
|
|
33
|
+
adapter: InputSignal<CollectionViewAdapter<any, any, any> | undefined>;
|
|
34
|
+
ngOnInit(): void;
|
|
35
|
+
private _subscription;
|
|
36
|
+
ngOnDestroy(): void;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatTableSortDirective, never>;
|
|
38
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatTableSortDirective, "mat-table[matSort], table[mat-table][matSort]", never, { "adapter": { "alias": "adapter"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Custom paginator service to adjust the label for the paginator.
|
|
43
|
+
*/
|
|
44
|
+
declare class MatPaginatorIntlOverrides extends MatPaginatorIntl {
|
|
45
|
+
getRangeLabel: (page: number, pageSize: number, length: number) => string;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatPaginatorIntlOverrides, never>;
|
|
47
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MatPaginatorIntlOverrides>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare class ModalService {
|
|
51
|
+
private _matDialog;
|
|
52
|
+
private _modalsStack;
|
|
53
|
+
private _nextModalStackId;
|
|
54
|
+
openModal<TComponent extends IModalComponent, TResult>(Component: Type<TComponent>, inputs?: Partial<{
|
|
55
|
+
[key in keyof TComponent]: TComponent[key] extends InputSignal<infer T> ? T : never;
|
|
56
|
+
}>): Promise<TResult | undefined>;
|
|
57
|
+
submitModal<T>(data: T): void;
|
|
58
|
+
closeModal(): void;
|
|
59
|
+
getModalConfig(modalStackId: string | undefined): IModalComponent | undefined;
|
|
60
|
+
getBreadcrumbs(modalStackId: string | undefined): string[];
|
|
61
|
+
closeOnButton(modalStackId: string | undefined): boolean | undefined;
|
|
62
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
|
|
63
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare class SearchInputComponent<TKey, TDto extends IGlobalSearchable<TKey>> {
|
|
67
|
+
searchAdapter: i0.InputSignal<SearchAdapter<TKey, TDto>>;
|
|
68
|
+
protected _inputTemplate: i0.Signal<TemplateRef<any>>;
|
|
69
|
+
isFocused: i0.OutputEmitterRef<boolean>;
|
|
70
|
+
protected _inputValue: i0.WritableSignal<string>;
|
|
71
|
+
protected _showInputField: boolean;
|
|
72
|
+
ngOnInit(): void;
|
|
73
|
+
private _onInput;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchInputComponent<any, any>, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SearchInputComponent<any, any>, "app-search-input-component", never, { "searchAdapter": { "alias": "searchAdapter"; "required": true; "isSignal": true; }; }, { "isFocused": "isFocused"; }, ["_inputTemplate"], never, true, never>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare class SearchClearButtonComponent<TKey, TDto extends IGlobalSearchable<TKey>> {
|
|
79
|
+
searchAdapter: i0.InputSignal<SearchAdapter<TKey, TDto>>;
|
|
80
|
+
protected _buttonTemplate: i0.Signal<TemplateRef<any>>;
|
|
81
|
+
protected _showButton: boolean;
|
|
82
|
+
ngOnInit(): void;
|
|
83
|
+
protected _clearAll(): void;
|
|
84
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchClearButtonComponent<any, any>, never>;
|
|
85
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SearchClearButtonComponent<any, any>, "app-search-clear-button-component", never, { "searchAdapter": { "alias": "searchAdapter"; "required": true; "isSignal": true; }; }, {}, ["_buttonTemplate"], never, true, never>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
declare class SearchShowResultsButtonComponent<TKey, TDto extends IGlobalSearchable<TKey>> {
|
|
89
|
+
searchAdapter: i0.InputSignal<SearchAdapter<TKey, TDto>>;
|
|
90
|
+
showResults: i0.OutputEmitterRef<boolean>;
|
|
91
|
+
protected _buttonTemplate: i0.Signal<TemplateRef<any>>;
|
|
92
|
+
protected _showButton: boolean;
|
|
93
|
+
ngOnInit(): void;
|
|
94
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchShowResultsButtonComponent<any, any>, never>;
|
|
95
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SearchShowResultsButtonComponent<any, any>, "app-search-show-results-button-component", never, { "searchAdapter": { "alias": "searchAdapter"; "required": true; "isSignal": true; }; }, { "showResults": "showResults"; }, ["_buttonTemplate"], never, true, never>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
declare class SearchResultListComponent<TKey, TDto extends IGlobalSearchable<TKey>> {
|
|
99
|
+
searchAdapter: i0.InputSignal<SearchAdapter<TKey, TDto>>;
|
|
100
|
+
isHovering: i0.OutputEmitterRef<boolean>;
|
|
101
|
+
protected _itemTemplate: i0.Signal<TemplateRef<any>>;
|
|
102
|
+
protected _searchResults: i0.WritableSignal<TDto[]>;
|
|
103
|
+
protected _beforeFirstResults: boolean;
|
|
104
|
+
protected _beforeFirstResultsMessage: string;
|
|
105
|
+
ngOnInit(): void;
|
|
106
|
+
protected _onItemClick(item: TDto): void;
|
|
107
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchResultListComponent<any, any>, never>;
|
|
108
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SearchResultListComponent<any, any>, "app-search-result-list-component", never, { "searchAdapter": { "alias": "searchAdapter"; "required": true; "isSignal": true; }; }, { "isHovering": "isHovering"; }, ["_itemTemplate"], never, true, never>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
declare class SearchSelectionListComponent<TKey, TDto extends IGlobalSearchable$1<TKey>> {
|
|
112
|
+
searchAdapter: i0.InputSignal<SearchAdapter$1<TKey, TDto>>;
|
|
113
|
+
protected _itemTemplate: i0.Signal<TemplateRef<any>>;
|
|
114
|
+
protected _selectedItems: i0.WritableSignal<TDto[]>;
|
|
115
|
+
ngOnInit(): void;
|
|
116
|
+
protected _onRemoveClick(item: TDto): void;
|
|
117
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchSelectionListComponent<any, any>, never>;
|
|
118
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SearchSelectionListComponent<any, any>, "app-search-selection-list-component", never, { "searchAdapter": { "alias": "searchAdapter"; "required": true; "isSignal": true; }; }, {}, ["_itemTemplate"], never, true, never>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export { MatPaginatorIntlOverrides, MatTablePaginationDirective, MatTableSortDirective, ModalService, SearchClearButtonComponent, SearchInputComponent, SearchResultListComponent, SearchSelectionListComponent, SearchShowResultsButtonComponent };
|
|
122
|
+
export type { IModalComponent };
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@intellegens/cornerstone-client-angular-material",
|
|
3
|
+
"version": "0.0.0-experimental-upgrade-20260302-1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"publishable": true,
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"author": "Intellegens",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"description": "",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"intellegens",
|
|
12
|
+
"cornerstone"
|
|
13
|
+
],
|
|
14
|
+
"peerDependencies": {
|
|
15
|
+
"@angular/common": "^21.2.0",
|
|
16
|
+
"@angular/compiler": "^21.2.0",
|
|
17
|
+
"@angular/core": "^21.2.0",
|
|
18
|
+
"@angular/forms": "^21.2.0",
|
|
19
|
+
"@angular/platform-browser": "^21.2.0",
|
|
20
|
+
"@angular/material": "^21.2.0",
|
|
21
|
+
"@angular/router": "^21.2.0",
|
|
22
|
+
"rxjs": "~7.8.2",
|
|
23
|
+
"@intellegens/cornerstone-client": "0.0.0-experimental-upgrade-20260302-1",
|
|
24
|
+
"@intellegens/cornerstone-client-angular": "0.0.0-experimental-upgrade-20260302-1"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"tslib": "^2.8.1"
|
|
28
|
+
},
|
|
29
|
+
"module": "fesm2022/intellegens-cornerstone-client-angular-material.mjs",
|
|
30
|
+
"typings": "index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
"./package.json": {
|
|
33
|
+
"default": "./package.json"
|
|
34
|
+
},
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./index.d.ts",
|
|
37
|
+
"default": "./fesm2022/intellegens-cornerstone-client-angular-material.mjs"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|