@creatio-devkit/common 0.803.1 → 0.805.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -2
- package/README.md +16 -20
- package/creatio-devkit-common.d.ts +393 -39
- 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/default-value-source.enum.mjs +12 -0
- 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 +4 -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 +7 -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/default-value-schema.mjs +2 -0
- 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 +4 -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 +5 -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 +532 -167
- package/fesm2015/creatio-devkit-common.mjs.map +1 -1
- package/fesm2020/creatio-devkit-common.mjs +539 -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,211 @@ 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
|
+
var DefaultValueSource;
|
|
892
|
+
(function (DefaultValueSource) {
|
|
893
|
+
DefaultValueSource[DefaultValueSource["None"] = 0] = "None";
|
|
894
|
+
DefaultValueSource[DefaultValueSource["Const"] = 1] = "Const";
|
|
895
|
+
DefaultValueSource[DefaultValueSource["Settings"] = 2] = "Settings";
|
|
896
|
+
DefaultValueSource[DefaultValueSource["SystemValue"] = 3] = "SystemValue";
|
|
897
|
+
DefaultValueSource[DefaultValueSource["Sequence"] = 4] = "Sequence";
|
|
898
|
+
})(DefaultValueSource || (DefaultValueSource = {}));
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* @internal
|
|
902
|
+
*/
|
|
903
|
+
class HandlersOrderComparer {
|
|
904
|
+
constructor(_request) {
|
|
905
|
+
var _a;
|
|
906
|
+
this._request = _request;
|
|
907
|
+
const scopesOrderEntries = [...((_a = this._request.scopes) !== null && _a !== void 0 ? _a : [])].reverse().map((scope, index) => [scope, index]);
|
|
908
|
+
this._scopesOrder = Object.fromEntries(scopesOrderEntries);
|
|
909
|
+
}
|
|
910
|
+
_getOrderByScopes(handler) {
|
|
911
|
+
if (!handler.scopes) {
|
|
912
|
+
return Number.MAX_VALUE;
|
|
913
|
+
}
|
|
914
|
+
const scopesOrder = handler.scopes.filter((s) => s in this._scopesOrder).map((s) => this._scopesOrder[s]);
|
|
915
|
+
return Math.min(...scopesOrder);
|
|
916
|
+
}
|
|
917
|
+
_getOrderByPkgTopology(handler) {
|
|
918
|
+
if (handler.source.type === HandlerSourceType.Host) {
|
|
919
|
+
return Number.MAX_VALUE;
|
|
920
|
+
}
|
|
921
|
+
return PkgTopology.get(handler.source.packageName);
|
|
922
|
+
}
|
|
923
|
+
compare(a, b) {
|
|
924
|
+
const aScopeOrder = this._getOrderByScopes(a);
|
|
925
|
+
const bScopeOrder = this._getOrderByScopes(b);
|
|
926
|
+
let diff = aScopeOrder - bScopeOrder;
|
|
927
|
+
if (diff) {
|
|
928
|
+
return diff;
|
|
929
|
+
}
|
|
930
|
+
const aPkgTopologyOrder = this._getOrderByPkgTopology(a);
|
|
931
|
+
const bPkgTopologyOrder = this._getOrderByPkgTopology(b);
|
|
932
|
+
diff = aPkgTopologyOrder - bPkgTopologyOrder;
|
|
933
|
+
if (diff) {
|
|
934
|
+
return diff;
|
|
935
|
+
}
|
|
936
|
+
diff = a.source.type - b.source.type;
|
|
937
|
+
return diff;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* @internal
|
|
943
|
+
*/
|
|
944
|
+
function isComponentPropertyBindable(viewConfigType, componentProperty) {
|
|
945
|
+
var _a;
|
|
946
|
+
const componentConfig = ViewElementRegistry.viewElements.get(viewConfigType);
|
|
947
|
+
if (!(componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.inputs)) {
|
|
948
|
+
return false;
|
|
949
|
+
}
|
|
950
|
+
return !!((_a = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.inputs[componentProperty]) === null || _a === void 0 ? void 0 : _a.propertyBindable);
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* @internal
|
|
955
|
+
*/
|
|
956
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
957
|
+
function CrtViewElement(config) {
|
|
958
|
+
return function (type) {
|
|
959
|
+
checkTypeNamePascalCase(config.type);
|
|
960
|
+
const inputs = getCrtInputsMetadata(type);
|
|
961
|
+
const outputs = getCrtOutputsMetadata(type);
|
|
962
|
+
const validationInputs = getCrtValidationInputsMetadata(type);
|
|
963
|
+
const baseRegistrationConfig = Object.assign(Object.assign({}, config), { inputs,
|
|
964
|
+
outputs,
|
|
965
|
+
validationInputs });
|
|
966
|
+
const registrationConfig = 'selector' in config
|
|
967
|
+
? Object.assign(Object.assign({}, baseRegistrationConfig), { selector: config.selector }) : Object.assign(Object.assign({}, baseRegistrationConfig), { typeRef: type });
|
|
968
|
+
setViewElementMetadata(registrationConfig, type);
|
|
969
|
+
};
|
|
970
|
+
}
|
|
971
|
+
|
|
733
972
|
/**
|
|
734
973
|
* @public
|
|
735
|
-
* @description
|
|
736
|
-
*
|
|
974
|
+
* @description CrtModule decorator is a 'container' where user actually setup elements.
|
|
975
|
+
* In could contain viewElements, definitions of other CrtModules.
|
|
976
|
+
* @param moduleDefinition - {@link ModuleDefinition}
|
|
737
977
|
*
|
|
738
978
|
* @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
|
-
* },
|
|
979
|
+
* @CrtModule({
|
|
980
|
+
* viewElements: [AppComponent],
|
|
981
|
+
* requestHandlers: [SomeRequestHandler],
|
|
982
|
+
* validators: [SomeValidator],
|
|
753
983
|
* })
|
|
754
|
-
* @
|
|
755
|
-
*
|
|
756
|
-
*
|
|
757
|
-
*
|
|
758
|
-
* encapsulation: ViewEncapsulation.ShadowDom,
|
|
984
|
+
* @NgModule({
|
|
985
|
+
* declarations: [AppComponent],
|
|
986
|
+
* imports: [BrowserModule],
|
|
987
|
+
* providers: [],
|
|
759
988
|
* })
|
|
760
|
-
* export class
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
989
|
+
* export class AppModule {}
|
|
990
|
+
*/
|
|
991
|
+
function CrtModule(moduleDefinition) {
|
|
992
|
+
return (type) => setModuleMetadata(moduleDefinition, type);
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
// noinspection ES6PreferShortImport
|
|
996
|
+
/**
|
|
997
|
+
* @internal
|
|
765
998
|
*/
|
|
766
999
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
767
1000
|
function CrtInterfaceDesignerItem(config) {
|
|
1001
|
+
function _applyTypeCaption() {
|
|
1002
|
+
if (!config.typeCaption && config.toolbarConfig) {
|
|
1003
|
+
const toolbarConfig = Array.isArray(config.toolbarConfig)
|
|
1004
|
+
? config.toolbarConfig[0]
|
|
1005
|
+
: config.toolbarConfig;
|
|
1006
|
+
config.typeCaption = toolbarConfig.caption;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
return function (type) {
|
|
1010
|
+
var _a;
|
|
1011
|
+
config.typeRef = type;
|
|
1012
|
+
(_a = config.viewElementGroupType) !== null && _a !== void 0 ? _a : (config.viewElementGroupType = ViewElementGroupType.CustomElements);
|
|
1013
|
+
_applyTypeCaption();
|
|
1014
|
+
setInterfaceDesignerItemMetadata(config, type);
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* @public
|
|
1020
|
+
* @description
|
|
1021
|
+
* Constructor parameter decorator.
|
|
1022
|
+
* Mark parameter as dependency that should be obtained by token.
|
|
1023
|
+
* @param token - token by which the dependency instance will be obtained
|
|
1024
|
+
* @example
|
|
1025
|
+
* class MyHandler {
|
|
1026
|
+
* constructor(@CrtInject(USER_NAME_TOKEN) userName: string) {}
|
|
1027
|
+
* }
|
|
1028
|
+
*/
|
|
1029
|
+
function CrtInject(token) {
|
|
1030
|
+
return function (target, paramKey, paramIndex) {
|
|
1031
|
+
Reflect.defineMetadata(crtInjectPrefix + paramIndex, token, target);
|
|
1032
|
+
};
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* @internal
|
|
1037
|
+
*/
|
|
1038
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1039
|
+
function CrtValidator(config) {
|
|
1040
|
+
if (!config) {
|
|
1041
|
+
return (type) => { };
|
|
1042
|
+
}
|
|
768
1043
|
return function (type) {
|
|
1044
|
+
checkTypeNameFormat(config.type, 'ValidatorTypeName');
|
|
769
1045
|
const registrationConfig = Object.assign(Object.assign({}, config), { typeRef: type });
|
|
770
|
-
registrationConfig
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
1046
|
+
setValidatorMetadata(registrationConfig, type);
|
|
1047
|
+
};
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* @internal
|
|
1052
|
+
*/
|
|
1053
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1054
|
+
function CrtRequestHandler(config) {
|
|
1055
|
+
if (!config) {
|
|
1056
|
+
return (type) => { };
|
|
1057
|
+
}
|
|
1058
|
+
return function (type) {
|
|
1059
|
+
checkTypeNameFormat(config.type, 'RequestHandlerTypeName');
|
|
1060
|
+
checkCrtTypeNamePascalCase(config.type);
|
|
1061
|
+
setRequestHandlerMetadata(config, type);
|
|
774
1062
|
};
|
|
775
1063
|
}
|
|
776
1064
|
|
|
@@ -886,25 +1174,30 @@ class InternalHandlerChain {
|
|
|
886
1174
|
map.set(key, handler);
|
|
887
1175
|
this._handlersCache.set(request.type, map);
|
|
888
1176
|
}
|
|
1177
|
+
_isRequestHandler(handler) {
|
|
1178
|
+
return (typeof handler.handle === 'function' &&
|
|
1179
|
+
typeof handler.setNext === 'function');
|
|
1180
|
+
}
|
|
1181
|
+
_checkHandlerInstanceOf(handler) {
|
|
1182
|
+
if (!this._isRequestHandler(handler)) {
|
|
1183
|
+
throw new Error('Handler should implement "BaseRequestHandler"');
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
889
1186
|
_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
|
-
}
|
|
1187
|
+
const handlers = this._handlers.filter((h) => {
|
|
1188
|
+
var _a;
|
|
1189
|
+
if (h.requestType !== request.type) {
|
|
1190
|
+
return false;
|
|
903
1191
|
}
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1192
|
+
if (!((_a = h.scopes) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
1193
|
+
return true;
|
|
1194
|
+
}
|
|
1195
|
+
return h.scopes.some((s) => { var _a; return (_a = request.scopes) === null || _a === void 0 ? void 0 : _a.includes(s); });
|
|
1196
|
+
});
|
|
1197
|
+
const comparer = new HandlersOrderComparer(request);
|
|
1198
|
+
handlers.sort((a, b) => comparer.compare(a, b));
|
|
1199
|
+
const handlerInstances = handlers.map((handlerConfig) => handlerConfig.createHandler());
|
|
1200
|
+
handlerInstances.forEach((handler) => this._checkHandlerInstanceOf(handler));
|
|
908
1201
|
this._joinHandlersInChain(handlerInstances);
|
|
909
1202
|
const result = handlerInstances[0];
|
|
910
1203
|
this._setCacheHandler(request, result);
|
|
@@ -954,12 +1247,8 @@ class HandlerChainService {
|
|
|
954
1247
|
/**
|
|
955
1248
|
* @internal
|
|
956
1249
|
*/
|
|
957
|
-
register(
|
|
958
|
-
return this._chain.handlerChain$.register(
|
|
959
|
-
createHandler: handlerFactory,
|
|
960
|
-
requestType,
|
|
961
|
-
scopes,
|
|
962
|
-
});
|
|
1250
|
+
register(handlerConfig) {
|
|
1251
|
+
return this._chain.handlerChain$.register(handlerConfig);
|
|
963
1252
|
}
|
|
964
1253
|
/**
|
|
965
1254
|
* @description Method to process passed request
|
|
@@ -998,23 +1287,19 @@ function ImplementUsingHandlerChain(config) {
|
|
|
998
1287
|
* @internal
|
|
999
1288
|
*/
|
|
1000
1289
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1001
|
-
function
|
|
1290
|
+
function CrtConverter(name) {
|
|
1002
1291
|
return function (type) {
|
|
1003
|
-
|
|
1004
|
-
checkCrtTypeNamePascalCase(config.type);
|
|
1005
|
-
setRequestHandlerMetadata(config, type);
|
|
1292
|
+
GlobalConvertersRegistryService.register(name, type);
|
|
1006
1293
|
};
|
|
1007
1294
|
}
|
|
1008
1295
|
|
|
1009
1296
|
/**
|
|
1010
1297
|
* @internal
|
|
1011
1298
|
*/
|
|
1012
|
-
|
|
1013
|
-
function CrtRequest(config) {
|
|
1299
|
+
function CrtDesignTimeViewElement(config) {
|
|
1014
1300
|
return function (type) {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
RequestRegistryService.register(config, type);
|
|
1301
|
+
const registrationConfig = Object.assign(Object.assign({}, config), { typeRef: type });
|
|
1302
|
+
setDesignTimeViewElementMetadata(registrationConfig, type);
|
|
1018
1303
|
};
|
|
1019
1304
|
}
|
|
1020
1305
|
|
|
@@ -1022,19 +1307,11 @@ function CrtRequest(config) {
|
|
|
1022
1307
|
* @internal
|
|
1023
1308
|
*/
|
|
1024
1309
|
// 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) {
|
|
1310
|
+
function CrtRequest(config) {
|
|
1035
1311
|
return function (type) {
|
|
1036
|
-
|
|
1037
|
-
|
|
1312
|
+
checkTypeNameFormat(config.type, 'RequestTypeName');
|
|
1313
|
+
checkCrtTypeNamePascalCase(config.type);
|
|
1314
|
+
RequestRegistryService.register(config, type);
|
|
1038
1315
|
};
|
|
1039
1316
|
}
|
|
1040
1317
|
|
|
@@ -1056,7 +1333,7 @@ var DataValueType;
|
|
|
1056
1333
|
DataValueType[DataValueType["CUSTOM_OBJECT"] = 15] = "CUSTOM_OBJECT";
|
|
1057
1334
|
DataValueType[DataValueType["IMAGELOOKUP"] = 16] = "IMAGELOOKUP";
|
|
1058
1335
|
DataValueType[DataValueType["COLLECTION"] = 17] = "COLLECTION";
|
|
1059
|
-
DataValueType[DataValueType["
|
|
1336
|
+
DataValueType[DataValueType["Color"] = 18] = "Color";
|
|
1060
1337
|
DataValueType[DataValueType["LOCALIZABLE_STRING"] = 19] = "LOCALIZABLE_STRING";
|
|
1061
1338
|
DataValueType[DataValueType["ENTITY"] = 20] = "ENTITY";
|
|
1062
1339
|
DataValueType[DataValueType["ENTITY_COLLECTION"] = 21] = "ENTITY_COLLECTION";
|
|
@@ -1080,6 +1357,9 @@ var DataValueType;
|
|
|
1080
1357
|
DataValueType[DataValueType["COMPOSITE_OBJECT_LIST"] = 39] = "COMPOSITE_OBJECT_LIST";
|
|
1081
1358
|
DataValueType[DataValueType["FLOAT8"] = 40] = "FLOAT8";
|
|
1082
1359
|
DataValueType[DataValueType["PHONE_TEXT"] = 42] = "PHONE_TEXT";
|
|
1360
|
+
DataValueType[DataValueType["RICH_TEXT"] = 43] = "RICH_TEXT";
|
|
1361
|
+
DataValueType[DataValueType["WEB_TEXT"] = 44] = "WEB_TEXT";
|
|
1362
|
+
DataValueType[DataValueType["EMAIL_TEXT"] = 45] = "EMAIL_TEXT";
|
|
1083
1363
|
})(DataValueType || (DataValueType = {}));
|
|
1084
1364
|
|
|
1085
1365
|
var AggregationType;
|
|
@@ -2153,6 +2433,12 @@ class UpdateQuery extends BaseFilterableQuery {
|
|
|
2153
2433
|
super(QueryOperationType.Update, rootSchemaName);
|
|
2154
2434
|
// region Fields: Private
|
|
2155
2435
|
this._columnValues = new Map();
|
|
2436
|
+
// endregion
|
|
2437
|
+
// region Fields: Public
|
|
2438
|
+
/**
|
|
2439
|
+
* Flag that indicates whether to force save data.
|
|
2440
|
+
*/
|
|
2441
|
+
this.isForceUpdate = false;
|
|
2156
2442
|
}
|
|
2157
2443
|
// endregion
|
|
2158
2444
|
// region Properties: Public
|
|
@@ -2194,6 +2480,11 @@ function registerViewElement(config) {
|
|
|
2194
2480
|
ViewElementRegistry.register(config);
|
|
2195
2481
|
}
|
|
2196
2482
|
|
|
2483
|
+
function checkRemoteName(remoteName) {
|
|
2484
|
+
if (!RemoteEntriesRegistry.items.has(remoteName)) {
|
|
2485
|
+
throw new Error(`Remote entry with name '${remoteName}' does not exist`);
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2197
2488
|
/**
|
|
2198
2489
|
* @internal
|
|
2199
2490
|
*/
|
|
@@ -2222,7 +2513,7 @@ function registerViewElements(types) {
|
|
|
2222
2513
|
*/
|
|
2223
2514
|
function registerInterfaceDesignerItems(types, localizeFn) {
|
|
2224
2515
|
resistantForEach(types, (type) => {
|
|
2225
|
-
if (!hasInterfaceDesignerItemMetadata(type)
|
|
2516
|
+
if (!hasInterfaceDesignerItemMetadata(type)) {
|
|
2226
2517
|
return;
|
|
2227
2518
|
}
|
|
2228
2519
|
let config = getInterfaceDesignerItemMetadata(type);
|
|
@@ -2246,16 +2537,45 @@ function registerDesignTimeViewElements(types) {
|
|
|
2246
2537
|
/**
|
|
2247
2538
|
* @internal
|
|
2248
2539
|
*/
|
|
2249
|
-
function
|
|
2540
|
+
function registerValidators(types, options) {
|
|
2541
|
+
resistantForEach(types, (type) => {
|
|
2542
|
+
const metadata = getValidatorMetadata(type);
|
|
2543
|
+
const registrationConfig = Object.assign(Object.assign({}, metadata), { instantiate: function () {
|
|
2544
|
+
return instantiate(this.typeRef, options === null || options === void 0 ? void 0 : options.resolveDependency);
|
|
2545
|
+
} });
|
|
2546
|
+
ValidatorRegistry.validate(registrationConfig);
|
|
2547
|
+
ValidatorRegistry.register(registrationConfig);
|
|
2548
|
+
});
|
|
2549
|
+
}
|
|
2550
|
+
/**
|
|
2551
|
+
* @internal
|
|
2552
|
+
*/
|
|
2553
|
+
function registerRequestHandlers(types, options, remoteName) {
|
|
2554
|
+
if (options.moduleType === 'remote' && !remoteName) {
|
|
2555
|
+
console.error("To use request handlers, 'remoteName' parameter should be specified.");
|
|
2556
|
+
return;
|
|
2557
|
+
}
|
|
2250
2558
|
resistantForEach(types, (type) => {
|
|
2251
|
-
const
|
|
2559
|
+
const metadata = getRequestHandlerMetadata(type);
|
|
2560
|
+
let registrationConfig;
|
|
2561
|
+
const createHandler = () => instantiate(type, options === null || options === void 0 ? void 0 : options.resolveDependency);
|
|
2562
|
+
if (options.moduleType === 'host') {
|
|
2563
|
+
registrationConfig = Object.assign(Object.assign({}, metadata), { source: { type: HandlerSourceType.Host }, createHandler });
|
|
2564
|
+
}
|
|
2565
|
+
else {
|
|
2566
|
+
const remote = RemoteEntriesRegistry.items.get(remoteName);
|
|
2567
|
+
registrationConfig = Object.assign(Object.assign({}, metadata), { source: {
|
|
2568
|
+
type: HandlerSourceType.Remote,
|
|
2569
|
+
packageName: remote.packageName,
|
|
2570
|
+
}, createHandler });
|
|
2571
|
+
}
|
|
2252
2572
|
RequestHandlerRegistryService.register(registrationConfig, type);
|
|
2253
2573
|
});
|
|
2254
2574
|
}
|
|
2255
2575
|
/**
|
|
2256
2576
|
* @internal
|
|
2257
2577
|
*/
|
|
2258
|
-
function _bootstrapCrtModule(type, options) {
|
|
2578
|
+
function _bootstrapCrtModule(name, type, options) {
|
|
2259
2579
|
var _a;
|
|
2260
2580
|
try {
|
|
2261
2581
|
const moduleDefinition = getModuleMetadata(type);
|
|
@@ -2267,27 +2587,38 @@ function _bootstrapCrtModule(type, options) {
|
|
|
2267
2587
|
registerDesignTimeViewElements(moduleDefinition.designTimeViewElements);
|
|
2268
2588
|
}
|
|
2269
2589
|
if (moduleDefinition.requestHandlers) {
|
|
2270
|
-
registerRequestHandlers(moduleDefinition.requestHandlers);
|
|
2590
|
+
registerRequestHandlers(moduleDefinition.requestHandlers, options, name);
|
|
2591
|
+
}
|
|
2592
|
+
if (moduleDefinition.validators) {
|
|
2593
|
+
registerValidators(moduleDefinition.validators, options);
|
|
2271
2594
|
}
|
|
2272
|
-
(_a = moduleDefinition.includes) === null || _a === void 0 ? void 0 : _a.forEach((t) => _bootstrapCrtModule(t, options));
|
|
2595
|
+
(_a = moduleDefinition.includes) === null || _a === void 0 ? void 0 : _a.forEach((t) => _bootstrapCrtModule(name, t, options));
|
|
2273
2596
|
}
|
|
2274
2597
|
catch (error) {
|
|
2275
2598
|
console.error(error);
|
|
2276
2599
|
}
|
|
2277
2600
|
}
|
|
2278
2601
|
/**
|
|
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)
|
|
2602
|
+
* @internal
|
|
2287
2603
|
*/
|
|
2288
|
-
function bootstrapCrtModule(
|
|
2289
|
-
|
|
2290
|
-
|
|
2604
|
+
function bootstrapCrtModule(...args) {
|
|
2605
|
+
var _a, _b;
|
|
2606
|
+
const name = typeof args[0] === 'string' ? args.shift() : undefined;
|
|
2607
|
+
const type = args[0];
|
|
2608
|
+
const options = (_a = args[1]) !== null && _a !== void 0 ? _a : {};
|
|
2609
|
+
(_b = options.moduleType) !== null && _b !== void 0 ? _b : (options.moduleType = 'remote');
|
|
2610
|
+
if (name) {
|
|
2611
|
+
if (options.moduleType === 'remote') {
|
|
2612
|
+
checkRemoteName(name);
|
|
2613
|
+
}
|
|
2614
|
+
else {
|
|
2615
|
+
throw new Error('Host module cannot have name');
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
_bootstrapCrtModule(name, type, options);
|
|
2619
|
+
if (options.moduleType === 'remote') {
|
|
2620
|
+
BootstrapNotifier.instance.notify(type);
|
|
2621
|
+
}
|
|
2291
2622
|
}
|
|
2292
2623
|
|
|
2293
2624
|
/**
|
|
@@ -2318,12 +2649,38 @@ function localize(key) {
|
|
|
2318
2649
|
return new LocalizableValue(key);
|
|
2319
2650
|
}
|
|
2320
2651
|
|
|
2652
|
+
/**
|
|
2653
|
+
* @internal
|
|
2654
|
+
*/
|
|
2655
|
+
function registerHandlerChainServices(types) {
|
|
2656
|
+
types === null || types === void 0 ? void 0 : types.forEach((type) => {
|
|
2657
|
+
const registrationConfig = getHandlerChainServiceMetadata(type);
|
|
2658
|
+
HandlerChainServicesRegistry.register(registrationConfig);
|
|
2659
|
+
});
|
|
2660
|
+
}
|
|
2661
|
+
/**
|
|
2662
|
+
* @internal
|
|
2663
|
+
*/
|
|
2664
|
+
function _bootstrapCrtModuleHandlerChainServices(type) {
|
|
2665
|
+
var _a;
|
|
2666
|
+
const moduleDefinition = getModuleMetadata(type);
|
|
2667
|
+
if (moduleDefinition.handlerChainServices) {
|
|
2668
|
+
registerHandlerChainServices(moduleDefinition.handlerChainServices);
|
|
2669
|
+
}
|
|
2670
|
+
(_a = moduleDefinition.includes) === null || _a === void 0 ? void 0 : _a.forEach((t) => _bootstrapCrtModuleHandlerChainServices(t));
|
|
2671
|
+
}
|
|
2672
|
+
/**
|
|
2673
|
+
* @internal
|
|
2674
|
+
*/
|
|
2675
|
+
function bootstrapCrtModuleHandlerChainServices(type) {
|
|
2676
|
+
_bootstrapCrtModuleHandlerChainServices(type);
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2321
2679
|
class BaseHandlerChainService {
|
|
2322
2680
|
}
|
|
2323
2681
|
|
|
2324
2682
|
/**
|
|
2325
2683
|
* @public
|
|
2326
|
-
* @class FeatureService
|
|
2327
2684
|
* @classdesc Service to working with Creatio platform features using handler chain
|
|
2328
2685
|
* @extends {BaseHandlerChainService}
|
|
2329
2686
|
*/
|
|
@@ -2347,7 +2704,6 @@ __decorate([
|
|
|
2347
2704
|
|
|
2348
2705
|
/**
|
|
2349
2706
|
* @public
|
|
2350
|
-
* @class RightsService
|
|
2351
2707
|
* @classdesc Service to working rights using handler chain
|
|
2352
2708
|
* @extends {BaseHandlerChainService}
|
|
2353
2709
|
*/
|
|
@@ -2446,7 +2802,6 @@ __decorate([
|
|
|
2446
2802
|
|
|
2447
2803
|
/**
|
|
2448
2804
|
* @public
|
|
2449
|
-
* @class HttpClientService
|
|
2450
2805
|
* @classdesc Http service to perform Http requests
|
|
2451
2806
|
* @extends {BaseHandlerChainService}
|
|
2452
2807
|
*/
|
|
@@ -2517,7 +2872,6 @@ __decorate([
|
|
|
2517
2872
|
|
|
2518
2873
|
/**
|
|
2519
2874
|
* @public
|
|
2520
|
-
* @class MaskService
|
|
2521
2875
|
* @classdesc Service to working with mask using handler chain
|
|
2522
2876
|
* @extends {BaseHandlerChainService}
|
|
2523
2877
|
*/
|
|
@@ -2568,7 +2922,6 @@ class Model extends BaseHandlerChainService {
|
|
|
2568
2922
|
return new Model(crtModel);
|
|
2569
2923
|
});
|
|
2570
2924
|
}
|
|
2571
|
-
// TODO RND-23725
|
|
2572
2925
|
getSchema() {
|
|
2573
2926
|
return this._crtModel.getSchema().toPromise();
|
|
2574
2927
|
}
|
|
@@ -2617,7 +2970,7 @@ var ModelParameterType;
|
|
|
2617
2970
|
})(ModelParameterType || (ModelParameterType = {}));
|
|
2618
2971
|
|
|
2619
2972
|
/**
|
|
2620
|
-
* @
|
|
2973
|
+
* @public
|
|
2621
2974
|
* @abstract
|
|
2622
2975
|
* @classdesc Class for designing request handlers.
|
|
2623
2976
|
*/
|
|
@@ -2628,6 +2981,13 @@ class BaseRequestHandler {
|
|
|
2628
2981
|
get next() {
|
|
2629
2982
|
return this._next;
|
|
2630
2983
|
}
|
|
2984
|
+
/**
|
|
2985
|
+
* @internal
|
|
2986
|
+
*/
|
|
2987
|
+
static [Symbol.hasInstance](instance) {
|
|
2988
|
+
var _a;
|
|
2989
|
+
return ((_a = instance === null || instance === void 0 ? void 0 : instance.constructor) === null || _a === void 0 ? void 0 : _a['_instanceOfKey']) === BaseRequestHandler._instanceOfKey;
|
|
2990
|
+
}
|
|
2631
2991
|
/**
|
|
2632
2992
|
* @description Method to set request handler to handler chain.
|
|
2633
2993
|
* @param next - link for next request handler - {@link RequestHandler}
|
|
@@ -2639,6 +2999,11 @@ class BaseRequestHandler {
|
|
|
2639
2999
|
this._next = next;
|
|
2640
3000
|
}
|
|
2641
3001
|
}
|
|
3002
|
+
/**
|
|
3003
|
+
* @internal
|
|
3004
|
+
* @dontChange
|
|
3005
|
+
*/
|
|
3006
|
+
BaseRequestHandler._instanceOfKey = 'devkit_BaseRequestHandler';
|
|
2642
3007
|
|
|
2643
3008
|
/**
|
|
2644
3009
|
* @internal
|
|
@@ -2683,5 +3048,5 @@ function toAggregationType(aggregationFunction) {
|
|
|
2683
3048
|
* Generated bundle index. Do not edit.
|
|
2684
3049
|
*/
|
|
2685
3050
|
|
|
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,
|
|
3051
|
+
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, DefaultValueSource, 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
3052
|
//# sourceMappingURL=creatio-devkit-common.mjs.map
|