@coolon/angular-ui-powerups 12.4.0-alpha.27 → 12.4.0-alpha.29

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.
Files changed (106) hide show
  1. package/assets/form.scss +5 -2
  2. package/assets/interaction.scss +6 -7
  3. package/bundles/coolon-angular-ui-powerups.umd.js +478 -114
  4. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  5. package/coolon-angular-ui-powerups.metadata.json +1 -1
  6. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  7. package/esm2015/lib/components/cards/abstract-card-container.component.js +29 -0
  8. package/esm2015/lib/components/cards/abstract-card-container.component.js.map +1 -0
  9. package/esm2015/lib/components/cards/abstract-card-container.component.metadata.json +1 -0
  10. package/esm2015/lib/components/cards/abstract-card-container.component.ngfactory.js.map +1 -0
  11. package/esm2015/lib/components/{card-container → cards/card-container}/card-container.component.js +4 -22
  12. package/esm2015/lib/components/cards/card-container/card-container.component.js.map +1 -0
  13. package/esm2015/lib/components/cards/card-container/card-container.component.metadata.json +1 -0
  14. package/esm2015/lib/components/cards/card-container/card-container.component.ngfactory.js.map +1 -0
  15. package/esm2015/lib/components/cards/card-container/card-container.component.scss.shim.ngstyle.js.map +1 -0
  16. package/esm2015/lib/components/cards/card-stack/card-stack.component.js +72 -0
  17. package/esm2015/lib/components/cards/card-stack/card-stack.component.js.map +1 -0
  18. package/esm2015/lib/components/cards/card-stack/card-stack.component.metadata.json +1 -0
  19. package/esm2015/lib/components/cards/card-stack/card-stack.component.ngfactory.js.map +1 -0
  20. package/esm2015/lib/components/cards/card-stack/card-stack.component.scss.shim.ngstyle.js.map +1 -0
  21. package/esm2015/lib/components/components.module.js +32 -24
  22. package/esm2015/lib/components/components.module.js.map +1 -1
  23. package/esm2015/lib/components/components.module.metadata.json +1 -1
  24. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  25. package/esm2015/lib/components/exports.js +4 -1
  26. package/esm2015/lib/components/exports.js.map +1 -1
  27. package/esm2015/lib/components/exports.metadata.json +1 -1
  28. package/esm2015/lib/components/forms/abstract-input.component.js +1 -0
  29. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  30. package/esm2015/lib/components/labelled-value/labelled-value.component.js +22 -0
  31. package/esm2015/lib/components/labelled-value/labelled-value.component.js.map +1 -0
  32. package/esm2015/lib/components/labelled-value/labelled-value.component.metadata.json +1 -0
  33. package/esm2015/lib/components/labelled-value/labelled-value.component.ngfactory.js.map +1 -0
  34. package/esm2015/lib/components/{card-container/card-container.component.scss.shim.ngstyle.js.map → labelled-value/labelled-value.component.scss.shim.ngstyle.js.map} +1 -1
  35. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +17 -11
  36. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
  37. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  38. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.js +19 -8
  39. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.js.map +1 -1
  40. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.metadata.json +1 -1
  41. package/esm2015/lib/interaction/components/editors/edit-context.js +2 -0
  42. package/esm2015/lib/interaction/components/editors/edit-context.js.map +1 -0
  43. package/esm2015/lib/interaction/components/editors/edit-context.metadata.json +1 -0
  44. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js +28 -0
  45. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js.map +1 -0
  46. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.metadata.json +1 -0
  47. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.js +160 -0
  48. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.js.map +1 -0
  49. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.metadata.json +1 -0
  50. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.ngfactory.js.map +1 -0
  51. package/esm2015/lib/interaction/components/input-activities/input-activity.js +71 -0
  52. package/esm2015/lib/interaction/components/input-activities/input-activity.js.map +1 -0
  53. package/esm2015/lib/interaction/components/input-activities/input-activity.metadata.json +1 -0
  54. package/esm2015/lib/interaction/components/input-activities/input-activity.ngfactory.js.map +1 -0
  55. package/esm2015/lib/interaction/components/input-activities/select-input-activity.js +3 -3
  56. package/esm2015/lib/interaction/components/input-activities/select-input-activity.js.map +1 -1
  57. package/esm2015/lib/interaction/components/input-activities/select-input-activity.metadata.json +1 -1
  58. package/esm2015/lib/interaction/components/input-activities/string-input-activity.js +3 -4
  59. package/esm2015/lib/interaction/components/input-activities/string-input-activity.js.map +1 -1
  60. package/esm2015/lib/interaction/components/input-activities/string-input-activity.metadata.json +1 -1
  61. package/esm2015/lib/interaction/exports.js +4 -3
  62. package/esm2015/lib/interaction/exports.js.map +1 -1
  63. package/esm2015/lib/interaction/exports.metadata.json +1 -1
  64. package/esm2015/lib/interaction/interaction.module.js +5 -2
  65. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  66. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  67. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  68. package/esm2015/lib/place/place-router.js +3 -8
  69. package/esm2015/lib/place/place-router.js.map +1 -1
  70. package/esm2015/lib/place/place-router.metadata.json +1 -1
  71. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  72. package/fesm2015/coolon-angular-ui-powerups.js +400 -82
  73. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  74. package/lib/components/cards/abstract-card-container.component.d.ts +11 -0
  75. package/lib/components/{card-container → cards/card-container}/card-container.component.d.ts +2 -10
  76. package/lib/components/cards/card-stack/card-stack.component.d.ts +63 -0
  77. package/lib/components/exports.d.ts +4 -1
  78. package/lib/components/labelled-value/labelled-value.component.d.ts +7 -0
  79. package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +14 -3
  80. package/lib/interaction/components/add-card-activity/add-card-activity.component.d.ts +15 -2
  81. package/lib/interaction/components/editors/edit-context.d.ts +3 -0
  82. package/lib/interaction/components/editors/inline-string-editor/inline-editor-model.d.ts +18 -0
  83. package/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.d.ts +56 -0
  84. package/lib/interaction/components/input-activities/input-activity.d.ts +33 -0
  85. package/lib/interaction/components/input-activities/select-input-activity.d.ts +11 -3
  86. package/lib/interaction/components/input-activities/string-input-activity.d.ts +2 -2
  87. package/lib/interaction/exports.d.ts +4 -3
  88. package/package.json +1 -1
  89. package/schematics/activity/templates/component/__name@dasherize__.component.html.template +1 -1
  90. package/schematics/activity/templates/component/__name@dasherize__.component.ts.template +5 -3
  91. package/esm2015/lib/components/card-container/card-container.component.js.map +0 -1
  92. package/esm2015/lib/components/card-container/card-container.component.metadata.json +0 -1
  93. package/esm2015/lib/components/card-container/card-container.component.ngfactory.js.map +0 -1
  94. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js +0 -43
  95. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js.map +0 -1
  96. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.metadata.json +0 -1
  97. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.ngfactory.js.map +0 -1
  98. package/esm2015/lib/interaction/components/input-activities/input-activity-data.js +0 -2
  99. package/esm2015/lib/interaction/components/input-activities/input-activity-data.js.map +0 -1
  100. package/esm2015/lib/interaction/components/input-activities/input-activity-data.metadata.json +0 -1
  101. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.js +0 -2
  102. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.js.map +0 -1
  103. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.metadata.json +0 -1
  104. package/lib/interaction/components/input-activities/abstract-input-activity.d.ts +0 -12
  105. package/lib/interaction/components/input-activities/input-activity-data.d.ts +0 -11
  106. package/lib/interaction/components/input-activities/select-input-activity-data.d.ts +0 -8
