@coolon/angular-ui-powerups 11.0.0-alpha.8 → 11.0.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 +214 -27
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.js +1 -1
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table-model.js +9 -0
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm2015/lib/components/track-by.js +5 -1
- package/esm2015/lib/components/track-by.js.map +1 -1
- package/esm2015/lib/directives/directives.module.js +8 -2
- package/esm2015/lib/directives/directives.module.js.map +1 -1
- package/esm2015/lib/directives/directives.module.metadata.json +1 -1
- package/esm2015/lib/directives/directives.module.ngfactory.js.map +1 -1
- package/esm2015/lib/directives/exports.js +2 -0
- package/esm2015/lib/directives/exports.js.map +1 -1
- package/esm2015/lib/directives/exports.metadata.json +1 -1
- package/esm2015/lib/directives/highlight-text-model.directive.js +25 -0
- package/esm2015/lib/directives/highlight-text-model.directive.js.map +1 -0
- package/esm2015/lib/directives/highlight-text-model.directive.metadata.json +1 -0
- package/esm2015/lib/directives/highlight-text-model.directive.ngfactory.js.map +1 -0
- package/esm2015/lib/directives/highlight.pipe.js +43 -0
- package/esm2015/lib/directives/highlight.pipe.js.map +1 -0
- package/esm2015/lib/directives/highlight.pipe.metadata.json +1 -0
- package/esm2015/lib/directives/highlight.pipe.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +18 -9
- package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +1 -1
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/place-component.js +1 -3
- package/esm2015/lib/place/place-component.js.map +1 -1
- package/esm2015/lib/place/place-component.metadata.json +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm2015/lib/services/exports.js +5 -0
- package/esm2015/lib/services/exports.js.map +1 -0
- package/esm2015/lib/services/exports.metadata.json +1 -0
- package/esm2015/lib/services/visibility-service.js +74 -0
- package/esm2015/lib/services/visibility-service.js.map +1 -0
- package/esm2015/lib/services/visibility-service.metadata.json +1 -0
- package/esm2015/lib/services/visibility-service.ngfactory.js.map +1 -0
- package/esm2015/public-api.js +1 -0
- package/esm2015/public-api.js.map +1 -1
- package/esm2015/public-api.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +180 -22
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/table/table-model.d.ts +9 -0
- package/lib/components/track-by.d.ts +3 -1
- package/lib/directives/exports.d.ts +2 -0
- package/lib/directives/highlight-text-model.directive.d.ts +7 -0
- package/lib/directives/highlight.pipe.d.ts +11 -0
- package/lib/place/components/abstract-place-navigation.component.d.ts +9 -2
- package/lib/place/place-component.d.ts +1 -1
- package/lib/services/exports.d.ts +4 -0
- package/lib/services/visibility-service.d.ts +12 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/schematics/aup-i18n/index.js +8 -28
- package/schematics/aup-i18n/index.js.map +1 -1
- package/schematics/aup-i18n/templates/app/aup.i18n.yml.template +80 -0
- package/schematics/bootstrap-app/index.js +5 -4
- package/schematics/bootstrap-app/index.js.map +1 -1
- package/schematics/bootstrap-app/templates/{i18n/config.json.template → i18n.config.json.template} +2 -0
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/place-add/index.js +4 -5
- package/schematics/place-add/index.js.map +1 -1
- package/schematics/place-add/templates/component/__name@dasherize__.component.ts.template +3 -1
- package/schematics/place-add/templates/component/__name@dasherize__.i18n.yml.template +5 -0
- package/schematics/aup-i18n/templates/i18n/aup/components.yml.template +0 -69
- package/schematics/bootstrap-app/templates/i18n/notifications.yml.template +0 -19
- package/schematics/place-add/templates/files/i18n/places/__name@dasherize__.yml.template +0 -7
- /package/schematics/bootstrap-app/templates/{app → src/app}/app-routing.module.ts.template +0 -0
- /package/schematics/bootstrap-app/templates/{app → src/app}/app.component.html.template +0 -0
- /package/schematics/bootstrap-app/templates/{app → src/app}/app.component.scss.template +0 -0
- /package/schematics/bootstrap-app/templates/{app → src/app}/app.component.ts.template +0 -0
- /package/schematics/bootstrap-app/templates/{app → src/app}/app.module.ts.template +0 -0
- /package/schematics/bootstrap-app/templates/{app → src/app}/i18n.ts.template +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/MaterialIcons-Regular.eot +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/MaterialIcons-Regular.ijmap +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/MaterialIcons-Regular.svg +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/MaterialIcons-Regular.ttf +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/MaterialIcons-Regular.woff +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/MaterialIcons-Regular.woff2 +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/README.md +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/codepoints +0 -0
- /package/schematics/bootstrap-app/templates/{assets → src/assets}/fonts/material-design-icons/material-icons.css +0 -0
- /package/schematics/bootstrap-app/templates/{index.html.template → src/index.html.template} +0 -0
- /package/schematics/bootstrap-app/templates/{styles → src/styles}/global-variables.scss.template +0 -0
- /package/schematics/bootstrap-app/templates/{styles.scss.template → src/styles.scss.template} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
2
|
-
import { Directive, ElementRef, Inject, Host, Optional, Input, HostListener, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, Component, ContentChild, ViewEncapsulation, HostBinding, InjectionToken, ViewChildren, SkipSelf, EventEmitter, ViewChild, Output, Self, TemplateRef, ChangeDetectorRef, ContentChildren, ViewContainerRef, Injector, ComponentFactoryResolver, INJECTOR } from '@angular/core';
|
|
2
|
+
import { Directive, ElementRef, Inject, Host, Optional, Input, HostListener, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, Pipe, NgModule, Component, ContentChild, ViewEncapsulation, HostBinding, InjectionToken, ViewChildren, SkipSelf, EventEmitter, ViewChild, Output, Self, TemplateRef, ChangeDetectorRef, ContentChildren, ViewContainerRef, Injector, ComponentFactoryResolver, INJECTOR } from '@angular/core';
|
|
3
3
|
import { FormsModule } from '@angular/forms';
|
|
4
4
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
5
5
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -21,8 +21,9 @@ import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontaweso
|
|
|
21
21
|
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
22
22
|
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';
|
|
23
23
|
import { __decorate, __metadata, __awaiter } from 'tslib';
|
|
24
|
-
import {
|
|
24
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
25
25
|
import _, { find, filter, each, isNil, isEqual } from 'lodash';
|
|
26
|
+
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
26
27
|
import { Enum } from 'typescript-string-enums';
|
|
27
28
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
28
29
|
import { assert as assert$1, Stringy, Mixin, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
|
|
@@ -35,6 +36,7 @@ import { MatListModule } from '@angular/material/list';
|
|
|
35
36
|
import { Memoize as Memoize$1 } from '@typescript-plus/fast-memoize-decorator';
|
|
36
37
|
import 'reflect-metadata';
|
|
37
38
|
import { style, query, group, animate, trigger, transition } from '@angular/animations';
|
|
39
|
+
import * as wakeEvent from 'wake-event';
|
|
38
40
|
|
|
39
41
|
class CommandDirective extends GarbageCollector {
|
|
40
42
|
constructor(elementRef, matButton, matMenuItem) {
|
|
@@ -295,13 +297,75 @@ FocusBindingDirective.propDecorators = {
|
|
|
295
297
|
onFocusOut: [{ type: HostListener, args: ['focusout',] }]
|
|
296
298
|
};
|
|
297
299
|
|
|
300
|
+
class HighlightTextModelDirective extends GarbageCollector {
|
|
301
|
+
constructor() {
|
|
302
|
+
super();
|
|
303
|
+
}
|
|
304
|
+
ngOnDestroy() {
|
|
305
|
+
this.dispose();
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
HighlightTextModelDirective.decorators = [
|
|
309
|
+
{ type: Directive, args: [{
|
|
310
|
+
selector: '[aupHighlightTextModel]'
|
|
311
|
+
},] }
|
|
312
|
+
];
|
|
313
|
+
HighlightTextModelDirective.ctorParameters = () => [];
|
|
314
|
+
HighlightTextModelDirective.propDecorators = {
|
|
315
|
+
aupHighlightTextModel: [{ type: Input }]
|
|
316
|
+
};
|
|
317
|
+
__decorate([
|
|
318
|
+
TrackExternal(),
|
|
319
|
+
__metadata("design:type", ValueModel)
|
|
320
|
+
], HighlightTextModelDirective.prototype, "aupHighlightTextModel", void 0);
|
|
321
|
+
|
|
322
|
+
class HighlightPipe extends GarbageCollector {
|
|
323
|
+
constructor(sanitizer, highlightContext) {
|
|
324
|
+
super();
|
|
325
|
+
this.sanitizer = sanitizer;
|
|
326
|
+
this.highlightContext = highlightContext;
|
|
327
|
+
}
|
|
328
|
+
ngOnDestroy() {
|
|
329
|
+
this.dispose();
|
|
330
|
+
}
|
|
331
|
+
transform(value, searchModel) {
|
|
332
|
+
var _a;
|
|
333
|
+
const model = searchModel !== null && searchModel !== void 0 ? searchModel : (_a = this.highlightContext) === null || _a === void 0 ? void 0 : _a.aupHighlightTextModel;
|
|
334
|
+
const searchText = model === null || model === void 0 ? void 0 : model.value;
|
|
335
|
+
if (_.isEmpty(searchText) || !_.isString(value)) {
|
|
336
|
+
return value;
|
|
337
|
+
}
|
|
338
|
+
// Match in a case insensitive manner
|
|
339
|
+
const re = new RegExp(searchText, 'gi');
|
|
340
|
+
const match = value.match(re);
|
|
341
|
+
// If there's no match, just return the original value.
|
|
342
|
+
if (!match) {
|
|
343
|
+
return value;
|
|
344
|
+
}
|
|
345
|
+
const result = value.replace(re, '<mark>' + match[0] + '</mark>');
|
|
346
|
+
return this.sanitizer.bypassSecurityTrustHtml(result);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
HighlightPipe.decorators = [
|
|
350
|
+
{ type: Pipe, args: [{
|
|
351
|
+
name: 'aupHighlight',
|
|
352
|
+
pure: false
|
|
353
|
+
},] }
|
|
354
|
+
];
|
|
355
|
+
HighlightPipe.ctorParameters = () => [
|
|
356
|
+
{ type: DomSanitizer },
|
|
357
|
+
{ type: HighlightTextModelDirective, decorators: [{ type: Optional }] }
|
|
358
|
+
];
|
|
359
|
+
|
|
298
360
|
class DirectivesModule {
|
|
299
361
|
}
|
|
300
362
|
DirectivesModule.decorators = [
|
|
301
363
|
{ type: NgModule, args: [{
|
|
302
364
|
declarations: [
|
|
303
365
|
CommandDirective,
|
|
304
|
-
FocusBindingDirective
|
|
366
|
+
FocusBindingDirective,
|
|
367
|
+
HighlightPipe,
|
|
368
|
+
HighlightTextModelDirective
|
|
305
369
|
],
|
|
306
370
|
imports: [
|
|
307
371
|
CommonModule,
|
|
@@ -314,7 +378,9 @@ DirectivesModule.decorators = [
|
|
|
314
378
|
],
|
|
315
379
|
exports: [
|
|
316
380
|
CommandDirective,
|
|
317
|
-
FocusBindingDirective
|
|
381
|
+
FocusBindingDirective,
|
|
382
|
+
HighlightPipe,
|
|
383
|
+
HighlightTextModelDirective
|
|
318
384
|
]
|
|
319
385
|
},] }
|
|
320
386
|
];
|
|
@@ -821,7 +887,11 @@ __decorate([
|
|
|
821
887
|
|
|
822
888
|
var TrackBy;
|
|
823
889
|
(function (TrackBy) {
|
|
824
|
-
TrackBy.byIndex = (
|
|
890
|
+
TrackBy.byIndex = (index, item) => index;
|
|
891
|
+
function trackByProperty(property) {
|
|
892
|
+
return (index, item) => item[property];
|
|
893
|
+
}
|
|
894
|
+
TrackBy.trackByProperty = trackByProperty;
|
|
825
895
|
})(TrackBy || (TrackBy = {}));
|
|
826
896
|
|
|
827
897
|
class CommandContainer extends GarbageCollector {
|
|
@@ -2007,7 +2077,7 @@ class DefaultCellRendererComponent {
|
|
|
2007
2077
|
DefaultCellRendererComponent.decorators = [
|
|
2008
2078
|
{ type: Component, args: [{
|
|
2009
2079
|
selector: 'aup-default-cell-renderer',
|
|
2010
|
-
template: "
|
|
2080
|
+
template: "<span [innerHTML]=\"value| aupHighlight\"></span>\n",
|
|
2011
2081
|
styles: [""]
|
|
2012
2082
|
},] }
|
|
2013
2083
|
];
|
|
@@ -5092,6 +5162,15 @@ SelectInputActivity.decorators = [
|
|
|
5092
5162
|
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
5093
5163
|
* });
|
|
5094
5164
|
*
|
|
5165
|
+
* Template columns
|
|
5166
|
+
* @example
|
|
5167
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
5168
|
+
* table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
|
|
5169
|
+
* table.addTemplateColumn("myTemplate");
|
|
5170
|
+
* });
|
|
5171
|
+
*
|
|
5172
|
+
* <div *aupColumnTemplate="let hero; columnId: 'myTemplate'">{{hero.age}}</div>
|
|
5173
|
+
*
|
|
5095
5174
|
* I18n
|
|
5096
5175
|
* @example
|
|
5097
5176
|
* [table.yml]
|
|
@@ -5423,6 +5502,7 @@ class PlaceComponent extends DisposableComponent {
|
|
|
5423
5502
|
this._active = new MutableValueModel(false);
|
|
5424
5503
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
5425
5504
|
when(this._active).becomesTruthy(() => this.onPlaceReady());
|
|
5505
|
+
this.childPlaces = this.placeDefinition.children.map(d => d.component);
|
|
5426
5506
|
}
|
|
5427
5507
|
// @Trace()
|
|
5428
5508
|
initialiseVisit(visit, notifyVisitChanged) {
|
|
@@ -5465,9 +5545,6 @@ class PlaceComponent extends DisposableComponent {
|
|
|
5465
5545
|
get placeDefinition() {
|
|
5466
5546
|
return PlaceComponent.getDefinition(this.constructor);
|
|
5467
5547
|
}
|
|
5468
|
-
get childPlaces() {
|
|
5469
|
-
return this.placeDefinition.children.map(d => d.component);
|
|
5470
|
-
}
|
|
5471
5548
|
get active() {
|
|
5472
5549
|
return this._active.readonly;
|
|
5473
5550
|
}
|
|
@@ -7250,6 +7327,7 @@ class AbstractPlaceNavigationComponent extends DisposableComponent {
|
|
|
7250
7327
|
super();
|
|
7251
7328
|
this.placeRouter = placeRouter;
|
|
7252
7329
|
this._activePlaceComponent = new DelegatingValueModel();
|
|
7330
|
+
this.trackByPlaceDef = (data) => data.place;
|
|
7253
7331
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
7254
7332
|
this.placeDefinitions = chain(this.placesModel)
|
|
7255
7333
|
.map(c => PlaceComponent.getDefinition(c))
|
|
@@ -7261,13 +7339,24 @@ class AbstractPlaceNavigationComponent extends DisposableComponent {
|
|
|
7261
7339
|
this.commandFactory = Command.createFactory((placeDefinition) => {
|
|
7262
7340
|
this.placeOutlet.navigate(new Visit(placeDefinition));
|
|
7263
7341
|
});
|
|
7264
|
-
when(this.placeOutletModel).changes(outlet => {
|
|
7265
|
-
// NOTE: this updates during a change cycle and causes our isActiveMethod to return 2 different
|
|
7266
|
-
// values in the one change detection cycle. So instead we delay the update to a different
|
|
7267
|
-
// tick.
|
|
7268
|
-
setTimeout(() => this._activePlaceComponent.setDelegate(outlet ? outlet.activePlaceModel : null));
|
|
7269
|
-
});
|
|
7342
|
+
when(this.placeOutletModel).changes(outlet => this.handlePlaceOutLetChanged(outlet), { initialValue: "triggerChange" });
|
|
7270
7343
|
this.activePlaceDefinition = chain(this._activePlaceComponent).pluck('placeDefinition');
|
|
7344
|
+
this.menuItems = chain(this.placeDefinitions).map(d => {
|
|
7345
|
+
return {
|
|
7346
|
+
place: d,
|
|
7347
|
+
active: this.activePlaceDefinition.value === d
|
|
7348
|
+
};
|
|
7349
|
+
}, {
|
|
7350
|
+
dependsOn: this.activePlaceDefinition
|
|
7351
|
+
});
|
|
7352
|
+
// const txo = new TransactionObserver({ verbose: true }).onEvent(e => console.log(e.name, e.payload));
|
|
7353
|
+
// txo.observe('this.placesModel', this.placesModel);
|
|
7354
|
+
// txo.observe('this.placeDefinitions', this.placeDefinitions);
|
|
7355
|
+
// txo.observe('this.activePlaceDefinition', this.activePlaceDefinition);
|
|
7356
|
+
// txo.observe('this.menuItems', this.menuItems);
|
|
7357
|
+
}
|
|
7358
|
+
handlePlaceOutLetChanged(outlet) {
|
|
7359
|
+
this._activePlaceComponent.setDelegate(outlet ? outlet.activePlaceModel : null);
|
|
7271
7360
|
}
|
|
7272
7361
|
getNavigationFace(placeDef) {
|
|
7273
7362
|
const navItem = placeDef.getPlaceData('nav');
|
|
@@ -7277,9 +7366,6 @@ class AbstractPlaceNavigationComponent extends DisposableComponent {
|
|
|
7277
7366
|
icon: () => navItem && navItem.icon ? navItem.icon() : placeDef.getPlaceData('navIcon', null)
|
|
7278
7367
|
};
|
|
7279
7368
|
}
|
|
7280
|
-
isActive(place) {
|
|
7281
|
-
return this.activePlaceDefinition.query().equals(place);
|
|
7282
|
-
}
|
|
7283
7369
|
ngOnInit() {
|
|
7284
7370
|
}
|
|
7285
7371
|
}
|
|
@@ -7328,7 +7414,7 @@ class ListPlaceNavComponent extends AbstractPlaceNavigationComponent {
|
|
|
7328
7414
|
ListPlaceNavComponent.decorators = [
|
|
7329
7415
|
{ type: Component, args: [{
|
|
7330
7416
|
selector: 'aup-list-place-nav',
|
|
7331
|
-
template: "<mat-nav-list fxFlex>\n <a mat-list-item *ngFor=\"let
|
|
7417
|
+
template: "<mat-nav-list fxFlex>\n <a mat-list-item *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [class.active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n</mat-nav-list>\n",
|
|
7332
7418
|
styles: [":host{display:flex;flex-direction:column;--selected-border-color:#838383;--selected-color:inherit;--selected-background:#f1f1f1}mat-nav-list{padding-top:0}a{border-right:2px solid transparent}a.active{border-right:2px solid var(--selected-border-color);background:var(--selected-background);color:var(--selected-color)}"]
|
|
7333
7419
|
},] }
|
|
7334
7420
|
];
|
|
@@ -7396,7 +7482,7 @@ class SidePlaceNavigationComponent extends AbstractPlaceNavigationComponent {
|
|
|
7396
7482
|
SidePlaceNavigationComponent.decorators = [
|
|
7397
7483
|
{ type: Component, args: [{
|
|
7398
7484
|
selector: 'aup-side-place-navigation',
|
|
7399
|
-
template: "<mat-nav-list>\n <a mat-list-item (click)=\"toggleMenu()\" class=\"home\">\n <aup-icon class=\"collapsed-only\" icon=\"mat:menu\"></aup-icon>\n <aup-icon class=\"expanded-only\" icon=\"mat:arrow_back\"></aup-icon>\n <span class=\"expanded-only\">Menu</span>\n </a>\n <a mat-list-item *ngFor=\"let
|
|
7485
|
+
template: "<mat-nav-list>\n <a mat-list-item (click)=\"toggleMenu()\" class=\"home\">\n <aup-icon class=\"collapsed-only\" icon=\"mat:menu\"></aup-icon>\n <aup-icon class=\"expanded-only\" icon=\"mat:arrow_back\"></aup-icon>\n <span class=\"expanded-only\">Menu</span>\n </a>\n <a mat-list-item *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [class.active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-icon *ngIf=\"getNavigationFace(item.place).icon()\" [icon]=\"getNavigationFace(item.place).icon()\"></aup-icon>\n <span class=\"expanded-only\">{{getNavigationFace(item.place).text()}}</span>\n </a>\n <span [style.flex]=\"1\"></span>\n <ng-container *ngIf=\"navEndTemplate\" [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n</mat-nav-list>\n",
|
|
7400
7486
|
styles: [":host{display:flex;flex-direction:column;--resolved-nav-item-width:var(--nav-width,56px);--resolved-nav-item-height:var(--nav-item-height,var(--resolved-nav-item-width));--resolved-expanded-width:var(--nav-expanded-width,235px);--resolved-color:var(--nav-color,hsla(0,0%,100%,0.9));--resolved-background-color:var(--nav-background-color,#555);width:var(--resolved-nav-item-width);transition:width 125ms linear;background-color:var(--resolved-background-color);color:var(--resolved-color)}:host.expanded{width:var(--resolved-expanded-width);max-width:var(--resolved-expanded-width)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item aup-icon:not(.collapsed-only){margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--resolved-nav-item-width);height:var(--resolved-nav-item-height);color:inherit}.mat-list-item.active{background-color:#444}.mat-list-item.home{text-align:left}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}"]
|
|
7401
7487
|
},] }
|
|
7402
7488
|
];
|
|
@@ -7416,7 +7502,7 @@ class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {
|
|
|
7416
7502
|
TabbedPlaceNavigationComponent.decorators = [
|
|
7417
7503
|
{ type: Component, args: [{
|
|
7418
7504
|
selector: 'aup-tabbed-place-navigation',
|
|
7419
|
-
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let
|
|
7505
|
+
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n</nav>\n",
|
|
7420
7506
|
styles: [""]
|
|
7421
7507
|
},] }
|
|
7422
7508
|
];
|
|
@@ -7943,6 +8029,78 @@ function VisitParameterList(options) {
|
|
|
7943
8029
|
};
|
|
7944
8030
|
}
|
|
7945
8031
|
|
|
8032
|
+
/**
|
|
8033
|
+
* @file Automatically generated by barrelsby.
|
|
8034
|
+
*/
|
|
8035
|
+
|
|
8036
|
+
// TODO: Merge various wake detection events into this class. visibility, wake events, websocket connection, online detection.
|
|
8037
|
+
// Taken from: https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
|
|
8038
|
+
class VisibilityService extends GarbageCollector {
|
|
8039
|
+
// private _wakeEvents = new MutableStream<Instant>();
|
|
8040
|
+
// private _throttledWakeEvents: Stream<Instant>;
|
|
8041
|
+
constructor(document) {
|
|
8042
|
+
super();
|
|
8043
|
+
this._visibleModel = new MutableValueModel();
|
|
8044
|
+
this.document = document; // see https://stackoverflow.com/a/53715642
|
|
8045
|
+
const { chain } = Dsl.disposeWith(this);
|
|
8046
|
+
// Set the name of the hidden property and the change event for visibility
|
|
8047
|
+
if (typeof this.document.hidden !== 'undefined') { // Opera 12.10 and Firefox 18 and later support
|
|
8048
|
+
this.attributeName = 'hidden';
|
|
8049
|
+
this.eventName = 'visibilitychange';
|
|
8050
|
+
}
|
|
8051
|
+
else if (typeof this.document['msHidden'] !== 'undefined') {
|
|
8052
|
+
this.attributeName = 'msHidden';
|
|
8053
|
+
this.eventName = 'msvisibilitychange';
|
|
8054
|
+
}
|
|
8055
|
+
else if (typeof this.document['webkitHidden'] !== 'undefined') {
|
|
8056
|
+
this.attributeName = 'webkitHidden';
|
|
8057
|
+
this.eventName = 'webkitvisibilitychange';
|
|
8058
|
+
}
|
|
8059
|
+
// Warn if the browser doesn't support addEventListener or the Page Visibility API
|
|
8060
|
+
if (typeof this.document.addEventListener === 'undefined' || typeof document[this.attributeName] === 'undefined') {
|
|
8061
|
+
console.log('This demo requires a browser, such as Google Chrome or Firefox, that supports the Page Visibility API.');
|
|
8062
|
+
}
|
|
8063
|
+
else {
|
|
8064
|
+
// Handle page visibility change
|
|
8065
|
+
const handler = () => this.updateVisibilityState();
|
|
8066
|
+
this.document.addEventListener(this.eventName, handler, false);
|
|
8067
|
+
this.onDispose(() => {
|
|
8068
|
+
this.document.removeEventListener(this.eventName, handler);
|
|
8069
|
+
});
|
|
8070
|
+
}
|
|
8071
|
+
wakeEvent(() => this.updateVisibilityState());
|
|
8072
|
+
this._visibleModel.value = this.isVisible();
|
|
8073
|
+
// give the network a chance to come back or we end up with a bunch of failed requests.
|
|
8074
|
+
// should probably also implement a connection service so that we can go
|
|
8075
|
+
// connectionServer.ensureConnectedThen(fireWakeEvent);
|
|
8076
|
+
// this._throttledWakeEvents = chain(this._wakeEvents).throttle(300);
|
|
8077
|
+
}
|
|
8078
|
+
// get wakeEvents(): Stream<Instant> {
|
|
8079
|
+
// return this._throttledWakeEvents;
|
|
8080
|
+
// }
|
|
8081
|
+
// @trace
|
|
8082
|
+
updateVisibilityState() {
|
|
8083
|
+
this._visibleModel.value = this.isVisible();
|
|
8084
|
+
// this._wakeEvents.publish(Instant.now());
|
|
8085
|
+
}
|
|
8086
|
+
get visibleModel() {
|
|
8087
|
+
return this._visibleModel.readonly;
|
|
8088
|
+
}
|
|
8089
|
+
isHidden() {
|
|
8090
|
+
return !!this.document[this.attributeName];
|
|
8091
|
+
}
|
|
8092
|
+
isVisible() {
|
|
8093
|
+
return !this.isHidden();
|
|
8094
|
+
}
|
|
8095
|
+
}
|
|
8096
|
+
VisibilityService.ɵprov = ɵɵdefineInjectable({ factory: function VisibilityService_Factory() { return new VisibilityService(ɵɵinject(DOCUMENT)); }, token: VisibilityService, providedIn: "root" });
|
|
8097
|
+
VisibilityService.decorators = [
|
|
8098
|
+
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8099
|
+
];
|
|
8100
|
+
VisibilityService.ctorParameters = () => [
|
|
8101
|
+
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
|
|
8102
|
+
];
|
|
8103
|
+
|
|
7946
8104
|
/**
|
|
7947
8105
|
* @file Automatically generated by barrelsby.
|
|
7948
8106
|
*/
|
|
@@ -7951,5 +8109,5 @@ function VisitParameterList(options) {
|
|
|
7951
8109
|
* Generated bundle index. Do not edit.
|
|
7952
8110
|
*/
|
|
7953
8111
|
|
|
7954
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, 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, FlattenStrategy, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, IconComponent, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, 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, 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, TreeToListModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0 };
|
|
8112
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, 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, FlattenStrategy, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, IconComponent, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, 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, 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, TreeToListModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0 };
|
|
7955
8113
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|