@colijnit/transactionapi 1.1.52 → 1.1.53
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/enum/address-format.enum.js +4 -2
- package/build/enum/article-method.enum.js +4 -2
- package/build/enum/article-object-name.enum.js +4 -2
- package/build/enum/article-operation.enum.js +4 -2
- package/build/enum/backend-service-name.enum.js +4 -2
- package/build/enum/catalog-object-name.enum.js +4 -2
- package/build/enum/connection-endpoint-enum.js +4 -2
- package/build/enum/data-mapping.enum.js +4 -2
- package/build/enum/deco-node-kind.enum.js +4 -2
- package/build/enum/deco-node-type.enum.js +4 -2
- package/build/enum/discount-type.enum.js +4 -2
- package/build/enum/document-object-name.enum.js +4 -2
- package/build/enum/domain-name.enum.js +4 -2
- package/build/enum/filter-type.enum.js +4 -2
- package/build/enum/financial-object-name.enum.js +4 -2
- package/build/enum/general-method.enum.js +4 -2
- package/build/enum/general-object-name.enum.js +4 -2
- package/build/enum/line-confirmation-reason.enum.js +4 -2
- package/build/enum/line-pending-reason.enum.js +4 -2
- package/build/enum/login-service-method.enum.js +4 -2
- package/build/enum/logistics-method.enum.js +4 -2
- package/build/enum/master-data-method-name.enum.js +4 -2
- package/build/enum/master-data-object-name.enum.js +4 -2
- package/build/enum/master-data-operation-name.enum.js +4 -2
- package/build/enum/module-name.enum.js +4 -2
- package/build/enum/node-type.enum.js +4 -2
- package/build/enum/one-zero-bool-db-type.enum.js +6 -3
- package/build/enum/operation-name.enum.js +4 -2
- package/build/enum/payment-method.enum.js +4 -2
- package/build/enum/pending-reason-type.enum.js +4 -2
- package/build/enum/pricing-method.enum.js +4 -2
- package/build/enum/print-service-method.enum.js +4 -2
- package/build/enum/public-service-method.enum.js +4 -2
- package/build/enum/public-service-method.js +4 -2
- package/build/enum/purchase-advice-method.enum.js +4 -2
- package/build/enum/purchase-advice-object-name.enum.js +4 -2
- package/build/enum/quantity-in-historic-state.enum.js +4 -2
- package/build/enum/refcode/commission-code-type.enum.js +4 -2
- package/build/enum/refcode/document-publication.enum.js +4 -2
- package/build/enum/refcode/good-type.enum.js +4 -2
- package/build/enum/refcode/price-list-type.enum.js +4 -2
- package/build/enum/refcode/ref-type.enum.js +4 -2
- package/build/enum/refcode/selector-type.enum.js +4 -2
- package/build/enum/refcode/stock-status.enum.js +6 -3
- package/build/enum/relation-kind.enum.js +4 -2
- package/build/enum/relation-name-kind.enum.js +4 -2
- package/build/enum/relation-object-name.enum.js +4 -2
- package/build/enum/relation-reference-kind.enum.js +4 -2
- package/build/enum/relation-status.enum.js +4 -2
- package/build/enum/reporting-method.enum.js +4 -2
- package/build/enum/retail-transaction-pending-reason.enum.js +4 -2
- package/build/enum/search-data-type.enum.js +4 -2
- package/build/enum/search-period.enum.js +4 -2
- package/build/enum/search-property-state.enum.js +4 -2
- package/build/enum/search-type.enum.js +4 -2
- package/build/enum/sequence-name.enum.js +4 -2
- package/build/enum/sla-publication.enum.js +4 -2
- package/build/enum/sort-direction.js +6 -3
- package/build/enum/sort-type.enum.js +4 -2
- package/build/enum/stock-method.enum.js +4 -2
- package/build/enum/table-name.enum.js +4 -2
- package/build/enum/tag-object-name.enum.js +4 -2
- package/build/enum/tag-operation-name.enum.js +4 -2
- package/build/enum/text-kind-type.enum.js +4 -2
- package/build/enum/transaction-kind.enum.js +4 -2
- package/build/enum/transaction-line-type.enum.js +4 -2
- package/build/enum/transaction-method.enum.js +4 -2
- package/build/enum/transaction-object-name.enum.js +4 -2
- package/build/enum/transaction-operation.enum.js +4 -2
- package/build/ione-api-transaction.d.ts +1 -16
- package/build/ione-api-transaction.js +12 -11
- package/build/model/acceptance-container.bo.d.ts +1 -1
- package/build/model/acceptance-container.bo.js +23 -39
- package/build/model/acceptance-line.bo.d.ts +1 -1
- package/build/model/acceptance-line.bo.js +6 -22
- package/build/model/admin-cash-register-group.bo.d.ts +1 -1
- package/build/model/admin-cash-register-group.bo.js +6 -22
- package/build/model/admin-payment-method.bo.d.ts +1 -1
- package/build/model/admin-payment-method.bo.js +6 -22
- package/build/model/art-quick-sel-o-article.d.ts +3 -3
- package/build/model/art-quick-sel-o-article.js +27 -43
- package/build/model/article-category.d.ts +2 -2
- package/build/model/article-category.js +23 -37
- package/build/model/article-full-object.d.ts +4 -4
- package/build/model/article-full-object.js +42 -56
- package/build/model/article-group-image.d.ts +2 -2
- package/build/model/article-group-image.js +14 -30
- package/build/model/article-group.d.ts +2 -2
- package/build/model/article-group.js +17 -31
- package/build/model/article-list-object-extended.d.ts +2 -2
- package/build/model/article-list-object-extended.js +46 -63
- package/build/model/article-list-object.d.ts +1 -1
- package/build/model/article-list-object.js +16 -17
- package/build/model/article-price.d.ts +2 -2
- package/build/model/article-price.js +6 -22
- package/build/model/article-pricing.d.ts +1 -1
- package/build/model/article-pricing.js +11 -27
- package/build/model/article.d.ts +2 -2
- package/build/model/article.js +60 -76
- package/build/model/atmosphere.d.ts +1 -1
- package/build/model/atmosphere.js +8 -24
- package/build/model/cash-register-group.bo.d.ts +1 -1
- package/build/model/cash-register-group.bo.js +15 -29
- package/build/model/cash-register.d.ts +1 -1
- package/build/model/cash-register.js +10 -23
- package/build/model/change-header-adm-coordinator-request.js +5 -6
- package/build/model/change-header-branch-request.js +5 -6
- package/build/model/change-header-currency-request.js +5 -6
- package/build/model/change-header-delivery-date-definitive-request.js +5 -6
- package/build/model/change-header-delivery-date-request.js +5 -6
- package/build/model/change-header-delivery-method-request.js +5 -6
- package/build/model/change-header-delivery-options-request.js +6 -5
- package/build/model/change-header-dont-send-order-forms-request.js +5 -6
- package/build/model/change-header-invoice-address-request.js +5 -6
- package/build/model/change-header-marketing-code-request.js +5 -6
- package/build/model/change-header-on-hold-codes-request.js +6 -5
- package/build/model/change-header-own-reference-request.js +5 -6
- package/build/model/change-header-partial-delivery-allowed-request.js +5 -6
- package/build/model/change-header-preferred-delivery-date-request.js +5 -6
- package/build/model/change-header-price-kind-request.js +5 -6
- package/build/model/change-header-print-discount-request.js +5 -6
- package/build/model/change-header-relation-reference-request.js +5 -6
- package/build/model/change-header-relation-transaction-date-request.js +5 -6
- package/build/model/change-header-release-transaction-request.js +5 -6
- package/build/model/change-header-remarks-request.js +5 -6
- package/build/model/change-header-to-down-pay-amount-request.js +5 -6
- package/build/model/change-header-to-down-pay-percentage-request.js +5 -6
- package/build/model/change-header-transaction-address-request.js +5 -6
- package/build/model/change-header-transaction-definitive-request.js +5 -6
- package/build/model/change-line-assembly-time-request.js +5 -6
- package/build/model/change-line-collection-code-request.js +5 -6
- package/build/model/change-line-commission-code-request.js +5 -6
- package/build/model/change-line-delivery-date-request.js +10 -11
- package/build/model/change-line-delivery-method-request.js +5 -6
- package/build/model/change-line-discount-request.js +5 -6
- package/build/model/change-line-edit-time-request.js +5 -6
- package/build/model/change-line-good-description-request.js +5 -6
- package/build/model/change-line-price-list-request.js +5 -6
- package/build/model/change-line-price-request.js +5 -6
- package/build/model/change-line-quantity-request.js +5 -6
- package/build/model/change-line-reference-request.js +5 -6
- package/build/model/change-line-sequence-request.js +5 -6
- package/build/model/change-line-supplier-article-number-request.js +5 -6
- package/build/model/change-line-supplier-request.js +5 -6
- package/build/model/change-line-vat-request.js +5 -6
- package/build/model/change-line-warehouse-request.js +5 -6
- package/build/model/code-description.js +6 -5
- package/build/model/color.d.ts +1 -1
- package/build/model/color.js +34 -53
- package/build/model/concept.d.ts +1 -1
- package/build/model/concept.js +8 -24
- package/build/model/constant/java-constants.js +4 -2
- package/build/model/country.bo.d.ts +1 -1
- package/build/model/country.bo.js +9 -25
- package/build/model/create-outstanding-entry-request.js +5 -6
- package/build/model/create-payment-link-request.js +5 -6
- package/build/model/create-payment-link-result.bo.d.ts +1 -1
- package/build/model/create-payment-link-result.bo.js +6 -22
- package/build/model/customer-group.bo.d.ts +1 -1
- package/build/model/customer-group.bo.js +14 -30
- package/build/model/delivery-method.bo.d.ts +1 -1
- package/build/model/delivery-method.bo.js +31 -45
- package/build/model/delivery-option.bo.d.ts +1 -1
- package/build/model/delivery-option.bo.js +10 -23
- package/build/model/delivery-order-status.bo.js +6 -22
- package/build/model/design.d.ts +1 -1
- package/build/model/design.js +8 -24
- package/build/model/doc-delivery-batch.bo.d.ts +1 -1
- package/build/model/doc-delivery-batch.bo.js +6 -22
- package/build/model/down-payment.bo.d.ts +1 -1
- package/build/model/down-payment.bo.js +11 -27
- package/build/model/email-delivery-note-request.bo.js +6 -22
- package/build/model/external-storage.d.ts +1 -1
- package/build/model/external-storage.js +9 -24
- package/build/model/get-article-price-request.d.ts +1 -1
- package/build/model/get-article-price-request.js +5 -6
- package/build/model/get-articles-for-catalog.js +6 -5
- package/build/model/get-postal-code-retrieval-output-params.js +9 -12
- package/build/model/get-purchase-order-confirmation.js +5 -6
- package/build/model/get-purchase-portal-line.js +5 -6
- package/build/model/get-stock-info-output-params.js +8 -7
- package/build/model/goods-receipt-status-with-history.bo.js +6 -22
- package/build/model/goods-receipt-status.bo.js +6 -22
- package/build/model/header-operation-status.bo.js +6 -5
- package/build/model/info.d.ts +1 -1
- package/build/model/info.js +19 -35
- package/build/model/line-operation-response.bo.js +6 -22
- package/build/model/line-operation-status.bo.js +5 -6
- package/build/model/linked-article.d.ts +2 -2
- package/build/model/linked-article.js +57 -101
- package/build/model/logistical-state-detail.bo.d.ts +1 -1
- package/build/model/logistical-state-detail.bo.js +11 -27
- package/build/model/marketing.bo.d.ts +1 -1
- package/build/model/marketing.bo.js +8 -24
- package/build/model/on-hold-code.bo.d.ts +1 -1
- package/build/model/on-hold-code.bo.js +19 -35
- package/build/model/payment-link-status.bo.d.ts +1 -1
- package/build/model/payment-link-status.bo.js +19 -35
- package/build/model/payment-method.bo.d.ts +2 -2
- package/build/model/payment-method.bo.js +27 -41
- package/build/model/payment-request.js +5 -6
- package/build/model/pdf-delivery-note-request.bo.js +6 -22
- package/build/model/price-list.d.ts +2 -2
- package/build/model/price-list.js +17 -33
- package/build/model/print-delivery-note-request.bo.js +6 -22
- package/build/model/purchase-advice-filters.js +5 -6
- package/build/model/purchase-advice-line.bo.d.ts +1 -1
- package/build/model/purchase-advice-line.bo.js +19 -35
- package/build/model/purchase-order-line-receipt-correction-details.bo.d.ts +1 -1
- package/build/model/purchase-order-line-receipt-correction-details.bo.js +6 -22
- package/build/model/purchase-order-line-receipt-details.bo.d.ts +1 -1
- package/build/model/purchase-order-line-receipt-details.bo.js +6 -22
- package/build/model/purchase-order-line.bo.d.ts +1 -1
- package/build/model/purchase-order-line.bo.js +11 -27
- package/build/model/purchase-order.bo.d.ts +1 -1
- package/build/model/purchase-order.bo.js +6 -22
- package/build/model/purchase-portal-filters.bo.d.ts +1 -1
- package/build/model/purchase-portal-filters.bo.js +6 -22
- package/build/model/purchase-portal-line.bo.d.ts +1 -1
- package/build/model/purchase-portal-line.bo.js +15 -29
- package/build/model/purchase-portal-object-name.enum.js +4 -2
- package/build/model/receive-goods-for-purchase-order-correction-request.bo.d.ts +1 -1
- package/build/model/receive-goods-for-purchase-order-correction-request.bo.js +6 -22
- package/build/model/receive-goods-for-purchase-order-request.bo.d.ts +1 -1
- package/build/model/receive-goods-for-purchase-order-request.bo.js +11 -27
- package/build/model/report/email-order-confirmation.js +5 -6
- package/build/model/report/pdf-order-confirmation.js +5 -6
- package/build/model/report/print-order-confirmation.js +5 -6
- package/build/model/reporting-document-base-request.bo.d.ts +1 -1
- package/build/model/reporting-document-base-request.bo.js +6 -22
- package/build/model/reporting-document-email-base-request.bo.js +6 -22
- package/build/model/reporting-document-pdf-base-request.bo.js +6 -22
- package/build/model/reporting-document-print-base-request.bo.js +6 -22
- package/build/model/resolve-header-pending-reason-request.bo.js +6 -6
- package/build/model/resolve-pending-reason-request.bo.js +6 -9
- package/build/model/session.js +6 -5
- package/build/model/set-transaction-delivery-options-request.bo.d.ts +1 -1
- package/build/model/set-transaction-delivery-options-request.bo.js +19 -35
- package/build/model/set-transaction-discounts-request.js +5 -6
- package/build/model/supplier-product.bo.d.ts +1 -1
- package/build/model/supplier-product.bo.js +19 -35
- package/build/model/transaction-add-line-response.bo.js +6 -22
- package/build/model/transaction-add-text-line-request.bo.d.ts +1 -1
- package/build/model/transaction-add-text-line-request.bo.js +17 -31
- package/build/model/transaction-article-warehouse.bo.d.ts +2 -2
- package/build/model/transaction-article-warehouse.bo.js +40 -54
- package/build/model/transaction-change-line-quantity-response.bo.js +6 -22
- package/build/model/transaction-down-payment-info.bo.d.ts +1 -1
- package/build/model/transaction-down-payment-info.bo.js +15 -29
- package/build/model/transaction-info-response.bo.js +40 -54
- package/build/model/transaction-info.bo.d.ts +5 -3
- package/build/model/transaction-info.bo.js +47 -64
- package/build/model/transaction-line-info.bo.d.ts +1 -1
- package/build/model/transaction-line-info.bo.js +101 -143
- package/build/model/transaction-line-reporting-request.bo.d.ts +1 -1
- package/build/model/transaction-line-reporting-request.bo.js +6 -22
- package/build/model/transaction-line-status-base.bo.d.ts +1 -1
- package/build/model/transaction-line-status-base.bo.js +6 -22
- package/build/model/transaction-list-object.bo.d.ts +3 -3
- package/build/model/transaction-list-object.bo.js +77 -97
- package/build/model/transaction-lock-result.bo.d.ts +1 -1
- package/build/model/transaction-lock-result.bo.js +11 -27
- package/build/model/transaction-response-base.bo.d.ts +1 -1
- package/build/model/transaction-response-base.bo.js +6 -22
- package/build/model/transaction-search-view-request.d.ts +1 -1
- package/build/model/transaction-search-view-request.js +6 -5
- package/build/model/transaction-search-view.bo.d.ts +3 -3
- package/build/model/transaction-search-view.bo.js +98 -124
- package/build/model/transaction-total.bo.d.ts +1 -1
- package/build/model/transaction-total.bo.js +6 -22
- package/build/model/transactionLineCharacteristic.bo.js +12 -11
- package/build/model/transactionLineCharacteristicChoice.bo.js +5 -6
- package/build/model/tree-object.d.ts +1 -1
- package/build/model/tree-object.js +19 -35
- package/build/model/turnover-group-image.d.ts +2 -2
- package/build/model/turnover-group-image.js +14 -30
- package/build/model/vat.d.ts +2 -2
- package/build/model/vat.js +17 -33
- package/build/model/warehouse.bo.d.ts +1 -1
- package/build/model/warehouse.bo.js +46 -60
- package/build/transaction-auth.d.ts +1 -17
- package/build/transaction-auth.js +782 -1014
- package/build/transaction-public.d.ts +1 -16
- package/build/transaction-public.js +576 -1063
- package/build/transaction.d.ts +1 -16
- package/build/transaction.js +279 -432
- package/build/transaction.unit.test.js +341 -837
- package/build/type/object-configuration-default-value-type.js +2 -0
- package/build/websocket/socket.js +63 -115
- package/package.json +10 -3
- package/build/catalog.d.ts +0 -35
- package/build/catalog.js +0 -47
- package/build/enum/absence-type.enum.d.ts +0 -10
- package/build/enum/absence-type.enum.js +0 -11
- package/build/enum/address-type.enum.d.ts +0 -8
- package/build/enum/address-type.enum.js +0 -9
- package/build/enum/co-document-image-display-kind.enum.d.ts +0 -5
- package/build/enum/co-document-image-display-kind.enum.js +0 -6
- package/build/enum/communication-type.enum.d.ts +0 -8
- package/build/enum/communication-type.enum.js +0 -9
- package/build/enum/company-type.enum.d.ts +0 -4
- package/build/enum/company-type.enum.js +0 -5
- package/build/enum/customer-employee-contact-link-status.enum.d.ts +0 -4
- package/build/enum/customer-employee-contact-link-status.enum.js +0 -5
- package/build/enum/customer-type.enum.d.ts +0 -5
- package/build/enum/customer-type.enum.js +0 -6
- package/build/enum/data-service-method.enum.d.ts +0 -14
- package/build/enum/data-service-method.enum.js +0 -15
- package/build/enum/datasession-service-method.enum.d.ts +0 -11
- package/build/enum/datasession-service-method.enum.js +0 -12
- package/build/enum/db-boolean-value-type.enum.d.ts +0 -12
- package/build/enum/db-boolean-value-type.enum.js +0 -28
- package/build/enum/delivery-time-unit-type.enum.d.ts +0 -4
- package/build/enum/delivery-time-unit-type.enum.js +0 -5
- package/build/enum/fixed-supplier-type.enum.d.ts +0 -13
- package/build/enum/fixed-supplier-type.enum.js +0 -14
- package/build/enum/gender-type.enum.d.ts +0 -5
- package/build/enum/gender-type.enum.js +0 -6
- package/build/enum/insured-interest-type.enum.d.ts +0 -10
- package/build/enum/insured-interest-type.enum.js +0 -11
- package/build/enum/message-type.enum.d.ts +0 -6
- package/build/enum/message-type.enum.js +0 -7
- package/build/enum/node-display-type.enum.d.ts +0 -5
- package/build/enum/node-display-type.enum.js +0 -6
- package/build/enum/own-risk.enum.d.ts +0 -7
- package/build/enum/own-risk.enum.js +0 -8
- package/build/enum/priority-type.enum.d.ts +0 -7
- package/build/enum/priority-type.enum.js +0 -8
- package/build/enum/product-kind.enum.d.ts +0 -6
- package/build/enum/product-kind.enum.js +0 -7
- package/build/enum/refcode/article-publication.enum.d.ts +0 -5
- package/build/enum/refcode/article-publication.enum.js +0 -6
- package/build/enum/refcode/co-document-type.enum.d.ts +0 -5
- package/build/enum/refcode/co-document-type.enum.js +0 -6
- package/build/enum/refcode/file-type-internal.enum.d.ts +0 -11
- package/build/enum/refcode/file-type-internal.enum.js +0 -12
- package/build/enum/refcode/file-type.enum.d.ts +0 -5
- package/build/enum/refcode/file-type.enum.js +0 -6
- package/build/enum/refcode/object-config-kind.d.ts +0 -9
- package/build/enum/refcode/object-config-kind.js +0 -10
- package/build/enum/refcode/object-configuration-data-type.enum.d.ts +0 -7
- package/build/enum/refcode/object-configuration-data-type.enum.js +0 -8
- package/build/enum/refcode/object-configuration-value-type.enum.d.ts +0 -10
- package/build/enum/refcode/object-configuration-value-type.enum.js +0 -11
- package/build/enum/refcode/object-right-type.enum.d.ts +0 -5
- package/build/enum/refcode/object-right-type.enum.js +0 -6
- package/build/enum/refcode/price-type.enum.d.ts +0 -4
- package/build/enum/refcode/price-type.enum.js +0 -5
- package/build/enum/refcode/text-standard-type-text.d.ts +0 -7
- package/build/enum/refcode/text-standard-type-text.js +0 -8
- package/build/enum/refcode/text-standard-type.d.ts +0 -7
- package/build/enum/refcode/text-standard-type.js +0 -8
- package/build/enum/refcode/user-right-type.enum.d.ts +0 -7
- package/build/enum/refcode/user-right-type.enum.js +0 -8
- package/build/enum/true-false-db-type.enum.d.ts +0 -5
- package/build/enum/true-false-db-type.enum.js +0 -16
- package/build/enum/value-comparison-type.enum.d.ts +0 -15
- package/build/enum/value-comparison-type.enum.js +0 -28
- package/build/enum/vat-type.enum.d.ts +0 -4
- package/build/enum/vat-type.enum.js +0 -5
- package/build/enum/yes-no-db-type.enum.d.ts +0 -5
- package/build/enum/yes-no-db-type.enum.js +0 -16
- package/build/factory/decorators/boolean.decorator.d.ts +0 -11
- package/build/factory/decorators/boolean.decorator.js +0 -71
- package/build/factory/decorators/business-object-data.decorator.d.ts +0 -24
- package/build/factory/decorators/business-object-data.decorator.js +0 -85
- package/build/factory/decorators/complex-array.decorator.d.ts +0 -5
- package/build/factory/decorators/complex-array.decorator.js +0 -35
- package/build/factory/decorators/complex-field.decorator.d.ts +0 -5
- package/build/factory/decorators/complex-field.decorator.js +0 -35
- package/build/factory/decorators/date-field.decorator.d.ts +0 -5
- package/build/factory/decorators/date-field.decorator.js +0 -25
- package/build/factory/decorators/db-field-alias.decorator.d.ts +0 -5
- package/build/factory/decorators/db-field-alias.decorator.js +0 -38
- package/build/factory/decorators/db-method-value.decorator.d.ts +0 -5
- package/build/factory/decorators/db-method-value.decorator.js +0 -18
- package/build/factory/decorators/db-number.decorator.d.ts +0 -5
- package/build/factory/decorators/db-number.decorator.js +0 -35
- package/build/factory/decorators/exclude-when-empty-string.decorator.d.ts +0 -5
- package/build/factory/decorators/exclude-when-empty-string.decorator.js +0 -18
- package/build/factory/decorators/json.decorator.d.ts +0 -5
- package/build/factory/decorators/json.decorator.js +0 -24
- package/build/factory/decorators/map-property.decorator.d.ts +0 -6
- package/build/factory/decorators/map-property.decorator.js +0 -28
- package/build/factory/decorators/no-db-field.decorator.d.ts +0 -4
- package/build/factory/decorators/no-db-field.decorator.js +0 -32
- package/build/factory/decorators/number-string.decorator.d.ts +0 -6
- package/build/factory/decorators/number-string.decorator.js +0 -22
- package/build/factory/decorators/simple-property-tag.decorator.d.ts +0 -5
- package/build/factory/decorators/simple-property-tag.decorator.js +0 -36
- package/build/factory/decorators/string-number.decorator.d.ts +0 -6
- package/build/factory/decorators/string-number.decorator.js +0 -28
- package/build/interface/business-object-data-shape.d.ts +0 -21
- package/build/interface/business-object-data-shape.js +0 -0
- package/build/interface/check-precision-and-scale-result.d.ts +0 -4
- package/build/interface/check-precision-and-scale-result.js +0 -0
- package/build/interface/contact-option-common-shape.d.ts +0 -7
- package/build/interface/contact-option-common-shape.js +0 -0
- package/build/interface/contact-option-sequence-range.d.ts +0 -5
- package/build/interface/contact-option-sequence-range.js +0 -0
- package/build/interface/data-service-response-data.interface.d.ts +0 -9
- package/build/interface/data-service-response-data.interface.js +0 -0
- package/build/interface/field-validation.interface.d.ts +0 -6
- package/build/interface/field-validation.interface.js +0 -0
- package/build/interface/field-validations-object.interface.d.ts +0 -4
- package/build/interface/field-validations-object.interface.js +0 -0
- package/build/interface/filter-property.d.ts +0 -9
- package/build/interface/filter-property.js +0 -0
- package/build/interface/paging-parameters.interface.d.ts +0 -6
- package/build/interface/paging-parameters.interface.js +0 -6
- package/build/interface/precision-scale-object.d.ts +0 -4
- package/build/interface/precision-scale-object.js +0 -0
- package/build/interface/relman-complete-name.d.ts +0 -5
- package/build/interface/relman-complete-name.js +0 -0
- package/build/interface/search-property.d.ts +0 -11
- package/build/interface/search-property.js +0 -0
- package/build/interface/sort-property.d.ts +0 -11
- package/build/interface/sort-property.js +0 -0
- package/build/interface/validation-message.interface.d.ts +0 -6
- package/build/interface/validation-message.interface.js +0 -0
- package/build/interface/validation-result.interface.d.ts +0 -14
- package/build/interface/validation-result.interface.js +0 -0
- package/build/interface/value-comparison-type-view-wrapper.d.ts +0 -5
- package/build/interface/value-comparison-type-view-wrapper.js +0 -0
- package/build/model/address-contact-option.bo.d.ts +0 -14
- package/build/model/address-contact-option.bo.js +0 -25
- package/build/model/address.bo.d.ts +0 -37
- package/build/model/address.bo.js +0 -148
- package/build/model/answer-price.d.ts +0 -15
- package/build/model/answer-price.js +0 -90
- package/build/model/answer.d.ts +0 -36
- package/build/model/answer.js +0 -184
- package/build/model/article-seo-value.d.ts +0 -5
- package/build/model/article-seo-value.js +0 -6
- package/build/model/bank-account.bo.d.ts +0 -15
- package/build/model/bank-account.bo.js +0 -25
- package/build/model/branch-lov.bo.d.ts +0 -9
- package/build/model/branch-lov.bo.js +0 -25
- package/build/model/brand.d.ts +0 -8
- package/build/model/brand.js +0 -25
- package/build/model/business-object-id-type.d.ts +0 -4
- package/build/model/business-object-id-type.js +0 -10
- package/build/model/business-object.d.ts +0 -7
- package/build/model/business-object.js +0 -71
- package/build/model/co-document-right.d.ts +0 -7
- package/build/model/co-document-right.js +0 -22
- package/build/model/co-document.d.ts +0 -62
- package/build/model/co-document.js +0 -223
- package/build/model/co-domain-value.bo.d.ts +0 -10
- package/build/model/co-domain-value.bo.js +0 -36
- package/build/model/co-notition-right.bo.d.ts +0 -10
- package/build/model/co-notition-right.bo.js +0 -25
- package/build/model/co-notition.bo.d.ts +0 -24
- package/build/model/co-notition.bo.js +0 -96
- package/build/model/co-text.d.ts +0 -26
- package/build/model/co-text.js +0 -43
- package/build/model/contact-moment.bo.d.ts +0 -17
- package/build/model/contact-moment.bo.js +0 -51
- package/build/model/contact-option.bo.d.ts +0 -16
- package/build/model/contact-option.bo.js +0 -46
- package/build/model/customer-full-object.bo.d.ts +0 -107
- package/build/model/customer-full-object.bo.js +0 -334
- package/build/model/data-service-data.d.ts +0 -15
- package/build/model/data-service-data.js +0 -6
- package/build/model/data-service-request-data.d.ts +0 -15
- package/build/model/data-service-request-data.js +0 -6
- package/build/model/data-service-response-data.d.ts +0 -15
- package/build/model/data-service-response-data.js +0 -66
- package/build/model/data-service-response-root.d.ts +0 -5
- package/build/model/data-service-response-root.js +0 -0
- package/build/model/deco-node.d.ts +0 -18
- package/build/model/deco-node.js +0 -93
- package/build/model/department.bo.d.ts +0 -12
- package/build/model/department.bo.js +0 -81
- package/build/model/employee-group-dto.bo.d.ts +0 -7
- package/build/model/employee-group-dto.bo.js +0 -42
- package/build/model/field-validation.d.ts +0 -10
- package/build/model/field-validation.js +0 -61
- package/build/model/field-validations-object.d.ts +0 -4
- package/build/model/field-validations-object.js +0 -0
- package/build/model/frozen-article-composition.d.ts +0 -13
- package/build/model/frozen-article-composition.js +0 -79
- package/build/model/frozen-article-simple.d.ts +0 -12
- package/build/model/frozen-article-simple.js +0 -74
- package/build/model/frozen-article.d.ts +0 -14
- package/build/model/frozen-article.js +0 -75
- package/build/model/hd-service-request-data.d.ts +0 -5
- package/build/model/hd-service-request-data.js +0 -0
- package/build/model/insuredInterest.bo.d.ts +0 -13
- package/build/model/insuredInterest.bo.js +0 -51
- package/build/model/login.d.ts +0 -17
- package/build/model/login.js +0 -65
- package/build/model/match-article.d.ts +0 -10
- package/build/model/match-article.js +0 -66
- package/build/model/material.d.ts +0 -6
- package/build/model/material.js +0 -25
- package/build/model/nul-relation-object.d.ts +0 -6
- package/build/model/nul-relation-object.js +0 -5
- package/build/model/object-configuration.d.ts +0 -50
- package/build/model/object-configuration.js +0 -202
- package/build/model/off-set-account.bo.d.ts +0 -15
- package/build/model/off-set-account.bo.js +0 -95
- package/build/model/own-risk.bo.d.ts +0 -11
- package/build/model/own-risk.bo.js +0 -51
- package/build/model/paging-parameters.d.ts +0 -16
- package/build/model/paging-parameters.js +0 -44
- package/build/model/payroll-number.bo.d.ts +0 -7
- package/build/model/payroll-number.bo.js +0 -42
- package/build/model/privacy-setting.bo.d.ts +0 -9
- package/build/model/privacy-setting.bo.js +0 -25
- package/build/model/question.d.ts +0 -9
- package/build/model/question.js +0 -54
- package/build/model/relation-any-type.d.ts +0 -3
- package/build/model/relation-any-type.js +0 -0
- package/build/model/relation-contact-link.bo.d.ts +0 -36
- package/build/model/relation-contact-link.bo.js +0 -158
- package/build/model/relation-contact-serial-number.bo.d.ts +0 -22
- package/build/model/relation-contact-serial-number.bo.js +0 -85
- package/build/model/relation-contract-login-data.bo.d.ts +0 -10
- package/build/model/relation-contract-login-data.bo.js +0 -42
- package/build/model/relation-contract.bo.d.ts +0 -63
- package/build/model/relation-contract.bo.js +0 -141
- package/build/model/relation-employee-fte.bo.d.ts +0 -8
- package/build/model/relation-employee-fte.bo.js +0 -39
- package/build/model/relation-event-link.bo.d.ts +0 -15
- package/build/model/relation-event-link.bo.js +0 -70
- package/build/model/relation-event-subscriber.bo.d.ts +0 -7
- package/build/model/relation-event-subscriber.bo.js +0 -42
- package/build/model/relation-list-object.bo.d.ts +0 -72
- package/build/model/relation-list-object.bo.js +0 -197
- package/build/model/relation-mailing-code.d.ts +0 -7
- package/build/model/relation-mailing-code.js +0 -25
- package/build/model/relation-objects-shared-field-logic.d.ts +0 -12
- package/build/model/relation-objects-shared-field-logic.js +0 -82
- package/build/model/relation-price-list.bo.d.ts +0 -11
- package/build/model/relation-price-list.bo.js +0 -58
- package/build/model/relation-privacy-setting.bo.d.ts +0 -12
- package/build/model/relation-privacy-setting.bo.js +0 -65
- package/build/model/relation-reference-type.bo.d.ts +0 -8
- package/build/model/relation-reference-type.bo.js +0 -58
- package/build/model/relation-request.d.ts +0 -51
- package/build/model/relation-request.js +0 -13
- package/build/model/relation-small-object.bo.d.ts +0 -28
- package/build/model/relation-small-object.bo.js +0 -99
- package/build/model/relation.bo.d.ts +0 -119
- package/build/model/relation.bo.js +0 -495
- package/build/model/sales-person.bo.d.ts +0 -7
- package/build/model/sales-person.bo.js +0 -43
- package/build/model/selection.d.ts +0 -45
- package/build/model/selection.js +0 -155
- package/build/model/service-provider.bo.d.ts +0 -20
- package/build/model/service-provider.bo.js +0 -105
- package/build/model/skip-button-info.d.ts +0 -6
- package/build/model/skip-button-info.js +0 -37
- package/build/model/sla-product.bo.d.ts +0 -20
- package/build/model/sla-product.bo.js +0 -56
- package/build/model/super-article-image.d.ts +0 -7
- package/build/model/super-article-image.js +0 -25
- package/build/model/super-article.d.ts +0 -21
- package/build/model/super-article.js +0 -86
- package/build/model/supplier-full-object.bo.d.ts +0 -64
- package/build/model/supplier-full-object.bo.js +0 -200
- package/build/model/tag-stock-item.bo.d.ts +0 -24
- package/build/model/tag-stock-item.bo.js +0 -36
- package/build/model/tag-tree-item.bo.d.ts +0 -18
- package/build/model/tag-tree-item.bo.js +0 -58
- package/build/model/tag.d.ts +0 -11
- package/build/model/tag.js +0 -55
- package/build/model/validation-message.d.ts +0 -15
- package/build/model/validation-message.js +0 -46
- package/build/model/validation-result.d.ts +0 -33
- package/build/model/validation-result.js +0 -199
- package/build/service/business-object-serializer.service.d.ts +0 -10
- package/build/service/business-object-serializer.service.js +0 -143
- package/build/type/business-object-id-type.d.ts +0 -4
- package/build/type/business-object-id-type.js +0 -10
- package/build/utils/array-utils.d.ts +0 -13
- package/build/utils/array-utils.js +0 -137
- package/build/utils/bo-factory-step.utils.d.ts +0 -4
- package/build/utils/bo-factory-step.utils.js +0 -15
- package/build/utils/bo-serializer-step.utils.d.ts +0 -4
- package/build/utils/bo-serializer-step.utils.js +0 -15
- package/build/utils/business-object-utils.d.ts +0 -10
- package/build/utils/business-object-utils.js +0 -80
- package/build/utils/date-utils.d.ts +0 -5
- package/build/utils/date-utils.js +0 -24
- package/build/utils/default-send-value.utils.d.ts +0 -6
- package/build/utils/default-send-value.utils.js +0 -51
- package/build/utils/file-utils.d.ts +0 -6
- package/build/utils/file-utils.js +0 -66
- package/build/utils/function/is-nill.function.d.ts +0 -1
- package/build/utils/function/is-nill.function.js +0 -3
- package/build/utils/function/not-nill.function.d.ts +0 -1
- package/build/utils/function/not-nill.function.js +0 -3
- package/build/utils/function-utils.d.ts +0 -4
- package/build/utils/function-utils.js +0 -32
- package/build/utils/image-utils.d.ts +0 -4
- package/build/utils/image-utils.js +0 -28
- package/build/utils/number-utils.d.ts +0 -19
- package/build/utils/number-utils.js +0 -161
- package/build/utils/object-utils.d.ts +0 -18
- package/build/utils/object-utils.js +0 -225
- package/build/utils/parameter-value-conversion-utils.d.ts +0 -3
- package/build/utils/parameter-value-conversion-utils.js +0 -19
- package/build/utils/promise-utils.d.ts +0 -6
- package/build/utils/promise-utils.js +0 -66
- package/build/utils/ref-code-utils.d.ts +0 -4
- package/build/utils/ref-code-utils.js +0 -23
- package/build/utils/simple-method-tag.utils.d.ts +0 -5
- package/build/utils/simple-method-tag.utils.js +0 -29
- package/build/utils/sort-utils.d.ts +0 -12
- package/build/utils/sort-utils.js +0 -128
- package/build/utils/string-utils.d.ts +0 -9
- package/build/utils/string-utils.js +0 -69
- package/build/utils/url-utils.d.ts +0 -4
- package/build/utils/url-utils.js +0 -32
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { ObjectUtils } from "../utils/object-utils";
|
|
2
|
-
import { NumberUtils } from "../utils/number-utils";
|
|
3
|
-
import { ValidationMessage } from "./validation-message";
|
|
4
|
-
import { FieldValidation } from "./field-validation";
|
|
5
|
-
import { BusinessObjectUtils } from "../utils/business-object-utils";
|
|
6
|
-
import { ArrayUtils } from "../utils/array-utils";
|
|
7
|
-
import { MessageTypeEnum } from "../enum/message-type.enum";
|
|
8
|
-
var ValidationResult = (function () {
|
|
9
|
-
function ValidationResult(rawData) {
|
|
10
|
-
this.messages = [];
|
|
11
|
-
this.fieldValidations = {};
|
|
12
|
-
this.setData(rawData);
|
|
13
|
-
}
|
|
14
|
-
ValidationResult.prototype.setData = function (rawData) {
|
|
15
|
-
var _this = this;
|
|
16
|
-
if (!rawData) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
this.objectId = rawData.objectId;
|
|
20
|
-
this.objectType = rawData.objectType;
|
|
21
|
-
this.parentField = rawData.parentField;
|
|
22
|
-
this.parentProperty = rawData.parentProperty;
|
|
23
|
-
this.parentValidationId = rawData.parentValidationId;
|
|
24
|
-
this.success = rawData.success;
|
|
25
|
-
this.validationId = rawData.validationId;
|
|
26
|
-
if (rawData.messages) {
|
|
27
|
-
this.messages.length = 0;
|
|
28
|
-
for (var i = 0, len = rawData.messages.length; i < len; i++) {
|
|
29
|
-
this.messages.push(new ValidationMessage(rawData.messages[i]));
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (rawData.fieldValidations) {
|
|
33
|
-
this.fieldValidations = {};
|
|
34
|
-
ObjectUtils.ForOwnProperty(rawData.fieldValidations, function (validationFieldData, propKey) {
|
|
35
|
-
_this.fieldValidations[propKey] = new FieldValidation(validationFieldData);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
ValidationResult.prototype.merge = function (otherValidation) {
|
|
40
|
-
var _a;
|
|
41
|
-
if (otherValidation) {
|
|
42
|
-
this.success = this.success && otherValidation.success;
|
|
43
|
-
(_a = this.messages).push.apply(_a, otherValidation.messages);
|
|
44
|
-
this._mergeValidationResultFieldsObjects(otherValidation.fieldValidations);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
ValidationResult.prototype.addValidationResultField = function (key, value) {
|
|
48
|
-
this.fieldValidations[key] = value;
|
|
49
|
-
};
|
|
50
|
-
ValidationResult.prototype.makeAndAddValidationResultField = function (key, plainErrorMssg) {
|
|
51
|
-
var field = new FieldValidation();
|
|
52
|
-
field.messages = [];
|
|
53
|
-
var messageObject = new ValidationMessage();
|
|
54
|
-
messageObject.fieldId = key;
|
|
55
|
-
messageObject.message = plainErrorMssg;
|
|
56
|
-
field.messages.push(messageObject);
|
|
57
|
-
this.fieldValidations[key] = field;
|
|
58
|
-
};
|
|
59
|
-
ValidationResult.prototype.getAllErrorMessagesOfMyValidationFields = function () {
|
|
60
|
-
return this.getAllErrorMessages();
|
|
61
|
-
};
|
|
62
|
-
ValidationResult.prototype.getAllErrorMessages = function (messages) {
|
|
63
|
-
if (messages === void 0) { messages = null; }
|
|
64
|
-
if (messages === null) {
|
|
65
|
-
messages = [];
|
|
66
|
-
}
|
|
67
|
-
ObjectUtils.ForOwnProperty(this.fieldValidations, function (validationField) {
|
|
68
|
-
messages = validationField.getAllErrorMessages(messages);
|
|
69
|
-
});
|
|
70
|
-
return messages;
|
|
71
|
-
};
|
|
72
|
-
ValidationResult.prototype.getFullErrorString = function (includeCode) {
|
|
73
|
-
if (includeCode === void 0) { includeCode = true; }
|
|
74
|
-
var generalError = this.getGeneralErrorString(includeCode);
|
|
75
|
-
var validationFieldsError = this.getValidationFieldsErrorString();
|
|
76
|
-
if (!generalError && !validationFieldsError) {
|
|
77
|
-
return "";
|
|
78
|
-
}
|
|
79
|
-
else if (generalError && validationFieldsError) {
|
|
80
|
-
return generalError + "\n" + validationFieldsError;
|
|
81
|
-
}
|
|
82
|
-
else if (generalError) {
|
|
83
|
-
return generalError;
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
return validationFieldsError;
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
ValidationResult.prototype.getGeneralErrorString = function (includeCode) {
|
|
90
|
-
if (includeCode === void 0) { includeCode = true; }
|
|
91
|
-
var errors = "";
|
|
92
|
-
if (this.messages) {
|
|
93
|
-
var len = this.messages.length;
|
|
94
|
-
for (var i = 0; i < len; i++) {
|
|
95
|
-
var message = this.messages[i];
|
|
96
|
-
if (message) {
|
|
97
|
-
if (includeCode && !NumberUtils.IsNaN(message.code)) {
|
|
98
|
-
errors += message.code + ": " + message.message + '\n';
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
errors += message.message + '\n';
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return errors;
|
|
107
|
-
};
|
|
108
|
-
ValidationResult.prototype.getValidationFieldsErrorString = function () {
|
|
109
|
-
var errors = "";
|
|
110
|
-
ObjectUtils.ForOwnProperty(this.fieldValidations, function (validationField, propKey) {
|
|
111
|
-
var errorString = validationField.getErrorString();
|
|
112
|
-
if (errorString) {
|
|
113
|
-
errors += propKey + ": " + errorString;
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
return errors;
|
|
117
|
-
};
|
|
118
|
-
ValidationResult.prototype.createOrGetSubValidationResult = function (objectOrFieldId, objectId) {
|
|
119
|
-
if (objectId === void 0) { objectId = null; }
|
|
120
|
-
var subValidation = this._getSubValidationResult(objectOrFieldId, objectId);
|
|
121
|
-
if (!subValidation) {
|
|
122
|
-
subValidation = new ValidationResult();
|
|
123
|
-
subValidation.objectId = objectId;
|
|
124
|
-
this._addSubValidationToValidationResultField(objectOrFieldId, subValidation);
|
|
125
|
-
}
|
|
126
|
-
return subValidation;
|
|
127
|
-
};
|
|
128
|
-
ValidationResult.prototype.hasErrorForPropertyWithId = function (parentPropPath, boId) {
|
|
129
|
-
var messages = this.getAllErrorMessages();
|
|
130
|
-
return ArrayUtils.ContainsAnElementFoundBy(messages, function (msg) {
|
|
131
|
-
return msg.getParentFieldId() === parentPropPath && BusinessObjectUtils.IsEqualBoId(msg.boId, boId);
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
|
-
ValidationResult.prototype._getSubValidationResult = function (objectOrFieldId, objectId, subValidationFields) {
|
|
135
|
-
var _this = this;
|
|
136
|
-
if (objectId === void 0) { objectId = null; }
|
|
137
|
-
if (subValidationFields === void 0) { subValidationFields = null; }
|
|
138
|
-
if (subValidationFields === null) {
|
|
139
|
-
subValidationFields = this.fieldValidations;
|
|
140
|
-
}
|
|
141
|
-
ObjectUtils.ForOwnProperty(subValidationFields, function (validationField, propKey) {
|
|
142
|
-
var len = validationField.subValidations.length;
|
|
143
|
-
for (var i = 0; i < len; i++) {
|
|
144
|
-
var subValidation = validationField.subValidations[i];
|
|
145
|
-
if (subValidation.objectType === objectOrFieldId && (subValidation.objectId === objectId || objectId === null)) {
|
|
146
|
-
return subValidation;
|
|
147
|
-
}
|
|
148
|
-
if (subValidation.fieldValidations) {
|
|
149
|
-
return _this._getSubValidationResult(objectOrFieldId, objectId, subValidation.fieldValidations);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
return null;
|
|
154
|
-
};
|
|
155
|
-
ValidationResult.prototype._addSubValidationToValidationResultField = function (key, sub) {
|
|
156
|
-
var found = false;
|
|
157
|
-
ObjectUtils.ForOwnProperty(this.fieldValidations, function (validationField, propKey) {
|
|
158
|
-
if (propKey === key) {
|
|
159
|
-
validationField.subValidations.push(sub);
|
|
160
|
-
found = true;
|
|
161
|
-
return false;
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
if (!found) {
|
|
165
|
-
var validationResultField = new FieldValidation();
|
|
166
|
-
validationResultField.subValidations.push(sub);
|
|
167
|
-
this.addValidationResultField(key, validationResultField);
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
ValidationResult.prototype._mergeValidationResultFieldsObjects = function (otherValidationFields) {
|
|
171
|
-
var _this = this;
|
|
172
|
-
if (this.fieldValidations && otherValidationFields) {
|
|
173
|
-
ObjectUtils.ForOwnProperty(otherValidationFields, function (val, key) {
|
|
174
|
-
_this.fieldValidations[key] = val;
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
ValidationResult.prototype._getMessageString = function (includeCode, errorFilter) {
|
|
179
|
-
if (includeCode === void 0) { includeCode = true; }
|
|
180
|
-
var allMessages = "";
|
|
181
|
-
if (this.messages) {
|
|
182
|
-
var len = this.messages.length;
|
|
183
|
-
for (var i = 0; i < len; i++) {
|
|
184
|
-
var message = this.messages[i];
|
|
185
|
-
if (message && ((message.messageType === MessageTypeEnum.Error) || !errorFilter)) {
|
|
186
|
-
if (includeCode && !NumberUtils.IsNaN(message.code)) {
|
|
187
|
-
allMessages += message.code + ": " + message.message + "\n";
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
allMessages += message.message + "\n";
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
return allMessages;
|
|
196
|
-
};
|
|
197
|
-
return ValidationResult;
|
|
198
|
-
}());
|
|
199
|
-
export { ValidationResult };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BusinessObject, BusinessObjectIDType } from "../model/business-object";
|
|
2
|
-
import { DataServiceRequestData } from "../model/data-service-request-data";
|
|
3
|
-
export declare class BusinessObjectSerializerService {
|
|
4
|
-
private readonly _recursionLimit;
|
|
5
|
-
prepareBusinessObjectForSend(sourceModel: BusinessObject | boolean | string | Date, recursionCur?: number): any;
|
|
6
|
-
createDataServiceRequestData(modelClass: typeof BusinessObject, businessObject?: BusinessObject, objectId?: BusinessObjectIDType): DataServiceRequestData;
|
|
7
|
-
private _getPropertiesOfModelToSendToDatabase;
|
|
8
|
-
private _ensureDefaultsSet;
|
|
9
|
-
private _renameDbFieldAliases;
|
|
10
|
-
}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { isNill } from "../utils/function/is-nill.function";
|
|
2
|
-
import { NumberUtils } from "../utils/number-utils";
|
|
3
|
-
import { BoSerializerStepDecorator } from "../utils/bo-serializer-step.utils";
|
|
4
|
-
import { ComplexFieldDecorator } from "../factory/decorators/complex-field.decorator";
|
|
5
|
-
import { ComplexArrayDecorator } from "../factory/decorators/complex-array.decorator";
|
|
6
|
-
import { BooleanTextDecorator } from "../factory/decorators/boolean.decorator";
|
|
7
|
-
import { StringNumberDecorator } from "../factory/decorators/string-number.decorator";
|
|
8
|
-
import { BusinessObjectDataDecorator } from "../factory/decorators/business-object-data.decorator";
|
|
9
|
-
import { notNill } from "../utils/function/not-nill.function";
|
|
10
|
-
import { NoDatabaseFieldDecorator } from "../factory/decorators/no-db-field.decorator";
|
|
11
|
-
import { DbFieldAliasDecorator } from "../factory/decorators/db-field-alias.decorator";
|
|
12
|
-
import { DefaultSendValueDecorator } from "../utils/default-send-value.utils";
|
|
13
|
-
import { FunctionUtils } from "../utils/function-utils";
|
|
14
|
-
import { ExcludeWhenEmptyStringDecorator } from "../factory/decorators/exclude-when-empty-string.decorator";
|
|
15
|
-
import { DbNumberDecorator } from "../factory/decorators/db-number.decorator";
|
|
16
|
-
import { NumberStringDecorator } from "../factory/decorators/number-string.decorator";
|
|
17
|
-
import { DbMethodValueDecorator } from "../factory/decorators/db-method-value.decorator";
|
|
18
|
-
import { DataServiceRequestData } from "../model/data-service-request-data";
|
|
19
|
-
var BusinessObjectSerializerService = (function () {
|
|
20
|
-
function BusinessObjectSerializerService() {
|
|
21
|
-
this._recursionLimit = 90000000;
|
|
22
|
-
}
|
|
23
|
-
BusinessObjectSerializerService.prototype.prepareBusinessObjectForSend = function (sourceModel, recursionCur) {
|
|
24
|
-
if (recursionCur === void 0) { recursionCur = 1; }
|
|
25
|
-
if (isNill(sourceModel)) {
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
else if (recursionCur > this._recursionLimit) {
|
|
29
|
-
throw new Error("ERROR: BusinessObjectSerializerService.prepareBusinessObjectForSend: recursion limit of " + this._recursionLimit + " reached, server won't receive all the data from client!");
|
|
30
|
-
}
|
|
31
|
-
var sendObject = {};
|
|
32
|
-
if (NumberUtils.IsNumber(sourceModel) || typeof sourceModel === "boolean" || typeof sourceModel === "string"
|
|
33
|
-
|| sourceModel instanceof Date) {
|
|
34
|
-
sendObject = sourceModel;
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
var customStepFunctionNames = BoSerializerStepDecorator.GetDecoratedProperties(sourceModel);
|
|
38
|
-
if (customStepFunctionNames) {
|
|
39
|
-
customStepFunctionNames.forEach(function (customStepFnName) {
|
|
40
|
-
FunctionUtils.CallMethodIfExists(sourceModel[customStepFnName], sourceModel);
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
var sendProperties = this._getPropertiesOfModelToSendToDatabase(sourceModel);
|
|
44
|
-
for (var propIndex = 0, propsLen = sendProperties.length; propIndex < propsLen; propIndex++) {
|
|
45
|
-
var sendPropCur = sendProperties[propIndex];
|
|
46
|
-
if (ExcludeWhenEmptyStringDecorator.IsExcludeWhenEmptyStringField(sourceModel, sendPropCur)) {
|
|
47
|
-
if (sourceModel[sendPropCur] === "") {
|
|
48
|
-
continue;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
if (ComplexFieldDecorator.IsComplexField(sourceModel, sendPropCur)) {
|
|
52
|
-
sendObject[sendPropCur] = this.prepareBusinessObjectForSend(sourceModel[sendPropCur], recursionCur);
|
|
53
|
-
recursionCur++;
|
|
54
|
-
}
|
|
55
|
-
else if (ComplexArrayDecorator.IsComplexArray(sourceModel, sendPropCur)) {
|
|
56
|
-
sendObject[sendPropCur] = [];
|
|
57
|
-
for (var arrIndex = 0, arrLen = sourceModel[sendPropCur].length; arrIndex < arrLen; arrIndex++) {
|
|
58
|
-
sendObject[sendPropCur].push(this.prepareBusinessObjectForSend(sourceModel[sendPropCur][arrIndex], recursionCur));
|
|
59
|
-
recursionCur++;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
else if (BooleanTextDecorator.IsBooleanTextField(sourceModel, sendPropCur)) {
|
|
63
|
-
sendObject[sendPropCur] = BooleanTextDecorator.GetDbBooleanValue(sourceModel, sendPropCur);
|
|
64
|
-
}
|
|
65
|
-
else if (DbNumberDecorator.IsDbNumberField(sourceModel, sendPropCur)) {
|
|
66
|
-
sendObject[sendPropCur] = DbNumberDecorator.GetDbSafeNumberVal(sourceModel, sendPropCur);
|
|
67
|
-
}
|
|
68
|
-
else if (StringNumberDecorator.IsStringNumber(sourceModel, sendPropCur)) {
|
|
69
|
-
sendObject[sendPropCur] = StringNumberDecorator.NumberAsString(sourceModel[sendPropCur]);
|
|
70
|
-
}
|
|
71
|
-
else if (NumberStringDecorator.IsNumberString(sourceModel, sendPropCur)) {
|
|
72
|
-
sendObject[sendPropCur] = NumberStringDecorator.StringAsNumber(sourceModel[sendPropCur]);
|
|
73
|
-
}
|
|
74
|
-
else if (Array.isArray(sourceModel[sendPropCur])) {
|
|
75
|
-
sendObject[sendPropCur] = [];
|
|
76
|
-
for (var arrIndex = 0, arrLen = sourceModel[sendPropCur].length; arrIndex < arrLen; arrIndex++) {
|
|
77
|
-
sendObject[sendPropCur].push(sourceModel[sendPropCur][arrIndex]);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
sendObject[sendPropCur] = sourceModel[sendPropCur];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
DbMethodValueDecorator.GetDecoratedProperties(sourceModel)
|
|
85
|
-
.filter(function (method) { return typeof sourceModel[method] === "function"; })
|
|
86
|
-
.forEach(function (method) { return sendObject[method] = sourceModel[method](); });
|
|
87
|
-
this._ensureDefaultsSet(sourceModel, sendObject);
|
|
88
|
-
this._renameDbFieldAliases(sourceModel, sendObject);
|
|
89
|
-
}
|
|
90
|
-
return sendObject;
|
|
91
|
-
};
|
|
92
|
-
BusinessObjectSerializerService.prototype.createDataServiceRequestData = function (modelClass, businessObject, objectId) {
|
|
93
|
-
var serviceObj = new DataServiceRequestData();
|
|
94
|
-
serviceObj.moduleName = BusinessObjectDataDecorator.GetMapping(modelClass);
|
|
95
|
-
serviceObj.objectName = BusinessObjectDataDecorator.GetName(modelClass);
|
|
96
|
-
if (notNill(businessObject)) {
|
|
97
|
-
serviceObj.object = this.prepareBusinessObjectForSend(businessObject);
|
|
98
|
-
}
|
|
99
|
-
else if (notNill(objectId)) {
|
|
100
|
-
serviceObj.objectId = objectId;
|
|
101
|
-
}
|
|
102
|
-
return serviceObj;
|
|
103
|
-
};
|
|
104
|
-
BusinessObjectSerializerService.prototype._getPropertiesOfModelToSendToDatabase = function (model) {
|
|
105
|
-
var propertiesToSend;
|
|
106
|
-
var noDbProps = NoDatabaseFieldDecorator.GetDecoratedProperties(model);
|
|
107
|
-
propertiesToSend = Object.getOwnPropertyNames(model).filter(function (prop) {
|
|
108
|
-
return (model.hasOwnProperty(prop) && noDbProps.indexOf(prop) === -1);
|
|
109
|
-
});
|
|
110
|
-
var dbFieldAliasProps = DbFieldAliasDecorator.GetDecoratedProperties(model);
|
|
111
|
-
var len = dbFieldAliasProps.length;
|
|
112
|
-
for (var i = 0; i < len; i++) {
|
|
113
|
-
var aliasPropCur = dbFieldAliasProps[i];
|
|
114
|
-
if (propertiesToSend.indexOf(aliasPropCur) === -1) {
|
|
115
|
-
propertiesToSend.push(aliasPropCur);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return propertiesToSend;
|
|
119
|
-
};
|
|
120
|
-
BusinessObjectSerializerService.prototype._ensureDefaultsSet = function (sourceModel, sendObject) {
|
|
121
|
-
var defaultProps = DefaultSendValueDecorator.GetAllDecoratedProperties(sourceModel);
|
|
122
|
-
var len = defaultProps.length;
|
|
123
|
-
for (var i = 0; i < len; i++) {
|
|
124
|
-
var defaultPropCur = defaultProps[i];
|
|
125
|
-
if (isNill(sourceModel[defaultPropCur])) {
|
|
126
|
-
sendObject[defaultPropCur] = DefaultSendValueDecorator.GetDefaultValue(sourceModel, defaultPropCur);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
BusinessObjectSerializerService.prototype._renameDbFieldAliases = function (sourceModel, sendObject) {
|
|
131
|
-
var aliasProps = DbFieldAliasDecorator.GetDecoratedProperties(sourceModel);
|
|
132
|
-
var len = aliasProps.length;
|
|
133
|
-
for (var i = 0; i < len; i++) {
|
|
134
|
-
var aliasPropCur = aliasProps[i];
|
|
135
|
-
var aliasName = DbFieldAliasDecorator.GetDbAlias(sourceModel, aliasPropCur);
|
|
136
|
-
var value = sendObject[aliasPropCur];
|
|
137
|
-
delete sendObject[aliasPropCur];
|
|
138
|
-
sendObject[aliasName] = value;
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
return BusinessObjectSerializerService;
|
|
142
|
-
}());
|
|
143
|
-
export { BusinessObjectSerializerService };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { NumberUtils } from "../utils/number-utils";
|
|
2
|
-
import { StringUtils } from "../utils/string-utils";
|
|
3
|
-
import { ObjectUtils } from "../utils/object-utils";
|
|
4
|
-
export var BusinessObjectIDType;
|
|
5
|
-
(function (BusinessObjectIDType) {
|
|
6
|
-
function IsBoIDTypeVal(val) {
|
|
7
|
-
return NumberUtils.IsNumber(val) || StringUtils.IsString(val) || ObjectUtils.IsPlainObject(val);
|
|
8
|
-
}
|
|
9
|
-
BusinessObjectIDType.IsBoIDTypeVal = IsBoIDTypeVal;
|
|
10
|
-
})(BusinessObjectIDType || (BusinessObjectIDType = {}));
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare class ArrayUtils {
|
|
2
|
-
static ContainsAnElementFoundBy<T>(array: T[], finder: (element: T) => boolean): boolean;
|
|
3
|
-
static Find<T>(array: T[], foundBy: (item: T) => boolean): T;
|
|
4
|
-
static FindAll<T>(array: T[], foundBy: (item: T) => boolean): T[];
|
|
5
|
-
static CloneArray<T>(array: T[]): T[];
|
|
6
|
-
static CloneArrayAndItsItems<T>(array: T[], arrayItemsClass?: any, deepClone?: boolean): T[];
|
|
7
|
-
static RemoveElementAtIndex(index: number, array: any[]): boolean;
|
|
8
|
-
static RemoveElement<T>(element: T, array: T[]): boolean;
|
|
9
|
-
static IsArrayWithElements<T>(arrayToCheck: T[], classItemsMustBeInstanceOf?: any): boolean;
|
|
10
|
-
static RemoveElementsByFilter(array: any[], filterFunction: (item: any) => boolean): boolean;
|
|
11
|
-
static MoveElement<T>(element: T, toIndex: number, array: T[]): boolean;
|
|
12
|
-
static PlaceElementAfterOther(array: any[], elementToPlace: any, afterThisElement: any): void;
|
|
13
|
-
}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { notNill } from "./function/not-nill.function";
|
|
2
|
-
import { ObjectUtils } from "./object-utils";
|
|
3
|
-
import { NumberUtils } from "./number-utils";
|
|
4
|
-
import { isNill } from "./function/is-nill.function";
|
|
5
|
-
var ArrayUtils = (function () {
|
|
6
|
-
function ArrayUtils() {
|
|
7
|
-
}
|
|
8
|
-
ArrayUtils.ContainsAnElementFoundBy = function (array, finder) {
|
|
9
|
-
if (!array || !finder) {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
return notNill(this.Find(array, finder));
|
|
13
|
-
};
|
|
14
|
-
ArrayUtils.Find = function (array, foundBy) {
|
|
15
|
-
if (!array || !foundBy) {
|
|
16
|
-
return undefined;
|
|
17
|
-
}
|
|
18
|
-
for (var i = 0, len = array.length; i < len; i++) {
|
|
19
|
-
var itemCur = array[i];
|
|
20
|
-
if (foundBy(itemCur)) {
|
|
21
|
-
return itemCur;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
};
|
|
26
|
-
ArrayUtils.FindAll = function (array, foundBy) {
|
|
27
|
-
var answer = [];
|
|
28
|
-
if (!array || !foundBy) {
|
|
29
|
-
return answer;
|
|
30
|
-
}
|
|
31
|
-
for (var i = 0, len = array.length; i < len; i++) {
|
|
32
|
-
var itemCur = array[i];
|
|
33
|
-
if (foundBy(itemCur)) {
|
|
34
|
-
answer.push(itemCur);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return answer;
|
|
38
|
-
};
|
|
39
|
-
ArrayUtils.CloneArray = function (array) {
|
|
40
|
-
var answer = [];
|
|
41
|
-
if (array) {
|
|
42
|
-
answer = array.slice(0);
|
|
43
|
-
}
|
|
44
|
-
return answer;
|
|
45
|
-
};
|
|
46
|
-
ArrayUtils.CloneArrayAndItsItems = function (array, arrayItemsClass, deepClone) {
|
|
47
|
-
if (deepClone === void 0) { deepClone = false; }
|
|
48
|
-
var cloneArray = [];
|
|
49
|
-
if (array) {
|
|
50
|
-
for (var i = 0, len = array.length; i < len; i++) {
|
|
51
|
-
if (deepClone) {
|
|
52
|
-
cloneArray.push(ObjectUtils.GetDeepClone(array[i]));
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
cloneArray.push(ObjectUtils.GetShallowClone(array[i], arrayItemsClass));
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
return [];
|
|
61
|
-
}
|
|
62
|
-
return cloneArray;
|
|
63
|
-
};
|
|
64
|
-
ArrayUtils.RemoveElementAtIndex = function (index, array) {
|
|
65
|
-
if (NumberUtils.IsNaN(index) || index < 0 || !Array.isArray(array) || array.length === 0) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
if (index in array) {
|
|
69
|
-
array.splice(index, 1);
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
ArrayUtils.RemoveElement = function (element, array) {
|
|
77
|
-
if (!Array.isArray(array)) {
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
var index = array.indexOf(element);
|
|
81
|
-
return ArrayUtils.RemoveElementAtIndex(index, array);
|
|
82
|
-
};
|
|
83
|
-
ArrayUtils.IsArrayWithElements = function (arrayToCheck, classItemsMustBeInstanceOf) {
|
|
84
|
-
if (isNill(arrayToCheck)) {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
if (Array.isArray(arrayToCheck) && arrayToCheck.length > 0) {
|
|
88
|
-
if (classItemsMustBeInstanceOf) {
|
|
89
|
-
return arrayToCheck[0] instanceof classItemsMustBeInstanceOf;
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
return true;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
return false;
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
ArrayUtils.RemoveElementsByFilter = function (array, filterFunction) {
|
|
100
|
-
if (!ArrayUtils.IsArrayWithElements(array) || !filterFunction) {
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
var atLeastOneRemoved = false;
|
|
104
|
-
var len = array.length;
|
|
105
|
-
for (var i = len - 1; i >= 0; i--) {
|
|
106
|
-
var item = array[i];
|
|
107
|
-
if (filterFunction.call(this, item) === true) {
|
|
108
|
-
array.splice(i, 1);
|
|
109
|
-
atLeastOneRemoved = true;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return atLeastOneRemoved;
|
|
113
|
-
};
|
|
114
|
-
ArrayUtils.MoveElement = function (element, toIndex, array) {
|
|
115
|
-
if (!Array.isArray(array) || isNill(toIndex)) {
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
var fromIndex = array.indexOf(element);
|
|
119
|
-
var toIndexCorrected = NumberUtils.GetNearestNumberWithinBounds(toIndex, 0, array.length - 1);
|
|
120
|
-
if (fromIndex === -1 || array[toIndexCorrected] === element) {
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
array.splice(toIndexCorrected, 0, array.splice(fromIndex, 1)[0]);
|
|
124
|
-
return true;
|
|
125
|
-
};
|
|
126
|
-
ArrayUtils.PlaceElementAfterOther = function (array, elementToPlace, afterThisElement) {
|
|
127
|
-
if (array) {
|
|
128
|
-
var afterThisElIdx = array.indexOf(afterThisElement);
|
|
129
|
-
var elToPlaceIdx = array.indexOf(elementToPlace);
|
|
130
|
-
if (afterThisElIdx >= elToPlaceIdx) {
|
|
131
|
-
ArrayUtils.MoveElement(elementToPlace, afterThisElIdx + 1, array);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
return ArrayUtils;
|
|
136
|
-
}());
|
|
137
|
-
export { ArrayUtils };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SimpleMethodTagDecorator, simpleMethodTagDecorator } from "./simple-method-tag.utils";
|
|
2
|
-
var PROP_META_KEY = "boFactoryStep";
|
|
3
|
-
var ALL_PROPS_META_KEY = "boFactorySteps";
|
|
4
|
-
export function BoFactoryStep() {
|
|
5
|
-
return simpleMethodTagDecorator(PROP_META_KEY, ALL_PROPS_META_KEY);
|
|
6
|
-
}
|
|
7
|
-
var BoFactoryStepDecorator = (function () {
|
|
8
|
-
function BoFactoryStepDecorator() {
|
|
9
|
-
}
|
|
10
|
-
BoFactoryStepDecorator.GetDecoratedProperties = function (target) {
|
|
11
|
-
return SimpleMethodTagDecorator.GetDecoratedMethodProperties(target, ALL_PROPS_META_KEY);
|
|
12
|
-
};
|
|
13
|
-
return BoFactoryStepDecorator;
|
|
14
|
-
}());
|
|
15
|
-
export { BoFactoryStepDecorator };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SimpleMethodTagDecorator, simpleMethodTagDecorator } from "./simple-method-tag.utils";
|
|
2
|
-
var PROP_META_KEY = "boSerializerStep";
|
|
3
|
-
var ALL_PROPS_META_KEY = "boSerializerStep";
|
|
4
|
-
export function BoSerializerStep() {
|
|
5
|
-
return simpleMethodTagDecorator(PROP_META_KEY, ALL_PROPS_META_KEY);
|
|
6
|
-
}
|
|
7
|
-
var BoSerializerStepDecorator = (function () {
|
|
8
|
-
function BoSerializerStepDecorator() {
|
|
9
|
-
}
|
|
10
|
-
BoSerializerStepDecorator.GetDecoratedProperties = function (target) {
|
|
11
|
-
return SimpleMethodTagDecorator.GetDecoratedMethodProperties(target, ALL_PROPS_META_KEY);
|
|
12
|
-
};
|
|
13
|
-
return BoSerializerStepDecorator;
|
|
14
|
-
}());
|
|
15
|
-
export { BoSerializerStepDecorator };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BusinessObjectIDType } from "../type/business-object-id-type";
|
|
2
|
-
import { BusinessObject } from "../model/business-object";
|
|
3
|
-
export declare class BusinessObjectUtils {
|
|
4
|
-
static FindItemById<T extends BusinessObject>(modelArray: T[], id: BusinessObjectIDType): T;
|
|
5
|
-
static IsEqualBoId(idA: BusinessObjectIDType, idB: BusinessObjectIDType): boolean;
|
|
6
|
-
static GetDisplayName(firstName: string, prefix: string, familyName: string): string;
|
|
7
|
-
static GetDisplayInitials(firstName: string, familyName: string): string;
|
|
8
|
-
static GetIsActive(endDate: Date): boolean;
|
|
9
|
-
static GetDisplayInitialsForOneFullName(fullName: string): string;
|
|
10
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { notNill } from "./function/not-nill.function";
|
|
2
|
-
import { ObjectUtils } from "./object-utils";
|
|
3
|
-
import { StringUtils } from "./string-utils";
|
|
4
|
-
var BusinessObjectUtils = (function () {
|
|
5
|
-
function BusinessObjectUtils() {
|
|
6
|
-
}
|
|
7
|
-
BusinessObjectUtils.FindItemById = function (modelArray, id) {
|
|
8
|
-
if (!modelArray) {
|
|
9
|
-
return undefined;
|
|
10
|
-
}
|
|
11
|
-
var foundModel = undefined;
|
|
12
|
-
var len = modelArray.length;
|
|
13
|
-
for (var i = 0; i < len; i++) {
|
|
14
|
-
var modelCur = modelArray[i];
|
|
15
|
-
if (modelCur && !!modelCur.getId && this.IsEqualBoId(modelCur.getId(), id)) {
|
|
16
|
-
foundModel = modelCur;
|
|
17
|
-
break;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return foundModel;
|
|
21
|
-
};
|
|
22
|
-
BusinessObjectUtils.IsEqualBoId = function (idA, idB) {
|
|
23
|
-
var isEqualId = false;
|
|
24
|
-
if (notNill(idA) && notNill(idB)) {
|
|
25
|
-
if (idA === idB) {
|
|
26
|
-
isEqualId = true;
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
isEqualId = ObjectUtils.DeepEquals(idA, idB);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return isEqualId;
|
|
33
|
-
};
|
|
34
|
-
BusinessObjectUtils.GetDisplayName = function (firstName, prefix, familyName) {
|
|
35
|
-
if (!firstName) {
|
|
36
|
-
if (prefix) {
|
|
37
|
-
return StringUtils.Format("{0} {1}", [prefix, familyName]);
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
return familyName;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
if (prefix) {
|
|
44
|
-
return StringUtils.Format("{0} {1} {2}", [firstName, prefix, familyName]);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
return StringUtils.Format("{0} {1}", [firstName, familyName]);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
BusinessObjectUtils.GetDisplayInitials = function (firstName, familyName) {
|
|
51
|
-
if (!firstName && !familyName) {
|
|
52
|
-
return "";
|
|
53
|
-
}
|
|
54
|
-
if (!firstName) {
|
|
55
|
-
return StringUtils.GetFirstCapital(familyName).toUpperCase();
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
return StringUtils.Format("{0}{1}", [firstName[0], StringUtils.GetFirstCapital(familyName)]).toUpperCase();
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
BusinessObjectUtils.GetIsActive = function (endDate) {
|
|
62
|
-
return (endDate ? endDate > new Date() : true);
|
|
63
|
-
};
|
|
64
|
-
BusinessObjectUtils.GetDisplayInitialsForOneFullName = function (fullName) {
|
|
65
|
-
if (!fullName) {
|
|
66
|
-
return "";
|
|
67
|
-
}
|
|
68
|
-
var name = fullName.replace(/[^a-zA-Z0-9\s]/gi, "");
|
|
69
|
-
var parts = name.split(" ");
|
|
70
|
-
var first = parts.shift();
|
|
71
|
-
if (!parts.length) {
|
|
72
|
-
return first.substr(0, 2).toUpperCase();
|
|
73
|
-
}
|
|
74
|
-
var initials = first.substr(0, 1);
|
|
75
|
-
parts.sort(function (part1, part2) { return part2.length - part1.length; });
|
|
76
|
-
return (initials + parts[0].substr(0, 1)).toUpperCase();
|
|
77
|
-
};
|
|
78
|
-
return BusinessObjectUtils;
|
|
79
|
-
}());
|
|
80
|
-
export { BusinessObjectUtils };
|