@colijnit/ioneconnector 3.1.18 → 3.1.20
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/build/connector.d.ts +30 -29
- package/build/connector.js +67 -64
- package/build/connector.js.map +1 -1
- package/build/connector.unit.test.d.ts +1 -1
- package/build/connector.unit.test.js +108 -108
- package/build/enum/activate-user-account-status.enum.d.ts +6 -6
- package/build/enum/activate-user-account-status.enum.js +10 -10
- package/build/enum/address-format.enum.d.ts +4 -4
- package/build/enum/address-format.enum.js +8 -8
- package/build/enum/backend-language-code.enum.d.ts +6 -6
- package/build/enum/backend-language-code.enum.js +10 -10
- package/build/enum/backend-service-name.enum.d.ts +7 -6
- package/build/enum/backend-service-name.enum.js +11 -10
- package/build/enum/backend-service-name.enum.js.map +1 -1
- package/build/enum/communication-type.enum.d.ts +8 -8
- package/build/enum/communication-type.enum.js +12 -12
- package/build/enum/datasession-service-method.enum.d.ts +13 -13
- package/build/enum/datasession-service-method.enum.js +17 -17
- package/build/enum/db-boolean-value-type.enum.d.ts +12 -12
- package/build/enum/db-boolean-value-type.enum.js +32 -32
- package/build/enum/end-point.enum.d.ts +4 -4
- package/build/enum/end-point.enum.js +8 -8
- package/build/enum/file-type-internal.enum.d.ts +11 -11
- package/build/enum/file-type-internal.enum.js +15 -15
- package/build/enum/file-type.enum.d.ts +5 -5
- package/build/enum/file-type.enum.js +9 -9
- package/build/enum/filter-type.enum.d.ts +4 -4
- package/build/enum/filter-type.enum.js +8 -8
- package/build/enum/health-service-method.enum.d.ts +3 -3
- package/build/enum/health-service-method.enum.js +7 -7
- package/build/enum/language-code.enum.d.ts +7 -7
- package/build/enum/language-code.enum.js +11 -11
- package/build/enum/login-service-method.enum.d.ts +24 -24
- package/build/enum/login-service-method.enum.js +28 -28
- package/build/enum/login-status.enum.d.ts +20 -20
- package/build/enum/login-status.enum.js +24 -24
- package/build/enum/message-type.enum.d.ts +6 -6
- package/build/enum/message-type.enum.js +10 -10
- package/build/enum/object-config-kind.d.ts +9 -9
- package/build/enum/object-config-kind.js +13 -13
- package/build/enum/object-configuration-data-type.enum.d.ts +7 -7
- package/build/enum/object-configuration-data-type.enum.js +11 -11
- package/build/enum/object-configuration-value-type.enum.d.ts +10 -10
- package/build/enum/object-configuration-value-type.enum.js +14 -14
- package/build/enum/object-right-type.enum.d.ts +5 -5
- package/build/enum/object-right-type.enum.js +9 -9
- package/build/enum/one-zero-bool-db-type.enum.d.ts +5 -5
- package/build/enum/one-zero-bool-db-type.enum.js +20 -20
- package/build/enum/public-service-method.enum.d.ts +5 -5
- package/build/enum/public-service-method.enum.js +9 -9
- package/build/enum/reset-password-status.enum.d.ts +5 -5
- package/build/enum/reset-password-status.enum.js +9 -9
- package/build/enum/screen-config-subcategory.enum.d.ts +2 -2
- package/build/enum/screen-config-subcategory.enum.js +2 -2
- package/build/enum/search-data-type.enum.d.ts +4 -4
- package/build/enum/search-data-type.enum.js +8 -8
- package/build/enum/search-property-state.enum.d.ts +5 -5
- package/build/enum/search-property-state.enum.js +9 -9
- package/build/enum/sort-direction.d.ts +5 -5
- package/build/enum/sort-direction.js +12 -12
- package/build/enum/sort-type.enum.d.ts +6 -6
- package/build/enum/sort-type.enum.js +10 -10
- package/build/enum/true-false-db-type.enum.d.ts +5 -5
- package/build/enum/true-false-db-type.enum.js +20 -20
- package/build/enum/user-info-service-method.enum.d.ts +3 -0
- package/build/enum/user-info-service-method.enum.js +8 -0
- package/build/enum/user-info-service-method.enum.js.map +1 -0
- package/build/enum/user-right-type.enum.d.ts +7 -7
- package/build/enum/user-right-type.enum.js +11 -11
- package/build/enum/user-role-type.enum.d.ts +17 -17
- package/build/enum/user-role-type.enum.js +21 -21
- package/build/enum/value-comparison-type.enum.d.ts +15 -15
- package/build/enum/value-comparison-type.enum.js +31 -31
- package/build/enum/yes-no-db-type.enum.d.ts +5 -5
- package/build/enum/yes-no-db-type.enum.js +20 -20
- package/build/factory/business-object-serializer.d.ts +11 -11
- package/build/factory/business-object-serializer.js +145 -145
- package/build/factory/decorators/bo-factory-step.decorator.d.ts +4 -4
- package/build/factory/decorators/bo-factory-step.decorator.js +16 -16
- package/build/factory/decorators/bo-serializer-step.decorator.d.ts +4 -4
- package/build/factory/decorators/bo-serializer-step.decorator.js +16 -16
- package/build/factory/decorators/boolean.decorator.d.ts +12 -12
- package/build/factory/decorators/boolean.decorator.js +73 -73
- package/build/factory/decorators/business-object-data.decorator.d.ts +23 -23
- package/build/factory/decorators/business-object-data.decorator.js +87 -87
- package/build/factory/decorators/co-inject.decorator.d.ts +7 -7
- package/build/factory/decorators/co-inject.decorator.js +54 -54
- package/build/factory/decorators/complex-array.decorator.d.ts +6 -6
- package/build/factory/decorators/complex-array.decorator.js +37 -37
- package/build/factory/decorators/complex-field.decorator.d.ts +6 -6
- package/build/factory/decorators/complex-field.decorator.js +37 -37
- package/build/factory/decorators/date-field.decorator.d.ts +6 -6
- package/build/factory/decorators/date-field.decorator.js +27 -27
- package/build/factory/decorators/db-field-alias.decorator.d.ts +6 -6
- package/build/factory/decorators/db-field-alias.decorator.js +40 -40
- package/build/factory/decorators/db-method-value.decorator.d.ts +5 -5
- package/build/factory/decorators/db-method-value.decorator.js +19 -19
- package/build/factory/decorators/db-number.decorator.d.ts +6 -6
- package/build/factory/decorators/db-number.decorator.js +35 -35
- package/build/factory/decorators/default-send-value.decorator.d.ts +7 -7
- package/build/factory/decorators/default-send-value.decorator.js +53 -53
- package/build/factory/decorators/exclude-when-empty-string.decorator.d.ts +5 -5
- package/build/factory/decorators/exclude-when-empty-string.decorator.js +19 -19
- package/build/factory/decorators/json.decorator.d.ts +6 -6
- package/build/factory/decorators/json.decorator.js +26 -26
- package/build/factory/decorators/map-property.decorator.d.ts +6 -6
- package/build/factory/decorators/map-property.decorator.js +29 -29
- package/build/factory/decorators/no-db-field.decorator.d.ts +5 -5
- package/build/factory/decorators/no-db-field.decorator.js +34 -34
- package/build/factory/decorators/number-string.decorator.d.ts +6 -6
- package/build/factory/decorators/number-string.decorator.js +23 -23
- package/build/factory/decorators/simple-method-tag.decorator.d.ts +6 -6
- package/build/factory/decorators/simple-method-tag.decorator.js +31 -31
- package/build/factory/decorators/simple-property-tag.decorator.d.ts +6 -6
- package/build/factory/decorators/simple-property-tag.decorator.js +38 -38
- package/build/factory/decorators/string-number.decorator.d.ts +7 -7
- package/build/factory/decorators/string-number.decorator.js +30 -30
- package/build/factory/decorators/validate.decorator.d.ts +11 -11
- package/build/factory/decorators/validate.decorator.js +55 -55
- package/build/interface/address-common-shape.interface.d.ts +14 -14
- package/build/interface/address-common-shape.interface.js +2 -2
- package/build/interface/business-object-data-shape.d.ts +19 -19
- package/build/interface/business-object-data-shape.js +2 -2
- package/build/interface/check-precision-and-scale-result.d.ts +4 -4
- package/build/interface/check-precision-and-scale-result.js +2 -2
- package/build/interface/check-within-stepped-bounds-result.d.ts +4 -4
- package/build/interface/check-within-stepped-bounds-result.js +2 -2
- package/build/interface/filter-property.d.ts +9 -9
- package/build/interface/filter-property.js +2 -2
- package/build/interface/login-storage-data.interface.d.ts +10 -10
- package/build/interface/login-storage-data.interface.js +2 -2
- package/build/interface/precision-scale-object.d.ts +4 -4
- package/build/interface/precision-scale-object.js +2 -2
- package/build/interface/search-property.d.ts +11 -11
- package/build/interface/search-property.js +2 -2
- package/build/interface/sort-property.d.ts +11 -11
- package/build/interface/sort-property.js +2 -2
- package/build/interface/text-part.d.ts +4 -4
- package/build/interface/text-part.js +2 -2
- package/build/interface/value-comparison-type-view-wrapper.d.ts +6 -6
- package/build/interface/value-comparison-type-view-wrapper.js +2 -2
- package/build/model/business-object.d.ts +13 -13
- package/build/model/business-object.js +34 -34
- package/build/model/company.bo.d.ts +9 -9
- package/build/model/company.bo.js +13 -13
- package/build/model/constant/java-constants.d.ts +2 -2
- package/build/model/constant/java-constants.js +5 -5
- package/build/model/country.bo.d.ts +11 -11
- package/build/model/country.bo.js +11 -11
- package/build/model/data-service-data.d.ts +15 -15
- package/build/model/data-service-data.js +6 -6
- package/build/model/data-service-response-data.d.ts +19 -19
- package/build/model/data-service-response-data.interface.d.ts +9 -9
- package/build/model/data-service-response-data.interface.js +2 -2
- package/build/model/data-service-response-data.js +57 -57
- package/build/model/data-service-response-exception.d.ts +29 -29
- package/build/model/data-service-response-exception.js +2 -2
- package/build/model/data-service-response-root.d.ts +7 -7
- package/build/model/data-service-response-root.js +2 -2
- package/build/model/default-all-scr-cfg-subcategory.d.ts +2 -2
- package/build/model/default-all-scr-cfg-subcategory.js +4 -4
- package/build/model/default-get-object-configurations-params.d.ts +2 -2
- package/build/model/default-get-object-configurations-params.js +5 -5
- package/build/model/field-validation.d.ts +11 -11
- package/build/model/field-validation.interface.d.ts +6 -6
- package/build/model/field-validation.interface.js +2 -2
- package/build/model/field-validation.js +76 -76
- package/build/model/field-validations-object.d.ts +4 -4
- package/build/model/field-validations-object.interface.d.ts +4 -4
- package/build/model/field-validations-object.interface.js +2 -2
- package/build/model/field-validations-object.js +2 -2
- package/build/model/ione-local-storage-root-object.d.ts +5 -5
- package/build/model/ione-local-storage-root-object.js +9 -9
- package/build/model/keycloak-parameters.bo.d.ts +5 -5
- package/build/model/keycloak-parameters.bo.js +7 -7
- package/build/model/local-storage-root-object.d.ts +4 -4
- package/build/model/local-storage-root-object.js +9 -9
- package/build/model/local-storage-schema-object.d.ts +7 -7
- package/build/model/local-storage-schema-object.js +9 -9
- package/build/model/local-storage-user-object.d.ts +7 -7
- package/build/model/local-storage-user-object.js +6 -6
- package/build/model/login-request.d.ts +15 -15
- package/build/model/login-request.interface.d.ts +12 -12
- package/build/model/login-request.interface.js +2 -2
- package/build/model/login-request.js +6 -6
- package/build/model/login-response.d.ts +36 -36
- package/build/model/login-response.interface.d.ts +22 -22
- package/build/model/login-response.interface.js +2 -2
- package/build/model/login-response.js +57 -57
- package/build/model/login-service-request-data.d.ts +17 -17
- package/build/model/login-service-request-data.js +2 -2
- package/build/model/login.d.ts +16 -16
- package/build/model/login.js +35 -35
- package/build/model/menu-content.bo.d.ts +13 -13
- package/build/model/menu-content.bo.js +13 -13
- package/build/model/object-configuration.d.ts +53 -53
- package/build/model/object-configuration.js +200 -200
- package/build/model/options.d.ts +26 -24
- package/build/model/options.js +16 -16
- package/build/model/options.js.map +1 -1
- package/build/model/paging-parameters.d.ts +15 -15
- package/build/model/paging-parameters.interface.d.ts +6 -6
- package/build/model/paging-parameters.interface.js +6 -6
- package/build/model/paging-parameters.js +37 -37
- package/build/model/public-service-request-data.d.ts +5 -5
- package/build/model/public-service-request-data.js +2 -2
- package/build/model/server-response-data.d.ts +5 -5
- package/build/model/server-response-data.js +2 -2
- package/build/model/server-stack-trace-element.d.ts +7 -7
- package/build/model/server-stack-trace-element.js +2 -2
- package/build/model/session-storage-root-object.d.ts +4 -4
- package/build/model/session-storage-root-object.js +9 -9
- package/build/model/session-storage-schema-object.d.ts +7 -7
- package/build/model/session-storage-schema-object.js +9 -9
- package/build/model/session-storage-user-object.d.ts +6 -6
- package/build/model/session-storage-user-object.js +10 -10
- package/build/model/session.d.ts +6 -6
- package/build/model/session.js +6 -6
- package/build/model/token-response.bo.d.ts +5 -5
- package/build/model/token-response.bo.js +7 -7
- package/build/model/user-parameters-values.bo.d.ts +8 -8
- package/build/model/user-parameters-values.bo.js +7 -7
- package/build/model/validation-message.d.ts +13 -13
- package/build/model/validation-message.interface.d.ts +6 -6
- package/build/model/validation-message.interface.js +2 -2
- package/build/model/validation-message.js +48 -48
- package/build/model/validation-result.d.ts +34 -34
- package/build/model/validation-result.interface.d.ts +14 -14
- package/build/model/validation-result.interface.js +2 -2
- package/build/model/validation-result.js +192 -192
- package/build/provider/ajax.service.d.ts +33 -32
- package/build/provider/ajax.service.js +280 -275
- package/build/provider/ajax.service.js.map +1 -1
- package/build/provider/base-backend-connection.service.d.ts +44 -43
- package/build/provider/base-backend-connection.service.js +154 -144
- package/build/provider/base-backend-connection.service.js.map +1 -1
- package/build/service/business-object-factory.d.ts +8 -8
- package/build/service/business-object-factory.js +119 -119
- package/build/service/datasession.service.d.ts +9 -9
- package/build/service/datasession.service.js +26 -26
- package/build/service/encrypt.service.d.ts +6 -6
- package/build/service/encrypt.service.js +30 -30
- package/build/service/encrypt.service.unit.test.d.ts +1 -1
- package/build/service/encrypt.service.unit.test.js +14 -14
- package/build/service/external-jwt-token.service.d.ts +10 -0
- package/build/service/external-jwt-token.service.js +22 -0
- package/build/service/external-jwt-token.service.js.map +1 -0
- package/build/service/health.service.d.ts +10 -10
- package/build/service/health.service.js +34 -34
- package/build/service/internal-jwt-token.service.d.ts +11 -0
- package/build/service/internal-jwt-token.service.js +41 -0
- package/build/service/internal-jwt-token.service.js.map +1 -0
- package/build/service/jwt-token.service.d.ts +12 -12
- package/build/service/jwt-token.service.js +32 -62
- package/build/service/jwt-token.service.js.map +1 -1
- package/build/service/local-storage.service.d.ts +27 -28
- package/build/service/local-storage.service.js +147 -154
- package/build/service/local-storage.service.js.map +1 -1
- package/build/service/login.service.d.ts +45 -45
- package/build/service/login.service.js +312 -312
- package/build/service/public.service.d.ts +12 -12
- package/build/service/public.service.js +36 -36
- package/build/service/session-storage.service.d.ts +18 -18
- package/build/service/session-storage.service.js +116 -116
- package/build/service/user-info.service.d.ts +9 -0
- package/build/service/user-info.service.js +34 -0
- package/build/service/user-info.service.js.map +1 -0
- package/build/tests/int/connector.int.test.d.ts +1 -1
- package/build/tests/int/connector.int.test.js +12 -12
- package/build/type/business-object-id-type.d.ts +4 -4
- package/build/type/business-object-id-type.js +13 -13
- package/build/type/object-configuration-default-value-type.d.ts +1 -1
- package/build/type/object-configuration-default-value-type.js +2 -2
- package/build/utils/array-utils.d.ts +38 -38
- package/build/utils/array-utils.js +375 -375
- package/build/utils/business-object-utils.d.ts +20 -20
- package/build/utils/business-object-utils.js +198 -198
- package/build/utils/date-utils.d.ts +5 -5
- package/build/utils/date-utils.js +24 -24
- package/build/utils/file-utils.d.ts +6 -6
- package/build/utils/file-utils.js +66 -66
- package/build/utils/function/any-nill.function.d.ts +1 -1
- package/build/utils/function/any-nill.function.js +16 -16
- package/build/utils/function/is-nill.function.d.ts +1 -1
- package/build/utils/function/is-nill.function.js +7 -7
- package/build/utils/function/not-nill.function.d.ts +1 -1
- package/build/utils/function/not-nill.function.js +7 -7
- package/build/utils/function-utils.d.ts +4 -4
- package/build/utils/function-utils.js +31 -31
- package/build/utils/image-utils.d.ts +4 -4
- package/build/utils/image-utils.js +28 -28
- package/build/utils/map-utils.d.ts +4 -4
- package/build/utils/map-utils.js +31 -31
- package/build/utils/number-utils.d.ts +39 -39
- package/build/utils/number-utils.js +268 -268
- package/build/utils/object-utils.d.ts +21 -21
- package/build/utils/object-utils.js +247 -247
- package/build/utils/parameter-value-conversion-utils.d.ts +3 -3
- package/build/utils/parameter-value-conversion-utils.js +19 -19
- package/build/utils/promise-utils.d.ts +6 -6
- package/build/utils/promise-utils.js +22 -22
- package/build/utils/ref-code-utils.d.ts +4 -4
- package/build/utils/ref-code-utils.js +19 -19
- package/build/utils/sort-utils.d.ts +12 -12
- package/build/utils/sort-utils.js +120 -120
- package/build/utils/string-utils.d.ts +25 -25
- package/build/utils/string-utils.js +212 -212
- package/build/utils/url-utils.d.ts +4 -4
- package/build/utils/url-utils.js +33 -33
- package/build/validators/communication-type.validator.d.ts +1 -1
- package/build/validators/communication-type.validator.js +16 -16
- package/build/validators/email.validator.d.ts +2 -2
- package/build/validators/email.validator.js +9 -9
- package/build/validators/empty-address.validator.d.ts +3 -3
- package/build/validators/empty-address.validator.js +12 -12
- package/build/validators/empty-array.validator.d.ts +2 -2
- package/build/validators/empty-array.validator.js +14 -14
- package/build/validators/end-date-equal.validator.d.ts +1 -1
- package/build/validators/end-date-equal.validator.js +17 -17
- package/build/validators/end-date.validator.d.ts +1 -1
- package/build/validators/end-date.validator.js +17 -17
- package/build/validators/equal.validator.d.ts +2 -2
- package/build/validators/equal.validator.js +14 -14
- package/build/validators/max-string-length.validator.d.ts +2 -2
- package/build/validators/max-string-length.validator.js +13 -13
- package/build/validators/nl-post-code.validator.d.ts +3 -3
- package/build/validators/nl-post-code.validator.js +14 -14
- package/build/validators/password.validator.d.ts +3 -3
- package/build/validators/password.validator.js +33 -33
- package/build/validators/postal-code-function.validator.d.ts +2 -2
- package/build/validators/postal-code-function.validator.js +19 -19
- package/build/validators/postal-code.validator.d.ts +1 -1
- package/build/validators/postal-code.validator.js +21 -21
- package/build/validators/precision-scale.validator.d.ts +2 -2
- package/build/validators/precision-scale.validator.js +14 -14
- package/build/validators/required.validator.d.ts +2 -2
- package/build/validators/required.validator.js +8 -8
- package/build/validators/social-security-number.validator.d.ts +2 -2
- package/build/validators/social-security-number.validator.js +28 -28
- package/build/validators/space-trim.validator.d.ts +2 -2
- package/build/validators/space-trim.validator.js +12 -12
- package/build/validators/true.validator.d.ts +2 -2
- package/build/validators/true.validator.js +8 -8
- package/package.json +64 -64
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ComplexFieldDecorator = exports.ComplexField = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const not_nill_function_1 = require("../../utils/function/not-nill.function");
|
|
6
|
-
const object_utils_1 = require("../../utils/object-utils");
|
|
7
|
-
const PROP_META_KEY = "complexField";
|
|
8
|
-
function ComplexField(type) {
|
|
9
|
-
return function (target, propertyKey) {
|
|
10
|
-
if (!target || !propertyKey) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
if (!type) {
|
|
14
|
-
console.warn(`@ComplexField(type): type was UNDEFINED. Called on prop (${object_utils_1.ObjectUtils.GetClassName(target)}, ${propertyKey}). ` +
|
|
15
|
-
`Class will not properly serialize and deserialize now. We've always been able to fix this by CHANGING IMPORT ORDERS ` +
|
|
16
|
-
`where both classes and their dependencies are used, e.g. factory, repository or models..`);
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
Reflect.defineMetadata(PROP_META_KEY, type, target, propertyKey);
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
exports.ComplexField = ComplexField;
|
|
23
|
-
class ComplexFieldDecorator {
|
|
24
|
-
static IsComplexField(target, propertyKey) {
|
|
25
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
return ((0, not_nill_function_1.notNill)(Reflect.getMetadata(PROP_META_KEY, target, propertyKey)));
|
|
29
|
-
}
|
|
30
|
-
static GetComplexFieldType(target, propertyKey) {
|
|
31
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
32
|
-
return undefined;
|
|
33
|
-
}
|
|
34
|
-
return Reflect.getMetadata(PROP_META_KEY, target, propertyKey);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.ComplexFieldDecorator = ComplexFieldDecorator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ComplexFieldDecorator = exports.ComplexField = void 0;
|
|
4
|
+
require("reflect-metadata");
|
|
5
|
+
const not_nill_function_1 = require("../../utils/function/not-nill.function");
|
|
6
|
+
const object_utils_1 = require("../../utils/object-utils");
|
|
7
|
+
const PROP_META_KEY = "complexField";
|
|
8
|
+
function ComplexField(type) {
|
|
9
|
+
return function (target, propertyKey) {
|
|
10
|
+
if (!target || !propertyKey) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (!type) {
|
|
14
|
+
console.warn(`@ComplexField(type): type was UNDEFINED. Called on prop (${object_utils_1.ObjectUtils.GetClassName(target)}, ${propertyKey}). ` +
|
|
15
|
+
`Class will not properly serialize and deserialize now. We've always been able to fix this by CHANGING IMPORT ORDERS ` +
|
|
16
|
+
`where both classes and their dependencies are used, e.g. factory, repository or models..`);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
Reflect.defineMetadata(PROP_META_KEY, type, target, propertyKey);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
exports.ComplexField = ComplexField;
|
|
23
|
+
class ComplexFieldDecorator {
|
|
24
|
+
static IsComplexField(target, propertyKey) {
|
|
25
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
return ((0, not_nill_function_1.notNill)(Reflect.getMetadata(PROP_META_KEY, target, propertyKey)));
|
|
29
|
+
}
|
|
30
|
+
static GetComplexFieldType(target, propertyKey) {
|
|
31
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
return Reflect.getMetadata(PROP_META_KEY, target, propertyKey);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.ComplexFieldDecorator = ComplexFieldDecorator;
|
|
38
38
|
//# sourceMappingURL=complex-field.decorator.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
export declare function DateField(): PropertyDecorator;
|
|
3
|
-
export declare class DateFieldFieldDecorator {
|
|
4
|
-
static IsDateField(target: Object, propertyKey: string): boolean;
|
|
5
|
-
static StringAsDate(str: string): Date;
|
|
6
|
-
}
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
export declare function DateField(): PropertyDecorator;
|
|
3
|
+
export declare class DateFieldFieldDecorator {
|
|
4
|
+
static IsDateField(target: Object, propertyKey: string): boolean;
|
|
5
|
+
static StringAsDate(str: string): Date;
|
|
6
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DateFieldFieldDecorator = exports.DateField = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const date_utils_1 = require("../../utils/date-utils");
|
|
6
|
-
const PROP_META_KEY = "dateField";
|
|
7
|
-
function DateField() {
|
|
8
|
-
return function (target, propertyKey) {
|
|
9
|
-
if (!target || !propertyKey) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
Reflect.defineMetadata(PROP_META_KEY, undefined, target, propertyKey);
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
exports.DateField = DateField;
|
|
16
|
-
class DateFieldFieldDecorator {
|
|
17
|
-
static IsDateField(target, propertyKey) {
|
|
18
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
return Reflect.hasMetadata(PROP_META_KEY, target, propertyKey);
|
|
22
|
-
}
|
|
23
|
-
static StringAsDate(str) {
|
|
24
|
-
return date_utils_1.DateUtils.StringAsDate(str);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.DateFieldFieldDecorator = DateFieldFieldDecorator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DateFieldFieldDecorator = exports.DateField = void 0;
|
|
4
|
+
require("reflect-metadata");
|
|
5
|
+
const date_utils_1 = require("../../utils/date-utils");
|
|
6
|
+
const PROP_META_KEY = "dateField";
|
|
7
|
+
function DateField() {
|
|
8
|
+
return function (target, propertyKey) {
|
|
9
|
+
if (!target || !propertyKey) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
Reflect.defineMetadata(PROP_META_KEY, undefined, target, propertyKey);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
exports.DateField = DateField;
|
|
16
|
+
class DateFieldFieldDecorator {
|
|
17
|
+
static IsDateField(target, propertyKey) {
|
|
18
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
return Reflect.hasMetadata(PROP_META_KEY, target, propertyKey);
|
|
22
|
+
}
|
|
23
|
+
static StringAsDate(str) {
|
|
24
|
+
return date_utils_1.DateUtils.StringAsDate(str);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.DateFieldFieldDecorator = DateFieldFieldDecorator;
|
|
28
28
|
//# sourceMappingURL=date-field.decorator.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
export declare function DbFieldAlias(alias: string): PropertyDecorator;
|
|
3
|
-
export declare class DbFieldAliasDecorator {
|
|
4
|
-
static GetDecoratedProperties(target: Object): string[];
|
|
5
|
-
static GetDbAlias(target: Object, propertyKey: string): string;
|
|
6
|
-
}
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
export declare function DbFieldAlias(alias: string): PropertyDecorator;
|
|
3
|
+
export declare class DbFieldAliasDecorator {
|
|
4
|
+
static GetDecoratedProperties(target: Object): string[];
|
|
5
|
+
static GetDbAlias(target: Object, propertyKey: string): string;
|
|
6
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DbFieldAliasDecorator = exports.DbFieldAlias = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const PROP_META_KEY = "dbFldAlias";
|
|
6
|
-
const ALL_PROPS_META_KEY = "dbFldAliasProps";
|
|
7
|
-
function DbFieldAlias(alias) {
|
|
8
|
-
return function (target, propertyKey) {
|
|
9
|
-
if (!target || !propertyKey) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
Reflect.defineMetadata(PROP_META_KEY, alias, target, propertyKey);
|
|
13
|
-
let aliesFields = Reflect.getMetadata(ALL_PROPS_META_KEY, target);
|
|
14
|
-
if (!aliesFields) {
|
|
15
|
-
aliesFields = new Set();
|
|
16
|
-
}
|
|
17
|
-
aliesFields.add(propertyKey);
|
|
18
|
-
Reflect.defineMetadata(ALL_PROPS_META_KEY, aliesFields, target);
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
exports.DbFieldAlias = DbFieldAlias;
|
|
22
|
-
class DbFieldAliasDecorator {
|
|
23
|
-
static GetDecoratedProperties(target) {
|
|
24
|
-
if (!target || typeof target !== "object") {
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
const allProps = Reflect.getMetadata(ALL_PROPS_META_KEY, target);
|
|
28
|
-
if (!allProps) {
|
|
29
|
-
return [];
|
|
30
|
-
}
|
|
31
|
-
return Array.from(allProps);
|
|
32
|
-
}
|
|
33
|
-
static GetDbAlias(target, propertyKey) {
|
|
34
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
35
|
-
return undefined;
|
|
36
|
-
}
|
|
37
|
-
return Reflect.getMetadata(PROP_META_KEY, target, propertyKey);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.DbFieldAliasDecorator = DbFieldAliasDecorator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DbFieldAliasDecorator = exports.DbFieldAlias = void 0;
|
|
4
|
+
require("reflect-metadata");
|
|
5
|
+
const PROP_META_KEY = "dbFldAlias";
|
|
6
|
+
const ALL_PROPS_META_KEY = "dbFldAliasProps";
|
|
7
|
+
function DbFieldAlias(alias) {
|
|
8
|
+
return function (target, propertyKey) {
|
|
9
|
+
if (!target || !propertyKey) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
Reflect.defineMetadata(PROP_META_KEY, alias, target, propertyKey);
|
|
13
|
+
let aliesFields = Reflect.getMetadata(ALL_PROPS_META_KEY, target);
|
|
14
|
+
if (!aliesFields) {
|
|
15
|
+
aliesFields = new Set();
|
|
16
|
+
}
|
|
17
|
+
aliesFields.add(propertyKey);
|
|
18
|
+
Reflect.defineMetadata(ALL_PROPS_META_KEY, aliesFields, target);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
exports.DbFieldAlias = DbFieldAlias;
|
|
22
|
+
class DbFieldAliasDecorator {
|
|
23
|
+
static GetDecoratedProperties(target) {
|
|
24
|
+
if (!target || typeof target !== "object") {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
const allProps = Reflect.getMetadata(ALL_PROPS_META_KEY, target);
|
|
28
|
+
if (!allProps) {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
return Array.from(allProps);
|
|
32
|
+
}
|
|
33
|
+
static GetDbAlias(target, propertyKey) {
|
|
34
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
return Reflect.getMetadata(PROP_META_KEY, target, propertyKey);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.DbFieldAliasDecorator = DbFieldAliasDecorator;
|
|
41
41
|
//# sourceMappingURL=db-field-alias.decorator.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare function DbMethodValue(): MethodDecorator;
|
|
2
|
-
export declare class DbMethodValueDecorator {
|
|
3
|
-
static IsDbMethodValueField(target: Object, propertyKey: string): boolean;
|
|
4
|
-
static GetDecoratedProperties(target: Object): string[];
|
|
5
|
-
}
|
|
1
|
+
export declare function DbMethodValue(): MethodDecorator;
|
|
2
|
+
export declare class DbMethodValueDecorator {
|
|
3
|
+
static IsDbMethodValueField(target: Object, propertyKey: string): boolean;
|
|
4
|
+
static GetDecoratedProperties(target: Object): string[];
|
|
5
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DbMethodValueDecorator = exports.DbMethodValue = void 0;
|
|
4
|
-
const simple_method_tag_decorator_1 = require("./simple-method-tag.decorator");
|
|
5
|
-
const PROP_META_KEY = "dbMethodValue";
|
|
6
|
-
const ALL_PROPS_META_KEY = "dbMethodValues";
|
|
7
|
-
function DbMethodValue() {
|
|
8
|
-
return (0, simple_method_tag_decorator_1.simpleMethodTagDecorator)(PROP_META_KEY, ALL_PROPS_META_KEY);
|
|
9
|
-
}
|
|
10
|
-
exports.DbMethodValue = DbMethodValue;
|
|
11
|
-
class DbMethodValueDecorator {
|
|
12
|
-
static IsDbMethodValueField(target, propertyKey) {
|
|
13
|
-
return simple_method_tag_decorator_1.SimpleMethodTagDecorator.IsDecoratedMethodProperty(target, propertyKey, PROP_META_KEY);
|
|
14
|
-
}
|
|
15
|
-
static GetDecoratedProperties(target) {
|
|
16
|
-
return simple_method_tag_decorator_1.SimpleMethodTagDecorator.GetDecoratedMethodProperties(target, ALL_PROPS_META_KEY);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.DbMethodValueDecorator = DbMethodValueDecorator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DbMethodValueDecorator = exports.DbMethodValue = void 0;
|
|
4
|
+
const simple_method_tag_decorator_1 = require("./simple-method-tag.decorator");
|
|
5
|
+
const PROP_META_KEY = "dbMethodValue";
|
|
6
|
+
const ALL_PROPS_META_KEY = "dbMethodValues";
|
|
7
|
+
function DbMethodValue() {
|
|
8
|
+
return (0, simple_method_tag_decorator_1.simpleMethodTagDecorator)(PROP_META_KEY, ALL_PROPS_META_KEY);
|
|
9
|
+
}
|
|
10
|
+
exports.DbMethodValue = DbMethodValue;
|
|
11
|
+
class DbMethodValueDecorator {
|
|
12
|
+
static IsDbMethodValueField(target, propertyKey) {
|
|
13
|
+
return simple_method_tag_decorator_1.SimpleMethodTagDecorator.IsDecoratedMethodProperty(target, propertyKey, PROP_META_KEY);
|
|
14
|
+
}
|
|
15
|
+
static GetDecoratedProperties(target) {
|
|
16
|
+
return simple_method_tag_decorator_1.SimpleMethodTagDecorator.GetDecoratedMethodProperties(target, ALL_PROPS_META_KEY);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.DbMethodValueDecorator = DbMethodValueDecorator;
|
|
20
20
|
//# sourceMappingURL=db-method-value.decorator.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
export declare function DbNumber(precision?: number, scale?: number): PropertyDecorator;
|
|
3
|
-
export declare class DbNumberDecorator {
|
|
4
|
-
static IsDbNumberField(target: Object, propertyKey: string): boolean;
|
|
5
|
-
static GetDbSafeNumberVal(target: Object, propertyKey: string): number;
|
|
6
|
-
}
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
export declare function DbNumber(precision?: number, scale?: number): PropertyDecorator;
|
|
3
|
+
export declare class DbNumberDecorator {
|
|
4
|
+
static IsDbNumberField(target: Object, propertyKey: string): boolean;
|
|
5
|
+
static GetDbSafeNumberVal(target: Object, propertyKey: string): number;
|
|
6
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DbNumberDecorator = exports.DbNumber = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const not_nill_function_1 = require("../../utils/function/not-nill.function");
|
|
6
|
-
const number_utils_1 = require("../../utils/number-utils");
|
|
7
|
-
const PROP_META_KEY = "dbNumber";
|
|
8
|
-
function DbNumber(precision = 9, scale = 0) {
|
|
9
|
-
return function (target, propertyKey) {
|
|
10
|
-
if (!target || !propertyKey) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
Reflect.defineMetadata(PROP_META_KEY, { precision: precision, scale: scale }, target, propertyKey);
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
exports.DbNumber = DbNumber;
|
|
17
|
-
class DbNumberDecorator {
|
|
18
|
-
static IsDbNumberField(target, propertyKey) {
|
|
19
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
return ((0, not_nill_function_1.notNill)(Reflect.getMetadata(PROP_META_KEY, target, propertyKey)));
|
|
23
|
-
}
|
|
24
|
-
static GetDbSafeNumberVal(target, propertyKey) {
|
|
25
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
const metadata = Reflect.getMetadata(PROP_META_KEY, target, propertyKey);
|
|
29
|
-
if (!metadata) {
|
|
30
|
-
return undefined;
|
|
31
|
-
}
|
|
32
|
-
return number_utils_1.NumberUtils.CheckPrecisionAndScale(target[propertyKey], metadata.precision, metadata.scale).nearestOkNr;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.DbNumberDecorator = DbNumberDecorator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DbNumberDecorator = exports.DbNumber = void 0;
|
|
4
|
+
require("reflect-metadata");
|
|
5
|
+
const not_nill_function_1 = require("../../utils/function/not-nill.function");
|
|
6
|
+
const number_utils_1 = require("../../utils/number-utils");
|
|
7
|
+
const PROP_META_KEY = "dbNumber";
|
|
8
|
+
function DbNumber(precision = 9, scale = 0) {
|
|
9
|
+
return function (target, propertyKey) {
|
|
10
|
+
if (!target || !propertyKey) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
Reflect.defineMetadata(PROP_META_KEY, { precision: precision, scale: scale }, target, propertyKey);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
exports.DbNumber = DbNumber;
|
|
17
|
+
class DbNumberDecorator {
|
|
18
|
+
static IsDbNumberField(target, propertyKey) {
|
|
19
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
return ((0, not_nill_function_1.notNill)(Reflect.getMetadata(PROP_META_KEY, target, propertyKey)));
|
|
23
|
+
}
|
|
24
|
+
static GetDbSafeNumberVal(target, propertyKey) {
|
|
25
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
const metadata = Reflect.getMetadata(PROP_META_KEY, target, propertyKey);
|
|
29
|
+
if (!metadata) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
return number_utils_1.NumberUtils.CheckPrecisionAndScale(target[propertyKey], metadata.precision, metadata.scale).nearestOkNr;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.DbNumberDecorator = DbNumberDecorator;
|
|
36
36
|
//# sourceMappingURL=db-number.decorator.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
export declare function DefaultSendValue(defaultFieldValue?: any): PropertyDecorator;
|
|
3
|
-
export declare class DefaultSendValueDecorator {
|
|
4
|
-
static GetAllDecoratedProperties(target: Object): string[];
|
|
5
|
-
static HasDefaultDecorator(target: Object, propertyKey: string): boolean;
|
|
6
|
-
static GetDefaultValue(target: Object, propertyKey: string): any;
|
|
7
|
-
}
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
export declare function DefaultSendValue(defaultFieldValue?: any): PropertyDecorator;
|
|
3
|
+
export declare class DefaultSendValueDecorator {
|
|
4
|
+
static GetAllDecoratedProperties(target: Object): string[];
|
|
5
|
+
static HasDefaultDecorator(target: Object, propertyKey: string): boolean;
|
|
6
|
+
static GetDefaultValue(target: Object, propertyKey: string): any;
|
|
7
|
+
}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DefaultSendValueDecorator = exports.DefaultSendValue = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const PROP_META_KEY = "defaultFieldValue";
|
|
6
|
-
const ALL_PROPS_META_KEY = "defaultFieldValueProps";
|
|
7
|
-
function DefaultSendValue(defaultFieldValue) {
|
|
8
|
-
return function (target, propertyKey) {
|
|
9
|
-
if (!target || !propertyKey) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
Reflect.defineMetadata(PROP_META_KEY, defaultFieldValue, target, propertyKey);
|
|
13
|
-
let defaultProps = Reflect.getMetadata(ALL_PROPS_META_KEY, target);
|
|
14
|
-
if (!defaultProps) {
|
|
15
|
-
defaultProps = new Set();
|
|
16
|
-
}
|
|
17
|
-
defaultProps.add(propertyKey);
|
|
18
|
-
Reflect.defineMetadata(ALL_PROPS_META_KEY, defaultProps, target);
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
exports.DefaultSendValue = DefaultSendValue;
|
|
22
|
-
class DefaultSendValueDecorator {
|
|
23
|
-
static GetAllDecoratedProperties(target) {
|
|
24
|
-
if (!target || typeof target !== "object") {
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
const allProps = Reflect.getMetadata(ALL_PROPS_META_KEY, target);
|
|
28
|
-
if (!allProps) {
|
|
29
|
-
return [];
|
|
30
|
-
}
|
|
31
|
-
return Array.from(allProps);
|
|
32
|
-
}
|
|
33
|
-
static HasDefaultDecorator(target, propertyKey) {
|
|
34
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
return Reflect.hasMetadata(PROP_META_KEY, target, propertyKey);
|
|
38
|
-
}
|
|
39
|
-
static GetDefaultValue(target, propertyKey) {
|
|
40
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
41
|
-
return undefined;
|
|
42
|
-
}
|
|
43
|
-
let defaultValue = undefined;
|
|
44
|
-
if (this.HasDefaultDecorator(target, propertyKey)) {
|
|
45
|
-
const metaValue = Reflect.getMetadata(PROP_META_KEY, target, propertyKey);
|
|
46
|
-
if (metaValue !== undefined) {
|
|
47
|
-
defaultValue = metaValue;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return defaultValue;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.DefaultSendValueDecorator = DefaultSendValueDecorator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DefaultSendValueDecorator = exports.DefaultSendValue = void 0;
|
|
4
|
+
require("reflect-metadata");
|
|
5
|
+
const PROP_META_KEY = "defaultFieldValue";
|
|
6
|
+
const ALL_PROPS_META_KEY = "defaultFieldValueProps";
|
|
7
|
+
function DefaultSendValue(defaultFieldValue) {
|
|
8
|
+
return function (target, propertyKey) {
|
|
9
|
+
if (!target || !propertyKey) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
Reflect.defineMetadata(PROP_META_KEY, defaultFieldValue, target, propertyKey);
|
|
13
|
+
let defaultProps = Reflect.getMetadata(ALL_PROPS_META_KEY, target);
|
|
14
|
+
if (!defaultProps) {
|
|
15
|
+
defaultProps = new Set();
|
|
16
|
+
}
|
|
17
|
+
defaultProps.add(propertyKey);
|
|
18
|
+
Reflect.defineMetadata(ALL_PROPS_META_KEY, defaultProps, target);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
exports.DefaultSendValue = DefaultSendValue;
|
|
22
|
+
class DefaultSendValueDecorator {
|
|
23
|
+
static GetAllDecoratedProperties(target) {
|
|
24
|
+
if (!target || typeof target !== "object") {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
const allProps = Reflect.getMetadata(ALL_PROPS_META_KEY, target);
|
|
28
|
+
if (!allProps) {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
return Array.from(allProps);
|
|
32
|
+
}
|
|
33
|
+
static HasDefaultDecorator(target, propertyKey) {
|
|
34
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
return Reflect.hasMetadata(PROP_META_KEY, target, propertyKey);
|
|
38
|
+
}
|
|
39
|
+
static GetDefaultValue(target, propertyKey) {
|
|
40
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
let defaultValue = undefined;
|
|
44
|
+
if (this.HasDefaultDecorator(target, propertyKey)) {
|
|
45
|
+
const metaValue = Reflect.getMetadata(PROP_META_KEY, target, propertyKey);
|
|
46
|
+
if (metaValue !== undefined) {
|
|
47
|
+
defaultValue = metaValue;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return defaultValue;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.DefaultSendValueDecorator = DefaultSendValueDecorator;
|
|
54
54
|
//# sourceMappingURL=default-send-value.decorator.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare function ExcludeWhenEmptyString(): PropertyDecorator;
|
|
2
|
-
export declare class ExcludeWhenEmptyStringDecorator {
|
|
3
|
-
static IsExcludeWhenEmptyStringField(target: Object, propertyKey: string): boolean;
|
|
4
|
-
static IsEmptyStringVal(target: Object, propertyKey: string): boolean;
|
|
5
|
-
}
|
|
1
|
+
export declare function ExcludeWhenEmptyString(): PropertyDecorator;
|
|
2
|
+
export declare class ExcludeWhenEmptyStringDecorator {
|
|
3
|
+
static IsExcludeWhenEmptyStringField(target: Object, propertyKey: string): boolean;
|
|
4
|
+
static IsEmptyStringVal(target: Object, propertyKey: string): boolean;
|
|
5
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExcludeWhenEmptyStringDecorator = exports.ExcludeWhenEmptyString = void 0;
|
|
4
|
-
const simple_property_tag_decorator_1 = require("./simple-property-tag.decorator");
|
|
5
|
-
const PROP_META_KEY = "excludeWhenEmptyString";
|
|
6
|
-
const ALL_PROPS_META_KEY = "excludeWhenEmptyStringPrps";
|
|
7
|
-
function ExcludeWhenEmptyString() {
|
|
8
|
-
return (0, simple_property_tag_decorator_1.simplePropertyTagDecorator)(PROP_META_KEY, ALL_PROPS_META_KEY);
|
|
9
|
-
}
|
|
10
|
-
exports.ExcludeWhenEmptyString = ExcludeWhenEmptyString;
|
|
11
|
-
class ExcludeWhenEmptyStringDecorator {
|
|
12
|
-
static IsExcludeWhenEmptyStringField(target, propertyKey) {
|
|
13
|
-
return simple_property_tag_decorator_1.SimplePropertyTagDecorator.IsDecoratedProperty(target, propertyKey, PROP_META_KEY);
|
|
14
|
-
}
|
|
15
|
-
static IsEmptyStringVal(target, propertyKey) {
|
|
16
|
-
return target[propertyKey] === "";
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.ExcludeWhenEmptyStringDecorator = ExcludeWhenEmptyStringDecorator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExcludeWhenEmptyStringDecorator = exports.ExcludeWhenEmptyString = void 0;
|
|
4
|
+
const simple_property_tag_decorator_1 = require("./simple-property-tag.decorator");
|
|
5
|
+
const PROP_META_KEY = "excludeWhenEmptyString";
|
|
6
|
+
const ALL_PROPS_META_KEY = "excludeWhenEmptyStringPrps";
|
|
7
|
+
function ExcludeWhenEmptyString() {
|
|
8
|
+
return (0, simple_property_tag_decorator_1.simplePropertyTagDecorator)(PROP_META_KEY, ALL_PROPS_META_KEY);
|
|
9
|
+
}
|
|
10
|
+
exports.ExcludeWhenEmptyString = ExcludeWhenEmptyString;
|
|
11
|
+
class ExcludeWhenEmptyStringDecorator {
|
|
12
|
+
static IsExcludeWhenEmptyStringField(target, propertyKey) {
|
|
13
|
+
return simple_property_tag_decorator_1.SimplePropertyTagDecorator.IsDecoratedProperty(target, propertyKey, PROP_META_KEY);
|
|
14
|
+
}
|
|
15
|
+
static IsEmptyStringVal(target, propertyKey) {
|
|
16
|
+
return target[propertyKey] === "";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ExcludeWhenEmptyStringDecorator = ExcludeWhenEmptyStringDecorator;
|
|
20
20
|
//# sourceMappingURL=exclude-when-empty-string.decorator.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
export declare function JsonField(): PropertyDecorator;
|
|
3
|
-
export declare class JsonFieldFieldDecorator {
|
|
4
|
-
static IsJsonField(target: Object, propertyKey: string): boolean;
|
|
5
|
-
static StringAsJson(str: string): any;
|
|
6
|
-
}
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
export declare function JsonField(): PropertyDecorator;
|
|
3
|
+
export declare class JsonFieldFieldDecorator {
|
|
4
|
+
static IsJsonField(target: Object, propertyKey: string): boolean;
|
|
5
|
+
static StringAsJson(str: string): any;
|
|
6
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JsonFieldFieldDecorator = exports.JsonField = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const PROP_META_KEY = "jsonField";
|
|
6
|
-
function JsonField() {
|
|
7
|
-
return function (target, propertyKey) {
|
|
8
|
-
if (!target || !propertyKey) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
Reflect.defineMetadata(PROP_META_KEY, undefined, target, propertyKey);
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
exports.JsonField = JsonField;
|
|
15
|
-
class JsonFieldFieldDecorator {
|
|
16
|
-
static IsJsonField(target, propertyKey) {
|
|
17
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
return Reflect.hasMetadata(PROP_META_KEY, target, propertyKey);
|
|
21
|
-
}
|
|
22
|
-
static StringAsJson(str) {
|
|
23
|
-
return JSON.parse(str);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.JsonFieldFieldDecorator = JsonFieldFieldDecorator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JsonFieldFieldDecorator = exports.JsonField = void 0;
|
|
4
|
+
require("reflect-metadata");
|
|
5
|
+
const PROP_META_KEY = "jsonField";
|
|
6
|
+
function JsonField() {
|
|
7
|
+
return function (target, propertyKey) {
|
|
8
|
+
if (!target || !propertyKey) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
Reflect.defineMetadata(PROP_META_KEY, undefined, target, propertyKey);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
exports.JsonField = JsonField;
|
|
15
|
+
class JsonFieldFieldDecorator {
|
|
16
|
+
static IsJsonField(target, propertyKey) {
|
|
17
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
return Reflect.hasMetadata(PROP_META_KEY, target, propertyKey);
|
|
21
|
+
}
|
|
22
|
+
static StringAsJson(str) {
|
|
23
|
+
return JSON.parse(str);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.JsonFieldFieldDecorator = JsonFieldFieldDecorator;
|
|
27
27
|
//# sourceMappingURL=json.decorator.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
export declare function MapProperty(propName: string): PropertyDecorator;
|
|
3
|
-
export declare class MapPropertyDecorator {
|
|
4
|
-
static IsMapProperty(target: Object, propertyKey: string): boolean;
|
|
5
|
-
static GetMapProperty(target: Object, propertyKey: string): any;
|
|
6
|
-
}
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
export declare function MapProperty(propName: string): PropertyDecorator;
|
|
3
|
+
export declare class MapPropertyDecorator {
|
|
4
|
+
static IsMapProperty(target: Object, propertyKey: string): boolean;
|
|
5
|
+
static GetMapProperty(target: Object, propertyKey: string): any;
|
|
6
|
+
}
|