@@ -21,7 +21,7 @@ import { MatTableModule } from '@angular/material/table';
21
21
  import { MatTooltipModule } from '@angular/material/tooltip';
22
22
  import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
23
23
  import { fas } from '@fortawesome/free-solid-svg-icons';
24
- import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, MutableValueModel, DelegatingListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, MultipleSelectionModel, DelegatingSelectionModel, AbstractComputedListModel, DirtyTrackingForm, ComputedListModel, PageController, Deferred, Trace, Functions } from '@coolon/pectin';
24
+ import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, MutableValueModel, DelegatingListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, MultipleSelectionModel, DelegatingSelectionModel, AbstractComputedListModel, DirtyTrackingForm, ComputedListModel, PageController, Deferred, Functions } from '@coolon/pectin';
25
25
  import { __decorate, __metadata, __awaiter } from 'tslib';
26
26
  import { DomSanitizer } from '@angular/platform-browser';
27
27
  import * as _ from 'lodash';
@@ -526,6 +526,30 @@ var CommandFace;
526
526
  CommandFace.Adapter = Adapter;
527
527
  })(CommandFace || (CommandFace = {}));
528
528
 
529
+ class AbstractCardContainerComponent extends DisposableComponent {
530
+ constructor() {
531
+ super();
532
+ }
533
+ ngOnInit() {
534
+ }
535
+ }
536
+ AbstractCardContainerComponent.decorators = [
537
+ { type: Component, args: [{
538
+ selector: 'aup-abstract-card-container',
539
+ template: ''
540
+ },] }
541
+ ];
542
+ AbstractCardContainerComponent.ctorParameters = () => [];
543
+ AbstractCardContainerComponent.propDecorators = {
544
+ addCardCommand: [{ type: Input }],
545
+ addCardFace: [{ type: Input }],
546
+ addCardTemplate: [{ type: ContentChild, args: ['addCardTemplate',] }]
547
+ };
548
+ __decorate([
549
+ TrackExternal(),
550
+ __metadata("design:type", Command)
551
+ ], AbstractCardContainerComponent.prototype, "addCardCommand", void 0);
552
+
529
553
  /**
530
554
  * @example
531
555
  * // basic usage
@@ -587,30 +611,85 @@ var CommandFace;
587
611
  * --card-background: var(--card-background, #fcfcfb);
588
612
  * }
589
613
  */
