@ship-ui/core 0.14.12 → 0.14.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, Renderer2, ChangeDetectionStrategy, Component, signal, DestroyRef, InjectionToken, input, computed, viewChild, effect, HostListener, NgModule, Injectable, model, output, ApplicationRef, createComponent, isSignal, OutputEmitterRef, contentChildren, afterNextRender, assertInInjectionContext, Injector, HostBinding,
|
|
2
|
+
import { inject, ElementRef, Renderer2, ChangeDetectionStrategy, Component, signal, DestroyRef, InjectionToken, input, computed, viewChild, effect, HostListener, NgModule, Injectable, model, output, ApplicationRef, createComponent, isSignal, OutputEmitterRef, contentChild, contentChildren, afterNextRender, assertInInjectionContext, Injector, HostBinding, TemplateRef, runInInjectionContext, Directive, ChangeDetectorRef, viewChildren, ViewContainerRef, EnvironmentInjector } from '@angular/core';
|
|
3
3
|
import { DatePipe, NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { NgModel } from '@angular/forms';
|
|
4
5
|
import { SIGNAL } from '@angular/core/primitives/signals';
|
|
5
6
|
|
|
6
7
|
const iconTypes = ['bold', 'thin', 'light', 'fill', 'duotone'];
|
|
@@ -1315,6 +1316,8 @@ function contentProjectionSignal(hostElement, querySelector) {
|
|
|
1315
1316
|
}
|
|
1316
1317
|
projectedElementsSignal.set(elements);
|
|
1317
1318
|
};
|
|
1319
|
+
if (typeof MutationObserver === 'undefined')
|
|
1320
|
+
return projectedElementsSignal.asReadonly();
|
|
1318
1321
|
const observer = new MutationObserver((mutations) => {
|
|
1319
1322
|
// Only update if child nodes have been added or removed.
|
|
1320
1323
|
const hasChildListChanges = mutations.some((mutation) => mutation.type === 'childList');
|
|
@@ -1663,6 +1666,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
1663
1666
|
class ShipDatepickerInputComponent {
|
|
1664
1667
|
constructor() {
|
|
1665
1668
|
this.#INIT_DATE = this.#getUTCDate(new Date());
|
|
1669
|
+
this.ngModels = contentChild(NgModel, ...(ngDevMode ? [{ debugName: "ngModels" }] : []));
|
|
1666
1670
|
this.#datePipe = inject(DatePipe);
|
|
1667
1671
|
this.#elementRef = inject((ElementRef));
|
|
1668
1672
|
this.#inputRef = signal(null, ...(ngDevMode ? [{ debugName: "#inputRef" }] : []));
|
|
@@ -1712,7 +1716,8 @@ class ShipDatepickerInputComponent {
|
|
|
1712
1716
|
this.internalDate.set(date);
|
|
1713
1717
|
const input = this.#inputRef();
|
|
1714
1718
|
if (input) {
|
|
1715
|
-
input.value = date ? date.
|
|
1719
|
+
input.value = date ? date.toString() : '';
|
|
1720
|
+
input.dispatchEvent(new Event('input'));
|
|
1716
1721
|
}
|
|
1717
1722
|
}
|
|
1718
1723
|
open($event) {
|
|
@@ -1752,7 +1757,7 @@ class ShipDatepickerInputComponent {
|
|
|
1752
1757
|
return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()) + timeDiffMillis);
|
|
1753
1758
|
}
|
|
1754
1759
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: ShipDatepickerInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1755
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", 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], ngImport: i0, template: `
|
|
1760
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", 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: `
|
|
1756
1761
|
<sh-form-field-popover (click)="open($event)" (closed)="close()" [(isOpen)]="isOpen">
|
|
1757
1762
|
<ng-content select="label" ngProjectAs="label" />
|
|
1758
1763
|
|