@firestitch/list 18.0.59 → 18.0.61
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/app/classes/columns-controller.d.ts +1 -2
- package/app/interfaces/listconfig.interface.d.ts +1 -0
- package/esm2022/app/classes/columns-controller.mjs +24 -23
- package/esm2022/app/components/list/list.component.mjs +3 -2
- package/esm2022/app/interfaces/listconfig.interface.mjs +1 -1
- package/esm2022/app/models/column.model.mjs +3 -2
- package/fesm2022/firestitch-list.mjs +27 -24
- package/fesm2022/firestitch-list.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1934,7 +1934,8 @@ class Column {
|
|
|
1934
1934
|
if (!isObject(defaults)) {
|
|
1935
1935
|
defaults = {};
|
|
1936
1936
|
}
|
|
1937
|
-
allowedDefaults
|
|
1937
|
+
allowedDefaults
|
|
1938
|
+
.forEach((key) => {
|
|
1938
1939
|
switch (key) {
|
|
1939
1940
|
case 'title':
|
|
1940
1941
|
{
|
|
@@ -3097,8 +3098,8 @@ class ColumnsController {
|
|
|
3097
3098
|
_theadClass = '';
|
|
3098
3099
|
_loadFn;
|
|
3099
3100
|
_changeFn;
|
|
3101
|
+
_initFn;
|
|
3100
3102
|
_isConfigured = false;
|
|
3101
|
-
_changeFnConfigured = false;
|
|
3102
3103
|
_columnsFetched = false;
|
|
3103
3104
|
_hasHeader = false;
|
|
3104
3105
|
_hasFooter = false;
|
|
@@ -3108,7 +3109,6 @@ class ColumnsController {
|
|
|
3108
3109
|
_destroy$ = new Subject();
|
|
3109
3110
|
constructor(_persistance) {
|
|
3110
3111
|
this._persistance = _persistance;
|
|
3111
|
-
this._loadFn = () => of([]);
|
|
3112
3112
|
}
|
|
3113
3113
|
get columns() {
|
|
3114
3114
|
return this._columns.slice();
|
|
@@ -3146,9 +3146,6 @@ class ColumnsController {
|
|
|
3146
3146
|
get configured() {
|
|
3147
3147
|
return this._isConfigured;
|
|
3148
3148
|
}
|
|
3149
|
-
get changeFnConfigured() {
|
|
3150
|
-
return this._changeFnConfigured;
|
|
3151
|
-
}
|
|
3152
3149
|
get changeFn() {
|
|
3153
3150
|
return this._changeFn;
|
|
3154
3151
|
}
|
|
@@ -3165,16 +3162,16 @@ class ColumnsController {
|
|
|
3165
3162
|
* @param config
|
|
3166
3163
|
*/
|
|
3167
3164
|
initConfig(config) {
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3165
|
+
this._loadFn = config?.load ? config.load : () => {
|
|
3166
|
+
return of(this._persistance.columnsEnabled ? this._persistance.getColumns() : []);
|
|
3167
|
+
};
|
|
3168
|
+
this._changeFn = config?.change ? config.change : () => {
|
|
3169
|
+
//
|
|
3170
|
+
};
|
|
3171
|
+
this._initFn = config?.init ? config.init : () => {
|
|
3172
|
+
//
|
|
3173
|
+
};
|
|
3174
|
+
this._isConfigured = !!config;
|
|
3178
3175
|
}
|
|
3179
3176
|
/**
|
|
3180
3177
|
* Base initialization for columns
|
|
@@ -3206,14 +3203,18 @@ class ColumnsController {
|
|
|
3206
3203
|
*/
|
|
3207
3204
|
loadRemoteColumnConfigs() {
|
|
3208
3205
|
return this._loadFn()
|
|
3209
|
-
.pipe(tap((
|
|
3206
|
+
.pipe(tap((columns) => {
|
|
3210
3207
|
this._columnsFetched = true;
|
|
3211
|
-
this.updateVisibilityForCols(
|
|
3212
|
-
this.updateCustomizableForCols(
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3208
|
+
this.updateVisibilityForCols(columns);
|
|
3209
|
+
this.updateCustomizableForCols(columns);
|
|
3210
|
+
this._initFn(this._columns
|
|
3211
|
+
.filter((column) => column.customizable && !!column.name)
|
|
3212
|
+
.map((column) => {
|
|
3213
|
+
return {
|
|
3214
|
+
name: column.name,
|
|
3215
|
+
show: column.visible,
|
|
3216
|
+
};
|
|
3217
|
+
}));
|
|
3217
3218
|
}), takeUntil(this._destroy$));
|
|
3218
3219
|
}
|
|
3219
3220
|
/**
|
|
@@ -3254,6 +3255,7 @@ class ColumnsController {
|
|
|
3254
3255
|
this._defaultConfigs = undefined;
|
|
3255
3256
|
this._loadFn = undefined;
|
|
3256
3257
|
this._changeFn = undefined;
|
|
3258
|
+
this._initFn = undefined;
|
|
3257
3259
|
}
|
|
3258
3260
|
_listenColumnVisibilityUpdates() {
|
|
3259
3261
|
this._columnsUpdated$.next(null);
|
|
@@ -5782,7 +5784,8 @@ class FsListComponent {
|
|
|
5782
5784
|
if (actionClickFn) {
|
|
5783
5785
|
actionClickFn(null);
|
|
5784
5786
|
}
|
|
5785
|
-
this._dialog
|
|
5787
|
+
this._dialog
|
|
5788
|
+
.open(CustomizeColsDialogComponent, {
|
|
5786
5789
|
autoFocus: false,
|
|
5787
5790
|
injector: this._injector,
|
|
5788
5791
|
data: {
|