590
- class CardContainerComponent extends DisposableComponent {
591
- constructor() {
592
- super();
593
- }
594
- ngOnInit() {
595
- }
614
+ class CardContainerComponent extends AbstractCardContainerComponent {
596
615
  }
597
616
  CardContainerComponent.decorators = [
598
617
  { type: Component, args: [{
599
618
  selector: 'aup-card-container',
600
- 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",
619
+ 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</div>\n",
601
620
  styles: [":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:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-auto-rows:minmax(var(--resolved-card-min-height),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:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s 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}"]
602
621
  },] }
603
622
  ];
604
- CardContainerComponent.ctorParameters = () => [];
605
- CardContainerComponent.propDecorators = {
606
- addCardCommand: [{ type: Input }],
607
- addCardFace: [{ type: Input }],
608
- addCardTemplate: [{ type: ContentChild, args: ["addCardTemplate",] }]
609
- };
610
- __decorate([
611
- TrackExternal(),
612
- __metadata("design:type", Command)
613
- ], CardContainerComponent.prototype, "addCardCommand", void 0);
623
+
624
+ /**
625
+ * @example
626
+ * // basic usage
627
+ * <aup-card-stack>
628
+ * <my-card *ngFor="..."></my-card>
629
+ * </aup-card-stack>
630
+ *
631
+ * // adds an add button with a the '+' icon to the end of the card list.
632
+ * <aup-card-stack [addCardCommand]="addCard">
633
+ * <my-card *ngFor="..."></my-card>
634
+ * </aup-card-stack>
635
+ *
636
+ * // adds an add button with the specified face
637
+ * <aup-card-stack [addCardCommand]="addCard" [addCardFace]="i18n.addCard" >
638
+ * <my-card *ngFor="..."></my-card>
639
+ * </aup-card-stack>
640
+ *
641
+ * // use the aup-add-card-activity to display as the new card place holder and to run
642
+ * // the activity inside teh card
643
+ * <aup-card-stack [addCardCommand]="addCard" [addCardFace]="i18n.addCard" >
644
+ * <my-card *ngFor="..."></my-card>
645
+ * <aup-add-card-activity type="inline" renderAs="card" [face]="i18n.commands.addModal" [activityClass]="AddCardActivity"></aup-add-card-activity>
646
+ * </aup-card-stack>
647
+ *
648
+ * // adds an add card component using the specified template. The template
649
+ * // will fill it's container in the grid.
650
+ * <aup-card-stack>
651
+ * <my-card *ngFor="..."></my-card>
652
+ * <ng-template #addCardTemplate>
653
+ * <div>This is a new card template, it will the the size of the other cards.</div>
654
+ * </ng-template>
655
+ * </aup-card-stack>
656
+ *
657
+ * // sing the default new card styles for your template
658
+ * @import "../../../../assets/styles";
659
+ * .my-new-card {
660
+ * @include aup-card-stack-new-card-style();
661
+ * // OR
662
+ * @include aup-card-stack-new-card-style(
663
+ * $color: rgba(0,0,0,0.54),
664
+ * $background-color: rgba(255,255,255,0.8),
665
+ * $hover-color: $color,
666
+ * $background-hover-color: white
667
+ * )
668
+ * }
669
+ * <aup-card-stack>
670
+ * <my-card *ngFor="..."></my-card>
671
+ * <ng-template #addCardTemplate>
672
+ * <div class="my-new-card" >This is a new card template, it will the the size of the other cards.</div>
673
+ * </ng-template>
674
+ * </aup-card-stack>
675
+ *
676
+ * // CSS Vars
677
+ * aup-card-stack {
678
+ * --card-gap: var(--card-gap, 16px);
679
+ * --card-height: var(--card-height, auto);
680
+ * --card-min-height: var(--card-min-height, auto);
681
+ * --card-background: var(--card-background, #fcfcfb);
682
+ * }
683
+ */
684
+ class CardStackComponent extends AbstractCardContainerComponent {
685
+ }
686
+ CardStackComponent.decorators = [
687
+ { type: Component, args: [{
688
+ selector: 'aup-card-stack',
689
+ template: "<div class=\"card-container\">\n <ng-content></ng-content>\n</div>\n<div class=\"footer\">\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 <ng-content select=\"[aup-card-stack-footer]\"></ng-content>\n</div>\n",
690
+ styles: [":host{--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-background:var(--card-background,#fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:grid;grid-template-columns:1fr;grid-auto-rows:minmax(var(--resolved-card-min-height),var(--resolved-card-height));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);max-width:100%}.footer{align-items:stretch;padding:0 var(--resolved-card-gap) var(--resolved-card-gap)}.add-card-container,.footer{display:flex;flex-direction:column}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);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:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s 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}"]
691
+ },] }
692
+ ];
614
693
 
615
694
  /**
616
695
  * Custom CSS:
@@ -1229,6 +1308,7 @@ class AbstractInputComponent extends DisposableComponent {
1229
1308
  constructor() {
1230
1309
  super();
1231
1310
  this.onValueEditedListeners = new EventListenerList();
1311
+ this.userFloatLabel = 'always'; // TODO: make this an injectable default
1232
1312
  this.dense = false;
1233
1313
  // TODO: fix this.
1234
1314
  // tslint:disable-next-line:no-output-native
@@ -3926,6 +4006,26 @@ __decorate([
3926
4006
  __metadata("design:type", PageController)
3927
4007
  ], PaginatorComponent.prototype, "pageController", void 0);
3928
4008
 
4009
+ class LabelledValueComponent extends DisposableComponent {
4010
+ constructor() {
4011
+ super();
4012
+ // const {chain} = Dsl.disposeWith(this);
4013
+ }
4014
+ ngOnInit() {
4015
+ }
4016
+ }
4017
+ LabelledValueComponent.decorators = [
4018
+ { type: Component, args: [{
4019
+ selector: 'aup-labelled-value',
4020
+ template: "<label>{{label}}</label>\n<ng-content></ng-content>\n",
4021
+ styles: [":host{display:inline-flex;flex-direction:column;align-items:flex-start}label{font-weight:400;font-size:12px;color:rgba(0,0,0,.57);margin-bottom:6px;white-space:nowrap}"]
4022
+ },] }
4023
+ ];
4024
+ LabelledValueComponent.ctorParameters = () => [];
4025
+ LabelledValueComponent.propDecorators = {
4026
+ label: [{ type: Input }]
4027
+ };
4028
+
3929
4029
  class ComponentsModule {
3930
4030
  constructor(faIconLibrary) {
3931
4031
  faIconLibrary.addIconPacks(fas);
@@ -3933,6 +4033,28 @@ class ComponentsModule {
3933
4033
  }
3934
4034
  ComponentsModule.decorators = [
3935
4035
  { type: NgModule, args: [{
4036
+ imports: [
4037
+ CommonModule,
4038
+ BrowserAnimationsModule,
4039
+ FormsModule,
4040
+ MatInputModule,
4041
+ MatFormFieldModule,
4042
+ MatSelectModule,
4043
+ MatTabsModule,
4044
+ DirectivesModule,
4045
+ MatIconModule,
4046
+ MatButtonModule,
4047
+ MatCheckboxModule,
4048
+ MatTableModule,
4049
+ PortalModule,
4050
+ CdkScrollableModule,
4051
+ FontAwesomeModule,
4052
+ MatTooltipModule,
4053
+ MatAutocompleteModule,
4054
+ MatMenuModule,
4055
+ MatDividerModule,
4056
+ MatProgressSpinnerModule
4057
+ ],
3936
4058
  declarations: [
3937
4059
  AbstractInputComponent,
3938
4060
  AbstractValueInputComponent,
@@ -3981,29 +4103,10 @@ ComponentsModule.decorators = [
3981
4103
  BusyOverlayComponent,
3982
4104
  EmptyStateComponent,
3983
4105
  PaginatorComponent,
3984
- AbstractTableComponent
3985
- ],
3986
- imports: [
3987
- CommonModule,
3988
- BrowserAnimationsModule,
3989
- FormsModule,
3990
- MatInputModule,
3991
- MatFormFieldModule,
3992
- MatSelectModule,
3993
- MatTabsModule,
3994
- DirectivesModule,
3995
- MatIconModule,
3996
- MatButtonModule,
3997
- MatCheckboxModule,
3998
- MatTableModule,
3999
- PortalModule,
4000
- CdkScrollableModule,
4001
- FontAwesomeModule,
4002
- MatTooltipModule,
4003
- MatAutocompleteModule,
4004
- MatMenuModule,
4005
- MatDividerModule,
4006
- MatProgressSpinnerModule
4106
+ AbstractTableComponent,
4107
+ AbstractCardContainerComponent,
4108
+ CardStackComponent,
4109
+ LabelledValueComponent
4007
4110
  ],
4008
4111
  exports: [
4009
4112
  NumberInputComponent,
@@ -4040,6 +4143,8 @@ ComponentsModule.decorators = [
4040
4143
  BusyOverlayComponent,
4041
4144
  EmptyStateComponent,
4042
4145
  PaginatorComponent,
4146
+ CardStackComponent,
4147
+ LabelledValueComponent,
4043
4148
  ],
4044
4149
  providers: [
4045
4150
  FocusBindingFactory
@@ -4075,7 +4180,8 @@ class ActivityActionsComponent extends DisposableComponent {
4075
4180
  constructor(cdr) {
4076
4181
  super();
4077
4182
  this.cdr = cdr;
4078
- this.align = 'stretch';
4183
+ this.layout = ActivityActionsComponent.Layout.BLOCK;
4184
+ this.align = ActivityActionsComponent.Align.STRETCH;
4079
4185
  }
4080
4186
  set faces(faces) {
4081
4187
  this.confirmFace = faces.confirm;
@@ -4087,12 +4193,6 @@ class ActivityActionsComponent extends DisposableComponent {
4087
4193
  set style(style) {
4088
4194
  this.faces = style;
4089
4195
  }
4090
- get alignEnd() {
4091
- return this.align === 'end';
4092
- }
4093
- get alignStretch() {
4094
- return this.align === 'stretch';
4095
- }
4096
4196
  ngOnInit() {
4097
4197
  }
4098
4198
  hasConfirmFace() {
@@ -4111,7 +4211,7 @@ ActivityActionsComponent.decorators = [
4111
4211
  { type: Component, args: [{
4112
4212
  selector: 'aup-activity-actions',
4113
4213
  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",
4114
- styles: [":host{display:grid;grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host.align-stretch{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.content{grid-area:content;text-align:left}"]
4214
+ styles: [":host{display:grid;grid-template-rows:auto;align-items:center;justify-content:end}:host[layout=block][align=start]{grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr}:host[layout=block][align=end]{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host[layout=block][align=stretch]{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}:host[layout=inline]{grid-template-areas:\"confirm cancel content\";grid-template-columns:auto auto 1fr;padding:0}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.content{grid-area:content;text-align:left}"]
4115
4215
  },] }
4116
4216
  ];
4117
4217
  ActivityActionsComponent.ctorParameters = () => [
@@ -4124,9 +4224,8 @@ ActivityActionsComponent.propDecorators = {
4124
4224
  confirmFace: [{ type: Input }],
4125
4225
  cancelFace: [{ type: Input }],
4126
4226
  style: [{ type: Input }],
4127
- align: [{ type: Input }],
4128
- alignEnd: [{ type: HostBinding, args: ['class.align-end',] }],
4129
- alignStretch: [{ type: HostBinding, args: ['class.align-stretch',] }]
4227
+ layout: [{ type: Input }, { type: HostBinding, args: ['attr.layout',] }],
4228
+ align: [{ type: Input }, { type: HostBinding, args: ['attr.align',] }]
4130
4229
  };
4131
4230
  __decorate([
4132
4231
  TrackExternal(),
@@ -4136,6 +4235,17 @@ __decorate([
4136
4235
  TrackExternal(),
4137
4236
  __metadata("design:type", Command)
4138
4237
  ], ActivityActionsComponent.prototype, "cancelCommand", void 0);
4238
+ (function (ActivityActionsComponent) {
4239
+ ActivityActionsComponent.Layout = Enum({
4240
+ INLINE: 'inline',
4241
+ BLOCK: 'block'
4242
+ });
4243
+ ActivityActionsComponent.Align = Enum({
4244
+ START: 'start',
4245
+ END: 'end',
4246
+ STRETCH: 'stretch'
4247
+ });
4248
+ })(ActivityActionsComponent || (ActivityActionsComponent = {}));
4139
4249
 
4140
4250
  const ACTIVITY_DATA = new InjectionToken('InteractionActivityData');
4141
4251
  class Activity extends DisposableComponent {
@@ -5057,8 +5167,8 @@ InPlaceInteractionContextComponent.propDecorators = {
5057
5167
  class AddCardActivityComponent extends AbstractActivityTriggerComponent {
5058
5168
  constructor(interactionService) {
5059
5169
  super();
5060
- this.type = 'modal';
5061
- this.renderAs = 'card';
5170
+ this.interactionStyle = AddCardActivityComponent.InteractionType.MODAL;
5171
+ this.renderAs = AddCardActivityComponent.RenderAs.CARD;
5062
5172
  const { chain } = Dsl.disposeWith(this);
5063
5173
  this.modalInteractionContext = interactionService.createModalInteractionContextDisposedWith(this);
5064
5174
  this.faceList = chain(this.faceModel).mapToList(face => [face]);
@@ -5067,7 +5177,7 @@ class AddCardActivityComponent extends AbstractActivityTriggerComponent {
5067
5177
  return `render-as-${this.renderAs}`;
5068
5178
  }
5069
5179
  get activityTypeClass() {
5070
- return `${this.type}-activity`;
5180
+ return `${this.interactionStyle}-activity`;
5071
5181
  }
5072
5182
  isRenderAsCard() {
5073
5183
  return this.renderAs === 'card';
@@ -5078,7 +5188,7 @@ class AddCardActivityComponent extends AbstractActivityTriggerComponent {
5078
5188
  ngOnInit() {
5079
5189
  }
5080
5190
  get interactionContext() {
5081
- switch (this.type) {
5191
+ switch (this.interactionStyle) {
5082
5192
  case 'inline':
5083
5193
  return this.inlineInteractionContext;
5084
5194
  default:
@@ -5086,17 +5196,17 @@ class AddCardActivityComponent extends AbstractActivityTriggerComponent {
5086
5196
  }
5087
5197
  }
5088
5198
  isModal() {
5089
- return this.type === 'modal';
5199
+ return this.interactionStyle === 'modal';
5090
5200
  }
5091
5201
  isInline() {
5092
- return this.type === 'inline';
5202
+ return this.interactionStyle === 'inline';
5093
5203
  }
5094
5204
  }
5095
5205
  AddCardActivityComponent.decorators = [
5096
5206
  { type: Component, args: [{
5097
5207
  selector: 'aup-add-card-activity',
5098
5208
  template: "<aup-in-place-interaction-context [animateFirstActivity]=\"false\" [pectinCommand]=\"startActivityCommand\">\n <aup-command *ngIf=\"isRenderAsButton()\" [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n <section *ngIf=\"isRenderAsCard()\" class=\"face-wrapper\">\n <aup-command-face class=\"mat-button\" [faces]=\"faceList.value\"></aup-command-face>\n </section>\n</aup-in-place-interaction-context>\n",
5099
- styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host[type=inline][renderas=card]:not(.active){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:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[type=inline][renderas=card]:not(.active):hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[type=inline][renderas=card]:not(.active):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)}:host[type=modal][renderas=card]{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:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[type=modal][renderas=card]:hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[type=modal][renderas=card]: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)}section.face-wrapper{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}aup-in-place-interaction-context{flex:1}aup-in-place-interaction-context.active{border:3px solid #6273c7;border-radius:4px;overflow:hidden}"]
5209
+ styles: [":host{display:flex;flex-direction:column;align-items:stretch;background-color:#fff}:host[interactionStyle=inline][renderas=card]:not(.active){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:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=inline][renderas=card]:not(.active):hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=inline][renderas=card]:not(.active):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)}:host[interactionStyle=modal][renderas=card]{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:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}:host[interactionStyle=modal][renderas=card]:hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=modal][renderas=card]: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)}section.face-wrapper{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}aup-in-place-interaction-context{flex:1}aup-in-place-interaction-context.active{border:3px solid #6273c7;border-radius:4px;overflow:hidden}"]
5100
5210
  },] }
5101
5211
  ];
5102
5212
  AddCardActivityComponent.ctorParameters = () => [
@@ -5104,11 +5214,21 @@ AddCardActivityComponent.ctorParameters = () => [
5104
5214
  ];
5105
5215
  AddCardActivityComponent.propDecorators = {
5106
5216
  inlineInteractionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent, { static: true },] }],
5107
- type: [{ type: Input }],
5217
+ interactionStyle: [{ type: Input }],
5108
5218
  renderAs: [{ type: Input }, { type: HostBinding, args: ['class',] }],
5109
5219
  renderAsClass: [{ type: HostBinding, args: ['class',] }],
5110
5220
  activityTypeClass: [{ type: HostBinding, args: ['class',] }]
5111
5221
  };
5222
+ (function (AddCardActivityComponent) {
5223
+ AddCardActivityComponent.InteractionType = Enum({
5224
+ MODAL: 'modal',
5225
+ INLINE: 'inline'
5226
+ });
5227
+ AddCardActivityComponent.RenderAs = Enum({
5228
+ CARD: 'card',
5229
+ BUTTON: 'button'
5230
+ });
5231
+ })(AddCardActivityComponent || (AddCardActivityComponent = {}));
5112
5232
 
5113
5233
  /**
5114
5234
  * Css Vars.
@@ -5345,7 +5465,7 @@ InteractionContextTriggerFor.propDecorators = {
5345
5465
  // @see https://github.com/ng-packagr/ng-packagr/issues/641 and https://github.com/angular/angular/issues/21123
5346
5466
  // we're getting a metadata error for D for no reason that I can find and only during the build (ng serve works fine)
5347
5467
  // @dynamic
5348
- class AbstractInputActivity extends Activity {
5468
+ class InputActivity extends Activity {
5349
5469
  constructor(data) {
5350
5470
  super();
5351
5471
  this.data = data;
@@ -5353,36 +5473,62 @@ class AbstractInputActivity extends Activity {
5353
5473
  const form = new DirtyTrackingForm();
5354
5474
  this.valueModel = form.valueModel(this.data.initialValue);
5355
5475
  this.valueModel.validateUsing(data.validators || []);
5356
- this.confirmCommand = Command.create(() => {
5476
+ this.confirmCommand = Command.create(() => __awaiter(this, void 0, void 0, function* () {
5357
5477
  if (this.valueModel.validate()) {
5358
5478
  if (data.save) {
5359
- return Promise.resolve(data.save(this.valueModel, this.interactionContext))
5360
- .then(() => this.done());
5479
+ const self = this;
5480
+ try {
5481
+ let allGood = true;
5482
+ const result = yield data.save(this.valueModel.value, {
5483
+ injectError(error) {
5484
+ allGood = false;
5485
+ self.valueModel.injectErrors([error]);
5486
+ }
5487
+ });
5488
+ if (allGood) {
5489
+ this.done(this.valueModel.value);
5490
+ }
5491
+ }
5492
+ catch (e) {
5493
+ // don't care, just hide error messages
5494
+ }
5361
5495
  }
5362
5496
  else {
5363
5497
  this.done(this.valueModel.value);
5364
5498
  }
5365
5499
  }
5366
- });
5500
+ }));
5367
5501
  this.cancelCommand = Command.create(() => {
5368
5502
  this.cancel();
5369
5503
  });
5504
+ this.busyWhile(this.confirmCommand.busy);
5505
+ }
5506
+ get layout() {
5507
+ var _a, _b;
5508
+ return (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.layout) !== null && _b !== void 0 ? _b : InputActivity.Layout.BLOCK;
5370
5509
  }
5371
5510
  onActivityReady() {
5372
5511
  this.valueModel.focusContext.requestFocus();
5373
5512
  }
5374
5513
  }
5375
- AbstractInputActivity.decorators = [
5514
+ InputActivity.decorators = [
5376
5515
  { type: Component, args: [{ template: `` },] }
5377
5516
  ];
5378
- AbstractInputActivity.ctorParameters = () => [
5517
+ InputActivity.ctorParameters = () => [
5379
5518
  { type: undefined, decorators: [{ type: Inject, args: [ACTIVITY_DATA,] }] }
5380
5519
  ];
5381
- AbstractInputActivity.propDecorators = {
5382
- class: [{ type: HostBinding, args: ['class',] }]
5520
+ InputActivity.propDecorators = {
5521
+ class: [{ type: HostBinding, args: ['class',] }],
5522
+ layout: [{ type: Input }, { type: HostBinding, args: ['attr.layout',] }]
5383
5523
  };
5524
+ (function (InputActivity) {
5525
+ InputActivity.Layout = Enum({
5526
+ INLINE: 'inline',
5527
+ BLOCK: 'block'
5528
+ });
5529
+ })(InputActivity || (InputActivity = {}));
5384
5530
 
5385
- class StringInputActivity extends AbstractInputActivity {
5531
+ class StringInputActivity extends InputActivity {
5386
5532
  }
5387
5533
  StringInputActivity.decorators = [
5388
5534
  { type: Component, args: [{
@@ -5393,13 +5539,12 @@ StringInputActivity.decorators = [
5393
5539
  [placeholder]="data.placeholder"
5394
5540
  [command.enter]="confirmCommand"
5395
5541
  [command.escape]="cancelCommand"></aup-string-input>
5396
- <aup-activity-actions align="end"
5397
- [faces]="data.buttonStyle"></aup-activity-actions>
5542
+ <aup-activity-actions [layout]="layout" align="end" [faces]="data.buttonStyle"></aup-activity-actions>
5398
5543
  `
5399
5544
  },] }
5400
5545
  ];
5401
5546
 
5402
- class SelectInputActivity extends AbstractInputActivity {
5547
+ class SelectInputActivity extends InputActivity {
5403
5548
  constructor() {
5404
5549
  super(...arguments);
5405
5550
  this.defaultOptionLabelFormat = (option) => {
@@ -5427,7 +5572,7 @@ SelectInputActivity.decorators = [
5427
5572
  [options]="options"
5428
5573
  [optionLabelFormat]="optionLabelFormat"
5429
5574
  ></aup-select-input>
5430
- <aup-activity-actions align="end" [faces]="data.buttonStyle"
5575
+ <aup-activity-actions [layout]="layout" align="end" [faces]="data.buttonStyle"
5431
5576
  ></aup-activity-actions>
5432
5577
  `
5433
5578
  },] }
@@ -5587,6 +5732,182 @@ PopupActivityTriggerComponent.propDecorators = {
5587
5732
  _interactionContext: [{ type: ViewChild, args: [PopupInteractionContextComponent, { static: true },] }]
5588
5733
  };
5589
5734
 
5735
+ class InlineEditorModel {
5736
+ constructor(valueModel, saveCallback) {
5737
+ this.valueModel = valueModel;
5738
+ this.saveCallback = saveCallback;
5739
+ this.editing = new MutableValueModel(false);
5740
+ this._validators = new MutableListModel();
5741
+ }
5742
+ get validators() {
5743
+ return this._validators.readonly;
5744
+ }
5745
+ validateUsing(validator) {
5746
+ this._validators.push(validator);
5747
+ return this;
5748
+ }
5749
+ ;
5750
+ isEditing() {
5751
+ return this.editing.value;
5752
+ }
5753
+ }
5754
+ (function (InlineEditorModel) {
5755
+ function create(valueModel, options) {
5756
+ return new InlineEditorModel(valueModel, options.save);
5757
+ }
5758
+ InlineEditorModel.create = create;
5759
+ })(InlineEditorModel || (InlineEditorModel = {}));
5760
+ TrackExternal.oneTimeBinding(InlineEditorModel);
5761
+
5762
+ /**
5763
+ * @example
5764
+ * const source: ValueModel<string> = ...;
5765
+ * const model = InlineEditorModel.create(source, {
5766
+ * save(updated:string, context: InlineEditorModel.SaveContext) => {
5767
+ * try {
5768
+ * try and save the thing...
5769
+ * } catch(error) {
5770
+ * context.injectError(error)
5771
+ * }
5772
+ * }).validateUsing(Validator.present("We'll need a value");
5773
+ *
5774
+ * # in the view
5775
+ * <aup-inline-string-editor
5776
+ * label="My field"
5777
+ * placeHolder="I'm ready for a string..."
5778
+ * [editorModel]="model"></aup-inline-string-editor>
5779
+ */
5780
+ class InlineStringEditorComponent extends DisposableComponent {
5781
+ constructor(interactionService) {
5782
+ super();
5783
+ const { chain, when, valueOf } = Dsl.disposeWith(this);
5784
+ const modalIC = interactionService.createModalInteractionContextDisposedWith(this);
5785
+ const resolvedFacesModel = chain(this.facesModel).map(userFaces => {
5786
+ return Object.assign(Object.assign({}, InlineStringEditorComponent.DEFAULT_FACES), userFaces);
5787
+ }, { allowNil: true });
5788
+ this.editFaceModel = resolvedFacesModel.pluck('edit');
5789
+ this.saveFace = resolvedFacesModel.pluck('save');
5790
+ this.cancelFace = resolvedFacesModel.pluck('cancel');
5791
+ const self = this;
5792
+ this.editCommand = Command.create(() => __awaiter(this, void 0, void 0, function* () {
5793
+ this.editorModel.editing.value = true;
5794
+ try {
5795
+ yield this.interactionContext.startActivity(StringInputActivity, this.createInputActivityData());
5796
+ }
5797
+ catch (e) {
5798
+ // don't care, just hiding the console errors
5799
+ }
5800
+ finally {
5801
+ this.editorModel.editing.value = false;
5802
+ }
5803
+ }));
5804
+ this.onDispose(() => this.cancelEdit());
5805
+ // const txo = new TransactionObserver({ verbose: true }).onEvent(e => console.log(e.name, e.payload));
5806
+ // txo.observe('this.editFace', this.editFaceModel);
5807
+ }
5808
+ ngOnInit() {
5809
+ // our editor model is a one time binding without delegates so we can only
5810
+ // use it once we've been initialised
5811
+ const { chain, when, valueOf } = Dsl.disposeWith(this);
5812
+ if (!this.editorModel) {
5813
+ lang$1.illegalState("editorModel is required");
5814
+ }
5815
+ when(this.editorModel.editing).becomesTruthy(() => {
5816
+ this.editCommand.execute();
5817
+ }, { asLongAs: this.editCommand.enabled });
5818
+ when(this.editorModel.editing).becomesFalsey(() => this.cancelEdit());
5819
+ this.empty = valueOf.any(chain.stringValue(this.editorModel.valueModel).isBlank()
5820
+ // deviceDescription.isNil()
5821
+ ).areTruthy();
5822
+ this.displayValue = chain(this.editorModel.valueModel).map(v => {
5823
+ return _.isEmpty(v) ? this.placeHolderModel.value : v;
5824
+ }, { dependsOn: this.placeHolderModel, allowNil: true });
5825
+ }
5826
+ createInputActivityData() {
5827
+ const self = this;
5828
+ return {
5829
+ initialValue: self.editorModel.valueModel.value,
5830
+ buttonStyle: { confirm: self.saveFace.value, cancel: self.cancelFace.value },
5831
+ placeholder: self.placeHolderModel.value,
5832
+ label: self.label,
5833
+ layout: InputActivity.Layout.INLINE,
5834
+ validators: self.editorModel.validators.value,
5835
+ save(value, inputContext) {
5836
+ return __awaiter(this, void 0, void 0, function* () {
5837
+ yield self.editorModel.saveCallback(value, inputContext);
5838
+ });
5839
+ }
5840
+ };
5841
+ }
5842
+ cancelEdit() {
5843
+ if (this.isEditing()) {
5844
+ this.interactionContext.cancelActiveActivity();
5845
+ }
5846
+ }
5847
+ startEdit() {
5848
+ if (!this.isEditing() && this.editCommand.enabled.value) {
5849
+ this.editCommand.execute();
5850
+ }
5851
+ }
5852
+ isEditing() {
5853
+ return this.interactionContext.isActive();
5854
+ }
5855
+ isEmpty() {
5856
+ return this.empty.value;
5857
+ }
5858
+ }
5859
+ InlineStringEditorComponent.decorators = [
5860
+ { type: Component, args: [{
5861
+ selector: 'aup-inline-string-editor',
5862
+ template: "<ng-container *ngIf=\"!editorModel.isEditing()\">\n <div class=\"content\" [class.editable]=\"editCommand.enabled.value\">\n <label>{{label}}</label>\n <p [class.place-holder]=\"empty.value\" (click)=\"editCommand.execute()\">{{displayValue.value}}</p>\n <aup-command *ngIf=\"editCommand.enabled.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n </div>\n</ng-container>\n<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n\n"
5863
+ },] }
5864
+ ];
5865
+ InlineStringEditorComponent.ctorParameters = () => [
5866
+ { type: InteractionService }
5867
+ ];
5868
+ InlineStringEditorComponent.propDecorators = {
5869
+ editorModel: [{ type: Input }],
5870
+ facesModel: [{ type: Input }],
5871
+ faces: [{ type: Input }],
5872
+ interactionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent,] }],
5873
+ label: [{ type: Input }],
5874
+ placeHolder: [{ type: Input }],
5875
+ placeHolderModel: [{ type: Input }]
5876
+ };
5877
+ __decorate([
5878
+ TrackExternal(),
5879
+ __metadata("design:type", InlineEditorModel)
5880
+ ], InlineStringEditorComponent.prototype, "editorModel", void 0);
5881
+ __decorate([
5882
+ TrackExternal(),
5883
+ __metadata("design:type", ValueModel)
5884
+ ], InlineStringEditorComponent.prototype, "facesModel", void 0);
5885
+ __decorate([
5886
+ StoreInValueModel('facesModel'),
5887
+ __metadata("design:type", Object)
5888
+ ], InlineStringEditorComponent.prototype, "faces", void 0);
5889
+ __decorate([
5890
+ StoreInValueModel('placeHolderModel'),
5891
+ __metadata("design:type", String)
5892
+ ], InlineStringEditorComponent.prototype, "placeHolder", void 0);
5893
+ __decorate([
5894
+ TrackExternal(),
5895
+ __metadata("design:type", ValueModel)
5896
+ ], InlineStringEditorComponent.prototype, "placeHolderModel", void 0);
5897
+ (function (InlineStringEditorComponent) {
5898
+ InlineStringEditorComponent.DEFAULT_FACES = {
5899
+ edit: {
5900
+ icon: () => 'mat:edit'
5901
+ },
5902
+ save: {
5903
+ icon: () => 'mat:check'
5904
+ },
5905
+ cancel: {
5906
+ icon: () => 'mat:clear'
5907
+ }
5908
+ };
5909
+ })(InlineStringEditorComponent || (InlineStringEditorComponent = {}));
5910
+
5590
5911
  class InteractionModule {
5591
5912
  }
