@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,116 +0,0 @@
|
|
|
1
|
-
import { HttpErrorResponse } from '@angular/common/http';
|
|
2
|
-
import { LogLevelEnum } from '../log/log.model';
|
|
3
|
-
import { ACommonsErrorBase, ICommonsActionError } from './error.model';
|
|
4
|
-
export declare class ErrorUtil {
|
|
5
|
-
/**
|
|
6
|
-
* Converts RxJS subscription error to CommonsError.
|
|
7
|
-
* @param error Error.
|
|
8
|
-
* @param name Optional name to write in commons error.
|
|
9
|
-
* @param details Optional details of error.
|
|
10
|
-
*/
|
|
11
|
-
static fromSubscribeError(error: any, name?: string, details?: any): ACommonsErrorBase;
|
|
12
|
-
/**
|
|
13
|
-
* Checks if error is Http error (Angular or Commons).
|
|
14
|
-
* @param error
|
|
15
|
-
*/
|
|
16
|
-
static isHttpErrorResponse(error: any): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Gets HttpErrorResponse from error (Angular or Commons).
|
|
19
|
-
* @param error Error.
|
|
20
|
-
*/
|
|
21
|
-
static getHttpErrorResponse(error: any): HttpErrorResponse | null;
|
|
22
|
-
/**
|
|
23
|
-
* Gets HttpErrorResponse status from error (Angular or Commons).
|
|
24
|
-
* @param error Error.
|
|
25
|
-
*/
|
|
26
|
-
static getHttpErrorResponseStatus(error: any): number | null;
|
|
27
|
-
/**
|
|
28
|
-
* Get error log level. All is error, except if error is http error with status >=400 and <500.
|
|
29
|
-
* @param error Error.
|
|
30
|
-
*/
|
|
31
|
-
static getErrorLogLevel(error: any): LogLevelEnum;
|
|
32
|
-
/**
|
|
33
|
-
* Get error name (prototype name or type from commons error if name is not provided).
|
|
34
|
-
* @param error Error.
|
|
35
|
-
*/
|
|
36
|
-
static getErrorName(error: any): string;
|
|
37
|
-
/**
|
|
38
|
-
* Writes http error to string with all headers and body.
|
|
39
|
-
* @param error Http response error.
|
|
40
|
-
* @param opts Options for hiding parts of error:
|
|
41
|
-
* - hideMessage Hides message of error (message include url, status and status text!).
|
|
42
|
-
* - hideHeaders Hides headers.
|
|
43
|
-
* - hideBody Hides JSON representation of body.
|
|
44
|
-
*/
|
|
45
|
-
static httpErrorResponseToString(error: HttpErrorResponse, opts?: HttpErrorResponseToStringOptionsType): string;
|
|
46
|
-
/**
|
|
47
|
-
* Error to string.
|
|
48
|
-
* @param error Error.
|
|
49
|
-
* @param opts Options for hiding parts of error:
|
|
50
|
-
* - hideMessage Hides message of error.
|
|
51
|
-
* - hideName Hides error name.
|
|
52
|
-
* - hideCause Hides cause of an error (if present, see @link(errorCauseToString) for other options).
|
|
53
|
-
* - hideStack Hides stack of an error (if present).
|
|
54
|
-
* - hideDetails Hides JSON detail's representation of error (if present).
|
|
55
|
-
* - hideLocation Hides location (URL) where error was thrown.
|
|
56
|
-
* - hideHttp Hides http error portion of error if http error response (see @link(httpErrorResponseToString) for other options).
|
|
57
|
-
*/
|
|
58
|
-
static errorToString(error: Error, opts?: ErrorToStringOptionsType): string;
|
|
59
|
-
/**
|
|
60
|
-
* Commons error to string.
|
|
61
|
-
* @param error Commons error.
|
|
62
|
-
* @param opts Options for hiding parts of error:
|
|
63
|
-
* - hideMessage Hides message of error.
|
|
64
|
-
* - hideName Hides error name.
|
|
65
|
-
* - hideCause Hides cause of an error (if present, see @link(errorCauseToString) for other options).
|
|
66
|
-
* - hideStack Hides stack of an error (if present).
|
|
67
|
-
* - hideDetails Hides JSON detail's representation of error (if present).
|
|
68
|
-
* - hideLocation Hides location (URL) where error was thrown.
|
|
69
|
-
* - hideHttp Hides http error portion of error if http error response (see @link(httpErrorResponseToString) for other options).
|
|
70
|
-
* - hideItems Hides all item information (http body, action context data).
|
|
71
|
-
* - hideActionData See @link(commonsActionErrorContextToString) for additional info.
|
|
72
|
-
* - hideQueryParams See @link(commonsActionErrorContextToString) for additional info.
|
|
73
|
-
*/
|
|
74
|
-
static commonsErrorToString(error: ACommonsErrorBase, opts?: ErrorToStringOptionsType): string;
|
|
75
|
-
/**
|
|
76
|
-
* Writes commons action error info from context as string.
|
|
77
|
-
* @param error Commons action error.
|
|
78
|
-
* @param opts Options for hiding parts of error:
|
|
79
|
-
* - hideItems Hides all item related information (item, form item, submit item, ...).
|
|
80
|
-
* - hideActionData Hides action data.
|
|
81
|
-
* - hideQueryParams Hides query params.
|
|
82
|
-
*/
|
|
83
|
-
static commonsActionErrorContextToString(error: ICommonsActionError, opts?: ActionErrorContextToStringOptionsType): string;
|
|
84
|
-
/**
|
|
85
|
-
* Writes cause of an error as string.
|
|
86
|
-
* @param error Error.
|
|
87
|
-
* @param opts Options for hiding parts of error:
|
|
88
|
-
* - causeOnErrorOnly Prints only if cause is instance of error.
|
|
89
|
-
* - causeAsJson Print error cause as a JSON (by default, if error only message and name will be printed).
|
|
90
|
-
*/
|
|
91
|
-
static errorCauseToString(error: Error, opts?: ErrorCauseToStringOptionsType): string;
|
|
92
|
-
}
|
|
93
|
-
export type ErrorToStringOptionsType = ErrorToStringOptionsBaseType & HttpErrorResponseToStringOptionsType & ActionErrorContextToStringOptionsType & ErrorCauseToStringOptionsType & {
|
|
94
|
-
hideDetails?: boolean;
|
|
95
|
-
hideLocation?: boolean;
|
|
96
|
-
};
|
|
97
|
-
export interface ErrorToStringOptionsBaseType {
|
|
98
|
-
hideName?: boolean;
|
|
99
|
-
hideStack?: boolean;
|
|
100
|
-
hideCause?: boolean;
|
|
101
|
-
hideHttp?: boolean;
|
|
102
|
-
}
|
|
103
|
-
export interface HttpErrorResponseToStringOptionsType {
|
|
104
|
-
hideMessage?: boolean;
|
|
105
|
-
hideHeaders?: boolean;
|
|
106
|
-
hideBody?: boolean;
|
|
107
|
-
}
|
|
108
|
-
export interface ActionErrorContextToStringOptionsType {
|
|
109
|
-
hideItems?: boolean;
|
|
110
|
-
hideActionData?: boolean;
|
|
111
|
-
hideQueryParams?: boolean;
|
|
112
|
-
}
|
|
113
|
-
export interface ErrorCauseToStringOptionsType {
|
|
114
|
-
causeOnErrorOnly?: boolean;
|
|
115
|
-
causeAsJson?: boolean;
|
|
116
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { APermissions, Permissions } from './permissions.model';
|
|
2
|
-
export declare class PermissionUtil {
|
|
3
|
-
static isPermitted(permissions: APermissions, userRoles: Array<string>): boolean;
|
|
4
|
-
static isRbacPermitted(permissions: Permissions.Roles, userRoles: Array<string>): boolean;
|
|
5
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export type toIsoStringTypeOptType = 'date' | 'date-time' | 'dateTime';
|
|
2
|
-
export type toIsoStringDateTimeOptsType = {
|
|
3
|
-
utc?: boolean;
|
|
4
|
-
noTimezone?: boolean;
|
|
5
|
-
noMillis?: boolean;
|
|
6
|
-
};
|
|
7
|
-
export declare class DateUtil {
|
|
8
|
-
private static readonly NG_PRIME_FORMAT_SUPPORTED;
|
|
9
|
-
private static readonly NG_PRIME_FORMAT_OTHER;
|
|
10
|
-
private static readonly NG_PRIME_FORMAT_MAP;
|
|
11
|
-
private static padNumber;
|
|
12
|
-
static toIsoString(value: string | number | Date, type?: 'date'): string;
|
|
13
|
-
static toIsoString(value: string | number | Date, type: 'date-time' | 'dateTime', dateTimeOpts?: toIsoStringDateTimeOptsType): string;
|
|
14
|
-
static toIsoString(value: undefined | null | unknown, type?: 'date'): null;
|
|
15
|
-
static toIsoString(value: undefined | null | unknown, type: 'date-time' | 'dateTime', dateTimeOpts?: toIsoStringDateTimeOptsType): null;
|
|
16
|
-
static toIsoString(value: unknown, type?: toIsoStringTypeOptType, dateTimeOpts?: toIsoStringDateTimeOptsType): string | null;
|
|
17
|
-
static fromAngularToPrimeDateFormat(ngDateFormat: string): string;
|
|
18
|
-
static fromAngularDateFormatHasTime(ngDateFormat: string): boolean;
|
|
19
|
-
static fromAngularDateFormatHasSeconds(ngDateFormat: string): boolean;
|
|
20
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { ICommonsError } from '../error/error.model';
|
|
4
|
-
import { ClassType } from '../models/class-service.model';
|
|
5
|
-
export declare namespace I18nUtils {
|
|
6
|
-
class Common {
|
|
7
|
-
static getAsync(translate: TranslateService, params?: any, ...keys: Array<string>): Observable<string | null>;
|
|
8
|
-
static get(translate: TranslateService, params?: any, ...keys: Array<string>): string | null;
|
|
9
|
-
static populateParams(item?: any, params?: any): any;
|
|
10
|
-
static selectI18n(keys: string[], i18n: any): string | null;
|
|
11
|
-
}
|
|
12
|
-
class Type {
|
|
13
|
-
static getClassNameAsync(translate: TranslateService, classType: ClassType<any>, singular?: boolean): Observable<string | null>;
|
|
14
|
-
static getClassName(translate: TranslateService, classType: ClassType<any>, singular?: boolean): string | null;
|
|
15
|
-
static getNameAsync(translate: TranslateService, typeName: string, singular?: boolean): Observable<string | null>;
|
|
16
|
-
static getName(translate: TranslateService, typeName: string, singular?: boolean): string | null;
|
|
17
|
-
static getClassTabKey(classType: ClassType<any>, tab: string): string;
|
|
18
|
-
static getTabKey(typeName: string, tab: string): string;
|
|
19
|
-
static getClassGroupKey(classType: ClassType<any>, group: string): string;
|
|
20
|
-
static getGroupKey(typeName: string, group: string): string;
|
|
21
|
-
static getClassPropertyKey(classType: ClassType<any>, property: string): string;
|
|
22
|
-
static getPropertyKey(typeName: string, property: string): string;
|
|
23
|
-
static getClassPath(classType: ClassType<any>, ...path: Array<string>): string;
|
|
24
|
-
static getPath(typeName: string, ...path: Array<string>): string;
|
|
25
|
-
static getClassParams(translate: TranslateService, classType: ClassType<any>, item: any, params?: any): any;
|
|
26
|
-
static getParams(translate: TranslateService, typeName?: string, item?: any, params?: any): any;
|
|
27
|
-
static getClassParamsAsync(translate: TranslateService, classType: ClassType<any>, item?: any, params?: any): Observable<any>;
|
|
28
|
-
static getParamsAsync(translate: TranslateService, typeName?: string, item?: any, params?: any): Observable<any>;
|
|
29
|
-
static populateParams(i18nTypeName?: string, item?: any, params?: any): any;
|
|
30
|
-
private static getNameKeys;
|
|
31
|
-
}
|
|
32
|
-
class Error {
|
|
33
|
-
static get(translate: TranslateService, error: ICommonsError, params?: any): string | null;
|
|
34
|
-
static getParams(error: ICommonsError, params?: any): any;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ClassType } from '../models/class-service.model';
|
|
2
|
-
interface DeepCopyPropsOptions {
|
|
3
|
-
mapGettersToProperties?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export interface DeepCopyOptions<P = object> extends DeepCopyPropsOptions {
|
|
6
|
-
objectPrototype?: ClassType<P>;
|
|
7
|
-
}
|
|
8
|
-
export declare class ObjectUtil {
|
|
9
|
-
static deepCopy<T = object, P = object>(obj: T, options: DeepCopyOptions<P> & {
|
|
10
|
-
mapGettersToProperties: true;
|
|
11
|
-
}): T | Record<string, any>;
|
|
12
|
-
static deepCopy<T = object, P = object>(obj: T, options: DeepCopyOptions<P> & {
|
|
13
|
-
objectPrototype: ClassType<P>;
|
|
14
|
-
} & {
|
|
15
|
-
mapGettersToProperties?: false;
|
|
16
|
-
}): P;
|
|
17
|
-
static deepCopy<T = object, P = object>(obj: T, options: DeepCopyOptions<P> & {
|
|
18
|
-
objectPrototype: ClassType<P>;
|
|
19
|
-
} & {
|
|
20
|
-
mapGettersToProperties: true;
|
|
21
|
-
}): P | Record<string, any>;
|
|
22
|
-
static deepCopy<T = object, P = object>(obj: T, options?: DeepCopyOptions<P>): T;
|
|
23
|
-
static deepMerge(target: Record<string, any>, source: Record<string, any>): Record<string, any>;
|
|
24
|
-
private static isObject;
|
|
25
|
-
private static handleProp;
|
|
26
|
-
static getProperties(obj: object): string[];
|
|
27
|
-
static getGetters(obj: any): string[];
|
|
28
|
-
static getPropertyByPath(value: any, path: string): any | undefined;
|
|
29
|
-
static flattenObjectKeys(objectModel: any): string[];
|
|
30
|
-
}
|
|
31
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { MenuItem as PrimeMenuItem } from 'primeng/api';
|
|
2
|
-
import { CommonsMenuItem } from '../models/menu.model';
|
|
3
|
-
export declare class RouteUtil {
|
|
4
|
-
static removeEmptyPathSegments(path: Array<string>): string[];
|
|
5
|
-
static appendPathToBasePath(basePath: Array<string>, path: Array<string>): string[];
|
|
6
|
-
static doesUrlMatchRouterLink(link: Array<string> | string, url: Array<string> | string): boolean;
|
|
7
|
-
static adjustMenuLazyChildrenRouterLinks(rootMenuItem: PrimeMenuItem, lazyChildren: Array<CommonsMenuItem>): {
|
|
8
|
-
index?: number | undefined;
|
|
9
|
-
key?: string | undefined;
|
|
10
|
-
id?: string | undefined;
|
|
11
|
-
positionIndex?: number | undefined;
|
|
12
|
-
label?: string | undefined;
|
|
13
|
-
icon?: string | undefined;
|
|
14
|
-
items?: CommonsMenuItem[] | undefined;
|
|
15
|
-
guards?: any[] | undefined;
|
|
16
|
-
permissions?: import("@mediusinc/mng-commons/core").APermissions | undefined;
|
|
17
|
-
separator?: boolean | undefined;
|
|
18
|
-
className?: string | undefined;
|
|
19
|
-
badge?: string | undefined;
|
|
20
|
-
badgeClassName?: string | undefined;
|
|
21
|
-
visible?: boolean | undefined;
|
|
22
|
-
disabled?: boolean | undefined;
|
|
23
|
-
routerLink?: string | string[] | null | undefined;
|
|
24
|
-
href?: string | undefined;
|
|
25
|
-
target?: string | undefined;
|
|
26
|
-
queryParams?: {
|
|
27
|
-
[k: string]: any;
|
|
28
|
-
} | undefined;
|
|
29
|
-
fragment?: string | undefined;
|
|
30
|
-
queryParamsHandling?: import("@angular/router").QueryParamsHandling | undefined;
|
|
31
|
-
preserveFragment?: boolean | undefined;
|
|
32
|
-
skipLocationChange?: boolean | undefined;
|
|
33
|
-
replaceUrl?: boolean | undefined;
|
|
34
|
-
updated?: boolean | undefined;
|
|
35
|
-
lazyChildren?: boolean | undefined;
|
|
36
|
-
}[];
|
|
37
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare class StringUtil {
|
|
2
|
-
static escapeHtml(value: string): any;
|
|
3
|
-
static escapeHtmlAny(value?: any): any;
|
|
4
|
-
/**
|
|
5
|
-
* Stringifies a value - primitives with toString, dates with dateUtil, objects with JSON.stringify.
|
|
6
|
-
* @param value Any value.
|
|
7
|
-
*/
|
|
8
|
-
static stringify(value: any): string;
|
|
9
|
-
}
|