@coolon/angular-ui-powerups 0.0.33 → 0.0.35
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/bundles/coolon-angular-ui-powerups.umd.js +30 -69
- 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/coolon-angular-ui-powerups.js +2 -2
- package/esm2015/index.js +2 -2
- package/esm2015/lib/interaction/abstract-activity.js +14 -2
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +14 -3
- package/esm2015/lib/place/guards/leave-place.guard.js +2 -18
- package/esm2015/lib/place/index.js +2 -2
- package/esm2015/lib/place/place-component.js +2 -4
- package/esm2015/lib/place/route/parameter-decorators.js +1 -42
- package/esm2015/public_api.js +2 -2
- package/esm5/coolon-angular-ui-powerups.js +2 -2
- package/esm5/index.js +2 -2
- package/esm5/lib/interaction/abstract-activity.js +17 -9
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +14 -3
- package/esm5/lib/place/guards/leave-place.guard.js +2 -18
- package/esm5/lib/place/index.js +2 -2
- package/esm5/lib/place/place-component.js +2 -6
- package/esm5/lib/place/route/parameter-decorators.js +1 -42
- package/esm5/public_api.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +28 -63
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +32 -69
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/interaction/abstract-activity.d.ts +1 -0
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -1
- package/lib/place/place-component.d.ts +2 -2
- package/lib/place/route/parameter-decorators.d.ts +0 -12
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { MatDialog, MatButtonModule, MatDialogModule, MatTabsModule, MatProgress
|
|
|
5
5
|
import { BrowserModule } from '@angular/platform-browser';
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
7
|
import { __extends, __decorate, __metadata, __assign, __awaiter, __generator, __values } from 'tslib';
|
|
8
|
-
import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, assert, UnaryCommand, lang, Dsl, Logger, ListModel, StoreInListModel, EventListenerList, DelegatingValueModel, MutableListModel, StoreInValueModel,
|
|
8
|
+
import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, assert, UnaryCommand, lang, Dsl, Logger, ListModel, StoreInListModel, EventListenerList, DelegatingValueModel, Trace, MutableListModel, StoreInValueModel, MutableValueModel, TransactionObserver, Binding, OptionsHelper, ValueHolder } from '@coolon/pectin';
|
|
9
9
|
import { PortalModule } from '@angular/cdk/portal';
|
|
10
10
|
import { Deferred } from '@coolon/pectin/lib/promise/deferred.class';
|
|
11
11
|
import { assert as assert$1, Klass, Opts } from '@coolon/typescript-utilities';
|
|
@@ -841,10 +841,7 @@ if (false) {
|
|
|
841
841
|
/**
|
|
842
842
|
* @template D, R, E
|
|
843
843
|
*/
|
|
844
|
-
var
|
|
845
|
-
* @template D, R, E
|
|
846
|
-
*/
|
|
847
|
-
AbstractActivity = /** @class */ (function (_super) {
|
|
844
|
+
var AbstractActivity = /** @class */ (function (_super) {
|
|
848
845
|
__extends(AbstractActivity, _super);
|
|
849
846
|
function AbstractActivity() {
|
|
850
847
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -918,6 +915,14 @@ AbstractActivity = /** @class */ (function (_super) {
|
|
|
918
915
|
*/
|
|
919
916
|
function () { return _this.finalizeAndDispose(); }));
|
|
920
917
|
};
|
|
918
|
+
/**
|
|
919
|
+
* @return {?}
|
|
920
|
+
*/
|
|
921
|
+
AbstractActivity.prototype.onActivityReady = /**
|
|
922
|
+
* @return {?}
|
|
923
|
+
*/
|
|
924
|
+
function () {
|
|
925
|
+
};
|
|
921
926
|
/**
|
|
922
927
|
* @private
|
|
923
928
|
* @return {?}
|
|
@@ -975,6 +980,12 @@ AbstractActivity = /** @class */ (function (_super) {
|
|
|
975
980
|
function () {
|
|
976
981
|
return this._busyModel.value;
|
|
977
982
|
};
|
|
983
|
+
__decorate([
|
|
984
|
+
Trace(),
|
|
985
|
+
__metadata("design:type", Function),
|
|
986
|
+
__metadata("design:paramtypes", []),
|
|
987
|
+
__metadata("design:returntype", void 0)
|
|
988
|
+
], AbstractActivity.prototype, "onActivityReady", null);
|
|
978
989
|
return AbstractActivity;
|
|
979
990
|
}(DisposableComponent));
|
|
980
991
|
if (false) {
|
|
@@ -1121,6 +1132,8 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1121
1132
|
var _this = _super.call(this) || this;
|
|
1122
1133
|
_this.activityTabs = new MutableListModel();
|
|
1123
1134
|
_this.obsoleteTabs = [];
|
|
1135
|
+
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1136
|
+
_this.lastActivityTab = chain(_this.activityTabs).last();
|
|
1124
1137
|
return _this;
|
|
1125
1138
|
}
|
|
1126
1139
|
/**
|
|
@@ -1143,7 +1156,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1143
1156
|
observe.valuesFrom(this.tabs.animationDone).subscribe((/**
|
|
1144
1157
|
* @return {?}
|
|
1145
1158
|
*/
|
|
1146
|
-
function () { return _this.
|
|
1159
|
+
function () { return _this.onAnimationFinished(); }));
|
|
1147
1160
|
};
|
|
1148
1161
|
/**
|
|
1149
1162
|
* @template D, R, E
|
|
@@ -1218,12 +1231,13 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1218
1231
|
* @private
|
|
1219
1232
|
* @return {?}
|
|
1220
1233
|
*/
|
|
1221
|
-
ActivityContainerComponent.prototype.
|
|
1234
|
+
ActivityContainerComponent.prototype.onAnimationFinished = /**
|
|
1222
1235
|
* @private
|
|
1223
1236
|
* @return {?}
|
|
1224
1237
|
*/
|
|
1225
1238
|
function () {
|
|
1226
1239
|
var _this = this;
|
|
1240
|
+
// TODO: notify selected tab they are ready. activty.afterAnimationComplete
|
|
1227
1241
|
this.activityTabs.value = this.activityTabs.value.filter((/**
|
|
1228
1242
|
* @param {?} tab
|
|
1229
1243
|
* @return {?}
|
|
@@ -1231,6 +1245,9 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1231
1245
|
function (tab) {
|
|
1232
1246
|
return !_this.obsoleteTabs.includes(tab);
|
|
1233
1247
|
}));
|
|
1248
|
+
if (this.lastActivityTab.value && this.lastActivityTab.value['onActivityReady']) {
|
|
1249
|
+
this.lastActivityTab.value['onActivityReady']();
|
|
1250
|
+
}
|
|
1234
1251
|
};
|
|
1235
1252
|
ActivityContainerComponent.decorators = [
|
|
1236
1253
|
{ type: Component, args: [{
|
|
@@ -1262,6 +1279,11 @@ if (false) {
|
|
|
1262
1279
|
* @private
|
|
1263
1280
|
*/
|
|
1264
1281
|
ActivityContainerComponent.prototype.obsoleteTabs;
|
|
1282
|
+
/**
|
|
1283
|
+
* @type {?}
|
|
1284
|
+
* @private
|
|
1285
|
+
*/
|
|
1286
|
+
ActivityContainerComponent.prototype.lastActivityTab;
|
|
1265
1287
|
}
|
|
1266
1288
|
(function (ActivityContainerComponent) {
|
|
1267
1289
|
/**
|
|
@@ -2033,16 +2055,12 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
2033
2055
|
configurable: true
|
|
2034
2056
|
});
|
|
2035
2057
|
/**
|
|
2036
|
-
* @param {?=} nextPlace
|
|
2037
|
-
* @param {?=} nextState
|
|
2038
2058
|
* @return {?}
|
|
2039
2059
|
*/
|
|
2040
2060
|
PlaceComponent.prototype.canDeactivate = /**
|
|
2041
|
-
* @param {?=} nextPlace
|
|
2042
|
-
* @param {?=} nextState
|
|
2043
2061
|
* @return {?}
|
|
2044
2062
|
*/
|
|
2045
|
-
function (
|
|
2063
|
+
function () {
|
|
2046
2064
|
return true;
|
|
2047
2065
|
};
|
|
2048
2066
|
/**
|
|
@@ -3053,21 +3071,7 @@ var LeavePlaceGuard = /** @class */ (function () {
|
|
|
3053
3071
|
* @return {?}
|
|
3054
3072
|
*/
|
|
3055
3073
|
function (component, currentRoute, currentState, nextState) {
|
|
3056
|
-
|
|
3057
|
-
var placeComponent = nextState ?
|
|
3058
|
-
(/** @type {?} */ (nextState.root.firstChild.component)) :
|
|
3059
|
-
null;
|
|
3060
|
-
/** @type {?} */
|
|
3061
|
-
var nextPlaceDefinition = lang.constructorChain(placeComponent).includes(PlaceComponent) ?
|
|
3062
|
-
PlaceComponent.getDefinition((/** @type {?} */ ((/** @type {?} */ (placeComponent))))) :
|
|
3063
|
-
null;
|
|
3064
|
-
if (nextPlaceDefinition.isDescriptorFor(component)) {
|
|
3065
|
-
// console.log("Same place different route. Do we need a place component hook for this??");
|
|
3066
|
-
return true;
|
|
3067
|
-
}
|
|
3068
|
-
else {
|
|
3069
|
-
return component.canDeactivate(nextPlaceDefinition, nextState);
|
|
3070
|
-
}
|
|
3074
|
+
return component.canDeactivate();
|
|
3071
3075
|
};
|
|
3072
3076
|
LeavePlaceGuard.decorators = [
|
|
3073
3077
|
{ type: Injectable, args: [{
|
|
@@ -3611,26 +3615,6 @@ function RouteId(type, options) {
|
|
|
3611
3615
|
UseDelegate()(prototype, propertyKey);
|
|
3612
3616
|
});
|
|
3613
3617
|
}
|
|
3614
|
-
/**
|
|
3615
|
-
* @deprecated use RouteParameter instead.
|
|
3616
|
-
* @template T
|
|
3617
|
-
* @param {?} type
|
|
3618
|
-
* @param {?=} options
|
|
3619
|
-
* @return {?}
|
|
3620
|
-
*/
|
|
3621
|
-
function QueryParameter(type, options) {
|
|
3622
|
-
return (/**
|
|
3623
|
-
* @param {?} prototype
|
|
3624
|
-
* @param {?} propertyKey
|
|
3625
|
-
* @return {?}
|
|
3626
|
-
*/
|
|
3627
|
-
function (prototype, propertyKey) {
|
|
3628
|
-
/** @type {?} */
|
|
3629
|
-
var param = createDefinition(propertyKey, type, options, false);
|
|
3630
|
-
Klass.get(prototype).addToOwnMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
|
|
3631
|
-
UseDelegate()(prototype, propertyKey);
|
|
3632
|
-
});
|
|
3633
|
-
}
|
|
3634
3618
|
/**
|
|
3635
3619
|
* @template T
|
|
3636
3620
|
* @param {?} type
|
|
@@ -3651,27 +3635,6 @@ function RouteParameter(type, options) {
|
|
|
3651
3635
|
UseDelegate()(prototype, propertyKey);
|
|
3652
3636
|
});
|
|
3653
3637
|
}
|
|
3654
|
-
/**
|
|
3655
|
-
* @deprecated use RouteParameterList instead
|
|
3656
|
-
* @template E
|
|
3657
|
-
* @param {?} elementType
|
|
3658
|
-
* @param {?=} options
|
|
3659
|
-
* @return {?}
|
|
3660
|
-
*/
|
|
3661
|
-
function QueryParameterList(elementType, options) {
|
|
3662
|
-
// assert.isTruthy(type.isValid());
|
|
3663
|
-
return (/**
|
|
3664
|
-
* @param {?} prototype
|
|
3665
|
-
* @param {?} propertyKey
|
|
3666
|
-
* @return {?}
|
|
3667
|
-
*/
|
|
3668
|
-
function (prototype, propertyKey) {
|
|
3669
|
-
/** @type {?} */
|
|
3670
|
-
var param = createArrayDefinition(propertyKey, elementType, options);
|
|
3671
|
-
Klass.get(prototype).addToOwnMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
|
|
3672
|
-
UseDelegate()(prototype, propertyKey);
|
|
3673
|
-
});
|
|
3674
|
-
}
|
|
3675
3638
|
/**
|
|
3676
3639
|
* @template E
|
|
3677
3640
|
* @param {?} elementType
|
|
@@ -3920,5 +3883,5 @@ var VisitSnapshot = /** @class */ (function () {
|
|
|
3920
3883
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3921
3884
|
*/
|
|
3922
3885
|
|
|
3923
|
-
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DialogInteractionService, Dimension, DisposableComponent, EmptyStateComponent, FocusBindingDirective, INTERACTION_CONTEXT, InteractionContext, InteractionModule, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, NumberInputComponent, ParameterType, PasswordInputComponent, Place, PlaceComponent, PlaceModule, PlaceOutletComponent, PlaceRouteGuard, PlaceService, Point,
|
|
3886
|
+
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DialogInteractionService, Dimension, DisposableComponent, EmptyStateComponent, FocusBindingDirective, INTERACTION_CONTEXT, InteractionContext, InteractionModule, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, NumberInputComponent, ParameterType, PasswordInputComponent, Place, PlaceComponent, PlaceModule, PlaceOutletComponent, PlaceRouteGuard, PlaceService, Point, ResizeAwareComponent, ResolvedRouteParameterSnapshot, RouteId, RouteParameter, RouteParameterBindings, RouteParameterList, RouteParameterSanitiser, Sanitiser, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, VisitSnapshot, slideDownAndUpAnimation, CommandDirective as ɵa, FocusBindingDirective as ɵb, DisposableComponent as ɵc, NumberInputComponent as ɵd, AbstractInputComponent as ɵe, StringInputComponent as ɵf, PasswordInputComponent as ɵg, SelectInputComponent as ɵh, PlaceModule as ɵi, EmptyStateComponent as ɵj, BusyOverlayComponent as ɵk, PlaceOutletComponent as ɵl, LEFT_RIGHT_PLACE_ANIMATION as ɵm, PlaceService as ɵn, TabbedPlaceNavigationComponent as ɵo, InteractionModule as ɵp, ActivityContainerComponent as ɵq, ConfirmationDialogComponent as ɵr, AbstractActivity as ɵs, ACTIVITY_DATA as ɵt, AlertDialogComponent as ɵv, ActivityOutletComponent as ɵx, DialogInteractionService as ɵy, InteractionContext as ɵz };
|
|
3924
3887
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|