@coolon/angular-ui-powerups 2.0.0-alpha.4 → 2.0.0-alpha.5
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/CHANGELOG.md +7 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +80 -30
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.js +37 -5
- package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.js +30 -2
- package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +2 -5
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +0 -4
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js +2 -5
- package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +3 -6
- package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js +0 -4
- package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.js +0 -4
- package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.js +2 -5
- package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
- package/esm2015/lib/components/table/cell-editors.js.map +1 -1
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-list-input.component.js +42 -5
- package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js +35 -2
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +2 -5
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +0 -4
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +2 -5
- package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +3 -6
- package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm5/lib/components/forms/select-input/select-input.component.js +0 -4
- package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/string-input/string-input.component.js +0 -4
- package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js +2 -5
- package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm5/lib/components/table/cell-editors.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +71 -31
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +81 -31
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-list-input.component.d.ts +8 -2
- package/lib/components/forms/abstract-value-input.component.d.ts +7 -2
- package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +0 -2
- package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +1 -2
- package/lib/components/forms/number-input/number-input.component.d.ts +0 -2
- package/lib/components/forms/password-input/password-input.component.d.ts +0 -2
- package/lib/components/forms/select-input/select-input.component.d.ts +1 -2
- package/lib/components/forms/string-input/string-input.component.d.ts +1 -2
- package/lib/components/forms/text-input/text-input.component.d.ts +0 -2
- package/lib/components/table/cell-editors.d.ts +3 -3
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ import { MatButtonModule } from '@angular/material/button';
|
|
|
13
13
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
14
14
|
import { MatIconModule } from '@angular/material/icon';
|
|
15
15
|
import { MatTableModule } from '@angular/material/table';
|
|
16
|
-
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, FocusManager, Form, ListModel, StoreInListModel, ValueModel, StoreInValueModel,
|
|
16
|
+
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, FocusManager, Form, Guard, MutableListModel, MutableValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Trace, DebugContext, Binding, Functions } from '@coolon/pectin';
|
|
17
17
|
import { assert as assert$1, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
|
|
18
18
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
19
19
|
import ___default, { isEqual, isNil } from 'lodash';
|
|
@@ -703,7 +703,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
703
703
|
var AbstractListInputComponent = /** @class */ (function (_super) {
|
|
704
704
|
__extends(AbstractListInputComponent, _super);
|
|
705
705
|
function AbstractListInputComponent() {
|
|
706
|
-
var _this = _super
|
|
706
|
+
var _this = _super.call(this) || this;
|
|
707
707
|
/**
|
|
708
708
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
709
709
|
*
|
|
@@ -716,10 +716,47 @@ var AbstractListInputComponent = /** @class */ (function (_super) {
|
|
|
716
716
|
*/
|
|
717
717
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
718
718
|
_this.inputModel = _this.registerDisposable(new Form.DelegatingListModel());
|
|
719
|
+
_this.setValueIsInitialising = new Guard();
|
|
720
|
+
_this.valueChange = new EventEmitter();
|
|
721
|
+
var when = Dsl.disposeWith(_this).when;
|
|
722
|
+
when(_this.inputModel).changes(function (value) { return _this.valueChange.emit(value); }, {
|
|
723
|
+
initialValue: 'ignore',
|
|
724
|
+
unless: _this.setValueIsInitialising
|
|
725
|
+
});
|
|
719
726
|
return _this;
|
|
720
727
|
}
|
|
728
|
+
Object.defineProperty(AbstractListInputComponent.prototype, "value", {
|
|
729
|
+
set: function (value) {
|
|
730
|
+
var _this = this;
|
|
731
|
+
if (!this.listHolder) {
|
|
732
|
+
this.setValueIsInitialising.whileTrue(function () {
|
|
733
|
+
_this.listHolder = new MutableListModel(value);
|
|
734
|
+
_this.listModel = _this.listHolder;
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
else {
|
|
738
|
+
this.listHolder.value = value;
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
enumerable: true,
|
|
742
|
+
configurable: true
|
|
743
|
+
});
|
|
744
|
+
__decorate([
|
|
745
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
746
|
+
__metadata("design:type", Object)
|
|
747
|
+
], AbstractListInputComponent.prototype, "listModel", void 0);
|
|
748
|
+
__decorate([
|
|
749
|
+
Input(),
|
|
750
|
+
__metadata("design:type", Array),
|
|
751
|
+
__metadata("design:paramtypes", [Array])
|
|
752
|
+
], AbstractListInputComponent.prototype, "value", null);
|
|
753
|
+
__decorate([
|
|
754
|
+
Output(),
|
|
755
|
+
__metadata("design:type", Object)
|
|
756
|
+
], AbstractListInputComponent.prototype, "valueChange", void 0);
|
|
721
757
|
AbstractListInputComponent = __decorate([
|
|
722
|
-
Component({ template: '' })
|
|
758
|
+
Component({ template: '' }),
|
|
759
|
+
__metadata("design:paramtypes", [])
|
|
723
760
|
], AbstractListInputComponent);
|
|
724
761
|
return AbstractListInputComponent;
|
|
725
762
|
}(AbstractInputComponent));
|
|
@@ -740,8 +777,41 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
|
|
|
740
777
|
*/
|
|
741
778
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
742
779
|
_this.inputModel = _this.registerDisposable(new Form.DelegatingValueModel());
|
|
780
|
+
_this.setValueIsInitialising = new Guard();
|
|
781
|
+
_this.valueChange = new EventEmitter();
|
|
782
|
+
var when = Dsl.disposeWith(_this).when;
|
|
783
|
+
when(_this.inputModel).changes(function (value) { return _this.valueChange.emit(value); }, { initialValue: 'ignore', unless: _this.setValueIsInitialising });
|
|
743
784
|
return _this;
|
|
744
785
|
}
|
|
786
|
+
Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
|
|
787
|
+
set: function (value) {
|
|
788
|
+
var _this = this;
|
|
789
|
+
if (!this.valueHolder) {
|
|
790
|
+
this.setValueIsInitialising.whileTrue(function () {
|
|
791
|
+
_this.valueHolder = new MutableValueModel(value);
|
|
792
|
+
_this.valueModel = _this.valueHolder;
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
else {
|
|
796
|
+
this.valueHolder.value = value;
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
enumerable: true,
|
|
800
|
+
configurable: true
|
|
801
|
+
});
|
|
802
|
+
__decorate([
|
|
803
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
804
|
+
__metadata("design:type", Object)
|
|
805
|
+
], AbstractValueInputComponent.prototype, "valueModel", void 0);
|
|
806
|
+
__decorate([
|
|
807
|
+
Input(),
|
|
808
|
+
__metadata("design:type", Object),
|
|
809
|
+
__metadata("design:paramtypes", [Object])
|
|
810
|
+
], AbstractValueInputComponent.prototype, "value", null);
|
|
811
|
+
__decorate([
|
|
812
|
+
Output(),
|
|
813
|
+
__metadata("design:type", Object)
|
|
814
|
+
], AbstractValueInputComponent.prototype, "valueChange", void 0);
|
|
745
815
|
AbstractValueInputComponent = __decorate([
|
|
746
816
|
Component({ template: '' }),
|
|
747
817
|
__metadata("design:paramtypes", [])
|
|
@@ -753,16 +823,14 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
|
753
823
|
__extends(CheckboxInputComponent, _super);
|
|
754
824
|
function CheckboxInputComponent() {
|
|
755
825
|
var _this = _super.call(this) || this;
|
|
826
|
+
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
827
|
+
// valueModel: Form.ValueModelBase<boolean> | IMutableValueModel<boolean>;
|
|
756
828
|
_this.color = 'accent';
|
|
757
829
|
_this.labelPosition = 'after';
|
|
758
830
|
return _this;
|
|
759
831
|
}
|
|
760
832
|
CheckboxInputComponent.prototype.ngOnInit = function () {
|
|
761
833
|
};
|
|
762
|
-
__decorate([
|
|
763
|
-
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
764
|
-
__metadata("design:type", Object)
|
|
765
|
-
], CheckboxInputComponent.prototype, "valueModel", void 0);
|
|
766
834
|
__decorate([
|
|
767
835
|
Input(),
|
|
768
836
|
__metadata("design:type", String)
|
|
@@ -786,16 +854,14 @@ var NumberInputComponent = /** @class */ (function (_super) {
|
|
|
786
854
|
__extends(NumberInputComponent, _super);
|
|
787
855
|
function NumberInputComponent() {
|
|
788
856
|
var _this = _super.call(this) || this;
|
|
857
|
+
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
858
|
+
// valueModel: Form.ValueModelBase<number> | IMutableValueModel<number>;
|
|
789
859
|
_this.min = Number.MIN_SAFE_INTEGER;
|
|
790
860
|
_this.max = Number.MAX_SAFE_INTEGER;
|
|
791
861
|
return _this;
|
|
792
862
|
}
|
|
793
863
|
NumberInputComponent.prototype.ngOnInit = function () {
|
|
794
864
|
};
|
|
795
|
-
__decorate([
|
|
796
|
-
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
797
|
-
__metadata("design:type", Object)
|
|
798
|
-
], NumberInputComponent.prototype, "valueModel", void 0);
|
|
799
865
|
__decorate([
|
|
800
866
|
Input(),
|
|
801
867
|
__metadata("design:type", Object)
|
|
@@ -817,15 +883,13 @@ var NumberInputComponent = /** @class */ (function (_super) {
|
|
|
817
883
|
|
|
818
884
|
var PasswordInputComponent = /** @class */ (function (_super) {
|
|
819
885
|
__extends(PasswordInputComponent, _super);
|
|
886
|
+
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
887
|
+
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
820
888
|
function PasswordInputComponent() {
|
|
821
889
|
return _super.call(this) || this;
|
|
822
890
|
}
|
|
823
891
|
PasswordInputComponent.prototype.ngOnInit = function () {
|
|
824
892
|
};
|
|
825
|
-
__decorate([
|
|
826
|
-
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
827
|
-
__metadata("design:type", Object)
|
|
828
|
-
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
829
893
|
PasswordInputComponent = __decorate([
|
|
830
894
|
Component({
|
|
831
895
|
selector: 'aup-password-input',
|
|
@@ -852,10 +916,6 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
852
916
|
}
|
|
853
917
|
SelectInputComponent.prototype.ngOnInit = function () {
|
|
854
918
|
};
|
|
855
|
-
__decorate([
|
|
856
|
-
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
857
|
-
__metadata("design:type", Object)
|
|
858
|
-
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
859
919
|
__decorate([
|
|
860
920
|
Input(), TrackExternal(),
|
|
861
921
|
__metadata("design:type", ListModel)
|
|
@@ -908,10 +968,6 @@ var StringInputComponent = /** @class */ (function (_super) {
|
|
|
908
968
|
}
|
|
909
969
|
StringInputComponent.prototype.ngOnInit = function () {
|
|
910
970
|
};
|
|
911
|
-
__decorate([
|
|
912
|
-
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
913
|
-
__metadata("design:type", Object)
|
|
914
|
-
], StringInputComponent.prototype, "valueModel", void 0);
|
|
915
971
|
__decorate([
|
|
916
972
|
Input(), TrackExternal({ defaultValue: false }),
|
|
917
973
|
__metadata("design:type", ValueModel)
|
|
@@ -935,16 +991,14 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
935
991
|
__extends(TextInputComponent, _super);
|
|
936
992
|
function TextInputComponent() {
|
|
937
993
|
var _this = _super.call(this) || this;
|
|
994
|
+
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
995
|
+
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
938
996
|
_this.rows = 2;
|
|
939
997
|
return _this;
|
|
940
998
|
// const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
941
999
|
}
|
|
942
1000
|
TextInputComponent.prototype.ngOnInit = function () {
|
|
943
1001
|
};
|
|
944
|
-
__decorate([
|
|
945
|
-
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
946
|
-
__metadata("design:type", Object)
|
|
947
|
-
], TextInputComponent.prototype, "valueModel", void 0);
|
|
948
1002
|
__decorate([
|
|
949
1003
|
Input(),
|
|
950
1004
|
__metadata("design:type", Object)
|
|
@@ -2277,10 +2331,6 @@ var MultipleSelectInputComponent = /** @class */ (function (_super) {
|
|
|
2277
2331
|
}
|
|
2278
2332
|
MultipleSelectInputComponent.prototype.ngOnInit = function () {
|
|
2279
2333
|
};
|
|
2280
|
-
__decorate([
|
|
2281
|
-
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
2282
|
-
__metadata("design:type", Object)
|
|
2283
|
-
], MultipleSelectInputComponent.prototype, "listModel", void 0);
|
|
2284
2334
|
__decorate([
|
|
2285
2335
|
Input(), TrackExternal(),
|
|
2286
2336
|
__metadata("design:type", ListModel)
|