@coolon/angular-ui-powerups 13.6.4 → 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/forms/string-input/string-input.component.mjs +2 -2
- 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 +16 -17
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +16 -17
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/package.json +4 -5
|
@@ -43,15 +43,14 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
|
43
43
|
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, __awaiter } from 'tslib';
|
|
46
|
-
import
|
|
47
|
-
import { isEmpty, isString, isFunction, isNil, isInteger, isEqual, uniq, first, findLast, isObject, isNumber, isNaN as isNaN$1 } from 'lodash';
|
|
46
|
+
import { isEmpty, isString, isFunction, isNil, isInteger, isEqual, uniq, first, isObject, isNumber, isNaN as isNaN$1 } from 'lodash';
|
|
48
47
|
import * as i1$2 from '@angular/platform-browser';
|
|
49
48
|
import { marked } from 'marked';
|
|
50
49
|
import { lang as lang$1, assert as assert$1, Stringy, Klass, Opts } from '@coolon/typescript-utilities';
|
|
51
50
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator';
|
|
52
51
|
import { Enum } from 'typescript-string-enums';
|
|
53
52
|
import * as i3 from '@angular/material/core';
|
|
54
|
-
import {
|
|
53
|
+
import { isFunction as isFunction$1, isEmpty as isEmpty$1, isNil as isNil$1, findLast } from 'lodash-es';
|
|
55
54
|
import escapeStringRegexp from 'escape-string-regexp';
|
|
56
55
|
import produce from 'immer';
|
|
57
56
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
@@ -2110,7 +2109,7 @@ class StringInputComponent extends AbstractValueInputComponent {
|
|
|
2110
2109
|
super();
|
|
2111
2110
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
2112
2111
|
this.clearCommand = Command.create(() => {
|
|
2113
|
-
this.componentValueModel.value =
|
|
2112
|
+
this.componentValueModel.value = "";
|
|
2114
2113
|
});
|
|
2115
2114
|
this.clearCommand.disableWhile(chain.stringValue(this.componentValueModel).isBlank());
|
|
2116
2115
|
}
|
|
@@ -3234,17 +3233,17 @@ class CustomValueColumnModel extends ColumnModel {
|
|
|
3234
3233
|
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => new ColumnTextSearchFormatter.Null()), row => this.getValue(row));
|
|
3235
3234
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
3236
3235
|
if (firstTime) {
|
|
3237
|
-
if (isFunction(onComponentInitOrOptions)) {
|
|
3236
|
+
if (isFunction$1(onComponentInitOrOptions)) {
|
|
3238
3237
|
onComponentInitOrOptions(component);
|
|
3239
3238
|
}
|
|
3240
3239
|
else {
|
|
3241
|
-
if (isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
3240
|
+
if (isFunction$1(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
3242
3241
|
onComponentInitOrOptions.onComponentInit(component);
|
|
3243
3242
|
}
|
|
3244
3243
|
}
|
|
3245
3244
|
}
|
|
3246
3245
|
component.value = this.getValue(rowData.row);
|
|
3247
|
-
if (!isFunction(onComponentInitOrOptions) && isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
3246
|
+
if (!isFunction$1(onComponentInitOrOptions) && isFunction$1(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
3248
3247
|
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
3249
3248
|
}
|
|
3250
3249
|
}));
|
|
@@ -3291,7 +3290,7 @@ class ListPropertyColumnModel extends ColumnModel {
|
|
|
3291
3290
|
}
|
|
3292
3291
|
cellEditor(editor, validatorsOrInitialiser, initialiseComponent) {
|
|
3293
3292
|
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
3294
|
-
const initialiser = isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
3293
|
+
const initialiser = isFunction$1(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
3295
3294
|
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
3296
3295
|
const formListModel = editSession.form.pluckList(this.property);
|
|
3297
3296
|
if (validators) {
|
|
@@ -3325,11 +3324,11 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3325
3324
|
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => ColumnTextSearchFormatter.forFormatter(value => this._format(value))), row => row[this.property]);
|
|
3326
3325
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
3327
3326
|
if (firstTime) {
|
|
3328
|
-
if (isFunction(onComponentInitOrOptions)) {
|
|
3327
|
+
if (isFunction$1(onComponentInitOrOptions)) {
|
|
3329
3328
|
onComponentInitOrOptions(component);
|
|
3330
3329
|
}
|
|
3331
3330
|
else {
|
|
3332
|
-
if (isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
3331
|
+
if (isFunction$1(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
3333
3332
|
onComponentInitOrOptions.onComponentInit(component);
|
|
3334
3333
|
}
|
|
3335
3334
|
}
|
|
@@ -3353,7 +3352,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3353
3352
|
component[ColumnModel.CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
3354
3353
|
let disableEditCallback = false;
|
|
3355
3354
|
if (firstTime) {
|
|
3356
|
-
if (isFunction(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
|
|
3355
|
+
if (isFunction$1(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
|
|
3357
3356
|
options.onComponentInit(component);
|
|
3358
3357
|
}
|
|
3359
3358
|
// install our edit callback
|
|
@@ -3368,7 +3367,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3368
3367
|
disableEditCallback = true;
|
|
3369
3368
|
component.value = rowData.row[this.property];
|
|
3370
3369
|
disableEditCallback = false;
|
|
3371
|
-
if (!isFunction(options) && isFunction(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
|
|
3370
|
+
if (!isFunction$1(options) && isFunction$1(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
|
|
3372
3371
|
options.onRowUpdate(component, rowData.row);
|
|
3373
3372
|
}
|
|
3374
3373
|
}));
|
|
@@ -3376,7 +3375,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3376
3375
|
}
|
|
3377
3376
|
cellEditor(editor, validatorsOrInitialiser, onComponentInit) {
|
|
3378
3377
|
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
3379
|
-
const initialiser = isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;
|
|
3378
|
+
const initialiser = isFunction$1(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;
|
|
3380
3379
|
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
3381
3380
|
const formValueModel = editSession.form.pluck(this.property);
|
|
3382
3381
|
if (validators) {
|
|
@@ -3486,7 +3485,7 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3486
3485
|
this._editorSessionByRowId = chain(this._editorSessions).indexBy("rowId");
|
|
3487
3486
|
this.editing$ = chain(this._editorSessions).count().isGreaterThan(0);
|
|
3488
3487
|
this._textSearchPredicate$ = chain(this._searchText$).map(text => {
|
|
3489
|
-
return
|
|
3488
|
+
return isEmpty$1(text) ? Functions.identity : (rows) => {
|
|
3490
3489
|
const regex = new RegExp(escapeStringRegexp(text), "i");
|
|
3491
3490
|
return rows.filter(row => this.hasMatchingColumn(row, regex));
|
|
3492
3491
|
};
|
|
@@ -3559,14 +3558,14 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3559
3558
|
this.selectionColumnModel = new SelectionColumnModel(columnId, () => this.getColumnTextProperties(columnId), selectionModel);
|
|
3560
3559
|
this.addRowClass("aup-row-selected", row => this.selectionColumnModel.isSelected(row));
|
|
3561
3560
|
const selectionColumnModel = this.addColumn(this.selectionColumnModel, 0);
|
|
3562
|
-
if (!isNil(visible)) {
|
|
3561
|
+
if (!isNil$1(visible)) {
|
|
3563
3562
|
selectionColumnModel.visibleWhile(visible instanceof ValueModel ? visible : ValueModel.constant(visible));
|
|
3564
3563
|
}
|
|
3565
3564
|
return selectionColumnModel;
|
|
3566
3565
|
}
|
|
3567
3566
|
addEditControls(saveCommandFactory, formFactory) {
|
|
3568
3567
|
this.saveCommandFactory = saveCommandFactory;
|
|
3569
|
-
if (isFunction(formFactory)) {
|
|
3568
|
+
if (isFunction$1(formFactory)) {
|
|
3570
3569
|
this._createForm = formFactory;
|
|
3571
3570
|
}
|
|
3572
3571
|
const columnId = "editControls";
|
|
@@ -5408,7 +5407,7 @@ class AbstractDialogComponent extends Activity {
|
|
|
5408
5407
|
}
|
|
5409
5408
|
isDestructive() {
|
|
5410
5409
|
// @ts-ignore
|
|
5411
|
-
return isFunction(this.config['destructive']) && this.config.destructive();
|
|
5410
|
+
return isFunction$1(this.config['destructive']) && this.config.destructive();
|
|
5412
5411
|
}
|
|
5413
5412
|
}
|
|
5414
5413
|
AbstractDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AbstractDialogComponent, deps: [{ token: ALERT_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|