@coolon/angular-ui-powerups 1.21.0 → 2.0.0-alpha.1
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 +16 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +22 -15
- 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/components.module.ngfactory.js.map +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 +12 -6
- 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.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-cell-renderer/table-cell-renderer.component.js.map +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/components/table/table.component.js +3 -2
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table.component.scss.ngstyle.js.map +1 -0
- 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/components.module.ngfactory.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 +12 -6
- 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-cell-renderer/table-cell-renderer.component.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/components/table/table.component.js +3 -2
- package/esm5/lib/components/table/table.component.js.map +1 -1
- package/esm5/lib/components/table/table.component.scss.ngstyle.js.map +1 -0
- 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 +24 -17
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +24 -17
- 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 +4 -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
- package/esm2015/lib/components/table/table.component.scss.shim.ngstyle.js.map +0 -1
- package/esm5/lib/components/table/table.component.scss.shim.ngstyle.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.0.0-alpha.1](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.0...v2.0.0-alpha.1) (2020-07-22)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* removed view encapsulation from aup-table and added column ids ([6fd47c0](https://bitbucket.org/coolon/angular-ui-powerups/commit/6fd47c042b1b32df595d1668c2ae68cd46319be6))
|
|
11
|
+
|
|
12
|
+
## [2.0.0-alpha.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.21.0...v2.0.0-alpha.0) (2020-07-02)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ⚠ BREAKING CHANGES
|
|
16
|
+
|
|
17
|
+
* updated to pectin 3.0
|
|
18
|
+
|
|
19
|
+
* updated to pectin 3.0 ([5c2ca5c](https://bitbucket.org/coolon/angular-ui-powerups/commit/5c2ca5c39789f9f38a8bd36a2d1401349550e62c))
|
|
20
|
+
|
|
5
21
|
## [1.21.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.20.0...v1.21.0) (2020-06-30)
|
|
6
22
|
|
|
7
23
|
|
|
@@ -860,14 +860,14 @@
|
|
|
860
860
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
861
861
|
*
|
|
862
862
|
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
863
|
-
* valueModel:
|
|
863
|
+
* valueModel: Form.ListModelBase<string> | IMutableListModel<string>;
|
|
864
864
|
*
|
|
865
865
|
* This approach allows the input to accept plain or form models but all backed by a form
|
|
866
866
|
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
867
867
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
868
868
|
*/
|
|
869
869
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
870
|
-
_this.inputModel = _this.registerDisposable(new pectin.
|
|
870
|
+
_this.inputModel = _this.registerDisposable(new pectin.Form.DelegatingListModel());
|
|
871
871
|
return _this;
|
|
872
872
|
}
|
|
873
873
|
AbstractListInputComponent = __decorate([
|
|
@@ -879,23 +879,29 @@
|
|
|
879
879
|
var AbstractValueInputComponent = /** @class */ (function (_super) {
|
|
880
880
|
__extends(AbstractValueInputComponent, _super);
|
|
881
881
|
function AbstractValueInputComponent() {
|
|
882
|
-
var _this = _super
|
|
882
|
+
var _this = _super.call(this) || this;
|
|
883
883
|
/**
|
|
884
884
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
885
885
|
*
|
|
886
886
|
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
887
|
-
* valueModel:
|
|
887
|
+
* valueModel: DirtyTrackingForm.ValueModel<string> | IMutableValueModel<string>;
|
|
888
888
|
*
|
|
889
889
|
* This approach allows the input to accept plain or form models but all backed by a form
|
|
890
890
|
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
891
891
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
892
892
|
*/
|
|
893
893
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
894
|
-
_this.inputModel = _this.registerDisposable(new pectin.
|
|
894
|
+
_this.inputModel = _this.registerDisposable(new pectin.Form.DelegatingValueModel());
|
|
895
|
+
_this.inputModel.onTransactionStart(function (tx) {
|
|
896
|
+
tx.onRootTransactionFinalised(function () {
|
|
897
|
+
console.log({ changed: tx.hasChanged() });
|
|
898
|
+
});
|
|
899
|
+
});
|
|
895
900
|
return _this;
|
|
896
901
|
}
|
|
897
902
|
AbstractValueInputComponent = __decorate([
|
|
898
|
-
core.Component({ template: '' })
|
|
903
|
+
core.Component({ template: '' }),
|
|
904
|
+
__metadata("design:paramtypes", [])
|
|
899
905
|
], AbstractValueInputComponent);
|
|
900
906
|
return AbstractValueInputComponent;
|
|
901
907
|
}(AbstractInputComponent));
|
|
@@ -974,7 +980,7 @@
|
|
|
974
980
|
PasswordInputComponent.prototype.ngOnInit = function () {
|
|
975
981
|
};
|
|
976
982
|
__decorate([
|
|
977
|
-
core.Input(), pectin.TrackExternal({ delegateTo:
|
|
983
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
|
|
978
984
|
__metadata("design:type", Object)
|
|
979
985
|
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
980
986
|
PasswordInputComponent = __decorate([
|
|
@@ -998,7 +1004,7 @@
|
|
|
998
1004
|
SelectInputComponent.prototype.ngOnInit = function () {
|
|
999
1005
|
};
|
|
1000
1006
|
__decorate([
|
|
1001
|
-
core.Input(), pectin.TrackExternal({ delegateTo:
|
|
1007
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
|
|
1002
1008
|
__metadata("design:type", Object)
|
|
1003
1009
|
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
1004
1010
|
__decorate([
|
|
@@ -1018,11 +1024,11 @@
|
|
|
1018
1024
|
__metadata("design:type", Boolean)
|
|
1019
1025
|
], SelectInputComponent.prototype, "allowNil", void 0);
|
|
1020
1026
|
__decorate([
|
|
1021
|
-
core.ContentChild(
|
|
1027
|
+
core.ContentChild('optionTemplate'),
|
|
1022
1028
|
__metadata("design:type", core.TemplateRef)
|
|
1023
1029
|
], SelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
1024
1030
|
__decorate([
|
|
1025
|
-
core.ContentChild(
|
|
1031
|
+
core.ContentChild('nilOptionTemplate'),
|
|
1026
1032
|
__metadata("design:type", core.TemplateRef)
|
|
1027
1033
|
], SelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
1028
1034
|
__decorate([
|
|
@@ -1878,7 +1884,7 @@
|
|
|
1878
1884
|
* }
|
|
1879
1885
|
* const colorsNames: ListModel<string> = ...;
|
|
1880
1886
|
* const model = TableModel.fromList(heroList, table => {
|
|
1881
|
-
* table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel:
|
|
1887
|
+
* table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: DirtyTrackingForm.ValueModel<string> | ValueModel<string>; }
|
|
1882
1888
|
* table.pluck("lastName").cellEditor(StringInputComponent, {
|
|
1883
1889
|
* validators: [Validator.present("We need a last name")]
|
|
1884
1890
|
* });
|
|
@@ -1907,7 +1913,7 @@
|
|
|
1907
1913
|
* // configure your component with what ever you need.
|
|
1908
1914
|
* });
|
|
1909
1915
|
* .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }
|
|
1910
|
-
* .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel:
|
|
1916
|
+
* .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: DirtyTrackingForm.ValueModel<string> | ValueModel<string>; }
|
|
1911
1917
|
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
1912
1918
|
* });
|
|
1913
1919
|
*
|
|
@@ -1936,7 +1942,7 @@
|
|
|
1936
1942
|
this._columns = new pectin.MutableListModel();
|
|
1937
1943
|
this._editorSessions = new pectin.MutableListModel();
|
|
1938
1944
|
this.rowClassNamePredicates = [];
|
|
1939
|
-
this._createForm = function (row) { return new pectin.
|
|
1945
|
+
this._createForm = function (row) { return new pectin.DirtyTrackingForm(); };
|
|
1940
1946
|
this.identityOf = sourceOfTruth.identityOf;
|
|
1941
1947
|
var _a = pectin.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;
|
|
1942
1948
|
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
@@ -2145,7 +2151,8 @@
|
|
|
2145
2151
|
TableComponent = __decorate([
|
|
2146
2152
|
core.Component({
|
|
2147
2153
|
selector: 'aup-table',
|
|
2148
|
-
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.getTrackByFunction()\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\" matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef>\n <aup-table-header-cell-renderer [column]=\"column\"\n [attr.column-index]=\"index\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"onCellClicked(column, row)\" [class.enable-cursor]=\"tableModel.isRowSelectionEnabledFor(column)\">\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value;\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n ></tr>\n\n</table>\n",
|
|
2154
|
+
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.getTrackByFunction()\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\" matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef>\n <aup-table-header-cell-renderer [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"onCellClicked(column, row)\" [class.enable-cursor]=\"tableModel.isRowSelectionEnabledFor(column)\">\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value;\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n ></tr>\n\n</table>\n",
|
|
2155
|
+
encapsulation: core.ViewEncapsulation.None,
|
|
2149
2156
|
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]
|
|
2150
2157
|
}),
|
|
2151
2158
|
__metadata("design:paramtypes", [])
|
|
@@ -3743,7 +3750,7 @@
|
|
|
3743
3750
|
var _this = _super.call(this) || this;
|
|
3744
3751
|
_this.data = data;
|
|
3745
3752
|
_this.class = 'aup-input-activity';
|
|
3746
|
-
var form = new pectin.
|
|
3753
|
+
var form = new pectin.DirtyTrackingForm();
|
|
3747
3754
|
_this.valueModel = form.valueModel(_this.data.initialValue);
|
|
3748
3755
|
_this.valueModel.validateUsing(data.validators || []);
|
|
3749
3756
|
_this.confirmCommand = pectin.Command.create(function () {
|