@mediusinc/mng-commons 7.0.0-rc.3 → 7.0.0-rc.5
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/fesm2022/mediusinc-mng-commons-core.mjs +62 -74
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form-api.mjs +30 -149
- package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +103 -102
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-CxaQlGO0.mjs +30 -0
- package/fesm2022/{mediusinc-mng-commons-table-column-toggle.component-DnEnjeJ9.mjs.map → mediusinc-mng-commons-table-column-toggle.component-CxaQlGO0.mjs.map} +1 -1
- package/fesm2022/{mediusinc-mng-commons-table-mediusinc-mng-commons-table-BuhoFRkG.mjs → mediusinc-mng-commons-table-mediusinc-mng-commons-table-CCsLTFuJ.mjs} +118 -97
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-CCsLTFuJ.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons-table.mjs +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +14 -33
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +159 -170
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/package.json +22 -22
- package/{core/index.d.ts → types/mediusinc-mng-commons-core.d.ts} +1 -12
- package/{form/api/index.d.ts → types/mediusinc-mng-commons-form-api.d.ts} +12 -58
- package/{form/index.d.ts → types/mediusinc-mng-commons-form.d.ts} +2 -0
- package/{table/index.d.ts → types/mediusinc-mng-commons-table.d.ts} +20 -2
- package/{tableview/api/index.d.ts → types/mediusinc-mng-commons-tableview-api.d.ts} +4 -14
- package/{tableview/index.d.ts → types/mediusinc-mng-commons-tableview.d.ts} +9 -11
- package/version-info.json +6 -6
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-DnEnjeJ9.mjs +0 -30
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-BuhoFRkG.mjs.map +0 -1
- /package/{filter/index.d.ts → types/mediusinc-mng-commons-filter.d.ts} +0 -0
- /package/{model/class/index.d.ts → types/mediusinc-mng-commons-model-class.d.ts} +0 -0
- /package/{model/index.d.ts → types/mediusinc-mng-commons-model.d.ts} +0 -0
- /package/{table/api/class/index.d.ts → types/mediusinc-mng-commons-table-api-class.d.ts} +0 -0
- /package/{table/api/index.d.ts → types/mediusinc-mng-commons-table-api.d.ts} +0 -0
- /package/{tableview/api/class/index.d.ts → types/mediusinc-mng-commons-tableview-api-class.d.ts} +0 -0
- /package/{index.d.ts → types/mediusinc-mng-commons.d.ts} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as ADataListService, C as COMMONS_TABLE_FEATURE_CONFIG_IT, F as FilterService,
|
|
1
|
+
export { A as ADataListService, C as COMMONS_TABLE_FEATURE_CONFIG_IT, F as FilterService, y as FilterValuePipe, L as LocaleDefaultRowClassPipe, c as TableColumnValueComponent, h as TableComponent, B as TableDataService, d as TableFilterActiveTagComponent, z as TableFilterClassPipe, b as TableFilterComponent, e as TableFilterFormComponent, f as TableHeaderWithFiltersComponent, g as TableHeaderWithFiltersTemplateDirective, i as TableTemplateDirective, s as createFilterDescriptorsFromGeneric, p as filterAdjustDisplayValueOnMatchModeChange, o as filterApplySerializationConfigToCmp, n as filterAreDatesEqual, j as filterGenerateMatchModeOptions, q as filterGetDateConfig, k as filterGetDefaultMatchMode, r as filterGetNumberConfig, l as filterSetStateOnChange, m as filterSetStateOnDisplayChange, x as generateTableLayoutPrefsKey, t as isFilterValueBlank, E as provideTableChild, v as tableCreateFilterState, w as tableCreateSortState, u as tableNotificationError, D as withTable } from './mediusinc-mng-commons-table-mediusinc-mng-commons-table-CCsLTFuJ.mjs';
|
|
2
2
|
//# sourceMappingURL=mediusinc-mng-commons-table.mjs.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { of, Subject, isObservable, throwError, map, tap } from 'rxjs';
|
|
2
|
-
import {
|
|
2
|
+
import { CommonsInternalError, DataProviderInst, LoggerService, findReflectTypeName, StyleSizeEnum, ACommonsErrorBase, toObservable, objectDeepCopy, fromEnumValuesAsValueArray, fromEnumConstantsAsValueArray, getEnumConstantName, GetterPipe, copyDataListParams } from '@mediusinc/mng-commons/core';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { InjectionToken, Input, Directive, inject, Injector } from '@angular/core';
|
|
5
5
|
import { LookupDataProviderInst } from '@mediusinc/mng-commons/form/api';
|
|
6
6
|
import { TableSizeEnum, TableDataProviderInst, TableDescriptorInst, TableDynamicDescriptorInst } from '@mediusinc/mng-commons/table/api';
|
|
7
7
|
import { model, ModelDescriptor } from '@mediusinc/mng-commons/model';
|
|
8
|
-
import '@angular/forms';
|
|
9
8
|
import { FieldType } from '@ngx-formly/core';
|
|
10
9
|
import { ActivatedRoute } from '@angular/router';
|
|
11
10
|
import { TranslateService } from '@ngx-translate/core';
|
|
@@ -42,7 +41,6 @@ class ActionDescriptorInst {
|
|
|
42
41
|
this._type = ActionTypeEnum.Direct;
|
|
43
42
|
this._activationTrigger = ActionActivationTriggerEnum.OnClick;
|
|
44
43
|
this._position = ActionPositionEnum.ToolbarRight;
|
|
45
|
-
this._level = StyleLevelEnum.Default;
|
|
46
44
|
this._routeUrl = null;
|
|
47
45
|
// multiple row selection
|
|
48
46
|
this._hasItemsSelection = false;
|
|
@@ -229,14 +227,14 @@ class ActionDescriptorInst {
|
|
|
229
227
|
this._button = button;
|
|
230
228
|
return this;
|
|
231
229
|
}
|
|
232
|
-
withButton(label, icon = null,
|
|
230
|
+
withButton(label, icon = null, severity) {
|
|
233
231
|
this._button = {
|
|
234
232
|
...this._button,
|
|
235
233
|
label,
|
|
236
234
|
icon,
|
|
237
235
|
style: {
|
|
238
236
|
...this._button?.style,
|
|
239
|
-
|
|
237
|
+
severity: severity
|
|
240
238
|
}
|
|
241
239
|
};
|
|
242
240
|
return this;
|
|
@@ -282,7 +280,6 @@ class ActionDescriptorInst {
|
|
|
282
280
|
descriptor._type = this._type;
|
|
283
281
|
descriptor._activationTrigger = this._activationTrigger;
|
|
284
282
|
descriptor._position = this._position;
|
|
285
|
-
descriptor._level = this._level;
|
|
286
283
|
descriptor._positionTableviewCategories = this._positionTableviewCategories ? [...this._positionTableviewCategories] : undefined;
|
|
287
284
|
descriptor._tableviewCategory = this._tableviewCategory;
|
|
288
285
|
descriptor._routeUrl = this._routeUrl;
|
|
@@ -684,7 +681,7 @@ class ActionEditorSubmitDescriptorInst extends ActionDescriptorInst {
|
|
|
684
681
|
function actionEditorSubmit(editorAction, submitType = ActionEditorSubmitTypeEnum.Submit) {
|
|
685
682
|
return new ActionEditorSubmitDescriptorInst(editorAction.actionName, editorAction.model, submitType).withButtonOpts({
|
|
686
683
|
style: {
|
|
687
|
-
|
|
684
|
+
severity: editorAction.button?.style?.severity
|
|
688
685
|
}
|
|
689
686
|
});
|
|
690
687
|
}
|
|
@@ -696,8 +693,8 @@ function actionEditorSubmit(editorAction, submitType = ActionEditorSubmitTypeEnu
|
|
|
696
693
|
function actionEditorCancel(editorAction, submitType = ActionEditorSubmitTypeEnum.Cancel) {
|
|
697
694
|
return new ActionEditorSubmitDescriptorInst(editorAction.actionName, editorAction.model, submitType).withButtonOpts({
|
|
698
695
|
style: {
|
|
699
|
-
|
|
700
|
-
|
|
696
|
+
text: true,
|
|
697
|
+
severity: 'secondary'
|
|
701
698
|
}
|
|
702
699
|
});
|
|
703
700
|
}
|
|
@@ -1623,14 +1620,14 @@ class FieldActionDescriptor extends AFieldDescriptor {
|
|
|
1623
1620
|
get wrappers() {
|
|
1624
1621
|
return this._wrappers;
|
|
1625
1622
|
}
|
|
1626
|
-
withButton(label, icon = null,
|
|
1623
|
+
withButton(label, icon = null, severity) {
|
|
1627
1624
|
this._button = {
|
|
1628
1625
|
...this._button,
|
|
1629
1626
|
label,
|
|
1630
1627
|
icon,
|
|
1631
1628
|
style: {
|
|
1632
1629
|
...this._button?.style,
|
|
1633
|
-
|
|
1630
|
+
severity: severity
|
|
1634
1631
|
}
|
|
1635
1632
|
};
|
|
1636
1633
|
return this;
|
|
@@ -3095,10 +3092,10 @@ class AFormlyCustomFieldComponent extends FieldType {
|
|
|
3095
3092
|
get formState() {
|
|
3096
3093
|
return this._formState;
|
|
3097
3094
|
}
|
|
3098
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3099
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
3095
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AFormlyCustomFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3096
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: AFormlyCustomFieldComponent, isStandalone: true, inputs: { field: "field", _model: ["model", "_model"], _form: ["form", "_form"], _options: ["options", "_options"], _key: ["key", "_key"], _formControl: ["formControl", "_formControl"], _props: ["props", "_props"], _showError: ["showError", "_showError"], _id: ["id", "_id"], _formState: ["formState", "_formState"] }, usesInheritance: true, ngImport: i0 }); }
|
|
3100
3097
|
}
|
|
3101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3098
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AFormlyCustomFieldComponent, decorators: [{
|
|
3102
3099
|
type: Directive
|
|
3103
3100
|
}], propDecorators: { field: [{
|
|
3104
3101
|
type: Input,
|
|
@@ -3827,7 +3824,7 @@ function tableviewActionEditOnDetails(model, opts) {
|
|
|
3827
3824
|
.withButtonOpts({
|
|
3828
3825
|
icon: 'pi pi-pencil',
|
|
3829
3826
|
style: {
|
|
3830
|
-
|
|
3827
|
+
severity: 'secondary'
|
|
3831
3828
|
}
|
|
3832
3829
|
});
|
|
3833
3830
|
return linkAction;
|
|
@@ -3845,7 +3842,7 @@ function tableviewActionDeleteOnTable(model, opts) {
|
|
|
3845
3842
|
icon: 'pi pi-trash',
|
|
3846
3843
|
style: {
|
|
3847
3844
|
size: StyleSizeEnum.Small,
|
|
3848
|
-
|
|
3845
|
+
severity: 'danger'
|
|
3849
3846
|
}
|
|
3850
3847
|
})
|
|
3851
3848
|
.withPosition(opts?.position ?? ActionPositionEnum.RowInline)
|
|
@@ -3962,7 +3959,7 @@ function tableviewActionRefreshOnTable(descriptor, opts) {
|
|
|
3962
3959
|
.withButtonOpts({
|
|
3963
3960
|
icon: 'pi pi-refresh',
|
|
3964
3961
|
style: {
|
|
3965
|
-
|
|
3962
|
+
severity: 'secondary'
|
|
3966
3963
|
}
|
|
3967
3964
|
});
|
|
3968
3965
|
return action;
|
|
@@ -4171,22 +4168,6 @@ class TableviewInputBuilder {
|
|
|
4171
4168
|
}
|
|
4172
4169
|
return this;
|
|
4173
4170
|
}
|
|
4174
|
-
/**
|
|
4175
|
-
* Adds a custom action.
|
|
4176
|
-
*
|
|
4177
|
-
* @deprecated Use on of {withActionOnTable}, {withActionOnDetailsEditor}, {withActionOnEditEditor} or {withActionOnAddEditor} instead.
|
|
4178
|
-
*
|
|
4179
|
-
* @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunInput, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.
|
|
4180
|
-
* @typeParam ActionService - The service type (same as build `Service` by default).
|
|
4181
|
-
* @returns {this} - Returns the current instance of the builder.
|
|
4182
|
-
*/
|
|
4183
|
-
withAction(fn) {
|
|
4184
|
-
const action = fn(this.prepareSetterParams());
|
|
4185
|
-
if (action) {
|
|
4186
|
-
this._customActions.push(action);
|
|
4187
|
-
}
|
|
4188
|
-
return this;
|
|
4189
|
-
}
|
|
4190
4171
|
/**
|
|
4191
4172
|
* Adds a custom action on table row or top (header or toolbar).
|
|
4192
4173
|
*
|