@coolon/angular-ui-powerups 3.16.0 → 3.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/assets/activities.scss +4 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +205 -97
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/card-container/card-container.component.js +1 -1
- package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table.component.js +13 -0
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/esm2015/lib/interaction/activity.js +19 -3
- package/esm2015/lib/interaction/activity.js.map +1 -1
- package/esm2015/lib/interaction/activity.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +35 -26
- 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/activity-content/activity-body.component.html.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-content/activity-body.component.js +26 -0
- package/esm2015/lib/interaction/components/activity-content/activity-body.component.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-content/activity-body.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/activity-content/activity-body.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +10 -1
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +18 -7
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +16 -2
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/input-activities/select-input-activity.js +1 -4
- package/esm2015/lib/interaction/components/input-activities/select-input-activity.js.map +1 -1
- package/esm2015/lib/interaction/components/input-activities/select-input-activity.metadata.json +1 -1
- package/esm2015/lib/interaction/components/input-activities/string-input-activity.js +1 -3
- package/esm2015/lib/interaction/components/input-activities/string-input-activity.js.map +1 -1
- package/esm2015/lib/interaction/components/input-activities/string-input-activity.metadata.json +1 -1
- package/esm2015/lib/interaction/exports.js +1 -0
- package/esm2015/lib/interaction/exports.js.map +1 -1
- package/esm2015/lib/interaction/exports.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.js +6 -2
- package/esm2015/lib/interaction/interaction.module.js.map +1 -1
- package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +181 -91
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/table/table.component.d.ts +13 -0
- package/lib/interaction/activity.d.ts +9 -3
- package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +24 -20
- package/lib/interaction/components/activity-content/activity-body.component.d.ts +5 -0
- package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +2 -0
- package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +3 -1
- package/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.d.ts +3 -0
- package/lib/interaction/exports.d.ts +1 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [3.17.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.16.0...v3.17.0) (2021-02-28)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* added initial visibility service ([e063efc](https://bitbucket.org/coolon/angular-ui-powerups/commit/e063efc930092648f60c80c5f640459e76305199))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* for AUP-118 AUP-120 ([0f5a76a](https://bitbucket.org/coolon/angular-ui-powerups/commit/0f5a76ace1dd76a11eb621467e5d115f18c5bd3b))
|
|
16
|
+
|
|
5
17
|
## [3.16.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.16.0-alpha.0...v3.16.0) (2021-02-24)
|
|
6
18
|
|
|
7
19
|
|
package/assets/activities.scss
CHANGED
|
@@ -5,5 +5,8 @@ aup-activity-title {
|
|
|
5
5
|
font-size: mat-font-size($typographyConfig, title);
|
|
6
6
|
line-height: mat-line-height($typographyConfig, title);
|
|
7
7
|
letter-spacing: mat-letter-spacing($typographyConfig, title);
|
|
8
|
-
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
aup-activity-body {
|
|
11
|
+
padding: var(--default-padding) 0;
|
|
9
12
|
}
|
|
@@ -729,7 +729,7 @@
|
|
|
729
729
|
{ type: i0.Component, args: [{
|
|
730
730
|
selector: 'aup-card-container',
|
|
731
731
|
template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-command-face *ngIf=\"addCardFace\" [faces]=\"[addCardFace]\"></aup-command-face>\n <aup-icon *ngIf=\"!addCardFace\" icon=\"mat:add\"></aup-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",
|
|
732
|
-
styles: [":root{--aup-default-background:#fff;--aup-default-padding:var(--default-padding,18px)}aup-activity-title{font-family:Roboto,Helvetica Neue,sans-serif;font-size:20px;letter-spacing:normal;line-height:32px
|
|
732
|
+
styles: [":root{--aup-default-background:#fff;--aup-default-padding:var(--default-padding,18px)}aup-activity-title{font-family:Roboto,Helvetica Neue,sans-serif;font-size:20px;letter-spacing:normal;line-height:32px}aup-activity-body{padding:var(--default-padding) 0}.router-outlet-container>*{bottom:0;left:0;position:absolute;right:0;top: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,.dialog-interaction-context mat-dialog-container{max-height:95vh!important;max-width:95vw!important}.dialog-interaction-context mat-dialog-container{padding:0}.activity-outlet-wrapper{align-items:stretch;display:flex;flex-direction:column}.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 .28s 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-input-component mat-form-field .mat-form-field-prefix{align-items:center;align-self:flex-end;display:inline-flex;flex-direction:row;height:35px}.aup-input-component mat-form-field .mat-form-field-suffix .mat-icon-button{line-height:2.5em}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{border-bottom:0;padding-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}.aup-input-component.dense mat-form-field.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(0)}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);--resolved-row-hover-background-color:var(--row-hover-background-color,rgba(0,0,0,0.05));--resolved-row-selected-background-color:var(--row-selected-background-color,rgba(0,0,255,0.04))}aup-table.hide-header .mat-table thead,aup-table .mat-table td.hide,aup-table .mat-table th.hide{display:none}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table tr.aup-row-selected,aup-table .mat-table tr.aup-row-selected.enable-hover:hover{background-color:var(--resolved-row-selected-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table .mat-table .mat-cell:not(.flex),aup-table .mat-table .mat-header-cell:not(.flex){white-space:nowrap;width:1px}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{align-items:stretch;display:flex;flex-direction:column;height:100%;justify-content:center;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{flex:1;padding-left:var(--default-column-gap)}:root{--aup-command-face-icon-gap:8px;--aup-fa-icon-width:18px;--aup-icon-width:24px}aup-icon{--fa-icon-offset:calc((var(--aup-icon-width) - var(--aup-fa-icon-width))/2);position:relative}aup-icon fa-icon .svg-inline--fa{height:var(--aup-fa-icon-width)!important;left:var(--fa-icon-offset);position:absolute;top:var(--fa-icon-offset);width:var(--aup-fa-icon-width)!important}.mat-menu-panel aup-icon .svg-inline--fa{opacity:.54}:host{--resolved-card-background:var(--card-background,#fcfcfb);--resolved-card-gap:var(--card-gap,16px);--resolved-card-height:var(--card-height,auto);--resolved-card-min-height:var(--card-min-height,auto);--resolved-card-width:var(--card-width,300px);background:var(--resolved-card-background);display:block;flex:1}.card-container{box-sizing:border-box;display:-ms-grid;display:grid;grid-gap:var(--resolved-card-gap);grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(var(--resolved-card-min-height),var(--resolved-card-height)));max-width:100%;min-height:calc(var(--resolved-card-height) + 2*var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2*var(--resolved-card-gap));padding:var(--resolved-card-gap);width:calc((var(--resolved-card-width) + var(--resolved-card-gap))*2 + var(--grid-gap))}.add-card-container{align-items:center;background-color:hsla(0,0%,100%,.8);border:2px dashed rgba(0,0,0,.1);border-radius:6px;box-sizing:border-box;color:rgba(0,0,0,.54);cursor:pointer;display:flex;flex-direction:column;font-weight:300;height:var(--resolved-card-height);justify-content:center;min-height:var(--resolved-card-min-height);transition:all .28s cubic-bezier(.4,0,.2,1);width:var(--resolved-card-width)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{background-color:#fff;border-color:transparent;color:rgba(0,0,0,.54);transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1)}.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{align-items:stretch;display:flex;flex-direction:column;height:var(--resolved-card-height);justify-content:stretch;width:var(--resolved-card-width)}"]
|
|
733
733
|
},] }
|
|
734
734
|
];
|
|
735
735
|
CardContainerComponent.ctorParameters = function () { return []; };
|
|
@@ -3287,6 +3287,19 @@
|
|
|
3287
3287
|
* @example
|
|
3288
3288
|
* <aup-table [tableModel]="heroTableModel"></aup-table>
|
|
3289
3289
|
*
|
|
3290
|
+
* Column templates
|
|
3291
|
+
* @example
|
|
3292
|
+
* this.heroTableModel = TableModel.fromList(heroList, table => {
|
|
3293
|
+
* table.pluck("firstName");
|
|
3294
|
+
* table.pluck("lastName");
|
|
3295
|
+
* table.addTemplateColumn("specialColumn");
|
|
3296
|
+
* });
|
|
3297
|
+
* <aup-table [tableModel]="heroTableModel">
|
|
3298
|
+
* <div *aupColumnTemplate="let hero; columnId: 'specialColumn'; fillCell: true; padChild:false">
|
|
3299
|
+
* {{hero.name}}
|
|
3300
|
+
* </div>
|
|
3301
|
+
* </aup-table>
|
|
3302
|
+
*
|
|
3290
3303
|
* Styling
|
|
3291
3304
|
* @example
|
|
3292
3305
|
* aup-table {
|
|
@@ -4489,11 +4502,114 @@
|
|
|
4489
4502
|
{ type: angularFontawesome.FaIconLibrary }
|
|
4490
4503
|
]; };
|
|
4491
4504
|
|
|
4505
|
+
/**
|
|
4506
|
+
* @example
|
|
4507
|
+
* <aup-activity-actions [style]="{confirm: saveFace, cancel: cancelFace}">
|
|
4508
|
+
* </aup-activity-actions>
|
|
4509
|
+
*
|
|
4510
|
+
* // Running `ng g @coolon/angular-ui-powerups:aup-i18n` will install default
|
|
4511
|
+
* // style definitions
|
|
4512
|
+
* <aup-activity-actions [style]="I18n.aup.components.activityActions.styles.okCancelIcons">
|
|
4513
|
+
* </aup-activity-actions>
|
|
4514
|
+
*
|
|
4515
|
+
* // you can also add additional content that will be displayed along with the buttons.
|
|
4516
|
+
* // The location of the content depends on the alignment attribute.
|
|
4517
|
+
* <aup-activity-actions
|
|
4518
|
+
* align="stretch"
|
|
4519
|
+
* [style]="I18n.aup.components.activityActions.styles.okCancelIcons">
|
|
4520
|
+
* <span>This content will be between the two commands</span>
|
|
4521
|
+
* </aup-activity-actions>
|
|
4522
|
+
*/
|
|
4523
|
+
var ActivityActionsComponent = /** @class */ (function (_super) {
|
|
4524
|
+
__extends(ActivityActionsComponent, _super);
|
|
4525
|
+
function ActivityActionsComponent(cdr) {
|
|
4526
|
+
var _this = _super.call(this) || this;
|
|
4527
|
+
_this.cdr = cdr;
|
|
4528
|
+
_this.align = 'stretch';
|
|
4529
|
+
return _this;
|
|
4530
|
+
}
|
|
4531
|
+
Object.defineProperty(ActivityActionsComponent.prototype, "faces", {
|
|
4532
|
+
set: function (faces) {
|
|
4533
|
+
this.confirmFace = faces.confirm;
|
|
4534
|
+
this.cancelFace = faces.cancel;
|
|
4535
|
+
},
|
|
4536
|
+
enumerable: false,
|
|
4537
|
+
configurable: true
|
|
4538
|
+
});
|
|
4539
|
+
Object.defineProperty(ActivityActionsComponent.prototype, "style", {
|
|
4540
|
+
/**
|
|
4541
|
+
* @deprecated use #commandFaces instead.
|
|
4542
|
+
*/
|
|
4543
|
+
set: function (style) {
|
|
4544
|
+
this.confirmFace = style.confirm;
|
|
4545
|
+
},
|
|
4546
|
+
enumerable: false,
|
|
4547
|
+
configurable: true
|
|
4548
|
+
});
|
|
4549
|
+
Object.defineProperty(ActivityActionsComponent.prototype, "alignEnd", {
|
|
4550
|
+
get: function () {
|
|
4551
|
+
return this.align === 'end';
|
|
4552
|
+
},
|
|
4553
|
+
enumerable: false,
|
|
4554
|
+
configurable: true
|
|
4555
|
+
});
|
|
4556
|
+
Object.defineProperty(ActivityActionsComponent.prototype, "alignStretch", {
|
|
4557
|
+
get: function () {
|
|
4558
|
+
return this.align === 'stretch';
|
|
4559
|
+
},
|
|
4560
|
+
enumerable: false,
|
|
4561
|
+
configurable: true
|
|
4562
|
+
});
|
|
4563
|
+
ActivityActionsComponent.prototype.ngOnInit = function () {
|
|
4564
|
+
};
|
|
4565
|
+
ActivityActionsComponent.prototype.hasConfirmFace = function () {
|
|
4566
|
+
return this.confirmFace;
|
|
4567
|
+
};
|
|
4568
|
+
ActivityActionsComponent.prototype.hasCancelFace = function () {
|
|
4569
|
+
return this.cancelFace;
|
|
4570
|
+
};
|
|
4571
|
+
ActivityActionsComponent.prototype.initCommands = function (activity) {
|
|
4572
|
+
this.confirmCommand = activity.confirmCommand;
|
|
4573
|
+
this.cancelCommand = activity.cancelCommand;
|
|
4574
|
+
this.cdr.detectChanges();
|
|
4575
|
+
};
|
|
4576
|
+
return ActivityActionsComponent;
|
|
4577
|
+
}(DisposableComponent));
|
|
4578
|
+
ActivityActionsComponent.decorators = [
|
|
4579
|
+
{ type: i0.Component, args: [{
|
|
4580
|
+
selector: 'aup-activity-actions',
|
|
4581
|
+
template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n",
|
|
4582
|
+
styles: [":host{-ms-grid-columns:auto auto 1fr;-ms-grid-rows:auto;align-items:center;display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr;grid-template-rows:auto;justify-content:end}:host.align-end{-ms-grid-columns:1fr auto auto;grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host.align-stretch{-ms-grid-columns:auto 1fr auto;grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}.cancel{-ms-grid-column:1;-ms-grid-row:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-column:2;-ms-grid-row:1}:host.align-stretch>.cancel{-ms-grid-column:1;-ms-grid-row:1}.confirm{-ms-grid-column:2;-ms-grid-row:1;grid-area:confirm}.column,:host.align-end>.confirm,:host.align-stretch>.confirm{-ms-grid-column:3;-ms-grid-row:1}.column{grid-area:content;text-align:left}:host.align-end>.column{-ms-grid-column:1;-ms-grid-row:1}:host.align-stretch>.column{-ms-grid-column:2;-ms-grid-row:1}"]
|
|
4583
|
+
},] }
|
|
4584
|
+
];
|
|
4585
|
+
ActivityActionsComponent.ctorParameters = function () { return [
|
|
4586
|
+
{ type: i0.ChangeDetectorRef }
|
|
4587
|
+
]; };
|
|
4588
|
+
ActivityActionsComponent.propDecorators = {
|
|
4589
|
+
confirmCommand: [{ type: i0.Input }],
|
|
4590
|
+
cancelCommand: [{ type: i0.Input }],
|
|
4591
|
+
faces: [{ type: i0.Input }],
|
|
4592
|
+
confirmFace: [{ type: i0.Input }],
|
|
4593
|
+
cancelFace: [{ type: i0.Input }],
|
|
4594
|
+
style: [{ type: i0.Input }],
|
|
4595
|
+
align: [{ type: i0.Input }],
|
|
4596
|
+
alignEnd: [{ type: i0.HostBinding, args: ['class.align-end',] }],
|
|
4597
|
+
alignStretch: [{ type: i0.HostBinding, args: ['class.align-stretch',] }]
|
|
4598
|
+
};
|
|
4599
|
+
__decorate([
|
|
4600
|
+
pectin.TrackExternal(),
|
|
4601
|
+
__metadata("design:type", pectin.Command)
|
|
4602
|
+
], ActivityActionsComponent.prototype, "confirmCommand", void 0);
|
|
4603
|
+
__decorate([
|
|
4604
|
+
pectin.TrackExternal(),
|
|
4605
|
+
__metadata("design:type", pectin.Command)
|
|
4606
|
+
], ActivityActionsComponent.prototype, "cancelCommand", void 0);
|
|
4607
|
+
|
|
4492
4608
|
var ACTIVITY_DATA = new i0.InjectionToken('InteractionActivityData');
|
|
4493
4609
|
var Activity = /** @class */ (function (_super) {
|
|
4494
4610
|
__extends(Activity, _super);
|
|
4495
4611
|
function Activity() {
|
|
4496
|
-
var _this = _super.
|
|
4612
|
+
var _this = _super.call(this) || this;
|
|
4497
4613
|
_this._busyModel = new pectin.DelegatingValueModel().withDefault(false);
|
|
4498
4614
|
_this._focusedModel = _this.registerDisposable(new pectin.DelegatingValueModel());
|
|
4499
4615
|
_this.class = 'aup-activity';
|
|
@@ -4508,7 +4624,7 @@
|
|
|
4508
4624
|
});
|
|
4509
4625
|
Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
|
|
4510
4626
|
var _this = this;
|
|
4511
|
-
var
|
|
4627
|
+
var _b = pectin.Dsl.disposeWith(this), chain = _b.chain, when = _b.when;
|
|
4512
4628
|
typescriptUtilities.assert.isNil(this._activityContext);
|
|
4513
4629
|
this._activityContext = activityContext;
|
|
4514
4630
|
this._interactionContext = nestedInteractionContext;
|
|
@@ -4517,6 +4633,10 @@
|
|
|
4517
4633
|
_this.onActivityReady();
|
|
4518
4634
|
});
|
|
4519
4635
|
};
|
|
4636
|
+
Activity.prototype.ngAfterViewInit = function () {
|
|
4637
|
+
var _a;
|
|
4638
|
+
(_a = this.activityActions) === null || _a === void 0 ? void 0 : _a.initCommands(this);
|
|
4639
|
+
};
|
|
4520
4640
|
Object.defineProperty(Activity.prototype, "interactionContext", {
|
|
4521
4641
|
get: function () {
|
|
4522
4642
|
typescriptUtilities.assert.isTruthy(this.isInitialised());
|
|
@@ -4564,103 +4684,34 @@
|
|
|
4564
4684
|
template: ''
|
|
4565
4685
|
},] }
|
|
4566
4686
|
];
|
|
4687
|
+
Activity.ctorParameters = function () { return []; };
|
|
4567
4688
|
Activity.propDecorators = {
|
|
4689
|
+
activityActions: [{ type: i0.ViewChild, args: [ActivityActionsComponent,] }],
|
|
4568
4690
|
class: [{ type: i0.HostBinding, args: ['class',] }],
|
|
4569
4691
|
isFocused: [{ type: i0.HostBinding, args: ['attr.focused',] }]
|
|
4570
4692
|
};
|
|
4571
|
-
|
|
4572
|
-
/**
|
|
4573
|
-
* @example
|
|
4574
|
-
* <aup-activity-actions
|
|
4575
|
-
* [confirmCommand]="confirm"
|
|
4576
|
-
* [cancelCommand]="cancel"
|
|
4577
|
-
* [style]="{confirm: saveFace, cancel: cancelFace}">
|
|
4578
|
-
* </aup-activity-actions>
|
|
4579
|
-
*
|
|
4580
|
-
* // Running `ng g @coolon/angular-ui-powerups:aup-i18n` will install default
|
|
4581
|
-
* // style definitions
|
|
4582
|
-
* <aup-activity-actions
|
|
4583
|
-
* [confirmCommand]="confirm"
|
|
4584
|
-
* [cancelCommand]="cancel"
|
|
4585
|
-
* [style]="I18n.aup.components.activityActions.styles.okCancelIcons">
|
|
4586
|
-
* </aup-activity-actions>
|
|
4587
|
-
*
|
|
4588
|
-
* // both commands are optional
|
|
4589
|
-
* <aup-activity-actions
|
|
4590
|
-
* [confirmCommand]="confirm"
|
|
4591
|
-
* [style]="I18n.aup.components.activityActions.styles.okCancelIcons">
|
|
4592
|
-
* </aup-activity-actions>
|
|
4593
|
-
*
|
|
4594
|
-
* // you can also add additional content that will be displayed along with the buttons.
|
|
4595
|
-
* // The location of the content depends on the alignment attribute.
|
|
4596
|
-
* <aup-activity-actions
|
|
4597
|
-
* [confirmCommand]="confirm"
|
|
4598
|
-
* [cancelCommand]="cancel"
|
|
4599
|
-
* align="stretch"
|
|
4600
|
-
* [style]="I18n.aup.components.activityActions.styles.okCancelIcons">
|
|
4601
|
-
* <span>This content will be between the two commands</span>
|
|
4602
|
-
* </aup-activity-actions>
|
|
4603
|
-
*/
|
|
4604
|
-
var ActivityActionsComponent = /** @class */ (function (_super) {
|
|
4605
|
-
__extends(ActivityActionsComponent, _super);
|
|
4606
|
-
function ActivityActionsComponent() {
|
|
4607
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
4608
|
-
_this.align = 'start';
|
|
4609
|
-
return _this;
|
|
4610
|
-
}
|
|
4611
|
-
Object.defineProperty(ActivityActionsComponent.prototype, "alignEnd", {
|
|
4612
|
-
get: function () {
|
|
4613
|
-
return this.align === 'end';
|
|
4614
|
-
},
|
|
4615
|
-
enumerable: false,
|
|
4616
|
-
configurable: true
|
|
4617
|
-
});
|
|
4618
|
-
Object.defineProperty(ActivityActionsComponent.prototype, "alignStretch", {
|
|
4619
|
-
get: function () {
|
|
4620
|
-
return this.align === 'stretch';
|
|
4621
|
-
},
|
|
4622
|
-
enumerable: false,
|
|
4623
|
-
configurable: true
|
|
4624
|
-
});
|
|
4625
|
-
ActivityActionsComponent.prototype.ngOnInit = function () {
|
|
4626
|
-
};
|
|
4627
|
-
ActivityActionsComponent.prototype.hasConfirmCommand = function () {
|
|
4628
|
-
return pectin.DelegatingCommand.hasDelegate(this.confirmCommand);
|
|
4629
|
-
};
|
|
4630
|
-
ActivityActionsComponent.prototype.hasCancelCommand = function () {
|
|
4631
|
-
return pectin.DelegatingCommand.hasDelegate(this.cancelCommand);
|
|
4632
|
-
};
|
|
4633
|
-
return ActivityActionsComponent;
|
|
4634
|
-
}(DisposableComponent));
|
|
4635
|
-
ActivityActionsComponent.decorators = [
|
|
4636
|
-
{ type: i0.Component, args: [{
|
|
4637
|
-
selector: 'aup-activity-actions',
|
|
4638
|
-
template: "<ng-container *ngIf=\"hasCancelCommand()\">\n <aup-command class=\"cancel\" [command]=\"cancelCommand\" [face]=\"style.cancel\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasConfirmCommand()\">\n <aup-command class=\"confirm\" [command]=\"confirmCommand\" [face]=\"style.confirm\"></aup-command>\n</ng-container>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n",
|
|
4639
|
-
styles: [":host{-ms-grid-columns:auto auto 1fr;-ms-grid-rows:auto;align-items:center;display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr;grid-template-rows:auto;justify-content:end}:host.align-end{-ms-grid-columns:1fr auto auto;grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host.align-stretch{-ms-grid-columns:auto 1fr auto;grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}.cancel{-ms-grid-column:1;-ms-grid-row:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-column:2;-ms-grid-row:1}:host.align-stretch>.cancel{-ms-grid-column:1;-ms-grid-row:1}.confirm{-ms-grid-column:2;-ms-grid-row:1;grid-area:confirm}.column,:host.align-end>.confirm,:host.align-stretch>.confirm{-ms-grid-column:3;-ms-grid-row:1}.column{grid-area:content;text-align:left}:host.align-end>.column{-ms-grid-column:1;-ms-grid-row:1}:host.align-stretch>.column{-ms-grid-column:2;-ms-grid-row:1}"]
|
|
4640
|
-
},] }
|
|
4641
|
-
];
|
|
4642
|
-
ActivityActionsComponent.propDecorators = {
|
|
4643
|
-
confirmCommand: [{ type: i0.Input }],
|
|
4644
|
-
cancelCommand: [{ type: i0.Input }],
|
|
4645
|
-
style: [{ type: i0.Input }],
|
|
4646
|
-
align: [{ type: i0.Input }],
|
|
4647
|
-
alignEnd: [{ type: i0.HostBinding, args: ['class.align-end',] }],
|
|
4648
|
-
alignStretch: [{ type: i0.HostBinding, args: ['class.align-stretch',] }]
|
|
4649
|
-
};
|
|
4650
4693
|
__decorate([
|
|
4651
4694
|
pectin.TrackExternal(),
|
|
4652
4695
|
__metadata("design:type", pectin.Command)
|
|
4653
|
-
],
|
|
4696
|
+
], Activity.prototype, "confirmCommand", void 0);
|
|
4654
4697
|
__decorate([
|
|
4655
4698
|
pectin.TrackExternal(),
|
|
4656
4699
|
__metadata("design:type", pectin.Command)
|
|
4657
|
-
],
|
|
4700
|
+
], Activity.prototype, "cancelCommand", void 0);
|
|
4658
4701
|
|
|
4659
4702
|
var AlertDialogComponent = /** @class */ (function (_super) {
|
|
4660
4703
|
__extends(AlertDialogComponent, _super);
|
|
4661
4704
|
function AlertDialogComponent(alert) {
|
|
4662
4705
|
var _this = _super.call(this) || this;
|
|
4663
4706
|
_this.alert = alert;
|
|
4707
|
+
_this.confirmCommand = pectin.Command.create(function () {
|
|
4708
|
+
_this.done();
|
|
4709
|
+
});
|
|
4710
|
+
_this.confirmFace = {
|
|
4711
|
+
text: function () { return alert.ok(); },
|
|
4712
|
+
color: function () { return "primary"; },
|
|
4713
|
+
style: function () { return "raised"; }
|
|
4714
|
+
};
|
|
4664
4715
|
return _this;
|
|
4665
4716
|
}
|
|
4666
4717
|
AlertDialogComponent.prototype.ngOnInit = function () {
|
|
@@ -4670,7 +4721,7 @@
|
|
|
4670
4721
|
AlertDialogComponent.decorators = [
|
|
4671
4722
|
{ type: i0.Component, args: [{
|
|
4672
4723
|
selector: 'aup-alert-dialog',
|
|
4673
|
-
template: "<
|
|
4724
|
+
template: "<aup-activity-title *ngIf=\"alert.title\">{{alert.title()}}</aup-activity-title>\n<aup-activity-body>\n <p *ngFor=\"let line of alert.content()\">{{line}}</p>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\"></aup-activity-actions>\n",
|
|
4674
4725
|
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end;margin-bottom:0!important;padding:0}"]
|
|
4675
4726
|
},] }
|
|
4676
4727
|
];
|
|
@@ -4684,6 +4735,22 @@
|
|
|
4684
4735
|
var _this = _super.call(this) || this;
|
|
4685
4736
|
_this.config = config;
|
|
4686
4737
|
pectin.assert.notNil(config);
|
|
4738
|
+
_this.confirmCommand = pectin.Command.create(function () {
|
|
4739
|
+
_this.interactionContext.startActivity(_this.config.activityType, _this.config.data)
|
|
4740
|
+
.then(function (result) { return _this.done(result); })
|
|
4741
|
+
.catch(function (error) { return _this.cancel(error); });
|
|
4742
|
+
});
|
|
4743
|
+
_this.cancelCommand = pectin.Command.create(function () {
|
|
4744
|
+
return _this.cancel();
|
|
4745
|
+
});
|
|
4746
|
+
_this.confirmFace = {
|
|
4747
|
+
text: function () { return _this.confirm.ok(); },
|
|
4748
|
+
color: function () { return _this.isDestructive() ? 'warn' : 'primary'; },
|
|
4749
|
+
style: function () { return 'raised'; }
|
|
4750
|
+
};
|
|
4751
|
+
_this.cancelFace = {
|
|
4752
|
+
text: function () { return _this.confirm.cancel(); },
|
|
4753
|
+
};
|
|
4687
4754
|
return _this;
|
|
4688
4755
|
}
|
|
4689
4756
|
ConfirmThenDialogComponent.prototype.ngOnInit = function () {
|
|
@@ -4698,18 +4765,12 @@
|
|
|
4698
4765
|
ConfirmThenDialogComponent.prototype.isDestructive = function () {
|
|
4699
4766
|
return this.confirm.destructive && this.confirm.destructive();
|
|
4700
4767
|
};
|
|
4701
|
-
ConfirmThenDialogComponent.prototype.onConfirm = function () {
|
|
4702
|
-
var _this = this;
|
|
4703
|
-
this.interactionContext.startActivity(this.config.activityType, this.config.data)
|
|
4704
|
-
.then(function (result) { return _this.done(result); })
|
|
4705
|
-
.catch(function (error) { return _this.cancel(error); });
|
|
4706
|
-
};
|
|
4707
4768
|
return ConfirmThenDialogComponent;
|
|
4708
4769
|
}(Activity));
|
|
4709
4770
|
ConfirmThenDialogComponent.decorators = [
|
|
4710
4771
|
{ type: i0.Component, args: [{
|
|
4711
4772
|
selector: 'aup-confirmation-dialog',
|
|
4712
|
-
template: "<
|
|
4773
|
+
template: "<aup-activity-title *ngIf=\"confirm.title\">{{confirm.title()}}</aup-activity-title>\n<aup-activity-body>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\" [cancelFace]=\"cancelFace\"></aup-activity-actions>\n",
|
|
4713
4774
|
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end;margin-bottom:0!important;padding:0}"]
|
|
4714
4775
|
},] }
|
|
4715
4776
|
];
|
|
@@ -4723,6 +4784,20 @@
|
|
|
4723
4784
|
var _this = _super.call(this) || this;
|
|
4724
4785
|
_this.confirm = confirm;
|
|
4725
4786
|
pectin.assert.notNil(confirm);
|
|
4787
|
+
_this.confirmCommand = pectin.Command.create(function () {
|
|
4788
|
+
return _this.done();
|
|
4789
|
+
});
|
|
4790
|
+
_this.cancelCommand = pectin.Command.create(function () {
|
|
4791
|
+
return _this.cancel();
|
|
4792
|
+
});
|
|
4793
|
+
_this.confirmFace = {
|
|
4794
|
+
text: function () { return confirm.ok(); },
|
|
4795
|
+
color: function () { return _this.isDestructive() ? 'warn' : 'primary'; },
|
|
4796
|
+
style: function () { return 'raised'; }
|
|
4797
|
+
};
|
|
4798
|
+
_this.cancelFace = {
|
|
4799
|
+
text: function () { return confirm.cancel(); },
|
|
4800
|
+
};
|
|
4726
4801
|
return _this;
|
|
4727
4802
|
}
|
|
4728
4803
|
ConfirmationDialogComponent.prototype.ngOnInit = function () {
|
|
@@ -4735,7 +4810,7 @@
|
|
|
4735
4810
|
ConfirmationDialogComponent.decorators = [
|
|
4736
4811
|
{ type: i0.Component, args: [{
|
|
4737
4812
|
selector: 'aup-confirmation-dialog',
|
|
4738
|
-
template: "<
|
|
4813
|
+
template: "<aup-activity-title *ngIf=\"confirm.title\">{{confirm.title()}}</aup-activity-title>\n<aup-activity-body>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\" [cancelFace]=\"cancelFace\"></aup-activity-actions>\n\n",
|
|
4739
4814
|
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end;margin-bottom:0!important;padding:0}"]
|
|
4740
4815
|
},] }
|
|
4741
4816
|
];
|
|
@@ -5132,6 +5207,35 @@
|
|
|
5132
5207
|
activityOutlets: [{ type: i0.ViewChildren, args: [ActivityOutletComponent,] }]
|
|
5133
5208
|
};
|
|
5134
5209
|
|
|
5210
|
+
var ActivityBodyComponent = /** @class */ (function (_super) {
|
|
5211
|
+
__extends(ActivityBodyComponent, _super);
|
|
5212
|
+
function ActivityBodyComponent() {
|
|
5213
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
5214
|
+
}
|
|
5215
|
+
// @Input()
|
|
5216
|
+
// align: 'start' | 'end' | 'stretch' = 'start';
|
|
5217
|
+
//
|
|
5218
|
+
// @HostBinding('class.align-end')
|
|
5219
|
+
// get alignEnd():boolean {
|
|
5220
|
+
// return this.align === 'end'
|
|
5221
|
+
// }
|
|
5222
|
+
//
|
|
5223
|
+
// @HostBinding('class.align-stretch')
|
|
5224
|
+
// get alignStretch():boolean {
|
|
5225
|
+
// return this.align === 'stretch'
|
|
5226
|
+
// }
|
|
5227
|
+
ActivityBodyComponent.prototype.ngOnInit = function () {
|
|
5228
|
+
};
|
|
5229
|
+
return ActivityBodyComponent;
|
|
5230
|
+
}(DisposableComponent));
|
|
5231
|
+
ActivityBodyComponent.decorators = [
|
|
5232
|
+
{ type: i0.Component, args: [{
|
|
5233
|
+
selector: 'aup-activity-body',
|
|
5234
|
+
template: "<ng-content></ng-content>\n",
|
|
5235
|
+
styles: ["<ng-content></ng-content>\n"]
|
|
5236
|
+
},] }
|
|
5237
|
+
];
|
|
5238
|
+
|
|
5135
5239
|
var ActivityTitleComponent = /** @class */ (function (_super) {
|
|
5136
5240
|
__extends(ActivityTitleComponent, _super);
|
|
5137
5241
|
function ActivityTitleComponent() {
|
|
@@ -5701,7 +5805,7 @@
|
|
|
5701
5805
|
StringInputActivity.decorators = [
|
|
5702
5806
|
{ type: i0.Component, args: [{
|
|
5703
5807
|
selector: 'aup-string-input-activity',
|
|
5704
|
-
template: "\n <aup-string-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"></aup-string-input>\n <aup-activity-actions align=\"end\"\n [
|
|
5808
|
+
template: "\n <aup-string-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"></aup-string-input>\n <aup-activity-actions align=\"end\"\n [faces]=\"data.buttonStyle\"></aup-activity-actions>\n "
|
|
5705
5809
|
},] }
|
|
5706
5810
|
];
|
|
5707
5811
|
|
|
@@ -5735,7 +5839,7 @@
|
|
|
5735
5839
|
SelectInputActivity.decorators = [
|
|
5736
5840
|
{ type: i0.Component, args: [{
|
|
5737
5841
|
selector: 'aup-select-input-activity',
|
|
5738
|
-
template: "\n <aup-select-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"\n [options]=\"options\"\n [optionLabelFormat]=\"optionLabelFormat\"\n ></aup-select-input>\n <aup-activity-actions align=\"end\"
|
|
5842
|
+
template: "\n <aup-select-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"\n [options]=\"options\"\n [optionLabelFormat]=\"optionLabelFormat\"\n ></aup-select-input>\n <aup-activity-actions align=\"end\" [faces]=\"data.buttonStyle\"\n ></aup-activity-actions>\n "
|
|
5739
5843
|
},] }
|
|
5740
5844
|
];
|
|
5741
5845
|
|
|
@@ -5865,7 +5969,9 @@
|
|
|
5865
5969
|
AbstractInputActivity,
|
|
5866
5970
|
InteractionContextTriggerFor,
|
|
5867
5971
|
Activity,
|
|
5868
|
-
ActivityTitleComponent
|
|
5972
|
+
ActivityTitleComponent,
|
|
5973
|
+
ActivityBodyComponent,
|
|
5974
|
+
ActivityActionsComponent
|
|
5869
5975
|
],
|
|
5870
5976
|
exports: [
|
|
5871
5977
|
ActivityContainerComponent,
|
|
@@ -5877,7 +5983,8 @@
|
|
|
5877
5983
|
PopupInteractionContextComponent,
|
|
5878
5984
|
InteractionContextTriggerFor,
|
|
5879
5985
|
StringInputActivity,
|
|
5880
|
-
SelectInputActivity
|
|
5986
|
+
SelectInputActivity,
|
|
5987
|
+
ActivityBodyComponent
|
|
5881
5988
|
],
|
|
5882
5989
|
entryComponents: [
|
|
5883
5990
|
ActivityContainerComponent,
|
|
@@ -8946,6 +9053,7 @@
|
|
|
8946
9053
|
exports.AbstractValueInputComponent = AbstractValueInputComponent;
|
|
8947
9054
|
exports.Activity = Activity;
|
|
8948
9055
|
exports.ActivityActionsComponent = ActivityActionsComponent;
|
|
9056
|
+
exports.ActivityBodyComponent = ActivityBodyComponent;
|
|
8949
9057
|
exports.ActivityContainerComponent = ActivityContainerComponent;
|
|
8950
9058
|
exports.ActivityOutletComponent = ActivityOutletComponent;
|
|
8951
9059
|
exports.ActivityRef = ActivityRef;
|