@coolon/angular-ui-powerups 0.0.35 → 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.
@@ -1015,6 +1015,244 @@
1015
1015
  InteractionContext.prototype.alert = function (alert) { };
1016
1016
  }
1017
1017
 
1018
+ /**
1019
+ * @fileoverview added by tsickle
1020
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1021
+ */
1022
+ /** @type {?} */
1023
+ var ACTIVITY_DATA = new core.InjectionToken('InteractionActivityData');
1024
+ /**
1025
+ * @record
1026
+ * @template D, R, E
1027
+ */
1028
+ function Activity() { }
1029
+ if (false) {
1030
+ /** @type {?} */
1031
+ Activity.prototype.busy;
1032
+ /**
1033
+ * @param {?} callback
1034
+ * @return {?}
1035
+ */
1036
+ Activity.prototype.onDone = function (callback) { };
1037
+ /**
1038
+ * @param {?} callback
1039
+ * @return {?}
1040
+ */
1041
+ Activity.prototype.onCancel = function (callback) { };
1042
+ }
1043
+
1044
+ /**
1045
+ * @fileoverview added by tsickle
1046
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1047
+ */
1048
+ /**
1049
+ * @template D, R, E
1050
+ */
1051
+ exports.ɵr = /** @class */ (function () {
1052
+ function ActivityOutletComponent(componentFactoryResolver, viewContainerRef, injector) {
1053
+ this.componentFactoryResolver = componentFactoryResolver;
1054
+ this.viewContainerRef = viewContainerRef;
1055
+ this.injector = injector;
1056
+ }
1057
+ Object.defineProperty(ActivityOutletComponent.prototype, "activityContext", {
1058
+ set: /**
1059
+ * @param {?} activityContext
1060
+ * @return {?}
1061
+ */
1062
+ function (activityContext) {
1063
+ this.loadActivity(activityContext);
1064
+ },
1065
+ enumerable: true,
1066
+ configurable: true
1067
+ });
1068
+ ;
1069
+ /**
1070
+ * @return {?}
1071
+ */
1072
+ ActivityOutletComponent.prototype.ngOnInit = /**
1073
+ * @return {?}
1074
+ */
1075
+ function () {
1076
+ };
1077
+ /**
1078
+ * @param {?} activityContext
1079
+ * @return {?}
1080
+ */
1081
+ ActivityOutletComponent.prototype.loadActivity = /**
1082
+ * @param {?} activityContext
1083
+ * @return {?}
1084
+ */
1085
+ function (activityContext) {
1086
+ /** @type {?} */
1087
+ var injector = core.Injector.create({
1088
+ providers: [
1089
+ {
1090
+ provide: InteractionContext,
1091
+ useValue: this
1092
+ },
1093
+ { provide: ACTIVITY_DATA, useValue: activityContext.activityData }
1094
+ ],
1095
+ parent: this.injector
1096
+ });
1097
+ /** @type {?} */
1098
+ var componentFactory = this.componentFactoryResolver.resolveComponentFactory(activityContext.activityClass);
1099
+ this.viewContainerRef.clear();
1100
+ this.activityComponentRef = this.viewContainerRef.createComponent(componentFactory, 0, injector);
1101
+ this.activityComponentRef.instance.onDone(activityContext.onDone);
1102
+ this.activityComponentRef.instance.onCancel(activityContext.onCancel);
1103
+ };
1104
+ /**
1105
+ * @param {?} alert
1106
+ * @return {?}
1107
+ */
1108
+ ActivityOutletComponent.prototype.alert = /**
1109
+ * @param {?} alert
1110
+ * @return {?}
1111
+ */
1112
+ function (alert) {
1113
+ return this.interactionContext.alert(alert);
1114
+ };
1115
+ /**
1116
+ * @param {?} confirm
1117
+ * @return {?}
1118
+ */
1119
+ ActivityOutletComponent.prototype.confirm = /**
1120
+ * @param {?} confirm
1121
+ * @return {?}
1122
+ */
1123
+ function (confirm) {
1124
+ return this.interactionContext.confirm(confirm);
1125
+ };
1126
+ /**
1127
+ * @template D1, R1, E1
1128
+ * @param {?} activityType
1129
+ * @param {?=} data
1130
+ * @return {?}
1131
+ */
1132
+ ActivityOutletComponent.prototype.startActivity = /**
1133
+ * @template D1, R1, E1
1134
+ * @param {?} activityType
1135
+ * @param {?=} data
1136
+ * @return {?}
1137
+ */
1138
+ function (activityType, data) {
1139
+ return this.interactionContext.startActivity(activityType, data);
1140
+ };
1141
+ /**
1142
+ * @return {?}
1143
+ */
1144
+ ActivityOutletComponent.prototype.notifyReady = /**
1145
+ * @return {?}
1146
+ */
1147
+ function () {
1148
+ if (this.activityComponentRef.instance['onActivityReady']) {
1149
+ this.activityComponentRef.instance['onActivityReady']();
1150
+ }
1151
+ };
1152
+ ActivityOutletComponent.decorators = [
1153
+ { type: core.Component, args: [{
1154
+ selector: 'angular-ui-powerups-activity-outlet',
1155
+ template: '',
1156
+ styles: [":host{display:block}"]
1157
+ }] }
1158
+ ];
1159
+ /** @nocollapse */
1160
+ ActivityOutletComponent.ctorParameters = function () { return [
1161
+ { type: core.ComponentFactoryResolver },
1162
+ { type: core.ViewContainerRef },
1163
+ { type: core.Injector }
1164
+ ]; };
1165
+ ActivityOutletComponent.propDecorators = {
1166
+ interactionContext: [{ type: core.Input }],
1167
+ activityContext: [{ type: core.Input }]
1168
+ };
1169
+ return ActivityOutletComponent;
1170
+ }());
1171
+ if (false) {
1172
+ /** @type {?} */
1173
+ exports.ɵr.prototype.interactionContext;
1174
+ /**
1175
+ * @type {?}
1176
+ * @private
1177
+ */
1178
+ exports.ɵr.prototype.activityComponentRef;
1179
+ /**
1180
+ * @type {?}
1181
+ * @private
1182
+ */
1183
+ exports.ɵr.prototype.componentFactoryResolver;
1184
+ /**
1185
+ * @type {?}
1186
+ * @private
1187
+ */
1188
+ exports.ɵr.prototype.viewContainerRef;
1189
+ /**
1190
+ * @type {?}
1191
+ * @private
1192
+ */
1193
+ exports.ɵr.prototype.injector;
1194
+ /* Skipping unhandled member: ;*/
1195
+ }
1196
+ (function (ActivityOutletComponent) {
1197
+ /**
1198
+ * @template D, R, E
1199
+ */
1200
+ var /**
1201
+ * @template D, R, E
1202
+ */
1203
+ OutletInteractionContext = /** @class */ (function () {
1204
+ function OutletInteractionContext(context) {
1205
+ this.context = context;
1206
+ }
1207
+ /**
1208
+ * @param {?} alert
1209
+ * @return {?}
1210
+ */
1211
+ OutletInteractionContext.prototype.alert = /**
1212
+ * @param {?} alert
1213
+ * @return {?}
1214
+ */
1215
+ function (alert) {
1216
+ return pectin.lang.notImplemented();
1217
+ };
1218
+ /**
1219
+ * @param {?} confirm
1220
+ * @return {?}
1221
+ */
1222
+ OutletInteractionContext.prototype.confirm = /**
1223
+ * @param {?} confirm
1224
+ * @return {?}
1225
+ */
1226
+ function (confirm) {
1227
+ return pectin.lang.notImplemented();
1228
+ };
1229
+ /**
1230
+ * @template D1, R1, E1
1231
+ * @param {?} activityType
1232
+ * @param {?=} data
1233
+ * @return {?}
1234
+ */
1235
+ OutletInteractionContext.prototype.startActivity = /**
1236
+ * @template D1, R1, E1
1237
+ * @param {?} activityType
1238
+ * @param {?=} data
1239
+ * @return {?}
1240
+ */
1241
+ function (activityType, data) {
1242
+ return pectin.lang.notImplemented();
1243
+ };
1244
+ return OutletInteractionContext;
1245
+ }());
1246
+ ActivityOutletComponent.OutletInteractionContext = OutletInteractionContext;
1247
+ if (false) {
1248
+ /**
1249
+ * @type {?}
1250
+ * @private
1251
+ */
1252
+ OutletInteractionContext.prototype.context;
1253
+ }
1254
+ })(exports.ɵr || (exports.ɵr = {}));
1255
+
1018
1256
  /**
1019
1257
  * @fileoverview added by tsickle
1020
1258
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -1192,32 +1430,6 @@
1192
1430
  AbstractActivity.prototype._busyModel;
1193
1431
  }
1194
1432
 
1195
- /**
1196
- * @fileoverview added by tsickle
1197
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1198
- */
1199
- /** @type {?} */
1200
- var ACTIVITY_DATA = new core.InjectionToken('InteractionActivityData');
1201
- /**
1202
- * @record
1203
- * @template D, R, E
1204
- */
1205
- function Activity() { }
1206
- if (false) {
1207
- /** @type {?} */
1208
- Activity.prototype.busy;
1209
- /**
1210
- * @param {?} callback
1211
- * @return {?}
1212
- */
1213
- Activity.prototype.onDone = function (callback) { };
1214
- /**
1215
- * @param {?} callback
1216
- * @return {?}
1217
- */
1218
- Activity.prototype.onCancel = function (callback) { };
1219
- }
1220
-
1221
1433
  /**
1222
1434
  * @fileoverview added by tsickle
1223
1435
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -1314,7 +1526,7 @@
1314
1526
  _this.activityTabs = new pectin.MutableListModel();
1315
1527
  _this.obsoleteTabs = [];
1316
1528
  var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
1317
- _this.lastActivityTab = chain(_this.activityTabs).last();
1529
+ _this.lastActivityTab = chain(_this.activityTabs).last().otherwise(_this.initialActivity);
1318
1530
  return _this;
1319
1531
  }
1320
1532
  /**
@@ -1426,9 +1638,7 @@
1426
1638
  function (tab) {
1427
1639
  return !_this.obsoleteTabs.includes(tab);
1428
1640
  }));
1429
- if (this.lastActivityTab.value && this.lastActivityTab.value['onActivityReady']) {
1430
- this.lastActivityTab.value['onActivityReady']();
1431
- }
1641
+ this.outlets.last.notifyReady();
1432
1642
  };
1433
1643
  ActivityContainerComponent.decorators = [
1434
1644
  { type: core.Component, args: [{
@@ -1442,7 +1652,8 @@
1442
1652
  ActivityContainerComponent.propDecorators = {
1443
1653
  parentInteractionContext: [{ type: core.Input }],
1444
1654
  initialActivity: [{ type: core.Input }],
1445
- tabs: [{ type: core.ViewChild, args: ['tabs', { static: true },] }]
1655
+ tabs: [{ type: core.ViewChild, args: ['tabs', { static: true },] }],
1656
+ outlets: [{ type: core.ViewChildren, args: [exports.ɵr,] }]
1446
1657
  };
1447
1658
  return ActivityContainerComponent;
1448
1659
  }(DisposableComponent));
@@ -1454,6 +1665,8 @@
1454
1665
  /** @type {?} */
