@coolon/angular-ui-powerups 0.0.34 → 0.0.36
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 +272 -238
- 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.d.ts +7 -7
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +6 -6
- package/esm2015/lib/interaction/abstract-activity.js +14 -2
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +18 -5
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.js +13 -5
- package/esm5/coolon-angular-ui-powerups.js +6 -6
- package/esm5/lib/interaction/abstract-activity.js +17 -9
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +18 -5
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.js +16 -5
- package/fesm2015/coolon-angular-ui-powerups.js +228 -197
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +269 -235
- 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 +5 -2
- package/lib/interaction/components/activity-outlet/activity-outlet.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
2
|
-
import { EventEmitter, Input, Output, HostListener, Component, Directive, ElementRef, Inject, NgZone, InjectionToken,
|
|
2
|
+
import { EventEmitter, Input, Output, HostListener, Component, Directive, ElementRef, Inject, NgZone, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, Injectable, ɵɵdefineInjectable, ɵɵinject, NgModule, INJECTOR } from '@angular/core';
|
|
3
3
|
import { FormsModule } from '@angular/forms';
|
|
4
4
|
import { MatDialog, MatButtonModule, MatDialogModule, MatTabsModule, MatProgressSpinnerModule, MatInputModule, MatFormFieldModule, MatSelectModule } from '@angular/material';
|
|
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';
|
|
@@ -838,13 +838,248 @@ if (false) {
|
|
|
838
838
|
* @fileoverview added by tsickle
|
|
839
839
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
840
840
|
*/
|
|
841
|
+
/** @type {?} */
|
|
842
|
+
var ACTIVITY_DATA = new InjectionToken('InteractionActivityData');
|
|
841
843
|
/**
|
|
844
|
+
* @record
|
|
842
845
|
* @template D, R, E
|
|
843
846
|
*/
|
|
844
|
-
|
|
847
|
+
function Activity() { }
|
|
848
|
+
if (false) {
|
|
849
|
+
/** @type {?} */
|
|
850
|
+
Activity.prototype.busy;
|
|
851
|
+
/**
|
|
852
|
+
* @param {?} callback
|
|
853
|
+
* @return {?}
|
|
854
|
+
*/
|
|
855
|
+
Activity.prototype.onDone = function (callback) { };
|
|
856
|
+
/**
|
|
857
|
+
* @param {?} callback
|
|
858
|
+
* @return {?}
|
|
859
|
+
*/
|
|
860
|
+
Activity.prototype.onCancel = function (callback) { };
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* @fileoverview added by tsickle
|
|
865
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
866
|
+
*/
|
|
867
|
+
/**
|
|
868
|
+
* @template D, R, E
|
|
869
|
+
*/
|
|
870
|
+
var ActivityOutletComponent = /** @class */ (function () {
|
|
871
|
+
function ActivityOutletComponent(componentFactoryResolver, viewContainerRef, injector) {
|
|
872
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
873
|
+
this.viewContainerRef = viewContainerRef;
|
|
874
|
+
this.injector = injector;
|
|
875
|
+
}
|
|
876
|
+
Object.defineProperty(ActivityOutletComponent.prototype, "activityContext", {
|
|
877
|
+
set: /**
|
|
878
|
+
* @param {?} activityContext
|
|
879
|
+
* @return {?}
|
|
880
|
+
*/
|
|
881
|
+
function (activityContext) {
|
|
882
|
+
this.loadActivity(activityContext);
|
|
883
|
+
},
|
|
884
|
+
enumerable: true,
|
|
885
|
+
configurable: true
|
|
886
|
+
});
|
|
887
|
+
;
|
|
888
|
+
/**
|
|
889
|
+
* @return {?}
|
|
890
|
+
*/
|
|
891
|
+
ActivityOutletComponent.prototype.ngOnInit = /**
|
|
892
|
+
* @return {?}
|
|
893
|
+
*/
|
|
894
|
+
function () {
|
|
895
|
+
};
|
|
896
|
+
/**
|
|
897
|
+
* @param {?} activityContext
|
|
898
|
+
* @return {?}
|
|
899
|
+
*/
|
|
900
|
+
ActivityOutletComponent.prototype.loadActivity = /**
|
|
901
|
+
* @param {?} activityContext
|
|
902
|
+
* @return {?}
|
|
903
|
+
*/
|
|
904
|
+
function (activityContext) {
|
|
905
|
+
/** @type {?} */
|
|
906
|
+
var injector = Injector.create({
|
|
907
|
+
providers: [
|
|
908
|
+
{
|
|
909
|
+
provide: InteractionContext,
|
|
910
|
+
useValue: this
|
|
911
|
+
},
|
|
912
|
+
{ provide: ACTIVITY_DATA, useValue: activityContext.activityData }
|
|
913
|
+
],
|
|
914
|
+
parent: this.injector
|
|
915
|
+
});
|
|
916
|
+
/** @type {?} */
|
|
917
|
+
var componentFactory = this.componentFactoryResolver.resolveComponentFactory(activityContext.activityClass);
|
|
918
|
+
this.viewContainerRef.clear();
|
|
919
|
+
this.activityComponentRef = this.viewContainerRef.createComponent(componentFactory, 0, injector);
|
|
920
|
+
this.activityComponentRef.instance.onDone(activityContext.onDone);
|
|
921
|
+
this.activityComponentRef.instance.onCancel(activityContext.onCancel);
|
|
922
|
+
};
|
|
923
|
+
/**
|
|
924
|
+
* @param {?} alert
|
|
925
|
+
* @return {?}
|
|
926
|
+
*/
|
|
927
|
+
ActivityOutletComponent.prototype.alert = /**
|
|
928
|
+
* @param {?} alert
|
|
929
|
+
* @return {?}
|
|
930
|
+
*/
|
|
931
|
+
function (alert) {
|
|
932
|
+
return this.interactionContext.alert(alert);
|
|
933
|
+
};
|
|
934
|
+
/**
|
|
935
|
+
* @param {?} confirm
|
|
936
|
+
* @return {?}
|
|
937
|
+
*/
|
|
938
|
+
ActivityOutletComponent.prototype.confirm = /**
|
|
939
|
+
* @param {?} confirm
|
|
940
|
+
* @return {?}
|
|
941
|
+
*/
|
|
942
|
+
function (confirm) {
|
|
943
|
+
return this.interactionContext.confirm(confirm);
|
|
944
|
+
};
|
|
945
|
+
/**
|
|
946
|
+
* @template D1, R1, E1
|
|
947
|
+
* @param {?} activityType
|
|
948
|
+
* @param {?=} data
|
|
949
|
+
* @return {?}
|
|
950
|
+
*/
|
|
951
|
+
ActivityOutletComponent.prototype.startActivity = /**
|
|
952
|
+
* @template D1, R1, E1
|
|
953
|
+
* @param {?} activityType
|
|
954
|
+
* @param {?=} data
|
|
955
|
+
* @return {?}
|
|
956
|
+
*/
|
|
957
|
+
function (activityType, data) {
|
|
958
|
+
return this.interactionContext.startActivity(activityType, data);
|
|
959
|
+
};
|
|
960
|
+
/**
|
|
961
|
+
* @return {?}
|
|
962
|
+
*/
|
|
963
|
+
ActivityOutletComponent.prototype.notifyReady = /**
|
|
964
|
+
* @return {?}
|
|
965
|
+
*/
|
|
966
|
+
function () {
|
|
967
|
+
if (this.activityComponentRef.instance['onActivityReady']) {
|
|
968
|
+
this.activityComponentRef.instance['onActivityReady']();
|
|
969
|
+
}
|
|
970
|
+
};
|
|
971
|
+
ActivityOutletComponent.decorators = [
|
|
972
|
+
{ type: Component, args: [{
|
|
973
|
+
selector: 'angular-ui-powerups-activity-outlet',
|
|
974
|
+
template: '',
|
|
975
|
+
styles: [":host{display:block}"]
|
|
976
|
+
}] }
|
|
977
|
+
];
|
|
978
|
+
/** @nocollapse */
|
|
979
|
+
ActivityOutletComponent.ctorParameters = function () { return [
|
|
980
|
+
{ type: ComponentFactoryResolver },
|
|
981
|
+
{ type: ViewContainerRef },
|
|
982
|
+
{ type: Injector }
|
|
983
|
+
]; };
|
|
984
|
+
ActivityOutletComponent.propDecorators = {
|
|
985
|
+
interactionContext: [{ type: Input }],
|
|
986
|
+
activityContext: [{ type: Input }]
|
|
987
|
+
};
|
|
988
|
+
return ActivityOutletComponent;
|
|
989
|
+
}());
|
|
990
|
+
if (false) {
|
|
991
|
+
/** @type {?} */
|
|
992
|
+
ActivityOutletComponent.prototype.interactionContext;
|
|
993
|
+
/**
|
|
994
|
+
* @type {?}
|
|
995
|
+
* @private
|
|
996
|
+
*/
|
|
997
|
+
ActivityOutletComponent.prototype.activityComponentRef;
|
|
998
|
+
/**
|
|
999
|
+
* @type {?}
|
|
1000
|
+
* @private
|
|
1001
|
+
*/
|
|
1002
|
+
ActivityOutletComponent.prototype.componentFactoryResolver;
|
|
1003
|
+
/**
|
|
1004
|
+
* @type {?}
|
|
1005
|
+
* @private
|
|
1006
|
+
*/
|
|
1007
|
+
ActivityOutletComponent.prototype.viewContainerRef;
|
|
1008
|
+
/**
|
|
1009
|
+
* @type {?}
|
|
1010
|
+
* @private
|
|
1011
|
+
*/
|
|
1012
|
+
ActivityOutletComponent.prototype.injector;
|
|
1013
|
+
/* Skipping unhandled member: ;*/
|
|
1014
|
+
}
|
|
1015
|
+
(function (ActivityOutletComponent) {
|
|
1016
|
+
/**
|
|
1017
|
+
* @template D, R, E
|
|
1018
|
+
*/
|
|
1019
|
+
var /**
|
|
1020
|
+
* @template D, R, E
|
|
1021
|
+
*/
|
|
1022
|
+
OutletInteractionContext = /** @class */ (function () {
|
|
1023
|
+
function OutletInteractionContext(context) {
|
|
1024
|
+
this.context = context;
|
|
1025
|
+
}
|
|
1026
|
+
/**
|
|
1027
|
+
* @param {?} alert
|
|
1028
|
+
* @return {?}
|
|
1029
|
+
*/
|
|
1030
|
+
OutletInteractionContext.prototype.alert = /**
|
|
1031
|
+
* @param {?} alert
|
|
1032
|
+
* @return {?}
|
|
1033
|
+
*/
|
|
1034
|
+
function (alert) {
|
|
1035
|
+
return lang.notImplemented();
|
|
1036
|
+
};
|
|
1037
|
+
/**
|
|
1038
|
+
* @param {?} confirm
|
|
1039
|
+
* @return {?}
|
|
1040
|
+
*/
|
|
1041
|
+
OutletInteractionContext.prototype.confirm = /**
|
|
1042
|
+
* @param {?} confirm
|
|
1043
|
+
* @return {?}
|
|
1044
|
+
*/
|
|
1045
|
+
function (confirm) {
|
|
1046
|
+
return lang.notImplemented();
|
|
1047
|
+
};
|
|
1048
|
+
/**
|
|
1049
|
+
* @template D1, R1, E1
|
|
1050
|
+
* @param {?} activityType
|
|
1051
|
+
* @param {?=} data
|
|
1052
|
+
* @return {?}
|
|
1053
|
+
*/
|
|
1054
|
+
OutletInteractionContext.prototype.startActivity = /**
|
|
1055
|
+
* @template D1, R1, E1
|
|
1056
|
+
* @param {?} activityType
|
|
1057
|
+
* @param {?=} data
|
|
1058
|
+
* @return {?}
|
|
1059
|
+
*/
|
|
1060
|
+
function (activityType, data) {
|
|
1061
|
+
return lang.notImplemented();
|
|
1062
|
+
};
|
|
1063
|
+
return OutletInteractionContext;
|
|
1064
|
+
}());
|
|
1065
|
+
ActivityOutletComponent.OutletInteractionContext = OutletInteractionContext;
|
|
1066
|
+
if (false) {
|
|
1067
|
+
/**
|
|
1068
|
+
* @type {?}
|
|
1069
|
+
* @private
|
|
1070
|
+
*/
|
|
1071
|
+
OutletInteractionContext.prototype.context;
|
|
1072
|
+
}
|
|
1073
|
+
})(ActivityOutletComponent || (ActivityOutletComponent = {}));
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* @fileoverview added by tsickle
|
|
1077
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1078
|
+
*/
|
|
1079
|
+
/**
|
|
845
1080
|
* @template D, R, E
|
|
846
1081
|
*/
|
|
847
|
-
AbstractActivity = /** @class */ (function (_super) {
|
|
1082
|
+
var AbstractActivity = /** @class */ (function (_super) {
|
|
848
1083
|
__extends(AbstractActivity, _super);
|
|
849
1084
|
function AbstractActivity() {
|
|
850
1085
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -918,6 +1153,14 @@ AbstractActivity = /** @class */ (function (_super) {
|
|
|
918
1153
|
*/
|
|
919
1154
|
function () { return _this.finalizeAndDispose(); }));
|
|
920
1155
|
};
|
|
1156
|
+
/**
|
|
1157
|
+
* @return {?}
|
|
1158
|
+
*/
|
|
1159
|
+
AbstractActivity.prototype.onActivityReady = /**
|
|
1160
|
+
* @return {?}
|
|
1161
|
+
*/
|
|
1162
|
+
function () {
|
|
1163
|
+
};
|
|
921
1164
|
/**
|
|
922
1165
|
* @private
|
|
923
1166
|
* @return {?}
|
|
@@ -975,6 +1218,12 @@ AbstractActivity = /** @class */ (function (_super) {
|
|
|
975
1218
|
function () {
|
|
976
1219
|
return this._busyModel.value;
|
|
977
1220
|
};
|
|
1221
|
+
__decorate([
|
|
1222
|
+
Trace(),
|
|
1223
|
+
__metadata("design:type", Function),
|
|
1224
|
+
__metadata("design:paramtypes", []),
|
|
1225
|
+
__metadata("design:returntype", void 0)
|
|
1226
|
+
], AbstractActivity.prototype, "onActivityReady", null);
|
|
978
1227
|
return AbstractActivity;
|
|
979
1228
|
}(DisposableComponent));
|
|
980
1229
|
if (false) {
|
|
@@ -1000,32 +1249,6 @@ if (false) {
|
|
|
1000
1249
|
AbstractActivity.prototype._busyModel;
|
|
1001
1250
|
}
|
|
1002
1251
|
|
|
1003
|
-
/**
|
|
1004
|
-
* @fileoverview added by tsickle
|
|
1005
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1006
|
-
*/
|
|
1007
|
-
/** @type {?} */
|
|
1008
|
-
var ACTIVITY_DATA = new InjectionToken('InteractionActivityData');
|
|
1009
|
-
/**
|
|
1010
|
-
* @record
|
|
1011
|
-
* @template D, R, E
|
|
1012
|
-
*/
|
|
1013
|
-
function Activity() { }
|
|
1014
|
-
if (false) {
|
|
1015
|
-
/** @type {?} */
|
|
1016
|
-
Activity.prototype.busy;
|
|
1017
|
-
/**
|
|
1018
|
-
* @param {?} callback
|
|
1019
|
-
* @return {?}
|
|
1020
|
-
*/
|
|
1021
|
-
Activity.prototype.onDone = function (callback) { };
|
|
1022
|
-
/**
|
|
1023
|
-
* @param {?} callback
|
|
1024
|
-
* @return {?}
|
|
1025
|
-
*/
|
|
1026
|
-
Activity.prototype.onCancel = function (callback) { };
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
1252
|
/**
|
|
1030
1253
|
* @fileoverview added by tsickle
|
|
1031
1254
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -1121,6 +1344,8 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1121
1344
|
var _this = _super.call(this) || this;
|
|
1122
1345
|
_this.activityTabs = new MutableListModel();
|
|
1123
1346
|
_this.obsoleteTabs = [];
|
|
1347
|
+
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;
|
|
1348
|
+
_this.lastActivityTab = chain(_this.activityTabs).last().otherwise(_this.initialActivity);
|
|
1124
1349
|
return _this;
|
|
1125
1350
|
}
|
|
1126
1351
|
/**
|
|
@@ -1143,7 +1368,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1143
1368
|
observe.valuesFrom(this.tabs.animationDone).subscribe((/**
|
|
1144
1369
|
* @return {?}
|
|
1145
1370
|
*/
|
|
1146
|
-
function () { return _this.
|
|
1371
|
+
function () { return _this.onAnimationFinished(); }));
|
|
1147
1372
|
};
|
|
1148
1373
|
/**
|
|
1149
1374
|
* @template D, R, E
|
|
@@ -1218,12 +1443,13 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1218
1443
|
* @private
|
|
1219
1444
|
* @return {?}
|
|
1220
1445
|
*/
|
|
1221
|
-
ActivityContainerComponent.prototype.
|
|
1446
|
+
ActivityContainerComponent.prototype.onAnimationFinished = /**
|
|
1222
1447
|
* @private
|
|
1223
1448
|
* @return {?}
|
|
1224
1449
|
*/
|
|
1225
1450
|
function () {
|
|
1226
1451
|
var _this = this;
|
|
1452
|
+
// TODO: notify selected tab they are ready. activty.afterAnimationComplete
|
|
1227
1453
|
this.activityTabs.value = this.activityTabs.value.filter((/**
|
|
1228
1454
|
* @param {?} tab
|
|
1229
1455
|
* @return {?}
|
|
@@ -1231,6 +1457,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1231
1457
|
function (tab) {
|
|
1232
1458
|
return !_this.obsoleteTabs.includes(tab);
|
|
1233
1459
|
}));
|
|
1460
|
+
this.outlets.last.notifyReady();
|
|
1234
1461
|
};
|
|
1235
1462
|
ActivityContainerComponent.decorators = [
|
|
1236
1463
|
{ type: Component, args: [{
|
|
@@ -1244,7 +1471,8 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1244
1471
|
ActivityContainerComponent.propDecorators = {
|
|
1245
1472
|
parentInteractionContext: [{ type: Input }],
|
|
1246
1473
|
initialActivity: [{ type: Input }],
|
|
1247
|
-
tabs: [{ type: ViewChild, args: ['tabs', { static: true },] }]
|
|
1474
|
+
tabs: [{ type: ViewChild, args: ['tabs', { static: true },] }],
|
|
1475
|
+
outlets: [{ type: ViewChildren, args: [ActivityOutletComponent,] }]
|
|
1248
1476
|
};
|
|
1249
1477
|
return ActivityContainerComponent;
|
|
1250
1478
|
}(DisposableComponent));
|
|
@@ -1256,12 +1484,19 @@ if (false) {
|
|
|
1256
1484
|
/** @type {?} */
|
|
1257
1485
|
ActivityContainerComponent.prototype.tabs;
|
|
1258
1486
|
/** @type {?} */
|
|
1487
|
+
ActivityContainerComponent.prototype.outlets;
|
|
1488
|
+
/** @type {?} */
|
|
1259
1489
|
ActivityContainerComponent.prototype.activityTabs;
|
|
1260
1490
|
/**
|
|
1261
1491
|
* @type {?}
|
|
1262
1492
|
* @private
|
|
1263
1493
|
*/
|
|
1264
1494
|
ActivityContainerComponent.prototype.obsoleteTabs;
|
|
1495
|
+
/**
|
|
1496
|
+
* @type {?}
|
|
1497
|
+
* @private
|
|
1498
|
+
*/
|
|
1499
|
+
ActivityContainerComponent.prototype.lastActivityTab;
|
|
1265
1500
|
}
|
|
1266
1501
|
(function (ActivityContainerComponent) {
|
|
1267
1502
|
/**
|
|
@@ -1282,207 +1517,6 @@ if (false) {
|
|
|
1282
1517
|
}
|
|
1283
1518
|
})(ActivityContainerComponent || (ActivityContainerComponent = {}));
|
|
1284
1519
|
|
|
1285
|
-
/**
|
|
1286
|
-
* @fileoverview added by tsickle
|
|
1287
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1288
|
-
*/
|
|
1289
|
-
/**
|
|
1290
|
-
* @template D, R, E
|
|
1291
|
-
*/
|
|
1292
|
-
var ActivityOutletComponent = /** @class */ (function () {
|
|
1293
|
-
function ActivityOutletComponent(componentFactoryResolver, viewContainerRef, injector) {
|
|
1294
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
1295
|
-
this.viewContainerRef = viewContainerRef;
|
|
1296
|
-
this.injector = injector;
|
|
1297
|
-
}
|
|
1298
|
-
Object.defineProperty(ActivityOutletComponent.prototype, "activityContext", {
|
|
1299
|
-
set: /**
|
|
1300
|
-
* @param {?} activityContext
|
|
1301
|
-
* @return {?}
|
|
1302
|
-
*/
|
|
1303
|
-
function (activityContext) {
|
|
1304
|
-
this.loadActivity(activityContext);
|
|
1305
|
-
},
|
|
1306
|
-
enumerable: true,
|
|
1307
|
-
configurable: true
|
|
1308
|
-
});
|
|
1309
|
-
;
|
|
1310
|
-
/**
|
|
1311
|
-
* @return {?}
|
|
1312
|
-
*/
|
|
1313
|
-
ActivityOutletComponent.prototype.ngOnInit = /**
|
|
1314
|
-
* @return {?}
|
|
1315
|
-
*/
|
|
1316
|
-
function () {
|
|
1317
|
-
};
|
|
1318
|
-
/**
|
|
1319
|
-
* @param {?} activityContext
|
|
1320
|
-
* @return {?}
|
|
1321
|
-
*/
|
|
1322
|
-
ActivityOutletComponent.prototype.loadActivity = /**
|
|
1323
|
-
* @param {?} activityContext
|
|
1324
|
-
* @return {?}
|
|
1325
|
-
*/
|
|
1326
|
-
function (activityContext) {
|
|
1327
|
-
/** @type {?} */
|
|
1328
|
-
var injector = Injector.create({
|
|
1329
|
-
providers: [
|
|
1330
|
-
{
|
|
1331
|
-
provide: InteractionContext,
|
|
1332
|
-
useValue: this
|
|
1333
|
-
},
|
|
1334
|
-
{ provide: ACTIVITY_DATA, useValue: activityContext.activityData }
|
|
1335
|
-
],
|
|
1336
|
-
parent: this.injector
|
|
1337
|
-
});
|
|
1338
|
-
/** @type {?} */
|
|
1339
|
-
var componentFactory = this.componentFactoryResolver.resolveComponentFactory(activityContext.activityClass);
|
|
1340
|
-
this.viewContainerRef.clear();
|
|
1341
|
-
this.activityComponent = this.viewContainerRef.createComponent(componentFactory, 0, injector);
|
|
1342
|
-
this.activityComponent.instance.onDone(activityContext.onDone);
|
|
1343
|
-
this.activityComponent.instance.onCancel(activityContext.onCancel);
|
|
1344
|
-
};
|
|
1345
|
-
/**
|
|
1346
|
-
* @param {?} alert
|
|
1347
|
-
* @return {?}
|
|
1348
|
-
*/
|
|
1349
|
-
ActivityOutletComponent.prototype.alert = /**
|
|
1350
|
-
* @param {?} alert
|
|
1351
|
-
* @return {?}
|
|
1352
|
-
*/
|
|
1353
|
-
function (alert) {
|
|
1354
|
-
return this.interactionContext.alert(alert);
|
|
1355
|
-
};
|
|
1356
|
-
/**
|
|
1357
|
-
* @param {?} confirm
|
|
1358
|
-
* @return {?}
|
|
1359
|
-
*/
|
|
1360
|
-
ActivityOutletComponent.prototype.confirm = /**
|
|
1361
|
-
* @param {?} confirm
|
|
1362
|
-
* @return {?}
|
|
1363
|
-
*/
|
|
1364
|
-
function (confirm) {
|
|
1365
|
-
return this.interactionContext.confirm(confirm);
|
|
1366
|
-
};
|
|
1367
|
-
/**
|
|
1368
|
-
* @template D1, R1, E1
|
|
1369
|
-
* @param {?} activityType
|
|
1370
|
-
* @param {?=} data
|
|
1371
|
-
* @return {?}
|
|
1372
|
-
*/
|
|
1373
|
-
ActivityOutletComponent.prototype.startActivity = /**
|
|
1374
|
-
* @template D1, R1, E1
|
|
1375
|
-
* @param {?} activityType
|
|
1376
|
-
* @param {?=} data
|
|
1377
|
-
* @return {?}
|
|
1378
|
-
*/
|
|
1379
|
-
function (activityType, data) {
|
|
1380
|
-
return this.interactionContext.startActivity(activityType, data);
|
|
1381
|
-
};
|
|
1382
|
-
ActivityOutletComponent.decorators = [
|
|
1383
|
-
{ type: Component, args: [{
|
|
1384
|
-
selector: 'angular-ui-powerups-activity-outlet',
|
|
1385
|
-
template: '',
|
|
1386
|
-
styles: [":host{display:block}"]
|
|
1387
|
-
}] }
|
|
1388
|
-
];
|
|
1389
|
-
/** @nocollapse */
|
|
1390
|
-
ActivityOutletComponent.ctorParameters = function () { return [
|
|
1391
|
-
{ type: ComponentFactoryResolver },
|
|
1392
|
-
{ type: ViewContainerRef },
|
|
1393
|
-
{ type: Injector }
|
|
1394
|
-
]; };
|
|
1395
|
-
ActivityOutletComponent.propDecorators = {
|
|
1396
|
-
interactionContext: [{ type: Input }],
|
|
1397
|
-
activityContext: [{ type: Input }]
|
|
1398
|
-
};
|
|
1399
|
-
return ActivityOutletComponent;
|
|
1400
|
-
}());
|
|
1401
|
-
if (false) {
|
|
1402
|
-
/** @type {?} */
|
|
1403
|
-
ActivityOutletComponent.prototype.interactionContext;
|
|
1404
|
-
/**
|
|
1405
|
-
* @type {?}
|
|
1406
|
-
* @private
|
|
1407
|
-
*/
|
|
1408
|
-
ActivityOutletComponent.prototype.activityComponent;
|
|
1409
|
-
/**
|
|
1410
|
-
* @type {?}
|
|
1411
|
-
* @private
|
|
1412
|
-
*/
|
|
1413
|
-
ActivityOutletComponent.prototype.componentFactoryResolver;
|
|
1414
|
-
/**
|
|
1415
|
-
* @type {?}
|
|
1416
|
-
* @private
|
|
1417
|
-
*/
|
|
1418
|
-
ActivityOutletComponent.prototype.viewContainerRef;
|
|
1419
|
-
/**
|
|
1420
|
-
* @type {?}
|
|
1421
|
-
* @private
|
|
1422
|
-
*/
|
|
1423
|
-
ActivityOutletComponent.prototype.injector;
|
|
1424
|
-
/* Skipping unhandled member: ;*/
|
|
1425
|
-
}
|
|
1426
|
-
(function (ActivityOutletComponent) {
|
|
1427
|
-
/**
|
|
1428
|
-
* @template D, R, E
|
|
1429
|
-
*/
|
|
1430
|
-
var /**
|
|
1431
|
-
* @template D, R, E
|
|
1432
|
-
*/
|
|
1433
|
-
OutletInteractionContext = /** @class */ (function () {
|
|
1434
|
-
function OutletInteractionContext(context) {
|
|
1435
|
-
this.context = context;
|
|
1436
|
-
}
|
|
1437
|
-
/**
|
|
1438
|
-
* @param {?} alert
|
|
1439
|
-
* @return {?}
|
|
1440
|
-
*/
|
|
1441
|
-
OutletInteractionContext.prototype.alert = /**
|
|
1442
|
-
* @param {?} alert
|
|
1443
|
-
* @return {?}
|
|
1444
|
-
*/
|
|
1445
|
-
function (alert) {
|
|
1446
|
-
return lang.notImplemented();
|
|
1447
|
-
};
|
|
1448
|
-
/**
|
|
1449
|
-
* @param {?} confirm
|
|
1450
|
-
* @return {?}
|
|
1451
|
-
*/
|
|
1452
|
-
OutletInteractionContext.prototype.confirm = /**
|
|
1453
|
-
* @param {?} confirm
|
|
1454
|
-
* @return {?}
|
|
1455
|
-
*/
|
|
1456
|
-
function (confirm) {
|
|
1457
|
-
return lang.notImplemented();
|
|
1458
|
-
};
|
|
1459
|
-
/**
|
|
1460
|
-
* @template D1, R1, E1
|
|
1461
|
-
* @param {?} activityType
|
|
1462
|
-
* @param {?=} data
|
|
1463
|
-
* @return {?}
|
|
1464
|
-
*/
|
|
1465
|
-
OutletInteractionContext.prototype.startActivity = /**
|
|
1466
|
-
* @template D1, R1, E1
|
|
1467
|
-
* @param {?} activityType
|
|
1468
|
-
* @param {?=} data
|
|
1469
|
-
* @return {?}
|
|
1470
|
-
*/
|
|
1471
|
-
function (activityType, data) {
|
|
1472
|
-
return lang.notImplemented();
|
|
1473
|
-
};
|
|
1474
|
-
return OutletInteractionContext;
|
|
1475
|
-
}());
|
|
1476
|
-
ActivityOutletComponent.OutletInteractionContext = OutletInteractionContext;
|
|
1477
|
-
if (false) {
|
|
1478
|
-
/**
|
|
1479
|
-
* @type {?}
|
|
1480
|
-
* @private
|
|
1481
|
-
*/
|
|
1482
|
-
OutletInteractionContext.prototype.context;
|
|
1483
|
-
}
|
|
1484
|
-
})(ActivityOutletComponent || (ActivityOutletComponent = {}));
|
|
1485
|
-
|
|
1486
1520
|
/**
|
|
1487
1521
|
* @fileoverview added by tsickle
|
|
1488
1522
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -3861,5 +3895,5 @@ var VisitSnapshot = /** @class */ (function () {
|
|
|
3861
3895
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3862
3896
|
*/
|
|
3863
3897
|
|
|
3864
|
-
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,
|
|
3898
|
+
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, ActivityOutletComponent as ɵr, ConfirmationDialogComponent as ɵs, AbstractActivity as ɵt, ACTIVITY_DATA as ɵu, AlertDialogComponent as ɵw, DialogInteractionService as ɵy, InteractionContext as ɵz };
|
|
3865
3899
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|