@coolon/angular-ui-powerups 13.6.5 → 13.6.6
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/esm2020/lib/components/tables/abstract-table-model.mjs +3 -4
- package/esm2020/lib/components/tables/column/custom-value-column-model.mjs +2 -2
- package/esm2020/lib/components/tables/column/list-propery-column-model.mjs +2 -2
- package/esm2020/lib/components/tables/column/property-column-model.mjs +2 -2
- package/esm2020/lib/components/tables/search/enable-cell-text-search.decorator.mjs +1 -1
- package/esm2020/lib/interaction/components/abstract-dialog.component.mjs +2 -2
- package/esm2020/lib/interaction/components/activity-container/activity-container.component.mjs +2 -2
- package/fesm2015/coolon-angular-ui-powerups.mjs +15 -16
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +15 -16
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/package.json +4 -5
|
@@ -44,8 +44,7 @@ import * as i1$7 from '@coolon/pectin';
|
|
|
44
44
|
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, DelegatingListModel, MutableValueModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, Functions, MultipleSelectionModel, AbstractComputedListModel, DelegatingSelectionModel, DirtyTrackingForm, PagedListModel, PageController, Trace, ComputedListModel, Deferred } from '@coolon/pectin';
|
|
45
45
|
import { __decorate, __param, __metadata } from 'tslib';
|
|
46
46
|
import * as i1$2 from '@angular/platform-browser';
|
|
47
|
-
import
|
|
48
|
-
import { isEmpty, isString, isFunction, isNil, isInteger, isEqual, first, uniq, findLast, isObject, isNumber, isNaN as isNaN$1 } from 'lodash';
|
|
47
|
+
import { isEmpty, isString, isFunction, isNil, isInteger, isEqual, first, uniq, isObject, isNumber, isNaN as isNaN$1 } from 'lodash';
|
|
49
48
|
import { marked } from 'marked';
|
|
50
49
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator';
|
|
51
50
|
import { Enum } from 'typescript-string-enums';
|
|
@@ -53,7 +52,7 @@ import { lang as lang$1, assert as assert$1, Stringy, Klass, Opts } from '@coolo
|
|
|
53
52
|
import * as i3 from '@angular/material/core';
|
|
54
53
|
import produce from 'immer';
|
|
55
54
|
import escapeStringRegexp from 'escape-string-regexp';
|
|
56
|
-
import {
|
|
55
|
+
import { isFunction as isFunction$1, isEmpty as isEmpty$1, isNil as isNil$1, findLast } from 'lodash-es';
|
|
57
56
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
58
57
|
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
59
58
|
import * as i6$1 from '@angular/cdk/a11y';
|
|
@@ -3035,17 +3034,17 @@ class CustomValueColumnModel extends ColumnModel {
|
|
|
3035
3034
|
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => new ColumnTextSearchFormatter.Null()), row => this.getValue(row));
|
|
3036
3035
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
3037
3036
|
if (firstTime) {
|
|
3038
|
-
if (isFunction(onComponentInitOrOptions)) {
|
|
3037
|
+
if (isFunction$1(onComponentInitOrOptions)) {
|
|
3039
3038
|
onComponentInitOrOptions(component);
|
|
3040
3039
|
}
|
|
3041
3040
|
else {
|
|
3042
|
-
if (isFunction(onComponentInitOrOptions?.onComponentInit)) {
|
|
3041
|
+
if (isFunction$1(onComponentInitOrOptions?.onComponentInit)) {
|
|
3043
3042
|
onComponentInitOrOptions.onComponentInit(component);
|
|
3044
3043
|
}
|
|
3045
3044
|
}
|
|
3046
3045
|
}
|
|
3047
3046
|
component.value = this.getValue(rowData.row);
|
|
3048
|
-
if (!isFunction(onComponentInitOrOptions) && isFunction(onComponentInitOrOptions?.onRowUpdate)) {
|
|
3047
|
+
if (!isFunction$1(onComponentInitOrOptions) && isFunction$1(onComponentInitOrOptions?.onRowUpdate)) {
|
|
3049
3048
|
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
3050
3049
|
}
|
|
3051
3050
|
}));
|
|
@@ -3092,7 +3091,7 @@ class ListPropertyColumnModel extends ColumnModel {
|
|
|
3092
3091
|
}
|
|
3093
3092
|
cellEditor(editor, validatorsOrInitialiser, initialiseComponent) {
|
|
3094
3093
|
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
3095
|
-
const initialiser = isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
3094
|
+
const initialiser = isFunction$1(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
3096
3095
|
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
3097
3096
|
const formListModel = editSession.form.pluckList(this.property);
|
|
3098
3097
|
if (validators) {
|
|
@@ -3126,11 +3125,11 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3126
3125
|
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => ColumnTextSearchFormatter.forFormatter(value => this._format(value))), row => row[this.property]);
|
|
3127
3126
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
3128
3127
|
if (firstTime) {
|
|
3129
|
-
if (isFunction(onComponentInitOrOptions)) {
|
|
3128
|
+
if (isFunction$1(onComponentInitOrOptions)) {
|
|
3130
3129
|
onComponentInitOrOptions(component);
|
|
3131
3130
|
}
|
|
3132
3131
|
else {
|
|
3133
|
-
if (isFunction(onComponentInitOrOptions?.onComponentInit)) {
|
|
3132
|
+
if (isFunction$1(onComponentInitOrOptions?.onComponentInit)) {
|
|
3134
3133
|
onComponentInitOrOptions.onComponentInit(component);
|
|
3135
3134
|
}
|
|
3136
3135
|
}
|
|
@@ -3154,7 +3153,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3154
3153
|
component[ColumnModel.CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
3155
3154
|
let disableEditCallback = false;
|
|
3156
3155
|
if (firstTime) {
|
|
3157
|
-
if (isFunction(options?.onComponentInit)) {
|
|
3156
|
+
if (isFunction$1(options?.onComponentInit)) {
|
|
3158
3157
|
options.onComponentInit(component);
|
|
3159
3158
|
}
|
|
3160
3159
|
// install our edit callback
|
|
@@ -3169,7 +3168,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3169
3168
|
disableEditCallback = true;
|
|
3170
3169
|
component.value = rowData.row[this.property];
|
|
3171
3170
|
disableEditCallback = false;
|
|
3172
|
-
if (!isFunction(options) && isFunction(options?.onRowUpdate)) {
|
|
3171
|
+
if (!isFunction$1(options) && isFunction$1(options?.onRowUpdate)) {
|
|
3173
3172
|
options.onRowUpdate(component, rowData.row);
|
|
3174
3173
|
}
|
|
3175
3174
|
}));
|
|
@@ -3177,7 +3176,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3177
3176
|
}
|
|
3178
3177
|
cellEditor(editor, validatorsOrInitialiser, onComponentInit) {
|
|
3179
3178
|
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
3180
|
-
const initialiser = isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;
|
|
3179
|
+
const initialiser = isFunction$1(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;
|
|
3181
3180
|
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
3182
3181
|
const formValueModel = editSession.form.pluck(this.property);
|
|
3183
3182
|
if (validators) {
|
|
@@ -3266,7 +3265,7 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3266
3265
|
this._editorSessionByRowId = chain(this._editorSessions).indexBy("rowId");
|
|
3267
3266
|
this.editing$ = chain(this._editorSessions).count().isGreaterThan(0);
|
|
3268
3267
|
this._textSearchPredicate$ = chain(this._searchText$).map(text => {
|
|
3269
|
-
return
|
|
3268
|
+
return isEmpty$1(text) ? Functions.identity : (rows) => {
|
|
3270
3269
|
const regex = new RegExp(escapeStringRegexp(text), "i");
|
|
3271
3270
|
return rows.filter(row => this.hasMatchingColumn(row, regex));
|
|
3272
3271
|
};
|
|
@@ -3339,14 +3338,14 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3339
3338
|
this.selectionColumnModel = new SelectionColumnModel(columnId, () => this.getColumnTextProperties(columnId), selectionModel);
|
|
3340
3339
|
this.addRowClass("aup-row-selected", row => this.selectionColumnModel.isSelected(row));
|
|
3341
3340
|
const selectionColumnModel = this.addColumn(this.selectionColumnModel, 0);
|
|
3342
|
-
if (!isNil(visible)) {
|
|
3341
|
+
if (!isNil$1(visible)) {
|
|
3343
3342
|
selectionColumnModel.visibleWhile(visible instanceof ValueModel ? visible : ValueModel.constant(visible));
|
|
3344
3343
|
}
|
|
3345
3344
|
return selectionColumnModel;
|
|
3346
3345
|
}
|
|
3347
3346
|
addEditControls(saveCommandFactory, formFactory) {
|
|
3348
3347
|
this.saveCommandFactory = saveCommandFactory;
|
|
3349
|
-
if (isFunction(formFactory)) {
|
|
3348
|
+
if (isFunction$1(formFactory)) {
|
|
3350
3349
|
this._createForm = formFactory;
|
|
3351
3350
|
}
|
|
3352
3351
|
const columnId = "editControls";
|
|
@@ -5363,7 +5362,7 @@ class AbstractDialogComponent extends Activity {
|
|
|
5363
5362
|
}
|
|
5364
5363
|
isDestructive() {
|
|
5365
5364
|
// @ts-ignore
|
|
5366
|
-
return isFunction(this.config['destructive']) && this.config.destructive();
|
|
5365
|
+
return isFunction$1(this.config['destructive']) && this.config.destructive();
|
|
5367
5366
|
}
|
|
5368
5367
|
}
|
|
5369
5368
|
AbstractDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AbstractDialogComponent, deps: [{ token: ALERT_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|