1455
1666
  exports.ɵq.prototype.tabs;
1456
1667
  /** @type {?} */
1668
+ exports.ɵq.prototype.outlets;
1669
+ /** @type {?} */
1457
1670
  exports.ɵq.prototype.activityTabs;
1458
1671
  /**
1459
1672
  * @type {?}
@@ -1485,207 +1698,6 @@
1485
1698
  }
1486
1699
  })(exports.ɵq || (exports.ɵq = {}));
1487
1700
 
1488
- /**
1489
- * @fileoverview added by tsickle
1490
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1491
- */
1492
- /**
1493
- * @template D, R, E
1494
- */
1495
- exports.ɵx = /** @class */ (function () {
1496
- function ActivityOutletComponent(componentFactoryResolver, viewContainerRef, injector) {
1497
- this.componentFactoryResolver = componentFactoryResolver;
1498
- this.viewContainerRef = viewContainerRef;
1499
- this.injector = injector;
1500
- }
1501
- Object.defineProperty(ActivityOutletComponent.prototype, "activityContext", {
1502
- set: /**
1503
- * @param {?} activityContext
1504
- * @return {?}
1505
- */
1506
- function (activityContext) {
1507
- this.loadActivity(activityContext);
1508
- },
1509
- enumerable: true,
1510
- configurable: true
1511
- });
1512
- ;
1513
- /**
1514
- * @return {?}
1515
- */
1516
- ActivityOutletComponent.prototype.ngOnInit = /**
1517
- * @return {?}
1518
- */
1519
- function () {
1520
- };
1521
- /**
1522
- * @param {?} activityContext
1523
- * @return {?}
1524
- */
1525
- ActivityOutletComponent.prototype.loadActivity = /**
1526
- * @param {?} activityContext
1527
- * @return {?}
1528
- */
1529
- function (activityContext) {
1530
- /** @type {?} */
1531
- var injector = core.Injector.create({
1532
- providers: [
1533
- {
1534
- provide: InteractionContext,
1535
- useValue: this
1536
- },
1537
- { provide: ACTIVITY_DATA, useValue: activityContext.activityData }
1538
- ],
1539
- parent: this.injector
1540
- });
1541
- /** @type {?} */
1542
- var componentFactory = this.componentFactoryResolver.resolveComponentFactory(activityContext.activityClass);
1543
- this.viewContainerRef.clear();
1544
- this.activityComponent = this.viewContainerRef.createComponent(componentFactory, 0, injector);
1545
- this.activityComponent.instance.onDone(activityContext.onDone);
1546
- this.activityComponent.instance.onCancel(activityContext.onCancel);
1547
- };
1548
- /**
1549
- * @param {?} alert
1550
- * @return {?}
1551
- */
1552
- ActivityOutletComponent.prototype.alert = /**
1553
- * @param {?} alert
1554
- * @return {?}
1555
- */
1556
- function (alert) {
1557
- return this.interactionContext.alert(alert);
1558
- };
1559
- /**
1560
- * @param {?} confirm
1561
- * @return {?}
1562
- */
1563
- ActivityOutletComponent.prototype.confirm = /**
1564
- * @param {?} confirm
1565
- * @return {?}
1566
- */
1567
- function (confirm) {
1568
- return this.interactionContext.confirm(confirm);
1569
- };
1570
- /**
1571
- * @template D1, R1, E1
1572
- * @param {?} activityType
1573
- * @param {?=} data
1574
- * @return {?}
1575
- */
1576
- ActivityOutletComponent.prototype.startActivity = /**
1577
- * @template D1, R1, E1
1578
- * @param {?} activityType
1579
- * @param {?=} data
1580
- * @return {?}
1581
- */
1582
- function (activityType, data) {
1583
- return this.interactionContext.startActivity(activityType, data);
1584
- };
1585
- ActivityOutletComponent.decorators = [
1586
- { type: core.Component, args: [{
1587
- selector: 'angular-ui-powerups-activity-outlet',
1588
- template: '',
1589
- styles: [":host{display:block}"]
1590
- }] }
1591
- ];
1592
- /** @nocollapse */
1593
- ActivityOutletComponent.ctorParameters = function () { return [
1594
- { type: core.ComponentFactoryResolver },
1595
- { type: core.ViewContainerRef },
1596
- { type: core.Injector }
1597
- ]; };
1598
- ActivityOutletComponent.propDecorators = {
1599
- interactionContext: [{ type: core.Input }],
1600
- activityContext: [{ type: core.Input }]
1601
- };
1602
- return ActivityOutletComponent;
1603
- }());
1604
- if (false) {
1605
- /** @type {?} */
1606
- exports.ɵx.prototype.interactionContext;
1607
- /**
1608
- * @type {?}
1609
- * @private
1610
- */
1611
- exports.ɵx.prototype.activityComponent;
1612
- /**
1613
- * @type {?}
1614
- * @private
1615
- */
1616
- exports.ɵx.prototype.componentFactoryResolver;
1617
- /**
1618
- * @type {?}
1619
- * @private
1620
- */
1621
- exports.ɵx.prototype.viewContainerRef;
1622
- /**
1623
- * @type {?}
1624
- * @private
1625
- */
1626
- exports.ɵx.prototype.injector;
1627
- /* Skipping unhandled member: ;*/
1628
- }
1629
- (function (ActivityOutletComponent) {
1630
- /**
1631
- * @template D, R, E
1632
- */
1633
- var /**
1634
- * @template D, R, E
1635
- */
1636
- OutletInteractionContext = /** @class */ (function () {
1637
- function OutletInteractionContext(context) {
1638
- this.context = context;
1639
- }
1640
- /**
1641
- * @param {?} alert
1642
- * @return {?}
1643
- */
1644
- OutletInteractionContext.prototype.alert = /**
1645
- * @param {?} alert
1646
- * @return {?}
1647
- */
1648
- function (alert) {
1649
- return pectin.lang.notImplemented();
1650
- };
1651
- /**
1652
- * @param {?} confirm
1653
- * @return {?}
1654
- */
1655
- OutletInteractionContext.prototype.confirm = /**
1656
- * @param {?} confirm
1657
- * @return {?}
1658
- */
1659
- function (confirm) {
1660
- return pectin.lang.notImplemented();
1661
- };
1662
- /**
1663
- * @template D1, R1, E1
1664
- * @param {?} activityType
1665
- * @param {?=} data
1666
- * @return {?}
1667
- */
1668
- OutletInteractionContext.prototype.startActivity = /**
1669
- * @template D1, R1, E1
1670
- * @param {?} activityType
1671
- * @param {?=} data
1672
- * @return {?}
1673
- */
1674
- function (activityType, data) {
1675
- return pectin.lang.notImplemented();
1676
- };
1677
- return OutletInteractionContext;
1678
- }());
1679
- ActivityOutletComponent.OutletInteractionContext = OutletInteractionContext;
1680
- if (false) {
1681
- /**
1682
- * @type {?}
1683
- * @private
1684
- */
1685
- OutletInteractionContext.prototype.context;
1686
- }
1687
- })(exports.ɵx || (exports.ɵx = {}));
1688
-
1689
1701
  /**
1690
1702
  * @fileoverview added by tsickle
1691
1703
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -1835,7 +1847,7 @@
1835
1847
  exports.ɵq,
1836
1848
  ConfirmationDialogComponent,
1837
1849
  AlertDialogComponent,
1838
- exports.ɵx
1850
+ exports.ɵr
1839
1851
  ],
1840
1852
  entryComponents: [
1841
1853
  exports.ɵq,
@@ -4048,7 +4060,7 @@
4048
4060
  exports.AbstractActivity = AbstractActivity;
4049
4061
  exports.AbstractInputComponent = AbstractInputComponent;
4050
4062
  exports.ActivityContainerComponent = exports.ɵq;
4051
- exports.ActivityOutletComponent = exports.ɵx;
4063
+ exports.ActivityOutletComponent = exports.ɵr;
4052
4064
  exports.AlertDialogComponent = AlertDialogComponent;
4053
4065
  exports.AngularUiPowerupsModule = AngularUiPowerupsModule;
4054
4066
  exports.BusyOverlayComponent = BusyOverlayComponent;
@@ -4100,10 +4112,10 @@
4100
4112
  exports.ɵn = PlaceService;
4101
4113
  exports.ɵo = TabbedPlaceNavigationComponent;
4102
4114
  exports.ɵp = InteractionModule;
4103
- exports.ɵr = ConfirmationDialogComponent;
4104
- exports.ɵs = AbstractActivity;
4105
- exports.ɵt = ACTIVITY_DATA;
4106
- exports.ɵv = AlertDialogComponent;
4115
+ exports.ɵs = ConfirmationDialogComponent;
4116
+ exports.ɵt = AbstractActivity;
4117
+ exports.ɵu = ACTIVITY_DATA;
4118
+ exports.ɵw = AlertDialogComponent;
4107
4119
  exports.ɵy = DialogInteractionService;
4108
4120
  exports.ɵz = InteractionContext;
4109
4121