@ship-ui/core 0.15.41 → 0.16.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.
- package/bin/src/ship-fg-node.js +45 -25
- package/bin/src/ship-fg.ts +53 -41
- package/fesm2022/ship-ui-core.mjs +853 -1056
- package/fesm2022/ship-ui-core.mjs.map +1 -1
- package/index.d.ts +142 -181
- package/package.json +3 -3
|
@@ -5,7 +5,7 @@ import { NgModel } from '@angular/forms';
|
|
|
5
5
|
import { SIGNAL } from '@angular/core/primitives/signals';
|
|
6
6
|
|
|
7
7
|
const iconTypes = ['bold', 'thin', 'light', 'fill', 'duotone'];
|
|
8
|
-
class
|
|
8
|
+
class ShipIcon {
|
|
9
9
|
#selfRef = inject(ElementRef);
|
|
10
10
|
#renderer = inject(Renderer2);
|
|
11
11
|
ngAfterContentInit() {
|
|
@@ -17,12 +17,12 @@ class ShipIconComponent {
|
|
|
17
17
|
this.#renderer.addClass(this.#selfRef.nativeElement, potentialType);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
21
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipIcon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipIcon, isStandalone: true, selector: "sh-icon", ngImport: i0, template: `
|
|
22
22
|
<ng-content />
|
|
23
23
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipIcon, decorators: [{
|
|
26
26
|
type: Component,
|
|
27
27
|
args: [{
|
|
28
28
|
selector: 'sh-icon',
|
|
@@ -59,7 +59,7 @@ function classMutationSignal(_element = null) {
|
|
|
59
59
|
const SHIP_CONFIG = new InjectionToken('Ship UI Config');
|
|
60
60
|
|
|
61
61
|
const POSSIBLE_VARIANTS = ['simple', 'outlined', 'flat', 'raised'];
|
|
62
|
-
class
|
|
62
|
+
class ShipAlert {
|
|
63
63
|
constructor() {
|
|
64
64
|
this.#shConfig = inject(SHIP_CONFIG, { optional: true });
|
|
65
65
|
this.variant = signal(this.#shConfig?.alertVariant ?? '', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
@@ -82,8 +82,8 @@ class ShipAlertComponent {
|
|
|
82
82
|
this.alertService()?.removeAlert(this.id());
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
86
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
85
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
86
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipAlert, isStandalone: true, selector: "sh-alert", inputs: { alertService: { classPropertyName: "alertService", publicName: "alertService", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "activeClass()" } }, ngImport: i0, template: `
|
|
87
87
|
<div class="alert">
|
|
88
88
|
<div #ref class="icon" [style.display]="!ref.children.length ? 'none' : 'block'">
|
|
89
89
|
<ng-content select="[icon]" />
|
|
@@ -122,13 +122,13 @@ class ShipAlertComponent {
|
|
|
122
122
|
<ng-content select="p" />
|
|
123
123
|
</div>
|
|
124
124
|
</div>
|
|
125
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
125
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ShipIcon, selector: "sh-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
126
126
|
}
|
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipAlert, decorators: [{
|
|
128
128
|
type: Component,
|
|
129
129
|
args: [{
|
|
130
130
|
selector: 'sh-alert',
|
|
131
|
-
imports: [
|
|
131
|
+
imports: [ShipIcon],
|
|
132
132
|
template: `
|
|
133
133
|
<div class="alert">
|
|
134
134
|
<div #ref class="icon" [style.display]="!ref.children.length ? 'none' : 'block'">
|
|
@@ -174,23 +174,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
174
174
|
'[class]': 'activeClass()',
|
|
175
175
|
},
|
|
176
176
|
}]
|
|
177
|
-
}] });
|
|
177
|
+
}], propDecorators: { alertService: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertService", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
|
|
178
178
|
|
|
179
|
-
class
|
|
179
|
+
class ShipAlertContainer {
|
|
180
180
|
constructor() {
|
|
181
181
|
this.inline = input(null, ...(ngDevMode ? [{ debugName: "inline" }] : []));
|
|
182
182
|
this.alerts = viewChild.required('alerts');
|
|
183
183
|
this.scroller = viewChild.required('scroller');
|
|
184
184
|
this.alertService = input.required(...(ngDevMode ? [{ debugName: "alertService" }] : []));
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
// alertHistory = this.alertService()?.alertHistory;
|
|
186
|
+
// alertHistoryIsOpen = this.alertService()?.alertHistoryIsOpen;
|
|
187
|
+
// alertHistoryIsHidden = this.alertService()?.alertHistoryIsHidden;
|
|
188
188
|
this.numberOfOpenAlerts = computed(() => {
|
|
189
|
-
return this.
|
|
189
|
+
return this.alertService()
|
|
190
|
+
.alertHistory()
|
|
191
|
+
.filter((x) => x.isOpen).length;
|
|
190
192
|
}, ...(ngDevMode ? [{ debugName: "numberOfOpenAlerts" }] : []));
|
|
191
193
|
this.#e = effect(() => {
|
|
192
|
-
this.alertHistory();
|
|
193
|
-
this.alertHistoryIsOpen();
|
|
194
|
+
this.alertService().alertHistory();
|
|
195
|
+
this.alertService().alertHistoryIsOpen();
|
|
194
196
|
this.#scrollToBottom();
|
|
195
197
|
}, ...(ngDevMode ? [{ debugName: "#e" }] : []));
|
|
196
198
|
}
|
|
@@ -229,15 +231,17 @@ class ShipAlertContainerComponent {
|
|
|
229
231
|
return `translateY(calc(-${this.getElementHeight(i - 1)}px + (-10px * ${i})))`;
|
|
230
232
|
}
|
|
231
233
|
transitionDelay(i, allOpen = false) {
|
|
232
|
-
return allOpen
|
|
234
|
+
return allOpen
|
|
235
|
+
? this.alertService().alertHistory().length - 1 * 40 + 'ms'
|
|
236
|
+
: (this.numberOfOpenAlerts() - i) * 40 + 'ms';
|
|
233
237
|
}
|
|
234
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
235
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
238
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipAlertContainer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
239
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipAlertContainer, isStandalone: true, selector: "ship-alert-container", inputs: { inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, alertService: { classPropertyName: "alertService", publicName: "alertService", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "mouseover": "onMouseOver()", "mouseout": "onMouseOut()" } }, viewQueries: [{ propertyName: "alerts", first: true, predicate: ["alerts"], descendants: true, isSignal: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"scroller\" #scroller>\n <div class=\"container\">\n @for (alert of this.alertService().alertHistory(); track $index) {\n <sh-alert\n #alerts\n [class]=\"alert.type\"\n [id]=\"alert.id\"\n [alertService]=\"alertService()\"\n [style.transition-delay]=\"transitionDelay($index, true)\"\n [class.animate-in]=\"alert.animateIn\"\n [class.animate-out]=\"alert.animateOut\"\n [class.is-hidden]=\"this.alertService().alertHistoryIsHidden() && !alert.isOpen\">\n <div title>{{ alert.title }}</div>\n\n @if (alert.content) {\n <div content>\n {{ alert.content }}\n </div>\n }\n </sh-alert>\n }\n </div>\n</div>\n<div\n class=\"tray\"\n [class.tray-is-hidden]=\"!this.alertService().alertHistoryIsHidden()\"\n (mouseover)=\"this.onMouseOver()\"\n (mouseout)=\"this.onMouseOut()\">\n <sh-icon class=\"small\">info</sh-icon>\n</div>\n", dependencies: [{ kind: "component", type: ShipAlert, selector: "sh-alert", inputs: ["alertService", "id"] }, { kind: "component", type: ShipIcon, selector: "sh-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
236
240
|
}
|
|
237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipAlertContainer, decorators: [{
|
|
238
242
|
type: Component,
|
|
239
|
-
args: [{ selector: 'ship-alert-container', imports: [
|
|
240
|
-
}], propDecorators: { onMouseOver: [{
|
|
243
|
+
args: [{ selector: 'ship-alert-container', imports: [ShipAlert, ShipIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"scroller\" #scroller>\n <div class=\"container\">\n @for (alert of this.alertService().alertHistory(); track $index) {\n <sh-alert\n #alerts\n [class]=\"alert.type\"\n [id]=\"alert.id\"\n [alertService]=\"alertService()\"\n [style.transition-delay]=\"transitionDelay($index, true)\"\n [class.animate-in]=\"alert.animateIn\"\n [class.animate-out]=\"alert.animateOut\"\n [class.is-hidden]=\"this.alertService().alertHistoryIsHidden() && !alert.isOpen\">\n <div title>{{ alert.title }}</div>\n\n @if (alert.content) {\n <div content>\n {{ alert.content }}\n </div>\n }\n </sh-alert>\n }\n </div>\n</div>\n<div\n class=\"tray\"\n [class.tray-is-hidden]=\"!this.alertService().alertHistoryIsHidden()\"\n (mouseover)=\"this.onMouseOver()\"\n (mouseout)=\"this.onMouseOut()\">\n <sh-icon class=\"small\">info</sh-icon>\n</div>\n" }]
|
|
244
|
+
}], propDecorators: { inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], alerts: [{ type: i0.ViewChild, args: ['alerts', { isSignal: true }] }], scroller: [{ type: i0.ViewChild, args: ['scroller', { isSignal: true }] }], alertService: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertService", required: true }] }], onMouseOver: [{
|
|
241
245
|
type: HostListener,
|
|
242
246
|
args: ['mouseover']
|
|
243
247
|
}], onMouseOut: [{
|
|
@@ -246,15 +250,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
246
250
|
}] } });
|
|
247
251
|
|
|
248
252
|
class ShipAlertModule {
|
|
249
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
250
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
251
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
253
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
254
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.9", ngImport: i0, type: ShipAlertModule, imports: [ShipAlert, ShipAlertContainer], exports: [ShipAlert, ShipAlertContainer] }); }
|
|
255
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipAlertModule }); }
|
|
252
256
|
}
|
|
253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipAlertModule, decorators: [{
|
|
254
258
|
type: NgModule,
|
|
255
259
|
args: [{
|
|
256
|
-
imports: [
|
|
257
|
-
exports: [
|
|
260
|
+
imports: [ShipAlert, ShipAlertContainer],
|
|
261
|
+
exports: [ShipAlert, ShipAlertContainer],
|
|
258
262
|
providers: [],
|
|
259
263
|
}]
|
|
260
264
|
}] });
|
|
@@ -333,10 +337,10 @@ class ShipAlertService {
|
|
|
333
337
|
setHidden(isHidden) {
|
|
334
338
|
this.alertHistoryIsHidden.set(isHidden);
|
|
335
339
|
}
|
|
336
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
337
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
340
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
341
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipAlertService, providedIn: 'root' }); }
|
|
338
342
|
}
|
|
339
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipAlertService, decorators: [{
|
|
340
344
|
type: Injectable,
|
|
341
345
|
args: [{
|
|
342
346
|
providedIn: 'root',
|
|
@@ -353,7 +357,7 @@ const DEFAULT_OPTIONS$1 = {
|
|
|
353
357
|
closeOnEsc: true,
|
|
354
358
|
closeOnOutsideClick: true,
|
|
355
359
|
};
|
|
356
|
-
class
|
|
360
|
+
class ShipDialog {
|
|
357
361
|
constructor() {
|
|
358
362
|
this.#document = inject(DOCUMENT);
|
|
359
363
|
this.#shConfig = inject(SHIP_CONFIG, { optional: true });
|
|
@@ -405,8 +409,8 @@ class ShipDialogComponent {
|
|
|
405
409
|
ngOnDestroy() {
|
|
406
410
|
this.abortController?.abort();
|
|
407
411
|
}
|
|
408
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
409
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
412
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipDialog, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
413
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipDialog, isStandalone: true, selector: "sh-dialog", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange", closed: "closed" }, viewQueries: [{ propertyName: "dialogRef", first: true, predicate: ["dialogRef"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
410
414
|
@let options = this.defaultOptionMerge();
|
|
411
415
|
|
|
412
416
|
@if (isOpen()) {
|
|
@@ -429,7 +433,7 @@ class ShipDialogComponent {
|
|
|
429
433
|
}
|
|
430
434
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
431
435
|
}
|
|
432
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipDialog, decorators: [{
|
|
433
437
|
type: Component,
|
|
434
438
|
args: [{
|
|
435
439
|
selector: 'sh-dialog',
|
|
@@ -458,7 +462,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
458
462
|
`,
|
|
459
463
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
460
464
|
}]
|
|
461
|
-
}] });
|
|
465
|
+
}], propDecorators: { dialogRef: [{ type: i0.ViewChild, args: ['dialogRef', { isSignal: true }] }], isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
462
466
|
|
|
463
467
|
class ShipDialogService {
|
|
464
468
|
constructor() {
|
|
@@ -484,7 +488,7 @@ class ShipDialogService {
|
|
|
484
488
|
this.insertedCompRef = createComponent(component, {
|
|
485
489
|
environmentInjector,
|
|
486
490
|
});
|
|
487
|
-
this.compRef = createComponent(
|
|
491
|
+
this.compRef = createComponent(ShipDialog, {
|
|
488
492
|
hostElement,
|
|
489
493
|
environmentInjector,
|
|
490
494
|
projectableNodes: [[this.insertedCompRef.location.nativeElement]],
|
|
@@ -560,10 +564,10 @@ class ShipDialogService {
|
|
|
560
564
|
ngOnDestroy() {
|
|
561
565
|
this.#cleanupRefs(true);
|
|
562
566
|
}
|
|
563
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
564
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
567
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
568
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipDialogService, providedIn: 'root' }); }
|
|
565
569
|
}
|
|
566
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipDialogService, decorators: [{
|
|
567
571
|
type: Injectable,
|
|
568
572
|
args: [{
|
|
569
573
|
providedIn: 'root',
|
|
@@ -754,7 +758,7 @@ const TEST_NODES = [
|
|
|
754
758
|
connections: [{ fromNode: 'b1', fromPort: 'out-1', toNode: 'c6', toPort: 'in-1' }],
|
|
755
759
|
},
|
|
756
760
|
];
|
|
757
|
-
class
|
|
761
|
+
class ShipBlueprint {
|
|
758
762
|
#ZOOM_SPEED;
|
|
759
763
|
#MAX_ZOOM;
|
|
760
764
|
#MIN_ZOOM;
|
|
@@ -1477,8 +1481,8 @@ class ShipBlueprintComponent {
|
|
|
1477
1481
|
#clamp(value, min, max) {
|
|
1478
1482
|
return Math.max(min, Math.min(max, value));
|
|
1479
1483
|
}
|
|
1480
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1481
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
1484
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipBlueprint, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1485
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipBlueprint, isStandalone: true, selector: "sh-blueprint", inputs: { forceUnique: { classPropertyName: "forceUnique", publicName: "forceUnique", isSignal: true, isRequired: false, transformFunction: null }, autoLayout: { classPropertyName: "autoLayout", publicName: "autoLayout", isSignal: true, isRequired: false, transformFunction: null }, gridSize: { classPropertyName: "gridSize", publicName: "gridSize", isSignal: true, isRequired: false, transformFunction: null }, snapToGrid: { classPropertyName: "snapToGrid", publicName: "snapToGrid", isSignal: true, isRequired: false, transformFunction: null }, gridColor: { classPropertyName: "gridColor", publicName: "gridColor", isSignal: true, isRequired: false, transformFunction: null }, nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodes: "nodesChange" }, host: { listeners: { "document:mouseup": "onMouseUp($event)", "document:click": "onClick($event)", "document:keydown.escape": "onEscape($event)", "document:mousemove": "onMouseMove($event)", "document:touchmove": "onTouchMove($event)", "document:touchend": "onDocumentTouchEnd($event)" } }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["blueprintCanvas"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1482
1486
|
<div
|
|
1483
1487
|
class="canvas-container"
|
|
1484
1488
|
[class.locked]="isLocked()"
|
|
@@ -1564,13 +1568,13 @@ class ShipBlueprintComponent {
|
|
|
1564
1568
|
</div>
|
|
1565
1569
|
}
|
|
1566
1570
|
</div>
|
|
1567
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
1571
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ShipCard, selector: "sh-card" }, { kind: "component", type: ShipIcon, selector: "sh-icon" }, { kind: "component", type: ShipButton, selector: "[shButton]" }, { kind: "pipe", type: JsonPipe, name: "json" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1568
1572
|
}
|
|
1569
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipBlueprint, decorators: [{
|
|
1570
1574
|
type: Component,
|
|
1571
1575
|
args: [{
|
|
1572
1576
|
selector: 'sh-blueprint',
|
|
1573
|
-
imports: [
|
|
1577
|
+
imports: [ShipCard, ShipIcon, JsonPipe, ShipButton],
|
|
1574
1578
|
template: `
|
|
1575
1579
|
<div
|
|
1576
1580
|
class="canvas-container"
|
|
@@ -1660,7 +1664,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1660
1664
|
`,
|
|
1661
1665
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1662
1666
|
}]
|
|
1663
|
-
}], ctorParameters: () => [], propDecorators: { canvasRef: [{
|
|
1667
|
+
}], ctorParameters: () => [], propDecorators: { forceUnique: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceUnique", required: false }] }], autoLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoLayout", required: false }] }], gridSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridSize", required: false }] }], snapToGrid: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapToGrid", required: false }] }], gridColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridColor", required: false }] }], nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: false }] }, { type: i0.Output, args: ["nodesChange"] }], canvasRef: [{
|
|
1664
1668
|
type: ViewChild,
|
|
1665
1669
|
args: ['blueprintCanvas', { static: true }]
|
|
1666
1670
|
}], onMouseUp: [{
|
|
@@ -1683,16 +1687,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1683
1687
|
args: ['document:touchend', ['$event']]
|
|
1684
1688
|
}] } });
|
|
1685
1689
|
|
|
1686
|
-
class
|
|
1690
|
+
class ShipButtonGroup {
|
|
1687
1691
|
constructor() {
|
|
1688
1692
|
this.id = '--' + Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 12);
|
|
1689
1693
|
}
|
|
1690
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1691
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
1694
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipButtonGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1695
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipButtonGroup, isStandalone: true, selector: "sh-button-group", host: { properties: { "style.--btng-id": "id" } }, ngImport: i0, template: `
|
|
1692
1696
|
<ng-content />
|
|
1693
1697
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1694
1698
|
}
|
|
1695
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipButtonGroup, decorators: [{
|
|
1696
1700
|
type: Component,
|
|
1697
1701
|
args: [{
|
|
1698
1702
|
selector: 'sh-button-group',
|
|
@@ -1707,11 +1711,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1707
1711
|
}]
|
|
1708
1712
|
}] });
|
|
1709
1713
|
|
|
1710
|
-
class
|
|
1711
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1712
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
1714
|
+
class ShipButton {
|
|
1715
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1716
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipButton, isStandalone: true, selector: "[shButton]", host: { classAttribute: "sh-sheet-h" }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1713
1717
|
}
|
|
1714
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipButton, decorators: [{
|
|
1715
1719
|
type: Component,
|
|
1716
1720
|
args: [{
|
|
1717
1721
|
selector: '[shButton]',
|
|
@@ -1724,18 +1728,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1724
1728
|
}]
|
|
1725
1729
|
}] });
|
|
1726
1730
|
|
|
1727
|
-
class
|
|
1731
|
+
class ShipCard {
|
|
1728
1732
|
constructor() {
|
|
1729
1733
|
this.#shConfig = inject(SHIP_CONFIG, { optional: true });
|
|
1730
1734
|
this.class = signal(this.#shConfig?.cardType ?? 'type-a', ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
1731
1735
|
}
|
|
1732
1736
|
#shConfig;
|
|
1733
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1734
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
1737
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipCard, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1738
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipCard, isStandalone: true, selector: "sh-card", host: { properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
1735
1739
|
<ng-content />
|
|
1736
1740
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1737
1741
|
}
|
|
1738
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipCard, decorators: [{
|
|
1739
1743
|
type: Component,
|
|
1740
1744
|
args: [{
|
|
1741
1745
|
selector: 'sh-card',
|
|
@@ -1750,12 +1754,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1750
1754
|
}]
|
|
1751
1755
|
}] });
|
|
1752
1756
|
|
|
1753
|
-
class
|
|
1757
|
+
class ShipCheckbox {
|
|
1754
1758
|
constructor() {
|
|
1755
1759
|
this.currentClassList = classMutationSignal();
|
|
1756
1760
|
}
|
|
1757
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1758
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
1761
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1762
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipCheckbox, isStandalone: true, selector: "sh-checkbox", ngImport: i0, template: `
|
|
1759
1763
|
<div class="box sh-sheet" [class]="currentClassList()">
|
|
1760
1764
|
<sh-icon class="inherit default-indicator">check-bold</sh-icon>
|
|
1761
1765
|
<sh-icon class="inherit indeterminate-indicator">minus-bold</sh-icon>
|
|
@@ -1764,13 +1768,13 @@ class ShipCheckboxComponent {
|
|
|
1764
1768
|
<div class="label">
|
|
1765
1769
|
<ng-content />
|
|
1766
1770
|
</div>
|
|
1767
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
1771
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ShipIcon, selector: "sh-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1768
1772
|
}
|
|
1769
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1773
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipCheckbox, decorators: [{
|
|
1770
1774
|
type: Component,
|
|
1771
1775
|
args: [{
|
|
1772
1776
|
selector: 'sh-checkbox',
|
|
1773
|
-
imports: [
|
|
1777
|
+
imports: [ShipIcon],
|
|
1774
1778
|
template: `
|
|
1775
1779
|
<div class="box sh-sheet" [class]="currentClassList()">
|
|
1776
1780
|
<sh-icon class="inherit default-indicator">check-bold</sh-icon>
|
|
@@ -1785,11 +1789,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1785
1789
|
}]
|
|
1786
1790
|
}] });
|
|
1787
1791
|
|
|
1788
|
-
class
|
|
1789
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1790
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
1792
|
+
class ShipChip {
|
|
1793
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipChip, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1794
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipChip, isStandalone: true, selector: "sh-chip", host: { classAttribute: "sh-sheet" }, ngImport: i0, template: '<div><ng-content /></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1791
1795
|
}
|
|
1792
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1796
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipChip, decorators: [{
|
|
1793
1797
|
type: Component,
|
|
1794
1798
|
args: [{
|
|
1795
1799
|
selector: 'sh-chip',
|
|
@@ -1805,7 +1809,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1805
1809
|
// TODOS
|
|
1806
1810
|
// - Add a color picker input
|
|
1807
1811
|
// - Add alpha support
|
|
1808
|
-
class
|
|
1812
|
+
class ShipColorPicker {
|
|
1809
1813
|
constructor() {
|
|
1810
1814
|
this.#document = inject(DOCUMENT);
|
|
1811
1815
|
this.canvasRef = viewChild.required('colorCanvas');
|
|
@@ -2116,8 +2120,8 @@ class ShipColorPickerComponent {
|
|
|
2116
2120
|
}
|
|
2117
2121
|
return `hsl(${Math.floor(h * 360)}, ${Math.round(s * 100)}%, ${Math.round(l * 100)}%)`;
|
|
2118
2122
|
}
|
|
2119
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2120
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.
|
|
2123
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipColorPicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2124
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.9", type: ShipColorPicker, isStandalone: true, selector: "sh-color-picker", inputs: { showDarkColors: { classPropertyName: "showDarkColors", publicName: "showDarkColors", isSignal: true, isRequired: false, transformFunction: null }, renderingType: { classPropertyName: "renderingType", publicName: "renderingType", isSignal: true, isRequired: false, transformFunction: null }, gridSize: { classPropertyName: "gridSize", publicName: "gridSize", isSignal: true, isRequired: false, transformFunction: null }, hue: { classPropertyName: "hue", publicName: "hue", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, selectedColor: { classPropertyName: "selectedColor", publicName: "selectedColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedColor: "selectedColorChange", currentColor: "currentColor" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "class": "renderingType()", "class.vertical": "(renderingType() === \"hue\" || renderingType() === \"saturation\") && direction() === \"vertical\"" } }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["colorCanvas"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2121
2125
|
<canvas #colorCanvas></canvas>
|
|
2122
2126
|
<div
|
|
2123
2127
|
class="marker"
|
|
@@ -2126,7 +2130,7 @@ class ShipColorPickerComponent {
|
|
|
2126
2130
|
[style.background]="selectedColorRgb()"></div>
|
|
2127
2131
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2128
2132
|
}
|
|
2129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipColorPicker, decorators: [{
|
|
2130
2134
|
type: Component,
|
|
2131
2135
|
args: [{
|
|
2132
2136
|
selector: 'sh-color-picker',
|
|
@@ -2145,311 +2149,594 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
2145
2149
|
'[class.vertical]': '(renderingType() === "hue" || renderingType() === "saturation") && direction() === "vertical"',
|
|
2146
2150
|
},
|
|
2147
2151
|
}]
|
|
2148
|
-
}], propDecorators: { onResize: [{
|
|
2152
|
+
}], propDecorators: { canvasRef: [{ type: i0.ViewChild, args: ['colorCanvas', { isSignal: true }] }], showDarkColors: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDarkColors", required: false }] }], renderingType: [{ type: i0.Input, args: [{ isSignal: true, alias: "renderingType", required: false }] }], gridSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridSize", required: false }] }], hue: [{ type: i0.Input, args: [{ isSignal: true, alias: "hue", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], selectedColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedColor", required: false }] }, { type: i0.Output, args: ["selectedColorChange"] }], currentColor: [{ type: i0.Output, args: ["currentColor"] }], onResize: [{
|
|
2149
2153
|
type: HostListener,
|
|
2150
2154
|
args: ['window:resize', ['$event']]
|
|
2151
2155
|
}] } });
|
|
2152
2156
|
|
|
2153
|
-
|
|
2154
|
-
const SCROLLABLE_STYLES = ['scroll', 'auto'];
|
|
2155
|
-
const DEFAULT_OPTIONS = {
|
|
2156
|
-
width: undefined,
|
|
2157
|
-
height: undefined,
|
|
2158
|
-
closeOnButton: true,
|
|
2159
|
-
closeOnEsc: true,
|
|
2160
|
-
};
|
|
2161
|
-
class ShipPopoverComponent {
|
|
2157
|
+
class ShipDatepicker {
|
|
2162
2158
|
constructor() {
|
|
2163
|
-
this.#
|
|
2164
|
-
this.
|
|
2165
|
-
this.
|
|
2166
|
-
this.
|
|
2167
|
-
this.
|
|
2168
|
-
this.
|
|
2169
|
-
this.
|
|
2170
|
-
this.
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
this.
|
|
2177
|
-
this.
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
}
|
|
2193
|
-
this.openAbort = new AbortController();
|
|
2194
|
-
this.#document.addEventListener('keydown', (e) => {
|
|
2195
|
-
if (e.key === 'Escape' && !this.defaultOptionMerge().closeOnEsc) {
|
|
2196
|
-
e.preventDefault();
|
|
2197
|
-
}
|
|
2198
|
-
if (e.key === 'Escape' && this.defaultOptionMerge().closeOnEsc) {
|
|
2199
|
-
this.isOpen.set(false);
|
|
2200
|
-
}
|
|
2201
|
-
}, {
|
|
2202
|
-
signal: this.openAbort?.signal,
|
|
2203
|
-
});
|
|
2204
|
-
popoverEl.showPopover();
|
|
2205
|
-
if (!this.SUPPORTS_ANCHOR) {
|
|
2206
|
-
setTimeout(() => {
|
|
2207
|
-
const scrollableParent = this.#findScrollableParent(popoverEl);
|
|
2208
|
-
scrollableParent.addEventListener('scroll', () => this.#calculateMenuPosition(), {
|
|
2209
|
-
signal: this.openAbort?.signal,
|
|
2210
|
-
});
|
|
2211
|
-
window?.addEventListener('resize', () => this.#calculateMenuPosition(), {
|
|
2212
|
-
signal: this.openAbort?.signal,
|
|
2213
|
-
});
|
|
2214
|
-
this.#calculateMenuPosition();
|
|
2215
|
-
});
|
|
2216
|
-
}
|
|
2217
|
-
}
|
|
2218
|
-
else {
|
|
2219
|
-
this.closed.emit();
|
|
2220
|
-
this.openAbort?.abort();
|
|
2221
|
-
this.openAbort = null;
|
|
2222
|
-
}
|
|
2223
|
-
});
|
|
2224
|
-
}, ...(ngDevMode ? [{ debugName: "openEffect" }] : []));
|
|
2159
|
+
this.#INIT_DATE = this.#getUTCDate(new Date());
|
|
2160
|
+
this.date = model(null, ...(ngDevMode ? [{ debugName: "date" }] : []));
|
|
2161
|
+
this.endDate = model(null, ...(ngDevMode ? [{ debugName: "endDate" }] : []));
|
|
2162
|
+
this.asRange = input(false, ...(ngDevMode ? [{ debugName: "asRange" }] : []));
|
|
2163
|
+
this.monthsToShow = input(1, ...(ngDevMode ? [{ debugName: "monthsToShow" }] : []));
|
|
2164
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
2165
|
+
this.startOfWeek = input(1, ...(ngDevMode ? [{ debugName: "startOfWeek" }] : []));
|
|
2166
|
+
this.weekdayLabels = input(['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], ...(ngDevMode ? [{ debugName: "weekdayLabels" }] : []));
|
|
2167
|
+
this.daysRef = viewChild('daysRef', ...(ngDevMode ? [{ debugName: "daysRef" }] : []));
|
|
2168
|
+
this.currentDate = signal(this.date() ?? this.#INIT_DATE, ...(ngDevMode ? [{ debugName: "currentDate" }] : []));
|
|
2169
|
+
this.monthOffsets = computed(() => {
|
|
2170
|
+
return Array.from({ length: this.monthsToShow() }, (_, i) => i);
|
|
2171
|
+
}, ...(ngDevMode ? [{ debugName: "monthOffsets" }] : []));
|
|
2172
|
+
this.selectedDateStylePosition = signal(null, ...(ngDevMode ? [{ debugName: "selectedDateStylePosition" }] : []));
|
|
2173
|
+
this.weekdays = computed(() => {
|
|
2174
|
+
const startOfWeek = this.startOfWeek();
|
|
2175
|
+
const weekdayLabels = this.weekdayLabels();
|
|
2176
|
+
return weekdayLabels.slice(startOfWeek).concat(weekdayLabels.slice(0, startOfWeek));
|
|
2177
|
+
}, ...(ngDevMode ? [{ debugName: "weekdays" }] : []));
|
|
2178
|
+
this.currentClasses = classMutationSignal();
|
|
2179
|
+
this.someEffect = effect(() => {
|
|
2180
|
+
const _ = this.currentClasses();
|
|
2181
|
+
this.#findSelectedAndCalc();
|
|
2182
|
+
}, ...(ngDevMode ? [{ debugName: "someEffect" }] : []));
|
|
2183
|
+
this.#newDateEffect = effect(() => {
|
|
2184
|
+
if (this.monthsToShow() > 1)
|
|
2185
|
+
return;
|
|
2186
|
+
this.#setDateAsCurrent();
|
|
2187
|
+
}, ...(ngDevMode ? [{ debugName: "#newDateEffect" }] : []));
|
|
2225
2188
|
}
|
|
2226
|
-
#
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
event.stopPropagation();
|
|
2231
|
-
this.isOpen.set(!this.isOpen());
|
|
2232
|
-
}
|
|
2189
|
+
#INIT_DATE;
|
|
2190
|
+
getLastVisibleMonth() {
|
|
2191
|
+
const lastMonthOffset = this.monthsToShow() - 1;
|
|
2192
|
+
return this.getOffsetDate(lastMonthOffset);
|
|
2233
2193
|
}
|
|
2234
|
-
|
|
2235
|
-
|
|
2194
|
+
getOffsetDate(monthOffset) {
|
|
2195
|
+
const date = new Date(this.currentDate());
|
|
2196
|
+
date.setMonth(date.getMonth() + monthOffset);
|
|
2197
|
+
return date;
|
|
2198
|
+
}
|
|
2199
|
+
getMonthDates(monthOffset) {
|
|
2200
|
+
const offsetDate = this.getOffsetDate(monthOffset);
|
|
2201
|
+
return this.#generateMonthDates(offsetDate, this.startOfWeek());
|
|
2202
|
+
}
|
|
2203
|
+
#newDateEffect;
|
|
2204
|
+
ngOnInit() {
|
|
2205
|
+
if (this.monthsToShow() === 1)
|
|
2236
2206
|
return;
|
|
2237
|
-
this
|
|
2207
|
+
this.#setDateAsCurrent();
|
|
2238
2208
|
}
|
|
2239
|
-
#
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2209
|
+
#setDateAsCurrent() {
|
|
2210
|
+
const newDate = this.date();
|
|
2211
|
+
if (newDate)
|
|
2212
|
+
this.currentDate.set(newDate);
|
|
2213
|
+
this.#findSelectedAndCalc();
|
|
2214
|
+
}
|
|
2215
|
+
#findSelectedAndCalc() {
|
|
2216
|
+
setTimeout(() => {
|
|
2217
|
+
const selectedElement = this.daysRef()?.nativeElement.querySelector('.sel');
|
|
2218
|
+
if (!selectedElement) {
|
|
2219
|
+
return this.selectedDateStylePosition.update((x) => (x ? { ...x, opacity: '0' } : null));
|
|
2245
2220
|
}
|
|
2246
|
-
|
|
2221
|
+
this.setSelectedDateStylePosition(selectedElement);
|
|
2222
|
+
});
|
|
2223
|
+
}
|
|
2224
|
+
#generateMonthDates(date, startOfWeek) {
|
|
2225
|
+
const year = date.getUTCFullYear();
|
|
2226
|
+
const month = date.getUTCMonth();
|
|
2227
|
+
const firstDay = new Date(Date.UTC(year, month)).getUTCDay();
|
|
2228
|
+
const daysInMonth = 32 - new Date(Date.UTC(year, month, 32)).getUTCDate();
|
|
2229
|
+
const dates = [];
|
|
2230
|
+
let offset = firstDay - startOfWeek;
|
|
2231
|
+
if (offset < 0) {
|
|
2232
|
+
offset += 7;
|
|
2247
2233
|
}
|
|
2248
|
-
|
|
2234
|
+
const lastDayOfPrevMonth = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
2235
|
+
for (let i = offset - 1; i >= 0; i--) {
|
|
2236
|
+
const prevMonthDate = new Date(Date.UTC(year, month - 1, lastDayOfPrevMonth - i));
|
|
2237
|
+
dates.push(prevMonthDate);
|
|
2238
|
+
}
|
|
2239
|
+
for (let i = 1; i <= daysInMonth; i++) {
|
|
2240
|
+
dates.push(new Date(Date.UTC(year, month, i)));
|
|
2241
|
+
}
|
|
2242
|
+
let nextMonthDay = 1;
|
|
2243
|
+
while (dates.length % 7 !== 0) {
|
|
2244
|
+
dates.push(new Date(Date.UTC(year, month + 1, nextMonthDay++)));
|
|
2245
|
+
}
|
|
2246
|
+
return dates;
|
|
2249
2247
|
}
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2248
|
+
nextMonth() {
|
|
2249
|
+
this.currentDate.update((currentDate) => {
|
|
2250
|
+
const newDate = new Date(currentDate);
|
|
2251
|
+
newDate.setMonth(currentDate.getMonth() + 1);
|
|
2252
|
+
return newDate;
|
|
2253
|
+
});
|
|
2254
|
+
this.#findSelectedAndCalc();
|
|
2257
2255
|
}
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2256
|
+
previousMonth() {
|
|
2257
|
+
this.currentDate.update((currentDate) => {
|
|
2258
|
+
const newDate = new Date(currentDate);
|
|
2259
|
+
newDate.setMonth(currentDate.getMonth() - 1);
|
|
2260
|
+
return newDate;
|
|
2261
|
+
});
|
|
2262
|
+
this.#findSelectedAndCalc();
|
|
2265
2263
|
}
|
|
2266
|
-
|
|
2267
|
-
const
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2264
|
+
setDate(newDate, selectedElement) {
|
|
2265
|
+
const createDateWithExistingTime = (newDate, existingDate) => {
|
|
2266
|
+
const hours = existingDate?.getUTCHours() ?? 0;
|
|
2267
|
+
const minutes = existingDate?.getUTCMinutes() ?? 0;
|
|
2268
|
+
const seconds = existingDate?.getUTCSeconds() ?? 0;
|
|
2269
|
+
const milliseconds = existingDate?.getUTCMilliseconds() ?? 0;
|
|
2270
|
+
return this.#getUTCDate(new Date(Date.UTC(newDate.getUTCFullYear(), newDate.getUTCMonth(), newDate.getUTCDate(), hours, minutes, seconds, milliseconds)));
|
|
2272
2271
|
};
|
|
2272
|
+
if (!this.asRange()) {
|
|
2273
|
+
this.date.set(createDateWithExistingTime(newDate, this.date()));
|
|
2274
|
+
this.endDate.set(null);
|
|
2275
|
+
}
|
|
2276
|
+
else {
|
|
2277
|
+
const startDate = this.date();
|
|
2278
|
+
const endDate = this.endDate();
|
|
2279
|
+
const utcDate = createDateWithExistingTime(newDate, null);
|
|
2280
|
+
if (!startDate) {
|
|
2281
|
+
this.date.set(utcDate);
|
|
2282
|
+
}
|
|
2283
|
+
else if (!endDate) {
|
|
2284
|
+
if (utcDate < startDate) {
|
|
2285
|
+
this.date.set(utcDate);
|
|
2286
|
+
this.endDate.set(null);
|
|
2287
|
+
}
|
|
2288
|
+
else {
|
|
2289
|
+
this.endDate.set(utcDate);
|
|
2290
|
+
}
|
|
2291
|
+
}
|
|
2292
|
+
else {
|
|
2293
|
+
this.date.set(utcDate);
|
|
2294
|
+
this.endDate.set(null);
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2297
|
+
if (this.asRange())
|
|
2298
|
+
return;
|
|
2299
|
+
this.setSelectedDateStylePosition(selectedElement);
|
|
2273
2300
|
}
|
|
2274
|
-
|
|
2275
|
-
const
|
|
2276
|
-
const
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2301
|
+
isDateSelected(date) {
|
|
2302
|
+
const startDate = this.date();
|
|
2303
|
+
const endDate = this.endDate();
|
|
2304
|
+
if (startDate === null)
|
|
2305
|
+
return null;
|
|
2306
|
+
const startOfDay = (date) => {
|
|
2307
|
+
return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0, 0));
|
|
2280
2308
|
};
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
const
|
|
2285
|
-
const
|
|
2286
|
-
const
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2309
|
+
const endOfDay = (date) => {
|
|
2310
|
+
return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 23, 59, 59, 999));
|
|
2311
|
+
};
|
|
2312
|
+
const currentDate = startOfDay(date);
|
|
2313
|
+
const rangeStart = startOfDay(startDate);
|
|
2314
|
+
const rangeEnd = endDate ? endOfDay(endDate) : null;
|
|
2315
|
+
let classes = [];
|
|
2316
|
+
if (this.asRange()) {
|
|
2317
|
+
if (rangeEnd === null) {
|
|
2318
|
+
if (currentDate.getTime() === rangeStart.getTime()) {
|
|
2319
|
+
classes.push('sel first last');
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
else {
|
|
2323
|
+
if (currentDate.getTime() === rangeStart.getTime()) {
|
|
2324
|
+
classes.push('first');
|
|
2325
|
+
}
|
|
2326
|
+
if (currentDate.getTime() === startOfDay(rangeEnd).getTime()) {
|
|
2327
|
+
classes.push('last');
|
|
2328
|
+
}
|
|
2329
|
+
if (currentDate >= rangeStart && currentDate <= rangeEnd) {
|
|
2330
|
+
classes.push('sel');
|
|
2331
|
+
const dayOfWeek = currentDate.getUTCDay();
|
|
2332
|
+
const startOfWeek = this.startOfWeek();
|
|
2333
|
+
if (dayOfWeek === startOfWeek) {
|
|
2334
|
+
classes.push('week-start');
|
|
2335
|
+
}
|
|
2336
|
+
const endOfWeek = (startOfWeek + 6) % 7;
|
|
2337
|
+
if (dayOfWeek === endOfWeek) {
|
|
2338
|
+
classes.push('week-end');
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2341
|
+
const nextDate = new Date(currentDate);
|
|
2342
|
+
nextDate.setUTCDate(currentDate.getUTCDate() + 1);
|
|
2343
|
+
const prevDate = new Date(currentDate);
|
|
2344
|
+
prevDate.setUTCDate(currentDate.getUTCDate() - 1);
|
|
2345
|
+
const isFirstOfMonth = currentDate.getUTCDate() === 1;
|
|
2346
|
+
const isLastOfMonth = nextDate.getUTCMonth() !== currentDate.getUTCMonth();
|
|
2347
|
+
if (isFirstOfMonth) {
|
|
2348
|
+
classes.push('month-start');
|
|
2349
|
+
}
|
|
2350
|
+
if (isLastOfMonth) {
|
|
2351
|
+
classes.push('month-end');
|
|
2352
|
+
}
|
|
2298
2353
|
}
|
|
2299
2354
|
}
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2355
|
+
else {
|
|
2356
|
+
if (currentDate.getTime() === rangeStart.getTime()) {
|
|
2357
|
+
classes.push('sel');
|
|
2358
|
+
}
|
|
2359
|
+
}
|
|
2360
|
+
return classes.join(' ') || null;
|
|
2361
|
+
}
|
|
2362
|
+
setSelectedDateStylePosition(selectedElement) {
|
|
2363
|
+
this.selectedDateStylePosition.set({
|
|
2364
|
+
transform: `translate(${selectedElement.offsetLeft}px, ${selectedElement.offsetTop}px)`,
|
|
2365
|
+
opacity: '1',
|
|
2304
2366
|
});
|
|
2305
2367
|
}
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
this.openAbort = null;
|
|
2368
|
+
getMonthName(date) {
|
|
2369
|
+
return date.toLocaleString('default', { month: 'long' });
|
|
2309
2370
|
}
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2371
|
+
getFullYear(date) {
|
|
2372
|
+
return date.getFullYear();
|
|
2373
|
+
}
|
|
2374
|
+
// Rest of the component methods remain the same, but update isCurrentMonth:
|
|
2375
|
+
isCurrentMonth(date, monthOffset) {
|
|
2376
|
+
const offsetDate = this.getOffsetDate(monthOffset);
|
|
2377
|
+
return date.getMonth() === offsetDate.getMonth();
|
|
2378
|
+
}
|
|
2379
|
+
#getUTCDate(date) {
|
|
2380
|
+
const offsetMinutes = date.getTimezoneOffset();
|
|
2381
|
+
const timeDiffMillis = offsetMinutes * 60 * 1000;
|
|
2382
|
+
return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()) + timeDiffMillis);
|
|
2383
|
+
}
|
|
2384
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipDatepicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2385
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipDatepicker, isStandalone: true, selector: "sh-datepicker", inputs: { date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, endDate: { classPropertyName: "endDate", publicName: "endDate", isSignal: true, isRequired: false, transformFunction: null }, asRange: { classPropertyName: "asRange", publicName: "asRange", isSignal: true, isRequired: false, transformFunction: null }, monthsToShow: { classPropertyName: "monthsToShow", publicName: "monthsToShow", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, startOfWeek: { classPropertyName: "startOfWeek", publicName: "startOfWeek", isSignal: true, isRequired: false, transformFunction: null }, weekdayLabels: { classPropertyName: "weekdayLabels", publicName: "weekdayLabels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { date: "dateChange", endDate: "endDateChange" }, host: { properties: { "class.as-range": "asRange()", "class": "\"columns-\" + monthsToShow()", "class.disabled": "disabled()" } }, viewQueries: [{ propertyName: "daysRef", first: true, predicate: ["daysRef"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2386
|
+
<header>
|
|
2387
|
+
<button (click)="previousMonth()"><sh-icon>caret-left</sh-icon></button>
|
|
2388
|
+
<div class="title">
|
|
2389
|
+
{{ getMonthName(currentDate()!) }}
|
|
2390
|
+
@if (monthsToShow() > 1) {
|
|
2391
|
+
- {{ getMonthName(getLastVisibleMonth()) }}
|
|
2392
|
+
}
|
|
2393
|
+
{{ getFullYear(currentDate()!) }}
|
|
2317
2394
|
</div>
|
|
2318
|
-
<
|
|
2319
|
-
</
|
|
2395
|
+
<button (click)="nextMonth()"><sh-icon>caret-right</sh-icon></button>
|
|
2396
|
+
</header>
|
|
2320
2397
|
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
<div class="
|
|
2324
|
-
|
|
2325
|
-
|
|
2398
|
+
<section class="months-container">
|
|
2399
|
+
@for (monthOffset of monthOffsets(); track monthOffset) {
|
|
2400
|
+
<div class="month">
|
|
2401
|
+
<nav class="weekdays">
|
|
2402
|
+
@for (day of weekdays(); track $index) {
|
|
2403
|
+
<div>{{ day }}</div>
|
|
2404
|
+
}
|
|
2405
|
+
</nav>
|
|
2406
|
+
|
|
2407
|
+
<div class="days" #daysRef>
|
|
2408
|
+
@for (calDate of getMonthDates(monthOffset); track $index) {
|
|
2409
|
+
<div
|
|
2410
|
+
#elementRef
|
|
2411
|
+
[class.out-of-scope]="!isCurrentMonth(calDate, monthOffset)"
|
|
2412
|
+
[class]="isDateSelected(calDate)"
|
|
2413
|
+
(click)="setDate(calDate, elementRef)">
|
|
2414
|
+
{{ calDate.getDate() }}
|
|
2415
|
+
</div>
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
@if (!asRange()) {
|
|
2419
|
+
<article class="days">
|
|
2420
|
+
<div class="sel-el" [style]="selectedDateStylePosition()"></div>
|
|
2421
|
+
</article>
|
|
2422
|
+
}
|
|
2423
|
+
</div>
|
|
2326
2424
|
</div>
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2425
|
+
}
|
|
2426
|
+
</section>
|
|
2427
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ShipIcon, selector: "sh-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2330
2428
|
}
|
|
2331
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipDatepicker, decorators: [{
|
|
2332
2430
|
type: Component,
|
|
2333
2431
|
args: [{
|
|
2334
|
-
selector: 'sh-
|
|
2335
|
-
imports: [],
|
|
2432
|
+
selector: 'sh-datepicker',
|
|
2433
|
+
imports: [ShipIcon],
|
|
2336
2434
|
template: `
|
|
2337
|
-
<
|
|
2338
|
-
<
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2435
|
+
<header>
|
|
2436
|
+
<button (click)="previousMonth()"><sh-icon>caret-left</sh-icon></button>
|
|
2437
|
+
<div class="title">
|
|
2438
|
+
{{ getMonthName(currentDate()!) }}
|
|
2439
|
+
@if (monthsToShow() > 1) {
|
|
2440
|
+
- {{ getMonthName(getLastVisibleMonth()) }}
|
|
2441
|
+
}
|
|
2442
|
+
{{ getFullYear(currentDate()!) }}
|
|
2342
2443
|
</div>
|
|
2343
|
-
<
|
|
2344
|
-
</
|
|
2444
|
+
<button (click)="nextMonth()"><sh-icon>caret-right</sh-icon></button>
|
|
2445
|
+
</header>
|
|
2345
2446
|
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
<div class="
|
|
2349
|
-
|
|
2350
|
-
|
|
2447
|
+
<section class="months-container">
|
|
2448
|
+
@for (monthOffset of monthOffsets(); track monthOffset) {
|
|
2449
|
+
<div class="month">
|
|
2450
|
+
<nav class="weekdays">
|
|
2451
|
+
@for (day of weekdays(); track $index) {
|
|
2452
|
+
<div>{{ day }}</div>
|
|
2453
|
+
}
|
|
2454
|
+
</nav>
|
|
2455
|
+
|
|
2456
|
+
<div class="days" #daysRef>
|
|
2457
|
+
@for (calDate of getMonthDates(monthOffset); track $index) {
|
|
2458
|
+
<div
|
|
2459
|
+
#elementRef
|
|
2460
|
+
[class.out-of-scope]="!isCurrentMonth(calDate, monthOffset)"
|
|
2461
|
+
[class]="isDateSelected(calDate)"
|
|
2462
|
+
(click)="setDate(calDate, elementRef)">
|
|
2463
|
+
{{ calDate.getDate() }}
|
|
2464
|
+
</div>
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
@if (!asRange()) {
|
|
2468
|
+
<article class="days">
|
|
2469
|
+
<div class="sel-el" [style]="selectedDateStylePosition()"></div>
|
|
2470
|
+
</article>
|
|
2471
|
+
}
|
|
2472
|
+
</div>
|
|
2351
2473
|
</div>
|
|
2352
|
-
|
|
2353
|
-
|
|
2474
|
+
}
|
|
2475
|
+
</section>
|
|
2354
2476
|
`,
|
|
2355
2477
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2356
2478
|
host: {
|
|
2357
|
-
'[class.
|
|
2479
|
+
'[class.as-range]': 'asRange()',
|
|
2480
|
+
'[class]': '"columns-" + monthsToShow()',
|
|
2481
|
+
'[class.disabled]': 'disabled()',
|
|
2358
2482
|
},
|
|
2359
2483
|
}]
|
|
2360
|
-
}] });
|
|
2484
|
+
}], propDecorators: { date: [{ type: i0.Input, args: [{ isSignal: true, alias: "date", required: false }] }, { type: i0.Output, args: ["dateChange"] }], endDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "endDate", required: false }] }, { type: i0.Output, args: ["endDateChange"] }], asRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "asRange", required: false }] }], monthsToShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "monthsToShow", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], startOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "startOfWeek", required: false }] }], weekdayLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekdayLabels", required: false }] }], daysRef: [{ type: i0.ViewChild, args: ['daysRef', { isSignal: true }] }] } });
|
|
2361
2485
|
|
|
2362
|
-
|
|
2486
|
+
const BASE_SPACE = 4;
|
|
2487
|
+
const SCROLLABLE_STYLES = ['scroll', 'auto'];
|
|
2488
|
+
const DEFAULT_OPTIONS = {
|
|
2489
|
+
width: undefined,
|
|
2490
|
+
height: undefined,
|
|
2491
|
+
closeOnButton: true,
|
|
2492
|
+
closeOnEsc: true,
|
|
2493
|
+
};
|
|
2494
|
+
class ShipPopover {
|
|
2363
2495
|
constructor() {
|
|
2364
|
-
this.#
|
|
2496
|
+
this.#document = inject(DOCUMENT);
|
|
2497
|
+
this.SUPPORTS_ANCHOR = typeof CSS !== 'undefined' && CSS.supports('position-anchor', '--abc') && CSS.supports('anchor-name', '--abc');
|
|
2498
|
+
this.asMultiLayer = input(false, ...(ngDevMode ? [{ debugName: "asMultiLayer" }] : []));
|
|
2499
|
+
this.disableOpenByClick = input(false, ...(ngDevMode ? [{ debugName: "disableOpenByClick" }] : []));
|
|
2365
2500
|
this.isOpen = model(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
2501
|
+
this.options = input(...(ngDevMode ? [undefined, { debugName: "options" }] : []));
|
|
2366
2502
|
this.closed = output();
|
|
2503
|
+
this.defaultOptionMerge = computed(() => ({
|
|
2504
|
+
...DEFAULT_OPTIONS,
|
|
2505
|
+
...this.options(),
|
|
2506
|
+
}), ...(ngDevMode ? [{ debugName: "defaultOptionMerge" }] : []));
|
|
2507
|
+
this.triggerRef = viewChild.required('triggerRef');
|
|
2508
|
+
this.popoverRef = viewChild('popoverRef', ...(ngDevMode ? [{ debugName: "popoverRef" }] : []));
|
|
2509
|
+
this.popoverContentRef = viewChild('popoverContentRef', ...(ngDevMode ? [{ debugName: "popoverContentRef" }] : []));
|
|
2510
|
+
this.id = signal('--' + generateUniqueId(), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
2511
|
+
this.menuStyle = signal(null, ...(ngDevMode ? [{ debugName: "menuStyle" }] : []));
|
|
2512
|
+
this.openAbort = null;
|
|
2513
|
+
this.openEffect = effect(() => {
|
|
2514
|
+
const open = this.isOpen();
|
|
2515
|
+
queueMicrotask(() => {
|
|
2516
|
+
const popoverEl = this.popoverRef()?.nativeElement;
|
|
2517
|
+
if (!popoverEl) {
|
|
2518
|
+
this.openAbort?.abort();
|
|
2519
|
+
this.openAbort = null;
|
|
2520
|
+
return;
|
|
2521
|
+
}
|
|
2522
|
+
if (open) {
|
|
2523
|
+
if (this.openAbort) {
|
|
2524
|
+
this.openAbort.abort();
|
|
2525
|
+
}
|
|
2526
|
+
this.openAbort = new AbortController();
|
|
2527
|
+
this.#document.addEventListener('keydown', (e) => {
|
|
2528
|
+
if (e.key === 'Escape' && !this.defaultOptionMerge().closeOnEsc) {
|
|
2529
|
+
e.preventDefault();
|
|
2530
|
+
}
|
|
2531
|
+
if (e.key === 'Escape' && this.defaultOptionMerge().closeOnEsc) {
|
|
2532
|
+
this.isOpen.set(false);
|
|
2533
|
+
}
|
|
2534
|
+
}, {
|
|
2535
|
+
signal: this.openAbort?.signal,
|
|
2536
|
+
});
|
|
2537
|
+
popoverEl.showPopover();
|
|
2538
|
+
if (!this.SUPPORTS_ANCHOR) {
|
|
2539
|
+
setTimeout(() => {
|
|
2540
|
+
const scrollableParent = this.#findScrollableParent(popoverEl);
|
|
2541
|
+
scrollableParent.addEventListener('scroll', () => this.#calculateMenuPosition(), {
|
|
2542
|
+
signal: this.openAbort?.signal,
|
|
2543
|
+
});
|
|
2544
|
+
window?.addEventListener('resize', () => this.#calculateMenuPosition(), {
|
|
2545
|
+
signal: this.openAbort?.signal,
|
|
2546
|
+
});
|
|
2547
|
+
this.#calculateMenuPosition();
|
|
2548
|
+
});
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
else {
|
|
2552
|
+
this.closed.emit();
|
|
2553
|
+
this.openAbort?.abort();
|
|
2554
|
+
this.openAbort = null;
|
|
2555
|
+
}
|
|
2556
|
+
});
|
|
2557
|
+
}, ...(ngDevMode ? [{ debugName: "openEffect" }] : []));
|
|
2367
2558
|
}
|
|
2368
|
-
#
|
|
2369
|
-
|
|
2370
|
-
if (this
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2559
|
+
#document;
|
|
2560
|
+
toggleIsOpen(event) {
|
|
2561
|
+
if (!this.disableOpenByClick()) {
|
|
2562
|
+
event.preventDefault();
|
|
2563
|
+
event.stopPropagation();
|
|
2564
|
+
this.isOpen.set(!this.isOpen());
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
eventClose($event) {
|
|
2568
|
+
if (!this.isOpen())
|
|
2569
|
+
return;
|
|
2570
|
+
this.isOpen.set(false);
|
|
2571
|
+
}
|
|
2572
|
+
#findScrollableParent(element) {
|
|
2573
|
+
let parent = element.parentElement;
|
|
2574
|
+
while (parent) {
|
|
2575
|
+
if (SCROLLABLE_STYLES.indexOf(window?.getComputedStyle(parent).overflowY) > -1 &&
|
|
2576
|
+
parent.scrollHeight > parent.clientHeight) {
|
|
2577
|
+
return parent;
|
|
2578
|
+
}
|
|
2579
|
+
parent = parent.parentElement;
|
|
2580
|
+
}
|
|
2581
|
+
return this.#document.documentElement;
|
|
2582
|
+
}
|
|
2583
|
+
#alignLeftUnder(triggerRect, menuRect) {
|
|
2584
|
+
const newLeft = triggerRect.left;
|
|
2585
|
+
const newTop = triggerRect.bottom + BASE_SPACE;
|
|
2586
|
+
return {
|
|
2587
|
+
left: newLeft,
|
|
2588
|
+
top: newTop,
|
|
2589
|
+
};
|
|
2590
|
+
}
|
|
2591
|
+
#alignTopRight(triggerRect, menuRect) {
|
|
2592
|
+
const newLeft = triggerRect.right + BASE_SPACE;
|
|
2593
|
+
const newTop = triggerRect.top;
|
|
2594
|
+
return {
|
|
2595
|
+
left: newLeft,
|
|
2596
|
+
top: newTop,
|
|
2597
|
+
};
|
|
2598
|
+
}
|
|
2599
|
+
#alignBottomRight(triggerRect, menuRect) {
|
|
2600
|
+
const newLeft = triggerRect.right + BASE_SPACE;
|
|
2601
|
+
const newTop = triggerRect.bottom;
|
|
2602
|
+
return {
|
|
2603
|
+
left: newLeft,
|
|
2604
|
+
top: newTop,
|
|
2605
|
+
};
|
|
2606
|
+
}
|
|
2607
|
+
#alignLeftOver(triggerRect, menuRect) {
|
|
2608
|
+
const newLeft = triggerRect.left;
|
|
2609
|
+
const newTop = triggerRect.bottom - triggerRect.height - menuRect.height - BASE_SPACE;
|
|
2610
|
+
return {
|
|
2611
|
+
left: newLeft,
|
|
2612
|
+
top: newTop,
|
|
2613
|
+
};
|
|
2614
|
+
}
|
|
2615
|
+
#calculateMenuPosition() {
|
|
2616
|
+
const triggerRect = this.triggerRef()?.nativeElement.getBoundingClientRect();
|
|
2617
|
+
const menuRect = this.popoverContentRef()?.nativeElement.getBoundingClientRect();
|
|
2618
|
+
const tryOrderMultiLayer = [this.#alignTopRight, this.#alignBottomRight];
|
|
2619
|
+
const tryOrderDefault = [this.#alignLeftUnder, this.#alignLeftOver];
|
|
2620
|
+
const tryOrder = this.asMultiLayer() ? tryOrderMultiLayer : tryOrderDefault;
|
|
2621
|
+
for (let i = 0; i < tryOrder.length; i++) {
|
|
2622
|
+
const position = tryOrder[i](triggerRect, menuRect);
|
|
2623
|
+
const outOfBoundsRight = position.left + (menuRect?.width || 0) > window.innerWidth;
|
|
2624
|
+
const outOfBoundsBottom = position.top + (menuRect?.height || 0) > window.innerHeight;
|
|
2625
|
+
if (!outOfBoundsRight && !outOfBoundsBottom) {
|
|
2626
|
+
this.menuStyle.set({
|
|
2627
|
+
left: position.left + 'px',
|
|
2628
|
+
top: position.top + 'px',
|
|
2629
|
+
});
|
|
2630
|
+
return;
|
|
2631
|
+
}
|
|
2632
|
+
}
|
|
2633
|
+
const fallbackPosition = tryOrder[0](triggerRect, menuRect);
|
|
2634
|
+
this.menuStyle.set({
|
|
2635
|
+
left: fallbackPosition.left + 'px',
|
|
2636
|
+
top: fallbackPosition.top + 'px',
|
|
2637
|
+
});
|
|
2638
|
+
}
|
|
2639
|
+
ngOnDestroy() {
|
|
2640
|
+
this.openAbort?.abort();
|
|
2641
|
+
this.openAbort = null;
|
|
2642
|
+
}
|
|
2643
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipPopover, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2644
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipPopover, isStandalone: true, selector: "sh-popover", inputs: { asMultiLayer: { classPropertyName: "asMultiLayer", publicName: "asMultiLayer", isSignal: true, isRequired: false, transformFunction: null }, disableOpenByClick: { classPropertyName: "disableOpenByClick", publicName: "disableOpenByClick", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange", closed: "closed" }, host: { properties: { "class.multi-layer": "asMultiLayer()" } }, viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["triggerRef"], descendants: true, isSignal: true }, { propertyName: "popoverRef", first: true, predicate: ["popoverRef"], descendants: true, isSignal: true }, { propertyName: "popoverContentRef", first: true, predicate: ["popoverContentRef"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2645
|
+
<div class="trigger" #triggerRef [attr.popovertarget]="id() + 'hello'" (click)="toggleIsOpen($event)">
|
|
2646
|
+
<div class="trigger-wrapper">
|
|
2647
|
+
<ng-content select="[trigger]" />
|
|
2648
|
+
<ng-content select="button" />
|
|
2649
|
+
<ng-content select="[shButton]" />
|
|
2413
2650
|
</div>
|
|
2414
|
-
|
|
2415
|
-
<div class="prefix-space"></div>
|
|
2416
|
-
|
|
2417
|
-
<sh-popover
|
|
2418
|
-
[(isOpen)]="isOpen"
|
|
2419
|
-
(closed)="close()"
|
|
2420
|
-
[options]="{
|
|
2421
|
-
closeOnButton: false,
|
|
2422
|
-
closeOnEsc: true,
|
|
2423
|
-
}">
|
|
2424
|
-
<ng-content trigger select="input"></ng-content>
|
|
2425
|
-
|
|
2426
|
-
<ng-content select="[popoverContent]"></ng-content>
|
|
2427
|
-
</sh-popover>
|
|
2428
|
-
|
|
2429
|
-
<ng-content select="textarea"></ng-content>
|
|
2430
|
-
|
|
2431
|
-
<ng-content select="[textSuffix]"></ng-content>
|
|
2432
|
-
<div class="suffix-space"></div>
|
|
2433
|
-
<ng-content select="[suffix]"></ng-content>
|
|
2651
|
+
<div class="trigger-anchor" [style.anchor-name]="id()"></div>
|
|
2434
2652
|
</div>
|
|
2435
2653
|
|
|
2436
|
-
|
|
2437
|
-
<div class="
|
|
2438
|
-
<
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
<ng-content select="[hint]"></ng-content>
|
|
2654
|
+
@if (isOpen()) {
|
|
2655
|
+
<div [attr.id]="id() + 'hello'" popover="manual" #popoverRef class="popover">
|
|
2656
|
+
<div class="overlay" (click)="eventClose($event)"></div>
|
|
2657
|
+
<div class="popover-content" #popoverContentRef [style.position-anchor]="id()" [style]="menuStyle()">
|
|
2658
|
+
<ng-content />
|
|
2659
|
+
</div>
|
|
2443
2660
|
</div>
|
|
2444
|
-
|
|
2445
|
-
`, isInline: true,
|
|
2661
|
+
}
|
|
2662
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2446
2663
|
}
|
|
2447
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipPopover, decorators: [{
|
|
2448
2665
|
type: Component,
|
|
2449
2666
|
args: [{
|
|
2450
|
-
selector: 'sh-
|
|
2451
|
-
imports: [
|
|
2667
|
+
selector: 'sh-popover',
|
|
2668
|
+
imports: [],
|
|
2452
2669
|
template: `
|
|
2670
|
+
<div class="trigger" #triggerRef [attr.popovertarget]="id() + 'hello'" (click)="toggleIsOpen($event)">
|
|
2671
|
+
<div class="trigger-wrapper">
|
|
2672
|
+
<ng-content select="[trigger]" />
|
|
2673
|
+
<ng-content select="button" />
|
|
2674
|
+
<ng-content select="[shButton]" />
|
|
2675
|
+
</div>
|
|
2676
|
+
<div class="trigger-anchor" [style.anchor-name]="id()"></div>
|
|
2677
|
+
</div>
|
|
2678
|
+
|
|
2679
|
+
@if (isOpen()) {
|
|
2680
|
+
<div [attr.id]="id() + 'hello'" popover="manual" #popoverRef class="popover">
|
|
2681
|
+
<div class="overlay" (click)="eventClose($event)"></div>
|
|
2682
|
+
<div class="popover-content" #popoverContentRef [style.position-anchor]="id()" [style]="menuStyle()">
|
|
2683
|
+
<ng-content />
|
|
2684
|
+
</div>
|
|
2685
|
+
</div>
|
|
2686
|
+
}
|
|
2687
|
+
`,
|
|
2688
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2689
|
+
host: {
|
|
2690
|
+
'[class.multi-layer]': 'asMultiLayer()',
|
|
2691
|
+
},
|
|
2692
|
+
}]
|
|
2693
|
+
}], propDecorators: { asMultiLayer: [{ type: i0.Input, args: [{ isSignal: true, alias: "asMultiLayer", required: false }] }], disableOpenByClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableOpenByClick", required: false }] }], isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], triggerRef: [{ type: i0.ViewChild, args: ['triggerRef', { isSignal: true }] }], popoverRef: [{ type: i0.ViewChild, args: ['popoverRef', { isSignal: true }] }], popoverContentRef: [{ type: i0.ViewChild, args: ['popoverContentRef', { isSignal: true }] }] } });
|
|
2694
|
+
|
|
2695
|
+
class ShipFormFieldPopover {
|
|
2696
|
+
constructor() {
|
|
2697
|
+
this.#selfRef = inject(ElementRef);
|
|
2698
|
+
this.isOpen = model(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
2699
|
+
this.closed = output();
|
|
2700
|
+
}
|
|
2701
|
+
#selfRef;
|
|
2702
|
+
onClick() {
|
|
2703
|
+
if (this.#selfRef.nativeElement.querySelector('input')) {
|
|
2704
|
+
this.#selfRef.nativeElement.querySelector('input').focus();
|
|
2705
|
+
}
|
|
2706
|
+
if (this.#selfRef.nativeElement.querySelector('textarea')) {
|
|
2707
|
+
this.#selfRef.nativeElement.querySelector('textarea').focus();
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
close() {
|
|
2711
|
+
this.closed.emit();
|
|
2712
|
+
}
|
|
2713
|
+
ngOnInit() {
|
|
2714
|
+
const supportFieldSizing = typeof CSS !== 'undefined' && CSS.supports('field-sizing', 'content');
|
|
2715
|
+
const text = this.#selfRef.nativeElement.querySelector('textarea');
|
|
2716
|
+
if (!supportFieldSizing && text !== null) {
|
|
2717
|
+
const text = this.#selfRef.nativeElement.querySelector('textarea');
|
|
2718
|
+
function resize() {
|
|
2719
|
+
text.style.height = 'auto';
|
|
2720
|
+
text.style.height = text.scrollHeight + 'px';
|
|
2721
|
+
}
|
|
2722
|
+
/* 0-timeout to get the already changed text */
|
|
2723
|
+
function delayedResize() {
|
|
2724
|
+
setTimeout(resize, 0);
|
|
2725
|
+
}
|
|
2726
|
+
if (text) {
|
|
2727
|
+
text.addEventListener('change', resize);
|
|
2728
|
+
text.addEventListener('cut', delayedResize);
|
|
2729
|
+
text.addEventListener('paste', delayedResize);
|
|
2730
|
+
text.addEventListener('drop', delayedResize);
|
|
2731
|
+
text.addEventListener('keydown', delayedResize);
|
|
2732
|
+
text.focus();
|
|
2733
|
+
text.select();
|
|
2734
|
+
resize();
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
}
|
|
2738
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipFormFieldPopover, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2739
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: ShipFormFieldPopover, isStandalone: true, selector: "sh-form-field-popover", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange", closed: "closed" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0, template: `
|
|
2453
2740
|
<ng-content select="label"></ng-content>
|
|
2454
2741
|
|
|
2455
2742
|
<div class="input-wrap">
|
|
@@ -2469,384 +2756,101 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
2469
2756
|
}">
|
|
2470
2757
|
<ng-content trigger select="input"></ng-content>
|
|
2471
2758
|
|
|
2472
|
-
<ng-content select="[popoverContent]"></ng-content>
|
|
2473
|
-
</sh-popover>
|
|
2474
|
-
|
|
2475
|
-
<ng-content select="textarea"></ng-content>
|
|
2476
|
-
|
|
2477
|
-
<ng-content select="[textSuffix]"></ng-content>
|
|
2478
|
-
<div class="suffix-space"></div>
|
|
2479
|
-
<ng-content select="[suffix]"></ng-content>
|
|
2480
|
-
</div>
|
|
2481
|
-
|
|
2482
|
-
<div class="helpers">
|
|
2483
|
-
<div class="error-wrap">
|
|
2484
|
-
<ng-content select="[error]"></ng-content>
|
|
2485
|
-
</div>
|
|
2486
|
-
|
|
2487
|
-
<div class="hint">
|
|
2488
|
-
<ng-content select="[hint]"></ng-content>
|
|
2489
|
-
</div>
|
|
2490
|
-
</div>
|
|
2491
|
-
`,
|
|
2492
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2493
|
-
}]
|
|
2494
|
-
}], propDecorators: { onClick: [{
|
|
2495
|
-
type: HostListener,
|
|
2496
|
-
args: ['click']
|
|
2497
|
-
}] } });
|
|
2498
|
-
|
|
2499
|
-
function contentProjectionSignal(querySelector) {
|
|
2500
|
-
const hostElement = inject((ElementRef)).nativeElement;
|
|
2501
|
-
const destroyRef = inject(DestroyRef);
|
|
2502
|
-
const projectedElementsSignal = signal([], ...(ngDevMode ? [{ debugName: "projectedElementsSignal" }] : []));
|
|
2503
|
-
const updateElements = () => {
|
|
2504
|
-
projectedElementsSignal.set(Array.from(hostElement.querySelectorAll(querySelector)));
|
|
2505
|
-
};
|
|
2506
|
-
updateElements();
|
|
2507
|
-
if (typeof MutationObserver === 'undefined')
|
|
2508
|
-
return projectedElementsSignal.asReadonly();
|
|
2509
|
-
const observer = new MutationObserver((mutations) => {
|
|
2510
|
-
const hasChildListChanges = mutations.some((mutation) => mutation.type === 'childList');
|
|
2511
|
-
if (hasChildListChanges) {
|
|
2512
|
-
updateElements();
|
|
2513
|
-
}
|
|
2514
|
-
});
|
|
2515
|
-
observer.observe(hostElement, { childList: true });
|
|
2516
|
-
destroyRef.onDestroy(() => observer.disconnect());
|
|
2517
|
-
return projectedElementsSignal.asReadonly();
|
|
2518
|
-
}
|
|
2519
|
-
|
|
2520
|
-
class ShipDatepickerComponent {
|
|
2521
|
-
constructor() {
|
|
2522
|
-
this.#INIT_DATE = this.#getUTCDate(new Date());
|
|
2523
|
-
this.date = model(null, ...(ngDevMode ? [{ debugName: "date" }] : []));
|
|
2524
|
-
this.endDate = model(null, ...(ngDevMode ? [{ debugName: "endDate" }] : []));
|
|
2525
|
-
this.asRange = input(false, ...(ngDevMode ? [{ debugName: "asRange" }] : []));
|
|
2526
|
-
this.monthsToShow = input(1, ...(ngDevMode ? [{ debugName: "monthsToShow" }] : []));
|
|
2527
|
-
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
2528
|
-
this.startOfWeek = input(1, ...(ngDevMode ? [{ debugName: "startOfWeek" }] : []));
|
|
2529
|
-
this.weekdayLabels = input(['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], ...(ngDevMode ? [{ debugName: "weekdayLabels" }] : []));
|
|
2530
|
-
this.daysRef = viewChild('daysRef', ...(ngDevMode ? [{ debugName: "daysRef" }] : []));
|
|
2531
|
-
this.currentDate = signal(this.date() ?? this.#INIT_DATE, ...(ngDevMode ? [{ debugName: "currentDate" }] : []));
|
|
2532
|
-
this.monthOffsets = computed(() => {
|
|
2533
|
-
return Array.from({ length: this.monthsToShow() }, (_, i) => i);
|
|
2534
|
-
}, ...(ngDevMode ? [{ debugName: "monthOffsets" }] : []));
|
|
2535
|
-
this.selectedDateStylePosition = signal(null, ...(ngDevMode ? [{ debugName: "selectedDateStylePosition" }] : []));
|
|
2536
|
-
this.weekdays = computed(() => {
|
|
2537
|
-
const startOfWeek = this.startOfWeek();
|
|
2538
|
-
const weekdayLabels = this.weekdayLabels();
|
|
2539
|
-
return weekdayLabels.slice(startOfWeek).concat(weekdayLabels.slice(0, startOfWeek));
|
|
2540
|
-
}, ...(ngDevMode ? [{ debugName: "weekdays" }] : []));
|
|
2541
|
-
this.currentClasses = classMutationSignal();
|
|
2542
|
-
this.someEffect = effect(() => {
|
|
2543
|
-
const _ = this.currentClasses();
|
|
2544
|
-
this.#findSelectedAndCalc();
|
|
2545
|
-
}, ...(ngDevMode ? [{ debugName: "someEffect" }] : []));
|
|
2546
|
-
this.#newDateEffect = effect(() => {
|
|
2547
|
-
if (this.monthsToShow() > 1)
|
|
2548
|
-
return;
|
|
2549
|
-
this.#setDateAsCurrent();
|
|
2550
|
-
}, ...(ngDevMode ? [{ debugName: "#newDateEffect" }] : []));
|
|
2551
|
-
}
|
|
2552
|
-
#INIT_DATE;
|
|
2553
|
-
getLastVisibleMonth() {
|
|
2554
|
-
const lastMonthOffset = this.monthsToShow() - 1;
|
|
2555
|
-
return this.getOffsetDate(lastMonthOffset);
|
|
2556
|
-
}
|
|
2557
|
-
getOffsetDate(monthOffset) {
|
|
2558
|
-
const date = new Date(this.currentDate());
|
|
2559
|
-
date.setMonth(date.getMonth() + monthOffset);
|
|
2560
|
-
return date;
|
|
2561
|
-
}
|
|
2562
|
-
getMonthDates(monthOffset) {
|
|
2563
|
-
const offsetDate = this.getOffsetDate(monthOffset);
|
|
2564
|
-
return this.#generateMonthDates(offsetDate, this.startOfWeek());
|
|
2565
|
-
}
|
|
2566
|
-
#newDateEffect;
|
|
2567
|
-
ngOnInit() {
|
|
2568
|
-
if (this.monthsToShow() === 1)
|
|
2569
|
-
return;
|
|
2570
|
-
this.#setDateAsCurrent();
|
|
2571
|
-
}
|
|
2572
|
-
#setDateAsCurrent() {
|
|
2573
|
-
const newDate = this.date();
|
|
2574
|
-
if (newDate)
|
|
2575
|
-
this.currentDate.set(newDate);
|
|
2576
|
-
this.#findSelectedAndCalc();
|
|
2577
|
-
}
|
|
2578
|
-
#findSelectedAndCalc() {
|
|
2579
|
-
setTimeout(() => {
|
|
2580
|
-
const selectedElement = this.daysRef()?.nativeElement.querySelector('.sel');
|
|
2581
|
-
if (!selectedElement) {
|
|
2582
|
-
return this.selectedDateStylePosition.update((x) => (x ? { ...x, opacity: '0' } : null));
|
|
2583
|
-
}
|
|
2584
|
-
this.setSelectedDateStylePosition(selectedElement);
|
|
2585
|
-
});
|
|
2586
|
-
}
|
|
2587
|
-
#generateMonthDates(date, startOfWeek) {
|
|
2588
|
-
const year = date.getUTCFullYear();
|
|
2589
|
-
const month = date.getUTCMonth();
|
|
2590
|
-
const firstDay = new Date(Date.UTC(year, month)).getUTCDay();
|
|
2591
|
-
const daysInMonth = 32 - new Date(Date.UTC(year, month, 32)).getUTCDate();
|
|
2592
|
-
const dates = [];
|
|
2593
|
-
let offset = firstDay - startOfWeek;
|
|
2594
|
-
if (offset < 0) {
|
|
2595
|
-
offset += 7;
|
|
2596
|
-
}
|
|
2597
|
-
const lastDayOfPrevMonth = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
2598
|
-
for (let i = offset - 1; i >= 0; i--) {
|
|
2599
|
-
const prevMonthDate = new Date(Date.UTC(year, month - 1, lastDayOfPrevMonth - i));
|
|
2600
|
-
dates.push(prevMonthDate);
|
|
2601
|
-
}
|
|
2602
|
-
for (let i = 1; i <= daysInMonth; i++) {
|
|
2603
|
-
dates.push(new Date(Date.UTC(year, month, i)));
|
|
2604
|
-
}
|
|
2605
|
-
let nextMonthDay = 1;
|
|
2606
|
-
while (dates.length % 7 !== 0) {
|
|
2607
|
-
dates.push(new Date(Date.UTC(year, month + 1, nextMonthDay++)));
|
|
2608
|
-
}
|
|
2609
|
-
return dates;
|
|
2610
|
-
}
|
|
2611
|
-
nextMonth() {
|
|
2612
|
-
this.currentDate.update((currentDate) => {
|
|
2613
|
-
const newDate = new Date(currentDate);
|
|
2614
|
-
newDate.setMonth(currentDate.getMonth() + 1);
|
|
2615
|
-
return newDate;
|
|
2616
|
-
});
|
|
2617
|
-
this.#findSelectedAndCalc();
|
|
2618
|
-
}
|
|
2619
|
-
previousMonth() {
|
|
2620
|
-
this.currentDate.update((currentDate) => {
|
|
2621
|
-
const newDate = new Date(currentDate);
|
|
2622
|
-
newDate.setMonth(currentDate.getMonth() - 1);
|
|
2623
|
-
return newDate;
|
|
2624
|
-
});
|
|
2625
|
-
this.#findSelectedAndCalc();
|
|
2626
|
-
}
|
|
2627
|
-
setDate(newDate, selectedElement) {
|
|
2628
|
-
const createDateWithExistingTime = (newDate, existingDate) => {
|
|
2629
|
-
const hours = existingDate?.getUTCHours() ?? 0;
|
|
2630
|
-
const minutes = existingDate?.getUTCMinutes() ?? 0;
|
|
2631
|
-
const seconds = existingDate?.getUTCSeconds() ?? 0;
|
|
2632
|
-
const milliseconds = existingDate?.getUTCMilliseconds() ?? 0;
|
|
2633
|
-
return this.#getUTCDate(new Date(Date.UTC(newDate.getUTCFullYear(), newDate.getUTCMonth(), newDate.getUTCDate(), hours, minutes, seconds, milliseconds)));
|
|
2634
|
-
};
|
|
2635
|
-
if (!this.asRange()) {
|
|
2636
|
-
this.date.set(createDateWithExistingTime(newDate, this.date()));
|
|
2637
|
-
this.endDate.set(null);
|
|
2638
|
-
}
|
|
2639
|
-
else {
|
|
2640
|
-
const startDate = this.date();
|
|
2641
|
-
const endDate = this.endDate();
|
|
2642
|
-
const utcDate = createDateWithExistingTime(newDate, null);
|
|
2643
|
-
if (!startDate) {
|
|
2644
|
-
this.date.set(utcDate);
|
|
2645
|
-
}
|
|
2646
|
-
else if (!endDate) {
|
|
2647
|
-
if (utcDate < startDate) {
|
|
2648
|
-
this.date.set(utcDate);
|
|
2649
|
-
this.endDate.set(null);
|
|
2650
|
-
}
|
|
2651
|
-
else {
|
|
2652
|
-
this.endDate.set(utcDate);
|
|
2653
|
-
}
|
|
2654
|
-
}
|
|
2655
|
-
else {
|
|
2656
|
-
this.date.set(utcDate);
|
|
2657
|
-
this.endDate.set(null);
|
|
2658
|
-
}
|
|
2659
|
-
}
|
|
2660
|
-
if (this.asRange())
|
|
2661
|
-
return;
|
|
2662
|
-
this.setSelectedDateStylePosition(selectedElement);
|
|
2663
|
-
}
|
|
2664
|
-
isDateSelected(date) {
|
|
2665
|
-
const startDate = this.date();
|
|
2666
|
-
const endDate = this.endDate();
|
|
2667
|
-
if (startDate === null)
|
|
2668
|
-
return null;
|
|
2669
|
-
const startOfDay = (date) => {
|
|
2670
|
-
return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0, 0));
|
|
2671
|
-
};
|
|
2672
|
-
const endOfDay = (date) => {
|
|
2673
|
-
return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 23, 59, 59, 999));
|
|
2674
|
-
};
|
|
2675
|
-
const currentDate = startOfDay(date);
|
|
2676
|
-
const rangeStart = startOfDay(startDate);
|
|
2677
|
-
const rangeEnd = endDate ? endOfDay(endDate) : null;
|
|
2678
|
-
let classes = [];
|
|
2679
|
-
if (this.asRange()) {
|
|
2680
|
-
if (rangeEnd === null) {
|
|
2681
|
-
if (currentDate.getTime() === rangeStart.getTime()) {
|
|
2682
|
-
classes.push('sel first last');
|
|
2683
|
-
}
|
|
2684
|
-
}
|
|
2685
|
-
else {
|
|
2686
|
-
if (currentDate.getTime() === rangeStart.getTime()) {
|
|
2687
|
-
classes.push('first');
|
|
2688
|
-
}
|
|
2689
|
-
if (currentDate.getTime() === startOfDay(rangeEnd).getTime()) {
|
|
2690
|
-
classes.push('last');
|
|
2691
|
-
}
|
|
2692
|
-
if (currentDate >= rangeStart && currentDate <= rangeEnd) {
|
|
2693
|
-
classes.push('sel');
|
|
2694
|
-
const dayOfWeek = currentDate.getUTCDay();
|
|
2695
|
-
const startOfWeek = this.startOfWeek();
|
|
2696
|
-
if (dayOfWeek === startOfWeek) {
|
|
2697
|
-
classes.push('week-start');
|
|
2698
|
-
}
|
|
2699
|
-
const endOfWeek = (startOfWeek + 6) % 7;
|
|
2700
|
-
if (dayOfWeek === endOfWeek) {
|
|
2701
|
-
classes.push('week-end');
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
const nextDate = new Date(currentDate);
|
|
2705
|
-
nextDate.setUTCDate(currentDate.getUTCDate() + 1);
|
|
2706
|
-
const prevDate = new Date(currentDate);
|
|
2707
|
-
prevDate.setUTCDate(currentDate.getUTCDate() - 1);
|
|
2708
|
-
const isFirstOfMonth = currentDate.getUTCDate() === 1;
|
|
2709
|
-
const isLastOfMonth = nextDate.getUTCMonth() !== currentDate.getUTCMonth();
|
|
2710
|
-
if (isFirstOfMonth) {
|
|
2711
|
-
classes.push('month-start');
|
|
2712
|
-
}
|
|
2713
|
-
if (isLastOfMonth) {
|
|
2714
|
-
classes.push('month-end');
|
|
2715
|
-
}
|
|
2716
|
-
}
|
|
2717
|
-
}
|
|
2718
|
-
else {
|
|
2719
|
-
if (currentDate.getTime() === rangeStart.getTime()) {
|
|
2720
|
-
classes.push('sel');
|
|
2721
|
-
}
|
|
2722
|
-
}
|
|
2723
|
-
return classes.join(' ') || null;
|
|
2724
|
-
}
|
|
2725
|
-
setSelectedDateStylePosition(selectedElement) {
|
|
2726
|
-
this.selectedDateStylePosition.set({
|
|
2727
|
-
transform: `translate(${selectedElement.offsetLeft}px, ${selectedElement.offsetTop}px)`,
|
|
2728
|
-
opacity: '1',
|
|
2729
|
-
});
|
|
2730
|
-
}
|
|
2731
|
-
getMonthName(date) {
|
|
2732
|
-
return date.toLocaleString('default', { month: 'long' });
|
|
2733
|
-
}
|
|
2734
|
-
getFullYear(date) {
|
|
2735
|
-
return date.getFullYear();
|
|
2736
|
-
}
|
|
2737
|
-
// Rest of the component methods remain the same, but update isCurrentMonth:
|
|
2738
|
-
isCurrentMonth(date, monthOffset) {
|
|
2739
|
-
const offsetDate = this.getOffsetDate(monthOffset);
|
|
2740
|
-
return date.getMonth() === offsetDate.getMonth();
|
|
2741
|
-
}
|
|
2742
|
-
#getUTCDate(date) {
|
|
2743
|
-
const offsetMinutes = date.getTimezoneOffset();
|
|
2744
|
-
const timeDiffMillis = offsetMinutes * 60 * 1000;
|
|
2745
|
-
return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()) + timeDiffMillis);
|
|
2746
|
-
}
|
|
2747
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ShipDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2748
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: ShipDatepickerComponent, isStandalone: true, selector: "sh-datepicker", inputs: { date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, endDate: { classPropertyName: "endDate", publicName: "endDate", isSignal: true, isRequired: false, transformFunction: null }, asRange: { classPropertyName: "asRange", publicName: "asRange", isSignal: true, isRequired: false, transformFunction: null }, monthsToShow: { classPropertyName: "monthsToShow", publicName: "monthsToShow", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, startOfWeek: { classPropertyName: "startOfWeek", publicName: "startOfWeek", isSignal: true, isRequired: false, transformFunction: null }, weekdayLabels: { classPropertyName: "weekdayLabels", publicName: "weekdayLabels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { date: "dateChange", endDate: "endDateChange" }, host: { properties: { "class.as-range": "asRange()", "class": "\"columns-\" + monthsToShow()", "class.disabled": "disabled()" } }, viewQueries: [{ propertyName: "daysRef", first: true, predicate: ["daysRef"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2749
|
-
<header>
|
|
2750
|
-
<button (click)="previousMonth()"><sh-icon>caret-left</sh-icon></button>
|
|
2751
|
-
<div class="title">
|
|
2752
|
-
{{ getMonthName(currentDate()!) }}
|
|
2753
|
-
@if (monthsToShow() > 1) {
|
|
2754
|
-
- {{ getMonthName(getLastVisibleMonth()) }}
|
|
2755
|
-
}
|
|
2756
|
-
{{ getFullYear(currentDate()!) }}
|
|
2757
|
-
</div>
|
|
2758
|
-
<button (click)="nextMonth()"><sh-icon>caret-right</sh-icon></button>
|
|
2759
|
-
</header>
|
|
2760
|
-
|
|
2761
|
-
<section class="months-container">
|
|
2762
|
-
@for (monthOffset of monthOffsets(); track monthOffset) {
|
|
2763
|
-
<div class="month">
|
|
2764
|
-
<nav class="weekdays">
|
|
2765
|
-
@for (day of weekdays(); track $index) {
|
|
2766
|
-
<div>{{ day }}</div>
|
|
2767
|
-
}
|
|
2768
|
-
</nav>
|
|
2759
|
+
<ng-content select="[popoverContent]"></ng-content>
|
|
2760
|
+
</sh-popover>
|
|
2769
2761
|
|
|
2770
|
-
|
|
2771
|
-
@for (calDate of getMonthDates(monthOffset); track $index) {
|
|
2772
|
-
<div
|
|
2773
|
-
#elementRef
|
|
2774
|
-
[class.out-of-scope]="!isCurrentMonth(calDate, monthOffset)"
|
|
2775
|
-
[class]="isDateSelected(calDate)"
|
|
2776
|
-
(click)="setDate(calDate, elementRef)">
|
|
2777
|
-
{{ calDate.getDate() }}
|
|
2778
|
-
</div>
|
|
2779
|
-
}
|
|
2762
|
+
<ng-content select="textarea"></ng-content>
|
|
2780
2763
|
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2764
|
+
<ng-content select="[textSuffix]"></ng-content>
|
|
2765
|
+
<div class="suffix-space"></div>
|
|
2766
|
+
<ng-content select="[suffix]"></ng-content>
|
|
2767
|
+
</div>
|
|
2768
|
+
|
|
2769
|
+
<div class="helpers">
|
|
2770
|
+
<div class="error-wrap">
|
|
2771
|
+
<ng-content select="[error]"></ng-content>
|
|
2772
|
+
</div>
|
|
2773
|
+
|
|
2774
|
+
<div class="hint">
|
|
2775
|
+
<ng-content select="[hint]"></ng-content>
|
|
2776
|
+
</div>
|
|
2777
|
+
</div>
|
|
2778
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ShipPopover, selector: "sh-popover", inputs: ["asMultiLayer", "disableOpenByClick", "isOpen", "options"], outputs: ["isOpenChange", "closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2791
2779
|
}
|
|
2792
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2780
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipFormFieldPopover, decorators: [{
|
|
2793
2781
|
type: Component,
|
|
2794
2782
|
args: [{
|
|
2795
|
-
selector: 'sh-
|
|
2796
|
-
imports: [
|
|
2783
|
+
selector: 'sh-form-field-popover',
|
|
2784
|
+
imports: [ShipPopover],
|
|
2797
2785
|
template: `
|
|
2798
|
-
<
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
}
|
|
2805
|
-
{{ getFullYear(currentDate()!) }}
|
|
2786
|
+
<ng-content select="label"></ng-content>
|
|
2787
|
+
|
|
2788
|
+
<div class="input-wrap">
|
|
2789
|
+
<div class="prefix">
|
|
2790
|
+
<ng-content select="[prefix]"></ng-content>
|
|
2791
|
+
<ng-content select="[textPrefix]"></ng-content>
|
|
2806
2792
|
</div>
|
|
2807
|
-
<button (click)="nextMonth()"><sh-icon>caret-right</sh-icon></button>
|
|
2808
|
-
</header>
|
|
2809
2793
|
|
|
2810
|
-
|
|
2811
|
-
@for (monthOffset of monthOffsets(); track monthOffset) {
|
|
2812
|
-
<div class="month">
|
|
2813
|
-
<nav class="weekdays">
|
|
2814
|
-
@for (day of weekdays(); track $index) {
|
|
2815
|
-
<div>{{ day }}</div>
|
|
2816
|
-
}
|
|
2817
|
-
</nav>
|
|
2794
|
+
<div class="prefix-space"></div>
|
|
2818
2795
|
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
</div>
|
|
2828
|
-
}
|
|
2796
|
+
<sh-popover
|
|
2797
|
+
[(isOpen)]="isOpen"
|
|
2798
|
+
(closed)="close()"
|
|
2799
|
+
[options]="{
|
|
2800
|
+
closeOnButton: false,
|
|
2801
|
+
closeOnEsc: true,
|
|
2802
|
+
}">
|
|
2803
|
+
<ng-content trigger select="input"></ng-content>
|
|
2829
2804
|
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
</
|
|
2805
|
+
<ng-content select="[popoverContent]"></ng-content>
|
|
2806
|
+
</sh-popover>
|
|
2807
|
+
|
|
2808
|
+
<ng-content select="textarea"></ng-content>
|
|
2809
|
+
|
|
2810
|
+
<ng-content select="[textSuffix]"></ng-content>
|
|
2811
|
+
<div class="suffix-space"></div>
|
|
2812
|
+
<ng-content select="[suffix]"></ng-content>
|
|
2813
|
+
</div>
|
|
2814
|
+
|
|
2815
|
+
<div class="helpers">
|
|
2816
|
+
<div class="error-wrap">
|
|
2817
|
+
<ng-content select="[error]"></ng-content>
|
|
2818
|
+
</div>
|
|
2819
|
+
|
|
2820
|
+
<div class="hint">
|
|
2821
|
+
<ng-content select="[hint]"></ng-content>
|
|
2822
|
+
</div>
|
|
2823
|
+
</div>
|
|
2839
2824
|
`,
|
|
2840
2825
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2841
|
-
host: {
|
|
2842
|
-
'[class.as-range]': 'asRange()',
|
|
2843
|
-
'[class]': '"columns-" + monthsToShow()',
|
|
2844
|
-
'[class.disabled]': 'disabled()',
|
|
2845
|
-
},
|
|
2846
2826
|
}]
|
|
2847
|
-
}] }
|
|
2827
|
+
}], propDecorators: { isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }], closed: [{ type: i0.Output, args: ["closed"] }], onClick: [{
|
|
2828
|
+
type: HostListener,
|
|
2829
|
+
args: ['click']
|
|
2830
|
+
}] } });
|
|
2831
|
+
|
|
2832
|
+
function contentProjectionSignal(querySelector) {
|
|
2833
|
+
const hostElement = inject((ElementRef)).nativeElement;
|
|
2834
|
+
const destroyRef = inject(DestroyRef);
|
|
2835
|
+
const projectedElementsSignal = signal([], ...(ngDevMode ? [{ debugName: "projectedElementsSignal" }] : []));
|
|
2836
|
+
const updateElements = () => {
|
|
2837
|
+
projectedElementsSignal.set(Array.from(hostElement.querySelectorAll(querySelector)));
|
|
2838
|
+
};
|
|
2839
|
+
updateElements();
|
|
2840
|
+
if (typeof MutationObserver === 'undefined')
|
|
2841
|
+
return projectedElementsSignal.asReadonly();
|
|
2842
|
+
const observer = new MutationObserver((mutations) => {
|
|
2843
|
+
const hasChildListChanges = mutations.some((mutation) => mutation.type === 'childList');
|
|
2844
|
+
if (hasChildListChanges) {
|
|
2845
|
+
updateElements();
|
|
2846
|
+
}
|
|
2847
|
+
});
|
|
2848
|
+
observer.observe(hostElement, { childList: true });
|
|
2849
|
+
destroyRef.onDestroy(() => observer.disconnect());
|
|
2850
|
+
return projectedElementsSignal.asReadonly();
|
|
2851
|
+
}
|
|
2848
2852
|
|
|
2849
|
-
class
|
|
2853
|
+
class ShipDatepickerInput {
|
|
2850
2854
|
constructor() {
|
|
2851
2855
|
// #INIT_DATE = this.#getUTCDate(new Date());
|
|
2852
2856
|
this.ngModels = contentChild(NgModel, ...(ngDevMode ? [{ debugName: "ngModels" }] : []));
|
|
@@ -2932,8 +2936,8 @@ class ShipDatepickerInputComponent {
|
|
|
2932
2936
|
const timeDiffMillis = offsetMinutes * 60 * 1000;
|
|
2933
2937
|
return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()) + timeDiffMillis);
|
|
2934
2938
|
}
|
|
2935
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2936
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
2939
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipDatepickerInput, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2940
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipDatepickerInput, isStandalone: true, selector: "sh-datepicker-input", inputs: { masking: { classPropertyName: "masking", publicName: "masking", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", isOpen: "isOpenChange" }, providers: [DatePipe], queries: [{ propertyName: "ngModels", first: true, predicate: NgModel, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2937
2941
|
<sh-form-field-popover (closed)="close()" [(isOpen)]="isOpen">
|
|
2938
2942
|
<ng-content select="label" ngProjectAs="label" />
|
|
2939
2943
|
|
|
@@ -2961,13 +2965,13 @@ class ShipDatepickerInputComponent {
|
|
|
2961
2965
|
</sh-form-field-popover>
|
|
2962
2966
|
|
|
2963
2967
|
<ng-template #defaultIndicator></ng-template>
|
|
2964
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
2968
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ShipDatepicker, selector: "sh-datepicker", inputs: ["date", "endDate", "asRange", "monthsToShow", "disabled", "startOfWeek", "weekdayLabels"], outputs: ["dateChange", "endDateChange"] }, { kind: "component", type: ShipFormFieldPopover, selector: "sh-form-field-popover", inputs: ["isOpen"], outputs: ["isOpenChange", "closed"] }, { kind: "component", type: ShipIcon, selector: "sh-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2965
2969
|
}
|
|
2966
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipDatepickerInput, decorators: [{
|
|
2967
2971
|
type: Component,
|
|
2968
2972
|
args: [{
|
|
2969
2973
|
selector: 'sh-datepicker-input',
|
|
2970
|
-
imports: [
|
|
2974
|
+
imports: [ShipDatepicker, ShipFormFieldPopover, ShipIcon],
|
|
2971
2975
|
providers: [DatePipe],
|
|
2972
2976
|
template: `
|
|
2973
2977
|
<sh-form-field-popover (closed)="close()" [(isOpen)]="isOpen">
|
|
@@ -3000,9 +3004,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3000
3004
|
`,
|
|
3001
3005
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3002
3006
|
}]
|
|
3003
|
-
}] });
|
|
3007
|
+
}], propDecorators: { ngModels: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgModel), { isSignal: true }] }], masking: [{ type: i0.Input, args: [{ isSignal: true, alias: "masking", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }] } });
|
|
3004
3008
|
|
|
3005
|
-
class
|
|
3009
|
+
class ShipDaterangeInput {
|
|
3006
3010
|
#selfRef;
|
|
3007
3011
|
#datePipe;
|
|
3008
3012
|
get classes() {
|
|
@@ -3101,8 +3105,8 @@ class ShipDaterangeInputComponent {
|
|
|
3101
3105
|
end: this.endDate(),
|
|
3102
3106
|
});
|
|
3103
3107
|
}
|
|
3104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3105
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipDaterangeInput, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3109
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipDaterangeInput, isStandalone: true, selector: "sh-daterange-input", inputs: { monthsToShow: { classPropertyName: "monthsToShow", publicName: "monthsToShow", isSignal: true, isRequired: false, transformFunction: null }, masking: { classPropertyName: "masking", publicName: "masking", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", isOpen: "isOpenChange" }, providers: [DatePipe], queries: [{ propertyName: "startDateInputs", predicate: ["startDate"], isSignal: true }, { propertyName: "endDateInputs", predicate: ["endDate"], isSignal: true }], ngImport: i0, template: `
|
|
3106
3110
|
<sh-form-field-popover [class]="'columns-' + monthsToShow()" (closed)="close()" [(isOpen)]="isOpen">
|
|
3107
3111
|
<ng-content select="label" ngProjectAs="label" />
|
|
3108
3112
|
|
|
@@ -3133,13 +3137,13 @@ class ShipDaterangeInputComponent {
|
|
|
3133
3137
|
}
|
|
3134
3138
|
</div>
|
|
3135
3139
|
</sh-form-field-popover>
|
|
3136
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
3140
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ShipDatepicker, selector: "sh-datepicker", inputs: ["date", "endDate", "asRange", "monthsToShow", "disabled", "startOfWeek", "weekdayLabels"], outputs: ["dateChange", "endDateChange"] }, { kind: "component", type: ShipFormFieldPopover, selector: "sh-form-field-popover", inputs: ["isOpen"], outputs: ["isOpenChange", "closed"] }, { kind: "component", type: ShipIcon, selector: "sh-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3137
3141
|
}
|
|
3138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipDaterangeInput, decorators: [{
|
|
3139
3143
|
type: Component,
|
|
3140
3144
|
args: [{
|
|
3141
3145
|
selector: 'sh-daterange-input',
|
|
3142
|
-
imports: [
|
|
3146
|
+
imports: [ShipDatepicker, ShipFormFieldPopover, ShipIcon],
|
|
3143
3147
|
providers: [DatePipe],
|
|
3144
3148
|
template: `
|
|
3145
3149
|
<sh-form-field-popover [class]="'columns-' + monthsToShow()" (closed)="close()" [(isOpen)]="isOpen">
|
|
@@ -3175,15 +3179,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3175
3179
|
`,
|
|
3176
3180
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3177
3181
|
}]
|
|
3178
|
-
}], ctorParameters: () => [] });
|
|
3182
|
+
}], ctorParameters: () => [], propDecorators: { startDateInputs: [{ type: i0.ContentChildren, args: ['startDate', { isSignal: true }] }], endDateInputs: [{ type: i0.ContentChildren, args: ['endDate', { isSignal: true }] }], monthsToShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "monthsToShow", required: false }] }], masking: [{ type: i0.Input, args: [{ isSignal: true, alias: "masking", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }] } });
|
|
3179
3183
|
|
|
3180
|
-
class
|
|
3181
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3182
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3184
|
+
class ShipDivider {
|
|
3185
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipDivider, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3186
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipDivider, isStandalone: true, selector: "sh-divider", ngImport: i0, template: `
|
|
3183
3187
|
<ng-content />
|
|
3184
3188
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3185
3189
|
}
|
|
3186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipDivider, decorators: [{
|
|
3187
3191
|
type: Component,
|
|
3188
3192
|
args: [{
|
|
3189
3193
|
selector: 'sh-divider',
|
|
@@ -3195,9 +3199,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3195
3199
|
}]
|
|
3196
3200
|
}] });
|
|
3197
3201
|
|
|
3198
|
-
class
|
|
3199
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3200
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3202
|
+
class ShipEventCard {
|
|
3203
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipEventCard, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3204
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipEventCard, isStandalone: true, selector: "sh-event-card", host: { classAttribute: "sh-sheet" }, ngImport: i0, template: `
|
|
3201
3205
|
<div class="content">
|
|
3202
3206
|
<ng-content />
|
|
3203
3207
|
</div>
|
|
@@ -3208,7 +3212,7 @@ class ShipEventCardComponent {
|
|
|
3208
3212
|
</div>
|
|
3209
3213
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3210
3214
|
}
|
|
3211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipEventCard, decorators: [{
|
|
3212
3216
|
type: Component,
|
|
3213
3217
|
args: [{
|
|
3214
3218
|
selector: 'sh-event-card',
|
|
@@ -3230,7 +3234,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3230
3234
|
}]
|
|
3231
3235
|
}] });
|
|
3232
3236
|
|
|
3233
|
-
class
|
|
3237
|
+
class ShipFormField {
|
|
3234
3238
|
#selfRef = inject(ElementRef);
|
|
3235
3239
|
onClick() {
|
|
3236
3240
|
if (this.#selfRef.nativeElement.querySelector('input')) {
|
|
@@ -3264,8 +3268,8 @@ class ShipFormFieldComponent {
|
|
|
3264
3268
|
}
|
|
3265
3269
|
});
|
|
3266
3270
|
}
|
|
3267
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3268
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3271
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipFormField, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3272
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipFormField, isStandalone: true, selector: "sh-form-field", host: { listeners: { "click": "onClick()" } }, ngImport: i0, template: `
|
|
3269
3273
|
<ng-content select="label"></ng-content>
|
|
3270
3274
|
|
|
3271
3275
|
<div class="input-wrap">
|
|
@@ -3296,7 +3300,7 @@ class ShipFormFieldComponent {
|
|
|
3296
3300
|
</div>
|
|
3297
3301
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3298
3302
|
}
|
|
3299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipFormField, decorators: [{
|
|
3300
3304
|
type: Component,
|
|
3301
3305
|
args: [{
|
|
3302
3306
|
selector: 'sh-form-field',
|
|
@@ -3338,7 +3342,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3338
3342
|
args: ['click']
|
|
3339
3343
|
}] } });
|
|
3340
3344
|
|
|
3341
|
-
class
|
|
3345
|
+
class ShipFileUpload {
|
|
3342
3346
|
constructor() {
|
|
3343
3347
|
this._el = inject(ElementRef);
|
|
3344
3348
|
this.inputRef = viewChild.required('input');
|
|
@@ -3387,8 +3391,8 @@ class ShipFileUploadComponent {
|
|
|
3387
3391
|
this.files.set(newFiles);
|
|
3388
3392
|
}
|
|
3389
3393
|
}
|
|
3390
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3391
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3394
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipFileUpload, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3395
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipFileUpload, isStandalone: true, selector: "sh-file-upload", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, overlayText: { classPropertyName: "overlayText", publicName: "overlayText", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { placeholder: "placeholderChange", files: "filesChange" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
3392
3396
|
<sh-form-field [class]="fileUploadClasses()">
|
|
3393
3397
|
<ng-content select="label" ngProjectAs="label"></ng-content>
|
|
3394
3398
|
|
|
@@ -3406,13 +3410,13 @@ class ShipFileUploadComponent {
|
|
|
3406
3410
|
|
|
3407
3411
|
<sh-icon suffix>upload-simple</sh-icon>
|
|
3408
3412
|
</sh-form-field>
|
|
3409
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
3413
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ShipFormField, selector: "sh-form-field" }, { kind: "component", type: ShipIcon, selector: "sh-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3410
3414
|
}
|
|
3411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3415
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipFileUpload, decorators: [{
|
|
3412
3416
|
type: Component,
|
|
3413
3417
|
args: [{
|
|
3414
3418
|
selector: 'sh-file-upload',
|
|
3415
|
-
imports: [
|
|
3419
|
+
imports: [ShipFormField, ShipIcon],
|
|
3416
3420
|
template: `
|
|
3417
3421
|
<sh-form-field [class]="fileUploadClasses()">
|
|
3418
3422
|
<ng-content select="label" ngProjectAs="label"></ng-content>
|
|
@@ -3434,15 +3438,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3434
3438
|
`,
|
|
3435
3439
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3436
3440
|
}]
|
|
3437
|
-
}] });
|
|
3441
|
+
}], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }, { type: i0.Output, args: ["placeholderChange"] }], overlayText: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayText", required: false }] }], files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }, { type: i0.Output, args: ["filesChange"] }] } });
|
|
3438
3442
|
|
|
3439
|
-
class
|
|
3440
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3441
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3443
|
+
class ShipList {
|
|
3444
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3445
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipList, isStandalone: true, selector: "sh-list", ngImport: i0, template: `
|
|
3442
3446
|
<ng-content />
|
|
3443
3447
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3444
3448
|
}
|
|
3445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3449
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipList, decorators: [{
|
|
3446
3450
|
type: Component,
|
|
3447
3451
|
args: [{
|
|
3448
3452
|
selector: 'sh-list',
|
|
@@ -3660,7 +3664,7 @@ function observeChildren(parentEl, elementTags) {
|
|
|
3660
3664
|
};
|
|
3661
3665
|
}
|
|
3662
3666
|
|
|
3663
|
-
class
|
|
3667
|
+
class ShipMenu {
|
|
3664
3668
|
constructor() {
|
|
3665
3669
|
this.#document = inject(DOCUMENT);
|
|
3666
3670
|
this.#renderer = inject(Renderer2);
|
|
@@ -3896,8 +3900,8 @@ class ShipMenuComponent {
|
|
|
3896
3900
|
this.abortController = null;
|
|
3897
3901
|
}
|
|
3898
3902
|
}
|
|
3899
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3900
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3903
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipMenu, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3904
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipMenu, isStandalone: true, selector: "sh-menu", inputs: { asMultiLayer: { classPropertyName: "asMultiLayer", publicName: "asMultiLayer", isSignal: true, isRequired: false, transformFunction: null }, openIndicator: { classPropertyName: "openIndicator", publicName: "openIndicator", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, customOptionElementSelectors: { classPropertyName: "customOptionElementSelectors", publicName: "customOptionElementSelectors", isSignal: true, isRequired: false, transformFunction: null }, keepClickedOptionActive: { classPropertyName: "keepClickedOptionActive", publicName: "keepClickedOptionActive", isSignal: true, isRequired: false, transformFunction: null }, closeOnClick: { classPropertyName: "closeOnClick", publicName: "closeOnClick", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange", closed: "closed" }, host: { properties: { "class.disabled": "disabled()", "class.has-search": "searchable()", "class.multi-layer": "asMultiLayer()" } }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }, { propertyName: "optionsRef", first: true, predicate: ["optionsRef"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
3901
3905
|
<sh-popover
|
|
3902
3906
|
#formFieldWrapper
|
|
3903
3907
|
[(isOpen)]="isOpen"
|
|
@@ -3930,13 +3934,13 @@ class ShipMenuComponent {
|
|
|
3930
3934
|
<ng-content select="[menu]" />
|
|
3931
3935
|
</div>
|
|
3932
3936
|
</sh-popover>
|
|
3933
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
3937
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ShipPopover, selector: "sh-popover", inputs: ["asMultiLayer", "disableOpenByClick", "isOpen", "options"], outputs: ["isOpenChange", "closed"] }, { kind: "component", type: ShipFormField, selector: "sh-form-field" }, { kind: "component", type: ShipIcon, selector: "sh-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3934
3938
|
}
|
|
3935
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3939
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipMenu, decorators: [{
|
|
3936
3940
|
type: Component,
|
|
3937
3941
|
args: [{
|
|
3938
3942
|
selector: 'sh-menu',
|
|
3939
|
-
imports: [
|
|
3943
|
+
imports: [ShipPopover, ShipFormField, ShipIcon],
|
|
3940
3944
|
template: `
|
|
3941
3945
|
<sh-popover
|
|
3942
3946
|
#formFieldWrapper
|
|
@@ -3978,18 +3982,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3978
3982
|
'[class.multi-layer]': 'asMultiLayer()',
|
|
3979
3983
|
},
|
|
3980
3984
|
}]
|
|
3981
|
-
}] });
|
|
3985
|
+
}], propDecorators: { asMultiLayer: [{ type: i0.Input, args: [{ isSignal: true, alias: "asMultiLayer", required: false }] }], openIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "openIndicator", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], customOptionElementSelectors: [{ type: i0.Input, args: [{ isSignal: true, alias: "customOptionElementSelectors", required: false }] }], keepClickedOptionActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepClickedOptionActive", required: false }] }], closeOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnClick", required: false }] }], isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }], closed: [{ type: i0.Output, args: ["closed"] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], inputRef: [{ type: i0.ViewChild, args: ['inputRef', { isSignal: true }] }], optionsRef: [{ type: i0.ViewChild, args: ['optionsRef', { isSignal: true }] }] } });
|
|
3982
3986
|
|
|
3983
|
-
class
|
|
3987
|
+
class ShipProgressBar {
|
|
3984
3988
|
constructor() {
|
|
3985
3989
|
this.value = input(undefined, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
3986
3990
|
}
|
|
3987
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3988
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
3991
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipProgressBar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3992
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: ShipProgressBar, isStandalone: true, selector: "sh-progress-bar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
3989
3993
|
<div class="progress-bar" [style.width.%]="value()"></div>
|
|
3990
3994
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3991
3995
|
}
|
|
3992
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipProgressBar, decorators: [{
|
|
3993
3997
|
type: Component,
|
|
3994
3998
|
args: [{
|
|
3995
3999
|
selector: 'sh-progress-bar',
|
|
@@ -3999,20 +4003,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3999
4003
|
`,
|
|
4000
4004
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4001
4005
|
}]
|
|
4002
|
-
}] });
|
|
4006
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
|
|
4003
4007
|
|
|
4004
|
-
class
|
|
4008
|
+
class ShipRadio {
|
|
4005
4009
|
constructor() {
|
|
4006
4010
|
this.currentClassList = classMutationSignal();
|
|
4007
4011
|
}
|
|
4008
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4009
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
4012
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipRadio, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4013
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipRadio, isStandalone: true, selector: "sh-radio", ngImport: i0, template: `
|
|
4010
4014
|
<div class="radio sh-sheet" [class]="currentClassList()"></div>
|
|
4011
4015
|
|
|
4012
4016
|
<ng-content />
|
|
4013
4017
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4014
4018
|
}
|
|
4015
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4019
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipRadio, decorators: [{
|
|
4016
4020
|
type: Component,
|
|
4017
4021
|
args: [{
|
|
4018
4022
|
selector: 'sh-radio',
|
|
@@ -4026,7 +4030,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4026
4030
|
}]
|
|
4027
4031
|
}] });
|
|
4028
4032
|
|
|
4029
|
-
class
|
|
4033
|
+
class ShipRangeSlider {
|
|
4030
4034
|
constructor() {
|
|
4031
4035
|
this.#selfRef = inject((ElementRef));
|
|
4032
4036
|
this.#observer = null;
|
|
@@ -4083,7 +4087,7 @@ class ShipRangeSliderComponent {
|
|
|
4083
4087
|
this.#setupMutationObserver();
|
|
4084
4088
|
}
|
|
4085
4089
|
else {
|
|
4086
|
-
console.error('
|
|
4090
|
+
console.error('ShipRangeSlider: No <input type="range"> element found projected inside.');
|
|
4087
4091
|
}
|
|
4088
4092
|
}
|
|
4089
4093
|
setNewInputValue(value) {
|
|
@@ -4207,8 +4211,8 @@ class ShipRangeSliderComponent {
|
|
|
4207
4211
|
this.#inputElement.oninput = null;
|
|
4208
4212
|
}
|
|
4209
4213
|
}
|
|
4210
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4211
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
4214
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipRangeSlider, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4215
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: ShipRangeSlider, isStandalone: true, selector: "sh-range-slider", inputs: { unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class.has-input": "this.hasInputElement" } }, ngImport: i0, template: `
|
|
4212
4216
|
<div class="label">
|
|
4213
4217
|
<ng-content select="label"></ng-content>
|
|
4214
4218
|
</div>
|
|
@@ -4234,7 +4238,7 @@ class ShipRangeSliderComponent {
|
|
|
4234
4238
|
</div>
|
|
4235
4239
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4236
4240
|
}
|
|
4237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipRangeSlider, decorators: [{
|
|
4238
4242
|
type: Component,
|
|
4239
4243
|
args: [{
|
|
4240
4244
|
selector: 'sh-range-slider',
|
|
@@ -4266,16 +4270,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4266
4270
|
`,
|
|
4267
4271
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4268
4272
|
}]
|
|
4269
|
-
}], propDecorators: { hasInputElement: [{
|
|
4273
|
+
}], propDecorators: { unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], hasInputElement: [{
|
|
4270
4274
|
type: HostBinding,
|
|
4271
4275
|
args: ['class.has-input']
|
|
4272
4276
|
}] } });
|
|
4273
4277
|
|
|
4274
|
-
class
|
|
4275
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4276
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
4278
|
+
class ShipSpinner {
|
|
4279
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipSpinner, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4280
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipSpinner, isStandalone: true, selector: "sh-spinner", ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4277
4281
|
}
|
|
4278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4282
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipSpinner, decorators: [{
|
|
4279
4283
|
type: Component,
|
|
4280
4284
|
args: [{
|
|
4281
4285
|
selector: 'sh-spinner',
|
|
@@ -4285,7 +4289,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4285
4289
|
}]
|
|
4286
4290
|
}] });
|
|
4287
4291
|
|
|
4288
|
-
class
|
|
4292
|
+
class ShipSelect {
|
|
4289
4293
|
constructor() {
|
|
4290
4294
|
this.#selfRef = inject((ElementRef));
|
|
4291
4295
|
this.value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
@@ -4848,8 +4852,8 @@ class ShipSelectComponent {
|
|
|
4848
4852
|
this.#inputObserver.disconnect();
|
|
4849
4853
|
}
|
|
4850
4854
|
}
|
|
4851
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4852
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
4855
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipSelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4856
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipSelect, isStandalone: true, selector: "sh-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, asFreeText: { classPropertyName: "asFreeText", publicName: "asFreeText", isSignal: true, isRequired: false, transformFunction: null }, optionTitle: { classPropertyName: "optionTitle", publicName: "optionTitle", isSignal: true, isRequired: false, transformFunction: null }, freeTextTitle: { classPropertyName: "freeTextTitle", publicName: "freeTextTitle", isSignal: true, isRequired: false, transformFunction: null }, freeTextPlaceholder: { classPropertyName: "freeTextPlaceholder", publicName: "freeTextPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, validateFreeText: { classPropertyName: "validateFreeText", publicName: "validateFreeText", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, lazySearch: { classPropertyName: "lazySearch", publicName: "lazySearch", isSignal: true, isRequired: false, transformFunction: null }, inlineSearch: { classPropertyName: "inlineSearch", publicName: "inlineSearch", isSignal: true, isRequired: false, transformFunction: null }, asText: { classPropertyName: "asText", publicName: "asText", isSignal: true, isRequired: false, transformFunction: null }, isClearable: { classPropertyName: "isClearable", publicName: "isClearable", isSignal: true, isRequired: false, transformFunction: null }, selectMultiple: { classPropertyName: "selectMultiple", publicName: "selectMultiple", isSignal: true, isRequired: false, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, selectedOptionTemplate: { classPropertyName: "selectedOptionTemplate", publicName: "selectedOptionTemplate", isSignal: true, isRequired: false, transformFunction: null }, placeholderTemplate: { classPropertyName: "placeholderTemplate", publicName: "placeholderTemplate", isSignal: true, isRequired: false, transformFunction: null }, freeTextOptionTemplate: { classPropertyName: "freeTextOptionTemplate", publicName: "freeTextOptionTemplate", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, selectedOptions: { classPropertyName: "selectedOptions", publicName: "selectedOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { readonly: "readonlyChange", disabled: "disabledChange", isOpen: "isOpenChange", isLoading: "isLoadingChange", options: "optionsChange", selectedOptions: "selectedOptionsChange", cleared: "cleared", onAddNewFreeTextOption: "onAddNewFreeTextOption" }, host: { properties: { "class.multiple": "selectMultiple()" } }, queries: [{ propertyName: "inlineTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "optionsWrapRef", first: true, predicate: ["optionsWrap"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
4853
4857
|
@let _placeholderTemplate = placeholderTemplate();
|
|
4854
4858
|
@let _optionTemplate = optionTemplate();
|
|
4855
4859
|
@let _freeTextOptionTemplate = freeTextOptionTemplate();
|
|
@@ -5002,22 +5006,13 @@ class ShipSelectComponent {
|
|
|
5002
5006
|
}
|
|
5003
5007
|
</div>
|
|
5004
5008
|
</sh-popover>
|
|
5005
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type:
|
|
5009
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ShipPopover, selector: "sh-popover", inputs: ["asMultiLayer", "disableOpenByClick", "isOpen", "options"], outputs: ["isOpenChange", "closed"] }, { kind: "component", type: ShipFormField, selector: "sh-form-field" }, { kind: "component", type: ShipIcon, selector: "sh-icon" }, { kind: "component", type: ShipCheckbox, selector: "sh-checkbox" }, { kind: "component", type: ShipSpinner, selector: "sh-spinner" }, { kind: "component", type: ShipChip, selector: "sh-chip" }, { kind: "component", type: ShipDivider, selector: "sh-divider" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5006
5010
|
}
|
|
5007
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5011
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipSelect, decorators: [{
|
|
5008
5012
|
type: Component,
|
|
5009
5013
|
args: [{
|
|
5010
5014
|
selector: 'sh-select',
|
|
5011
|
-
imports: [
|
|
5012
|
-
NgTemplateOutlet,
|
|
5013
|
-
ShipPopoverComponent,
|
|
5014
|
-
ShipFormFieldComponent,
|
|
5015
|
-
ShipIconComponent,
|
|
5016
|
-
ShipCheckboxComponent,
|
|
5017
|
-
ShipSpinnerComponent,
|
|
5018
|
-
ShipChipComponent,
|
|
5019
|
-
ShipDividerComponent,
|
|
5020
|
-
],
|
|
5015
|
+
imports: [NgTemplateOutlet, ShipPopover, ShipFormField, ShipIcon, ShipCheckbox, ShipSpinner, ShipChip, ShipDivider],
|
|
5021
5016
|
template: `
|
|
5022
5017
|
@let _placeholderTemplate = placeholderTemplate();
|
|
5023
5018
|
@let _optionTemplate = optionTemplate();
|
|
@@ -5177,7 +5172,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5177
5172
|
},
|
|
5178
5173
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5179
5174
|
}]
|
|
5180
|
-
}] });
|
|
5175
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], asFreeText: [{ type: i0.Input, args: [{ isSignal: true, alias: "asFreeText", required: false }] }], optionTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTitle", required: false }] }], freeTextTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "freeTextTitle", required: false }] }], freeTextPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "freeTextPlaceholder", required: false }] }], validateFreeText: [{ type: i0.Input, args: [{ isSignal: true, alias: "validateFreeText", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }, { type: i0.Output, args: ["readonlyChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], lazySearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazySearch", required: false }] }], inlineSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "inlineSearch", required: false }] }], asText: [{ type: i0.Input, args: [{ isSignal: true, alias: "asText", required: false }] }], isClearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "isClearable", required: false }] }], selectMultiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectMultiple", required: false }] }], optionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTemplate", required: false }] }], selectedOptionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedOptionTemplate", required: false }] }], placeholderTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholderTemplate", required: false }] }], freeTextOptionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "freeTextOptionTemplate", required: false }] }], isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }, { type: i0.Output, args: ["isLoadingChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }, { type: i0.Output, args: ["optionsChange"] }], selectedOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedOptions", required: false }] }, { type: i0.Output, args: ["selectedOptionsChange"] }], cleared: [{ type: i0.Output, args: ["cleared"] }], onAddNewFreeTextOption: [{ type: i0.Output, args: ["onAddNewFreeTextOption"] }], inlineTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], optionsWrapRef: [{ type: i0.ViewChild, args: ['optionsWrap', { isSignal: true }] }] } });
|
|
5181
5176
|
|
|
5182
5177
|
function watchHostClass(className) {
|
|
5183
5178
|
const elementRef = inject(ElementRef);
|
|
@@ -5204,7 +5199,7 @@ function watchHostClass(className) {
|
|
|
5204
5199
|
});
|
|
5205
5200
|
return hasClass;
|
|
5206
5201
|
}
|
|
5207
|
-
class
|
|
5202
|
+
class ShipSidenav {
|
|
5208
5203
|
constructor() {
|
|
5209
5204
|
this.#document = inject(DOCUMENT);
|
|
5210
5205
|
this.#selfRef = inject(ElementRef);
|
|
@@ -5325,8 +5320,8 @@ class ShipSidenavComponent {
|
|
|
5325
5320
|
e.stopPropagation();
|
|
5326
5321
|
this.isDragging.set(false);
|
|
5327
5322
|
}
|
|
5328
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5329
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
5323
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipSidenav, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5324
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipSidenav, isStandalone: true, selector: "sh-sidenav", inputs: { disableDrag: { classPropertyName: "disableDrag", publicName: "disableDrag", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange" }, host: { properties: { "class.open": "isOpen()", "class.closed": "!isOpen()", "class.is-dragging": "isDragging()" } }, viewQueries: [{ propertyName: "dragImageElement", first: true, predicate: ["dragImageElement"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
5330
5325
|
@if (isOverlay() && !disableDrag()) {
|
|
5331
5326
|
<div #dragImageElement class="drag-image"></div>
|
|
5332
5327
|
}
|
|
@@ -5363,7 +5358,7 @@ class ShipSidenavComponent {
|
|
|
5363
5358
|
</div>
|
|
5364
5359
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5365
5360
|
}
|
|
5366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipSidenav, decorators: [{
|
|
5367
5362
|
type: Component,
|
|
5368
5363
|
args: [{
|
|
5369
5364
|
selector: 'sh-sidenav',
|
|
@@ -5410,9 +5405,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5410
5405
|
'[class.is-dragging]': 'isDragging()',
|
|
5411
5406
|
},
|
|
5412
5407
|
}]
|
|
5413
|
-
}] });
|
|
5408
|
+
}], propDecorators: { disableDrag: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableDrag", required: false }] }], isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }], dragImageElement: [{ type: i0.ViewChild, args: ['dragImageElement', { isSignal: true }] }] } });
|
|
5414
5409
|
|
|
5415
|
-
class
|
|
5410
|
+
class GridSortable {
|
|
5416
5411
|
#selfRef = inject((ElementRef));
|
|
5417
5412
|
#renderer = inject(Renderer2);
|
|
5418
5413
|
#draggedItem = null;
|
|
@@ -5442,10 +5437,10 @@ class GridSortableDirective {
|
|
|
5442
5437
|
}
|
|
5443
5438
|
});
|
|
5444
5439
|
}
|
|
5445
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5446
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
5440
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: GridSortable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5441
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: GridSortable, isStandalone: true, selector: "[shGridSortable]", host: { listeners: { "dragstart": "onDragStart($event)", "dragover": "onDragOver($event)", "dragenter": "onDragEnter($event)" } }, ngImport: i0 }); }
|
|
5447
5442
|
}
|
|
5448
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: GridSortable, decorators: [{
|
|
5449
5444
|
type: Directive,
|
|
5450
5445
|
args: [{
|
|
5451
5446
|
standalone: true,
|
|
@@ -5462,47 +5457,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5462
5457
|
args: ['dragenter', ['$event']]
|
|
5463
5458
|
}] } });
|
|
5464
5459
|
|
|
5465
|
-
class
|
|
5466
|
-
constructor() {
|
|
5467
|
-
this.templateOne = contentChild.required('templateOne');
|
|
5468
|
-
this.templateTwo = contentChild.required('templateTwo');
|
|
5469
|
-
this.placeholderRef = viewChild.required('placeholderRef');
|
|
5470
|
-
this.items = model([], ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
5471
|
-
}
|
|
5472
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ShipSortableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5473
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: ShipSortableComponent, isStandalone: true, selector: "sh-sortable", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { items: "itemsChange" }, queries: [{ propertyName: "templateOne", first: true, predicate: ["templateOne"], descendants: true, isSignal: true }, { propertyName: "templateTwo", first: true, predicate: ["templateTwo"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "placeholderRef", first: true, predicate: ["placeholderRef"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
5474
|
-
<div class="placeholder" #placeholderRef></div>
|
|
5475
|
-
|
|
5476
|
-
@for (item of items(); track $index) {
|
|
5477
|
-
@if ($index === 0) {
|
|
5478
|
-
<ng-container *ngTemplateOutlet="templateOne(); context: { $implicit: item }"></ng-container>
|
|
5479
|
-
} @else {
|
|
5480
|
-
<ng-container *ngTemplateOutlet="templateTwo(); context: { $implicit: item }"></ng-container>
|
|
5481
|
-
}
|
|
5482
|
-
}
|
|
5483
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5484
|
-
}
|
|
5485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ShipSortableComponent, decorators: [{
|
|
5486
|
-
type: Component,
|
|
5487
|
-
args: [{
|
|
5488
|
-
selector: 'sh-sortable',
|
|
5489
|
-
imports: [NgTemplateOutlet],
|
|
5490
|
-
template: `
|
|
5491
|
-
<div class="placeholder" #placeholderRef></div>
|
|
5492
|
-
|
|
5493
|
-
@for (item of items(); track $index) {
|
|
5494
|
-
@if ($index === 0) {
|
|
5495
|
-
<ng-container *ngTemplateOutlet="templateOne(); context: { $implicit: item }"></ng-container>
|
|
5496
|
-
} @else {
|
|
5497
|
-
<ng-container *ngTemplateOutlet="templateTwo(); context: { $implicit: item }"></ng-container>
|
|
5498
|
-
}
|
|
5499
|
-
}
|
|
5500
|
-
`,
|
|
5501
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5502
|
-
}]
|
|
5503
|
-
}] });
|
|
5504
|
-
|
|
5505
|
-
class ShipSortableDirective {
|
|
5460
|
+
class ShipSortable {
|
|
5506
5461
|
constructor() {
|
|
5507
5462
|
this.#document = inject(DOCUMENT);
|
|
5508
5463
|
this.#selfEl = inject((ElementRef));
|
|
@@ -5718,16 +5673,16 @@ class ShipSortableDirective {
|
|
|
5718
5673
|
this.#dragableObserver?.disconnect();
|
|
5719
5674
|
this.abortController?.abort();
|
|
5720
5675
|
}
|
|
5721
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5722
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
5676
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipSortable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5677
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: ShipSortable, isStandalone: true, selector: "[shSortable]", outputs: { afterDrop: "afterDrop" }, host: { listeners: { "dragover": "dragOver($event)", "drop": "drop()" } }, ngImport: i0 }); }
|
|
5723
5678
|
}
|
|
5724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5679
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipSortable, decorators: [{
|
|
5725
5680
|
type: Directive,
|
|
5726
5681
|
args: [{
|
|
5727
5682
|
selector: '[shSortable]',
|
|
5728
5683
|
standalone: true,
|
|
5729
5684
|
}]
|
|
5730
|
-
}], propDecorators: { dragOver: [{
|
|
5685
|
+
}], propDecorators: { afterDrop: [{ type: i0.Output, args: ["afterDrop"] }], dragOver: [{
|
|
5731
5686
|
type: HostListener,
|
|
5732
5687
|
args: ['dragover', ['$event']]
|
|
5733
5688
|
}], drop: [{
|
|
@@ -5745,13 +5700,13 @@ function moveIndex(array, event) {
|
|
|
5745
5700
|
return newArray;
|
|
5746
5701
|
}
|
|
5747
5702
|
|
|
5748
|
-
class
|
|
5749
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5750
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
5703
|
+
class ShipStepper {
|
|
5704
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipStepper, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5705
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipStepper, isStandalone: true, selector: "sh-stepper", ngImport: i0, template: `
|
|
5751
5706
|
<ng-content />
|
|
5752
5707
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5753
5708
|
}
|
|
5754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipStepper, decorators: [{
|
|
5755
5710
|
type: Component,
|
|
5756
5711
|
args: [{
|
|
5757
5712
|
selector: 'sh-stepper',
|
|
@@ -5763,11 +5718,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5763
5718
|
}]
|
|
5764
5719
|
}] });
|
|
5765
5720
|
|
|
5766
|
-
class
|
|
5721
|
+
class ShipResize {
|
|
5767
5722
|
constructor() {
|
|
5768
5723
|
this.#el = inject(ElementRef);
|
|
5769
5724
|
this.#renderer = inject(Renderer2);
|
|
5770
|
-
this.#table = inject(
|
|
5725
|
+
this.#table = inject(ShipTable);
|
|
5771
5726
|
this.resizable = input(true, ...(ngDevMode ? [{ debugName: "resizable" }] : []));
|
|
5772
5727
|
this.minWidth = input(50, ...(ngDevMode ? [{ debugName: "minWidth" }] : []));
|
|
5773
5728
|
this.maxWidth = input(null, ...(ngDevMode ? [{ debugName: "maxWidth" }] : []));
|
|
@@ -5842,16 +5797,16 @@ class ShipResizeDirective {
|
|
|
5842
5797
|
cancelAnimationFrame(this.#animationFrameRequest);
|
|
5843
5798
|
}
|
|
5844
5799
|
}
|
|
5845
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5846
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
5800
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipResize, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5801
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: ShipResize, isStandalone: true, selector: "[shResize]", inputs: { resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:mousemove": "onMouseMove($event)", "document:mouseup": "onMouseUp($event)", "document:click": "onClick($event)" } }, ngImport: i0 }); }
|
|
5847
5802
|
}
|
|
5848
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5803
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipResize, decorators: [{
|
|
5849
5804
|
type: Directive,
|
|
5850
5805
|
args: [{
|
|
5851
5806
|
selector: '[shResize]',
|
|
5852
5807
|
standalone: true,
|
|
5853
5808
|
}]
|
|
5854
|
-
}], propDecorators: { onMouseMove: [{
|
|
5809
|
+
}], propDecorators: { resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], onMouseMove: [{
|
|
5855
5810
|
type: HostListener,
|
|
5856
5811
|
args: ['document:mousemove', ['$event']]
|
|
5857
5812
|
}], onMouseUp: [{
|
|
@@ -5861,9 +5816,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5861
5816
|
type: HostListener,
|
|
5862
5817
|
args: ['document:click', ['$event']]
|
|
5863
5818
|
}] } });
|
|
5864
|
-
class
|
|
5819
|
+
class ShipSort {
|
|
5865
5820
|
constructor() {
|
|
5866
|
-
this.#table = inject(
|
|
5821
|
+
this.#table = inject(ShipTable);
|
|
5867
5822
|
this.shSort = input(...(ngDevMode ? [undefined, { debugName: "shSort" }] : []));
|
|
5868
5823
|
this.sortAsc = computed(() => {
|
|
5869
5824
|
const currentSort = this.#table.sortByColumn();
|
|
@@ -5887,10 +5842,10 @@ class ShipSortDirective {
|
|
|
5887
5842
|
return;
|
|
5888
5843
|
this.#table.toggleSort(sortCol);
|
|
5889
5844
|
}
|
|
5890
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5891
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
5845
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipSort, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5846
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: ShipSort, isStandalone: true, selector: "[shSort]", inputs: { shSort: { classPropertyName: "shSort", publicName: "shSort", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "toggleSort()" }, properties: { "class.sort-asc": "sortAsc()", "class.sort-desc": "sortDesc()" }, classAttribute: "sortable" }, ngImport: i0 }); }
|
|
5892
5847
|
}
|
|
5893
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5848
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipSort, decorators: [{
|
|
5894
5849
|
type: Directive,
|
|
5895
5850
|
args: [{
|
|
5896
5851
|
selector: '[shSort]',
|
|
@@ -5902,8 +5857,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5902
5857
|
'[class.sort-desc]': 'sortDesc()',
|
|
5903
5858
|
},
|
|
5904
5859
|
}]
|
|
5905
|
-
}] });
|
|
5906
|
-
class
|
|
5860
|
+
}], propDecorators: { shSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "shSort", required: false }] }] } });
|
|
5861
|
+
class ShipStickyColumns {
|
|
5907
5862
|
constructor() {
|
|
5908
5863
|
this.#elementRef = inject(ElementRef);
|
|
5909
5864
|
this.#renderer = inject(Renderer2);
|
|
@@ -5923,10 +5878,10 @@ class ShipStickyColumnsDirective {
|
|
|
5923
5878
|
this.#renderer.setStyle(nativeElement, 'grid-column', position === 'end' ? `-${columnSpanCount + 1} / -1` : `1 / ${columnSpanCount + 1}`);
|
|
5924
5879
|
}
|
|
5925
5880
|
}
|
|
5926
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5927
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
5881
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipStickyColumns, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5882
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: ShipStickyColumns, isStandalone: true, selector: "[shStickyColumns]", inputs: { shStickyColumns: { classPropertyName: "shStickyColumns", publicName: "shStickyColumns", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.sticky": "shStickyColumns() === \"start\"", "class.sticky-end": "shStickyColumns() === \"end\"" } }, ngImport: i0 }); }
|
|
5928
5883
|
}
|
|
5929
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5884
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipStickyColumns, decorators: [{
|
|
5930
5885
|
type: Directive,
|
|
5931
5886
|
args: [{
|
|
5932
5887
|
selector: '[shStickyColumns]',
|
|
@@ -5935,9 +5890,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5935
5890
|
'[class.sticky-end]': 'shStickyColumns() === "end"',
|
|
5936
5891
|
},
|
|
5937
5892
|
}]
|
|
5938
|
-
}] });
|
|
5893
|
+
}], propDecorators: { shStickyColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "shStickyColumns", required: false }] }] } });
|
|
5939
5894
|
const SCROLL_TOLERANCE = 1.5;
|
|
5940
|
-
class
|
|
5895
|
+
class ShipTable {
|
|
5941
5896
|
constructor() {
|
|
5942
5897
|
this.#el = inject(ElementRef);
|
|
5943
5898
|
this.#shConfig = inject(SHIP_CONFIG, { optional: true });
|
|
@@ -6080,8 +6035,8 @@ class ShipTableComponent {
|
|
|
6080
6035
|
this.scrollYState.set(nextYState);
|
|
6081
6036
|
this.canScrollY.set(canScrollY);
|
|
6082
6037
|
}
|
|
6083
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6084
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
6038
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipTable, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6039
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipTable, isStandalone: true, selector: "sh-table", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, sortByColumn: { classPropertyName: "sortByColumn", publicName: "sortByColumn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dataChange: "dataChange", sortByColumn: "sortByColumnChange" }, host: { listeners: { "scroll": "onScroll()", "window:resize": "onResize($event)" }, properties: { "class": "class()", "style.grid-template-columns": "columnSizes()", "class.resizing": "resizing()", "class.can-scroll-x": "canScrollX()", "class.can-scroll-y": "canScrollY()", "class.scrolled-x": "scrollXState() >= 0", "class.scrolled-x-end": "scrollXState() === 1", "class.scrolled-y": "scrollYState() >= 0", "class.scrolled-y-end": "scrollYState() === 1" } }, viewQueries: [{ propertyName: "thead", first: true, predicate: ["thead"], descendants: true, isSignal: true }, { propertyName: "tbody", first: true, predicate: ["tbody"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
6085
6040
|
@if (loading()) {
|
|
6086
6041
|
<sh-progress-bar class="indeterminate primary" />
|
|
6087
6042
|
}
|
|
@@ -6100,13 +6055,13 @@ class ShipTableComponent {
|
|
|
6100
6055
|
<ng-content select="[table-no-rows]" />
|
|
6101
6056
|
</div>
|
|
6102
6057
|
}
|
|
6103
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
6058
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ShipProgressBar, selector: "sh-progress-bar", inputs: ["value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6104
6059
|
}
|
|
6105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6060
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipTable, decorators: [{
|
|
6106
6061
|
type: Component,
|
|
6107
6062
|
args: [{
|
|
6108
6063
|
selector: 'sh-table',
|
|
6109
|
-
imports: [
|
|
6064
|
+
imports: [ShipProgressBar],
|
|
6110
6065
|
template: `
|
|
6111
6066
|
@if (loading()) {
|
|
6112
6067
|
<sh-progress-bar class="indeterminate primary" />
|
|
@@ -6141,21 +6096,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6141
6096
|
'[class.scrolled-y-end]': 'scrollYState() === 1',
|
|
6142
6097
|
},
|
|
6143
6098
|
}]
|
|
6144
|
-
}], propDecorators: { onResize: [{
|
|
6099
|
+
}], propDecorators: { loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], dataChange: [{ type: i0.Output, args: ["dataChange"] }], sortByColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortByColumn", required: false }] }, { type: i0.Output, args: ["sortByColumnChange"] }], thead: [{ type: i0.ViewChild, args: ['thead', { isSignal: true }] }], tbody: [{ type: i0.ViewChild, args: ['tbody', { isSignal: true }] }], onResize: [{
|
|
6145
6100
|
type: HostListener,
|
|
6146
6101
|
args: ['window:resize', ['$event']]
|
|
6147
6102
|
}] } });
|
|
6148
6103
|
|
|
6149
|
-
class
|
|
6104
|
+
class ShipTabs {
|
|
6150
6105
|
constructor() {
|
|
6151
6106
|
this.id = '--' + Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 12);
|
|
6152
6107
|
}
|
|
6153
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6154
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
6108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipTabs, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6109
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipTabs, isStandalone: true, selector: "sh-tabs", host: { properties: { "style.--tabs-id": "id" } }, ngImport: i0, template: `
|
|
6155
6110
|
<ng-content />
|
|
6156
6111
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6157
6112
|
}
|
|
6158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipTabs, decorators: [{
|
|
6159
6114
|
type: Component,
|
|
6160
6115
|
args: [{
|
|
6161
6116
|
selector: 'sh-tabs',
|
|
@@ -6170,7 +6125,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6170
6125
|
}]
|
|
6171
6126
|
}] });
|
|
6172
6127
|
|
|
6173
|
-
class
|
|
6128
|
+
class ShipToggleCard {
|
|
6174
6129
|
constructor() {
|
|
6175
6130
|
this.isActive = model(false, ...(ngDevMode ? [{ debugName: "isActive" }] : []));
|
|
6176
6131
|
this.disallowToggle = input(false, ...(ngDevMode ? [{ debugName: "disallowToggle" }] : []));
|
|
@@ -6183,8 +6138,8 @@ class ShipToggleCardComponent {
|
|
|
6183
6138
|
toggle() {
|
|
6184
6139
|
this.isActive.set(!this.isActive());
|
|
6185
6140
|
}
|
|
6186
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6187
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
6141
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipToggleCard, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6142
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ShipToggleCard, isStandalone: true, selector: "sh-toggle-card", inputs: { isActive: { classPropertyName: "isActive", publicName: "isActive", isSignal: true, isRequired: false, transformFunction: null }, disallowToggle: { classPropertyName: "disallowToggle", publicName: "disallowToggle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isActive: "isActiveChange" }, host: { properties: { "class.active": "isActive()" } }, ngImport: i0, template: `
|
|
6188
6143
|
<h3 (click)="disallowToggle() || toggle()">
|
|
6189
6144
|
<ng-content select="[title]">Title</ng-content>
|
|
6190
6145
|
|
|
@@ -6198,13 +6153,13 @@ class ShipToggleCardComponent {
|
|
|
6198
6153
|
<ng-content />
|
|
6199
6154
|
</div>
|
|
6200
6155
|
</div>
|
|
6201
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
6156
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ShipIcon, selector: "sh-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6202
6157
|
}
|
|
6203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipToggleCard, decorators: [{
|
|
6204
6159
|
type: Component,
|
|
6205
6160
|
args: [{
|
|
6206
6161
|
selector: 'sh-toggle-card',
|
|
6207
|
-
imports: [
|
|
6162
|
+
imports: [ShipIcon],
|
|
6208
6163
|
template: `
|
|
6209
6164
|
<h3 (click)="disallowToggle() || toggle()">
|
|
6210
6165
|
<ng-content select="[title]">Title</ng-content>
|
|
@@ -6225,11 +6180,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6225
6180
|
'[class.active]': 'isActive()',
|
|
6226
6181
|
},
|
|
6227
6182
|
}]
|
|
6228
|
-
}] });
|
|
6183
|
+
}], propDecorators: { isActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "isActive", required: false }] }, { type: i0.Output, args: ["isActiveChange"] }], disallowToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "disallowToggle", required: false }] }] } });
|
|
6229
6184
|
|
|
6230
|
-
class
|
|
6231
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6232
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
6185
|
+
class ShipToggle {
|
|
6186
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipToggle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6187
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: ShipToggle, isStandalone: true, selector: "sh-toggle", ngImport: i0, template: `
|
|
6233
6188
|
<div class="box">
|
|
6234
6189
|
<div class="knob"></div>
|
|
6235
6190
|
</div>
|
|
@@ -6237,7 +6192,7 @@ class ShipToggleComponent {
|
|
|
6237
6192
|
<ng-content />
|
|
6238
6193
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6239
6194
|
}
|
|
6240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipToggle, decorators: [{
|
|
6241
6196
|
type: Component,
|
|
6242
6197
|
args: [{
|
|
6243
6198
|
selector: 'sh-toggle',
|
|
@@ -6253,165 +6208,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6253
6208
|
}]
|
|
6254
6209
|
}] });
|
|
6255
6210
|
|
|
6256
|
-
class
|
|
6257
|
-
constructor() {
|
|
6258
|
-
this.#document = inject(DOCUMENT);
|
|
6259
|
-
this.#BASE_SPACE = 4;
|
|
6260
|
-
this.SUPPORTS_ANCHOR = CSS.supports('position-anchor', '--abc') && CSS.supports('anchor-name', '--abc');
|
|
6261
|
-
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
6262
|
-
this.above = input(false, ...(ngDevMode ? [{ debugName: "above" }] : []));
|
|
6263
|
-
this.right = input(false, ...(ngDevMode ? [{ debugName: "right" }] : []));
|
|
6264
|
-
this._above = signal(this.above(), ...(ngDevMode ? [{ debugName: "_above" }] : []));
|
|
6265
|
-
this._right = signal(this.right(), ...(ngDevMode ? [{ debugName: "_right" }] : []));
|
|
6266
|
-
this.message = input.required(...(ngDevMode ? [{ debugName: "message" }] : []));
|
|
6267
|
-
this.isOpen = model(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
6268
|
-
this.closed = output();
|
|
6269
|
-
this.triggerRef = viewChild.required('triggerRef');
|
|
6270
|
-
this.tooltipRef = viewChild.required('tooltipRef');
|
|
6271
|
-
this.id = signal('--' + generateUniqueId(), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
6272
|
-
this.menuStyle = signal(null, ...(ngDevMode ? [{ debugName: "menuStyle" }] : []));
|
|
6273
|
-
this.isCalculatingPosition = computed(() => {
|
|
6274
|
-
const tooltipEl = this.tooltipRef()?.nativeElement;
|
|
6275
|
-
const open = this.isOpen();
|
|
6276
|
-
if (open) {
|
|
6277
|
-
tooltipEl?.showPopover();
|
|
6278
|
-
return true;
|
|
6279
|
-
}
|
|
6280
|
-
else {
|
|
6281
|
-
tooltipEl.hidePopover();
|
|
6282
|
-
this.abortController?.abort();
|
|
6283
|
-
this.closed.emit();
|
|
6284
|
-
return false;
|
|
6285
|
-
}
|
|
6286
|
-
}, ...(ngDevMode ? [{ debugName: "isCalculatingPosition" }] : []));
|
|
6287
|
-
this.abortController = null;
|
|
6288
|
-
this.calcPositionEffect = effect(() => {
|
|
6289
|
-
const isCalculatingPosition = this.isCalculatingPosition();
|
|
6290
|
-
if (!isCalculatingPosition)
|
|
6291
|
-
return;
|
|
6292
|
-
if (this.abortController) {
|
|
6293
|
-
this.abortController.abort();
|
|
6294
|
-
}
|
|
6295
|
-
this.abortController = new AbortController();
|
|
6296
|
-
const signal = this.abortController.signal;
|
|
6297
|
-
this.calculateMenuPosition();
|
|
6298
|
-
const scrollableParent = this.#findScrollableParent(this.tooltipRef()?.nativeElement);
|
|
6299
|
-
scrollableParent.addEventListener('scroll', () => this.calculateMenuPosition(), { signal });
|
|
6300
|
-
this.#document.addEventListener('resize', () => this.calculateMenuPosition(), { signal });
|
|
6301
|
-
}, ...(ngDevMode ? [{ debugName: "calcPositionEffect" }] : []));
|
|
6302
|
-
this.scrollableStyles = ['scroll', 'auto'];
|
|
6303
|
-
}
|
|
6304
|
-
#document;
|
|
6305
|
-
#BASE_SPACE;
|
|
6306
|
-
#findScrollableParent(element) {
|
|
6307
|
-
let parent = element.parentElement;
|
|
6308
|
-
while (parent) {
|
|
6309
|
-
if (this.scrollableStyles.indexOf(window?.getComputedStyle(parent).overflowY) > -1 &&
|
|
6310
|
-
parent.scrollHeight > parent.clientHeight) {
|
|
6311
|
-
return parent;
|
|
6312
|
-
}
|
|
6313
|
-
parent = parent.parentElement;
|
|
6314
|
-
}
|
|
6315
|
-
return this.#document.documentElement;
|
|
6316
|
-
}
|
|
6317
|
-
eventClose($event) {
|
|
6318
|
-
$event.stopPropagation();
|
|
6319
|
-
$event.preventDefault();
|
|
6320
|
-
this.isOpen.set(false);
|
|
6321
|
-
}
|
|
6322
|
-
ngOnDestroy() {
|
|
6323
|
-
if (this.abortController) {
|
|
6324
|
-
this.abortController.abort();
|
|
6325
|
-
}
|
|
6326
|
-
}
|
|
6327
|
-
calculateMenuPosition() {
|
|
6328
|
-
const triggerRect = this.triggerRef()?.nativeElement.getBoundingClientRect();
|
|
6329
|
-
const menuRect = this.tooltipRef()?.nativeElement.getBoundingClientRect();
|
|
6330
|
-
const actionLeftInViewport = triggerRect.left;
|
|
6331
|
-
const actionBottomInViewport = triggerRect.bottom;
|
|
6332
|
-
let newLeft = actionLeftInViewport;
|
|
6333
|
-
let newTop = actionBottomInViewport + this.#BASE_SPACE;
|
|
6334
|
-
const outOfBoundsRight = newLeft + menuRect.width > window?.innerWidth;
|
|
6335
|
-
const outOfBoundsBottom = newTop + menuRect.height > window?.innerHeight;
|
|
6336
|
-
if (this.SUPPORTS_ANCHOR) {
|
|
6337
|
-
this._above.set(outOfBoundsBottom);
|
|
6338
|
-
this._right.set(outOfBoundsRight);
|
|
6339
|
-
}
|
|
6340
|
-
else {
|
|
6341
|
-
if (this.above()) {
|
|
6342
|
-
const _newTop = triggerRect.top - menuRect.height - this.#BASE_SPACE;
|
|
6343
|
-
if (_newTop >= 0) {
|
|
6344
|
-
newTop = _newTop;
|
|
6345
|
-
}
|
|
6346
|
-
}
|
|
6347
|
-
else {
|
|
6348
|
-
if (outOfBoundsBottom) {
|
|
6349
|
-
newTop = triggerRect.top - menuRect.height - this.#BASE_SPACE;
|
|
6350
|
-
}
|
|
6351
|
-
}
|
|
6352
|
-
if (this.right()) {
|
|
6353
|
-
const _newLeft = triggerRect.right - menuRect.width;
|
|
6354
|
-
if (_newLeft >= 0) {
|
|
6355
|
-
newLeft = _newLeft;
|
|
6356
|
-
}
|
|
6357
|
-
}
|
|
6358
|
-
else {
|
|
6359
|
-
if (outOfBoundsRight) {
|
|
6360
|
-
newTop = outOfBoundsBottom ? triggerRect.top + triggerRect.height - menuRect.height : triggerRect.top;
|
|
6361
|
-
newLeft = triggerRect.left - menuRect.width - this.#BASE_SPACE;
|
|
6362
|
-
}
|
|
6363
|
-
}
|
|
6364
|
-
this.menuStyle.set({
|
|
6365
|
-
left: newLeft + 'px',
|
|
6366
|
-
top: newTop + 'px',
|
|
6367
|
-
});
|
|
6368
|
-
}
|
|
6369
|
-
}
|
|
6370
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ShipTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6371
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.0", type: ShipTooltipComponent, isStandalone: true, selector: "sh-tooltip", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, above: { classPropertyName: "above", publicName: "above", isSignal: true, isRequired: false, transformFunction: null }, right: { classPropertyName: "right", publicName: "right", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange", closed: "closed" }, host: { properties: { "class.above": "_above()", "class.right": "_right()", "class.disabled": "disabled()" } }, viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["triggerRef"], descendants: true, isSignal: true }, { propertyName: "tooltipRef", first: true, predicate: ["tooltipRef"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
6372
|
-
<div
|
|
6373
|
-
class="trigger"
|
|
6374
|
-
#triggerRef
|
|
6375
|
-
[style.anchor-name]="id()"
|
|
6376
|
-
(mouseover)="isOpen.set(true)"
|
|
6377
|
-
(mouseout)="isOpen.set(false)">
|
|
6378
|
-
<ng-content />
|
|
6379
|
-
</div>
|
|
6380
|
-
|
|
6381
|
-
<div class="tooltip" #tooltipRef [style.position-anchor]="id()" [style]="menuStyle()" popover>
|
|
6382
|
-
{{ message() }}
|
|
6383
|
-
</div>
|
|
6384
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6385
|
-
}
|
|
6386
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ShipTooltipComponent, decorators: [{
|
|
6387
|
-
type: Component,
|
|
6388
|
-
args: [{
|
|
6389
|
-
selector: 'sh-tooltip',
|
|
6390
|
-
imports: [],
|
|
6391
|
-
template: `
|
|
6392
|
-
<div
|
|
6393
|
-
class="trigger"
|
|
6394
|
-
#triggerRef
|
|
6395
|
-
[style.anchor-name]="id()"
|
|
6396
|
-
(mouseover)="isOpen.set(true)"
|
|
6397
|
-
(mouseout)="isOpen.set(false)">
|
|
6398
|
-
<ng-content />
|
|
6399
|
-
</div>
|
|
6400
|
-
|
|
6401
|
-
<div class="tooltip" #tooltipRef [style.position-anchor]="id()" [style]="menuStyle()" popover>
|
|
6402
|
-
{{ message() }}
|
|
6403
|
-
</div>
|
|
6404
|
-
`,
|
|
6405
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6406
|
-
host: {
|
|
6407
|
-
'[class.above]': '_above()',
|
|
6408
|
-
'[class.right]': '_right()',
|
|
6409
|
-
'[class.disabled]': 'disabled()',
|
|
6410
|
-
},
|
|
6411
|
-
}]
|
|
6412
|
-
}] });
|
|
6413
|
-
|
|
6414
|
-
class ShipVirtualScrollComponent {
|
|
6211
|
+
class ShipVirtualScroll {
|
|
6415
6212
|
constructor() {
|
|
6416
6213
|
this.#changeRef = inject(ChangeDetectorRef);
|
|
6417
6214
|
this.#renderer = inject(Renderer2);
|
|
@@ -6551,8 +6348,8 @@ class ShipVirtualScrollComponent {
|
|
|
6551
6348
|
this.#cleanupResizeObserver();
|
|
6552
6349
|
this.#cleanupHostResizeObserver();
|
|
6553
6350
|
}
|
|
6554
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6555
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.
|
|
6351
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6352
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.9", type: ShipVirtualScroll, isStandalone: true, selector: "sh-virtual-scroll", viewQueries: [{ propertyName: "viewportRef", first: true, predicate: ["viewport"], descendants: true, isSignal: true }, { propertyName: "itemElements", predicate: ["item"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
6556
6353
|
<div class="viewport" #viewport (scroll)="onScroll()">
|
|
6557
6354
|
<div class="total-height" [style.height]="totalHeight() + 'px'"></div>
|
|
6558
6355
|
<div class="items-container" [style.transform]="'translateY(' + translateY() + 'px)'">
|
|
@@ -6561,7 +6358,7 @@ class ShipVirtualScrollComponent {
|
|
|
6561
6358
|
</div>
|
|
6562
6359
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6563
6360
|
}
|
|
6564
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipVirtualScroll, decorators: [{
|
|
6565
6362
|
type: Component,
|
|
6566
6363
|
args: [{
|
|
6567
6364
|
selector: 'sh-virtual-scroll',
|
|
@@ -6576,9 +6373,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6576
6373
|
`,
|
|
6577
6374
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6578
6375
|
}]
|
|
6579
|
-
}] });
|
|
6376
|
+
}], propDecorators: { viewportRef: [{ type: i0.ViewChild, args: ['viewport', { isSignal: true }] }], itemElements: [{ type: i0.ViewChildren, args: ['item', { isSignal: true }] }] } });
|
|
6580
6377
|
|
|
6581
|
-
class
|
|
6378
|
+
class ShipFileDragDrop {
|
|
6582
6379
|
constructor() {
|
|
6583
6380
|
this.filesOver = signal(false, ...(ngDevMode ? [{ debugName: "filesOver" }] : []));
|
|
6584
6381
|
this.filesDropped = output();
|
|
@@ -6602,10 +6399,10 @@ class ShipFileDragDropDirective {
|
|
|
6602
6399
|
this.filesDropped.emit(files);
|
|
6603
6400
|
}
|
|
6604
6401
|
}
|
|
6605
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6606
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
6402
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipFileDragDrop, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6403
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: ShipFileDragDrop, isStandalone: true, selector: "[shDragDrop]", outputs: { filesDropped: "filesDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "ondrop($event)" }, properties: { "class.filesover": "filesOver()" } }, ngImport: i0 }); }
|
|
6607
6404
|
}
|
|
6608
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipFileDragDrop, decorators: [{
|
|
6609
6406
|
type: Directive,
|
|
6610
6407
|
args: [{
|
|
6611
6408
|
selector: '[shDragDrop]',
|
|
@@ -6614,7 +6411,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6614
6411
|
'[class.filesover]': 'filesOver()',
|
|
6615
6412
|
},
|
|
6616
6413
|
}]
|
|
6617
|
-
}], propDecorators: { onDragOver: [{
|
|
6414
|
+
}], propDecorators: { filesDropped: [{ type: i0.Output, args: ["filesDropped"] }], onDragOver: [{
|
|
6618
6415
|
type: HostListener,
|
|
6619
6416
|
args: ['dragover', ['$event']]
|
|
6620
6417
|
}], onDragLeave: [{
|
|
@@ -6625,7 +6422,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6625
6422
|
args: ['drop', ['$event']]
|
|
6626
6423
|
}] } });
|
|
6627
6424
|
|
|
6628
|
-
class
|
|
6425
|
+
class ShipInputMask {
|
|
6629
6426
|
constructor() {
|
|
6630
6427
|
this.#selfRef = inject(ElementRef);
|
|
6631
6428
|
this.#renderer = inject(Renderer2);
|
|
@@ -6687,28 +6484,28 @@ class ShipInputMaskDirective {
|
|
|
6687
6484
|
}
|
|
6688
6485
|
return masked;
|
|
6689
6486
|
}
|
|
6690
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6691
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
6487
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipInputMask, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6488
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: ShipInputMask, isStandalone: true, selector: "[shInputMask]", inputs: { shInputMask: { classPropertyName: "shInputMask", publicName: "shInputMask", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "onInput($event)" } }, ngImport: i0 }); }
|
|
6692
6489
|
}
|
|
6693
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipInputMask, decorators: [{
|
|
6694
6491
|
type: Directive,
|
|
6695
6492
|
args: [{
|
|
6696
6493
|
selector: '[shInputMask]',
|
|
6697
6494
|
standalone: true,
|
|
6698
6495
|
}]
|
|
6699
|
-
}], propDecorators: { onInput: [{
|
|
6496
|
+
}], propDecorators: { shInputMask: [{ type: i0.Input, args: [{ isSignal: true, alias: "shInputMask", required: false }] }], onInput: [{
|
|
6700
6497
|
type: HostListener,
|
|
6701
6498
|
args: ['input', ['$event']]
|
|
6702
6499
|
}] } });
|
|
6703
6500
|
|
|
6704
|
-
class
|
|
6501
|
+
class ShipPreventWheel {
|
|
6705
6502
|
wheel(event) {
|
|
6706
6503
|
event.preventDefault();
|
|
6707
6504
|
}
|
|
6708
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6709
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
6505
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipPreventWheel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6506
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: ShipPreventWheel, isStandalone: true, selector: "[shPreventWheel]", host: { listeners: { "wheel": "wheel($event)" } }, ngImport: i0 }); }
|
|
6710
6507
|
}
|
|
6711
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipPreventWheel, decorators: [{
|
|
6712
6509
|
type: Directive,
|
|
6713
6510
|
args: [{
|
|
6714
6511
|
selector: '[shPreventWheel]',
|
|
@@ -6783,14 +6580,14 @@ class ShipTooltipWrapper {
|
|
|
6783
6580
|
ngOnDestroy() {
|
|
6784
6581
|
this.#positionAbort?.abort();
|
|
6785
6582
|
}
|
|
6786
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6787
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
6583
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipTooltipWrapper, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6584
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: ShipTooltipWrapper, isStandalone: true, selector: "ship-tooltip-wrapper", inputs: { positionAnchorName: { classPropertyName: "positionAnchorName", publicName: "positionAnchorName", isSignal: true, isRequired: true, transformFunction: null }, anchorEl: { classPropertyName: "anchorEl", publicName: "anchorEl", isSignal: true, isRequired: true, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tooltip" }, properties: { "attr.popover": "\"manual\"", "style.position-anchor": "positionAnchorName()", "class.below": "isBelow()" } }, ngImport: i0, template: `
|
|
6788
6585
|
<div class="tooltip-content">
|
|
6789
6586
|
<ng-content />
|
|
6790
6587
|
</div>
|
|
6791
6588
|
`, isInline: true }); }
|
|
6792
6589
|
}
|
|
6793
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6590
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipTooltipWrapper, decorators: [{
|
|
6794
6591
|
type: Component,
|
|
6795
6592
|
args: [{
|
|
6796
6593
|
selector: 'ship-tooltip-wrapper',
|
|
@@ -6807,9 +6604,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6807
6604
|
'[class.below]': 'isBelow()',
|
|
6808
6605
|
},
|
|
6809
6606
|
}]
|
|
6810
|
-
}] });
|
|
6607
|
+
}], propDecorators: { positionAnchorName: [{ type: i0.Input, args: [{ isSignal: true, alias: "positionAnchorName", required: true }] }], anchorEl: [{ type: i0.Input, args: [{ isSignal: true, alias: "anchorEl", required: true }] }], isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }] } });
|
|
6811
6608
|
let openRef = null;
|
|
6812
|
-
class
|
|
6609
|
+
class ShipTooltip {
|
|
6813
6610
|
constructor() {
|
|
6814
6611
|
this.shTooltip = input.required(...(ngDevMode ? [{ debugName: "shTooltip" }] : []));
|
|
6815
6612
|
this.#elementRef = inject((ElementRef));
|
|
@@ -6901,10 +6698,10 @@ class ShipTooltipDirective {
|
|
|
6901
6698
|
this.#projectedViewRef = null;
|
|
6902
6699
|
}
|
|
6903
6700
|
}
|
|
6904
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6905
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
6701
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipTooltip, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6702
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: ShipTooltip, isStandalone: true, selector: "[shTooltip]", inputs: { shTooltip: { classPropertyName: "shTooltip", publicName: "shTooltip", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" }, properties: { "style.anchor-name": "anchorName", "class.active": "isOpen()" }, classAttribute: "tooltip" }, ngImport: i0 }); }
|
|
6906
6703
|
}
|
|
6907
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ShipTooltip, decorators: [{
|
|
6908
6705
|
type: Directive,
|
|
6909
6706
|
args: [{
|
|
6910
6707
|
selector: '[shTooltip]',
|
|
@@ -6915,7 +6712,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6915
6712
|
'[class.active]': 'isOpen()',
|
|
6916
6713
|
},
|
|
6917
6714
|
}]
|
|
6918
|
-
}], propDecorators: { onMouseEnter: [{
|
|
6715
|
+
}], propDecorators: { shTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "shTooltip", required: true }] }], onMouseEnter: [{
|
|
6919
6716
|
type: HostListener,
|
|
6920
6717
|
args: ['mouseenter']
|
|
6921
6718
|
}], onMouseLeave: [{
|
|
@@ -6931,5 +6728,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6931
6728
|
* Generated bundle index. Do not edit.
|
|
6932
6729
|
*/
|
|
6933
6730
|
|
|
6934
|
-
export {
|
|
6731
|
+
export { GridSortable, SHIP_CONFIG, ShipAlert, ShipAlertContainer, ShipAlertModule, ShipAlertService, ShipBlueprint, ShipButton, ShipButtonGroup, ShipCard, ShipCheckbox, ShipChip, ShipColorPicker, ShipDatepicker, ShipDatepickerInput, ShipDaterangeInput, ShipDialog, ShipDialogService, ShipDivider, ShipEventCard, ShipFileDragDrop, ShipFileUpload, ShipFormField, ShipIcon, ShipInputMask, ShipList, ShipMenu, ShipPopover, ShipPreventWheel, ShipProgressBar, ShipRadio, ShipRangeSlider, ShipResize, ShipSelect, ShipSidenav, ShipSort, ShipSortable, ShipSpinner, ShipStepper, ShipStickyColumns, ShipTable, ShipTabs, ShipToggle, ShipToggleCard, ShipTooltip, ShipTooltipWrapper, ShipVirtualScroll, TEST_NODES, moveIndex, watchHostClass };
|
|
6935
6732
|
//# sourceMappingURL=ship-ui-core.mjs.map
|