@mediusinc/mng-commons 5.0.0-rc.0 → 5.0.0-rc.2
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 +151 -30
- package/core/router/routes-builder.d.ts +29 -15
- 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 +218 -107
- package/esm2022/core/router/routes-builder.mjs +42 -43
- 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 +39 -45
- 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 +22 -21
- package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +3 -3
- package/esm2022/tableview/action/components/route/action-route.component.mjs +6 -5
- 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 +10 -9
- 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 +9 -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/action/models/execution/action-instance.model.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 +21 -32
- 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 +3 -3
- 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-validation.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field.descriptor.mjs +39 -10
- package/esm2022/tableview/api/editor/helpers/class-attribute-converter.mjs +1 -1
- package/esm2022/tableview/api/editor/helpers/field-validators.mjs +15 -25
- package/esm2022/tableview/api/editor/models/editor-fields.model.mjs +1 -1
- package/esm2022/tableview/api/editor/models/field.model.mjs +1 -1
- package/esm2022/tableview/api/editor/models/form-editor.event.mjs +1 -1
- package/esm2022/tableview/api/editor/models/form-editor.interface.mjs +1 -1
- package/esm2022/tableview/api/editor/models/formly-custom-field.model.mjs +3 -3
- package/esm2022/tableview/api/editor/models/formly-field.model.mjs +1 -1
- package/esm2022/tableview/api/tableview/data-providers/tableview.data-provider.mjs +1 -1
- package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +15 -22
- 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 +158 -138
- 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 +5 -7
- 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-datepicker/formly-field-datepicker.component.mjs +103 -0
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +5 -7
- 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 +33 -50
- 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 +8 -10
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +6 -8
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +19 -18
- 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 +343 -0
- package/esm2022/tableview/editor/helpers/formly-config.mjs +5 -3
- package/esm2022/tableview/editor/models/formly-config.model.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 +10 -10
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +30 -56
- package/esm2022/tableview/tableview/router/tableview-route-builder.mjs +17 -43
- package/fesm2022/mediusinc-mng-commons-core.mjs +1599 -1496
- 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 +51 -56
- 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 +105 -96
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +865 -868
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/filter/descriptors/filter.descriptor.d.ts +2 -2
- package/form/components/autocomplete/autocomplete.component.d.ts +8 -7
- 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/editor/injector-context/action-editor-injector-context.component.d.ts +1 -3
- package/tableview/action/components/route/action-route.component.d.ts +1 -1
- 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/models/execution/action-instance.model.d.ts +2 -1
- package/tableview/action/services/action-executor.service.d.ts +1 -1
- package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +9 -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/action/models/execution/action-instance.model.d.ts +2 -1
- package/tableview/api/editor/descriptors/editor.descriptor.d.ts +16 -21
- package/tableview/api/editor/descriptors/field-action.descriptor.d.ts +2 -2
- package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +29 -29
- package/tableview/api/editor/descriptors/field-group.descriptor.d.ts +9 -9
- 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-validation.descriptor.d.ts +10 -13
- package/tableview/api/editor/descriptors/field.descriptor.d.ts +17 -2
- package/tableview/api/editor/helpers/field-validators.d.ts +6 -2
- package/tableview/api/editor/models/editor-fields.model.d.ts +9 -7
- package/tableview/api/editor/models/field.model.d.ts +16 -7
- package/tableview/api/editor/models/form-editor.event.d.ts +6 -4
- package/tableview/api/editor/models/form-editor.interface.d.ts +37 -8
- package/tableview/api/editor/models/formly-custom-field.model.d.ts +1 -1
- package/tableview/api/editor/models/formly-field.model.d.ts +9 -7
- package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +8 -9
- package/tableview/editor/components/editor/form-editor.component.d.ts +51 -35
- package/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.d.ts +22 -0
- package/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.d.ts +5 -7
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +0 -1
- package/tableview/editor/helpers/editor-formly.d.ts +11 -0
- package/tableview/editor/models/formly-config.model.d.ts +1 -1
- package/tableview/index.d.ts +2 -2
- package/tableview/tableview/components/route/tableview-route.component.d.ts +2 -2
- package/tableview/tableview/components/tableview/tableview.component.d.ts +16 -15
- package/tableview/tableview/router/tableview-route-builder.d.ts +7 -13
- package/version-info.json +11 -0
- 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,21 +1,22 @@
|
|
|
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';
|
|
7
7
|
import { EditorClassAttributeDef } from '../models/class-tableview-attribute.model';
|
|
8
8
|
import { IFieldsManageInterface } from '../models/editor-fields.model';
|
|
9
9
|
import { TableviewEditorTypeEnum } from '../models/editor.model';
|
|
10
|
-
import { FieldInputTypeEnum,
|
|
10
|
+
import { FieldInputTypeEnum, FormValidationMessage, FormValidator } from '../models/field.model';
|
|
11
11
|
import { FieldEventData, FormEvent, FormEventTypeEnum } from '../models/form-editor.event';
|
|
12
12
|
import { FieldActionDescriptor } from './field-action.descriptor';
|
|
13
13
|
import { AFieldDescriptor } from './field-base.descriptor';
|
|
14
14
|
import { FieldGroupDescriptor, FieldTabGroupDescriptor } from './field-group.descriptor';
|
|
15
15
|
import { FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupProviderType } from './field-lookup.descriptor';
|
|
16
16
|
import { FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor } from './field-many.descriptor';
|
|
17
|
+
import { FieldValidationDescriptorOptsType } from './field-validation.descriptor';
|
|
17
18
|
import { FieldInputDescriptor, FieldInputDescriptorType } from './field.descriptor';
|
|
18
|
-
export declare class EditorDescriptorInst<EditorModel> implements
|
|
19
|
+
export declare class EditorDescriptorInst<EditorModel> implements IEditorDescriptor<EditorModel>, IFieldsManageInterface<EditorModel> {
|
|
19
20
|
static readonly defaultGroupName = "_default";
|
|
20
21
|
/** @ignore */ protected readonly _model: ModelDescriptor<EditorModel>;
|
|
21
22
|
/** @ignore */ protected readonly _tableviewEditorType: TableviewEditorTypeEnum;
|
|
@@ -242,22 +243,8 @@ export declare class EditorDescriptorInst<EditorModel> implements IEditorDescrip
|
|
|
242
243
|
* @param tableviewDescriptor Tableview descriptor for related model.
|
|
243
244
|
*/
|
|
244
245
|
addFieldManyEditorUnsafe<FieldModel, FieldValue = FieldModel[]>(property: string, tableviewDescriptor: TableviewDescriptorInst<FieldModel>): FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue>;
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
* @param property Model's property name.
|
|
248
|
-
* @param mainTableDescriptor Main table descriptor for displaying items added to main model's property.
|
|
249
|
-
* @param lookupTableDescriptor Lookup table descriptor for displaying items to be added to main model's property.
|
|
250
|
-
*/
|
|
251
|
-
addFieldManyToManyEditor<Property extends keyof EditorModel, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, undefined, FieldValue>;
|
|
252
|
-
/**
|
|
253
|
-
* Adds tables for many-to-many (m:n) relations (UNSAFE).
|
|
254
|
-
* @param property Model's property name.
|
|
255
|
-
* @param mainTableDescriptor Main table descriptor for displaying items added to main model's property.
|
|
256
|
-
* @param lookupTableDescriptor Lookup table descriptor for displaying items to be added to main model's property.
|
|
257
|
-
*/
|
|
258
|
-
addFieldManyToManyEditorUnsafe<FieldModel, FieldValue = FieldModel[]>(property: string, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, undefined, FieldValue>;
|
|
259
|
-
addFieldManyToManyEditorWithProvider<Property extends keyof EditorModel, ServiceType, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>, lookupDataProvider: ITableDataProvider<FieldModel, ServiceType>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, ServiceType, FieldValue>;
|
|
260
|
-
addFieldManyToManyEditorWithProviderUnsafe<FieldModel, ServiceType, FieldValue = FieldModel[]>(property: string, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>, lookupDataProvider: ITableDataProvider<FieldModel, ServiceType>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, ServiceType, FieldValue>;
|
|
246
|
+
addFieldManyToManyEditor<Property extends keyof EditorModel, ServiceType, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>, lookupDataProvider: ITableDataProvider<FieldModel, ServiceType>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, ServiceType, FieldValue>;
|
|
247
|
+
addFieldManyToManyEditorUnsafe<FieldModel, ServiceType, FieldValue = FieldModel[]>(property: string, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>, lookupDataProvider: ITableDataProvider<FieldModel, ServiceType>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, ServiceType, FieldValue>;
|
|
261
248
|
/**
|
|
262
249
|
* Disables field on editor.
|
|
263
250
|
* @param disabled
|
|
@@ -268,8 +255,17 @@ export declare class EditorDescriptorInst<EditorModel> implements IEditorDescrip
|
|
|
268
255
|
* @param name Name of the validation.
|
|
269
256
|
* @param validator Field validator function.
|
|
270
257
|
* @param message Field validation message.
|
|
258
|
+
* @param opts Additional configuration for validation.
|
|
259
|
+
*/
|
|
260
|
+
withValidation<Value = EditorModel>(name: string, validator?: FormValidator<Value>, message?: FormValidationMessage<Value>, opts?: FieldValidationDescriptorOptsType<keyof EditorModel>): this;
|
|
261
|
+
/**
|
|
262
|
+
* Adds group validator to editor.
|
|
263
|
+
* @param name Name of the validation.
|
|
264
|
+
* @param validator Field validator function.
|
|
265
|
+
* @param message Field validation message.
|
|
266
|
+
* @param opts Additional configuration for validation.
|
|
271
267
|
*/
|
|
272
|
-
|
|
268
|
+
withValidationUnsafe<Value = EditorModel>(name: string, validator?: FormValidator<Value>, message?: FormValidationMessage<Value>, opts?: FieldValidationDescriptorOptsType): this;
|
|
273
269
|
/**
|
|
274
270
|
* Creates a copy of editor descriptor object.
|
|
275
271
|
*/
|
|
@@ -329,7 +325,6 @@ export declare class EditorDescriptorInst<EditorModel> implements IEditorDescrip
|
|
|
329
325
|
localized<Property extends keyof EditorModel, LocalizationModel = ArrayItemType<EditorModel[Property]>>(property: Property, model: ModelDescriptor<LocalizationModel>, localeProperty: keyof LocalizationModel): this;
|
|
330
326
|
localizedUnsafe<LocalizationType>(property: string, model: ModelDescriptor<LocalizationType>, localeProperty: string): this;
|
|
331
327
|
nextEvent(type: FormEventTypeEnum, cmpType: Type<any>, cmpInstance: any, data?: FieldEventData<EditorModel>): void;
|
|
332
|
-
completeEvents(): void;
|
|
333
328
|
get events$(): import("rxjs").Observable<FormEvent<EditorModel>>;
|
|
334
329
|
/**
|
|
335
330
|
* Generates field based on attribute definition, used for auto model
|
|
@@ -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
|
/**
|
|
@@ -30,18 +30,18 @@ export declare abstract class AFieldDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
30
30
|
/** @ignore */ protected _defaultValue?: FieldValue;
|
|
31
31
|
/** @ignore */ protected _getter?: GetterFn<FieldValue, EditorModel>;
|
|
32
32
|
/** @ignore */ protected _setter?: (item: EditorModel, value: FieldValue) => void;
|
|
33
|
-
/** @ignore */ protected _validations: Array<FieldValidationDescriptor
|
|
34
|
-
/** @ignore */ protected _asyncValidations: Array<FieldValidationDescriptor
|
|
33
|
+
/** @ignore */ protected _validations: Array<FieldValidationDescriptor<any, any>>;
|
|
34
|
+
/** @ignore */ protected _asyncValidations: Array<FieldValidationDescriptor<any, any>>;
|
|
35
35
|
/** @ignore */ protected _requiredExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
|
|
36
36
|
/** @ignore */ protected _disabledExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
|
|
37
37
|
/** @ignore */ protected _hiddenExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
|
|
38
38
|
/** @ignore */ protected _updateOn: 'change' | 'blur' | 'submit';
|
|
39
|
-
/** @ignore */ protected _onInit?: CommonsFormlyHookFn
|
|
40
|
-
/** @ignore */ protected _onChanges?: CommonsFormlyHookFn
|
|
41
|
-
/** @ignore */ protected _afterContentInit?: CommonsFormlyHookFn
|
|
42
|
-
/** @ignore */ protected _afterViewInit?: CommonsFormlyHookFn
|
|
43
|
-
/** @ignore */ protected _onDestroy?: CommonsFormlyHookFn
|
|
44
|
-
/** @ignore */ protected _onValueChange?: (field: CommonsFormlyFieldConfig, value: any) => void;
|
|
39
|
+
/** @ignore */ protected _onInit?: CommonsFormlyHookFn<FieldValue, EditorModel>;
|
|
40
|
+
/** @ignore */ protected _onChanges?: CommonsFormlyHookFn<FieldValue, EditorModel>;
|
|
41
|
+
/** @ignore */ protected _afterContentInit?: CommonsFormlyHookFn<FieldValue, EditorModel>;
|
|
42
|
+
/** @ignore */ protected _afterViewInit?: CommonsFormlyHookFn<FieldValue, EditorModel>;
|
|
43
|
+
/** @ignore */ protected _onDestroy?: CommonsFormlyHookFn<FieldValue, EditorModel>;
|
|
44
|
+
/** @ignore */ protected _onValueChange?: (field: CommonsFormlyFieldConfig<FieldValue, EditorModel>, value: any) => void;
|
|
45
45
|
/** @ignore */ protected _className: string;
|
|
46
46
|
/** @ignore */ protected _fieldClassName?: string;
|
|
47
47
|
/** @ignore */ protected _labelClassName: string;
|
|
@@ -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;
|
|
@@ -60,8 +60,8 @@ export declare abstract class AFieldDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
60
60
|
get defaultValue(): FieldValue | undefined;
|
|
61
61
|
get getter(): GetterFn<FieldValue, EditorModel> | undefined;
|
|
62
62
|
get setter(): ((item: EditorModel, value: FieldValue) => void) | undefined;
|
|
63
|
-
get validations(): FieldValidationDescriptor[];
|
|
64
|
-
get asyncValidations(): FieldValidationDescriptor[];
|
|
63
|
+
get validations(): FieldValidationDescriptor<any, any>[];
|
|
64
|
+
get asyncValidations(): FieldValidationDescriptor<any, any>[];
|
|
65
65
|
get requiredExpression(): string | Observable<boolean> | ((field?: FormlyFieldConfig<import("@ngx-formly/core").FormlyFieldProps & {
|
|
66
66
|
[additionalProperties: string]: any;
|
|
67
67
|
}> | undefined) => boolean) | undefined;
|
|
@@ -72,12 +72,12 @@ export declare abstract class AFieldDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
72
72
|
[additionalProperties: string]: any;
|
|
73
73
|
}> | undefined) => boolean) | undefined;
|
|
74
74
|
get updateOn(): "submit" | "change" | "blur";
|
|
75
|
-
get onInit(): CommonsFormlyHookFn | undefined;
|
|
76
|
-
get onChanges(): CommonsFormlyHookFn | undefined;
|
|
77
|
-
get afterContentInit(): CommonsFormlyHookFn | undefined;
|
|
78
|
-
get afterViewInit(): CommonsFormlyHookFn | undefined;
|
|
79
|
-
get onDestroy(): CommonsFormlyHookFn | undefined;
|
|
80
|
-
get onValueChange(): ((field: CommonsFormlyFieldConfig<import("../models/formly-field.model").CommonsFormlyFieldProps
|
|
75
|
+
get onInit(): CommonsFormlyHookFn<FieldValue, EditorModel> | undefined;
|
|
76
|
+
get onChanges(): CommonsFormlyHookFn<FieldValue, EditorModel> | undefined;
|
|
77
|
+
get afterContentInit(): CommonsFormlyHookFn<FieldValue, EditorModel> | undefined;
|
|
78
|
+
get afterViewInit(): CommonsFormlyHookFn<FieldValue, EditorModel> | undefined;
|
|
79
|
+
get onDestroy(): CommonsFormlyHookFn<FieldValue, EditorModel> | undefined;
|
|
80
|
+
get onValueChange(): ((field: CommonsFormlyFieldConfig<FieldValue, EditorModel, import("../models/formly-field.model").CommonsFormlyFieldProps<FieldValue, EditorModel>>, value: any) => void) | undefined;
|
|
81
81
|
get className(): string;
|
|
82
82
|
get fieldClassName(): string | undefined;
|
|
83
83
|
get labelClassName(): string;
|
|
@@ -94,18 +94,18 @@ export declare abstract class AFieldDescriptor<FieldModel, EditorModel, FieldVal
|
|
|
94
94
|
withDisabled(disabled?: boolean, disabledExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
|
|
95
95
|
withHidden(hiddenExpression: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
|
|
96
96
|
withUpdateOn(updateOn: 'change' | 'blur' | 'submit'): this;
|
|
97
|
-
withOnInit(onInit?: CommonsFormlyHookFn): this;
|
|
98
|
-
withOnChanges(onChanges?: CommonsFormlyHookFn): this;
|
|
99
|
-
withAfterContentInit(afterContentInit?: CommonsFormlyHookFn): this;
|
|
100
|
-
withAfterViewInit(afterViewInit?: CommonsFormlyHookFn): this;
|
|
101
|
-
withOnDestroy(onDestroy?: CommonsFormlyHookFn): this;
|
|
102
|
-
withOnValueChange(onValueChange?: (field: CommonsFormlyFieldConfig, value:
|
|
97
|
+
withOnInit(onInit?: CommonsFormlyHookFn<FieldValue, EditorModel>): this;
|
|
98
|
+
withOnChanges(onChanges?: CommonsFormlyHookFn<FieldValue, EditorModel>): this;
|
|
99
|
+
withAfterContentInit(afterContentInit?: CommonsFormlyHookFn<FieldValue, EditorModel>): this;
|
|
100
|
+
withAfterViewInit(afterViewInit?: CommonsFormlyHookFn<FieldValue, EditorModel>): this;
|
|
101
|
+
withOnDestroy(onDestroy?: CommonsFormlyHookFn<FieldValue, EditorModel>): this;
|
|
102
|
+
withOnValueChange(onValueChange?: (field: CommonsFormlyFieldConfig<FieldValue, EditorModel>, value: FieldValue) => void): this;
|
|
103
103
|
withDefaultValue(defaultValue: FieldValue): this;
|
|
104
104
|
withGetter(fn?: GetterFn<FieldValue, EditorModel>): this;
|
|
105
105
|
withSetter(fn?: (item: EditorModel, value: FieldValue) => void): this;
|
|
106
|
-
withValidation(name: string, validator?: FieldValidator, message?: FieldValidationMessage): this;
|
|
106
|
+
withValidation<Value = FieldValue, EditorValue = EditorModel>(name: string, validator?: FieldValidator<Value, EditorValue>, message?: FieldValidationMessage<Value, EditorValue>): this;
|
|
107
107
|
removeValidation(name: string): this;
|
|
108
|
-
withAsyncValidation(name: string, asyncValidator?: FieldAsyncValidator, message?: FieldValidationMessage): this;
|
|
108
|
+
withAsyncValidation<Value = FieldValue, EditorValue = EditorModel>(name: string, asyncValidator?: FieldAsyncValidator<Value, EditorValue>, message?: FieldValidationMessage<Value, EditorValue>): this;
|
|
109
109
|
removeAsyncValidation(name: string): this;
|
|
110
110
|
withClassName(className: string, labelClassName?: string, inputClassName?: string, fieldClassName?: string): this;
|
|
111
111
|
withSize(size?: FieldSizeEnum): this;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FieldGroupTypeEnum,
|
|
1
|
+
import { IEditorDescriptor } from '@mediusinc/mng-commons/core';
|
|
2
|
+
import { FieldGroupTypeEnum, FormValidationMessage, FormValidator } from '../models/field.model';
|
|
3
3
|
import { AFieldDescriptor, AGenericFieldDescriptor } from './field-base.descriptor';
|
|
4
|
-
import { FieldValidationDescriptor } from './field-validation.descriptor';
|
|
4
|
+
import { FieldValidationDescriptor, FieldValidationDescriptorOptsType } from './field-validation.descriptor';
|
|
5
5
|
export declare abstract class AFieldGroupDescriptor<EditorModel> extends AGenericFieldDescriptor<EditorModel> {
|
|
6
6
|
protected readonly _name: string;
|
|
7
7
|
protected readonly _default: boolean;
|
|
8
8
|
protected _title?: string;
|
|
9
9
|
protected _fields: AGenericFieldDescriptor<EditorModel>[];
|
|
10
|
-
protected _validations: Array<FieldValidationDescriptor
|
|
11
|
-
protected constructor(editor:
|
|
10
|
+
protected _validations: Array<FieldValidationDescriptor<any, any>>;
|
|
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>[];
|
|
15
|
-
get validations(): FieldValidationDescriptor[];
|
|
15
|
+
get validations(): FieldValidationDescriptor<any, any>[];
|
|
16
16
|
get baseName(): string;
|
|
17
17
|
get name(): string;
|
|
18
18
|
get default(): boolean;
|
|
@@ -20,10 +20,10 @@ export declare abstract class AFieldGroupDescriptor<EditorModel> extends AGeneri
|
|
|
20
20
|
abstract addField(field: AGenericFieldDescriptor<EditorModel>): this;
|
|
21
21
|
abstract copy(): AFieldGroupDescriptor<EditorModel>;
|
|
22
22
|
withTitle(title: string): this;
|
|
23
|
-
withValidation(name: string, validator?:
|
|
23
|
+
withValidation<Value = EditorModel>(name: string, validator?: FormValidator<Value>, message?: FormValidationMessage<Value>, opts?: FieldValidationDescriptorOptsType): 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,19 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { FieldAsyncBaseValidator, FieldBaseValidator, FieldValidationMessage } from '../models/field.model';
|
|
2
|
+
export type FieldValidationDescriptorOptsType<Property = string> = {
|
|
3
|
+
errorPath?: Property;
|
|
4
|
+
};
|
|
5
|
+
export declare class FieldValidationDescriptor<FieldValue, EditorValue> {
|
|
5
6
|
private readonly _name;
|
|
6
7
|
private readonly _validator?;
|
|
7
8
|
private readonly _message?;
|
|
8
9
|
private readonly _options?;
|
|
9
|
-
constructor(name: string, validator?:
|
|
10
|
-
errorPath: string;
|
|
11
|
-
});
|
|
10
|
+
constructor(name: string, validator?: FieldBaseValidator<FieldValue, EditorValue> | FieldAsyncBaseValidator<FieldValue, EditorValue>, message?: FieldValidationMessage<FieldValue, EditorValue>, options?: FieldValidationDescriptorOptsType);
|
|
12
11
|
get name(): string;
|
|
13
|
-
get validator():
|
|
14
|
-
get message(): FieldValidationMessage | undefined;
|
|
15
|
-
get options():
|
|
16
|
-
|
|
17
|
-
} | undefined;
|
|
18
|
-
copy(): FieldValidationDescriptor;
|
|
12
|
+
get validator(): FieldBaseValidator<FieldValue, EditorValue> | FieldAsyncBaseValidator<FieldValue, EditorValue> | undefined;
|
|
13
|
+
get message(): FieldValidationMessage<FieldValue, EditorValue> | undefined;
|
|
14
|
+
get options(): FieldValidationDescriptorOptsType<string> | undefined;
|
|
15
|
+
copy(): FieldValidationDescriptor<FieldValue, EditorValue>;
|
|
19
16
|
}
|
|
@@ -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';
|
|
@@ -47,6 +47,12 @@ export type FieldInputDatePickerOptsType = {
|
|
|
47
47
|
max?: Date;
|
|
48
48
|
showTime?: boolean;
|
|
49
49
|
showSeconds?: boolean;
|
|
50
|
+
} & DateOptsType;
|
|
51
|
+
export type DateOptsType = {
|
|
52
|
+
asDateObj?: boolean;
|
|
53
|
+
utc?: boolean;
|
|
54
|
+
noTime?: boolean;
|
|
55
|
+
noTimeZone?: boolean;
|
|
50
56
|
};
|
|
51
57
|
export type FieldInputFileOpts = {
|
|
52
58
|
multiple?: boolean;
|
|
@@ -84,6 +90,10 @@ export declare class FieldInputDescriptor<EditorModel, FieldModel = FieldInputDe
|
|
|
84
90
|
private _datePickerMax?;
|
|
85
91
|
private _datePickerShowTime?;
|
|
86
92
|
private _datePickerShowSeconds?;
|
|
93
|
+
private _datePickerValueUtc?;
|
|
94
|
+
private _datePickerValueNoTimezone?;
|
|
95
|
+
private _datePickerValueNoTime?;
|
|
96
|
+
private _datePickerValueAsDateObj?;
|
|
87
97
|
private _maxLength?;
|
|
88
98
|
private _minLength?;
|
|
89
99
|
private _pattern?;
|
|
@@ -99,7 +109,7 @@ export declare class FieldInputDescriptor<EditorModel, FieldModel = FieldInputDe
|
|
|
99
109
|
private _customComponentType?;
|
|
100
110
|
private _customComponentInputs?;
|
|
101
111
|
private _customComponentWrappers?;
|
|
102
|
-
constructor(editor:
|
|
112
|
+
constructor(editor: IEditorDescriptor<EditorModel>, property: string);
|
|
103
113
|
/**
|
|
104
114
|
* converts field to given type with additional arguments
|
|
105
115
|
* @param fieldType field type enum
|
|
@@ -121,6 +131,10 @@ export declare class FieldInputDescriptor<EditorModel, FieldModel = FieldInputDe
|
|
|
121
131
|
get datePickerMax(): Date | undefined;
|
|
122
132
|
get datePickerShowTime(): boolean | undefined;
|
|
123
133
|
get datePickerShowSeconds(): boolean | undefined;
|
|
134
|
+
get datePickerValueUtc(): boolean | undefined;
|
|
135
|
+
get datePickerValueNoTimezone(): boolean | undefined;
|
|
136
|
+
get datePickerValueNoTime(): boolean | undefined;
|
|
137
|
+
get datePickerValueAsDateObj(): boolean | undefined;
|
|
124
138
|
get maxLength(): number | undefined;
|
|
125
139
|
get minLength(): number | undefined;
|
|
126
140
|
get pattern(): string | RegExp | undefined;
|
|
@@ -162,6 +176,7 @@ export declare class FieldInputDescriptor<EditorModel, FieldModel = FieldInputDe
|
|
|
162
176
|
withNumberGrouping(useGrouping?: boolean): this;
|
|
163
177
|
withTextValidation(opts?: FieldInputTextValidationOptsType): this;
|
|
164
178
|
withInputTrim(trimOption?: InputTrimType): this;
|
|
179
|
+
withDateValue(opts?: DateOptsType): this;
|
|
165
180
|
withTextValidationEmail(email?: boolean): this;
|
|
166
181
|
withFileOnSelectHandler(fn?: FieldInputFileOnSelectHandlerFnType): this;
|
|
167
182
|
copy(): FieldInputDescriptor<EditorModel, FieldModel, FieldValue>;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { FieldValidator } from '../models/field.model';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
2
|
+
export declare const minDateValidationName = "minDate";
|
|
3
|
+
export declare const minDateValidator: (min: Date) => FieldValidator<Date | string | number | undefined | null, any>;
|
|
4
|
+
export declare const maxDateValidationName = "maxDate";
|
|
5
|
+
export declare const maxDateValidator: (max: Date | string | number) => FieldValidator<Date | string | number | undefined | null, any>;
|
|
6
|
+
export declare const emailValidationName = "email";
|
|
7
|
+
export declare const emailValidator: () => FieldValidator<string | undefined | null, any>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { ArrayItemType, EnumConstantType,
|
|
1
|
+
import { ArrayItemType, EnumConstantType, ITableviewDescriptor, IdType, Nullable } from '@mediusinc/mng-commons/core';
|
|
2
2
|
import { EnumDescriptor, TypeDescriptor } from '@mediusinc/mng-commons/model';
|
|
3
3
|
import { ITableDataProvider, ITableDescriptorInternal } from '@mediusinc/mng-commons/table/api';
|
|
4
4
|
import { AFieldDescriptor } from '../descriptors/field-base.descriptor';
|
|
5
5
|
import { FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupProviderType } from '../descriptors/field-lookup.descriptor';
|
|
6
6
|
import { FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor } from '../descriptors/field-many.descriptor';
|
|
7
|
+
import { FieldValidationDescriptorOptsType } from '../descriptors/field-validation.descriptor';
|
|
7
8
|
import { FieldInputDescriptor, FieldInputDescriptorType } from '../descriptors/field.descriptor';
|
|
8
9
|
import { TableviewEditorTypeEnum } from './editor.model';
|
|
10
|
+
import { FormValidationMessage, FormValidator } from './field.model';
|
|
9
11
|
export interface IFieldsManageInterface<EditorModel> {
|
|
10
12
|
getField(property: keyof EditorModel, editorType: TableviewEditorTypeEnum): AFieldDescriptor<any, EditorModel> | null;
|
|
11
13
|
getFieldUnsafe(property: string, editorType: TableviewEditorTypeEnum): AFieldDescriptor<any, EditorModel> | null;
|
|
@@ -25,10 +27,10 @@ export interface IFieldsManageInterface<EditorModel> {
|
|
|
25
27
|
addFieldLookupWithProviderAndOptionsValuePropertyUnsafe<Service, FieldModel, FieldValue = FieldModel>(property: string, provider: FieldLookupProviderType<FieldModel, Service>, type: TypeDescriptor<FieldModel>, lookupOptionsValueProperty: string): FieldLookupDescriptor<FieldModel, EditorModel, Service, FieldValue>;
|
|
26
28
|
addFieldLookupEnum<Property extends keyof EditorModel, Enum extends NonNullable<EditorModel[Property]>>(property: keyof EditorModel, enumModel: EnumDescriptor<Enum>, options?: Array<Enum>): FieldLookupEnumDescriptor<Enum, EditorModel>;
|
|
27
29
|
addFieldLookupEnumUnsafe<Enum = EnumConstantType>(property: string, enumModel: EnumDescriptor<Enum>, options?: Array<Enum>): FieldLookupEnumDescriptor<Enum, EditorModel>;
|
|
28
|
-
addFieldManyEditor<Property extends keyof EditorModel, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property, tableviewDescriptor:
|
|
29
|
-
addFieldManyEditorUnsafe<FieldModel, FieldValue = FieldModel[]>(property: string, tableviewDescriptor:
|
|
30
|
-
addFieldManyToManyEditor<Property extends keyof EditorModel, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property, mainTableDescriptor: ITableDescriptorInternal<FieldModel>, lookupTableDescriptor: ITableDescriptorInternal<FieldModel>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel,
|
|
31
|
-
addFieldManyToManyEditorUnsafe<FieldModel, FieldValue = FieldModel[]>(property: string, mainTableDescriptor: ITableDescriptorInternal<FieldModel>, lookupTableDescriptor: ITableDescriptorInternal<FieldModel>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel,
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
addFieldManyEditor<Property extends keyof EditorModel, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property, tableviewDescriptor: ITableviewDescriptor<FieldModel, any, any>): FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue>;
|
|
31
|
+
addFieldManyEditorUnsafe<FieldModel, FieldValue = FieldModel[]>(property: string, tableviewDescriptor: ITableviewDescriptor<FieldModel, any, any>): FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue>;
|
|
32
|
+
addFieldManyToManyEditor<Property extends keyof EditorModel, Service, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property, mainTableDescriptor: ITableDescriptorInternal<FieldModel>, lookupTableDescriptor: ITableDescriptorInternal<FieldModel>, lookupDataProvider: ITableDataProvider<FieldModel, Service>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Service, FieldValue>;
|
|
33
|
+
addFieldManyToManyEditorUnsafe<FieldModel, Service, FieldValue = FieldModel[]>(property: string, mainTableDescriptor: ITableDescriptorInternal<FieldModel>, lookupTableDescriptor: ITableDescriptorInternal<FieldModel>, lookupDataProvider: ITableDataProvider<FieldModel, Service>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Service, FieldValue>;
|
|
34
|
+
withValidation<Value = EditorModel>(name: string, validator?: FormValidator<Value>, message?: FormValidationMessage<Value>, opts?: FieldValidationDescriptorOptsType<keyof EditorModel>): this;
|
|
35
|
+
withValidationUnsafe<Value = EditorModel>(name: string, validator?: FormValidator<Value>, message?: FormValidationMessage<Value>, opts?: FieldValidationDescriptorOptsType): this;
|
|
34
36
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
|
-
import { AbstractControl,
|
|
3
|
-
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
2
|
+
import { AbstractControl, FormControl, FormGroup } from '@angular/forms';
|
|
4
3
|
import { Observable } from 'rxjs';
|
|
4
|
+
import { CommonsFormlyFieldConfig } from './formly-field.model';
|
|
5
5
|
export declare enum FieldSizeEnum {
|
|
6
6
|
Small = 0,
|
|
7
7
|
Normal = 1,
|
|
@@ -49,13 +49,22 @@ export declare enum FieldGroupTypeEnum {
|
|
|
49
49
|
Fieldset = 0,
|
|
50
50
|
Logical = 1
|
|
51
51
|
}
|
|
52
|
-
export type
|
|
52
|
+
export type FieldBaseValidator<Value, FormValue, Control extends AbstractControl = AbstractControl> = (control: Control, field: CommonsFormlyFieldConfig<Value, FormValue>, options?: {
|
|
53
53
|
[id: string]: any;
|
|
54
|
-
}) =>
|
|
55
|
-
export type
|
|
54
|
+
}) => boolean;
|
|
55
|
+
export type FieldValidator<Value, FormValue, Control extends AbstractControl = FormControl<Value>> = FieldBaseValidator<Value, FormValue, Control>;
|
|
56
|
+
export type FormValidator<Value, Control extends AbstractControl = FormGroup<{
|
|
57
|
+
[K in keyof Value]: AbstractControl<Value[K]>;
|
|
58
|
+
}>> = FieldBaseValidator<Value, Value, Control>;
|
|
59
|
+
export type FieldAsyncBaseValidator<Value, FormValue, Control extends AbstractControl = AbstractControl> = (control: Control, field: CommonsFormlyFieldConfig<Value, FormValue>, options?: {
|
|
56
60
|
[id: string]: any;
|
|
57
|
-
}) => Observable<
|
|
58
|
-
export type
|
|
61
|
+
}) => Observable<boolean>;
|
|
62
|
+
export type FieldAsyncValidator<Value, FormValue, Control extends AbstractControl = FormControl<Value>> = FieldAsyncBaseValidator<Value, FormValue, Control>;
|
|
63
|
+
export type FormAsyncValidator<Value, Control extends AbstractControl = FormGroup<{
|
|
64
|
+
[K in keyof Value]: AbstractControl;
|
|
65
|
+
}>> = FieldAsyncBaseValidator<Value, Value, Control>;
|
|
66
|
+
export type FieldValidationMessage<Value, FormValue> = string | ((error: any, field: CommonsFormlyFieldConfig<Value, FormValue>) => string | Observable<string>);
|
|
67
|
+
export type FormValidationMessage<Value> = FieldValidationMessage<Value, Value>;
|
|
59
68
|
export interface FieldConfig {
|
|
60
69
|
}
|
|
61
70
|
export interface FieldLookupConfig extends FieldConfig {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
|
+
import { FieldType } from '@ngx-formly/core';
|
|
3
|
+
import { IFormEditorComponent } from './form-editor.interface';
|
|
2
4
|
export interface FormEditorSubmitEvent<Item> {
|
|
3
5
|
formItem: Item;
|
|
4
6
|
success: boolean;
|
|
@@ -43,13 +45,13 @@ export interface FieldEventData<ET> {
|
|
|
43
45
|
}
|
|
44
46
|
export interface FormFieldEvent<T, ET> {
|
|
45
47
|
type: FormFieldEventTypeEnum;
|
|
46
|
-
componentType: Type<
|
|
47
|
-
componentInstance:
|
|
48
|
+
componentType: Type<FieldType>;
|
|
49
|
+
componentInstance: FieldType;
|
|
48
50
|
data?: FormFieldEventData<T, ET>;
|
|
49
51
|
}
|
|
50
52
|
export interface FormEvent<ET> {
|
|
51
53
|
type: FormEventTypeEnum;
|
|
52
|
-
componentType: Type<
|
|
53
|
-
componentInstance:
|
|
54
|
+
componentType: Type<IFormEditorComponent<ET>>;
|
|
55
|
+
componentInstance: IFormEditorComponent<ET>;
|
|
54
56
|
data?: FieldEventData<ET>;
|
|
55
57
|
}
|
|
@@ -1,10 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { InputSignal, WritableSignal } from '@angular/core';
|
|
2
|
+
import { AbstractControl, FormGroup, UntypedFormGroup } from '@angular/forms';
|
|
3
|
+
import { FormlyFieldConfig, FormlyFormOptions } from '@ngx-formly/core';
|
|
4
|
+
import { Message } from 'primeng/api';
|
|
5
|
+
import { EditorDescriptorInst } from '../descriptors/editor.descriptor';
|
|
6
|
+
export interface CommonsFormlyFormOptions<Item> {
|
|
7
|
+
formState?: {
|
|
8
|
+
descriptor?: EditorDescriptorInst<Item>;
|
|
9
|
+
add: boolean;
|
|
10
|
+
edit: boolean;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export type FormEditorResetFormModelOpts = {
|
|
15
|
+
markAsPristine?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export interface IFormEditorComponent<Item> {
|
|
18
|
+
descriptor: InputSignal<EditorDescriptorInst<Item>>;
|
|
19
|
+
isFormDisabled: InputSignal<boolean>;
|
|
20
|
+
formMessages: WritableSignal<Message[]>;
|
|
21
|
+
get form(): FormGroup<{
|
|
22
|
+
[K in keyof Item]: AbstractControl<Item[K]>;
|
|
23
|
+
}>;
|
|
24
|
+
get formUnsafe(): UntypedFormGroup;
|
|
25
|
+
get formlyOptions(): FormlyFormOptions & CommonsFormlyFormOptions<Item>;
|
|
26
|
+
get formlyFields(): FormlyFieldConfig[];
|
|
27
|
+
get formlyInitialItem(): any;
|
|
3
28
|
submit(): void;
|
|
4
|
-
getFormValue():
|
|
5
|
-
resetFormModel(item?:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
29
|
+
getFormValue(): Item;
|
|
30
|
+
resetFormModel(item?: Item, opts?: FormEditorResetFormModelOpts): void;
|
|
31
|
+
getField(key: keyof Item): AbstractControl | null;
|
|
32
|
+
getFieldUnsafe(key: string): AbstractControl | null;
|
|
33
|
+
setFieldValue<Property extends keyof Item>(key: Property, value: Item[Property]): boolean;
|
|
34
|
+
setFieldValueUnsafe(key: string, value: any): boolean;
|
|
35
|
+
patchFieldValue<Property extends keyof Item>(key: Property, value: Item[Property]): boolean;
|
|
36
|
+
patchFieldValueUnsafe(key: string, value: any): boolean;
|
|
37
|
+
resetFieldValue<Property extends keyof Item>(key: Property, value?: Item[Property]): boolean;
|
|
38
|
+
resetFieldValueUnsafe(key: string, value?: any): boolean;
|
|
10
39
|
}
|
|
@@ -18,7 +18,7 @@ export declare abstract class AFormlyCustomFieldComponent extends FieldType<Comm
|
|
|
18
18
|
get options(): FormlyFormOptions;
|
|
19
19
|
get key(): string | number | (string | number)[];
|
|
20
20
|
get formControl(): AbstractControl<any, any>;
|
|
21
|
-
get props(): import("./formly-field.model").CommonsFormlyFieldProps
|
|
21
|
+
get props(): import("./formly-field.model").CommonsFormlyFieldProps<any, any>;
|
|
22
22
|
get showError(): boolean;
|
|
23
23
|
get id(): string;
|
|
24
24
|
get formState(): any;
|