@coolon/angular-ui-powerups 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +375 -240
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +4 -0
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +4 -0
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.js +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +51 -0
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +22 -9
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js +69 -0
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js.map +1 -0
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/index.js +2 -0
- package/esm2015/lib/interaction/index.js.map +1 -1
- package/esm2015/lib/interaction/index.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.js +16 -3
- package/esm2015/lib/interaction/interaction.module.js.map +1 -1
- package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/interaction/services/interaction.service.js +0 -15
- package/esm2015/lib/interaction/services/interaction.service.js.map +1 -1
- package/esm5/coolon-angular-ui-powerups.js +4 -0
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js +58 -0
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -0
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.ngfactory.js.map +1 -0
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +23 -9
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm5/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js +76 -0
- package/esm5/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js.map +1 -0
- package/esm5/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.ngfactory.js.map +1 -0
- package/esm5/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
- package/esm5/lib/interaction/index.js +2 -0
- package/esm5/lib/interaction/index.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.js +16 -3
- package/esm5/lib/interaction/interaction.module.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/interaction/services/interaction.service.js +0 -15
- package/esm5/lib/interaction/services/interaction.service.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +328 -214
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +372 -243
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +12 -0
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -1
- package/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.d.ts +17 -0
- package/lib/interaction/index.d.ts +2 -0
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __extends, __decorate, __metadata, __param, __awaiter, __generator,
|
|
1
|
+
import { __extends, __decorate, __metadata, __param, __awaiter, __generator, __assign, __spread } from 'tslib';
|
|
2
2
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
3
3
|
import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, Self, HostBinding, Component, EventEmitter, Output, ContentChild, TemplateRef, ChangeDetectorRef, ContentChildren, QueryList, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, Optional, SkipSelf } from '@angular/core';
|
|
4
4
|
import { FormsModule } from '@angular/forms';
|
|
@@ -10,13 +10,14 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
|
10
10
|
import { MatButtonModule } from '@angular/material/button';
|
|
11
11
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
12
12
|
import { MatIconModule } from '@angular/material/icon';
|
|
13
|
-
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, Command, FocusManager, DelegatingFormValueModel, TrackExternal, ListModel, StoreInListModel, ValueModel, StoreInValueModel, Deferred, Trace, MutableListModel,
|
|
13
|
+
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, Command, FocusManager, DelegatingFormValueModel, TrackExternal, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MutableValueModel, Deferred, Trace, MutableListModel, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
|
|
14
14
|
import { PortalModule } from '@angular/cdk/portal';
|
|
15
|
-
import {
|
|
15
|
+
import { FlexModule, GridModule } from '@angular/flex-layout';
|
|
16
|
+
import { MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS, MatDialogModule } from '@angular/material/dialog';
|
|
16
17
|
import { RouterModule, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterOutlet } from '@angular/router';
|
|
17
|
-
import { assert as assert$1, lang as lang$1, Opts, Klass } from '@coolon/typescript-utilities';
|
|
18
18
|
import ___default, { isEqual, isNil } from 'lodash';
|
|
19
|
-
import
|
|
19
|
+
import ResizeObserver from 'resize-observer-polyfill';
|
|
20
|
+
import { assert as assert$1, lang as lang$1, Opts, Klass } from '@coolon/typescript-utilities';
|
|
20
21
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
21
22
|
import { MatListModule } from '@angular/material/list';
|
|
22
23
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
@@ -24,7 +25,6 @@ import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
|
24
25
|
import { Memoize as Memoize$1 } from '@typescript-plus/fast-memoize-decorator';
|
|
25
26
|
import 'reflect-metadata';
|
|
26
27
|
import { style, query, group, animate, trigger, transition } from '@angular/animations';
|
|
27
|
-
import ResizeObserver from 'resize-observer-polyfill';
|
|
28
28
|
import { Observable } from 'rxjs';
|
|
29
29
|
|
|
30
30
|
var CommandDirective = /** @class */ (function (_super) {
|
|
@@ -830,7 +830,7 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
830
830
|
TextInputComponent = __decorate([
|
|
831
831
|
Component({
|
|
832
832
|
selector: 'aup-text-input',
|
|
833
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
833
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
834
834
|
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
835
835
|
}),
|
|
836
836
|
__metadata("design:paramtypes", [])
|
|
@@ -1195,6 +1195,170 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
1195
1195
|
return ComponentsModule;
|
|
1196
1196
|
}());
|
|
1197
1197
|
|
|
1198
|
+
var Dimension = /** @class */ (function () {
|
|
1199
|
+
function Dimension(width, height) {
|
|
1200
|
+
this.width = width;
|
|
1201
|
+
this.height = height;
|
|
1202
|
+
}
|
|
1203
|
+
return Dimension;
|
|
1204
|
+
}());
|
|
1205
|
+
|
|
1206
|
+
var Point = /** @class */ (function () {
|
|
1207
|
+
function Point(x, y) {
|
|
1208
|
+
this.x = x;
|
|
1209
|
+
this.y = y;
|
|
1210
|
+
}
|
|
1211
|
+
Point.from = function (data) {
|
|
1212
|
+
return new Point(data.x, data.y);
|
|
1213
|
+
};
|
|
1214
|
+
Point.prototype.translate = function (x, y) {
|
|
1215
|
+
return new Point(this.x + x, this.y + y);
|
|
1216
|
+
};
|
|
1217
|
+
return Point;
|
|
1218
|
+
}());
|
|
1219
|
+
|
|
1220
|
+
var Bounds = /** @class */ (function (_super) {
|
|
1221
|
+
__extends(Bounds, _super);
|
|
1222
|
+
function Bounds(top, left, width, height) {
|
|
1223
|
+
var _this = _super.call(this, width, height) || this;
|
|
1224
|
+
_this.top = top;
|
|
1225
|
+
_this.left = left;
|
|
1226
|
+
_this.width = width;
|
|
1227
|
+
_this.height = height;
|
|
1228
|
+
return _this;
|
|
1229
|
+
}
|
|
1230
|
+
Bounds.prototype.relativePositionOf = function (point) {
|
|
1231
|
+
if (point instanceof MouseEvent) {
|
|
1232
|
+
return new Point(point.clientX - this.left, point.clientY - this.top);
|
|
1233
|
+
}
|
|
1234
|
+
else {
|
|
1235
|
+
return new Point(point.x - this.left, point.y - this.top);
|
|
1236
|
+
}
|
|
1237
|
+
};
|
|
1238
|
+
return Bounds;
|
|
1239
|
+
}(Dimension));
|
|
1240
|
+
(function (Bounds) {
|
|
1241
|
+
function ofElement(element) {
|
|
1242
|
+
var rect = element.getBoundingClientRect();
|
|
1243
|
+
return new Bounds(rect.top, rect.left, rect.width, rect.height);
|
|
1244
|
+
}
|
|
1245
|
+
Bounds.ofElement = ofElement;
|
|
1246
|
+
})(Bounds || (Bounds = {}));
|
|
1247
|
+
|
|
1248
|
+
var ResizeAwareComponent = /** @class */ (function (_super) {
|
|
1249
|
+
__extends(ResizeAwareComponent, _super);
|
|
1250
|
+
function ResizeAwareComponent(elementRef, ngZone) {
|
|
1251
|
+
var _this = _super.call(this) || this;
|
|
1252
|
+
_this.elementRef = elementRef;
|
|
1253
|
+
_this.ngZone = ngZone;
|
|
1254
|
+
_this._boundsModel = new MutableValueModel(new Bounds(0, 0, 0, 0));
|
|
1255
|
+
return _this;
|
|
1256
|
+
}
|
|
1257
|
+
ResizeAwareComponent.prototype.ngAfterViewInit = function () {
|
|
1258
|
+
var _this = this;
|
|
1259
|
+
this.updateBounds();
|
|
1260
|
+
var element = this.elementRef.nativeElement;
|
|
1261
|
+
var ro = new ResizeObserver(function (entries, observer) {
|
|
1262
|
+
_this.ngZone.run(function () { return _this.updateBounds(); });
|
|
1263
|
+
});
|
|
1264
|
+
ro.observe(element);
|
|
1265
|
+
this.onDispose(function () { return ro.disconnect(); });
|
|
1266
|
+
};
|
|
1267
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
|
|
1268
|
+
get: function () {
|
|
1269
|
+
return this._boundsModel.readonly;
|
|
1270
|
+
},
|
|
1271
|
+
enumerable: true,
|
|
1272
|
+
configurable: true
|
|
1273
|
+
});
|
|
1274
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
|
|
1275
|
+
get: function () {
|
|
1276
|
+
return this.elementRef.nativeElement;
|
|
1277
|
+
},
|
|
1278
|
+
enumerable: true,
|
|
1279
|
+
configurable: true
|
|
1280
|
+
});
|
|
1281
|
+
// TODO: Make this handle body scroll
|
|
1282
|
+
ResizeAwareComponent.prototype.relativePositionOf = function (point) {
|
|
1283
|
+
return this.bounds.relativePositionOf(point);
|
|
1284
|
+
};
|
|
1285
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
|
|
1286
|
+
get: function () {
|
|
1287
|
+
return this._boundsModel.value;
|
|
1288
|
+
},
|
|
1289
|
+
enumerable: true,
|
|
1290
|
+
configurable: true
|
|
1291
|
+
});
|
|
1292
|
+
ResizeAwareComponent.prototype.updateBounds = function () {
|
|
1293
|
+
this._boundsModel.value = Bounds.ofElement(this.nativeElement);
|
|
1294
|
+
};
|
|
1295
|
+
ResizeAwareComponent.ctorParameters = function () { return [
|
|
1296
|
+
{ type: ElementRef },
|
|
1297
|
+
{ type: NgZone }
|
|
1298
|
+
]; };
|
|
1299
|
+
ResizeAwareComponent = __decorate([
|
|
1300
|
+
Directive(),
|
|
1301
|
+
__metadata("design:paramtypes", [ElementRef, NgZone])
|
|
1302
|
+
], ResizeAwareComponent);
|
|
1303
|
+
return ResizeAwareComponent;
|
|
1304
|
+
}(DisposableComponent));
|
|
1305
|
+
|
|
1306
|
+
/**
|
|
1307
|
+
* @file Automatically generated by barrelsby.
|
|
1308
|
+
*/
|
|
1309
|
+
|
|
1310
|
+
var ActivityActionsComponent = /** @class */ (function (_super) {
|
|
1311
|
+
__extends(ActivityActionsComponent, _super);
|
|
1312
|
+
function ActivityActionsComponent() {
|
|
1313
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1314
|
+
_this.align = 'start';
|
|
1315
|
+
return _this;
|
|
1316
|
+
}
|
|
1317
|
+
Object.defineProperty(ActivityActionsComponent.prototype, "alignEnd", {
|
|
1318
|
+
get: function () {
|
|
1319
|
+
return this.align === 'end';
|
|
1320
|
+
},
|
|
1321
|
+
enumerable: true,
|
|
1322
|
+
configurable: true
|
|
1323
|
+
});
|
|
1324
|
+
ActivityActionsComponent.prototype.ngOnInit = function () {
|
|
1325
|
+
};
|
|
1326
|
+
ActivityActionsComponent.prototype.hasConfirmText = function () {
|
|
1327
|
+
return !___default.isEmpty(this.confirmText);
|
|
1328
|
+
};
|
|
1329
|
+
__decorate([
|
|
1330
|
+
Input(),
|
|
1331
|
+
TrackExternal(),
|
|
1332
|
+
__metadata("design:type", Command)
|
|
1333
|
+
], ActivityActionsComponent.prototype, "confirmCommand", void 0);
|
|
1334
|
+
__decorate([
|
|
1335
|
+
Input(),
|
|
1336
|
+
__metadata("design:type", String)
|
|
1337
|
+
], ActivityActionsComponent.prototype, "confirmText", void 0);
|
|
1338
|
+
__decorate([
|
|
1339
|
+
Input(),
|
|
1340
|
+
TrackExternal(),
|
|
1341
|
+
__metadata("design:type", Command)
|
|
1342
|
+
], ActivityActionsComponent.prototype, "cancelCommand", void 0);
|
|
1343
|
+
__decorate([
|
|
1344
|
+
Input(),
|
|
1345
|
+
__metadata("design:type", String)
|
|
1346
|
+
], ActivityActionsComponent.prototype, "align", void 0);
|
|
1347
|
+
__decorate([
|
|
1348
|
+
HostBinding('class.align-end'),
|
|
1349
|
+
__metadata("design:type", Boolean),
|
|
1350
|
+
__metadata("design:paramtypes", [])
|
|
1351
|
+
], ActivityActionsComponent.prototype, "alignEnd", null);
|
|
1352
|
+
ActivityActionsComponent = __decorate([
|
|
1353
|
+
Component({
|
|
1354
|
+
selector: 'aup-activity-actions',
|
|
1355
|
+
template: "<button class=\"cancel\" mat-icon-button [pectinCommand]=\"cancelCommand\">\n <mat-icon>clear</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\">\n <mat-icon>done</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n",
|
|
1356
|
+
styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}"]
|
|
1357
|
+
})
|
|
1358
|
+
], ActivityActionsComponent);
|
|
1359
|
+
return ActivityActionsComponent;
|
|
1360
|
+
}(DisposableComponent));
|
|
1361
|
+
|
|
1198
1362
|
var ACTIVITY_DATA = new InjectionToken('InteractionActivityData');
|
|
1199
1363
|
var Activity = /** @class */ (function (_super) {
|
|
1200
1364
|
__extends(Activity, _super);
|
|
@@ -1514,6 +1678,8 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1514
1678
|
ActivityContainerComponent.prototype.ngAfterViewInit = function () {
|
|
1515
1679
|
var _this = this;
|
|
1516
1680
|
var _a = Dsl.disposeWith(this), chain = _a.chain, observe = _a.observe;
|
|
1681
|
+
// using the component directly rather than (animationDone)=.. allows us
|
|
1682
|
+
// to keep our callback private.
|
|
1517
1683
|
observe.valuesFrom(this.tabs.animationDone).subscribe(function () { return _this.onAnimationFinished(); });
|
|
1518
1684
|
};
|
|
1519
1685
|
ActivityContainerComponent.prototype.initialise = function (identifier, api) {
|
|
@@ -1620,6 +1786,12 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1620
1786
|
ActivityContainerComponent.prototype.finishAndStartCleanup = function () {
|
|
1621
1787
|
var _this = this;
|
|
1622
1788
|
if (!this._deferredCleanUp) {
|
|
1789
|
+
// Important:
|
|
1790
|
+
// Clear our tabs so the next activity triggers a tab change.
|
|
1791
|
+
// Without this our animation done wasn't called when a single
|
|
1792
|
+
// new activity followed a single tab activity (since we're tracking
|
|
1793
|
+
// by activity index)
|
|
1794
|
+
this.activityTabs = [];
|
|
1623
1795
|
var promise = this.interactionServiceApi.notifyFinished(this);
|
|
1624
1796
|
this._deferredCleanUp = promise
|
|
1625
1797
|
.finally(function () {
|
|
@@ -1631,26 +1803,32 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1631
1803
|
ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
|
|
1632
1804
|
var cleanedTabs = this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
1633
1805
|
this.activityTabs = cleanedTabs.concat(activityRef);
|
|
1634
|
-
this.
|
|
1806
|
+
this.synchroniseSelectedTabIndex();
|
|
1635
1807
|
};
|
|
1636
1808
|
ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
|
|
1637
1809
|
return index;
|
|
1638
1810
|
};
|
|
1639
1811
|
;
|
|
1640
|
-
// @Trace()
|
|
1641
1812
|
ActivityContainerComponent.prototype.onAnimationFinished = function () {
|
|
1642
|
-
this.
|
|
1643
|
-
|
|
1813
|
+
if (this.onAnimationFinishedJob) {
|
|
1814
|
+
this.onAnimationFinishedJob();
|
|
1815
|
+
this.onAnimationFinishedJob = undefined;
|
|
1816
|
+
}
|
|
1644
1817
|
};
|
|
1645
1818
|
/**
|
|
1646
|
-
* Synchronises the selected tab index.
|
|
1819
|
+
* Synchronises the selected tab index.
|
|
1647
1820
|
*/
|
|
1648
|
-
// @Trace()
|
|
1649
1821
|
ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = function () {
|
|
1822
|
+
var _this = this;
|
|
1650
1823
|
var previousIndex = this.tabs.selectedIndex;
|
|
1651
1824
|
var newIndex = this.getActiveActivityCount() - 1;
|
|
1652
|
-
|
|
1653
|
-
|
|
1825
|
+
if (previousIndex !== newIndex) {
|
|
1826
|
+
this.tabs.selectedIndex = newIndex;
|
|
1827
|
+
this.onAnimationFinishedJob = function () {
|
|
1828
|
+
_this.getSelectedOutlet().component.onActivityReady();
|
|
1829
|
+
_this.activityTabs = _this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
1830
|
+
};
|
|
1831
|
+
}
|
|
1654
1832
|
};
|
|
1655
1833
|
ActivityContainerComponent.prototype.getSelectedOutlet = function () {
|
|
1656
1834
|
return this.activityOutlets.toArray()[this.tabs.selectedIndex];
|
|
@@ -1687,7 +1865,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1687
1865
|
ActivityContainerComponent = __decorate([
|
|
1688
1866
|
Component({
|
|
1689
1867
|
selector: 'aup-activity-container',
|
|
1690
|
-
template: "<mat-tab-group #tabs no-tab-header
|
|
1868
|
+
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs; trackBy: activityIndex\" >\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
|
|
1691
1869
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
1692
1870
|
}),
|
|
1693
1871
|
__metadata("design:paramtypes", [])
|
|
@@ -1778,21 +1956,6 @@ var InteractionService = /** @class */ (function () {
|
|
|
1778
1956
|
// Todo: allow multiple inplace interactions..
|
|
1779
1957
|
interactionContext.initialise("ip" + ++inplaceMonitorCount, new InteractionService_1.ApiAdapter(this.placeRouter, this.inPlaceInteractionRegistry));
|
|
1780
1958
|
};
|
|
1781
|
-
// private assertModalCanStart() {
|
|
1782
|
-
// assert.isFalsey(this.inExclusiveInteraction.value);
|
|
1783
|
-
// assert.isFalsey(this.modalActive.value);
|
|
1784
|
-
// }
|
|
1785
|
-
//
|
|
1786
|
-
// private assertInPlaceCanStart() {
|
|
1787
|
-
// assert.isFalsey(this.inExclusiveInteraction.value);
|
|
1788
|
-
// assert.isFalsey(this.modalActive.value);
|
|
1789
|
-
// assert.isFalsey(this._activeInlineContext.value);
|
|
1790
|
-
// }
|
|
1791
|
-
// // @Trace()
|
|
1792
|
-
// getActiveContext(): InteractionContext {
|
|
1793
|
-
// assert.isTruthy(this.isActive());
|
|
1794
|
-
// return this._activeContext.value;
|
|
1795
|
-
// }
|
|
1796
1959
|
/**
|
|
1797
1960
|
* Creates an interaction context that will prevent any other contexts from starting an
|
|
1798
1961
|
* activity until it is disposed. This is intended for use by the router for passing
|
|
@@ -1973,6 +2136,172 @@ var InPlaceInteractionContextComponent = /** @class */ (function (_super) {
|
|
|
1973
2136
|
return InPlaceInteractionContextComponent;
|
|
1974
2137
|
}(DisposableComponent));
|
|
1975
2138
|
|
|
2139
|
+
var DialogInteractionContext = /** @class */ (function (_super) {
|
|
2140
|
+
__extends(DialogInteractionContext, _super);
|
|
2141
|
+
function DialogInteractionContext(identifier, api, dialogService, config) {
|
|
2142
|
+
var _this = _super.call(this) || this;
|
|
2143
|
+
_this.identifier = identifier;
|
|
2144
|
+
_this.api = api;
|
|
2145
|
+
_this.dialogService = dialogService;
|
|
2146
|
+
_this.config = config;
|
|
2147
|
+
_this.garbage = new GarbageCollector();
|
|
2148
|
+
assert$1.notNil(dialogService);
|
|
2149
|
+
return _this;
|
|
2150
|
+
}
|
|
2151
|
+
DialogInteractionContext.prototype.cancelActiveActivity = function () {
|
|
2152
|
+
return this.activityContainer.cancelActiveActivity();
|
|
2153
|
+
};
|
|
2154
|
+
DialogInteractionContext.prototype.dispose = function () {
|
|
2155
|
+
if (this.isActive()) {
|
|
2156
|
+
lang.illegalState('Dispose called while active.');
|
|
2157
|
+
}
|
|
2158
|
+
this.garbage.dispose();
|
|
2159
|
+
};
|
|
2160
|
+
DialogInteractionContext.prototype.registerDisposable = function (disposable) {
|
|
2161
|
+
return this.garbage.registerDisposable(disposable);
|
|
2162
|
+
};
|
|
2163
|
+
DialogInteractionContext.prototype.isActive = function () {
|
|
2164
|
+
return !!this.activityContainer && this.activityContainer.isActive();
|
|
2165
|
+
};
|
|
2166
|
+
DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
2167
|
+
var _this = this;
|
|
2168
|
+
assert$1.isNil(this._currentActivityRef);
|
|
2169
|
+
var config = __assign(__assign({}, this.config), {
|
|
2170
|
+
disableClose: disableClose,
|
|
2171
|
+
panelClass: 'dialog-interaction-context'
|
|
2172
|
+
});
|
|
2173
|
+
var self = this;
|
|
2174
|
+
var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
|
|
2175
|
+
var activityContainer = this.activityContainer = matDialogRef.componentInstance;
|
|
2176
|
+
this.activityContainer.initialise(this.identifier, this.api);
|
|
2177
|
+
var activityResult = this.activityContainer.startActivity(activityType, data);
|
|
2178
|
+
activityResult.finally(function () { return matDialogRef.close(); });
|
|
2179
|
+
// we need to check if our onDone/onCancel methods above we called or if we were
|
|
2180
|
+
// closed by the user clicking the backdrop. If the later then we need to cancel our
|
|
2181
|
+
// activity.
|
|
2182
|
+
matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
|
|
2183
|
+
if (activityContainer.isActive()) {
|
|
2184
|
+
activityContainer.cancelActiveActivity();
|
|
2185
|
+
}
|
|
2186
|
+
_this.activityContainer = null;
|
|
2187
|
+
});
|
|
2188
|
+
matDialogRef.updateSize();
|
|
2189
|
+
matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
|
|
2190
|
+
matDialogRef.updateSize();
|
|
2191
|
+
});
|
|
2192
|
+
return activityResult;
|
|
2193
|
+
};
|
|
2194
|
+
return DialogInteractionContext;
|
|
2195
|
+
}(AbstractInteractionContext));
|
|
2196
|
+
|
|
2197
|
+
var DIALOG_INTERACTION_SERVICE_DEFAULTS = new InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
|
|
2198
|
+
var DialogInteractionContextFactory = /** @class */ (function (_super) {
|
|
2199
|
+
__extends(DialogInteractionContextFactory, _super);
|
|
2200
|
+
function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
|
|
2201
|
+
var _this = _super.call(this) || this;
|
|
2202
|
+
_this.dialogService = dialogService;
|
|
2203
|
+
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
2204
|
+
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
2205
|
+
assert$1.notNil(dialogService);
|
|
2206
|
+
return _this;
|
|
2207
|
+
}
|
|
2208
|
+
DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
|
|
2209
|
+
var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
|
|
2210
|
+
return new DialogInteractionContext(identifier, api, this.dialogService, config);
|
|
2211
|
+
};
|
|
2212
|
+
DialogInteractionContextFactory.ctorParameters = function () { return [
|
|
2213
|
+
{ type: MatDialog },
|
|
2214
|
+
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
|
|
2215
|
+
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DIALOG_DEFAULT_OPTIONS,] }] }
|
|
2216
|
+
]; };
|
|
2217
|
+
DialogInteractionContextFactory.ɵprov = ɵɵdefineInjectable({ factory: function DialogInteractionContextFactory_Factory() { return new DialogInteractionContextFactory(ɵɵinject(MatDialog), ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), ɵɵinject(MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionContextFactory, providedIn: "root" });
|
|
2218
|
+
DialogInteractionContextFactory = __decorate([
|
|
2219
|
+
Injectable({
|
|
2220
|
+
providedIn: 'root'
|
|
2221
|
+
}),
|
|
2222
|
+
__param(1, Optional()), __param(1, Inject(DIALOG_INTERACTION_SERVICE_DEFAULTS)),
|
|
2223
|
+
__param(2, Optional()), __param(2, Inject(MAT_DIALOG_DEFAULT_OPTIONS)),
|
|
2224
|
+
__metadata("design:paramtypes", [MatDialog,
|
|
2225
|
+
MatDialogConfig,
|
|
2226
|
+
MatDialogConfig])
|
|
2227
|
+
], DialogInteractionContextFactory);
|
|
2228
|
+
return DialogInteractionContextFactory;
|
|
2229
|
+
}(ModalInteractionContextFactory));
|
|
2230
|
+
|
|
2231
|
+
/**
|
|
2232
|
+
* @file Automatically generated by barrelsby.
|
|
2233
|
+
*/
|
|
2234
|
+
|
|
2235
|
+
var AddItemInteractionContextComponent = /** @class */ (function (_super) {
|
|
2236
|
+
__extends(AddItemInteractionContextComponent, _super);
|
|
2237
|
+
function AddItemInteractionContextComponent() {
|
|
2238
|
+
var _this = _super.call(this) || this;
|
|
2239
|
+
_this.tabindex = 0;
|
|
2240
|
+
_this.clickCommand = Command.create(function (context) {
|
|
2241
|
+
if (_this.activityClass) {
|
|
2242
|
+
_this.startActivity(_this.activityClass, _this.activityData).catch(function (e) {
|
|
2243
|
+
// don't care.
|
|
2244
|
+
});
|
|
2245
|
+
}
|
|
2246
|
+
else {
|
|
2247
|
+
_this.addCommand.withContext(context).execute();
|
|
2248
|
+
}
|
|
2249
|
+
});
|
|
2250
|
+
return _this;
|
|
2251
|
+
}
|
|
2252
|
+
Object.defineProperty(AddItemInteractionContextComponent.prototype, "active", {
|
|
2253
|
+
get: function () {
|
|
2254
|
+
return this.interactionContext ? this.interactionContext.isActive() : false;
|
|
2255
|
+
},
|
|
2256
|
+
enumerable: true,
|
|
2257
|
+
configurable: true
|
|
2258
|
+
});
|
|
2259
|
+
AddItemInteractionContextComponent.prototype.startActivity = function (activityType, data) {
|
|
2260
|
+
return this.interactionContext.startActivity(activityType, data);
|
|
2261
|
+
};
|
|
2262
|
+
AddItemInteractionContextComponent.prototype.ngOnInit = function () {
|
|
2263
|
+
};
|
|
2264
|
+
__decorate([
|
|
2265
|
+
Input(),
|
|
2266
|
+
__metadata("design:type", String)
|
|
2267
|
+
], AddItemInteractionContextComponent.prototype, "label", void 0);
|
|
2268
|
+
__decorate([
|
|
2269
|
+
Input(),
|
|
2270
|
+
__metadata("design:type", Object)
|
|
2271
|
+
], AddItemInteractionContextComponent.prototype, "activityClass", void 0);
|
|
2272
|
+
__decorate([
|
|
2273
|
+
Input(),
|
|
2274
|
+
__metadata("design:type", Object)
|
|
2275
|
+
], AddItemInteractionContextComponent.prototype, "activityData", void 0);
|
|
2276
|
+
__decorate([
|
|
2277
|
+
Input(),
|
|
2278
|
+
TrackExternal(),
|
|
2279
|
+
__metadata("design:type", Command)
|
|
2280
|
+
], AddItemInteractionContextComponent.prototype, "addCommand", void 0);
|
|
2281
|
+
__decorate([
|
|
2282
|
+
ViewChild(InPlaceInteractionContextComponent),
|
|
2283
|
+
__metadata("design:type", InPlaceInteractionContextComponent)
|
|
2284
|
+
], AddItemInteractionContextComponent.prototype, "interactionContext", void 0);
|
|
2285
|
+
__decorate([
|
|
2286
|
+
HostBinding('class.interaction-active'),
|
|
2287
|
+
__metadata("design:type", Boolean),
|
|
2288
|
+
__metadata("design:paramtypes", [])
|
|
2289
|
+
], AddItemInteractionContextComponent.prototype, "active", null);
|
|
2290
|
+
__decorate([
|
|
2291
|
+
HostBinding('tabindex'),
|
|
2292
|
+
__metadata("design:type", Object)
|
|
2293
|
+
], AddItemInteractionContextComponent.prototype, "tabindex", void 0);
|
|
2294
|
+
AddItemInteractionContextComponent = __decorate([
|
|
2295
|
+
Component({
|
|
2296
|
+
selector: 'aup-add-item-interaction-context',
|
|
2297
|
+
template: "<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\">\n <a part=\"link\" class=\"link\" [pectinCommand]=\"clickCommand\"><mat-icon>add</mat-icon> {{label}}</a>\n</aup-in-place-interaction-context>\n",
|
|
2298
|
+
styles: [":host{--def-link-color:var(--link-color, currentColor);--def-link-backgound:var(--link-background, rgba(0, 0, 0, 0.05));--def-link-border-radius:var(--link-border-radius, 4px);--def-link-padding:var(--link-padding, calc(var(--aup-default-padding) / 2));display:flex;flex-direction:column;border-radius:var(--def-link-border-radius);box-sizing:border-box;outline:0}:host:hover{--link-background:rgba(0,0,0,0.1)}aup-in-place-interaction-context{border-radius:var(--def-link-border-radius)}a.link{display:flex;flex-direction:row;align-items:center;border-radius:var(--def-link-border-radius);color:var(--def-link-color);background:var(--def-link-backgound);padding:var(--def-link-padding);cursor:pointer;text-decoration:none}a.link mat-icon{margin-right:8px}"]
|
|
2299
|
+
}),
|
|
2300
|
+
__metadata("design:paramtypes", [])
|
|
2301
|
+
], AddItemInteractionContextComponent);
|
|
2302
|
+
return AddItemInteractionContextComponent;
|
|
2303
|
+
}(DisposableComponent));
|
|
2304
|
+
|
|
1976
2305
|
var InteractionModule = /** @class */ (function () {
|
|
1977
2306
|
function InteractionModule() {
|
|
1978
2307
|
}
|
|
@@ -1984,7 +2313,11 @@ var InteractionModule = /** @class */ (function () {
|
|
|
1984
2313
|
MatDialogModule,
|
|
1985
2314
|
MatTabsModule,
|
|
1986
2315
|
PortalModule,
|
|
1987
|
-
RouterModule
|
|
2316
|
+
RouterModule,
|
|
2317
|
+
MatIconModule,
|
|
2318
|
+
DirectivesModule,
|
|
2319
|
+
FlexModule,
|
|
2320
|
+
GridModule
|
|
1988
2321
|
],
|
|
1989
2322
|
declarations: [
|
|
1990
2323
|
ActivityContainerComponent,
|
|
@@ -1992,12 +2325,16 @@ var InteractionModule = /** @class */ (function () {
|
|
|
1992
2325
|
ConfirmThenDialogComponent,
|
|
1993
2326
|
AlertDialogComponent,
|
|
1994
2327
|
ActivityOutletComponent,
|
|
1995
|
-
InPlaceInteractionContextComponent
|
|
2328
|
+
InPlaceInteractionContextComponent,
|
|
2329
|
+
AddItemInteractionContextComponent,
|
|
2330
|
+
ActivityActionsComponent
|
|
1996
2331
|
],
|
|
1997
2332
|
exports: [
|
|
1998
2333
|
ActivityContainerComponent,
|
|
1999
2334
|
ActivityOutletComponent,
|
|
2000
|
-
InPlaceInteractionContextComponent
|
|
2335
|
+
InPlaceInteractionContextComponent,
|
|
2336
|
+
AddItemInteractionContextComponent,
|
|
2337
|
+
ActivityActionsComponent
|
|
2001
2338
|
],
|
|
2002
2339
|
entryComponents: [
|
|
2003
2340
|
ActivityContainerComponent,
|
|
@@ -4378,214 +4715,6 @@ var slideRightOnEnterAnimation = trigger('slideRightOnEnter', [
|
|
|
4378
4715
|
* @file Automatically generated by barrelsby.
|
|
4379
4716
|
*/
|
|
4380
4717
|
|
|
4381
|
-
var Dimension = /** @class */ (function () {
|
|
4382
|
-
function Dimension(width, height) {
|
|
4383
|
-
this.width = width;
|
|
4384
|
-
this.height = height;
|
|
4385
|
-
}
|
|
4386
|
-
return Dimension;
|
|
4387
|
-
}());
|
|
4388
|
-
|
|
4389
|
-
var Point = /** @class */ (function () {
|
|
4390
|
-
function Point(x, y) {
|
|
4391
|
-
this.x = x;
|
|
4392
|
-
this.y = y;
|
|
4393
|
-
}
|
|
4394
|
-
Point.from = function (data) {
|
|
4395
|
-
return new Point(data.x, data.y);
|
|
4396
|
-
};
|
|
4397
|
-
Point.prototype.translate = function (x, y) {
|
|
4398
|
-
return new Point(this.x + x, this.y + y);
|
|
4399
|
-
};
|
|
4400
|
-
return Point;
|
|
4401
|
-
}());
|
|
4402
|
-
|
|
4403
|
-
var Bounds = /** @class */ (function (_super) {
|
|
4404
|
-
__extends(Bounds, _super);
|
|
4405
|
-
function Bounds(top, left, width, height) {
|
|
4406
|
-
var _this = _super.call(this, width, height) || this;
|
|
4407
|
-
_this.top = top;
|
|
4408
|
-
_this.left = left;
|
|
4409
|
-
_this.width = width;
|
|
4410
|
-
_this.height = height;
|
|
4411
|
-
return _this;
|
|
4412
|
-
}
|
|
4413
|
-
Bounds.prototype.relativePositionOf = function (point) {
|
|
4414
|
-
if (point instanceof MouseEvent) {
|
|
4415
|
-
return new Point(point.clientX - this.left, point.clientY - this.top);
|
|
4416
|
-
}
|
|
4417
|
-
else {
|
|
4418
|
-
return new Point(point.x - this.left, point.y - this.top);
|
|
4419
|
-
}
|
|
4420
|
-
};
|
|
4421
|
-
return Bounds;
|
|
4422
|
-
}(Dimension));
|
|
4423
|
-
(function (Bounds) {
|
|
4424
|
-
function ofElement(element) {
|
|
4425
|
-
var rect = element.getBoundingClientRect();
|
|
4426
|
-
return new Bounds(rect.top, rect.left, rect.width, rect.height);
|
|
4427
|
-
}
|
|
4428
|
-
Bounds.ofElement = ofElement;
|
|
4429
|
-
})(Bounds || (Bounds = {}));
|
|
4430
|
-
|
|
4431
|
-
var ResizeAwareComponent = /** @class */ (function (_super) {
|
|
4432
|
-
__extends(ResizeAwareComponent, _super);
|
|
4433
|
-
function ResizeAwareComponent(elementRef, ngZone) {
|
|
4434
|
-
var _this = _super.call(this) || this;
|
|
4435
|
-
_this.elementRef = elementRef;
|
|
4436
|
-
_this.ngZone = ngZone;
|
|
4437
|
-
_this._boundsModel = new MutableValueModel(new Bounds(0, 0, 0, 0));
|
|
4438
|
-
return _this;
|
|
4439
|
-
}
|
|
4440
|
-
ResizeAwareComponent.prototype.ngAfterViewInit = function () {
|
|
4441
|
-
var _this = this;
|
|
4442
|
-
this.updateBounds();
|
|
4443
|
-
var element = this.elementRef.nativeElement;
|
|
4444
|
-
var ro = new ResizeObserver(function (entries, observer) {
|
|
4445
|
-
_this.ngZone.run(function () { return _this.updateBounds(); });
|
|
4446
|
-
});
|
|
4447
|
-
ro.observe(element);
|
|
4448
|
-
this.onDispose(function () { return ro.disconnect(); });
|
|
4449
|
-
};
|
|
4450
|
-
Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
|
|
4451
|
-
get: function () {
|
|
4452
|
-
return this._boundsModel.readonly;
|
|
4453
|
-
},
|
|
4454
|
-
enumerable: true,
|
|
4455
|
-
configurable: true
|
|
4456
|
-
});
|
|
4457
|
-
Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
|
|
4458
|
-
get: function () {
|
|
4459
|
-
return this.elementRef.nativeElement;
|
|
4460
|
-
},
|
|
4461
|
-
enumerable: true,
|
|
4462
|
-
configurable: true
|
|
4463
|
-
});
|
|
4464
|
-
// TODO: Make this handle body scroll
|
|
4465
|
-
ResizeAwareComponent.prototype.relativePositionOf = function (point) {
|
|
4466
|
-
return this.bounds.relativePositionOf(point);
|
|
4467
|
-
};
|
|
4468
|
-
Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
|
|
4469
|
-
get: function () {
|
|
4470
|
-
return this._boundsModel.value;
|
|
4471
|
-
},
|
|
4472
|
-
enumerable: true,
|
|
4473
|
-
configurable: true
|
|
4474
|
-
});
|
|
4475
|
-
ResizeAwareComponent.prototype.updateBounds = function () {
|
|
4476
|
-
this._boundsModel.value = Bounds.ofElement(this.nativeElement);
|
|
4477
|
-
};
|
|
4478
|
-
ResizeAwareComponent.ctorParameters = function () { return [
|
|
4479
|
-
{ type: ElementRef },
|
|
4480
|
-
{ type: NgZone }
|
|
4481
|
-
]; };
|
|
4482
|
-
ResizeAwareComponent = __decorate([
|
|
4483
|
-
Directive(),
|
|
4484
|
-
__metadata("design:paramtypes", [ElementRef, NgZone])
|
|
4485
|
-
], ResizeAwareComponent);
|
|
4486
|
-
return ResizeAwareComponent;
|
|
4487
|
-
}(DisposableComponent));
|
|
4488
|
-
|
|
4489
|
-
/**
|
|
4490
|
-
* @file Automatically generated by barrelsby.
|
|
4491
|
-
*/
|
|
4492
|
-
|
|
4493
|
-
/**
|
|
4494
|
-
* @file Automatically generated by barrelsby.
|
|
4495
|
-
*/
|
|
4496
|
-
|
|
4497
|
-
var DialogInteractionContext = /** @class */ (function (_super) {
|
|
4498
|
-
__extends(DialogInteractionContext, _super);
|
|
4499
|
-
function DialogInteractionContext(identifier, api, dialogService, config) {
|
|
4500
|
-
var _this = _super.call(this) || this;
|
|
4501
|
-
_this.identifier = identifier;
|
|
4502
|
-
_this.api = api;
|
|
4503
|
-
_this.dialogService = dialogService;
|
|
4504
|
-
_this.config = config;
|
|
4505
|
-
_this.garbage = new GarbageCollector();
|
|
4506
|
-
assert$1.notNil(dialogService);
|
|
4507
|
-
return _this;
|
|
4508
|
-
}
|
|
4509
|
-
DialogInteractionContext.prototype.cancelActiveActivity = function () {
|
|
4510
|
-
return this.activityContainer.cancelActiveActivity();
|
|
4511
|
-
};
|
|
4512
|
-
DialogInteractionContext.prototype.dispose = function () {
|
|
4513
|
-
if (this.isActive()) {
|
|
4514
|
-
lang.illegalState('Dispose called while active.');
|
|
4515
|
-
}
|
|
4516
|
-
this.garbage.dispose();
|
|
4517
|
-
};
|
|
4518
|
-
DialogInteractionContext.prototype.registerDisposable = function (disposable) {
|
|
4519
|
-
return this.garbage.registerDisposable(disposable);
|
|
4520
|
-
};
|
|
4521
|
-
DialogInteractionContext.prototype.isActive = function () {
|
|
4522
|
-
return !!this.activityContainer && this.activityContainer.isActive();
|
|
4523
|
-
};
|
|
4524
|
-
DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
4525
|
-
var _this = this;
|
|
4526
|
-
assert$1.isNil(this._currentActivityRef);
|
|
4527
|
-
var config = __assign(__assign({}, this.config), {
|
|
4528
|
-
disableClose: disableClose,
|
|
4529
|
-
panelClass: 'dialog-interaction-context'
|
|
4530
|
-
});
|
|
4531
|
-
var self = this;
|
|
4532
|
-
var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
|
|
4533
|
-
var activityContainer = this.activityContainer = matDialogRef.componentInstance;
|
|
4534
|
-
this.activityContainer.initialise(this.identifier, this.api);
|
|
4535
|
-
var activityResult = this.activityContainer.startActivity(activityType, data);
|
|
4536
|
-
activityResult.finally(function () { return matDialogRef.close(); });
|
|
4537
|
-
// we need to check if our onDone/onCancel methods above we called or if we were
|
|
4538
|
-
// closed by the user clicking the backdrop. If the later then we need to cancel our
|
|
4539
|
-
// activity.
|
|
4540
|
-
matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
|
|
4541
|
-
if (activityContainer.isActive()) {
|
|
4542
|
-
activityContainer.cancelActiveActivity();
|
|
4543
|
-
}
|
|
4544
|
-
_this.activityContainer = null;
|
|
4545
|
-
});
|
|
4546
|
-
matDialogRef.updateSize();
|
|
4547
|
-
matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
|
|
4548
|
-
matDialogRef.updateSize();
|
|
4549
|
-
});
|
|
4550
|
-
return activityResult;
|
|
4551
|
-
};
|
|
4552
|
-
return DialogInteractionContext;
|
|
4553
|
-
}(AbstractInteractionContext));
|
|
4554
|
-
|
|
4555
|
-
var DIALOG_INTERACTION_SERVICE_DEFAULTS = new InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
|
|
4556
|
-
var DialogInteractionContextFactory = /** @class */ (function (_super) {
|
|
4557
|
-
__extends(DialogInteractionContextFactory, _super);
|
|
4558
|
-
function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
|
|
4559
|
-
var _this = _super.call(this) || this;
|
|
4560
|
-
_this.dialogService = dialogService;
|
|
4561
|
-
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
4562
|
-
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
4563
|
-
assert$1.notNil(dialogService);
|
|
4564
|
-
return _this;
|
|
4565
|
-
}
|
|
4566
|
-
DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
|
|
4567
|
-
var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
|
|
4568
|
-
return new DialogInteractionContext(identifier, api, this.dialogService, config);
|
|
4569
|
-
};
|
|
4570
|
-
DialogInteractionContextFactory.ctorParameters = function () { return [
|
|
4571
|
-
{ type: MatDialog },
|
|
4572
|
-
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
|
|
4573
|
-
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DIALOG_DEFAULT_OPTIONS,] }] }
|
|
4574
|
-
]; };
|
|
4575
|
-
DialogInteractionContextFactory.ɵprov = ɵɵdefineInjectable({ factory: function DialogInteractionContextFactory_Factory() { return new DialogInteractionContextFactory(ɵɵinject(MatDialog), ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), ɵɵinject(MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionContextFactory, providedIn: "root" });
|
|
4576
|
-
DialogInteractionContextFactory = __decorate([
|
|
4577
|
-
Injectable({
|
|
4578
|
-
providedIn: 'root'
|
|
4579
|
-
}),
|
|
4580
|
-
__param(1, Optional()), __param(1, Inject(DIALOG_INTERACTION_SERVICE_DEFAULTS)),
|
|
4581
|
-
__param(2, Optional()), __param(2, Inject(MAT_DIALOG_DEFAULT_OPTIONS)),
|
|
4582
|
-
__metadata("design:paramtypes", [MatDialog,
|
|
4583
|
-
MatDialogConfig,
|
|
4584
|
-
MatDialogConfig])
|
|
4585
|
-
], DialogInteractionContextFactory);
|
|
4586
|
-
return DialogInteractionContextFactory;
|
|
4587
|
-
}(ModalInteractionContextFactory));
|
|
4588
|
-
|
|
4589
4718
|
/**
|
|
4590
4719
|
* @file Automatically generated by barrelsby.
|
|
4591
4720
|
*/
|
|
@@ -4997,5 +5126,5 @@ function VisitParameterList(options) {
|
|
|
4997
5126
|
* Generated bundle index. Do not edit.
|
|
4998
5127
|
*/
|
|
4999
5128
|
|
|
5000
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputComponent, AbstractInteractionContext, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, Activity, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CardContainerComponent, CheckboxInputComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, InPlaceInteractionContextComponent, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ModalInteractionContextFactory, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SelectInputComponent, SidePlaceNavigationComponent, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, PlaceOutletComponent as ɵba, leftRightPlaceAnimation as ɵbb, LEFT_RIGHT_PLACE_ANIMATION as ɵbc, AUP_PLACE_CONFIG as ɵbd, PlaceRouter as ɵbf, InteractionService as ɵbg, ModalInteractionContextFactory as ɵbh, UrlService as ɵbi, PlaceHistory as ɵbj, TabbedPlaceNavigationComponent as ɵbk, AbstractPlaceNavigationComponent as ɵbl, ListPlaceNavComponent as ɵbm, SidePlaceNavigationComponent as ɵbn, InteractionModule as ɵbo, ActivityContainerComponent as ɵbp, AbstractInteractionContext as ɵbq, ActivityOutletComponent as ɵbr, ConfirmationDialogComponent as ɵbs, ACTIVITY_DATA as ɵbt, Activity as ɵbu, ConfirmThenDialogComponent as ɵbw, AlertDialogComponent as ɵbx, InPlaceInteractionContextComponent as ɵbz, FocusBindingDirective as ɵc, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, NumberInputComponent as ɵg, AbstractInputComponent as ɵh, StringInputComponent as ɵi, TextInputComponent as ɵj, PasswordInputComponent as ɵk, SelectInputComponent as ɵl, CheckboxInputComponent as ɵm, ScrollContainerComponent as ɵn, NoopComponent as ɵo, SwitchCaseOption as ɵp, SwitchCaseWhenDirective as ɵq, SwitchCaseDefaultDirective as ɵr, SwitchCaseComponent as ɵs, FocusContainerComponent as ɵt, VerticalFocusContainerComponent as ɵu, FocusableComponent as ɵv, CardContainerComponent as ɵw, PlaceModule as ɵx, EmptyStateComponent as ɵy, BusyOverlayComponent as ɵz };
|
|
5129
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputComponent, AbstractInteractionContext, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CardContainerComponent, CheckboxInputComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, InPlaceInteractionContextComponent, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ModalInteractionContextFactory, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SelectInputComponent, SidePlaceNavigationComponent, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, PlaceOutletComponent as ɵba, leftRightPlaceAnimation as ɵbb, LEFT_RIGHT_PLACE_ANIMATION as ɵbc, AUP_PLACE_CONFIG as ɵbd, PlaceRouter as ɵbf, InteractionService as ɵbg, ModalInteractionContextFactory as ɵbh, UrlService as ɵbi, PlaceHistory as ɵbj, TabbedPlaceNavigationComponent as ɵbk, AbstractPlaceNavigationComponent as ɵbl, ListPlaceNavComponent as ɵbm, SidePlaceNavigationComponent as ɵbn, InteractionModule as ɵbo, ActivityContainerComponent as ɵbp, AbstractInteractionContext as ɵbq, ActivityOutletComponent as ɵbr, ConfirmationDialogComponent as ɵbs, ACTIVITY_DATA as ɵbt, Activity as ɵbu, ConfirmThenDialogComponent as ɵbw, AlertDialogComponent as ɵbx, InPlaceInteractionContextComponent as ɵbz, FocusBindingDirective as ɵc, AddItemInteractionContextComponent as ɵca, DisposableComponent as ɵcb, InPlaceInteractionContextComponent as ɵcc, ActivityActionsComponent as ɵcd, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, NumberInputComponent as ɵg, AbstractInputComponent as ɵh, StringInputComponent as ɵi, TextInputComponent as ɵj, PasswordInputComponent as ɵk, SelectInputComponent as ɵl, CheckboxInputComponent as ɵm, ScrollContainerComponent as ɵn, NoopComponent as ɵo, SwitchCaseOption as ɵp, SwitchCaseWhenDirective as ɵq, SwitchCaseDefaultDirective as ɵr, SwitchCaseComponent as ɵs, FocusContainerComponent as ɵt, VerticalFocusContainerComponent as ɵu, FocusableComponent as ɵv, CardContainerComponent as ɵw, PlaceModule as ɵx, EmptyStateComponent as ɵy, BusyOverlayComponent as ɵz };
|
|
5001
5130
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|