@coolon/angular-ui-powerups 1.20.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 +21 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +82 -47
- 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/components.module.js +3 -1
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.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 +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/icon/icon.component.js +21 -23
- package/esm2015/lib/components/icon/icon.component.js.map +1 -1
- package/esm2015/lib/components/icon/icon.component.metadata.json +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 +24 -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 +1 -1
- 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/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js +10 -1
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.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/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +1 -1
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/components.module.js +3 -1
- package/esm5/lib/components/components.module.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 +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/icon/icon.component.js +30 -27
- package/esm5/lib/components/icon/icon.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 +26 -4
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/components/table/table.component.js +1 -1
- package/esm5/lib/components/table/table.component.js.map +1 -1
- package/esm5/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js +10 -1
- package/esm5/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.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/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js +1 -1
- package/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +69 -41
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +80 -45
- 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/icon/icon.component.d.ts +6 -7
- 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 +8 -5
- package/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.d.ts +9 -0
- 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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
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.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.21.0...v2.0.0-alpha.0) (2020-07-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* updated to pectin 3.0
|
|
11
|
+
|
|
12
|
+
* updated to pectin 3.0 ([5c2ca5c](https://bitbucket.org/coolon/angular-ui-powerups/commit/5c2ca5c39789f9f38a8bd36a2d1401349550e62c))
|
|
13
|
+
|
|
14
|
+
## [1.21.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.20.0...v1.21.0) (2020-06-30)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* added row class specifiers to table model ([1ab39cf](https://bitbucket.org/coolon/angular-ui-powerups/commit/1ab39cf3375114659beaf3dada5a3b479f03867e))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* fixed icon failing to update when icon type changed ([24d3e87](https://bitbucket.org/coolon/angular-ui-powerups/commit/24d3e875768db3609e41fcc842c1219961e0a7bf))
|
|
25
|
+
|
|
5
26
|
## [1.20.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.19.1...v1.20.0) (2020-06-26)
|
|
6
27
|
|
|
7
28
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/cdk/portal'), require('@angular/cdk/scrolling'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/icon'), require('@angular/material/table'), require('@coolon/pectin'), require('@coolon/typescript-utilities'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('lodash'), require('immer'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-solid-svg-icons'), require('@angular/flex-layout'), require('@angular/material/dialog'), require('@angular/router'), require('@angular/cdk/overlay'), require('resize-observer-polyfill'), require('@angular/material/progress-spinner'), require('@angular/material/list'), require('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/cdk/portal', '@angular/cdk/scrolling', '@angular/material/button', '@angular/material/checkbox', '@angular/material/icon', '@angular/material/table', '@coolon/pectin', '@coolon/typescript-utilities', '@typescript-plus/fast-memoize-decorator/dist/src', 'lodash', 'immer', '@fortawesome/angular-fontawesome', '@fortawesome/free-solid-svg-icons', '@angular/flex-layout', '@angular/material/dialog', '@angular/router', '@angular/cdk/overlay', 'resize-observer-polyfill', '@angular/material/progress-spinner', '@angular/material/list', '@
|
|
4
|
-
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.cdk.portal, global.ng.cdk.scrolling, global.ng.material.button, global.ng.material.checkbox, global.ng.material.icon, global.ng.material.table, global.pectin, global.typescriptUtilities, global.src, global.___default, global.produce, global.angularFontawesome, global.freeSolidSvgIcons, global.ng.flexLayout, global.ng.material.dialog, global.ng.router, global.ng.cdk.overlay, global.ResizeObserver, global.ng.material.progressSpinner, global.ng.material.list, global.
|
|
5
|
-
}(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, portal, scrolling, button, checkbox, icon, table, pectin, typescriptUtilities, src, ___default, produce, angularFontawesome, freeSolidSvgIcons, flexLayout, dialog, router, overlay, ResizeObserver, progressSpinner, list,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/cdk/portal'), require('@angular/cdk/scrolling'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/icon'), require('@angular/material/table'), require('@coolon/pectin'), require('@coolon/typescript-utilities'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('lodash'), require('immer'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-solid-svg-icons'), require('@angular/material/tooltip'), require('@angular/flex-layout'), require('@angular/material/dialog'), require('@angular/router'), require('@angular/cdk/overlay'), require('resize-observer-polyfill'), require('@angular/material/progress-spinner'), require('@angular/material/list'), require('@typescript-plus/fast-memoize-decorator'), require('reflect-metadata'), require('@angular/animations'), require('rxjs')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/cdk/portal', '@angular/cdk/scrolling', '@angular/material/button', '@angular/material/checkbox', '@angular/material/icon', '@angular/material/table', '@coolon/pectin', '@coolon/typescript-utilities', '@typescript-plus/fast-memoize-decorator/dist/src', 'lodash', 'immer', '@fortawesome/angular-fontawesome', '@fortawesome/free-solid-svg-icons', '@angular/material/tooltip', '@angular/flex-layout', '@angular/material/dialog', '@angular/router', '@angular/cdk/overlay', 'resize-observer-polyfill', '@angular/material/progress-spinner', '@angular/material/list', '@typescript-plus/fast-memoize-decorator', 'reflect-metadata', '@angular/animations', 'rxjs'], factory) :
|
|
4
|
+
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.cdk.portal, global.ng.cdk.scrolling, global.ng.material.button, global.ng.material.checkbox, global.ng.material.icon, global.ng.material.table, global.pectin, global.typescriptUtilities, global.src, global.___default, global.produce, global.angularFontawesome, global.freeSolidSvgIcons, global.ng.material.tooltip, global.ng.flexLayout, global.ng.material.dialog, global.ng.router, global.ng.cdk.overlay, global.ResizeObserver, global.ng.material.progressSpinner, global.ng.material.list, global.fastMemoizeDecorator, null, global.ng.animations, global.rxjs));
|
|
5
|
+
}(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, portal, scrolling, button, checkbox, icon, table, pectin, typescriptUtilities, src, ___default, produce, angularFontawesome, freeSolidSvgIcons, tooltip, flexLayout, dialog, router, overlay, ResizeObserver, progressSpinner, list, fastMemoizeDecorator, reflectMetadata, animations$1, rxjs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var ___default__default = 'default' in ___default ? ___default['default'] : ___default;
|
|
8
8
|
produce = produce && Object.prototype.hasOwnProperty.call(produce, 'default') ? produce['default'] : produce;
|
|
@@ -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([
|
|
@@ -884,14 +884,14 @@
|
|
|
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
895
|
return _this;
|
|
896
896
|
}
|
|
897
897
|
AbstractValueInputComponent = __decorate([
|
|
@@ -974,7 +974,7 @@
|
|
|
974
974
|
PasswordInputComponent.prototype.ngOnInit = function () {
|
|
975
975
|
};
|
|
976
976
|
__decorate([
|
|
977
|
-
core.Input(), pectin.TrackExternal({ delegateTo:
|
|
977
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
|
|
978
978
|
__metadata("design:type", Object)
|
|
979
979
|
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
980
980
|
PasswordInputComponent = __decorate([
|
|
@@ -998,7 +998,7 @@
|
|
|
998
998
|
SelectInputComponent.prototype.ngOnInit = function () {
|
|
999
999
|
};
|
|
1000
1000
|
__decorate([
|
|
1001
|
-
core.Input(), pectin.TrackExternal({ delegateTo:
|
|
1001
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
|
|
1002
1002
|
__metadata("design:type", Object)
|
|
1003
1003
|
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
1004
1004
|
__decorate([
|
|
@@ -1018,11 +1018,11 @@
|
|
|
1018
1018
|
__metadata("design:type", Boolean)
|
|
1019
1019
|
], SelectInputComponent.prototype, "allowNil", void 0);
|
|
1020
1020
|
__decorate([
|
|
1021
|
-
core.ContentChild(
|
|
1021
|
+
core.ContentChild('optionTemplate'),
|
|
1022
1022
|
__metadata("design:type", core.TemplateRef)
|
|
1023
1023
|
], SelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
1024
1024
|
__decorate([
|
|
1025
|
-
core.ContentChild(
|
|
1025
|
+
core.ContentChild('nilOptionTemplate'),
|
|
1026
1026
|
__metadata("design:type", core.TemplateRef)
|
|
1027
1027
|
], SelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
1028
1028
|
__decorate([
|
|
@@ -1851,6 +1851,13 @@
|
|
|
1851
1851
|
|
|
1852
1852
|
// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
|
|
1853
1853
|
// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
|
|
1854
|
+
var RowClass = /** @class */ (function () {
|
|
1855
|
+
function RowClass(className, matches) {
|
|
1856
|
+
this.className = className;
|
|
1857
|
+
this.matches = matches;
|
|
1858
|
+
}
|
|
1859
|
+
return RowClass;
|
|
1860
|
+
}());
|
|
1854
1861
|
/**
|
|
1855
1862
|
* Example:
|
|
1856
1863
|
* @example
|
|
@@ -1871,7 +1878,7 @@
|
|
|
1871
1878
|
* }
|
|
1872
1879
|
* const colorsNames: ListModel<string> = ...;
|
|
1873
1880
|
* const model = TableModel.fromList(heroList, table => {
|
|
1874
|
-
* table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel:
|
|
1881
|
+
* table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: DirtyTrackingForm.ValueModel<string> | ValueModel<string>; }
|
|
1875
1882
|
* table.pluck("lastName").cellEditor(StringInputComponent, {
|
|
1876
1883
|
* validators: [Validator.present("We need a last name")]
|
|
1877
1884
|
* });
|
|
@@ -1900,7 +1907,7 @@
|
|
|
1900
1907
|
* // configure your component with what ever you need.
|
|
1901
1908
|
* });
|
|
1902
1909
|
* .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }
|
|
1903
|
-
* .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel:
|
|
1910
|
+
* .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: DirtyTrackingForm.ValueModel<string> | ValueModel<string>; }
|
|
1904
1911
|
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
1905
1912
|
* });
|
|
1906
1913
|
*
|
|
@@ -1923,11 +1930,13 @@
|
|
|
1923
1930
|
*/
|
|
1924
1931
|
var TableModel = /** @class */ (function () {
|
|
1925
1932
|
function TableModel(sourceOfTruth) {
|
|
1933
|
+
var _this = this;
|
|
1926
1934
|
this.sourceOfTruth = sourceOfTruth;
|
|
1927
1935
|
this._garbage = new pectin.GarbageCollector();
|
|
1928
1936
|
this._columns = new pectin.MutableListModel();
|
|
1929
1937
|
this._editorSessions = new pectin.MutableListModel();
|
|
1930
|
-
this.
|
|
1938
|
+
this.rowClassNamePredicates = [];
|
|
1939
|
+
this._createForm = function (row) { return new pectin.DirtyTrackingForm(); };
|
|
1931
1940
|
this.identityOf = sourceOfTruth.identityOf;
|
|
1932
1941
|
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;
|
|
1933
1942
|
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
@@ -1939,6 +1948,7 @@
|
|
|
1939
1948
|
this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
|
|
1940
1949
|
this.firstEditableColumn = chain(this.columns).select(function (c) { return c.hasEditorPortal(); }).first();
|
|
1941
1950
|
this.hasColumnsWithRowSelectionExplicitlyEnabled = chain(this._columns).findIndex(function (column) { return column.isRowSelectionExplicitlyEnabled(); }).isGreaterThanOrEqualTo(0);
|
|
1951
|
+
this.addRowClass("enable-hover", function () { return _this.isRowSelectionEnabled(); });
|
|
1942
1952
|
}
|
|
1943
1953
|
TableModel_1 = TableModel;
|
|
1944
1954
|
TableModel.fromList = function (sourceOfTruth, builder) {
|
|
@@ -1987,6 +1997,18 @@
|
|
|
1987
1997
|
TableModel.prototype.addTemplateColumn = function (columnId) {
|
|
1988
1998
|
return this.addColumn(new CustomTemplateColumnModel(columnId, this));
|
|
1989
1999
|
};
|
|
2000
|
+
TableModel.prototype.addRowClass = function (className, predicate) {
|
|
2001
|
+
this.rowClassNamePredicates.push(new RowClass(className, predicate));
|
|
2002
|
+
};
|
|
2003
|
+
TableModel.prototype.getRowClasses = function (row) {
|
|
2004
|
+
var classNames = [];
|
|
2005
|
+
this.rowClassNamePredicates.forEach(function (i) {
|
|
2006
|
+
if (i.matches(row)) {
|
|
2007
|
+
classNames.push(i.className);
|
|
2008
|
+
}
|
|
2009
|
+
});
|
|
2010
|
+
return classNames;
|
|
2011
|
+
};
|
|
1990
2012
|
TableModel.prototype.useFormFactory = function (factory) {
|
|
1991
2013
|
this._createForm = factory;
|
|
1992
2014
|
return this;
|
|
@@ -2123,7 +2145,7 @@
|
|
|
2123
2145
|
TableComponent = __decorate([
|
|
2124
2146
|
core.Component({
|
|
2125
2147
|
selector: 'aup-table',
|
|
2126
|
-
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;\"
|
|
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",
|
|
2127
2149
|
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]
|
|
2128
2150
|
}),
|
|
2129
2151
|
__metadata("design:paramtypes", [])
|
|
@@ -2446,38 +2468,41 @@
|
|
|
2446
2468
|
var IconComponent = /** @class */ (function () {
|
|
2447
2469
|
function IconComponent() {
|
|
2448
2470
|
}
|
|
2449
|
-
IconComponent.prototype
|
|
2450
|
-
|
|
2451
|
-
return this.
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2471
|
+
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
2472
|
+
get: function () {
|
|
2473
|
+
return this._icon;
|
|
2474
|
+
},
|
|
2475
|
+
set: function (iconName) {
|
|
2476
|
+
this._icon = iconName;
|
|
2477
|
+
if (!iconName) {
|
|
2478
|
+
this.errorMessage = 'icon is nil';
|
|
2479
|
+
this.prefix = undefined;
|
|
2480
|
+
return;
|
|
2481
|
+
}
|
|
2482
|
+
var colonIndex = iconName.indexOf(':');
|
|
2483
|
+
if (colonIndex > 0) {
|
|
2484
|
+
this.prefix = this.icon.slice(0, colonIndex);
|
|
2485
|
+
this.suffix = this.icon.slice(colonIndex + 1);
|
|
2486
|
+
}
|
|
2487
|
+
if (this.prefix) {
|
|
2488
|
+
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
2489
|
+
}
|
|
2490
|
+
this.errorMessage = "Unknown icon prefix \"" + this.prefix + "\"";
|
|
2491
|
+
},
|
|
2492
|
+
enumerable: true,
|
|
2493
|
+
configurable: true
|
|
2494
|
+
});
|
|
2470
2495
|
__decorate([
|
|
2471
2496
|
core.Input(),
|
|
2472
|
-
__metadata("design:type", String)
|
|
2473
|
-
|
|
2497
|
+
__metadata("design:type", String),
|
|
2498
|
+
__metadata("design:paramtypes", [String])
|
|
2499
|
+
], IconComponent.prototype, "icon", null);
|
|
2474
2500
|
IconComponent = __decorate([
|
|
2475
2501
|
core.Component({
|
|
2476
2502
|
selector: 'aup-icon',
|
|
2477
|
-
template: "<mat-icon *
|
|
2478
|
-
styles: [":host{display:inline-flex;width:24px}fa-icon{
|
|
2479
|
-
})
|
|
2480
|
-
__metadata("design:paramtypes", [])
|
|
2503
|
+
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"'svg'\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"'mat'\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"'fab'\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n",
|
|
2504
|
+
styles: [":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center;width:24px;height:24px}.svgIcon{width:24px;height:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{width:inherit;height:inherit}"]
|
|
2505
|
+
})
|
|
2481
2506
|
], IconComponent);
|
|
2482
2507
|
return IconComponent;
|
|
2483
2508
|
}());
|
|
@@ -2538,7 +2563,8 @@
|
|
|
2538
2563
|
table.MatTableModule,
|
|
2539
2564
|
portal.PortalModule,
|
|
2540
2565
|
scrolling.CdkScrollableModule,
|
|
2541
|
-
angularFontawesome.FontAwesomeModule
|
|
2566
|
+
angularFontawesome.FontAwesomeModule,
|
|
2567
|
+
tooltip.MatTooltipModule
|
|
2542
2568
|
],
|
|
2543
2569
|
exports: [
|
|
2544
2570
|
NumberInputComponent,
|
|
@@ -3431,6 +3457,15 @@
|
|
|
3431
3457
|
return InPlaceInteractionContextComponent;
|
|
3432
3458
|
}(DisposableComponent));
|
|
3433
3459
|
|
|
3460
|
+
/**
|
|
3461
|
+
* Css Vars.
|
|
3462
|
+
* --link-color
|
|
3463
|
+
* --link-color-hover
|
|
3464
|
+
* --link-background
|
|
3465
|
+
* --link-background-hover
|
|
3466
|
+
* --link-border-radius
|
|
3467
|
+
* --link-padding
|
|
3468
|
+
*/
|
|
3434
3469
|
var AddItemInteractionContextComponent = /** @class */ (function (_super) {
|
|
3435
3470
|
__extends(AddItemInteractionContextComponent, _super);
|
|
3436
3471
|
function AddItemInteractionContextComponent() {
|
|
@@ -3499,7 +3534,7 @@
|
|
|
3499
3534
|
core.Component({
|
|
3500
3535
|
selector: 'aup-add-item-interaction-context',
|
|
3501
3536
|
template: "<aup-in-place-interaction-context [animateFirstActivity]=\"false\">\n <a part=\"link\" class=\"link\" [pectinCommand]=\"clickCommand\"><aup-icon [icon]=\"icon\"></aup-icon> {{label}}</a>\n</aup-in-place-interaction-context>\n",
|
|
3502
|
-
styles: [":host{--def-link-color:var(--link-color, currentColor);--def-link-color-hover:var(--link-color-hover, currentColor);--def-link-
|
|
3537
|
+
styles: [":host{--def-link-color:var(--link-color, currentColor);--def-link-color-hover:var(--link-color-hover, currentColor);--def-link-background:var(--link-background, transparent);--def-link-background-hover:var(--link-background-hover, rgba(0, 0, 0, 0.05));--def-link-border-radius:var(--link-border-radius, 4px);--def-link-padding:var(--link-padding, calc(var(--aup-default-padding) / 2));display:flex;flex-direction:column;border-radius:var(--def-link-border-radius);box-sizing:border-box;outline:0}:host:hover a.link{color:var(--def-link-color-hover);background-color:var(--def-link-background-hover)}aup-in-place-interaction-context{border-radius:var(--def-link-border-radius)}a.link{display:flex;flex-direction:row;align-items:center;border-radius:var(--def-link-border-radius);color:var(--def-link-color);background:var(--def-link-background);padding:var(--def-link-padding);cursor:pointer;text-decoration:none}a.link mat-icon{margin-right:8px}"]
|
|
3503
3538
|
}),
|
|
3504
3539
|
__metadata("design:paramtypes", [])
|
|
3505
3540
|
], AddItemInteractionContextComponent);
|
|
@@ -3708,7 +3743,7 @@
|
|
|
3708
3743
|
var _this = _super.call(this) || this;
|
|
3709
3744
|
_this.data = data;
|
|
3710
3745
|
_this.class = 'aup-input-activity';
|
|
3711
|
-
var form = new pectin.
|
|
3746
|
+
var form = new pectin.DirtyTrackingForm();
|
|
3712
3747
|
_this.valueModel = form.valueModel(_this.data.initialValue);
|
|
3713
3748
|
_this.valueModel.validateUsing(data.validators || []);
|
|
3714
3749
|
_this.confirmCommand = pectin.Command.create(function () {
|
|
@@ -6222,7 +6257,7 @@
|
|
|
6222
6257
|
SidePlaceNavigationComponent = __decorate([
|
|
6223
6258
|
core.Component({
|
|
6224
6259
|
selector: 'aup-side-place-navigation',
|
|
6225
|
-
template: "<mat-nav-list>\n <a mat-list-item (click)=\"toggleMenu()\" class=\"home\">\n <aup-icon class=\"collapsed-only\" icon=\"menu\"></aup-icon>\n <aup-icon class=\"expanded-only\" icon=\"arrow_back\"></aup-icon>\n <span class=\"expanded-only\">Menu</span>\n </a>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNav(placeDefinition).tooltip()\">\n <aup-icon *ngIf=\"getNav(placeDefinition).icon()\" [icon]=\"getNav(placeDefinition).icon()\"></aup-icon>\n <span\n class=\"expanded-only\">{{getNav(placeDefinition).title()}}</span>\n </a>\n <span [style.flex]=\"1\"></span>\n <ng-container *ngIf=\"navEndTemplate\" [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n</mat-nav-list>\n",
|
|
6260
|
+
template: "<mat-nav-list>\n <a mat-list-item (click)=\"toggleMenu()\" class=\"home\">\n <aup-icon class=\"collapsed-only\" icon=\"mat:menu\"></aup-icon>\n <aup-icon class=\"expanded-only\" icon=\"mat:arrow_back\"></aup-icon>\n <span class=\"expanded-only\">Menu</span>\n </a>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNav(placeDefinition).tooltip()\">\n <aup-icon *ngIf=\"getNav(placeDefinition).icon()\" [icon]=\"getNav(placeDefinition).icon()\"></aup-icon>\n <span\n class=\"expanded-only\">{{getNav(placeDefinition).title()}}</span>\n </a>\n <span [style.flex]=\"1\"></span>\n <ng-container *ngIf=\"navEndTemplate\" [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n</mat-nav-list>\n",
|
|
6226
6261
|
styles: [":host{display:flex;flex-direction:column;--resolved-nav-item-width:var(--nav-width, 56px);--resolved-nav-item-height:var(--nav-item-height, var(--resolved-nav-item-width));--resolved-expanded-width:var(--nav-expanded-width, 235px);--resolved-color:var(--nav-color, rgba(255, 255, 255, 0.9));--resolved-background-color:var(--nav-background-color, #555);width:var(--resolved-nav-item-width);transition:width 125ms linear;background-color:var(--resolved-background-color);color:var(--resolved-color)}:host.expanded{width:var(--resolved-expanded-width);max-width:var(--resolved-expanded-width)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item aup-icon:not(.collapsed-only){margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--resolved-nav-item-width);height:var(--resolved-nav-item-height);color:inherit}.mat-list-item.active{background-color:#444}.mat-list-item.home{text-align:left}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}"]
|
|
6227
6262
|
}),
|
|
6228
6263
|
__metadata("design:paramtypes", [router.Router, PlaceRouter])
|