@coolon/angular-ui-powerups 1.11.2 → 1.11.4
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 +824 -826
- 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 +17 -18
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +17 -18
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/index.js +1 -0
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/table/column-model.js +1 -1
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js +3 -4
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js +2 -2
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -1
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.metadata.json +1 -1
- package/esm2015/lib/components/table/edit-session.js +20 -0
- package/esm2015/lib/components/table/edit-session.js.map +1 -0
- package/esm2015/lib/components/table/edit-session.metadata.json +1 -0
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +2 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table-model.js +3 -23
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js +2 -2
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +2 -2
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.metadata.json +1 -1
- package/esm5/coolon-angular-ui-powerups.js +17 -18
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/index.js +1 -0
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/table/column-model.js +1 -1
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js +3 -4
- package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js +2 -2
- package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -1
- package/esm5/lib/components/table/edit-session.js +25 -0
- package/esm5/lib/components/table/edit-session.js.map +1 -0
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +2 -1
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +4 -27
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
- package/esm5/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js +2 -2
- package/esm5/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js.map +1 -1
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +2 -2
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +625 -627
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +797 -799
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/table/column-model.d.ts +10 -8
- package/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.d.ts +1 -2
- package/lib/components/table/edit-row-controls/edit-row-controls.component.d.ts +2 -2
- package/lib/components/table/edit-session.d.ts +9 -0
- package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +2 -1
- package/lib/components/table/table-model.d.ts +4 -13
- package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +1 -1
- package/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.d.ts +3 -2
- package/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.d.ts +3 -2
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
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/cdk/portal'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/icon'), require('@angular/material/table'), require('@coolon/pectin'), require('@angular/flex-layout'), require('@angular/material/dialog'), require('@angular/router'), require('lodash'), 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/cdk/portal', '@angular/material/button', '@angular/material/checkbox', '@angular/material/icon', '@angular/material/table', '@coolon/pectin', '@angular/flex-layout', '@angular/material/dialog', '@angular/router', 'lodash', '
|
|
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.cdk.portal, global.ng.material.button, global.ng.material.checkbox, global.ng.material.icon, global.ng.material.table, global.pectin, global.ng.flexLayout, global.ng.material.dialog, global.ng.router, global.___default, global.
|
|
5
|
-
}(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, portal, button, checkbox, icon, table, pectin, flexLayout, dialog, router, ___default,
|
|
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/cdk/portal'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/icon'), require('@angular/material/table'), require('@coolon/pectin'), require('@angular/flex-layout'), require('@angular/material/dialog'), require('@angular/router'), require('lodash'), require('@coolon/typescript-utilities'), require('@angular/cdk/overlay'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('immer'), require('@angular/material/progress-spinner'), require('@angular/material/list'), require('@angular/material/tooltip'), require('@typescript-plus/fast-memoize-decorator'), require('reflect-metadata'), require('@angular/animations'), require('resize-observer-polyfill'), 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/cdk/portal', '@angular/material/button', '@angular/material/checkbox', '@angular/material/icon', '@angular/material/table', '@coolon/pectin', '@angular/flex-layout', '@angular/material/dialog', '@angular/router', 'lodash', '@coolon/typescript-utilities', '@angular/cdk/overlay', '@typescript-plus/fast-memoize-decorator/dist/src', 'immer', '@angular/material/progress-spinner', '@angular/material/list', '@angular/material/tooltip', '@typescript-plus/fast-memoize-decorator', 'reflect-metadata', '@angular/animations', 'resize-observer-polyfill', '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.cdk.portal, global.ng.material.button, global.ng.material.checkbox, global.ng.material.icon, global.ng.material.table, global.pectin, global.ng.flexLayout, global.ng.material.dialog, global.ng.router, global.___default, global.typescriptUtilities, global.ng.cdk.overlay, global.src, global.produce, global.ng.material.progressSpinner, global.ng.material.list, global.ng.material.tooltip, global.fastMemoizeDecorator, null, global.ng.animations, global.ResizeObserver, global.rxjs));
|
|
5
|
+
}(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, portal, button, checkbox, icon, table, pectin, flexLayout, dialog, router, ___default, typescriptUtilities, overlay, src, produce, progressSpinner, list, tooltip, fastMemoizeDecorator, reflectMetadata, animations$1, ResizeObserver, rxjs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var ___default__default = 'default' in ___default ? ___default['default'] : ___default;
|
|
8
|
-
ResizeObserver = ResizeObserver && Object.prototype.hasOwnProperty.call(ResizeObserver, 'default') ? ResizeObserver['default'] : ResizeObserver;
|
|
9
8
|
produce = produce && Object.prototype.hasOwnProperty.call(produce, 'default') ? produce['default'] : produce;
|
|
9
|
+
ResizeObserver = ResizeObserver && Object.prototype.hasOwnProperty.call(ResizeObserver, 'default') ? ResizeObserver['default'] : ResizeObserver;
|
|
10
10
|
|
|
11
11
|
/*! *****************************************************************************
|
|
12
12
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -540,360 +540,155 @@
|
|
|
540
540
|
return DirectivesModule;
|
|
541
541
|
}());
|
|
542
542
|
|
|
543
|
-
var
|
|
544
|
-
__extends(
|
|
545
|
-
function
|
|
546
|
-
var _this = _super.
|
|
547
|
-
_this.
|
|
548
|
-
_this.focusManager = focusManager;
|
|
549
|
-
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
550
|
-
if (_this.focusManager) {
|
|
551
|
-
_this._focusContext = _this.focusManager.registerFocusable(_this);
|
|
552
|
-
_this.registerDisposable(_this._focusContext);
|
|
553
|
-
_this.registerDisposable(focusBindingFactory.createBinding(el.nativeElement, _this.focusContext));
|
|
554
|
-
}
|
|
543
|
+
var ActivityActionsComponent = /** @class */ (function (_super) {
|
|
544
|
+
__extends(ActivityActionsComponent, _super);
|
|
545
|
+
function ActivityActionsComponent() {
|
|
546
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
547
|
+
_this.align = 'start';
|
|
555
548
|
return _this;
|
|
556
549
|
}
|
|
557
|
-
Object.defineProperty(
|
|
550
|
+
Object.defineProperty(ActivityActionsComponent.prototype, "alignEnd", {
|
|
558
551
|
get: function () {
|
|
559
|
-
return
|
|
552
|
+
return this.align === 'end';
|
|
560
553
|
},
|
|
561
554
|
enumerable: true,
|
|
562
555
|
configurable: true
|
|
563
556
|
});
|
|
564
|
-
|
|
565
|
-
var _a;
|
|
566
|
-
(_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusIn();
|
|
557
|
+
ActivityActionsComponent.prototype.ngOnInit = function () {
|
|
567
558
|
};
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
(_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusOut();
|
|
559
|
+
ActivityActionsComponent.prototype.hasConfirmText = function () {
|
|
560
|
+
return !___default__default.isEmpty(this.confirmText);
|
|
571
561
|
};
|
|
572
|
-
Object.defineProperty(FocusableComponent.prototype, "focusContext", {
|
|
573
|
-
get: function () {
|
|
574
|
-
return this._focusContext;
|
|
575
|
-
},
|
|
576
|
-
enumerable: true,
|
|
577
|
-
configurable: true
|
|
578
|
-
});
|
|
579
|
-
FocusableComponent.ctorParameters = function () { return [
|
|
580
|
-
{ type: core.ElementRef },
|
|
581
|
-
{ type: pectin.FocusManager },
|
|
582
|
-
{ type: FocusBindingFactory }
|
|
583
|
-
]; };
|
|
584
562
|
__decorate([
|
|
585
|
-
core.
|
|
586
|
-
|
|
587
|
-
__metadata("design:
|
|
588
|
-
],
|
|
563
|
+
core.Input(),
|
|
564
|
+
pectin.TrackExternal(),
|
|
565
|
+
__metadata("design:type", pectin.Command)
|
|
566
|
+
], ActivityActionsComponent.prototype, "confirmCommand", void 0);
|
|
589
567
|
__decorate([
|
|
590
|
-
core.
|
|
591
|
-
__metadata("design:type",
|
|
592
|
-
|
|
593
|
-
__metadata("design:returntype", void 0)
|
|
594
|
-
], FocusableComponent.prototype, "onFocus", null);
|
|
568
|
+
core.Input(),
|
|
569
|
+
__metadata("design:type", String)
|
|
570
|
+
], ActivityActionsComponent.prototype, "confirmText", void 0);
|
|
595
571
|
__decorate([
|
|
596
|
-
core.
|
|
597
|
-
|
|
598
|
-
__metadata("design:
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
572
|
+
core.Input(),
|
|
573
|
+
pectin.TrackExternal(),
|
|
574
|
+
__metadata("design:type", pectin.Command)
|
|
575
|
+
], ActivityActionsComponent.prototype, "cancelCommand", void 0);
|
|
576
|
+
__decorate([
|
|
577
|
+
core.Input(),
|
|
578
|
+
__metadata("design:type", String)
|
|
579
|
+
], ActivityActionsComponent.prototype, "align", void 0);
|
|
580
|
+
__decorate([
|
|
581
|
+
core.HostBinding('class.align-end'),
|
|
582
|
+
__metadata("design:type", Boolean),
|
|
583
|
+
__metadata("design:paramtypes", [])
|
|
584
|
+
], ActivityActionsComponent.prototype, "alignEnd", null);
|
|
585
|
+
ActivityActionsComponent = __decorate([
|
|
586
|
+
core.Component({
|
|
587
|
+
selector: 'aup-activity-actions',
|
|
588
|
+
template: "<button class=\"cancel\" mat-icon-button [pectinCommand]=\"cancelCommand\">\n <mat-icon>clear</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\">\n <mat-icon>done</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n",
|
|
589
|
+
styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}"]
|
|
590
|
+
})
|
|
591
|
+
], ActivityActionsComponent);
|
|
592
|
+
return ActivityActionsComponent;
|
|
606
593
|
}(DisposableComponent));
|
|
607
594
|
|
|
608
|
-
var
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
var Point = /** @class */ (function () {
|
|
617
|
-
function Point(x, y) {
|
|
618
|
-
this.x = x;
|
|
619
|
-
this.y = y;
|
|
620
|
-
}
|
|
621
|
-
Point.from = function (data) {
|
|
622
|
-
return new Point(data.x, data.y);
|
|
623
|
-
};
|
|
624
|
-
Point.prototype.translate = function (x, y) {
|
|
625
|
-
return new Point(this.x + x, this.y + y);
|
|
626
|
-
};
|
|
627
|
-
return Point;
|
|
628
|
-
}());
|
|
629
|
-
|
|
630
|
-
exports.Bounds = /** @class */ (function (_super) {
|
|
631
|
-
__extends(Bounds, _super);
|
|
632
|
-
function Bounds(top, left, width, height) {
|
|
633
|
-
var _this = _super.call(this, width, height) || this;
|
|
634
|
-
_this.top = top;
|
|
635
|
-
_this.left = left;
|
|
636
|
-
_this.width = width;
|
|
637
|
-
_this.height = height;
|
|
638
|
-
return _this;
|
|
639
|
-
}
|
|
640
|
-
Bounds.prototype.relativePositionOf = function (point) {
|
|
641
|
-
if (point instanceof MouseEvent) {
|
|
642
|
-
return new Point(point.clientX - this.left, point.clientY - this.top);
|
|
643
|
-
}
|
|
644
|
-
else {
|
|
645
|
-
return new Point(point.x - this.left, point.y - this.top);
|
|
646
|
-
}
|
|
647
|
-
};
|
|
648
|
-
return Bounds;
|
|
649
|
-
}(Dimension));
|
|
650
|
-
(function (Bounds) {
|
|
651
|
-
function ofElement(element) {
|
|
652
|
-
var rect = element.getBoundingClientRect();
|
|
653
|
-
return new Bounds(rect.top, rect.left, rect.width, rect.height);
|
|
654
|
-
}
|
|
655
|
-
Bounds.ofElement = ofElement;
|
|
656
|
-
})(exports.Bounds || (exports.Bounds = {}));
|
|
657
|
-
|
|
658
|
-
var ResizeAwareComponent = /** @class */ (function (_super) {
|
|
659
|
-
__extends(ResizeAwareComponent, _super);
|
|
660
|
-
function ResizeAwareComponent(elementRef, ngZone) {
|
|
661
|
-
var _this = _super.call(this) || this;
|
|
662
|
-
_this.elementRef = elementRef;
|
|
663
|
-
_this.ngZone = ngZone;
|
|
664
|
-
_this._boundsModel = new pectin.MutableValueModel(new exports.Bounds(0, 0, 0, 0));
|
|
595
|
+
var ACTIVITY_DATA = new core.InjectionToken('InteractionActivityData');
|
|
596
|
+
var Activity = /** @class */ (function (_super) {
|
|
597
|
+
__extends(Activity, _super);
|
|
598
|
+
function Activity() {
|
|
599
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
600
|
+
_this._busyModel = new pectin.DelegatingValueModel().withDefault(false);
|
|
601
|
+
_this.class = 'aup-activity';
|
|
665
602
|
return _this;
|
|
666
603
|
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
this.
|
|
670
|
-
|
|
671
|
-
var ro = new ResizeObserver(function (entries, observer) {
|
|
672
|
-
_this.ngZone.run(function () { return _this.updateBounds(); });
|
|
673
|
-
});
|
|
674
|
-
ro.observe(element);
|
|
675
|
-
this.onDispose(function () { return ro.disconnect(); });
|
|
604
|
+
Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
|
|
605
|
+
typescriptUtilities.assert.isNil(this._activityContext);
|
|
606
|
+
this._activityContext = activityContext;
|
|
607
|
+
this._interactionContext = nestedInteractionContext;
|
|
676
608
|
};
|
|
677
|
-
Object.defineProperty(
|
|
609
|
+
Object.defineProperty(Activity.prototype, "interactionContext", {
|
|
678
610
|
get: function () {
|
|
679
|
-
|
|
611
|
+
typescriptUtilities.assert.isTruthy(this.isInitialised());
|
|
612
|
+
return this._interactionContext;
|
|
680
613
|
},
|
|
681
614
|
enumerable: true,
|
|
682
615
|
configurable: true
|
|
683
616
|
});
|
|
684
|
-
|
|
617
|
+
Activity.prototype.done = function (result) {
|
|
618
|
+
return this._activityContext.onDone(result);
|
|
619
|
+
};
|
|
620
|
+
Activity.prototype.cancel = function (error) {
|
|
621
|
+
this._activityContext.onCancel(error);
|
|
622
|
+
};
|
|
623
|
+
// @Trace()
|
|
624
|
+
Activity.prototype.onActivityReady = function () {
|
|
625
|
+
};
|
|
626
|
+
Object.defineProperty(Activity.prototype, "busy", {
|
|
685
627
|
get: function () {
|
|
686
|
-
return this.
|
|
628
|
+
return this._busyModel.readonly;
|
|
687
629
|
},
|
|
688
630
|
enumerable: true,
|
|
689
631
|
configurable: true
|
|
690
632
|
});
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
return this.bounds.relativePositionOf(point);
|
|
633
|
+
Activity.prototype.busyWhile = function (busyModel) {
|
|
634
|
+
this._busyModel.setDelegate(busyModel);
|
|
694
635
|
};
|
|
695
|
-
|
|
636
|
+
Activity.prototype.isBusy = function () {
|
|
637
|
+
return this._busyModel.value;
|
|
638
|
+
};
|
|
639
|
+
Activity.prototype.isInitialised = function () {
|
|
640
|
+
return !!this._activityContext;
|
|
641
|
+
};
|
|
642
|
+
__decorate([
|
|
643
|
+
core.HostBinding('class'),
|
|
644
|
+
__metadata("design:type", Object)
|
|
645
|
+
], Activity.prototype, "class", void 0);
|
|
646
|
+
return Activity;
|
|
647
|
+
}(DisposableComponent));
|
|
648
|
+
|
|
649
|
+
var AlertDialogComponent = /** @class */ (function (_super) {
|
|
650
|
+
__extends(AlertDialogComponent, _super);
|
|
651
|
+
function AlertDialogComponent(alert) {
|
|
652
|
+
var _this = _super.call(this) || this;
|
|
653
|
+
_this.alert = alert;
|
|
654
|
+
return _this;
|
|
655
|
+
}
|
|
656
|
+
AlertDialogComponent.prototype.ngOnInit = function () {
|
|
657
|
+
};
|
|
658
|
+
AlertDialogComponent.ctorParameters = function () { return [
|
|
659
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [ACTIVITY_DATA,] }] }
|
|
660
|
+
]; };
|
|
661
|
+
AlertDialogComponent = __decorate([
|
|
662
|
+
core.Component({
|
|
663
|
+
selector: 'aup-alert-dialog',
|
|
664
|
+
template: "<h3 matDialogTitle *ngIf=\"alert.title\">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of alert.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-raised-button color=\"primary\" (click)=\"done()\" data-cy=\"close-button\">{{alert.ok()}}</button>\n</div>\n",
|
|
665
|
+
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
|
|
666
|
+
}),
|
|
667
|
+
__param(0, core.Inject(ACTIVITY_DATA)),
|
|
668
|
+
__metadata("design:paramtypes", [Object])
|
|
669
|
+
], AlertDialogComponent);
|
|
670
|
+
return AlertDialogComponent;
|
|
671
|
+
}(Activity));
|
|
672
|
+
|
|
673
|
+
var ConfirmThenDialogComponent = /** @class */ (function (_super) {
|
|
674
|
+
__extends(ConfirmThenDialogComponent, _super);
|
|
675
|
+
function ConfirmThenDialogComponent(config) {
|
|
676
|
+
var _this = _super.call(this) || this;
|
|
677
|
+
_this.config = config;
|
|
678
|
+
pectin.assert.notNil(config);
|
|
679
|
+
return _this;
|
|
680
|
+
}
|
|
681
|
+
ConfirmThenDialogComponent.prototype.ngOnInit = function () {
|
|
682
|
+
};
|
|
683
|
+
Object.defineProperty(ConfirmThenDialogComponent.prototype, "confirm", {
|
|
696
684
|
get: function () {
|
|
697
|
-
return this.
|
|
685
|
+
return this.config.confirm;
|
|
698
686
|
},
|
|
699
687
|
enumerable: true,
|
|
700
688
|
configurable: true
|
|
701
689
|
});
|
|
702
|
-
|
|
703
|
-
this.
|
|
704
|
-
};
|
|
705
|
-
ResizeAwareComponent.ctorParameters = function () { return [
|
|
706
|
-
{ type: core.ElementRef },
|
|
707
|
-
{ type: core.NgZone }
|
|
708
|
-
]; };
|
|
709
|
-
ResizeAwareComponent = __decorate([
|
|
710
|
-
core.Directive(),
|
|
711
|
-
__metadata("design:paramtypes", [core.ElementRef, core.NgZone])
|
|
712
|
-
], ResizeAwareComponent);
|
|
713
|
-
return ResizeAwareComponent;
|
|
714
|
-
}(DisposableComponent));
|
|
715
|
-
|
|
716
|
-
/**
|
|
717
|
-
* @example
|
|
718
|
-
* // CSS Vars
|
|
719
|
-
* aup-card-container {
|
|
720
|
-
* --card-gap: var(--card-gap, 16px);
|
|
721
|
-
* --card-width: var(--card-width, 300px);
|
|
722
|
-
* --card-height: var(--card-height, auto);
|
|
723
|
-
* --card-min-height: var(--card-min-height, auto);
|
|
724
|
-
* --card-background: var(--card-background, #fcfcfb);
|
|
725
|
-
* }
|
|
726
|
-
*
|
|
727
|
-
* // Content Templates:
|
|
728
|
-
* #addCardTemplate
|
|
729
|
-
* <ng-template #addCardTemplate>
|
|
730
|
-
* This is a new card template, it will the the size of the other cards.
|
|
731
|
-
* </nav-template>
|
|
732
|
-
*
|
|
733
|
-
*/
|
|
734
|
-
var CardContainerComponent = /** @class */ (function (_super) {
|
|
735
|
-
__extends(CardContainerComponent, _super);
|
|
736
|
-
function CardContainerComponent() {
|
|
737
|
-
return _super.call(this) || this;
|
|
738
|
-
}
|
|
739
|
-
CardContainerComponent.prototype.ngOnInit = function () {
|
|
740
|
-
};
|
|
741
|
-
__decorate([
|
|
742
|
-
core.Input(),
|
|
743
|
-
pectin.TrackExternal(),
|
|
744
|
-
__metadata("design:type", pectin.Command)
|
|
745
|
-
], CardContainerComponent.prototype, "addCardCommand", void 0);
|
|
746
|
-
__decorate([
|
|
747
|
-
core.ContentChild("addCardTemplate"),
|
|
748
|
-
__metadata("design:type", core.TemplateRef)
|
|
749
|
-
], CardContainerComponent.prototype, "addCardTemplate", void 0);
|
|
750
|
-
CardContainerComponent = __decorate([
|
|
751
|
-
core.Component({
|
|
752
|
-
selector: 'aup-card-container',
|
|
753
|
-
template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <mat-icon>add</mat-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n\n</div>\n",
|
|
754
|
-
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px)}aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
|
|
755
|
-
}),
|
|
756
|
-
__metadata("design:paramtypes", [])
|
|
757
|
-
], CardContainerComponent);
|
|
758
|
-
return CardContainerComponent;
|
|
759
|
-
}(DisposableComponent));
|
|
760
|
-
|
|
761
|
-
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
762
|
-
__extends(FocusContainerComponent, _super);
|
|
763
|
-
function FocusContainerComponent(focusManager) {
|
|
764
|
-
var _this = _super.call(this) || this;
|
|
765
|
-
_this.focusManager = focusManager;
|
|
766
|
-
_this.restoreFocusCommand = pectin.Command.create(function () {
|
|
767
|
-
_this.restoreFocus();
|
|
768
|
-
});
|
|
769
|
-
_this.tabIndex = -1;
|
|
770
|
-
return _this;
|
|
771
|
-
}
|
|
772
|
-
FocusContainerComponent.prototype.ngOnInit = function () {
|
|
773
|
-
};
|
|
774
|
-
// @Trace()
|
|
775
|
-
FocusContainerComponent.prototype.restoreFocus = function () {
|
|
776
|
-
this.focusManager.restoreFocus();
|
|
777
|
-
};
|
|
778
|
-
FocusContainerComponent.ctorParameters = function () { return [
|
|
779
|
-
{ type: pectin.FocusManager, decorators: [{ type: core.Self }] }
|
|
780
|
-
]; };
|
|
781
|
-
__decorate([
|
|
782
|
-
core.HostBinding('attr.tabindex'),
|
|
783
|
-
__metadata("design:type", Object)
|
|
784
|
-
], FocusContainerComponent.prototype, "tabIndex", void 0);
|
|
785
|
-
FocusContainerComponent = __decorate([
|
|
786
|
-
core.Component({
|
|
787
|
-
selector: 'aup-focus-container',
|
|
788
|
-
template: "<ng-content></ng-content>\n",
|
|
789
|
-
providers: [
|
|
790
|
-
{ provide: pectin.FocusManager }
|
|
791
|
-
],
|
|
792
|
-
styles: [":host{display:block}"]
|
|
793
|
-
}),
|
|
794
|
-
__param(0, core.Self()),
|
|
795
|
-
__metadata("design:paramtypes", [pectin.FocusManager])
|
|
796
|
-
], FocusContainerComponent);
|
|
797
|
-
return FocusContainerComponent;
|
|
798
|
-
}(DisposableComponent));
|
|
799
|
-
|
|
800
|
-
var ACTIVITY_DATA = new core.InjectionToken('InteractionActivityData');
|
|
801
|
-
var Activity = /** @class */ (function (_super) {
|
|
802
|
-
__extends(Activity, _super);
|
|
803
|
-
function Activity() {
|
|
804
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
805
|
-
_this._busyModel = new pectin.DelegatingValueModel().withDefault(false);
|
|
806
|
-
_this.class = 'aup-activity';
|
|
807
|
-
return _this;
|
|
808
|
-
}
|
|
809
|
-
Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
|
|
810
|
-
typescriptUtilities.assert.isNil(this._activityContext);
|
|
811
|
-
this._activityContext = activityContext;
|
|
812
|
-
this._interactionContext = nestedInteractionContext;
|
|
813
|
-
};
|
|
814
|
-
Object.defineProperty(Activity.prototype, "interactionContext", {
|
|
815
|
-
get: function () {
|
|
816
|
-
typescriptUtilities.assert.isTruthy(this.isInitialised());
|
|
817
|
-
return this._interactionContext;
|
|
818
|
-
},
|
|
819
|
-
enumerable: true,
|
|
820
|
-
configurable: true
|
|
821
|
-
});
|
|
822
|
-
Activity.prototype.done = function (result) {
|
|
823
|
-
return this._activityContext.onDone(result);
|
|
824
|
-
};
|
|
825
|
-
Activity.prototype.cancel = function (error) {
|
|
826
|
-
this._activityContext.onCancel(error);
|
|
827
|
-
};
|
|
828
|
-
// @Trace()
|
|
829
|
-
Activity.prototype.onActivityReady = function () {
|
|
830
|
-
};
|
|
831
|
-
Object.defineProperty(Activity.prototype, "busy", {
|
|
832
|
-
get: function () {
|
|
833
|
-
return this._busyModel.readonly;
|
|
834
|
-
},
|
|
835
|
-
enumerable: true,
|
|
836
|
-
configurable: true
|
|
837
|
-
});
|
|
838
|
-
Activity.prototype.busyWhile = function (busyModel) {
|
|
839
|
-
this._busyModel.setDelegate(busyModel);
|
|
840
|
-
};
|
|
841
|
-
Activity.prototype.isBusy = function () {
|
|
842
|
-
return this._busyModel.value;
|
|
843
|
-
};
|
|
844
|
-
Activity.prototype.isInitialised = function () {
|
|
845
|
-
return !!this._activityContext;
|
|
846
|
-
};
|
|
847
|
-
__decorate([
|
|
848
|
-
core.HostBinding('class'),
|
|
849
|
-
__metadata("design:type", Object)
|
|
850
|
-
], Activity.prototype, "class", void 0);
|
|
851
|
-
return Activity;
|
|
852
|
-
}(DisposableComponent));
|
|
853
|
-
|
|
854
|
-
var AlertDialogComponent = /** @class */ (function (_super) {
|
|
855
|
-
__extends(AlertDialogComponent, _super);
|
|
856
|
-
function AlertDialogComponent(alert) {
|
|
857
|
-
var _this = _super.call(this) || this;
|
|
858
|
-
_this.alert = alert;
|
|
859
|
-
return _this;
|
|
860
|
-
}
|
|
861
|
-
AlertDialogComponent.prototype.ngOnInit = function () {
|
|
862
|
-
};
|
|
863
|
-
AlertDialogComponent.ctorParameters = function () { return [
|
|
864
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [ACTIVITY_DATA,] }] }
|
|
865
|
-
]; };
|
|
866
|
-
AlertDialogComponent = __decorate([
|
|
867
|
-
core.Component({
|
|
868
|
-
selector: 'aup-alert-dialog',
|
|
869
|
-
template: "<h3 matDialogTitle *ngIf=\"alert.title\">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of alert.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-raised-button color=\"primary\" (click)=\"done()\" data-cy=\"close-button\">{{alert.ok()}}</button>\n</div>\n",
|
|
870
|
-
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
|
|
871
|
-
}),
|
|
872
|
-
__param(0, core.Inject(ACTIVITY_DATA)),
|
|
873
|
-
__metadata("design:paramtypes", [Object])
|
|
874
|
-
], AlertDialogComponent);
|
|
875
|
-
return AlertDialogComponent;
|
|
876
|
-
}(Activity));
|
|
877
|
-
|
|
878
|
-
var ConfirmThenDialogComponent = /** @class */ (function (_super) {
|
|
879
|
-
__extends(ConfirmThenDialogComponent, _super);
|
|
880
|
-
function ConfirmThenDialogComponent(config) {
|
|
881
|
-
var _this = _super.call(this) || this;
|
|
882
|
-
_this.config = config;
|
|
883
|
-
pectin.assert.notNil(config);
|
|
884
|
-
return _this;
|
|
885
|
-
}
|
|
886
|
-
ConfirmThenDialogComponent.prototype.ngOnInit = function () {
|
|
887
|
-
};
|
|
888
|
-
Object.defineProperty(ConfirmThenDialogComponent.prototype, "confirm", {
|
|
889
|
-
get: function () {
|
|
890
|
-
return this.config.confirm;
|
|
891
|
-
},
|
|
892
|
-
enumerable: true,
|
|
893
|
-
configurable: true
|
|
894
|
-
});
|
|
895
|
-
ConfirmThenDialogComponent.prototype.isDestructive = function () {
|
|
896
|
-
return this.confirm.destructive && this.confirm.destructive();
|
|
690
|
+
ConfirmThenDialogComponent.prototype.isDestructive = function () {
|
|
691
|
+
return this.confirm.destructive && this.confirm.destructive();
|
|
897
692
|
};
|
|
898
693
|
ConfirmThenDialogComponent.prototype.onConfirm = function () {
|
|
899
694
|
var _this = this;
|
|
@@ -1316,76 +1111,6 @@
|
|
|
1316
1111
|
return ActivityContainerComponent;
|
|
1317
1112
|
}(AbstractInteractionContext));
|
|
1318
1113
|
|
|
1319
|
-
var AddItemInteractionContextComponent = /** @class */ (function (_super) {
|
|
1320
|
-
__extends(AddItemInteractionContextComponent, _super);
|
|
1321
|
-
function AddItemInteractionContextComponent() {
|
|
1322
|
-
var _this = _super.call(this) || this;
|
|
1323
|
-
_this.tabindex = 0;
|
|
1324
|
-
_this.clickCommand = pectin.Command.create(function (context) {
|
|
1325
|
-
if (_this.activityClass) {
|
|
1326
|
-
_this.startActivity(_this.activityClass, _this.activityData).catch(function (e) {
|
|
1327
|
-
// don't care.
|
|
1328
|
-
});
|
|
1329
|
-
}
|
|
1330
|
-
else {
|
|
1331
|
-
_this.addCommand.withContext(context).execute();
|
|
1332
|
-
}
|
|
1333
|
-
});
|
|
1334
|
-
return _this;
|
|
1335
|
-
}
|
|
1336
|
-
Object.defineProperty(AddItemInteractionContextComponent.prototype, "active", {
|
|
1337
|
-
get: function () {
|
|
1338
|
-
return this.interactionContext ? this.interactionContext.isActive() : false;
|
|
1339
|
-
},
|
|
1340
|
-
enumerable: true,
|
|
1341
|
-
configurable: true
|
|
1342
|
-
});
|
|
1343
|
-
AddItemInteractionContextComponent.prototype.startActivity = function (activityType, data) {
|
|
1344
|
-
return this.interactionContext.startActivity(activityType, data);
|
|
1345
|
-
};
|
|
1346
|
-
AddItemInteractionContextComponent.prototype.ngOnInit = function () {
|
|
1347
|
-
};
|
|
1348
|
-
__decorate([
|
|
1349
|
-
core.Input(),
|
|
1350
|
-
__metadata("design:type", String)
|
|
1351
|
-
], AddItemInteractionContextComponent.prototype, "label", void 0);
|
|
1352
|
-
__decorate([
|
|
1353
|
-
core.Input(),
|
|
1354
|
-
__metadata("design:type", Object)
|
|
1355
|
-
], AddItemInteractionContextComponent.prototype, "activityClass", void 0);
|
|
1356
|
-
__decorate([
|
|
1357
|
-
core.Input(),
|
|
1358
|
-
__metadata("design:type", Object)
|
|
1359
|
-
], AddItemInteractionContextComponent.prototype, "activityData", void 0);
|
|
1360
|
-
__decorate([
|
|
1361
|
-
core.Input(),
|
|
1362
|
-
pectin.TrackExternal(),
|
|
1363
|
-
__metadata("design:type", pectin.Command)
|
|
1364
|
-
], AddItemInteractionContextComponent.prototype, "addCommand", void 0);
|
|
1365
|
-
__decorate([
|
|
1366
|
-
core.ViewChild(InPlaceInteractionContextComponent),
|
|
1367
|
-
__metadata("design:type", InPlaceInteractionContextComponent)
|
|
1368
|
-
], AddItemInteractionContextComponent.prototype, "interactionContext", void 0);
|
|
1369
|
-
__decorate([
|
|
1370
|
-
core.HostBinding('class.interaction-active'),
|
|
1371
|
-
__metadata("design:type", Boolean),
|
|
1372
|
-
__metadata("design:paramtypes", [])
|
|
1373
|
-
], AddItemInteractionContextComponent.prototype, "active", null);
|
|
1374
|
-
__decorate([
|
|
1375
|
-
core.HostBinding('tabindex'),
|
|
1376
|
-
__metadata("design:type", Object)
|
|
1377
|
-
], AddItemInteractionContextComponent.prototype, "tabindex", void 0);
|
|
1378
|
-
AddItemInteractionContextComponent = __decorate([
|
|
1379
|
-
core.Component({
|
|
1380
|
-
selector: 'aup-add-item-interaction-context',
|
|
1381
|
-
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",
|
|
1382
|
-
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}"]
|
|
1383
|
-
}),
|
|
1384
|
-
__metadata("design:paramtypes", [])
|
|
1385
|
-
], AddItemInteractionContextComponent);
|
|
1386
|
-
return AddItemInteractionContextComponent;
|
|
1387
|
-
}(DisposableComponent));
|
|
1388
|
-
|
|
1389
1114
|
var InteractionServiceRoutingAdapter = /** @class */ (function () {
|
|
1390
1115
|
function InteractionServiceRoutingAdapter(activeInteractionContextIds, activeModalContext, createExclusiveInteractionContext) {
|
|
1391
1116
|
this.activeInteractionContextIds = activeInteractionContextIds;
|
|
@@ -1649,9 +1374,79 @@
|
|
|
1649
1374
|
return InPlaceInteractionContextComponent;
|
|
1650
1375
|
}(DisposableComponent));
|
|
1651
1376
|
|
|
1652
|
-
var
|
|
1653
|
-
__extends(
|
|
1654
|
-
function
|
|
1377
|
+
var AddItemInteractionContextComponent = /** @class */ (function (_super) {
|
|
1378
|
+
__extends(AddItemInteractionContextComponent, _super);
|
|
1379
|
+
function AddItemInteractionContextComponent() {
|
|
1380
|
+
var _this = _super.call(this) || this;
|
|
1381
|
+
_this.tabindex = 0;
|
|
1382
|
+
_this.clickCommand = pectin.Command.create(function (context) {
|
|
1383
|
+
if (_this.activityClass) {
|
|
1384
|
+
_this.startActivity(_this.activityClass, _this.activityData).catch(function (e) {
|
|
1385
|
+
// don't care.
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
else {
|
|
1389
|
+
_this.addCommand.withContext(context).execute();
|
|
1390
|
+
}
|
|
1391
|
+
});
|
|
1392
|
+
return _this;
|
|
1393
|
+
}
|
|
1394
|
+
Object.defineProperty(AddItemInteractionContextComponent.prototype, "active", {
|
|
1395
|
+
get: function () {
|
|
1396
|
+
return this.interactionContext ? this.interactionContext.isActive() : false;
|
|
1397
|
+
},
|
|
1398
|
+
enumerable: true,
|
|
1399
|
+
configurable: true
|
|
1400
|
+
});
|
|
1401
|
+
AddItemInteractionContextComponent.prototype.startActivity = function (activityType, data) {
|
|
1402
|
+
return this.interactionContext.startActivity(activityType, data);
|
|
1403
|
+
};
|
|
1404
|
+
AddItemInteractionContextComponent.prototype.ngOnInit = function () {
|
|
1405
|
+
};
|
|
1406
|
+
__decorate([
|
|
1407
|
+
core.Input(),
|
|
1408
|
+
__metadata("design:type", String)
|
|
1409
|
+
], AddItemInteractionContextComponent.prototype, "label", void 0);
|
|
1410
|
+
__decorate([
|
|
1411
|
+
core.Input(),
|
|
1412
|
+
__metadata("design:type", Object)
|
|
1413
|
+
], AddItemInteractionContextComponent.prototype, "activityClass", void 0);
|
|
1414
|
+
__decorate([
|
|
1415
|
+
core.Input(),
|
|
1416
|
+
__metadata("design:type", Object)
|
|
1417
|
+
], AddItemInteractionContextComponent.prototype, "activityData", void 0);
|
|
1418
|
+
__decorate([
|
|
1419
|
+
core.Input(),
|
|
1420
|
+
pectin.TrackExternal(),
|
|
1421
|
+
__metadata("design:type", pectin.Command)
|
|
1422
|
+
], AddItemInteractionContextComponent.prototype, "addCommand", void 0);
|
|
1423
|
+
__decorate([
|
|
1424
|
+
core.ViewChild(InPlaceInteractionContextComponent),
|
|
1425
|
+
__metadata("design:type", InPlaceInteractionContextComponent)
|
|
1426
|
+
], AddItemInteractionContextComponent.prototype, "interactionContext", void 0);
|
|
1427
|
+
__decorate([
|
|
1428
|
+
core.HostBinding('class.interaction-active'),
|
|
1429
|
+
__metadata("design:type", Boolean),
|
|
1430
|
+
__metadata("design:paramtypes", [])
|
|
1431
|
+
], AddItemInteractionContextComponent.prototype, "active", null);
|
|
1432
|
+
__decorate([
|
|
1433
|
+
core.HostBinding('tabindex'),
|
|
1434
|
+
__metadata("design:type", Object)
|
|
1435
|
+
], AddItemInteractionContextComponent.prototype, "tabindex", void 0);
|
|
1436
|
+
AddItemInteractionContextComponent = __decorate([
|
|
1437
|
+
core.Component({
|
|
1438
|
+
selector: 'aup-add-item-interaction-context',
|
|
1439
|
+
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",
|
|
1440
|
+
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}"]
|
|
1441
|
+
}),
|
|
1442
|
+
__metadata("design:paramtypes", [])
|
|
1443
|
+
], AddItemInteractionContextComponent);
|
|
1444
|
+
return AddItemInteractionContextComponent;
|
|
1445
|
+
}(DisposableComponent));
|
|
1446
|
+
|
|
1447
|
+
var PopupInteractionContextComponent = /** @class */ (function (_super) {
|
|
1448
|
+
__extends(PopupInteractionContextComponent, _super);
|
|
1449
|
+
function PopupInteractionContextComponent(_element, _overlay) {
|
|
1655
1450
|
var _this = _super.call(this) || this;
|
|
1656
1451
|
_this._element = _element;
|
|
1657
1452
|
_this._overlay = _overlay;
|
|
@@ -1822,6 +1617,210 @@
|
|
|
1822
1617
|
return InteractionContextTriggerFor;
|
|
1823
1618
|
}(pectin.GarbageCollector));
|
|
1824
1619
|
|
|
1620
|
+
var InteractionModule = /** @class */ (function () {
|
|
1621
|
+
function InteractionModule() {
|
|
1622
|
+
}
|
|
1623
|
+
InteractionModule = __decorate([
|
|
1624
|
+
core.NgModule({
|
|
1625
|
+
imports: [
|
|
1626
|
+
common.CommonModule,
|
|
1627
|
+
button.MatButtonModule,
|
|
1628
|
+
dialog.MatDialogModule,
|
|
1629
|
+
tabs.MatTabsModule,
|
|
1630
|
+
portal.PortalModule,
|
|
1631
|
+
router.RouterModule,
|
|
1632
|
+
icon.MatIconModule,
|
|
1633
|
+
DirectivesModule,
|
|
1634
|
+
flexLayout.FlexModule,
|
|
1635
|
+
flexLayout.GridModule
|
|
1636
|
+
],
|
|
1637
|
+
declarations: [
|
|
1638
|
+
ActivityContainerComponent,
|
|
1639
|
+
ConfirmationDialogComponent,
|
|
1640
|
+
ConfirmThenDialogComponent,
|
|
1641
|
+
AlertDialogComponent,
|
|
1642
|
+
ActivityOutletComponent,
|
|
1643
|
+
InPlaceInteractionContextComponent,
|
|
1644
|
+
AddItemInteractionContextComponent,
|
|
1645
|
+
ActivityActionsComponent,
|
|
1646
|
+
PopupInteractionContextComponent,
|
|
1647
|
+
InteractionContextTriggerFor
|
|
1648
|
+
],
|
|
1649
|
+
exports: [
|
|
1650
|
+
ActivityContainerComponent,
|
|
1651
|
+
ActivityOutletComponent,
|
|
1652
|
+
InPlaceInteractionContextComponent,
|
|
1653
|
+
AddItemInteractionContextComponent,
|
|
1654
|
+
ActivityActionsComponent,
|
|
1655
|
+
PopupInteractionContextComponent,
|
|
1656
|
+
InteractionContextTriggerFor
|
|
1657
|
+
],
|
|
1658
|
+
entryComponents: [
|
|
1659
|
+
ActivityContainerComponent,
|
|
1660
|
+
ConfirmationDialogComponent,
|
|
1661
|
+
ConfirmThenDialogComponent,
|
|
1662
|
+
AlertDialogComponent
|
|
1663
|
+
],
|
|
1664
|
+
providers: [
|
|
1665
|
+
exports.ɵbw
|
|
1666
|
+
// {
|
|
1667
|
+
// provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
|
|
1668
|
+
// }
|
|
1669
|
+
]
|
|
1670
|
+
})
|
|
1671
|
+
], InteractionModule);
|
|
1672
|
+
return InteractionModule;
|
|
1673
|
+
}());
|
|
1674
|
+
|
|
1675
|
+
/**
|
|
1676
|
+
* @example
|
|
1677
|
+
* // CSS Vars
|
|
1678
|
+
* aup-card-container {
|
|
1679
|
+
* --card-gap: var(--card-gap, 16px);
|
|
1680
|
+
* --card-width: var(--card-width, 300px);
|
|
1681
|
+
* --card-height: var(--card-height, auto);
|
|
1682
|
+
* --card-min-height: var(--card-min-height, auto);
|
|
1683
|
+
* --card-background: var(--card-background, #fcfcfb);
|
|
1684
|
+
* }
|
|
1685
|
+
*
|
|
1686
|
+
* // Content Templates:
|
|
1687
|
+
* #addCardTemplate
|
|
1688
|
+
* <ng-template #addCardTemplate>
|
|
1689
|
+
* This is a new card template, it will the the size of the other cards.
|
|
1690
|
+
* </nav-template>
|
|
1691
|
+
*
|
|
1692
|
+
*/
|
|
1693
|
+
var CardContainerComponent = /** @class */ (function (_super) {
|
|
1694
|
+
__extends(CardContainerComponent, _super);
|
|
1695
|
+
function CardContainerComponent() {
|
|
1696
|
+
return _super.call(this) || this;
|
|
1697
|
+
}
|
|
1698
|
+
CardContainerComponent.prototype.ngOnInit = function () {
|
|
1699
|
+
};
|
|
1700
|
+
__decorate([
|
|
1701
|
+
core.Input(),
|
|
1702
|
+
pectin.TrackExternal(),
|
|
1703
|
+
__metadata("design:type", pectin.Command)
|
|
1704
|
+
], CardContainerComponent.prototype, "addCardCommand", void 0);
|
|
1705
|
+
__decorate([
|
|
1706
|
+
core.ContentChild("addCardTemplate"),
|
|
1707
|
+
__metadata("design:type", core.TemplateRef)
|
|
1708
|
+
], CardContainerComponent.prototype, "addCardTemplate", void 0);
|
|
1709
|
+
CardContainerComponent = __decorate([
|
|
1710
|
+
core.Component({
|
|
1711
|
+
selector: 'aup-card-container',
|
|
1712
|
+
template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <mat-icon>add</mat-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n\n</div>\n",
|
|
1713
|
+
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px)}aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
|
|
1714
|
+
}),
|
|
1715
|
+
__metadata("design:paramtypes", [])
|
|
1716
|
+
], CardContainerComponent);
|
|
1717
|
+
return CardContainerComponent;
|
|
1718
|
+
}(DisposableComponent));
|
|
1719
|
+
|
|
1720
|
+
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
1721
|
+
__extends(FocusContainerComponent, _super);
|
|
1722
|
+
function FocusContainerComponent(focusManager) {
|
|
1723
|
+
var _this = _super.call(this) || this;
|
|
1724
|
+
_this.focusManager = focusManager;
|
|
1725
|
+
_this.restoreFocusCommand = pectin.Command.create(function () {
|
|
1726
|
+
_this.restoreFocus();
|
|
1727
|
+
});
|
|
1728
|
+
_this.tabIndex = -1;
|
|
1729
|
+
return _this;
|
|
1730
|
+
}
|
|
1731
|
+
FocusContainerComponent.prototype.ngOnInit = function () {
|
|
1732
|
+
};
|
|
1733
|
+
// @Trace()
|
|
1734
|
+
FocusContainerComponent.prototype.restoreFocus = function () {
|
|
1735
|
+
this.focusManager.restoreFocus();
|
|
1736
|
+
};
|
|
1737
|
+
FocusContainerComponent.ctorParameters = function () { return [
|
|
1738
|
+
{ type: pectin.FocusManager, decorators: [{ type: core.Self }] }
|
|
1739
|
+
]; };
|
|
1740
|
+
__decorate([
|
|
1741
|
+
core.HostBinding('attr.tabindex'),
|
|
1742
|
+
__metadata("design:type", Object)
|
|
1743
|
+
], FocusContainerComponent.prototype, "tabIndex", void 0);
|
|
1744
|
+
FocusContainerComponent = __decorate([
|
|
1745
|
+
core.Component({
|
|
1746
|
+
selector: 'aup-focus-container',
|
|
1747
|
+
template: "<ng-content></ng-content>\n",
|
|
1748
|
+
providers: [
|
|
1749
|
+
{ provide: pectin.FocusManager }
|
|
1750
|
+
],
|
|
1751
|
+
styles: [":host{display:block}"]
|
|
1752
|
+
}),
|
|
1753
|
+
__param(0, core.Self()),
|
|
1754
|
+
__metadata("design:paramtypes", [pectin.FocusManager])
|
|
1755
|
+
], FocusContainerComponent);
|
|
1756
|
+
return FocusContainerComponent;
|
|
1757
|
+
}(DisposableComponent));
|
|
1758
|
+
|
|
1759
|
+
var FocusableComponent = /** @class */ (function (_super) {
|
|
1760
|
+
__extends(FocusableComponent, _super);
|
|
1761
|
+
function FocusableComponent(el, focusManager, focusBindingFactory) {
|
|
1762
|
+
var _this = _super.call(this) || this;
|
|
1763
|
+
_this.el = el;
|
|
1764
|
+
_this.focusManager = focusManager;
|
|
1765
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1766
|
+
if (_this.focusManager) {
|
|
1767
|
+
_this._focusContext = _this.focusManager.registerFocusable(_this);
|
|
1768
|
+
_this.registerDisposable(_this._focusContext);
|
|
1769
|
+
_this.registerDisposable(focusBindingFactory.createBinding(el.nativeElement, _this.focusContext));
|
|
1770
|
+
}
|
|
1771
|
+
return _this;
|
|
1772
|
+
}
|
|
1773
|
+
Object.defineProperty(FocusableComponent.prototype, "focusable", {
|
|
1774
|
+
get: function () {
|
|
1775
|
+
return !!this.focusContext ? 0 : undefined;
|
|
1776
|
+
},
|
|
1777
|
+
enumerable: true,
|
|
1778
|
+
configurable: true
|
|
1779
|
+
});
|
|
1780
|
+
FocusableComponent.prototype.onFocus = function () {
|
|
1781
|
+
var _a;
|
|
1782
|
+
(_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusIn();
|
|
1783
|
+
};
|
|
1784
|
+
FocusableComponent.prototype.onBlur = function () {
|
|
1785
|
+
var _a;
|
|
1786
|
+
(_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusOut();
|
|
1787
|
+
};
|
|
1788
|
+
Object.defineProperty(FocusableComponent.prototype, "focusContext", {
|
|
1789
|
+
get: function () {
|
|
1790
|
+
return this._focusContext;
|
|
1791
|
+
},
|
|
1792
|
+
enumerable: true,
|
|
1793
|
+
configurable: true
|
|
1794
|
+
});
|
|
1795
|
+
FocusableComponent.ctorParameters = function () { return [
|
|
1796
|
+
{ type: core.ElementRef },
|
|
1797
|
+
{ type: pectin.FocusManager },
|
|
1798
|
+
{ type: FocusBindingFactory }
|
|
1799
|
+
]; };
|
|
1800
|
+
__decorate([
|
|
1801
|
+
core.HostBinding('attr.tabindex'),
|
|
1802
|
+
__metadata("design:type", Object),
|
|
1803
|
+
__metadata("design:paramtypes", [])
|
|
1804
|
+
], FocusableComponent.prototype, "focusable", null);
|
|
1805
|
+
__decorate([
|
|
1806
|
+
core.HostListener('focus'),
|
|
1807
|
+
__metadata("design:type", Function),
|
|
1808
|
+
__metadata("design:paramtypes", []),
|
|
1809
|
+
__metadata("design:returntype", void 0)
|
|
1810
|
+
], FocusableComponent.prototype, "onFocus", null);
|
|
1811
|
+
__decorate([
|
|
1812
|
+
core.HostListener('blur'),
|
|
1813
|
+
__metadata("design:type", Function),
|
|
1814
|
+
__metadata("design:paramtypes", []),
|
|
1815
|
+
__metadata("design:returntype", void 0)
|
|
1816
|
+
], FocusableComponent.prototype, "onBlur", null);
|
|
1817
|
+
FocusableComponent = __decorate([
|
|
1818
|
+
core.Component({ template: '' }),
|
|
1819
|
+
__metadata("design:paramtypes", [core.ElementRef, pectin.FocusManager, FocusBindingFactory])
|
|
1820
|
+
], FocusableComponent);
|
|
1821
|
+
return FocusableComponent;
|
|
1822
|
+
}(DisposableComponent));
|
|
1823
|
+
|
|
1825
1824
|
var DialogInteractionContext = /** @class */ (function (_super) {
|
|
1826
1825
|
__extends(DialogInteractionContext, _super);
|
|
1827
1826
|
function DialogInteractionContext(identifier, api, dialogService, config) {
|
|
@@ -2492,288 +2491,101 @@
|
|
|
2492
2491
|
else {
|
|
2493
2492
|
console.warn("found no matching or default case values.");
|
|
2494
2493
|
this.selectedIndex = -1;
|
|
2495
|
-
}
|
|
2496
|
-
};
|
|
2497
|
-
SwitchCaseComponent.ctorParameters = function () { return [
|
|
2498
|
-
{ type: core.ChangeDetectorRef }
|
|
2499
|
-
]; };
|
|
2500
|
-
__decorate([
|
|
2501
|
-
core.Input(), pectin.TrackExternal(),
|
|
2502
|
-
__metadata("design:type", pectin.ValueModel)
|
|
2503
|
-
], SwitchCaseComponent.prototype, "switchModel", void 0);
|
|
2504
|
-
__decorate([
|
|
2505
|
-
core.Input(), pectin.StoreInValueModel('switchModel'),
|
|
2506
|
-
__metadata("design:type", Object)
|
|
2507
|
-
], SwitchCaseComponent.prototype, "switch", void 0);
|
|
2508
|
-
__decorate([
|
|
2509
|
-
core.ContentChildren(SwitchCaseOption),
|
|
2510
|
-
__metadata("design:type", core.QueryList)
|
|
2511
|
-
], SwitchCaseComponent.prototype, "switchCaseOptions", void 0);
|
|
2512
|
-
SwitchCaseComponent = __decorate([
|
|
2513
|
-
core.Component({
|
|
2514
|
-
selector: 'aup-switch-case',
|
|
2515
|
-
template: "<mat-tab-group class=\"content-wrapper\" no-tab-header full-height-tabs [selectedIndex]=\"selectedIndex\">\n <mat-tab *ngFor=\"let option of switchCaseOptions\">\n <ng-template [ngTemplateOutlet]=\"option.templateRef\"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n",
|
|
2516
|
-
styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
|
|
2517
|
-
}),
|
|
2518
|
-
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
2519
|
-
], SwitchCaseComponent);
|
|
2520
|
-
return SwitchCaseComponent;
|
|
2521
|
-
}(DisposableComponent));
|
|
2522
|
-
|
|
2523
|
-
var DefaultCellRendererComponent = /** @class */ (function () {
|
|
2524
|
-
function DefaultCellRendererComponent() {
|
|
2525
|
-
}
|
|
2526
|
-
Object.defineProperty(DefaultCellRendererComponent.prototype, "value", {
|
|
2527
|
-
get: function () {
|
|
2528
|
-
return this._value;
|
|
2529
|
-
},
|
|
2530
|
-
set: function (value) {
|
|
2531
|
-
this._value = value;
|
|
2532
|
-
},
|
|
2533
|
-
enumerable: true,
|
|
2534
|
-
configurable: true
|
|
2535
|
-
});
|
|
2536
|
-
__decorate([
|
|
2537
|
-
core.Input(),
|
|
2538
|
-
__metadata("design:type", Object),
|
|
2539
|
-
__metadata("design:paramtypes", [Object])
|
|
2540
|
-
], DefaultCellRendererComponent.prototype, "value", null);
|
|
2541
|
-
DefaultCellRendererComponent = __decorate([
|
|
2542
|
-
core.Component({
|
|
2543
|
-
selector: 'aup-default-cell-renderer',
|
|
2544
|
-
template: "{{value}}\n",
|
|
2545
|
-
styles: [""]
|
|
2546
|
-
}),
|
|
2547
|
-
__metadata("design:paramtypes", [])
|
|
2548
|
-
], DefaultCellRendererComponent);
|
|
2549
|
-
return DefaultCellRendererComponent;
|
|
2550
|
-
}());
|
|
2551
|
-
|
|
2552
|
-
var DefaultHeaderCellRendererComponent = /** @class */ (function () {
|
|
2553
|
-
function DefaultHeaderCellRendererComponent() {
|
|
2554
|
-
}
|
|
2555
|
-
__decorate([
|
|
2556
|
-
core.Input(),
|
|
2557
|
-
__metadata("design:type", ColumnModel)
|
|
2558
|
-
], DefaultHeaderCellRendererComponent.prototype, "columnModel", void 0);
|
|
2559
|
-
DefaultHeaderCellRendererComponent = __decorate([
|
|
2560
|
-
core.Component({
|
|
2561
|
-
selector: 'aup-default-header-renderer',
|
|
2562
|
-
template: "{{columnModel.getHeaderText()}}\n",
|
|
2563
|
-
styles: [""]
|
|
2564
|
-
}),
|
|
2565
|
-
__metadata("design:paramtypes", [])
|
|
2566
|
-
], DefaultHeaderCellRendererComponent);
|
|
2567
|
-
return DefaultHeaderCellRendererComponent;
|
|
2568
|
-
}());
|
|
2569
|
-
|
|
2570
|
-
// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
|
|
2571
|
-
// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
|
|
2572
|
-
/**
|
|
2573
|
-
* Example:
|
|
2574
|
-
* @example
|
|
2575
|
-
* const model = TableModel.fromList(heroList, table => {
|
|
2576
|
-
* table.pluck("firstName");
|
|
2577
|
-
* table.pluck("lastName");
|
|
2578
|
-
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2579
|
-
* });
|
|
2580
|
-
*
|
|
2581
|
-
* Editable tables
|
|
2582
|
-
* @example
|
|
2583
|
-
* const saveCommand = UnaryCommand.create((form: Form<Hero>) => {
|
|
2584
|
-
* if (form.validate()) {
|
|
2585
|
-
* // normal form save stuff
|
|
2586
|
-
* return true; // finish editing
|
|
2587
|
-
* }
|
|
2588
|
-
* return false; // continue editiing
|
|
2589
|
-
* }
|
|
2590
|
-
* const colorsNames: ListModel<string> = ...;
|
|
2591
|
-
* const model = TableModel.fromList(heroList, table => {
|
|
2592
|
-
* table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
|
|
2593
|
-
* table.pluck("lastName").cellEditor(StringInputComponent, {
|
|
2594
|
-
* validators: [Validator.present("We need a last name")]
|
|
2595
|
-
* });
|
|
2596
|
-
* table.pluck("age").cellEditor(NumberInputComponent);
|
|
2597
|
-
* table.pluck("favoriteColor").cellEditor(SelectInputComponent, {
|
|
2598
|
-
* initialiseComponent(component: SelectInputComponent) {
|
|
2599
|
-
* selectInput.optionsModel = colorsNames; // <- initialise our component
|
|
2600
|
-
* }
|
|
2601
|
-
* });
|
|
2602
|
-
* table.addEditControls(saveCommand); // <- required to enable editing
|
|
2603
|
-
* });
|
|
2604
|
-
*
|
|
2605
|
-
* Selection models
|
|
2606
|
-
* @example
|
|
2607
|
-
* const model = TableModel.fromList(heroList, table => {
|
|
2608
|
-
* table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
|
|
2609
|
-
* table.pluck("firstName");
|
|
2610
|
-
* table.pluck("lastName");
|
|
2611
|
-
* });
|
|
2612
|
-
*
|
|
2613
|
-
* Custom cell renderers and editors
|
|
2614
|
-
* @example
|
|
2615
|
-
* const model = TableModel.fromList(heroList, table => {
|
|
2616
|
-
* table.pluck("favoriteColor")
|
|
2617
|
-
* .cellHeaderRenderer(CellHeaderRendererComponent, (component, column) => {
|
|
2618
|
-
* // configure your component with what ever you need.
|
|
2619
|
-
* });
|
|
2620
|
-
* .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }
|
|
2621
|
-
* .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
|
|
2622
|
-
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2623
|
-
* });
|
|
2624
|
-
*
|
|
2625
|
-
* I18n
|
|
2626
|
-
* @example
|
|
2627
|
-
* [table.yml]
|
|
2628
|
-
* table:
|
|
2629
|
-
* columns(ColumnTextProperties[]):
|
|
2630
|
-
* firstName:
|
|
2631
|
-
* headerText: "First Name"
|
|
2632
|
-
* fullName:
|
|
2633
|
-
* headerText: "Full Name"
|
|
2634
|
-
*
|
|
2635
|
-
* const model = TableModel.fromList(heroList, table => {
|
|
2636
|
-
* table.pluck("favoriteColor").cellRenderer(...).cellEditor(...);
|
|
2637
|
-
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2638
|
-
*
|
|
2639
|
-
* table.columnTextProperties(I18n.table.columns); // <- configures all columns
|
|
2640
|
-
* });
|
|
2641
|
-
*/
|
|
2642
|
-
exports.TableModel = /** @class */ (function () {
|
|
2643
|
-
function TableModel(sourceOfTruth) {
|
|
2644
|
-
this.sourceOfTruth = sourceOfTruth;
|
|
2645
|
-
this._garbage = new pectin.GarbageCollector();
|
|
2646
|
-
this._columns = new pectin.MutableListModel();
|
|
2647
|
-
this._editorSessions = new pectin.MutableListModel();
|
|
2648
|
-
this.identityOf = sourceOfTruth.identityOf;
|
|
2649
|
-
var _a = pectin.Dsl.disposeWith(this._garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2650
|
-
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
2651
|
-
this._rowsBeingEdited = new pectin.MutableListModel([], {
|
|
2652
|
-
identifiedWith: this.identityOf
|
|
2653
|
-
});
|
|
2654
|
-
this._editorSessionByRowId = chain(this._editorSessions).indexBy('rowId');
|
|
2655
|
-
this.editing = chain(this._editorSessions).count().isGreaterThan(0);
|
|
2656
|
-
this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
|
|
2657
|
-
}
|
|
2658
|
-
TableModel_1 = TableModel;
|
|
2659
|
-
TableModel.fromList = function (sourceOfTruth, builder) {
|
|
2660
|
-
var model = new TableModel_1(sourceOfTruth);
|
|
2661
|
-
builder(model);
|
|
2662
|
-
return model;
|
|
2663
|
-
};
|
|
2664
|
-
Object.defineProperty(TableModel.prototype, "rowsBeingEdited", {
|
|
2665
|
-
get: function () {
|
|
2666
|
-
return this._rowsBeingEdited.readonly;
|
|
2667
|
-
},
|
|
2668
|
-
enumerable: true,
|
|
2669
|
-
configurable: true
|
|
2670
|
-
});
|
|
2671
|
-
TableModel.prototype.getTrackByFunction = function () {
|
|
2672
|
-
var _this = this;
|
|
2673
|
-
return function (index, item) {
|
|
2674
|
-
return _this.identityOf ? _this.identityOf(item) : index;
|
|
2675
|
-
};
|
|
2676
|
-
};
|
|
2677
|
-
Object.defineProperty(TableModel.prototype, "columns", {
|
|
2678
|
-
get: function () {
|
|
2679
|
-
return this._columns.readonly;
|
|
2680
|
-
},
|
|
2681
|
-
enumerable: true,
|
|
2682
|
-
configurable: true
|
|
2683
|
-
});
|
|
2684
|
-
TableModel.prototype.pluck = function (property) {
|
|
2685
|
-
return this.addColumn(new PropertyColumnModel(property, this));
|
|
2686
|
-
};
|
|
2687
|
-
TableModel.prototype.addSelectionColumn = function (selectionModel) {
|
|
2688
|
-
return this.addColumn(new SelectionColumnModel('selection', this, selectionModel));
|
|
2689
|
-
};
|
|
2690
|
-
TableModel.prototype.addEditControls = function (saveCommand) {
|
|
2691
|
-
this.saveCommand = saveCommand;
|
|
2692
|
-
return this.addColumn(new EditorControlColumnModel('editControls', saveCommand, this));
|
|
2693
|
-
};
|
|
2694
|
-
TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
|
|
2695
|
-
return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
|
|
2696
|
-
};
|
|
2697
|
-
TableModel.prototype.addColumn = function (column) {
|
|
2698
|
-
if (this._columnsById.get(column.columnId)) {
|
|
2699
|
-
pectin.lang.illegalState("Column with id=" + column.columnId + " already exists");
|
|
2700
|
-
}
|
|
2701
|
-
else {
|
|
2702
|
-
this._columns.push(column);
|
|
2703
|
-
}
|
|
2704
|
-
return column;
|
|
2705
|
-
};
|
|
2706
|
-
TableModel.prototype.columnTextProperties = function (columnTextProperties) {
|
|
2707
|
-
this._columnTextPropertiesLookup = columnTextProperties;
|
|
2708
|
-
};
|
|
2709
|
-
TableModel.prototype.getColumnTextProperties = function (column) {
|
|
2710
|
-
var factory = this._columnTextPropertiesLookup[column.columnId];
|
|
2711
|
-
return factory ? factory() : undefined;
|
|
2712
|
-
};
|
|
2713
|
-
TableModel.prototype.startEditSession = function (row) {
|
|
2714
|
-
var _this = this;
|
|
2715
|
-
var rowId = this.identityOf(row);
|
|
2716
|
-
if (this._rowsBeingEdited.query().indexOf(row) > -1) {
|
|
2717
|
-
return pectin.lang.illegalState("Row with id=" + rowId + " already being edited");
|
|
2718
|
-
}
|
|
2719
|
-
else {
|
|
2720
|
-
var editSession_1 = new TableModel_1.EditSession(rowId, row, this.saveCommand);
|
|
2721
|
-
var when = pectin.Dsl.disposeWith(editSession_1).when;
|
|
2722
|
-
when.valueOf(editSession_1.rowValueModel).changes(function (editedValue) {
|
|
2723
|
-
_this._rowsBeingEdited.replaceOrPush(editedValue);
|
|
2724
|
-
}, { initialValue: 'triggerChangeUnlessNil' });
|
|
2725
|
-
this._editorSessions.push(editSession_1);
|
|
2726
|
-
editSession_1.onDispose(function () {
|
|
2727
|
-
_this._rowsBeingEdited.remove(editSession_1.rowValueModel.value);
|
|
2728
|
-
_this._editorSessions.remove(editSession_1);
|
|
2729
|
-
});
|
|
2730
|
-
return editSession_1;
|
|
2731
|
-
}
|
|
2732
|
-
};
|
|
2733
|
-
TableModel.prototype.getEditSessionFor = function (row) {
|
|
2734
|
-
return this._editorSessionByRowId.get(this.identityOf(row));
|
|
2735
|
-
};
|
|
2736
|
-
TableModel.prototype.cancelAllEditorSessions = function () {
|
|
2737
|
-
var _this = this;
|
|
2738
|
-
this._editorSessions.runInTransaction(function (draft) {
|
|
2739
|
-
_this._rowsBeingEdited.runInTransaction(function () {
|
|
2740
|
-
draft.value.forEach(function (session) { return session.dispose(); });
|
|
2741
|
-
});
|
|
2742
|
-
});
|
|
2494
|
+
}
|
|
2743
2495
|
};
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
{ type: pectin.ListModel }
|
|
2496
|
+
SwitchCaseComponent.ctorParameters = function () { return [
|
|
2497
|
+
{ type: core.ChangeDetectorRef }
|
|
2747
2498
|
]; };
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
__metadata("design:
|
|
2751
|
-
],
|
|
2752
|
-
|
|
2499
|
+
__decorate([
|
|
2500
|
+
core.Input(), pectin.TrackExternal(),
|
|
2501
|
+
__metadata("design:type", pectin.ValueModel)
|
|
2502
|
+
], SwitchCaseComponent.prototype, "switchModel", void 0);
|
|
2503
|
+
__decorate([
|
|
2504
|
+
core.Input(), pectin.StoreInValueModel('switchModel'),
|
|
2505
|
+
__metadata("design:type", Object)
|
|
2506
|
+
], SwitchCaseComponent.prototype, "switch", void 0);
|
|
2507
|
+
__decorate([
|
|
2508
|
+
core.ContentChildren(SwitchCaseOption),
|
|
2509
|
+
__metadata("design:type", core.QueryList)
|
|
2510
|
+
], SwitchCaseComponent.prototype, "switchCaseOptions", void 0);
|
|
2511
|
+
SwitchCaseComponent = __decorate([
|
|
2512
|
+
core.Component({
|
|
2513
|
+
selector: 'aup-switch-case',
|
|
2514
|
+
template: "<mat-tab-group class=\"content-wrapper\" no-tab-header full-height-tabs [selectedIndex]=\"selectedIndex\">\n <mat-tab *ngFor=\"let option of switchCaseOptions\">\n <ng-template [ngTemplateOutlet]=\"option.templateRef\"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n",
|
|
2515
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
|
|
2516
|
+
}),
|
|
2517
|
+
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
2518
|
+
], SwitchCaseComponent);
|
|
2519
|
+
return SwitchCaseComponent;
|
|
2520
|
+
}(DisposableComponent));
|
|
2521
|
+
|
|
2522
|
+
var DefaultCellRendererComponent = /** @class */ (function () {
|
|
2523
|
+
function DefaultCellRendererComponent() {
|
|
2524
|
+
}
|
|
2525
|
+
Object.defineProperty(DefaultCellRendererComponent.prototype, "value", {
|
|
2526
|
+
get: function () {
|
|
2527
|
+
return this._value;
|
|
2528
|
+
},
|
|
2529
|
+
set: function (value) {
|
|
2530
|
+
this._value = value;
|
|
2531
|
+
},
|
|
2532
|
+
enumerable: true,
|
|
2533
|
+
configurable: true
|
|
2534
|
+
});
|
|
2535
|
+
__decorate([
|
|
2536
|
+
core.Input(),
|
|
2537
|
+
__metadata("design:type", Object),
|
|
2538
|
+
__metadata("design:paramtypes", [Object])
|
|
2539
|
+
], DefaultCellRendererComponent.prototype, "value", null);
|
|
2540
|
+
DefaultCellRendererComponent = __decorate([
|
|
2541
|
+
core.Component({
|
|
2542
|
+
selector: 'aup-default-cell-renderer',
|
|
2543
|
+
template: "{{value}}\n",
|
|
2544
|
+
styles: [""]
|
|
2545
|
+
}),
|
|
2546
|
+
__metadata("design:paramtypes", [])
|
|
2547
|
+
], DefaultCellRendererComponent);
|
|
2548
|
+
return DefaultCellRendererComponent;
|
|
2753
2549
|
}());
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2550
|
+
|
|
2551
|
+
var DefaultHeaderCellRendererComponent = /** @class */ (function () {
|
|
2552
|
+
function DefaultHeaderCellRendererComponent() {
|
|
2553
|
+
}
|
|
2554
|
+
__decorate([
|
|
2555
|
+
core.Input(),
|
|
2556
|
+
__metadata("design:type", String)
|
|
2557
|
+
], DefaultHeaderCellRendererComponent.prototype, "headerText", void 0);
|
|
2558
|
+
DefaultHeaderCellRendererComponent = __decorate([
|
|
2559
|
+
core.Component({
|
|
2560
|
+
selector: 'aup-default-header-renderer',
|
|
2561
|
+
template: "{{headerText}}\n",
|
|
2562
|
+
styles: [""]
|
|
2563
|
+
}),
|
|
2564
|
+
__metadata("design:paramtypes", [])
|
|
2565
|
+
], DefaultHeaderCellRendererComponent);
|
|
2566
|
+
return DefaultHeaderCellRendererComponent;
|
|
2567
|
+
}());
|
|
2568
|
+
|
|
2569
|
+
var EditSession = /** @class */ (function (_super) {
|
|
2570
|
+
__extends(EditSession, _super);
|
|
2571
|
+
function EditSession(rowId, row, saveCommand) {
|
|
2572
|
+
var _this = _super.call(this) || this;
|
|
2573
|
+
_this.rowId = rowId;
|
|
2574
|
+
_this.saveCommand = saveCommand;
|
|
2575
|
+
_this._editorValue = new pectin.MutableValueModel();
|
|
2576
|
+
_this.rowValueModel = _this._editorValue.readonly;
|
|
2577
|
+
_this.form = new pectin.Form();
|
|
2578
|
+
_this.form.load(row);
|
|
2579
|
+
_this._editorValue.value = row;
|
|
2580
|
+
_this.form.onEdit(function () {
|
|
2581
|
+
_this._editorValue.value = produce(_this._editorValue.value, function (draft) {
|
|
2582
|
+
_this.form.writeDirtyStateTo(draft);
|
|
2770
2583
|
});
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
})(exports.TableModel || (exports.TableModel = {}));
|
|
2584
|
+
});
|
|
2585
|
+
return _this;
|
|
2586
|
+
}
|
|
2587
|
+
return EditSession;
|
|
2588
|
+
}(pectin.GarbageCollector));
|
|
2777
2589
|
|
|
2778
2590
|
var EditRowControls = /** @class */ (function (_super) {
|
|
2779
2591
|
__extends(EditRowControls, _super);
|
|
@@ -2813,7 +2625,7 @@
|
|
|
2813
2625
|
], EditRowControls.prototype, "editRowCommand", void 0);
|
|
2814
2626
|
__decorate([
|
|
2815
2627
|
core.Input(),
|
|
2816
|
-
__metadata("design:type",
|
|
2628
|
+
__metadata("design:type", EditSession)
|
|
2817
2629
|
], EditRowControls.prototype, "editSession", void 0);
|
|
2818
2630
|
EditRowControls = __decorate([
|
|
2819
2631
|
core.Component({
|
|
@@ -2903,7 +2715,7 @@
|
|
|
2903
2715
|
this.columnId = columnId;
|
|
2904
2716
|
this.defaults = defaults;
|
|
2905
2717
|
this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
|
|
2906
|
-
component.
|
|
2718
|
+
component.headerText = column.getHeaderText();
|
|
2907
2719
|
});
|
|
2908
2720
|
}
|
|
2909
2721
|
ColumnModel.prototype.getHeaderText = function () {
|
|
@@ -3067,17 +2879,202 @@
|
|
|
3067
2879
|
component.selectionModel = selectionModel;
|
|
3068
2880
|
});
|
|
3069
2881
|
}
|
|
3070
|
-
_this.setCellRenderer(SelectCellRendererComponent, function (component, row, editRowCommand, editSession) {
|
|
3071
|
-
component.row = row;
|
|
3072
|
-
component.selectionModel = selectionModel;
|
|
2882
|
+
_this.setCellRenderer(SelectCellRendererComponent, function (component, row, editRowCommand, editSession) {
|
|
2883
|
+
component.row = row;
|
|
2884
|
+
component.selectionModel = selectionModel;
|
|
2885
|
+
});
|
|
2886
|
+
return _this;
|
|
2887
|
+
}
|
|
2888
|
+
SelectionColumnModel.prototype.getDefaultHeaderText = function () {
|
|
2889
|
+
return '';
|
|
2890
|
+
};
|
|
2891
|
+
return SelectionColumnModel;
|
|
2892
|
+
}(ColumnModel));
|
|
2893
|
+
|
|
2894
|
+
// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
|
|
2895
|
+
// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
|
|
2896
|
+
/**
|
|
2897
|
+
* Example:
|
|
2898
|
+
* @example
|
|
2899
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2900
|
+
* table.pluck("firstName");
|
|
2901
|
+
* table.pluck("lastName");
|
|
2902
|
+
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2903
|
+
* });
|
|
2904
|
+
*
|
|
2905
|
+
* Editable tables
|
|
2906
|
+
* @example
|
|
2907
|
+
* const saveCommand = UnaryCommand.create((form: Form<Hero>) => {
|
|
2908
|
+
* if (form.validate()) {
|
|
2909
|
+
* // normal form save stuff
|
|
2910
|
+
* return true; // finish editing
|
|
2911
|
+
* }
|
|
2912
|
+
* return false; // continue editiing
|
|
2913
|
+
* }
|
|
2914
|
+
* const colorsNames: ListModel<string> = ...;
|
|
2915
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2916
|
+
* table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
|
|
2917
|
+
* table.pluck("lastName").cellEditor(StringInputComponent, {
|
|
2918
|
+
* validators: [Validator.present("We need a last name")]
|
|
2919
|
+
* });
|
|
2920
|
+
* table.pluck("age").cellEditor(NumberInputComponent);
|
|
2921
|
+
* table.pluck("favoriteColor").cellEditor(SelectInputComponent, {
|
|
2922
|
+
* initialiseComponent(component: SelectInputComponent) {
|
|
2923
|
+
* selectInput.optionsModel = colorsNames; // <- initialise our component
|
|
2924
|
+
* }
|
|
2925
|
+
* });
|
|
2926
|
+
* table.addEditControls(saveCommand); // <- required to enable editing
|
|
2927
|
+
* });
|
|
2928
|
+
*
|
|
2929
|
+
* Selection models
|
|
2930
|
+
* @example
|
|
2931
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2932
|
+
* table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
|
|
2933
|
+
* table.pluck("firstName");
|
|
2934
|
+
* table.pluck("lastName");
|
|
2935
|
+
* });
|
|
2936
|
+
*
|
|
2937
|
+
* Custom cell renderers and editors
|
|
2938
|
+
* @example
|
|
2939
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2940
|
+
* table.pluck("favoriteColor")
|
|
2941
|
+
* .cellHeaderRenderer(CellHeaderRendererComponent, (component, column) => {
|
|
2942
|
+
* // configure your component with what ever you need.
|
|
2943
|
+
* });
|
|
2944
|
+
* .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }
|
|
2945
|
+
* .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
|
|
2946
|
+
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2947
|
+
* });
|
|
2948
|
+
*
|
|
2949
|
+
* I18n
|
|
2950
|
+
* @example
|
|
2951
|
+
* [table.yml]
|
|
2952
|
+
* table:
|
|
2953
|
+
* columns(ColumnTextProperties[]):
|
|
2954
|
+
* firstName:
|
|
2955
|
+
* headerText: "First Name"
|
|
2956
|
+
* fullName:
|
|
2957
|
+
* headerText: "Full Name"
|
|
2958
|
+
*
|
|
2959
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2960
|
+
* table.pluck("favoriteColor").cellRenderer(...).cellEditor(...);
|
|
2961
|
+
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2962
|
+
*
|
|
2963
|
+
* table.columnTextProperties(I18n.table.columns); // <- configures all columns
|
|
2964
|
+
* });
|
|
2965
|
+
*/
|
|
2966
|
+
var TableModel = /** @class */ (function () {
|
|
2967
|
+
function TableModel(sourceOfTruth) {
|
|
2968
|
+
this.sourceOfTruth = sourceOfTruth;
|
|
2969
|
+
this._garbage = new pectin.GarbageCollector();
|
|
2970
|
+
this._columns = new pectin.MutableListModel();
|
|
2971
|
+
this._editorSessions = new pectin.MutableListModel();
|
|
2972
|
+
this.identityOf = sourceOfTruth.identityOf;
|
|
2973
|
+
var _a = pectin.Dsl.disposeWith(this._garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2974
|
+
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
2975
|
+
this._rowsBeingEdited = new pectin.MutableListModel([], {
|
|
2976
|
+
identifiedWith: this.identityOf
|
|
2977
|
+
});
|
|
2978
|
+
this._editorSessionByRowId = chain(this._editorSessions).indexBy('rowId');
|
|
2979
|
+
this.editing = chain(this._editorSessions).count().isGreaterThan(0);
|
|
2980
|
+
this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
|
|
2981
|
+
}
|
|
2982
|
+
TableModel_1 = TableModel;
|
|
2983
|
+
TableModel.fromList = function (sourceOfTruth, builder) {
|
|
2984
|
+
var model = new TableModel_1(sourceOfTruth);
|
|
2985
|
+
builder(model);
|
|
2986
|
+
return model;
|
|
2987
|
+
};
|
|
2988
|
+
Object.defineProperty(TableModel.prototype, "rowsBeingEdited", {
|
|
2989
|
+
get: function () {
|
|
2990
|
+
return this._rowsBeingEdited.readonly;
|
|
2991
|
+
},
|
|
2992
|
+
enumerable: true,
|
|
2993
|
+
configurable: true
|
|
2994
|
+
});
|
|
2995
|
+
TableModel.prototype.getTrackByFunction = function () {
|
|
2996
|
+
var _this = this;
|
|
2997
|
+
return function (index, item) {
|
|
2998
|
+
return _this.identityOf ? _this.identityOf(item) : index;
|
|
2999
|
+
};
|
|
3000
|
+
};
|
|
3001
|
+
Object.defineProperty(TableModel.prototype, "columns", {
|
|
3002
|
+
get: function () {
|
|
3003
|
+
return this._columns.readonly;
|
|
3004
|
+
},
|
|
3005
|
+
enumerable: true,
|
|
3006
|
+
configurable: true
|
|
3007
|
+
});
|
|
3008
|
+
TableModel.prototype.pluck = function (property) {
|
|
3009
|
+
return this.addColumn(new PropertyColumnModel(property, this));
|
|
3010
|
+
};
|
|
3011
|
+
TableModel.prototype.addSelectionColumn = function (selectionModel) {
|
|
3012
|
+
return this.addColumn(new SelectionColumnModel('selection', this, selectionModel));
|
|
3013
|
+
};
|
|
3014
|
+
TableModel.prototype.addEditControls = function (saveCommand) {
|
|
3015
|
+
this.saveCommand = saveCommand;
|
|
3016
|
+
return this.addColumn(new EditorControlColumnModel('editControls', saveCommand, this));
|
|
3017
|
+
};
|
|
3018
|
+
TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
|
|
3019
|
+
return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
|
|
3020
|
+
};
|
|
3021
|
+
TableModel.prototype.addColumn = function (column) {
|
|
3022
|
+
if (this._columnsById.get(column.columnId)) {
|
|
3023
|
+
pectin.lang.illegalState("Column with id=" + column.columnId + " already exists");
|
|
3024
|
+
}
|
|
3025
|
+
else {
|
|
3026
|
+
this._columns.push(column);
|
|
3027
|
+
}
|
|
3028
|
+
return column;
|
|
3029
|
+
};
|
|
3030
|
+
TableModel.prototype.columnTextProperties = function (columnTextProperties) {
|
|
3031
|
+
this._columnTextPropertiesLookup = columnTextProperties;
|
|
3032
|
+
};
|
|
3033
|
+
TableModel.prototype.getColumnTextProperties = function (column) {
|
|
3034
|
+
var factory = this._columnTextPropertiesLookup[column.columnId];
|
|
3035
|
+
return factory ? factory() : undefined;
|
|
3036
|
+
};
|
|
3037
|
+
TableModel.prototype.startEditSession = function (row) {
|
|
3038
|
+
var _this = this;
|
|
3039
|
+
var rowId = this.identityOf(row);
|
|
3040
|
+
if (this._rowsBeingEdited.query().indexOf(row) > -1) {
|
|
3041
|
+
return pectin.lang.illegalState("Row with id=" + rowId + " already being edited");
|
|
3042
|
+
}
|
|
3043
|
+
else {
|
|
3044
|
+
var editSession_1 = new EditSession(rowId, row, this.saveCommand);
|
|
3045
|
+
var when = pectin.Dsl.disposeWith(editSession_1).when;
|
|
3046
|
+
when.valueOf(editSession_1.rowValueModel).changes(function (editedValue) {
|
|
3047
|
+
_this._rowsBeingEdited.replaceOrPush(editedValue);
|
|
3048
|
+
}, { initialValue: 'triggerChangeUnlessNil' });
|
|
3049
|
+
this._editorSessions.push(editSession_1);
|
|
3050
|
+
editSession_1.onDispose(function () {
|
|
3051
|
+
_this._rowsBeingEdited.remove(editSession_1.rowValueModel.value);
|
|
3052
|
+
_this._editorSessions.remove(editSession_1);
|
|
3053
|
+
});
|
|
3054
|
+
return editSession_1;
|
|
3055
|
+
}
|
|
3056
|
+
};
|
|
3057
|
+
TableModel.prototype.getEditSessionFor = function (row) {
|
|
3058
|
+
return this._editorSessionByRowId.get(this.identityOf(row));
|
|
3059
|
+
};
|
|
3060
|
+
TableModel.prototype.cancelAllEditorSessions = function () {
|
|
3061
|
+
var _this = this;
|
|
3062
|
+
this._editorSessions.runInTransaction(function (draft) {
|
|
3063
|
+
_this._rowsBeingEdited.runInTransaction(function () {
|
|
3064
|
+
draft.value.forEach(function (session) { return session.dispose(); });
|
|
3065
|
+
});
|
|
3073
3066
|
});
|
|
3074
|
-
return _this;
|
|
3075
|
-
}
|
|
3076
|
-
SelectionColumnModel.prototype.getDefaultHeaderText = function () {
|
|
3077
|
-
return '';
|
|
3078
3067
|
};
|
|
3079
|
-
|
|
3080
|
-
|
|
3068
|
+
var TableModel_1;
|
|
3069
|
+
TableModel.ctorParameters = function () { return [
|
|
3070
|
+
{ type: pectin.ListModel }
|
|
3071
|
+
]; };
|
|
3072
|
+
TableModel = TableModel_1 = __decorate([
|
|
3073
|
+
pectin.TrackExternal.Strategy(new pectin.TrackExternal.OneTimeBinding()),
|
|
3074
|
+
__metadata("design:paramtypes", [pectin.ListModel])
|
|
3075
|
+
], TableModel);
|
|
3076
|
+
return TableModel;
|
|
3077
|
+
}());
|
|
3081
3078
|
|
|
3082
3079
|
/**
|
|
3083
3080
|
* Create your model:
|
|
@@ -3122,7 +3119,7 @@
|
|
|
3122
3119
|
__decorate([
|
|
3123
3120
|
core.Input(),
|
|
3124
3121
|
pectin.TrackExternal(),
|
|
3125
|
-
__metadata("design:type",
|
|
3122
|
+
__metadata("design:type", TableModel)
|
|
3126
3123
|
], TableComponent.prototype, "tableModel", void 0);
|
|
3127
3124
|
TableComponent = __decorate([
|
|
3128
3125
|
core.Component({
|
|
@@ -3195,11 +3192,11 @@
|
|
|
3195
3192
|
], TableCellRendererComponent.prototype, "column", void 0);
|
|
3196
3193
|
__decorate([
|
|
3197
3194
|
core.Input(),
|
|
3198
|
-
__metadata("design:type",
|
|
3195
|
+
__metadata("design:type", EditSession)
|
|
3199
3196
|
], TableCellRendererComponent.prototype, "editSession", void 0);
|
|
3200
3197
|
__decorate([
|
|
3201
3198
|
core.Input(),
|
|
3202
|
-
__metadata("design:type",
|
|
3199
|
+
__metadata("design:type", TableModel)
|
|
3203
3200
|
], TableCellRendererComponent.prototype, "tableModel", void 0);
|
|
3204
3201
|
__decorate([
|
|
3205
3202
|
core.HostBinding('class'),
|
|
@@ -3330,117 +3327,6 @@
|
|
|
3330
3327
|
return VerticalFocusContainerComponent;
|
|
3331
3328
|
}(FocusContainerComponent));
|
|
3332
3329
|
|
|
3333
|
-
/**
|
|
3334
|
-
* @file Automatically generated by barrelsby.
|
|
3335
|
-
*/
|
|
3336
|
-
|
|
3337
|
-
var ActivityActionsComponent = /** @class */ (function (_super) {
|
|
3338
|
-
__extends(ActivityActionsComponent, _super);
|
|
3339
|
-
function ActivityActionsComponent() {
|
|
3340
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
3341
|
-
_this.align = 'start';
|
|
3342
|
-
return _this;
|
|
3343
|
-
}
|
|
3344
|
-
Object.defineProperty(ActivityActionsComponent.prototype, "alignEnd", {
|
|
3345
|
-
get: function () {
|
|
3346
|
-
return this.align === 'end';
|
|
3347
|
-
},
|
|
3348
|
-
enumerable: true,
|
|
3349
|
-
configurable: true
|
|
3350
|
-
});
|
|
3351
|
-
ActivityActionsComponent.prototype.ngOnInit = function () {
|
|
3352
|
-
};
|
|
3353
|
-
ActivityActionsComponent.prototype.hasConfirmText = function () {
|
|
3354
|
-
return !___default__default.isEmpty(this.confirmText);
|
|
3355
|
-
};
|
|
3356
|
-
__decorate([
|
|
3357
|
-
core.Input(),
|
|
3358
|
-
pectin.TrackExternal(),
|
|
3359
|
-
__metadata("design:type", pectin.Command)
|
|
3360
|
-
], ActivityActionsComponent.prototype, "confirmCommand", void 0);
|
|
3361
|
-
__decorate([
|
|
3362
|
-
core.Input(),
|
|
3363
|
-
__metadata("design:type", String)
|
|
3364
|
-
], ActivityActionsComponent.prototype, "confirmText", void 0);
|
|
3365
|
-
__decorate([
|
|
3366
|
-
core.Input(),
|
|
3367
|
-
pectin.TrackExternal(),
|
|
3368
|
-
__metadata("design:type", pectin.Command)
|
|
3369
|
-
], ActivityActionsComponent.prototype, "cancelCommand", void 0);
|
|
3370
|
-
__decorate([
|
|
3371
|
-
core.Input(),
|
|
3372
|
-
__metadata("design:type", String)
|
|
3373
|
-
], ActivityActionsComponent.prototype, "align", void 0);
|
|
3374
|
-
__decorate([
|
|
3375
|
-
core.HostBinding('class.align-end'),
|
|
3376
|
-
__metadata("design:type", Boolean),
|
|
3377
|
-
__metadata("design:paramtypes", [])
|
|
3378
|
-
], ActivityActionsComponent.prototype, "alignEnd", null);
|
|
3379
|
-
ActivityActionsComponent = __decorate([
|
|
3380
|
-
core.Component({
|
|
3381
|
-
selector: 'aup-activity-actions',
|
|
3382
|
-
template: "<button class=\"cancel\" mat-icon-button [pectinCommand]=\"cancelCommand\">\n <mat-icon>clear</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\">\n <mat-icon>done</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n",
|
|
3383
|
-
styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}"]
|
|
3384
|
-
})
|
|
3385
|
-
], ActivityActionsComponent);
|
|
3386
|
-
return ActivityActionsComponent;
|
|
3387
|
-
}(DisposableComponent));
|
|
3388
|
-
|
|
3389
|
-
var InteractionModule = /** @class */ (function () {
|
|
3390
|
-
function InteractionModule() {
|
|
3391
|
-
}
|
|
3392
|
-
InteractionModule = __decorate([
|
|
3393
|
-
core.NgModule({
|
|
3394
|
-
imports: [
|
|
3395
|
-
common.CommonModule,
|
|
3396
|
-
button.MatButtonModule,
|
|
3397
|
-
dialog.MatDialogModule,
|
|
3398
|
-
tabs.MatTabsModule,
|
|
3399
|
-
portal.PortalModule,
|
|
3400
|
-
router.RouterModule,
|
|
3401
|
-
icon.MatIconModule,
|
|
3402
|
-
DirectivesModule,
|
|
3403
|
-
flexLayout.FlexModule,
|
|
3404
|
-
flexLayout.GridModule
|
|
3405
|
-
],
|
|
3406
|
-
declarations: [
|
|
3407
|
-
ActivityContainerComponent,
|
|
3408
|
-
ConfirmationDialogComponent,
|
|
3409
|
-
ConfirmThenDialogComponent,
|
|
3410
|
-
AlertDialogComponent,
|
|
3411
|
-
ActivityOutletComponent,
|
|
3412
|
-
InPlaceInteractionContextComponent,
|
|
3413
|
-
AddItemInteractionContextComponent,
|
|
3414
|
-
ActivityActionsComponent,
|
|
3415
|
-
PopupInteractionContextComponent,
|
|
3416
|
-
InteractionContextTriggerFor
|
|
3417
|
-
],
|
|
3418
|
-
exports: [
|
|
3419
|
-
ActivityContainerComponent,
|
|
3420
|
-
ActivityOutletComponent,
|
|
3421
|
-
InPlaceInteractionContextComponent,
|
|
3422
|
-
AddItemInteractionContextComponent,
|
|
3423
|
-
ActivityActionsComponent,
|
|
3424
|
-
PopupInteractionContextComponent,
|
|
3425
|
-
InteractionContextTriggerFor
|
|
3426
|
-
],
|
|
3427
|
-
entryComponents: [
|
|
3428
|
-
ActivityContainerComponent,
|
|
3429
|
-
ConfirmationDialogComponent,
|
|
3430
|
-
ConfirmThenDialogComponent,
|
|
3431
|
-
AlertDialogComponent
|
|
3432
|
-
],
|
|
3433
|
-
providers: [
|
|
3434
|
-
exports.ɵbw
|
|
3435
|
-
// {
|
|
3436
|
-
// provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
|
|
3437
|
-
// }
|
|
3438
|
-
]
|
|
3439
|
-
})
|
|
3440
|
-
], InteractionModule);
|
|
3441
|
-
return InteractionModule;
|
|
3442
|
-
}());
|
|
3443
|
-
|
|
3444
3330
|
var ComponentsModule = /** @class */ (function () {
|
|
3445
3331
|
function ComponentsModule() {
|
|
3446
3332
|
}
|
|
@@ -4631,7 +4517,7 @@
|
|
|
4631
4517
|
return PopStateNavigation;
|
|
4632
4518
|
}(AbstractPopStateNavigation));
|
|
4633
4519
|
|
|
4634
|
-
exports.ɵ
|
|
4520
|
+
exports.ɵcm = /** @class */ (function () {
|
|
4635
4521
|
function PlaceHistory() {
|
|
4636
4522
|
this._archive = new Map();
|
|
4637
4523
|
this.placeHistoryDepth = 4;
|
|
@@ -4768,7 +4654,7 @@
|
|
|
4768
4654
|
// }
|
|
4769
4655
|
//
|
|
4770
4656
|
// }
|
|
4771
|
-
})(exports.ɵ
|
|
4657
|
+
})(exports.ɵcm || (exports.ɵcm = {}));
|
|
4772
4658
|
|
|
4773
4659
|
exports.UrlSnapshot = /** @class */ (function () {
|
|
4774
4660
|
// TODO: Update this accept a url Parser so it can be immutable and generate new trees on mutation using toString() are parseUrl.
|
|
@@ -5293,9 +5179,9 @@
|
|
|
5293
5179
|
{ type: common.Location },
|
|
5294
5180
|
{ type: exports.ɵbw },
|
|
5295
5181
|
{ type: UrlService },
|
|
5296
|
-
{ type: exports.ɵ
|
|
5182
|
+
{ type: exports.ɵcm }
|
|
5297
5183
|
]; };
|
|
5298
|
-
PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵbw), core.ɵɵinject(UrlService), core.ɵɵinject(exports.ɵ
|
|
5184
|
+
PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵbw), core.ɵɵinject(UrlService), core.ɵɵinject(exports.ɵcm)); }, token: PlaceRouter, providedIn: "root" });
|
|
5299
5185
|
__decorate([
|
|
5300
5186
|
pectin.Trace(),
|
|
5301
5187
|
__metadata("design:type", Function),
|
|
@@ -5310,7 +5196,7 @@
|
|
|
5310
5196
|
common.Location,
|
|
5311
5197
|
exports.ɵbw,
|
|
5312
5198
|
UrlService,
|
|
5313
|
-
exports.ɵ
|
|
5199
|
+
exports.ɵcm])
|
|
5314
5200
|
], PlaceRouter);
|
|
5315
5201
|
return PlaceRouter;
|
|
5316
5202
|
}(pectin.GarbageCollector));
|
|
@@ -5880,6 +5766,118 @@
|
|
|
5880
5766
|
animations$1.transition(':leave', [animations$1.animate('{{duration}}', slideLeftOnEnterDef)], { params: { duration: '100ms' } })
|
|
5881
5767
|
]);
|
|
5882
5768
|
|
|
5769
|
+
/**
|
|
5770
|
+
* @file Automatically generated by barrelsby.
|
|
5771
|
+
*/
|
|
5772
|
+
|
|
5773
|
+
var Dimension = /** @class */ (function () {
|
|
5774
|
+
function Dimension(width, height) {
|
|
5775
|
+
this.width = width;
|
|
5776
|
+
this.height = height;
|
|
5777
|
+
}
|
|
5778
|
+
return Dimension;
|
|
5779
|
+
}());
|
|
5780
|
+
|
|
5781
|
+
var Point = /** @class */ (function () {
|
|
5782
|
+
function Point(x, y) {
|
|
5783
|
+
this.x = x;
|
|
5784
|
+
this.y = y;
|
|
5785
|
+
}
|
|
5786
|
+
Point.from = function (data) {
|
|
5787
|
+
return new Point(data.x, data.y);
|
|
5788
|
+
};
|
|
5789
|
+
Point.prototype.translate = function (x, y) {
|
|
5790
|
+
return new Point(this.x + x, this.y + y);
|
|
5791
|
+
};
|
|
5792
|
+
return Point;
|
|
5793
|
+
}());
|
|
5794
|
+
|
|
5795
|
+
exports.Bounds = /** @class */ (function (_super) {
|
|
5796
|
+
__extends(Bounds, _super);
|
|
5797
|
+
function Bounds(top, left, width, height) {
|
|
5798
|
+
var _this = _super.call(this, width, height) || this;
|
|
5799
|
+
_this.top = top;
|
|
5800
|
+
_this.left = left;
|
|
5801
|
+
_this.width = width;
|
|
5802
|
+
_this.height = height;
|
|
5803
|
+
return _this;
|
|
5804
|
+
}
|
|
5805
|
+
Bounds.prototype.relativePositionOf = function (point) {
|
|
5806
|
+
if (point instanceof MouseEvent) {
|
|
5807
|
+
return new Point(point.clientX - this.left, point.clientY - this.top);
|
|
5808
|
+
}
|
|
5809
|
+
else {
|
|
5810
|
+
return new Point(point.x - this.left, point.y - this.top);
|
|
5811
|
+
}
|
|
5812
|
+
};
|
|
5813
|
+
return Bounds;
|
|
5814
|
+
}(Dimension));
|
|
5815
|
+
(function (Bounds) {
|
|
5816
|
+
function ofElement(element) {
|
|
5817
|
+
var rect = element.getBoundingClientRect();
|
|
5818
|
+
return new Bounds(rect.top, rect.left, rect.width, rect.height);
|
|
5819
|
+
}
|
|
5820
|
+
Bounds.ofElement = ofElement;
|
|
5821
|
+
})(exports.Bounds || (exports.Bounds = {}));
|
|
5822
|
+
|
|
5823
|
+
var ResizeAwareComponent = /** @class */ (function (_super) {
|
|
5824
|
+
__extends(ResizeAwareComponent, _super);
|
|
5825
|
+
function ResizeAwareComponent(elementRef, ngZone) {
|
|
5826
|
+
var _this = _super.call(this) || this;
|
|
5827
|
+
_this.elementRef = elementRef;
|
|
5828
|
+
_this.ngZone = ngZone;
|
|
5829
|
+
_this._boundsModel = new pectin.MutableValueModel(new exports.Bounds(0, 0, 0, 0));
|
|
5830
|
+
return _this;
|
|
5831
|
+
}
|
|
5832
|
+
ResizeAwareComponent.prototype.ngAfterViewInit = function () {
|
|
5833
|
+
var _this = this;
|
|
5834
|
+
this.updateBounds();
|
|
5835
|
+
var element = this.elementRef.nativeElement;
|
|
5836
|
+
var ro = new ResizeObserver(function (entries, observer) {
|
|
5837
|
+
_this.ngZone.run(function () { return _this.updateBounds(); });
|
|
5838
|
+
});
|
|
5839
|
+
ro.observe(element);
|
|
5840
|
+
this.onDispose(function () { return ro.disconnect(); });
|
|
5841
|
+
};
|
|
5842
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
|
|
5843
|
+
get: function () {
|
|
5844
|
+
return this._boundsModel.readonly;
|
|
5845
|
+
},
|
|
5846
|
+
enumerable: true,
|
|
5847
|
+
configurable: true
|
|
5848
|
+
});
|
|
5849
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
|
|
5850
|
+
get: function () {
|
|
5851
|
+
return this.elementRef.nativeElement;
|
|
5852
|
+
},
|
|
5853
|
+
enumerable: true,
|
|
5854
|
+
configurable: true
|
|
5855
|
+
});
|
|
5856
|
+
// TODO: Make this handle body scroll
|
|
5857
|
+
ResizeAwareComponent.prototype.relativePositionOf = function (point) {
|
|
5858
|
+
return this.bounds.relativePositionOf(point);
|
|
5859
|
+
};
|
|
5860
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
|
|
5861
|
+
get: function () {
|
|
5862
|
+
return this._boundsModel.value;
|
|
5863
|
+
},
|
|
5864
|
+
enumerable: true,
|
|
5865
|
+
configurable: true
|
|
5866
|
+
});
|
|
5867
|
+
ResizeAwareComponent.prototype.updateBounds = function () {
|
|
5868
|
+
this._boundsModel.value = exports.Bounds.ofElement(this.nativeElement);
|
|
5869
|
+
};
|
|
5870
|
+
ResizeAwareComponent.ctorParameters = function () { return [
|
|
5871
|
+
{ type: core.ElementRef },
|
|
5872
|
+
{ type: core.NgZone }
|
|
5873
|
+
]; };
|
|
5874
|
+
ResizeAwareComponent = __decorate([
|
|
5875
|
+
core.Directive(),
|
|
5876
|
+
__metadata("design:paramtypes", [core.ElementRef, core.NgZone])
|
|
5877
|
+
], ResizeAwareComponent);
|
|
5878
|
+
return ResizeAwareComponent;
|
|
5879
|
+
}(DisposableComponent));
|
|
5880
|
+
|
|
5883
5881
|
/**
|
|
5884
5882
|
* @file Automatically generated by barrelsby.
|
|
5885
5883
|
*/
|
|
@@ -6324,6 +6322,7 @@
|
|
|
6324
6322
|
exports.DirectivesModule = DirectivesModule;
|
|
6325
6323
|
exports.DisposableComponent = DisposableComponent;
|
|
6326
6324
|
exports.EditRowControls = EditRowControls;
|
|
6325
|
+
exports.EditSession = EditSession;
|
|
6327
6326
|
exports.EditorControlColumnModel = EditorControlColumnModel;
|
|
6328
6327
|
exports.EmptyStateComponent = EmptyStateComponent;
|
|
6329
6328
|
exports.EventCleanUpSession = EventCleanUpSession;
|
|
@@ -6351,7 +6350,7 @@
|
|
|
6351
6350
|
exports.PlaceComponentDeactivationHandler = PlaceComponentDeactivationHandler;
|
|
6352
6351
|
exports.PlaceDefinition = PlaceDefinition;
|
|
6353
6352
|
exports.PlaceGuard = PlaceGuard;
|
|
6354
|
-
exports.PlaceHistory = exports.ɵ
|
|
6353
|
+
exports.PlaceHistory = exports.ɵcm;
|
|
6355
6354
|
exports.PlaceModule = PlaceModule;
|
|
6356
6355
|
exports.PlaceOutletComponent = PlaceOutletComponent;
|
|
6357
6356
|
exports.PlaceRouter = PlaceRouter;
|
|
@@ -6381,6 +6380,7 @@
|
|
|
6381
6380
|
exports.TableCellRendererComponent = TableCellRendererComponent;
|
|
6382
6381
|
exports.TableComponent = TableComponent;
|
|
6383
6382
|
exports.TableHeaderCellRendererComponent = TableHeaderCellRendererComponent;
|
|
6383
|
+
exports.TableModel = TableModel;
|
|
6384
6384
|
exports.TextInputComponent = TextInputComponent;
|
|
6385
6385
|
exports.UrlService = UrlService;
|
|
6386
6386
|
exports.VerticalFocusContainerComponent = VerticalFocusContainerComponent;
|
|
@@ -6418,25 +6418,23 @@
|
|
|
6418
6418
|
exports.ɵbv = InPlaceInteractionContextComponent;
|
|
6419
6419
|
exports.ɵbx = ModalInteractionContextFactory;
|
|
6420
6420
|
exports.ɵby = AddItemInteractionContextComponent;
|
|
6421
|
-
exports.ɵbz =
|
|
6421
|
+
exports.ɵbz = ActivityActionsComponent;
|
|
6422
6422
|
exports.ɵc = FocusBindingDirective;
|
|
6423
|
-
exports.ɵca =
|
|
6424
|
-
exports.ɵcb =
|
|
6425
|
-
exports.ɵcc =
|
|
6426
|
-
exports.ɵcd =
|
|
6427
|
-
exports.ɵce =
|
|
6428
|
-
exports.ɵcf =
|
|
6429
|
-
exports.ɵcg =
|
|
6430
|
-
exports.ɵch =
|
|
6431
|
-
exports.ɵci =
|
|
6432
|
-
exports.ɵ
|
|
6433
|
-
exports.ɵ
|
|
6434
|
-
exports.ɵ
|
|
6435
|
-
exports.ɵ
|
|
6436
|
-
exports.ɵcp =
|
|
6437
|
-
exports.ɵcq =
|
|
6438
|
-
exports.ɵcr = ListPlaceNavComponent;
|
|
6439
|
-
exports.ɵcs = SidePlaceNavigationComponent;
|
|
6423
|
+
exports.ɵca = PopupInteractionContextComponent;
|
|
6424
|
+
exports.ɵcb = InteractionContextTriggerFor;
|
|
6425
|
+
exports.ɵcc = PlaceModule;
|
|
6426
|
+
exports.ɵcd = EmptyStateComponent;
|
|
6427
|
+
exports.ɵce = BusyOverlayComponent;
|
|
6428
|
+
exports.ɵcf = PlaceOutletComponent;
|
|
6429
|
+
exports.ɵcg = leftRightPlaceAnimation;
|
|
6430
|
+
exports.ɵch = LEFT_RIGHT_PLACE_ANIMATION;
|
|
6431
|
+
exports.ɵci = AUP_PLACE_CONFIG;
|
|
6432
|
+
exports.ɵck = PlaceRouter;
|
|
6433
|
+
exports.ɵcl = UrlService;
|
|
6434
|
+
exports.ɵcn = TabbedPlaceNavigationComponent;
|
|
6435
|
+
exports.ɵco = AbstractPlaceNavigationComponent;
|
|
6436
|
+
exports.ɵcp = ListPlaceNavComponent;
|
|
6437
|
+
exports.ɵcq = SidePlaceNavigationComponent;
|
|
6440
6438
|
exports.ɵd = DisposableComponent;
|
|
6441
6439
|
exports.ɵe = FocusBindingFactory;
|
|
6442
6440
|
exports.ɵf = ComponentsModule;
|