@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 { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, FocusManager,
|
|
16
|
+
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, 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';
|
|
@@ -615,14 +615,14 @@ let AbstractListInputComponent = class AbstractListInputComponent extends Abstra
|
|
|
615
615
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
616
616
|
*
|
|
617
617
|
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
618
|
-
* valueModel:
|
|
618
|
+
* valueModel: Form.ListModelBase<string> | IMutableListModel<string>;
|
|
619
619
|
*
|
|
620
620
|
* This approach allows the input to accept plain or form models but all backed by a form
|
|
621
621
|
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
622
622
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
623
623
|
*/
|
|
624
624
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
625
|
-
this.inputModel = this.registerDisposable(new
|
|
625
|
+
this.inputModel = this.registerDisposable(new Form.DelegatingListModel());
|
|
626
626
|
}
|
|
627
627
|
};
|
|
628
628
|
AbstractListInputComponent = __decorate([
|
|
@@ -636,14 +636,14 @@ let AbstractValueInputComponent = class AbstractValueInputComponent extends Abst
|
|
|
636
636
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
637
637
|
*
|
|
638
638
|
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
639
|
-
* valueModel:
|
|
639
|
+
* valueModel: DirtyTrackingForm.ValueModel<string> | IMutableValueModel<string>;
|
|
640
640
|
*
|
|
641
641
|
* This approach allows the input to accept plain or form models but all backed by a form
|
|
642
642
|
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
643
643
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
644
644
|
*/
|
|
645
645
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
646
|
-
this.inputModel = this.registerDisposable(new
|
|
646
|
+
this.inputModel = this.registerDisposable(new Form.DelegatingValueModel());
|
|
647
647
|
}
|
|
648
648
|
};
|
|
649
649
|
AbstractValueInputComponent = __decorate([
|
|
@@ -718,7 +718,7 @@ let PasswordInputComponent = class PasswordInputComponent extends AbstractValueI
|
|
|
718
718
|
}
|
|
719
719
|
};
|
|
720
720
|
__decorate([
|
|
721
|
-
Input(), TrackExternal({ delegateTo:
|
|
721
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
722
722
|
__metadata("design:type", Object)
|
|
723
723
|
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
724
724
|
PasswordInputComponent = __decorate([
|
|
@@ -739,7 +739,7 @@ let SelectInputComponent = class SelectInputComponent extends AbstractValueInput
|
|
|
739
739
|
}
|
|
740
740
|
};
|
|
741
741
|
__decorate([
|
|
742
|
-
Input(), TrackExternal({ delegateTo:
|
|
742
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
743
743
|
__metadata("design:type", Object)
|
|
744
744
|
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
745
745
|
__decorate([
|
|
@@ -759,11 +759,11 @@ __decorate([
|
|
|
759
759
|
__metadata("design:type", Boolean)
|
|
760
760
|
], SelectInputComponent.prototype, "allowNil", void 0);
|
|
761
761
|
__decorate([
|
|
762
|
-
ContentChild(
|
|
762
|
+
ContentChild('optionTemplate'),
|
|
763
763
|
__metadata("design:type", TemplateRef)
|
|
764
764
|
], SelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
765
765
|
__decorate([
|
|
766
|
-
ContentChild(
|
|
766
|
+
ContentChild('nilOptionTemplate'),
|
|
767
767
|
__metadata("design:type", TemplateRef)
|
|
768
768
|
], SelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
769
769
|
__decorate([
|
|
@@ -1525,7 +1525,7 @@ class RowClass {
|
|
|
1525
1525
|
* }
|
|
1526
1526
|
* const colorsNames: ListModel<string> = ...;
|
|
1527
1527
|
* const model = TableModel.fromList(heroList, table => {
|
|
1528
|
-
* table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel:
|
|
1528
|
+
* table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: DirtyTrackingForm.ValueModel<string> | ValueModel<string>; }
|
|
1529
1529
|
* table.pluck("lastName").cellEditor(StringInputComponent, {
|
|
1530
1530
|
* validators: [Validator.present("We need a last name")]
|
|
1531
1531
|
* });
|
|
@@ -1554,7 +1554,7 @@ class RowClass {
|
|
|
1554
1554
|
* // configure your component with what ever you need.
|
|
1555
1555
|
* });
|
|
1556
1556
|
* .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }
|
|
1557
|
-
* .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel:
|
|
1557
|
+
* .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: DirtyTrackingForm.ValueModel<string> | ValueModel<string>; }
|
|
1558
1558
|
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
1559
1559
|
* });
|
|
1560
1560
|
*
|
|
@@ -1582,7 +1582,7 @@ let TableModel = TableModel_1 = class TableModel {
|
|
|
1582
1582
|
this._columns = new MutableListModel();
|
|
1583
1583
|
this._editorSessions = new MutableListModel();
|
|
1584
1584
|
this.rowClassNamePredicates = [];
|
|
1585
|
-
this._createForm = (row) => new
|
|
1585
|
+
this._createForm = (row) => new DirtyTrackingForm();
|
|
1586
1586
|
this.identityOf = sourceOfTruth.identityOf;
|
|
1587
1587
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this._garbage);
|
|
1588
1588
|
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
@@ -3232,7 +3232,7 @@ let AbstractInputActivity = class AbstractInputActivity extends Activity {
|
|
|
3232
3232
|
super();
|
|
3233
3233
|
this.data = data;
|
|
3234
3234
|
this.class = 'aup-input-activity';
|
|
3235
|
-
const form = new
|
|
3235
|
+
const form = new DirtyTrackingForm();
|
|
3236
3236
|
this.valueModel = form.valueModel(this.data.initialValue);
|
|
3237
3237
|
this.valueModel.validateUsing(data.validators || []);
|
|
3238
3238
|
this.confirmCommand = Command.create(() => {
|