@creatio-devkit/common 0.803.1 → 0.804.0
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/CHANGELOG.md +8 -2
- package/README.md +16 -20
- package/creatio-devkit-common.d.ts +376 -38
- package/esm2020/creatio-devkit-common.mjs +1 -1
- package/esm2020/index.mjs +1 -1
- package/esm2020/lib/external/functions/aggregation-adapter.mjs +1 -1
- package/esm2020/lib/external/functions/index.mjs +1 -1
- package/esm2020/lib/external/models/attribute-value-config.mjs +1 -1
- package/esm2020/lib/external/models/date-time/grouped-date-value.mjs +1 -1
- package/esm2020/lib/external/models/date-time/index.mjs +1 -1
- package/esm2020/lib/external/models/file-value.model.mjs +1 -1
- package/esm2020/lib/external/models/index.mjs +1 -1
- package/esm2020/lib/external/models/model-init-config.mjs +1 -1
- package/esm2020/lib/index.mjs +2 -2
- package/esm2020/lib/internal/constants/index.mjs +1 -1
- package/esm2020/lib/internal/constants/metadata.const.mjs +5 -1
- package/esm2020/lib/internal/decorators/converter/converter.decorator.mjs +1 -1
- package/esm2020/lib/internal/decorators/converter/index.mjs +1 -1
- package/esm2020/lib/internal/decorators/design-time-view-element/design-time-view-element.decorator.mjs +1 -1
- package/esm2020/lib/internal/decorators/design-time-view-element/index.mjs +1 -1
- package/esm2020/lib/internal/decorators/implement-using-handler-chain/implement-using-handler-chain.decorator.mjs +1 -1
- package/esm2020/lib/internal/decorators/implement-using-handler-chain/index.mjs +1 -1
- package/esm2020/lib/internal/decorators/index.mjs +2 -3
- package/esm2020/lib/internal/decorators/request/index.mjs +1 -1
- package/esm2020/lib/internal/decorators/request/request.decorator.mjs +1 -1
- package/esm2020/lib/internal/enums/data-schema-attribute-type.enum.mjs +20 -0
- package/esm2020/lib/internal/enums/data-source-scope.enum.mjs +1 -1
- package/esm2020/lib/internal/enums/designer-group-type.enum.mjs +1 -1
- package/esm2020/lib/internal/enums/handler-source-type.enum.mjs +11 -0
- package/esm2020/lib/internal/enums/index.mjs +3 -1
- package/esm2020/lib/internal/enums/model-in-page-action.enum.mjs +1 -1
- package/esm2020/lib/internal/enums/view-element-group-type.enum.mjs +1 -2
- package/esm2020/lib/internal/esq/data-model/index.mjs +1 -1
- package/esm2020/lib/internal/esq/data-model/metadata-provider/metadata-provider.mjs +1 -1
- package/esm2020/lib/internal/esq/data-model/queries/base-filterable-query.mjs +1 -1
- package/esm2020/lib/internal/esq/data-model/queries/base-query.mjs +1 -1
- package/esm2020/lib/internal/esq/data-model/queries/delete-query.mjs +1 -1
- package/esm2020/lib/internal/esq/data-model/queries/entity-schema-query.mjs +1 -1
- package/esm2020/lib/internal/esq/data-model/queries/index.mjs +1 -1
- package/esm2020/lib/internal/esq/data-model/queries/insert-query.mjs +1 -1
- package/esm2020/lib/internal/esq/data-model/queries/query-operation-type.mjs +1 -1
- package/esm2020/lib/internal/esq/data-model/queries/update-query.mjs +1 -1
- package/esm2020/lib/internal/esq/index.mjs +1 -1
- package/esm2020/lib/internal/model/data-schema/data-schema-attribute-aggregation-config.mjs +2 -0
- package/esm2020/lib/internal/model/data-schema/data-schema-validator-config.mjs +2 -0
- package/esm2020/lib/internal/model/data-source-config.mjs +1 -1
- package/esm2020/lib/internal/model/index.mjs +3 -1
- package/esm2020/lib/internal/models/design-time-view-element-registry-item.mjs +1 -1
- package/esm2020/lib/internal/models/handler-chain-service-registry-item.mjs +1 -1
- package/esm2020/lib/internal/models/index.mjs +3 -3
- package/esm2020/lib/internal/models/interface-designer-item/base-interface-designer-item-registration-config.mjs +1 -1
- package/esm2020/lib/internal/models/interface-designer-item/index.mjs +1 -1
- package/esm2020/lib/internal/models/interface-designer-item/interface-designer-item-registration-config.model.mjs +1 -1
- package/esm2020/lib/internal/models/interface-designer-item/toolbar-view-element-config.mjs +1 -1
- package/esm2020/lib/internal/models/interface-designer-registry-item.mjs +1 -1
- package/esm2020/lib/internal/models/internal-interface-designer-item-registration-config.model.mjs +1 -1
- package/esm2020/lib/internal/models/remote-entry-info.mjs +2 -0
- package/esm2020/lib/internal/models/request/index.mjs +1 -2
- package/esm2020/lib/internal/models/request/method-invoke-request.mjs +1 -1
- package/esm2020/lib/internal/models/request-handler/handler-config.mjs +2 -0
- package/esm2020/lib/internal/models/request-handler/handler-source.mjs +2 -0
- package/esm2020/lib/internal/models/request-handler/index.mjs +3 -2
- package/esm2020/lib/internal/models/request-handler/request-handler-factory.mjs +1 -1
- package/esm2020/lib/internal/models/request-handler/request-handler-registration-config.model.mjs +1 -1
- package/esm2020/lib/internal/models/validator/index.mjs +4 -0
- package/esm2020/lib/internal/models/validator/validator-parameters.mjs +2 -0
- package/esm2020/lib/internal/models/validator/validator-registry-item.mjs +2 -0
- package/esm2020/lib/internal/models/validator/validator-schema-config.model.mjs +2 -0
- package/esm2020/lib/internal/models/view-element/angular-view-element-registration-config.model.mjs +1 -1
- package/esm2020/lib/internal/models/view-element/index.mjs +1 -1
- package/esm2020/lib/internal/models/view-element-registry-item.mjs +1 -1
- package/esm2020/lib/internal/services/base-handler-chain.service.mjs +1 -1
- package/esm2020/lib/internal/services/base-registry/base-registry.mjs +1 -1
- package/esm2020/lib/internal/services/base-registry/index.mjs +1 -1
- package/esm2020/lib/internal/services/bootstrap-notifier/bootstrap-notifier.mjs +2 -3
- package/esm2020/lib/internal/services/bootstrap-notifier/index.mjs +1 -1
- package/esm2020/lib/internal/services/design-time-view-element-registry/design-time-view-element-registry.mjs +1 -1
- package/esm2020/lib/internal/services/design-time-view-element-registry/index.mjs +1 -1
- package/esm2020/lib/internal/services/element-registration-checker/element-registration-checker.mjs +1 -1
- package/esm2020/lib/internal/services/element-registration-checker/index.mjs +1 -1
- package/esm2020/lib/internal/services/global-converters-registry/global-converters-registry.service.mjs +1 -1
- package/esm2020/lib/internal/services/global-converters-registry/index.mjs +1 -1
- package/esm2020/lib/internal/services/handler-chain-services-registry/handler-chain-services-registry.mjs +1 -1
- package/esm2020/lib/internal/services/handler-chain-services-registry/index.mjs +1 -1
- package/esm2020/lib/internal/services/index.mjs +4 -1
- package/esm2020/lib/internal/services/interface-designer-item-registry/index.mjs +1 -1
- package/esm2020/lib/internal/services/interface-designer-item-registry/interface-designer-item-registry.mjs +1 -1
- package/esm2020/lib/internal/services/pkg-topology-registry/index.mjs +2 -0
- package/esm2020/lib/internal/services/pkg-topology-registry/pkg-topology-registry.mjs +18 -0
- package/esm2020/lib/internal/services/remote-entries-registry/index.mjs +2 -0
- package/esm2020/lib/internal/services/remote-entries-registry/remote-entries-registry.mjs +11 -0
- package/esm2020/lib/internal/services/request-handler-registry/index.mjs +1 -1
- package/esm2020/lib/internal/services/request-handler-registry/request-handler-registry.service.mjs +9 -4
- package/esm2020/lib/internal/services/request-registry/index.mjs +1 -1
- package/esm2020/lib/internal/services/request-registry/request-registry.service.mjs +1 -1
- package/esm2020/lib/internal/services/validator-registry/index.mjs +2 -0
- package/esm2020/lib/internal/services/validator-registry/validator-registry.mjs +33 -0
- package/esm2020/lib/internal/services/view-element-registry/index.mjs +1 -1
- package/esm2020/lib/internal/services/view-element-registry/view-element-registry.mjs +1 -1
- package/esm2020/lib/internal/utils/component-config-utils.mjs +12 -0
- package/esm2020/lib/internal/utils/handlers-order-comparer.mjs +42 -0
- package/esm2020/lib/internal/utils/index.mjs +4 -1
- package/esm2020/lib/internal/utils/instantiate.mjs +17 -0
- package/esm2020/lib/internal/utils/localization-utils.mjs +1 -1
- package/esm2020/lib/internal/utils/metadata-utils.mjs +56 -15
- package/esm2020/lib/internal/utils/object-deep-keys/index.mjs +1 -1
- package/esm2020/lib/internal/utils/object-deep-keys/object-deep-keys.mjs +1 -1
- package/esm2020/lib/public/decorators/index.mjs +4 -1
- package/esm2020/lib/public/decorators/inject/index.mjs +2 -0
- package/esm2020/lib/public/decorators/inject/inject.decorator.mjs +19 -0
- package/esm2020/lib/public/decorators/input/index.mjs +1 -1
- package/esm2020/lib/public/decorators/input/input.decorator.mjs +1 -1
- package/esm2020/lib/public/decorators/interface-designer-item/index.mjs +1 -1
- package/esm2020/lib/public/decorators/interface-designer-item/interface-designer-item.decorator.mjs +14 -40
- package/esm2020/lib/public/decorators/module/index.mjs +1 -1
- package/esm2020/lib/public/decorators/module/module.decorator.mjs +4 -4
- package/esm2020/lib/public/decorators/output/index.mjs +1 -1
- package/esm2020/lib/public/decorators/output/output.decorator.mjs +1 -1
- package/esm2020/lib/public/decorators/request-handler/index.mjs +2 -0
- package/esm2020/lib/public/decorators/request-handler/request-handler.decorator.mjs +18 -0
- package/esm2020/lib/public/decorators/validation-input/index.mjs +1 -1
- package/esm2020/lib/public/decorators/validation-input/validation-input.decorator.mjs +1 -1
- package/esm2020/lib/public/decorators/validator/index.mjs +2 -0
- package/esm2020/lib/public/decorators/validator/validator.decorator.mjs +21 -0
- package/esm2020/lib/public/decorators/view-element/index.mjs +1 -1
- package/esm2020/lib/public/decorators/view-element/view-element.decorator.mjs +11 -18
- package/esm2020/lib/public/enums/aggregation-function.enum.mjs +1 -1
- package/esm2020/lib/public/enums/aggregation-type.enum.mjs +1 -1
- package/esm2020/lib/public/enums/data-value-type.enum.mjs +3 -2
- package/esm2020/lib/public/enums/index.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/columns/arithmetic/arithmetic-query-column.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/columns/base-query-column.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/columns/entity-column/entity-query-column.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/columns/functions/aggregation-function-column.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/columns/functions/date-part-function-column.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/columns/functions/length-function-column.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/columns/functions/macros-function-column.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/columns/functions/window-function-column.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/columns/index.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/columns/parameters/parameter-query-column.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/columns/sub-queries/aggregation-sub-query-column.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/columns/sub-queries/sub-query-column.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/enums/aggregation-eval-type.enum.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/enums/arithmetic-operation.enum.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/enums/comparison-type.enum.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/enums/date-part-type.enum.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/enums/expression-type.enum.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/enums/filter-type.enum.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/enums/function-type.enum.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/enums/index.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/enums/logical-operator-type.enum.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/enums/order-direction.enum.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/enums/query-macros-type.enum.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/arithmetic/arithmetic-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/arithmetic/index.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/base-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/columns/column-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/columns/index.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/functions/aggregation-function-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/functions/argument-function-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/functions/date-part-function-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/functions/function-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/functions/index.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/functions/length-function-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/functions/macros-function-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/functions/window-function-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/index.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/mocks/expression.mock.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/mocks/index.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/parameters/index.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/parameters/parameter-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/sub-queries/aggregation-sub-query-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/sub-queries/index.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/expressions/sub-queries/sub-query-expression.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/base-filter.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/between-filter.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/compare-filter.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/exists-filter.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/filter-group.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/in-filter.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/index.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/isnull-filter.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/mocks/filter.mock.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/mocks/index.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/single-filter.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/index.mjs +1 -1
- package/esm2020/lib/public/esq/index.mjs +1 -1
- package/esm2020/lib/public/exceptions/argument-empty-exception.mjs +1 -1
- package/esm2020/lib/public/exceptions/argument-out-of-range-exception.mjs +1 -1
- package/esm2020/lib/public/exceptions/index.mjs +1 -1
- package/esm2020/lib/public/exceptions/item-not-found-exception.mjs +1 -1
- package/esm2020/lib/public/exceptions/next-handler-already-specified-exception.mjs +1 -1
- package/esm2020/lib/public/exceptions/validation-utilities.mjs +1 -1
- package/esm2020/lib/public/functions/bootstrap-crt-module-handler-chain-services.mjs +28 -0
- package/esm2020/lib/public/functions/bootstrap-crt-module.mjs +76 -20
- package/esm2020/lib/public/functions/index.mjs +2 -1
- package/esm2020/lib/public/functions/localize.mjs +1 -1
- package/esm2020/lib/public/functions/register-view-element.mjs +1 -1
- package/esm2020/lib/public/handlers/base-request-handler.mjs +37 -0
- package/esm2020/lib/public/handlers/index.mjs +2 -0
- package/esm2020/lib/public/models/base-response.model.mjs +1 -1
- package/esm2020/lib/public/models/converter.model.mjs +1 -1
- package/esm2020/lib/public/models/data-source/data-source-insert-result.model.mjs +2 -0
- package/esm2020/lib/public/models/data-source/data-source-save-result.model.mjs +2 -0
- package/esm2020/lib/public/models/data-source/index.mjs +3 -0
- package/esm2020/lib/public/models/entity.model.mjs +1 -1
- package/esm2020/lib/public/models/error-info.model.mjs +1 -1
- package/esm2020/lib/public/models/image-value.model.mjs +1 -1
- package/esm2020/lib/public/models/index.mjs +4 -2
- package/esm2020/lib/public/models/input/index.mjs +1 -1
- package/esm2020/lib/public/models/input/input-registration-config.model.mjs +1 -1
- package/esm2020/lib/public/models/interface-designer-item/index.mjs +1 -1
- package/esm2020/lib/public/models/interface-designer-item/interface-designer-item-definition.mjs +1 -1
- package/esm2020/lib/public/models/localizable-value.mjs +12 -1
- package/esm2020/lib/public/models/lookup-value.model.mjs +1 -1
- package/esm2020/lib/public/models/mask-settings.mjs +1 -1
- package/esm2020/lib/public/models/module-definition.mjs +1 -1
- package/esm2020/lib/public/models/request/base-request-config.mjs +1 -1
- package/esm2020/lib/public/models/request/base-request.mjs +1 -1
- package/esm2020/lib/public/models/request/data-source-request.mjs +1 -1
- package/esm2020/lib/public/models/request/index.mjs +2 -1
- package/esm2020/lib/public/models/request/request-registration-config.model.mjs +2 -0
- package/esm2020/lib/public/models/request-handler/index.mjs +3 -0
- package/esm2020/lib/public/models/request-handler/request-handler-definition.mjs +2 -0
- package/esm2020/lib/public/models/request-handler/request-handler.mjs +2 -0
- package/esm2020/lib/public/models/validation/base-validator.mjs +40 -0
- package/esm2020/lib/public/models/validation/crt-control-state.mjs +2 -0
- package/esm2020/lib/public/models/validation/crt-validation-errors.mjs +1 -1
- package/esm2020/lib/public/models/validation/crt-validator-fn.mjs +2 -0
- package/esm2020/lib/public/models/validation/index.mjs +6 -1
- package/esm2020/lib/public/models/validation/validation-info.mjs +1 -1
- package/esm2020/lib/public/models/validation/validator-config.mjs +2 -0
- package/esm2020/lib/public/models/validation/validator-parameter-values.mjs +2 -0
- package/esm2020/lib/public/models/view-element/base-view-element-registration-config.mjs +1 -1
- package/esm2020/lib/public/models/view-element/index.mjs +1 -1
- package/esm2020/lib/public/models/view-element/view-element-registration-config.mjs +1 -1
- package/esm2020/lib/public/models/view-model-context.mjs +1 -1
- package/esm2020/lib/public/services/feature/feature.service.mjs +1 -2
- package/esm2020/lib/public/services/feature/index.mjs +1 -1
- package/esm2020/lib/public/services/handler-chain/handler-chain.service.mjs +3 -7
- package/esm2020/lib/public/services/handler-chain/index.mjs +1 -1
- package/esm2020/lib/public/services/handler-chain/internal-handler-chain.mjs +23 -17
- package/esm2020/lib/public/services/http-client/http-client.service.mjs +1 -2
- package/esm2020/lib/public/services/http-client/http-headers.mjs +1 -1
- package/esm2020/lib/public/services/http-client/http-response.mjs +1 -1
- package/esm2020/lib/public/services/http-client/index.mjs +1 -1
- package/esm2020/lib/public/services/index.mjs +1 -1
- package/esm2020/lib/public/services/mask-service/index.mjs +1 -1
- package/esm2020/lib/public/services/mask-service/mask.service.mjs +1 -2
- package/esm2020/lib/public/services/model/data-schema-attribute.mjs +2 -0
- package/esm2020/lib/public/services/model/data-schema.mjs +2 -0
- package/esm2020/lib/public/services/model/data-source-aggregation-config.mjs +1 -1
- package/esm2020/lib/public/services/model/data-source-attribute.mjs +1 -1
- package/esm2020/lib/public/services/model/data-source-can-execute-operation.mjs +1 -1
- package/esm2020/lib/public/services/model/data-source-paging-config.mjs +1 -1
- package/esm2020/lib/public/services/model/data-source-parameter.mjs +1 -1
- package/esm2020/lib/public/services/model/data-source-sorting-config.mjs +1 -1
- package/esm2020/lib/public/services/model/index.mjs +3 -2
- package/esm2020/lib/public/services/model/model-load-options.mjs +1 -1
- package/esm2020/lib/public/services/model/model.mjs +1 -2
- package/esm2020/lib/public/services/rights/index.mjs +1 -1
- package/esm2020/lib/public/services/rights/rights.service.mjs +1 -2
- package/esm2020/lib/public/services/sys-settings/index.mjs +1 -1
- package/esm2020/lib/public/services/sys-settings/sys-setting.model.mjs +1 -1
- package/esm2020/lib/public/services/sys-settings/sys-settings.service.mjs +1 -1
- package/esm2020/lib/public/services/sys-values/index.mjs +1 -1
- package/esm2020/lib/public/services/sys-values/sys-values.mjs +1 -1
- package/esm2020/lib/public/services/sys-values/sys-values.service.mjs +1 -1
- package/esm2020/lib/public/types/abstract-type.mjs +2 -0
- package/esm2020/lib/public/types/entity-column-value.mjs +1 -1
- package/esm2020/lib/public/types/guid.type.mjs +1 -1
- package/esm2020/lib/public/types/index.mjs +4 -1
- package/esm2020/lib/public/types/json-data.type.mjs +1 -1
- package/esm2020/lib/public/types/localizable-string.type.mjs +2 -0
- package/esm2020/lib/public/types/localize-fn.type.mjs +1 -1
- package/esm2020/lib/public/types/resolve-dependency-fn.type.mjs +2 -0
- package/esm2020/lib/public/types/sort-direction.type.mjs +1 -1
- package/esm2020/lib/public/types/type.mjs +1 -1
- package/fesm2015/creatio-devkit-common.mjs +512 -167
- package/fesm2015/creatio-devkit-common.mjs.map +1 -1
- package/fesm2020/creatio-devkit-common.mjs +519 -169
- package/fesm2020/creatio-devkit-common.mjs.map +1 -1
- package/package.json +12 -7
- package/esm2020/lib/internal/decorators/request-handler/index.mjs +0 -2
- package/esm2020/lib/internal/decorators/request-handler/request-handler.decorator.mjs +0 -15
- package/esm2020/lib/internal/handlers/base-request-handler.mjs +0 -26
- package/esm2020/lib/internal/handlers/index.mjs +0 -2
- package/esm2020/lib/internal/models/request/request-registration-config.model.mjs +0 -2
- package/esm2020/lib/internal/models/request-handler/request-handler.mjs +0 -2
- package/esm2020/lib/internal/models/validation/crt-control.mjs +0 -2
- package/esm2020/lib/internal/models/validation/crt-validator-fn.mjs +0 -2
- package/esm2020/lib/internal/models/validation/index.mjs +0 -3
- package/esm2020/lib/internal/models/validator-config.model.mjs +0 -2
- package/esm2020/lib/public/models/interfaces/data-source-save-result.interface.mjs +0 -2
- package/esm2020/lib/public/services/model/data-source-save-result.mjs +0 -2
|
@@ -15,6 +15,10 @@ const crtOutputPrefix = 'crtOutput:';
|
|
|
15
15
|
* @internal
|
|
16
16
|
*/
|
|
17
17
|
const crtValidationInputPrefix = 'crtValidationInput:';
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
const crtInjectPrefix = 'crtInject:';
|
|
18
22
|
|
|
19
23
|
/**
|
|
20
24
|
* @public
|
|
@@ -133,6 +137,7 @@ function checkOnlyOneRegistration(type, item, map) {
|
|
|
133
137
|
}
|
|
134
138
|
}
|
|
135
139
|
|
|
140
|
+
var _a;
|
|
136
141
|
/**
|
|
137
142
|
* @internal
|
|
138
143
|
*/
|
|
@@ -174,7 +179,13 @@ InternalRequestHandlerRegistryType._addItemListeners = [];
|
|
|
174
179
|
InternalRequestHandlerRegistryType._removeItemListeners = [];
|
|
175
180
|
InternalRequestHandlerRegistryType._requestHandlersMap = new Map();
|
|
176
181
|
const global$3 = window;
|
|
177
|
-
global$3.
|
|
182
|
+
(_a = global$3.creatio) !== null && _a !== void 0 ? _a : (global$3.creatio = {});
|
|
183
|
+
if (!global$3.creatio.requestHandlerRegistry) {
|
|
184
|
+
Object.defineProperty(global$3.creatio, 'requestHandlerRegistry', {
|
|
185
|
+
get: () => InternalRequestHandlerRegistryType,
|
|
186
|
+
configurable: false,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
178
189
|
/**
|
|
179
190
|
* @internal
|
|
180
191
|
*/
|
|
@@ -202,8 +213,7 @@ class RequestHandlerRegistryService {
|
|
|
202
213
|
RequestHandlerRegistryService._internalRegistry.addRequestHandler(requestHandlerType, requestHandlerMapValue);
|
|
203
214
|
}
|
|
204
215
|
}
|
|
205
|
-
RequestHandlerRegistryService._internalRegistry = global$3.
|
|
206
|
-
(global$3.internalRequestHandlerRegistry = InternalRequestHandlerRegistryType);
|
|
216
|
+
RequestHandlerRegistryService._internalRegistry = global$3.creatio.requestHandlerRegistry;
|
|
207
217
|
|
|
208
218
|
/**
|
|
209
219
|
* @internal
|
|
@@ -355,10 +365,9 @@ class BootstrapNotifier {
|
|
|
355
365
|
}
|
|
356
366
|
subscribe(subscriber) {
|
|
357
367
|
this._subscribers.add(subscriber);
|
|
358
|
-
|
|
368
|
+
return {
|
|
359
369
|
unsubscribe: () => this._subscribers.delete(subscriber),
|
|
360
370
|
};
|
|
361
|
-
return subscription;
|
|
362
371
|
}
|
|
363
372
|
}
|
|
364
373
|
|
|
@@ -415,6 +424,65 @@ class DesignTimeViewElementRegistry extends BaseRegistry {
|
|
|
415
424
|
}
|
|
416
425
|
DesignTimeViewElementRegistry.registryKey = designTimeViewElementRegistryKey;
|
|
417
426
|
|
|
427
|
+
/**
|
|
428
|
+
* @internal
|
|
429
|
+
*/
|
|
430
|
+
class ValidatorMapValue {
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* @internal
|
|
434
|
+
*/
|
|
435
|
+
const validatorRegistryKey = 'ValidatorRegistry';
|
|
436
|
+
/**
|
|
437
|
+
* @internal
|
|
438
|
+
*/
|
|
439
|
+
class ValidatorRegistry extends BaseRegistry {
|
|
440
|
+
static _has(configType, type) {
|
|
441
|
+
var _a;
|
|
442
|
+
return ValidatorRegistry.items.has(configType) && ((_a = ValidatorRegistry.items.get(configType)) === null || _a === void 0 ? void 0 : _a.typeRef) !== type;
|
|
443
|
+
}
|
|
444
|
+
static validate(config) {
|
|
445
|
+
checkTypeNameFormat(config.type, 'ValidatorTypeName');
|
|
446
|
+
if (ValidatorRegistry._has(config.type, config.typeRef)) {
|
|
447
|
+
throw new Error(`Error when register ${config.type}. Element with this type has already exist`);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
static get items() {
|
|
451
|
+
return this.store.typeInfos;
|
|
452
|
+
}
|
|
453
|
+
static register(config) {
|
|
454
|
+
this.items.set(config.type, config);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
ValidatorRegistry.registryKey = validatorRegistryKey;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* @internal
|
|
461
|
+
*/
|
|
462
|
+
class PkgTopology extends BaseRegistry {
|
|
463
|
+
static get items() {
|
|
464
|
+
return this.store.typeInfos;
|
|
465
|
+
}
|
|
466
|
+
static get(pkgName) {
|
|
467
|
+
const order = this.items.get(pkgName);
|
|
468
|
+
if (order === undefined) {
|
|
469
|
+
throw new Error(`Package with name ${pkgName} not found in topology`);
|
|
470
|
+
}
|
|
471
|
+
return order;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
PkgTopology.registryKey = 'pkgTopology';
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* @internal
|
|
478
|
+
*/
|
|
479
|
+
class RemoteEntriesRegistry extends BaseRegistry {
|
|
480
|
+
static get items() {
|
|
481
|
+
return this.store.typeInfos;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
RemoteEntriesRegistry.registryKey = 'remotes';
|
|
485
|
+
|
|
418
486
|
/**
|
|
419
487
|
* @internal
|
|
420
488
|
*/
|
|
@@ -433,23 +501,12 @@ const viewElementMetadataKey = 'viewElement';
|
|
|
433
501
|
const interfaceDesignerItemMetadataKey = 'interfaceDesignerItem';
|
|
434
502
|
const requestHandlerMetadataKey = 'requestHandler';
|
|
435
503
|
const designTimeViewElementMetadataKey = 'designTimeViewElement';
|
|
504
|
+
const validatorMetadataKey = 'validator';
|
|
436
505
|
/**
|
|
437
506
|
* @internal
|
|
438
507
|
*/
|
|
439
508
|
function setModuleMetadata(metadata, type) {
|
|
440
509
|
Reflect.defineMetadata(moduleMetadataKey, metadata, type);
|
|
441
|
-
registerHandlerChainServices(metadata.handlerChainServices);
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* @internal
|
|
445
|
-
*/
|
|
446
|
-
function registerHandlerChainServices(types) {
|
|
447
|
-
if (types === null || types === void 0 ? void 0 : types.length) {
|
|
448
|
-
types.forEach((type) => {
|
|
449
|
-
const registrationConfig = getHandlerChainServiceMetadata(type);
|
|
450
|
-
HandlerChainServicesRegistry.register(registrationConfig);
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
510
|
}
|
|
454
511
|
/**
|
|
455
512
|
* @internal
|
|
@@ -477,6 +534,22 @@ function getViewElementMetadata(type) {
|
|
|
477
534
|
}
|
|
478
535
|
return metadata;
|
|
479
536
|
}
|
|
537
|
+
/**
|
|
538
|
+
* @internal
|
|
539
|
+
*/
|
|
540
|
+
function setValidatorMetadata(metadata, type) {
|
|
541
|
+
Reflect.defineMetadata(validatorMetadataKey, metadata, type);
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* @internal
|
|
545
|
+
*/
|
|
546
|
+
function getValidatorMetadata(type) {
|
|
547
|
+
const metadata = Reflect.getOwnMetadata(validatorMetadataKey, type);
|
|
548
|
+
if (!metadata) {
|
|
549
|
+
throw new Error(`Validator metadata was not found on '${type.name}' class`);
|
|
550
|
+
}
|
|
551
|
+
return metadata;
|
|
552
|
+
}
|
|
480
553
|
/**
|
|
481
554
|
* @internal
|
|
482
555
|
*/
|
|
@@ -574,6 +647,43 @@ function getCrtValidationInputsMetadata(type) {
|
|
|
574
647
|
return [key.replace(crtValidationInputPrefix, ''), data];
|
|
575
648
|
}));
|
|
576
649
|
}
|
|
650
|
+
/**
|
|
651
|
+
* @internal
|
|
652
|
+
*/
|
|
653
|
+
function getCrtInjectMetadata(type) {
|
|
654
|
+
const keys = Reflect.getOwnMetadataKeys(type);
|
|
655
|
+
const crtInjectKeys = keys.filter((x) => x.startsWith(crtInjectPrefix));
|
|
656
|
+
return Object.fromEntries(crtInjectKeys.map((key) => {
|
|
657
|
+
const index = Number(key.replace(crtInjectPrefix, ''));
|
|
658
|
+
const data = Reflect.getMetadata(key, type);
|
|
659
|
+
return [index, data];
|
|
660
|
+
}));
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* @internal
|
|
664
|
+
*/
|
|
665
|
+
function getParentType(type) {
|
|
666
|
+
const parentProto = type.prototype ? Object.getPrototypeOf(type.prototype) : null;
|
|
667
|
+
return parentProto ? parentProto.constructor : null;
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* @internal
|
|
671
|
+
*/
|
|
672
|
+
function getTypeDependencies(type) {
|
|
673
|
+
const paramTypes = Reflect.getOwnMetadata('design:paramtypes', type);
|
|
674
|
+
if (!paramTypes) {
|
|
675
|
+
if (type.length > 0) {
|
|
676
|
+
throw new Error(`Dependency Injection error. Cannot read dependencies of class '${type.name}'. ` +
|
|
677
|
+
`Please make sure class '${type.name}' has decorator and ` +
|
|
678
|
+
"'emitDecoratorMetadata' option is enabled in your 'tsconfig.json' file.");
|
|
679
|
+
}
|
|
680
|
+
const parentType = getParentType(type);
|
|
681
|
+
return parentType && parentType !== Object ? getTypeDependencies(parentType) : [];
|
|
682
|
+
}
|
|
683
|
+
const crtInjectMetadata = getCrtInjectMetadata(type);
|
|
684
|
+
Object.entries(crtInjectMetadata).forEach(([index, token]) => (paramTypes[index] = token));
|
|
685
|
+
return paramTypes;
|
|
686
|
+
}
|
|
577
687
|
|
|
578
688
|
/**
|
|
579
689
|
* @public
|
|
@@ -600,6 +710,47 @@ class BaseRequest {
|
|
|
600
710
|
class DataRequest extends BaseRequest {
|
|
601
711
|
}
|
|
602
712
|
|
|
713
|
+
/**
|
|
714
|
+
* @public
|
|
715
|
+
* @description Abstract Base Validator class for designing custom validators.
|
|
716
|
+
* @example
|
|
717
|
+
* @CrtValidator({
|
|
718
|
+
* type: 'crt.Required',
|
|
719
|
+
* })
|
|
720
|
+
* export class RequiredValidator extends BaseValidator {
|
|
721
|
+
* protected override async = false;
|
|
722
|
+
* public validate(controlState: CrtControlState, params?: ValidatorParametersValues): CrtValidationErrors | null {
|
|
723
|
+
* Implementation here...
|
|
724
|
+
* }
|
|
725
|
+
* }
|
|
726
|
+
*/
|
|
727
|
+
class BaseValidator {
|
|
728
|
+
/**
|
|
729
|
+
* @description getter for async/sync indicator
|
|
730
|
+
*/
|
|
731
|
+
get isAsync() {
|
|
732
|
+
return this.async;
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* @description Function used for validation
|
|
736
|
+
*/
|
|
737
|
+
get validateFn() {
|
|
738
|
+
return this.validate.bind(this);
|
|
739
|
+
}
|
|
740
|
+
/**
|
|
741
|
+
* @internal
|
|
742
|
+
*/
|
|
743
|
+
static [Symbol.hasInstance](instance) {
|
|
744
|
+
var _a;
|
|
745
|
+
return ((_a = instance === null || instance === void 0 ? void 0 : instance.constructor) === null || _a === void 0 ? void 0 : _a['_instanceOfKey']) === BaseValidator._instanceOfKey;
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* @internal
|
|
750
|
+
* @dontChange
|
|
751
|
+
*/
|
|
752
|
+
BaseValidator._instanceOfKey = 'devkit_BaseValidator';
|
|
753
|
+
|
|
603
754
|
/**
|
|
604
755
|
* @public
|
|
605
756
|
*/
|
|
@@ -607,7 +758,19 @@ class LocalizableValue {
|
|
|
607
758
|
constructor(key) {
|
|
608
759
|
this.key = key;
|
|
609
760
|
}
|
|
761
|
+
/**
|
|
762
|
+
* @internal
|
|
763
|
+
*/
|
|
764
|
+
static [Symbol.hasInstance](instance) {
|
|
765
|
+
var _a;
|
|
766
|
+
return ((_a = instance === null || instance === void 0 ? void 0 : instance.constructor) === null || _a === void 0 ? void 0 : _a['_instanceOfKey']) === LocalizableValue._instanceOfKey;
|
|
767
|
+
}
|
|
610
768
|
}
|
|
769
|
+
/**
|
|
770
|
+
* @internal
|
|
771
|
+
* @dontChange
|
|
772
|
+
*/
|
|
773
|
+
LocalizableValue._instanceOfKey = 'devkit_LocalizableValue';
|
|
611
774
|
|
|
612
775
|
/**
|
|
613
776
|
* @internal
|
|
@@ -631,57 +794,20 @@ function applyLocalizeMetadataFn(obj, localizeMetadata) {
|
|
|
631
794
|
return localized;
|
|
632
795
|
}
|
|
633
796
|
|
|
634
|
-
// noinspection ES6PreferShortImport
|
|
635
|
-
/**
|
|
636
|
-
* @public
|
|
637
|
-
* @description CrtViewElement decorator allows user to declare components in Creatio platform.
|
|
638
|
-
* Make sure component is specified in viewElements section of CrtModule.
|
|
639
|
-
* @param config - registration config. {@link ViewElementRegistrationConfig}.
|
|
640
|
-
*
|
|
641
|
-
* @example
|
|
642
|
-
* @CrtViewElement({
|
|
643
|
-
* type: 'usr.Example',
|
|
644
|
-
* selector: 'usr-example',
|
|
645
|
-
* })
|
|
646
|
-
* export class AppComponent {
|
|
647
|
-
* @Input()
|
|
648
|
-
* @CrtInput()
|
|
649
|
-
* public value!: string;
|
|
650
|
-
* }
|
|
651
|
-
*/
|
|
652
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
653
|
-
function CrtViewElement(config) {
|
|
654
|
-
return function (type) {
|
|
655
|
-
checkTypeNamePascalCase(config.type);
|
|
656
|
-
const inputs = getCrtInputsMetadata(type);
|
|
657
|
-
const outputs = getCrtOutputsMetadata(type);
|
|
658
|
-
const validationInputs = getCrtValidationInputsMetadata(type);
|
|
659
|
-
const registrationConfig = Object.assign(Object.assign({}, config), { inputs, outputs, validationInputs });
|
|
660
|
-
setViewElementMetadata(registrationConfig, type);
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
|
-
|
|
664
797
|
/**
|
|
665
|
-
* @
|
|
666
|
-
* @description CrtModule decorator is a 'container' where user actually setup elements.
|
|
667
|
-
* In could contain viewElements, definitions of other CrtModules.
|
|
668
|
-
* @param moduleDefinition - {@link ModuleDefinition}
|
|
669
|
-
*
|
|
670
|
-
* @example
|
|
671
|
-
* @CrtModule({
|
|
672
|
-
* viewElements: [AppComponent],
|
|
673
|
-
* })
|
|
674
|
-
* @NgModule({
|
|
675
|
-
* declarations: [AppComponent],
|
|
676
|
-
* imports: [BrowserModule],
|
|
677
|
-
* providers: [],
|
|
678
|
-
* })
|
|
679
|
-
* export class AppModule {}
|
|
798
|
+
* @internal
|
|
680
799
|
*/
|
|
681
|
-
function
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
800
|
+
function instantiate(type, resolveDependency) {
|
|
801
|
+
const deps = getTypeDependencies(type);
|
|
802
|
+
if (deps.length > 0) {
|
|
803
|
+
if (!resolveDependency) {
|
|
804
|
+
throw new Error(`Cannot resolve dependencies for ${type.name}. ` +
|
|
805
|
+
"Please provide 'resolveDependency' bootstrap option");
|
|
806
|
+
}
|
|
807
|
+
const depInstances = deps.map(resolveDependency);
|
|
808
|
+
return new type(...depInstances);
|
|
809
|
+
}
|
|
810
|
+
return new type();
|
|
685
811
|
}
|
|
686
812
|
|
|
687
813
|
/**
|
|
@@ -694,7 +820,6 @@ var ViewElementGroupType;
|
|
|
694
820
|
ViewElementGroupType["LayoutElements"] = "LayoutElements";
|
|
695
821
|
ViewElementGroupType["Inputs"] = "Inputs";
|
|
696
822
|
ViewElementGroupType["CustomElements"] = "CustomElements";
|
|
697
|
-
ViewElementGroupType["None"] = "None";
|
|
698
823
|
})(ViewElementGroupType || (ViewElementGroupType = {}));
|
|
699
824
|
|
|
700
825
|
/**
|
|
@@ -729,48 +854,199 @@ var ModelInPageAction;
|
|
|
729
854
|
ModelInPageAction["Copy"] = "copy";
|
|
730
855
|
})(ModelInPageAction || (ModelInPageAction = {}));
|
|
731
856
|
|
|
732
|
-
|
|
857
|
+
/**
|
|
858
|
+
* Handler source types in order of call priority.
|
|
859
|
+
* @internal
|
|
860
|
+
*/
|
|
861
|
+
var HandlerSourceType;
|
|
862
|
+
(function (HandlerSourceType) {
|
|
863
|
+
HandlerSourceType[HandlerSourceType["Schema"] = 0] = "Schema";
|
|
864
|
+
HandlerSourceType[HandlerSourceType["Remote"] = 1] = "Remote";
|
|
865
|
+
HandlerSourceType[HandlerSourceType["Host"] = 2] = "Host";
|
|
866
|
+
})(HandlerSourceType || (HandlerSourceType = {}));
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* @internal
|
|
870
|
+
*/
|
|
871
|
+
var DataSchemaAttributeType;
|
|
872
|
+
(function (DataSchemaAttributeType) {
|
|
873
|
+
DataSchemaAttributeType["OwnAttribute"] = "Own";
|
|
874
|
+
DataSchemaAttributeType["ForwardReferenceAttribute"] = "ForwardReference";
|
|
875
|
+
DataSchemaAttributeType["BackReferenceAttribute"] = "BackReference";
|
|
876
|
+
DataSchemaAttributeType["AggregationAttribute"] = "Aggregation";
|
|
877
|
+
})(DataSchemaAttributeType || (DataSchemaAttributeType = {}));
|
|
878
|
+
/**
|
|
879
|
+
* @internal
|
|
880
|
+
*/
|
|
881
|
+
var DataSchemaAttributeUsageType;
|
|
882
|
+
(function (DataSchemaAttributeUsageType) {
|
|
883
|
+
DataSchemaAttributeUsageType[DataSchemaAttributeUsageType["General"] = 0] = "General";
|
|
884
|
+
DataSchemaAttributeUsageType[DataSchemaAttributeUsageType["Advanced"] = 1] = "Advanced";
|
|
885
|
+
DataSchemaAttributeUsageType[DataSchemaAttributeUsageType["None"] = 2] = "None";
|
|
886
|
+
})(DataSchemaAttributeUsageType || (DataSchemaAttributeUsageType = {}));
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* @internal
|
|
890
|
+
*/
|
|
891
|
+
class HandlersOrderComparer {
|
|
892
|
+
constructor(_request) {
|
|
893
|
+
var _a;
|
|
894
|
+
this._request = _request;
|
|
895
|
+
const scopesOrderEntries = [...((_a = this._request.scopes) !== null && _a !== void 0 ? _a : [])].reverse().map((scope, index) => [scope, index]);
|
|
896
|
+
this._scopesOrder = Object.fromEntries(scopesOrderEntries);
|
|
897
|
+
}
|
|
898
|
+
_getOrderByScopes(handler) {
|
|
899
|
+
if (!handler.scopes) {
|
|
900
|
+
return Number.MAX_VALUE;
|
|
901
|
+
}
|
|
902
|
+
const scopesOrder = handler.scopes.filter((s) => s in this._scopesOrder).map((s) => this._scopesOrder[s]);
|
|
903
|
+
return Math.min(...scopesOrder);
|
|
904
|
+
}
|
|
905
|
+
_getOrderByPkgTopology(handler) {
|
|
906
|
+
if (handler.source.type === HandlerSourceType.Host) {
|
|
907
|
+
return Number.MAX_VALUE;
|
|
908
|
+
}
|
|
909
|
+
return PkgTopology.get(handler.source.packageName);
|
|
910
|
+
}
|
|
911
|
+
compare(a, b) {
|
|
912
|
+
const aScopeOrder = this._getOrderByScopes(a);
|
|
913
|
+
const bScopeOrder = this._getOrderByScopes(b);
|
|
914
|
+
let diff = aScopeOrder - bScopeOrder;
|
|
915
|
+
if (diff) {
|
|
916
|
+
return diff;
|
|
917
|
+
}
|
|
918
|
+
const aPkgTopologyOrder = this._getOrderByPkgTopology(a);
|
|
919
|
+
const bPkgTopologyOrder = this._getOrderByPkgTopology(b);
|
|
920
|
+
diff = aPkgTopologyOrder - bPkgTopologyOrder;
|
|
921
|
+
if (diff) {
|
|
922
|
+
return diff;
|
|
923
|
+
}
|
|
924
|
+
diff = a.source.type - b.source.type;
|
|
925
|
+
return diff;
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* @internal
|
|
931
|
+
*/
|
|
932
|
+
function isComponentPropertyBindable(viewConfigType, componentProperty) {
|
|
933
|
+
var _a;
|
|
934
|
+
const componentConfig = ViewElementRegistry.viewElements.get(viewConfigType);
|
|
935
|
+
if (!(componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.inputs)) {
|
|
936
|
+
return false;
|
|
937
|
+
}
|
|
938
|
+
return !!((_a = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.inputs[componentProperty]) === null || _a === void 0 ? void 0 : _a.propertyBindable);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* @internal
|
|
943
|
+
*/
|
|
944
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
945
|
+
function CrtViewElement(config) {
|
|
946
|
+
return function (type) {
|
|
947
|
+
checkTypeNamePascalCase(config.type);
|
|
948
|
+
const inputs = getCrtInputsMetadata(type);
|
|
949
|
+
const outputs = getCrtOutputsMetadata(type);
|
|
950
|
+
const validationInputs = getCrtValidationInputsMetadata(type);
|
|
951
|
+
const baseRegistrationConfig = Object.assign(Object.assign({}, config), { inputs,
|
|
952
|
+
outputs,
|
|
953
|
+
validationInputs });
|
|
954
|
+
const registrationConfig = 'selector' in config
|
|
955
|
+
? Object.assign(Object.assign({}, baseRegistrationConfig), { selector: config.selector }) : Object.assign(Object.assign({}, baseRegistrationConfig), { typeRef: type });
|
|
956
|
+
setViewElementMetadata(registrationConfig, type);
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
|
|
733
960
|
/**
|
|
734
961
|
* @public
|
|
735
|
-
* @description
|
|
736
|
-
*
|
|
962
|
+
* @description CrtModule decorator is a 'container' where user actually setup elements.
|
|
963
|
+
* In could contain viewElements, definitions of other CrtModules.
|
|
964
|
+
* @param moduleDefinition - {@link ModuleDefinition}
|
|
737
965
|
*
|
|
738
966
|
* @example
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
743
|
-
* @CrtInterfaceDesignerItem({
|
|
744
|
-
* toolbarConfig: {
|
|
745
|
-
* caption: 'usrExampleCaption',
|
|
746
|
-
* name: 'usrExampleName',
|
|
747
|
-
* icon: require(`!!raw-loader?{esModule:false}!../assets/icon.svg`)
|
|
748
|
-
* hint: 'usrExampleHint',
|
|
749
|
-
* defaultPropertyValues: {
|
|
750
|
-
* value: 'This is default value',
|
|
751
|
-
* },
|
|
752
|
-
* },
|
|
967
|
+
* @CrtModule({
|
|
968
|
+
* viewElements: [AppComponent],
|
|
969
|
+
* requestHandlers: [SomeRequestHandler],
|
|
970
|
+
* validators: [SomeValidator],
|
|
753
971
|
* })
|
|
754
|
-
* @
|
|
755
|
-
*
|
|
756
|
-
*
|
|
757
|
-
*
|
|
758
|
-
* encapsulation: ViewEncapsulation.ShadowDom,
|
|
972
|
+
* @NgModule({
|
|
973
|
+
* declarations: [AppComponent],
|
|
974
|
+
* imports: [BrowserModule],
|
|
975
|
+
* providers: [],
|
|
759
976
|
* })
|
|
760
|
-
* export class
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
977
|
+
* export class AppModule {}
|
|
978
|
+
*/
|
|
979
|
+
function CrtModule(moduleDefinition) {
|
|
980
|
+
return (type) => setModuleMetadata(moduleDefinition, type);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
// noinspection ES6PreferShortImport
|
|
984
|
+
/**
|
|
985
|
+
* @internal
|
|
765
986
|
*/
|
|
766
987
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
767
988
|
function CrtInterfaceDesignerItem(config) {
|
|
989
|
+
function _applyTypeCaption() {
|
|
990
|
+
if (!config.typeCaption && config.toolbarConfig) {
|
|
991
|
+
const toolbarConfig = Array.isArray(config.toolbarConfig)
|
|
992
|
+
? config.toolbarConfig[0]
|
|
993
|
+
: config.toolbarConfig;
|
|
994
|
+
config.typeCaption = toolbarConfig.caption;
|
|
995
|
+
}
|
|
996
|
+
}
|
|
768
997
|
return function (type) {
|
|
998
|
+
var _a;
|
|
999
|
+
config.typeRef = type;
|
|
1000
|
+
(_a = config.viewElementGroupType) !== null && _a !== void 0 ? _a : (config.viewElementGroupType = ViewElementGroupType.CustomElements);
|
|
1001
|
+
_applyTypeCaption();
|
|
1002
|
+
setInterfaceDesignerItemMetadata(config, type);
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* @public
|
|
1008
|
+
* @description
|
|
1009
|
+
* Constructor parameter decorator.
|
|
1010
|
+
* Mark parameter as dependency that should be obtained by token.
|
|
1011
|
+
* @param token - token by which the dependency instance will be obtained
|
|
1012
|
+
* @example
|
|
1013
|
+
* class MyHandler {
|
|
1014
|
+
* constructor(@CrtInject(USER_NAME_TOKEN) userName: string) {}
|
|
1015
|
+
* }
|
|
1016
|
+
*/
|
|
1017
|
+
function CrtInject(token) {
|
|
1018
|
+
return function (target, paramKey, paramIndex) {
|
|
1019
|
+
Reflect.defineMetadata(crtInjectPrefix + paramIndex, token, target);
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* @internal
|
|
1025
|
+
*/
|
|
1026
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1027
|
+
function CrtValidator(config) {
|
|
1028
|
+
if (!config) {
|
|
1029
|
+
return (type) => { };
|
|
1030
|
+
}
|
|
1031
|
+
return function (type) {
|
|
1032
|
+
checkTypeNameFormat(config.type, 'ValidatorTypeName');
|
|
769
1033
|
const registrationConfig = Object.assign(Object.assign({}, config), { typeRef: type });
|
|
770
|
-
registrationConfig
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
1034
|
+
setValidatorMetadata(registrationConfig, type);
|
|
1035
|
+
};
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* @internal
|
|
1040
|
+
*/
|
|
1041
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1042
|
+
function CrtRequestHandler(config) {
|
|
1043
|
+
if (!config) {
|
|
1044
|
+
return (type) => { };
|
|
1045
|
+
}
|
|
1046
|
+
return function (type) {
|
|
1047
|
+
checkTypeNameFormat(config.type, 'RequestHandlerTypeName');
|
|
1048
|
+
checkCrtTypeNamePascalCase(config.type);
|
|
1049
|
+
setRequestHandlerMetadata(config, type);
|
|
774
1050
|
};
|
|
775
1051
|
}
|
|
776
1052
|
|
|
@@ -886,25 +1162,30 @@ class InternalHandlerChain {
|
|
|
886
1162
|
map.set(key, handler);
|
|
887
1163
|
this._handlersCache.set(request.type, map);
|
|
888
1164
|
}
|
|
1165
|
+
_isRequestHandler(handler) {
|
|
1166
|
+
return (typeof handler.handle === 'function' &&
|
|
1167
|
+
typeof handler.setNext === 'function');
|
|
1168
|
+
}
|
|
1169
|
+
_checkHandlerInstanceOf(handler) {
|
|
1170
|
+
if (!this._isRequestHandler(handler)) {
|
|
1171
|
+
throw new Error('Handler should implement "BaseRequestHandler"');
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
889
1174
|
_buildHandlersChain(request) {
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
const requestScopes = [...(request.scopes || [])].reverse();
|
|
895
|
-
for (const requestScope of requestScopes) {
|
|
896
|
-
for (let i = 0; i < scopedHandlers.length; i++) {
|
|
897
|
-
const handler = scopedHandlers[i];
|
|
898
|
-
if ((_a = handler.scopes) === null || _a === void 0 ? void 0 : _a.includes(requestScope)) {
|
|
899
|
-
chain.push(handler);
|
|
900
|
-
scopedHandlers.splice(scopedHandlers.indexOf(handler), 1);
|
|
901
|
-
i--;
|
|
902
|
-
}
|
|
1175
|
+
const handlers = this._handlers.filter((h) => {
|
|
1176
|
+
var _a;
|
|
1177
|
+
if (h.requestType !== request.type) {
|
|
1178
|
+
return false;
|
|
903
1179
|
}
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1180
|
+
if (!((_a = h.scopes) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
1181
|
+
return true;
|
|
1182
|
+
}
|
|
1183
|
+
return h.scopes.some((s) => { var _a; return (_a = request.scopes) === null || _a === void 0 ? void 0 : _a.includes(s); });
|
|
1184
|
+
});
|
|
1185
|
+
const comparer = new HandlersOrderComparer(request);
|
|
1186
|
+
handlers.sort((a, b) => comparer.compare(a, b));
|
|
1187
|
+
const handlerInstances = handlers.map((handlerConfig) => handlerConfig.createHandler());
|
|
1188
|
+
handlerInstances.forEach((handler) => this._checkHandlerInstanceOf(handler));
|
|
908
1189
|
this._joinHandlersInChain(handlerInstances);
|
|
909
1190
|
const result = handlerInstances[0];
|
|
910
1191
|
this._setCacheHandler(request, result);
|
|
@@ -954,12 +1235,8 @@ class HandlerChainService {
|
|
|
954
1235
|
/**
|
|
955
1236
|
* @internal
|
|
956
1237
|
*/
|
|
957
|
-
register(
|
|
958
|
-
return this._chain.handlerChain$.register(
|
|
959
|
-
createHandler: handlerFactory,
|
|
960
|
-
requestType,
|
|
961
|
-
scopes,
|
|
962
|
-
});
|
|
1238
|
+
register(handlerConfig) {
|
|
1239
|
+
return this._chain.handlerChain$.register(handlerConfig);
|
|
963
1240
|
}
|
|
964
1241
|
/**
|
|
965
1242
|
* @description Method to process passed request
|
|
@@ -998,23 +1275,19 @@ function ImplementUsingHandlerChain(config) {
|
|
|
998
1275
|
* @internal
|
|
999
1276
|
*/
|
|
1000
1277
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1001
|
-
function
|
|
1278
|
+
function CrtConverter(name) {
|
|
1002
1279
|
return function (type) {
|
|
1003
|
-
|
|
1004
|
-
checkCrtTypeNamePascalCase(config.type);
|
|
1005
|
-
setRequestHandlerMetadata(config, type);
|
|
1280
|
+
GlobalConvertersRegistryService.register(name, type);
|
|
1006
1281
|
};
|
|
1007
1282
|
}
|
|
1008
1283
|
|
|
1009
1284
|
/**
|
|
1010
1285
|
* @internal
|
|
1011
1286
|
*/
|
|
1012
|
-
|
|
1013
|
-
function CrtRequest(config) {
|
|
1287
|
+
function CrtDesignTimeViewElement(config) {
|
|
1014
1288
|
return function (type) {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
RequestRegistryService.register(config, type);
|
|
1289
|
+
const registrationConfig = Object.assign(Object.assign({}, config), { typeRef: type });
|
|
1290
|
+
setDesignTimeViewElementMetadata(registrationConfig, type);
|
|
1018
1291
|
};
|
|
1019
1292
|
}
|
|
1020
1293
|
|
|
@@ -1022,19 +1295,11 @@ function CrtRequest(config) {
|
|
|
1022
1295
|
* @internal
|
|
1023
1296
|
*/
|
|
1024
1297
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1025
|
-
function
|
|
1026
|
-
return function (type) {
|
|
1027
|
-
GlobalConvertersRegistryService.register(name, type);
|
|
1028
|
-
};
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
/**
|
|
1032
|
-
* @internal
|
|
1033
|
-
*/
|
|
1034
|
-
function CrtDesignTimeViewElement(config) {
|
|
1298
|
+
function CrtRequest(config) {
|
|
1035
1299
|
return function (type) {
|
|
1036
|
-
|
|
1037
|
-
|
|
1300
|
+
checkTypeNameFormat(config.type, 'RequestTypeName');
|
|
1301
|
+
checkCrtTypeNamePascalCase(config.type);
|
|
1302
|
+
RequestRegistryService.register(config, type);
|
|
1038
1303
|
};
|
|
1039
1304
|
}
|
|
1040
1305
|
|
|
@@ -1056,7 +1321,7 @@ var DataValueType;
|
|
|
1056
1321
|
DataValueType[DataValueType["CUSTOM_OBJECT"] = 15] = "CUSTOM_OBJECT";
|
|
1057
1322
|
DataValueType[DataValueType["IMAGELOOKUP"] = 16] = "IMAGELOOKUP";
|
|
1058
1323
|
DataValueType[DataValueType["COLLECTION"] = 17] = "COLLECTION";
|
|
1059
|
-
DataValueType[DataValueType["
|
|
1324
|
+
DataValueType[DataValueType["Color"] = 18] = "Color";
|
|
1060
1325
|
DataValueType[DataValueType["LOCALIZABLE_STRING"] = 19] = "LOCALIZABLE_STRING";
|
|
1061
1326
|
DataValueType[DataValueType["ENTITY"] = 20] = "ENTITY";
|
|
1062
1327
|
DataValueType[DataValueType["ENTITY_COLLECTION"] = 21] = "ENTITY_COLLECTION";
|
|
@@ -1080,6 +1345,7 @@ var DataValueType;
|
|
|
1080
1345
|
DataValueType[DataValueType["COMPOSITE_OBJECT_LIST"] = 39] = "COMPOSITE_OBJECT_LIST";
|
|
1081
1346
|
DataValueType[DataValueType["FLOAT8"] = 40] = "FLOAT8";
|
|
1082
1347
|
DataValueType[DataValueType["PHONE_TEXT"] = 42] = "PHONE_TEXT";
|
|
1348
|
+
DataValueType[DataValueType["RICH_TEXT"] = 43] = "RICH_TEXT";
|
|
1083
1349
|
})(DataValueType || (DataValueType = {}));
|
|
1084
1350
|
|
|
1085
1351
|
var AggregationType;
|
|
@@ -2194,6 +2460,11 @@ function registerViewElement(config) {
|
|
|
2194
2460
|
ViewElementRegistry.register(config);
|
|
2195
2461
|
}
|
|
2196
2462
|
|
|
2463
|
+
function checkRemoteName(remoteName) {
|
|
2464
|
+
if (!RemoteEntriesRegistry.items.has(remoteName)) {
|
|
2465
|
+
throw new Error(`Remote entry with name '${remoteName}' does not exist`);
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2197
2468
|
/**
|
|
2198
2469
|
* @internal
|
|
2199
2470
|
*/
|
|
@@ -2222,7 +2493,7 @@ function registerViewElements(types) {
|
|
|
2222
2493
|
*/
|
|
2223
2494
|
function registerInterfaceDesignerItems(types, localizeFn) {
|
|
2224
2495
|
resistantForEach(types, (type) => {
|
|
2225
|
-
if (!hasInterfaceDesignerItemMetadata(type)
|
|
2496
|
+
if (!hasInterfaceDesignerItemMetadata(type)) {
|
|
2226
2497
|
return;
|
|
2227
2498
|
}
|
|
2228
2499
|
let config = getInterfaceDesignerItemMetadata(type);
|
|
@@ -2246,16 +2517,45 @@ function registerDesignTimeViewElements(types) {
|
|
|
2246
2517
|
/**
|
|
2247
2518
|
* @internal
|
|
2248
2519
|
*/
|
|
2249
|
-
function
|
|
2520
|
+
function registerValidators(types, options) {
|
|
2521
|
+
resistantForEach(types, (type) => {
|
|
2522
|
+
const metadata = getValidatorMetadata(type);
|
|
2523
|
+
const registrationConfig = Object.assign(Object.assign({}, metadata), { instantiate: function () {
|
|
2524
|
+
return instantiate(this.typeRef, options === null || options === void 0 ? void 0 : options.resolveDependency);
|
|
2525
|
+
} });
|
|
2526
|
+
ValidatorRegistry.validate(registrationConfig);
|
|
2527
|
+
ValidatorRegistry.register(registrationConfig);
|
|
2528
|
+
});
|
|
2529
|
+
}
|
|
2530
|
+
/**
|
|
2531
|
+
* @internal
|
|
2532
|
+
*/
|
|
2533
|
+
function registerRequestHandlers(types, options, remoteName) {
|
|
2534
|
+
if (options.moduleType === 'remote' && !remoteName) {
|
|
2535
|
+
console.error("To use request handlers, 'remoteName' parameter should be specified.");
|
|
2536
|
+
return;
|
|
2537
|
+
}
|
|
2250
2538
|
resistantForEach(types, (type) => {
|
|
2251
|
-
const
|
|
2539
|
+
const metadata = getRequestHandlerMetadata(type);
|
|
2540
|
+
let registrationConfig;
|
|
2541
|
+
const createHandler = () => instantiate(type, options === null || options === void 0 ? void 0 : options.resolveDependency);
|
|
2542
|
+
if (options.moduleType === 'host') {
|
|
2543
|
+
registrationConfig = Object.assign(Object.assign({}, metadata), { source: { type: HandlerSourceType.Host }, createHandler });
|
|
2544
|
+
}
|
|
2545
|
+
else {
|
|
2546
|
+
const remote = RemoteEntriesRegistry.items.get(remoteName);
|
|
2547
|
+
registrationConfig = Object.assign(Object.assign({}, metadata), { source: {
|
|
2548
|
+
type: HandlerSourceType.Remote,
|
|
2549
|
+
packageName: remote.packageName,
|
|
2550
|
+
}, createHandler });
|
|
2551
|
+
}
|
|
2252
2552
|
RequestHandlerRegistryService.register(registrationConfig, type);
|
|
2253
2553
|
});
|
|
2254
2554
|
}
|
|
2255
2555
|
/**
|
|
2256
2556
|
* @internal
|
|
2257
2557
|
*/
|
|
2258
|
-
function _bootstrapCrtModule(type, options) {
|
|
2558
|
+
function _bootstrapCrtModule(name, type, options) {
|
|
2259
2559
|
var _a;
|
|
2260
2560
|
try {
|
|
2261
2561
|
const moduleDefinition = getModuleMetadata(type);
|
|
@@ -2267,27 +2567,38 @@ function _bootstrapCrtModule(type, options) {
|
|
|
2267
2567
|
registerDesignTimeViewElements(moduleDefinition.designTimeViewElements);
|
|
2268
2568
|
}
|
|
2269
2569
|
if (moduleDefinition.requestHandlers) {
|
|
2270
|
-
registerRequestHandlers(moduleDefinition.requestHandlers);
|
|
2570
|
+
registerRequestHandlers(moduleDefinition.requestHandlers, options, name);
|
|
2571
|
+
}
|
|
2572
|
+
if (moduleDefinition.validators) {
|
|
2573
|
+
registerValidators(moduleDefinition.validators, options);
|
|
2271
2574
|
}
|
|
2272
|
-
(_a = moduleDefinition.includes) === null || _a === void 0 ? void 0 : _a.forEach((t) => _bootstrapCrtModule(t, options));
|
|
2575
|
+
(_a = moduleDefinition.includes) === null || _a === void 0 ? void 0 : _a.forEach((t) => _bootstrapCrtModule(name, t, options));
|
|
2273
2576
|
}
|
|
2274
2577
|
catch (error) {
|
|
2275
2578
|
console.error(error);
|
|
2276
2579
|
}
|
|
2277
2580
|
}
|
|
2278
2581
|
/**
|
|
2279
|
-
* @
|
|
2280
|
-
* @description Function required to bootstrapping elements defined in CrtModules.
|
|
2281
|
-
* Call this function as soon as possible during bootstrapping your application.
|
|
2282
|
-
* @param type - module type
|
|
2283
|
-
* @param options - {@link BootstrapOptions}
|
|
2284
|
-
*
|
|
2285
|
-
* @example
|
|
2286
|
-
* bootstrapCrtModule(AppModule)
|
|
2582
|
+
* @internal
|
|
2287
2583
|
*/
|
|
2288
|
-
function bootstrapCrtModule(
|
|
2289
|
-
|
|
2290
|
-
|
|
2584
|
+
function bootstrapCrtModule(...args) {
|
|
2585
|
+
var _a, _b;
|
|
2586
|
+
const name = typeof args[0] === 'string' ? args.shift() : undefined;
|
|
2587
|
+
const type = args[0];
|
|
2588
|
+
const options = (_a = args[1]) !== null && _a !== void 0 ? _a : {};
|
|
2589
|
+
(_b = options.moduleType) !== null && _b !== void 0 ? _b : (options.moduleType = 'remote');
|
|
2590
|
+
if (name) {
|
|
2591
|
+
if (options.moduleType === 'remote') {
|
|
2592
|
+
checkRemoteName(name);
|
|
2593
|
+
}
|
|
2594
|
+
else {
|
|
2595
|
+
throw new Error('Host module cannot have name');
|
|
2596
|
+
}
|
|
2597
|
+
}
|
|
2598
|
+
_bootstrapCrtModule(name, type, options);
|
|
2599
|
+
if (options.moduleType === 'remote') {
|
|
2600
|
+
BootstrapNotifier.instance.notify(type);
|
|
2601
|
+
}
|
|
2291
2602
|
}
|
|
2292
2603
|
|
|
2293
2604
|
/**
|
|
@@ -2318,12 +2629,38 @@ function localize(key) {
|
|
|
2318
2629
|
return new LocalizableValue(key);
|
|
2319
2630
|
}
|
|
2320
2631
|
|
|
2632
|
+
/**
|
|
2633
|
+
* @internal
|
|
2634
|
+
*/
|
|
2635
|
+
function registerHandlerChainServices(types) {
|
|
2636
|
+
types === null || types === void 0 ? void 0 : types.forEach((type) => {
|
|
2637
|
+
const registrationConfig = getHandlerChainServiceMetadata(type);
|
|
2638
|
+
HandlerChainServicesRegistry.register(registrationConfig);
|
|
2639
|
+
});
|
|
2640
|
+
}
|
|
2641
|
+
/**
|
|
2642
|
+
* @internal
|
|
2643
|
+
*/
|
|
2644
|
+
function _bootstrapCrtModuleHandlerChainServices(type) {
|
|
2645
|
+
var _a;
|
|
2646
|
+
const moduleDefinition = getModuleMetadata(type);
|
|
2647
|
+
if (moduleDefinition.handlerChainServices) {
|
|
2648
|
+
registerHandlerChainServices(moduleDefinition.handlerChainServices);
|
|
2649
|
+
}
|
|
2650
|
+
(_a = moduleDefinition.includes) === null || _a === void 0 ? void 0 : _a.forEach((t) => _bootstrapCrtModuleHandlerChainServices(t));
|
|
2651
|
+
}
|
|
2652
|
+
/**
|
|
2653
|
+
* @internal
|
|
2654
|
+
*/
|
|
2655
|
+
function bootstrapCrtModuleHandlerChainServices(type) {
|
|
2656
|
+
_bootstrapCrtModuleHandlerChainServices(type);
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2321
2659
|
class BaseHandlerChainService {
|
|
2322
2660
|
}
|
|
2323
2661
|
|
|
2324
2662
|
/**
|
|
2325
2663
|
* @public
|
|
2326
|
-
* @class FeatureService
|
|
2327
2664
|
* @classdesc Service to working with Creatio platform features using handler chain
|
|
2328
2665
|
* @extends {BaseHandlerChainService}
|
|
2329
2666
|
*/
|
|
@@ -2347,7 +2684,6 @@ __decorate([
|
|
|
2347
2684
|
|
|
2348
2685
|
/**
|
|
2349
2686
|
* @public
|
|
2350
|
-
* @class RightsService
|
|
2351
2687
|
* @classdesc Service to working rights using handler chain
|
|
2352
2688
|
* @extends {BaseHandlerChainService}
|
|
2353
2689
|
*/
|
|
@@ -2446,7 +2782,6 @@ __decorate([
|
|
|
2446
2782
|
|
|
2447
2783
|
/**
|
|
2448
2784
|
* @public
|
|
2449
|
-
* @class HttpClientService
|
|
2450
2785
|
* @classdesc Http service to perform Http requests
|
|
2451
2786
|
* @extends {BaseHandlerChainService}
|
|
2452
2787
|
*/
|
|
@@ -2517,7 +2852,6 @@ __decorate([
|
|
|
2517
2852
|
|
|
2518
2853
|
/**
|
|
2519
2854
|
* @public
|
|
2520
|
-
* @class MaskService
|
|
2521
2855
|
* @classdesc Service to working with mask using handler chain
|
|
2522
2856
|
* @extends {BaseHandlerChainService}
|
|
2523
2857
|
*/
|
|
@@ -2568,7 +2902,6 @@ class Model extends BaseHandlerChainService {
|
|
|
2568
2902
|
return new Model(crtModel);
|
|
2569
2903
|
});
|
|
2570
2904
|
}
|
|
2571
|
-
// TODO RND-23725
|
|
2572
2905
|
getSchema() {
|
|
2573
2906
|
return this._crtModel.getSchema().toPromise();
|
|
2574
2907
|
}
|
|
@@ -2617,7 +2950,7 @@ var ModelParameterType;
|
|
|
2617
2950
|
})(ModelParameterType || (ModelParameterType = {}));
|
|
2618
2951
|
|
|
2619
2952
|
/**
|
|
2620
|
-
* @
|
|
2953
|
+
* @public
|
|
2621
2954
|
* @abstract
|
|
2622
2955
|
* @classdesc Class for designing request handlers.
|
|
2623
2956
|
*/
|
|
@@ -2628,6 +2961,13 @@ class BaseRequestHandler {
|
|
|
2628
2961
|
get next() {
|
|
2629
2962
|
return this._next;
|
|
2630
2963
|
}
|
|
2964
|
+
/**
|
|
2965
|
+
* @internal
|
|
2966
|
+
*/
|
|
2967
|
+
static [Symbol.hasInstance](instance) {
|
|
2968
|
+
var _a;
|
|
2969
|
+
return ((_a = instance === null || instance === void 0 ? void 0 : instance.constructor) === null || _a === void 0 ? void 0 : _a['_instanceOfKey']) === BaseRequestHandler._instanceOfKey;
|
|
2970
|
+
}
|
|
2631
2971
|
/**
|
|
2632
2972
|
* @description Method to set request handler to handler chain.
|
|
2633
2973
|
* @param next - link for next request handler - {@link RequestHandler}
|
|
@@ -2639,6 +2979,11 @@ class BaseRequestHandler {
|
|
|
2639
2979
|
this._next = next;
|
|
2640
2980
|
}
|
|
2641
2981
|
}
|
|
2982
|
+
/**
|
|
2983
|
+
* @internal
|
|
2984
|
+
* @dontChange
|
|
2985
|
+
*/
|
|
2986
|
+
BaseRequestHandler._instanceOfKey = 'devkit_BaseRequestHandler';
|
|
2642
2987
|
|
|
2643
2988
|
/**
|
|
2644
2989
|
* @internal
|
|
@@ -2683,5 +3028,5 @@ function toAggregationType(aggregationFunction) {
|
|
|
2683
3028
|
* Generated bundle index. Do not edit.
|
|
2684
3029
|
*/
|
|
2685
3030
|
|
|
2686
|
-
export { AggregationEvalType, AggregationFunction, AggregationFunctionColumn, AggregationFunctionExpression, AggregationSubQueryColumn, AggregationSubQueryExpression, AggregationType, ArgumentEmptyException, ArgumentFunctionExpression, ArgumentOutOfRangeException, ArithmeticExpression, ArithmeticOperation, ArithmeticQueryColumn, BaseExpression, BaseFilter, BaseFilterableQuery, BaseQuery, BaseQueryColumn, BaseRegistry, BaseRequest, BaseRequestHandler, BetweenFilter, BootstrapNotifier, ColumnExpression, CompareFilter, ComparisonType, CrtConverter, CrtDesignTimeViewElement, CrtInput, CrtInputRegistrationConfig, CrtInterfaceDesignerItem, CrtModule, CrtOutput, CrtRequest, CrtRequestHandler, CrtValidationInput, CrtViewElement, DataRequest, DataSourceScope, DataValueType, DatePartFunctionColumn, DatePartFunctionExpression, DatePartType, DeleteQuery, DesignTimeViewElementRegistry, DesignerToolGroupType, EMPTY_GUID, EXPRESSION_TYPE_MOCK, EntityQueryColumn, EntitySchemaQuery, ExistsFilter, ExpressionMock, ExpressionType, FeatureService, FilterGroup, FilterMock, FilterType, FunctionExpression, FunctionType, GlobalConvertersRegistryService, HandlerChainService, HandlerChainServicesRegistry, HttpClientService, ImplementUsingHandlerChain, InFilter, InsertQuery, InterfaceDesignerItemRegistrationConfig, InterfaceDesignerItemRegistry, InternalRequestHandlerRegistry, InternalRequestHandlerRegistryType, IsNullFilter, ItemNotFoundException, LengthFunctionColumn, LengthFunctionExpression, LocalizableValue, LogicalOperatorType, MacrosFunctionColumn, MacrosFunctionExpression, MaskService, MethodInvokeRequest, Model, ModelInPageAction, ModelParameterType, NextHandlerAlreadySpecifiedException, OrderDirection, ParameterExpression, ParameterQueryColumn, QueryMacrosType, QueryOperationType, RequestHandlerRegistryService, RequestRegistryService, RightsService, SingleFilter, SubQueryColumn, SubQueryExpression, SysSetting, SysSettingValue, SysSettingsService, SysValuesService, UpdateQuery, ValidationUtilities, ViewElementDataGroupType, ViewElementGroupType, ViewElementRegistry, WindowFunctionColumn, WindowFunctionExpression, _bootstrapCrtModule, applyLocalizeMetadataFn, bootstrapCrtModule, checkCrtTypeNamePascalCase, checkIfTypeRegistered, checkOnlyOneRegistration, checkTypeNameFormat, checkTypeNamePascalCase, crtInputPrefix, crtOutputPrefix, crtValidationInputPrefix, designTimeViewElementRegistryKey, generateGuid, getCrtInputsMetadata, getCrtOutputsMetadata, getCrtValidationInputsMetadata, getDesignTimeViewElementMetadata, getHandlerChainServiceMetadata, getInterfaceDesignerItemMetadata, getModuleMetadata, getRequestHandlerMetadata, getViewElementMetadata, hasInterfaceDesignerItemMetadata, interfaceDesignerItemRegistryKey, isEmptyGuid, isGuid, localize, objectDeepKeys,
|
|
3031
|
+
export { AggregationEvalType, AggregationFunction, AggregationFunctionColumn, AggregationFunctionExpression, AggregationSubQueryColumn, AggregationSubQueryExpression, AggregationType, ArgumentEmptyException, ArgumentFunctionExpression, ArgumentOutOfRangeException, ArithmeticExpression, ArithmeticOperation, ArithmeticQueryColumn, BaseExpression, BaseFilter, BaseFilterableQuery, BaseQuery, BaseQueryColumn, BaseRegistry, BaseRequest, BaseRequestHandler, BaseValidator, BetweenFilter, BootstrapNotifier, ColumnExpression, CompareFilter, ComparisonType, CrtConverter, CrtDesignTimeViewElement, CrtInject, CrtInput, CrtInputRegistrationConfig, CrtInterfaceDesignerItem, CrtModule, CrtOutput, CrtRequest, CrtRequestHandler, CrtValidationInput, CrtValidator, CrtViewElement, DataRequest, DataSchemaAttributeType, DataSchemaAttributeUsageType, DataSourceScope, DataValueType, DatePartFunctionColumn, DatePartFunctionExpression, DatePartType, DeleteQuery, DesignTimeViewElementRegistry, DesignerToolGroupType, EMPTY_GUID, EXPRESSION_TYPE_MOCK, EntityQueryColumn, EntitySchemaQuery, ExistsFilter, ExpressionMock, ExpressionType, FeatureService, FilterGroup, FilterMock, FilterType, FunctionExpression, FunctionType, GlobalConvertersRegistryService, HandlerChainService, HandlerChainServicesRegistry, HandlerSourceType, HandlersOrderComparer, HttpClientService, ImplementUsingHandlerChain, InFilter, InsertQuery, InterfaceDesignerItemRegistrationConfig, InterfaceDesignerItemRegistry, InternalRequestHandlerRegistry, InternalRequestHandlerRegistryType, IsNullFilter, ItemNotFoundException, LengthFunctionColumn, LengthFunctionExpression, LocalizableValue, LogicalOperatorType, MacrosFunctionColumn, MacrosFunctionExpression, MaskService, MethodInvokeRequest, Model, ModelInPageAction, ModelParameterType, NextHandlerAlreadySpecifiedException, OrderDirection, ParameterExpression, ParameterQueryColumn, PkgTopology, QueryMacrosType, QueryOperationType, RemoteEntriesRegistry, RequestHandlerRegistryService, RequestRegistryService, RightsService, SingleFilter, SubQueryColumn, SubQueryExpression, SysSetting, SysSettingValue, SysSettingsService, SysValuesService, UpdateQuery, ValidationUtilities, ValidatorMapValue, ValidatorRegistry, ViewElementDataGroupType, ViewElementGroupType, ViewElementRegistry, WindowFunctionColumn, WindowFunctionExpression, _bootstrapCrtModule, applyLocalizeMetadataFn, bootstrapCrtModule, bootstrapCrtModuleHandlerChainServices, checkCrtTypeNamePascalCase, checkIfTypeRegistered, checkOnlyOneRegistration, checkTypeNameFormat, checkTypeNamePascalCase, crtInjectPrefix, crtInputPrefix, crtOutputPrefix, crtValidationInputPrefix, designTimeViewElementRegistryKey, generateGuid, getCrtInputsMetadata, getCrtOutputsMetadata, getCrtValidationInputsMetadata, getDesignTimeViewElementMetadata, getHandlerChainServiceMetadata, getInterfaceDesignerItemMetadata, getModuleMetadata, getRequestHandlerMetadata, getTypeDependencies, getValidatorMetadata, getViewElementMetadata, hasInterfaceDesignerItemMetadata, instantiate, interfaceDesignerItemRegistryKey, isComponentPropertyBindable, isEmptyGuid, isGuid, localize, objectDeepKeys, registerViewElement, setDesignTimeViewElementMetadata, setInterfaceDesignerItemMetadata, setModuleMetadata, setRequestHandlerMetadata, setValidatorMetadata, setViewElementMetadata, toAggregationType, toPascalCase, validatorRegistryKey, viewElementRegistryKey };
|
|
2687
3032
|
//# sourceMappingURL=creatio-devkit-common.mjs.map
|