@coolon/angular-ui-powerups 16.1.0-aplpha.62 → 16.1.0-aplpha.64
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/assets/form.scss +3 -2
- package/esm2022/lib/components/cards/card-container/card-container.component.mjs +2 -2
- package/esm2022/lib/components/commands/command/command.component.mjs +2 -2
- package/esm2022/lib/components/commands/command-face.mjs +2 -2
- package/esm2022/lib/components/forms/autocomplete-input/autocomplete-input.component.mjs +2 -2
- package/esm2022/lib/components/forms/select-input/select-input.component.mjs +2 -2
- package/esm2022/lib/components/tables/tree-table/tree-table-model.mjs +2 -2
- package/esm2022/lib/components/text/markdown/markdown.component.mjs +2 -2
- package/esm2022/lib/directives/highlight.pipe.mjs +2 -2
- package/esm2022/lib/interaction/alert.mjs +2 -2
- package/esm2022/lib/interaction/components/activity-title/activity-title.component.mjs +2 -2
- package/esm2022/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.mjs +2 -2
- package/esm2022/lib/interaction/components/input-activities/input-activity.mjs +2 -2
- package/esm2022/lib/interaction/directives/interaction-context-trigger-for.directive.mjs +2 -2
- package/esm2022/lib/place/components/place-outlet/place-outlet.component.mjs +2 -2
- package/esm2022/lib/place/guards/consolidated-param-map.mjs +2 -2
- package/esm2022/lib/place/navigation/place-component-deactivation-handler.mjs +2 -2
- package/esm2022/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.mjs +2 -2
- package/esm2022/lib/place/place-component.mjs +2 -2
- package/esm2022/lib/place/place-definition.mjs +2 -2
- package/esm2022/lib/place/place-history.mjs +2 -2
- package/esm2022/lib/place/place.decorator.mjs +2 -2
- package/esm2022/lib/place/route/formatter.mjs +2 -2
- package/esm2022/lib/place/route/parameter-definition.mjs +2 -2
- package/esm2022/lib/place/url-snapshot.mjs +2 -2
- package/esm2022/lib/place/visit-segment.mjs +2 -2
- package/esm2022/lib/place/visit.mjs +2 -2
- package/fesm2022/coolon-angular-ui-powerups.mjs +17 -19
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -45,7 +45,7 @@ import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl
|
|
|
45
45
|
import { __decorate, __param, __metadata } from 'tslib';
|
|
46
46
|
import * as i1 from '@angular/platform-browser';
|
|
47
47
|
import escapeStringRegexp from 'escape-string-regexp';
|
|
48
|
-
import { isEmpty, isString, isFunction, isNil, isInteger, isObject, isEqual, join, first, uniq,
|
|
48
|
+
import { isEmpty, isString, isFunction, isNil, isInteger, isObject, isEqual, join, last, first, uniq, findLast, isNumber, isNaN as isNaN$1 } from 'lodash-es';
|
|
49
49
|
import { marked } from 'marked';
|
|
50
50
|
import { MemoizeGet, lang as lang$1, assert as assert$1, Stringy, Klass, Opts } from '@coolon/typescript-utilities';
|
|
51
51
|
import { Enum } from 'typescript-string-enums';
|
|
@@ -53,7 +53,6 @@ import * as i5 from '@angular/material/core';
|
|
|
53
53
|
import { Memoize } from 'fast-typescript-memoize';
|
|
54
54
|
import { produce } from 'immer';
|
|
55
55
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
56
|
-
import { isFunction as isFunction$1, isNil as isNil$1, isEmpty as isEmpty$1, last, findLast } from 'lodash-es';
|
|
57
56
|
import { generateKeyBetween } from 'fractional-indexing';
|
|
58
57
|
import * as i5$1 from '@angular/cdk/a11y';
|
|
59
58
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
@@ -61,7 +60,6 @@ import * as i1$6 from '@angular/material/dialog';
|
|
|
61
60
|
import { MatDialogModule, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
62
61
|
import * as i1$4 from '@angular/router';
|
|
63
62
|
import { ActivatedRouteSnapshot, UrlSegment, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterModule } from '@angular/router';
|
|
64
|
-
import { Memoize as Memoize$1 } from 'typescript-memoize';
|
|
65
63
|
import 'reflect-metadata';
|
|
66
64
|
import * as i1$5 from '@angular/cdk/overlay';
|
|
67
65
|
import { MatCardModule } from '@angular/material/card';
|
|
@@ -3754,17 +3752,17 @@ class CustomValueColumnModel extends ColumnModel {
|
|
|
3754
3752
|
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => new ColumnTextSearchFormatter.Null()), row => this.getValue(row));
|
|
3755
3753
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
3756
3754
|
if (firstTime) {
|
|
3757
|
-
if (isFunction
|
|
3755
|
+
if (isFunction(onComponentInitOrOptions)) {
|
|
3758
3756
|
onComponentInitOrOptions(component);
|
|
3759
3757
|
}
|
|
3760
3758
|
else {
|
|
3761
|
-
if (isFunction
|
|
3759
|
+
if (isFunction(onComponentInitOrOptions?.onComponentInit)) {
|
|
3762
3760
|
onComponentInitOrOptions.onComponentInit(component);
|
|
3763
3761
|
}
|
|
3764
3762
|
}
|
|
3765
3763
|
}
|
|
3766
3764
|
component.value = this.getValue(rowData.row);
|
|
3767
|
-
if (!isFunction
|
|
3765
|
+
if (!isFunction(onComponentInitOrOptions) && isFunction(onComponentInitOrOptions?.onRowUpdate)) {
|
|
3768
3766
|
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
3769
3767
|
}
|
|
3770
3768
|
}));
|
|
@@ -3819,7 +3817,7 @@ class ListPropertyColumnModel extends ColumnModel {
|
|
|
3819
3817
|
}
|
|
3820
3818
|
cellEditor(editor, validatorsOrInitialiser, initialiseComponent) {
|
|
3821
3819
|
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
3822
|
-
const initialiser = isFunction
|
|
3820
|
+
const initialiser = isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
3823
3821
|
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
3824
3822
|
const formListModel = editSession.form.pluckList(this.property);
|
|
3825
3823
|
if (validators) {
|
|
@@ -3857,11 +3855,11 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3857
3855
|
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => ColumnTextSearchFormatter.forFormatter(this._defaultSearchTextFormatter)), row => row[this.property]);
|
|
3858
3856
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
3859
3857
|
if (firstTime) {
|
|
3860
|
-
if (isFunction
|
|
3858
|
+
if (isFunction(onComponentInitOrOptions)) {
|
|
3861
3859
|
onComponentInitOrOptions(component);
|
|
3862
3860
|
}
|
|
3863
3861
|
else {
|
|
3864
|
-
if (isFunction
|
|
3862
|
+
if (isFunction(onComponentInitOrOptions?.onComponentInit)) {
|
|
3865
3863
|
onComponentInitOrOptions.onComponentInit(component);
|
|
3866
3864
|
}
|
|
3867
3865
|
}
|
|
@@ -3886,7 +3884,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3886
3884
|
component[ColumnModel.CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
3887
3885
|
let disableEditCallback = false;
|
|
3888
3886
|
if (firstTime) {
|
|
3889
|
-
if (isFunction
|
|
3887
|
+
if (isFunction(options?.onComponentInit)) {
|
|
3890
3888
|
options.onComponentInit(component);
|
|
3891
3889
|
}
|
|
3892
3890
|
// install our edit callback
|
|
@@ -3901,7 +3899,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3901
3899
|
disableEditCallback = true;
|
|
3902
3900
|
component.value = rowData.row[this.property];
|
|
3903
3901
|
disableEditCallback = false;
|
|
3904
|
-
if (!isFunction
|
|
3902
|
+
if (!isFunction(options) && isFunction(options?.onRowUpdate)) {
|
|
3905
3903
|
options.onRowUpdate(component, rowData.row);
|
|
3906
3904
|
}
|
|
3907
3905
|
}));
|
|
@@ -3909,7 +3907,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3909
3907
|
}
|
|
3910
3908
|
cellEditor(editor, validatorsOrInitialiser, onComponentInit) {
|
|
3911
3909
|
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
3912
|
-
const initialiser = isFunction
|
|
3910
|
+
const initialiser = isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;
|
|
3913
3911
|
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
3914
3912
|
const formValueModel = editSession.form.pluck(this.property);
|
|
3915
3913
|
if (validators) {
|
|
@@ -4187,14 +4185,14 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
4187
4185
|
this.selectionColumnModel.useSelectionModel(selectionModel);
|
|
4188
4186
|
this.addRowClass("aup-row-selected", row => this.selectionColumnModel.isSelected(row));
|
|
4189
4187
|
const selectionColumnModel = this.addColumn(this.selectionColumnModel, { before: null }); // first column
|
|
4190
|
-
if (!isNil
|
|
4188
|
+
if (!isNil(visible)) {
|
|
4191
4189
|
selectionColumnModel.visibleWhile(visible instanceof ValueModel ? visible : ValueModel.constant(visible));
|
|
4192
4190
|
}
|
|
4193
4191
|
return selectionColumnModel;
|
|
4194
4192
|
}
|
|
4195
4193
|
addEditControls(saveCommandFactory, formFactory) {
|
|
4196
4194
|
this.saveCommandFactory = saveCommandFactory;
|
|
4197
|
-
if (isFunction
|
|
4195
|
+
if (isFunction(formFactory)) {
|
|
4198
4196
|
this._createForm = formFactory;
|
|
4199
4197
|
}
|
|
4200
4198
|
const columnId = "editControls";
|
|
@@ -4780,7 +4778,7 @@ class TableFilterModel extends GarbageCollector {
|
|
|
4780
4778
|
const textSearchRegex$ = chain(this._searchText$)
|
|
4781
4779
|
.debounce(250)
|
|
4782
4780
|
.map(text => {
|
|
4783
|
-
return isEmpty
|
|
4781
|
+
return isEmpty(text) ? undefined : new RegExp(escapeStringRegexp(text), "i");
|
|
4784
4782
|
}, { allowNil: true });
|
|
4785
4783
|
this._rowPredicate = chain(this._rowPredicate$)
|
|
4786
4784
|
.map(predicate => {
|
|
@@ -6520,7 +6518,7 @@ class AbstractDialogComponent extends Activity {
|
|
|
6520
6518
|
}
|
|
6521
6519
|
}
|
|
6522
6520
|
isDestructive() {
|
|
6523
|
-
return isFunction
|
|
6521
|
+
return isFunction(this.config['destructive']) && this.config["destructive"]();
|
|
6524
6522
|
}
|
|
6525
6523
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AbstractDialogComponent, deps: [{ token: ALERT_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|
|
6526
6524
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: AbstractDialogComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
@@ -7428,7 +7426,7 @@ class Visit {
|
|
|
7428
7426
|
getRouterCommands() {
|
|
7429
7427
|
return this.segments.reduce((result, v) => {
|
|
7430
7428
|
const path = v.placeDefinition.path;
|
|
7431
|
-
return isEmpty
|
|
7429
|
+
return isEmpty(path) ?
|
|
7432
7430
|
[...result, path] : // Angular doesn't support route params on empty path segments
|
|
7433
7431
|
[...result, path, ...v.createRouterCommands()];
|
|
7434
7432
|
}, []);
|
|
@@ -7444,7 +7442,7 @@ class Visit {
|
|
|
7444
7442
|
}
|
|
7445
7443
|
}
|
|
7446
7444
|
__decorate([
|
|
7447
|
-
Memoize
|
|
7445
|
+
Memoize(),
|
|
7448
7446
|
__metadata("design:type", Function),
|
|
7449
7447
|
__metadata("design:paramtypes", [PlaceDefinition]),
|
|
7450
7448
|
__metadata("design:returntype", VisitSegment)
|
|
@@ -8646,7 +8644,7 @@ class UrlSnapshot {
|
|
|
8646
8644
|
return this.getPrimaryUrlSegments().find(s => s.path === placeDef.path);
|
|
8647
8645
|
}
|
|
8648
8646
|
isLastPlaceInUrl(placeDef) {
|
|
8649
|
-
return last
|
|
8647
|
+
return last(this.getPrimaryUrlSegments()).path === placeDef.path;
|
|
8650
8648
|
}
|
|
8651
8649
|
createVisitSegmentFor(placeDef) {
|
|
8652
8650
|
return new VisitSegment(placeDef, new ConsolidatedParameterMap(this.getPrimaryUrlSegments()));
|