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