@coolon/angular-ui-powerups 14.33.0 → 14.35.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/esm2020/lib/components/forms/abstract-input.component.mjs +22 -10
- package/esm2020/lib/components/forms/abstract-list-input.component.mjs +2 -14
- package/esm2020/lib/components/forms/abstract-value-input.component.mjs +2 -14
- package/esm2020/lib/components/icon/icon.component.mjs +6 -3
- package/fesm2015/coolon-angular-ui-powerups.mjs +27 -34
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +25 -34
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +18 -6
- package/lib/components/forms/abstract-list-input.component.d.ts +0 -11
- package/lib/components/forms/abstract-value-input.component.d.ts +0 -11
- package/package.json +2 -2
|
@@ -774,12 +774,15 @@ class IconComponent {
|
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
776
|
IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
777
|
-
IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IconComponent, selector: "aup-icon", inputs: { icon: "icon" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"iconPrefix.SVG\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"iconPrefix.MATERIAL\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"iconPrefix.FONT_AWESOME\" class=\"faIconWrapper\">\n <i class=\"fa-solid\" [class]=\"faIcon\"></i>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n", styles: [":host{display:inline-flex;--resolved-size: var(--aup-icon-size, 24px);width:var(--resolved-size) fa-icon;width-vertical-align:middle}:host .faIconWrapper{display:flex;flex-direction:row;align-items:center;justify-content:center;width:var(--resolved-size);height:var(--resolved-size)}:host .svgIcon{width:var(--resolved-size);height:var(--resolved-size)}:host :host(.mat-chip-remove){--aup-icon-size: 18px}:host mat-icon{font-size:var(--resolved-size);width:var(--resolved-size);height:var(--resolved-size);margin-right:0!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
|
|
777
|
+
IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IconComponent, selector: "aup-icon", inputs: { icon: "icon" }, host: { properties: { "attr.icon": "this.icon" } }, ngImport: i0, template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"iconPrefix.SVG\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"iconPrefix.MATERIAL\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"iconPrefix.FONT_AWESOME\" class=\"faIconWrapper\">\n <i class=\"fa-solid\" [class]=\"faIcon\"></i>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n", styles: [":host{display:inline-flex;--resolved-size: var(--aup-icon-size, 24px);width:var(--resolved-size) fa-icon;width-vertical-align:middle}:host .faIconWrapper{display:flex;flex-direction:row;align-items:center;justify-content:center;width:var(--resolved-size);height:var(--resolved-size)}:host .svgIcon{width:var(--resolved-size);height:var(--resolved-size)}:host :host(.mat-chip-remove){--aup-icon-size: 18px}:host mat-icon{font-size:var(--resolved-size);width:var(--resolved-size);height:var(--resolved-size);margin-right:0!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
|
|
778
778
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IconComponent, decorators: [{
|
|
779
779
|
type: Component,
|
|
780
780
|
args: [{ selector: 'aup-icon', template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"iconPrefix.SVG\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"iconPrefix.MATERIAL\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"iconPrefix.FONT_AWESOME\" class=\"faIconWrapper\">\n <i class=\"fa-solid\" [class]=\"faIcon\"></i>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n", styles: [":host{display:inline-flex;--resolved-size: var(--aup-icon-size, 24px);width:var(--resolved-size) fa-icon;width-vertical-align:middle}:host .faIconWrapper{display:flex;flex-direction:row;align-items:center;justify-content:center;width:var(--resolved-size);height:var(--resolved-size)}:host .svgIcon{width:var(--resolved-size);height:var(--resolved-size)}:host :host(.mat-chip-remove){--aup-icon-size: 18px}:host mat-icon{font-size:var(--resolved-size);width:var(--resolved-size);height:var(--resolved-size);margin-right:0!important}\n"] }]
|
|
781
781
|
}], propDecorators: { icon: [{
|
|
782
782
|
type: Input
|
|
783
|
+
}, {
|
|
784
|
+
type: HostBinding,
|
|
785
|
+
args: ["attr.icon"]
|
|
783
786
|
}] } });
|
|
784
787
|
(function (IconComponent) {
|
|
785
788
|
IconComponent.IconPrefix = Enum({
|
|
@@ -1638,12 +1641,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
1638
1641
|
}] } });
|
|
1639
1642
|
|
|
1640
1643
|
/* tslint:disable:no-input-rename */
|
|
1644
|
+
const INPUT_TOKEN_HACK = new InjectionToken("INPUT_TOKEN_HACK");
|
|
1641
1645
|
class AbstractInputComponent extends DisposableComponent {
|
|
1642
|
-
constructor() {
|
|
1646
|
+
constructor(formValue$) {
|
|
1643
1647
|
super();
|
|
1644
1648
|
this.onValueEditedListeners = new EventListenerList();
|
|
1645
1649
|
this.userFloatLabel = 'always'; // TODO: make this an injectable default
|
|
1646
1650
|
this.dense = false;
|
|
1651
|
+
this._enabled$ = this.registerDisposable(new DelegatingValueModel());
|
|
1647
1652
|
// TODO: fix this.
|
|
1648
1653
|
// tslint:disable-next-line:no-output-native
|
|
1649
1654
|
this.focus = new EventEmitter();
|
|
@@ -1655,12 +1660,20 @@ class AbstractInputComponent extends DisposableComponent {
|
|
|
1655
1660
|
this.escapeKey = new EventEmitter();
|
|
1656
1661
|
this.baseClassName = 'aup-input-component';
|
|
1657
1662
|
const self = this;
|
|
1663
|
+
this.formValue$ = this.registerDisposable(formValue$);
|
|
1664
|
+
this._enabled$.setDefault(formValue$.enabled);
|
|
1658
1665
|
this.errorStateMatcher = {
|
|
1659
1666
|
isErrorState(control, form) {
|
|
1660
1667
|
return self.hasErrors();
|
|
1661
1668
|
}
|
|
1662
1669
|
};
|
|
1663
1670
|
}
|
|
1671
|
+
set enabled$(condition$) {
|
|
1672
|
+
this._enabled$.setDelegate(condition$);
|
|
1673
|
+
}
|
|
1674
|
+
get enabled$() {
|
|
1675
|
+
return this._enabled$.readonly;
|
|
1676
|
+
}
|
|
1664
1677
|
notifyClick() {
|
|
1665
1678
|
this.safelyInvoke(this.clickCommand);
|
|
1666
1679
|
}
|
|
@@ -1690,9 +1703,6 @@ class AbstractInputComponent extends DisposableComponent {
|
|
|
1690
1703
|
isEnabled() {
|
|
1691
1704
|
return this.enabled$.value;
|
|
1692
1705
|
}
|
|
1693
|
-
get enabled$() {
|
|
1694
|
-
return this.formValue$.enabled;
|
|
1695
|
-
}
|
|
1696
1706
|
hasErrors() {
|
|
1697
1707
|
return !this.errorList$.query().isEmpty();
|
|
1698
1708
|
}
|
|
@@ -1719,12 +1729,15 @@ class AbstractInputComponent extends DisposableComponent {
|
|
|
1719
1729
|
return this.onValueEditedListeners.add(callback);
|
|
1720
1730
|
}
|
|
1721
1731
|
}
|
|
1722
|
-
AbstractInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbstractInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1723
|
-
AbstractInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: AbstractInputComponent, selector: "ng-component", inputs: { label: "label", userFloatLabel: ["floatLabel", "userFloatLabel"], hint: "hint", placeholder: "placeholder", dense: "dense", focusCommand: ["command.focus", "focusCommand"], blurCommand: ["command.blur", "blurCommand"], enterCommand: ["command.enter", "enterCommand"], escapeCommand: ["command.escape", "escapeCommand"], clickCommand: ["command.click", "clickCommand"] }, outputs: { focus: "focus", blur: "blur", enterKey: "enterKey", escapeKey: "escapeKey" }, host: { listeners: { "click": "notifyClick()", "focusin": "notifyFocusIn()", "focusout": "notifyFocusOut()" }, properties: { "class.dense": "this.dense", "class": "this.baseClassName" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
1732
|
+
AbstractInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbstractInputComponent, deps: [{ token: INPUT_TOKEN_HACK }], target: i0.ɵɵFactoryTarget.Component });
|
|
1733
|
+
AbstractInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: AbstractInputComponent, selector: "ng-component", inputs: { label: "label", userFloatLabel: ["floatLabel", "userFloatLabel"], hint: "hint", placeholder: "placeholder", dense: "dense", enabled$: "enabled$", focusCommand: ["command.focus", "focusCommand"], blurCommand: ["command.blur", "blurCommand"], enterCommand: ["command.enter", "enterCommand"], escapeCommand: ["command.escape", "escapeCommand"], clickCommand: ["command.click", "clickCommand"] }, outputs: { focus: "focus", blur: "blur", enterKey: "enterKey", escapeKey: "escapeKey" }, host: { listeners: { "click": "notifyClick()", "focusin": "notifyFocusIn()", "focusout": "notifyFocusOut()" }, properties: { "class.dense": "this.dense", "class": "this.baseClassName" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
1724
1734
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbstractInputComponent, decorators: [{
|
|
1725
1735
|
type: Component,
|
|
1726
1736
|
args: [{ template: '' }]
|
|
1727
|
-
}], ctorParameters: function () { return [
|
|
1737
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1738
|
+
type: Inject,
|
|
1739
|
+
args: [INPUT_TOKEN_HACK]
|
|
1740
|
+
}] }]; }, propDecorators: { label: [{
|
|
1728
1741
|
type: Input
|
|
1729
1742
|
}], userFloatLabel: [{
|
|
1730
1743
|
type: Input,
|
|
@@ -1738,6 +1751,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
1738
1751
|
args: ['class.dense']
|
|
1739
1752
|
}, {
|
|
1740
1753
|
type: Input
|
|
1754
|
+
}], enabled$: [{
|
|
1755
|
+
type: Input
|
|
1741
1756
|
}], focusCommand: [{
|
|
1742
1757
|
type: Input,
|
|
1743
1758
|
args: ['command.focus']
|
|
@@ -1777,19 +1792,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
1777
1792
|
|
|
1778
1793
|
class AbstractListInputComponent extends AbstractInputComponent {
|
|
1779
1794
|
constructor() {
|
|
1780
|
-
super();
|
|
1781
|
-
/**
|
|
1782
|
-
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1783
|
-
*
|
|
1784
|
-
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
1785
|
-
* valueModel: Form.ListModelBase<string> | MutableListModel<string>;
|
|
1786
|
-
*
|
|
1787
|
-
* This approach allows the input to accept plain or form models but all backed by a form
|
|
1788
|
-
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
1789
|
-
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1790
|
-
*/
|
|
1791
|
-
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1792
|
-
this.formValue$ = this.registerDisposable(new Form.DelegatingFormListModel());
|
|
1795
|
+
super(new Form.DelegatingFormListModel());
|
|
1793
1796
|
this.componentList$ = new MutableListModel();
|
|
1794
1797
|
this.setValueIsInProgress$ = new Guard();
|
|
1795
1798
|
this.valueChange = new EventEmitter();
|
|
@@ -1848,19 +1851,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
1848
1851
|
|
|
1849
1852
|
class AbstractValueInputComponent extends AbstractInputComponent {
|
|
1850
1853
|
constructor() {
|
|
1851
|
-
super();
|
|
1852
|
-
/**
|
|
1853
|
-
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1854
|
-
*
|
|
1855
|
-
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
1856
|
-
* value$: DirtyTrackingForm.ValueModel<string> | MutableValueModel<string>;
|
|
1857
|
-
*
|
|
1858
|
-
* This approach allows the input to accept plain or form models but all backed by a form
|
|
1859
|
-
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
1860
|
-
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1861
|
-
*/
|
|
1862
|
-
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1863
|
-
this.formValue$ = this.registerDisposable(new Form.DelegatingFormValueModel());
|
|
1854
|
+
super(new Form.DelegatingFormValueModel());
|
|
1864
1855
|
this.setValueInProgress$ = new Guard();
|
|
1865
1856
|
this.componentValue$ = new MutableValueModel();
|
|
1866
1857
|
this.valueChange = new EventEmitter();
|