@coolon/angular-ui-powerups 1.7.0 → 1.9.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 +14 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +374 -235
- 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/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 +23 -6
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.metadata.json +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 +13 -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/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 +27 -6
- 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 +13 -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 +324 -209
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +371 -238
- 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/add-item-interaction-context/add-item-interaction-context.component.d.ts +17 -0
- package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +9 -1
- package/lib/interaction/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,21 +1,22 @@
|
|
|
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';
|
|
5
5
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
6
|
import { MatInputModule } from '@angular/material/input';
|
|
7
7
|
import { MatSelectModule } from '@angular/material/select';
|
|
8
|
-
import { MatTabsModule, MatTabGroup } from '@angular/material/tabs';
|
|
8
|
+
import { MatTabsModule, MatTabGroup, MAT_TABS_CONFIG } from '@angular/material/tabs';
|
|
9
9
|
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 { MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS, MatDialogModule } from '@angular/material/dialog';
|
|
16
16
|
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
17
|
import ___default, { isEqual, isNil } from 'lodash';
|
|
18
|
+
import ResizeObserver from 'resize-observer-polyfill';
|
|
19
|
+
import { assert as assert$1, lang as lang$1, Opts, Klass } from '@coolon/typescript-utilities';
|
|
19
20
|
import { FlexModule } from '@angular/flex-layout';
|
|
20
21
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
21
22
|
import { MatListModule } from '@angular/material/list';
|
|
@@ -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 mat-icon-button [pectinCommand]=\"cancelCommand\"><mat-icon>clear</mat-icon></button>\n<button *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\"><mat-icon>done</mat-icon></button>\n<button *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n",
|
|
1356
|
+
styles: [":host{display:flex;flex-direction:row;align-items:center;justify-content:flex-start}:host.align-end{justify-content:flex-end}"]
|
|
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);
|
|
@@ -1778,21 +1942,6 @@ var InteractionService = /** @class */ (function () {
|
|
|
1778
1942
|
// Todo: allow multiple inplace interactions..
|
|
1779
1943
|
interactionContext.initialise("ip" + ++inplaceMonitorCount, new InteractionService_1.ApiAdapter(this.placeRouter, this.inPlaceInteractionRegistry));
|
|
1780
1944
|
};
|
|
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
1945
|
/**
|
|
1797
1946
|
* Creates an interaction context that will prevent any other contexts from starting an
|
|
1798
1947
|
* activity until it is disposed. This is intended for use by the router for passing
|
|
@@ -1896,11 +2045,25 @@ var InteractionService = /** @class */ (function () {
|
|
|
1896
2045
|
|
|
1897
2046
|
var InPlaceInteractionContextComponent = /** @class */ (function (_super) {
|
|
1898
2047
|
__extends(InPlaceInteractionContextComponent, _super);
|
|
1899
|
-
function InPlaceInteractionContextComponent(interactionService) {
|
|
2048
|
+
function InPlaceInteractionContextComponent(interactionService, tabConfig) {
|
|
1900
2049
|
var _this = _super.call(this) || this;
|
|
1901
2050
|
_this.interactionService = interactionService;
|
|
2051
|
+
_this.tabConfig = tabConfig;
|
|
2052
|
+
/**
|
|
2053
|
+
* If true then the first startActivity call will slide the activity into view. If false
|
|
2054
|
+
* the activity will replace the existing content immediately.
|
|
2055
|
+
*/
|
|
2056
|
+
_this.animateFirstActivity = true;
|
|
1902
2057
|
return _this;
|
|
1903
2058
|
}
|
|
2059
|
+
Object.defineProperty(InPlaceInteractionContextComponent.prototype, "animationDuration", {
|
|
2060
|
+
get: function () {
|
|
2061
|
+
var _a;
|
|
2062
|
+
return this.animateFirstActivity ? (((_a = this.tabConfig) === null || _a === void 0 ? void 0 : _a.animationDuration) || '500ms') : "0ms";
|
|
2063
|
+
},
|
|
2064
|
+
enumerable: true,
|
|
2065
|
+
configurable: true
|
|
2066
|
+
});
|
|
1904
2067
|
InPlaceInteractionContextComponent.prototype.ngAfterViewInit = function () {
|
|
1905
2068
|
this.interactionService.registerInplaceInteractionContext(this);
|
|
1906
2069
|
};
|
|
@@ -1936,23 +2099,195 @@ var InPlaceInteractionContextComponent = /** @class */ (function (_super) {
|
|
|
1936
2099
|
return this.activityContainerComponent.startActivity(activityType, data);
|
|
1937
2100
|
};
|
|
1938
2101
|
InPlaceInteractionContextComponent.ctorParameters = function () { return [
|
|
1939
|
-
{ type: InteractionService }
|
|
2102
|
+
{ type: InteractionService },
|
|
2103
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_TABS_CONFIG,] }, { type: Optional }] }
|
|
1940
2104
|
]; };
|
|
1941
2105
|
__decorate([
|
|
1942
2106
|
ViewChild('activityContainer', { static: true }),
|
|
1943
2107
|
__metadata("design:type", ActivityContainerComponent)
|
|
1944
2108
|
], InPlaceInteractionContextComponent.prototype, "activityContainerComponent", void 0);
|
|
2109
|
+
__decorate([
|
|
2110
|
+
Input(),
|
|
2111
|
+
__metadata("design:type", Object)
|
|
2112
|
+
], InPlaceInteractionContextComponent.prototype, "animateFirstActivity", void 0);
|
|
1945
2113
|
InPlaceInteractionContextComponent = __decorate([
|
|
1946
2114
|
Component({
|
|
1947
2115
|
selector: 'aup-in-place-interaction-context',
|
|
1948
|
-
template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n",
|
|
2116
|
+
template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\" [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n",
|
|
1949
2117
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
1950
2118
|
}),
|
|
1951
|
-
|
|
2119
|
+
__param(1, Inject(MAT_TABS_CONFIG)), __param(1, Optional()),
|
|
2120
|
+
__metadata("design:paramtypes", [InteractionService, Object])
|
|
1952
2121
|
], InPlaceInteractionContextComponent);
|
|
1953
2122
|
return InPlaceInteractionContextComponent;
|
|
1954
2123
|
}(DisposableComponent));
|
|
1955
2124
|
|
|
2125
|
+
var DialogInteractionContext = /** @class */ (function (_super) {
|
|
2126
|
+
__extends(DialogInteractionContext, _super);
|
|
2127
|
+
function DialogInteractionContext(identifier, api, dialogService, config) {
|
|
2128
|
+
var _this = _super.call(this) || this;
|
|
2129
|
+
_this.identifier = identifier;
|
|
2130
|
+
_this.api = api;
|
|
2131
|
+
_this.dialogService = dialogService;
|
|
2132
|
+
_this.config = config;
|
|
2133
|
+
_this.garbage = new GarbageCollector();
|
|
2134
|
+
assert$1.notNil(dialogService);
|
|
2135
|
+
return _this;
|
|
2136
|
+
}
|
|
2137
|
+
DialogInteractionContext.prototype.cancelActiveActivity = function () {
|
|
2138
|
+
return this.activityContainer.cancelActiveActivity();
|
|
2139
|
+
};
|
|
2140
|
+
DialogInteractionContext.prototype.dispose = function () {
|
|
2141
|
+
if (this.isActive()) {
|
|
2142
|
+
lang.illegalState('Dispose called while active.');
|
|
2143
|
+
}
|
|
2144
|
+
this.garbage.dispose();
|
|
2145
|
+
};
|
|
2146
|
+
DialogInteractionContext.prototype.registerDisposable = function (disposable) {
|
|
2147
|
+
return this.garbage.registerDisposable(disposable);
|
|
2148
|
+
};
|
|
2149
|
+
DialogInteractionContext.prototype.isActive = function () {
|
|
2150
|
+
return !!this.activityContainer && this.activityContainer.isActive();
|
|
2151
|
+
};
|
|
2152
|
+
DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
2153
|
+
var _this = this;
|
|
2154
|
+
assert$1.isNil(this._currentActivityRef);
|
|
2155
|
+
var config = __assign(__assign({}, this.config), {
|
|
2156
|
+
disableClose: disableClose,
|
|
2157
|
+
panelClass: 'dialog-interaction-context'
|
|
2158
|
+
});
|
|
2159
|
+
var self = this;
|
|
2160
|
+
var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
|
|
2161
|
+
var activityContainer = this.activityContainer = matDialogRef.componentInstance;
|
|
2162
|
+
this.activityContainer.initialise(this.identifier, this.api);
|
|
2163
|
+
var activityResult = this.activityContainer.startActivity(activityType, data);
|
|
2164
|
+
activityResult.finally(function () { return matDialogRef.close(); });
|
|
2165
|
+
// we need to check if our onDone/onCancel methods above we called or if we were
|
|
2166
|
+
// closed by the user clicking the backdrop. If the later then we need to cancel our
|
|
2167
|
+
// activity.
|
|
2168
|
+
matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
|
|
2169
|
+
if (activityContainer.isActive()) {
|
|
2170
|
+
activityContainer.cancelActiveActivity();
|
|
2171
|
+
}
|
|
2172
|
+
_this.activityContainer = null;
|
|
2173
|
+
});
|
|
2174
|
+
matDialogRef.updateSize();
|
|
2175
|
+
matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
|
|
2176
|
+
matDialogRef.updateSize();
|
|
2177
|
+
});
|
|
2178
|
+
return activityResult;
|
|
2179
|
+
};
|
|
2180
|
+
return DialogInteractionContext;
|
|
2181
|
+
}(AbstractInteractionContext));
|
|
2182
|
+
|
|
2183
|
+
var DIALOG_INTERACTION_SERVICE_DEFAULTS = new InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
|
|
2184
|
+
var DialogInteractionContextFactory = /** @class */ (function (_super) {
|
|
2185
|
+
__extends(DialogInteractionContextFactory, _super);
|
|
2186
|
+
function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
|
|
2187
|
+
var _this = _super.call(this) || this;
|
|
2188
|
+
_this.dialogService = dialogService;
|
|
2189
|
+
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
2190
|
+
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
2191
|
+
assert$1.notNil(dialogService);
|
|
2192
|
+
return _this;
|
|
2193
|
+
}
|
|
2194
|
+
DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
|
|
2195
|
+
var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
|
|
2196
|
+
return new DialogInteractionContext(identifier, api, this.dialogService, config);
|
|
2197
|
+
};
|
|
2198
|
+
DialogInteractionContextFactory.ctorParameters = function () { return [
|
|
2199
|
+
{ type: MatDialog },
|
|
2200
|
+
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
|
|
2201
|
+
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DIALOG_DEFAULT_OPTIONS,] }] }
|
|
2202
|
+
]; };
|
|
2203
|
+
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" });
|
|
2204
|
+
DialogInteractionContextFactory = __decorate([
|
|
2205
|
+
Injectable({
|
|
2206
|
+
providedIn: 'root'
|
|
2207
|
+
}),
|
|
2208
|
+
__param(1, Optional()), __param(1, Inject(DIALOG_INTERACTION_SERVICE_DEFAULTS)),
|
|
2209
|
+
__param(2, Optional()), __param(2, Inject(MAT_DIALOG_DEFAULT_OPTIONS)),
|
|
2210
|
+
__metadata("design:paramtypes", [MatDialog,
|
|
2211
|
+
MatDialogConfig,
|
|
2212
|
+
MatDialogConfig])
|
|
2213
|
+
], DialogInteractionContextFactory);
|
|
2214
|
+
return DialogInteractionContextFactory;
|
|
2215
|
+
}(ModalInteractionContextFactory));
|
|
2216
|
+
|
|
2217
|
+
/**
|
|
2218
|
+
* @file Automatically generated by barrelsby.
|
|
2219
|
+
*/
|
|
2220
|
+
|
|
2221
|
+
var AddItemInteractionContextComponent = /** @class */ (function (_super) {
|
|
2222
|
+
__extends(AddItemInteractionContextComponent, _super);
|
|
2223
|
+
function AddItemInteractionContextComponent() {
|
|
2224
|
+
var _this = _super.call(this) || this;
|
|
2225
|
+
_this.tabindex = 0;
|
|
2226
|
+
_this.clickCommand = Command.create(function (context) {
|
|
2227
|
+
if (_this.activityClass) {
|
|
2228
|
+
_this.startActivity(_this.activityClass, _this.activityData).catch(function (e) {
|
|
2229
|
+
// don't care.
|
|
2230
|
+
});
|
|
2231
|
+
}
|
|
2232
|
+
else {
|
|
2233
|
+
_this.addCommand.withContext(context).execute();
|
|
2234
|
+
}
|
|
2235
|
+
});
|
|
2236
|
+
return _this;
|
|
2237
|
+
}
|
|
2238
|
+
Object.defineProperty(AddItemInteractionContextComponent.prototype, "active", {
|
|
2239
|
+
get: function () {
|
|
2240
|
+
return this.interactionContext ? this.interactionContext.isActive() : false;
|
|
2241
|
+
},
|
|
2242
|
+
enumerable: true,
|
|
2243
|
+
configurable: true
|
|
2244
|
+
});
|
|
2245
|
+
AddItemInteractionContextComponent.prototype.startActivity = function (activityType, data) {
|
|
2246
|
+
return this.interactionContext.startActivity(activityType, data);
|
|
2247
|
+
};
|
|
2248
|
+
AddItemInteractionContextComponent.prototype.ngOnInit = function () {
|
|
2249
|
+
};
|
|
2250
|
+
__decorate([
|
|
2251
|
+
Input(),
|
|
2252
|
+
__metadata("design:type", String)
|
|
2253
|
+
], AddItemInteractionContextComponent.prototype, "label", void 0);
|
|
2254
|
+
__decorate([
|
|
2255
|
+
Input(),
|
|
2256
|
+
__metadata("design:type", Object)
|
|
2257
|
+
], AddItemInteractionContextComponent.prototype, "activityClass", void 0);
|
|
2258
|
+
__decorate([
|
|
2259
|
+
Input(),
|
|
2260
|
+
__metadata("design:type", Object)
|
|
2261
|
+
], AddItemInteractionContextComponent.prototype, "activityData", void 0);
|
|
2262
|
+
__decorate([
|
|
2263
|
+
Input(),
|
|
2264
|
+
TrackExternal(),
|
|
2265
|
+
__metadata("design:type", Command)
|
|
2266
|
+
], AddItemInteractionContextComponent.prototype, "addCommand", void 0);
|
|
2267
|
+
__decorate([
|
|
2268
|
+
ViewChild(InPlaceInteractionContextComponent),
|
|
2269
|
+
__metadata("design:type", InPlaceInteractionContextComponent)
|
|
2270
|
+
], AddItemInteractionContextComponent.prototype, "interactionContext", void 0);
|
|
2271
|
+
__decorate([
|
|
2272
|
+
HostBinding('class.interaction-active'),
|
|
2273
|
+
__metadata("design:type", Boolean),
|
|
2274
|
+
__metadata("design:paramtypes", [])
|
|
2275
|
+
], AddItemInteractionContextComponent.prototype, "active", null);
|
|
2276
|
+
__decorate([
|
|
2277
|
+
HostBinding('tabindex'),
|
|
2278
|
+
__metadata("design:type", Object)
|
|
2279
|
+
], AddItemInteractionContextComponent.prototype, "tabindex", void 0);
|
|
2280
|
+
AddItemInteractionContextComponent = __decorate([
|
|
2281
|
+
Component({
|
|
2282
|
+
selector: 'aup-add-item-interaction-context',
|
|
2283
|
+
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",
|
|
2284
|
+
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}"]
|
|
2285
|
+
}),
|
|
2286
|
+
__metadata("design:paramtypes", [])
|
|
2287
|
+
], AddItemInteractionContextComponent);
|
|
2288
|
+
return AddItemInteractionContextComponent;
|
|
2289
|
+
}(DisposableComponent));
|
|
2290
|
+
|
|
1956
2291
|
var InteractionModule = /** @class */ (function () {
|
|
1957
2292
|
function InteractionModule() {
|
|
1958
2293
|
}
|
|
@@ -1964,7 +2299,9 @@ var InteractionModule = /** @class */ (function () {
|
|
|
1964
2299
|
MatDialogModule,
|
|
1965
2300
|
MatTabsModule,
|
|
1966
2301
|
PortalModule,
|
|
1967
|
-
RouterModule
|
|
2302
|
+
RouterModule,
|
|
2303
|
+
MatIconModule,
|
|
2304
|
+
DirectivesModule
|
|
1968
2305
|
],
|
|
1969
2306
|
declarations: [
|
|
1970
2307
|
ActivityContainerComponent,
|
|
@@ -1972,12 +2309,16 @@ var InteractionModule = /** @class */ (function () {
|
|
|
1972
2309
|
ConfirmThenDialogComponent,
|
|
1973
2310
|
AlertDialogComponent,
|
|
1974
2311
|
ActivityOutletComponent,
|
|
1975
|
-
InPlaceInteractionContextComponent
|
|
2312
|
+
InPlaceInteractionContextComponent,
|
|
2313
|
+
AddItemInteractionContextComponent,
|
|
2314
|
+
ActivityActionsComponent
|
|
1976
2315
|
],
|
|
1977
2316
|
exports: [
|
|
1978
2317
|
ActivityContainerComponent,
|
|
1979
2318
|
ActivityOutletComponent,
|
|
1980
|
-
InPlaceInteractionContextComponent
|
|
2319
|
+
InPlaceInteractionContextComponent,
|
|
2320
|
+
AddItemInteractionContextComponent,
|
|
2321
|
+
ActivityActionsComponent
|
|
1981
2322
|
],
|
|
1982
2323
|
entryComponents: [
|
|
1983
2324
|
ActivityContainerComponent,
|
|
@@ -4358,214 +4699,6 @@ var slideRightOnEnterAnimation = trigger('slideRightOnEnter', [
|
|
|
4358
4699
|
* @file Automatically generated by barrelsby.
|
|
4359
4700
|
*/
|
|
4360
4701
|
|
|
4361
|
-
var Dimension = /** @class */ (function () {
|
|
4362
|
-
function Dimension(width, height) {
|
|
4363
|
-
this.width = width;
|
|
4364
|
-
this.height = height;
|
|
4365
|
-
}
|
|
4366
|
-
return Dimension;
|
|
4367
|
-
}());
|
|
4368
|
-
|
|
4369
|
-
var Point = /** @class */ (function () {
|
|
4370
|
-
function Point(x, y) {
|
|
4371
|
-
this.x = x;
|
|
4372
|
-
this.y = y;
|
|
4373
|
-
}
|
|
4374
|
-
Point.from = function (data) {
|
|
4375
|
-
return new Point(data.x, data.y);
|
|
4376
|
-
};
|
|
4377
|
-
Point.prototype.translate = function (x, y) {
|
|
4378
|
-
return new Point(this.x + x, this.y + y);
|
|
4379
|
-
};
|
|
4380
|
-
return Point;
|
|
4381
|
-
}());
|
|
4382
|
-
|
|
4383
|
-
var Bounds = /** @class */ (function (_super) {
|
|
4384
|
-
__extends(Bounds, _super);
|
|
4385
|
-
function Bounds(top, left, width, height) {
|
|
4386
|
-
var _this = _super.call(this, width, height) || this;
|
|
4387
|
-
_this.top = top;
|
|
4388
|
-
_this.left = left;
|
|
4389
|
-
_this.width = width;
|
|
4390
|
-
_this.height = height;
|
|
4391
|
-
return _this;
|
|
4392
|
-
}
|
|
4393
|
-
Bounds.prototype.relativePositionOf = function (point) {
|
|
4394
|
-
if (point instanceof MouseEvent) {
|
|
4395
|
-
return new Point(point.clientX - this.left, point.clientY - this.top);
|
|
4396
|
-
}
|
|
4397
|
-
else {
|
|
4398
|
-
return new Point(point.x - this.left, point.y - this.top);
|
|
4399
|
-
}
|
|
4400
|
-
};
|
|
4401
|
-
return Bounds;
|
|
4402
|
-
}(Dimension));
|
|
4403
|
-
(function (Bounds) {
|
|
4404
|
-
function ofElement(element) {
|
|
4405
|
-
var rect = element.getBoundingClientRect();
|
|
4406
|
-
return new Bounds(rect.top, rect.left, rect.width, rect.height);
|
|
4407
|
-
}
|
|
4408
|
-
Bounds.ofElement = ofElement;
|
|
4409
|
-
})(Bounds || (Bounds = {}));
|
|
4410
|
-
|
|
4411
|
-
var ResizeAwareComponent = /** @class */ (function (_super) {
|
|
4412
|
-
__extends(ResizeAwareComponent, _super);
|
|
4413
|
-
function ResizeAwareComponent(elementRef, ngZone) {
|
|
4414
|
-
var _this = _super.call(this) || this;
|
|
4415
|
-
_this.elementRef = elementRef;
|
|
4416
|
-
_this.ngZone = ngZone;
|
|
4417
|
-
_this._boundsModel = new MutableValueModel(new Bounds(0, 0, 0, 0));
|
|
4418
|
-
return _this;
|
|
4419
|
-
}
|
|
4420
|
-
ResizeAwareComponent.prototype.ngAfterViewInit = function () {
|
|
4421
|
-
var _this = this;
|
|
4422
|
-
this.updateBounds();
|
|
4423
|
-
var element = this.elementRef.nativeElement;
|
|
4424
|
-
var ro = new ResizeObserver(function (entries, observer) {
|
|
4425
|
-
_this.ngZone.run(function () { return _this.updateBounds(); });
|
|
4426
|
-
});
|
|
4427
|
-
ro.observe(element);
|
|
4428
|
-
this.onDispose(function () { return ro.disconnect(); });
|
|
4429
|
-
};
|
|
4430
|
-
Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
|
|
4431
|
-
get: function () {
|
|
4432
|
-
return this._boundsModel.readonly;
|
|
4433
|
-
},
|
|
4434
|
-
enumerable: true,
|
|
4435
|
-
configurable: true
|
|
4436
|
-
});
|
|
4437
|
-
Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
|
|
4438
|
-
get: function () {
|
|
4439
|
-
return this.elementRef.nativeElement;
|
|
4440
|
-
},
|
|
4441
|
-
enumerable: true,
|
|
4442
|
-
configurable: true
|
|
4443
|
-
});
|
|
4444
|
-
// TODO: Make this handle body scroll
|
|
4445
|
-
ResizeAwareComponent.prototype.relativePositionOf = function (point) {
|
|
4446
|
-
return this.bounds.relativePositionOf(point);
|
|
4447
|
-
};
|
|
4448
|
-
Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
|
|
4449
|
-
get: function () {
|
|
4450
|
-
return this._boundsModel.value;
|
|
4451
|
-
},
|
|
4452
|
-
enumerable: true,
|
|
4453
|
-
configurable: true
|
|
4454
|
-
});
|
|
4455
|
-
ResizeAwareComponent.prototype.updateBounds = function () {
|
|
4456
|
-
this._boundsModel.value = Bounds.ofElement(this.nativeElement);
|
|
4457
|
-
};
|
|
4458
|
-
ResizeAwareComponent.ctorParameters = function () { return [
|
|
4459
|
-
{ type: ElementRef },
|
|
4460
|
-
{ type: NgZone }
|
|
4461
|
-
]; };
|
|
4462
|
-
ResizeAwareComponent = __decorate([
|
|
4463
|
-
Directive(),
|
|
4464
|
-
__metadata("design:paramtypes", [ElementRef, NgZone])
|
|
4465
|
-
], ResizeAwareComponent);
|
|
4466
|
-
return ResizeAwareComponent;
|
|
4467
|
-
}(DisposableComponent));
|
|
4468
|
-
|
|
4469
|
-
/**
|
|
4470
|
-
* @file Automatically generated by barrelsby.
|
|
4471
|
-
*/
|
|
4472
|
-
|
|
4473
|
-
/**
|
|
4474
|
-
* @file Automatically generated by barrelsby.
|
|
4475
|
-
*/
|
|
4476
|
-
|
|
4477
|
-
var DialogInteractionContext = /** @class */ (function (_super) {
|
|
4478
|
-
__extends(DialogInteractionContext, _super);
|
|
4479
|
-
function DialogInteractionContext(identifier, api, dialogService, config) {
|
|
4480
|
-
var _this = _super.call(this) || this;
|
|
4481
|
-
_this.identifier = identifier;
|
|
4482
|
-
_this.api = api;
|
|
4483
|
-
_this.dialogService = dialogService;
|
|
4484
|
-
_this.config = config;
|
|
4485
|
-
_this.garbage = new GarbageCollector();
|
|
4486
|
-
assert$1.notNil(dialogService);
|
|
4487
|
-
return _this;
|
|
4488
|
-
}
|
|
4489
|
-
DialogInteractionContext.prototype.cancelActiveActivity = function () {
|
|
4490
|
-
return this.activityContainer.cancelActiveActivity();
|
|
4491
|
-
};
|
|
4492
|
-
DialogInteractionContext.prototype.dispose = function () {
|
|
4493
|
-
if (this.isActive()) {
|
|
4494
|
-
lang.illegalState('Dispose called while active.');
|
|
4495
|
-
}
|
|
4496
|
-
this.garbage.dispose();
|
|
4497
|
-
};
|
|
4498
|
-
DialogInteractionContext.prototype.registerDisposable = function (disposable) {
|
|
4499
|
-
return this.garbage.registerDisposable(disposable);
|
|
4500
|
-
};
|
|
4501
|
-
DialogInteractionContext.prototype.isActive = function () {
|
|
4502
|
-
return !!this.activityContainer && this.activityContainer.isActive();
|
|
4503
|
-
};
|
|
4504
|
-
DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
4505
|
-
var _this = this;
|
|
4506
|
-
assert$1.isNil(this._currentActivityRef);
|
|
4507
|
-
var config = __assign(__assign({}, this.config), {
|
|
4508
|
-
disableClose: disableClose,
|
|
4509
|
-
panelClass: 'dialog-interaction-context'
|
|
4510
|
-
});
|
|
4511
|
-
var self = this;
|
|
4512
|
-
var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
|
|
4513
|
-
var activityContainer = this.activityContainer = matDialogRef.componentInstance;
|
|
4514
|
-
this.activityContainer.initialise(this.identifier, this.api);
|
|
4515
|
-
var activityResult = this.activityContainer.startActivity(activityType, data);
|
|
4516
|
-
activityResult.finally(function () { return matDialogRef.close(); });
|
|
4517
|
-
// we need to check if our onDone/onCancel methods above we called or if we were
|
|
4518
|
-
// closed by the user clicking the backdrop. If the later then we need to cancel our
|
|
4519
|
-
// activity.
|
|
4520
|
-
matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
|
|
4521
|
-
if (activityContainer.isActive()) {
|
|
4522
|
-
activityContainer.cancelActiveActivity();
|
|
4523
|
-
}
|
|
4524
|
-
_this.activityContainer = null;
|
|
4525
|
-
});
|
|
4526
|
-
matDialogRef.updateSize();
|
|
4527
|
-
matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
|
|
4528
|
-
matDialogRef.updateSize();
|
|
4529
|
-
});
|
|
4530
|
-
return activityResult;
|
|
4531
|
-
};
|
|
4532
|
-
return DialogInteractionContext;
|
|
4533
|
-
}(AbstractInteractionContext));
|
|
4534
|
-
|
|
4535
|
-
var DIALOG_INTERACTION_SERVICE_DEFAULTS = new InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
|
|
4536
|
-
var DialogInteractionContextFactory = /** @class */ (function (_super) {
|
|
4537
|
-
__extends(DialogInteractionContextFactory, _super);
|
|
4538
|
-
function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
|
|
4539
|
-
var _this = _super.call(this) || this;
|
|
4540
|
-
_this.dialogService = dialogService;
|
|
4541
|
-
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
4542
|
-
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
4543
|
-
assert$1.notNil(dialogService);
|
|
4544
|
-
return _this;
|
|
4545
|
-
}
|
|
4546
|
-
DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
|
|
4547
|
-
var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
|
|
4548
|
-
return new DialogInteractionContext(identifier, api, this.dialogService, config);
|
|
4549
|
-
};
|
|
4550
|
-
DialogInteractionContextFactory.ctorParameters = function () { return [
|
|
4551
|
-
{ type: MatDialog },
|
|
4552
|
-
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
|
|
4553
|
-
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DIALOG_DEFAULT_OPTIONS,] }] }
|
|
4554
|
-
]; };
|
|
4555
|
-
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" });
|
|
4556
|
-
DialogInteractionContextFactory = __decorate([
|
|
4557
|
-
Injectable({
|
|
4558
|
-
providedIn: 'root'
|
|
4559
|
-
}),
|
|
4560
|
-
__param(1, Optional()), __param(1, Inject(DIALOG_INTERACTION_SERVICE_DEFAULTS)),
|
|
4561
|
-
__param(2, Optional()), __param(2, Inject(MAT_DIALOG_DEFAULT_OPTIONS)),
|
|
4562
|
-
__metadata("design:paramtypes", [MatDialog,
|
|
4563
|
-
MatDialogConfig,
|
|
4564
|
-
MatDialogConfig])
|
|
4565
|
-
], DialogInteractionContextFactory);
|
|
4566
|
-
return DialogInteractionContextFactory;
|
|
4567
|
-
}(ModalInteractionContextFactory));
|
|
4568
|
-
|
|
4569
4702
|
/**
|
|
4570
4703
|
* @file Automatically generated by barrelsby.
|
|
4571
4704
|
*/
|
|
@@ -4977,5 +5110,5 @@ function VisitParameterList(options) {
|
|
|
4977
5110
|
* Generated bundle index. Do not edit.
|
|
4978
5111
|
*/
|
|
4979
5112
|
|
|
4980
|
-
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 };
|
|
5113
|
+
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 };
|
|
4981
5114
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|