@colijnit/ioneconnector 256.1.2 → 256.1.4
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 +31 -31
- package/build/connector.js +73 -70
- 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 -7
- package/build/enum/backend-service-name.enum.js +11 -11
- 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 +25 -24
- package/build/enum/login-service-method.enum.js +29 -28
- package/build/enum/login-service-method.enum.js.map +1 -1
- 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 -3
- package/build/enum/user-info-service-method.enum.js +7 -7
- 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 +11 -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 +16 -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-request.js.map +1 -1
- 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 +29 -26
- 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 +36 -33
- package/build/provider/ajax.service.js +336 -293
- package/build/provider/ajax.service.js.map +1 -1
- package/build/provider/base-backend-connection.service.d.ts +49 -45
- package/build/provider/base-backend-connection.service.js +189 -166
- package/build/provider/base-backend-connection.service.js.map +1 -1
- package/build/service/business-object-factory.d.ts +13 -13
- package/build/service/business-object-factory.js +235 -235
- 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 -10
- package/build/service/external-jwt-token.service.js +21 -21
- 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 -11
- package/build/service/internal-jwt-token.service.js +40 -40
- package/build/service/jwt-token.service.d.ts +12 -12
- package/build/service/jwt-token.service.js +32 -32
- package/build/service/local-storage.service.d.ts +32 -27
- package/build/service/local-storage.service.js +188 -147
- package/build/service/local-storage.service.js.map +1 -1
- package/build/service/login.service.d.ts +51 -45
- package/build/service/login.service.js +318 -312
- package/build/service/login.service.js.map +1 -1
- 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 +23 -18
- package/build/service/session-storage.service.js +162 -120
- package/build/service/session-storage.service.js.map +1 -1
- package/build/service/user-info.service.d.ts +9 -9
- package/build/service/user-info.service.js +33 -33
- 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 +1 -1
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BooleanTextDecorator = exports.BooleanText = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const yes_no_db_type_enum_1 = require("../../enum/yes-no-db-type.enum");
|
|
6
|
-
const true_false_db_type_enum_1 = require("../../enum/true-false-db-type.enum");
|
|
7
|
-
const one_zero_bool_db_type_enum_1 = require("../../enum/one-zero-bool-db-type.enum");
|
|
8
|
-
const db_boolean_value_type_enum_1 = require("../../enum/db-boolean-value-type.enum");
|
|
9
|
-
const PROP_META_KEY_JN = "booleanTextJN";
|
|
10
|
-
const PROP_META_KEY_TF = "booleanTextTF";
|
|
11
|
-
const PROP_META_KEY_10 = "booleanText10";
|
|
12
|
-
function BooleanText(type) {
|
|
13
|
-
return function (target, propertyKey) {
|
|
14
|
-
if (!target || !propertyKey) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
if (!type || type === 'J') {
|
|
18
|
-
Reflect.defineMetadata(PROP_META_KEY_JN, true, target, propertyKey);
|
|
19
|
-
}
|
|
20
|
-
else if (type === 'T') {
|
|
21
|
-
Reflect.defineMetadata(PROP_META_KEY_TF, true, target, propertyKey);
|
|
22
|
-
}
|
|
23
|
-
else if (type === 1) {
|
|
24
|
-
Reflect.defineMetadata(PROP_META_KEY_10, true, target, propertyKey);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
exports.BooleanText = BooleanText;
|
|
29
|
-
class BooleanTextDecorator {
|
|
30
|
-
static IsBooleanTextField(target, propertyKey) {
|
|
31
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
return (Reflect.getMetadata(PROP_META_KEY_JN, target, propertyKey) === true
|
|
35
|
-
||
|
|
36
|
-
Reflect.getMetadata(PROP_META_KEY_TF, target, propertyKey) === true
|
|
37
|
-
||
|
|
38
|
-
Reflect.getMetadata(PROP_META_KEY_10, target, propertyKey) === true);
|
|
39
|
-
}
|
|
40
|
-
static GetLogicalBooleanValue(dbBoolChar) {
|
|
41
|
-
return (0, db_boolean_value_type_enum_1.GetLogicalBooleanValue)(dbBoolChar);
|
|
42
|
-
}
|
|
43
|
-
static GetDbBooleanValue(target, propertyKey) {
|
|
44
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
45
|
-
return undefined;
|
|
46
|
-
}
|
|
47
|
-
let dbBoolVal = undefined;
|
|
48
|
-
const curBoolVal = target[propertyKey];
|
|
49
|
-
if (this._IsJaNeeProp(target, propertyKey)) {
|
|
50
|
-
dbBoolVal = (0, yes_no_db_type_enum_1.GetYesNoDbBooleanValue)(curBoolVal);
|
|
51
|
-
}
|
|
52
|
-
else if (this._IsTrueFalseProp(target, propertyKey)) {
|
|
53
|
-
dbBoolVal = (0, true_false_db_type_enum_1.GetTrueFalseDbBooleanValue)(curBoolVal);
|
|
54
|
-
}
|
|
55
|
-
else if (this._IsZeroOneProp(target, propertyKey)) {
|
|
56
|
-
dbBoolVal = (0, one_zero_bool_db_type_enum_1.GetOneZeroDbBooleanValue)(curBoolVal);
|
|
57
|
-
}
|
|
58
|
-
return dbBoolVal;
|
|
59
|
-
}
|
|
60
|
-
static _IsJaNeeProp(target, propertyKey) {
|
|
61
|
-
return this._IsProp(PROP_META_KEY_JN, target, propertyKey);
|
|
62
|
-
}
|
|
63
|
-
static _IsTrueFalseProp(target, propertyKey) {
|
|
64
|
-
return this._IsProp(PROP_META_KEY_TF, target, propertyKey);
|
|
65
|
-
}
|
|
66
|
-
static _IsZeroOneProp(target, propertyKey) {
|
|
67
|
-
return this._IsProp(PROP_META_KEY_10, target, propertyKey);
|
|
68
|
-
}
|
|
69
|
-
static _IsProp(prop, target, propertyKey) {
|
|
70
|
-
return !!target && !!propertyKey && typeof target === 'object' && Reflect.hasMetadata(prop, target, propertyKey);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.BooleanTextDecorator = BooleanTextDecorator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BooleanTextDecorator = exports.BooleanText = void 0;
|
|
4
|
+
require("reflect-metadata");
|
|
5
|
+
const yes_no_db_type_enum_1 = require("../../enum/yes-no-db-type.enum");
|
|
6
|
+
const true_false_db_type_enum_1 = require("../../enum/true-false-db-type.enum");
|
|
7
|
+
const one_zero_bool_db_type_enum_1 = require("../../enum/one-zero-bool-db-type.enum");
|
|
8
|
+
const db_boolean_value_type_enum_1 = require("../../enum/db-boolean-value-type.enum");
|
|
9
|
+
const PROP_META_KEY_JN = "booleanTextJN";
|
|
10
|
+
const PROP_META_KEY_TF = "booleanTextTF";
|
|
11
|
+
const PROP_META_KEY_10 = "booleanText10";
|
|
12
|
+
function BooleanText(type) {
|
|
13
|
+
return function (target, propertyKey) {
|
|
14
|
+
if (!target || !propertyKey) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (!type || type === 'J') {
|
|
18
|
+
Reflect.defineMetadata(PROP_META_KEY_JN, true, target, propertyKey);
|
|
19
|
+
}
|
|
20
|
+
else if (type === 'T') {
|
|
21
|
+
Reflect.defineMetadata(PROP_META_KEY_TF, true, target, propertyKey);
|
|
22
|
+
}
|
|
23
|
+
else if (type === 1) {
|
|
24
|
+
Reflect.defineMetadata(PROP_META_KEY_10, true, target, propertyKey);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.BooleanText = BooleanText;
|
|
29
|
+
class BooleanTextDecorator {
|
|
30
|
+
static IsBooleanTextField(target, propertyKey) {
|
|
31
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
return (Reflect.getMetadata(PROP_META_KEY_JN, target, propertyKey) === true
|
|
35
|
+
||
|
|
36
|
+
Reflect.getMetadata(PROP_META_KEY_TF, target, propertyKey) === true
|
|
37
|
+
||
|
|
38
|
+
Reflect.getMetadata(PROP_META_KEY_10, target, propertyKey) === true);
|
|
39
|
+
}
|
|
40
|
+
static GetLogicalBooleanValue(dbBoolChar) {
|
|
41
|
+
return (0, db_boolean_value_type_enum_1.GetLogicalBooleanValue)(dbBoolChar);
|
|
42
|
+
}
|
|
43
|
+
static GetDbBooleanValue(target, propertyKey) {
|
|
44
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
let dbBoolVal = undefined;
|
|
48
|
+
const curBoolVal = target[propertyKey];
|
|
49
|
+
if (this._IsJaNeeProp(target, propertyKey)) {
|
|
50
|
+
dbBoolVal = (0, yes_no_db_type_enum_1.GetYesNoDbBooleanValue)(curBoolVal);
|
|
51
|
+
}
|
|
52
|
+
else if (this._IsTrueFalseProp(target, propertyKey)) {
|
|
53
|
+
dbBoolVal = (0, true_false_db_type_enum_1.GetTrueFalseDbBooleanValue)(curBoolVal);
|
|
54
|
+
}
|
|
55
|
+
else if (this._IsZeroOneProp(target, propertyKey)) {
|
|
56
|
+
dbBoolVal = (0, one_zero_bool_db_type_enum_1.GetOneZeroDbBooleanValue)(curBoolVal);
|
|
57
|
+
}
|
|
58
|
+
return dbBoolVal;
|
|
59
|
+
}
|
|
60
|
+
static _IsJaNeeProp(target, propertyKey) {
|
|
61
|
+
return this._IsProp(PROP_META_KEY_JN, target, propertyKey);
|
|
62
|
+
}
|
|
63
|
+
static _IsTrueFalseProp(target, propertyKey) {
|
|
64
|
+
return this._IsProp(PROP_META_KEY_TF, target, propertyKey);
|
|
65
|
+
}
|
|
66
|
+
static _IsZeroOneProp(target, propertyKey) {
|
|
67
|
+
return this._IsProp(PROP_META_KEY_10, target, propertyKey);
|
|
68
|
+
}
|
|
69
|
+
static _IsProp(prop, target, propertyKey) {
|
|
70
|
+
return !!target && !!propertyKey && typeof target === 'object' && Reflect.hasMetadata(prop, target, propertyKey);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.BooleanTextDecorator = BooleanTextDecorator;
|
|
74
74
|
//# sourceMappingURL=boolean.decorator.js.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
import { BusinessObject } from '../../model/business-object';
|
|
3
|
-
import { BusinessObjectDataShape } from '../../interface/business-object-data-shape';
|
|
4
|
-
import { SearchProperty } from '../../interface/search-property';
|
|
5
|
-
import { FilterProperty } from '../../interface/filter-property';
|
|
6
|
-
import { SortProperty } from '../../interface/sort-property';
|
|
7
|
-
export declare function BusinessObjectData(data: BusinessObjectDataShape): ((target: any) => any);
|
|
8
|
-
export declare class BusinessObjectDataDecorator {
|
|
9
|
-
static GetName(modelClass: any): string;
|
|
10
|
-
static GetMapping(modelClass: any): string;
|
|
11
|
-
static GetLabel(modelClass: any): string;
|
|
12
|
-
static GetLabelPlural(modelClass: any): string;
|
|
13
|
-
static GetCodeField(modelClass: any): string;
|
|
14
|
-
static GetGroupField(modelClass: any): string;
|
|
15
|
-
static GetGroupDomainName(modelClass: any): string;
|
|
16
|
-
static GetGroupMasterDataClass(modelClass: any): typeof BusinessObject;
|
|
17
|
-
static GetGroupEnumClass(modelClass: any): any;
|
|
18
|
-
static GetDescriptionField(modelClass: any): string;
|
|
19
|
-
static GetSearchProperties(modelClass: any): SearchProperty[];
|
|
20
|
-
static GetFilterProperties(modelClass: any): FilterProperty[];
|
|
21
|
-
static GetSortProperties(modelClass: any): SortProperty[];
|
|
22
|
-
private static _GetSafeMetaDataValue;
|
|
23
|
-
}
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { BusinessObject } from '../../model/business-object';
|
|
3
|
+
import { BusinessObjectDataShape } from '../../interface/business-object-data-shape';
|
|
4
|
+
import { SearchProperty } from '../../interface/search-property';
|
|
5
|
+
import { FilterProperty } from '../../interface/filter-property';
|
|
6
|
+
import { SortProperty } from '../../interface/sort-property';
|
|
7
|
+
export declare function BusinessObjectData(data: BusinessObjectDataShape): ((target: any) => any);
|
|
8
|
+
export declare class BusinessObjectDataDecorator {
|
|
9
|
+
static GetName(modelClass: any): string;
|
|
10
|
+
static GetMapping(modelClass: any): string;
|
|
11
|
+
static GetLabel(modelClass: any): string;
|
|
12
|
+
static GetLabelPlural(modelClass: any): string;
|
|
13
|
+
static GetCodeField(modelClass: any): string;
|
|
14
|
+
static GetGroupField(modelClass: any): string;
|
|
15
|
+
static GetGroupDomainName(modelClass: any): string;
|
|
16
|
+
static GetGroupMasterDataClass(modelClass: any): typeof BusinessObject;
|
|
17
|
+
static GetGroupEnumClass(modelClass: any): any;
|
|
18
|
+
static GetDescriptionField(modelClass: any): string;
|
|
19
|
+
static GetSearchProperties(modelClass: any): SearchProperty[];
|
|
20
|
+
static GetFilterProperties(modelClass: any): FilterProperty[];
|
|
21
|
+
static GetSortProperties(modelClass: any): SortProperty[];
|
|
22
|
+
private static _GetSafeMetaDataValue;
|
|
23
|
+
}
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BusinessObjectDataDecorator = exports.BusinessObjectData = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const array_utils_1 = require("../../utils/array-utils");
|
|
6
|
-
const NAME_META_KEY = "name";
|
|
7
|
-
const MAPPING_META_KEY = "mapping";
|
|
8
|
-
const LABEL_META_KEY = "label";
|
|
9
|
-
const LABEL_PURAL_META_KEY = "labelPlural";
|
|
10
|
-
const CODE_FIELD_META_KEY = "codeField";
|
|
11
|
-
const GROUP_FIELD_META_KEY = "groupField";
|
|
12
|
-
const GROUP_DOMAIN_NAME_META_KEY = "groupDomainName";
|
|
13
|
-
const GROUP_MASTER_DATA_CLASS = "groupMasterDataClass";
|
|
14
|
-
const GROUP_ENUM_CLASS = "groupEnumClass";
|
|
15
|
-
const DESCRIPTION_FIELD_META_KEY = "descriptionField";
|
|
16
|
-
const SEARCH_PROPERTIES_META_KEY = "searchProperties";
|
|
17
|
-
const FILTER_PROPERTIES_META_KEY = "filterProperties";
|
|
18
|
-
const SORT_PROPERTIES_META_KEY = "sortProperties";
|
|
19
|
-
function BusinessObjectData(data) {
|
|
20
|
-
return (target) => {
|
|
21
|
-
Reflect.defineMetadata(NAME_META_KEY, data.name, target);
|
|
22
|
-
Reflect.defineMetadata(MAPPING_META_KEY, data.mapping, target);
|
|
23
|
-
Reflect.defineMetadata(LABEL_META_KEY, data.label, target);
|
|
24
|
-
Reflect.defineMetadata(LABEL_PURAL_META_KEY, data.labelPlural, target);
|
|
25
|
-
Reflect.defineMetadata(CODE_FIELD_META_KEY, data.codeField, target);
|
|
26
|
-
Reflect.defineMetadata(GROUP_FIELD_META_KEY, data.groupField, target);
|
|
27
|
-
Reflect.defineMetadata(GROUP_DOMAIN_NAME_META_KEY, data.groupDomainName, target);
|
|
28
|
-
Reflect.defineMetadata(GROUP_MASTER_DATA_CLASS, data.groupMasterDataClass, target);
|
|
29
|
-
Reflect.defineMetadata(GROUP_ENUM_CLASS, data.groupEnumClass, target);
|
|
30
|
-
Reflect.defineMetadata(DESCRIPTION_FIELD_META_KEY, data.descriptionField, target);
|
|
31
|
-
Reflect.defineMetadata(SEARCH_PROPERTIES_META_KEY, data.searchProperties, target);
|
|
32
|
-
Reflect.defineMetadata(FILTER_PROPERTIES_META_KEY, data.filterProperties, target);
|
|
33
|
-
Reflect.defineMetadata(SORT_PROPERTIES_META_KEY, data.sortProperties, target);
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
exports.BusinessObjectData = BusinessObjectData;
|
|
37
|
-
class BusinessObjectDataDecorator {
|
|
38
|
-
static GetName(modelClass) {
|
|
39
|
-
if (!modelClass || typeof modelClass === "object") {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
return Reflect.getMetadata(NAME_META_KEY, modelClass);
|
|
43
|
-
}
|
|
44
|
-
static GetMapping(modelClass) {
|
|
45
|
-
return this._GetSafeMetaDataValue(MAPPING_META_KEY, modelClass);
|
|
46
|
-
}
|
|
47
|
-
static GetLabel(modelClass) {
|
|
48
|
-
return this._GetSafeMetaDataValue(LABEL_META_KEY, modelClass);
|
|
49
|
-
}
|
|
50
|
-
static GetLabelPlural(modelClass) {
|
|
51
|
-
return this._GetSafeMetaDataValue(LABEL_PURAL_META_KEY, modelClass);
|
|
52
|
-
}
|
|
53
|
-
static GetCodeField(modelClass) {
|
|
54
|
-
return this._GetSafeMetaDataValue(CODE_FIELD_META_KEY, modelClass);
|
|
55
|
-
}
|
|
56
|
-
static GetGroupField(modelClass) {
|
|
57
|
-
return this._GetSafeMetaDataValue(GROUP_FIELD_META_KEY, modelClass);
|
|
58
|
-
}
|
|
59
|
-
static GetGroupDomainName(modelClass) {
|
|
60
|
-
return this._GetSafeMetaDataValue(GROUP_DOMAIN_NAME_META_KEY, modelClass);
|
|
61
|
-
}
|
|
62
|
-
static GetGroupMasterDataClass(modelClass) {
|
|
63
|
-
return this._GetSafeMetaDataValue(GROUP_MASTER_DATA_CLASS, modelClass);
|
|
64
|
-
}
|
|
65
|
-
static GetGroupEnumClass(modelClass) {
|
|
66
|
-
return this._GetSafeMetaDataValue(GROUP_ENUM_CLASS, modelClass);
|
|
67
|
-
}
|
|
68
|
-
static GetDescriptionField(modelClass) {
|
|
69
|
-
return this._GetSafeMetaDataValue(DESCRIPTION_FIELD_META_KEY, modelClass);
|
|
70
|
-
}
|
|
71
|
-
static GetSearchProperties(modelClass) {
|
|
72
|
-
return array_utils_1.ArrayUtils.CloneArrayAndItsItems(this._GetSafeMetaDataValue(SEARCH_PROPERTIES_META_KEY, modelClass));
|
|
73
|
-
}
|
|
74
|
-
static GetFilterProperties(modelClass) {
|
|
75
|
-
return array_utils_1.ArrayUtils.CloneArrayAndItsItems(this._GetSafeMetaDataValue(FILTER_PROPERTIES_META_KEY, modelClass), undefined, true);
|
|
76
|
-
}
|
|
77
|
-
static GetSortProperties(modelClass) {
|
|
78
|
-
return array_utils_1.ArrayUtils.CloneArrayAndItsItems(this._GetSafeMetaDataValue(SORT_PROPERTIES_META_KEY, modelClass));
|
|
79
|
-
}
|
|
80
|
-
static _GetSafeMetaDataValue(metaProp, modelClass) {
|
|
81
|
-
if (!modelClass) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
return Reflect.getMetadata(metaProp, modelClass);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.BusinessObjectDataDecorator = BusinessObjectDataDecorator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BusinessObjectDataDecorator = exports.BusinessObjectData = void 0;
|
|
4
|
+
require("reflect-metadata");
|
|
5
|
+
const array_utils_1 = require("../../utils/array-utils");
|
|
6
|
+
const NAME_META_KEY = "name";
|
|
7
|
+
const MAPPING_META_KEY = "mapping";
|
|
8
|
+
const LABEL_META_KEY = "label";
|
|
9
|
+
const LABEL_PURAL_META_KEY = "labelPlural";
|
|
10
|
+
const CODE_FIELD_META_KEY = "codeField";
|
|
11
|
+
const GROUP_FIELD_META_KEY = "groupField";
|
|
12
|
+
const GROUP_DOMAIN_NAME_META_KEY = "groupDomainName";
|
|
13
|
+
const GROUP_MASTER_DATA_CLASS = "groupMasterDataClass";
|
|
14
|
+
const GROUP_ENUM_CLASS = "groupEnumClass";
|
|
15
|
+
const DESCRIPTION_FIELD_META_KEY = "descriptionField";
|
|
16
|
+
const SEARCH_PROPERTIES_META_KEY = "searchProperties";
|
|
17
|
+
const FILTER_PROPERTIES_META_KEY = "filterProperties";
|
|
18
|
+
const SORT_PROPERTIES_META_KEY = "sortProperties";
|
|
19
|
+
function BusinessObjectData(data) {
|
|
20
|
+
return (target) => {
|
|
21
|
+
Reflect.defineMetadata(NAME_META_KEY, data.name, target);
|
|
22
|
+
Reflect.defineMetadata(MAPPING_META_KEY, data.mapping, target);
|
|
23
|
+
Reflect.defineMetadata(LABEL_META_KEY, data.label, target);
|
|
24
|
+
Reflect.defineMetadata(LABEL_PURAL_META_KEY, data.labelPlural, target);
|
|
25
|
+
Reflect.defineMetadata(CODE_FIELD_META_KEY, data.codeField, target);
|
|
26
|
+
Reflect.defineMetadata(GROUP_FIELD_META_KEY, data.groupField, target);
|
|
27
|
+
Reflect.defineMetadata(GROUP_DOMAIN_NAME_META_KEY, data.groupDomainName, target);
|
|
28
|
+
Reflect.defineMetadata(GROUP_MASTER_DATA_CLASS, data.groupMasterDataClass, target);
|
|
29
|
+
Reflect.defineMetadata(GROUP_ENUM_CLASS, data.groupEnumClass, target);
|
|
30
|
+
Reflect.defineMetadata(DESCRIPTION_FIELD_META_KEY, data.descriptionField, target);
|
|
31
|
+
Reflect.defineMetadata(SEARCH_PROPERTIES_META_KEY, data.searchProperties, target);
|
|
32
|
+
Reflect.defineMetadata(FILTER_PROPERTIES_META_KEY, data.filterProperties, target);
|
|
33
|
+
Reflect.defineMetadata(SORT_PROPERTIES_META_KEY, data.sortProperties, target);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
exports.BusinessObjectData = BusinessObjectData;
|
|
37
|
+
class BusinessObjectDataDecorator {
|
|
38
|
+
static GetName(modelClass) {
|
|
39
|
+
if (!modelClass || typeof modelClass === "object") {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
return Reflect.getMetadata(NAME_META_KEY, modelClass);
|
|
43
|
+
}
|
|
44
|
+
static GetMapping(modelClass) {
|
|
45
|
+
return this._GetSafeMetaDataValue(MAPPING_META_KEY, modelClass);
|
|
46
|
+
}
|
|
47
|
+
static GetLabel(modelClass) {
|
|
48
|
+
return this._GetSafeMetaDataValue(LABEL_META_KEY, modelClass);
|
|
49
|
+
}
|
|
50
|
+
static GetLabelPlural(modelClass) {
|
|
51
|
+
return this._GetSafeMetaDataValue(LABEL_PURAL_META_KEY, modelClass);
|
|
52
|
+
}
|
|
53
|
+
static GetCodeField(modelClass) {
|
|
54
|
+
return this._GetSafeMetaDataValue(CODE_FIELD_META_KEY, modelClass);
|
|
55
|
+
}
|
|
56
|
+
static GetGroupField(modelClass) {
|
|
57
|
+
return this._GetSafeMetaDataValue(GROUP_FIELD_META_KEY, modelClass);
|
|
58
|
+
}
|
|
59
|
+
static GetGroupDomainName(modelClass) {
|
|
60
|
+
return this._GetSafeMetaDataValue(GROUP_DOMAIN_NAME_META_KEY, modelClass);
|
|
61
|
+
}
|
|
62
|
+
static GetGroupMasterDataClass(modelClass) {
|
|
63
|
+
return this._GetSafeMetaDataValue(GROUP_MASTER_DATA_CLASS, modelClass);
|
|
64
|
+
}
|
|
65
|
+
static GetGroupEnumClass(modelClass) {
|
|
66
|
+
return this._GetSafeMetaDataValue(GROUP_ENUM_CLASS, modelClass);
|
|
67
|
+
}
|
|
68
|
+
static GetDescriptionField(modelClass) {
|
|
69
|
+
return this._GetSafeMetaDataValue(DESCRIPTION_FIELD_META_KEY, modelClass);
|
|
70
|
+
}
|
|
71
|
+
static GetSearchProperties(modelClass) {
|
|
72
|
+
return array_utils_1.ArrayUtils.CloneArrayAndItsItems(this._GetSafeMetaDataValue(SEARCH_PROPERTIES_META_KEY, modelClass));
|
|
73
|
+
}
|
|
74
|
+
static GetFilterProperties(modelClass) {
|
|
75
|
+
return array_utils_1.ArrayUtils.CloneArrayAndItsItems(this._GetSafeMetaDataValue(FILTER_PROPERTIES_META_KEY, modelClass), undefined, true);
|
|
76
|
+
}
|
|
77
|
+
static GetSortProperties(modelClass) {
|
|
78
|
+
return array_utils_1.ArrayUtils.CloneArrayAndItsItems(this._GetSafeMetaDataValue(SORT_PROPERTIES_META_KEY, modelClass));
|
|
79
|
+
}
|
|
80
|
+
static _GetSafeMetaDataValue(metaProp, modelClass) {
|
|
81
|
+
if (!modelClass) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
return Reflect.getMetadata(metaProp, modelClass);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.BusinessObjectDataDecorator = BusinessObjectDataDecorator;
|
|
88
88
|
//# sourceMappingURL=business-object-data.decorator.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
export declare function CoInject(type: any): PropertyDecorator;
|
|
3
|
-
export declare class CoInjectDecorator {
|
|
4
|
-
static GetAllDecoratedProperties(target: Object): string[];
|
|
5
|
-
static IsCoInjectField(target: Object, propertyKey: string): boolean;
|
|
6
|
-
static GetCoInjectFieldType(target: Object, propertyKey: string): any;
|
|
7
|
-
}
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
export declare function CoInject(type: any): PropertyDecorator;
|
|
3
|
+
export declare class CoInjectDecorator {
|
|
4
|
+
static GetAllDecoratedProperties(target: Object): string[];
|
|
5
|
+
static IsCoInjectField(target: Object, propertyKey: string): boolean;
|
|
6
|
+
static GetCoInjectFieldType(target: Object, propertyKey: string): any;
|
|
7
|
+
}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CoInjectDecorator = exports.CoInject = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const object_utils_1 = require("../../utils/object-utils");
|
|
6
|
-
const not_nill_function_1 = require("../../utils/function/not-nill.function");
|
|
7
|
-
const PROP_META_KEY = "coInjectClass";
|
|
8
|
-
const ALL_PROPS_META_KEY = "coInjectClassProps";
|
|
9
|
-
function CoInject(type) {
|
|
10
|
-
return function (target, propertyKey) {
|
|
11
|
-
if (!target || !propertyKey) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
if (!type) {
|
|
15
|
-
console.error(`@CoInject(type): type was UNDEFINED. Called on prop (${object_utils_1.ObjectUtils.GetClassName(target)}, ${propertyKey}). ` +
|
|
16
|
-
`Class will not be given any @CoInject field values now. We've always been able to fix this by CHANGING IMPORT ORDERS ` +
|
|
17
|
-
`where both classes and their dependencies are used, e.g. factory, repository or models..`);
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
Reflect.defineMetadata(PROP_META_KEY, type, target, propertyKey);
|
|
21
|
-
let coInjectProps = Reflect.getMetadata(ALL_PROPS_META_KEY, target);
|
|
22
|
-
if (!coInjectProps) {
|
|
23
|
-
coInjectProps = new Set();
|
|
24
|
-
}
|
|
25
|
-
coInjectProps.add(propertyKey);
|
|
26
|
-
Reflect.defineMetadata(ALL_PROPS_META_KEY, coInjectProps, target);
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
exports.CoInject = CoInject;
|
|
30
|
-
class CoInjectDecorator {
|
|
31
|
-
static GetAllDecoratedProperties(target) {
|
|
32
|
-
if (!target || typeof target !== "object") {
|
|
33
|
-
return [];
|
|
34
|
-
}
|
|
35
|
-
const allProps = Reflect.getMetadata(ALL_PROPS_META_KEY, target);
|
|
36
|
-
if (!allProps) {
|
|
37
|
-
return [];
|
|
38
|
-
}
|
|
39
|
-
return Array.from(allProps);
|
|
40
|
-
}
|
|
41
|
-
static IsCoInjectField(target, propertyKey) {
|
|
42
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
return ((0, not_nill_function_1.notNill)(Reflect.getMetadata(PROP_META_KEY, target, propertyKey)));
|
|
46
|
-
}
|
|
47
|
-
static GetCoInjectFieldType(target, propertyKey) {
|
|
48
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
49
|
-
return undefined;
|
|
50
|
-
}
|
|
51
|
-
return Reflect.getMetadata(PROP_META_KEY, target, propertyKey);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.CoInjectDecorator = CoInjectDecorator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoInjectDecorator = exports.CoInject = void 0;
|
|
4
|
+
require("reflect-metadata");
|
|
5
|
+
const object_utils_1 = require("../../utils/object-utils");
|
|
6
|
+
const not_nill_function_1 = require("../../utils/function/not-nill.function");
|
|
7
|
+
const PROP_META_KEY = "coInjectClass";
|
|
8
|
+
const ALL_PROPS_META_KEY = "coInjectClassProps";
|
|
9
|
+
function CoInject(type) {
|
|
10
|
+
return function (target, propertyKey) {
|
|
11
|
+
if (!target || !propertyKey) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (!type) {
|
|
15
|
+
console.error(`@CoInject(type): type was UNDEFINED. Called on prop (${object_utils_1.ObjectUtils.GetClassName(target)}, ${propertyKey}). ` +
|
|
16
|
+
`Class will not be given any @CoInject field values now. We've always been able to fix this by CHANGING IMPORT ORDERS ` +
|
|
17
|
+
`where both classes and their dependencies are used, e.g. factory, repository or models..`);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
Reflect.defineMetadata(PROP_META_KEY, type, target, propertyKey);
|
|
21
|
+
let coInjectProps = Reflect.getMetadata(ALL_PROPS_META_KEY, target);
|
|
22
|
+
if (!coInjectProps) {
|
|
23
|
+
coInjectProps = new Set();
|
|
24
|
+
}
|
|
25
|
+
coInjectProps.add(propertyKey);
|
|
26
|
+
Reflect.defineMetadata(ALL_PROPS_META_KEY, coInjectProps, target);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
exports.CoInject = CoInject;
|
|
30
|
+
class CoInjectDecorator {
|
|
31
|
+
static GetAllDecoratedProperties(target) {
|
|
32
|
+
if (!target || typeof target !== "object") {
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
const allProps = Reflect.getMetadata(ALL_PROPS_META_KEY, target);
|
|
36
|
+
if (!allProps) {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
return Array.from(allProps);
|
|
40
|
+
}
|
|
41
|
+
static IsCoInjectField(target, propertyKey) {
|
|
42
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
return ((0, not_nill_function_1.notNill)(Reflect.getMetadata(PROP_META_KEY, target, propertyKey)));
|
|
46
|
+
}
|
|
47
|
+
static GetCoInjectFieldType(target, propertyKey) {
|
|
48
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
return Reflect.getMetadata(PROP_META_KEY, target, propertyKey);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.CoInjectDecorator = CoInjectDecorator;
|
|
55
55
|
//# sourceMappingURL=co-inject.decorator.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
export declare function ComplexArray(type: any): PropertyDecorator;
|
|
3
|
-
export declare class ComplexArrayDecorator {
|
|
4
|
-
static IsComplexArray(target: Object, propertyKey: string): boolean;
|
|
5
|
-
static GetComplexArrayType(target: Object, propertyKey: string): any;
|
|
6
|
-
}
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
export declare function ComplexArray(type: any): PropertyDecorator;
|
|
3
|
+
export declare class ComplexArrayDecorator {
|
|
4
|
+
static IsComplexArray(target: Object, propertyKey: string): boolean;
|
|
5
|
+
static GetComplexArrayType(target: Object, propertyKey: string): any;
|
|
6
|
+
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ComplexArrayDecorator = exports.ComplexArray = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const object_utils_1 = require("../../utils/object-utils");
|
|
6
|
-
const not_nill_function_1 = require("../../utils/function/not-nill.function");
|
|
7
|
-
const PROP_META_KEY = "complexArray";
|
|
8
|
-
function ComplexArray(type) {
|
|
9
|
-
return function (target, propertyKey) {
|
|
10
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
if (!type) {
|
|
14
|
-
console.warn(`@ComplexArray(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.ComplexArray = ComplexArray;
|
|
23
|
-
class ComplexArrayDecorator {
|
|
24
|
-
static IsComplexArray(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 GetComplexArrayType(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.ComplexArrayDecorator = ComplexArrayDecorator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ComplexArrayDecorator = exports.ComplexArray = void 0;
|
|
4
|
+
require("reflect-metadata");
|
|
5
|
+
const object_utils_1 = require("../../utils/object-utils");
|
|
6
|
+
const not_nill_function_1 = require("../../utils/function/not-nill.function");
|
|
7
|
+
const PROP_META_KEY = "complexArray";
|
|
8
|
+
function ComplexArray(type) {
|
|
9
|
+
return function (target, propertyKey) {
|
|
10
|
+
if (!target || !propertyKey || typeof target !== "object") {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (!type) {
|
|
14
|
+
console.warn(`@ComplexArray(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.ComplexArray = ComplexArray;
|
|
23
|
+
class ComplexArrayDecorator {
|
|
24
|
+
static IsComplexArray(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 GetComplexArrayType(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.ComplexArrayDecorator = ComplexArrayDecorator;
|
|
38
38
|
//# sourceMappingURL=complex-array.decorator.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
export declare function ComplexField(type: any): PropertyDecorator;
|
|
3
|
-
export declare class ComplexFieldDecorator {
|
|
4
|
-
static IsComplexField(target: Object, propertyKey: string): boolean;
|
|
5
|
-
static GetComplexFieldType(target: Object, propertyKey: string): any;
|
|
6
|
-
}
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
export declare function ComplexField(type: any): PropertyDecorator;
|
|
3
|
+
export declare class ComplexFieldDecorator {
|
|
4
|
+
static IsComplexField(target: Object, propertyKey: string): boolean;
|
|
5
|
+
static GetComplexFieldType(target: Object, propertyKey: string): any;
|
|
6
|
+
}
|