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