5592
5913
  InteractionModule.decorators = [
@@ -5616,7 +5937,7 @@ InteractionModule.decorators = [
5616
5937
  PopupInteractionContextComponent,
5617
5938
  StringInputActivity,
5618
5939
  SelectInputActivity,
5619
- AbstractInputActivity,
5940
+ InputActivity,
5620
5941
  InteractionContextTriggerFor,
5621
5942
  Activity,
5622
5943
  ActivityTitleComponent,
@@ -5627,6 +5948,7 @@ InteractionModule.decorators = [
5627
5948
  InlineActivityTriggerComponent,
5628
5949
  ModalActivityTriggerComponent,
5629
5950
  AddCardActivityComponent,
5951
+ InlineStringEditorComponent,
5630
5952
  ],
5631
5953
  exports: [
5632
5954
  ActivityContainerComponent,
@@ -5644,6 +5966,7 @@ InteractionModule.decorators = [
5644
5966
  InlineActivityTriggerComponent,
5645
5967
  ModalActivityTriggerComponent,
5646
5968
  AddCardActivityComponent,
5969
+ InlineStringEditorComponent,
5647
5970
  ],
5648
5971
  entryComponents: [
5649
5972
  ActivityContainerComponent,
@@ -7522,6 +7845,7 @@ class PlaceRouter extends GarbageCollector {
7522
7845
  * to be able to capture the back button on the first page. If we don't then the back click will exit
7523
7846
  * the app directly and we don't get to ask.
7524
7847
  */
7848
+ // @Trace()
7525
7849
  syncInteractionContextIdsWithRouter() {
7526
7850
  if (this.navigationSession) {
7527
7851
  // console.log(`Navigation active -> ${this.navigationSession.toString()}, sync delayed until finished.`);
@@ -7563,12 +7887,6 @@ PlaceRouter.ctorParameters = () => [
7563
7887
  { type: UrlService },
7564
7888
  { type: PlaceHistory }
7565
7889
  ];
7566
- __decorate([
7567
- Trace(),
7568
- __metadata("design:type", Function),
7569
- __metadata("design:paramtypes", []),
7570
- __metadata("design:returntype", Promise)
7571
- ], PlaceRouter.prototype, "syncInteractionContextIdsWithRouter", null);
7572
7890
  (function (PlaceRouter) {
7573
7891
  class State {
7574
7892
  constructor(activeVisits) {
@@ -8585,5 +8903,5 @@ VisibilityService.ctorParameters = () => [
8585
8903
  * Generated bundle index. Do not edit.
8586
8904
  */
8587
8905
 
8588
- export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnListModel, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SelfAndDescendantsVisitor, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, treeNodeDecorator, ɵ0 };
8906
+ export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CardStackComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnListModel, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SelfAndDescendantsVisitor, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, treeNodeDecorator, ɵ0 };
8589
8907
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map