@ship-ui/core 0.15.15 → 0.15.16
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.
|
@@ -1075,9 +1075,9 @@ class ShipPopoverComponent {
|
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
1077
|
else {
|
|
1078
|
-
popoverEl.hidePopover && popoverEl.hidePopover();
|
|
1079
|
-
this.openAbort?.abort();
|
|
1080
1078
|
this.closed.emit();
|
|
1079
|
+
this.openAbort?.abort();
|
|
1080
|
+
this.openAbort = null;
|
|
1081
1081
|
}
|
|
1082
1082
|
});
|
|
1083
1083
|
}, ...(ngDevMode ? [{ debugName: "openEffect" }] : []));
|
|
@@ -1092,12 +1092,8 @@ class ShipPopoverComponent {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
1094
|
eventClose($event) {
|
|
1095
|
-
// console.log('eventClose before', $event);
|
|
1096
1095
|
if (!this.isOpen())
|
|
1097
1096
|
return;
|
|
1098
|
-
// console.log('eventClose after', $event);
|
|
1099
|
-
// $event.stopPropagation();
|
|
1100
|
-
// $event.preventDefault();
|
|
1101
1097
|
this.isOpen.set(false);
|
|
1102
1098
|
}
|
|
1103
1099
|
#findScrollableParent(element) {
|
|
@@ -1144,6 +1140,10 @@ class ShipPopoverComponent {
|
|
|
1144
1140
|
this.menuStyle.set(style);
|
|
1145
1141
|
}
|
|
1146
1142
|
}
|
|
1143
|
+
ngOnDestroy() {
|
|
1144
|
+
this.openAbort?.abort();
|
|
1145
|
+
this.openAbort = null;
|
|
1146
|
+
}
|
|
1147
1147
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ShipPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1148
1148
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: ShipPopoverComponent, 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 }], ngImport: i0, template: `
|
|
1149
1149
|
<div class="trigger" #triggerRef [attr.popovertarget]="id() + 'hello'" (click)="toggleIsOpen($event)">
|
|
@@ -1253,7 +1253,6 @@ class ShipFormFieldPopoverComponent {
|
|
|
1253
1253
|
|
|
1254
1254
|
<sh-popover
|
|
1255
1255
|
[(isOpen)]="isOpen"
|
|
1256
|
-
[disableOpenByClick]="true"
|
|
1257
1256
|
(closed)="close()"
|
|
1258
1257
|
[options]="{
|
|
1259
1258
|
closeOnButton: false,
|
|
@@ -1300,7 +1299,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1300
1299
|
|
|
1301
1300
|
<sh-popover
|
|
1302
1301
|
[(isOpen)]="isOpen"
|
|
1303
|
-
[disableOpenByClick]="true"
|
|
1304
1302
|
(closed)="close()"
|
|
1305
1303
|
[options]="{
|
|
1306
1304
|
closeOnButton: false,
|
|
@@ -1687,7 +1685,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1687
1685
|
|
|
1688
1686
|
class ShipDatepickerInputComponent {
|
|
1689
1687
|
constructor() {
|
|
1690
|
-
|
|
1688
|
+
// #INIT_DATE = this.#getUTCDate(new Date());
|
|
1691
1689
|
this.ngModels = contentChild(NgModel, ...(ngDevMode ? [{ debugName: "ngModels" }] : []));
|
|
1692
1690
|
this.#datePipe = inject(DatePipe);
|
|
1693
1691
|
this.#inputRef = signal(null, ...(ngDevMode ? [{ debugName: "#inputRef" }] : []));
|
|
@@ -1702,7 +1700,7 @@ class ShipDatepickerInputComponent {
|
|
|
1702
1700
|
return null;
|
|
1703
1701
|
return this.#datePipe.transform(date, mask);
|
|
1704
1702
|
}, ...(ngDevMode ? [{ debugName: "_maskedDate" }] : []));
|
|
1705
|
-
this.internalDate = signal(
|
|
1703
|
+
this.internalDate = signal(null, ...(ngDevMode ? [{ debugName: "internalDate" }] : []));
|
|
1706
1704
|
this.isOpen = model(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
1707
1705
|
this.currentClass = classMutationSignal();
|
|
1708
1706
|
this.#inputObserver = contentProjectionSignal('#input-wrap input');
|
|
@@ -1728,7 +1726,6 @@ class ShipDatepickerInputComponent {
|
|
|
1728
1726
|
}
|
|
1729
1727
|
}, ...(ngDevMode ? [{ debugName: "#inputRefEffect" }] : []));
|
|
1730
1728
|
}
|
|
1731
|
-
#INIT_DATE;
|
|
1732
1729
|
#datePipe;
|
|
1733
1730
|
#inputRef;
|
|
1734
1731
|
#inputObserver;
|
|
@@ -1740,10 +1737,6 @@ class ShipDatepickerInputComponent {
|
|
|
1740
1737
|
input.dispatchEvent(new Event('input'));
|
|
1741
1738
|
}
|
|
1742
1739
|
}
|
|
1743
|
-
open($event) {
|
|
1744
|
-
$event.stopPropagation();
|
|
1745
|
-
this.isOpen.set(true);
|
|
1746
|
-
}
|
|
1747
1740
|
close() {
|
|
1748
1741
|
this.closed.emit(this.internalDate());
|
|
1749
1742
|
}
|
|
@@ -1778,7 +1771,7 @@ class ShipDatepickerInputComponent {
|
|
|
1778
1771
|
}
|
|
1779
1772
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ShipDatepickerInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1780
1773
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: ShipDatepickerInputComponent, 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: `
|
|
1781
|
-
<sh-form-field-popover (
|
|
1774
|
+
<sh-form-field-popover (closed)="close()" [(isOpen)]="isOpen">
|
|
1782
1775
|
<ng-content select="label" ngProjectAs="label" />
|
|
1783
1776
|
|
|
1784
1777
|
<ng-content select="[prefix]" ngProjectAs="[prefix]" />
|
|
@@ -1786,7 +1779,7 @@ class ShipDatepickerInputComponent {
|
|
|
1786
1779
|
|
|
1787
1780
|
<div id="input-wrap" class="input" ngProjectAs="input">
|
|
1788
1781
|
@if (this.masking()) {
|
|
1789
|
-
<div class="masked-value"
|
|
1782
|
+
<div class="masked-value">
|
|
1790
1783
|
{{ _maskedDate() }}
|
|
1791
1784
|
</div>
|
|
1792
1785
|
}
|
|
@@ -1814,7 +1807,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1814
1807
|
imports: [ShipDatepickerComponent, ShipFormFieldPopoverComponent, ShipIconComponent],
|
|
1815
1808
|
providers: [DatePipe],
|
|
1816
1809
|
template: `
|
|
1817
|
-
<sh-form-field-popover (
|
|
1810
|
+
<sh-form-field-popover (closed)="close()" [(isOpen)]="isOpen">
|
|
1818
1811
|
<ng-content select="label" ngProjectAs="label" />
|
|
1819
1812
|
|
|
1820
1813
|
<ng-content select="[prefix]" ngProjectAs="[prefix]" />
|
|
@@ -1822,7 +1815,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1822
1815
|
|
|
1823
1816
|
<div id="input-wrap" class="input" ngProjectAs="input">
|
|
1824
1817
|
@if (this.masking()) {
|
|
1825
|
-
<div class="masked-value"
|
|
1818
|
+
<div class="masked-value">
|
|
1826
1819
|
{{ _maskedDate() }}
|
|
1827
1820
|
</div>
|
|
1828
1821
|
}
|
|
@@ -1939,10 +1932,6 @@ class ShipDaterangeInputComponent {
|
|
|
1939
1932
|
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
1940
1933
|
input.dispatchEvent(new Event('change', { bubbles: true }));
|
|
1941
1934
|
}
|
|
1942
|
-
open($event) {
|
|
1943
|
-
$event.stopPropagation();
|
|
1944
|
-
this.isOpen.set(true);
|
|
1945
|
-
}
|
|
1946
1935
|
close() {
|
|
1947
1936
|
this.closed.emit({
|
|
1948
1937
|
start: this.startDate(),
|
|
@@ -1951,11 +1940,7 @@ class ShipDaterangeInputComponent {
|
|
|
1951
1940
|
}
|
|
1952
1941
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ShipDaterangeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1953
1942
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: ShipDaterangeInputComponent, 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: `
|
|
1954
|
-
<sh-form-field-popover
|
|
1955
|
-
[class]="'columns-' + monthsToShow()"
|
|
1956
|
-
(click)="open($event)"
|
|
1957
|
-
(closed)="close()"
|
|
1958
|
-
[(isOpen)]="isOpen">
|
|
1943
|
+
<sh-form-field-popover [class]="'columns-' + monthsToShow()" (closed)="close()" [(isOpen)]="isOpen">
|
|
1959
1944
|
<ng-content select="label" ngProjectAs="label" />
|
|
1960
1945
|
|
|
1961
1946
|
<ng-content select="[prefix]" ngProjectAs="[prefix]" />
|
|
@@ -1963,9 +1948,7 @@ class ShipDaterangeInputComponent {
|
|
|
1963
1948
|
|
|
1964
1949
|
<div class="input" ngProjectAs="input" #inputWrap>
|
|
1965
1950
|
@if (this.masking()) {
|
|
1966
|
-
<div class="masked-value" (
|
|
1967
|
-
{{ _maskedStartDate() ?? 'N/A' }} - {{ _maskedEndDate() ?? 'N/A' }}
|
|
1968
|
-
</div>
|
|
1951
|
+
<div class="masked-value">{{ _maskedStartDate() ?? 'N/A' }} - {{ _maskedEndDate() ?? 'N/A' }}</div>
|
|
1969
1952
|
}
|
|
1970
1953
|
<ng-content select="input" />
|
|
1971
1954
|
</div>
|
|
@@ -1996,11 +1979,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1996
1979
|
imports: [ShipDatepickerComponent, ShipFormFieldPopoverComponent, ShipIconComponent],
|
|
1997
1980
|
providers: [DatePipe],
|
|
1998
1981
|
template: `
|
|
1999
|
-
<sh-form-field-popover
|
|
2000
|
-
[class]="'columns-' + monthsToShow()"
|
|
2001
|
-
(click)="open($event)"
|
|
2002
|
-
(closed)="close()"
|
|
2003
|
-
[(isOpen)]="isOpen">
|
|
1982
|
+
<sh-form-field-popover [class]="'columns-' + monthsToShow()" (closed)="close()" [(isOpen)]="isOpen">
|
|
2004
1983
|
<ng-content select="label" ngProjectAs="label" />
|
|
2005
1984
|
|
|
2006
1985
|
<ng-content select="[prefix]" ngProjectAs="[prefix]" />
|
|
@@ -2008,9 +1987,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
2008
1987
|
|
|
2009
1988
|
<div class="input" ngProjectAs="input" #inputWrap>
|
|
2010
1989
|
@if (this.masking()) {
|
|
2011
|
-
<div class="masked-value" (
|
|
2012
|
-
{{ _maskedStartDate() ?? 'N/A' }} - {{ _maskedEndDate() ?? 'N/A' }}
|
|
2013
|
-
</div>
|
|
1990
|
+
<div class="masked-value">{{ _maskedStartDate() ?? 'N/A' }} - {{ _maskedEndDate() ?? 'N/A' }}</div>
|
|
2014
1991
|
}
|
|
2015
1992
|
<ng-content select="input" />
|
|
2016
1993
|
</div>
|