@coolon/angular-ui-powerups 11.2.3 → 12.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/coolon-angular-ui-powerups-cypress.umd.js +24 -12
- package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +69 -47
- package/bundles/coolon-angular-ui-powerups.umd.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/commands/group/popup-menu/abstract-popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/focusable.component.js.map +1 -1
- package/esm2015/lib/components/scroll-container/scroll-container.component.js +1 -1
- package/esm2015/lib/components/scroll-container/scroll-container.component.metadata.json +1 -1
- package/esm2015/lib/components/table/abstract-table-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/column-template/column-template.directive.js.map +1 -1
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -1
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/directives/directives.module.ngfactory.js.map +1 -1
- package/esm2015/lib/directives/highlight.pipe.js.map +1 -1
- package/esm2015/lib/interaction/activity.js.map +1 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/components/input-activities/select-input-activity.js.map +1 -1
- package/esm2015/lib/place/place-definition.js +2 -2
- package/esm2015/lib/place/place-definition.js.map +1 -1
- package/esm2015/lib/place/place-definition.metadata.json +1 -1
- package/esm2015/lib/place/place-history.js.map +1 -1
- package/esm2015/lib/place/place-router.js.map +1 -1
- package/esm2015/lib/place/place.decorator.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +68 -63
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/place-definition.d.ts +2 -2
- package/lib/place/place-router.d.ts +1 -1
- package/package.json +16 -16
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/utils/build-context.d.ts +2 -1
- package/schematics/utils/build-context.js +4 -2
- package/schematics/utils/build-context.js.map +1 -1
- package/schematics/utils/schematic-tree-file-system.d.ts +3 -2
- package/schematics/utils/schematic-tree-file-system.js +1 -1
- package/schematics/utils/schematic-tree-file-system.js.map +1 -1
- package/schematics/utils/template-utilities.js +8 -0
- package/schematics/utils/template-utilities.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups-cypress.umd.min.js +0 -16
- package/bundles/coolon-angular-ui-powerups-cypress.umd.min.js.map +0 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +0 -2
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import * as i2 from '@angular/common';
|
|
1
2
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
2
|
-
import
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Directive, ElementRef, Inject, Host, Optional, Input, HostListener, NgZone, Injectable, Pipe, NgModule, Component, ContentChild, ViewEncapsulation, HostBinding, InjectionToken, ViewChildren, SkipSelf, EventEmitter, ViewChild, Output, Self, TemplateRef, ChangeDetectorRef, ContentChildren, ViewContainerRef, Injector, ComponentFactoryResolver } from '@angular/core';
|
|
3
5
|
import { FormsModule } from '@angular/forms';
|
|
4
6
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
5
7
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -22,14 +24,17 @@ import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
|
22
24
|
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, MutableValueModel, DelegatingListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, MultipleSelectionModel, DelegatingSelectionModel, AbstractComputedListModel, DirtyTrackingForm, ComputedListModel, PageController, Deferred, Trace, Functions } from '@coolon/pectin';
|
|
23
25
|
import { __decorate, __metadata, __awaiter } from 'tslib';
|
|
24
26
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
25
|
-
import
|
|
27
|
+
import * as _ from 'lodash';
|
|
28
|
+
import ___default from 'lodash';
|
|
26
29
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
27
30
|
import { Enum } from 'typescript-string-enums';
|
|
28
31
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
29
32
|
import { assert as assert$1, Stringy, Mixin, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
|
|
30
33
|
import produce from 'immer';
|
|
31
34
|
import { FlexModule, GridModule } from '@angular/flex-layout';
|
|
32
|
-
import
|
|
35
|
+
import * as i1$1 from '@angular/material/dialog';
|
|
36
|
+
import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
37
|
+
import * as i1 from '@angular/router';
|
|
33
38
|
import { RouterModule, ActivatedRouteSnapshot, NavigationStart, NavigationCancel, UrlSegment, Router, UrlSerializer, NavigationEnd, NavigationError } from '@angular/router';
|
|
34
39
|
import { Overlay, CdkScrollable } from '@angular/cdk/overlay';
|
|
35
40
|
import { MatListModule } from '@angular/material/list';
|
|
@@ -236,7 +241,7 @@ class FocusBindingFactory {
|
|
|
236
241
|
return new FocusBinding(el, this.ngZone, this.document, focusContext);
|
|
237
242
|
}
|
|
238
243
|
}
|
|
239
|
-
FocusBindingFactory.ɵprov =
|
|
244
|
+
FocusBindingFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function FocusBindingFactory_Factory() { return new FocusBindingFactory(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i2.DOCUMENT)); }, token: FocusBindingFactory, providedIn: "root" });
|
|
240
245
|
FocusBindingFactory.decorators = [
|
|
241
246
|
{ type: Injectable, args: [{
|
|
242
247
|
providedIn: 'root'
|
|
@@ -332,7 +337,7 @@ class HighlightPipe extends GarbageCollector {
|
|
|
332
337
|
var _a;
|
|
333
338
|
const model = searchModel !== null && searchModel !== void 0 ? searchModel : (_a = this.highlightContext) === null || _a === void 0 ? void 0 : _a.aupHighlightTextModel;
|
|
334
339
|
const searchText = model === null || model === void 0 ? void 0 : model.value;
|
|
335
|
-
if (
|
|
340
|
+
if (___default.isEmpty(searchText) || !___default.isString(value)) {
|
|
336
341
|
return value;
|
|
337
342
|
}
|
|
338
343
|
// Match in a case insensitive manner
|
|
@@ -426,27 +431,27 @@ var CommandFace;
|
|
|
426
431
|
RAISED: 'raised'
|
|
427
432
|
});
|
|
428
433
|
function getColorOf(face) {
|
|
429
|
-
return
|
|
434
|
+
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.color) ? face.color() : undefined;
|
|
430
435
|
}
|
|
431
436
|
CommandFace.getColorOf = getColorOf;
|
|
432
437
|
function getStyleOf(face) {
|
|
433
|
-
return
|
|
438
|
+
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.style) ? face.style() : undefined;
|
|
434
439
|
}
|
|
435
440
|
CommandFace.getStyleOf = getStyleOf;
|
|
436
441
|
function getIconOf(face) {
|
|
437
|
-
return
|
|
442
|
+
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.icon) ? face.icon() : undefined;
|
|
438
443
|
}
|
|
439
444
|
CommandFace.getIconOf = getIconOf;
|
|
440
445
|
function getIconPositionOf(face) {
|
|
441
|
-
return
|
|
446
|
+
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.iconPosition) ? face.iconPosition() : undefined;
|
|
442
447
|
}
|
|
443
448
|
CommandFace.getIconPositionOf = getIconPositionOf;
|
|
444
449
|
function getTooltipOf(face) {
|
|
445
|
-
return
|
|
450
|
+
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.tooltip) ? face.tooltip() : undefined;
|
|
446
451
|
}
|
|
447
452
|
CommandFace.getTooltipOf = getTooltipOf;
|
|
448
453
|
function getTextOf(face) {
|
|
449
|
-
return
|
|
454
|
+
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.text) ? face.text() : undefined;
|
|
450
455
|
}
|
|
451
456
|
CommandFace.getTextOf = getTextOf;
|
|
452
457
|
class Adapter {
|
|
@@ -709,7 +714,7 @@ class CommandComponent extends PopupAwareComponent {
|
|
|
709
714
|
this.colorModel = chain(this.activeFace).map(f => CommandFace.getColorOf(f));
|
|
710
715
|
this.tooltipModel = chain(this.activeFace).map(f => CommandFace.getTooltipOf(f));
|
|
711
716
|
this.iconOnly = this.faces.select(face => {
|
|
712
|
-
return
|
|
717
|
+
return ___default.isEmpty(CommandFace.getTextOf(face)) && !___default.isEmpty(CommandFace.getIconOf(face));
|
|
713
718
|
}).count().equals(this.faces.count());
|
|
714
719
|
}
|
|
715
720
|
isActive(face) {
|
|
@@ -1447,10 +1452,10 @@ class AutocompleteInputComponent extends AbstractValueInputComponent {
|
|
|
1447
1452
|
this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
|
|
1448
1453
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1449
1454
|
const lowerCaseFilterValue = chain(this.filterValue)
|
|
1450
|
-
.map(v =>
|
|
1455
|
+
.map(v => ___default.isString(v) ? v.toLowerCase() : '');
|
|
1451
1456
|
this.filteredOptions = chain(this.optionsModel)
|
|
1452
1457
|
.select(option => {
|
|
1453
|
-
return
|
|
1458
|
+
return ___default.isEmpty(this.filterValue.value) || this.optionLabelFormat(option).toString().toLowerCase().includes(lowerCaseFilterValue.value);
|
|
1454
1459
|
}, { dependsOn: lowerCaseFilterValue });
|
|
1455
1460
|
}
|
|
1456
1461
|
ngOnInit() {
|
|
@@ -1762,7 +1767,7 @@ ScrollContainerComponent.decorators = [
|
|
|
1762
1767
|
{ type: Component, args: [{
|
|
1763
1768
|
selector: 'aup-scroll-container',
|
|
1764
1769
|
template: "<div class=\"container\" cdkScrollable>\n <ng-content></ng-content>\n</div>\n",
|
|
1765
|
-
styles: [":host{flex-direction:column;min-height:0
|
|
1770
|
+
styles: [":host{display:flex;flex-direction:column;min-height:0;align-items:stretch}.container{display:flex;flex-direction:column;flex:1;flex-basis:0;overflow-y:scroll;align-items:stretch}"]
|
|
1766
1771
|
},] }
|
|
1767
1772
|
];
|
|
1768
1773
|
ScrollContainerComponent.ctorParameters = () => [];
|
|
@@ -2360,17 +2365,17 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
2360
2365
|
cellRenderer(componentType, onComponentInitOrOptions) {
|
|
2361
2366
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
2362
2367
|
if (firstTime) {
|
|
2363
|
-
if (
|
|
2368
|
+
if (___default.isFunction(onComponentInitOrOptions)) {
|
|
2364
2369
|
onComponentInitOrOptions(component);
|
|
2365
2370
|
}
|
|
2366
2371
|
else {
|
|
2367
|
-
if (
|
|
2372
|
+
if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
2368
2373
|
onComponentInitOrOptions.onComponentInit(component);
|
|
2369
2374
|
}
|
|
2370
2375
|
}
|
|
2371
2376
|
}
|
|
2372
2377
|
component.value = this._format(rowData.row[this.property]);
|
|
2373
|
-
if (!
|
|
2378
|
+
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2374
2379
|
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2375
2380
|
}
|
|
2376
2381
|
}));
|
|
@@ -2391,7 +2396,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
2391
2396
|
component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
2392
2397
|
let disableEditCallback = false;
|
|
2393
2398
|
if (firstTime) {
|
|
2394
|
-
if (
|
|
2399
|
+
if (___default.isFunction(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
|
|
2395
2400
|
options.onComponentInit(component);
|
|
2396
2401
|
}
|
|
2397
2402
|
// install our edit callback
|
|
@@ -2406,7 +2411,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
2406
2411
|
disableEditCallback = true;
|
|
2407
2412
|
component.value = rowData.row[this.property];
|
|
2408
2413
|
disableEditCallback = false;
|
|
2409
|
-
if (!
|
|
2414
|
+
if (!___default.isFunction(options) && ___default.isFunction(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
|
|
2410
2415
|
options.onRowUpdate(component, rowData.row);
|
|
2411
2416
|
}
|
|
2412
2417
|
}));
|
|
@@ -2414,7 +2419,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
2414
2419
|
}
|
|
2415
2420
|
cellEditor(editor, validatorsOrInitialiser, onComponentInit) {
|
|
2416
2421
|
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
2417
|
-
const initialiser =
|
|
2422
|
+
const initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;
|
|
2418
2423
|
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
2419
2424
|
const formValueModel = editSession.form.pluck(this.property);
|
|
2420
2425
|
if (validators) {
|
|
@@ -2451,7 +2456,7 @@ class ListPropertyColumnModel extends ColumnModel {
|
|
|
2451
2456
|
}
|
|
2452
2457
|
cellEditor(editor, validatorsOrInitialiser, initialiseComponent) {
|
|
2453
2458
|
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
2454
|
-
const initialiser =
|
|
2459
|
+
const initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
2455
2460
|
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
2456
2461
|
const formListModel = editSession.form.pluckList(this.property);
|
|
2457
2462
|
if (validators) {
|
|
@@ -2482,17 +2487,17 @@ class CustomValueColumnModel extends ColumnModel {
|
|
|
2482
2487
|
cellRenderer(componentType, onComponentInitOrOptions) {
|
|
2483
2488
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
2484
2489
|
if (firstTime) {
|
|
2485
|
-
if (
|
|
2490
|
+
if (___default.isFunction(onComponentInitOrOptions)) {
|
|
2486
2491
|
onComponentInitOrOptions(component);
|
|
2487
2492
|
}
|
|
2488
2493
|
else {
|
|
2489
|
-
if (
|
|
2494
|
+
if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
2490
2495
|
onComponentInitOrOptions.onComponentInit(component);
|
|
2491
2496
|
}
|
|
2492
2497
|
}
|
|
2493
2498
|
}
|
|
2494
2499
|
component.value = this.getValue(rowData.row);
|
|
2495
|
-
if (!
|
|
2500
|
+
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2496
2501
|
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2497
2502
|
}
|
|
2498
2503
|
}));
|
|
@@ -3281,10 +3286,10 @@ class DecoratedTreeNodeMixin {
|
|
|
3281
3286
|
return this.parent ? this.node.children.length > 1 : false;
|
|
3282
3287
|
}
|
|
3283
3288
|
find(predicate) {
|
|
3284
|
-
return find(this.descendants(), predicate);
|
|
3289
|
+
return _.find(this.descendants(), predicate);
|
|
3285
3290
|
}
|
|
3286
3291
|
select(predicate) {
|
|
3287
|
-
return filter(this.descendants(), predicate);
|
|
3292
|
+
return _.filter(this.descendants(), predicate);
|
|
3288
3293
|
}
|
|
3289
3294
|
flattenInto(array) {
|
|
3290
3295
|
this.visitSelfAndDescendants(child => array.push(child));
|
|
@@ -3345,7 +3350,7 @@ class DecoratedTreeNodeMixin {
|
|
|
3345
3350
|
return visitor;
|
|
3346
3351
|
}
|
|
3347
3352
|
visitChildren(visitor) {
|
|
3348
|
-
each(this.children, child => child.visit(visitor));
|
|
3353
|
+
_.each(this.children, child => child.visit(visitor));
|
|
3349
3354
|
return visitor;
|
|
3350
3355
|
}
|
|
3351
3356
|
visitSelfAndDescendants(callback) {
|
|
@@ -3356,7 +3361,7 @@ class DecoratedTreeNodeMixin {
|
|
|
3356
3361
|
}
|
|
3357
3362
|
memoize(property, factory) {
|
|
3358
3363
|
const key = `__${property}`;
|
|
3359
|
-
if (isNil(this[key])) {
|
|
3364
|
+
if (_.isNil(this[key])) {
|
|
3360
3365
|
this[key] = factory();
|
|
3361
3366
|
}
|
|
3362
3367
|
return this[key];
|
|
@@ -3436,7 +3441,7 @@ class TreeLabelColumnModel extends ColumnModel {
|
|
|
3436
3441
|
component.expansionModel = this.expansionModel;
|
|
3437
3442
|
}
|
|
3438
3443
|
component.value = rowData.row;
|
|
3439
|
-
component.label =
|
|
3444
|
+
component.label = ___default.isNil(this.labelProperty) ? undefined : rowData.row[this.labelProperty];
|
|
3440
3445
|
component.iconFactory = this.iconFactory;
|
|
3441
3446
|
}));
|
|
3442
3447
|
return this;
|
|
@@ -4399,7 +4404,7 @@ class ActivityContainerComponent extends AbstractInteractionContext {
|
|
|
4399
4404
|
if (!this.isActive()) {
|
|
4400
4405
|
lang$1.illegalState('no activity in progress');
|
|
4401
4406
|
}
|
|
4402
|
-
return
|
|
4407
|
+
return ___default.findLast(this.activityRefs, tab => !tab.isComplete());
|
|
4403
4408
|
}
|
|
4404
4409
|
/**
|
|
4405
4410
|
* Cancels the current activity and returns true the context is no longer active, false if
|
|
@@ -4570,7 +4575,7 @@ class ActivityTitleComponent extends DisposableComponent {
|
|
|
4570
4575
|
this._hasUserTransparentBackground = value;
|
|
4571
4576
|
}
|
|
4572
4577
|
get hasTransparentBackground() {
|
|
4573
|
-
return
|
|
4578
|
+
return ___default.isNil(this._hasUserTransparentBackground) ? !this._color : this._hasUserTransparentBackground;
|
|
4574
4579
|
}
|
|
4575
4580
|
set color(color) {
|
|
4576
4581
|
this._color = color;
|
|
@@ -4688,7 +4693,7 @@ class InteractionService {
|
|
|
4688
4693
|
});
|
|
4689
4694
|
}
|
|
4690
4695
|
}
|
|
4691
|
-
InteractionService.ɵprov =
|
|
4696
|
+
InteractionService.ɵprov = i0.ɵɵdefineInjectable({ factory: function InteractionService_Factory() { return new InteractionService(i0.ɵɵinject(ModalInteractionContextFactory)); }, token: InteractionService, providedIn: "root" });
|
|
4692
4697
|
InteractionService.decorators = [
|
|
4693
4698
|
{ type: Injectable, args: [{
|
|
4694
4699
|
providedIn: 'root'
|
|
@@ -5016,7 +5021,7 @@ class InteractionContextTriggerFor extends GarbageCollector {
|
|
|
5016
5021
|
});
|
|
5017
5022
|
}
|
|
5018
5023
|
prepareActivityData() {
|
|
5019
|
-
return
|
|
5024
|
+
return ___default.isFunction(this.activityDataFactory()) ? this.activityDataFactory() : this.activityData;
|
|
5020
5025
|
}
|
|
5021
5026
|
}
|
|
5022
5027
|
InteractionContextTriggerFor.decorators = [
|
|
@@ -5333,7 +5338,7 @@ class ParameterDefinition {
|
|
|
5333
5338
|
this.isArray = false;
|
|
5334
5339
|
}
|
|
5335
5340
|
isEmptyValue(value) {
|
|
5336
|
-
return
|
|
5341
|
+
return ___default.isNil(value);
|
|
5337
5342
|
}
|
|
5338
5343
|
hasChanged(a, b) {
|
|
5339
5344
|
return a !== b;
|
|
@@ -5347,7 +5352,7 @@ class ParameterDefinition {
|
|
|
5347
5352
|
this.isArray = false;
|
|
5348
5353
|
}
|
|
5349
5354
|
isEmptyValue(value) {
|
|
5350
|
-
return
|
|
5355
|
+
return ___default.isNil(value);
|
|
5351
5356
|
}
|
|
5352
5357
|
hasChanged(a, b) {
|
|
5353
5358
|
return a !== b;
|
|
@@ -5361,21 +5366,21 @@ class ParameterDefinition {
|
|
|
5361
5366
|
this.isArray = true;
|
|
5362
5367
|
}
|
|
5363
5368
|
isEmptyValue(value) {
|
|
5364
|
-
return
|
|
5369
|
+
return ___default.isNil(value) || value.length < 1;
|
|
5365
5370
|
}
|
|
5366
5371
|
hasChanged(a, b) {
|
|
5367
|
-
return !
|
|
5372
|
+
return !___default.isEqual(a, b);
|
|
5368
5373
|
}
|
|
5369
5374
|
}
|
|
5370
5375
|
ParameterDefinition.ArrayParameter = ArrayParameter;
|
|
5371
5376
|
})(ParameterDefinition || (ParameterDefinition = {}));
|
|
5372
5377
|
|
|
5373
5378
|
class PlaceDefinition {
|
|
5374
|
-
constructor(component, path, authenticate,
|
|
5379
|
+
constructor(component, path, authenticate, role, data, routeParameters, children) {
|
|
5375
5380
|
this.component = component;
|
|
5376
5381
|
this.path = path;
|
|
5377
5382
|
this.authenticate = authenticate;
|
|
5378
|
-
this.
|
|
5383
|
+
this.role = role;
|
|
5379
5384
|
this.data = data;
|
|
5380
5385
|
this.routeParameters = routeParameters;
|
|
5381
5386
|
this.children = children;
|
|
@@ -5403,12 +5408,12 @@ class PlaceDefinition {
|
|
|
5403
5408
|
}
|
|
5404
5409
|
getPlaceData(key, defaultValue) {
|
|
5405
5410
|
return this.data ?
|
|
5406
|
-
|
|
5411
|
+
___default.isNil(this.data[key]) ? defaultValue : this.data[key] :
|
|
5407
5412
|
defaultValue;
|
|
5408
5413
|
}
|
|
5409
5414
|
searchPlaceData(keys, defaultValue) {
|
|
5410
5415
|
if (this.data) {
|
|
5411
|
-
const found = keys.find(key => !
|
|
5416
|
+
const found = keys.find(key => !___default.isNil(this.data[key]));
|
|
5412
5417
|
return found ? this.data[found] : defaultValue;
|
|
5413
5418
|
}
|
|
5414
5419
|
else {
|
|
@@ -5476,7 +5481,7 @@ class PlaceDefinition {
|
|
|
5476
5481
|
// because our id routes redirect if the id isn't present we always have a id
|
|
5477
5482
|
// parameter in our params. This will bugger our remember and defaultvalue sanitisation
|
|
5478
5483
|
// as it'll see that the id is present (event thought its a blank string).
|
|
5479
|
-
if (!
|
|
5484
|
+
if (!___default.isEmpty(value)) {
|
|
5480
5485
|
result[def.name] = def.urlFormat.parse(value);
|
|
5481
5486
|
}
|
|
5482
5487
|
}
|
|
@@ -5654,7 +5659,7 @@ class PlaceComponentDeactivationHandler {
|
|
|
5654
5659
|
if (this.isPrimaryComponent && this.routerInteractionAdapter.isModalActive()) {
|
|
5655
5660
|
const routeIds = this.urlService.getActiveInteractionIdsFromUrl(nextState.url);
|
|
5656
5661
|
const currentIds = this.routerInteractionAdapter.getActiveInteractionContextIds();
|
|
5657
|
-
if (!isEqual(currentIds, routeIds)) { // why am I checking this????
|
|
5662
|
+
if (!_.isEqual(currentIds, routeIds)) { // why am I checking this????
|
|
5658
5663
|
yield this.routerInteractionAdapter.cancelCurrentModalInteraction();
|
|
5659
5664
|
return false;
|
|
5660
5665
|
}
|
|
@@ -5972,7 +5977,7 @@ class SynchroniseInteractionContextIdsWithRoute extends NavigationSession {
|
|
|
5972
5977
|
const currentIds = this.interactionServiceAdapter.getActiveInteractionContextIds();
|
|
5973
5978
|
const previousIds = this.urlService.getCurrentLocationUrlSnapshot().getInteractionIds();
|
|
5974
5979
|
// console.log(`---> synchroniseInteractionIds`, { is: currentIds.join(','), was: previousIds.join(',') });
|
|
5975
|
-
if (
|
|
5980
|
+
if (___default.isEqual(currentIds, previousIds)) {
|
|
5976
5981
|
// console.log('### Activity context ids were the same, skipping');
|
|
5977
5982
|
this.context.finishRoutingSession();
|
|
5978
5983
|
}
|
|
@@ -6420,7 +6425,7 @@ class PlaceHistory {
|
|
|
6420
6425
|
return !!((_a = this._previousVisits) === null || _a === void 0 ? void 0 : _a.getVisitFor(placeDef));
|
|
6421
6426
|
}
|
|
6422
6427
|
getMostRecentVisitFor(placeDef) {
|
|
6423
|
-
return
|
|
6428
|
+
return ___default.first(this.getHistory(placeDef));
|
|
6424
6429
|
}
|
|
6425
6430
|
getHistory(placeDef) {
|
|
6426
6431
|
let history = this._archive.get(placeDef);
|
|
@@ -6436,7 +6441,7 @@ class PlaceHistory {
|
|
|
6436
6441
|
archive(visits) {
|
|
6437
6442
|
visits.forEach(state => {
|
|
6438
6443
|
const history = this.getHistory(state.placeDefinition);
|
|
6439
|
-
const previousState =
|
|
6444
|
+
const previousState = ___default.first(history);
|
|
6440
6445
|
if (!previousState || state.hasChangedFrom(previousState)) {
|
|
6441
6446
|
history.unshift(state); // LIFO
|
|
6442
6447
|
this.setHistory(state.placeDefinition, history.slice(0, this.placeHistoryDepth));
|
|
@@ -6444,7 +6449,7 @@ class PlaceHistory {
|
|
|
6444
6449
|
});
|
|
6445
6450
|
}
|
|
6446
6451
|
}
|
|
6447
|
-
PlaceHistory.ɵprov =
|
|
6452
|
+
PlaceHistory.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlaceHistory_Factory() { return new PlaceHistory(); }, token: PlaceHistory, providedIn: "root" });
|
|
6448
6453
|
PlaceHistory.decorators = [
|
|
6449
6454
|
{ type: Injectable, args: [{
|
|
6450
6455
|
providedIn: 'root'
|
|
@@ -6586,7 +6591,7 @@ class UrlSnapshot {
|
|
|
6586
6591
|
return this.getInteractionIds().length > 0;
|
|
6587
6592
|
}
|
|
6588
6593
|
hasInteractionIds(ids) {
|
|
6589
|
-
return
|
|
6594
|
+
return ___default.isEqual(this.getInteractionIds(), ids);
|
|
6590
6595
|
}
|
|
6591
6596
|
// @Trace()
|
|
6592
6597
|
updateInteractionIds(ids) {
|
|
@@ -6673,7 +6678,7 @@ class UrlService {
|
|
|
6673
6678
|
this.angularLocation.back();
|
|
6674
6679
|
}
|
|
6675
6680
|
}
|
|
6676
|
-
UrlService.ɵprov =
|
|
6681
|
+
UrlService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UrlService_Factory() { return new UrlService(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.Location), i0.ɵɵinject(i1.UrlSerializer)); }, token: UrlService, providedIn: "root" });
|
|
6677
6682
|
UrlService.decorators = [
|
|
6678
6683
|
{ type: Injectable, args: [{
|
|
6679
6684
|
providedIn: 'root'
|
|
@@ -6975,7 +6980,7 @@ class PlaceRouter extends GarbageCollector {
|
|
|
6975
6980
|
[def.getFormattedRouteParameters(visit)];
|
|
6976
6981
|
}
|
|
6977
6982
|
}
|
|
6978
|
-
PlaceRouter.ɵprov =
|
|
6983
|
+
PlaceRouter.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.Location), i0.ɵɵinject(InteractionService), i0.ɵɵinject(UrlService), i0.ɵɵinject(PlaceHistory)); }, token: PlaceRouter, providedIn: "root" });
|
|
6979
6984
|
PlaceRouter.decorators = [
|
|
6980
6985
|
{ type: Injectable, args: [{
|
|
6981
6986
|
providedIn: 'root'
|
|
@@ -7014,7 +7019,7 @@ class Visit {
|
|
|
7014
7019
|
}
|
|
7015
7020
|
// @Trace()
|
|
7016
7021
|
hasRouteId() {
|
|
7017
|
-
return !isNil(this.getRouteId());
|
|
7022
|
+
return !_.isNil(this.getRouteId());
|
|
7018
7023
|
}
|
|
7019
7024
|
/**
|
|
7020
7025
|
* Returns the value of the place parameter with the specified name. The parameter
|
|
@@ -7055,11 +7060,11 @@ class Visit {
|
|
|
7055
7060
|
}
|
|
7056
7061
|
hasRoutingChangedFrom(other) {
|
|
7057
7062
|
const samePlace = other.placeDefinition === this.placeDefinition;
|
|
7058
|
-
const sameRouteParameters = isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
7063
|
+
const sameRouteParameters = _.isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
7059
7064
|
return !samePlace || !sameRouteParameters;
|
|
7060
7065
|
}
|
|
7061
7066
|
hasChangedFrom(other) {
|
|
7062
|
-
const sameNonRouteParameters = isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
7067
|
+
const sameNonRouteParameters = _.isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
7063
7068
|
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
7064
7069
|
}
|
|
7065
7070
|
toDebugString() {
|
|
@@ -7156,11 +7161,11 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
7156
7161
|
let placeIndex = 0;
|
|
7157
7162
|
if (activatePlaceType.value) {
|
|
7158
7163
|
placeIndex = placesInOrder.indexOf(activatePlaceType.value);
|
|
7159
|
-
if (isNil(this.initialPlaceIndex)) {
|
|
7164
|
+
if (_.isNil(this.initialPlaceIndex)) {
|
|
7160
7165
|
this.initialPlaceIndex = placeIndex;
|
|
7161
7166
|
}
|
|
7162
7167
|
}
|
|
7163
|
-
return isNil(this.initialPlaceIndex) ? 0 : placeIndex - this.initialPlaceIndex;
|
|
7168
|
+
return _.isNil(this.initialPlaceIndex) ? 0 : placeIndex - this.initialPlaceIndex;
|
|
7164
7169
|
}, { dependsOn: activatePlaceType });
|
|
7165
7170
|
this.animationSupported = this.placesInAnimationOrder.count().isGreaterThan(0);
|
|
7166
7171
|
this.animationEnabled = valueOf.all(this.animateModel, this.animationSupported).areTruthy();
|
|
@@ -7697,7 +7702,7 @@ class DialogInteractionContextFactory extends ModalInteractionContextFactory {
|
|
|
7697
7702
|
return new DialogInteractionContext(identifier, api, this.dialogService, config);
|
|
7698
7703
|
}
|
|
7699
7704
|
}
|
|
7700
|
-
DialogInteractionContextFactory.ɵprov =
|
|
7705
|
+
DialogInteractionContextFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function DialogInteractionContextFactory_Factory() { return new DialogInteractionContextFactory(i0.ɵɵinject(i1$1.MatDialog), i0.ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), i0.ɵɵinject(i1$1.MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionContextFactory, providedIn: "root" });
|
|
7701
7706
|
DialogInteractionContextFactory.decorators = [
|
|
7702
7707
|
{ type: Injectable, args: [{
|
|
7703
7708
|
providedIn: 'root'
|
|
@@ -7717,7 +7722,7 @@ function Place(options) {
|
|
|
7717
7722
|
return (target) => {
|
|
7718
7723
|
var _a;
|
|
7719
7724
|
if (PlaceComponent.isPlaceComponentConstructor(target)) {
|
|
7720
|
-
PlaceComponent.injectDefinition(target, new PlaceDefinition(target, options.path, isNil(options.authenticate) ? true : options.authenticate, (_a = options.role) !== null && _a !== void 0 ? _a : options.roles, options.data, PlaceComponent.getRouteParameters(target), (options.children || []).map(c => PlaceComponent.getDefinition(c))));
|
|
7725
|
+
PlaceComponent.injectDefinition(target, new PlaceDefinition(target, options.path, _.isNil(options.authenticate) ? true : options.authenticate, (_a = options.role) !== null && _a !== void 0 ? _a : options.roles, options.data, PlaceComponent.getRouteParameters(target), (options.children || []).map(c => PlaceComponent.getDefinition(c))));
|
|
7721
7726
|
if (options.roles) {
|
|
7722
7727
|
console.warn(`${target.name} @Place({roles: string[]}) is deprecated. Use @Place({role:any}) instead`);
|
|
7723
7728
|
}
|
|
@@ -7785,7 +7790,7 @@ class NoopAuthGuard {
|
|
|
7785
7790
|
});
|
|
7786
7791
|
}
|
|
7787
7792
|
}
|
|
7788
|
-
NoopAuthGuard.ɵprov =
|
|
7793
|
+
NoopAuthGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function NoopAuthGuard_Factory() { return new NoopAuthGuard(); }, token: NoopAuthGuard, providedIn: "root" });
|
|
7789
7794
|
NoopAuthGuard.decorators = [
|
|
7790
7795
|
{ type: Injectable, args: [{
|
|
7791
7796
|
providedIn: 'root'
|
|
@@ -7946,7 +7951,7 @@ class PlaceGuard {
|
|
|
7946
7951
|
});
|
|
7947
7952
|
}
|
|
7948
7953
|
}
|
|
7949
|
-
PlaceGuard.ɵprov =
|
|
7954
|
+
PlaceGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlaceGuard_Factory() { return new PlaceGuard(i0.ɵɵinject(i1.Router), i0.ɵɵinject(UrlService), i0.ɵɵinject(PlaceRouter), i0.ɵɵinject(PlaceHistory), i0.ɵɵinject(InteractionService), i0.ɵɵinject(i0.INJECTOR)); }, token: PlaceGuard, providedIn: "root" });
|
|
7950
7955
|
PlaceGuard.decorators = [
|
|
7951
7956
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7952
7957
|
];
|
|
@@ -7971,11 +7976,11 @@ var Formatter;
|
|
|
7971
7976
|
}
|
|
7972
7977
|
class NumberType {
|
|
7973
7978
|
format(value) {
|
|
7974
|
-
return
|
|
7979
|
+
return ___default.isNumber(value) && !___default.isNaN(value) ? `${value}` : null;
|
|
7975
7980
|
}
|
|
7976
7981
|
parse(value) {
|
|
7977
7982
|
const parsed = Number.parseFloat(value);
|
|
7978
|
-
return
|
|
7983
|
+
return ___default.isNaN(parsed) ? null : parsed;
|
|
7979
7984
|
}
|
|
7980
7985
|
}
|
|
7981
7986
|
class BooleanType {
|
|
@@ -8115,7 +8120,7 @@ class VisibilityService extends GarbageCollector {
|
|
|
8115
8120
|
return !this.isHidden();
|
|
8116
8121
|
}
|
|
8117
8122
|
}
|
|
8118
|
-
VisibilityService.ɵprov =
|
|
8123
|
+
VisibilityService.ɵprov = i0.ɵɵdefineInjectable({ factory: function VisibilityService_Factory() { return new VisibilityService(i0.ɵɵinject(i2.DOCUMENT)); }, token: VisibilityService, providedIn: "root" });
|
|
8119
8124
|
VisibilityService.decorators = [
|
|
8120
8125
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8121
8126
|
];
|