@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
|
|
@@ -174,7 +178,13 @@ InternalRequestHandlerRegistryType._addItemListeners = [];
|
|
|
174
178
|
InternalRequestHandlerRegistryType._removeItemListeners = [];
|
|
175
179
|
InternalRequestHandlerRegistryType._requestHandlersMap = new Map();
|
|
176
180
|
const global$3 = window;
|
|
177
|
-
global$3.
|
|
181
|
+
global$3.creatio ?? (global$3.creatio = {});
|
|
182
|
+
if (!global$3.creatio.requestHandlerRegistry) {
|
|
183
|
+
Object.defineProperty(global$3.creatio, 'requestHandlerRegistry', {
|
|
184
|
+
get: () => InternalRequestHandlerRegistryType,
|
|
185
|
+
configurable: false,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
178
188
|
/**
|
|
179
189
|
* @internal
|
|
180
190
|
*/
|
|
@@ -202,8 +212,7 @@ class RequestHandlerRegistryService {
|
|
|
202
212
|
RequestHandlerRegistryService._internalRegistry.addRequestHandler(requestHandlerType, requestHandlerMapValue);
|
|
203
213
|
}
|
|
204
214
|
}
|
|
205
|
-
RequestHandlerRegistryService._internalRegistry = global$3.
|
|
206
|
-
(global$3.internalRequestHandlerRegistry = InternalRequestHandlerRegistryType);
|
|
215
|
+
RequestHandlerRegistryService._internalRegistry = global$3.creatio.requestHandlerRegistry;
|
|
207
216
|
|
|
208
217
|
/**
|
|
209
218
|
* @internal
|
|
@@ -354,10 +363,9 @@ class BootstrapNotifier {
|
|
|
354
363
|
}
|
|
355
364
|
subscribe(subscriber) {
|
|
356
365
|
this._subscribers.add(subscriber);
|
|
357
|
-
|
|
366
|
+
return {
|
|
358
367
|
unsubscribe: () => this._subscribers.delete(subscriber),
|
|
359
368
|
};
|
|
360
|
-
return subscription;
|
|
361
369
|
}
|
|
362
370
|
}
|
|
363
371
|
|
|
@@ -414,6 +422,64 @@ class DesignTimeViewElementRegistry extends BaseRegistry {
|
|
|
414
422
|
}
|
|
415
423
|
DesignTimeViewElementRegistry.registryKey = designTimeViewElementRegistryKey;
|
|
416
424
|
|
|
425
|
+
/**
|
|
426
|
+
* @internal
|
|
427
|
+
*/
|
|
428
|
+
class ValidatorMapValue {
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* @internal
|
|
432
|
+
*/
|
|
433
|
+
const validatorRegistryKey = 'ValidatorRegistry';
|
|
434
|
+
/**
|
|
435
|
+
* @internal
|
|
436
|
+
*/
|
|
437
|
+
class ValidatorRegistry extends BaseRegistry {
|
|
438
|
+
static _has(configType, type) {
|
|
439
|
+
return ValidatorRegistry.items.has(configType) && ValidatorRegistry.items.get(configType)?.typeRef !== type;
|
|
440
|
+
}
|
|
441
|
+
static validate(config) {
|
|
442
|
+
checkTypeNameFormat(config.type, 'ValidatorTypeName');
|
|
443
|
+
if (ValidatorRegistry._has(config.type, config.typeRef)) {
|
|
444
|
+
throw new Error(`Error when register ${config.type}. Element with this type has already exist`);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
static get items() {
|
|
448
|
+
return this.store.typeInfos;
|
|
449
|
+
}
|
|
450
|
+
static register(config) {
|
|
451
|
+
this.items.set(config.type, config);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
ValidatorRegistry.registryKey = validatorRegistryKey;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* @internal
|
|
458
|
+
*/
|
|
459
|
+
class PkgTopology extends BaseRegistry {
|
|
460
|
+
static get items() {
|
|
461
|
+
return this.store.typeInfos;
|
|
462
|
+
}
|
|
463
|
+
static get(pkgName) {
|
|
464
|
+
const order = this.items.get(pkgName);
|
|
465
|
+
if (order === undefined) {
|
|
466
|
+
throw new Error(`Package with name ${pkgName} not found in topology`);
|
|
467
|
+
}
|
|
468
|
+
return order;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
PkgTopology.registryKey = 'pkgTopology';
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* @internal
|
|
475
|
+
*/
|
|
476
|
+
class RemoteEntriesRegistry extends BaseRegistry {
|
|
477
|
+
static get items() {
|
|
478
|
+
return this.store.typeInfos;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
RemoteEntriesRegistry.registryKey = 'remotes';
|
|
482
|
+
|
|
417
483
|
/**
|
|
418
484
|
* @internal
|
|
419
485
|
*/
|
|
@@ -432,23 +498,12 @@ const viewElementMetadataKey = 'viewElement';
|
|
|
432
498
|
const interfaceDesignerItemMetadataKey = 'interfaceDesignerItem';
|
|
433
499
|
const requestHandlerMetadataKey = 'requestHandler';
|
|
434
500
|
const designTimeViewElementMetadataKey = 'designTimeViewElement';
|
|
501
|
+
const validatorMetadataKey = 'validator';
|
|
435
502
|
/**
|
|
436
503
|
* @internal
|
|
437
504
|
*/
|
|
438
505
|
function setModuleMetadata(metadata, type) {
|
|
439
506
|
Reflect.defineMetadata(moduleMetadataKey, metadata, type);
|
|
440
|
-
registerHandlerChainServices(metadata.handlerChainServices);
|
|
441
|
-
}
|
|
442
|
-
/**
|
|
443
|
-
* @internal
|
|
444
|
-
*/
|
|
445
|
-
function registerHandlerChainServices(types) {
|
|
446
|
-
if (types?.length) {
|
|
447
|
-
types.forEach((type) => {
|
|
448
|
-
const registrationConfig = getHandlerChainServiceMetadata(type);
|
|
449
|
-
HandlerChainServicesRegistry.register(registrationConfig);
|
|
450
|
-
});
|
|
451
|
-
}
|
|
452
507
|
}
|
|
453
508
|
/**
|
|
454
509
|
* @internal
|
|
@@ -476,6 +531,22 @@ function getViewElementMetadata(type) {
|
|
|
476
531
|
}
|
|
477
532
|
return metadata;
|
|
478
533
|
}
|
|
534
|
+
/**
|
|
535
|
+
* @internal
|
|
536
|
+
*/
|
|
537
|
+
function setValidatorMetadata(metadata, type) {
|
|
538
|
+
Reflect.defineMetadata(validatorMetadataKey, metadata, type);
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* @internal
|
|
542
|
+
*/
|
|
543
|
+
function getValidatorMetadata(type) {
|
|
544
|
+
const metadata = Reflect.getOwnMetadata(validatorMetadataKey, type);
|
|
545
|
+
if (!metadata) {
|
|
546
|
+
throw new Error(`Validator metadata was not found on '${type.name}' class`);
|
|
547
|
+
}
|
|
548
|
+
return metadata;
|
|
549
|
+
}
|
|
479
550
|
/**
|
|
480
551
|
* @internal
|
|
481
552
|
*/
|
|
@@ -573,6 +644,43 @@ function getCrtValidationInputsMetadata(type) {
|
|
|
573
644
|
return [key.replace(crtValidationInputPrefix, ''), data];
|
|
574
645
|
}));
|
|
575
646
|
}
|
|
647
|
+
/**
|
|
648
|
+
* @internal
|
|
649
|
+
*/
|
|
650
|
+
function getCrtInjectMetadata(type) {
|
|
651
|
+
const keys = Reflect.getOwnMetadataKeys(type);
|
|
652
|
+
const crtInjectKeys = keys.filter((x) => x.startsWith(crtInjectPrefix));
|
|
653
|
+
return Object.fromEntries(crtInjectKeys.map((key) => {
|
|
654
|
+
const index = Number(key.replace(crtInjectPrefix, ''));
|
|
655
|
+
const data = Reflect.getMetadata(key, type);
|
|
656
|
+
return [index, data];
|
|
657
|
+
}));
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* @internal
|
|
661
|
+
*/
|
|
662
|
+
function getParentType(type) {
|
|
663
|
+
const parentProto = type.prototype ? Object.getPrototypeOf(type.prototype) : null;
|
|
664
|
+
return parentProto ? parentProto.constructor : null;
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* @internal
|
|
668
|
+
*/
|
|
669
|
+
function getTypeDependencies(type) {
|
|
670
|
+
const paramTypes = Reflect.getOwnMetadata('design:paramtypes', type);
|
|
671
|
+
if (!paramTypes) {
|
|
672
|
+
if (type.length > 0) {
|
|
673
|
+
throw new Error(`Dependency Injection error. Cannot read dependencies of class '${type.name}'. ` +
|
|
674
|
+
`Please make sure class '${type.name}' has decorator and ` +
|
|
675
|
+
"'emitDecoratorMetadata' option is enabled in your 'tsconfig.json' file.");
|
|
676
|
+
}
|
|
677
|
+
const parentType = getParentType(type);
|
|
678
|
+
return parentType && parentType !== Object ? getTypeDependencies(parentType) : [];
|
|
679
|
+
}
|
|
680
|
+
const crtInjectMetadata = getCrtInjectMetadata(type);
|
|
681
|
+
Object.entries(crtInjectMetadata).forEach(([index, token]) => (paramTypes[index] = token));
|
|
682
|
+
return paramTypes;
|
|
683
|
+
}
|
|
576
684
|
|
|
577
685
|
/**
|
|
578
686
|
* @public
|
|
@@ -606,6 +714,46 @@ class DataRequest extends BaseRequest {
|
|
|
606
714
|
* @property {unknown} params - request parameters.
|
|
607
715
|
*/
|
|
608
716
|
|
|
717
|
+
/**
|
|
718
|
+
* @public
|
|
719
|
+
* @description Abstract Base Validator class for designing custom validators.
|
|
720
|
+
* @example
|
|
721
|
+
* @CrtValidator({
|
|
722
|
+
* type: 'crt.Required',
|
|
723
|
+
* })
|
|
724
|
+
* export class RequiredValidator extends BaseValidator {
|
|
725
|
+
* protected override async = false;
|
|
726
|
+
* public validate(controlState: CrtControlState, params?: ValidatorParametersValues): CrtValidationErrors | null {
|
|
727
|
+
* Implementation here...
|
|
728
|
+
* }
|
|
729
|
+
* }
|
|
730
|
+
*/
|
|
731
|
+
class BaseValidator {
|
|
732
|
+
/**
|
|
733
|
+
* @description getter for async/sync indicator
|
|
734
|
+
*/
|
|
735
|
+
get isAsync() {
|
|
736
|
+
return this.async;
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* @description Function used for validation
|
|
740
|
+
*/
|
|
741
|
+
get validateFn() {
|
|
742
|
+
return this.validate.bind(this);
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* @internal
|
|
746
|
+
*/
|
|
747
|
+
static [Symbol.hasInstance](instance) {
|
|
748
|
+
return instance?.constructor?.['_instanceOfKey'] === BaseValidator._instanceOfKey;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* @internal
|
|
753
|
+
* @dontChange
|
|
754
|
+
*/
|
|
755
|
+
BaseValidator._instanceOfKey = 'devkit_BaseValidator';
|
|
756
|
+
|
|
609
757
|
/**
|
|
610
758
|
* @public
|
|
611
759
|
*/
|
|
@@ -613,7 +761,18 @@ class LocalizableValue {
|
|
|
613
761
|
constructor(key) {
|
|
614
762
|
this.key = key;
|
|
615
763
|
}
|
|
764
|
+
/**
|
|
765
|
+
* @internal
|
|
766
|
+
*/
|
|
767
|
+
static [Symbol.hasInstance](instance) {
|
|
768
|
+
return instance?.constructor?.['_instanceOfKey'] === LocalizableValue._instanceOfKey;
|
|
769
|
+
}
|
|
616
770
|
}
|
|
771
|
+
/**
|
|
772
|
+
* @internal
|
|
773
|
+
* @dontChange
|
|
774
|
+
*/
|
|
775
|
+
LocalizableValue._instanceOfKey = 'devkit_LocalizableValue';
|
|
617
776
|
|
|
618
777
|
/**
|
|
619
778
|
* @internal
|
|
@@ -636,57 +795,20 @@ function applyLocalizeMetadataFn(obj, localizeMetadata) {
|
|
|
636
795
|
return localized;
|
|
637
796
|
}
|
|
638
797
|
|
|
639
|
-
// noinspection ES6PreferShortImport
|
|
640
|
-
/**
|
|
641
|
-
* @public
|
|
642
|
-
* @description CrtViewElement decorator allows user to declare components in Creatio platform.
|
|
643
|
-
* Make sure component is specified in viewElements section of CrtModule.
|
|
644
|
-
* @param config - registration config. {@link ViewElementRegistrationConfig}.
|
|
645
|
-
*
|
|
646
|
-
* @example
|
|
647
|
-
* @CrtViewElement({
|
|
648
|
-
* type: 'usr.Example',
|
|
649
|
-
* selector: 'usr-example',
|
|
650
|
-
* })
|
|
651
|
-
* export class AppComponent {
|
|
652
|
-
* @Input()
|
|
653
|
-
* @CrtInput()
|
|
654
|
-
* public value!: string;
|
|
655
|
-
* }
|
|
656
|
-
*/
|
|
657
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
658
|
-
function CrtViewElement(config) {
|
|
659
|
-
return function (type) {
|
|
660
|
-
checkTypeNamePascalCase(config.type);
|
|
661
|
-
const inputs = getCrtInputsMetadata(type);
|
|
662
|
-
const outputs = getCrtOutputsMetadata(type);
|
|
663
|
-
const validationInputs = getCrtValidationInputsMetadata(type);
|
|
664
|
-
const registrationConfig = { ...config, inputs, outputs, validationInputs };
|
|
665
|
-
setViewElementMetadata(registrationConfig, type);
|
|
666
|
-
};
|
|
667
|
-
}
|
|
668
|
-
|
|
669
798
|
/**
|
|
670
|
-
* @
|
|
671
|
-
* @description CrtModule decorator is a 'container' where user actually setup elements.
|
|
672
|
-
* In could contain viewElements, definitions of other CrtModules.
|
|
673
|
-
* @param moduleDefinition - {@link ModuleDefinition}
|
|
674
|
-
*
|
|
675
|
-
* @example
|
|
676
|
-
* @CrtModule({
|
|
677
|
-
* viewElements: [AppComponent],
|
|
678
|
-
* })
|
|
679
|
-
* @NgModule({
|
|
680
|
-
* declarations: [AppComponent],
|
|
681
|
-
* imports: [BrowserModule],
|
|
682
|
-
* providers: [],
|
|
683
|
-
* })
|
|
684
|
-
* export class AppModule {}
|
|
799
|
+
* @internal
|
|
685
800
|
*/
|
|
686
|
-
function
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
801
|
+
function instantiate(type, resolveDependency) {
|
|
802
|
+
const deps = getTypeDependencies(type);
|
|
803
|
+
if (deps.length > 0) {
|
|
804
|
+
if (!resolveDependency) {
|
|
805
|
+
throw new Error(`Cannot resolve dependencies for ${type.name}. ` +
|
|
806
|
+
"Please provide 'resolveDependency' bootstrap option");
|
|
807
|
+
}
|
|
808
|
+
const depInstances = deps.map(resolveDependency);
|
|
809
|
+
return new type(...depInstances);
|
|
810
|
+
}
|
|
811
|
+
return new type();
|
|
690
812
|
}
|
|
691
813
|
|
|
692
814
|
/**
|
|
@@ -699,7 +821,6 @@ var ViewElementGroupType;
|
|
|
699
821
|
ViewElementGroupType["LayoutElements"] = "LayoutElements";
|
|
700
822
|
ViewElementGroupType["Inputs"] = "Inputs";
|
|
701
823
|
ViewElementGroupType["CustomElements"] = "CustomElements";
|
|
702
|
-
ViewElementGroupType["None"] = "None";
|
|
703
824
|
})(ViewElementGroupType || (ViewElementGroupType = {}));
|
|
704
825
|
|
|
705
826
|
/**
|
|
@@ -734,51 +855,203 @@ var ModelInPageAction;
|
|
|
734
855
|
ModelInPageAction["Copy"] = "copy";
|
|
735
856
|
})(ModelInPageAction || (ModelInPageAction = {}));
|
|
736
857
|
|
|
737
|
-
|
|
858
|
+
/**
|
|
859
|
+
* Handler source types in order of call priority.
|
|
860
|
+
* @internal
|
|
861
|
+
*/
|
|
862
|
+
var HandlerSourceType;
|
|
863
|
+
(function (HandlerSourceType) {
|
|
864
|
+
HandlerSourceType[HandlerSourceType["Schema"] = 0] = "Schema";
|
|
865
|
+
HandlerSourceType[HandlerSourceType["Remote"] = 1] = "Remote";
|
|
866
|
+
HandlerSourceType[HandlerSourceType["Host"] = 2] = "Host";
|
|
867
|
+
})(HandlerSourceType || (HandlerSourceType = {}));
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* @internal
|
|
871
|
+
*/
|
|
872
|
+
var DataSchemaAttributeType;
|
|
873
|
+
(function (DataSchemaAttributeType) {
|
|
874
|
+
DataSchemaAttributeType["OwnAttribute"] = "Own";
|
|
875
|
+
DataSchemaAttributeType["ForwardReferenceAttribute"] = "ForwardReference";
|
|
876
|
+
DataSchemaAttributeType["BackReferenceAttribute"] = "BackReference";
|
|
877
|
+
DataSchemaAttributeType["AggregationAttribute"] = "Aggregation";
|
|
878
|
+
})(DataSchemaAttributeType || (DataSchemaAttributeType = {}));
|
|
879
|
+
/**
|
|
880
|
+
* @internal
|
|
881
|
+
*/
|
|
882
|
+
var DataSchemaAttributeUsageType;
|
|
883
|
+
(function (DataSchemaAttributeUsageType) {
|
|
884
|
+
DataSchemaAttributeUsageType[DataSchemaAttributeUsageType["General"] = 0] = "General";
|
|
885
|
+
DataSchemaAttributeUsageType[DataSchemaAttributeUsageType["Advanced"] = 1] = "Advanced";
|
|
886
|
+
DataSchemaAttributeUsageType[DataSchemaAttributeUsageType["None"] = 2] = "None";
|
|
887
|
+
})(DataSchemaAttributeUsageType || (DataSchemaAttributeUsageType = {}));
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* @internal
|
|
891
|
+
*/
|
|
892
|
+
class HandlersOrderComparer {
|
|
893
|
+
constructor(_request) {
|
|
894
|
+
this._request = _request;
|
|
895
|
+
const scopesOrderEntries = [...(this._request.scopes ?? [])].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
|
+
const componentConfig = ViewElementRegistry.viewElements.get(viewConfigType);
|
|
934
|
+
if (!componentConfig?.inputs) {
|
|
935
|
+
return false;
|
|
936
|
+
}
|
|
937
|
+
return !!componentConfig?.inputs[componentProperty]?.propertyBindable;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* @internal
|
|
942
|
+
*/
|
|
943
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
944
|
+
function CrtViewElement(config) {
|
|
945
|
+
return function (type) {
|
|
946
|
+
checkTypeNamePascalCase(config.type);
|
|
947
|
+
const inputs = getCrtInputsMetadata(type);
|
|
948
|
+
const outputs = getCrtOutputsMetadata(type);
|
|
949
|
+
const validationInputs = getCrtValidationInputsMetadata(type);
|
|
950
|
+
const baseRegistrationConfig = {
|
|
951
|
+
...config,
|
|
952
|
+
inputs,
|
|
953
|
+
outputs,
|
|
954
|
+
validationInputs,
|
|
955
|
+
};
|
|
956
|
+
const registrationConfig = 'selector' in config
|
|
957
|
+
? { ...baseRegistrationConfig, selector: config.selector }
|
|
958
|
+
: { ...baseRegistrationConfig, typeRef: type };
|
|
959
|
+
setViewElementMetadata(registrationConfig, type);
|
|
960
|
+
};
|
|
961
|
+
}
|
|
962
|
+
|
|
738
963
|
/**
|
|
739
964
|
* @public
|
|
740
|
-
* @description
|
|
741
|
-
*
|
|
965
|
+
* @description CrtModule decorator is a 'container' where user actually setup elements.
|
|
966
|
+
* In could contain viewElements, definitions of other CrtModules.
|
|
967
|
+
* @param moduleDefinition - {@link ModuleDefinition}
|
|
742
968
|
*
|
|
743
969
|
* @example
|
|
744
|
-
*
|
|
745
|
-
*
|
|
746
|
-
*
|
|
747
|
-
*
|
|
748
|
-
* @CrtInterfaceDesignerItem({
|
|
749
|
-
* toolbarConfig: {
|
|
750
|
-
* caption: 'usrExampleCaption',
|
|
751
|
-
* name: 'usrExampleName',
|
|
752
|
-
* icon: require(`!!raw-loader?{esModule:false}!../assets/icon.svg`)
|
|
753
|
-
* hint: 'usrExampleHint',
|
|
754
|
-
* defaultPropertyValues: {
|
|
755
|
-
* value: 'This is default value',
|
|
756
|
-
* },
|
|
757
|
-
* },
|
|
970
|
+
* @CrtModule({
|
|
971
|
+
* viewElements: [AppComponent],
|
|
972
|
+
* requestHandlers: [SomeRequestHandler],
|
|
973
|
+
* validators: [SomeValidator],
|
|
758
974
|
* })
|
|
759
|
-
* @
|
|
760
|
-
*
|
|
761
|
-
*
|
|
762
|
-
*
|
|
763
|
-
* encapsulation: ViewEncapsulation.ShadowDom,
|
|
975
|
+
* @NgModule({
|
|
976
|
+
* declarations: [AppComponent],
|
|
977
|
+
* imports: [BrowserModule],
|
|
978
|
+
* providers: [],
|
|
764
979
|
* })
|
|
765
|
-
* export class
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
980
|
+
* export class AppModule {}
|
|
981
|
+
*/
|
|
982
|
+
function CrtModule(moduleDefinition) {
|
|
983
|
+
return (type) => setModuleMetadata(moduleDefinition, type);
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
// noinspection ES6PreferShortImport
|
|
987
|
+
/**
|
|
988
|
+
* @internal
|
|
770
989
|
*/
|
|
771
990
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
772
991
|
function CrtInterfaceDesignerItem(config) {
|
|
992
|
+
function _applyTypeCaption() {
|
|
993
|
+
if (!config.typeCaption && config.toolbarConfig) {
|
|
994
|
+
const toolbarConfig = Array.isArray(config.toolbarConfig)
|
|
995
|
+
? config.toolbarConfig[0]
|
|
996
|
+
: config.toolbarConfig;
|
|
997
|
+
config.typeCaption = toolbarConfig.caption;
|
|
998
|
+
}
|
|
999
|
+
}
|
|
773
1000
|
return function (type) {
|
|
1001
|
+
config.typeRef = type;
|
|
1002
|
+
config.viewElementGroupType ?? (config.viewElementGroupType = ViewElementGroupType.CustomElements);
|
|
1003
|
+
_applyTypeCaption();
|
|
1004
|
+
setInterfaceDesignerItemMetadata(config, type);
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* @public
|
|
1010
|
+
* @description
|
|
1011
|
+
* Constructor parameter decorator.
|
|
1012
|
+
* Mark parameter as dependency that should be obtained by token.
|
|
1013
|
+
* @param token - token by which the dependency instance will be obtained
|
|
1014
|
+
* @example
|
|
1015
|
+
* class MyHandler {
|
|
1016
|
+
* constructor(@CrtInject(USER_NAME_TOKEN) userName: string) {}
|
|
1017
|
+
* }
|
|
1018
|
+
*/
|
|
1019
|
+
function CrtInject(token) {
|
|
1020
|
+
return function (target, paramKey, paramIndex) {
|
|
1021
|
+
Reflect.defineMetadata(crtInjectPrefix + paramIndex, token, target);
|
|
1022
|
+
};
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* @internal
|
|
1027
|
+
*/
|
|
1028
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1029
|
+
function CrtValidator(config) {
|
|
1030
|
+
if (!config) {
|
|
1031
|
+
return (type) => { };
|
|
1032
|
+
}
|
|
1033
|
+
return function (type) {
|
|
1034
|
+
checkTypeNameFormat(config.type, 'ValidatorTypeName');
|
|
774
1035
|
const registrationConfig = {
|
|
775
1036
|
...config,
|
|
776
1037
|
typeRef: type,
|
|
777
1038
|
};
|
|
778
|
-
registrationConfig
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
1039
|
+
setValidatorMetadata(registrationConfig, type);
|
|
1040
|
+
};
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* @internal
|
|
1045
|
+
*/
|
|
1046
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1047
|
+
function CrtRequestHandler(config) {
|
|
1048
|
+
if (!config) {
|
|
1049
|
+
return (type) => { };
|
|
1050
|
+
}
|
|
1051
|
+
return function (type) {
|
|
1052
|
+
checkTypeNameFormat(config.type, 'RequestHandlerTypeName');
|
|
1053
|
+
checkCrtTypeNamePascalCase(config.type);
|
|
1054
|
+
setRequestHandlerMetadata(config, type);
|
|
782
1055
|
};
|
|
783
1056
|
}
|
|
784
1057
|
|
|
@@ -894,24 +1167,29 @@ class InternalHandlerChain {
|
|
|
894
1167
|
map.set(key, handler);
|
|
895
1168
|
this._handlersCache.set(request.type, map);
|
|
896
1169
|
}
|
|
1170
|
+
_isRequestHandler(handler) {
|
|
1171
|
+
return (typeof handler.handle === 'function' &&
|
|
1172
|
+
typeof handler.setNext === 'function');
|
|
1173
|
+
}
|
|
1174
|
+
_checkHandlerInstanceOf(handler) {
|
|
1175
|
+
if (!this._isRequestHandler(handler)) {
|
|
1176
|
+
throw new Error('Handler should implement "BaseRequestHandler"');
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
897
1179
|
_buildHandlersChain(request) {
|
|
898
|
-
const handlers = this._handlers.filter((
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
const requestScopes = [...(request.scopes || [])].reverse();
|
|
902
|
-
for (const requestScope of requestScopes) {
|
|
903
|
-
for (let i = 0; i < scopedHandlers.length; i++) {
|
|
904
|
-
const handler = scopedHandlers[i];
|
|
905
|
-
if (handler.scopes?.includes(requestScope)) {
|
|
906
|
-
chain.push(handler);
|
|
907
|
-
scopedHandlers.splice(scopedHandlers.indexOf(handler), 1);
|
|
908
|
-
i--;
|
|
909
|
-
}
|
|
1180
|
+
const handlers = this._handlers.filter((h) => {
|
|
1181
|
+
if (h.requestType !== request.type) {
|
|
1182
|
+
return false;
|
|
910
1183
|
}
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
1184
|
+
if (!h.scopes?.length) {
|
|
1185
|
+
return true;
|
|
1186
|
+
}
|
|
1187
|
+
return h.scopes.some((s) => request.scopes?.includes(s));
|
|
1188
|
+
});
|
|
1189
|
+
const comparer = new HandlersOrderComparer(request);
|
|
1190
|
+
handlers.sort((a, b) => comparer.compare(a, b));
|
|
1191
|
+
const handlerInstances = handlers.map((handlerConfig) => handlerConfig.createHandler());
|
|
1192
|
+
handlerInstances.forEach((handler) => this._checkHandlerInstanceOf(handler));
|
|
915
1193
|
this._joinHandlersInChain(handlerInstances);
|
|
916
1194
|
const result = handlerInstances[0];
|
|
917
1195
|
this._setCacheHandler(request, result);
|
|
@@ -961,12 +1239,8 @@ class HandlerChainService {
|
|
|
961
1239
|
/**
|
|
962
1240
|
* @internal
|
|
963
1241
|
*/
|
|
964
|
-
register(
|
|
965
|
-
return this._chain.handlerChain$.register(
|
|
966
|
-
createHandler: handlerFactory,
|
|
967
|
-
requestType,
|
|
968
|
-
scopes,
|
|
969
|
-
});
|
|
1242
|
+
register(handlerConfig) {
|
|
1243
|
+
return this._chain.handlerChain$.register(handlerConfig);
|
|
970
1244
|
}
|
|
971
1245
|
/**
|
|
972
1246
|
* @description Method to process passed request
|
|
@@ -1001,30 +1275,6 @@ function ImplementUsingHandlerChain(config) {
|
|
|
1001
1275
|
};
|
|
1002
1276
|
}
|
|
1003
1277
|
|
|
1004
|
-
/**
|
|
1005
|
-
* @internal
|
|
1006
|
-
*/
|
|
1007
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1008
|
-
function CrtRequestHandler(config) {
|
|
1009
|
-
return function (type) {
|
|
1010
|
-
checkTypeNameFormat(config.type, 'RequestHandlerTypeName');
|
|
1011
|
-
checkCrtTypeNamePascalCase(config.type);
|
|
1012
|
-
setRequestHandlerMetadata(config, type);
|
|
1013
|
-
};
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
/**
|
|
1017
|
-
* @internal
|
|
1018
|
-
*/
|
|
1019
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1020
|
-
function CrtRequest(config) {
|
|
1021
|
-
return function (type) {
|
|
1022
|
-
checkTypeNameFormat(config.type, 'RequestTypeName');
|
|
1023
|
-
checkCrtTypeNamePascalCase(config.type);
|
|
1024
|
-
RequestRegistryService.register(config, type);
|
|
1025
|
-
};
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
1278
|
/**
|
|
1029
1279
|
* @internal
|
|
1030
1280
|
*/
|
|
@@ -1048,6 +1298,18 @@ function CrtDesignTimeViewElement(config) {
|
|
|
1048
1298
|
};
|
|
1049
1299
|
}
|
|
1050
1300
|
|
|
1301
|
+
/**
|
|
1302
|
+
* @internal
|
|
1303
|
+
*/
|
|
1304
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1305
|
+
function CrtRequest(config) {
|
|
1306
|
+
return function (type) {
|
|
1307
|
+
checkTypeNameFormat(config.type, 'RequestTypeName');
|
|
1308
|
+
checkCrtTypeNamePascalCase(config.type);
|
|
1309
|
+
RequestRegistryService.register(config, type);
|
|
1310
|
+
};
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1051
1313
|
var DataValueType;
|
|
1052
1314
|
(function (DataValueType) {
|
|
1053
1315
|
DataValueType[DataValueType["Guid"] = 0] = "Guid";
|
|
@@ -1066,7 +1328,7 @@ var DataValueType;
|
|
|
1066
1328
|
DataValueType[DataValueType["CUSTOM_OBJECT"] = 15] = "CUSTOM_OBJECT";
|
|
1067
1329
|
DataValueType[DataValueType["IMAGELOOKUP"] = 16] = "IMAGELOOKUP";
|
|
1068
1330
|
DataValueType[DataValueType["COLLECTION"] = 17] = "COLLECTION";
|
|
1069
|
-
DataValueType[DataValueType["
|
|
1331
|
+
DataValueType[DataValueType["Color"] = 18] = "Color";
|
|
1070
1332
|
DataValueType[DataValueType["LOCALIZABLE_STRING"] = 19] = "LOCALIZABLE_STRING";
|
|
1071
1333
|
DataValueType[DataValueType["ENTITY"] = 20] = "ENTITY";
|
|
1072
1334
|
DataValueType[DataValueType["ENTITY_COLLECTION"] = 21] = "ENTITY_COLLECTION";
|
|
@@ -1090,6 +1352,7 @@ var DataValueType;
|
|
|
1090
1352
|
DataValueType[DataValueType["COMPOSITE_OBJECT_LIST"] = 39] = "COMPOSITE_OBJECT_LIST";
|
|
1091
1353
|
DataValueType[DataValueType["FLOAT8"] = 40] = "FLOAT8";
|
|
1092
1354
|
DataValueType[DataValueType["PHONE_TEXT"] = 42] = "PHONE_TEXT";
|
|
1355
|
+
DataValueType[DataValueType["RICH_TEXT"] = 43] = "RICH_TEXT";
|
|
1093
1356
|
})(DataValueType || (DataValueType = {}));
|
|
1094
1357
|
|
|
1095
1358
|
var AggregationType;
|
|
@@ -2219,6 +2482,11 @@ function registerViewElement(config) {
|
|
|
2219
2482
|
ViewElementRegistry.register(config);
|
|
2220
2483
|
}
|
|
2221
2484
|
|
|
2485
|
+
function checkRemoteName(remoteName) {
|
|
2486
|
+
if (!RemoteEntriesRegistry.items.has(remoteName)) {
|
|
2487
|
+
throw new Error(`Remote entry with name '${remoteName}' does not exist`);
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2222
2490
|
/**
|
|
2223
2491
|
* @internal
|
|
2224
2492
|
*/
|
|
@@ -2247,7 +2515,7 @@ function registerViewElements(types) {
|
|
|
2247
2515
|
*/
|
|
2248
2516
|
function registerInterfaceDesignerItems(types, localizeFn) {
|
|
2249
2517
|
resistantForEach(types, (type) => {
|
|
2250
|
-
if (!hasInterfaceDesignerItemMetadata(type)
|
|
2518
|
+
if (!hasInterfaceDesignerItemMetadata(type)) {
|
|
2251
2519
|
return;
|
|
2252
2520
|
}
|
|
2253
2521
|
let config = getInterfaceDesignerItemMetadata(type);
|
|
@@ -2271,16 +2539,56 @@ function registerDesignTimeViewElements(types) {
|
|
|
2271
2539
|
/**
|
|
2272
2540
|
* @internal
|
|
2273
2541
|
*/
|
|
2274
|
-
function
|
|
2542
|
+
function registerValidators(types, options) {
|
|
2275
2543
|
resistantForEach(types, (type) => {
|
|
2276
|
-
const
|
|
2544
|
+
const metadata = getValidatorMetadata(type);
|
|
2545
|
+
const registrationConfig = {
|
|
2546
|
+
...metadata,
|
|
2547
|
+
instantiate: function () {
|
|
2548
|
+
return instantiate(this.typeRef, options?.resolveDependency);
|
|
2549
|
+
},
|
|
2550
|
+
};
|
|
2551
|
+
ValidatorRegistry.validate(registrationConfig);
|
|
2552
|
+
ValidatorRegistry.register(registrationConfig);
|
|
2553
|
+
});
|
|
2554
|
+
}
|
|
2555
|
+
/**
|
|
2556
|
+
* @internal
|
|
2557
|
+
*/
|
|
2558
|
+
function registerRequestHandlers(types, options, remoteName) {
|
|
2559
|
+
if (options.moduleType === 'remote' && !remoteName) {
|
|
2560
|
+
console.error("To use request handlers, 'remoteName' parameter should be specified.");
|
|
2561
|
+
return;
|
|
2562
|
+
}
|
|
2563
|
+
resistantForEach(types, (type) => {
|
|
2564
|
+
const metadata = getRequestHandlerMetadata(type);
|
|
2565
|
+
let registrationConfig;
|
|
2566
|
+
const createHandler = () => instantiate(type, options?.resolveDependency);
|
|
2567
|
+
if (options.moduleType === 'host') {
|
|
2568
|
+
registrationConfig = {
|
|
2569
|
+
...metadata,
|
|
2570
|
+
source: { type: HandlerSourceType.Host },
|
|
2571
|
+
createHandler,
|
|
2572
|
+
};
|
|
2573
|
+
}
|
|
2574
|
+
else {
|
|
2575
|
+
const remote = RemoteEntriesRegistry.items.get(remoteName);
|
|
2576
|
+
registrationConfig = {
|
|
2577
|
+
...metadata,
|
|
2578
|
+
source: {
|
|
2579
|
+
type: HandlerSourceType.Remote,
|
|
2580
|
+
packageName: remote.packageName,
|
|
2581
|
+
},
|
|
2582
|
+
createHandler,
|
|
2583
|
+
};
|
|
2584
|
+
}
|
|
2277
2585
|
RequestHandlerRegistryService.register(registrationConfig, type);
|
|
2278
2586
|
});
|
|
2279
2587
|
}
|
|
2280
2588
|
/**
|
|
2281
2589
|
* @internal
|
|
2282
2590
|
*/
|
|
2283
|
-
function _bootstrapCrtModule(type, options) {
|
|
2591
|
+
function _bootstrapCrtModule(name, type, options) {
|
|
2284
2592
|
try {
|
|
2285
2593
|
const moduleDefinition = getModuleMetadata(type);
|
|
2286
2594
|
if (moduleDefinition.viewElements) {
|
|
@@ -2291,27 +2599,37 @@ function _bootstrapCrtModule(type, options) {
|
|
|
2291
2599
|
registerDesignTimeViewElements(moduleDefinition.designTimeViewElements);
|
|
2292
2600
|
}
|
|
2293
2601
|
if (moduleDefinition.requestHandlers) {
|
|
2294
|
-
registerRequestHandlers(moduleDefinition.requestHandlers);
|
|
2602
|
+
registerRequestHandlers(moduleDefinition.requestHandlers, options, name);
|
|
2295
2603
|
}
|
|
2296
|
-
moduleDefinition.
|
|
2604
|
+
if (moduleDefinition.validators) {
|
|
2605
|
+
registerValidators(moduleDefinition.validators, options);
|
|
2606
|
+
}
|
|
2607
|
+
moduleDefinition.includes?.forEach((t) => _bootstrapCrtModule(name, t, options));
|
|
2297
2608
|
}
|
|
2298
2609
|
catch (error) {
|
|
2299
2610
|
console.error(error);
|
|
2300
2611
|
}
|
|
2301
2612
|
}
|
|
2302
2613
|
/**
|
|
2303
|
-
* @
|
|
2304
|
-
* @description Function required to bootstrapping elements defined in CrtModules.
|
|
2305
|
-
* Call this function as soon as possible during bootstrapping your application.
|
|
2306
|
-
* @param type - module type
|
|
2307
|
-
* @param options - {@link BootstrapOptions}
|
|
2308
|
-
*
|
|
2309
|
-
* @example
|
|
2310
|
-
* bootstrapCrtModule(AppModule)
|
|
2614
|
+
* @internal
|
|
2311
2615
|
*/
|
|
2312
|
-
function bootstrapCrtModule(
|
|
2313
|
-
|
|
2314
|
-
|
|
2616
|
+
function bootstrapCrtModule(...args) {
|
|
2617
|
+
const name = typeof args[0] === 'string' ? args.shift() : undefined;
|
|
2618
|
+
const type = args[0];
|
|
2619
|
+
const options = args[1] ?? {};
|
|
2620
|
+
options.moduleType ?? (options.moduleType = 'remote');
|
|
2621
|
+
if (name) {
|
|
2622
|
+
if (options.moduleType === 'remote') {
|
|
2623
|
+
checkRemoteName(name);
|
|
2624
|
+
}
|
|
2625
|
+
else {
|
|
2626
|
+
throw new Error('Host module cannot have name');
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2629
|
+
_bootstrapCrtModule(name, type, options);
|
|
2630
|
+
if (options.moduleType === 'remote') {
|
|
2631
|
+
BootstrapNotifier.instance.notify(type);
|
|
2632
|
+
}
|
|
2315
2633
|
}
|
|
2316
2634
|
|
|
2317
2635
|
/**
|
|
@@ -2342,12 +2660,37 @@ function localize(key) {
|
|
|
2342
2660
|
return new LocalizableValue(key);
|
|
2343
2661
|
}
|
|
2344
2662
|
|
|
2663
|
+
/**
|
|
2664
|
+
* @internal
|
|
2665
|
+
*/
|
|
2666
|
+
function registerHandlerChainServices(types) {
|
|
2667
|
+
types?.forEach((type) => {
|
|
2668
|
+
const registrationConfig = getHandlerChainServiceMetadata(type);
|
|
2669
|
+
HandlerChainServicesRegistry.register(registrationConfig);
|
|
2670
|
+
});
|
|
2671
|
+
}
|
|
2672
|
+
/**
|
|
2673
|
+
* @internal
|
|
2674
|
+
*/
|
|
2675
|
+
function _bootstrapCrtModuleHandlerChainServices(type) {
|
|
2676
|
+
const moduleDefinition = getModuleMetadata(type);
|
|
2677
|
+
if (moduleDefinition.handlerChainServices) {
|
|
2678
|
+
registerHandlerChainServices(moduleDefinition.handlerChainServices);
|
|
2679
|
+
}
|
|
2680
|
+
moduleDefinition.includes?.forEach((t) => _bootstrapCrtModuleHandlerChainServices(t));
|
|
2681
|
+
}
|
|
2682
|
+
/**
|
|
2683
|
+
* @internal
|
|
2684
|
+
*/
|
|
2685
|
+
function bootstrapCrtModuleHandlerChainServices(type) {
|
|
2686
|
+
_bootstrapCrtModuleHandlerChainServices(type);
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2345
2689
|
class BaseHandlerChainService {
|
|
2346
2690
|
}
|
|
2347
2691
|
|
|
2348
2692
|
/**
|
|
2349
2693
|
* @public
|
|
2350
|
-
* @class FeatureService
|
|
2351
2694
|
* @classdesc Service to working with Creatio platform features using handler chain
|
|
2352
2695
|
* @extends {BaseHandlerChainService}
|
|
2353
2696
|
*/
|
|
@@ -2371,7 +2714,6 @@ __decorate([
|
|
|
2371
2714
|
|
|
2372
2715
|
/**
|
|
2373
2716
|
* @public
|
|
2374
|
-
* @class RightsService
|
|
2375
2717
|
* @classdesc Service to working rights using handler chain
|
|
2376
2718
|
* @extends {BaseHandlerChainService}
|
|
2377
2719
|
*/
|
|
@@ -2470,7 +2812,6 @@ __decorate([
|
|
|
2470
2812
|
|
|
2471
2813
|
/**
|
|
2472
2814
|
* @public
|
|
2473
|
-
* @class HttpClientService
|
|
2474
2815
|
* @classdesc Http service to perform Http requests
|
|
2475
2816
|
* @extends {BaseHandlerChainService}
|
|
2476
2817
|
*/
|
|
@@ -2541,7 +2882,6 @@ __decorate([
|
|
|
2541
2882
|
|
|
2542
2883
|
/**
|
|
2543
2884
|
* @public
|
|
2544
|
-
* @class MaskService
|
|
2545
2885
|
* @classdesc Service to working with mask using handler chain
|
|
2546
2886
|
* @extends {BaseHandlerChainService}
|
|
2547
2887
|
*/
|
|
@@ -2590,7 +2930,6 @@ class Model extends BaseHandlerChainService {
|
|
|
2590
2930
|
}, '');
|
|
2591
2931
|
return new Model(crtModel);
|
|
2592
2932
|
}
|
|
2593
|
-
// TODO RND-23725
|
|
2594
2933
|
getSchema() {
|
|
2595
2934
|
return this._crtModel.getSchema().toPromise();
|
|
2596
2935
|
}
|
|
@@ -2639,7 +2978,7 @@ var ModelParameterType;
|
|
|
2639
2978
|
})(ModelParameterType || (ModelParameterType = {}));
|
|
2640
2979
|
|
|
2641
2980
|
/**
|
|
2642
|
-
* @
|
|
2981
|
+
* @public
|
|
2643
2982
|
* @abstract
|
|
2644
2983
|
* @classdesc Class for designing request handlers.
|
|
2645
2984
|
*/
|
|
@@ -2650,6 +2989,12 @@ class BaseRequestHandler {
|
|
|
2650
2989
|
get next() {
|
|
2651
2990
|
return this._next;
|
|
2652
2991
|
}
|
|
2992
|
+
/**
|
|
2993
|
+
* @internal
|
|
2994
|
+
*/
|
|
2995
|
+
static [Symbol.hasInstance](instance) {
|
|
2996
|
+
return instance?.constructor?.['_instanceOfKey'] === BaseRequestHandler._instanceOfKey;
|
|
2997
|
+
}
|
|
2653
2998
|
/**
|
|
2654
2999
|
* @description Method to set request handler to handler chain.
|
|
2655
3000
|
* @param next - link for next request handler - {@link RequestHandler}
|
|
@@ -2661,6 +3006,11 @@ class BaseRequestHandler {
|
|
|
2661
3006
|
this._next = next;
|
|
2662
3007
|
}
|
|
2663
3008
|
}
|
|
3009
|
+
/**
|
|
3010
|
+
* @internal
|
|
3011
|
+
* @dontChange
|
|
3012
|
+
*/
|
|
3013
|
+
BaseRequestHandler._instanceOfKey = 'devkit_BaseRequestHandler';
|
|
2664
3014
|
|
|
2665
3015
|
/**
|
|
2666
3016
|
* @internal
|
|
@@ -2705,5 +3055,5 @@ function toAggregationType(aggregationFunction) {
|
|
|
2705
3055
|
* Generated bundle index. Do not edit.
|
|
2706
3056
|
*/
|
|
2707
3057
|
|
|
2708
|
-
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,
|
|
3058
|
+
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 };
|
|
2709
3059
|
//# sourceMappingURL=creatio-devkit-common.mjs.map
|