@coolon/angular-ui-powerups 1.21.0 → 2.0.0-alpha.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/CHANGELOG.md +9 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +12 -12
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
- 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-list-input.component.js +3 -3
- package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.js +3 -3
- package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +1 -1
- 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 +3 -3
- package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
- 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.map +1 -1
- package/esm2015/lib/components/table/cell-editors.js.map +1 -1
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -1
- package/esm2015/lib/components/table/edit-session.js.map +1 -1
- package/esm2015/lib/components/table/edit-session.metadata.json +1 -1
- package/esm2015/lib/components/table/table-model.js +4 -4
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js +2 -2
- package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js.map +1 -1
- package/esm2015/lib/interaction/components/input-activities/input-activity-data.js.map +1 -1
- package/esm5/lib/components/forms/abstract-list-input.component.js +3 -3
- package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js +3 -3
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
- 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.map +1 -1
- 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 +1 -1
- 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 +3 -3
- 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.map +1 -1
- 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/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -1
- package/esm5/lib/components/table/edit-session.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +4 -4
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/interaction/components/input-activities/abstract-input-activity.js +2 -2
- package/esm5/lib/interaction/components/input-activities/abstract-input-activity.js.map +1 -1
- package/esm5/lib/interaction/components/input-activities/input-activity-data.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +13 -13
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +13 -13
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-list-input.component.d.ts +3 -3
- package/lib/components/forms/abstract-value-input.component.d.ts +3 -3
- package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +2 -2
- package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +2 -2
- package/lib/components/forms/number-input/number-input.component.d.ts +2 -2
- package/lib/components/forms/password-input/password-input.component.d.ts +2 -2
- package/lib/components/forms/select-input/select-input.component.d.ts +2 -2
- package/lib/components/forms/string-input/string-input.component.d.ts +2 -2
- package/lib/components/forms/text-input/text-input.component.d.ts +2 -2
- package/lib/components/table/cell-editors.d.ts +3 -3
- package/lib/components/table/column-model.d.ts +2 -2
- package/lib/components/table/edit-row-controls/edit-row-controls.component.d.ts +2 -2
- package/lib/components/table/edit-session.d.ts +4 -4
- package/lib/components/table/table-model.d.ts +5 -5
- package/lib/interaction/components/input-activities/abstract-input-activity.d.ts +2 -2
- package/lib/interaction/components/input-activities/input-activity-data.d.ts +2 -2
- 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,
|
|
16
|
+
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, FocusManager, Form, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MutableValueModel, MultipleSelectionModel, MutableListModel, DirtyTrackingForm, DelegatingCommand, Deferred, Trace, Guard, 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';
|
|
@@ -688,14 +688,14 @@ var AbstractListInputComponent = /** @class */ (function (_super) {
|
|
|
688
688
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
689
689
|
*
|
|
690
690
|
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
691
|
-
* valueModel:
|
|
691
|
+
* valueModel: Form.ListModelBase<string> | IMutableListModel<string>;
|
|
692
692
|
*
|
|
693
693
|
* This approach allows the input to accept plain or form models but all backed by a form
|
|
694
694
|
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
695
695
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
696
696
|
*/
|
|
697
697
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
698
|
-
_this.inputModel = _this.registerDisposable(new
|
|
698
|
+
_this.inputModel = _this.registerDisposable(new Form.DelegatingListModel());
|
|
699
699
|
return _this;
|
|
700
700
|
}
|
|
701
701
|
AbstractListInputComponent = __decorate([
|
|
@@ -712,14 +712,14 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
|
|
|
712
712
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
713
713
|
*
|
|
714
714
|
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
715
|
-
* valueModel:
|
|
715
|
+
* valueModel: DirtyTrackingForm.ValueModel<string> | IMutableValueModel<string>;
|
|
716
716
|
*
|
|
717
717
|
* This approach allows the input to accept plain or form models but all backed by a form
|
|
718
718
|
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
719
719
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
720
720
|
*/
|
|
721
721
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
722
|
-
_this.inputModel = _this.registerDisposable(new
|
|
722
|
+
_this.inputModel = _this.registerDisposable(new Form.DelegatingValueModel());
|
|
723
723
|
return _this;
|
|
724
724
|
}
|
|
725
725
|
AbstractValueInputComponent = __decorate([
|
|
@@ -802,7 +802,7 @@ var PasswordInputComponent = /** @class */ (function (_super) {
|
|
|
802
802
|
PasswordInputComponent.prototype.ngOnInit = function () {
|
|
803
803
|
};
|
|
804
804
|
__decorate([
|
|
805
|
-
Input(), TrackExternal({ delegateTo:
|
|
805
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
806
806
|
__metadata("design:type", Object)
|
|
807
807
|
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
808
808
|
PasswordInputComponent = __decorate([
|
|
@@ -826,7 +826,7 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
826
826
|
SelectInputComponent.prototype.ngOnInit = function () {
|
|
827
827
|
};
|
|
828
828
|
__decorate([
|
|
829
|
-
Input(), TrackExternal({ delegateTo:
|
|
829
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
830
830
|
__metadata("design:type", Object)
|
|
831
831
|
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
832
832
|
__decorate([
|
|
@@ -846,11 +846,11 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
846
846
|
__metadata("design:type", Boolean)
|
|
847
847
|
], SelectInputComponent.prototype, "allowNil", void 0);
|
|
848
848
|
__decorate([
|
|
849
|
-
ContentChild(
|
|
849
|
+
ContentChild('optionTemplate'),
|
|
850
850
|
__metadata("design:type", TemplateRef)
|
|
851
851
|
], SelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
852
852
|
__decorate([
|
|
853
|
-
ContentChild(
|
|
853
|
+
ContentChild('nilOptionTemplate'),
|
|
854
854
|
__metadata("design:type", TemplateRef)
|
|
855
855
|
], SelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
856
856
|
__decorate([
|
|
@@ -1706,7 +1706,7 @@ var RowClass = /** @class */ (function () {
|
|
|
1706
1706
|
* }
|
|
1707
1707
|
* const colorsNames: ListModel<string> = ...;
|
|
1708
1708
|
* const model = TableModel.fromList(heroList, table => {
|
|
1709
|
-
* table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel:
|
|
1709
|
+
* table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: DirtyTrackingForm.ValueModel<string> | ValueModel<string>; }
|
|
1710
1710
|
* table.pluck("lastName").cellEditor(StringInputComponent, {
|
|
1711
1711
|
* validators: [Validator.present("We need a last name")]
|
|
1712
1712
|
* });
|
|
@@ -1735,7 +1735,7 @@ var RowClass = /** @class */ (function () {
|
|
|
1735
1735
|
* // configure your component with what ever you need.
|
|
1736
1736
|
* });
|
|
1737
1737
|
* .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }
|
|
1738
|
-
* .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel:
|
|
1738
|
+
* .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: DirtyTrackingForm.ValueModel<string> | ValueModel<string>; }
|
|
1739
1739
|
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
1740
1740
|
* });
|
|
1741
1741
|
*
|
|
@@ -1764,7 +1764,7 @@ var TableModel = /** @class */ (function () {
|
|
|
1764
1764
|
this._columns = new MutableListModel();
|
|
1765
1765
|
this._editorSessions = new MutableListModel();
|
|
1766
1766
|
this.rowClassNamePredicates = [];
|
|
1767
|
-
this._createForm = function (row) { return new
|
|
1767
|
+
this._createForm = function (row) { return new DirtyTrackingForm(); };
|
|
1768
1768
|
this.identityOf = sourceOfTruth.identityOf;
|
|
1769
1769
|
var _a = Dsl.disposeWith(this._garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1770
1770
|
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
@@ -3571,7 +3571,7 @@ var AbstractInputActivity = /** @class */ (function (_super) {
|
|
|
3571
3571
|
var _this = _super.call(this) || this;
|
|
3572
3572
|
_this.data = data;
|
|
3573
3573
|
_this.class = 'aup-input-activity';
|
|
3574
|
-
var form = new
|
|
3574
|
+
var form = new DirtyTrackingForm();
|
|
3575
3575
|
_this.valueModel = form.valueModel(_this.data.initialValue);
|
|
3576
3576
|
_this.valueModel.validateUsing(data.validators || []);
|
|
3577
3577
|
_this.confirmCommand = Command.create(function () {
|