@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,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/icon'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@angular/material/dialog'), require('@angular/router'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/material/button', '@angular/material/checkbox', '@angular/material/icon', '@coolon/pectin', '@angular/cdk/portal', '@angular/material/dialog', '@angular/router', '@coolon/typescript-utilities', '
|
|
4
|
-
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.material.button, global.ng.material.checkbox, global.ng.material.icon, global.pectin, global.ng.cdk.portal, global.ng.material.dialog, global.ng.router, global.
|
|
5
|
-
}(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, button, checkbox, icon, pectin, portal, dialog, router,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/icon'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@angular/material/dialog'), require('@angular/router'), require('lodash'), require('resize-observer-polyfill'), require('@coolon/typescript-utilities'), require('@angular/flex-layout'), require('@angular/material/progress-spinner'), require('@angular/material/list'), require('@angular/material/tooltip'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('@typescript-plus/fast-memoize-decorator'), require('reflect-metadata'), require('@angular/animations'), require('rxjs')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/material/button', '@angular/material/checkbox', '@angular/material/icon', '@coolon/pectin', '@angular/cdk/portal', '@angular/material/dialog', '@angular/router', 'lodash', 'resize-observer-polyfill', '@coolon/typescript-utilities', '@angular/flex-layout', '@angular/material/progress-spinner', '@angular/material/list', '@angular/material/tooltip', '@typescript-plus/fast-memoize-decorator/dist/src', '@typescript-plus/fast-memoize-decorator', 'reflect-metadata', '@angular/animations', 'rxjs'], factory) :
|
|
4
|
+
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.material.button, global.ng.material.checkbox, global.ng.material.icon, global.pectin, global.ng.cdk.portal, global.ng.material.dialog, global.ng.router, global.___default, global.ResizeObserver, global.typescriptUtilities, global.ng.flexLayout, global.ng.material.progressSpinner, global.ng.material.list, global.ng.material.tooltip, global.src, global.fastMemoizeDecorator, null, global.ng.animations, global.rxjs));
|
|
5
|
+
}(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, button, checkbox, icon, pectin, portal, dialog, router, ___default, ResizeObserver, typescriptUtilities, flexLayout, progressSpinner, list, tooltip, src, fastMemoizeDecorator, reflectMetadata, animations$1, rxjs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var ___default__default = 'default' in ___default ? ___default['default'] : ___default;
|
|
8
8
|
ResizeObserver = ResizeObserver && Object.prototype.hasOwnProperty.call(ResizeObserver, 'default') ? ResizeObserver['default'] : ResizeObserver;
|
|
@@ -1007,7 +1007,7 @@
|
|
|
1007
1007
|
TextInputComponent = __decorate([
|
|
1008
1008
|
core.Component({
|
|
1009
1009
|
selector: 'aup-text-input',
|
|
1010
|
-
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",
|
|
1010
|
+
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",
|
|
1011
1011
|
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}"]
|
|
1012
1012
|
}),
|
|
1013
1013
|
__metadata("design:paramtypes", [])
|
|
@@ -1372,6 +1372,170 @@
|
|
|
1372
1372
|
return ComponentsModule;
|
|
1373
1373
|
}());
|
|
1374
1374
|
|
|
1375
|
+
var Dimension = /** @class */ (function () {
|
|
1376
|
+
function Dimension(width, height) {
|
|
1377
|
+
this.width = width;
|
|
1378
|
+
this.height = height;
|
|
1379
|
+
}
|
|
1380
|
+
return Dimension;
|
|
1381
|
+
}());
|
|
1382
|
+
|
|
1383
|
+
var Point = /** @class */ (function () {
|
|
1384
|
+
function Point(x, y) {
|
|
1385
|
+
this.x = x;
|
|
1386
|
+
this.y = y;
|
|
1387
|
+
}
|
|
1388
|
+
Point.from = function (data) {
|
|
1389
|
+
return new Point(data.x, data.y);
|
|
1390
|
+
};
|
|
1391
|
+
Point.prototype.translate = function (x, y) {
|
|
1392
|
+
return new Point(this.x + x, this.y + y);
|
|
1393
|
+
};
|
|
1394
|
+
return Point;
|
|
1395
|
+
}());
|
|
1396
|
+
|
|
1397
|
+
exports.Bounds = /** @class */ (function (_super) {
|
|
1398
|
+
__extends(Bounds, _super);
|
|
1399
|
+
function Bounds(top, left, width, height) {
|
|
1400
|
+
var _this = _super.call(this, width, height) || this;
|
|
1401
|
+
_this.top = top;
|
|
1402
|
+
_this.left = left;
|
|
1403
|
+
_this.width = width;
|
|
1404
|
+
_this.height = height;
|
|
1405
|
+
return _this;
|
|
1406
|
+
}
|
|
1407
|
+
Bounds.prototype.relativePositionOf = function (point) {
|
|
1408
|
+
if (point instanceof MouseEvent) {
|
|
1409
|
+
return new Point(point.clientX - this.left, point.clientY - this.top);
|
|
1410
|
+
}
|
|
1411
|
+
else {
|
|
1412
|
+
return new Point(point.x - this.left, point.y - this.top);
|
|
1413
|
+
}
|
|
1414
|
+
};
|
|
1415
|
+
return Bounds;
|
|
1416
|
+
}(Dimension));
|
|
1417
|
+
(function (Bounds) {
|
|
1418
|
+
function ofElement(element) {
|
|
1419
|
+
var rect = element.getBoundingClientRect();
|
|
1420
|
+
return new Bounds(rect.top, rect.left, rect.width, rect.height);
|
|
1421
|
+
}
|
|
1422
|
+
Bounds.ofElement = ofElement;
|
|
1423
|
+
})(exports.Bounds || (exports.Bounds = {}));
|
|
1424
|
+
|
|
1425
|
+
var ResizeAwareComponent = /** @class */ (function (_super) {
|
|
1426
|
+
__extends(ResizeAwareComponent, _super);
|
|
1427
|
+
function ResizeAwareComponent(elementRef, ngZone) {
|
|
1428
|
+
var _this = _super.call(this) || this;
|
|
1429
|
+
_this.elementRef = elementRef;
|
|
1430
|
+
_this.ngZone = ngZone;
|
|
1431
|
+
_this._boundsModel = new pectin.MutableValueModel(new exports.Bounds(0, 0, 0, 0));
|
|
1432
|
+
return _this;
|
|
1433
|
+
}
|
|
1434
|
+
ResizeAwareComponent.prototype.ngAfterViewInit = function () {
|
|
1435
|
+
var _this = this;
|
|
1436
|
+
this.updateBounds();
|
|
1437
|
+
var element = this.elementRef.nativeElement;
|
|
1438
|
+
var ro = new ResizeObserver(function (entries, observer) {
|
|
1439
|
+
_this.ngZone.run(function () { return _this.updateBounds(); });
|
|
1440
|
+
});
|
|
1441
|
+
ro.observe(element);
|
|
1442
|
+
this.onDispose(function () { return ro.disconnect(); });
|
|
1443
|
+
};
|
|
1444
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
|
|
1445
|
+
get: function () {
|
|
1446
|
+
return this._boundsModel.readonly;
|
|
1447
|
+
},
|
|
1448
|
+
enumerable: true,
|
|
1449
|
+
configurable: true
|
|
1450
|
+
});
|
|
1451
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
|
|
1452
|
+
get: function () {
|
|
1453
|
+
return this.elementRef.nativeElement;
|
|
1454
|
+
},
|
|
1455
|
+
enumerable: true,
|
|
1456
|
+
configurable: true
|
|
1457
|
+
});
|
|
1458
|
+
// TODO: Make this handle body scroll
|
|
1459
|
+
ResizeAwareComponent.prototype.relativePositionOf = function (point) {
|
|
1460
|
+
return this.bounds.relativePositionOf(point);
|
|
1461
|
+
};
|
|
1462
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
|
|
1463
|
+
get: function () {
|
|
1464
|
+
return this._boundsModel.value;
|
|
1465
|
+
},
|
|
1466
|
+
enumerable: true,
|
|
1467
|
+
configurable: true
|
|
1468
|
+
});
|
|
1469
|
+
ResizeAwareComponent.prototype.updateBounds = function () {
|
|
1470
|
+
this._boundsModel.value = exports.Bounds.ofElement(this.nativeElement);
|
|
1471
|
+
};
|
|
1472
|
+
ResizeAwareComponent.ctorParameters = function () { return [
|
|
1473
|
+
{ type: core.ElementRef },
|
|
1474
|
+
{ type: core.NgZone }
|
|
1475
|
+
]; };
|
|
1476
|
+
ResizeAwareComponent = __decorate([
|
|
1477
|
+
core.Directive(),
|
|
1478
|
+
__metadata("design:paramtypes", [core.ElementRef, core.NgZone])
|
|
1479
|
+
], ResizeAwareComponent);
|
|
1480
|
+
return ResizeAwareComponent;
|
|
1481
|
+
}(DisposableComponent));
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* @file Automatically generated by barrelsby.
|
|
1485
|
+
*/
|
|
1486
|
+
|
|
1487
|
+
var ActivityActionsComponent = /** @class */ (function (_super) {
|
|
1488
|
+
__extends(ActivityActionsComponent, _super);
|
|
1489
|
+
function ActivityActionsComponent() {
|
|
1490
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1491
|
+
_this.align = 'start';
|
|
1492
|
+
return _this;
|
|
1493
|
+
}
|
|
1494
|
+
Object.defineProperty(ActivityActionsComponent.prototype, "alignEnd", {
|
|
1495
|
+
get: function () {
|
|
1496
|
+
return this.align === 'end';
|
|
1497
|
+
},
|
|
1498
|
+
enumerable: true,
|
|
1499
|
+
configurable: true
|
|
1500
|
+
});
|
|
1501
|
+
ActivityActionsComponent.prototype.ngOnInit = function () {
|
|
1502
|
+
};
|
|
1503
|
+
ActivityActionsComponent.prototype.hasConfirmText = function () {
|
|
1504
|
+
return !___default__default.isEmpty(this.confirmText);
|
|
1505
|
+
};
|
|
1506
|
+
__decorate([
|
|
1507
|
+
core.Input(),
|
|
1508
|
+
pectin.TrackExternal(),
|
|
1509
|
+
__metadata("design:type", pectin.Command)
|
|
1510
|
+
], ActivityActionsComponent.prototype, "confirmCommand", void 0);
|
|
1511
|
+
__decorate([
|
|
1512
|
+
core.Input(),
|
|
1513
|
+
__metadata("design:type", String)
|
|
1514
|
+
], ActivityActionsComponent.prototype, "confirmText", void 0);
|
|
1515
|
+
__decorate([
|
|
1516
|
+
core.Input(),
|
|
1517
|
+
pectin.TrackExternal(),
|
|
1518
|
+
__metadata("design:type", pectin.Command)
|
|
1519
|
+
], ActivityActionsComponent.prototype, "cancelCommand", void 0);
|
|
1520
|
+
__decorate([
|
|
1521
|
+
core.Input(),
|
|
1522
|
+
__metadata("design:type", String)
|
|
1523
|
+
], ActivityActionsComponent.prototype, "align", void 0);
|
|
1524
|
+
__decorate([
|
|
1525
|
+
core.HostBinding('class.align-end'),
|
|
1526
|
+
__metadata("design:type", Boolean),
|
|
1527
|
+
__metadata("design:paramtypes", [])
|
|
1528
|
+
], ActivityActionsComponent.prototype, "alignEnd", null);
|
|
1529
|
+
ActivityActionsComponent = __decorate([
|
|
1530
|
+
core.Component({
|
|
1531
|
+
selector: 'aup-activity-actions',
|
|
1532
|
+
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",
|
|
1533
|
+
styles: [":host{display:flex;flex-direction:row;align-items:center;justify-content:flex-start}:host.align-end{justify-content:flex-end}"]
|
|
1534
|
+
})
|
|
1535
|
+
], ActivityActionsComponent);
|
|
1536
|
+
return ActivityActionsComponent;
|
|
1537
|
+
}(DisposableComponent));
|
|
1538
|
+
|
|
1375
1539
|
var ACTIVITY_DATA = new core.InjectionToken('InteractionActivityData');
|
|
1376
1540
|
var Activity = /** @class */ (function (_super) {
|
|
1377
1541
|
__extends(Activity, _super);
|
|
@@ -1955,21 +2119,6 @@
|
|
|
1955
2119
|
// Todo: allow multiple inplace interactions..
|
|
1956
2120
|
interactionContext.initialise("ip" + ++inplaceMonitorCount, new InteractionService_1.ApiAdapter(this.placeRouter, this.inPlaceInteractionRegistry));
|
|
1957
2121
|
};
|
|
1958
|
-
// private assertModalCanStart() {
|
|
1959
|
-
// assert.isFalsey(this.inExclusiveInteraction.value);
|
|
1960
|
-
// assert.isFalsey(this.modalActive.value);
|
|
1961
|
-
// }
|
|
1962
|
-
//
|
|
1963
|
-
// private assertInPlaceCanStart() {
|
|
1964
|
-
// assert.isFalsey(this.inExclusiveInteraction.value);
|
|
1965
|
-
// assert.isFalsey(this.modalActive.value);
|
|
1966
|
-
// assert.isFalsey(this._activeInlineContext.value);
|
|
1967
|
-
// }
|
|
1968
|
-
// // @Trace()
|
|
1969
|
-
// getActiveContext(): InteractionContext {
|
|
1970
|
-
// assert.isTruthy(this.isActive());
|
|
1971
|
-
// return this._activeContext.value;
|
|
1972
|
-
// }
|
|
1973
2122
|
/**
|
|
1974
2123
|
* Creates an interaction context that will prevent any other contexts from starting an
|
|
1975
2124
|
* activity until it is disposed. This is intended for use by the router for passing
|
|
@@ -2073,11 +2222,25 @@
|
|
|
2073
2222
|
|
|
2074
2223
|
var InPlaceInteractionContextComponent = /** @class */ (function (_super) {
|
|
2075
2224
|
__extends(InPlaceInteractionContextComponent, _super);
|
|
2076
|
-
function InPlaceInteractionContextComponent(interactionService) {
|
|
2225
|
+
function InPlaceInteractionContextComponent(interactionService, tabConfig) {
|
|
2077
2226
|
var _this = _super.call(this) || this;
|
|
2078
2227
|
_this.interactionService = interactionService;
|
|
2228
|
+
_this.tabConfig = tabConfig;
|
|
2229
|
+
/**
|
|
2230
|
+
* If true then the first startActivity call will slide the activity into view. If false
|
|
2231
|
+
* the activity will replace the existing content immediately.
|
|
2232
|
+
*/
|
|
2233
|
+
_this.animateFirstActivity = true;
|
|
2079
2234
|
return _this;
|
|
2080
2235
|
}
|
|
2236
|
+
Object.defineProperty(InPlaceInteractionContextComponent.prototype, "animationDuration", {
|
|
2237
|
+
get: function () {
|
|
2238
|
+
var _a;
|
|
2239
|
+
return this.animateFirstActivity ? (((_a = this.tabConfig) === null || _a === void 0 ? void 0 : _a.animationDuration) || '500ms') : "0ms";
|
|
2240
|
+
},
|
|
2241
|
+
enumerable: true,
|
|
2242
|
+
configurable: true
|
|
2243
|
+
});
|
|
2081
2244
|
InPlaceInteractionContextComponent.prototype.ngAfterViewInit = function () {
|
|
2082
2245
|
this.interactionService.registerInplaceInteractionContext(this);
|
|
2083
2246
|
};
|
|
@@ -2113,23 +2276,195 @@
|
|
|
2113
2276
|
return this.activityContainerComponent.startActivity(activityType, data);
|
|
2114
2277
|
};
|
|
2115
2278
|
InPlaceInteractionContextComponent.ctorParameters = function () { return [
|
|
2116
|
-
{ type: exports.ɵbg }
|
|
2279
|
+
{ type: exports.ɵbg },
|
|
2280
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [tabs.MAT_TABS_CONFIG,] }, { type: core.Optional }] }
|
|
2117
2281
|
]; };
|
|
2118
2282
|
__decorate([
|
|
2119
2283
|
core.ViewChild('activityContainer', { static: true }),
|
|
2120
2284
|
__metadata("design:type", ActivityContainerComponent)
|
|
2121
2285
|
], InPlaceInteractionContextComponent.prototype, "activityContainerComponent", void 0);
|
|
2286
|
+
__decorate([
|
|
2287
|
+
core.Input(),
|
|
2288
|
+
__metadata("design:type", Object)
|
|
2289
|
+
], InPlaceInteractionContextComponent.prototype, "animateFirstActivity", void 0);
|
|
2122
2290
|
InPlaceInteractionContextComponent = __decorate([
|
|
2123
2291
|
core.Component({
|
|
2124
2292
|
selector: 'aup-in-place-interaction-context',
|
|
2125
|
-
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",
|
|
2293
|
+
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",
|
|
2126
2294
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
2127
2295
|
}),
|
|
2128
|
-
|
|
2296
|
+
__param(1, core.Inject(tabs.MAT_TABS_CONFIG)), __param(1, core.Optional()),
|
|
2297
|
+
__metadata("design:paramtypes", [exports.ɵbg, Object])
|
|
2129
2298
|
], InPlaceInteractionContextComponent);
|
|
2130
2299
|
return InPlaceInteractionContextComponent;
|
|
2131
2300
|
}(DisposableComponent));
|
|
2132
2301
|
|
|
2302
|
+
var DialogInteractionContext = /** @class */ (function (_super) {
|
|
2303
|
+
__extends(DialogInteractionContext, _super);
|
|
2304
|
+
function DialogInteractionContext(identifier, api, dialogService, config) {
|
|
2305
|
+
var _this = _super.call(this) || this;
|
|
2306
|
+
_this.identifier = identifier;
|
|
2307
|
+
_this.api = api;
|
|
2308
|
+
_this.dialogService = dialogService;
|
|
2309
|
+
_this.config = config;
|
|
2310
|
+
_this.garbage = new pectin.GarbageCollector();
|
|
2311
|
+
typescriptUtilities.assert.notNil(dialogService);
|
|
2312
|
+
return _this;
|
|
2313
|
+
}
|
|
2314
|
+
DialogInteractionContext.prototype.cancelActiveActivity = function () {
|
|
2315
|
+
return this.activityContainer.cancelActiveActivity();
|
|
2316
|
+
};
|
|
2317
|
+
DialogInteractionContext.prototype.dispose = function () {
|
|
2318
|
+
if (this.isActive()) {
|
|
2319
|
+
pectin.lang.illegalState('Dispose called while active.');
|
|
2320
|
+
}
|
|
2321
|
+
this.garbage.dispose();
|
|
2322
|
+
};
|
|
2323
|
+
DialogInteractionContext.prototype.registerDisposable = function (disposable) {
|
|
2324
|
+
return this.garbage.registerDisposable(disposable);
|
|
2325
|
+
};
|
|
2326
|
+
DialogInteractionContext.prototype.isActive = function () {
|
|
2327
|
+
return !!this.activityContainer && this.activityContainer.isActive();
|
|
2328
|
+
};
|
|
2329
|
+
DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
2330
|
+
var _this = this;
|
|
2331
|
+
typescriptUtilities.assert.isNil(this._currentActivityRef);
|
|
2332
|
+
var config = __assign(__assign({}, this.config), {
|
|
2333
|
+
disableClose: disableClose,
|
|
2334
|
+
panelClass: 'dialog-interaction-context'
|
|
2335
|
+
});
|
|
2336
|
+
var self = this;
|
|
2337
|
+
var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
|
|
2338
|
+
var activityContainer = this.activityContainer = matDialogRef.componentInstance;
|
|
2339
|
+
this.activityContainer.initialise(this.identifier, this.api);
|
|
2340
|
+
var activityResult = this.activityContainer.startActivity(activityType, data);
|
|
2341
|
+
activityResult.finally(function () { return matDialogRef.close(); });
|
|
2342
|
+
// we need to check if our onDone/onCancel methods above we called or if we were
|
|
2343
|
+
// closed by the user clicking the backdrop. If the later then we need to cancel our
|
|
2344
|
+
// activity.
|
|
2345
|
+
matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
|
|
2346
|
+
if (activityContainer.isActive()) {
|
|
2347
|
+
activityContainer.cancelActiveActivity();
|
|
2348
|
+
}
|
|
2349
|
+
_this.activityContainer = null;
|
|
2350
|
+
});
|
|
2351
|
+
matDialogRef.updateSize();
|
|
2352
|
+
matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
|
|
2353
|
+
matDialogRef.updateSize();
|
|
2354
|
+
});
|
|
2355
|
+
return activityResult;
|
|
2356
|
+
};
|
|
2357
|
+
return DialogInteractionContext;
|
|
2358
|
+
}(AbstractInteractionContext));
|
|
2359
|
+
|
|
2360
|
+
var DIALOG_INTERACTION_SERVICE_DEFAULTS = new core.InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
|
|
2361
|
+
var DialogInteractionContextFactory = /** @class */ (function (_super) {
|
|
2362
|
+
__extends(DialogInteractionContextFactory, _super);
|
|
2363
|
+
function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
|
|
2364
|
+
var _this = _super.call(this) || this;
|
|
2365
|
+
_this.dialogService = dialogService;
|
|
2366
|
+
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
2367
|
+
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
2368
|
+
typescriptUtilities.assert.notNil(dialogService);
|
|
2369
|
+
return _this;
|
|
2370
|
+
}
|
|
2371
|
+
DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
|
|
2372
|
+
var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
|
|
2373
|
+
return new DialogInteractionContext(identifier, api, this.dialogService, config);
|
|
2374
|
+
};
|
|
2375
|
+
DialogInteractionContextFactory.ctorParameters = function () { return [
|
|
2376
|
+
{ type: dialog.MatDialog },
|
|
2377
|
+
{ type: dialog.MatDialogConfig, decorators: [{ type: core.Optional }, { type: core.Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
|
|
2378
|
+
{ type: dialog.MatDialogConfig, decorators: [{ type: core.Optional }, { type: core.Inject, args: [dialog.MAT_DIALOG_DEFAULT_OPTIONS,] }] }
|
|
2379
|
+
]; };
|
|
2380
|
+
DialogInteractionContextFactory.ɵprov = core.ɵɵdefineInjectable({ factory: function DialogInteractionContextFactory_Factory() { return new DialogInteractionContextFactory(core.ɵɵinject(dialog.MatDialog), core.ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), core.ɵɵinject(dialog.MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionContextFactory, providedIn: "root" });
|
|
2381
|
+
DialogInteractionContextFactory = __decorate([
|
|
2382
|
+
core.Injectable({
|
|
2383
|
+
providedIn: 'root'
|
|
2384
|
+
}),
|
|
2385
|
+
__param(1, core.Optional()), __param(1, core.Inject(DIALOG_INTERACTION_SERVICE_DEFAULTS)),
|
|
2386
|
+
__param(2, core.Optional()), __param(2, core.Inject(dialog.MAT_DIALOG_DEFAULT_OPTIONS)),
|
|
2387
|
+
__metadata("design:paramtypes", [dialog.MatDialog,
|
|
2388
|
+
dialog.MatDialogConfig,
|
|
2389
|
+
dialog.MatDialogConfig])
|
|
2390
|
+
], DialogInteractionContextFactory);
|
|
2391
|
+
return DialogInteractionContextFactory;
|
|
2392
|
+
}(ModalInteractionContextFactory));
|
|
2393
|
+
|
|
2394
|
+
/**
|
|
2395
|
+
* @file Automatically generated by barrelsby.
|
|
2396
|
+
*/
|
|
2397
|
+
|
|
2398
|
+
var AddItemInteractionContextComponent = /** @class */ (function (_super) {
|
|
2399
|
+
__extends(AddItemInteractionContextComponent, _super);
|
|
2400
|
+
function AddItemInteractionContextComponent() {
|
|
2401
|
+
var _this = _super.call(this) || this;
|
|
2402
|
+
_this.tabindex = 0;
|
|
2403
|
+
_this.clickCommand = pectin.Command.create(function (context) {
|
|
2404
|
+
if (_this.activityClass) {
|
|
2405
|
+
_this.startActivity(_this.activityClass, _this.activityData).catch(function (e) {
|
|
2406
|
+
// don't care.
|
|
2407
|
+
});
|
|
2408
|
+
}
|
|
2409
|
+
else {
|
|
2410
|
+
_this.addCommand.withContext(context).execute();
|
|
2411
|
+
}
|
|
2412
|
+
});
|
|
2413
|
+
return _this;
|
|
2414
|
+
}
|
|
2415
|
+
Object.defineProperty(AddItemInteractionContextComponent.prototype, "active", {
|
|
2416
|
+
get: function () {
|
|
2417
|
+
return this.interactionContext ? this.interactionContext.isActive() : false;
|
|
2418
|
+
},
|
|
2419
|
+
enumerable: true,
|
|
2420
|
+
configurable: true
|
|
2421
|
+
});
|
|
2422
|
+
AddItemInteractionContextComponent.prototype.startActivity = function (activityType, data) {
|
|
2423
|
+
return this.interactionContext.startActivity(activityType, data);
|
|
2424
|
+
};
|
|
2425
|
+
AddItemInteractionContextComponent.prototype.ngOnInit = function () {
|
|
2426
|
+
};
|
|
2427
|
+
__decorate([
|
|
2428
|
+
core.Input(),
|
|
2429
|
+
__metadata("design:type", String)
|
|
2430
|
+
], AddItemInteractionContextComponent.prototype, "label", void 0);
|
|
2431
|
+
__decorate([
|
|
2432
|
+
core.Input(),
|
|
2433
|
+
__metadata("design:type", Object)
|
|
2434
|
+
], AddItemInteractionContextComponent.prototype, "activityClass", void 0);
|
|
2435
|
+
__decorate([
|
|
2436
|
+
core.Input(),
|
|
2437
|
+
__metadata("design:type", Object)
|
|
2438
|
+
], AddItemInteractionContextComponent.prototype, "activityData", void 0);
|
|
2439
|
+
__decorate([
|
|
2440
|
+
core.Input(),
|
|
2441
|
+
pectin.TrackExternal(),
|
|
2442
|
+
__metadata("design:type", pectin.Command)
|
|
2443
|
+
], AddItemInteractionContextComponent.prototype, "addCommand", void 0);
|
|
2444
|
+
__decorate([
|
|
2445
|
+
core.ViewChild(InPlaceInteractionContextComponent),
|
|
2446
|
+
__metadata("design:type", InPlaceInteractionContextComponent)
|
|
2447
|
+
], AddItemInteractionContextComponent.prototype, "interactionContext", void 0);
|
|
2448
|
+
__decorate([
|
|
2449
|
+
core.HostBinding('class.interaction-active'),
|
|
2450
|
+
__metadata("design:type", Boolean),
|
|
2451
|
+
__metadata("design:paramtypes", [])
|
|
2452
|
+
], AddItemInteractionContextComponent.prototype, "active", null);
|
|
2453
|
+
__decorate([
|
|
2454
|
+
core.HostBinding('tabindex'),
|
|
2455
|
+
__metadata("design:type", Object)
|
|
2456
|
+
], AddItemInteractionContextComponent.prototype, "tabindex", void 0);
|
|
2457
|
+
AddItemInteractionContextComponent = __decorate([
|
|
2458
|
+
core.Component({
|
|
2459
|
+
selector: 'aup-add-item-interaction-context',
|
|
2460
|
+
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",
|
|
2461
|
+
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}"]
|
|
2462
|
+
}),
|
|
2463
|
+
__metadata("design:paramtypes", [])
|
|
2464
|
+
], AddItemInteractionContextComponent);
|
|
2465
|
+
return AddItemInteractionContextComponent;
|
|
2466
|
+
}(DisposableComponent));
|
|
2467
|
+
|
|
2133
2468
|
var InteractionModule = /** @class */ (function () {
|
|
2134
2469
|
function InteractionModule() {
|
|
2135
2470
|
}
|
|
@@ -2141,7 +2476,9 @@
|
|
|
2141
2476
|
dialog.MatDialogModule,
|
|
2142
2477
|
tabs.MatTabsModule,
|
|
2143
2478
|
portal.PortalModule,
|
|
2144
|
-
router.RouterModule
|
|
2479
|
+
router.RouterModule,
|
|
2480
|
+
icon.MatIconModule,
|
|
2481
|
+
DirectivesModule
|
|
2145
2482
|
],
|
|
2146
2483
|
declarations: [
|
|
2147
2484
|
ActivityContainerComponent,
|
|
@@ -2149,12 +2486,16 @@
|
|
|
2149
2486
|
ConfirmThenDialogComponent,
|
|
2150
2487
|
AlertDialogComponent,
|
|
2151
2488
|
ActivityOutletComponent,
|
|
2152
|
-
InPlaceInteractionContextComponent
|
|
2489
|
+
InPlaceInteractionContextComponent,
|
|
2490
|
+
AddItemInteractionContextComponent,
|
|
2491
|
+
ActivityActionsComponent
|
|
2153
2492
|
],
|
|
2154
2493
|
exports: [
|
|
2155
2494
|
ActivityContainerComponent,
|
|
2156
2495
|
ActivityOutletComponent,
|
|
2157
|
-
InPlaceInteractionContextComponent
|
|
2496
|
+
InPlaceInteractionContextComponent,
|
|
2497
|
+
AddItemInteractionContextComponent,
|
|
2498
|
+
ActivityActionsComponent
|
|
2158
2499
|
],
|
|
2159
2500
|
entryComponents: [
|
|
2160
2501
|
ActivityContainerComponent,
|
|
@@ -4535,214 +4876,6 @@
|
|
|
4535
4876
|
* @file Automatically generated by barrelsby.
|
|
4536
4877
|
*/
|
|
4537
4878
|
|
|
4538
|
-
var Dimension = /** @class */ (function () {
|
|
4539
|
-
function Dimension(width, height) {
|
|
4540
|
-
this.width = width;
|
|
4541
|
-
this.height = height;
|
|
4542
|
-
}
|
|
4543
|
-
return Dimension;
|
|
4544
|
-
}());
|
|
4545
|
-
|
|
4546
|
-
var Point = /** @class */ (function () {
|
|
4547
|
-
function Point(x, y) {
|
|
4548
|
-
this.x = x;
|
|
4549
|
-
this.y = y;
|
|
4550
|
-
}
|
|
4551
|
-
Point.from = function (data) {
|
|
4552
|
-
return new Point(data.x, data.y);
|
|
4553
|
-
};
|
|
4554
|
-
Point.prototype.translate = function (x, y) {
|
|
4555
|
-
return new Point(this.x + x, this.y + y);
|
|
4556
|
-
};
|
|
4557
|
-
return Point;
|
|
4558
|
-
}());
|
|
4559
|
-
|
|
4560
|
-
exports.Bounds = /** @class */ (function (_super) {
|
|
4561
|
-
__extends(Bounds, _super);
|
|
4562
|
-
function Bounds(top, left, width, height) {
|
|
4563
|
-
var _this = _super.call(this, width, height) || this;
|
|
4564
|
-
_this.top = top;
|
|
4565
|
-
_this.left = left;
|
|
4566
|
-
_this.width = width;
|
|
4567
|
-
_this.height = height;
|
|
4568
|
-
return _this;
|
|
4569
|
-
}
|
|
4570
|
-
Bounds.prototype.relativePositionOf = function (point) {
|
|
4571
|
-
if (point instanceof MouseEvent) {
|
|
4572
|
-
return new Point(point.clientX - this.left, point.clientY - this.top);
|
|
4573
|
-
}
|
|
4574
|
-
else {
|
|
4575
|
-
return new Point(point.x - this.left, point.y - this.top);
|
|
4576
|
-
}
|
|
4577
|
-
};
|
|
4578
|
-
return Bounds;
|
|
4579
|
-
}(Dimension));
|
|
4580
|
-
(function (Bounds) {
|
|
4581
|
-
function ofElement(element) {
|
|
4582
|
-
var rect = element.getBoundingClientRect();
|
|
4583
|
-
return new Bounds(rect.top, rect.left, rect.width, rect.height);
|
|
4584
|
-
}
|
|
4585
|
-
Bounds.ofElement = ofElement;
|
|
4586
|
-
})(exports.Bounds || (exports.Bounds = {}));
|
|
4587
|
-
|
|
4588
|
-
var ResizeAwareComponent = /** @class */ (function (_super) {
|
|
4589
|
-
__extends(ResizeAwareComponent, _super);
|
|
4590
|
-
function ResizeAwareComponent(elementRef, ngZone) {
|
|
4591
|
-
var _this = _super.call(this) || this;
|
|
4592
|
-
_this.elementRef = elementRef;
|
|
4593
|
-
_this.ngZone = ngZone;
|
|
4594
|
-
_this._boundsModel = new pectin.MutableValueModel(new exports.Bounds(0, 0, 0, 0));
|
|
4595
|
-
return _this;
|
|
4596
|
-
}
|
|
4597
|
-
ResizeAwareComponent.prototype.ngAfterViewInit = function () {
|
|
4598
|
-
var _this = this;
|
|
4599
|
-
this.updateBounds();
|
|
4600
|
-
var element = this.elementRef.nativeElement;
|
|
4601
|
-
var ro = new ResizeObserver(function (entries, observer) {
|
|
4602
|
-
_this.ngZone.run(function () { return _this.updateBounds(); });
|
|
4603
|
-
});
|
|
4604
|
-
ro.observe(element);
|
|
4605
|
-
this.onDispose(function () { return ro.disconnect(); });
|
|
4606
|
-
};
|
|
4607
|
-
Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
|
|
4608
|
-
get: function () {
|
|
4609
|
-
return this._boundsModel.readonly;
|
|
4610
|
-
},
|
|
4611
|
-
enumerable: true,
|
|
4612
|
-
configurable: true
|
|
4613
|
-
});
|
|
4614
|
-
Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
|
|
4615
|
-
get: function () {
|
|
4616
|
-
return this.elementRef.nativeElement;
|
|
4617
|
-
},
|
|
4618
|
-
enumerable: true,
|
|
4619
|
-
configurable: true
|
|
4620
|
-
});
|
|
4621
|
-
// TODO: Make this handle body scroll
|
|
4622
|
-
ResizeAwareComponent.prototype.relativePositionOf = function (point) {
|
|
4623
|
-
return this.bounds.relativePositionOf(point);
|
|
4624
|
-
};
|
|
4625
|
-
Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
|
|
4626
|
-
get: function () {
|
|
4627
|
-
return this._boundsModel.value;
|
|
4628
|
-
},
|
|
4629
|
-
enumerable: true,
|
|
4630
|
-
configurable: true
|
|
4631
|
-
});
|
|
4632
|
-
ResizeAwareComponent.prototype.updateBounds = function () {
|
|
4633
|
-
this._boundsModel.value = exports.Bounds.ofElement(this.nativeElement);
|
|
4634
|
-
};
|
|
4635
|
-
ResizeAwareComponent.ctorParameters = function () { return [
|
|
4636
|
-
{ type: core.ElementRef },
|
|
4637
|
-
{ type: core.NgZone }
|
|
4638
|
-
]; };
|
|
4639
|
-
ResizeAwareComponent = __decorate([
|
|
4640
|
-
core.Directive(),
|
|
4641
|
-
__metadata("design:paramtypes", [core.ElementRef, core.NgZone])
|
|
4642
|
-
], ResizeAwareComponent);
|
|
4643
|
-
return ResizeAwareComponent;
|
|
4644
|
-
}(DisposableComponent));
|
|
4645
|
-
|
|
4646
|
-
/**
|
|
4647
|
-
* @file Automatically generated by barrelsby.
|
|
4648
|
-
*/
|
|
4649
|
-
|
|
4650
|
-
/**
|
|
4651
|
-
* @file Automatically generated by barrelsby.
|
|
4652
|
-
*/
|
|
4653
|
-
|
|
4654
|
-
var DialogInteractionContext = /** @class */ (function (_super) {
|
|
4655
|
-
__extends(DialogInteractionContext, _super);
|
|
4656
|
-
function DialogInteractionContext(identifier, api, dialogService, config) {
|
|
4657
|
-
var _this = _super.call(this) || this;
|
|
4658
|
-
_this.identifier = identifier;
|
|
4659
|
-
_this.api = api;
|
|
4660
|
-
_this.dialogService = dialogService;
|
|
4661
|
-
_this.config = config;
|
|
4662
|
-
_this.garbage = new pectin.GarbageCollector();
|
|
4663
|
-
typescriptUtilities.assert.notNil(dialogService);
|
|
4664
|
-
return _this;
|
|
4665
|
-
}
|
|
4666
|
-
DialogInteractionContext.prototype.cancelActiveActivity = function () {
|
|
4667
|
-
return this.activityContainer.cancelActiveActivity();
|
|
4668
|
-
};
|
|
4669
|
-
DialogInteractionContext.prototype.dispose = function () {
|
|
4670
|
-
if (this.isActive()) {
|
|
4671
|
-
pectin.lang.illegalState('Dispose called while active.');
|
|
4672
|
-
}
|
|
4673
|
-
this.garbage.dispose();
|
|
4674
|
-
};
|
|
4675
|
-
DialogInteractionContext.prototype.registerDisposable = function (disposable) {
|
|
4676
|
-
return this.garbage.registerDisposable(disposable);
|
|
4677
|
-
};
|
|
4678
|
-
DialogInteractionContext.prototype.isActive = function () {
|
|
4679
|
-
return !!this.activityContainer && this.activityContainer.isActive();
|
|
4680
|
-
};
|
|
4681
|
-
DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
4682
|
-
var _this = this;
|
|
4683
|
-
typescriptUtilities.assert.isNil(this._currentActivityRef);
|
|
4684
|
-
var config = __assign(__assign({}, this.config), {
|
|
4685
|
-
disableClose: disableClose,
|
|
4686
|
-
panelClass: 'dialog-interaction-context'
|
|
4687
|
-
});
|
|
4688
|
-
var self = this;
|
|
4689
|
-
var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
|
|
4690
|
-
var activityContainer = this.activityContainer = matDialogRef.componentInstance;
|
|
4691
|
-
this.activityContainer.initialise(this.identifier, this.api);
|
|
4692
|
-
var activityResult = this.activityContainer.startActivity(activityType, data);
|
|
4693
|
-
activityResult.finally(function () { return matDialogRef.close(); });
|
|
4694
|
-
// we need to check if our onDone/onCancel methods above we called or if we were
|
|
4695
|
-
// closed by the user clicking the backdrop. If the later then we need to cancel our
|
|
4696
|
-
// activity.
|
|
4697
|
-
matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
|
|
4698
|
-
if (activityContainer.isActive()) {
|
|
4699
|
-
activityContainer.cancelActiveActivity();
|
|
4700
|
-
}
|
|
4701
|
-
_this.activityContainer = null;
|
|
4702
|
-
});
|
|
4703
|
-
matDialogRef.updateSize();
|
|
4704
|
-
matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
|
|
4705
|
-
matDialogRef.updateSize();
|
|
4706
|
-
});
|
|
4707
|
-
return activityResult;
|
|
4708
|
-
};
|
|
4709
|
-
return DialogInteractionContext;
|
|
4710
|
-
}(AbstractInteractionContext));
|
|
4711
|
-
|
|
4712
|
-
var DIALOG_INTERACTION_SERVICE_DEFAULTS = new core.InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
|
|
4713
|
-
var DialogInteractionContextFactory = /** @class */ (function (_super) {
|
|
4714
|
-
__extends(DialogInteractionContextFactory, _super);
|
|
4715
|
-
function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
|
|
4716
|
-
var _this = _super.call(this) || this;
|
|
4717
|
-
_this.dialogService = dialogService;
|
|
4718
|
-
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
4719
|
-
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
4720
|
-
typescriptUtilities.assert.notNil(dialogService);
|
|
4721
|
-
return _this;
|
|
4722
|
-
}
|
|
4723
|
-
DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
|
|
4724
|
-
var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
|
|
4725
|
-
return new DialogInteractionContext(identifier, api, this.dialogService, config);
|
|
4726
|
-
};
|
|
4727
|
-
DialogInteractionContextFactory.ctorParameters = function () { return [
|
|
4728
|
-
{ type: dialog.MatDialog },
|
|
4729
|
-
{ type: dialog.MatDialogConfig, decorators: [{ type: core.Optional }, { type: core.Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
|
|
4730
|
-
{ type: dialog.MatDialogConfig, decorators: [{ type: core.Optional }, { type: core.Inject, args: [dialog.MAT_DIALOG_DEFAULT_OPTIONS,] }] }
|
|
4731
|
-
]; };
|
|
4732
|
-
DialogInteractionContextFactory.ɵprov = core.ɵɵdefineInjectable({ factory: function DialogInteractionContextFactory_Factory() { return new DialogInteractionContextFactory(core.ɵɵinject(dialog.MatDialog), core.ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), core.ɵɵinject(dialog.MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionContextFactory, providedIn: "root" });
|
|
4733
|
-
DialogInteractionContextFactory = __decorate([
|
|
4734
|
-
core.Injectable({
|
|
4735
|
-
providedIn: 'root'
|
|
4736
|
-
}),
|
|
4737
|
-
__param(1, core.Optional()), __param(1, core.Inject(DIALOG_INTERACTION_SERVICE_DEFAULTS)),
|
|
4738
|
-
__param(2, core.Optional()), __param(2, core.Inject(dialog.MAT_DIALOG_DEFAULT_OPTIONS)),
|
|
4739
|
-
__metadata("design:paramtypes", [dialog.MatDialog,
|
|
4740
|
-
dialog.MatDialogConfig,
|
|
4741
|
-
dialog.MatDialogConfig])
|
|
4742
|
-
], DialogInteractionContextFactory);
|
|
4743
|
-
return DialogInteractionContextFactory;
|
|
4744
|
-
}(ModalInteractionContextFactory));
|
|
4745
|
-
|
|
4746
4879
|
/**
|
|
4747
4880
|
* @file Automatically generated by barrelsby.
|
|
4748
4881
|
*/
|
|
@@ -5153,9 +5286,11 @@
|
|
|
5153
5286
|
exports.AbstractPlaceNavigationComponent = AbstractPlaceNavigationComponent;
|
|
5154
5287
|
exports.AbstractPopStateNavigation = AbstractPopStateNavigation;
|
|
5155
5288
|
exports.Activity = Activity;
|
|
5289
|
+
exports.ActivityActionsComponent = ActivityActionsComponent;
|
|
5156
5290
|
exports.ActivityContainerComponent = ActivityContainerComponent;
|
|
5157
5291
|
exports.ActivityOutletComponent = ActivityOutletComponent;
|
|
5158
5292
|
exports.ActivityRef = ActivityRef;
|
|
5293
|
+
exports.AddItemInteractionContextComponent = AddItemInteractionContextComponent;
|
|
5159
5294
|
exports.AlertDialogComponent = AlertDialogComponent;
|
|
5160
5295
|
exports.AngularUiPowerupsModule = AngularUiPowerupsModule;
|
|
5161
5296
|
exports.BusyOverlayComponent = BusyOverlayComponent;
|
|
@@ -5256,6 +5391,10 @@
|
|
|
5256
5391
|
exports.ɵbx = AlertDialogComponent;
|
|
5257
5392
|
exports.ɵbz = InPlaceInteractionContextComponent;
|
|
5258
5393
|
exports.ɵc = FocusBindingDirective;
|
|
5394
|
+
exports.ɵca = AddItemInteractionContextComponent;
|
|
5395
|
+
exports.ɵcb = DisposableComponent;
|
|
5396
|
+
exports.ɵcc = InPlaceInteractionContextComponent;
|
|
5397
|
+
exports.ɵcd = ActivityActionsComponent;
|
|
5259
5398
|
exports.ɵd = DisposableComponent;
|
|
5260
5399
|
exports.ɵe = FocusBindingFactory;
|
|
5261
5400
|
exports.ɵf = ComponentsModule;
|