@mediusinc/mng-commons 5.0.0-rc.0 → 5.0.0-rc.1
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/core/data-list/data-list-params-helpers.d.ts +82 -0
- package/core/descriptors/action.descriptor.d.ts +3 -3
- package/core/descriptors/column.descriptor.d.ts +1 -1
- package/core/descriptors/editor.descriptor.d.ts +6 -6
- package/core/descriptors/enum.descriptor.d.ts +6 -0
- package/core/descriptors/filter.descriptor.d.ts +1 -1
- package/core/descriptors/model.descriptor.d.ts +1 -1
- package/core/descriptors/table.descriptor.d.ts +6 -6
- package/core/descriptors/tableview.descriptor.d.ts +10 -10
- package/core/enum/enum-helpers.d.ts +49 -0
- package/core/error/error-helpers.d.ts +114 -0
- package/core/helpers/date.d.ts +14 -0
- package/core/helpers/object.d.ts +27 -0
- package/core/helpers/route.d.ts +35 -0
- package/core/helpers/string.d.ts +7 -0
- package/core/helpers/templates.d.ts +3 -0
- package/core/i18n/i18n-common.d.ts +6 -0
- package/core/i18n/i18n-error.d.ts +4 -0
- package/core/i18n/i18n-type.d.ts +20 -0
- package/core/index.d.ts +15 -9
- package/{model → core}/pipes/enum.pipe.d.ts +2 -2
- package/core/pipes/enumerate.pipe.d.ts +3 -3
- package/{model → core}/pipes/i18n-property.pipe.d.ts +2 -2
- package/core/pipes/template.pipe.d.ts +0 -2
- package/core/router/route-builder.d.ts +2 -4
- package/core/router/routes-builder.d.ts +5 -6
- package/core/security/permission-helpers.d.ts +3 -0
- package/core/security/permissions.model.d.ts +2 -2
- package/esm2022/core/components/notification/notification-wrapper.component.mjs +4 -4
- package/esm2022/core/components/pages/error/error.page.component.mjs +3 -3
- package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +3 -3
- package/esm2022/core/data-list/data-list-params-helpers.mjs +415 -0
- package/esm2022/core/data-list/filter-match.model.mjs +1 -1
- package/esm2022/core/data-providers/base.data-provider.mjs +1 -1
- package/esm2022/core/descriptors/action.descriptor.mjs +1 -1
- package/esm2022/core/descriptors/column.descriptor.mjs +1 -1
- package/esm2022/core/descriptors/editor.descriptor.mjs +1 -1
- package/esm2022/core/descriptors/enum.descriptor.mjs +2 -0
- package/esm2022/core/descriptors/filter.descriptor.mjs +1 -1
- package/esm2022/core/descriptors/model.descriptor.mjs +1 -1
- package/esm2022/core/descriptors/table.descriptor.mjs +1 -1
- package/esm2022/core/descriptors/tableview.descriptor.mjs +1 -1
- package/esm2022/core/directives/component.directive.mjs +4 -4
- package/esm2022/core/directives/dialog-keydown-handler.directive.mjs +4 -4
- package/esm2022/core/directives/template.directive.mjs +3 -3
- package/esm2022/core/enum/enum-helpers.mjs +81 -0
- package/esm2022/core/error/error-handler.mjs +3 -3
- package/esm2022/core/error/error-helpers.mjs +247 -0
- package/esm2022/core/helpers/coercion.mjs +1 -1
- package/esm2022/core/helpers/date.mjs +119 -0
- package/esm2022/core/helpers/object.mjs +145 -0
- package/esm2022/core/helpers/route.mjs +58 -0
- package/esm2022/core/helpers/string.mjs +57 -0
- package/esm2022/core/helpers/templates.mjs +4 -0
- package/esm2022/core/i18n/i18n-common.mjs +24 -0
- package/esm2022/core/i18n/i18n-error.mjs +27 -0
- package/esm2022/core/i18n/i18n-type.mjs +79 -0
- package/esm2022/core/index.mjs +17 -11
- package/esm2022/core/log/log-publisher-console.service.mjs +3 -3
- package/esm2022/core/log/logger.service.mjs +3 -3
- package/esm2022/core/pipes/boolean.pipe.mjs +4 -4
- package/esm2022/core/pipes/class-map.pipe.mjs +4 -4
- package/esm2022/core/pipes/enum.pipe.mjs +27 -0
- package/esm2022/core/pipes/enumerate-async.pipe.mjs +8 -8
- package/esm2022/core/pipes/enumerate.pipe.mjs +10 -10
- package/esm2022/core/pipes/getter.pipe.mjs +4 -4
- package/esm2022/core/pipes/i18n-property.pipe.mjs +19 -0
- package/esm2022/core/pipes/json-path.pipe.mjs +6 -6
- package/esm2022/core/pipes/parametrize.pipe.mjs +6 -6
- package/esm2022/core/pipes/template.pipe.mjs +7 -8
- package/esm2022/core/provide.mjs +1 -21
- package/esm2022/core/reflect/type-enum-metadata.mjs +1 -1
- package/esm2022/core/registry/type-registry.mjs +1 -1
- package/esm2022/core/router/route-builder.mjs +8 -24
- package/esm2022/core/router/routes-builder.mjs +17 -16
- package/esm2022/core/security/permission-helpers.mjs +14 -0
- package/esm2022/core/security/permission.guard.mjs +1 -1
- package/esm2022/core/security/permission.service.mjs +6 -6
- package/esm2022/core/security/permissions.model.mjs +1 -1
- package/esm2022/core/services/commons-configuration.service.mjs +6 -6
- package/esm2022/core/services/commons-init.service.mjs +4 -4
- package/esm2022/core/services/commons-router.service.mjs +4 -4
- package/esm2022/core/services/commons.service.mjs +4 -4
- package/esm2022/core/services/local-storage-config.service.mjs +4 -4
- package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +9 -10
- package/esm2022/filter/descriptors/filter.descriptor.mjs +1 -1
- package/esm2022/form/api/data-providers/lookup.data-provider.mjs +1 -1
- package/esm2022/form/api/descriptors/button-style.builder.mjs +1 -1
- package/esm2022/form/components/autocomplete/autocomplete.component.mjs +7 -7
- package/esm2022/form/components/date-range/date-range.component.mjs +4 -4
- package/esm2022/form/components/dropdown/dropdown.component.mjs +7 -7
- package/esm2022/form/directives/input-trim.directive.mjs +4 -4
- package/esm2022/model/descriptors/enum.descriptor.mjs +1 -1
- package/esm2022/model/descriptors/model.descriptor.mjs +4 -4
- package/esm2022/model/helpers/i18n.mjs +45 -0
- package/esm2022/model/helpers/model.mjs +71 -0
- package/esm2022/model/index.mjs +4 -7
- package/esm2022/table/api/data-providers/table.data-provider.mjs +1 -1
- package/esm2022/table/api/descriptors/column.descriptor.mjs +1 -1
- package/esm2022/table/api/descriptors/table.descriptor.mjs +36 -8
- package/esm2022/table/api/helpers/class-attribute-converter.mjs +1 -1
- package/esm2022/table/components/column-filter-full/column-filter-full.component.mjs +9 -9
- package/esm2022/table/components/column-value/column-value.component.mjs +12 -14
- package/esm2022/table/components/table/table.component.mjs +20 -37
- package/esm2022/table/helpers/notification.mjs +4 -4
- package/esm2022/table/pipes/locale-default-row-class.pipe.mjs +4 -4
- package/esm2022/table/pipes/table-column-filter-class.pipe.mjs +4 -4
- package/esm2022/table/services/data-list.service.mjs +3 -3
- package/esm2022/tableview/action/components/action/action.component.mjs +9 -9
- package/esm2022/tableview/action/components/editor/action-editor.component.mjs +4 -4
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +6 -6
- package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +3 -3
- package/esm2022/tableview/action/components/route/action-route.component.mjs +4 -4
- package/esm2022/tableview/action/components/table/action-table.component.mjs +12 -24
- package/esm2022/tableview/action/helpers/i18n.mjs +82 -0
- package/esm2022/tableview/action/helpers/notification.mjs +8 -8
- package/esm2022/tableview/action/helpers/styles.mjs +1 -1
- package/esm2022/tableview/action/models/execution/action-context.model.mjs +1 -1
- package/esm2022/tableview/action/models/execution/action-instance.model.mjs +1 -1
- package/esm2022/tableview/action/services/action-error-mapper.service.mjs +1 -1
- package/esm2022/tableview/action/services/action-executor.service.mjs +9 -8
- package/esm2022/tableview/action/services/component-action-executor.service.mjs +3 -3
- package/esm2022/tableview/action/services/data-provider-executor.service.mjs +3 -3
- package/esm2022/tableview/action/services/navigation.service.mjs +4 -4
- package/esm2022/tableview/action/services/providers/provide-view-container.mjs +1 -1
- package/esm2022/tableview/action/services/root-action-executor.service.mjs +3 -3
- package/esm2022/tableview/action/services/view-container.service.mjs +3 -3
- package/esm2022/tableview/api/action/descriptors/action-confirmation.descriptor.mjs +1 -1
- package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +1 -1
- package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +1 -1
- package/esm2022/tableview/api/action/helpers/data-provider-executors.mjs +1 -1
- package/esm2022/tableview/api/editor/data-providers/editor.data-provider.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/editor.descriptor.mjs +4 -4
- package/esm2022/tableview/api/editor/descriptors/field-action.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field-base.descriptor.mjs +3 -3
- package/esm2022/tableview/api/editor/descriptors/field-group.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field-lookup.descriptor.mjs +8 -8
- package/esm2022/tableview/api/editor/descriptors/field-many.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field.descriptor.mjs +4 -4
- package/esm2022/tableview/api/editor/helpers/class-attribute-converter.mjs +1 -1
- package/esm2022/tableview/api/editor/helpers/field-validators.mjs +1 -1
- package/esm2022/tableview/api/editor/models/editor-fields.model.mjs +1 -1
- package/esm2022/tableview/api/editor/models/formly-custom-field.model.mjs +3 -3
- package/esm2022/tableview/api/tableview/data-providers/tableview.data-provider.mjs +1 -1
- package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +4 -4
- package/esm2022/tableview/api/tableview/helpers/class-attribute-converter.mjs +1 -1
- package/esm2022/tableview/api/tableview/helpers/files-export.mjs +1 -1
- package/esm2022/tableview/api/tableview/helpers/tableview-default-actions.mjs +4 -4
- package/esm2022/tableview/api/tableview/helpers/tableview-input-builder.mjs +1 -1
- package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +9 -9
- package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +7 -7
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +9 -9
- package/esm2022/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +4 -4
- package/esm2022/tableview/editor/helpers/editor-formly.mjs +335 -0
- package/esm2022/tableview/editor/helpers/formly-config.mjs +1 -1
- package/esm2022/tableview/editor/services/formly-config.provider.mjs +1 -1
- package/esm2022/tableview/index.mjs +3 -5
- package/esm2022/tableview/provide.mjs +2 -1
- package/esm2022/tableview/tableview/components/route/tableview-route.component.mjs +3 -3
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +10 -19
- package/esm2022/tableview/tableview/router/tableview-route-builder.mjs +1 -1
- package/fesm2022/mediusinc-mng-commons-core.mjs +1367 -1389
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs +8 -9
- package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +17 -17
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-model.mjs +99 -148
- package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +35 -7
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +48 -65
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +19 -19
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +507 -572
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/filter/descriptors/filter.descriptor.d.ts +2 -2
- package/model/descriptors/model.descriptor.d.ts +2 -2
- package/model/helpers/i18n.d.ts +10 -0
- package/model/helpers/model.d.ts +5 -0
- package/model/index.d.ts +2 -4
- package/package.json +7 -7
- package/table/api/descriptors/table.descriptor.d.ts +10 -0
- package/table/components/column-value/column-value.component.d.ts +3 -4
- package/table/components/table/table.component.d.ts +13 -13
- package/tableview/action/components/table/action-table.component.d.ts +6 -6
- package/tableview/action/helpers/i18n.d.ts +22 -0
- package/tableview/action/models/execution/action-instance-state.model.d.ts +21 -21
- package/tableview/action/services/action-executor.service.d.ts +1 -1
- package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +1 -1
- package/tableview/api/action/descriptors/action.descriptor.d.ts +3 -3
- package/tableview/api/action/models/action.type.d.ts +2 -2
- package/tableview/api/action/models/execution/action-instance-state.model.d.ts +21 -21
- package/tableview/api/editor/descriptors/editor.descriptor.d.ts +2 -2
- package/tableview/api/editor/descriptors/field-action.descriptor.d.ts +2 -2
- package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +5 -5
- package/tableview/api/editor/descriptors/field-group.descriptor.d.ts +4 -4
- package/tableview/api/editor/descriptors/field-lookup.descriptor.d.ts +4 -4
- package/tableview/api/editor/descriptors/field-many.descriptor.d.ts +4 -4
- package/tableview/api/editor/descriptors/field.descriptor.d.ts +2 -2
- package/tableview/api/editor/models/editor-fields.model.d.ts +3 -3
- package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +2 -2
- package/tableview/editor/helpers/editor-formly.d.ts +10 -0
- package/tableview/index.d.ts +2 -2
- package/tableview/tableview/components/tableview/tableview.component.d.ts +5 -5
- package/core/data-list/data-list-params.util.d.ts +0 -84
- package/core/enum/enum.util.d.ts +0 -51
- package/core/error/error.util.d.ts +0 -116
- package/core/security/permission.util.d.ts +0 -5
- package/core/utils/date.util.d.ts +0 -20
- package/core/utils/i18n.util.d.ts +0 -36
- package/core/utils/object.util.d.ts +0 -31
- package/core/utils/route.util.d.ts +0 -37
- package/core/utils/string.util.d.ts +0 -9
- package/esm2022/core/data-list/data-list-params.util.mjs +0 -417
- package/esm2022/core/enum/enum.util.mjs +0 -83
- package/esm2022/core/error/error.util.mjs +0 -249
- package/esm2022/core/security/permission.util.mjs +0 -16
- package/esm2022/core/utils/date.util.mjs +0 -136
- package/esm2022/core/utils/i18n.util.mjs +0 -137
- package/esm2022/core/utils/object.util.mjs +0 -147
- package/esm2022/core/utils/route.util.mjs +0 -60
- package/esm2022/core/utils/string.util.mjs +0 -59
- package/esm2022/model/pipes/enum.pipe.mjs +0 -26
- package/esm2022/model/pipes/i18n-property.pipe.mjs +0 -19
- package/esm2022/model/utils/i18n.util.mjs +0 -51
- package/esm2022/model/utils/model.util.mjs +0 -73
- package/esm2022/tableview/action/utils/i18n.util.mjs +0 -126
- package/esm2022/tableview/editor/utils/editor-formly.util.mjs +0 -337
- package/model/utils/i18n.util.d.ts +0 -15
- package/model/utils/model.util.d.ts +0 -8
- package/tableview/action/utils/i18n.util.d.ts +0 -48
- package/tableview/editor/utils/editor-formly.util.d.ts +0 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FilterMatchModeExtendedType,
|
|
1
|
+
import { FilterMatchModeExtendedType, IFilterDescriptor } from '@mediusinc/mng-commons/core';
|
|
2
2
|
import { InputTrimType } from '@mediusinc/mng-commons/form/api';
|
|
3
3
|
import { FilterTypeEnum } from '../models/filter.model';
|
|
4
|
-
export declare class FilterDescriptor<FilterModel, TableModel> implements
|
|
4
|
+
export declare class FilterDescriptor<FilterModel, TableModel> implements IFilterDescriptor<FilterModel, TableModel> {
|
|
5
5
|
protected readonly _property: string;
|
|
6
6
|
protected _showOnColumn: string;
|
|
7
7
|
protected _filterType: FilterTypeEnum;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClassOptType, ClassType,
|
|
1
|
+
import { ClassOptType, ClassType, IModelDescriptor } from '@mediusinc/mng-commons/core';
|
|
2
2
|
import { TypeDescriptor } from './type.descriptor';
|
|
3
|
-
export declare class ModelDescriptor<Model, ModelClass = ClassOptType<Model>> implements
|
|
3
|
+
export declare class ModelDescriptor<Model, ModelClass = ClassOptType<Model>> implements IModelDescriptor<Model, ModelClass> {
|
|
4
4
|
private readonly _type;
|
|
5
5
|
private readonly _typeName?;
|
|
6
6
|
private _i18nBaseKey;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { KeyOfType } from '@mediusinc/mng-commons/core';
|
|
4
|
+
import { ModelDescriptor } from '../descriptors/model.descriptor';
|
|
5
|
+
export declare function getI18nForModel(translate: TranslateService, model: ModelDescriptor<any>, keyPath: string, customKey?: string, item?: any, fallbackKey?: string, params?: any): string | null;
|
|
6
|
+
export declare function getI18nModelName(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): string | null;
|
|
7
|
+
export declare function getI18nModelNameAsync(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): Observable<string | null>;
|
|
8
|
+
export declare function getI18nModelParams(translate: TranslateService, model?: ModelDescriptor<any>, item?: any, params?: any): any;
|
|
9
|
+
export declare function getI18nModelParamsAsync(translate: TranslateService, model?: ModelDescriptor<any>, item?: any, params?: any): Observable<any>;
|
|
10
|
+
export declare function populateI18nModelParams(idProperty?: KeyOfType, titleProperty?: KeyOfType, item?: any, params?: any): any;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ClassAttributeDef, ClassType, ILookupDescriptor } from '@mediusinc/mng-commons/core';
|
|
2
|
+
export declare function findClassIdAttribute<T>(classType?: ClassType<T>): string | null;
|
|
3
|
+
export declare function findClassTitleAttribute<T>(classType?: ClassType<T>): string | null;
|
|
4
|
+
export declare function getClassAttributeDef<T>(classType?: ClassType<T>): ClassAttributeDef[] | null;
|
|
5
|
+
export declare function trySetLookupItemsProperties<T>(lookup: ILookupDescriptor<T>, idAsTrack?: boolean): void;
|
package/model/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export * from './descriptors/enum.descriptor';
|
|
2
2
|
export * from './descriptors/model.descriptor';
|
|
3
3
|
export * from './descriptors/type.descriptor';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './utils/i18n.util';
|
|
7
|
-
export * from './utils/model.util';
|
|
4
|
+
export * from './helpers/i18n';
|
|
5
|
+
export * from './helpers/model';
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/animations": "^17.
|
|
6
|
-
"@angular/common": "^17.
|
|
7
|
-
"@angular/core": "^17.
|
|
8
|
-
"@angular/forms": "^17.
|
|
9
|
-
"@angular/platform-browser": "^17.
|
|
10
|
-
"@angular/router": "^17.
|
|
5
|
+
"@angular/animations": "^17.3.0",
|
|
6
|
+
"@angular/common": "^17.3.0",
|
|
7
|
+
"@angular/core": "^17.3.0",
|
|
8
|
+
"@angular/forms": "^17.3.0",
|
|
9
|
+
"@angular/platform-browser": "^17.3.0",
|
|
10
|
+
"@angular/router": "^17.3.0",
|
|
11
11
|
"@ngx-formly/core": "^6.3.0",
|
|
12
12
|
"@ngx-translate/core": "^15.0.0",
|
|
13
13
|
"primeng": "^17.12.0"
|
|
@@ -37,6 +37,9 @@ export declare class TableDescriptorInst<TableModel, Sorts = keyof TableModel, F
|
|
|
37
37
|
private _sorts;
|
|
38
38
|
private _isLocalized;
|
|
39
39
|
private _localizationLocaleProperty?;
|
|
40
|
+
private _rowExpandable;
|
|
41
|
+
private _rowExpandableColSpan;
|
|
42
|
+
private _rowExpandableProperty?;
|
|
40
43
|
protected constructor(model: ModelDescriptor<TableModel>, autoGenerated?: boolean);
|
|
41
44
|
get identifier(): string | undefined;
|
|
42
45
|
get trackProperty(): string | undefined;
|
|
@@ -66,6 +69,12 @@ export declare class TableDescriptorInst<TableModel, Sorts = keyof TableModel, F
|
|
|
66
69
|
get headerClassName(): string | undefined;
|
|
67
70
|
get isLocalized(): boolean;
|
|
68
71
|
get localizationLocaleProperty(): string | undefined;
|
|
72
|
+
get rowExpandable(): boolean;
|
|
73
|
+
get rowExpandableColSpan(): number;
|
|
74
|
+
/**
|
|
75
|
+
* This table model property tells us if the specific row should be expandable or not based on row item value
|
|
76
|
+
*/
|
|
77
|
+
get rowExpandableProperty(): string | undefined;
|
|
69
78
|
/**
|
|
70
79
|
* Track property is used for the purpose of combined saving user preferences in localstorage if 2 tables have the same track properties they will share the same localstorage entry.
|
|
71
80
|
* Similarly, this property can also be used to differentiate two tables of the same model on the same url (so that they have separate entries in localstorage).
|
|
@@ -149,6 +158,7 @@ export declare class TableDescriptorInst<TableModel, Sorts = keyof TableModel, F
|
|
|
149
158
|
withHeaderClassName(headerClassName: string): this;
|
|
150
159
|
withLocalized(): this;
|
|
151
160
|
withLocalizationLocaleProperty(localizationLocaleProperty: string): this;
|
|
161
|
+
withRowExpandable(property?: keyof TableModel, colSpan?: number): this;
|
|
152
162
|
protected copyFieldsTo(obj: TableDescriptorInst<any, any, any>): void;
|
|
153
163
|
copy(): TableDescriptorInst<TableModel, Sorts, Filters>;
|
|
154
164
|
/**
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { ElementRef, OnInit } from '@angular/core';
|
|
2
2
|
import { TranslateService } from '@ngx-translate/core';
|
|
3
3
|
import { MessageService } from 'primeng/api';
|
|
4
|
-
import { GetterPipe, TemplatePipe } from '@mediusinc/mng-commons/core';
|
|
5
4
|
import { ColumnDescriptor, ColumnDisplayTypeEnum } from '@mediusinc/mng-commons/table/api';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
export declare class TableColumnValueComponent<T, TT> implements OnInit {
|
|
8
7
|
private elementRef;
|
|
9
8
|
private messageService;
|
|
10
9
|
private translate;
|
|
11
|
-
private getterPipe;
|
|
12
|
-
private templatePipe;
|
|
13
10
|
readonly columnDisplayTypeString: ColumnDisplayTypeEnum;
|
|
14
11
|
readonly columnDisplayTypeNumber: ColumnDisplayTypeEnum;
|
|
15
12
|
readonly columnDisplayTypeCurrency: ColumnDisplayTypeEnum;
|
|
@@ -18,6 +15,8 @@ export declare class TableColumnValueComponent<T, TT> implements OnInit {
|
|
|
18
15
|
readonly columnDisplayTypeEnum: ColumnDisplayTypeEnum;
|
|
19
16
|
readonly columnDisplayTypeComponent: ColumnDisplayTypeEnum;
|
|
20
17
|
readonly columnDisplayTypeHtml: ColumnDisplayTypeEnum;
|
|
18
|
+
private readonly getterPipe;
|
|
19
|
+
private readonly templatePipe;
|
|
21
20
|
descriptor: ColumnDescriptor<T, TT>;
|
|
22
21
|
item: any;
|
|
23
22
|
styleMaxWidth: number | null;
|
|
@@ -25,7 +24,7 @@ export declare class TableColumnValueComponent<T, TT> implements OnInit {
|
|
|
25
24
|
currency?: string;
|
|
26
25
|
jsonPath: string;
|
|
27
26
|
value: any;
|
|
28
|
-
constructor(elementRef: ElementRef, messageService: MessageService, translate: TranslateService
|
|
27
|
+
constructor(elementRef: ElementRef, messageService: MessageService, translate: TranslateService);
|
|
29
28
|
ngOnInit(): void;
|
|
30
29
|
copyToClipboard(event: Event): void;
|
|
31
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableColumnValueComponent<any, any>, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, Signal, SimpleChanges, TemplateRef, Type, WritableSignal } from '@angular/core';
|
|
2
2
|
import { MultiSelectChangeEvent } from 'primeng/multiselect';
|
|
3
3
|
import { Table, TableColumnReorderEvent, TableLazyLoadEvent } from 'primeng/table';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
@@ -7,7 +7,7 @@ import { ColumnDescriptor, ITableDataProvider, TableCellClickEvent, TableDescrip
|
|
|
7
7
|
import { ColumnWithPreferences } from '../../models/column-preferences.model';
|
|
8
8
|
import { DataListService } from '../../services/data-list.service';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class TableComponent<Item = any, Service = undefined, Sorts = any, Filters extends keyof any = any> implements OnInit, OnChanges,
|
|
10
|
+
export declare class TableComponent<Item = any, Service = undefined, Sorts = any, Filters extends keyof any = any> implements OnInit, OnChanges, OnDestroy {
|
|
11
11
|
readonly cmpTypeName = "TableComponent";
|
|
12
12
|
private readonly logger;
|
|
13
13
|
private readonly injector;
|
|
@@ -36,12 +36,13 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
36
36
|
selectionChangeEventEmitter: EventEmitter<Item[]>;
|
|
37
37
|
captionCmpInstEventEmitter: EventEmitter<any>;
|
|
38
38
|
columnCustomLastCmpInstEventEmitter: EventEmitter<any>;
|
|
39
|
-
templates:
|
|
39
|
+
templates: Signal<readonly TemplateDirective[]>;
|
|
40
40
|
components: QueryList<ComponentDirective<any>>;
|
|
41
41
|
primeTable: Table;
|
|
42
|
-
captionTemplate:
|
|
43
|
-
columnCustomLastTemplate:
|
|
44
|
-
footerTemplate:
|
|
42
|
+
captionTemplate: Signal<TemplateRef<any> | null>;
|
|
43
|
+
columnCustomLastTemplate: Signal<TemplateRef<any> | null>;
|
|
44
|
+
footerTemplate: Signal<TemplateRef<any> | null>;
|
|
45
|
+
rowExpandTemplate: Signal<TemplateRef<any> | null>;
|
|
45
46
|
private useDataProvider;
|
|
46
47
|
isLazy: WritableSignal<boolean>;
|
|
47
48
|
isPagination: WritableSignal<boolean>;
|
|
@@ -60,22 +61,21 @@ export declare class TableComponent<Item = any, Service = undefined, Sorts = any
|
|
|
60
61
|
private itemsSubscription?;
|
|
61
62
|
descriptor: WritableSignal<TableDescriptorInst<any, any, any>>;
|
|
62
63
|
columns: WritableSignal<ColumnWithPreferences[]>;
|
|
63
|
-
visibleColumns:
|
|
64
|
-
hasColumnFilters:
|
|
64
|
+
visibleColumns: Signal<ColumnWithPreferences[]>;
|
|
65
|
+
hasColumnFilters: Signal<boolean>;
|
|
65
66
|
private filterDescriptors;
|
|
66
67
|
private defaultParams;
|
|
67
68
|
private isFilterChanged;
|
|
68
69
|
private isSortChanged;
|
|
69
|
-
anyColumnVisible:
|
|
70
|
+
anyColumnVisible: Signal<boolean>;
|
|
70
71
|
hasCustomLastColumn: WritableSignal<boolean>;
|
|
71
|
-
hasLastColumn:
|
|
72
|
-
areColumnsReorderable:
|
|
73
|
-
areColumnsToggleable:
|
|
72
|
+
hasLastColumn: Signal<boolean>;
|
|
73
|
+
areColumnsReorderable: Signal<boolean>;
|
|
74
|
+
areColumnsToggleable: Signal<boolean>;
|
|
74
75
|
private layoutPreferences;
|
|
75
76
|
private localstorageKey;
|
|
76
77
|
private routerIsNavigationOutsideInProgress;
|
|
77
78
|
ngOnInit(): void;
|
|
78
|
-
ngAfterContentInit(): void;
|
|
79
79
|
ngOnChanges(changes: SimpleChanges): void;
|
|
80
80
|
ngOnDestroy(): void;
|
|
81
81
|
reload(emitEvent?: boolean, resetParams?: boolean): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter, OnInit, QueryList, Signal, TemplateRef, Type, WritableSignal } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ComponentDirective, DataListResult, TemplateDirective } from '@mediusinc/mng-commons/core';
|
|
4
4
|
import { TableComponent } from '@mediusinc/mng-commons/table';
|
|
@@ -6,7 +6,7 @@ import { ITableDataProvider, TableCellClickEvent, TableDescriptorInst, TableLoad
|
|
|
6
6
|
import { ActionDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
|
|
7
7
|
import { ActionInstance } from '../../models/execution/action-instance.model';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class ActionTableComponent<Item = any, Service = undefined, Sorts = keyof Item, Filters extends keyof any = keyof Item> implements OnInit
|
|
9
|
+
export declare class ActionTableComponent<Item = any, Service = undefined, Sorts = keyof Item, Filters extends keyof any = keyof Item> implements OnInit {
|
|
10
10
|
private readonly route;
|
|
11
11
|
private readonly actionExecutor;
|
|
12
12
|
private readonly viewContainer;
|
|
@@ -27,16 +27,16 @@ export declare class ActionTableComponent<Item = any, Service = undefined, Sorts
|
|
|
27
27
|
selectionChangeEventEmitter: EventEmitter<Item[]>;
|
|
28
28
|
captionCmpInstEventEmitter: EventEmitter<any>;
|
|
29
29
|
columnActionCmpInstEventEmitter: EventEmitter<any>;
|
|
30
|
-
templates:
|
|
30
|
+
templates: Signal<readonly TemplateDirective[]>;
|
|
31
31
|
components: QueryList<ComponentDirective<any>>;
|
|
32
32
|
table: TableComponent;
|
|
33
|
-
captionTemplate:
|
|
34
|
-
footerTemplate:
|
|
33
|
+
captionTemplate: Signal<TemplateRef<any> | null>;
|
|
34
|
+
footerTemplate: Signal<TemplateRef<any> | null>;
|
|
35
|
+
rowExpandTemplate: Signal<TemplateRef<any> | null>;
|
|
35
36
|
rowClickActions: WritableSignal<ActionDescriptorInst<Item>[]>;
|
|
36
37
|
rowInlineActions: WritableSignal<ActionDescriptorInst<Item>[]>;
|
|
37
38
|
constructor();
|
|
38
39
|
ngOnInit(): void;
|
|
39
|
-
ngAfterContentInit(): void;
|
|
40
40
|
reload(emitEvent?: boolean, resetParams?: boolean): void;
|
|
41
41
|
onCellClick(event: TableCellClickEvent<Item>): void;
|
|
42
42
|
onSelectionChange(items: Array<Item>): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { I18nMissingTranslationStrategy } from '@mediusinc/mng-commons/core';
|
|
4
|
+
import { ActionDescriptorInst, ActionEditorDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
|
|
5
|
+
export declare function getI18nForAction(translate: TranslateService, action: ActionDescriptorInst<any>, actionPathKeys: string | Array<string>, customKey?: string, item?: any, fallbackKey?: string, params?: any, missingTranslationStrategy?: I18nMissingTranslationStrategy): string | null;
|
|
6
|
+
/**
|
|
7
|
+
* Returns async translation for given keys with given params.
|
|
8
|
+
* @param translate TranslateService
|
|
9
|
+
* @param action action descriptor
|
|
10
|
+
* @param actionPathKeys action path keys
|
|
11
|
+
* @param customKey custom key
|
|
12
|
+
* @param item item
|
|
13
|
+
* @param fallbackKey fallback key, used as fallback key
|
|
14
|
+
* @param params additional params for translation
|
|
15
|
+
* @param missingTranslationStrategy strategy when no translation is found
|
|
16
|
+
*/
|
|
17
|
+
export declare function getI18nForActionAsync(translate: TranslateService, action: ActionDescriptorInst<any>, actionPathKeys: string | Array<string>, customKey?: string, item?: any, fallbackKey?: string, params?: any, missingTranslationStrategy?: I18nMissingTranslationStrategy): Observable<string | null>;
|
|
18
|
+
export declare function getI18nActionTitleAsync(translate: TranslateService, action: ActionDescriptorInst<any>, item?: any): Observable<string | null>;
|
|
19
|
+
export declare function getI18nActionEditorTitleAsync(translate: TranslateService, action: ActionEditorDescriptorInst<any>, item?: any): Observable<string | null>;
|
|
20
|
+
export declare function getI18nActionParams(translate: TranslateService, action: ActionDescriptorInst<any>, item?: any, params?: any): any;
|
|
21
|
+
export declare function getI18nActionParamsAsync(translate: TranslateService, action: ActionDescriptorInst<any>, item?: any, params?: any): Observable<any>;
|
|
22
|
+
export declare function populateI18nActionParams(params?: any): any;
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
* States of action. Enums ending with `*Final` are supposed to be final.
|
|
3
3
|
*/
|
|
4
4
|
export declare enum ActionInstanceStateEnum {
|
|
5
|
-
TriggerStart = 0
|
|
5
|
+
TriggerStart = 0,// action was triggered (click or direct)
|
|
6
6
|
TriggerEnd = 1,
|
|
7
|
-
ActivationStart = 2,
|
|
8
|
-
ActivationEnd = 3
|
|
9
|
-
FetchStart = 4
|
|
10
|
-
FetchEnd = 5
|
|
11
|
-
FetchError = 6
|
|
12
|
-
RunConfirmationStart = 7
|
|
13
|
-
RunConfirmationEndAccept = 8
|
|
14
|
-
RunConfirmationEndReject = 9
|
|
15
|
-
RunStart = 10
|
|
16
|
-
RunEnd = 11
|
|
17
|
-
RunError = 12
|
|
18
|
-
NextActionStart = 13
|
|
19
|
-
NextActionEnd = 14
|
|
20
|
-
ErrorActionStart = 15
|
|
21
|
-
ErrorActionEnd = 16
|
|
22
|
-
FinishSuccessFinal = 17
|
|
23
|
-
FinishErrorFinal = 18
|
|
24
|
-
FinishDismissedFinal = 19
|
|
25
|
-
FinishSuccessReactivateFinal = 20,
|
|
26
|
-
FinishComponentDestroyFinal = 21
|
|
7
|
+
ActivationStart = 2,// action activation started (direct, event or editor)
|
|
8
|
+
ActivationEnd = 3,// action activation ended
|
|
9
|
+
FetchStart = 4,// fetch started
|
|
10
|
+
FetchEnd = 5,// fetch ended
|
|
11
|
+
FetchError = 6,// fetch error
|
|
12
|
+
RunConfirmationStart = 7,// confirmation for run is started
|
|
13
|
+
RunConfirmationEndAccept = 8,// confirmation accepted
|
|
14
|
+
RunConfirmationEndReject = 9,// confirmation rejected
|
|
15
|
+
RunStart = 10,// action was run by calling main function
|
|
16
|
+
RunEnd = 11,// action run function executed
|
|
17
|
+
RunError = 12,// action run function executed with error
|
|
18
|
+
NextActionStart = 13,// next action started
|
|
19
|
+
NextActionEnd = 14,// next action finished
|
|
20
|
+
ErrorActionStart = 15,// error action started
|
|
21
|
+
ErrorActionEnd = 16,// error action finished
|
|
22
|
+
FinishSuccessFinal = 17,// action executed successfully
|
|
23
|
+
FinishErrorFinal = 18,// action executed with error
|
|
24
|
+
FinishDismissedFinal = 19,// action was dismissed by user
|
|
25
|
+
FinishSuccessReactivateFinal = 20,// action executed successfully, another instance will directly start from previous
|
|
26
|
+
FinishComponentDestroyFinal = 21,// action was dismissed by destroying component that was executing it
|
|
27
27
|
FinishRouteUntriggerStart = 22,
|
|
28
28
|
FinishRouteUntriggerEndFinal = 23,
|
|
29
29
|
FinishRouteUntriggerTimeoutFinal = 24
|
|
@@ -20,12 +20,12 @@ export declare abstract class ActionExecutorService {
|
|
|
20
20
|
protected readonly dataProviderExecutor: DataProviderExecutor;
|
|
21
21
|
protected readonly navigationService: NavigationService;
|
|
22
22
|
protected readonly errorMapper: ActionErrorMapperService;
|
|
23
|
-
protected readonly parametrize: ParametrizePipe;
|
|
24
23
|
protected readonly config: import("../../tableview/services/tableview-feature-config.token").TableviewFeatureConfig | null;
|
|
25
24
|
protected readonly defaultEditorDialogComponent: import("@angular/core").Type<any>;
|
|
26
25
|
protected readonly messageService: MessageService;
|
|
27
26
|
protected readonly confirmationService: ConfirmationService;
|
|
28
27
|
protected readonly viewContainer: ViewContainer<any, any> | null;
|
|
28
|
+
protected readonly parametrize: ParametrizePipe;
|
|
29
29
|
protected readonly instancesBufferMax = 100;
|
|
30
30
|
protected logger: LoggerService;
|
|
31
31
|
abstract get instances(): ActionInstance<any, any>[];
|
|
@@ -15,7 +15,7 @@ export type ActionEditorDescriptorCreateOptsProviderType<Model, Service> = {
|
|
|
15
15
|
dataProvider?: IEditorDataProvider<Model, Service>;
|
|
16
16
|
};
|
|
17
17
|
export type ActionEditorProviderType<Model, Service> = ServiceClassType<Service> | IEditorDataProvider<Model, Service>;
|
|
18
|
-
export declare const actionEditorGetProviderCfgObj: <Model, Service>(serviceOrDataProvider?: ActionEditorProviderType<Model, Service>
|
|
18
|
+
export declare const actionEditorGetProviderCfgObj: <Model, Service>(serviceOrDataProvider?: ActionEditorProviderType<Model, Service>) => ActionEditorDescriptorCreateOptsProviderType<Model, Service>;
|
|
19
19
|
export declare class ActionEditorDescriptorInst<Item, Service = any> extends ActionDescriptorInst<Item, Service> {
|
|
20
20
|
private readonly _editorDescriptor;
|
|
21
21
|
protected readonly _dataProvider?: IEditorDataProvider<Item, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InjectionToken, Type } from '@angular/core';
|
|
2
|
-
import { APermissions, ClassType,
|
|
2
|
+
import { APermissions, ClassType, IActionDescriptor, IDataProvider, ServiceClassType, StyleLevelEnum } from '@mediusinc/mng-commons/core';
|
|
3
3
|
import { ActionButtonDescriptor } from '@mediusinc/mng-commons/form/api';
|
|
4
4
|
import { ModelDescriptor } from '@mediusinc/mng-commons/model';
|
|
5
5
|
import { IActionComponent } from '../models/action-component.model';
|
|
@@ -27,8 +27,8 @@ export type ActionDescriptorCreateOptsParentType = {
|
|
|
27
27
|
parentProperty?: string;
|
|
28
28
|
};
|
|
29
29
|
export type ActionProviderType<Model, Service> = ServiceClassType<Service> | IDataProvider<Model, Service>;
|
|
30
|
-
export declare const actionGetProviderCfgObj: <Model, Service>(serviceOrDataProvider?: ActionProviderType<Model, Service>
|
|
31
|
-
export declare class ActionDescriptorInst<Model, Service = any> implements
|
|
30
|
+
export declare const actionGetProviderCfgObj: <Model, Service>(serviceOrDataProvider?: ActionProviderType<Model, Service>) => ActionDescriptorCreateOptsProviderType<Model, Service>;
|
|
31
|
+
export declare class ActionDescriptorInst<Model, Service = any> implements IActionDescriptor<Model, Service> {
|
|
32
32
|
protected readonly _model?: ModelDescriptor<Model>;
|
|
33
33
|
protected readonly _actionName: string;
|
|
34
34
|
protected readonly _actionNameLong: string;
|
|
@@ -8,11 +8,11 @@ export declare enum ActionPositionEnum {
|
|
|
8
8
|
FooterRight = 6
|
|
9
9
|
}
|
|
10
10
|
export declare enum ActionActivationTriggerEnum {
|
|
11
|
-
OnClick = 0
|
|
11
|
+
OnClick = 0,// action is triggered for activation on click
|
|
12
12
|
OnRoute = 1
|
|
13
13
|
}
|
|
14
14
|
export declare enum ActionTypeEnum {
|
|
15
|
-
Direct = 0
|
|
15
|
+
Direct = 0,// action is directly activated and executed
|
|
16
16
|
Editor = 1
|
|
17
17
|
}
|
|
18
18
|
export declare enum ActionEditorSubmitTypeEnum {
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
* States of action. Enums ending with `*Final` are supposed to be final.
|
|
3
3
|
*/
|
|
4
4
|
export declare enum ActionInstanceStateEnum {
|
|
5
|
-
TriggerStart = 0
|
|
5
|
+
TriggerStart = 0,// action was triggered (click or direct)
|
|
6
6
|
TriggerEnd = 1,
|
|
7
|
-
ActivationStart = 2,
|
|
8
|
-
ActivationEnd = 3
|
|
9
|
-
FetchStart = 4
|
|
10
|
-
FetchEnd = 5
|
|
11
|
-
FetchError = 6
|
|
12
|
-
RunConfirmationStart = 7
|
|
13
|
-
RunConfirmationEndAccept = 8
|
|
14
|
-
RunConfirmationEndReject = 9
|
|
15
|
-
RunStart = 10
|
|
16
|
-
RunEnd = 11
|
|
17
|
-
RunError = 12
|
|
18
|
-
NextActionStart = 13
|
|
19
|
-
NextActionEnd = 14
|
|
20
|
-
ErrorActionStart = 15
|
|
21
|
-
ErrorActionEnd = 16
|
|
22
|
-
FinishSuccessFinal = 17
|
|
23
|
-
FinishErrorFinal = 18
|
|
24
|
-
FinishDismissedFinal = 19
|
|
25
|
-
FinishSuccessReactivateFinal = 20,
|
|
26
|
-
FinishComponentDestroyFinal = 21
|
|
7
|
+
ActivationStart = 2,// action activation started (direct, event or editor)
|
|
8
|
+
ActivationEnd = 3,// action activation ended
|
|
9
|
+
FetchStart = 4,// fetch started
|
|
10
|
+
FetchEnd = 5,// fetch ended
|
|
11
|
+
FetchError = 6,// fetch error
|
|
12
|
+
RunConfirmationStart = 7,// confirmation for run is started
|
|
13
|
+
RunConfirmationEndAccept = 8,// confirmation accepted
|
|
14
|
+
RunConfirmationEndReject = 9,// confirmation rejected
|
|
15
|
+
RunStart = 10,// action was run by calling main function
|
|
16
|
+
RunEnd = 11,// action run function executed
|
|
17
|
+
RunError = 12,// action run function executed with error
|
|
18
|
+
NextActionStart = 13,// next action started
|
|
19
|
+
NextActionEnd = 14,// next action finished
|
|
20
|
+
ErrorActionStart = 15,// error action started
|
|
21
|
+
ErrorActionEnd = 16,// error action finished
|
|
22
|
+
FinishSuccessFinal = 17,// action executed successfully
|
|
23
|
+
FinishErrorFinal = 18,// action executed with error
|
|
24
|
+
FinishDismissedFinal = 19,// action was dismissed by user
|
|
25
|
+
FinishSuccessReactivateFinal = 20,// action executed successfully, another instance will directly start from previous
|
|
26
|
+
FinishComponentDestroyFinal = 21,// action was dismissed by destroying component that was executing it
|
|
27
27
|
FinishRouteUntriggerStart = 22,
|
|
28
28
|
FinishRouteUntriggerEndFinal = 23,
|
|
29
29
|
FinishRouteUntriggerTimeoutFinal = 24
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
|
-
import { ArrayItemType, ClassType, EnumConstantType,
|
|
3
|
+
import { ArrayItemType, ClassType, EnumConstantType, IEditorDescriptor, ILookupDataProvider, IdType, KeyofAndOfType, Nullable } from '@mediusinc/mng-commons/core';
|
|
4
4
|
import { EnumDescriptor, ModelDescriptor, TypeDescriptor } from '@mediusinc/mng-commons/model';
|
|
5
5
|
import { ITableDataProvider, TableDescriptorInst } from '@mediusinc/mng-commons/table/api';
|
|
6
6
|
import { TableviewDescriptorInst } from '../../tableview/descriptors/tableview.descriptor';
|
|
@@ -15,7 +15,7 @@ import { FieldGroupDescriptor, FieldTabGroupDescriptor } from './field-group.des
|
|
|
15
15
|
import { FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupProviderType } from './field-lookup.descriptor';
|
|
16
16
|
import { FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor } from './field-many.descriptor';
|
|
17
17
|
import { FieldInputDescriptor, FieldInputDescriptorType } from './field.descriptor';
|
|
18
|
-
export declare class EditorDescriptorInst<EditorModel> implements
|
|
18
|
+
export declare class EditorDescriptorInst<EditorModel> implements IEditorDescriptor<EditorModel>, IFieldsManageInterface<EditorModel> {
|
|
19
19
|
static readonly defaultGroupName = "_default";
|
|
20
20
|
/** @ignore */ protected readonly _model: ModelDescriptor<EditorModel>;
|
|
21
21
|
/** @ignore */ protected readonly _tableviewEditorType: TableviewEditorTypeEnum;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import {
|
|
2
|
+
import { IEditorDescriptor, StyleLevelEnum } from '@mediusinc/mng-commons/core';
|
|
3
3
|
import { ActionButtonDescriptor } from '@mediusinc/mng-commons/form/api';
|
|
4
4
|
import { FieldActionContext, FieldActionResult } from '../models/field-action-context.model';
|
|
5
5
|
import { AFieldDescriptor } from './field-base.descriptor';
|
|
@@ -10,7 +10,7 @@ export declare class FieldActionDescriptor<EditorModel> extends AFieldDescriptor
|
|
|
10
10
|
protected _button: ActionButtonDescriptor;
|
|
11
11
|
protected _runFunction?: FieldActionRunFnType<EditorModel>;
|
|
12
12
|
private _wrappers;
|
|
13
|
-
constructor(editor:
|
|
13
|
+
constructor(editor: IEditorDescriptor<EditorModel>, property: string);
|
|
14
14
|
get button(): ActionButtonDescriptor;
|
|
15
15
|
get runFunction(): FieldActionRunFnType<EditorModel> | undefined;
|
|
16
16
|
get wrappers(): string[];
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
2
|
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
3
3
|
import { Observable, Subject } from 'rxjs';
|
|
4
|
-
import { GetterFn,
|
|
4
|
+
import { GetterFn, IEditorDescriptor } from '@mediusinc/mng-commons/core';
|
|
5
5
|
import { FieldAsyncValidator, FieldConfig, FieldSizeEnum, FieldValidationMessage, FieldValidator } from '../models/field.model';
|
|
6
6
|
import { FormFieldEvent, FormFieldEventData, FormFieldEventTypeEnum } from '../models/form-editor.event';
|
|
7
7
|
import { CommonsFormlyFieldConfig, CommonsFormlyHookFn } from '../models/formly-field.model';
|
|
8
8
|
import { FieldValidationDescriptor } from './field-validation.descriptor';
|
|
9
9
|
export declare abstract class AGenericFieldDescriptor<EditorModel> {
|
|
10
|
-
protected readonly _editor:
|
|
10
|
+
protected readonly _editor: IEditorDescriptor<EditorModel>;
|
|
11
11
|
protected _config: FieldConfig;
|
|
12
|
-
protected constructor(editor:
|
|
13
|
-
get editor():
|
|
12
|
+
protected constructor(editor: IEditorDescriptor<EditorModel>);
|
|
13
|
+
get editor(): IEditorDescriptor<EditorModel>;
|
|
14
14
|
get config(): FieldConfig;
|
|
15
15
|
withConfig(config: FieldConfig): this;
|
|
16
16
|
/**
|
|
@@ -49,7 +49,7 @@ export declare abstract class AFieldDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
49
49
|
/** @ignore */ protected _size: FieldSizeEnum;
|
|
50
50
|
/** @ignore */ protected _isLocalized: boolean;
|
|
51
51
|
/** @ignore */ protected readonly _eventsSubject: Subject<FormFieldEvent<FieldModel, EditorModel>>;
|
|
52
|
-
protected constructor(editor:
|
|
52
|
+
protected constructor(editor: IEditorDescriptor<EditorModel>, property: string);
|
|
53
53
|
get property(): string;
|
|
54
54
|
get label(): string | null | undefined;
|
|
55
55
|
get placeholder(): string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IEditorDescriptor } from '@mediusinc/mng-commons/core';
|
|
2
2
|
import { FieldGroupTypeEnum, FieldValidationMessage, FieldValidator } from '../models/field.model';
|
|
3
3
|
import { AFieldDescriptor, AGenericFieldDescriptor } from './field-base.descriptor';
|
|
4
4
|
import { FieldValidationDescriptor } from './field-validation.descriptor';
|
|
@@ -8,7 +8,7 @@ export declare abstract class AFieldGroupDescriptor<EditorModel> extends AGeneri
|
|
|
8
8
|
protected _title?: string;
|
|
9
9
|
protected _fields: AGenericFieldDescriptor<EditorModel>[];
|
|
10
10
|
protected _validations: Array<FieldValidationDescriptor>;
|
|
11
|
-
protected constructor(editor:
|
|
11
|
+
protected constructor(editor: IEditorDescriptor<EditorModel>, name: string);
|
|
12
12
|
removeField(property: string, filterFunction: (fields: AGenericFieldDescriptor<EditorModel>[]) => AGenericFieldDescriptor<EditorModel>[]): AGenericFieldDescriptor<EditorModel>[];
|
|
13
13
|
get title(): string | undefined;
|
|
14
14
|
abstract get fields(): AGenericFieldDescriptor<EditorModel>[];
|
|
@@ -23,7 +23,7 @@ export declare abstract class AFieldGroupDescriptor<EditorModel> extends AGeneri
|
|
|
23
23
|
withValidation(name: string, validator?: FieldValidator, message?: FieldValidationMessage): this;
|
|
24
24
|
}
|
|
25
25
|
export declare class FieldTabGroupDescriptor<EditorModel> extends AFieldGroupDescriptor<EditorModel> {
|
|
26
|
-
constructor(editor:
|
|
26
|
+
constructor(editor: IEditorDescriptor<EditorModel>, name: string);
|
|
27
27
|
get fields(): Array<FieldGroupDescriptor<EditorModel>>;
|
|
28
28
|
groupName(): string;
|
|
29
29
|
addField(field: FieldGroupDescriptor<EditorModel>): this;
|
|
@@ -31,7 +31,7 @@ export declare class FieldTabGroupDescriptor<EditorModel> extends AFieldGroupDes
|
|
|
31
31
|
}
|
|
32
32
|
export declare class FieldGroupDescriptor<EditorModel> extends AFieldGroupDescriptor<EditorModel> {
|
|
33
33
|
private _type;
|
|
34
|
-
constructor(editor:
|
|
34
|
+
constructor(editor: IEditorDescriptor<EditorModel>, name: string);
|
|
35
35
|
get type(): FieldGroupTypeEnum;
|
|
36
36
|
get fields(): Array<AFieldDescriptor<any, EditorModel>>;
|
|
37
37
|
groupName(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClassType, EnumConstantType, EnumValue,
|
|
1
|
+
import { ClassType, EnumConstantType, EnumValue, IEditorDescriptor, ILookupDataProvider, ILookupDescriptor, LookupDataProviderLookupFnType, ServiceClassType } from '@mediusinc/mng-commons/core';
|
|
2
2
|
import { InputTrimType } from '@mediusinc/mng-commons/form/api';
|
|
3
3
|
import { EnumDescriptor } from '@mediusinc/mng-commons/model';
|
|
4
4
|
import { ITableDataProvider, TableDescriptorInst } from '@mediusinc/mng-commons/table/api';
|
|
@@ -19,7 +19,7 @@ export type FieldLookupAutocompleteOptsType = {
|
|
|
19
19
|
selectFirst?: boolean;
|
|
20
20
|
autoClear?: boolean;
|
|
21
21
|
};
|
|
22
|
-
export declare const fieldLookupGetProviderCfgObj: <FieldModel, Service>(serviceOrDataProvider?: FieldLookupProviderType<FieldModel, Service>
|
|
22
|
+
export declare const fieldLookupGetProviderCfgObj: <FieldModel, Service>(serviceOrDataProvider?: FieldLookupProviderType<FieldModel, Service>) => FieldLookupDescriptorCreateOptsProviderType<FieldModel, Service>;
|
|
23
23
|
export declare class FieldLookupDescriptor<FieldModel, EditorModel, Service = any, FieldValue = FieldModel> extends AFieldDescriptor<FieldModel, EditorModel, FieldValue> implements ILookupDescriptor<FieldModel, Service> {
|
|
24
24
|
protected readonly _dataProvider: ILookupDataProvider<FieldModel, Service>;
|
|
25
25
|
protected readonly _optionsValueProperty?: string;
|
|
@@ -37,7 +37,7 @@ export declare class FieldLookupDescriptor<FieldModel, EditorModel, Service = an
|
|
|
37
37
|
protected _dialogTableDescriptor?: TableDescriptorInst<FieldModel>;
|
|
38
38
|
protected _dialogTableDataProvider?: ITableDataProvider<FieldModel, any, any, any>;
|
|
39
39
|
protected _customComponentName?: string;
|
|
40
|
-
constructor(editor:
|
|
40
|
+
constructor(editor: IEditorDescriptor<EditorModel>, property: string, cfg?: FieldLookupDescriptorConstructorOptsType<FieldModel, Service>);
|
|
41
41
|
get lookupType(): FieldLookupTypeEnum;
|
|
42
42
|
get optionsLabelProperty(): string | undefined;
|
|
43
43
|
get optionsLabelTranslate(): boolean;
|
|
@@ -71,7 +71,7 @@ export declare class FieldLookupDescriptor<FieldModel, EditorModel, Service = an
|
|
|
71
71
|
export declare class FieldLookupEnumDescriptor<Enum, EditorModel> extends FieldLookupDescriptor<EnumValue, EditorModel, undefined, EnumConstantType> {
|
|
72
72
|
private readonly _enumModel;
|
|
73
73
|
private readonly _optionEnumValues;
|
|
74
|
-
constructor(editor:
|
|
74
|
+
constructor(editor: IEditorDescriptor<EditorModel>, property: string, enumModel: EnumDescriptor<Enum>, options?: Array<Enum>);
|
|
75
75
|
get enumModel(): EnumDescriptor<Enum>;
|
|
76
76
|
withDisabledOptions(...disabledOptions: Array<EnumConstantType>): this;
|
|
77
77
|
withDefaultValueEnum(defaultValue: EnumConstantType): this;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IEditorDescriptor, ServiceClassType } from '@mediusinc/mng-commons/core';
|
|
2
2
|
import { ITableDataProvider, TableDataProviderGetAllFnType, TableDescriptorInst } from '@mediusinc/mng-commons/table/api';
|
|
3
3
|
import { ActionDescriptorInst } from '../../action/descriptors/action.descriptor';
|
|
4
4
|
import { TableviewDescriptorInst } from '../../tableview/descriptors/tableview.descriptor';
|
|
@@ -10,7 +10,7 @@ export type FieldManyToManyEditorDescriptorCreateOptsProviderType<FieldModel, Se
|
|
|
10
10
|
lookupDataProvider?: ITableDataProvider<FieldModel, Service>;
|
|
11
11
|
};
|
|
12
12
|
export type FieldManyToManyEditorProviderType<FieldModel, Service> = ServiceClassType<Service> | ITableDataProvider<FieldModel, Service>;
|
|
13
|
-
export declare const fieldManyToManyGetProviderCfgObj: <FieldModel, Service>(serviceOrDataProvider?: FieldManyToManyEditorProviderType<FieldModel, Service>
|
|
13
|
+
export declare const fieldManyToManyGetProviderCfgObj: <FieldModel, Service>(serviceOrDataProvider?: FieldManyToManyEditorProviderType<FieldModel, Service>) => FieldManyToManyEditorDescriptorCreateOptsProviderType<FieldModel, Service>;
|
|
14
14
|
export declare class FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Service = any, FieldValue = FieldModel[]> extends AFieldDescriptor<FieldModel, EditorModel, FieldValue> {
|
|
15
15
|
private readonly _mainTableDescriptor;
|
|
16
16
|
private readonly _lookupTableDescriptor;
|
|
@@ -22,7 +22,7 @@ export declare class FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Se
|
|
|
22
22
|
private _excludeValueProperty;
|
|
23
23
|
private _searchEnabled;
|
|
24
24
|
private _searchFields?;
|
|
25
|
-
constructor(editor:
|
|
25
|
+
constructor(editor: IEditorDescriptor<EditorModel>, property: string, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>, cfg?: FieldManyToManyEditorDescriptorConstructorOptsType<FieldModel, Service>);
|
|
26
26
|
get fieldType(): FieldManyToManyEditorTypeEnum;
|
|
27
27
|
get actions(): FieldManyToManyEditorActionEnum[];
|
|
28
28
|
get hasLookupExcludeValues(): boolean;
|
|
@@ -45,7 +45,7 @@ export declare class FieldManyEditorDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
45
45
|
private _fieldType;
|
|
46
46
|
private _fieldActions;
|
|
47
47
|
private _actions;
|
|
48
|
-
constructor(editor:
|
|
48
|
+
constructor(editor: IEditorDescriptor<EditorModel>, property: string, tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any>);
|
|
49
49
|
get fieldType(): FieldManyEditorTypeEnum;
|
|
50
50
|
get fieldActions(): FieldManyEditorActionEnum[];
|
|
51
51
|
get actions(): ActionDescriptorInst<FieldModel, any>[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
|
-
import {
|
|
3
|
+
import { IEditorDescriptor } from '@mediusinc/mng-commons/core';
|
|
4
4
|
import { InputTrimType } from '@mediusinc/mng-commons/form/api';
|
|
5
5
|
import { EnumDescriptor } from '@mediusinc/mng-commons/model';
|
|
6
6
|
import { FieldInputTypeEnum } from '../models/field.model';
|
|
@@ -99,7 +99,7 @@ export declare class FieldInputDescriptor<EditorModel, FieldModel = FieldInputDe
|
|
|
99
99
|
private _customComponentType?;
|
|
100
100
|
private _customComponentInputs?;
|
|
101
101
|
private _customComponentWrappers?;
|
|
102
|
-
constructor(editor:
|
|
102
|
+
constructor(editor: IEditorDescriptor<EditorModel>, property: string);
|
|
103
103
|
/**
|
|
104
104
|
* converts field to given type with additional arguments
|
|
105
105
|
* @param fieldType field type enum
|