@coolon/angular-ui-powerups 12.4.0-alpha.90 → 12.4.1
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/bundles/coolon-angular-ui-powerups.umd.js +29 -25
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/busy-overlay/busy-overlay.component.js +1 -1
- package/esm2015/lib/components/busy-overlay/busy-overlay.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/command/command.component.js +9 -9
- package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
- package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js +3 -2
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.js +2 -2
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js +1 -2
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js +1 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/text/markdown/markdown.component.js +1 -0
- package/esm2015/lib/components/text/markdown/markdown.component.js.map +1 -1
- package/esm2015/lib/components/text/markdown/markdown.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +1 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.metadata.json +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +5 -2
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +28 -24
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command/command.component.d.ts +6 -6
- package/lib/components/commands/group/popup-menu/abstract-popup-menu.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -38,7 +38,7 @@ AutocompleteInputComponent.decorators = [
|
|
|
38
38
|
{ type: Component, args: [{
|
|
39
39
|
selector: 'aup-autocomplete-input',
|
|
40
40
|
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\" [autoActiveFirstOption]=\"true\" (optionSelected)=\"onSelect($event)\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\"\n >{{formatOption(option)}}</mat-option>\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
|
|
41
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:
|
|
41
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"]
|
|
42
42
|
},] }
|
|
43
43
|
];
|
|
44
44
|
AutocompleteInputComponent.ctorParameters = () => [];
|
package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"AutocompleteInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":25,"character":57},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"aup-autocomplete-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\" [autoActiveFirstOption]=\"true\" (optionSelected)=\"onSelect($event)\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\"\n >{{formatOption(option)}}</mat-option>\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"AutocompleteInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":25,"character":57},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"aup-autocomplete-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\" [autoActiveFirstOption]=\"true\" (optionSelected)=\"onSelect($event)\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\"\n >{{formatOption(option)}}</mat-option>\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"]}]}],"members":{"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":27,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":30,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"allowNil":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"nilOptionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":39,"character":3},"arguments":["nilOptionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"formatOption":[{"__symbolic":"method"}],"updateFilter":[{"__symbolic":"method"}],"onSelect":[{"__symbolic":"method"}]}}}}]
|
package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js
CHANGED
|
@@ -21,7 +21,7 @@ MultipleSelectInputComponent.decorators = [
|
|
|
21
21
|
{ type: Component, args: [{
|
|
22
22
|
selector: 'aup-multiple-select-input',
|
|
23
23
|
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"componentListModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
|
|
24
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:
|
|
24
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:30px}\n"]
|
|
25
25
|
},] }
|
|
26
26
|
];
|
|
27
27
|
MultipleSelectInputComponent.ctorParameters = () => [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"MultipleSelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-list-input.component","name":"AbstractListInputComponent","line":16,"character":59},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-multiple-select-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"componentListModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"MultipleSelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-list-input.component","name":"AbstractListInputComponent","line":16,"character":59},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-multiple-select-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"componentListModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:30px}\n"]}]}],"members":{"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":18,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":21,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"optionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":27,"character":3},"arguments":["optionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -21,7 +21,7 @@ SelectInputComponent.decorators = [
|
|
|
21
21
|
{ type: Component, args: [{
|
|
22
22
|
selector: 'aup-select-input',
|
|
23
23
|
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
|
|
24
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:
|
|
24
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"]
|
|
25
25
|
},] }
|
|
26
26
|
];
|
|
27
27
|
SelectInputComponent.ctorParameters = () => [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"SelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":16,"character":51},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-select-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"SelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":16,"character":51},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-select-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"]}]}],"members":{"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":18,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":21,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"allowNil":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"optionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":30,"character":3},"arguments":["optionTemplate"]}]}],"nilOptionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":33,"character":3},"arguments":["nilOptionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -4,6 +4,7 @@ import { Dsl, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pecti
|
|
|
4
4
|
import * as _ from 'lodash';
|
|
5
5
|
import { MarkdownService } from '../../../services/markdown/markdown.service';
|
|
6
6
|
import { DisposableComponent } from '../../disposable-component';
|
|
7
|
+
// TODO: Look at using unified parser: https://javascript.plainenglish.io/markdown-to-angular-rendering-using-unified-and-remark-96835bb877
|
|
7
8
|
/**
|
|
8
9
|
* @example
|
|
9
10
|
* <aup-markdown [content]="..."></aup-markdown>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/text/markdown/markdown.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"markdown.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/text/markdown/markdown.component.ts"],"names":[],"mappings":";AAAA,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sourcesContent":["import { Component, ElementRef, Inject, Input, OnInit, PLATFORM_ID } from '@angular/core';\nimport { Dsl, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { MarkdownService } from '../../../services/markdown/markdown.service';\nimport { DisposableComponent } from '../../disposable-component';\n\n\n// TODO: Look at using unified parser: https://javascript.plainenglish.io/markdown-to-angular-rendering-using-unified-and-remark-96835bb877\n/**\n * @example\n * <aup-markdown [content]=\"...\"></aup-markdown>\n * <aup-markdown [content$]=\"stringValueModel$\"></aup-markdown>\n * <aup-markdown ngPreserveWhitespaces>\n * # This is markdown content\n *\n * With a list\n * - a\n * - b\n * </aup-markdown>\n */\n@Component({\n selector: 'aup-markdown, [aupMarkdown]',\n templateUrl: './markdown.component.html',\n styleUrls: ['./markdown.component.scss']\n})\nexport class MarkdownComponent extends DisposableComponent implements OnInit {\n\n @Input()\n @TrackExternal()\n content$: ValueModel<string>;\n\n @Input()\n @StoreInValueModel('content$')\n content: string;\n\n @Input()\n inline = false;\n\n constructor(\n @Inject(PLATFORM_ID) private platform: Object,\n private readonly element: ElementRef<HTMLElement>,\n private readonly markdownService: MarkdownService) {\n super();\n const { chain } = Dsl.disposeWith(this);\n }\n\n ngOnInit() {\n const { when } = Dsl.disposeWith(this);\n when(this.content$).changes(content => this.renderContent(content), { initialValue: 'triggerChangeUnlessNil' });\n if (_.isNil(this.content) && !_.isEmpty(this.element.nativeElement.innerHTML)) {\n this.renderContent(this.extractInnerContent(this.element.nativeElement.innerHTML));\n }\n }\n\n private extractInnerContent(content: string) {\n const lines = content.split('\\n');\n const prefix = lines.reduce((minPrefix, line) => {\n const leadingWhitespace = line.search(/\\S/);\n return leadingWhitespace < 0 ? minPrefix : Math.min(minPrefix, leadingWhitespace);\n }, Number.MAX_SAFE_INTEGER);\n return lines.map(l => l.substr(prefix)).join('\\n');\n }\n\n private renderContent(content: string) {\n if (!_.isNil(content)) {\n const markdown = this.inline ?\n this.markdownService.renderInline(content) :\n this.markdownService.render(content);\n this.element.nativeElement.innerHTML = markdown;\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"MarkdownComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../disposable-component","name":"DisposableComponent","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"MarkdownComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../disposable-component","name":"DisposableComponent","line":25,"character":39},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"aup-markdown, [aupMarkdown]","template":"<ng-content></ng-content>\n","styles":[":host{display:inline-block}\n"]}]}],"members":{"content$":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":28,"character":3}}]}],"content":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":32,"character":3},"arguments":["content$"]}]}],"inline":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":39,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":39,"character":12}]}],null,null],"parameters":[{"__symbolic":"reference","name":"Object"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":40,"character":30,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":40,"character":41,"context":{"typeName":"HTMLElement"}}]},{"__symbolic":"reference","module":"../../../services/markdown/markdown.service","name":"MarkdownService","line":41,"character":38}]}],"ngOnInit":[{"__symbolic":"method"}],"extractInnerContent":[{"__symbolic":"method"}],"renderContent":[{"__symbolic":"method"}]}}}}]
|
package/esm2015/lib/interaction/components/activity-container/activity-container.component.js
CHANGED
|
@@ -191,7 +191,7 @@ ActivityContainerComponent.decorators = [
|
|
|
191
191
|
{ type: Component, args: [{
|
|
192
192
|
selector: 'aup-activity-container',
|
|
193
193
|
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <aup-busy-overlay [busyModel]=\"busy\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we're animating.\n -->\n <div class=\"activity-outlet-wrapper\" [@.disabled]=\"!activityRef.focused\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"activityRef\"></aup-activity-outlet>\n </div>\n </aup-busy-overlay>\n </mat-tab>\n</mat-tab-group>\n",
|
|
194
|
-
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-busy-overlay{flex:1}\n"]
|
|
194
|
+
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-busy-overlay{flex:1}.activity-outlet-wrapper{flex:1}\n"]
|
|
195
195
|
},] }
|
|
196
196
|
];
|
|
197
197
|
ActivityContainerComponent.ctorParameters = () => [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"ActivityContainerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../abstract-interaction-context","name":"AbstractInteractionContext","line":26,"character":57},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":21,"character":1},"arguments":[{"selector":"aup-activity-container","template":"<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <aup-busy-overlay [busyModel]=\"busy\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we're animating.\n -->\n <div class=\"activity-outlet-wrapper\" [@.disabled]=\"!activityRef.focused\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"activityRef\"></aup-activity-outlet>\n </div>\n </aup-busy-overlay>\n </mat-tab>\n</mat-tab-group>\n","styles":[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-busy-overlay{flex:1}\n"]}]}],"members":{"dynamicHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"tabs":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":31,"character":3},"arguments":["tabs",{"static":true}]}]}],"activityOutlets":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChildren","line":34,"character":3},"arguments":[{"__symbolic":"reference","module":"./activity-outlet/activity-outlet.component","name":"ActivityOutletComponent","line":34,"character":16}]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"initialise":[{"__symbolic":"method"}],"isInitialised":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"registerDisposable":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"getActiveActivityRef":[{"__symbolic":"method"}],"cancelActiveActivity":[{"__symbolic":"method"}],"createAndLaunchActivity":[{"__symbolic":"method"}],"getActiveActivityCount":[{"__symbolic":"method"}],"isCleaningUp":[{"__symbolic":"method"}],"waitForInteractionContextCleanupToFinish":[{"__symbolic":"method"}],"finishAndStartCleanup":[{"__symbolic":"method"}],"launchActivity":[{"__symbolic":"method"}],"activityIndex":[{"__symbolic":"method"}],"onAnimationFinished":[{"__symbolic":"method"}],"synchroniseSelectedTabIndex":[{"__symbolic":"method"}],"getSelectedOutlet":[{"__symbolic":"method"}],"getSelectedTabIndex":[{"__symbolic":"method"}],"triggerTabSynchronisation":[{"__symbolic":"method"}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ActivityContainerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../abstract-interaction-context","name":"AbstractInteractionContext","line":26,"character":57},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":21,"character":1},"arguments":[{"selector":"aup-activity-container","template":"<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <aup-busy-overlay [busyModel]=\"busy\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we're animating.\n -->\n <div class=\"activity-outlet-wrapper\" [@.disabled]=\"!activityRef.focused\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"activityRef\"></aup-activity-outlet>\n </div>\n </aup-busy-overlay>\n </mat-tab>\n</mat-tab-group>\n","styles":[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-busy-overlay{flex:1}.activity-outlet-wrapper{flex:1}\n"]}]}],"members":{"dynamicHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"tabs":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":31,"character":3},"arguments":["tabs",{"static":true}]}]}],"activityOutlets":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChildren","line":34,"character":3},"arguments":[{"__symbolic":"reference","module":"./activity-outlet/activity-outlet.component","name":"ActivityOutletComponent","line":34,"character":16}]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"initialise":[{"__symbolic":"method"}],"isInitialised":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"registerDisposable":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"getActiveActivityRef":[{"__symbolic":"method"}],"cancelActiveActivity":[{"__symbolic":"method"}],"createAndLaunchActivity":[{"__symbolic":"method"}],"getActiveActivityCount":[{"__symbolic":"method"}],"isCleaningUp":[{"__symbolic":"method"}],"waitForInteractionContextCleanupToFinish":[{"__symbolic":"method"}],"finishAndStartCleanup":[{"__symbolic":"method"}],"launchActivity":[{"__symbolic":"method"}],"activityIndex":[{"__symbolic":"method"}],"onAnimationFinished":[{"__symbolic":"method"}],"synchroniseSelectedTabIndex":[{"__symbolic":"method"}],"getSelectedOutlet":[{"__symbolic":"method"}],"getSelectedTabIndex":[{"__symbolic":"method"}],"triggerTabSynchronisation":[{"__symbolic":"method"}]}}}}]
|
|
@@ -70,7 +70,7 @@ InPlaceInteractionContextComponent.decorators = [
|
|
|
70
70
|
{ type: Component, args: [{
|
|
71
71
|
selector: 'aup-in-place-interaction-context',
|
|
72
72
|
template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\" [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n",
|
|
73
|
-
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}\n"]
|
|
73
|
+
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-activity-container{flex:1}\n"]
|
|
74
74
|
},] }
|
|
75
75
|
];
|
|
76
76
|
InPlaceInteractionContextComponent.ctorParameters = () => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"InPlaceInteractionContextComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":28,"character":65},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":23,"character":1},"arguments":[{"selector":"aup-in-place-interaction-context","template":"<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\" [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n","styles":[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}\n"]}]}],"members":{"activityContainerComponent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":30,"character":3},"arguments":["activityContainer",{"static":true}]}]}],"animateFirstActivity":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"active":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":44,"character":3},"arguments":["class.active"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":49,"character":64},"arguments":[{"__symbolic":"reference","module":"@angular/material/tabs","name":"MAT_TABS_CONFIG","line":49,"character":71}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":49,"character":89}}]],"parameters":[{"__symbolic":"reference","module":"../../services/interaction.service","name":"InteractionService","line":49,"character":43},{"__symbolic":"reference","module":"@angular/material/tabs","name":"MatTabsConfig","line":49,"character":128}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"initialise":[{"__symbolic":"method"}],"alert":[{"__symbolic":"method"}],"cancelActiveActivity":[{"__symbolic":"method"}],"confirm":[{"__symbolic":"method"}],"confirmOrReject":[{"__symbolic":"method"}],"confirmThen":[{"__symbolic":"method"}],"confirmThenExecute":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"startActivity":[{"__symbolic":"method"}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"InPlaceInteractionContextComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":28,"character":65},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":23,"character":1},"arguments":[{"selector":"aup-in-place-interaction-context","template":"<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\" [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n","styles":[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-activity-container{flex:1}\n"]}]}],"members":{"activityContainerComponent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":30,"character":3},"arguments":["activityContainer",{"static":true}]}]}],"animateFirstActivity":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"active":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":44,"character":3},"arguments":["class.active"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":49,"character":64},"arguments":[{"__symbolic":"reference","module":"@angular/material/tabs","name":"MAT_TABS_CONFIG","line":49,"character":71}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":49,"character":89}}]],"parameters":[{"__symbolic":"reference","module":"../../services/interaction.service","name":"InteractionService","line":49,"character":43},{"__symbolic":"reference","module":"@angular/material/tabs","name":"MatTabsConfig","line":49,"character":128}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"initialise":[{"__symbolic":"method"}],"alert":[{"__symbolic":"method"}],"cancelActiveActivity":[{"__symbolic":"method"}],"confirm":[{"__symbolic":"method"}],"confirmOrReject":[{"__symbolic":"method"}],"confirmThen":[{"__symbolic":"method"}],"confirmThenExecute":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"startActivity":[{"__symbolic":"method"}]}}}}]
|
|
@@ -140,6 +140,7 @@ export class PlaceOutletComponent extends DisposableComponent {
|
|
|
140
140
|
const visitModel = new MutableValueModel(routerVisit);
|
|
141
141
|
DebugContext.tag(visitModel, `PlaceOutletComponent[${activePlace.constructor.name})].visitModel`);
|
|
142
142
|
activePlace.initialiseVisit(routerVisit, (current, previous) => {
|
|
143
|
+
console.log("initialiseVisitCallback", { routerVisitModel: this.routerVisitModel.value });
|
|
143
144
|
this.pushVisitChangeToRoute(previous, current);
|
|
144
145
|
});
|
|
145
146
|
const finishPlaceLoad = () => {
|
|
@@ -158,6 +159,7 @@ export class PlaceOutletComponent extends DisposableComponent {
|
|
|
158
159
|
const { when, chain, valueOf } = Dsl.disposeWith(activePlace);
|
|
159
160
|
when(this.routerVisitModel)
|
|
160
161
|
.changes(visit => {
|
|
162
|
+
console.log("routerVisitModel.change", { routerVisitModel: this.routerVisitModel.value });
|
|
161
163
|
this.pushVisitChangeToComponent(activePlace, visit);
|
|
162
164
|
}, {
|
|
163
165
|
unless: valueOf.any(this._isPushingVisitToRoute, this.routerVisitModel.isNil()).areTruthy()
|
|
@@ -176,8 +178,9 @@ export class PlaceOutletComponent extends DisposableComponent {
|
|
|
176
178
|
this._isPushingVisitToRoute.value = false;
|
|
177
179
|
}
|
|
178
180
|
// sanitisers may have adjusted other values in the visit to we check and write it back.
|
|
179
|
-
|
|
180
|
-
|
|
181
|
+
const routerVisit = this.routerVisitModel.value; // this is occasionally null... need to investigate if that's a normal state or not.
|
|
182
|
+
if (routerVisit && current.hasRoutingChangedFrom(routerVisit)) {
|
|
183
|
+
this.pushVisitChangeToComponent(this.activePlaceModel.value, routerVisit);
|
|
181
184
|
}
|
|
182
185
|
});
|
|
183
186
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-outlet.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/place/components/place-outlet/place-outlet.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,YAAY,EAAE,WAAW,EACzB,MAAM,EACN,cAAc,EACd,KAAK,EAEL,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,SAAS,EACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAkB,MAAM,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAGL,YAAY,EACZ,GAAG,EACH,IAAI,EACJ,SAAS,EAET,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,UAAU,EAEX,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0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aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;2BAyGzC,WAAW,SAAC,kBAAkB;;AAzH/B;IADU,iBAAiB,CAAC,cAAc,CAAC;;qDAC1B;AAGjB;IADU,aAAa,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;8BACjC,UAAU;0DAAU;AAIlC;IADoC,aAAa,EAAE;8BACnB,SAAS;4EAAgC;AAIzE;IAD+B,gBAAgB,CAAC,gCAAgC,CAAC;;uEACtB","sourcesContent":["import { ComponentPortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectorRef,\n Component,\n EventEmitter, HostBinding,\n Inject,\n InjectionToken,\n Input,\n OnInit,\n Optional,\n Output,\n SkipSelf,\n ViewChild\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterOutlet } from '@angular/router';\nimport {\n BooleanValueModelChain,\n Constructable,\n DebugContext,\n Dsl,\n lang,\n ListModel,\n ListModelChain,\n MutableValueModel,\n StoreInListModel,\n StoreInValueModel,\n TrackExternal,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { DisposableComponent } from '../../../components/disposable-component';\nimport { PlaceComponent } from '../../place-component';\n\nimport { AUP_PLACE_CONFIG, PlaceConfig } from '../../place-config';\nimport { PlaceDefinition } from '../../place-definition';\nimport { PlaceRouter } from '../../place-router';\nimport { Visit } from '../../visit';\n\nimport { NotAuthorisedNoticeComponent } from '../not-authorised-notice/not-authorised-notice.component';\nimport { LEFT_RIGHT_PLACE_ANIMATION } from './route-animations';\n\n\nexport const AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT = new InjectionToken<Constructable<any>>('AUP_UNAUTHORISED_PLACE_COMPONENT');\n\n@Component({\n selector: 'aup-place-outlet',\n templateUrl: './place-outlet.component.html',\n styleUrls: ['./place-outlet.component.scss'],\n animations: [LEFT_RIGHT_PLACE_ANIMATION]\n})\nexport class PlaceOutletComponent extends DisposableComponent implements OnInit {\n\n @Input() @StoreInValueModel('animateModel')\n animate: boolean;\n\n @Input() @TrackExternal({ defaultValue: true })\n animateModel: ValueModel<boolean>;\n\n // tslint:disable-next-line:no-input-rename\n @Input('placeAnimationOrderModel') @TrackExternal()\n customPlaceAnimationOrderModel: ListModel<Constructable<PlaceComponent>>;\n\n // tslint:disable-next-line:no-input-rename\n @Input('placeAnimationOrder') @StoreInListModel('customPlaceAnimationOrderModel')\n customPlaceAnimationOrder: Constructable<PlaceComponent>[];\n\n @Output()\n readonly placeChanged = new EventEmitter<PlaceComponent>();\n\n @ViewChild('routeOutlet', { static: true })\n routerOut: RouterOutlet;\n\n private onAnimationFinishedJob: () => void;\n\n\n private outletActivated = new MutableValueModel(false);\n private readonly _activatedRouteModel = new MutableValueModel<ActivatedRoute>();\n private readonly _activePlaceModel = new MutableValueModel<PlaceComponent>();\n\n readonly _activePlaceDefinition: ValueModelChain<PlaceDefinition>;\n\n private parentOutletModel: MutableValueModel<PlaceOutletComponent>;\n public readonly activePlaceAnimationPosition: ValueModelChain<number>;\n\n private initialPlaceIndex: number = null;\n private routerVisitModel: ValueModelChain<Visit>;\n private _isPushingVisitToRoute = new MutableValueModel<boolean>(false);\n private navigationInProgress: ValueModelChain<boolean>;\n\n private isVeryFirstLoad = true;\n private placesInAnimationOrder: ListModelChain<Constructable<PlaceComponent>>;\n private animationSupported: BooleanValueModelChain;\n readonly animationEnabled: BooleanValueModelChain;\n readonly authorised: ValueModelChain<boolean>;\n readonly notAuthorisedNoticePortal: ComponentPortal<any>;\n\n constructor(private readonly router: Router,\n private readonly placeRouter: PlaceRouter,\n @Optional() @Inject(AUP_PLACE_CONFIG) readonly placeConfig: PlaceConfig,\n @Optional() @Inject(AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT) unauthorisedPlaceNotice: Constructable<any>,\n @SkipSelf() @Optional() parentOutlet: PlaceOutletComponent,\n private readonly cdr: ChangeDetectorRef) {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n\n this.parentOutletModel = new MutableValueModel(parentOutlet);\n\n const defaultPlaceAnimationOrder = chain(this.parentOutletModel)\n .pullValueModel(o => o.activePlaceModel)\n .pluck('placeDefinition')\n .pluckList('children')\n .pluck('component');\n\n const activatePlaceType = chain(this.activePlaceModel).map(p => p.constructor as Constructable<PlaceComponent>);\n\n this.placesInAnimationOrder = chain(this.customPlaceAnimationOrderModel)\n .otherwise(defaultPlaceAnimationOrder);\n\n this.activePlaceAnimationPosition = this.placesInAnimationOrder\n .reduce((placesInOrder) => {\n let placeIndex = 0;\n if (activatePlaceType.value) {\n placeIndex = placesInOrder.indexOf(activatePlaceType.value);\n if (_.isNil(this.initialPlaceIndex)) {\n this.initialPlaceIndex = placeIndex;\n }\n }\n return _.isNil(this.initialPlaceIndex) ? 0 : placeIndex - this.initialPlaceIndex;\n }, { dependsOn: activatePlaceType });\n\n this.animationSupported = this.placesInAnimationOrder.count().isGreaterThan(0);\n this.animationEnabled = valueOf.all(\n this.animateModel,\n this.animationSupported\n ).areTruthy();\n\n // Extract our visit model from the place router.\n this._activePlaceDefinition = chain(this._activePlaceModel).pluck('placeDefinition');\n this.routerVisitModel = chain(placeRouter.state).map(state => state.getVisitFor(this._activePlaceDefinition.value), { dependsOn: this._activePlaceDefinition });\n\n this.navigationInProgress = chain(this.placeRouter.navigationInProgress);\n\n when(this.navigationInProgress).becomesFalsey(() => {\n this.checkStateAndInitialise();\n });\n when(this.outletActivated).becomesTruthy(() => {\n this.checkStateAndInitialise();\n });\n\n chain(this._activePlaceModel)\n .postponeWhile(this.navigationInProgress)\n .subscribe(place => this.placeChanged.emit(place));\n\n this.authorised = chain(placeRouter.accessGuard).map(guard => guard.isAuthorised(this._activePlaceDefinition.value), {\n dependsOn: this._activePlaceDefinition,\n postponeWhile: chain(this._activePlaceDefinition).isNil()\n }).otherwise(true); // if we don't have a place def yet we need to show the outlet so we get one injected.\n\n this.notAuthorisedNoticePortal = new ComponentPortal(unauthorisedPlaceNotice ?? NotAuthorisedNoticeComponent);\n }\n\n // @Trace()\n ngOnInit() {\n }\n\n // @Trace()\n getAnimationOrder() {\n return this.activePlaceAnimationPosition.value;\n }\n\n get animationDuration() {\n return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';\n }\n\n @HostBinding(\"class.authorised\")\n get isAuthorised() {\n return this.authorised.value;\n }\n\n // @Trace()\n navigate(visit: Visit) {\n // const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);\n // if (!place) {\n // lang.illegalState()\n // }\n this.placeRouter.navigate(visit, {\n relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null\n });\n }\n\n get parentOutlet(): PlaceOutletComponent {\n return this.parentOutletModel.value;\n }\n\n\n get activePlaceModel(): ValueModel<PlaceComponent> {\n return this._activePlaceModel.readonly;\n }\n\n get activatedRouteModel(): ValueModel<ActivatedRoute> {\n return this._activatedRouteModel.readonly;\n }\n\n // @Trace()\n onOutletActivated(routerOutlet: RouterOutlet, place: PlaceComponent) {\n this._activatedRouteModel.value = routerOutlet.activatedRoute;\n this._activePlaceModel.value = place;\n this.validateAnimationState(place);\n this.outletActivated.value = true;\n this.checkStateAndInitialise();\n }\n\n private validateAnimationState(place: PlaceComponent) {\n if (this.animateModel.value) {\n if (this.placesInAnimationOrder.length < 1) {\n console.error('PlaceOutlet.animate === true but placeAnimationOrder has not been set. Animation is disabled.');\n } else {\n if (!this.placesInAnimationOrder.query().includes(place.placeDefinition.component)) {\n console.error(`PlaceOutlet.animate === true but placeAnimationOrder doesn't contain ${place.placeDefinition.component.name}.`);\n }\n }\n }\n }\n\n // @Trace()\n onOutletDeactivated() {\n this.outletActivated.value = false;\n this._activePlaceModel.value = null;\n this._activatedRouteModel.value = null;\n }\n\n // @Trace()\n private checkStateAndInitialise() {\n const routerVisit = this.routerVisitModel.value;\n const activePlace = this.activePlaceModel.value;\n if (routerVisit && activePlace && !activePlace.isInitialised()) {\n if (routerVisit.placeDefinition !== activePlace.placeDefinition) {\n lang.illegalState('wrong visit!!!');\n }\n this.initialisePlace(routerVisit, activePlace);\n this.cdr.detectChanges()\n }\n }\n\n private initialisePlace(routerVisit: Visit, activePlace: PlaceComponent) {\n const visitModel = new MutableValueModel<Visit>(routerVisit);\n DebugContext.tag(visitModel, `PlaceOutletComponent[${activePlace.constructor.name})].visitModel`);\n activePlace.initialiseVisit(routerVisit, (current, previous) => {\n this.pushVisitChangeToRoute(previous, current);\n });\n const finishPlaceLoad = () => {\n this._activePlaceModel.value._notifyActive(true);\n };\n if (!this.animationEnabled.value || this.isVeryFirstLoad) {\n // if animation is disabled or this is the very first load then\n // we won't get our animation done callback so we finish the\n // process here and now.\n this.isVeryFirstLoad = false;\n finishPlaceLoad();\n } else {\n this.onAnimationFinishedJob = finishPlaceLoad;\n }\n const { when, chain, valueOf } = Dsl.disposeWith(activePlace);\n when(this.routerVisitModel)\n .changes(visit => {\n this.pushVisitChangeToComponent(activePlace, visit);\n }, {\n unless: valueOf.any(\n this._isPushingVisitToRoute,\n this.routerVisitModel.isNil()\n ).areTruthy()\n });\n }\n\n private pushVisitChangeToComponent(activePlace: PlaceComponent, visit: Visit) {\n activePlace.updateVisit(visit);\n }\n\n private async pushVisitChangeToRoute(previous: Visit, current: Visit) {\n try {\n this._isPushingVisitToRoute.value = true;\n await this.placeRouter.pushVisitChangesToRoute(previous, current);\n } finally {\n this._isPushingVisitToRoute.value = false;\n }\n // sanitisers may have adjusted other values in the visit to we check and write it back.\n if (current.hasRoutingChangedFrom(this.routerVisitModel.value)) {\n this.pushVisitChangeToComponent(this.activePlaceModel.value, this.routerVisitModel.value)\n }\n }\n\n// @Trace()\n animationStarted() {\n // console.log({ activePlace: this._activePlaceModel.value });\n }\n\n // @Trace()\n animationDone() {\n if (this.onAnimationFinishedJob) {\n this.onAnimationFinishedJob();\n this.onAnimationFinishedJob = undefined;\n }\n }\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"place-outlet.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-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C,KAAK,CAAC,CAAC,oFAAoF;YACrI,IAAI,WAAW,IAAI,OAAO,CAAC,qBAAqB,CAAC,WAAW,CAAC,EAAE;gBAC7D,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,WAAW,CAAC,CAAA;aAC1E;QACH,CAAC;KAAA;IAEH,WAAW;IACT,gBAAgB;QACd,8DAA8D;IAChE,CAAC;IAED,WAAW;IACX,aAAa;QACX,IAAI,IAAI,CAAC,sBAAsB,EAAE;YAC/B,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAC9B,IAAI,CAAC,sBAAsB,GAAG,SAAS,CAAC;SACzC;IACH,CAAC;;;YArQF,SAAS,SAAC;gBACT,QAAQ,EAAE,kBAAkB;gBAC5B,yjCAA4C;gBAE5C,UAAU,EAAE,CAAC,0BAA0B,CAAC;;aACzC;;;YApCwB,MAAM;YAsBtB,WAAW;4CA+DL,QAAQ,YAAI,MAAM,SAAC,gBAAgB;4CACnC,QAAQ,YAAI,MAAM,SAAC,uCAAuC;YACrB,oBAAoB,uBAAzD,QAAQ,YAAI,QAAQ;YAnGjC,iBAAiB;;;sBAmDhB,KAAK;2BAGL,KAAK;6CAIL,KAAK,SAAC,0BAA0B;wCAIhC,KAAK,SAAC,qBAAqB;2BAG3B,MAAM;wBAGN,SAAS,SAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;2BAyGzC,WAAW,SAAC,kBAAkB;;AAzH/B;IADU,iBAAiB,CAAC,cAAc,CAAC;;qDAC1B;AAGjB;IADU,aAAa,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;8BACjC,UAAU;0DAAU;AAIlC;IADoC,aAAa,EAAE;8BACnB,SAAS;4EAAgC;AAIzE;IAD+B,gBAAgB,CAAC,gCAAgC,CAAC;;uEACtB","sourcesContent":["import { ComponentPortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectorRef,\n Component,\n EventEmitter, HostBinding,\n Inject,\n InjectionToken,\n Input,\n OnInit,\n Optional,\n Output,\n SkipSelf,\n ViewChild\n} from '@angular/core';\nimport { ActivatedRoute, Router, RouterOutlet } from '@angular/router';\nimport {\n BooleanValueModelChain,\n Constructable,\n DebugContext,\n Dsl,\n lang,\n ListModel,\n ListModelChain,\n MutableValueModel,\n StoreInListModel,\n StoreInValueModel,\n TrackExternal,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { DisposableComponent } from '../../../components/disposable-component';\nimport { PlaceComponent } from '../../place-component';\n\nimport { AUP_PLACE_CONFIG, PlaceConfig } from '../../place-config';\nimport { PlaceDefinition } from '../../place-definition';\nimport { PlaceRouter } from '../../place-router';\nimport { Visit } from '../../visit';\n\nimport { NotAuthorisedNoticeComponent } from '../not-authorised-notice/not-authorised-notice.component';\nimport { LEFT_RIGHT_PLACE_ANIMATION } from './route-animations';\n\n\nexport const AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT = new InjectionToken<Constructable<any>>('AUP_UNAUTHORISED_PLACE_COMPONENT');\n\n@Component({\n selector: 'aup-place-outlet',\n templateUrl: './place-outlet.component.html',\n styleUrls: ['./place-outlet.component.scss'],\n animations: [LEFT_RIGHT_PLACE_ANIMATION]\n})\nexport class PlaceOutletComponent extends DisposableComponent implements OnInit {\n\n @Input() @StoreInValueModel('animateModel')\n animate: boolean;\n\n @Input() @TrackExternal({ defaultValue: true })\n animateModel: ValueModel<boolean>;\n\n // tslint:disable-next-line:no-input-rename\n @Input('placeAnimationOrderModel') @TrackExternal()\n customPlaceAnimationOrderModel: ListModel<Constructable<PlaceComponent>>;\n\n // tslint:disable-next-line:no-input-rename\n @Input('placeAnimationOrder') @StoreInListModel('customPlaceAnimationOrderModel')\n customPlaceAnimationOrder: Constructable<PlaceComponent>[];\n\n @Output()\n readonly placeChanged = new EventEmitter<PlaceComponent>();\n\n @ViewChild('routeOutlet', { static: true })\n routerOut: RouterOutlet;\n\n private onAnimationFinishedJob: () => void;\n\n\n private outletActivated = new MutableValueModel(false);\n private readonly _activatedRouteModel = new MutableValueModel<ActivatedRoute>();\n private readonly _activePlaceModel = new MutableValueModel<PlaceComponent>();\n\n readonly _activePlaceDefinition: ValueModelChain<PlaceDefinition>;\n\n private parentOutletModel: MutableValueModel<PlaceOutletComponent>;\n public readonly activePlaceAnimationPosition: ValueModelChain<number>;\n\n private initialPlaceIndex: number = null;\n private routerVisitModel: ValueModelChain<Visit>;\n private _isPushingVisitToRoute = new MutableValueModel<boolean>(false);\n private navigationInProgress: ValueModelChain<boolean>;\n\n private isVeryFirstLoad = true;\n private placesInAnimationOrder: ListModelChain<Constructable<PlaceComponent>>;\n private animationSupported: BooleanValueModelChain;\n readonly animationEnabled: BooleanValueModelChain;\n readonly authorised: ValueModelChain<boolean>;\n readonly notAuthorisedNoticePortal: ComponentPortal<any>;\n\n constructor(private readonly router: Router,\n private readonly placeRouter: PlaceRouter,\n @Optional() @Inject(AUP_PLACE_CONFIG) readonly placeConfig: PlaceConfig,\n @Optional() @Inject(AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT) unauthorisedPlaceNotice: Constructable<any>,\n @SkipSelf() @Optional() parentOutlet: PlaceOutletComponent,\n private readonly cdr: ChangeDetectorRef) {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n\n this.parentOutletModel = new MutableValueModel(parentOutlet);\n\n const defaultPlaceAnimationOrder = chain(this.parentOutletModel)\n .pullValueModel(o => o.activePlaceModel)\n .pluck('placeDefinition')\n .pluckList('children')\n .pluck('component');\n\n const activatePlaceType = chain(this.activePlaceModel).map(p => p.constructor as Constructable<PlaceComponent>);\n\n this.placesInAnimationOrder = chain(this.customPlaceAnimationOrderModel)\n .otherwise(defaultPlaceAnimationOrder);\n\n this.activePlaceAnimationPosition = this.placesInAnimationOrder\n .reduce((placesInOrder) => {\n let placeIndex = 0;\n if (activatePlaceType.value) {\n placeIndex = placesInOrder.indexOf(activatePlaceType.value);\n if (_.isNil(this.initialPlaceIndex)) {\n this.initialPlaceIndex = placeIndex;\n }\n }\n return _.isNil(this.initialPlaceIndex) ? 0 : placeIndex - this.initialPlaceIndex;\n }, { dependsOn: activatePlaceType });\n\n this.animationSupported = this.placesInAnimationOrder.count().isGreaterThan(0);\n this.animationEnabled = valueOf.all(\n this.animateModel,\n this.animationSupported\n ).areTruthy();\n\n // Extract our visit model from the place router.\n this._activePlaceDefinition = chain(this._activePlaceModel).pluck('placeDefinition');\n this.routerVisitModel = chain(placeRouter.state).map(state => state.getVisitFor(this._activePlaceDefinition.value), { dependsOn: this._activePlaceDefinition });\n\n this.navigationInProgress = chain(this.placeRouter.navigationInProgress);\n\n when(this.navigationInProgress).becomesFalsey(() => {\n this.checkStateAndInitialise();\n });\n when(this.outletActivated).becomesTruthy(() => {\n this.checkStateAndInitialise();\n });\n\n chain(this._activePlaceModel)\n .postponeWhile(this.navigationInProgress)\n .subscribe(place => this.placeChanged.emit(place));\n\n this.authorised = chain(placeRouter.accessGuard).map(guard => guard.isAuthorised(this._activePlaceDefinition.value), {\n dependsOn: this._activePlaceDefinition,\n postponeWhile: chain(this._activePlaceDefinition).isNil()\n }).otherwise(true); // if we don't have a place def yet we need to show the outlet so we get one injected.\n\n this.notAuthorisedNoticePortal = new ComponentPortal(unauthorisedPlaceNotice ?? NotAuthorisedNoticeComponent);\n }\n\n // @Trace()\n ngOnInit() {\n }\n\n // @Trace()\n getAnimationOrder() {\n return this.activePlaceAnimationPosition.value;\n }\n\n get animationDuration() {\n return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';\n }\n\n @HostBinding(\"class.authorised\")\n get isAuthorised() {\n return this.authorised.value;\n }\n\n // @Trace()\n navigate(visit: Visit) {\n // const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);\n // if (!place) {\n // lang.illegalState()\n // }\n this.placeRouter.navigate(visit, {\n relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null\n });\n }\n\n get parentOutlet(): PlaceOutletComponent {\n return this.parentOutletModel.value;\n }\n\n\n get activePlaceModel(): ValueModel<PlaceComponent> {\n return this._activePlaceModel.readonly;\n }\n\n get activatedRouteModel(): ValueModel<ActivatedRoute> {\n return this._activatedRouteModel.readonly;\n }\n\n // @Trace()\n onOutletActivated(routerOutlet: RouterOutlet, place: PlaceComponent) {\n this._activatedRouteModel.value = routerOutlet.activatedRoute;\n this._activePlaceModel.value = place;\n this.validateAnimationState(place);\n this.outletActivated.value = true;\n this.checkStateAndInitialise();\n }\n\n private validateAnimationState(place: PlaceComponent) {\n if (this.animateModel.value) {\n if (this.placesInAnimationOrder.length < 1) {\n console.error('PlaceOutlet.animate === true but placeAnimationOrder has not been set. Animation is disabled.');\n } else {\n if (!this.placesInAnimationOrder.query().includes(place.placeDefinition.component)) {\n console.error(`PlaceOutlet.animate === true but placeAnimationOrder doesn't contain ${place.placeDefinition.component.name}.`);\n }\n }\n }\n }\n\n // @Trace()\n onOutletDeactivated() {\n this.outletActivated.value = false;\n this._activePlaceModel.value = null;\n this._activatedRouteModel.value = null;\n }\n\n // @Trace()\n private checkStateAndInitialise() {\n const routerVisit = this.routerVisitModel.value;\n const activePlace = this.activePlaceModel.value;\n if (routerVisit && activePlace && !activePlace.isInitialised()) {\n if (routerVisit.placeDefinition !== activePlace.placeDefinition) {\n lang.illegalState('wrong visit!!!');\n }\n this.initialisePlace(routerVisit, activePlace);\n this.cdr.detectChanges()\n }\n }\n\n private initialisePlace(routerVisit: Visit, activePlace: PlaceComponent) {\n const visitModel = new MutableValueModel<Visit>(routerVisit);\n DebugContext.tag(visitModel, `PlaceOutletComponent[${activePlace.constructor.name})].visitModel`);\n activePlace.initialiseVisit(routerVisit, (current, previous) => {\n console.log(\"initialiseVisitCallback\", { routerVisitModel: this.routerVisitModel.value })\n this.pushVisitChangeToRoute(previous, current);\n });\n const finishPlaceLoad = () => {\n this._activePlaceModel.value._notifyActive(true);\n };\n if (!this.animationEnabled.value || this.isVeryFirstLoad) {\n // if animation is disabled or this is the very first load then\n // we won't get our animation done callback so we finish the\n // process here and now.\n this.isVeryFirstLoad = false;\n finishPlaceLoad();\n } else {\n this.onAnimationFinishedJob = finishPlaceLoad;\n }\n const { when, chain, valueOf } = Dsl.disposeWith(activePlace);\n when(this.routerVisitModel)\n .changes(visit => {\n console.log(\"routerVisitModel.change\", { routerVisitModel: this.routerVisitModel.value })\n this.pushVisitChangeToComponent(activePlace, visit);\n }, {\n unless: valueOf.any(\n this._isPushingVisitToRoute,\n this.routerVisitModel.isNil()\n ).areTruthy()\n });\n }\n\n private pushVisitChangeToComponent(activePlace: PlaceComponent, visit: Visit) {\n activePlace.updateVisit(visit);\n }\n\n private async pushVisitChangeToRoute(previous: Visit, current: Visit) {\n try {\n this._isPushingVisitToRoute.value = true;\n await this.placeRouter.pushVisitChangesToRoute(previous, current);\n } finally {\n this._isPushingVisitToRoute.value = false;\n }\n // sanitisers may have adjusted other values in the visit to we check and write it back.\n const routerVisit = this.routerVisitModel.value; // this is occasionally null... need to investigate if that's a normal state or not.\n if (routerVisit && current.hasRoutingChangedFrom(routerVisit)) {\n this.pushVisitChangeToComponent(this.activePlaceModel.value, routerVisit)\n }\n }\n\n// @Trace()\n animationStarted() {\n // console.log({ activePlace: this._activePlaceModel.value });\n }\n\n // @Trace()\n animationDone() {\n if (this.onAnimationFinishedJob) {\n this.onAnimationFinishedJob();\n this.onAnimationFinishedJob = undefined;\n }\n }\n\n}\n"]}
|