@coolon/angular-ui-powerups 12.4.8 → 12.4.9
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 +68 -68
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/esm2015/lib/components/cards/card-container/card-container.component.js +2 -2
- package/esm2015/lib/components/commands/command/command.component.js +2 -2
- package/esm2015/lib/components/commands/command-face.js +2 -2
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js +2 -2
- package/esm2015/lib/components/tables/abstract-table-model.js +2 -2
- package/esm2015/lib/components/tables/column-list-model.js +2 -2
- package/esm2015/lib/components/tables/table/column-model.js +2 -2
- package/esm2015/lib/components/tables/tree-table/tree-label-column-model.js +2 -2
- package/esm2015/lib/components/tables/tree-table/tree-table-model.js +2 -2
- package/esm2015/lib/components/text/markdown/markdown.component.js +2 -2
- package/esm2015/lib/directives/highlight.pipe.js +2 -2
- package/esm2015/lib/interaction/alert.js +2 -2
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +2 -2
- package/esm2015/lib/interaction/components/activity-title/activity-title.component.js +2 -2
- package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.js +2 -2
- package/esm2015/lib/interaction/components/input-activities/input-activity.js +2 -2
- package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.js +2 -2
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +2 -2
- package/esm2015/lib/place/guards/consolidated-param-map.js +2 -2
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +2 -2
- package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +2 -2
- package/esm2015/lib/place/place-component.js +2 -2
- package/esm2015/lib/place/place-definition.js +2 -2
- package/esm2015/lib/place/place-history.js +2 -2
- package/esm2015/lib/place/place.decorator.js +2 -2
- package/esm2015/lib/place/route/formatter.js +2 -2
- package/esm2015/lib/place/route/parameter-definition.js +2 -2
- package/esm2015/lib/place/url-snapshot.js +2 -2
- package/esm2015/lib/place/visit.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +2 -3
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/package.json +3 -3
- package/schematics/place-routes/place-class-scanner.js +2 -2
- package/schematics/place-routes/place-class-scanner.js.map +1 -1
- package/schematics/utils/method-scanner.js +3 -3
- package/schematics/utils/method-scanner.js.map +1 -1
- package/schematics/utils/source-file-scanner.js +5 -5
- package/schematics/utils/source-file-scanner.js.map +1 -1
- package/schematics/utils/source-file-utilities.js +2 -2
- package/schematics/utils/source-file-utilities.js.map +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/cdk/portal'), require('@angular/cdk/scrolling'), require('@angular/material/autocomplete'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/divider'), require('@angular/material/icon'), require('@angular/material/menu'), require('@angular/material/progress-bar'), require('@angular/material/progress-spinner'), require('@angular/material/table'), require('@angular/material/tooltip'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-solid-svg-icons'), require('@coolon/pectin'), require('lodash
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/cdk/portal', '@angular/cdk/scrolling', '@angular/material/autocomplete', '@angular/material/button', '@angular/material/checkbox', '@angular/material/divider', '@angular/material/icon', '@angular/material/menu', '@angular/material/progress-bar', '@angular/material/progress-spinner', '@angular/material/table', '@angular/material/tooltip', '@fortawesome/angular-fontawesome', '@fortawesome/free-solid-svg-icons', '@coolon/pectin', 'lodash
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.coolon = global.coolon || {}, global.coolon["angular-ui-powerups"] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.cdk.portal, global.ng.cdk.scrolling, global.ng.material.autocomplete, global.ng.material.button, global.ng.material.checkbox, global.ng.material.divider, global.ng.material.icon, global.ng.material.menu, global.ng.material.progressBar, global.ng.material.progressSpinner, global.ng.material.table, global.ng.material.tooltip, global.i1$8, global.freeSolidSvgIcons, global.i1, global.
|
|
5
|
-
})(this, (function (exports, i4, i0, i4$1, i1$4, i5, i2, i1$5, animations, i2$3, i1$9, i2$2, i1$1, i1$a, i2$1, i1$7, i1$2, i1$b, i1$6, i1$c, i6, i1$8, freeSolidSvgIcons, i1,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/cdk/portal'), require('@angular/cdk/scrolling'), require('@angular/material/autocomplete'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/divider'), require('@angular/material/icon'), require('@angular/material/menu'), require('@angular/material/progress-bar'), require('@angular/material/progress-spinner'), require('@angular/material/table'), require('@angular/material/tooltip'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-solid-svg-icons'), require('@coolon/pectin'), require('lodash'), require('@angular/platform-browser'), require('marked'), require('@coolon/typescript-utilities'), require('@typescript-plus/fast-memoize-decorator'), require('typescript-string-enums'), require('@angular/material/core'), require('resize-observer-polyfill'), require('immer'), require('@angular/cdk/a11y'), require('@angular/flex-layout'), require('@angular/material/dialog'), require('@angular/router'), require('@angular/cdk/overlay'), require('@angular/material/list'), require('reflect-metadata'), require('@angular/animations'), require('wake-event')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/cdk/portal', '@angular/cdk/scrolling', '@angular/material/autocomplete', '@angular/material/button', '@angular/material/checkbox', '@angular/material/divider', '@angular/material/icon', '@angular/material/menu', '@angular/material/progress-bar', '@angular/material/progress-spinner', '@angular/material/table', '@angular/material/tooltip', '@fortawesome/angular-fontawesome', '@fortawesome/free-solid-svg-icons', '@coolon/pectin', 'lodash', '@angular/platform-browser', 'marked', '@coolon/typescript-utilities', '@typescript-plus/fast-memoize-decorator', 'typescript-string-enums', '@angular/material/core', 'resize-observer-polyfill', 'immer', '@angular/cdk/a11y', '@angular/flex-layout', '@angular/material/dialog', '@angular/router', '@angular/cdk/overlay', '@angular/material/list', 'reflect-metadata', '@angular/animations', 'wake-event'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.coolon = global.coolon || {}, global.coolon["angular-ui-powerups"] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.cdk.portal, global.ng.cdk.scrolling, global.ng.material.autocomplete, global.ng.material.button, global.ng.material.checkbox, global.ng.material.divider, global.ng.material.icon, global.ng.material.menu, global.ng.material.progressBar, global.ng.material.progressSpinner, global.ng.material.table, global.ng.material.tooltip, global.i1$8, global.freeSolidSvgIcons, global.i1, global.lodash, global.ng.platformBrowser, global.marked, global.typescriptUtilities, global.fastMemoizeDecorator, global.typescriptStringEnums, global.ng.material.core, global.ResizeObserver, global.produce, global.ng.cdk.a11y, global.ng.flexLayout, global.ng.material.dialog, global.ng.router, global.ng.cdk.overlay, global.ng.material.list, null, global.ng.animations, global.wakeEvent));
|
|
5
|
+
})(this, (function (exports, i4, i0, i4$1, i1$4, i5, i2, i1$5, animations, i2$3, i1$9, i2$2, i1$1, i1$a, i2$1, i1$7, i1$2, i1$b, i1$6, i1$c, i6, i1$8, freeSolidSvgIcons, i1, lodash, i1$3, marked, typescriptUtilities, fastMemoizeDecorator, typescriptStringEnums, i3, ResizeObserver, produce, i5$1, i4$2, i1$e, i1$f, i1$d, i2$4, reflectMetadata, animations$1, wakeEvent) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -738,7 +738,7 @@
|
|
|
738
738
|
var _a;
|
|
739
739
|
var model = searchModel !== null && searchModel !== void 0 ? searchModel : (_a = this.highlightContext) === null || _a === void 0 ? void 0 : _a.aupHighlightTextModel;
|
|
740
740
|
var searchText = model === null || model === void 0 ? void 0 : model.value;
|
|
741
|
-
if (
|
|
741
|
+
if (lodash.isEmpty(searchText) || !lodash.isString(value)) {
|
|
742
742
|
return value;
|
|
743
743
|
}
|
|
744
744
|
// Match in a case insensitive manner
|
|
@@ -959,27 +959,27 @@
|
|
|
959
959
|
RAISED: 'raised'
|
|
960
960
|
});
|
|
961
961
|
function getColorOf(face) {
|
|
962
|
-
return
|
|
962
|
+
return lodash.isFunction(face === null || face === void 0 ? void 0 : face.color) ? face.color() : undefined;
|
|
963
963
|
}
|
|
964
964
|
CommandFace.getColorOf = getColorOf;
|
|
965
965
|
function getStyleOf(face) {
|
|
966
|
-
return
|
|
966
|
+
return lodash.isFunction(face === null || face === void 0 ? void 0 : face.style) ? face.style() : undefined;
|
|
967
967
|
}
|
|
968
968
|
CommandFace.getStyleOf = getStyleOf;
|
|
969
969
|
function getIconOf(face) {
|
|
970
|
-
return
|
|
970
|
+
return lodash.isFunction(face === null || face === void 0 ? void 0 : face.icon) ? face.icon() : undefined;
|
|
971
971
|
}
|
|
972
972
|
CommandFace.getIconOf = getIconOf;
|
|
973
973
|
function getIconPositionOf(face) {
|
|
974
|
-
return
|
|
974
|
+
return lodash.isFunction(face === null || face === void 0 ? void 0 : face.iconPosition) ? face.iconPosition() : undefined;
|
|
975
975
|
}
|
|
976
976
|
CommandFace.getIconPositionOf = getIconPositionOf;
|
|
977
977
|
function getTooltipOf(face) {
|
|
978
|
-
return
|
|
978
|
+
return lodash.isFunction(face === null || face === void 0 ? void 0 : face.tooltip) ? face.tooltip() : undefined;
|
|
979
979
|
}
|
|
980
980
|
CommandFace.getTooltipOf = getTooltipOf;
|
|
981
981
|
function getTextOf(face) {
|
|
982
|
-
return
|
|
982
|
+
return lodash.isFunction(face === null || face === void 0 ? void 0 : face.text) ? face.text() : undefined;
|
|
983
983
|
}
|
|
984
984
|
CommandFace.getTextOf = getTextOf;
|
|
985
985
|
var Adapter = /** @class */ (function () {
|
|
@@ -1334,7 +1334,7 @@
|
|
|
1334
1334
|
return this._columnCount;
|
|
1335
1335
|
},
|
|
1336
1336
|
set: function (count) {
|
|
1337
|
-
if (!
|
|
1337
|
+
if (!lodash.isNil(count) && (!lodash.isInteger(count) || count < 1)) {
|
|
1338
1338
|
typescriptUtilities.lang.illegalState('columnCount must be a positive integer or nil');
|
|
1339
1339
|
}
|
|
1340
1340
|
this._columnCount = count;
|
|
@@ -1349,7 +1349,7 @@
|
|
|
1349
1349
|
};
|
|
1350
1350
|
Object.defineProperty(CardContainerComponent.prototype, "isAutoColumns", {
|
|
1351
1351
|
get: function () {
|
|
1352
|
-
return
|
|
1352
|
+
return lodash.isNil(this._columnCount);
|
|
1353
1353
|
},
|
|
1354
1354
|
enumerable: false,
|
|
1355
1355
|
configurable: true
|
|
@@ -1363,7 +1363,7 @@
|
|
|
1363
1363
|
});
|
|
1364
1364
|
CardContainerComponent.prototype.updateColumnCountStyles = function () {
|
|
1365
1365
|
var el = this.elementRef.nativeElement;
|
|
1366
|
-
if (
|
|
1366
|
+
if (lodash.isNil(this._columnCount)) {
|
|
1367
1367
|
el.style.setProperty('--aup-card-container-column-count', '');
|
|
1368
1368
|
}
|
|
1369
1369
|
else {
|
|
@@ -1535,7 +1535,7 @@
|
|
|
1535
1535
|
_this.color$ = chain(_this.activeFace$).map(function (f) { return exports.CommandFace.getColorOf(f); });
|
|
1536
1536
|
_this.tooltip$ = chain(_this.activeFace$).map(function (f) { return exports.CommandFace.getTooltipOf(f); });
|
|
1537
1537
|
_this.iconOnly$ = _this.faces$.select(function (face) {
|
|
1538
|
-
return
|
|
1538
|
+
return lodash.isEmpty(exports.CommandFace.getTextOf(face)) && !lodash.isEmpty(exports.CommandFace.getIconOf(face));
|
|
1539
1539
|
}).count().equals(_this.faces$.count());
|
|
1540
1540
|
return _this;
|
|
1541
1541
|
}
|
|
@@ -2497,10 +2497,10 @@
|
|
|
2497
2497
|
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
2498
2498
|
var _a = i1.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2499
2499
|
var lowerCaseFilterValue = chain(_this.filterValue)
|
|
2500
|
-
.map(function (v) { return
|
|
2500
|
+
.map(function (v) { return lodash.isString(v) ? v.toLowerCase() : ''; });
|
|
2501
2501
|
_this.filteredOptions = chain(_this.optionsModel)
|
|
2502
2502
|
.select(function (option) {
|
|
2503
|
-
return
|
|
2503
|
+
return lodash.isEmpty(_this.filterValue.value) || _this.optionLabelFormat(option).toString().toLowerCase().includes(lowerCaseFilterValue.value);
|
|
2504
2504
|
}, { dependsOn: lowerCaseFilterValue });
|
|
2505
2505
|
return _this;
|
|
2506
2506
|
}
|
|
@@ -3559,7 +3559,7 @@
|
|
|
3559
3559
|
ColumnModel.prototype.onRendererAttached = function (host, ref) {
|
|
3560
3560
|
var component = this.getComponentOrEmbeddedView(ref);
|
|
3561
3561
|
this._cellRendererPortalRef.onPortalAttached(host, component);
|
|
3562
|
-
if (
|
|
3562
|
+
if (lodash.isFunction(component === null || component === void 0 ? void 0 : component.matches)) {
|
|
3563
3563
|
this._cellRendererTextSearchPredicate = function (row, text) { return component.matches(row, text); };
|
|
3564
3564
|
}
|
|
3565
3565
|
else {
|
|
@@ -3627,11 +3627,11 @@
|
|
|
3627
3627
|
var _this = this;
|
|
3628
3628
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
3629
3629
|
if (firstTime) {
|
|
3630
|
-
if (
|
|
3630
|
+
if (lodash.isFunction(onComponentInitOrOptions)) {
|
|
3631
3631
|
onComponentInitOrOptions(component);
|
|
3632
3632
|
}
|
|
3633
3633
|
else {
|
|
3634
|
-
if (
|
|
3634
|
+
if (lodash.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
3635
3635
|
onComponentInitOrOptions.onComponentInit(component);
|
|
3636
3636
|
}
|
|
3637
3637
|
}
|
|
@@ -3656,7 +3656,7 @@
|
|
|
3656
3656
|
component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
3657
3657
|
var disableEditCallback = false;
|
|
3658
3658
|
if (firstTime) {
|
|
3659
|
-
if (
|
|
3659
|
+
if (lodash.isFunction(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
|
|
3660
3660
|
options.onComponentInit(component);
|
|
3661
3661
|
}
|
|
3662
3662
|
// install our edit callback
|
|
@@ -3671,7 +3671,7 @@
|
|
|
3671
3671
|
disableEditCallback = true;
|
|
3672
3672
|
component.value = rowData.row[_this.property];
|
|
3673
3673
|
disableEditCallback = false;
|
|
3674
|
-
if (!
|
|
3674
|
+
if (!lodash.isFunction(options) && lodash.isFunction(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
|
|
3675
3675
|
options.onRowUpdate(component, rowData.row);
|
|
3676
3676
|
}
|
|
3677
3677
|
}));
|
|
@@ -3680,7 +3680,7 @@
|
|
|
3680
3680
|
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, onComponentInit) {
|
|
3681
3681
|
var _this = this;
|
|
3682
3682
|
var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
3683
|
-
var initialiser =
|
|
3683
|
+
var initialiser = lodash.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;
|
|
3684
3684
|
this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
|
|
3685
3685
|
var formValueModel = editSession.form.pluck(_this.property);
|
|
3686
3686
|
if (validators) {
|
|
@@ -3725,7 +3725,7 @@
|
|
|
3725
3725
|
ListPropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, initialiseComponent) {
|
|
3726
3726
|
var _this = this;
|
|
3727
3727
|
var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
3728
|
-
var initialiser =
|
|
3728
|
+
var initialiser = lodash.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
3729
3729
|
this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
|
|
3730
3730
|
var formListModel = editSession.form.pluckList(_this.property);
|
|
3731
3731
|
if (validators) {
|
|
@@ -3760,17 +3760,17 @@
|
|
|
3760
3760
|
var _this = this;
|
|
3761
3761
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
3762
3762
|
if (firstTime) {
|
|
3763
|
-
if (
|
|
3763
|
+
if (lodash.isFunction(onComponentInitOrOptions)) {
|
|
3764
3764
|
onComponentInitOrOptions(component);
|
|
3765
3765
|
}
|
|
3766
3766
|
else {
|
|
3767
|
-
if (
|
|
3767
|
+
if (lodash.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
3768
3768
|
onComponentInitOrOptions.onComponentInit(component);
|
|
3769
3769
|
}
|
|
3770
3770
|
}
|
|
3771
3771
|
}
|
|
3772
3772
|
component.value = _this.getValue(rowData.row);
|
|
3773
|
-
if (!
|
|
3773
|
+
if (!lodash.isFunction(onComponentInitOrOptions) && lodash.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
3774
3774
|
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
3775
3775
|
}
|
|
3776
3776
|
}));
|
|
@@ -4264,7 +4264,7 @@
|
|
|
4264
4264
|
}
|
|
4265
4265
|
this.registerDisposable(column);
|
|
4266
4266
|
this.runInTransaction(function () {
|
|
4267
|
-
if (!
|
|
4267
|
+
if (!lodash.isNil(index)) {
|
|
4268
4268
|
_this._allColumns.insert(index, column);
|
|
4269
4269
|
}
|
|
4270
4270
|
else {
|
|
@@ -4389,7 +4389,7 @@
|
|
|
4389
4389
|
this.selectionColumnModel = new SelectionColumnModel(columnId, function () { return _this.getColumnTextProperties(columnId); }, selectionModel);
|
|
4390
4390
|
this.addRowClass('aup-row-selected', function (row) { return _this.selectionColumnModel.isSelected(row); });
|
|
4391
4391
|
var selectionColumnModel = this.addColumn(this.selectionColumnModel, 0);
|
|
4392
|
-
if (!
|
|
4392
|
+
if (!lodash.isNil(visible)) {
|
|
4393
4393
|
selectionColumnModel.visibleWhile(visible instanceof i1.ValueModel ? visible : i1.ValueModel.constant(visible));
|
|
4394
4394
|
}
|
|
4395
4395
|
return selectionColumnModel;
|
|
@@ -4397,7 +4397,7 @@
|
|
|
4397
4397
|
AbstractTableModel.prototype.addEditControls = function (saveCommandFactory, formFactory) {
|
|
4398
4398
|
var _this = this;
|
|
4399
4399
|
this.saveCommandFactory = saveCommandFactory;
|
|
4400
|
-
if (
|
|
4400
|
+
if (lodash.isFunction(formFactory)) {
|
|
4401
4401
|
this._createForm = formFactory;
|
|
4402
4402
|
}
|
|
4403
4403
|
var columnId = 'editControls';
|
|
@@ -5083,7 +5083,7 @@
|
|
|
5083
5083
|
component.treeTableModel = _this.expansionModel;
|
|
5084
5084
|
}
|
|
5085
5085
|
component.value = rowData.row;
|
|
5086
|
-
component.label =
|
|
5086
|
+
component.label = lodash.isNil(_this.labelProperty) ? undefined : rowData.row[_this.labelProperty];
|
|
5087
5087
|
component.iconFactory = _this.iconFactory;
|
|
5088
5088
|
}));
|
|
5089
5089
|
return this;
|
|
@@ -5111,7 +5111,7 @@
|
|
|
5111
5111
|
_this.treeExpansionModel = new TreeExpansionModel(function (row) { return _this.identityOf(row); });
|
|
5112
5112
|
if (builder)
|
|
5113
5113
|
builder(_this);
|
|
5114
|
-
var childExtractor =
|
|
5114
|
+
var childExtractor = lodash.isFunction(childAccessor) ? childAccessor : function (row) { return row[childAccessor]; };
|
|
5115
5115
|
_this.flattenedDataSource = _this.registerDisposable(new FlattenedTreeListModel(source, childExtractor, _this.treeExpansionModel));
|
|
5116
5116
|
_this.setDataSource(_this.flattenedDataSource);
|
|
5117
5117
|
_this.addRowClass('aup-node-collapsed', function (row) { return _this.isCollapsed(row); });
|
|
@@ -5465,7 +5465,7 @@
|
|
|
5465
5465
|
var _this = this;
|
|
5466
5466
|
var when = i1.Dsl.disposeWith(this).when;
|
|
5467
5467
|
when(this.content$).changes(function (content) { return _this.renderContent(content); }, { initialValue: 'triggerChangeUnlessNil' });
|
|
5468
|
-
if (
|
|
5468
|
+
if (lodash.isNil(this.content) && !lodash.isEmpty(this.element.nativeElement.innerHTML)) {
|
|
5469
5469
|
this.renderContent(this.extractInnerContent(this.element.nativeElement.innerHTML));
|
|
5470
5470
|
}
|
|
5471
5471
|
};
|
|
@@ -5478,7 +5478,7 @@
|
|
|
5478
5478
|
return lines.map(function (l) { return l.substr(prefix); }).join('\n');
|
|
5479
5479
|
};
|
|
5480
5480
|
MarkdownComponent.prototype.renderContent = function (content) {
|
|
5481
|
-
if (!
|
|
5481
|
+
if (!lodash.isNil(content)) {
|
|
5482
5482
|
var markdown = this.inline ?
|
|
5483
5483
|
this.markdownService.renderInline(content) :
|
|
5484
5484
|
this.markdownService.render(content);
|
|
@@ -6012,11 +6012,11 @@
|
|
|
6012
6012
|
}
|
|
6013
6013
|
Alert.getContent = getContent;
|
|
6014
6014
|
function getTitle(alert) {
|
|
6015
|
-
return
|
|
6015
|
+
return lodash.isFunction(alert.title) ? alert.title() : undefined;
|
|
6016
6016
|
}
|
|
6017
6017
|
Alert.getTitle = getTitle;
|
|
6018
6018
|
function getColor(alert) {
|
|
6019
|
-
return
|
|
6019
|
+
return lodash.isFunction(alert.color) ? alert.color() : undefined;
|
|
6020
6020
|
}
|
|
6021
6021
|
Alert.getColor = getColor;
|
|
6022
6022
|
})(exports.Alert || (exports.Alert = {}));
|
|
@@ -6110,7 +6110,7 @@
|
|
|
6110
6110
|
}
|
|
6111
6111
|
Object.defineProperty(ActivityTitleComponent.prototype, "hasTransparentBackground", {
|
|
6112
6112
|
get: function () {
|
|
6113
|
-
return
|
|
6113
|
+
return lodash.isNil(this._hasUserTransparentBackground) ? !this._color : this._hasUserTransparentBackground;
|
|
6114
6114
|
},
|
|
6115
6115
|
/**
|
|
6116
6116
|
* Adjusts layout to ensure the title and body are cleanly separated with even
|
|
@@ -6550,7 +6550,7 @@
|
|
|
6550
6550
|
if (!this.isActive()) {
|
|
6551
6551
|
typescriptUtilities.lang.illegalState('no activity in progress');
|
|
6552
6552
|
}
|
|
6553
|
-
return
|
|
6553
|
+
return lodash.findLast(this.activityRefs, function (tab) { return !tab.isComplete(); });
|
|
6554
6554
|
};
|
|
6555
6555
|
/**
|
|
6556
6556
|
* Cancels the current activity and returns true the context is no longer active, false if
|
|
@@ -7466,7 +7466,7 @@
|
|
|
7466
7466
|
});
|
|
7467
7467
|
};
|
|
7468
7468
|
InteractionContextTriggerFor.prototype.prepareActivityData = function () {
|
|
7469
|
-
return
|
|
7469
|
+
return lodash.isFunction(this.activityDataFactory()) ? this.activityDataFactory() : this.activityData;
|
|
7470
7470
|
};
|
|
7471
7471
|
return InteractionContextTriggerFor;
|
|
7472
7472
|
}(i1.GarbageCollector));
|
|
@@ -7585,7 +7585,7 @@
|
|
|
7585
7585
|
}
|
|
7586
7586
|
};
|
|
7587
7587
|
InputActivity.prototype.shouldCancelOnEscape = function () {
|
|
7588
|
-
return
|
|
7588
|
+
return lodash.isNil(this.data.cancelOnEscape) // we default to true..
|
|
7589
7589
|
|| this.data.cancelOnEscape;
|
|
7590
7590
|
};
|
|
7591
7591
|
return InputActivity;
|
|
@@ -7953,7 +7953,7 @@
|
|
|
7953
7953
|
// deviceDescription.isNil()
|
|
7954
7954
|
).areTruthy();
|
|
7955
7955
|
this.displayValue = chain(this.editorModel.valueModel).map(function (v) {
|
|
7956
|
-
return
|
|
7956
|
+
return lodash.isEmpty(v) ? _this.placeHolderModel.value : v;
|
|
7957
7957
|
}, { dependsOn: this.placeHolderModel, allowNil: true });
|
|
7958
7958
|
};
|
|
7959
7959
|
InlineStringEditorComponent.prototype.createInputActivityData = function () {
|
|
@@ -8294,11 +8294,11 @@
|
|
|
8294
8294
|
};
|
|
8295
8295
|
ParameterDefinition.prototype.prepareCustomSanitiser = function (injector) {
|
|
8296
8296
|
var customSanitiser = this.options.getOptional('sanitiser', null);
|
|
8297
|
-
if (
|
|
8297
|
+
if (lodash.isFunction(customSanitiser)) {
|
|
8298
8298
|
return injector.get(customSanitiser);
|
|
8299
8299
|
}
|
|
8300
|
-
if (
|
|
8301
|
-
return
|
|
8300
|
+
if (lodash.isObject(customSanitiser)) {
|
|
8301
|
+
return lodash.isFunction(customSanitiser['sanitise']) ?
|
|
8302
8302
|
customSanitiser :
|
|
8303
8303
|
typescriptUtilities.lang.illegalState("expected @VisitParameter({sanitiser: ...}) for " + this.propertyName + " to be a constructor or instance of ParameterSanitiser, got: " + customSanitiser);
|
|
8304
8304
|
}
|
|
@@ -8320,7 +8320,7 @@
|
|
|
8320
8320
|
return _this;
|
|
8321
8321
|
}
|
|
8322
8322
|
RouteId.prototype.isEmptyValue = function (value) {
|
|
8323
|
-
return
|
|
8323
|
+
return lodash.isNil(value);
|
|
8324
8324
|
};
|
|
8325
8325
|
RouteId.prototype.hasChanged = function (a, b) {
|
|
8326
8326
|
return a !== b;
|
|
@@ -8338,7 +8338,7 @@
|
|
|
8338
8338
|
return _this;
|
|
8339
8339
|
}
|
|
8340
8340
|
ValueParameter.prototype.isEmptyValue = function (value) {
|
|
8341
|
-
return
|
|
8341
|
+
return lodash.isNil(value);
|
|
8342
8342
|
};
|
|
8343
8343
|
ValueParameter.prototype.hasChanged = function (a, b) {
|
|
8344
8344
|
return a !== b;
|
|
@@ -8356,10 +8356,10 @@
|
|
|
8356
8356
|
return _this;
|
|
8357
8357
|
}
|
|
8358
8358
|
ArrayParameter.prototype.isEmptyValue = function (value) {
|
|
8359
|
-
return
|
|
8359
|
+
return lodash.isNil(value) || value.length < 1;
|
|
8360
8360
|
};
|
|
8361
8361
|
ArrayParameter.prototype.hasChanged = function (a, b) {
|
|
8362
|
-
return !
|
|
8362
|
+
return !lodash.isEqual(a, b);
|
|
8363
8363
|
};
|
|
8364
8364
|
return ArrayParameter;
|
|
8365
8365
|
}(ParameterDefinition));
|
|
@@ -8408,13 +8408,13 @@
|
|
|
8408
8408
|
};
|
|
8409
8409
|
PlaceDefinition.prototype.getPlaceData = function (key, defaultValue) {
|
|
8410
8410
|
return this.data ?
|
|
8411
|
-
|
|
8411
|
+
lodash.isNil(this.data[key]) ? defaultValue : this.data[key] :
|
|
8412
8412
|
defaultValue;
|
|
8413
8413
|
};
|
|
8414
8414
|
PlaceDefinition.prototype.searchPlaceData = function (keys, defaultValue) {
|
|
8415
8415
|
var _this = this;
|
|
8416
8416
|
if (this.data) {
|
|
8417
|
-
var found = keys.find(function (key) { return !
|
|
8417
|
+
var found = keys.find(function (key) { return !lodash.isNil(_this.data[key]); });
|
|
8418
8418
|
return found ? this.data[found] : defaultValue;
|
|
8419
8419
|
}
|
|
8420
8420
|
else {
|
|
@@ -8484,7 +8484,7 @@
|
|
|
8484
8484
|
// because our id routes redirect if the id isn't present we always have a id
|
|
8485
8485
|
// parameter in our params. This will bugger our remember and defaultvalue sanitisation
|
|
8486
8486
|
// as it'll see that the id is present (event thought its a blank string).
|
|
8487
|
-
if (!
|
|
8487
|
+
if (!lodash.isEmpty(value)) {
|
|
8488
8488
|
result[def.name] = def.urlFormat.parse(value);
|
|
8489
8489
|
}
|
|
8490
8490
|
}
|
|
@@ -8604,8 +8604,8 @@
|
|
|
8604
8604
|
// Now we need to initialise the binding direction. If we have a value in the Url then we should always push
|
|
8605
8605
|
// that to the view. If we don't and the view already has a value (e.g. a selection model has already initialised in the
|
|
8606
8606
|
// component constructor) then we should push that to the route.
|
|
8607
|
-
var isInVisit = !
|
|
8608
|
-
var isInModel = !
|
|
8607
|
+
var isInVisit = !lodash.isNil(initialVisit.getParameterValue(parameterDef));
|
|
8608
|
+
var isInModel = !lodash.isNil(model.value);
|
|
8609
8609
|
if (!isInVisit && isInModel) {
|
|
8610
8610
|
binding.writeLeft(); // push it to the route
|
|
8611
8611
|
}
|
|
@@ -8752,7 +8752,7 @@
|
|
|
8752
8752
|
};
|
|
8753
8753
|
// @Trace()
|
|
8754
8754
|
Visit.prototype.hasRouteId = function () {
|
|
8755
|
-
return !
|
|
8755
|
+
return !lodash.isNil(this.getRouteId());
|
|
8756
8756
|
};
|
|
8757
8757
|
/**
|
|
8758
8758
|
* Returns the value of the place parameter with the specified name. The parameter
|
|
@@ -8761,7 +8761,7 @@
|
|
|
8761
8761
|
* @param parameter the visit parameter definition
|
|
8762
8762
|
*/
|
|
8763
8763
|
Visit.prototype.getParameterValue = function (parameter) {
|
|
8764
|
-
return
|
|
8764
|
+
return lodash.isString(parameter) ? this.visitParameters[parameter] : this.visitParameters[parameter.name];
|
|
8765
8765
|
};
|
|
8766
8766
|
// @Trace()
|
|
8767
8767
|
Visit.prototype.hasParameter = function (parameterDef) {
|
|
@@ -8799,11 +8799,11 @@
|
|
|
8799
8799
|
var currentParams = this.placeDefinition.getFormattedRouteParameters(this, true);
|
|
8800
8800
|
var otherParams = this.placeDefinition.getFormattedRouteParameters(other, true);
|
|
8801
8801
|
// console.log({currentParams, otherParams});
|
|
8802
|
-
var sameRouteParameters =
|
|
8802
|
+
var sameRouteParameters = lodash.isEqual(currentParams, otherParams);
|
|
8803
8803
|
return !samePlace || !sameRouteParameters;
|
|
8804
8804
|
};
|
|
8805
8805
|
Visit.prototype.hasChangedFrom = function (other) {
|
|
8806
|
-
var sameNonRouteParameters =
|
|
8806
|
+
var sameNonRouteParameters = lodash.isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
8807
8807
|
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
8808
8808
|
};
|
|
8809
8809
|
Visit.prototype.toDebugString = function () {
|
|
@@ -8936,7 +8936,7 @@
|
|
|
8936
8936
|
if (!(this.isPrimaryComponent && this.routerInteractionAdapter.isModalActive())) return [3 /*break*/, 3];
|
|
8937
8937
|
routeIds = this.urlService.getActiveInteractionIdsFromUrl(nextState.url);
|
|
8938
8938
|
currentIds = this.routerInteractionAdapter.getActiveInteractionContextIds();
|
|
8939
|
-
if (!!
|
|
8939
|
+
if (!!lodash.isEqual(currentIds, routeIds)) return [3 /*break*/, 2];
|
|
8940
8940
|
return [4 /*yield*/, this.routerInteractionAdapter.cancelCurrentModalInteraction()];
|
|
8941
8941
|
case 1:
|
|
8942
8942
|
_a.sent();
|
|
@@ -9298,7 +9298,7 @@
|
|
|
9298
9298
|
var currentIds = this.interactionServiceAdapter.getActiveInteractionContextIds();
|
|
9299
9299
|
var previousIds = this.urlService.getCurrentLocationUrlSnapshot().getInteractionIds();
|
|
9300
9300
|
// console.log(`---> synchroniseInteractionIds`, { is: currentIds.join(','), was: previousIds.join(',') });
|
|
9301
|
-
if (
|
|
9301
|
+
if (lodash.isEqual(currentIds, previousIds)) {
|
|
9302
9302
|
// console.log('### Activity context ids were the same, skipping');
|
|
9303
9303
|
this.context.finishRoutingSession();
|
|
9304
9304
|
}
|
|
@@ -9782,7 +9782,7 @@
|
|
|
9782
9782
|
};
|
|
9783
9783
|
Object.defineProperty(ConsolidatedParameterMap.prototype, "keys", {
|
|
9784
9784
|
get: function () {
|
|
9785
|
-
return
|
|
9785
|
+
return lodash.uniq(this.paramMaps.reduce(function (result, params) { return result.concat(params.keys); }, []));
|
|
9786
9786
|
},
|
|
9787
9787
|
enumerable: false,
|
|
9788
9788
|
configurable: true
|
|
@@ -9880,7 +9880,7 @@
|
|
|
9880
9880
|
return this.getInteractionIds().length > 0;
|
|
9881
9881
|
};
|
|
9882
9882
|
UrlSnapshot.prototype.hasInteractionIds = function (ids) {
|
|
9883
|
-
return
|
|
9883
|
+
return lodash.isEqual(this.getInteractionIds(), ids);
|
|
9884
9884
|
};
|
|
9885
9885
|
// @Trace()
|
|
9886
9886
|
UrlSnapshot.prototype.updateInteractionIds = function (ids) {
|
|
@@ -10012,7 +10012,7 @@
|
|
|
10012
10012
|
return !!((_a = this._previousVisits) === null || _a === void 0 ? void 0 : _a.getVisitFor(placeDef));
|
|
10013
10013
|
};
|
|
10014
10014
|
PlaceHistory.prototype.getMostRecentVisitFor = function (placeDef) {
|
|
10015
|
-
return
|
|
10015
|
+
return lodash.first(this.getHistory(placeDef));
|
|
10016
10016
|
};
|
|
10017
10017
|
PlaceHistory.prototype.getHistory = function (placeDef) {
|
|
10018
10018
|
var history = this._archive.get(placeDef);
|
|
@@ -10029,7 +10029,7 @@
|
|
|
10029
10029
|
var _this = this;
|
|
10030
10030
|
visits.forEach(function (state) {
|
|
10031
10031
|
var history = _this.getHistory(state.placeDefinition);
|
|
10032
|
-
var previousState =
|
|
10032
|
+
var previousState = lodash.first(history);
|
|
10033
10033
|
if (!previousState || state.hasChangedFrom(previousState)) {
|
|
10034
10034
|
history.unshift(state); // LIFO
|
|
10035
10035
|
_this.setHistory(state.placeDefinition, history.slice(0, _this.placeHistoryDepth));
|
|
@@ -10518,11 +10518,11 @@
|
|
|
10518
10518
|
var placeIndex = 0;
|
|
10519
10519
|
if (activatePlaceType.value) {
|
|
10520
10520
|
placeIndex = placesInOrder.indexOf(activatePlaceType.value);
|
|
10521
|
-
if (
|
|
10521
|
+
if (lodash.isNil(_this.initialPlaceIndex)) {
|
|
10522
10522
|
_this.initialPlaceIndex = placeIndex;
|
|
10523
10523
|
}
|
|
10524
10524
|
}
|
|
10525
|
-
return
|
|
10525
|
+
return lodash.isNil(_this.initialPlaceIndex) ? 0 : placeIndex - _this.initialPlaceIndex;
|
|
10526
10526
|
}, { dependsOn: activatePlaceType });
|
|
10527
10527
|
_this.animationSupported = _this.placesInAnimationOrder.count().isGreaterThan(0);
|
|
10528
10528
|
_this.animationEnabled = valueOf.all(_this.animateModel, _this.animationSupported).areTruthy();
|
|
@@ -11261,7 +11261,7 @@
|
|
|
11261
11261
|
return function (target) {
|
|
11262
11262
|
var _a;
|
|
11263
11263
|
if (exports.PlaceComponent.isPlaceComponentConstructor(target)) {
|
|
11264
|
-
exports.PlaceComponent.injectDefinition(target, new PlaceDefinition(target, options.path,
|
|
11264
|
+
exports.PlaceComponent.injectDefinition(target, new PlaceDefinition(target, options.path, lodash.isNil(options.authenticate) ? true : options.authenticate, (_a = options.role) !== null && _a !== void 0 ? _a : options.roles, options.data, exports.PlaceComponent.getRouteParameters(target), (options.children || []).map(function (c) { return exports.PlaceComponent.getDefinition(c); })));
|
|
11265
11265
|
if (options.roles) {
|
|
11266
11266
|
console.warn(target.name + " @Place({roles: string[]}) is deprecated. Use @Place({role:any}) instead");
|
|
11267
11267
|
}
|
|
@@ -11494,11 +11494,11 @@
|
|
|
11494
11494
|
function NumberType() {
|
|
11495
11495
|
}
|
|
11496
11496
|
NumberType.prototype.format = function (value) {
|
|
11497
|
-
return
|
|
11497
|
+
return lodash.isNumber(value) && !isNaN(value) ? "" + value : null;
|
|
11498
11498
|
};
|
|
11499
11499
|
NumberType.prototype.parse = function (value) {
|
|
11500
11500
|
var parsed = Number.parseFloat(value);
|
|
11501
|
-
return
|
|
11501
|
+
return lodash.isNaN(parsed) ? null : parsed;
|
|
11502
11502
|
};
|
|
11503
11503
|
return NumberType;
|
|
11504
11504
|
}());
|