@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
|
|
@@ -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
798
|
/**
|
|
641
|
-
* @
|
|
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
|
-
/**
|
|
670
|
-
* @public
|
|
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,215 @@ 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
|
+
var DefaultValueSource;
|
|
893
|
+
(function (DefaultValueSource) {
|
|
894
|
+
DefaultValueSource[DefaultValueSource["None"] = 0] = "None";
|
|
895
|
+
DefaultValueSource[DefaultValueSource["Const"] = 1] = "Const";
|
|
896
|
+
DefaultValueSource[DefaultValueSource["Settings"] = 2] = "Settings";
|
|
897
|
+
DefaultValueSource[DefaultValueSource["SystemValue"] = 3] = "SystemValue";
|
|
898
|
+
DefaultValueSource[DefaultValueSource["Sequence"] = 4] = "Sequence";
|
|
899
|
+
})(DefaultValueSource || (DefaultValueSource = {}));
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* @internal
|
|
903
|
+
*/
|
|
904
|
+
class HandlersOrderComparer {
|
|
905
|
+
constructor(_request) {
|
|
906
|
+
this._request = _request;
|
|
907
|
+
const scopesOrderEntries = [...(this._request.scopes ?? [])].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
|
+
const componentConfig = ViewElementRegistry.viewElements.get(viewConfigType);
|
|
946
|
+
if (!componentConfig?.inputs) {
|
|
947
|
+
return false;
|
|
948
|
+
}
|
|
949
|
+
return !!componentConfig?.inputs[componentProperty]?.propertyBindable;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* @internal
|
|
954
|
+
*/
|
|
955
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
956
|
+
function CrtViewElement(config) {
|
|
957
|
+
return function (type) {
|
|
958
|
+
checkTypeNamePascalCase(config.type);
|
|
959
|
+
const inputs = getCrtInputsMetadata(type);
|
|
960
|
+
const outputs = getCrtOutputsMetadata(type);
|
|
961
|
+
const validationInputs = getCrtValidationInputsMetadata(type);
|
|
962
|
+
const baseRegistrationConfig = {
|
|
963
|
+
...config,
|
|
964
|
+
inputs,
|
|
965
|
+
outputs,
|
|
966
|
+
validationInputs,
|
|
967
|
+
};
|
|
968
|
+
const registrationConfig = 'selector' in config
|
|
969
|
+
? { ...baseRegistrationConfig, selector: config.selector }
|
|
970
|
+
: { ...baseRegistrationConfig, typeRef: type };
|
|
971
|
+
setViewElementMetadata(registrationConfig, type);
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
|
|
738
975
|
/**
|
|
739
976
|
* @public
|
|
740
|
-
* @description
|
|
741
|
-
*
|
|
977
|
+
* @description CrtModule decorator is a 'container' where user actually setup elements.
|
|
978
|
+
* In could contain viewElements, definitions of other CrtModules.
|
|
979
|
+
* @param moduleDefinition - {@link ModuleDefinition}
|
|
742
980
|
*
|
|
743
981
|
* @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
|
-
* },
|
|
982
|
+
* @CrtModule({
|
|
983
|
+
* viewElements: [AppComponent],
|
|
984
|
+
* requestHandlers: [SomeRequestHandler],
|
|
985
|
+
* validators: [SomeValidator],
|
|
758
986
|
* })
|
|
759
|
-
* @
|
|
760
|
-
*
|
|
761
|
-
*
|
|
762
|
-
*
|
|
763
|
-
* encapsulation: ViewEncapsulation.ShadowDom,
|
|
987
|
+
* @NgModule({
|
|
988
|
+
* declarations: [AppComponent],
|
|
989
|
+
* imports: [BrowserModule],
|
|
990
|
+
* providers: [],
|
|
764
991
|
* })
|
|
765
|
-
* export class
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
992
|
+
* export class AppModule {}
|
|
993
|
+
*/
|
|
994
|
+
function CrtModule(moduleDefinition) {
|
|
995
|
+
return (type) => setModuleMetadata(moduleDefinition, type);
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
// noinspection ES6PreferShortImport
|
|
999
|
+
/**
|
|
1000
|
+
* @internal
|
|
770
1001
|
*/
|
|
771
1002
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
772
1003
|
function CrtInterfaceDesignerItem(config) {
|
|
1004
|
+
function _applyTypeCaption() {
|
|
1005
|
+
if (!config.typeCaption && config.toolbarConfig) {
|
|
1006
|
+
const toolbarConfig = Array.isArray(config.toolbarConfig)
|
|
1007
|
+
? config.toolbarConfig[0]
|
|
1008
|
+
: config.toolbarConfig;
|
|
1009
|
+
config.typeCaption = toolbarConfig.caption;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
773
1012
|
return function (type) {
|
|
1013
|
+
config.typeRef = type;
|
|
1014
|
+
config.viewElementGroupType ?? (config.viewElementGroupType = ViewElementGroupType.CustomElements);
|
|
1015
|
+
_applyTypeCaption();
|
|
1016
|
+
setInterfaceDesignerItemMetadata(config, type);
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* @public
|
|
1022
|
+
* @description
|
|
1023
|
+
* Constructor parameter decorator.
|
|
1024
|
+
* Mark parameter as dependency that should be obtained by token.
|
|
1025
|
+
* @param token - token by which the dependency instance will be obtained
|
|
1026
|
+
* @example
|
|
1027
|
+
* class MyHandler {
|
|
1028
|
+
* constructor(@CrtInject(USER_NAME_TOKEN) userName: string) {}
|
|
1029
|
+
* }
|
|
1030
|
+
*/
|
|
1031
|
+
function CrtInject(token) {
|
|
1032
|
+
return function (target, paramKey, paramIndex) {
|
|
1033
|
+
Reflect.defineMetadata(crtInjectPrefix + paramIndex, token, target);
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* @internal
|
|
1039
|
+
*/
|
|
1040
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1041
|
+
function CrtValidator(config) {
|
|
1042
|
+
if (!config) {
|
|
1043
|
+
return (type) => { };
|
|
1044
|
+
}
|
|
1045
|
+
return function (type) {
|
|
1046
|
+
checkTypeNameFormat(config.type, 'ValidatorTypeName');
|
|
774
1047
|
const registrationConfig = {
|
|
775
1048
|
...config,
|
|
776
1049
|
typeRef: type,
|
|
777
1050
|
};
|
|
778
|
-
registrationConfig
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
1051
|
+
setValidatorMetadata(registrationConfig, type);
|
|
1052
|
+
};
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* @internal
|
|
1057
|
+
*/
|
|
1058
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1059
|
+
function CrtRequestHandler(config) {
|
|
1060
|
+
if (!config) {
|
|
1061
|
+
return (type) => { };
|
|
1062
|
+
}
|
|
1063
|
+
return function (type) {
|
|
1064
|
+
checkTypeNameFormat(config.type, 'RequestHandlerTypeName');
|
|
1065
|
+
checkCrtTypeNamePascalCase(config.type);
|
|
1066
|
+
setRequestHandlerMetadata(config, type);
|
|
782
1067
|
};
|
|
783
1068
|
}
|
|
784
1069
|
|
|
@@ -894,24 +1179,29 @@ class InternalHandlerChain {
|
|
|
894
1179
|
map.set(key, handler);
|
|
895
1180
|
this._handlersCache.set(request.type, map);
|
|
896
1181
|
}
|
|
1182
|
+
_isRequestHandler(handler) {
|
|
1183
|
+
return (typeof handler.handle === 'function' &&
|
|
1184
|
+
typeof handler.setNext === 'function');
|
|
1185
|
+
}
|
|
1186
|
+
_checkHandlerInstanceOf(handler) {
|
|
1187
|
+
if (!this._isRequestHandler(handler)) {
|
|
1188
|
+
throw new Error('Handler should implement "BaseRequestHandler"');
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
897
1191
|
_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
|
-
}
|
|
1192
|
+
const handlers = this._handlers.filter((h) => {
|
|
1193
|
+
if (h.requestType !== request.type) {
|
|
1194
|
+
return false;
|
|
910
1195
|
}
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
1196
|
+
if (!h.scopes?.length) {
|
|
1197
|
+
return true;
|
|
1198
|
+
}
|
|
1199
|
+
return h.scopes.some((s) => request.scopes?.includes(s));
|
|
1200
|
+
});
|
|
1201
|
+
const comparer = new HandlersOrderComparer(request);
|
|
1202
|
+
handlers.sort((a, b) => comparer.compare(a, b));
|
|
1203
|
+
const handlerInstances = handlers.map((handlerConfig) => handlerConfig.createHandler());
|
|
1204
|
+
handlerInstances.forEach((handler) => this._checkHandlerInstanceOf(handler));
|
|
915
1205
|
this._joinHandlersInChain(handlerInstances);
|
|
916
1206
|
const result = handlerInstances[0];
|
|
917
1207
|
this._setCacheHandler(request, result);
|
|
@@ -961,12 +1251,8 @@ class HandlerChainService {
|
|
|
961
1251
|
/**
|
|
962
1252
|
* @internal
|
|
963
1253
|
*/
|
|
964
|
-
register(
|
|
965
|
-
return this._chain.handlerChain$.register(
|
|
966
|
-
createHandler: handlerFactory,
|
|
967
|
-
requestType,
|
|
968
|
-
scopes,
|
|
969
|
-
});
|
|
1254
|
+
register(handlerConfig) {
|
|
1255
|
+
return this._chain.handlerChain$.register(handlerConfig);
|
|
970
1256
|
}
|
|
971
1257
|
/**
|
|
972
1258
|
* @description Method to process passed request
|
|
@@ -1001,30 +1287,6 @@ function ImplementUsingHandlerChain(config) {
|
|
|
1001
1287
|
};
|
|
1002
1288
|
}
|
|
1003
1289
|
|
|
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
1290
|
/**
|
|
1029
1291
|
* @internal
|
|
1030
1292
|
*/
|
|
@@ -1048,6 +1310,18 @@ function CrtDesignTimeViewElement(config) {
|
|
|
1048
1310
|
};
|
|
1049
1311
|
}
|
|
1050
1312
|
|
|
1313
|
+
/**
|
|
1314
|
+
* @internal
|
|
1315
|
+
*/
|
|
1316
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1317
|
+
function CrtRequest(config) {
|
|
1318
|
+
return function (type) {
|
|
1319
|
+
checkTypeNameFormat(config.type, 'RequestTypeName');
|
|
1320
|
+
checkCrtTypeNamePascalCase(config.type);
|
|
1321
|
+
RequestRegistryService.register(config, type);
|
|
1322
|
+
};
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1051
1325
|
var DataValueType;
|
|
1052
1326
|
(function (DataValueType) {
|
|
1053
1327
|
DataValueType[DataValueType["Guid"] = 0] = "Guid";
|
|
@@ -1066,7 +1340,7 @@ var DataValueType;
|
|
|
1066
1340
|
DataValueType[DataValueType["CUSTOM_OBJECT"] = 15] = "CUSTOM_OBJECT";
|
|
1067
1341
|
DataValueType[DataValueType["IMAGELOOKUP"] = 16] = "IMAGELOOKUP";
|
|
1068
1342
|
DataValueType[DataValueType["COLLECTION"] = 17] = "COLLECTION";
|
|
1069
|
-
DataValueType[DataValueType["
|
|
1343
|
+
DataValueType[DataValueType["Color"] = 18] = "Color";
|
|
1070
1344
|
DataValueType[DataValueType["LOCALIZABLE_STRING"] = 19] = "LOCALIZABLE_STRING";
|
|
1071
1345
|
DataValueType[DataValueType["ENTITY"] = 20] = "ENTITY";
|
|
1072
1346
|
DataValueType[DataValueType["ENTITY_COLLECTION"] = 21] = "ENTITY_COLLECTION";
|
|
@@ -1090,6 +1364,9 @@ var DataValueType;
|
|
|
1090
1364
|
DataValueType[DataValueType["COMPOSITE_OBJECT_LIST"] = 39] = "COMPOSITE_OBJECT_LIST";
|
|
1091
1365
|
DataValueType[DataValueType["FLOAT8"] = 40] = "FLOAT8";
|
|
1092
1366
|
DataValueType[DataValueType["PHONE_TEXT"] = 42] = "PHONE_TEXT";
|
|
1367
|
+
DataValueType[DataValueType["RICH_TEXT"] = 43] = "RICH_TEXT";
|
|
1368
|
+
DataValueType[DataValueType["WEB_TEXT"] = 44] = "WEB_TEXT";
|
|
1369
|
+
DataValueType[DataValueType["EMAIL_TEXT"] = 45] = "EMAIL_TEXT";
|
|
1093
1370
|
})(DataValueType || (DataValueType = {}));
|
|
1094
1371
|
|
|
1095
1372
|
var AggregationType;
|
|
@@ -2178,6 +2455,12 @@ class UpdateQuery extends BaseFilterableQuery {
|
|
|
2178
2455
|
super(QueryOperationType.Update, rootSchemaName);
|
|
2179
2456
|
// region Fields: Private
|
|
2180
2457
|
this._columnValues = new Map();
|
|
2458
|
+
// endregion
|
|
2459
|
+
// region Fields: Public
|
|
2460
|
+
/**
|
|
2461
|
+
* Flag that indicates whether to force save data.
|
|
2462
|
+
*/
|
|
2463
|
+
this.isForceUpdate = false;
|
|
2181
2464
|
}
|
|
2182
2465
|
// endregion
|
|
2183
2466
|
// region Properties: Public
|
|
@@ -2219,6 +2502,11 @@ function registerViewElement(config) {
|
|
|
2219
2502
|
ViewElementRegistry.register(config);
|
|
2220
2503
|
}
|
|
2221
2504
|
|
|
2505
|
+
function checkRemoteName(remoteName) {
|
|
2506
|
+
if (!RemoteEntriesRegistry.items.has(remoteName)) {
|
|
2507
|
+
throw new Error(`Remote entry with name '${remoteName}' does not exist`);
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2222
2510
|
/**
|
|
2223
2511
|
* @internal
|
|
2224
2512
|
*/
|
|
@@ -2247,7 +2535,7 @@ function registerViewElements(types) {
|
|
|
2247
2535
|
*/
|
|
2248
2536
|
function registerInterfaceDesignerItems(types, localizeFn) {
|
|
2249
2537
|
resistantForEach(types, (type) => {
|
|
2250
|
-
if (!hasInterfaceDesignerItemMetadata(type)
|
|
2538
|
+
if (!hasInterfaceDesignerItemMetadata(type)) {
|
|
2251
2539
|
return;
|
|
2252
2540
|
}
|
|
2253
2541
|
let config = getInterfaceDesignerItemMetadata(type);
|
|
@@ -2271,16 +2559,56 @@ function registerDesignTimeViewElements(types) {
|
|
|
2271
2559
|
/**
|
|
2272
2560
|
* @internal
|
|
2273
2561
|
*/
|
|
2274
|
-
function
|
|
2562
|
+
function registerValidators(types, options) {
|
|
2275
2563
|
resistantForEach(types, (type) => {
|
|
2276
|
-
const
|
|
2564
|
+
const metadata = getValidatorMetadata(type);
|
|
2565
|
+
const registrationConfig = {
|
|
2566
|
+
...metadata,
|
|
2567
|
+
instantiate: function () {
|
|
2568
|
+
return instantiate(this.typeRef, options?.resolveDependency);
|
|
2569
|
+
},
|
|
2570
|
+
};
|
|
2571
|
+
ValidatorRegistry.validate(registrationConfig);
|
|
2572
|
+
ValidatorRegistry.register(registrationConfig);
|
|
2573
|
+
});
|
|
2574
|
+
}
|
|
2575
|
+
/**
|
|
2576
|
+
* @internal
|
|
2577
|
+
*/
|
|
2578
|
+
function registerRequestHandlers(types, options, remoteName) {
|
|
2579
|
+
if (options.moduleType === 'remote' && !remoteName) {
|
|
2580
|
+
console.error("To use request handlers, 'remoteName' parameter should be specified.");
|
|
2581
|
+
return;
|
|
2582
|
+
}
|
|
2583
|
+
resistantForEach(types, (type) => {
|
|
2584
|
+
const metadata = getRequestHandlerMetadata(type);
|
|
2585
|
+
let registrationConfig;
|
|
2586
|
+
const createHandler = () => instantiate(type, options?.resolveDependency);
|
|
2587
|
+
if (options.moduleType === 'host') {
|
|
2588
|
+
registrationConfig = {
|
|
2589
|
+
...metadata,
|
|
2590
|
+
source: { type: HandlerSourceType.Host },
|
|
2591
|
+
createHandler,
|
|
2592
|
+
};
|
|
2593
|
+
}
|
|
2594
|
+
else {
|
|
2595
|
+
const remote = RemoteEntriesRegistry.items.get(remoteName);
|
|
2596
|
+
registrationConfig = {
|
|
2597
|
+
...metadata,
|
|
2598
|
+
source: {
|
|
2599
|
+
type: HandlerSourceType.Remote,
|
|
2600
|
+
packageName: remote.packageName,
|
|
2601
|
+
},
|
|
2602
|
+
createHandler,
|
|
2603
|
+
};
|
|
2604
|
+
}
|
|
2277
2605
|
RequestHandlerRegistryService.register(registrationConfig, type);
|
|
2278
2606
|
});
|
|
2279
2607
|
}
|
|
2280
2608
|
/**
|
|
2281
2609
|
* @internal
|
|
2282
2610
|
*/
|
|
2283
|
-
function _bootstrapCrtModule(type, options) {
|
|
2611
|
+
function _bootstrapCrtModule(name, type, options) {
|
|
2284
2612
|
try {
|
|
2285
2613
|
const moduleDefinition = getModuleMetadata(type);
|
|
2286
2614
|
if (moduleDefinition.viewElements) {
|
|
@@ -2291,27 +2619,37 @@ function _bootstrapCrtModule(type, options) {
|
|
|
2291
2619
|
registerDesignTimeViewElements(moduleDefinition.designTimeViewElements);
|
|
2292
2620
|
}
|
|
2293
2621
|
if (moduleDefinition.requestHandlers) {
|
|
2294
|
-
registerRequestHandlers(moduleDefinition.requestHandlers);
|
|
2622
|
+
registerRequestHandlers(moduleDefinition.requestHandlers, options, name);
|
|
2623
|
+
}
|
|
2624
|
+
if (moduleDefinition.validators) {
|
|
2625
|
+
registerValidators(moduleDefinition.validators, options);
|
|
2295
2626
|
}
|
|
2296
|
-
moduleDefinition.includes?.forEach((t) => _bootstrapCrtModule(t, options));
|
|
2627
|
+
moduleDefinition.includes?.forEach((t) => _bootstrapCrtModule(name, t, options));
|
|
2297
2628
|
}
|
|
2298
2629
|
catch (error) {
|
|
2299
2630
|
console.error(error);
|
|
2300
2631
|
}
|
|
2301
2632
|
}
|
|
2302
2633
|
/**
|
|
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)
|
|
2634
|
+
* @internal
|
|
2311
2635
|
*/
|
|
2312
|
-
function bootstrapCrtModule(
|
|
2313
|
-
|
|
2314
|
-
|
|
2636
|
+
function bootstrapCrtModule(...args) {
|
|
2637
|
+
const name = typeof args[0] === 'string' ? args.shift() : undefined;
|
|
2638
|
+
const type = args[0];
|
|
2639
|
+
const options = args[1] ?? {};
|
|
2640
|
+
options.moduleType ?? (options.moduleType = 'remote');
|
|
2641
|
+
if (name) {
|
|
2642
|
+
if (options.moduleType === 'remote') {
|
|
2643
|
+
checkRemoteName(name);
|
|
2644
|
+
}
|
|
2645
|
+
else {
|
|
2646
|
+
throw new Error('Host module cannot have name');
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
_bootstrapCrtModule(name, type, options);
|
|
2650
|
+
if (options.moduleType === 'remote') {
|
|
2651
|
+
BootstrapNotifier.instance.notify(type);
|
|
2652
|
+
}
|
|
2315
2653
|
}
|
|
2316
2654
|
|
|
2317
2655
|
/**
|
|
@@ -2342,12 +2680,37 @@ function localize(key) {
|
|
|
2342
2680
|
return new LocalizableValue(key);
|
|
2343
2681
|
}
|
|
2344
2682
|
|
|
2683
|
+
/**
|
|
2684
|
+
* @internal
|
|
2685
|
+
*/
|
|
2686
|
+
function registerHandlerChainServices(types) {
|
|
2687
|
+
types?.forEach((type) => {
|
|
2688
|
+
const registrationConfig = getHandlerChainServiceMetadata(type);
|
|
2689
|
+
HandlerChainServicesRegistry.register(registrationConfig);
|
|
2690
|
+
});
|
|
2691
|
+
}
|
|
2692
|
+
/**
|
|
2693
|
+
* @internal
|
|
2694
|
+
*/
|
|
2695
|
+
function _bootstrapCrtModuleHandlerChainServices(type) {
|
|
2696
|
+
const moduleDefinition = getModuleMetadata(type);
|
|
2697
|
+
if (moduleDefinition.handlerChainServices) {
|
|
2698
|
+
registerHandlerChainServices(moduleDefinition.handlerChainServices);
|
|
2699
|
+
}
|
|
2700
|
+
moduleDefinition.includes?.forEach((t) => _bootstrapCrtModuleHandlerChainServices(t));
|
|
2701
|
+
}
|
|
2702
|
+
/**
|
|
2703
|
+
* @internal
|
|
2704
|
+
*/
|
|
2705
|
+
function bootstrapCrtModuleHandlerChainServices(type) {
|
|
2706
|
+
_bootstrapCrtModuleHandlerChainServices(type);
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2345
2709
|
class BaseHandlerChainService {
|
|
2346
2710
|
}
|
|
2347
2711
|
|
|
2348
2712
|
/**
|
|
2349
2713
|
* @public
|
|
2350
|
-
* @class FeatureService
|
|
2351
2714
|
* @classdesc Service to working with Creatio platform features using handler chain
|
|
2352
2715
|
* @extends {BaseHandlerChainService}
|
|
2353
2716
|
*/
|
|
@@ -2371,7 +2734,6 @@ __decorate([
|
|
|
2371
2734
|
|
|
2372
2735
|
/**
|
|
2373
2736
|
* @public
|
|
2374
|
-
* @class RightsService
|
|
2375
2737
|
* @classdesc Service to working rights using handler chain
|
|
2376
2738
|
* @extends {BaseHandlerChainService}
|
|
2377
2739
|
*/
|
|
@@ -2470,7 +2832,6 @@ __decorate([
|
|
|
2470
2832
|
|
|
2471
2833
|
/**
|
|
2472
2834
|
* @public
|
|
2473
|
-
* @class HttpClientService
|
|
2474
2835
|
* @classdesc Http service to perform Http requests
|
|
2475
2836
|
* @extends {BaseHandlerChainService}
|
|
2476
2837
|
*/
|
|
@@ -2541,7 +2902,6 @@ __decorate([
|
|
|
2541
2902
|
|
|
2542
2903
|
/**
|
|
2543
2904
|
* @public
|
|
2544
|
-
* @class MaskService
|
|
2545
2905
|
* @classdesc Service to working with mask using handler chain
|
|
2546
2906
|
* @extends {BaseHandlerChainService}
|
|
2547
2907
|
*/
|
|
@@ -2590,7 +2950,6 @@ class Model extends BaseHandlerChainService {
|
|
|
2590
2950
|
}, '');
|
|
2591
2951
|
return new Model(crtModel);
|
|
2592
2952
|
}
|
|
2593
|
-
// TODO RND-23725
|
|
2594
2953
|
getSchema() {
|
|
2595
2954
|
return this._crtModel.getSchema().toPromise();
|
|
2596
2955
|
}
|
|
@@ -2639,7 +2998,7 @@ var ModelParameterType;
|
|
|
2639
2998
|
})(ModelParameterType || (ModelParameterType = {}));
|
|
2640
2999
|
|
|
2641
3000
|
/**
|
|
2642
|
-
* @
|
|
3001
|
+
* @public
|
|
2643
3002
|
* @abstract
|
|
2644
3003
|
* @classdesc Class for designing request handlers.
|
|
2645
3004
|
*/
|
|
@@ -2650,6 +3009,12 @@ class BaseRequestHandler {
|
|
|
2650
3009
|
get next() {
|
|
2651
3010
|
return this._next;
|
|
2652
3011
|
}
|
|
3012
|
+
/**
|
|
3013
|
+
* @internal
|
|
3014
|
+
*/
|
|
3015
|
+
static [Symbol.hasInstance](instance) {
|
|
3016
|
+
return instance?.constructor?.['_instanceOfKey'] === BaseRequestHandler._instanceOfKey;
|
|
3017
|
+
}
|
|
2653
3018
|
/**
|
|
2654
3019
|
* @description Method to set request handler to handler chain.
|
|
2655
3020
|
* @param next - link for next request handler - {@link RequestHandler}
|
|
@@ -2661,6 +3026,11 @@ class BaseRequestHandler {
|
|
|
2661
3026
|
this._next = next;
|
|
2662
3027
|
}
|
|
2663
3028
|
}
|
|
3029
|
+
/**
|
|
3030
|
+
* @internal
|
|
3031
|
+
* @dontChange
|
|
3032
|
+
*/
|
|
3033
|
+
BaseRequestHandler._instanceOfKey = 'devkit_BaseRequestHandler';
|
|
2664
3034
|
|
|
2665
3035
|
/**
|
|
2666
3036
|
* @internal
|
|
@@ -2705,5 +3075,5 @@ function toAggregationType(aggregationFunction) {
|
|
|
2705
3075
|
* Generated bundle index. Do not edit.
|
|
2706
3076
|
*/
|
|
2707
3077
|
|
|
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,
|
|
3078
|
+
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 };
|
|
2709
3079
|
//# sourceMappingURL=creatio-devkit-common.mjs.map
|