@coolon/angular-ui-powerups 14.34.0 → 14.35.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/esm2020/lib/components/forms/abstract-input.component.mjs +22 -10
- package/esm2020/lib/components/forms/abstract-list-input.component.mjs +2 -14
- package/esm2020/lib/components/forms/abstract-value-input.component.mjs +2 -14
- package/esm2020/lib/interaction/activity.mjs +2 -1
- package/esm2020/lib/interaction/components/activity-container/activity-container.component.mjs +43 -19
- package/esm2020/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.mjs +30 -4
- package/esm2020/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.mjs +2 -1
- package/fesm2015/coolon-angular-ui-powerups.mjs +94 -54
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +92 -54
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +18 -6
- package/lib/components/forms/abstract-list-input.component.d.ts +0 -11
- package/lib/components/forms/abstract-value-input.component.d.ts +0 -11
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +10 -1
- package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +3 -1
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +2 -2
- package/package.json +2 -2
- package/schematics/activity/index.d.ts +0 -3
- package/schematics/activity/index.js +0 -32
- package/schematics/activity/index.js.map +0 -1
- package/schematics/activity/index.spec.d.ts +0 -1
- package/schematics/activity/index.spec.js +0 -364
- package/schematics/activity/index.spec.js.map +0 -1
- package/schematics/activity/schema.d.ts +0 -4
- package/schematics/activity/schema.js +0 -3
- package/schematics/activity/schema.js.map +0 -1
- package/schematics/activity/schema.json +0 -27
- package/schematics/activity/templates/component/__name@dasherize__.component.html.template +0 -5
- package/schematics/activity/templates/component/__name@dasherize__.component.scss.template +0 -4
- package/schematics/activity/templates/component/__name@dasherize__.component.spec.ts.template +0 -25
- package/schematics/activity/templates/component/__name@dasherize__.component.ts.template +0 -40
- package/schematics/activity/templates/component/__name@dasherize__.i18n.yml.template +0 -9
- package/schematics/aup-i18n/index.d.ts +0 -4
- package/schematics/aup-i18n/index.js +0 -86
- package/schematics/aup-i18n/index.js.map +0 -1
- package/schematics/aup-i18n/schema.d.ts +0 -3
- package/schematics/aup-i18n/schema.js +0 -3
- package/schematics/aup-i18n/schema.js.map +0 -1
- package/schematics/aup-i18n/schema.json +0 -18
- package/schematics/aup-i18n/templates/app/aup.i18n.yml.template +0 -80
- package/schematics/bootstrap-app/index.d.ts +0 -4
- package/schematics/bootstrap-app/index.js +0 -109
- package/schematics/bootstrap-app/index.js.map +0 -1
- package/schematics/bootstrap-app/schema.d.ts +0 -3
- package/schematics/bootstrap-app/schema.js +0 -3
- package/schematics/bootstrap-app/schema.js.map +0 -1
- package/schematics/bootstrap-app/schema.json +0 -18
- package/schematics/bootstrap-app/templates/i18n.config.json.template +0 -11
- package/schematics/bootstrap-app/templates/src/app/app-routing.module.ts.template +0 -23
- package/schematics/bootstrap-app/templates/src/app/app.component.html.template +0 -7
- package/schematics/bootstrap-app/templates/src/app/app.component.scss.template +0 -12
- package/schematics/bootstrap-app/templates/src/app/app.component.ts.template +0 -19
- package/schematics/bootstrap-app/templates/src/app/app.module.ts.template +0 -74
- package/schematics/bootstrap-app/templates/src/app/components/components.module.ts.template +0 -16
- package/schematics/bootstrap-app/templates/src/app/i18n.ts.template +0 -9
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.eot +0 -0
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.ijmap +0 -1
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.svg +0 -2373
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.ttf +0 -0
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff +0 -0
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff2 +0 -0
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/codepoints +0 -932
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/material-icons.css +0 -36
- package/schematics/bootstrap-app/templates/src/index.html.template +0 -13
- package/schematics/bootstrap-app/templates/src/styles/global-variables.scss.template +0 -13
- package/schematics/bootstrap-app/templates/src/styles.scss.template +0 -85
- package/schematics/collection.json +0 -48
- package/schematics/component/index.d.ts +0 -3
- package/schematics/component/index.js +0 -32
- package/schematics/component/index.js.map +0 -1
- package/schematics/component/index.spec.d.ts +0 -1
- package/schematics/component/index.spec.js +0 -364
- package/schematics/component/index.spec.js.map +0 -1
- package/schematics/component/schema.d.ts +0 -4
- package/schematics/component/schema.js +0 -3
- package/schematics/component/schema.js.map +0 -1
- package/schematics/component/schema.json +0 -27
- package/schematics/component/templates/component/__name@dasherize__.component.html.template +0 -1
- package/schematics/component/templates/component/__name@dasherize__.component.scss.template +0 -4
- package/schematics/component/templates/component/__name@dasherize__.component.spec.ts.template +0 -25
- package/schematics/component/templates/component/__name@dasherize__.component.ts.template +0 -23
- package/schematics/component/templates/component/__name@dasherize__.i18n.yml.template +0 -1
- package/schematics/ng-add/index.d.ts +0 -3
- package/schematics/ng-add/index.js +0 -37
- package/schematics/ng-add/index.js.map +0 -1
- package/schematics/package-util.d.ts +0 -13
- package/schematics/package-util.js +0 -61
- package/schematics/package-util.js.map +0 -1
- package/schematics/place-add/index.d.ts +0 -3
- package/schematics/place-add/index.js +0 -37
- package/schematics/place-add/index.js.map +0 -1
- package/schematics/place-add/index.spec.d.ts +0 -1
- package/schematics/place-add/index.spec.js +0 -364
- package/schematics/place-add/index.spec.js.map +0 -1
- package/schematics/place-add/schema.d.ts +0 -4
- package/schematics/place-add/schema.js +0 -3
- package/schematics/place-add/schema.js.map +0 -1
- package/schematics/place-add/schema.json +0 -27
- package/schematics/place-add/templates/component/__name@dasherize__.component.html.template +0 -1
- package/schematics/place-add/templates/component/__name@dasherize__.component.scss.template +0 -5
- package/schematics/place-add/templates/component/__name@dasherize__.component.spec.ts.template +0 -25
- package/schematics/place-add/templates/component/__name@dasherize__.component.ts.template +0 -33
- package/schematics/place-add/templates/component/__name@dasherize__.i18n.yml.template +0 -5
- package/schematics/place-bootstrap/index.d.ts +0 -3
- package/schematics/place-bootstrap/index.js +0 -21
- package/schematics/place-bootstrap/index.js.map +0 -1
- package/schematics/place-bootstrap/schema.d.ts +0 -4
- package/schematics/place-bootstrap/schema.js +0 -3
- package/schematics/place-bootstrap/schema.js.map +0 -1
- package/schematics/place-bootstrap/schema.json +0 -28
- package/schematics/place-bootstrap/templates/__name@dasherize__/place-routes.ts.template +0 -3
- package/schematics/place-bootstrap/templates/__name@dasherize__/places.module.ts.template +0 -16
- package/schematics/place-routes/index.d.ts +0 -3
- package/schematics/place-routes/index.js +0 -24
- package/schematics/place-routes/index.js.map +0 -1
- package/schematics/place-routes/place-builder.d.ts +0 -18
- package/schematics/place-routes/place-builder.js +0 -123
- package/schematics/place-routes/place-builder.js.map +0 -1
- package/schematics/place-routes/place-class-scanner.d.ts +0 -47
- package/schematics/place-routes/place-class-scanner.js +0 -223
- package/schematics/place-routes/place-class-scanner.js.map +0 -1
- package/schematics/place-routes/place-def.d.ts +0 -62
- package/schematics/place-routes/place-def.js +0 -195
- package/schematics/place-routes/place-def.js.map +0 -1
- package/schematics/place-routes/schema.d.ts +0 -4
- package/schematics/place-routes/schema.js +0 -3
- package/schematics/place-routes/schema.js.map +0 -1
- package/schematics/place-routes/schema.json +0 -25
- package/schematics/place-routes/templates/place-routes.ts.template +0 -14
- package/schematics/utils/build-context.d.ts +0 -73
- package/schematics/utils/build-context.js +0 -184
- package/schematics/utils/build-context.js.map +0 -1
- package/schematics/utils/decorators/decorated-class.d.ts +0 -13
- package/schematics/utils/decorators/decorated-class.js +0 -28
- package/schematics/utils/decorators/decorated-class.js.map +0 -1
- package/schematics/utils/decorators/decorated-source-file.d.ts +0 -15
- package/schematics/utils/decorators/decorated-source-file.js +0 -27
- package/schematics/utils/decorators/decorated-source-file.js.map +0 -1
- package/schematics/utils/import-def.d.ts +0 -30
- package/schematics/utils/import-def.js +0 -97
- package/schematics/utils/import-def.js.map +0 -1
- package/schematics/utils/method-scanner.d.ts +0 -16
- package/schematics/utils/method-scanner.js +0 -70
- package/schematics/utils/method-scanner.js.map +0 -1
- package/schematics/utils/mixin.d.ts +0 -11
- package/schematics/utils/mixin.js +0 -27
- package/schematics/utils/mixin.js.map +0 -1
- package/schematics/utils/parameter-def.d.ts +0 -5
- package/schematics/utils/parameter-def.js +0 -3
- package/schematics/utils/parameter-def.js.map +0 -1
- package/schematics/utils/path-helper.d.ts +0 -14
- package/schematics/utils/path-helper.js +0 -30
- package/schematics/utils/path-helper.js.map +0 -1
- package/schematics/utils/schematic-tree-file-system.d.ts +0 -30
- package/schematics/utils/schematic-tree-file-system.js +0 -113
- package/schematics/utils/schematic-tree-file-system.js.map +0 -1
- package/schematics/utils/source-file-scanner.d.ts +0 -14
- package/schematics/utils/source-file-scanner.js +0 -89
- package/schematics/utils/source-file-scanner.js.map +0 -1
- package/schematics/utils/source-file-utilities.d.ts +0 -6
- package/schematics/utils/source-file-utilities.js +0 -35
- package/schematics/utils/source-file-utilities.js.map +0 -1
- package/schematics/utils/stringy.d.ts +0 -15
- package/schematics/utils/stringy.js +0 -50
- package/schematics/utils/stringy.js.map +0 -1
- package/schematics/utils/template-utilities.d.ts +0 -2
- package/schematics/utils/template-utilities.js +0 -24
- package/schematics/utils/template-utilities.js.map +0 -1
- package/schematics/utils/workspace.d.ts +0 -15
- package/schematics/utils/workspace.js +0 -59
- package/schematics/utils/workspace.js.map +0 -1
|
@@ -39,7 +39,7 @@ import { MatTableModule } from '@angular/material/table';
|
|
|
39
39
|
import * as i4 from '@angular/material/tooltip';
|
|
40
40
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
41
41
|
import * as i1$3 from '@coolon/pectin';
|
|
42
|
-
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, DelegatingListModel, MutableValueModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, Functions, HasDelegate, MultipleSelectionModel, SelectionModel, AbstractComputedListModel, DirtyTrackingForm, DelegatingSelectionModel, PageController, PagedListModel, ComputedListModel, Deferred } from '@coolon/pectin';
|
|
42
|
+
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, DelegatingListModel, MutableValueModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, Functions, HasDelegate, MultipleSelectionModel, SelectionModel, AbstractComputedListModel, DirtyTrackingForm, DelegatingSelectionModel, PageController, PagedListModel, ComputedListModel, Deferred, Trace } from '@coolon/pectin';
|
|
43
43
|
import { __decorate, __param, __metadata } from 'tslib';
|
|
44
44
|
import * as i1 from '@angular/platform-browser';
|
|
45
45
|
import escapeStringRegexp from 'escape-string-regexp';
|
|
@@ -1641,12 +1641,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
1641
1641
|
}] } });
|
|
1642
1642
|
|
|
1643
1643
|
/* tslint:disable:no-input-rename */
|
|
1644
|
+
const INPUT_TOKEN_HACK = new InjectionToken("INPUT_TOKEN_HACK");
|
|
1644
1645
|
class AbstractInputComponent extends DisposableComponent {
|
|
1645
|
-
constructor() {
|
|
1646
|
+
constructor(formValue$) {
|
|
1646
1647
|
super();
|
|
1647
1648
|
this.onValueEditedListeners = new EventListenerList();
|
|
1648
1649
|
this.userFloatLabel = 'always'; // TODO: make this an injectable default
|
|
1649
1650
|
this.dense = false;
|
|
1651
|
+
this._enabled$ = this.registerDisposable(new DelegatingValueModel());
|
|
1650
1652
|
// TODO: fix this.
|
|
1651
1653
|
// tslint:disable-next-line:no-output-native
|
|
1652
1654
|
this.focus = new EventEmitter();
|
|
@@ -1658,12 +1660,20 @@ class AbstractInputComponent extends DisposableComponent {
|
|
|
1658
1660
|
this.escapeKey = new EventEmitter();
|
|
1659
1661
|
this.baseClassName = 'aup-input-component';
|
|
1660
1662
|
const self = this;
|
|
1663
|
+
this.formValue$ = this.registerDisposable(formValue$);
|
|
1664
|
+
this._enabled$.setDefault(formValue$.enabled);
|
|
1661
1665
|
this.errorStateMatcher = {
|
|
1662
1666
|
isErrorState(control, form) {
|
|
1663
1667
|
return self.hasErrors();
|
|
1664
1668
|
}
|
|
1665
1669
|
};
|
|
1666
1670
|
}
|
|
1671
|
+
set enabled$(condition$) {
|
|
1672
|
+
this._enabled$.setDelegate(condition$);
|
|
1673
|
+
}
|
|
1674
|
+
get enabled$() {
|
|
1675
|
+
return this._enabled$.readonly;
|
|
1676
|
+
}
|
|
1667
1677
|
notifyClick() {
|
|
1668
1678
|
this.safelyInvoke(this.clickCommand);
|
|
1669
1679
|
}
|
|
@@ -1693,9 +1703,6 @@ class AbstractInputComponent extends DisposableComponent {
|
|
|
1693
1703
|
isEnabled() {
|
|
1694
1704
|
return this.enabled$.value;
|
|
1695
1705
|
}
|
|
1696
|
-
get enabled$() {
|
|
1697
|
-
return this.formValue$.enabled;
|
|
1698
|
-
}
|
|
1699
1706
|
hasErrors() {
|
|
1700
1707
|
return !this.errorList$.query().isEmpty();
|
|
1701
1708
|
}
|
|
@@ -1722,12 +1729,15 @@ class AbstractInputComponent extends DisposableComponent {
|
|
|
1722
1729
|
return this.onValueEditedListeners.add(callback);
|
|
1723
1730
|
}
|
|
1724
1731
|
}
|
|
1725
|
-
AbstractInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbstractInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1726
|
-
AbstractInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: AbstractInputComponent, selector: "ng-component", inputs: { label: "label", userFloatLabel: ["floatLabel", "userFloatLabel"], hint: "hint", placeholder: "placeholder", dense: "dense", focusCommand: ["command.focus", "focusCommand"], blurCommand: ["command.blur", "blurCommand"], enterCommand: ["command.enter", "enterCommand"], escapeCommand: ["command.escape", "escapeCommand"], clickCommand: ["command.click", "clickCommand"] }, outputs: { focus: "focus", blur: "blur", enterKey: "enterKey", escapeKey: "escapeKey" }, host: { listeners: { "click": "notifyClick()", "focusin": "notifyFocusIn()", "focusout": "notifyFocusOut()" }, properties: { "class.dense": "this.dense", "class": "this.baseClassName" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
1732
|
+
AbstractInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbstractInputComponent, deps: [{ token: INPUT_TOKEN_HACK }], target: i0.ɵɵFactoryTarget.Component });
|
|
1733
|
+
AbstractInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: AbstractInputComponent, selector: "ng-component", inputs: { label: "label", userFloatLabel: ["floatLabel", "userFloatLabel"], hint: "hint", placeholder: "placeholder", dense: "dense", enabled$: "enabled$", focusCommand: ["command.focus", "focusCommand"], blurCommand: ["command.blur", "blurCommand"], enterCommand: ["command.enter", "enterCommand"], escapeCommand: ["command.escape", "escapeCommand"], clickCommand: ["command.click", "clickCommand"] }, outputs: { focus: "focus", blur: "blur", enterKey: "enterKey", escapeKey: "escapeKey" }, host: { listeners: { "click": "notifyClick()", "focusin": "notifyFocusIn()", "focusout": "notifyFocusOut()" }, properties: { "class.dense": "this.dense", "class": "this.baseClassName" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
1727
1734
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbstractInputComponent, decorators: [{
|
|
1728
1735
|
type: Component,
|
|
1729
1736
|
args: [{ template: '' }]
|
|
1730
|
-
}], ctorParameters: function () { return [
|
|
1737
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1738
|
+
type: Inject,
|
|
1739
|
+
args: [INPUT_TOKEN_HACK]
|
|
1740
|
+
}] }]; }, propDecorators: { label: [{
|
|
1731
1741
|
type: Input
|
|
1732
1742
|
}], userFloatLabel: [{
|
|
1733
1743
|
type: Input,
|
|
@@ -1741,6 +1751,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
1741
1751
|
args: ['class.dense']
|
|
1742
1752
|
}, {
|
|
1743
1753
|
type: Input
|
|
1754
|
+
}], enabled$: [{
|
|
1755
|
+
type: Input
|
|
1744
1756
|
}], focusCommand: [{
|
|
1745
1757
|
type: Input,
|
|
1746
1758
|
args: ['command.focus']
|
|
@@ -1780,19 +1792,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
1780
1792
|
|
|
1781
1793
|
class AbstractListInputComponent extends AbstractInputComponent {
|
|
1782
1794
|
constructor() {
|
|
1783
|
-
super();
|
|
1784
|
-
/**
|
|
1785
|
-
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1786
|
-
*
|
|
1787
|
-
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
1788
|
-
* valueModel: Form.ListModelBase<string> | MutableListModel<string>;
|
|
1789
|
-
*
|
|
1790
|
-
* This approach allows the input to accept plain or form models but all backed by a form
|
|
1791
|
-
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
1792
|
-
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1793
|
-
*/
|
|
1794
|
-
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1795
|
-
this.formValue$ = this.registerDisposable(new Form.DelegatingFormListModel());
|
|
1795
|
+
super(new Form.DelegatingFormListModel());
|
|
1796
1796
|
this.componentList$ = new MutableListModel();
|
|
1797
1797
|
this.setValueIsInProgress$ = new Guard();
|
|
1798
1798
|
this.valueChange = new EventEmitter();
|
|
@@ -1851,19 +1851,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
1851
1851
|
|
|
1852
1852
|
class AbstractValueInputComponent extends AbstractInputComponent {
|
|
1853
1853
|
constructor() {
|
|
1854
|
-
super();
|
|
1855
|
-
/**
|
|
1856
|
-
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1857
|
-
*
|
|
1858
|
-
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
1859
|
-
* value$: DirtyTrackingForm.ValueModel<string> | MutableValueModel<string>;
|
|
1860
|
-
*
|
|
1861
|
-
* This approach allows the input to accept plain or form models but all backed by a form
|
|
1862
|
-
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
1863
|
-
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1864
|
-
*/
|
|
1865
|
-
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1866
|
-
this.formValue$ = this.registerDisposable(new Form.DelegatingFormValueModel());
|
|
1854
|
+
super(new Form.DelegatingFormValueModel());
|
|
1867
1855
|
this.setValueInProgress$ = new Guard();
|
|
1868
1856
|
this.componentValue$ = new MutableValueModel();
|
|
1869
1857
|
this.valueChange = new EventEmitter();
|
|
@@ -5595,6 +5583,7 @@ class Activity extends DisposableComponent {
|
|
|
5595
5583
|
notifyActivityReady() {
|
|
5596
5584
|
this.activityReadyListeners.fire(l => l(this));
|
|
5597
5585
|
this._ready$.value = true;
|
|
5586
|
+
console.log("ready");
|
|
5598
5587
|
}
|
|
5599
5588
|
onActivityReady(callback) {
|
|
5600
5589
|
return this.activityReadyListeners.add(callback);
|
|
@@ -8370,9 +8359,24 @@ class ActivityContainerComponent extends AbstractInteractionContext {
|
|
|
8370
8359
|
this.dynamicHeight = false;
|
|
8371
8360
|
this.activityRefs = [];
|
|
8372
8361
|
this.garbage = new GarbageCollector();
|
|
8373
|
-
this.
|
|
8362
|
+
this._started$ = new MutableValueModel(false);
|
|
8363
|
+
this._ready$ = new MutableValueModel(false);
|
|
8364
|
+
this._animating$ = new MutableValueModel(false);
|
|
8374
8365
|
this.busy = this.registerDisposable(new DelegatingValueModel().withDefault(false));
|
|
8375
|
-
this.
|
|
8366
|
+
this.syncTabsJob = undefined;
|
|
8367
|
+
const { chain, valueOf, when } = Dsl.disposeWith(this);
|
|
8368
|
+
when(this.ready$).becomesTruthy(() => {
|
|
8369
|
+
this.finaliseActiveStates();
|
|
8370
|
+
});
|
|
8371
|
+
}
|
|
8372
|
+
get started$() {
|
|
8373
|
+
return this._started$.readonly;
|
|
8374
|
+
}
|
|
8375
|
+
get ready$() {
|
|
8376
|
+
return this._ready$.readonly;
|
|
8377
|
+
}
|
|
8378
|
+
get animating$() {
|
|
8379
|
+
return this._animating$.readonly;
|
|
8376
8380
|
}
|
|
8377
8381
|
initialise(identifier, api) {
|
|
8378
8382
|
assert.isFalsey(this.isInitialised());
|
|
@@ -8381,6 +8385,9 @@ class ActivityContainerComponent extends AbstractInteractionContext {
|
|
|
8381
8385
|
this._identifier = identifier;
|
|
8382
8386
|
this.interactionServiceApi = api;
|
|
8383
8387
|
}
|
|
8388
|
+
notifyReady(ready) {
|
|
8389
|
+
this._ready$.value = ready;
|
|
8390
|
+
}
|
|
8384
8391
|
get identifier() {
|
|
8385
8392
|
return this._identifier;
|
|
8386
8393
|
}
|
|
@@ -8438,10 +8445,6 @@ class ActivityContainerComponent extends AbstractInteractionContext {
|
|
|
8438
8445
|
}
|
|
8439
8446
|
});
|
|
8440
8447
|
this.launchActivity(activityRef);
|
|
8441
|
-
// if this is the first activity let the interaction service know.
|
|
8442
|
-
if (this.activityRefs.length === 1) {
|
|
8443
|
-
this.interactionServiceApi.notifyActive(this);
|
|
8444
|
-
}
|
|
8445
8448
|
try {
|
|
8446
8449
|
return await activityRef.activityResult;
|
|
8447
8450
|
}
|
|
@@ -8488,8 +8491,13 @@ class ActivityContainerComponent extends AbstractInteractionContext {
|
|
|
8488
8491
|
}
|
|
8489
8492
|
// @Trace()
|
|
8490
8493
|
launchActivity(activityRef) {
|
|
8494
|
+
// if this is the first activity let the interaction service know.
|
|
8491
8495
|
const cleanedTabs = this.activityRefs.filter(tab => !tab.isComplete());
|
|
8492
8496
|
this.activityRefs = cleanedTabs.concat(activityRef);
|
|
8497
|
+
const firstTime = this.activityRefs.length === 1;
|
|
8498
|
+
if (firstTime) {
|
|
8499
|
+
this.interactionServiceApi.notifyActive(this);
|
|
8500
|
+
}
|
|
8493
8501
|
this.synchroniseSelectedTabIndex();
|
|
8494
8502
|
}
|
|
8495
8503
|
activityIndex(index, activityRef) {
|
|
@@ -8504,21 +8512,26 @@ class ActivityContainerComponent extends AbstractInteractionContext {
|
|
|
8504
8512
|
assert.isTruthy(this.isActive());
|
|
8505
8513
|
const previousIndex = this.tabs.selectedIndex;
|
|
8506
8514
|
const newIndex = this.getActiveActivityCount() - 1;
|
|
8515
|
+
const animate = this.activityRefs.length > 1;
|
|
8507
8516
|
if (previousIndex !== newIndex) {
|
|
8508
|
-
this.
|
|
8509
|
-
this.activityRefs[newIndex]
|
|
8510
|
-
|
|
8517
|
+
this._animating$.value = animate;
|
|
8518
|
+
const activityRef = this.activityRefs[newIndex];
|
|
8519
|
+
activityRef.setFocused(false);
|
|
8520
|
+
this.busy.setDelegate(activityRef.activityBusy);
|
|
8511
8521
|
this.tabs.selectedIndex = newIndex;
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
this.activityRefs.forEach((ref, index) => {
|
|
8517
|
-
ref.setFocused(index === newIndex);
|
|
8518
|
-
});
|
|
8519
|
-
}, this.getTabAnimationDuration());
|
|
8522
|
+
if (this.ready$.value) {
|
|
8523
|
+
// Note: We're not using the animation done event as it's firing almost immeadiately.
|
|
8524
|
+
setTimeout(() => this.finaliseActiveStates(), animate ? this.getTabAnimationDuration() : 0);
|
|
8525
|
+
}
|
|
8520
8526
|
}
|
|
8521
8527
|
}
|
|
8528
|
+
finaliseActiveStates() {
|
|
8529
|
+
this._animating$.value = false;
|
|
8530
|
+
this.activityRefs = this.activityRefs.filter(tab => !tab.isComplete());
|
|
8531
|
+
this.activityRefs.forEach((ref, index) => {
|
|
8532
|
+
ref.setFocused(index === this.tabs.selectedIndex);
|
|
8533
|
+
});
|
|
8534
|
+
}
|
|
8522
8535
|
getSelectedOutlet() {
|
|
8523
8536
|
return this.activityOutlets.toArray()[this.tabs.selectedIndex];
|
|
8524
8537
|
}
|
|
@@ -8662,6 +8675,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
8662
8675
|
args: [{ selector: 'aup-modal-activity-trigger', template: "<aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n", styles: [":host{display:inline-block}\n"] }]
|
|
8663
8676
|
}], ctorParameters: function () { return [{ type: InteractionService }]; } });
|
|
8664
8677
|
|
|
8678
|
+
const cssDurationRegex = /(\d+)(m?s)/;
|
|
8665
8679
|
/**
|
|
8666
8680
|
* @example
|
|
8667
8681
|
* <aup-in-place-interaction-context #inPlaceInteractionContext>
|
|
@@ -8693,6 +8707,14 @@ class InPlaceInteractionContextComponent extends DisposableComponent {
|
|
|
8693
8707
|
get animationDuration() {
|
|
8694
8708
|
return this.animateFirstActivity ? (this.tabConfig?.animationDuration || "500ms") : "0ms";
|
|
8695
8709
|
}
|
|
8710
|
+
get animationDurationMillis() {
|
|
8711
|
+
const result = cssDurationRegex.exec(this.animationDuration);
|
|
8712
|
+
if (!result) {
|
|
8713
|
+
lang.illegalState(`unsupported css duration: ${this.animationDuration}`);
|
|
8714
|
+
}
|
|
8715
|
+
const multiplier = result[2] === 's' ? 1000 : 1;
|
|
8716
|
+
return multiplier * parseInt(result[1], 10);
|
|
8717
|
+
}
|
|
8696
8718
|
get active() {
|
|
8697
8719
|
return this.isActive();
|
|
8698
8720
|
}
|
|
@@ -8744,12 +8766,27 @@ class InPlaceInteractionContextComponent extends DisposableComponent {
|
|
|
8744
8766
|
startActivity(activityType, data, options) {
|
|
8745
8767
|
return this.activityContainerComponent.startActivity(activityType, data, options);
|
|
8746
8768
|
}
|
|
8769
|
+
onTabChanged($event) {
|
|
8770
|
+
if ($event.index === 1) {
|
|
8771
|
+
setTimeout(() => this.activityContainerComponent.notifyReady(true), this.animationDurationMillis);
|
|
8772
|
+
}
|
|
8773
|
+
else {
|
|
8774
|
+
this.activityContainerComponent.notifyReady(false);
|
|
8775
|
+
}
|
|
8776
|
+
}
|
|
8747
8777
|
}
|
|
8748
8778
|
InPlaceInteractionContextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: InPlaceInteractionContextComponent, deps: [{ token: InteractionService }, { token: MAT_TABS_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
8749
|
-
InPlaceInteractionContextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: InPlaceInteractionContextComponent, selector: "aup-in-place-interaction-context", inputs: { animateFirstActivity: "animateFirstActivity", syncWithRoutes: "syncWithRoutes" }, host: { properties: { "class.active": "this.active" } }, viewQueries: [{ propertyName: "activityContainerComponent", first: true, predicate: ["activityContainer"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs
|
|
8779
|
+
InPlaceInteractionContextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: InPlaceInteractionContextComponent, selector: "aup-in-place-interaction-context", inputs: { animateFirstActivity: "animateFirstActivity", syncWithRoutes: "syncWithRoutes" }, host: { properties: { "class.active": "this.active" } }, viewQueries: [{ propertyName: "activityContainerComponent", first: true, predicate: ["activityContainer"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs\n (selectedTabChange)=\"onTabChanged($event)\"\n [dynamicHeight]=\"false\"\n [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n", styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-activity-container{flex:1}\n"], dependencies: [{ kind: "component", type: i2$6.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i2$6.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: ActivityContainerComponent, selector: "aup-activity-container", inputs: ["dynamicHeight"] }] });
|
|
8780
|
+
__decorate([
|
|
8781
|
+
Trace() // webstorm says no usages... but I'm not sure.
|
|
8782
|
+
,
|
|
8783
|
+
__metadata("design:type", Function),
|
|
8784
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
8785
|
+
__metadata("design:returntype", void 0)
|
|
8786
|
+
], InPlaceInteractionContextComponent.prototype, "onInplaceInteractionContextRegistered", null);
|
|
8750
8787
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: InPlaceInteractionContextComponent, decorators: [{
|
|
8751
8788
|
type: Component,
|
|
8752
|
-
args: [{ selector: "aup-in-place-interaction-context", template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs
|
|
8789
|
+
args: [{ selector: "aup-in-place-interaction-context", template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs\n (selectedTabChange)=\"onTabChanged($event)\"\n [dynamicHeight]=\"false\"\n [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n", styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-activity-container{flex:1}\n"] }]
|
|
8753
8790
|
}], ctorParameters: function () { return [{ type: InteractionService }, { type: undefined, decorators: [{
|
|
8754
8791
|
type: Inject,
|
|
8755
8792
|
args: [MAT_TABS_CONFIG]
|
|
@@ -8765,7 +8802,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
8765
8802
|
}], active: [{
|
|
8766
8803
|
type: HostBinding,
|
|
8767
8804
|
args: ["class.active"]
|
|
8768
|
-
}] } });
|
|
8805
|
+
}], onInplaceInteractionContextRegistered: [] } });
|
|
8769
8806
|
|
|
8770
8807
|
/**
|
|
8771
8808
|
*
|
|
@@ -10413,6 +10450,7 @@ class DialogInteractionContext extends AbstractInteractionContext {
|
|
|
10413
10450
|
matDialogRef.updateSize();
|
|
10414
10451
|
matDialogRef.afterOpened().subscribe(promiseAlreadyFinished => {
|
|
10415
10452
|
matDialogRef.updateSize();
|
|
10453
|
+
this.activityContainer.notifyReady(true);
|
|
10416
10454
|
});
|
|
10417
10455
|
return activityResult;
|
|
10418
10456
|
}
|