@creatio-devkit/common 0.807.0 → 0.809.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -5
- 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/date-part-type-adapter.mjs +1 -1
- package/esm2020/lib/external/functions/function-type-adapter.mjs +1 -1
- package/esm2020/lib/external/functions/index.mjs +1 -1
- package/esm2020/lib/external/functions/order-direction-adapter.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/external/utils/date-utils.mjs +29 -0
- package/esm2020/lib/external/utils/index.mjs +2 -0
- package/esm2020/lib/index.mjs +12 -11
- package/esm2020/lib/internal/constants/index.mjs +1 -1
- package/esm2020/lib/internal/constants/metadata.const.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 +1 -2
- 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 +1 -1
- package/esm2020/lib/internal/enums/data-schema-type.enum.mjs +10 -0
- package/esm2020/lib/internal/enums/data-source-scope.enum.mjs +1 -1
- package/esm2020/lib/internal/enums/default-value-source.enum.mjs +1 -1
- package/esm2020/lib/internal/enums/designer-group-type.enum.mjs +1 -1
- package/esm2020/lib/internal/enums/handler-source-type.enum.mjs +1 -1
- package/esm2020/lib/internal/enums/index.mjs +2 -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 -1
- 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 +2 -2
- 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 +14 -15
- package/esm2020/lib/internal/esq/data-model/queries/index.mjs +1 -1
- package/esm2020/lib/internal/esq/data-model/queries/insert-query.mjs +3 -3
- package/esm2020/lib/internal/esq/data-model/queries/query-operation-type.mjs +1 -1
- package/esm2020/lib/internal/esq/data-model/queries/select-localization-query.mjs +1 -1
- package/esm2020/lib/internal/esq/data-model/queries/update-query.mjs +3 -3
- package/esm2020/lib/internal/esq/index.mjs +1 -1
- package/esm2020/lib/internal/model/data-schema/data-schema-attribute-aggregation-config.model.mjs +1 -1
- package/esm2020/lib/internal/model/data-schema/data-schema-attribute-function-config.model.mjs +1 -1
- package/esm2020/lib/internal/model/data-schema/data-schema-validator-config.model.mjs +1 -1
- package/esm2020/lib/internal/model/data-schema/index.mjs +1 -1
- package/esm2020/lib/internal/model/data-source-config.mjs +1 -1
- package/esm2020/lib/internal/model/index.mjs +1 -1
- package/esm2020/lib/internal/models/converter/converter-registry-item.mjs +2 -0
- package/esm2020/lib/internal/models/converter/index.mjs +2 -0
- package/esm2020/lib/internal/models/default-value-schema.mjs +1 -1
- package/esm2020/lib/internal/models/design-time-view-element-registry-item.mjs +1 -1
- package/esm2020/lib/internal/models/handler-chain-service-registry-item.mjs +1 -1
- package/esm2020/lib/internal/models/index.mjs +3 -2
- package/esm2020/lib/internal/models/injection-context/index.mjs +2 -0
- package/esm2020/lib/internal/models/injection-context/injection-context.mjs +2 -0
- 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-build-info.mjs +9 -0
- package/esm2020/lib/internal/models/request/index.mjs +1 -1
- package/esm2020/lib/internal/models/request/method-invoke-request.mjs +1 -1
- package/esm2020/lib/internal/models/request-handler/contexed-handler-scope-config.mjs +2 -0
- package/esm2020/lib/internal/models/request-handler/handler-config.mjs +1 -1
- package/esm2020/lib/internal/models/request-handler/handler-source.mjs +1 -1
- package/esm2020/lib/internal/models/request-handler/index.mjs +2 -1
- 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 +1 -1
- package/esm2020/lib/internal/models/validator/validator-parameters.mjs +1 -1
- package/esm2020/lib/internal/models/validator/validator-registry-item.mjs +1 -1
- package/esm2020/lib/internal/models/validator/validator-schema-config.model.mjs +1 -1
- 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 +1 -1
- 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/converter-registry.mjs +24 -0
- package/esm2020/lib/internal/services/global-converters-registry/index.mjs +2 -2
- package/esm2020/lib/internal/services/handler-chain-services-registry/handler-chain-services-registry.mjs +3 -2
- package/esm2020/lib/internal/services/handler-chain-services-registry/index.mjs +1 -1
- package/esm2020/lib/internal/services/index.mjs +1 -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 +3 -2
- package/esm2020/lib/internal/services/pkg-topology-registry/index.mjs +1 -1
- package/esm2020/lib/internal/services/pkg-topology-registry/pkg-topology-registry.mjs +1 -1
- package/esm2020/lib/internal/services/remote-entries-registry/index.mjs +1 -1
- package/esm2020/lib/internal/services/remote-entries-registry/remote-entries-registry.mjs +8 -1
- 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 +1 -1
- 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 +1 -1
- package/esm2020/lib/internal/services/validator-registry/validator-registry.mjs +1 -1
- 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/types/index.mjs +2 -1
- package/esm2020/lib/internal/types/internal-resolve-dependency-fn.type.mjs +2 -0
- package/esm2020/lib/internal/types/localizable-values.type.mjs +1 -1
- package/esm2020/lib/internal/utils/component-config-utils.mjs +1 -1
- package/esm2020/lib/internal/utils/handlers-order-comparer.mjs +2 -2
- package/esm2020/lib/internal/utils/index.mjs +5 -5
- package/esm2020/lib/internal/utils/instantiate.mjs +1 -1
- package/esm2020/lib/internal/utils/localization-utils.mjs +2 -2
- package/esm2020/lib/internal/utils/metadata-utils.mjs +18 -1
- 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/converter/converter.decorator.mjs +21 -0
- package/esm2020/lib/public/decorators/converter/index.mjs +2 -0
- package/esm2020/lib/public/decorators/index.mjs +2 -1
- package/esm2020/lib/public/decorators/inject/index.mjs +1 -1
- package/esm2020/lib/public/decorators/inject/inject.decorator.mjs +1 -1
- 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 +1 -1
- package/esm2020/lib/public/decorators/module/index.mjs +1 -1
- package/esm2020/lib/public/decorators/module/module.decorator.mjs +1 -1
- 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 +1 -1
- package/esm2020/lib/public/decorators/request-handler/request-handler.decorator.mjs +1 -1
- 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 +1 -1
- package/esm2020/lib/public/decorators/validator/validator.decorator.mjs +1 -1
- package/esm2020/lib/public/decorators/view-element/index.mjs +1 -1
- package/esm2020/lib/public/decorators/view-element/view-element.decorator.mjs +1 -1
- 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 +1 -1
- 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 +5 -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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/esm2020/lib/public/esq/data-model/expressions/functions/macros-function-expression.mjs +2 -2
- package/esm2020/lib/public/esq/data-model/expressions/functions/window-function-expression.mjs +2 -2
- 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 +7 -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 +2 -2
- package/esm2020/lib/public/esq/data-model/filters/compare-filter.mjs +2 -2
- package/esm2020/lib/public/esq/data-model/filters/exists-filter.mjs +2 -2
- package/esm2020/lib/public/esq/data-model/filters/filter-group.mjs +20 -6
- package/esm2020/lib/public/esq/data-model/filters/in-filter.mjs +2 -2
- package/esm2020/lib/public/esq/data-model/filters/index.mjs +1 -1
- package/esm2020/lib/public/esq/data-model/filters/isnull-filter.mjs +2 -2
- 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 +1 -1
- package/esm2020/lib/public/functions/bootstrap-crt-module.mjs +35 -6
- package/esm2020/lib/public/functions/index.mjs +1 -1
- package/esm2020/lib/public/functions/localize.mjs +1 -1
- package/esm2020/lib/public/functions/register-angular-view-element.mjs +1 -1
- package/esm2020/lib/public/functions/register-view-element.mjs +1 -1
- package/esm2020/lib/public/handlers/base-request-handler.mjs +2 -2
- package/esm2020/lib/public/handlers/index.mjs +1 -1
- package/esm2020/lib/public/models/base-response.model.mjs +1 -1
- package/esm2020/lib/public/models/converter/converter-config.mjs +2 -0
- package/esm2020/lib/public/models/converter/index.mjs +2 -0
- package/esm2020/lib/public/models/converter.model.mjs +1 -1
- package/esm2020/lib/public/models/data-source/data-source-insert-result.model.mjs +1 -1
- package/esm2020/lib/public/models/data-source/data-source-save-result.model.mjs +1 -1
- package/esm2020/lib/public/models/data-source/index.mjs +1 -1
- 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 +2 -1
- 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 +1 -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 +1 -1
- package/esm2020/lib/public/models/request/request-registration-config.model.mjs +1 -1
- package/esm2020/lib/public/models/request-handler/index.mjs +1 -1
- package/esm2020/lib/public/models/request-handler/request-handler-definition.mjs +1 -1
- package/esm2020/lib/public/models/request-handler/request-handler.mjs +1 -1
- package/esm2020/lib/public/models/validation/base-validator.mjs +1 -1
- package/esm2020/lib/public/models/validation/crt-control-state.mjs +1 -1
- package/esm2020/lib/public/models/validation/crt-validation-errors.mjs +1 -1
- package/esm2020/lib/public/models/validation/crt-validator-fn.mjs +1 -1
- package/esm2020/lib/public/models/validation/index.mjs +1 -1
- package/esm2020/lib/public/models/validation/validation-info.mjs +1 -1
- package/esm2020/lib/public/models/validation/validator-config.mjs +1 -1
- package/esm2020/lib/public/models/validation/validator-parameter-values.mjs +1 -1
- 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-element/view-element-slot-definition.mjs +1 -1
- package/esm2020/lib/public/models/view-model-context.mjs +1 -1
- package/esm2020/lib/public/services/feature/feature.service.mjs +1 -1
- package/esm2020/lib/public/services/feature/index.mjs +1 -1
- package/esm2020/lib/public/services/handler-chain/handler-chain.service.mjs +7 -1
- package/esm2020/lib/public/services/handler-chain/index.mjs +1 -1
- package/esm2020/lib/public/services/handler-chain/internal-handler-chain.mjs +32 -8
- package/esm2020/lib/public/services/http-client/http-client.service.mjs +1 -1
- 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 +2 -1
- package/esm2020/lib/public/services/mask-service/mask.service.mjs +21 -1
- package/esm2020/lib/public/services/mask-service/schema-view-mask.request.mjs +22 -0
- package/esm2020/lib/public/services/model/data-schema-attribute.mjs +1 -1
- package/esm2020/lib/public/services/model/data-schema.mjs +1 -1
- 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-function-config.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 +1 -1
- package/esm2020/lib/public/services/model/model-load-options.mjs +1 -1
- package/esm2020/lib/public/services/model/model.mjs +1 -1
- package/esm2020/lib/public/services/rights/index.mjs +1 -1
- package/esm2020/lib/public/services/rights/rights.service.mjs +1 -1
- 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 +1 -1
- package/esm2020/lib/public/types/aggregation-eval.type.mjs +1 -1
- package/esm2020/lib/public/types/date-part.type.mjs +1 -1
- package/esm2020/lib/public/types/entity-column-value.mjs +1 -1
- package/esm2020/lib/public/types/function.type.mjs +1 -1
- package/esm2020/lib/public/types/guid.type.mjs +1 -1
- package/esm2020/lib/public/types/index.mjs +1 -1
- package/esm2020/lib/public/types/json-data.type.mjs +1 -1
- package/esm2020/lib/public/types/localizable-string.type.mjs +1 -1
- package/esm2020/lib/public/types/localize-fn.type.mjs +1 -1
- package/esm2020/lib/public/types/resolve-dependency-fn.type.mjs +1 -1
- 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 +2141 -1937
- package/fesm2015/creatio-devkit-common.mjs.map +1 -1
- package/fesm2020/creatio-devkit-common.mjs +2140 -1940
- package/fesm2020/creatio-devkit-common.mjs.map +1 -1
- package/index.d.ts +101 -8
- package/package.json +3 -3
- package/esm2020/lib/internal/decorators/converter/converter.decorator.mjs +0 -11
- package/esm2020/lib/internal/decorators/converter/index.mjs +0 -2
- package/esm2020/lib/internal/models/remote-entry-info.mjs +0 -2
- package/esm2020/lib/internal/services/global-converters-registry/global-converters-registry.service.mjs +0 -23
|
@@ -1,1125 +1,1318 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import { upperFirst, camelCase, isEqual, get, set, cloneDeep } from 'lodash';
|
|
3
|
-
import { __awaiter, __decorate, __metadata } from 'tslib';
|
|
1
|
+
import { __decorate, __metadata, __awaiter } from 'tslib';
|
|
4
2
|
import { Exclude, Expose, classToPlain } from 'class-transformer';
|
|
3
|
+
import { get, set, upperFirst, camelCase, isEqual, cloneDeep } from 'lodash';
|
|
4
|
+
import 'reflect-metadata';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
var DataValueType;
|
|
7
|
+
(function (DataValueType) {
|
|
8
|
+
DataValueType[DataValueType["Guid"] = 0] = "Guid";
|
|
9
|
+
DataValueType[DataValueType["Text"] = 1] = "Text";
|
|
10
|
+
DataValueType[DataValueType["Integer"] = 4] = "Integer";
|
|
11
|
+
DataValueType[DataValueType["Float"] = 5] = "Float";
|
|
12
|
+
DataValueType[DataValueType["Money"] = 6] = "Money";
|
|
13
|
+
DataValueType[DataValueType["DateTime"] = 7] = "DateTime";
|
|
14
|
+
DataValueType[DataValueType["Date"] = 8] = "Date";
|
|
15
|
+
DataValueType[DataValueType["Time"] = 9] = "Time";
|
|
16
|
+
DataValueType[DataValueType["Lookup"] = 10] = "Lookup";
|
|
17
|
+
DataValueType[DataValueType["Enum"] = 11] = "Enum";
|
|
18
|
+
DataValueType[DataValueType["Boolean"] = 12] = "Boolean";
|
|
19
|
+
DataValueType[DataValueType["Blob"] = 13] = "Blob";
|
|
20
|
+
DataValueType[DataValueType["Image"] = 14] = "Image";
|
|
21
|
+
DataValueType[DataValueType["CUSTOM_OBJECT"] = 15] = "CUSTOM_OBJECT";
|
|
22
|
+
DataValueType[DataValueType["IMAGELOOKUP"] = 16] = "IMAGELOOKUP";
|
|
23
|
+
DataValueType[DataValueType["COLLECTION"] = 17] = "COLLECTION";
|
|
24
|
+
DataValueType[DataValueType["Color"] = 18] = "Color";
|
|
25
|
+
DataValueType[DataValueType["LOCALIZABLE_STRING"] = 19] = "LOCALIZABLE_STRING";
|
|
26
|
+
DataValueType[DataValueType["ENTITY"] = 20] = "ENTITY";
|
|
27
|
+
DataValueType[DataValueType["ENTITY_COLLECTION"] = 21] = "ENTITY_COLLECTION";
|
|
28
|
+
DataValueType[DataValueType["ENTITY_COLUMN_MAPPING_COLLECTION"] = 22] = "ENTITY_COLUMN_MAPPING_COLLECTION";
|
|
29
|
+
DataValueType[DataValueType["HASH_TEXT"] = 23] = "HASH_TEXT";
|
|
30
|
+
DataValueType[DataValueType["SECURE_TEXT"] = 24] = "SECURE_TEXT";
|
|
31
|
+
DataValueType[DataValueType["FILE"] = 25] = "FILE";
|
|
32
|
+
DataValueType[DataValueType["MAPPING"] = 26] = "MAPPING";
|
|
33
|
+
DataValueType[DataValueType["SHORT_TEXT"] = 27] = "SHORT_TEXT";
|
|
34
|
+
DataValueType[DataValueType["MEDIUM_TEXT"] = 28] = "MEDIUM_TEXT";
|
|
35
|
+
DataValueType[DataValueType["MAXSIZE_TEXT"] = 29] = "MAXSIZE_TEXT";
|
|
36
|
+
DataValueType[DataValueType["LONG_TEXT"] = 30] = "LONG_TEXT";
|
|
37
|
+
DataValueType[DataValueType["FLOAT1"] = 31] = "FLOAT1";
|
|
38
|
+
DataValueType[DataValueType["FLOAT2"] = 32] = "FLOAT2";
|
|
39
|
+
DataValueType[DataValueType["FLOAT3"] = 33] = "FLOAT3";
|
|
40
|
+
DataValueType[DataValueType["FLOAT4"] = 34] = "FLOAT4";
|
|
41
|
+
DataValueType[DataValueType["LOCALIZABLE_PARAMETER_VALUES_LIST"] = 35] = "LOCALIZABLE_PARAMETER_VALUES_LIST";
|
|
42
|
+
DataValueType[DataValueType["METADATA_TEXT"] = 36] = "METADATA_TEXT";
|
|
43
|
+
DataValueType[DataValueType["STAGE_INDICATOR"] = 37] = "STAGE_INDICATOR";
|
|
44
|
+
DataValueType[DataValueType["OBJECT_LIST"] = 38] = "OBJECT_LIST";
|
|
45
|
+
DataValueType[DataValueType["COMPOSITE_OBJECT_LIST"] = 39] = "COMPOSITE_OBJECT_LIST";
|
|
46
|
+
DataValueType[DataValueType["FLOAT8"] = 40] = "FLOAT8";
|
|
47
|
+
DataValueType[DataValueType["FILE_LOCATOR"] = 41] = "FILE_LOCATOR";
|
|
48
|
+
DataValueType[DataValueType["PHONE_TEXT"] = 42] = "PHONE_TEXT";
|
|
49
|
+
DataValueType[DataValueType["RICH_TEXT"] = 43] = "RICH_TEXT";
|
|
50
|
+
DataValueType[DataValueType["WEB_TEXT"] = 44] = "WEB_TEXT";
|
|
51
|
+
DataValueType[DataValueType["EMAIL_TEXT"] = 45] = "EMAIL_TEXT";
|
|
52
|
+
})(DataValueType || (DataValueType = {}));
|
|
22
53
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
Reflect.defineMetadata(crtInputPrefix + propertyKey.toString(), config, target.constructor);
|
|
43
|
-
};
|
|
44
|
-
}
|
|
54
|
+
var AggregationType;
|
|
55
|
+
(function (AggregationType) {
|
|
56
|
+
/** Aggregation function type not defined. */
|
|
57
|
+
AggregationType[AggregationType["None"] = 0] = "None";
|
|
58
|
+
/** Aggregation function type not defined. */
|
|
59
|
+
AggregationType[AggregationType["Count"] = 1] = "Count";
|
|
60
|
+
/** Sum of values of all elements. */
|
|
61
|
+
AggregationType[AggregationType["Sum"] = 2] = "Sum";
|
|
62
|
+
/** Average value for all elements. */
|
|
63
|
+
AggregationType[AggregationType["Avg"] = 3] = "Avg";
|
|
64
|
+
/** The minimum value among all elements. */
|
|
65
|
+
AggregationType[AggregationType["Min"] = 4] = "Min";
|
|
66
|
+
/** The maximum value among all elements. */
|
|
67
|
+
AggregationType[AggregationType["Max"] = 5] = "Max";
|
|
68
|
+
/** Top one record from collection. */
|
|
69
|
+
AggregationType[AggregationType["TopOne"] = 6] = "TopOne";
|
|
70
|
+
})(AggregationType || (AggregationType = {}));
|
|
45
71
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
72
|
+
var AggregationFunction;
|
|
73
|
+
(function (AggregationFunction) {
|
|
74
|
+
/** Aggregation function type not defined. */
|
|
75
|
+
AggregationFunction["None"] = "";
|
|
76
|
+
/** Aggregation function type not defined. */
|
|
77
|
+
AggregationFunction["Count"] = "Count";
|
|
78
|
+
/** Sum of values of all elements. */
|
|
79
|
+
AggregationFunction["Sum"] = "Sum";
|
|
80
|
+
/** Average value for all elements. */
|
|
81
|
+
AggregationFunction["Avg"] = "Avg";
|
|
82
|
+
/** The minimum value among all elements. */
|
|
83
|
+
AggregationFunction["Min"] = "Min";
|
|
84
|
+
/** The maximum value among all elements. */
|
|
85
|
+
AggregationFunction["Max"] = "Max";
|
|
86
|
+
/** Top one record from collection. */
|
|
87
|
+
AggregationFunction["TopOne"] = "TopOne";
|
|
88
|
+
})(AggregationFunction || (AggregationFunction = {}));
|
|
62
89
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
* 1. Declare input field inside inputs section. For example `value`
|
|
69
|
-
* 2. In validationInputs section declare same field which ends with ValidationInfo.
|
|
70
|
-
* For previous example `valueValidationInfo`
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* export class AppComponent {
|
|
74
|
-
* @CrtInput()
|
|
75
|
-
public value;
|
|
76
|
-
*
|
|
77
|
-
* @CrtValidationInput()
|
|
78
|
-
* public valueValidationInfo;
|
|
79
|
-
* }
|
|
80
|
-
*/
|
|
81
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
82
|
-
function CrtValidationInput() {
|
|
83
|
-
return function (target, propertyKey) {
|
|
84
|
-
Reflect.defineMetadata(crtValidationInputPrefix + propertyKey.toString(), {}, target.constructor);
|
|
85
|
-
};
|
|
86
|
-
}
|
|
90
|
+
var LogicalOperatorType;
|
|
91
|
+
(function (LogicalOperatorType) {
|
|
92
|
+
LogicalOperatorType[LogicalOperatorType["And"] = 0] = "And";
|
|
93
|
+
LogicalOperatorType[LogicalOperatorType["Or"] = 1] = "Or";
|
|
94
|
+
})(LogicalOperatorType || (LogicalOperatorType = {}));
|
|
87
95
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*/
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* @internal
|
|
99
|
-
*/
|
|
100
|
-
function checkTypeNamePascalCase(type) {
|
|
101
|
-
const [vendor, typeName] = type.split('.');
|
|
102
|
-
const pascalTypeName = toPascalCase(typeName);
|
|
103
|
-
if (!vendor || pascalTypeName !== typeName) {
|
|
104
|
-
throw new Error(`Error when register ${type}. Type property should have Pascal case, e.g. ${vendor + '.' + pascalTypeName}. ` + 'The first letter of each word in a compound word should be capitalized');
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* @internal
|
|
109
|
-
*/
|
|
110
|
-
function checkCrtTypeNamePascalCase(type) {
|
|
111
|
-
const [vendor, typeName] = type.split('.');
|
|
112
|
-
const pascalTypeName = toPascalCase(typeName);
|
|
113
|
-
if (vendor.toLowerCase() === 'crt' && pascalTypeName !== typeName) {
|
|
114
|
-
throw new Error(`Error when register ${type}. Type property should have Pascal case, e.g. ${vendor + '.' + pascalTypeName}. ` + 'The first letter of each word in a compound word should be capitalized');
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* @internal
|
|
119
|
-
*/
|
|
120
|
-
function toPascalCase(source) {
|
|
121
|
-
return upperFirst(camelCase(source));
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* @internal
|
|
125
|
-
*/
|
|
126
|
-
function checkIfTypeRegistered(type, item) {
|
|
127
|
-
if (!item) {
|
|
128
|
-
throw new Error(`Error when resolve ${type}. Type was not registered.`);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* @internal
|
|
133
|
-
*/
|
|
134
|
-
function checkOnlyOneRegistration(type, item, map) {
|
|
135
|
-
if (map.has(type) && !isEqual(map.get(type), item)) {
|
|
136
|
-
throw new Error(`Error when register ${type}. Element with this type has already exist`);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
96
|
+
var AggregationEvalType;
|
|
97
|
+
(function (AggregationEvalType) {
|
|
98
|
+
/** The scope of the aggregating function is not defined. */
|
|
99
|
+
AggregationEvalType[AggregationEvalType["None"] = 0] = "None";
|
|
100
|
+
/** Applies to all elements. */
|
|
101
|
+
AggregationEvalType[AggregationEvalType["All"] = 1] = "All";
|
|
102
|
+
/** Applies to unique values. */
|
|
103
|
+
AggregationEvalType[AggregationEvalType["Distinct"] = 2] = "Distinct";
|
|
104
|
+
})(AggregationEvalType || (AggregationEvalType = {}));
|
|
139
105
|
|
|
140
|
-
var
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
106
|
+
var ArithmeticOperation;
|
|
107
|
+
(function (ArithmeticOperation) {
|
|
108
|
+
/** Addition. */
|
|
109
|
+
ArithmeticOperation[ArithmeticOperation["Addition"] = 0] = "Addition";
|
|
110
|
+
/** Subtraction. */
|
|
111
|
+
ArithmeticOperation[ArithmeticOperation["Subtraction"] = 1] = "Subtraction";
|
|
112
|
+
/** Multiplication. */
|
|
113
|
+
ArithmeticOperation[ArithmeticOperation["Multiplication"] = 2] = "Multiplication";
|
|
114
|
+
/** Division. */
|
|
115
|
+
ArithmeticOperation[ArithmeticOperation["Division"] = 3] = "Division";
|
|
116
|
+
})(ArithmeticOperation || (ArithmeticOperation = {}));
|
|
117
|
+
|
|
118
|
+
var ComparisonType;
|
|
119
|
+
(function (ComparisonType) {
|
|
120
|
+
ComparisonType[ComparisonType["Between"] = 0] = "Between";
|
|
121
|
+
ComparisonType[ComparisonType["Contain"] = 11] = "Contain";
|
|
122
|
+
ComparisonType[ComparisonType["End_with"] = 13] = "End_with";
|
|
123
|
+
ComparisonType[ComparisonType["Equal"] = 3] = "Equal";
|
|
124
|
+
ComparisonType[ComparisonType["Exists"] = 15] = "Exists";
|
|
125
|
+
ComparisonType[ComparisonType["Greater"] = 7] = "Greater";
|
|
126
|
+
ComparisonType[ComparisonType["Greater_or_equal"] = 8] = "Greater_or_equal";
|
|
127
|
+
ComparisonType[ComparisonType["Is_not_null"] = 2] = "Is_not_null";
|
|
128
|
+
ComparisonType[ComparisonType["Is_null"] = 1] = "Is_null";
|
|
129
|
+
ComparisonType[ComparisonType["Less"] = 5] = "Less";
|
|
130
|
+
ComparisonType[ComparisonType["Less_or_equal"] = 6] = "Less_or_equal";
|
|
131
|
+
ComparisonType[ComparisonType["Not_contain"] = 12] = "Not_contain";
|
|
132
|
+
ComparisonType[ComparisonType["Not_end_with"] = 14] = "Not_end_with";
|
|
133
|
+
ComparisonType[ComparisonType["Not_equal"] = 4] = "Not_equal";
|
|
134
|
+
ComparisonType[ComparisonType["Not_exists"] = 16] = "Not_exists";
|
|
135
|
+
ComparisonType[ComparisonType["Not_start_with"] = 10] = "Not_start_with";
|
|
136
|
+
ComparisonType[ComparisonType["Start_with"] = 9] = "Start_with";
|
|
137
|
+
})(ComparisonType || (ComparisonType = {}));
|
|
138
|
+
|
|
139
|
+
var DatePartType;
|
|
140
|
+
(function (DatePartType) {
|
|
141
|
+
/** Empty value. */
|
|
142
|
+
DatePartType[DatePartType["None"] = 0] = "None";
|
|
143
|
+
/** Day. */
|
|
144
|
+
DatePartType[DatePartType["Day"] = 1] = "Day";
|
|
145
|
+
/** Week. */
|
|
146
|
+
DatePartType[DatePartType["Week"] = 2] = "Week";
|
|
147
|
+
/** Month. */
|
|
148
|
+
DatePartType[DatePartType["Month"] = 3] = "Month";
|
|
149
|
+
/** Year. */
|
|
150
|
+
DatePartType[DatePartType["Year"] = 4] = "Year";
|
|
151
|
+
/** Day of the week. */
|
|
152
|
+
DatePartType[DatePartType["WeekDay"] = 5] = "WeekDay";
|
|
153
|
+
/** Hour. */
|
|
154
|
+
DatePartType[DatePartType["Hour"] = 6] = "Hour";
|
|
155
|
+
/** Minute. */
|
|
156
|
+
DatePartType[DatePartType["HourMinute"] = 7] = "HourMinute";
|
|
157
|
+
})(DatePartType || (DatePartType = {}));
|
|
158
|
+
|
|
159
|
+
var ExpressionType;
|
|
160
|
+
(function (ExpressionType) {
|
|
161
|
+
ExpressionType[ExpressionType["SchemaColumn"] = 0] = "SchemaColumn";
|
|
162
|
+
ExpressionType[ExpressionType["Function"] = 1] = "Function";
|
|
163
|
+
ExpressionType[ExpressionType["Parameter"] = 2] = "Parameter";
|
|
164
|
+
ExpressionType[ExpressionType["SubQuery"] = 3] = "SubQuery";
|
|
165
|
+
ExpressionType[ExpressionType["ArithmeticOperation"] = 4] = "ArithmeticOperation";
|
|
166
|
+
})(ExpressionType || (ExpressionType = {}));
|
|
167
|
+
|
|
168
|
+
var FilterType;
|
|
169
|
+
(function (FilterType) {
|
|
170
|
+
FilterType[FilterType["None"] = 0] = "None";
|
|
171
|
+
FilterType[FilterType["Compare"] = 1] = "Compare";
|
|
172
|
+
FilterType[FilterType["IsNull"] = 2] = "IsNull";
|
|
173
|
+
FilterType[FilterType["Between"] = 3] = "Between";
|
|
174
|
+
FilterType[FilterType["In"] = 4] = "In";
|
|
175
|
+
FilterType[FilterType["Exists"] = 5] = "Exists";
|
|
176
|
+
FilterType[FilterType["FilterGroup"] = 6] = "FilterGroup";
|
|
177
|
+
})(FilterType || (FilterType = {}));
|
|
178
|
+
|
|
179
|
+
var FunctionType;
|
|
180
|
+
(function (FunctionType) {
|
|
181
|
+
FunctionType[FunctionType["None"] = 0] = "None";
|
|
182
|
+
/** Substitution by macro. */
|
|
183
|
+
FunctionType[FunctionType["Macros"] = 1] = "Macros";
|
|
184
|
+
/** Aggregating function. */
|
|
185
|
+
FunctionType[FunctionType["Aggregation"] = 2] = "Aggregation";
|
|
186
|
+
/** Date fragment. */
|
|
187
|
+
FunctionType[FunctionType["DatePart"] = 3] = "DatePart";
|
|
188
|
+
/** The size of the value in bytes, used for binary data. */
|
|
189
|
+
FunctionType[FunctionType["Length"] = 4] = "Length";
|
|
190
|
+
/** Window query function */
|
|
191
|
+
FunctionType[FunctionType["Window"] = 5] = "Window";
|
|
192
|
+
/** Date add. */
|
|
193
|
+
FunctionType[FunctionType["DateAdd"] = 6] = "DateAdd";
|
|
194
|
+
/** Date diff. */
|
|
195
|
+
FunctionType[FunctionType["DateDiff"] = 7] = "DateDiff";
|
|
196
|
+
})(FunctionType || (FunctionType = {}));
|
|
197
|
+
|
|
198
|
+
var OrderDirection;
|
|
199
|
+
(function (OrderDirection) {
|
|
200
|
+
OrderDirection[OrderDirection["None"] = 0] = "None";
|
|
201
|
+
OrderDirection[OrderDirection["Asc"] = 1] = "Asc";
|
|
202
|
+
OrderDirection[OrderDirection["Desc"] = 2] = "Desc";
|
|
203
|
+
})(OrderDirection || (OrderDirection = {}));
|
|
204
|
+
|
|
205
|
+
var QueryMacrosType;
|
|
206
|
+
(function (QueryMacrosType) {
|
|
207
|
+
/** Macro type not defined. */
|
|
208
|
+
QueryMacrosType[QueryMacrosType["None"] = 0] = "None";
|
|
209
|
+
/** Current user. */
|
|
210
|
+
QueryMacrosType[QueryMacrosType["CurrentUser"] = 1] = "CurrentUser";
|
|
211
|
+
/** Current user contact. */
|
|
212
|
+
QueryMacrosType[QueryMacrosType["CurrentUserContact"] = 2] = "CurrentUserContact";
|
|
213
|
+
/** Yesterday. */
|
|
214
|
+
QueryMacrosType[QueryMacrosType["Yesterday"] = 3] = "Yesterday";
|
|
215
|
+
/** Today. */
|
|
216
|
+
QueryMacrosType[QueryMacrosType["Today"] = 4] = "Today";
|
|
217
|
+
/** Tomorrow. */
|
|
218
|
+
QueryMacrosType[QueryMacrosType["Tomorrow"] = 5] = "Tomorrow";
|
|
219
|
+
/** Previous week. */
|
|
220
|
+
QueryMacrosType[QueryMacrosType["PreviousWeek"] = 6] = "PreviousWeek";
|
|
221
|
+
/** This week. */
|
|
222
|
+
QueryMacrosType[QueryMacrosType["CurrentWeek"] = 7] = "CurrentWeek";
|
|
223
|
+
/** Next week. */
|
|
224
|
+
QueryMacrosType[QueryMacrosType["NextWeek"] = 8] = "NextWeek";
|
|
225
|
+
/** Previous month. */
|
|
226
|
+
QueryMacrosType[QueryMacrosType["PreviousMonth"] = 9] = "PreviousMonth";
|
|
227
|
+
/** Current month. */
|
|
228
|
+
QueryMacrosType[QueryMacrosType["CurrentMonth"] = 10] = "CurrentMonth";
|
|
229
|
+
/** Next month. */
|
|
230
|
+
QueryMacrosType[QueryMacrosType["NextMonth"] = 11] = "NextMonth";
|
|
231
|
+
/** Previous quarter. */
|
|
232
|
+
QueryMacrosType[QueryMacrosType["PreviousQuarter"] = 12] = "PreviousQuarter";
|
|
233
|
+
/** Current quarter. */
|
|
234
|
+
QueryMacrosType[QueryMacrosType["CurrentQuarter"] = 13] = "CurrentQuarter";
|
|
235
|
+
/** Next quarter. */
|
|
236
|
+
QueryMacrosType[QueryMacrosType["NextQuarter"] = 14] = "NextQuarter";
|
|
237
|
+
/** Previous half of the year. */
|
|
238
|
+
QueryMacrosType[QueryMacrosType["PreviousHalfYear"] = 15] = "PreviousHalfYear";
|
|
239
|
+
/** Current half-year. */
|
|
240
|
+
QueryMacrosType[QueryMacrosType["CurrentHalfYear"] = 16] = "CurrentHalfYear";
|
|
241
|
+
/** Next half-year. */
|
|
242
|
+
QueryMacrosType[QueryMacrosType["NextHalfYear"] = 17] = "NextHalfYear";
|
|
243
|
+
/** Last year. */
|
|
244
|
+
QueryMacrosType[QueryMacrosType["PreviousYear"] = 18] = "PreviousYear";
|
|
245
|
+
/** This year. */
|
|
246
|
+
QueryMacrosType[QueryMacrosType["CurrentYear"] = 19] = "CurrentYear";
|
|
247
|
+
/** Previous hour. */
|
|
248
|
+
QueryMacrosType[QueryMacrosType["PreviousHour"] = 20] = "PreviousHour";
|
|
249
|
+
/** Current hour. */
|
|
250
|
+
QueryMacrosType[QueryMacrosType["CurrentHour"] = 21] = "CurrentHour";
|
|
251
|
+
/** Next hour. */
|
|
252
|
+
QueryMacrosType[QueryMacrosType["NextHour"] = 22] = "NextHour";
|
|
253
|
+
/** Next year. */
|
|
254
|
+
QueryMacrosType[QueryMacrosType["NextYear"] = 23] = "NextYear";
|
|
255
|
+
/** Next N Days. */
|
|
256
|
+
QueryMacrosType[QueryMacrosType["NextNDays"] = 24] = "NextNDays";
|
|
257
|
+
/** Previous N days. */
|
|
258
|
+
QueryMacrosType[QueryMacrosType["PreviousNDays"] = 25] = "PreviousNDays";
|
|
259
|
+
/** Next N hours. */
|
|
260
|
+
QueryMacrosType[QueryMacrosType["NextNHours"] = 26] = "NextNHours";
|
|
261
|
+
/** Previous N hours. */
|
|
262
|
+
QueryMacrosType[QueryMacrosType["PreviousNHours"] = 27] = "PreviousNHours";
|
|
263
|
+
/** Primary column. */
|
|
264
|
+
QueryMacrosType[QueryMacrosType["PrimaryColumn"] = 34] = "PrimaryColumn";
|
|
265
|
+
/** Primary displayed column. */
|
|
266
|
+
QueryMacrosType[QueryMacrosType["PrimaryDisplayColumn"] = 35] = "PrimaryDisplayColumn";
|
|
267
|
+
/** Primary image display column. */
|
|
268
|
+
QueryMacrosType[QueryMacrosType["PrimaryImageColumn"] = 36] = "PrimaryImageColumn";
|
|
269
|
+
/** Anniversary today. */
|
|
270
|
+
QueryMacrosType[QueryMacrosType["DayOfYearToday"] = 37] = "DayOfYearToday";
|
|
271
|
+
/** Anniversary on the date computed as today plus days offset. */
|
|
272
|
+
QueryMacrosType[QueryMacrosType["DayOfYearTodayPlusDaysOffset"] = 38] = "DayOfYearTodayPlusDaysOffset";
|
|
273
|
+
/** Anniversary on the next several days. */
|
|
274
|
+
QueryMacrosType[QueryMacrosType["NextNDaysOfYear"] = 39] = "NextNDaysOfYear";
|
|
275
|
+
/** Anniversary on the previous several days. */
|
|
276
|
+
QueryMacrosType[QueryMacrosType["PreviousNDaysOfYear"] = 40] = "PreviousNDaysOfYear";
|
|
277
|
+
/** Primary color display column. */
|
|
278
|
+
QueryMacrosType[QueryMacrosType["PrimaryColorColumn"] = 41] = "PrimaryColorColumn";
|
|
279
|
+
})(QueryMacrosType || (QueryMacrosType = {}));
|
|
280
|
+
|
|
281
|
+
class BaseExpression {
|
|
282
|
+
constructor(config) {
|
|
283
|
+
this.isBlock = false;
|
|
284
|
+
this.isBlock = config === null || config === void 0 ? void 0 : config.isBlock;
|
|
214
285
|
}
|
|
215
286
|
}
|
|
216
|
-
RequestHandlerRegistryService._internalRegistry = global$3.creatio.requestHandlerRegistry;
|
|
217
287
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Registers a specified request class.
|
|
227
|
-
* @param config Request registration config.
|
|
228
|
-
* @param type Request type.
|
|
229
|
-
*/
|
|
230
|
-
static register(config, type) {
|
|
231
|
-
const requestType = config.type;
|
|
232
|
-
// TODO RND-21723
|
|
233
|
-
RequestRegistryService._requestsMap.set(requestType, type);
|
|
234
|
-
RequestRegistryService._requestsRegistrationInfos.set(requestType, config);
|
|
288
|
+
class ArithmeticExpression extends BaseExpression {
|
|
289
|
+
constructor(config) {
|
|
290
|
+
super(config);
|
|
291
|
+
this.expressionType = ExpressionType.ArithmeticOperation;
|
|
292
|
+
this.arithmeticOperation = config === null || config === void 0 ? void 0 : config.arithmeticOperation;
|
|
293
|
+
this.leftArithmeticOperand = config === null || config === void 0 ? void 0 : config.leftArithmeticOperand.clone();
|
|
294
|
+
this.rightArithmeticOperand = config === null || config === void 0 ? void 0 : config.rightArithmeticOperand.clone();
|
|
235
295
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
* @param type Request type.
|
|
239
|
-
* @returns The instance of registered request.
|
|
240
|
-
*/
|
|
241
|
-
static get(type) {
|
|
242
|
-
const requestInstanceConstructor = RequestRegistryService._requestsMap.get(type);
|
|
243
|
-
checkIfTypeRegistered(type, requestInstanceConstructor);
|
|
244
|
-
return requestInstanceConstructor && new requestInstanceConstructor();
|
|
296
|
+
clone() {
|
|
297
|
+
return new ArithmeticExpression(this);
|
|
245
298
|
}
|
|
246
299
|
}
|
|
247
|
-
RequestRegistryService._requestsMap = new Map();
|
|
248
|
-
RequestRegistryService._requestsRegistrationInfos = new Map();
|
|
249
300
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
if (!this._converters.has(type)) {
|
|
256
|
-
throw new Error(`'${type}' converter doesn't exist`);
|
|
257
|
-
}
|
|
258
|
-
return this._converters.get(type);
|
|
259
|
-
}
|
|
260
|
-
static register(type, ctor) {
|
|
261
|
-
checkTypeNameFormat(type, 'ConverterTypeName');
|
|
262
|
-
checkCrtTypeNamePascalCase(type);
|
|
263
|
-
// TODO RND-21723
|
|
264
|
-
this._converters.set(type, new ctor());
|
|
301
|
+
class ColumnExpression extends BaseExpression {
|
|
302
|
+
constructor(config) {
|
|
303
|
+
super(config);
|
|
304
|
+
this.expressionType = ExpressionType.SchemaColumn;
|
|
305
|
+
this.columnPath = config === null || config === void 0 ? void 0 : config.columnPath;
|
|
265
306
|
}
|
|
266
|
-
|
|
267
|
-
this
|
|
307
|
+
clone() {
|
|
308
|
+
return new ColumnExpression(this);
|
|
268
309
|
}
|
|
269
310
|
}
|
|
270
|
-
GlobalConvertersRegistryService._converters = new Map();
|
|
271
311
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
class BaseRegistry {
|
|
277
|
-
constructor() {
|
|
278
|
-
this.store = {
|
|
279
|
-
typeInfos: new Map(),
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
static get store() {
|
|
283
|
-
if (!this._instance) {
|
|
284
|
-
let globalInstance = get(global$2, this._prefix + this.registryKey);
|
|
285
|
-
if (!globalInstance) {
|
|
286
|
-
globalInstance = new this();
|
|
287
|
-
set(global$2, this._prefix + this.registryKey, globalInstance);
|
|
288
|
-
}
|
|
289
|
-
this._instance = globalInstance;
|
|
290
|
-
}
|
|
291
|
-
return this._instance.store;
|
|
312
|
+
class FunctionExpression extends BaseExpression {
|
|
313
|
+
constructor(config) {
|
|
314
|
+
super(config);
|
|
315
|
+
this.expressionType = ExpressionType.Function;
|
|
292
316
|
}
|
|
293
317
|
}
|
|
294
|
-
BaseRegistry._prefix = 'creatio.registry.';
|
|
295
318
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* @internal
|
|
302
|
-
*/
|
|
303
|
-
class ViewElementRegistry extends BaseRegistry {
|
|
304
|
-
static validate(config) {
|
|
305
|
-
checkTypeNameFormat(config.type, 'ViewElementTypeName');
|
|
306
|
-
checkOnlyOneRegistration(config.type, config, ViewElementRegistry.viewElements);
|
|
307
|
-
}
|
|
308
|
-
static get viewElements() {
|
|
309
|
-
return this.store.typeInfos;
|
|
310
|
-
}
|
|
311
|
-
static register(config) {
|
|
312
|
-
this.viewElements.set(config.type, config);
|
|
313
|
-
}
|
|
314
|
-
static getFormControlRelatesAttribute(type) {
|
|
315
|
-
var _a;
|
|
316
|
-
const config = this.store.typeInfos.get(type);
|
|
317
|
-
return (config && 'formControlConfig' in config && ((_a = config.formControlConfig) === null || _a === void 0 ? void 0 : _a.relatesTo)) || null;
|
|
319
|
+
class ArgumentFunctionExpression extends FunctionExpression {
|
|
320
|
+
constructor(config) {
|
|
321
|
+
super(config);
|
|
322
|
+
this.functionArgument = config === null || config === void 0 ? void 0 : config.functionArgument.clone();
|
|
318
323
|
}
|
|
319
324
|
}
|
|
320
|
-
ViewElementRegistry.registryKey = viewElementRegistryKey;
|
|
321
325
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
*/
|
|
329
|
-
class InterfaceDesignerItemRegistry extends BaseRegistry {
|
|
330
|
-
static validate(config) {
|
|
331
|
-
checkTypeNameFormat(config.type, 'InterfaceDesignerItemTypeName');
|
|
332
|
-
checkCrtTypeNamePascalCase(config.type);
|
|
333
|
-
checkOnlyOneRegistration(config.type, config, this.interfaceDesignerItemRegistrationInfos);
|
|
334
|
-
}
|
|
335
|
-
static register(config) {
|
|
336
|
-
this.interfaceDesignerItemRegistrationInfos.set(config.type, config);
|
|
337
|
-
}
|
|
338
|
-
static get interfaceDesignerItemRegistrationInfos() {
|
|
339
|
-
return this.store.typeInfos;
|
|
326
|
+
class AggregationFunctionExpression extends ArgumentFunctionExpression {
|
|
327
|
+
constructor(config) {
|
|
328
|
+
super(config);
|
|
329
|
+
this.functionType = FunctionType.Aggregation;
|
|
330
|
+
this.aggregationType = config === null || config === void 0 ? void 0 : config.aggregationType;
|
|
331
|
+
this.aggregationEvalType = config === null || config === void 0 ? void 0 : config.aggregationEvalType;
|
|
340
332
|
}
|
|
341
|
-
|
|
342
|
-
return this
|
|
333
|
+
clone() {
|
|
334
|
+
return new AggregationFunctionExpression(this);
|
|
343
335
|
}
|
|
344
336
|
}
|
|
345
|
-
InterfaceDesignerItemRegistry.registryKey = interfaceDesignerItemRegistryKey;
|
|
346
337
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
constructor() {
|
|
353
|
-
this._subscribers = new Set();
|
|
354
|
-
}
|
|
355
|
-
static get instance() {
|
|
356
|
-
if (!global$1.__crtModuleBootstrapNotifier) {
|
|
357
|
-
global$1.__crtModuleBootstrapNotifier = new BootstrapNotifier();
|
|
358
|
-
}
|
|
359
|
-
return global$1.__crtModuleBootstrapNotifier;
|
|
360
|
-
}
|
|
361
|
-
notify(moduleType) {
|
|
362
|
-
for (const subscriber of this._subscribers.values()) {
|
|
363
|
-
subscriber(moduleType);
|
|
364
|
-
}
|
|
338
|
+
class DatePartFunctionExpression extends ArgumentFunctionExpression {
|
|
339
|
+
constructor(config) {
|
|
340
|
+
super(config);
|
|
341
|
+
this.functionType = FunctionType.DatePart;
|
|
342
|
+
this.datePartType = config === null || config === void 0 ? void 0 : config.datePartType;
|
|
365
343
|
}
|
|
366
|
-
|
|
367
|
-
this
|
|
368
|
-
return {
|
|
369
|
-
unsubscribe: () => this._subscribers.delete(subscriber),
|
|
370
|
-
};
|
|
344
|
+
clone() {
|
|
345
|
+
return new DatePartFunctionExpression(this);
|
|
371
346
|
}
|
|
372
347
|
}
|
|
373
348
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
static validate({ requestType }) {
|
|
379
|
-
checkTypeNameFormat(requestType, this.registryKey);
|
|
380
|
-
checkCrtTypeNamePascalCase(requestType);
|
|
381
|
-
this.checkUniqueRequestType(requestType);
|
|
382
|
-
}
|
|
383
|
-
static checkUniqueRequestType(requestType) {
|
|
384
|
-
if (this.services.get(requestType)) {
|
|
385
|
-
throw new Error(`${requestType} already registered`);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
static register(config) {
|
|
389
|
-
this.validate(config);
|
|
390
|
-
this.services.set(config.requestType, config);
|
|
349
|
+
class LengthFunctionExpression extends ArgumentFunctionExpression {
|
|
350
|
+
constructor(config) {
|
|
351
|
+
super(config);
|
|
352
|
+
this.functionType = FunctionType.Length;
|
|
391
353
|
}
|
|
392
|
-
|
|
393
|
-
return this
|
|
354
|
+
clone() {
|
|
355
|
+
return new LengthFunctionExpression(this);
|
|
394
356
|
}
|
|
395
357
|
}
|
|
396
|
-
HandlerChainServicesRegistry.registryKey = 'HandlerChainServicesRegistry';
|
|
397
358
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
* @internal
|
|
404
|
-
*/
|
|
405
|
-
class DesignTimeViewElementRegistry extends BaseRegistry {
|
|
406
|
-
static validate(config) {
|
|
407
|
-
checkTypeNameFormat(config.type, 'DesignTimeViewElementRegistryItemTypeName');
|
|
408
|
-
checkCrtTypeNamePascalCase(config.type);
|
|
409
|
-
checkOnlyOneRegistration(config.type, config, this.infos);
|
|
410
|
-
}
|
|
411
|
-
static register(config) {
|
|
412
|
-
this.infos.set(config.type, config);
|
|
413
|
-
}
|
|
414
|
-
static getByOverriddenType(type) {
|
|
415
|
-
const item = Array.from(this.infos).find(([_, info]) => info.overrideType === type);
|
|
416
|
-
if (item) {
|
|
417
|
-
return item[1];
|
|
418
|
-
}
|
|
419
|
-
return null;
|
|
359
|
+
class MacrosFunctionExpression extends FunctionExpression {
|
|
360
|
+
constructor(config) {
|
|
361
|
+
super(config);
|
|
362
|
+
this.functionType = FunctionType.Macros;
|
|
363
|
+
this.macrosType = config === null || config === void 0 ? void 0 : config.macrosType;
|
|
420
364
|
}
|
|
421
|
-
|
|
422
|
-
return this
|
|
365
|
+
clone() {
|
|
366
|
+
return new MacrosFunctionExpression(this);
|
|
423
367
|
}
|
|
424
368
|
}
|
|
425
|
-
DesignTimeViewElementRegistry.registryKey = designTimeViewElementRegistryKey;
|
|
426
369
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
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;
|
|
370
|
+
class WindowFunctionExpression extends ArgumentFunctionExpression {
|
|
371
|
+
constructor(config) {
|
|
372
|
+
super(config);
|
|
373
|
+
this.functionType = FunctionType.Window;
|
|
452
374
|
}
|
|
453
|
-
|
|
454
|
-
this
|
|
375
|
+
clone() {
|
|
376
|
+
return new WindowFunctionExpression(this);
|
|
455
377
|
}
|
|
456
378
|
}
|
|
457
|
-
ValidatorRegistry.registryKey = validatorRegistryKey;
|
|
458
379
|
|
|
459
380
|
/**
|
|
460
381
|
* @internal
|
|
382
|
+
* Returns a string represent of date in ISO 8601 without time zone specification(doesn't convert it
|
|
383
|
+
* using local timezone).
|
|
384
|
+
*
|
|
385
|
+
* Example:
|
|
386
|
+
*
|
|
387
|
+
* const date = new Date(2018, 01, 20, 15, 10, 30);
|
|
388
|
+
* const result = toLocalISOString(date);
|
|
389
|
+
* //result: '2018-02-20T15:10:30'
|
|
390
|
+
*
|
|
391
|
+
* @param date Date value.
|
|
461
392
|
*/
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
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;
|
|
393
|
+
function toLocalISOString(date) {
|
|
394
|
+
if (!(date instanceof Date)) {
|
|
395
|
+
throw new TypeError();
|
|
472
396
|
}
|
|
397
|
+
const timeZoneOffset = date.getTimezoneOffset() * 60000;
|
|
398
|
+
return new Date(date.getTime() - timeZoneOffset).toISOString().slice(0, -1);
|
|
473
399
|
}
|
|
474
|
-
PkgTopology.registryKey = 'pkgTopology';
|
|
475
|
-
|
|
476
400
|
/**
|
|
477
401
|
* @internal
|
|
402
|
+
* Returns encoded date in string value.
|
|
403
|
+
* @param date Date value.
|
|
478
404
|
*/
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
return this.store.typeInfos;
|
|
482
|
-
}
|
|
405
|
+
function encodeDate(date) {
|
|
406
|
+
return `"${toLocalISOString(date)}"`;
|
|
483
407
|
}
|
|
484
|
-
RemoteEntriesRegistry.registryKey = 'remotes';
|
|
485
408
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
409
|
+
class ParameterExpression extends BaseExpression {
|
|
410
|
+
constructor(config) {
|
|
411
|
+
var _a;
|
|
412
|
+
super(config);
|
|
413
|
+
this.expressionType = ExpressionType.Parameter;
|
|
414
|
+
const value = config === null || config === void 0 ? void 0 : config.value;
|
|
415
|
+
if (value instanceof Date) {
|
|
416
|
+
const cloneDate = new Date();
|
|
417
|
+
cloneDate.setTime(value.getTime());
|
|
418
|
+
this.value = cloneDate;
|
|
419
|
+
}
|
|
420
|
+
else if (!value) {
|
|
421
|
+
this.value = value;
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
this.value = typeof value === 'object' ? Object.assign({}, value) : value;
|
|
425
|
+
}
|
|
426
|
+
this.dataValueType = (_a = config === null || config === void 0 ? void 0 : config.dataValueType) !== null && _a !== void 0 ? _a : DataValueType.Text;
|
|
427
|
+
}
|
|
428
|
+
get parameter() {
|
|
429
|
+
return Object.assign({ dataValueType: this.dataValueType }, this._getParameterValueMetadata());
|
|
430
|
+
}
|
|
431
|
+
_convertStringToBlobArray(str) {
|
|
432
|
+
const out = [];
|
|
433
|
+
let position = 0;
|
|
434
|
+
for (let i = 0; i < str.length; i++) {
|
|
435
|
+
const code = str.charCodeAt(i);
|
|
436
|
+
if (code < 128) {
|
|
437
|
+
out[position++] = String.fromCharCode(code);
|
|
438
|
+
}
|
|
439
|
+
else if (code < 2048) {
|
|
440
|
+
/* eslint-disable no-bitwise */
|
|
441
|
+
out[position++] = String.fromCharCode((code >> 6) | 192);
|
|
442
|
+
out[position++] = String.fromCharCode((code & 63) | 128);
|
|
443
|
+
}
|
|
444
|
+
else {
|
|
445
|
+
out[position++] = String.fromCharCode((code >> 12) | 224);
|
|
446
|
+
out[position++] = String.fromCharCode(((code >> 6) & 63) | 128);
|
|
447
|
+
out[position++] = String.fromCharCode((code & 63) | 128);
|
|
448
|
+
/* eslint-enable no-bitwise */
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
return out;
|
|
452
|
+
}
|
|
453
|
+
_getParameterValueMetadata() {
|
|
454
|
+
if (this.dataValueType === DataValueType.Blob) {
|
|
455
|
+
return {
|
|
456
|
+
arrayValue: !this.value ? [] : this._convertStringToBlobArray(this.value),
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
else if (this.value instanceof Date) {
|
|
460
|
+
return {
|
|
461
|
+
value: encodeDate(this.value),
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
return {
|
|
466
|
+
value: this.value,
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
clone() {
|
|
471
|
+
return new ParameterExpression(this);
|
|
492
472
|
}
|
|
493
|
-
return Object.keys(obj)
|
|
494
|
-
.filter((key) => obj[key] instanceof Object)
|
|
495
|
-
.map((key) => objectDeepKeys(obj[key]).map((k) => [key, ...k]))
|
|
496
|
-
.reduce((x, y) => [...x, ...y], Object.keys(obj).map((x) => [x]));
|
|
497
473
|
}
|
|
474
|
+
__decorate([
|
|
475
|
+
Exclude(),
|
|
476
|
+
__metadata("design:type", Object)
|
|
477
|
+
], ParameterExpression.prototype, "value", void 0);
|
|
478
|
+
__decorate([
|
|
479
|
+
Exclude(),
|
|
480
|
+
__metadata("design:type", Number)
|
|
481
|
+
], ParameterExpression.prototype, "dataValueType", void 0);
|
|
482
|
+
__decorate([
|
|
483
|
+
Expose(),
|
|
484
|
+
__metadata("design:type", Object),
|
|
485
|
+
__metadata("design:paramtypes", [])
|
|
486
|
+
], ParameterExpression.prototype, "parameter", null);
|
|
498
487
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
const
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
488
|
+
class SubQueryExpression extends BaseExpression {
|
|
489
|
+
constructor(config) {
|
|
490
|
+
super(config);
|
|
491
|
+
this.expressionType = ExpressionType.SubQuery;
|
|
492
|
+
this.columnPath = config === null || config === void 0 ? void 0 : config.columnPath;
|
|
493
|
+
const subFilter = config === null || config === void 0 ? void 0 : config.subFilters;
|
|
494
|
+
this.subFilters = typeof (subFilter === null || subFilter === void 0 ? void 0 : subFilter.clone) === 'function' ? subFilter.clone() : subFilter;
|
|
495
|
+
this.subOrderDirection = config.subOrderDirection;
|
|
496
|
+
this.subOrderColumn = config.subOrderColumn;
|
|
497
|
+
}
|
|
498
|
+
clone() {
|
|
499
|
+
return new SubQueryExpression(this);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
class AggregationSubQueryExpression extends SubQueryExpression {
|
|
504
|
+
constructor(config) {
|
|
505
|
+
super(config);
|
|
506
|
+
this.aggregationType = config === null || config === void 0 ? void 0 : config.aggregationType;
|
|
507
|
+
}
|
|
508
|
+
clone() {
|
|
509
|
+
return new AggregationSubQueryExpression(this);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
const EXPRESSION_TYPE_MOCK = -1;
|
|
514
|
+
class ExpressionMock extends BaseExpression {
|
|
515
|
+
constructor(config) {
|
|
516
|
+
super(config || {});
|
|
517
|
+
this.expressionType = EXPRESSION_TYPE_MOCK;
|
|
518
|
+
}
|
|
519
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
520
|
+
get plainObject() {
|
|
521
|
+
return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
|
|
522
|
+
}
|
|
523
|
+
clone() {
|
|
524
|
+
return new ExpressionMock(this);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
class BaseFilter {
|
|
529
|
+
constructor(filterType) {
|
|
530
|
+
this.isEnabled = true;
|
|
531
|
+
this.trimDateTimeParameterToDate = false;
|
|
532
|
+
this.filterType = filterType;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
class FilterMock extends BaseFilter {
|
|
537
|
+
constructor(filterType = FilterType.None) {
|
|
538
|
+
super(filterType);
|
|
539
|
+
}
|
|
540
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
541
|
+
get plainObject() {
|
|
542
|
+
return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
|
|
543
|
+
}
|
|
544
|
+
clone() {
|
|
545
|
+
return new FilterMock(this.filterType);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
class SingleFilter extends BaseFilter {
|
|
550
|
+
constructor(filterType, comparisonType, leftExpression) {
|
|
551
|
+
super(filterType);
|
|
552
|
+
this.comparisonType = comparisonType;
|
|
553
|
+
this.leftExpression = leftExpression.clone();
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
class CompareFilter extends SingleFilter {
|
|
558
|
+
constructor(comparisonType, leftExpression, rightExpression) {
|
|
559
|
+
super(FilterType.Compare, comparisonType, leftExpression);
|
|
560
|
+
this.rightExpression = rightExpression.clone();
|
|
561
|
+
}
|
|
562
|
+
clone() {
|
|
563
|
+
return new CompareFilter(this.comparisonType, this.leftExpression, this.rightExpression);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
class BetweenFilter extends SingleFilter {
|
|
568
|
+
constructor(leftExpression, rightLessExpression, rightGreaterExpression) {
|
|
569
|
+
super(FilterType.Between, ComparisonType.Between, leftExpression);
|
|
570
|
+
this.rightLessExpression = rightLessExpression.clone();
|
|
571
|
+
this.rightGreaterExpression = rightGreaterExpression.clone();
|
|
572
|
+
}
|
|
573
|
+
clone() {
|
|
574
|
+
return new BetweenFilter(this.leftExpression, this.rightLessExpression, this.rightGreaterExpression);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
class ExistsFilter extends SingleFilter {
|
|
579
|
+
constructor(leftExpression, subFilters, comparisonType = ComparisonType.Exists, isAggregative = true) {
|
|
580
|
+
super(FilterType.Exists, comparisonType, leftExpression);
|
|
581
|
+
this.subFilters = subFilters === null || subFilters === void 0 ? void 0 : subFilters.clone();
|
|
582
|
+
this.isAggregative = isAggregative;
|
|
583
|
+
}
|
|
584
|
+
clone() {
|
|
585
|
+
return new ExistsFilter(this.leftExpression, this.subFilters, this.comparisonType, this.isAggregative);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
class InFilter extends SingleFilter {
|
|
590
|
+
constructor(comparisonType, leftExpression, rightExpressions) {
|
|
591
|
+
super(FilterType.In, comparisonType, leftExpression);
|
|
592
|
+
this.rightExpressions = rightExpressions.map((expression) => expression.clone());
|
|
593
|
+
}
|
|
594
|
+
clone() {
|
|
595
|
+
return new InFilter(this.comparisonType, this.leftExpression, this.rightExpressions);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
class IsNullFilter extends SingleFilter {
|
|
600
|
+
constructor(comparisonType, leftExpression) {
|
|
601
|
+
super(FilterType.IsNull, comparisonType, leftExpression);
|
|
602
|
+
}
|
|
603
|
+
get isNull() {
|
|
604
|
+
return this.comparisonType === ComparisonType.Is_null;
|
|
605
|
+
}
|
|
606
|
+
clone() {
|
|
607
|
+
return new IsNullFilter(this.comparisonType, this.leftExpression);
|
|
608
|
+
}
|
|
510
609
|
}
|
|
610
|
+
__decorate([
|
|
611
|
+
Expose(),
|
|
612
|
+
__metadata("design:type", Boolean),
|
|
613
|
+
__metadata("design:paramtypes", [])
|
|
614
|
+
], IsNullFilter.prototype, "isNull", null);
|
|
615
|
+
|
|
511
616
|
/**
|
|
617
|
+
* Empty Guid constant.
|
|
512
618
|
* @internal
|
|
513
619
|
*/
|
|
514
|
-
|
|
515
|
-
const metadata = Reflect.getMetadata(moduleMetadataKey, type);
|
|
516
|
-
if (!metadata) {
|
|
517
|
-
throw new Error(`Module metadata was not found on '${type.name}' class`);
|
|
518
|
-
}
|
|
519
|
-
return metadata;
|
|
520
|
-
}
|
|
620
|
+
const EMPTY_GUID = '00000000-0000-0000-0000-000000000000';
|
|
521
621
|
/**
|
|
622
|
+
* Regular expression for Guid validation.
|
|
522
623
|
* @internal
|
|
523
624
|
*/
|
|
524
|
-
|
|
525
|
-
Reflect.defineMetadata(viewElementMetadataKey, metadata, type);
|
|
526
|
-
}
|
|
625
|
+
const validator = new RegExp('^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$', 'i');
|
|
527
626
|
/**
|
|
627
|
+
* Generates guid part.
|
|
628
|
+
* @param length Part length.
|
|
528
629
|
* @internal
|
|
529
630
|
*/
|
|
530
|
-
function
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
631
|
+
function generateGuidPart(length) {
|
|
632
|
+
let out = '';
|
|
633
|
+
for (let i = 0; i < length; i++) {
|
|
634
|
+
// eslint-disable-next-line no-bitwise
|
|
635
|
+
out += (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
534
636
|
}
|
|
535
|
-
return
|
|
637
|
+
return out;
|
|
536
638
|
}
|
|
537
639
|
/**
|
|
640
|
+
* Generates new Guid.
|
|
538
641
|
* @internal
|
|
539
642
|
*/
|
|
540
|
-
function
|
|
541
|
-
|
|
643
|
+
function generateGuid() {
|
|
644
|
+
return [
|
|
645
|
+
generateGuidPart(2),
|
|
646
|
+
generateGuidPart(1),
|
|
647
|
+
generateGuidPart(1),
|
|
648
|
+
generateGuidPart(1),
|
|
649
|
+
generateGuidPart(3),
|
|
650
|
+
].join('-');
|
|
542
651
|
}
|
|
543
652
|
/**
|
|
653
|
+
* Checks if value is Guid.
|
|
654
|
+
* @param value Value for check.
|
|
544
655
|
* @internal
|
|
545
656
|
*/
|
|
546
|
-
function
|
|
547
|
-
|
|
548
|
-
if (!metadata) {
|
|
549
|
-
throw new Error(`Validator metadata was not found on '${type.name}' class`);
|
|
550
|
-
}
|
|
551
|
-
return metadata;
|
|
657
|
+
function isGuid(value) {
|
|
658
|
+
return Boolean(value) && validator.test(value);
|
|
552
659
|
}
|
|
553
660
|
/**
|
|
661
|
+
* Checks if Guid is empty value or equal to EMPTY_GUID.
|
|
662
|
+
* @param guid Guid for check.
|
|
554
663
|
* @internal
|
|
555
664
|
*/
|
|
556
|
-
function
|
|
557
|
-
|
|
665
|
+
function isEmptyGuid(guid) {
|
|
666
|
+
return !guid || guid === EMPTY_GUID;
|
|
558
667
|
}
|
|
668
|
+
|
|
559
669
|
/**
|
|
560
670
|
* @internal
|
|
561
671
|
*/
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
throw new Error(`Interface designer item metadata was not found on '${type.name}' class`);
|
|
672
|
+
class NextHandlerAlreadySpecifiedException extends Error {
|
|
673
|
+
constructor() {
|
|
674
|
+
super('Next handler already specified');
|
|
566
675
|
}
|
|
567
|
-
return metadata;
|
|
568
|
-
}
|
|
569
|
-
/**
|
|
570
|
-
* @internal
|
|
571
|
-
*/
|
|
572
|
-
function setDesignTimeViewElementMetadata(metadata, type) {
|
|
573
|
-
Reflect.defineMetadata(designTimeViewElementMetadataKey, metadata, type);
|
|
574
676
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
if (!metadata) {
|
|
581
|
-
throw new Error(`Design time view element metadata was not found on '${type.name}' class`);
|
|
677
|
+
|
|
678
|
+
class ArgumentEmptyException extends Error {
|
|
679
|
+
// region Constructors: Public
|
|
680
|
+
constructor(argumentName) {
|
|
681
|
+
super(`Argument with name '${argumentName}' is empty.`);
|
|
582
682
|
}
|
|
583
|
-
return metadata;
|
|
584
|
-
}
|
|
585
|
-
/**
|
|
586
|
-
* @internal
|
|
587
|
-
*/
|
|
588
|
-
function hasInterfaceDesignerItemMetadata(type) {
|
|
589
|
-
return Reflect.hasOwnMetadata(interfaceDesignerItemMetadataKey, type);
|
|
590
|
-
}
|
|
591
|
-
/**
|
|
592
|
-
* @internal
|
|
593
|
-
*/
|
|
594
|
-
function setRequestHandlerMetadata(metadata, type) {
|
|
595
|
-
Reflect.defineMetadata(requestHandlerMetadataKey, metadata, type);
|
|
596
683
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
if (!metadata) {
|
|
603
|
-
throw new Error(`Request handler metadata was not found on '${type.name}' class`);
|
|
684
|
+
|
|
685
|
+
class ArgumentOutOfRangeException extends Error {
|
|
686
|
+
// region Constructors: Public
|
|
687
|
+
constructor(argumentName) {
|
|
688
|
+
super(`Argument with name '${argumentName}' is out of range.`);
|
|
604
689
|
}
|
|
605
|
-
return metadata;
|
|
606
690
|
}
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
if (!requestType) {
|
|
613
|
-
throw new Error(`requestType was not found on '${typeRef.name}' class`);
|
|
691
|
+
|
|
692
|
+
class ItemNotFoundException extends Error {
|
|
693
|
+
// region Constructors: Public
|
|
694
|
+
constructor(key) {
|
|
695
|
+
super(`Item with key '${key}' does not exist.`);
|
|
614
696
|
}
|
|
615
|
-
return { requestType, typeRef };
|
|
616
|
-
}
|
|
617
|
-
/**
|
|
618
|
-
* @internal
|
|
619
|
-
*/
|
|
620
|
-
function getCrtInputsMetadata(type) {
|
|
621
|
-
const keys = Reflect.getMetadataKeys(type);
|
|
622
|
-
const crtInputKeys = keys.filter((x) => x.startsWith(crtInputPrefix));
|
|
623
|
-
return Object.fromEntries(crtInputKeys.map((key) => {
|
|
624
|
-
const data = Reflect.getMetadata(key, type);
|
|
625
|
-
return [key.replace(crtInputPrefix, ''), data];
|
|
626
|
-
}));
|
|
627
|
-
}
|
|
628
|
-
/**
|
|
629
|
-
* @internal
|
|
630
|
-
*/
|
|
631
|
-
function getCrtOutputsMetadata(type) {
|
|
632
|
-
const keys = Reflect.getMetadataKeys(type);
|
|
633
|
-
const crtOutputKeys = keys.filter((x) => x.startsWith(crtOutputPrefix));
|
|
634
|
-
return Object.fromEntries(crtOutputKeys.map((key) => {
|
|
635
|
-
const data = Reflect.getMetadata(key, type);
|
|
636
|
-
return [key.replace(crtOutputPrefix, ''), data];
|
|
637
|
-
}));
|
|
638
|
-
}
|
|
639
|
-
/**
|
|
640
|
-
* @internal
|
|
641
|
-
*/
|
|
642
|
-
function getCrtValidationInputsMetadata(type) {
|
|
643
|
-
const keys = Reflect.getMetadataKeys(type);
|
|
644
|
-
const crtValidationInputKeys = keys.filter((x) => x.startsWith(crtValidationInputPrefix));
|
|
645
|
-
return Object.fromEntries(crtValidationInputKeys.map((key) => {
|
|
646
|
-
const data = Reflect.getMetadata(key, type);
|
|
647
|
-
return [key.replace(crtValidationInputPrefix, ''), data];
|
|
648
|
-
}));
|
|
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
697
|
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
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.");
|
|
698
|
+
|
|
699
|
+
class ValidationUtilities {
|
|
700
|
+
// region Methods: Public
|
|
701
|
+
static checkArgumentEmpty(argumentName, argumentValue) {
|
|
702
|
+
if (argumentValue === undefined || argumentValue === null) {
|
|
703
|
+
throw new ArgumentEmptyException(argumentName);
|
|
679
704
|
}
|
|
680
|
-
const parentType = getParentType(type);
|
|
681
|
-
return parentType && parentType !== Object ? getTypeDependencies(parentType) : [];
|
|
682
705
|
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
/**
|
|
689
|
-
* @public
|
|
690
|
-
*/
|
|
691
|
-
class CrtInputRegistrationConfig {
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
/**
|
|
695
|
-
* @public
|
|
696
|
-
* @class BaseRequest
|
|
697
|
-
* @describe Base definition of request.
|
|
698
|
-
* @template TEvent
|
|
699
|
-
*/
|
|
700
|
-
class BaseRequest {
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* @public
|
|
705
|
-
* @class DataRequest
|
|
706
|
-
* @description Definition of data source request.
|
|
707
|
-
* @extends {BaseRequest} {@link BaseRequest}
|
|
708
|
-
* @property {string} dataSourceName - name of assigned data source.
|
|
709
|
-
*/
|
|
710
|
-
class DataRequest extends BaseRequest {
|
|
711
|
-
}
|
|
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;
|
|
706
|
+
static checkArrayEmpty(argumentName, argumentValue) {
|
|
707
|
+
ValidationUtilities.checkArgumentEmpty(argumentName, argumentValue);
|
|
708
|
+
if (argumentValue.length === 0) {
|
|
709
|
+
throw new ArgumentEmptyException(argumentName);
|
|
710
|
+
}
|
|
733
711
|
}
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
712
|
+
static checkStringIsNotEmpty(argumentName, argumentValue) {
|
|
713
|
+
this.checkArgumentEmpty(argumentName, argumentValue);
|
|
714
|
+
if (argumentValue === '') {
|
|
715
|
+
throw new ArgumentEmptyException(argumentName);
|
|
716
|
+
}
|
|
717
|
+
return argumentValue;
|
|
739
718
|
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
719
|
+
static checkArgumentOutOfRange(argumentName, argumentValue, range) {
|
|
720
|
+
if (range.begin && argumentValue < range.begin) {
|
|
721
|
+
throw new ArgumentOutOfRangeException(argumentName);
|
|
722
|
+
}
|
|
723
|
+
if (range.end && argumentValue > range.end) {
|
|
724
|
+
throw new ArgumentOutOfRangeException(argumentName);
|
|
725
|
+
}
|
|
746
726
|
}
|
|
747
727
|
}
|
|
748
|
-
/**
|
|
749
|
-
* @internal
|
|
750
|
-
* @dontChange
|
|
751
|
-
*/
|
|
752
|
-
BaseValidator._instanceOfKey = 'devkit_BaseValidator';
|
|
753
728
|
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
729
|
+
class FilterGroup extends BaseFilter {
|
|
730
|
+
constructor(logicalOperation = LogicalOperatorType.And) {
|
|
731
|
+
super(FilterType.FilterGroup);
|
|
732
|
+
this.filters = new Map();
|
|
733
|
+
this.logicalOperation = logicalOperation;
|
|
734
|
+
}
|
|
735
|
+
get items() {
|
|
736
|
+
return classToPlain(this.filters, {
|
|
737
|
+
exposeUnsetFields: false,
|
|
738
|
+
excludePrefixes: ['_'],
|
|
739
|
+
});
|
|
760
740
|
}
|
|
761
741
|
/**
|
|
762
|
-
*
|
|
742
|
+
* Returns filter item by index.
|
|
743
|
+
* @param index Item index.
|
|
744
|
+
* @returns Filter.
|
|
763
745
|
*/
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
return ((_a = instance === null || instance === void 0 ? void 0 : instance.constructor) === null || _a === void 0 ? void 0 : _a['_instanceOfKey']) === LocalizableValue._instanceOfKey;
|
|
746
|
+
getItemByIndex(index) {
|
|
747
|
+
return this.items[Object.keys(this.items)[index]];
|
|
767
748
|
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
LocalizableValue._instanceOfKey = 'devkit_LocalizableValue';
|
|
774
|
-
|
|
775
|
-
/**
|
|
776
|
-
* @internal
|
|
777
|
-
*/
|
|
778
|
-
function applyLocalizeMetadataFn(obj, localizeMetadata) {
|
|
779
|
-
const localizableEntries = objectDeepKeys(obj)
|
|
780
|
-
.map((path) => ({ path, value: get(obj, path) }))
|
|
781
|
-
.filter(({ value }) => value instanceof LocalizableValue);
|
|
782
|
-
if (localizableEntries.length === 0) {
|
|
783
|
-
return obj;
|
|
749
|
+
addSchemaColumnFilterWithParameter(comparisonType, columnPath, parameterValue) {
|
|
750
|
+
const leftExpression = new ColumnExpression({ columnPath });
|
|
751
|
+
const rightExpression = new ParameterExpression({ value: parameterValue });
|
|
752
|
+
const filter = new CompareFilter(comparisonType, leftExpression, rightExpression);
|
|
753
|
+
this.add(filter);
|
|
784
754
|
}
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
755
|
+
addSchemaColumnInFilterWithParameters(comparisonType, columnPath, parameterValues) {
|
|
756
|
+
const leftExpression = new ColumnExpression({ columnPath });
|
|
757
|
+
const expressions = parameterValues.map((singleParameterValue) => new ParameterExpression({
|
|
758
|
+
value: singleParameterValue,
|
|
759
|
+
}));
|
|
760
|
+
const filter = new InFilter(comparisonType, leftExpression, expressions);
|
|
761
|
+
this.add(filter);
|
|
788
762
|
}
|
|
789
|
-
|
|
763
|
+
addSchemaColumnIsNullFilter(columnPath) {
|
|
764
|
+
const leftExpression = new ColumnExpression({ columnPath });
|
|
765
|
+
const filter = new IsNullFilter(ComparisonType.Is_null, leftExpression);
|
|
766
|
+
this.add(filter);
|
|
767
|
+
}
|
|
768
|
+
addSchemaColumnIsNotNullFilter(columnPath) {
|
|
769
|
+
const leftExpression = new ColumnExpression({ columnPath });
|
|
770
|
+
const filter = new IsNullFilter(ComparisonType.Is_not_null, leftExpression);
|
|
771
|
+
this.add(filter);
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* Creates and adds filter between less value and greater value.
|
|
775
|
+
* @param columnPath Column path.
|
|
776
|
+
* @param lessParamValue Less parameter value.
|
|
777
|
+
* @param greaterParamValue Greater parameter value.
|
|
778
|
+
*/
|
|
779
|
+
addSchemaColumnBetweenFilterWithParameters(columnPath, lessParamValue, greaterParamValue) {
|
|
780
|
+
const leftExpression = new ColumnExpression({ columnPath });
|
|
781
|
+
const rightLessExpression = new ParameterExpression({ value: lessParamValue });
|
|
782
|
+
const rightGreaterExpression = new ParameterExpression({ value: greaterParamValue });
|
|
783
|
+
const filter = new BetweenFilter(leftExpression, rightLessExpression, rightGreaterExpression);
|
|
784
|
+
this.add(filter);
|
|
785
|
+
}
|
|
786
|
+
addExistsFilter(columnPath, subFilters) {
|
|
787
|
+
const leftExpression = new ColumnExpression({ columnPath });
|
|
788
|
+
const filter = new ExistsFilter(leftExpression, subFilters);
|
|
789
|
+
this.add(filter);
|
|
790
|
+
}
|
|
791
|
+
addNotExistsFilter(columnPath, subFilters) {
|
|
792
|
+
const leftExpression = new ColumnExpression({ columnPath });
|
|
793
|
+
const filter = new ExistsFilter(leftExpression, subFilters, ComparisonType.Not_exists);
|
|
794
|
+
this.add(filter);
|
|
795
|
+
}
|
|
796
|
+
add(filter, filterKey) {
|
|
797
|
+
ValidationUtilities.checkArgumentEmpty('filter', filter);
|
|
798
|
+
const key = filterKey || generateGuid();
|
|
799
|
+
this.filters.set(key, filter);
|
|
800
|
+
}
|
|
801
|
+
clone() {
|
|
802
|
+
const filterGroup = new FilterGroup(this.logicalOperation);
|
|
803
|
+
this.filters.forEach((filter, filterKey) => {
|
|
804
|
+
filterGroup.filters.set(filterKey, filter.clone());
|
|
805
|
+
});
|
|
806
|
+
return filterGroup;
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
__decorate([
|
|
810
|
+
Exclude(),
|
|
811
|
+
__metadata("design:type", Object)
|
|
812
|
+
], FilterGroup.prototype, "filters", void 0);
|
|
813
|
+
__decorate([
|
|
814
|
+
Expose(),
|
|
815
|
+
__metadata("design:type", Object),
|
|
816
|
+
__metadata("design:paramtypes", [])
|
|
817
|
+
], FilterGroup.prototype, "items", null);
|
|
818
|
+
|
|
819
|
+
class BaseQueryColumn {
|
|
820
|
+
constructor(expression) {
|
|
821
|
+
this.orderDirection = OrderDirection.None;
|
|
822
|
+
this.orderPosition = -1;
|
|
823
|
+
this.isVisible = true;
|
|
824
|
+
this.expression = expression;
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Adds ordering options.
|
|
828
|
+
* @param orderDirection Direction.
|
|
829
|
+
* @param orderPosition Position.
|
|
830
|
+
* @returns Self.
|
|
831
|
+
*/
|
|
832
|
+
withOrdering(orderDirection, orderPosition) {
|
|
833
|
+
ValidationUtilities.checkArgumentEmpty('orderDirection', orderDirection);
|
|
834
|
+
ValidationUtilities.checkArgumentEmpty('orderPosition', orderPosition);
|
|
835
|
+
ValidationUtilities.checkArgumentOutOfRange('orderPosition', orderPosition, { begin: -1 });
|
|
836
|
+
this.orderDirection = orderDirection;
|
|
837
|
+
this.orderPosition = orderPosition;
|
|
838
|
+
return this;
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* Adds options.
|
|
842
|
+
* @param options Options.
|
|
843
|
+
* @returns Self.
|
|
844
|
+
*/
|
|
845
|
+
withOptions(options) {
|
|
790
846
|
var _a;
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
847
|
+
ValidationUtilities.checkArgumentEmpty('options', options);
|
|
848
|
+
this.isVisible = (_a = options.isVisible) !== null && _a !== void 0 ? _a : true;
|
|
849
|
+
return this;
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Adds caption.
|
|
853
|
+
* @param caption Caption.
|
|
854
|
+
* @returns Self.
|
|
855
|
+
*/
|
|
856
|
+
withCaption(caption) {
|
|
857
|
+
ValidationUtilities.checkArgumentEmpty('caption', caption);
|
|
858
|
+
this.caption = caption;
|
|
859
|
+
return this;
|
|
860
|
+
}
|
|
795
861
|
}
|
|
796
862
|
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
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);
|
|
863
|
+
class ArithmeticQueryColumn extends BaseQueryColumn {
|
|
864
|
+
// region Constructors: Public
|
|
865
|
+
constructor(arithmeticOperation, leftArithmeticOperand, rightArithmeticOperand) {
|
|
866
|
+
super(new ArithmeticExpression({ arithmeticOperation, leftArithmeticOperand, rightArithmeticOperand }));
|
|
809
867
|
}
|
|
810
|
-
return new type();
|
|
811
868
|
}
|
|
812
869
|
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
ViewElementGroupType["Components"] = "Components";
|
|
820
|
-
ViewElementGroupType["LayoutElements"] = "LayoutElements";
|
|
821
|
-
ViewElementGroupType["Inputs"] = "Inputs";
|
|
822
|
-
ViewElementGroupType["CustomElements"] = "CustomElements";
|
|
823
|
-
})(ViewElementGroupType || (ViewElementGroupType = {}));
|
|
870
|
+
class EntityQueryColumn extends BaseQueryColumn {
|
|
871
|
+
// region Constructors: Public
|
|
872
|
+
constructor(columnPath) {
|
|
873
|
+
super(new ColumnExpression({ columnPath }));
|
|
874
|
+
}
|
|
875
|
+
}
|
|
824
876
|
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
})(ViewElementDataGroupType || (ViewElementDataGroupType = {}));
|
|
832
|
-
/**
|
|
833
|
-
* @internal
|
|
834
|
-
*/
|
|
835
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
836
|
-
const DesignerToolGroupType = Object.assign(Object.assign({}, ViewElementDataGroupType), ViewElementGroupType);
|
|
877
|
+
class ParameterQueryColumn extends BaseQueryColumn {
|
|
878
|
+
// region Constructors: Public
|
|
879
|
+
constructor(value, dataValueType) {
|
|
880
|
+
super(new ParameterExpression({ value, dataValueType }));
|
|
881
|
+
}
|
|
882
|
+
}
|
|
837
883
|
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
884
|
+
class AggregationSubQueryColumn extends BaseQueryColumn {
|
|
885
|
+
// region Constructors: Public
|
|
886
|
+
constructor(columnPath, aggregationType, subFilters, subOrderDirection, subOrderColumn) {
|
|
887
|
+
super(new AggregationSubQueryExpression({
|
|
888
|
+
aggregationType,
|
|
889
|
+
columnPath,
|
|
890
|
+
subFilters,
|
|
891
|
+
subOrderDirection,
|
|
892
|
+
subOrderColumn,
|
|
893
|
+
}));
|
|
894
|
+
}
|
|
895
|
+
}
|
|
846
896
|
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
ModelInPageAction["Add"] = "add";
|
|
854
|
-
ModelInPageAction["Copy"] = "copy";
|
|
855
|
-
})(ModelInPageAction || (ModelInPageAction = {}));
|
|
897
|
+
class SubQueryColumn extends BaseQueryColumn {
|
|
898
|
+
// region Constructors: Public
|
|
899
|
+
constructor(columnPath, subFilters) {
|
|
900
|
+
super(new SubQueryExpression({ columnPath, subFilters }));
|
|
901
|
+
}
|
|
902
|
+
}
|
|
856
903
|
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
}
|
|
904
|
+
class AggregationFunctionColumn extends BaseQueryColumn {
|
|
905
|
+
// region Constructors: Public
|
|
906
|
+
constructor(aggregationType, aggregationEvalType, functionArgument) {
|
|
907
|
+
super(new AggregationFunctionExpression({
|
|
908
|
+
aggregationType,
|
|
909
|
+
aggregationEvalType,
|
|
910
|
+
functionArgument,
|
|
911
|
+
}));
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
class DatePartFunctionColumn extends BaseQueryColumn {
|
|
916
|
+
// region Constructors: Public
|
|
917
|
+
constructor(datePartType, functionArgument) {
|
|
918
|
+
super(new DatePartFunctionExpression({
|
|
919
|
+
datePartType,
|
|
920
|
+
functionArgument,
|
|
921
|
+
}));
|
|
922
|
+
}
|
|
923
|
+
// endregion
|
|
924
|
+
// region Properties: Public
|
|
925
|
+
get datePartType() {
|
|
926
|
+
var _a;
|
|
927
|
+
return (_a = this.expression) === null || _a === void 0 ? void 0 : _a.datePartType;
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
class LengthFunctionColumn extends BaseQueryColumn {
|
|
932
|
+
// region Constructors: Public
|
|
933
|
+
constructor(functionArgument) {
|
|
934
|
+
super(new LengthFunctionExpression({ functionArgument }));
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
class MacrosFunctionColumn extends BaseQueryColumn {
|
|
939
|
+
// region Constructors: Public
|
|
940
|
+
constructor(macrosType) {
|
|
941
|
+
super(new MacrosFunctionExpression({ macrosType }));
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
class WindowFunctionColumn extends BaseQueryColumn {
|
|
946
|
+
// region Constructors: Public
|
|
947
|
+
constructor(functionArgument) {
|
|
948
|
+
super(new WindowFunctionExpression({ functionArgument }));
|
|
949
|
+
}
|
|
950
|
+
}
|
|
867
951
|
|
|
868
952
|
/**
|
|
869
953
|
* @internal
|
|
870
954
|
*/
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
955
|
+
function toAggregationType(aggregationFunction) {
|
|
956
|
+
switch (aggregationFunction) {
|
|
957
|
+
case AggregationFunction.Count:
|
|
958
|
+
return AggregationType.Count;
|
|
959
|
+
case AggregationFunction.Sum:
|
|
960
|
+
return AggregationType.Sum;
|
|
961
|
+
case AggregationFunction.Avg:
|
|
962
|
+
return AggregationType.Avg;
|
|
963
|
+
case AggregationFunction.Min:
|
|
964
|
+
return AggregationType.Min;
|
|
965
|
+
case AggregationFunction.Max:
|
|
966
|
+
return AggregationType.Max;
|
|
967
|
+
case AggregationFunction.TopOne:
|
|
968
|
+
return AggregationType.TopOne;
|
|
969
|
+
default:
|
|
970
|
+
return AggregationType.None;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
879
973
|
/**
|
|
880
974
|
* @internal
|
|
881
975
|
*/
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
976
|
+
function toAggregationFunction(aggregationType) {
|
|
977
|
+
switch (aggregationType) {
|
|
978
|
+
case AggregationType.Count:
|
|
979
|
+
return AggregationFunction.Count;
|
|
980
|
+
case AggregationType.Sum:
|
|
981
|
+
return AggregationFunction.Sum;
|
|
982
|
+
case AggregationType.Avg:
|
|
983
|
+
return AggregationFunction.Avg;
|
|
984
|
+
case AggregationType.Min:
|
|
985
|
+
return AggregationFunction.Min;
|
|
986
|
+
case AggregationType.Max:
|
|
987
|
+
return AggregationFunction.Max;
|
|
988
|
+
case AggregationType.TopOne:
|
|
989
|
+
return AggregationFunction.TopOne;
|
|
990
|
+
default:
|
|
991
|
+
return AggregationFunction.None;
|
|
992
|
+
}
|
|
993
|
+
}
|
|
889
994
|
/**
|
|
890
995
|
* @internal
|
|
891
996
|
*/
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
997
|
+
function toAggregationEvalType(aggregationEval) {
|
|
998
|
+
switch (aggregationEval) {
|
|
999
|
+
case 'all':
|
|
1000
|
+
return AggregationEvalType.All;
|
|
1001
|
+
case 'distinct':
|
|
1002
|
+
return AggregationEvalType.Distinct;
|
|
1003
|
+
default:
|
|
1004
|
+
return AggregationEvalType.None;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
901
1007
|
/**
|
|
902
1008
|
* @internal
|
|
903
1009
|
*/
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
if (!handler.scopes) {
|
|
913
|
-
return Number.MAX_VALUE;
|
|
914
|
-
}
|
|
915
|
-
const scopesOrder = handler.scopes.filter((s) => s in this._scopesOrder).map((s) => this._scopesOrder[s]);
|
|
916
|
-
return Math.min(...scopesOrder);
|
|
917
|
-
}
|
|
918
|
-
_getOrderByPkgTopology(handler) {
|
|
919
|
-
if (handler.source.type === HandlerSourceType.Host) {
|
|
920
|
-
return Number.MAX_VALUE;
|
|
921
|
-
}
|
|
922
|
-
return PkgTopology.get(handler.source.packageName);
|
|
923
|
-
}
|
|
924
|
-
compare(a, b) {
|
|
925
|
-
const aScopeOrder = this._getOrderByScopes(a);
|
|
926
|
-
const bScopeOrder = this._getOrderByScopes(b);
|
|
927
|
-
let diff = aScopeOrder - bScopeOrder;
|
|
928
|
-
if (diff) {
|
|
929
|
-
return diff;
|
|
930
|
-
}
|
|
931
|
-
const aPkgTopologyOrder = this._getOrderByPkgTopology(a);
|
|
932
|
-
const bPkgTopologyOrder = this._getOrderByPkgTopology(b);
|
|
933
|
-
diff = aPkgTopologyOrder - bPkgTopologyOrder;
|
|
934
|
-
if (diff) {
|
|
935
|
-
return diff;
|
|
936
|
-
}
|
|
937
|
-
diff = a.source.type - b.source.type;
|
|
938
|
-
return diff;
|
|
1010
|
+
function toAggregationEval(aggregationEvalType) {
|
|
1011
|
+
switch (aggregationEvalType) {
|
|
1012
|
+
case AggregationEvalType.All:
|
|
1013
|
+
return 'all';
|
|
1014
|
+
case AggregationEvalType.Distinct:
|
|
1015
|
+
return 'distinct';
|
|
1016
|
+
default:
|
|
1017
|
+
return 'none';
|
|
939
1018
|
}
|
|
940
1019
|
}
|
|
941
1020
|
|
|
942
1021
|
/**
|
|
943
1022
|
* @internal
|
|
944
1023
|
*/
|
|
945
|
-
function
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
1024
|
+
function toDatePartType(aggregationFunction) {
|
|
1025
|
+
switch (aggregationFunction) {
|
|
1026
|
+
case 'minute':
|
|
1027
|
+
return DatePartType.HourMinute;
|
|
1028
|
+
case 'hour':
|
|
1029
|
+
return DatePartType.Hour;
|
|
1030
|
+
case 'day':
|
|
1031
|
+
return DatePartType.Day;
|
|
1032
|
+
case 'weekday':
|
|
1033
|
+
return DatePartType.WeekDay;
|
|
1034
|
+
case 'week':
|
|
1035
|
+
return DatePartType.Week;
|
|
1036
|
+
case 'month':
|
|
1037
|
+
return DatePartType.Month;
|
|
1038
|
+
case 'year':
|
|
1039
|
+
return DatePartType.Year;
|
|
1040
|
+
default:
|
|
1041
|
+
return DatePartType.None;
|
|
950
1042
|
}
|
|
951
|
-
return !!((_a = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.inputs[componentProperty]) === null || _a === void 0 ? void 0 : _a.propertyBindable);
|
|
952
1043
|
}
|
|
953
|
-
|
|
954
1044
|
/**
|
|
955
1045
|
* @internal
|
|
956
1046
|
*/
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1047
|
+
function toDatePart(aggregationType) {
|
|
1048
|
+
switch (aggregationType) {
|
|
1049
|
+
case DatePartType.HourMinute:
|
|
1050
|
+
return 'minute';
|
|
1051
|
+
case DatePartType.Hour:
|
|
1052
|
+
return 'hour';
|
|
1053
|
+
case DatePartType.Day:
|
|
1054
|
+
return 'day';
|
|
1055
|
+
case DatePartType.WeekDay:
|
|
1056
|
+
return 'weekday';
|
|
1057
|
+
case DatePartType.Week:
|
|
1058
|
+
return 'week';
|
|
1059
|
+
case DatePartType.Month:
|
|
1060
|
+
return 'month';
|
|
1061
|
+
case DatePartType.Year:
|
|
1062
|
+
return 'year';
|
|
1063
|
+
default:
|
|
1064
|
+
return 'none';
|
|
1065
|
+
}
|
|
971
1066
|
}
|
|
972
1067
|
|
|
973
1068
|
/**
|
|
974
|
-
* @
|
|
975
|
-
* @description CrtModule decorator is a 'container' where user actually setup elements.
|
|
976
|
-
* In could contain viewElements, definitions of other CrtModules.
|
|
977
|
-
* @param moduleDefinition - {@link ModuleDefinition}
|
|
978
|
-
*
|
|
979
|
-
* @example
|
|
980
|
-
* @CrtModule({
|
|
981
|
-
* viewElements: [AppComponent],
|
|
982
|
-
* requestHandlers: [SomeRequestHandler],
|
|
983
|
-
* validators: [SomeValidator],
|
|
984
|
-
* })
|
|
985
|
-
* @NgModule({
|
|
986
|
-
* declarations: [AppComponent],
|
|
987
|
-
* imports: [BrowserModule],
|
|
988
|
-
* providers: [],
|
|
989
|
-
* })
|
|
990
|
-
* export class AppModule {}
|
|
1069
|
+
* @internal
|
|
991
1070
|
*/
|
|
992
|
-
function
|
|
993
|
-
|
|
1071
|
+
function toStringFunctionType(functionType) {
|
|
1072
|
+
switch (functionType) {
|
|
1073
|
+
case FunctionType.Aggregation:
|
|
1074
|
+
return 'aggregation';
|
|
1075
|
+
case FunctionType.DatePart:
|
|
1076
|
+
return 'datePart';
|
|
1077
|
+
default:
|
|
1078
|
+
return 'none';
|
|
1079
|
+
}
|
|
994
1080
|
}
|
|
995
|
-
|
|
996
|
-
// noinspection ES6PreferShortImport
|
|
997
1081
|
/**
|
|
998
1082
|
* @internal
|
|
999
1083
|
*/
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
}
|
|
1084
|
+
function toNumericFunctionType(functionType) {
|
|
1085
|
+
switch (functionType) {
|
|
1086
|
+
case 'aggregation':
|
|
1087
|
+
return FunctionType.Aggregation;
|
|
1088
|
+
case 'datePart':
|
|
1089
|
+
return FunctionType.DatePart;
|
|
1090
|
+
default:
|
|
1091
|
+
return FunctionType.None;
|
|
1009
1092
|
}
|
|
1010
|
-
return function (type) {
|
|
1011
|
-
var _a;
|
|
1012
|
-
config.typeRef = type;
|
|
1013
|
-
(_a = config.viewElementGroupType) !== null && _a !== void 0 ? _a : (config.viewElementGroupType = ViewElementGroupType.CustomElements);
|
|
1014
|
-
_applyTypeCaption();
|
|
1015
|
-
setInterfaceDesignerItemMetadata(config, type);
|
|
1016
|
-
};
|
|
1017
1093
|
}
|
|
1018
1094
|
|
|
1019
1095
|
/**
|
|
1020
|
-
* @
|
|
1021
|
-
* @description
|
|
1022
|
-
* Constructor parameter decorator.
|
|
1023
|
-
* Mark parameter as dependency that should be obtained by token.
|
|
1024
|
-
* @param token - token by which the dependency instance will be obtained
|
|
1025
|
-
* @example
|
|
1026
|
-
* class MyHandler {
|
|
1027
|
-
* constructor(@CrtInject(USER_NAME_TOKEN) userName: string) {}
|
|
1028
|
-
* }
|
|
1096
|
+
* @internal
|
|
1029
1097
|
*/
|
|
1030
|
-
function
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1098
|
+
function toOrderDirection(sortDirection) {
|
|
1099
|
+
switch (sortDirection) {
|
|
1100
|
+
case 'asc':
|
|
1101
|
+
return OrderDirection.Asc;
|
|
1102
|
+
case 'desc':
|
|
1103
|
+
return OrderDirection.Desc;
|
|
1104
|
+
default:
|
|
1105
|
+
return OrderDirection.None;
|
|
1106
|
+
}
|
|
1034
1107
|
}
|
|
1035
|
-
|
|
1036
1108
|
/**
|
|
1037
1109
|
* @internal
|
|
1038
1110
|
*/
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
};
|
|
1111
|
+
function toSortDirection(orderDirection) {
|
|
1112
|
+
switch (orderDirection) {
|
|
1113
|
+
case OrderDirection.Asc:
|
|
1114
|
+
return 'asc';
|
|
1115
|
+
case OrderDirection.Desc:
|
|
1116
|
+
return 'desc';
|
|
1117
|
+
default:
|
|
1118
|
+
return 'none';
|
|
1119
|
+
}
|
|
1049
1120
|
}
|
|
1050
1121
|
|
|
1122
|
+
/**
|
|
1123
|
+
* @internal
|
|
1124
|
+
*/
|
|
1125
|
+
const crtInputPrefix = 'crtInput:';
|
|
1126
|
+
/**
|
|
1127
|
+
* @internal
|
|
1128
|
+
*/
|
|
1129
|
+
const crtOutputPrefix = 'crtOutput:';
|
|
1130
|
+
/**
|
|
1131
|
+
* @internal
|
|
1132
|
+
*/
|
|
1133
|
+
const crtValidationInputPrefix = 'crtValidationInput:';
|
|
1134
|
+
/**
|
|
1135
|
+
* @internal
|
|
1136
|
+
*/
|
|
1137
|
+
const crtInjectPrefix = 'crtInject:';
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* @internal
|
|
1141
|
+
*/
|
|
1142
|
+
var ViewElementGroupType;
|
|
1143
|
+
(function (ViewElementGroupType) {
|
|
1144
|
+
ViewElementGroupType["Charts"] = "Charts";
|
|
1145
|
+
ViewElementGroupType["Components"] = "Components";
|
|
1146
|
+
ViewElementGroupType["LayoutElements"] = "LayoutElements";
|
|
1147
|
+
ViewElementGroupType["Inputs"] = "Inputs";
|
|
1148
|
+
ViewElementGroupType["CustomElements"] = "CustomElements";
|
|
1149
|
+
})(ViewElementGroupType || (ViewElementGroupType = {}));
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* @internal
|
|
1153
|
+
*/
|
|
1154
|
+
var ViewElementDataGroupType;
|
|
1155
|
+
(function (ViewElementDataGroupType) {
|
|
1156
|
+
ViewElementDataGroupType["Data"] = "Data";
|
|
1157
|
+
})(ViewElementDataGroupType || (ViewElementDataGroupType = {}));
|
|
1051
1158
|
/**
|
|
1052
1159
|
* @internal
|
|
1053
1160
|
*/
|
|
1054
1161
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1055
|
-
|
|
1056
|
-
if (!config) {
|
|
1057
|
-
return (type) => { };
|
|
1058
|
-
}
|
|
1059
|
-
return function (type) {
|
|
1060
|
-
checkTypeNameFormat(config.type, 'RequestHandlerTypeName');
|
|
1061
|
-
checkCrtTypeNamePascalCase(config.type);
|
|
1062
|
-
setRequestHandlerMetadata(config, type);
|
|
1063
|
-
};
|
|
1064
|
-
}
|
|
1162
|
+
const DesignerToolGroupType = Object.assign(Object.assign({}, ViewElementDataGroupType), ViewElementGroupType);
|
|
1065
1163
|
|
|
1066
1164
|
/**
|
|
1067
1165
|
* @internal
|
|
1068
1166
|
*/
|
|
1069
|
-
|
|
1167
|
+
var DataSourceScope;
|
|
1168
|
+
(function (DataSourceScope) {
|
|
1169
|
+
DataSourceScope["ViewElement"] = "viewElement";
|
|
1170
|
+
DataSourceScope["Page"] = "page";
|
|
1171
|
+
})(DataSourceScope || (DataSourceScope = {}));
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* @internal
|
|
1175
|
+
*/
|
|
1176
|
+
var ModelInPageAction;
|
|
1177
|
+
(function (ModelInPageAction) {
|
|
1178
|
+
ModelInPageAction["Edit"] = "edit";
|
|
1179
|
+
ModelInPageAction["Add"] = "add";
|
|
1180
|
+
ModelInPageAction["Copy"] = "copy";
|
|
1181
|
+
})(ModelInPageAction || (ModelInPageAction = {}));
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* Handler source types in order of call priority.
|
|
1185
|
+
* @internal
|
|
1186
|
+
*/
|
|
1187
|
+
var HandlerSourceType;
|
|
1188
|
+
(function (HandlerSourceType) {
|
|
1189
|
+
HandlerSourceType[HandlerSourceType["Schema"] = 0] = "Schema";
|
|
1190
|
+
HandlerSourceType[HandlerSourceType["Remote"] = 1] = "Remote";
|
|
1191
|
+
HandlerSourceType[HandlerSourceType["Host"] = 2] = "Host";
|
|
1192
|
+
})(HandlerSourceType || (HandlerSourceType = {}));
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* @internal
|
|
1196
|
+
*/
|
|
1197
|
+
var DataSchemaAttributeType;
|
|
1198
|
+
(function (DataSchemaAttributeType) {
|
|
1199
|
+
DataSchemaAttributeType["OwnAttribute"] = "Own";
|
|
1200
|
+
DataSchemaAttributeType["ForwardReferenceAttribute"] = "ForwardReference";
|
|
1201
|
+
DataSchemaAttributeType["BackReferenceAttribute"] = "BackReference";
|
|
1202
|
+
DataSchemaAttributeType["AggregationAttribute"] = "Aggregation";
|
|
1203
|
+
DataSchemaAttributeType["FunctionAttribute"] = "Function";
|
|
1204
|
+
})(DataSchemaAttributeType || (DataSchemaAttributeType = {}));
|
|
1205
|
+
/**
|
|
1206
|
+
* @internal
|
|
1207
|
+
*/
|
|
1208
|
+
var DataSchemaAttributeUsageType;
|
|
1209
|
+
(function (DataSchemaAttributeUsageType) {
|
|
1210
|
+
DataSchemaAttributeUsageType[DataSchemaAttributeUsageType["General"] = 0] = "General";
|
|
1211
|
+
DataSchemaAttributeUsageType[DataSchemaAttributeUsageType["Advanced"] = 1] = "Advanced";
|
|
1212
|
+
DataSchemaAttributeUsageType[DataSchemaAttributeUsageType["None"] = 2] = "None";
|
|
1213
|
+
})(DataSchemaAttributeUsageType || (DataSchemaAttributeUsageType = {}));
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* Type of DataSchema. In combination with the name is used for unique identification of {@link DataSchema}.
|
|
1217
|
+
* @internal
|
|
1218
|
+
*/
|
|
1219
|
+
var DataSchemaType;
|
|
1220
|
+
(function (DataSchemaType) {
|
|
1221
|
+
DataSchemaType["Entity"] = "Entity";
|
|
1222
|
+
DataSchemaType["ClientUnit"] = "ClientUnit";
|
|
1223
|
+
})(DataSchemaType || (DataSchemaType = {}));
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
* @internal
|
|
1227
|
+
*/
|
|
1228
|
+
var DefaultValueSource;
|
|
1229
|
+
(function (DefaultValueSource) {
|
|
1230
|
+
DefaultValueSource[DefaultValueSource["None"] = 0] = "None";
|
|
1231
|
+
DefaultValueSource[DefaultValueSource["Const"] = 1] = "Const";
|
|
1232
|
+
DefaultValueSource[DefaultValueSource["Settings"] = 2] = "Settings";
|
|
1233
|
+
DefaultValueSource[DefaultValueSource["SystemValue"] = 3] = "SystemValue";
|
|
1234
|
+
DefaultValueSource[DefaultValueSource["Sequence"] = 4] = "Sequence";
|
|
1235
|
+
})(DefaultValueSource || (DefaultValueSource = {}));
|
|
1236
|
+
|
|
1237
|
+
const global$3 = window;
|
|
1238
|
+
/**
|
|
1239
|
+
* @internal
|
|
1240
|
+
*/
|
|
1241
|
+
class BaseRegistry {
|
|
1070
1242
|
constructor() {
|
|
1071
|
-
|
|
1243
|
+
this.store = {
|
|
1244
|
+
typeInfos: new Map(),
|
|
1245
|
+
};
|
|
1072
1246
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1247
|
+
static get store() {
|
|
1248
|
+
if (!this._instance) {
|
|
1249
|
+
let globalInstance = get(global$3, this._prefix + this.registryKey);
|
|
1250
|
+
if (!globalInstance) {
|
|
1251
|
+
globalInstance = new this();
|
|
1252
|
+
set(global$3, this._prefix + this.registryKey, globalInstance);
|
|
1253
|
+
}
|
|
1254
|
+
this._instance = globalInstance;
|
|
1255
|
+
}
|
|
1256
|
+
return this._instance.store;
|
|
1079
1257
|
}
|
|
1080
1258
|
}
|
|
1259
|
+
BaseRegistry._prefix = 'creatio.registry.';
|
|
1081
1260
|
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1261
|
+
/**
|
|
1262
|
+
* @internal
|
|
1263
|
+
*/
|
|
1264
|
+
class PkgTopology extends BaseRegistry {
|
|
1265
|
+
static get items() {
|
|
1266
|
+
return this.store.typeInfos;
|
|
1086
1267
|
}
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1268
|
+
static get(pkgName) {
|
|
1269
|
+
const order = this.items.get(pkgName);
|
|
1270
|
+
if (order === undefined) {
|
|
1271
|
+
throw new Error(`Package with name ${pkgName} not found in topology`);
|
|
1272
|
+
}
|
|
1273
|
+
return order;
|
|
1093
1274
|
}
|
|
1094
1275
|
}
|
|
1276
|
+
PkgTopology.registryKey = 'pkgTopology';
|
|
1095
1277
|
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1278
|
+
/**
|
|
1279
|
+
* @internal
|
|
1280
|
+
*/
|
|
1281
|
+
class HandlersOrderComparer {
|
|
1282
|
+
constructor(_request) {
|
|
1283
|
+
var _a;
|
|
1284
|
+
this._request = _request;
|
|
1285
|
+
const scopesOrderEntries = [...((_a = this._request.scopes) !== null && _a !== void 0 ? _a : [])].reverse().map((scope, index) => [scope, index]);
|
|
1286
|
+
this._scopesOrder = Object.fromEntries(scopesOrderEntries);
|
|
1102
1287
|
}
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
throw new ArgumentEmptyException(argumentName);
|
|
1288
|
+
_getOrderByScopes(handler) {
|
|
1289
|
+
if (!handler.scopes) {
|
|
1290
|
+
return Number.MAX_VALUE;
|
|
1107
1291
|
}
|
|
1292
|
+
const scopesOrder = handler.scopes.filter((s) => s in this._scopesOrder).map((s) => this._scopesOrder[s]);
|
|
1293
|
+
return Math.min(...scopesOrder);
|
|
1108
1294
|
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
throw new ArgumentEmptyException(argumentName);
|
|
1295
|
+
_getOrderByPkgTopology(handler) {
|
|
1296
|
+
if (handler.source.type === HandlerSourceType.Host) {
|
|
1297
|
+
return Number.MAX_VALUE;
|
|
1113
1298
|
}
|
|
1114
|
-
return
|
|
1299
|
+
return PkgTopology.get(handler.source.packageName);
|
|
1115
1300
|
}
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1301
|
+
compare(a, b) {
|
|
1302
|
+
const aScopeOrder = this._getOrderByScopes(a);
|
|
1303
|
+
const bScopeOrder = this._getOrderByScopes(b);
|
|
1304
|
+
let diff = aScopeOrder - bScopeOrder;
|
|
1305
|
+
if (diff) {
|
|
1306
|
+
return diff;
|
|
1119
1307
|
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1308
|
+
const aPkgTopologyOrder = this._getOrderByPkgTopology(a);
|
|
1309
|
+
const bPkgTopologyOrder = this._getOrderByPkgTopology(b);
|
|
1310
|
+
diff = aPkgTopologyOrder - bPkgTopologyOrder;
|
|
1311
|
+
if (diff) {
|
|
1312
|
+
return diff;
|
|
1122
1313
|
}
|
|
1314
|
+
diff = a.source.type - b.source.type;
|
|
1315
|
+
return diff;
|
|
1123
1316
|
}
|
|
1124
1317
|
}
|
|
1125
1318
|
|
|
@@ -1130,6 +1323,7 @@ class InternalHandlerChain {
|
|
|
1130
1323
|
constructor() {
|
|
1131
1324
|
this._handlers = [];
|
|
1132
1325
|
this._handlersCache = new Map();
|
|
1326
|
+
this._handlersScopesByContextId = new Map();
|
|
1133
1327
|
this.handlerChain$ = {
|
|
1134
1328
|
process: (request) => __awaiter(this, void 0, void 0, function* () {
|
|
1135
1329
|
const handler = this._getHandler(request);
|
|
@@ -1151,28 +1345,52 @@ class InternalHandlerChain {
|
|
|
1151
1345
|
},
|
|
1152
1346
|
};
|
|
1153
1347
|
}
|
|
1348
|
+
clearContextedHandlersCache(contextId) {
|
|
1349
|
+
var _a;
|
|
1350
|
+
const configs = (_a = this._handlersScopesByContextId.get(contextId)) !== null && _a !== void 0 ? _a : [];
|
|
1351
|
+
return configs.every(({ requestType, scope }) => { var _a; return (_a = this._handlersCache.get(requestType)) === null || _a === void 0 ? void 0 : _a.delete(scope); });
|
|
1352
|
+
}
|
|
1154
1353
|
_getHandler(request) {
|
|
1155
1354
|
return this._hasCacheHandler(request) ? this._getCacheHandler(request) : this._buildHandlersChain(request);
|
|
1156
1355
|
}
|
|
1157
1356
|
_getCacheHandler(request) {
|
|
1158
1357
|
const map = this._handlersCache.get(request.type);
|
|
1159
|
-
const key = this._getCacheScopesKey(request
|
|
1358
|
+
const key = this._getCacheScopesKey(request);
|
|
1160
1359
|
return map.get(key);
|
|
1161
1360
|
}
|
|
1162
1361
|
_hasCacheHandler(request) {
|
|
1163
1362
|
const map = this._handlersCache.get(request.type);
|
|
1164
|
-
const key = this._getCacheScopesKey(request
|
|
1363
|
+
const key = this._getCacheScopesKey(request);
|
|
1165
1364
|
return map && map.has(key);
|
|
1166
1365
|
}
|
|
1167
|
-
_getCacheScopesKey(
|
|
1168
|
-
|
|
1366
|
+
_getCacheScopesKey(request) {
|
|
1367
|
+
var _a, _b;
|
|
1368
|
+
const injectionContextKey = (_b = (_a = this._getInjectionContext(request === null || request === void 0 ? void 0 : request.$context)) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : '';
|
|
1369
|
+
return (request.scopes || ['']).join('_').concat(injectionContextKey);
|
|
1370
|
+
}
|
|
1371
|
+
_getInjectionContext(viewModel) {
|
|
1372
|
+
return ((viewModel === null || viewModel === void 0 ? void 0 : viewModel['_injectionContext']) ||
|
|
1373
|
+
((viewModel === null || viewModel === void 0 ? void 0 : viewModel['parent']) && this._getInjectionContext(viewModel['parent'])));
|
|
1374
|
+
}
|
|
1375
|
+
_setContextedScopes(request, scope) {
|
|
1376
|
+
var _a;
|
|
1377
|
+
const injectionContext = (_a = this._getInjectionContext(request === null || request === void 0 ? void 0 : request.$context)) === null || _a === void 0 ? void 0 : _a.id;
|
|
1378
|
+
const configs = this._handlersScopesByContextId.has(injectionContext)
|
|
1379
|
+
? this._handlersScopesByContextId.get(injectionContext)
|
|
1380
|
+
: [];
|
|
1381
|
+
configs.push({ requestType: request.type, scope });
|
|
1382
|
+
this._handlersScopesByContextId.set(injectionContext, configs);
|
|
1169
1383
|
}
|
|
1170
1384
|
_setCacheHandler(request, handler) {
|
|
1385
|
+
var _a;
|
|
1171
1386
|
const map = this._handlersCache.has(request.type)
|
|
1172
1387
|
? this._handlersCache.get(request.type)
|
|
1173
1388
|
: new Map();
|
|
1174
|
-
const key = this._getCacheScopesKey(request
|
|
1389
|
+
const key = this._getCacheScopesKey(request);
|
|
1175
1390
|
map.set(key, handler);
|
|
1391
|
+
if ((_a = this._getInjectionContext(request === null || request === void 0 ? void 0 : request.$context)) === null || _a === void 0 ? void 0 : _a.id) {
|
|
1392
|
+
this._setContextedScopes(request, key);
|
|
1393
|
+
}
|
|
1176
1394
|
this._handlersCache.set(request.type, map);
|
|
1177
1395
|
}
|
|
1178
1396
|
_isRequestHandler(handler) {
|
|
@@ -1197,7 +1415,10 @@ class InternalHandlerChain {
|
|
|
1197
1415
|
});
|
|
1198
1416
|
const comparer = new HandlersOrderComparer(request);
|
|
1199
1417
|
handlers.sort((a, b) => comparer.compare(a, b));
|
|
1200
|
-
const handlerInstances = handlers.map((handlerConfig) =>
|
|
1418
|
+
const handlerInstances = handlers.map((handlerConfig) => {
|
|
1419
|
+
const injectionContext = this._getInjectionContext(request === null || request === void 0 ? void 0 : request.$context);
|
|
1420
|
+
return handlerConfig.createHandler(injectionContext);
|
|
1421
|
+
});
|
|
1201
1422
|
handlerInstances.forEach((handler) => this._checkHandlerInstanceOf(handler));
|
|
1202
1423
|
this._joinHandlersInChain(handlerInstances);
|
|
1203
1424
|
const result = handlerInstances[0];
|
|
@@ -1221,7 +1442,7 @@ class InternalHandlerChain {
|
|
|
1221
1442
|
}
|
|
1222
1443
|
}
|
|
1223
1444
|
|
|
1224
|
-
const global = window;
|
|
1445
|
+
const global$2 = window;
|
|
1225
1446
|
/**
|
|
1226
1447
|
* @public
|
|
1227
1448
|
* @class HandlerChainService
|
|
@@ -1234,10 +1455,10 @@ class HandlerChainService {
|
|
|
1234
1455
|
}
|
|
1235
1456
|
}
|
|
1236
1457
|
get _chain() {
|
|
1237
|
-
return global.handlerChain;
|
|
1458
|
+
return global$2.handlerChain;
|
|
1238
1459
|
}
|
|
1239
1460
|
set _chain(value) {
|
|
1240
|
-
global.handlerChain = value;
|
|
1461
|
+
global$2.handlerChain = value;
|
|
1241
1462
|
}
|
|
1242
1463
|
static get instance() {
|
|
1243
1464
|
return HandlerChainService._instance || (HandlerChainService._instance = new HandlerChainService());
|
|
@@ -1245,6 +1466,12 @@ class HandlerChainService {
|
|
|
1245
1466
|
_createGlobalHandlerChain() {
|
|
1246
1467
|
this._chain = new InternalHandlerChain();
|
|
1247
1468
|
}
|
|
1469
|
+
/**
|
|
1470
|
+
* @internal
|
|
1471
|
+
*/
|
|
1472
|
+
clearContextedHandlersCache(contextId) {
|
|
1473
|
+
return this._chain.clearContextedHandlersCache(contextId);
|
|
1474
|
+
}
|
|
1248
1475
|
/**
|
|
1249
1476
|
* @internal
|
|
1250
1477
|
*/
|
|
@@ -1287,868 +1514,743 @@ function ImplementUsingHandlerChain(config) {
|
|
|
1287
1514
|
/**
|
|
1288
1515
|
* @internal
|
|
1289
1516
|
*/
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1517
|
+
function objectDeepKeys(obj) {
|
|
1518
|
+
if (obj === null || typeof obj !== 'object') {
|
|
1519
|
+
return [];
|
|
1520
|
+
}
|
|
1521
|
+
return Object.keys(obj)
|
|
1522
|
+
.filter((key) => obj[key] instanceof Object)
|
|
1523
|
+
.map((key) => objectDeepKeys(obj[key]).map((k) => [key, ...k]))
|
|
1524
|
+
.reduce((x, y) => [...x, ...y], Object.keys(obj).map((x) => [x]));
|
|
1295
1525
|
}
|
|
1296
1526
|
|
|
1297
1527
|
/**
|
|
1298
1528
|
* @internal
|
|
1299
1529
|
*/
|
|
1300
|
-
function
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
}
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1530
|
+
function checkTypeNameFormat(type, element) {
|
|
1531
|
+
const typeParts = type.split('.');
|
|
1532
|
+
if (typeParts.length < 2) {
|
|
1533
|
+
throw new Error(`Error when register ${type}. Type property should have format "VendorPrefix.${element}"`);
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
/**
|
|
1537
|
+
* @internal
|
|
1538
|
+
*/
|
|
1539
|
+
function checkTypeNamePascalCase(type) {
|
|
1540
|
+
const [vendor, typeName] = type.split('.');
|
|
1541
|
+
const pascalTypeName = toPascalCase(typeName);
|
|
1542
|
+
if (!vendor || pascalTypeName !== typeName) {
|
|
1543
|
+
throw new Error(`Error when register ${type}. Type property should have Pascal case, e.g. ${vendor + '.' + pascalTypeName}. ` + 'The first letter of each word in a compound word should be capitalized');
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
/**
|
|
1547
|
+
* @internal
|
|
1548
|
+
*/
|
|
1549
|
+
function checkCrtTypeNamePascalCase(type) {
|
|
1550
|
+
const [vendor, typeName] = type.split('.');
|
|
1551
|
+
const pascalTypeName = toPascalCase(typeName);
|
|
1552
|
+
if (vendor.toLowerCase() === 'crt' && pascalTypeName !== typeName) {
|
|
1553
|
+
throw new Error(`Error when register ${type}. Type property should have Pascal case, e.g. ${vendor + '.' + pascalTypeName}. ` + 'The first letter of each word in a compound word should be capitalized');
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
/**
|
|
1557
|
+
* @internal
|
|
1558
|
+
*/
|
|
1559
|
+
function toPascalCase(source) {
|
|
1560
|
+
return upperFirst(camelCase(source));
|
|
1561
|
+
}
|
|
1562
|
+
/**
|
|
1563
|
+
* @internal
|
|
1564
|
+
*/
|
|
1565
|
+
function checkIfTypeRegistered(type, item) {
|
|
1566
|
+
if (!item) {
|
|
1567
|
+
throw new Error(`Error when resolve ${type}. Type was not registered.`);
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
/**
|
|
1571
|
+
* @internal
|
|
1572
|
+
*/
|
|
1573
|
+
function checkOnlyOneRegistration(type, item, map) {
|
|
1574
|
+
if (map.has(type) && !isEqual(map.get(type), item)) {
|
|
1575
|
+
throw new Error(`Error when register ${type}. Element with this type has already exist`);
|
|
1576
|
+
}
|
|
1317
1577
|
}
|
|
1318
1578
|
|
|
1319
|
-
var
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
/**
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
/** Average value for all elements. */
|
|
1394
|
-
AggregationFunction["Avg"] = "Avg";
|
|
1395
|
-
/** The minimum value among all elements. */
|
|
1396
|
-
AggregationFunction["Min"] = "Min";
|
|
1397
|
-
/** The maximum value among all elements. */
|
|
1398
|
-
AggregationFunction["Max"] = "Max";
|
|
1399
|
-
/** Top one record from collection. */
|
|
1400
|
-
AggregationFunction["TopOne"] = "TopOne";
|
|
1401
|
-
})(AggregationFunction || (AggregationFunction = {}));
|
|
1402
|
-
|
|
1403
|
-
var LogicalOperatorType;
|
|
1404
|
-
(function (LogicalOperatorType) {
|
|
1405
|
-
LogicalOperatorType[LogicalOperatorType["And"] = 0] = "And";
|
|
1406
|
-
LogicalOperatorType[LogicalOperatorType["Or"] = 1] = "Or";
|
|
1407
|
-
})(LogicalOperatorType || (LogicalOperatorType = {}));
|
|
1408
|
-
|
|
1409
|
-
var AggregationEvalType;
|
|
1410
|
-
(function (AggregationEvalType) {
|
|
1411
|
-
/** The scope of the aggregating function is not defined. */
|
|
1412
|
-
AggregationEvalType[AggregationEvalType["None"] = 0] = "None";
|
|
1413
|
-
/** Applies to all elements. */
|
|
1414
|
-
AggregationEvalType[AggregationEvalType["All"] = 1] = "All";
|
|
1415
|
-
/** Applies to unique values. */
|
|
1416
|
-
AggregationEvalType[AggregationEvalType["Distinct"] = 2] = "Distinct";
|
|
1417
|
-
})(AggregationEvalType || (AggregationEvalType = {}));
|
|
1418
|
-
|
|
1419
|
-
var ArithmeticOperation;
|
|
1420
|
-
(function (ArithmeticOperation) {
|
|
1421
|
-
/** Addition. */
|
|
1422
|
-
ArithmeticOperation[ArithmeticOperation["Addition"] = 0] = "Addition";
|
|
1423
|
-
/** Subtraction. */
|
|
1424
|
-
ArithmeticOperation[ArithmeticOperation["Subtraction"] = 1] = "Subtraction";
|
|
1425
|
-
/** Multiplication. */
|
|
1426
|
-
ArithmeticOperation[ArithmeticOperation["Multiplication"] = 2] = "Multiplication";
|
|
1427
|
-
/** Division. */
|
|
1428
|
-
ArithmeticOperation[ArithmeticOperation["Division"] = 3] = "Division";
|
|
1429
|
-
})(ArithmeticOperation || (ArithmeticOperation = {}));
|
|
1430
|
-
|
|
1431
|
-
var ComparisonType;
|
|
1432
|
-
(function (ComparisonType) {
|
|
1433
|
-
ComparisonType[ComparisonType["Between"] = 0] = "Between";
|
|
1434
|
-
ComparisonType[ComparisonType["Contain"] = 11] = "Contain";
|
|
1435
|
-
ComparisonType[ComparisonType["End_with"] = 13] = "End_with";
|
|
1436
|
-
ComparisonType[ComparisonType["Equal"] = 3] = "Equal";
|
|
1437
|
-
ComparisonType[ComparisonType["Exists"] = 15] = "Exists";
|
|
1438
|
-
ComparisonType[ComparisonType["Greater"] = 7] = "Greater";
|
|
1439
|
-
ComparisonType[ComparisonType["Greater_or_equal"] = 8] = "Greater_or_equal";
|
|
1440
|
-
ComparisonType[ComparisonType["Is_not_null"] = 2] = "Is_not_null";
|
|
1441
|
-
ComparisonType[ComparisonType["Is_null"] = 1] = "Is_null";
|
|
1442
|
-
ComparisonType[ComparisonType["Less"] = 5] = "Less";
|
|
1443
|
-
ComparisonType[ComparisonType["Less_or_equal"] = 6] = "Less_or_equal";
|
|
1444
|
-
ComparisonType[ComparisonType["Not_contain"] = 12] = "Not_contain";
|
|
1445
|
-
ComparisonType[ComparisonType["Not_end_with"] = 14] = "Not_end_with";
|
|
1446
|
-
ComparisonType[ComparisonType["Not_equal"] = 4] = "Not_equal";
|
|
1447
|
-
ComparisonType[ComparisonType["Not_exists"] = 16] = "Not_exists";
|
|
1448
|
-
ComparisonType[ComparisonType["Not_start_with"] = 10] = "Not_start_with";
|
|
1449
|
-
ComparisonType[ComparisonType["Start_with"] = 9] = "Start_with";
|
|
1450
|
-
})(ComparisonType || (ComparisonType = {}));
|
|
1451
|
-
|
|
1452
|
-
var DatePartType;
|
|
1453
|
-
(function (DatePartType) {
|
|
1454
|
-
/** Empty value. */
|
|
1455
|
-
DatePartType[DatePartType["None"] = 0] = "None";
|
|
1456
|
-
/** Day. */
|
|
1457
|
-
DatePartType[DatePartType["Day"] = 1] = "Day";
|
|
1458
|
-
/** Week. */
|
|
1459
|
-
DatePartType[DatePartType["Week"] = 2] = "Week";
|
|
1460
|
-
/** Month. */
|
|
1461
|
-
DatePartType[DatePartType["Month"] = 3] = "Month";
|
|
1462
|
-
/** Year. */
|
|
1463
|
-
DatePartType[DatePartType["Year"] = 4] = "Year";
|
|
1464
|
-
/** Day of the week. */
|
|
1465
|
-
DatePartType[DatePartType["WeekDay"] = 5] = "WeekDay";
|
|
1466
|
-
/** Hour. */
|
|
1467
|
-
DatePartType[DatePartType["Hour"] = 6] = "Hour";
|
|
1468
|
-
/** Minute. */
|
|
1469
|
-
DatePartType[DatePartType["HourMinute"] = 7] = "HourMinute";
|
|
1470
|
-
})(DatePartType || (DatePartType = {}));
|
|
1471
|
-
|
|
1472
|
-
var ExpressionType;
|
|
1473
|
-
(function (ExpressionType) {
|
|
1474
|
-
ExpressionType[ExpressionType["SchemaColumn"] = 0] = "SchemaColumn";
|
|
1475
|
-
ExpressionType[ExpressionType["Function"] = 1] = "Function";
|
|
1476
|
-
ExpressionType[ExpressionType["Parameter"] = 2] = "Parameter";
|
|
1477
|
-
ExpressionType[ExpressionType["SubQuery"] = 3] = "SubQuery";
|
|
1478
|
-
ExpressionType[ExpressionType["ArithmeticOperation"] = 4] = "ArithmeticOperation";
|
|
1479
|
-
})(ExpressionType || (ExpressionType = {}));
|
|
1480
|
-
|
|
1481
|
-
var FilterType;
|
|
1482
|
-
(function (FilterType) {
|
|
1483
|
-
FilterType[FilterType["None"] = 0] = "None";
|
|
1484
|
-
FilterType[FilterType["Compare"] = 1] = "Compare";
|
|
1485
|
-
FilterType[FilterType["IsNull"] = 2] = "IsNull";
|
|
1486
|
-
FilterType[FilterType["Between"] = 3] = "Between";
|
|
1487
|
-
FilterType[FilterType["In"] = 4] = "In";
|
|
1488
|
-
FilterType[FilterType["Exists"] = 5] = "Exists";
|
|
1489
|
-
FilterType[FilterType["FilterGroup"] = 6] = "FilterGroup";
|
|
1490
|
-
})(FilterType || (FilterType = {}));
|
|
1491
|
-
|
|
1492
|
-
var FunctionType;
|
|
1493
|
-
(function (FunctionType) {
|
|
1494
|
-
FunctionType[FunctionType["None"] = 0] = "None";
|
|
1495
|
-
/** Substitution by macro. */
|
|
1496
|
-
FunctionType[FunctionType["Macros"] = 1] = "Macros";
|
|
1497
|
-
/** Aggregating function. */
|
|
1498
|
-
FunctionType[FunctionType["Aggregation"] = 2] = "Aggregation";
|
|
1499
|
-
/** Date fragment. */
|
|
1500
|
-
FunctionType[FunctionType["DatePart"] = 3] = "DatePart";
|
|
1501
|
-
/** The size of the value in bytes, used for binary data. */
|
|
1502
|
-
FunctionType[FunctionType["Length"] = 4] = "Length";
|
|
1503
|
-
/** Window query function */
|
|
1504
|
-
FunctionType[FunctionType["Window"] = 5] = "Window";
|
|
1505
|
-
})(FunctionType || (FunctionType = {}));
|
|
1506
|
-
|
|
1507
|
-
var OrderDirection;
|
|
1508
|
-
(function (OrderDirection) {
|
|
1509
|
-
OrderDirection[OrderDirection["None"] = 0] = "None";
|
|
1510
|
-
OrderDirection[OrderDirection["Asc"] = 1] = "Asc";
|
|
1511
|
-
OrderDirection[OrderDirection["Desc"] = 2] = "Desc";
|
|
1512
|
-
})(OrderDirection || (OrderDirection = {}));
|
|
1513
|
-
|
|
1514
|
-
var QueryMacrosType;
|
|
1515
|
-
(function (QueryMacrosType) {
|
|
1516
|
-
/** Macro type not defined. */
|
|
1517
|
-
QueryMacrosType[QueryMacrosType["None"] = 0] = "None";
|
|
1518
|
-
/** Current user. */
|
|
1519
|
-
QueryMacrosType[QueryMacrosType["CurrentUser"] = 1] = "CurrentUser";
|
|
1520
|
-
/** Current user contact. */
|
|
1521
|
-
QueryMacrosType[QueryMacrosType["CurrentUserContact"] = 2] = "CurrentUserContact";
|
|
1522
|
-
/** Yesterday. */
|
|
1523
|
-
QueryMacrosType[QueryMacrosType["Yesterday"] = 3] = "Yesterday";
|
|
1524
|
-
/** Today. */
|
|
1525
|
-
QueryMacrosType[QueryMacrosType["Today"] = 4] = "Today";
|
|
1526
|
-
/** Tomorrow. */
|
|
1527
|
-
QueryMacrosType[QueryMacrosType["Tomorrow"] = 5] = "Tomorrow";
|
|
1528
|
-
/** Previous week. */
|
|
1529
|
-
QueryMacrosType[QueryMacrosType["PreviousWeek"] = 6] = "PreviousWeek";
|
|
1530
|
-
/** This week. */
|
|
1531
|
-
QueryMacrosType[QueryMacrosType["CurrentWeek"] = 7] = "CurrentWeek";
|
|
1532
|
-
/** Next week. */
|
|
1533
|
-
QueryMacrosType[QueryMacrosType["NextWeek"] = 8] = "NextWeek";
|
|
1534
|
-
/** Previous month. */
|
|
1535
|
-
QueryMacrosType[QueryMacrosType["PreviousMonth"] = 9] = "PreviousMonth";
|
|
1536
|
-
/** Current month. */
|
|
1537
|
-
QueryMacrosType[QueryMacrosType["CurrentMonth"] = 10] = "CurrentMonth";
|
|
1538
|
-
/** Next month. */
|
|
1539
|
-
QueryMacrosType[QueryMacrosType["NextMonth"] = 11] = "NextMonth";
|
|
1540
|
-
/** Previous quarter. */
|
|
1541
|
-
QueryMacrosType[QueryMacrosType["PreviousQuarter"] = 12] = "PreviousQuarter";
|
|
1542
|
-
/** Current quarter. */
|
|
1543
|
-
QueryMacrosType[QueryMacrosType["CurrentQuarter"] = 13] = "CurrentQuarter";
|
|
1544
|
-
/** Next quarter. */
|
|
1545
|
-
QueryMacrosType[QueryMacrosType["NextQuarter"] = 14] = "NextQuarter";
|
|
1546
|
-
/** Previous half of the year. */
|
|
1547
|
-
QueryMacrosType[QueryMacrosType["PreviousHalfYear"] = 15] = "PreviousHalfYear";
|
|
1548
|
-
/** Current half-year. */
|
|
1549
|
-
QueryMacrosType[QueryMacrosType["CurrentHalfYear"] = 16] = "CurrentHalfYear";
|
|
1550
|
-
/** Next half-year. */
|
|
1551
|
-
QueryMacrosType[QueryMacrosType["NextHalfYear"] = 17] = "NextHalfYear";
|
|
1552
|
-
/** Last year. */
|
|
1553
|
-
QueryMacrosType[QueryMacrosType["PreviousYear"] = 18] = "PreviousYear";
|
|
1554
|
-
/** This year. */
|
|
1555
|
-
QueryMacrosType[QueryMacrosType["CurrentYear"] = 19] = "CurrentYear";
|
|
1556
|
-
/** Previous hour. */
|
|
1557
|
-
QueryMacrosType[QueryMacrosType["PreviousHour"] = 20] = "PreviousHour";
|
|
1558
|
-
/** Current hour. */
|
|
1559
|
-
QueryMacrosType[QueryMacrosType["CurrentHour"] = 21] = "CurrentHour";
|
|
1560
|
-
/** Next hour. */
|
|
1561
|
-
QueryMacrosType[QueryMacrosType["NextHour"] = 22] = "NextHour";
|
|
1562
|
-
/** Next year. */
|
|
1563
|
-
QueryMacrosType[QueryMacrosType["NextYear"] = 23] = "NextYear";
|
|
1564
|
-
/** Next N Days. */
|
|
1565
|
-
QueryMacrosType[QueryMacrosType["NextNDays"] = 24] = "NextNDays";
|
|
1566
|
-
/** Previous N days. */
|
|
1567
|
-
QueryMacrosType[QueryMacrosType["PreviousNDays"] = 25] = "PreviousNDays";
|
|
1568
|
-
/** Next N hours. */
|
|
1569
|
-
QueryMacrosType[QueryMacrosType["NextNHours"] = 26] = "NextNHours";
|
|
1570
|
-
/** Previous N hours. */
|
|
1571
|
-
QueryMacrosType[QueryMacrosType["PreviousNHours"] = 27] = "PreviousNHours";
|
|
1572
|
-
/** Primary column. */
|
|
1573
|
-
QueryMacrosType[QueryMacrosType["PrimaryColumn"] = 34] = "PrimaryColumn";
|
|
1574
|
-
/** Primary displayed column. */
|
|
1575
|
-
QueryMacrosType[QueryMacrosType["PrimaryDisplayColumn"] = 35] = "PrimaryDisplayColumn";
|
|
1576
|
-
/** Primary image display column. */
|
|
1577
|
-
QueryMacrosType[QueryMacrosType["PrimaryImageColumn"] = 36] = "PrimaryImageColumn";
|
|
1578
|
-
/** Anniversary today. */
|
|
1579
|
-
QueryMacrosType[QueryMacrosType["DayOfYearToday"] = 37] = "DayOfYearToday";
|
|
1580
|
-
/** Anniversary on the date computed as today plus days offset. */
|
|
1581
|
-
QueryMacrosType[QueryMacrosType["DayOfYearTodayPlusDaysOffset"] = 38] = "DayOfYearTodayPlusDaysOffset";
|
|
1582
|
-
/** Anniversary on the next several days. */
|
|
1583
|
-
QueryMacrosType[QueryMacrosType["NextNDaysOfYear"] = 39] = "NextNDaysOfYear";
|
|
1584
|
-
/** Anniversary on the previous several days. */
|
|
1585
|
-
QueryMacrosType[QueryMacrosType["PreviousNDaysOfYear"] = 40] = "PreviousNDaysOfYear";
|
|
1586
|
-
/** Primary color display column. */
|
|
1587
|
-
QueryMacrosType[QueryMacrosType["PrimaryColorColumn"] = 41] = "PrimaryColorColumn";
|
|
1588
|
-
})(QueryMacrosType || (QueryMacrosType = {}));
|
|
1589
|
-
|
|
1590
|
-
class BaseExpression {
|
|
1591
|
-
constructor(config) {
|
|
1592
|
-
this.isBlock = false;
|
|
1593
|
-
this.isBlock = config === null || config === void 0 ? void 0 : config.isBlock;
|
|
1579
|
+
var _a;
|
|
1580
|
+
/**
|
|
1581
|
+
* @internal
|
|
1582
|
+
*/
|
|
1583
|
+
class InternalRequestHandlerRegistryType {
|
|
1584
|
+
static get requestHandlersMap() {
|
|
1585
|
+
return this._requestHandlersMap;
|
|
1586
|
+
}
|
|
1587
|
+
static onAddRequestHandler(handler) {
|
|
1588
|
+
this._addItemListeners.push(handler);
|
|
1589
|
+
return () => {
|
|
1590
|
+
this._addItemListeners.splice(this._addItemListeners.indexOf(handler), 1);
|
|
1591
|
+
};
|
|
1592
|
+
}
|
|
1593
|
+
static onRemoveRequestHandler(handler) {
|
|
1594
|
+
this._removeItemListeners.push(handler);
|
|
1595
|
+
return () => {
|
|
1596
|
+
this._removeItemListeners.splice(this._removeItemListeners.indexOf(handler), 1);
|
|
1597
|
+
};
|
|
1598
|
+
}
|
|
1599
|
+
static addRequestHandler(handlerType, config) {
|
|
1600
|
+
if (!this._requestHandlersMap.has(handlerType)) {
|
|
1601
|
+
this._requestHandlersMap.set(handlerType, config);
|
|
1602
|
+
for (const listener of this._addItemListeners) {
|
|
1603
|
+
listener(handlerType, config);
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
static removeRequestHandler(handlerType) {
|
|
1608
|
+
const config = this._requestHandlersMap.get(handlerType);
|
|
1609
|
+
if (config) {
|
|
1610
|
+
this._requestHandlersMap.delete(handlerType);
|
|
1611
|
+
for (const listener of this._removeItemListeners) {
|
|
1612
|
+
listener(handlerType, config);
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
InternalRequestHandlerRegistryType._addItemListeners = [];
|
|
1618
|
+
InternalRequestHandlerRegistryType._removeItemListeners = [];
|
|
1619
|
+
InternalRequestHandlerRegistryType._requestHandlersMap = new Map();
|
|
1620
|
+
const global$1 = window;
|
|
1621
|
+
(_a = global$1.creatio) !== null && _a !== void 0 ? _a : (global$1.creatio = {});
|
|
1622
|
+
if (!global$1.creatio.requestHandlerRegistry) {
|
|
1623
|
+
Object.defineProperty(global$1.creatio, 'requestHandlerRegistry', {
|
|
1624
|
+
get: () => InternalRequestHandlerRegistryType,
|
|
1625
|
+
configurable: false,
|
|
1626
|
+
});
|
|
1627
|
+
}
|
|
1628
|
+
/**
|
|
1629
|
+
* @internal
|
|
1630
|
+
*/
|
|
1631
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1632
|
+
const InternalRequestHandlerRegistry = InternalRequestHandlerRegistryType;
|
|
1633
|
+
/**
|
|
1634
|
+
* @internal
|
|
1635
|
+
*/
|
|
1636
|
+
class RequestHandlerRegistryService {
|
|
1637
|
+
/**
|
|
1638
|
+
* Register request handler class.
|
|
1639
|
+
* @param config Request handler registration config.
|
|
1640
|
+
* @param type Request handler type.
|
|
1641
|
+
*/
|
|
1642
|
+
static register(config, type) {
|
|
1643
|
+
const requestType = config.requestType;
|
|
1644
|
+
const requestHandlerType = config.type;
|
|
1645
|
+
if (!requestType) {
|
|
1646
|
+
throw new Error(`Error when register ${requestHandlerType}. Request type not specified.`);
|
|
1647
|
+
}
|
|
1648
|
+
const requestHandlerMapValue = {
|
|
1649
|
+
instanceType: type,
|
|
1650
|
+
instanceConfig: config,
|
|
1651
|
+
};
|
|
1652
|
+
RequestHandlerRegistryService._internalRegistry.addRequestHandler(requestHandlerType, requestHandlerMapValue);
|
|
1594
1653
|
}
|
|
1595
1654
|
}
|
|
1655
|
+
RequestHandlerRegistryService._internalRegistry = global$1.creatio.requestHandlerRegistry;
|
|
1596
1656
|
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
this.
|
|
1603
|
-
this.rightArithmeticOperand = config === null || config === void 0 ? void 0 : config.rightArithmeticOperand.clone();
|
|
1657
|
+
/**
|
|
1658
|
+
* @internal
|
|
1659
|
+
*/
|
|
1660
|
+
class RequestRegistryService {
|
|
1661
|
+
static get requestsRegistrationInfos() {
|
|
1662
|
+
return this._requestsRegistrationInfos;
|
|
1604
1663
|
}
|
|
1605
|
-
|
|
1606
|
-
|
|
1664
|
+
/**
|
|
1665
|
+
* Registers a specified request class.
|
|
1666
|
+
* @param config Request registration config.
|
|
1667
|
+
* @param type Request type.
|
|
1668
|
+
*/
|
|
1669
|
+
static register(config, type) {
|
|
1670
|
+
const requestType = config.type;
|
|
1671
|
+
// TODO RND-21723
|
|
1672
|
+
RequestRegistryService._requestsMap.set(requestType, type);
|
|
1673
|
+
RequestRegistryService._requestsRegistrationInfos.set(requestType, config);
|
|
1674
|
+
}
|
|
1675
|
+
/**
|
|
1676
|
+
* Creates request instance by specified registered request type.
|
|
1677
|
+
* @param type Request type.
|
|
1678
|
+
* @returns The instance of registered request.
|
|
1679
|
+
*/
|
|
1680
|
+
static get(type) {
|
|
1681
|
+
const requestInstanceConstructor = RequestRegistryService._requestsMap.get(type);
|
|
1682
|
+
checkIfTypeRegistered(type, requestInstanceConstructor);
|
|
1683
|
+
return requestInstanceConstructor && new requestInstanceConstructor();
|
|
1607
1684
|
}
|
|
1608
1685
|
}
|
|
1686
|
+
RequestRegistryService._requestsMap = new Map();
|
|
1687
|
+
RequestRegistryService._requestsRegistrationInfos = new Map();
|
|
1609
1688
|
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1689
|
+
/**
|
|
1690
|
+
* @internal
|
|
1691
|
+
*/
|
|
1692
|
+
class ConverterRegistry extends BaseRegistry {
|
|
1693
|
+
static get(type) {
|
|
1694
|
+
if (!this.store.typeInfos.has(type)) {
|
|
1695
|
+
throw new Error(`'${type}' converter doesn't exist`);
|
|
1696
|
+
}
|
|
1697
|
+
return this.store.typeInfos.get(type);
|
|
1615
1698
|
}
|
|
1616
|
-
|
|
1617
|
-
|
|
1699
|
+
static register(item) {
|
|
1700
|
+
checkTypeNameFormat(item.type, 'ConverterTypeName');
|
|
1701
|
+
checkCrtTypeNamePascalCase(item.type);
|
|
1702
|
+
// TODO RND-21723
|
|
1703
|
+
this.store.typeInfos.set(item.type, item);
|
|
1704
|
+
}
|
|
1705
|
+
static clear() {
|
|
1706
|
+
this.store.typeInfos.clear();
|
|
1618
1707
|
}
|
|
1619
1708
|
}
|
|
1709
|
+
ConverterRegistry.registryKey = 'ConverterRegistry';
|
|
1620
1710
|
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1711
|
+
/**
|
|
1712
|
+
* @internal
|
|
1713
|
+
*/
|
|
1714
|
+
const viewElementRegistryKey = 'ViewElementRegistry';
|
|
1715
|
+
/**
|
|
1716
|
+
* @internal
|
|
1717
|
+
*/
|
|
1718
|
+
class ViewElementRegistry extends BaseRegistry {
|
|
1719
|
+
static validate(config) {
|
|
1720
|
+
checkTypeNameFormat(config.type, 'ViewElementTypeName');
|
|
1721
|
+
checkOnlyOneRegistration(config.type, config, ViewElementRegistry.viewElements);
|
|
1722
|
+
}
|
|
1723
|
+
static get viewElements() {
|
|
1724
|
+
return this.store.typeInfos;
|
|
1725
|
+
}
|
|
1726
|
+
static register(config) {
|
|
1727
|
+
this.viewElements.set(config.type, config);
|
|
1728
|
+
}
|
|
1729
|
+
static getFormControlRelatesAttribute(type) {
|
|
1730
|
+
var _a;
|
|
1731
|
+
const config = this.store.typeInfos.get(type);
|
|
1732
|
+
return (config && 'formControlConfig' in config && ((_a = config.formControlConfig) === null || _a === void 0 ? void 0 : _a.relatesTo)) || null;
|
|
1625
1733
|
}
|
|
1626
1734
|
}
|
|
1735
|
+
ViewElementRegistry.registryKey = viewElementRegistryKey;
|
|
1627
1736
|
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1737
|
+
/**
|
|
1738
|
+
* @internal
|
|
1739
|
+
*/
|
|
1740
|
+
const interfaceDesignerItemRegistryKey = 'InterfaceDesignerItemRegistry';
|
|
1741
|
+
/**
|
|
1742
|
+
* @internal
|
|
1743
|
+
*/
|
|
1744
|
+
class InterfaceDesignerItemRegistry extends BaseRegistry {
|
|
1745
|
+
static validate(config) {
|
|
1746
|
+
checkTypeNameFormat(config.type, 'InterfaceDesignerItemTypeName');
|
|
1747
|
+
checkCrtTypeNamePascalCase(config.type);
|
|
1748
|
+
checkOnlyOneRegistration(config.type, config, this.interfaceDesignerItemRegistrationInfos);
|
|
1749
|
+
}
|
|
1750
|
+
static register(config) {
|
|
1751
|
+
this.interfaceDesignerItemRegistrationInfos.set(config.type, config);
|
|
1752
|
+
}
|
|
1753
|
+
static get interfaceDesignerItemRegistrationInfos() {
|
|
1754
|
+
return this.store.typeInfos;
|
|
1755
|
+
}
|
|
1756
|
+
static get(type) {
|
|
1757
|
+
return this.interfaceDesignerItemRegistrationInfos.get(type);
|
|
1632
1758
|
}
|
|
1633
1759
|
}
|
|
1760
|
+
InterfaceDesignerItemRegistry.registryKey = interfaceDesignerItemRegistryKey;
|
|
1634
1761
|
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1762
|
+
const global = window;
|
|
1763
|
+
/**
|
|
1764
|
+
* @internal
|
|
1765
|
+
*/
|
|
1766
|
+
class BootstrapNotifier {
|
|
1767
|
+
constructor() {
|
|
1768
|
+
this._subscribers = new Set();
|
|
1641
1769
|
}
|
|
1642
|
-
|
|
1643
|
-
|
|
1770
|
+
static get instance() {
|
|
1771
|
+
if (!global.__crtModuleBootstrapNotifier) {
|
|
1772
|
+
global.__crtModuleBootstrapNotifier = new BootstrapNotifier();
|
|
1773
|
+
}
|
|
1774
|
+
return global.__crtModuleBootstrapNotifier;
|
|
1775
|
+
}
|
|
1776
|
+
notify(moduleType) {
|
|
1777
|
+
for (const subscriber of this._subscribers.values()) {
|
|
1778
|
+
subscriber(moduleType);
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
subscribe(subscriber) {
|
|
1782
|
+
this._subscribers.add(subscriber);
|
|
1783
|
+
return {
|
|
1784
|
+
unsubscribe: () => this._subscribers.delete(subscriber),
|
|
1785
|
+
};
|
|
1644
1786
|
}
|
|
1645
1787
|
}
|
|
1646
1788
|
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1789
|
+
/**
|
|
1790
|
+
* @internal
|
|
1791
|
+
*/
|
|
1792
|
+
class HandlerChainServicesRegistry extends BaseRegistry {
|
|
1793
|
+
static validate({ requestType }) {
|
|
1794
|
+
checkTypeNameFormat(requestType, this.registryKey);
|
|
1795
|
+
checkCrtTypeNamePascalCase(requestType);
|
|
1796
|
+
this.checkUniqueRequestType(requestType);
|
|
1652
1797
|
}
|
|
1653
|
-
|
|
1654
|
-
|
|
1798
|
+
static checkUniqueRequestType(requestType) {
|
|
1799
|
+
if (this.services.get(requestType)) {
|
|
1800
|
+
throw new Error(`${requestType} already registered`);
|
|
1801
|
+
}
|
|
1655
1802
|
}
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
constructor(config) {
|
|
1660
|
-
super(config);
|
|
1661
|
-
this.functionType = FunctionType.Length;
|
|
1803
|
+
static register(config) {
|
|
1804
|
+
this.validate(config);
|
|
1805
|
+
this.services.set(config.requestType, config);
|
|
1662
1806
|
}
|
|
1663
|
-
|
|
1664
|
-
return
|
|
1807
|
+
static get services() {
|
|
1808
|
+
return this.store.typeInfos;
|
|
1665
1809
|
}
|
|
1666
1810
|
}
|
|
1811
|
+
HandlerChainServicesRegistry.registryKey = 'HandlerChainServicesRegistry';
|
|
1667
1812
|
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1813
|
+
/**
|
|
1814
|
+
* @internal
|
|
1815
|
+
*/
|
|
1816
|
+
const designTimeViewElementRegistryKey = 'DesignTimeViewElementRegistry';
|
|
1817
|
+
/**
|
|
1818
|
+
* @internal
|
|
1819
|
+
*/
|
|
1820
|
+
class DesignTimeViewElementRegistry extends BaseRegistry {
|
|
1821
|
+
static validate(config) {
|
|
1822
|
+
checkTypeNameFormat(config.type, 'DesignTimeViewElementRegistryItemTypeName');
|
|
1823
|
+
checkCrtTypeNamePascalCase(config.type);
|
|
1824
|
+
checkOnlyOneRegistration(config.type, config, this.infos);
|
|
1673
1825
|
}
|
|
1674
|
-
|
|
1675
|
-
|
|
1826
|
+
static register(config) {
|
|
1827
|
+
this.infos.set(config.type, config);
|
|
1676
1828
|
}
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1829
|
+
static getByOverriddenType(type) {
|
|
1830
|
+
const item = Array.from(this.infos).find(([_, info]) => info.overrideType === type);
|
|
1831
|
+
if (item) {
|
|
1832
|
+
return item[1];
|
|
1833
|
+
}
|
|
1834
|
+
return null;
|
|
1683
1835
|
}
|
|
1684
|
-
|
|
1685
|
-
return
|
|
1836
|
+
static get infos() {
|
|
1837
|
+
return this.store.typeInfos;
|
|
1686
1838
|
}
|
|
1687
1839
|
}
|
|
1840
|
+
DesignTimeViewElementRegistry.registryKey = designTimeViewElementRegistryKey;
|
|
1688
1841
|
|
|
1689
|
-
|
|
1690
|
-
|
|
1842
|
+
/**
|
|
1843
|
+
* @internal
|
|
1844
|
+
*/
|
|
1845
|
+
class ValidatorMapValue {
|
|
1846
|
+
}
|
|
1847
|
+
/**
|
|
1848
|
+
* @internal
|
|
1849
|
+
*/
|
|
1850
|
+
const validatorRegistryKey = 'ValidatorRegistry';
|
|
1851
|
+
/**
|
|
1852
|
+
* @internal
|
|
1853
|
+
*/
|
|
1854
|
+
class ValidatorRegistry extends BaseRegistry {
|
|
1855
|
+
static _has(configType, type) {
|
|
1691
1856
|
var _a;
|
|
1692
|
-
|
|
1693
|
-
this.expressionType = ExpressionType.Parameter;
|
|
1694
|
-
const value = config === null || config === void 0 ? void 0 : config.value;
|
|
1695
|
-
if (value instanceof Date) {
|
|
1696
|
-
const cloneDate = new Date();
|
|
1697
|
-
cloneDate.setTime(value.getTime());
|
|
1698
|
-
this.value = cloneDate;
|
|
1699
|
-
}
|
|
1700
|
-
else if (!value) {
|
|
1701
|
-
this.value = value;
|
|
1702
|
-
}
|
|
1703
|
-
else {
|
|
1704
|
-
this.value = typeof value === 'object' ? Object.assign({}, value) : value;
|
|
1705
|
-
}
|
|
1706
|
-
this.dataValueType = (_a = config === null || config === void 0 ? void 0 : config.dataValueType) !== null && _a !== void 0 ? _a : DataValueType.Text;
|
|
1707
|
-
}
|
|
1708
|
-
get parameter() {
|
|
1709
|
-
return Object.assign({ dataValueType: this.dataValueType }, this._getParameterValueMetadata());
|
|
1857
|
+
return ValidatorRegistry.items.has(configType) && ((_a = ValidatorRegistry.items.get(configType)) === null || _a === void 0 ? void 0 : _a.typeRef) !== type;
|
|
1710
1858
|
}
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
const code = str.charCodeAt(i);
|
|
1716
|
-
if (code < 128) {
|
|
1717
|
-
out[position++] = String.fromCharCode(code);
|
|
1718
|
-
}
|
|
1719
|
-
else if (code < 2048) {
|
|
1720
|
-
/* eslint-disable no-bitwise */
|
|
1721
|
-
out[position++] = String.fromCharCode((code >> 6) | 192);
|
|
1722
|
-
out[position++] = String.fromCharCode((code & 63) | 128);
|
|
1723
|
-
}
|
|
1724
|
-
else {
|
|
1725
|
-
out[position++] = String.fromCharCode((code >> 12) | 224);
|
|
1726
|
-
out[position++] = String.fromCharCode(((code >> 6) & 63) | 128);
|
|
1727
|
-
out[position++] = String.fromCharCode((code & 63) | 128);
|
|
1728
|
-
/* eslint-enable no-bitwise */
|
|
1729
|
-
}
|
|
1859
|
+
static validate(config) {
|
|
1860
|
+
checkTypeNameFormat(config.type, 'ValidatorTypeName');
|
|
1861
|
+
if (ValidatorRegistry._has(config.type, config.typeRef)) {
|
|
1862
|
+
throw new Error(`Error when register ${config.type}. Element with this type has already exist`);
|
|
1730
1863
|
}
|
|
1731
|
-
return out;
|
|
1732
1864
|
}
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
return {
|
|
1736
|
-
arrayValue: !this.value ? [] : this._convertStringToBlobArray(this.value),
|
|
1737
|
-
};
|
|
1738
|
-
}
|
|
1739
|
-
else {
|
|
1740
|
-
return {
|
|
1741
|
-
value: this.value,
|
|
1742
|
-
};
|
|
1743
|
-
}
|
|
1865
|
+
static get items() {
|
|
1866
|
+
return this.store.typeInfos;
|
|
1744
1867
|
}
|
|
1745
|
-
|
|
1746
|
-
|
|
1868
|
+
static register(config) {
|
|
1869
|
+
this.items.set(config.type, config);
|
|
1747
1870
|
}
|
|
1748
1871
|
}
|
|
1749
|
-
|
|
1750
|
-
Exclude(),
|
|
1751
|
-
__metadata("design:type", Object)
|
|
1752
|
-
], ParameterExpression.prototype, "value", void 0);
|
|
1753
|
-
__decorate([
|
|
1754
|
-
Exclude(),
|
|
1755
|
-
__metadata("design:type", Number)
|
|
1756
|
-
], ParameterExpression.prototype, "dataValueType", void 0);
|
|
1757
|
-
__decorate([
|
|
1758
|
-
Expose(),
|
|
1759
|
-
__metadata("design:type", Object),
|
|
1760
|
-
__metadata("design:paramtypes", [])
|
|
1761
|
-
], ParameterExpression.prototype, "parameter", null);
|
|
1872
|
+
ValidatorRegistry.registryKey = validatorRegistryKey;
|
|
1762
1873
|
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
clone() {
|
|
1774
|
-
return new SubQueryExpression(this);
|
|
1874
|
+
/**
|
|
1875
|
+
* @internal
|
|
1876
|
+
* @dontChange
|
|
1877
|
+
*/
|
|
1878
|
+
class RemoteEntriesRegistry extends BaseRegistry {
|
|
1879
|
+
/**
|
|
1880
|
+
* @dontChange
|
|
1881
|
+
*/
|
|
1882
|
+
static get items() {
|
|
1883
|
+
return this.store.typeInfos;
|
|
1775
1884
|
}
|
|
1776
1885
|
}
|
|
1886
|
+
/**
|
|
1887
|
+
* @dontChange
|
|
1888
|
+
*/
|
|
1889
|
+
RemoteEntriesRegistry.registryKey = 'remotes';
|
|
1777
1890
|
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1891
|
+
/**
|
|
1892
|
+
* @internal
|
|
1893
|
+
*/
|
|
1894
|
+
function isComponentPropertyBindable(viewConfigType, componentProperty) {
|
|
1895
|
+
var _a;
|
|
1896
|
+
const componentConfig = ViewElementRegistry.viewElements.get(viewConfigType);
|
|
1897
|
+
if (!(componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.inputs)) {
|
|
1898
|
+
return false;
|
|
1785
1899
|
}
|
|
1900
|
+
return !!((_a = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.inputs[componentProperty]) === null || _a === void 0 ? void 0 : _a.propertyBindable);
|
|
1786
1901
|
}
|
|
1787
1902
|
|
|
1788
|
-
const
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1903
|
+
const moduleMetadataKey = 'module';
|
|
1904
|
+
const viewElementMetadataKey = 'viewElement';
|
|
1905
|
+
const interfaceDesignerItemMetadataKey = 'interfaceDesignerItem';
|
|
1906
|
+
const requestHandlerMetadataKey = 'requestHandler';
|
|
1907
|
+
const designTimeViewElementMetadataKey = 'designTimeViewElement';
|
|
1908
|
+
const validatorMetadataKey = 'validator';
|
|
1909
|
+
const converterMetadataKey = 'converter';
|
|
1910
|
+
/**
|
|
1911
|
+
* @internal
|
|
1912
|
+
*/
|
|
1913
|
+
function setModuleMetadata(metadata, type) {
|
|
1914
|
+
Reflect.defineMetadata(moduleMetadataKey, metadata, type);
|
|
1915
|
+
}
|
|
1916
|
+
/**
|
|
1917
|
+
* @internal
|
|
1918
|
+
*/
|
|
1919
|
+
function getModuleMetadata(type) {
|
|
1920
|
+
const metadata = Reflect.getMetadata(moduleMetadataKey, type);
|
|
1921
|
+
if (!metadata) {
|
|
1922
|
+
throw new Error(`Module metadata was not found on '${type.name}' class`);
|
|
1797
1923
|
}
|
|
1798
|
-
|
|
1799
|
-
|
|
1924
|
+
return metadata;
|
|
1925
|
+
}
|
|
1926
|
+
/**
|
|
1927
|
+
* @internal
|
|
1928
|
+
*/
|
|
1929
|
+
function setViewElementMetadata(metadata, type) {
|
|
1930
|
+
Reflect.defineMetadata(viewElementMetadataKey, metadata, type);
|
|
1931
|
+
}
|
|
1932
|
+
/**
|
|
1933
|
+
* @internal
|
|
1934
|
+
*/
|
|
1935
|
+
function getViewElementMetadata(type) {
|
|
1936
|
+
const metadata = Reflect.getMetadata(viewElementMetadataKey, type);
|
|
1937
|
+
if (!metadata) {
|
|
1938
|
+
throw new Error(`View element metadata was not found on '${type.name}' class`);
|
|
1800
1939
|
}
|
|
1940
|
+
return metadata;
|
|
1801
1941
|
}
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1942
|
+
/**
|
|
1943
|
+
* @internal
|
|
1944
|
+
*/
|
|
1945
|
+
function setValidatorMetadata(metadata, type) {
|
|
1946
|
+
Reflect.defineMetadata(validatorMetadataKey, metadata, type);
|
|
1947
|
+
}
|
|
1948
|
+
/**
|
|
1949
|
+
* @internal
|
|
1950
|
+
*/
|
|
1951
|
+
function getValidatorMetadata(type) {
|
|
1952
|
+
const metadata = Reflect.getOwnMetadata(validatorMetadataKey, type);
|
|
1953
|
+
if (!metadata) {
|
|
1954
|
+
throw new Error(`Validator metadata was not found on '${type.name}' class`);
|
|
1808
1955
|
}
|
|
1956
|
+
return metadata;
|
|
1809
1957
|
}
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
1816
|
-
get plainObject() {
|
|
1817
|
-
return classToPlain(this, { exposeUnsetFields: false, excludePrefixes: ['_'] });
|
|
1818
|
-
}
|
|
1819
|
-
clone() {
|
|
1820
|
-
return new FilterMock(this.filterType);
|
|
1821
|
-
}
|
|
1958
|
+
/**
|
|
1959
|
+
* @internal
|
|
1960
|
+
*/
|
|
1961
|
+
function setConverterMetadata(metadata, type) {
|
|
1962
|
+
Reflect.defineMetadata(converterMetadataKey, metadata, type);
|
|
1822
1963
|
}
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1964
|
+
/**
|
|
1965
|
+
* @internal
|
|
1966
|
+
*/
|
|
1967
|
+
function getConverterMetadata(type) {
|
|
1968
|
+
const metadata = Reflect.getOwnMetadata(converterMetadataKey, type);
|
|
1969
|
+
if (!metadata) {
|
|
1970
|
+
throw new Error(`Converter metadata was not found on '${type.name}' class`);
|
|
1829
1971
|
}
|
|
1972
|
+
return metadata;
|
|
1830
1973
|
}
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1974
|
+
/**
|
|
1975
|
+
* @internal
|
|
1976
|
+
*/
|
|
1977
|
+
function setInterfaceDesignerItemMetadata(metadata, type) {
|
|
1978
|
+
Reflect.defineMetadata(interfaceDesignerItemMetadataKey, metadata, type);
|
|
1979
|
+
}
|
|
1980
|
+
/**
|
|
1981
|
+
* @internal
|
|
1982
|
+
*/
|
|
1983
|
+
function getInterfaceDesignerItemMetadata(type) {
|
|
1984
|
+
const metadata = Reflect.getOwnMetadata(interfaceDesignerItemMetadataKey, type);
|
|
1985
|
+
if (!metadata) {
|
|
1986
|
+
throw new Error(`Interface designer item metadata was not found on '${type.name}' class`);
|
|
1836
1987
|
}
|
|
1837
|
-
|
|
1838
|
-
|
|
1988
|
+
return metadata;
|
|
1989
|
+
}
|
|
1990
|
+
/**
|
|
1991
|
+
* @internal
|
|
1992
|
+
*/
|
|
1993
|
+
function setDesignTimeViewElementMetadata(metadata, type) {
|
|
1994
|
+
Reflect.defineMetadata(designTimeViewElementMetadataKey, metadata, type);
|
|
1995
|
+
}
|
|
1996
|
+
/**
|
|
1997
|
+
* @internal
|
|
1998
|
+
*/
|
|
1999
|
+
function getDesignTimeViewElementMetadata(type) {
|
|
2000
|
+
const metadata = Reflect.getOwnMetadata(designTimeViewElementMetadataKey, type);
|
|
2001
|
+
if (!metadata) {
|
|
2002
|
+
throw new Error(`Design time view element metadata was not found on '${type.name}' class`);
|
|
1839
2003
|
}
|
|
2004
|
+
return metadata;
|
|
1840
2005
|
}
|
|
1841
|
-
|
|
1842
2006
|
/**
|
|
1843
|
-
* Empty Guid constant.
|
|
1844
2007
|
* @internal
|
|
1845
2008
|
*/
|
|
1846
|
-
|
|
2009
|
+
function hasInterfaceDesignerItemMetadata(type) {
|
|
2010
|
+
return Reflect.hasOwnMetadata(interfaceDesignerItemMetadataKey, type);
|
|
2011
|
+
}
|
|
1847
2012
|
/**
|
|
1848
|
-
* Regular expression for Guid validation.
|
|
1849
2013
|
* @internal
|
|
1850
2014
|
*/
|
|
1851
|
-
|
|
2015
|
+
function setRequestHandlerMetadata(metadata, type) {
|
|
2016
|
+
Reflect.defineMetadata(requestHandlerMetadataKey, metadata, type);
|
|
2017
|
+
}
|
|
1852
2018
|
/**
|
|
1853
|
-
* Generates guid part.
|
|
1854
|
-
* @param length Part length.
|
|
1855
2019
|
* @internal
|
|
1856
2020
|
*/
|
|
1857
|
-
function
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
out += (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
2021
|
+
function getRequestHandlerMetadata(type) {
|
|
2022
|
+
const metadata = Reflect.getMetadata(requestHandlerMetadataKey, type);
|
|
2023
|
+
if (!metadata) {
|
|
2024
|
+
throw new Error(`Request handler metadata was not found on '${type.name}' class`);
|
|
1862
2025
|
}
|
|
1863
|
-
return
|
|
2026
|
+
return metadata;
|
|
1864
2027
|
}
|
|
1865
2028
|
/**
|
|
1866
|
-
* Generates new Guid.
|
|
1867
2029
|
* @internal
|
|
1868
2030
|
*/
|
|
1869
|
-
function
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
generateGuidPart(3),
|
|
1876
|
-
].join('-');
|
|
2031
|
+
function getHandlerChainServiceMetadata(typeRef) {
|
|
2032
|
+
const requestType = Reflect.getMetadata('requestType', typeRef);
|
|
2033
|
+
if (!requestType) {
|
|
2034
|
+
throw new Error(`requestType was not found on '${typeRef.name}' class`);
|
|
2035
|
+
}
|
|
2036
|
+
return { requestType, typeRef };
|
|
1877
2037
|
}
|
|
1878
2038
|
/**
|
|
1879
|
-
* Checks if value is Guid.
|
|
1880
|
-
* @param value Value for check.
|
|
1881
2039
|
* @internal
|
|
1882
2040
|
*/
|
|
1883
|
-
function
|
|
1884
|
-
|
|
2041
|
+
function getCrtInputsMetadata(type) {
|
|
2042
|
+
const keys = Reflect.getMetadataKeys(type);
|
|
2043
|
+
const crtInputKeys = keys.filter((x) => x.startsWith(crtInputPrefix));
|
|
2044
|
+
return Object.fromEntries(crtInputKeys.map((key) => {
|
|
2045
|
+
const data = Reflect.getMetadata(key, type);
|
|
2046
|
+
return [key.replace(crtInputPrefix, ''), data];
|
|
2047
|
+
}));
|
|
1885
2048
|
}
|
|
1886
2049
|
/**
|
|
1887
|
-
* Checks if Guid is empty value or equal to EMPTY_GUID.
|
|
1888
|
-
* @param guid Guid for check.
|
|
1889
2050
|
* @internal
|
|
1890
2051
|
*/
|
|
1891
|
-
function
|
|
1892
|
-
|
|
2052
|
+
function getCrtOutputsMetadata(type) {
|
|
2053
|
+
const keys = Reflect.getMetadataKeys(type);
|
|
2054
|
+
const crtOutputKeys = keys.filter((x) => x.startsWith(crtOutputPrefix));
|
|
2055
|
+
return Object.fromEntries(crtOutputKeys.map((key) => {
|
|
2056
|
+
const data = Reflect.getMetadata(key, type);
|
|
2057
|
+
return [key.replace(crtOutputPrefix, ''), data];
|
|
2058
|
+
}));
|
|
1893
2059
|
}
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
return
|
|
1903
|
-
}
|
|
2060
|
+
/**
|
|
2061
|
+
* @internal
|
|
2062
|
+
*/
|
|
2063
|
+
function getCrtValidationInputsMetadata(type) {
|
|
2064
|
+
const keys = Reflect.getMetadataKeys(type);
|
|
2065
|
+
const crtValidationInputKeys = keys.filter((x) => x.startsWith(crtValidationInputPrefix));
|
|
2066
|
+
return Object.fromEntries(crtValidationInputKeys.map((key) => {
|
|
2067
|
+
const data = Reflect.getMetadata(key, type);
|
|
2068
|
+
return [key.replace(crtValidationInputPrefix, ''), data];
|
|
2069
|
+
}));
|
|
1904
2070
|
}
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
2071
|
+
/**
|
|
2072
|
+
* @internal
|
|
2073
|
+
*/
|
|
2074
|
+
function getCrtInjectMetadata(type) {
|
|
2075
|
+
const keys = Reflect.getOwnMetadataKeys(type);
|
|
2076
|
+
const crtInjectKeys = keys.filter((x) => x.startsWith(crtInjectPrefix));
|
|
2077
|
+
return Object.fromEntries(crtInjectKeys.map((key) => {
|
|
2078
|
+
const index = Number(key.replace(crtInjectPrefix, ''));
|
|
2079
|
+
const data = Reflect.getMetadata(key, type);
|
|
2080
|
+
return [index, data];
|
|
2081
|
+
}));
|
|
1914
2082
|
}
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
return this.comparisonType === ComparisonType.Is_null;
|
|
1922
|
-
}
|
|
1923
|
-
clone() {
|
|
1924
|
-
return new IsNullFilter(this.comparisonType, this.leftExpression);
|
|
1925
|
-
}
|
|
2083
|
+
/**
|
|
2084
|
+
* @internal
|
|
2085
|
+
*/
|
|
2086
|
+
function getParentType(type) {
|
|
2087
|
+
const parentProto = type.prototype ? Object.getPrototypeOf(type.prototype) : null;
|
|
2088
|
+
return parentProto ? parentProto.constructor : null;
|
|
1926
2089
|
}
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
return classToPlain(this.filters, {
|
|
1941
|
-
exposeUnsetFields: false,
|
|
1942
|
-
excludePrefixes: ['_'],
|
|
1943
|
-
});
|
|
1944
|
-
}
|
|
1945
|
-
/**
|
|
1946
|
-
* Returns filter item by index.
|
|
1947
|
-
* @param index Item index.
|
|
1948
|
-
* @returns Filter.
|
|
1949
|
-
*/
|
|
1950
|
-
getItemByIndex(index) {
|
|
1951
|
-
return this.items[Object.keys(this.items)[index]];
|
|
1952
|
-
}
|
|
1953
|
-
addSchemaColumnFilterWithParameter(comparisonType, columnPath, parameterValue) {
|
|
1954
|
-
const leftExpression = new ColumnExpression({ columnPath });
|
|
1955
|
-
const rightExpression = new ParameterExpression({ value: parameterValue });
|
|
1956
|
-
const filter = new CompareFilter(comparisonType, leftExpression, rightExpression);
|
|
1957
|
-
this.add(filter);
|
|
1958
|
-
}
|
|
1959
|
-
addSchemaColumnInFilterWithParameters(comparisonType, columnPath, parameterValues) {
|
|
1960
|
-
const leftExpression = new ColumnExpression({ columnPath });
|
|
1961
|
-
const expressions = parameterValues.map((singleParameterValue) => new ParameterExpression({
|
|
1962
|
-
value: singleParameterValue,
|
|
1963
|
-
}));
|
|
1964
|
-
const filter = new InFilter(comparisonType, leftExpression, expressions);
|
|
1965
|
-
this.add(filter);
|
|
1966
|
-
}
|
|
1967
|
-
addSchemaColumnIsNullFilter(columnPath) {
|
|
1968
|
-
const leftExpression = new ColumnExpression({ columnPath });
|
|
1969
|
-
const filter = new IsNullFilter(ComparisonType.Is_null, leftExpression);
|
|
1970
|
-
this.add(filter);
|
|
1971
|
-
}
|
|
1972
|
-
addSchemaColumnIsNotNullFilter(columnPath) {
|
|
1973
|
-
const leftExpression = new ColumnExpression({ columnPath });
|
|
1974
|
-
const filter = new IsNullFilter(ComparisonType.Is_not_null, leftExpression);
|
|
1975
|
-
this.add(filter);
|
|
1976
|
-
}
|
|
1977
|
-
addExistsFilter(columnPath, subFilters) {
|
|
1978
|
-
const leftExpression = new ColumnExpression({ columnPath });
|
|
1979
|
-
const filter = new ExistsFilter(leftExpression, subFilters);
|
|
1980
|
-
this.add(filter);
|
|
1981
|
-
}
|
|
1982
|
-
addNotExistsFilter(columnPath, subFilters) {
|
|
1983
|
-
const leftExpression = new ColumnExpression({ columnPath });
|
|
1984
|
-
const filter = new ExistsFilter(leftExpression, subFilters, ComparisonType.Not_exists);
|
|
1985
|
-
this.add(filter);
|
|
1986
|
-
}
|
|
1987
|
-
add(filter, filterKey) {
|
|
1988
|
-
ValidationUtilities.checkArgumentEmpty('filter', filter);
|
|
1989
|
-
const key = filterKey || generateGuid();
|
|
1990
|
-
this.filters.set(key, filter);
|
|
1991
|
-
}
|
|
1992
|
-
clone() {
|
|
1993
|
-
const filterGroup = new FilterGroup(this.logicalOperation);
|
|
1994
|
-
this.filters.forEach((filter, filterKey) => {
|
|
1995
|
-
filterGroup.filters.set(filterKey, filter.clone());
|
|
1996
|
-
});
|
|
1997
|
-
return filterGroup;
|
|
2090
|
+
/**
|
|
2091
|
+
* @internal
|
|
2092
|
+
*/
|
|
2093
|
+
function getTypeDependencies(type) {
|
|
2094
|
+
const paramTypes = Reflect.getOwnMetadata('design:paramtypes', type);
|
|
2095
|
+
if (!paramTypes) {
|
|
2096
|
+
if (type.length > 0) {
|
|
2097
|
+
throw new Error(`Dependency Injection error. Cannot read dependencies of class '${type.name}'. ` +
|
|
2098
|
+
`Please make sure class '${type.name}' has decorator and ` +
|
|
2099
|
+
"'emitDecoratorMetadata' option is enabled in your 'tsconfig.json' file.");
|
|
2100
|
+
}
|
|
2101
|
+
const parentType = getParentType(type);
|
|
2102
|
+
return parentType && parentType !== Object ? getTypeDependencies(parentType) : [];
|
|
1998
2103
|
}
|
|
2104
|
+
const crtInjectMetadata = getCrtInjectMetadata(type);
|
|
2105
|
+
Object.entries(crtInjectMetadata).forEach(([index, token]) => (paramTypes[index] = token));
|
|
2106
|
+
return paramTypes;
|
|
1999
2107
|
}
|
|
2000
|
-
__decorate([
|
|
2001
|
-
Exclude(),
|
|
2002
|
-
__metadata("design:type", Object)
|
|
2003
|
-
], FilterGroup.prototype, "filters", void 0);
|
|
2004
|
-
__decorate([
|
|
2005
|
-
Expose(),
|
|
2006
|
-
__metadata("design:type", Object),
|
|
2007
|
-
__metadata("design:paramtypes", [])
|
|
2008
|
-
], FilterGroup.prototype, "items", null);
|
|
2009
2108
|
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2109
|
+
/**
|
|
2110
|
+
* @internal
|
|
2111
|
+
*/
|
|
2112
|
+
function instantiate(type, resolveDependency) {
|
|
2113
|
+
const deps = getTypeDependencies(type);
|
|
2114
|
+
if (deps.length > 0) {
|
|
2115
|
+
if (!resolveDependency) {
|
|
2116
|
+
throw new Error(`Cannot resolve dependencies for ${type.name}. ` +
|
|
2117
|
+
"Please provide 'resolveDependency' bootstrap option");
|
|
2118
|
+
}
|
|
2119
|
+
const depInstances = deps.map(resolveDependency);
|
|
2120
|
+
return new type(...depInstances);
|
|
2018
2121
|
}
|
|
2122
|
+
return new type();
|
|
2019
2123
|
}
|
|
2020
2124
|
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2125
|
+
/**
|
|
2126
|
+
* @public
|
|
2127
|
+
*/
|
|
2128
|
+
class CrtInputRegistrationConfig {
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
/**
|
|
2132
|
+
* @public
|
|
2133
|
+
* @class BaseRequest
|
|
2134
|
+
* @describe Base definition of request.
|
|
2135
|
+
* @template TEvent
|
|
2136
|
+
*/
|
|
2137
|
+
class BaseRequest {
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
/**
|
|
2141
|
+
* @public
|
|
2142
|
+
* @class DataRequest
|
|
2143
|
+
* @description Definition of data source request.
|
|
2144
|
+
* @extends {BaseRequest} {@link BaseRequest}
|
|
2145
|
+
* @property {string} dataSourceName - name of assigned data source.
|
|
2146
|
+
*/
|
|
2147
|
+
class DataRequest extends BaseRequest {
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
/**
|
|
2151
|
+
* @public
|
|
2152
|
+
* @description Abstract Base Validator class for designing custom validators.
|
|
2153
|
+
* @example
|
|
2154
|
+
* @CrtValidator({
|
|
2155
|
+
* type: 'crt.Required',
|
|
2156
|
+
* })
|
|
2157
|
+
* export class RequiredValidator extends BaseValidator {
|
|
2158
|
+
* protected override async = false;
|
|
2159
|
+
* public validate(controlState: CrtControlState, params?: ValidatorParametersValues): CrtValidationErrors | null {
|
|
2160
|
+
* Implementation here...
|
|
2161
|
+
* }
|
|
2162
|
+
* }
|
|
2163
|
+
*/
|
|
2164
|
+
class BaseValidator {
|
|
2028
2165
|
/**
|
|
2029
|
-
*
|
|
2030
|
-
* @param orderDirection Direction.
|
|
2031
|
-
* @param orderPosition Position.
|
|
2032
|
-
* @returns Self.
|
|
2166
|
+
* @description getter for async/sync indicator
|
|
2033
2167
|
*/
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
ValidationUtilities.checkArgumentEmpty('orderPosition', orderPosition);
|
|
2037
|
-
ValidationUtilities.checkArgumentOutOfRange('orderPosition', orderPosition, { begin: -1 });
|
|
2038
|
-
this.orderDirection = orderDirection;
|
|
2039
|
-
this.orderPosition = orderPosition;
|
|
2040
|
-
return this;
|
|
2168
|
+
get isAsync() {
|
|
2169
|
+
return this.async;
|
|
2041
2170
|
}
|
|
2042
2171
|
/**
|
|
2043
|
-
*
|
|
2044
|
-
* @param options Options.
|
|
2045
|
-
* @returns Self.
|
|
2172
|
+
* @description Function used for validation
|
|
2046
2173
|
*/
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
ValidationUtilities.checkArgumentEmpty('options', options);
|
|
2050
|
-
this.isVisible = (_a = options.isVisible) !== null && _a !== void 0 ? _a : true;
|
|
2051
|
-
return this;
|
|
2174
|
+
get validateFn() {
|
|
2175
|
+
return this.validate.bind(this);
|
|
2052
2176
|
}
|
|
2053
2177
|
/**
|
|
2054
|
-
*
|
|
2055
|
-
* @param caption Caption.
|
|
2056
|
-
* @returns Self.
|
|
2178
|
+
* @internal
|
|
2057
2179
|
*/
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
return this;
|
|
2062
|
-
}
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
class ArithmeticQueryColumn extends BaseQueryColumn {
|
|
2066
|
-
// region Constructors: Public
|
|
2067
|
-
constructor(arithmeticOperation, leftArithmeticOperand, rightArithmeticOperand) {
|
|
2068
|
-
super(new ArithmeticExpression({ arithmeticOperation, leftArithmeticOperand, rightArithmeticOperand }));
|
|
2069
|
-
}
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
|
-
class EntityQueryColumn extends BaseQueryColumn {
|
|
2073
|
-
// region Constructors: Public
|
|
2074
|
-
constructor(columnPath) {
|
|
2075
|
-
super(new ColumnExpression({ columnPath }));
|
|
2076
|
-
}
|
|
2077
|
-
}
|
|
2078
|
-
|
|
2079
|
-
class ParameterQueryColumn extends BaseQueryColumn {
|
|
2080
|
-
// region Constructors: Public
|
|
2081
|
-
constructor(value, dataValueType) {
|
|
2082
|
-
super(new ParameterExpression({ value, dataValueType }));
|
|
2180
|
+
static [Symbol.hasInstance](instance) {
|
|
2181
|
+
var _a;
|
|
2182
|
+
return ((_a = instance === null || instance === void 0 ? void 0 : instance.constructor) === null || _a === void 0 ? void 0 : _a['_instanceOfKey']) === BaseValidator._instanceOfKey;
|
|
2083
2183
|
}
|
|
2084
2184
|
}
|
|
2185
|
+
/**
|
|
2186
|
+
* @internal
|
|
2187
|
+
* @dontChange
|
|
2188
|
+
*/
|
|
2189
|
+
BaseValidator._instanceOfKey = 'devkit_BaseValidator';
|
|
2085
2190
|
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
subFilters,
|
|
2093
|
-
subOrderDirection,
|
|
2094
|
-
subOrderColumn,
|
|
2095
|
-
}));
|
|
2191
|
+
/**
|
|
2192
|
+
* @public
|
|
2193
|
+
*/
|
|
2194
|
+
class LocalizableValue {
|
|
2195
|
+
constructor(key) {
|
|
2196
|
+
this.key = key;
|
|
2096
2197
|
}
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2198
|
+
/**
|
|
2199
|
+
* @internal
|
|
2200
|
+
*/
|
|
2201
|
+
static [Symbol.hasInstance](instance) {
|
|
2202
|
+
var _a;
|
|
2203
|
+
return ((_a = instance === null || instance === void 0 ? void 0 : instance.constructor) === null || _a === void 0 ? void 0 : _a['_instanceOfKey']) === LocalizableValue._instanceOfKey;
|
|
2103
2204
|
}
|
|
2104
2205
|
}
|
|
2206
|
+
/**
|
|
2207
|
+
* @internal
|
|
2208
|
+
* @dontChange
|
|
2209
|
+
*/
|
|
2210
|
+
LocalizableValue._instanceOfKey = 'devkit_LocalizableValue';
|
|
2105
2211
|
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2212
|
+
/**
|
|
2213
|
+
* @internal
|
|
2214
|
+
*/
|
|
2215
|
+
function applyLocalizeMetadataFn(obj, localizeMetadata) {
|
|
2216
|
+
const localizableEntries = objectDeepKeys(obj)
|
|
2217
|
+
.map((path) => ({ path, value: get(obj, path) }))
|
|
2218
|
+
.filter(({ value }) => value instanceof LocalizableValue);
|
|
2219
|
+
if (localizableEntries.length === 0) {
|
|
2220
|
+
return obj;
|
|
2114
2221
|
}
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
// region Constructors: Public
|
|
2119
|
-
constructor(datePartType, functionArgument) {
|
|
2120
|
-
super(new DatePartFunctionExpression({
|
|
2121
|
-
datePartType,
|
|
2122
|
-
functionArgument,
|
|
2123
|
-
}));
|
|
2222
|
+
const localized = cloneDeep(obj);
|
|
2223
|
+
if (!localizeMetadata) {
|
|
2224
|
+
console.error("Unable to localize metadata. 'localizeMetadata' bootstrap option was not provided.");
|
|
2124
2225
|
}
|
|
2125
|
-
|
|
2126
|
-
// region Properties: Public
|
|
2127
|
-
get datePartType() {
|
|
2226
|
+
localizableEntries.forEach(({ path, value }) => {
|
|
2128
2227
|
var _a;
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
}
|
|
2132
|
-
|
|
2133
|
-
class LengthFunctionColumn extends BaseQueryColumn {
|
|
2134
|
-
// region Constructors: Public
|
|
2135
|
-
constructor(functionArgument) {
|
|
2136
|
-
super(new LengthFunctionExpression({ functionArgument }));
|
|
2137
|
-
}
|
|
2228
|
+
const localizedValue = (_a = localizeMetadata === null || localizeMetadata === void 0 ? void 0 : localizeMetadata(value.key)) !== null && _a !== void 0 ? _a : value.key;
|
|
2229
|
+
set(localized, path, localizedValue);
|
|
2230
|
+
});
|
|
2231
|
+
return localized;
|
|
2138
2232
|
}
|
|
2139
2233
|
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2234
|
+
/**
|
|
2235
|
+
* @internal
|
|
2236
|
+
*/
|
|
2237
|
+
function CrtDesignTimeViewElement(config) {
|
|
2238
|
+
return function (type) {
|
|
2239
|
+
const registrationConfig = Object.assign(Object.assign({}, config), { typeRef: type });
|
|
2240
|
+
setDesignTimeViewElementMetadata(registrationConfig, type);
|
|
2241
|
+
};
|
|
2145
2242
|
}
|
|
2146
2243
|
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2244
|
+
/**
|
|
2245
|
+
* @internal
|
|
2246
|
+
*/
|
|
2247
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2248
|
+
function CrtRequest(config) {
|
|
2249
|
+
return function (type) {
|
|
2250
|
+
checkTypeNameFormat(config.type, 'RequestTypeName');
|
|
2251
|
+
checkCrtTypeNamePascalCase(config.type);
|
|
2252
|
+
RequestRegistryService.register(config, type);
|
|
2253
|
+
};
|
|
2152
2254
|
}
|
|
2153
2255
|
|
|
2154
2256
|
/**
|
|
@@ -2233,7 +2335,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2233
2335
|
}
|
|
2234
2336
|
// endregion
|
|
2235
2337
|
// region Methods: Private
|
|
2236
|
-
|
|
2338
|
+
_internalAddColumn(key, column) {
|
|
2237
2339
|
if (!this._columns.has(key)) {
|
|
2238
2340
|
this._columns.set(key, column);
|
|
2239
2341
|
}
|
|
@@ -2263,9 +2365,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2263
2365
|
getMetadata() {
|
|
2264
2366
|
return Object.assign(Object.assign({}, super.getMetadata()), { columns: {
|
|
2265
2367
|
items: classToPlain(this._columns, { exposeUnsetFields: false, excludePrefixes: ['_'] }),
|
|
2266
|
-
}, allColumns: false, isDistinct: this.isDistinct, ignoreDisplayValues: false, rowCount: this.rowCount, rowsOffset: this.rowsOffset, isPageable: this._getIsPageable(),
|
|
2267
|
-
// TODO: CRM-61150: https://tscore-task/browse/CRM-61150
|
|
2268
|
-
conditionalValues: this.conditionalValues ? this.conditionalValues : null, isHierarchical: false, hierarchicalMaxDepth: 0, hierarchicalColumnName: null, hierarchicalColumnValue: null, useLocalization: this.useLocalization, useRecordDeactivation: false });
|
|
2368
|
+
}, allColumns: false, isDistinct: this.isDistinct, ignoreDisplayValues: false, rowCount: this.rowCount, rowsOffset: this.rowsOffset, isPageable: this._getIsPageable(), conditionalValues: this.conditionalValues ? this.conditionalValues : null, isHierarchical: false, hierarchicalMaxDepth: 0, hierarchicalColumnName: null, hierarchicalColumnValue: null, useLocalization: this.useLocalization, useRecordDeactivation: false });
|
|
2269
2369
|
}
|
|
2270
2370
|
/**
|
|
2271
2371
|
* Add column.
|
|
@@ -2274,7 +2374,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2274
2374
|
* @returns [BaseQueryColumn] Column instance.
|
|
2275
2375
|
*/
|
|
2276
2376
|
addColumn(column, columnAlias) {
|
|
2277
|
-
this.
|
|
2377
|
+
this._internalAddColumn(columnAlias, column);
|
|
2278
2378
|
return column;
|
|
2279
2379
|
}
|
|
2280
2380
|
/**
|
|
@@ -2286,7 +2386,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2286
2386
|
addSchemaColumn(columnPath, columnAlias) {
|
|
2287
2387
|
ValidationUtilities.checkArgumentEmpty('columnPath', columnPath);
|
|
2288
2388
|
const column = new EntityQueryColumn(columnPath);
|
|
2289
|
-
this.
|
|
2389
|
+
this._internalAddColumn(columnAlias || columnPath, column);
|
|
2290
2390
|
return column;
|
|
2291
2391
|
}
|
|
2292
2392
|
/**
|
|
@@ -2299,7 +2399,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2299
2399
|
*/
|
|
2300
2400
|
addAggregationSubQueryColumn(columnPath, aggregationType, aggregationConfig, columnAlias) {
|
|
2301
2401
|
const column = new AggregationSubQueryColumn(columnPath, aggregationType, aggregationConfig.filter, aggregationConfig.sortByDirection, aggregationConfig.sortByColumn);
|
|
2302
|
-
this.
|
|
2402
|
+
this._internalAddColumn(columnAlias || columnPath, column);
|
|
2303
2403
|
return column;
|
|
2304
2404
|
}
|
|
2305
2405
|
/**
|
|
@@ -2311,7 +2411,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2311
2411
|
*/
|
|
2312
2412
|
addParameterColumn(value, dataValueType, columnAlias) {
|
|
2313
2413
|
const column = new ParameterQueryColumn(value, dataValueType);
|
|
2314
|
-
this.
|
|
2414
|
+
this._internalAddColumn(columnAlias, column);
|
|
2315
2415
|
return column;
|
|
2316
2416
|
}
|
|
2317
2417
|
/**
|
|
@@ -2324,7 +2424,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2324
2424
|
*/
|
|
2325
2425
|
addArithmeticColumn(arithmeticOperation, leftArithmeticOperand, rightArithmeticOperand, columnAlias) {
|
|
2326
2426
|
const column = new ArithmeticQueryColumn(arithmeticOperation, leftArithmeticOperand, rightArithmeticOperand);
|
|
2327
|
-
this.
|
|
2427
|
+
this._internalAddColumn(columnAlias, column);
|
|
2328
2428
|
return column;
|
|
2329
2429
|
}
|
|
2330
2430
|
/**
|
|
@@ -2335,7 +2435,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2335
2435
|
*/
|
|
2336
2436
|
addMacrosFunctionColumn(queryMacrosType, columnAlias) {
|
|
2337
2437
|
const column = new MacrosFunctionColumn(queryMacrosType);
|
|
2338
|
-
this.
|
|
2438
|
+
this._internalAddColumn(columnAlias, column);
|
|
2339
2439
|
return column;
|
|
2340
2440
|
}
|
|
2341
2441
|
/**
|
|
@@ -2348,7 +2448,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2348
2448
|
addDatePartFunctionColumn(columnPath, datePartType, columnAlias) {
|
|
2349
2449
|
const functionArgument = new ColumnExpression({ columnPath });
|
|
2350
2450
|
const column = new DatePartFunctionColumn(datePartType, functionArgument);
|
|
2351
|
-
this.
|
|
2451
|
+
this._internalAddColumn(columnAlias, column);
|
|
2352
2452
|
return column;
|
|
2353
2453
|
}
|
|
2354
2454
|
/**
|
|
@@ -2362,7 +2462,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2362
2462
|
addAggregationFunctionColumn(columnPath, aggregationType, columnAlias, aggregationEvalType = AggregationEvalType.None) {
|
|
2363
2463
|
const functionArgument = new ColumnExpression({ columnPath });
|
|
2364
2464
|
const column = new AggregationFunctionColumn(aggregationType, aggregationEvalType, functionArgument);
|
|
2365
|
-
this.
|
|
2465
|
+
this._internalAddColumn(columnAlias, column);
|
|
2366
2466
|
return column;
|
|
2367
2467
|
}
|
|
2368
2468
|
/**
|
|
@@ -2374,7 +2474,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2374
2474
|
addLengthFunctionColumn(columnPath, columnAlias) {
|
|
2375
2475
|
const functionArgument = new ColumnExpression({ columnPath });
|
|
2376
2476
|
const column = new LengthFunctionColumn(functionArgument);
|
|
2377
|
-
this.
|
|
2477
|
+
this._internalAddColumn(columnAlias, column);
|
|
2378
2478
|
return column;
|
|
2379
2479
|
}
|
|
2380
2480
|
/**
|
|
@@ -2392,7 +2492,7 @@ class EntitySchemaQuery extends BaseFilterableQuery {
|
|
|
2392
2492
|
functionArgument: new ColumnExpression({ columnPath }),
|
|
2393
2493
|
});
|
|
2394
2494
|
const column = new WindowFunctionColumn(functionArgument);
|
|
2395
|
-
this.
|
|
2495
|
+
this._internalAddColumn(columnAlias, column);
|
|
2396
2496
|
return column;
|
|
2397
2497
|
}
|
|
2398
2498
|
}
|
|
@@ -2471,6 +2571,228 @@ __decorate([
|
|
|
2471
2571
|
class SelectLocalizationQuery extends EntitySchemaQuery {
|
|
2472
2572
|
}
|
|
2473
2573
|
|
|
2574
|
+
/**
|
|
2575
|
+
* @internal
|
|
2576
|
+
*/
|
|
2577
|
+
class InterfaceDesignerItemRegistrationConfig {
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
/**
|
|
2581
|
+
* @internal
|
|
2582
|
+
* @class MethodInvokeRequest
|
|
2583
|
+
* @description Definition of invoke method request.
|
|
2584
|
+
* @extends {BaseRequest} {@link BaseRequest}
|
|
2585
|
+
* @property {string} method - method name.
|
|
2586
|
+
* @property {unknown[]} args - arguments passing to the method.
|
|
2587
|
+
*/
|
|
2588
|
+
class MethodInvokeRequest extends BaseRequest {
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
/**
|
|
2592
|
+
* @internal
|
|
2593
|
+
*/
|
|
2594
|
+
var RemoteEntryType;
|
|
2595
|
+
(function (RemoteEntryType) {
|
|
2596
|
+
RemoteEntryType["Script"] = "script";
|
|
2597
|
+
RemoteEntryType["Module"] = "module";
|
|
2598
|
+
})(RemoteEntryType || (RemoteEntryType = {}));
|
|
2599
|
+
|
|
2600
|
+
/**
|
|
2601
|
+
* @public
|
|
2602
|
+
* @description Creatio platform interacts with input's of user-defined component through CrtInput decorator.
|
|
2603
|
+
* @param config {@link CrtInputRegistrationConfig}
|
|
2604
|
+
*
|
|
2605
|
+
* @example
|
|
2606
|
+
* export class AppComponent {
|
|
2607
|
+
* @CrtInput()
|
|
2608
|
+
* public value!: string;
|
|
2609
|
+
* }
|
|
2610
|
+
*/
|
|
2611
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2612
|
+
function CrtInput(config) {
|
|
2613
|
+
return function (target, propertyKey) {
|
|
2614
|
+
if (!config) {
|
|
2615
|
+
config = {
|
|
2616
|
+
propertyBindable: false,
|
|
2617
|
+
};
|
|
2618
|
+
}
|
|
2619
|
+
Reflect.defineMetadata(crtInputPrefix + propertyKey.toString(), config, target.constructor);
|
|
2620
|
+
};
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2623
|
+
/**
|
|
2624
|
+
* @public
|
|
2625
|
+
* @description User-defined components could notify Creatio platform about changes through CrtOutput decorator.
|
|
2626
|
+
* @example
|
|
2627
|
+
* export class AppComponent {
|
|
2628
|
+
* @Input()
|
|
2629
|
+
* @CrtOutput()
|
|
2630
|
+
* public valueChange;
|
|
2631
|
+
* }
|
|
2632
|
+
*/
|
|
2633
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2634
|
+
function CrtOutput() {
|
|
2635
|
+
return function (target, propertyKey) {
|
|
2636
|
+
Reflect.defineMetadata(crtOutputPrefix + propertyKey.toString(), {}, target.constructor);
|
|
2637
|
+
};
|
|
2638
|
+
}
|
|
2639
|
+
|
|
2640
|
+
/**
|
|
2641
|
+
* @public
|
|
2642
|
+
* @description User-defined components receive validationInfo changes through CrtValidationInput decorator.
|
|
2643
|
+
* Make sure you have defined input for every validationInfo input.
|
|
2644
|
+
* To properly declare validationInfo field:
|
|
2645
|
+
* 1. Declare input field inside inputs section. For example `value`
|
|
2646
|
+
* 2. In validationInputs section declare same field which ends with ValidationInfo.
|
|
2647
|
+
* For previous example `valueValidationInfo`
|
|
2648
|
+
*
|
|
2649
|
+
* @example
|
|
2650
|
+
* export class AppComponent {
|
|
2651
|
+
* @CrtInput()
|
|
2652
|
+
public value;
|
|
2653
|
+
*
|
|
2654
|
+
* @CrtValidationInput()
|
|
2655
|
+
* public valueValidationInfo;
|
|
2656
|
+
* }
|
|
2657
|
+
*/
|
|
2658
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2659
|
+
function CrtValidationInput() {
|
|
2660
|
+
return function (target, propertyKey) {
|
|
2661
|
+
Reflect.defineMetadata(crtValidationInputPrefix + propertyKey.toString(), {}, target.constructor);
|
|
2662
|
+
};
|
|
2663
|
+
}
|
|
2664
|
+
|
|
2665
|
+
/**
|
|
2666
|
+
* @internal
|
|
2667
|
+
*/
|
|
2668
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2669
|
+
function CrtViewElement(config) {
|
|
2670
|
+
return function (type) {
|
|
2671
|
+
checkTypeNamePascalCase(config.type);
|
|
2672
|
+
const inputs = getCrtInputsMetadata(type);
|
|
2673
|
+
const outputs = getCrtOutputsMetadata(type);
|
|
2674
|
+
const validationInputs = getCrtValidationInputsMetadata(type);
|
|
2675
|
+
const baseRegistrationConfig = Object.assign(Object.assign({}, config), { inputs,
|
|
2676
|
+
outputs,
|
|
2677
|
+
validationInputs });
|
|
2678
|
+
const registrationConfig = 'selector' in config
|
|
2679
|
+
? Object.assign(Object.assign({}, baseRegistrationConfig), { selector: config.selector }) : Object.assign(Object.assign({}, baseRegistrationConfig), { typeRef: type });
|
|
2680
|
+
setViewElementMetadata(registrationConfig, type);
|
|
2681
|
+
};
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
/**
|
|
2685
|
+
* @public
|
|
2686
|
+
* @description CrtModule decorator is a 'container' where user actually setup elements.
|
|
2687
|
+
* In could contain viewElements, definitions of other CrtModules.
|
|
2688
|
+
* @param moduleDefinition - {@link ModuleDefinition}
|
|
2689
|
+
*
|
|
2690
|
+
* @example
|
|
2691
|
+
* @CrtModule({
|
|
2692
|
+
* viewElements: [AppComponent],
|
|
2693
|
+
* requestHandlers: [SomeRequestHandler],
|
|
2694
|
+
* validators: [SomeValidator],
|
|
2695
|
+
* })
|
|
2696
|
+
* @NgModule({
|
|
2697
|
+
* declarations: [AppComponent],
|
|
2698
|
+
* imports: [BrowserModule],
|
|
2699
|
+
* providers: [],
|
|
2700
|
+
* })
|
|
2701
|
+
* export class AppModule {}
|
|
2702
|
+
*/
|
|
2703
|
+
function CrtModule(moduleDefinition) {
|
|
2704
|
+
return (type) => setModuleMetadata(moduleDefinition, type);
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2707
|
+
// noinspection ES6PreferShortImport
|
|
2708
|
+
/**
|
|
2709
|
+
* @internal
|
|
2710
|
+
*/
|
|
2711
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2712
|
+
function CrtInterfaceDesignerItem(config) {
|
|
2713
|
+
function _applyTypeCaption() {
|
|
2714
|
+
if (!config.typeCaption && config.toolbarConfig) {
|
|
2715
|
+
const toolbarConfig = Array.isArray(config.toolbarConfig)
|
|
2716
|
+
? config.toolbarConfig[0]
|
|
2717
|
+
: config.toolbarConfig;
|
|
2718
|
+
config.typeCaption = toolbarConfig.caption;
|
|
2719
|
+
}
|
|
2720
|
+
}
|
|
2721
|
+
return function (type) {
|
|
2722
|
+
var _a;
|
|
2723
|
+
config.typeRef = type;
|
|
2724
|
+
(_a = config.viewElementGroupType) !== null && _a !== void 0 ? _a : (config.viewElementGroupType = ViewElementGroupType.CustomElements);
|
|
2725
|
+
_applyTypeCaption();
|
|
2726
|
+
setInterfaceDesignerItemMetadata(config, type);
|
|
2727
|
+
};
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
/**
|
|
2731
|
+
* @public
|
|
2732
|
+
* @description
|
|
2733
|
+
* Constructor parameter decorator.
|
|
2734
|
+
* Mark parameter as dependency that should be obtained by token.
|
|
2735
|
+
* @param token - token by which the dependency instance will be obtained
|
|
2736
|
+
* @example
|
|
2737
|
+
* class MyHandler {
|
|
2738
|
+
* constructor(@CrtInject(USER_NAME_TOKEN) userName: string) {}
|
|
2739
|
+
* }
|
|
2740
|
+
*/
|
|
2741
|
+
function CrtInject(token) {
|
|
2742
|
+
return function (target, paramKey, paramIndex) {
|
|
2743
|
+
Reflect.defineMetadata(crtInjectPrefix + paramIndex, token, target);
|
|
2744
|
+
};
|
|
2745
|
+
}
|
|
2746
|
+
|
|
2747
|
+
/**
|
|
2748
|
+
* @internal
|
|
2749
|
+
*/
|
|
2750
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2751
|
+
function CrtValidator(config) {
|
|
2752
|
+
if (!config) {
|
|
2753
|
+
return (type) => { };
|
|
2754
|
+
}
|
|
2755
|
+
return function (type) {
|
|
2756
|
+
checkTypeNameFormat(config.type, 'ValidatorTypeName');
|
|
2757
|
+
const registrationConfig = Object.assign(Object.assign({}, config), { typeRef: type });
|
|
2758
|
+
setValidatorMetadata(registrationConfig, type);
|
|
2759
|
+
};
|
|
2760
|
+
}
|
|
2761
|
+
|
|
2762
|
+
/**
|
|
2763
|
+
* @internal
|
|
2764
|
+
*/
|
|
2765
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2766
|
+
function CrtRequestHandler(config) {
|
|
2767
|
+
if (!config) {
|
|
2768
|
+
return (type) => { };
|
|
2769
|
+
}
|
|
2770
|
+
return function (type) {
|
|
2771
|
+
checkTypeNameFormat(config.type, 'RequestHandlerTypeName');
|
|
2772
|
+
checkCrtTypeNamePascalCase(config.type);
|
|
2773
|
+
setRequestHandlerMetadata(config, type);
|
|
2774
|
+
};
|
|
2775
|
+
}
|
|
2776
|
+
|
|
2777
|
+
/**
|
|
2778
|
+
* @internal
|
|
2779
|
+
*/
|
|
2780
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2781
|
+
function CrtConverter(config) {
|
|
2782
|
+
if (!config) {
|
|
2783
|
+
return (type) => { };
|
|
2784
|
+
}
|
|
2785
|
+
return function (typeRef) {
|
|
2786
|
+
const type = typeof config === 'string' ? config : config.type;
|
|
2787
|
+
checkTypeNameFormat(type, 'converterTypeName');
|
|
2788
|
+
const registrationConfig = {
|
|
2789
|
+
type: type,
|
|
2790
|
+
typeRef: typeRef,
|
|
2791
|
+
};
|
|
2792
|
+
setConverterMetadata(registrationConfig, typeRef);
|
|
2793
|
+
};
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2474
2796
|
/**
|
|
2475
2797
|
* @public
|
|
2476
2798
|
* @description Function allows to register user-defined component as view element in Creatio platform.
|
|
@@ -2560,13 +2882,31 @@ function registerDesignTimeViewElements(types) {
|
|
|
2560
2882
|
function registerValidators(types, options) {
|
|
2561
2883
|
resistantForEach(types, (type) => {
|
|
2562
2884
|
const metadata = getValidatorMetadata(type);
|
|
2563
|
-
const registrationConfig = Object.assign(Object.assign({}, metadata), { instantiate: function () {
|
|
2564
|
-
|
|
2885
|
+
const registrationConfig = Object.assign(Object.assign({}, metadata), { instantiate: function (injectionContext) {
|
|
2886
|
+
const resolveDependency = (options === null || options === void 0 ? void 0 : options.resolveDependency)
|
|
2887
|
+
? (token) => options.resolveDependency(token, injectionContext)
|
|
2888
|
+
: null;
|
|
2889
|
+
return instantiate(type, resolveDependency);
|
|
2565
2890
|
} });
|
|
2566
2891
|
ValidatorRegistry.validate(registrationConfig);
|
|
2567
2892
|
ValidatorRegistry.register(registrationConfig);
|
|
2568
2893
|
});
|
|
2569
2894
|
}
|
|
2895
|
+
/**
|
|
2896
|
+
* @internal
|
|
2897
|
+
*/
|
|
2898
|
+
function registerConverters(types, options) {
|
|
2899
|
+
resistantForEach(types, (type) => {
|
|
2900
|
+
const metadata = getConverterMetadata(type);
|
|
2901
|
+
const registrationConfig = Object.assign(Object.assign({}, metadata), { instantiate: function (injectionContext) {
|
|
2902
|
+
const resolveDependency = (options === null || options === void 0 ? void 0 : options.resolveDependency)
|
|
2903
|
+
? (token) => options.resolveDependency(token, injectionContext)
|
|
2904
|
+
: null;
|
|
2905
|
+
return instantiate(type, resolveDependency);
|
|
2906
|
+
} });
|
|
2907
|
+
ConverterRegistry.register(registrationConfig);
|
|
2908
|
+
});
|
|
2909
|
+
}
|
|
2570
2910
|
/**
|
|
2571
2911
|
* @internal
|
|
2572
2912
|
*/
|
|
@@ -2578,7 +2918,12 @@ function registerRequestHandlers(types, options, remoteName) {
|
|
|
2578
2918
|
resistantForEach(types, (type) => {
|
|
2579
2919
|
const metadata = getRequestHandlerMetadata(type);
|
|
2580
2920
|
let registrationConfig;
|
|
2581
|
-
const createHandler = () =>
|
|
2921
|
+
const createHandler = (injectionContext) => {
|
|
2922
|
+
const resolveDependency = (options === null || options === void 0 ? void 0 : options.resolveDependency)
|
|
2923
|
+
? (token) => options.resolveDependency(token, injectionContext)
|
|
2924
|
+
: null;
|
|
2925
|
+
return instantiate(type, resolveDependency);
|
|
2926
|
+
};
|
|
2582
2927
|
if (options.moduleType === 'host') {
|
|
2583
2928
|
registrationConfig = Object.assign(Object.assign({}, metadata), { source: { type: HandlerSourceType.Host }, createHandler });
|
|
2584
2929
|
}
|
|
@@ -2612,6 +2957,9 @@ function _bootstrapCrtModule(name, type, options) {
|
|
|
2612
2957
|
if (moduleDefinition.validators) {
|
|
2613
2958
|
registerValidators(moduleDefinition.validators, options);
|
|
2614
2959
|
}
|
|
2960
|
+
if (moduleDefinition.converters) {
|
|
2961
|
+
registerConverters(moduleDefinition.converters, options);
|
|
2962
|
+
}
|
|
2615
2963
|
(_a = moduleDefinition.includes) === null || _a === void 0 ? void 0 : _a.forEach((t) => _bootstrapCrtModule(name, t, options));
|
|
2616
2964
|
}
|
|
2617
2965
|
catch (error) {
|
|
@@ -2687,14 +3035,50 @@ function _bootstrapCrtModuleHandlerChainServices(type) {
|
|
|
2687
3035
|
if (moduleDefinition.handlerChainServices) {
|
|
2688
3036
|
registerHandlerChainServices(moduleDefinition.handlerChainServices);
|
|
2689
3037
|
}
|
|
2690
|
-
(_a = moduleDefinition.includes) === null || _a === void 0 ? void 0 : _a.forEach((t) => _bootstrapCrtModuleHandlerChainServices(t));
|
|
3038
|
+
(_a = moduleDefinition.includes) === null || _a === void 0 ? void 0 : _a.forEach((t) => _bootstrapCrtModuleHandlerChainServices(t));
|
|
3039
|
+
}
|
|
3040
|
+
/**
|
|
3041
|
+
* @internal
|
|
3042
|
+
*/
|
|
3043
|
+
function bootstrapCrtModuleHandlerChainServices(type) {
|
|
3044
|
+
_bootstrapCrtModuleHandlerChainServices(type);
|
|
3045
|
+
}
|
|
3046
|
+
|
|
3047
|
+
/**
|
|
3048
|
+
* @public
|
|
3049
|
+
* @abstract
|
|
3050
|
+
* @classdesc Class for designing request handlers.
|
|
3051
|
+
*/
|
|
3052
|
+
class BaseRequestHandler {
|
|
3053
|
+
constructor() {
|
|
3054
|
+
this.handlerChain = HandlerChainService.instance;
|
|
3055
|
+
}
|
|
3056
|
+
get next() {
|
|
3057
|
+
return this._next;
|
|
3058
|
+
}
|
|
3059
|
+
/**
|
|
3060
|
+
* @internal
|
|
3061
|
+
*/
|
|
3062
|
+
static [Symbol.hasInstance](instance) {
|
|
3063
|
+
var _a;
|
|
3064
|
+
return ((_a = instance === null || instance === void 0 ? void 0 : instance.constructor) === null || _a === void 0 ? void 0 : _a['_instanceOfKey']) === BaseRequestHandler._instanceOfKey;
|
|
3065
|
+
}
|
|
3066
|
+
/**
|
|
3067
|
+
* @description Method to set request handler to handler chain.
|
|
3068
|
+
* @param next - link for next request handler - {@link RequestHandler}
|
|
3069
|
+
*/
|
|
3070
|
+
setNext(next) {
|
|
3071
|
+
if (this._next) {
|
|
3072
|
+
throw new NextHandlerAlreadySpecifiedException();
|
|
3073
|
+
}
|
|
3074
|
+
this._next = next;
|
|
3075
|
+
}
|
|
2691
3076
|
}
|
|
2692
3077
|
/**
|
|
2693
3078
|
* @internal
|
|
3079
|
+
* @dontChange
|
|
2694
3080
|
*/
|
|
2695
|
-
|
|
2696
|
-
_bootstrapCrtModuleHandlerChainServices(type);
|
|
2697
|
-
}
|
|
3081
|
+
BaseRequestHandler._instanceOfKey = 'devkit_BaseRequestHandler';
|
|
2698
3082
|
|
|
2699
3083
|
class BaseHandlerChainService {
|
|
2700
3084
|
}
|
|
@@ -2891,6 +3275,27 @@ __decorate([
|
|
|
2891
3275
|
__metadata("design:returntype", Object)
|
|
2892
3276
|
], HttpClientService.prototype, "patch", null);
|
|
2893
3277
|
|
|
3278
|
+
/**
|
|
3279
|
+
* @internal
|
|
3280
|
+
*/
|
|
3281
|
+
var SchemaViewMaskRequestAction;
|
|
3282
|
+
(function (SchemaViewMaskRequestAction) {
|
|
3283
|
+
SchemaViewMaskRequestAction["AddTask"] = "addTask";
|
|
3284
|
+
SchemaViewMaskRequestAction["RemoveTask"] = "removeTask";
|
|
3285
|
+
})(SchemaViewMaskRequestAction || (SchemaViewMaskRequestAction = {}));
|
|
3286
|
+
/**
|
|
3287
|
+
* @internal
|
|
3288
|
+
*/
|
|
3289
|
+
class SchemaViewMaskRequest extends BaseRequest {
|
|
3290
|
+
constructor(action, taskName, $context) {
|
|
3291
|
+
super();
|
|
3292
|
+
this.action = action;
|
|
3293
|
+
this.taskName = taskName;
|
|
3294
|
+
this.$context = $context;
|
|
3295
|
+
this.type = 'crt.SchemaViewMaskRequest';
|
|
3296
|
+
}
|
|
3297
|
+
}
|
|
3298
|
+
|
|
2894
3299
|
/**
|
|
2895
3300
|
* @public
|
|
2896
3301
|
* @classdesc Service to working with mask using handler chain
|
|
@@ -2904,6 +3309,28 @@ class MaskService extends BaseHandlerChainService {
|
|
|
2904
3309
|
*/
|
|
2905
3310
|
this.requestType = 'crt.MaskService';
|
|
2906
3311
|
}
|
|
3312
|
+
/**
|
|
3313
|
+
* @internal
|
|
3314
|
+
* @param taskName
|
|
3315
|
+
* @param context
|
|
3316
|
+
*/
|
|
3317
|
+
showMask(taskName, context) {
|
|
3318
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3319
|
+
const request = new SchemaViewMaskRequest(SchemaViewMaskRequestAction.AddTask, taskName, context);
|
|
3320
|
+
yield HandlerChainService.instance.process(request);
|
|
3321
|
+
});
|
|
3322
|
+
}
|
|
3323
|
+
/**
|
|
3324
|
+
* @internal
|
|
3325
|
+
* @param taskName
|
|
3326
|
+
* @param context
|
|
3327
|
+
*/
|
|
3328
|
+
hideMask(taskName, context) {
|
|
3329
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3330
|
+
const request = new SchemaViewMaskRequest(SchemaViewMaskRequestAction.RemoveTask, taskName, context);
|
|
3331
|
+
yield HandlerChainService.instance.process(request);
|
|
3332
|
+
});
|
|
3333
|
+
}
|
|
2907
3334
|
}
|
|
2908
3335
|
__decorate([
|
|
2909
3336
|
ImplementUsingHandlerChain(),
|
|
@@ -2990,232 +3417,9 @@ var ModelParameterType;
|
|
|
2990
3417
|
ModelParameterType["Never"] = "never";
|
|
2991
3418
|
})(ModelParameterType || (ModelParameterType = {}));
|
|
2992
3419
|
|
|
2993
|
-
/**
|
|
2994
|
-
* @public
|
|
2995
|
-
* @abstract
|
|
2996
|
-
* @classdesc Class for designing request handlers.
|
|
2997
|
-
*/
|
|
2998
|
-
class BaseRequestHandler {
|
|
2999
|
-
constructor() {
|
|
3000
|
-
this.handlerChain = HandlerChainService.instance;
|
|
3001
|
-
}
|
|
3002
|
-
get next() {
|
|
3003
|
-
return this._next;
|
|
3004
|
-
}
|
|
3005
|
-
/**
|
|
3006
|
-
* @internal
|
|
3007
|
-
*/
|
|
3008
|
-
static [Symbol.hasInstance](instance) {
|
|
3009
|
-
var _a;
|
|
3010
|
-
return ((_a = instance === null || instance === void 0 ? void 0 : instance.constructor) === null || _a === void 0 ? void 0 : _a['_instanceOfKey']) === BaseRequestHandler._instanceOfKey;
|
|
3011
|
-
}
|
|
3012
|
-
/**
|
|
3013
|
-
* @description Method to set request handler to handler chain.
|
|
3014
|
-
* @param next - link for next request handler - {@link RequestHandler}
|
|
3015
|
-
*/
|
|
3016
|
-
setNext(next) {
|
|
3017
|
-
if (this._next) {
|
|
3018
|
-
throw new NextHandlerAlreadySpecifiedException();
|
|
3019
|
-
}
|
|
3020
|
-
this._next = next;
|
|
3021
|
-
}
|
|
3022
|
-
}
|
|
3023
|
-
/**
|
|
3024
|
-
* @internal
|
|
3025
|
-
* @dontChange
|
|
3026
|
-
*/
|
|
3027
|
-
BaseRequestHandler._instanceOfKey = 'devkit_BaseRequestHandler';
|
|
3028
|
-
|
|
3029
|
-
/**
|
|
3030
|
-
* @internal
|
|
3031
|
-
*/
|
|
3032
|
-
class InterfaceDesignerItemRegistrationConfig {
|
|
3033
|
-
}
|
|
3034
|
-
|
|
3035
|
-
/**
|
|
3036
|
-
* @internal
|
|
3037
|
-
* @class MethodInvokeRequest
|
|
3038
|
-
* @description Definition of invoke method request.
|
|
3039
|
-
* @extends {BaseRequest} {@link BaseRequest}
|
|
3040
|
-
* @property {string} method - method name.
|
|
3041
|
-
* @property {unknown[]} args - arguments passing to the method.
|
|
3042
|
-
*/
|
|
3043
|
-
class MethodInvokeRequest extends BaseRequest {
|
|
3044
|
-
}
|
|
3045
|
-
|
|
3046
|
-
/**
|
|
3047
|
-
* @internal
|
|
3048
|
-
*/
|
|
3049
|
-
function toAggregationType(aggregationFunction) {
|
|
3050
|
-
switch (aggregationFunction) {
|
|
3051
|
-
case AggregationFunction.Count:
|
|
3052
|
-
return AggregationType.Count;
|
|
3053
|
-
case AggregationFunction.Sum:
|
|
3054
|
-
return AggregationType.Sum;
|
|
3055
|
-
case AggregationFunction.Avg:
|
|
3056
|
-
return AggregationType.Avg;
|
|
3057
|
-
case AggregationFunction.Min:
|
|
3058
|
-
return AggregationType.Min;
|
|
3059
|
-
case AggregationFunction.Max:
|
|
3060
|
-
return AggregationType.Max;
|
|
3061
|
-
case AggregationFunction.TopOne:
|
|
3062
|
-
return AggregationType.TopOne;
|
|
3063
|
-
default:
|
|
3064
|
-
return AggregationType.None;
|
|
3065
|
-
}
|
|
3066
|
-
}
|
|
3067
|
-
/**
|
|
3068
|
-
* @internal
|
|
3069
|
-
*/
|
|
3070
|
-
function toAggregationFunction(aggregationType) {
|
|
3071
|
-
switch (aggregationType) {
|
|
3072
|
-
case AggregationType.Count:
|
|
3073
|
-
return AggregationFunction.Count;
|
|
3074
|
-
case AggregationType.Sum:
|
|
3075
|
-
return AggregationFunction.Sum;
|
|
3076
|
-
case AggregationType.Avg:
|
|
3077
|
-
return AggregationFunction.Avg;
|
|
3078
|
-
case AggregationType.Min:
|
|
3079
|
-
return AggregationFunction.Min;
|
|
3080
|
-
case AggregationType.Max:
|
|
3081
|
-
return AggregationFunction.Max;
|
|
3082
|
-
case AggregationType.TopOne:
|
|
3083
|
-
return AggregationFunction.TopOne;
|
|
3084
|
-
default:
|
|
3085
|
-
return AggregationFunction.None;
|
|
3086
|
-
}
|
|
3087
|
-
}
|
|
3088
|
-
/**
|
|
3089
|
-
* @internal
|
|
3090
|
-
*/
|
|
3091
|
-
function toAggregationEvalType(aggregationEval) {
|
|
3092
|
-
switch (aggregationEval) {
|
|
3093
|
-
case 'all':
|
|
3094
|
-
return AggregationEvalType.All;
|
|
3095
|
-
case 'distinct':
|
|
3096
|
-
return AggregationEvalType.Distinct;
|
|
3097
|
-
default:
|
|
3098
|
-
return AggregationEvalType.None;
|
|
3099
|
-
}
|
|
3100
|
-
}
|
|
3101
|
-
/**
|
|
3102
|
-
* @internal
|
|
3103
|
-
*/
|
|
3104
|
-
function toAggregationEval(aggregationEvalType) {
|
|
3105
|
-
switch (aggregationEvalType) {
|
|
3106
|
-
case AggregationEvalType.All:
|
|
3107
|
-
return 'all';
|
|
3108
|
-
case AggregationEvalType.Distinct:
|
|
3109
|
-
return 'distinct';
|
|
3110
|
-
default:
|
|
3111
|
-
return 'none';
|
|
3112
|
-
}
|
|
3113
|
-
}
|
|
3114
|
-
|
|
3115
|
-
/**
|
|
3116
|
-
* @internal
|
|
3117
|
-
*/
|
|
3118
|
-
function toDatePartType(aggregationFunction) {
|
|
3119
|
-
switch (aggregationFunction) {
|
|
3120
|
-
case 'minute':
|
|
3121
|
-
return DatePartType.HourMinute;
|
|
3122
|
-
case 'hour':
|
|
3123
|
-
return DatePartType.Hour;
|
|
3124
|
-
case 'day':
|
|
3125
|
-
return DatePartType.Day;
|
|
3126
|
-
case 'weekday':
|
|
3127
|
-
return DatePartType.WeekDay;
|
|
3128
|
-
case 'week':
|
|
3129
|
-
return DatePartType.Week;
|
|
3130
|
-
case 'month':
|
|
3131
|
-
return DatePartType.Month;
|
|
3132
|
-
case 'year':
|
|
3133
|
-
return DatePartType.Year;
|
|
3134
|
-
default:
|
|
3135
|
-
return DatePartType.None;
|
|
3136
|
-
}
|
|
3137
|
-
}
|
|
3138
|
-
/**
|
|
3139
|
-
* @internal
|
|
3140
|
-
*/
|
|
3141
|
-
function toDatePart(aggregationType) {
|
|
3142
|
-
switch (aggregationType) {
|
|
3143
|
-
case DatePartType.HourMinute:
|
|
3144
|
-
return 'minute';
|
|
3145
|
-
case DatePartType.Hour:
|
|
3146
|
-
return 'hour';
|
|
3147
|
-
case DatePartType.Day:
|
|
3148
|
-
return 'day';
|
|
3149
|
-
case DatePartType.WeekDay:
|
|
3150
|
-
return 'weekday';
|
|
3151
|
-
case DatePartType.Week:
|
|
3152
|
-
return 'week';
|
|
3153
|
-
case DatePartType.Month:
|
|
3154
|
-
return 'month';
|
|
3155
|
-
case DatePartType.Year:
|
|
3156
|
-
return 'year';
|
|
3157
|
-
default:
|
|
3158
|
-
return 'none';
|
|
3159
|
-
}
|
|
3160
|
-
}
|
|
3161
|
-
|
|
3162
|
-
/**
|
|
3163
|
-
* @internal
|
|
3164
|
-
*/
|
|
3165
|
-
function toStringFunctionType(functionType) {
|
|
3166
|
-
switch (functionType) {
|
|
3167
|
-
case FunctionType.Aggregation:
|
|
3168
|
-
return 'aggregation';
|
|
3169
|
-
case FunctionType.DatePart:
|
|
3170
|
-
return 'datePart';
|
|
3171
|
-
default:
|
|
3172
|
-
return 'none';
|
|
3173
|
-
}
|
|
3174
|
-
}
|
|
3175
|
-
/**
|
|
3176
|
-
* @internal
|
|
3177
|
-
*/
|
|
3178
|
-
function toNumericFunctionType(functionType) {
|
|
3179
|
-
switch (functionType) {
|
|
3180
|
-
case 'aggregation':
|
|
3181
|
-
return FunctionType.Aggregation;
|
|
3182
|
-
case 'datePart':
|
|
3183
|
-
return FunctionType.DatePart;
|
|
3184
|
-
default:
|
|
3185
|
-
return FunctionType.None;
|
|
3186
|
-
}
|
|
3187
|
-
}
|
|
3188
|
-
|
|
3189
|
-
/**
|
|
3190
|
-
* @internal
|
|
3191
|
-
*/
|
|
3192
|
-
function toOrderDirection(sortDirection) {
|
|
3193
|
-
switch (sortDirection) {
|
|
3194
|
-
case 'asc':
|
|
3195
|
-
return OrderDirection.Asc;
|
|
3196
|
-
case 'desc':
|
|
3197
|
-
return OrderDirection.Desc;
|
|
3198
|
-
default:
|
|
3199
|
-
return OrderDirection.None;
|
|
3200
|
-
}
|
|
3201
|
-
}
|
|
3202
|
-
/**
|
|
3203
|
-
* @internal
|
|
3204
|
-
*/
|
|
3205
|
-
function toSortDirection(orderDirection) {
|
|
3206
|
-
switch (orderDirection) {
|
|
3207
|
-
case OrderDirection.Asc:
|
|
3208
|
-
return 'asc';
|
|
3209
|
-
case OrderDirection.Desc:
|
|
3210
|
-
return 'desc';
|
|
3211
|
-
default:
|
|
3212
|
-
return 'none';
|
|
3213
|
-
}
|
|
3214
|
-
}
|
|
3215
|
-
|
|
3216
3420
|
/**
|
|
3217
3421
|
* Generated bundle index. Do not edit.
|
|
3218
3422
|
*/
|
|
3219
3423
|
|
|
3220
|
-
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,
|
|
3424
|
+
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, ConverterRegistry, CrtConverter, CrtDesignTimeViewElement, CrtInject, CrtInput, CrtInputRegistrationConfig, CrtInterfaceDesignerItem, CrtModule, CrtOutput, CrtRequest, CrtRequestHandler, CrtValidationInput, CrtValidator, CrtViewElement, DataRequest, DataSchemaAttributeType, DataSchemaAttributeUsageType, DataSchemaType, 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, 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, RemoteEntryType, RequestHandlerRegistryService, RequestRegistryService, RightsService, SchemaViewMaskRequest, SchemaViewMaskRequestAction, SelectLocalizationQuery, 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, encodeDate, generateGuid, getConverterMetadata, getCrtInputsMetadata, getCrtOutputsMetadata, getCrtValidationInputsMetadata, getDesignTimeViewElementMetadata, getHandlerChainServiceMetadata, getInterfaceDesignerItemMetadata, getModuleMetadata, getRequestHandlerMetadata, getTypeDependencies, getValidatorMetadata, getViewElementMetadata, hasInterfaceDesignerItemMetadata, instantiate, interfaceDesignerItemRegistryKey, isComponentPropertyBindable, isEmptyGuid, isGuid, localize, objectDeepKeys, registerAngularViewElement, registerViewElement, setConverterMetadata, setDesignTimeViewElementMetadata, setInterfaceDesignerItemMetadata, setModuleMetadata, setRequestHandlerMetadata, setValidatorMetadata, setViewElementMetadata, toAggregationEval, toAggregationEvalType, toAggregationFunction, toAggregationType, toDatePart, toDatePartType, toLocalISOString, toNumericFunctionType, toOrderDirection, toPascalCase, toSortDirection, toStringFunctionType, validatorRegistryKey, viewElementRegistryKey };
|
|
3221
3425
|
//# sourceMappingURL=creatio-devkit-common.mjs.map
|