@colijnit/transaction 12.1.7 → 12.1.10
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/README.md +10 -13
- package/bundles/colijnit-transaction.umd.js +7754 -6787
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction.d.ts +106 -58
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/colijnit-transaction.js +107 -59
- package/esm2015/lib/assets/dictionary/text.properties.js +456 -0
- package/esm2015/lib/component/checkout/checkout-login/checkout-login.component.js +106 -0
- package/esm2015/lib/component/checkout/checkout-overview-delivery-address/checkout-overview-delivery-address.component.js +47 -0
- package/esm2015/lib/component/checkout/checkout-overview-delivery-edit/checkout-overview-delivery-edit.component.js +275 -0
- package/esm2015/lib/component/checkout/checkout-overview-relation-edit/checkout-overview-relation-edit.component.js +538 -0
- package/esm2015/lib/component/checkout/checkout-relation-suggestions-list/checkout-relation-suggestions-list.component.js +30 -0
- package/esm2015/lib/component/checkout/checkout-relation-suggestions-list-item/checkout-relation-suggestions-list-item.component.js +31 -0
- package/esm2015/lib/component/checkout/checkout.component.js +132 -0
- package/esm2015/lib/component/checkout/checkout.module.js +86 -0
- package/esm2015/lib/component/confirmation-dialog/confirmation-dialog.component.js +52 -0
- package/esm2015/lib/component/confirmation-dialog/confirmation-dialog.module.js +24 -0
- package/esm2015/lib/component/core/base/default-ok-cancel-buttons.component.js +41 -0
- package/esm2015/lib/component/core/base/dialog-base.component.js +6 -0
- package/esm2015/lib/component/core/base/transaction-base.component.js +94 -0
- package/esm2015/lib/component/core/core.module.js +39 -0
- package/esm2015/lib/component/core/enum/app-popup-button-type.enum.js +11 -0
- package/esm2015/lib/component/core/enum/app-popup-type.enum.js +8 -0
- package/esm2015/{app → lib}/component/core/icon/icon.component.js +3 -4
- package/esm2015/lib/component/core/image-display/image-display.component.js +29 -0
- package/esm2015/lib/component/core/relation/customer-groups.component.js +41 -0
- package/esm2015/{app → lib}/component/core/stock-status-indicator/stock-status-indicator.component.js +2 -2
- package/esm2015/lib/component/delivery-type-tile/delivery-type-tile.component.js +40 -0
- package/esm2015/lib/component/delivery-type-tile/delivery-type-tile.module.js +26 -0
- package/esm2015/lib/component/discount/discount.component.js +107 -0
- package/esm2015/lib/component/discount/discount.module.js +29 -0
- package/esm2015/lib/component/order-confirmation-grid.component/order-confirmation-grid.component.js +70 -0
- package/esm2015/lib/component/order-confirmation-grid.component/order-confirmation-grid.module.js +29 -0
- package/esm2015/lib/component/order-grid/order-grid.component.js +99 -0
- package/esm2015/lib/component/order-grid/order-grid.module.js +28 -0
- package/esm2015/lib/component/payment/payment.component.js +73 -0
- package/esm2015/lib/component/payment/payment.module.js +27 -0
- package/esm2015/lib/component/payment-tile/payment-tile.component.js +32 -0
- package/esm2015/lib/component/payment-tile/payment-tile.module.js +25 -0
- package/esm2015/lib/component/relation-address/relation-address.component.js +125 -0
- package/esm2015/lib/component/relation-address/relation-address.module.js +28 -0
- package/esm2015/lib/component/relation-address-select/relation-address-select.component.js +146 -0
- package/esm2015/lib/component/relation-address-select/relation-address-select.module.js +33 -0
- package/esm2015/lib/component/relation-address-tile/relation-address-tile.component.js +61 -0
- package/esm2015/lib/component/relation-address-tile/relation-address-tile.module.js +32 -0
- package/esm2015/lib/component/seller-information/seller-information.component.js +61 -0
- package/esm2015/lib/component/seller-information/seller-information.module.js +21 -0
- package/esm2015/lib/component/shared/transaction-article-text/transaction-article-text.component.js +118 -0
- package/esm2015/lib/component/shared/transaction-article-text/transaction-article-text.module.js +31 -0
- package/esm2015/lib/component/shared/transaction-article-text-overview/transaction-article-text-overview.component.js +129 -0
- package/esm2015/lib/component/shared/transaction-article-text-overview/transaction-article-text-overview.module.js +34 -0
- package/esm2015/lib/component/shopping-cart/shopping-cart.component.js +57 -0
- package/esm2015/lib/component/shopping-cart/shopping-cart.module.js +27 -0
- package/esm2015/lib/component/shopping-cart-preview/shopping-cart-preview.component.js +55 -0
- package/esm2015/lib/component/shopping-cart-preview/shopping-cart-preview.module.js +29 -0
- package/esm2015/lib/component/stepper/component/stepper-step.component.js +40 -0
- package/esm2015/lib/component/stepper/stepper.component.js +124 -0
- package/esm2015/lib/component/stepper/stepper.module.js +29 -0
- package/esm2015/lib/component/tile/tile.component.js +32 -0
- package/esm2015/lib/component/tile/tile.module.js +19 -0
- package/esm2015/lib/component/transaction/transaction.component.js +154 -0
- package/esm2015/lib/component/transaction/transaction.module.js +47 -0
- package/esm2015/lib/component/transaction-commit-bar/transaction-commit-bar.component.js +46 -0
- package/esm2015/lib/component/transaction-commit-bar/transaction-commit-bar.module.js +27 -0
- package/esm2015/lib/component/transaction-confirmation-history/transaction-confirmation-history.component.js +28 -0
- package/esm2015/lib/component/transaction-confirmation-history/transaction-confirmation-history.module.js +27 -0
- package/esm2015/lib/component/transaction-header/transaction-header.component.js +46 -0
- package/esm2015/lib/component/transaction-header/transaction-header.module.js +27 -0
- package/esm2015/lib/component/transaction-header-contact/transaction-header-contact.component.js +34 -0
- package/esm2015/lib/component/transaction-header-contact/transaction-header-contact.module.js +19 -0
- package/esm2015/lib/component/transaction-header-delivery/transaction-header-delivery.component.js +60 -0
- package/esm2015/lib/component/transaction-header-delivery/transaction-header-delivery.module.js +21 -0
- package/esm2015/lib/component/transaction-header-relation/transaction-header-relation.component.js +35 -0
- package/esm2015/lib/component/transaction-header-relation/transaction-header-relation.module.js +19 -0
- package/esm2015/lib/component/transaction-history-grid/transaction-history-grid.component.js +47 -0
- package/esm2015/lib/component/transaction-history-grid/transaction-history-grid.module.js +27 -0
- package/esm2015/lib/component/transaction-history-grid-status/transaction-history-grid-status.component.js +36 -0
- package/esm2015/lib/component/transaction-history-grid-status/transaction-history-grid-status.module.js +23 -0
- package/esm2015/lib/component/transaction-line/transaction-line.component.js +282 -0
- package/esm2015/lib/component/transaction-line/transaction-line.module.js +30 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-commission-code.component.js +49 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-commission-code.module.js +23 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-delivery-date.component.js +40 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-delivery-date.module.js +23 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-delivery-method.component.js +48 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-delivery-method.module.js +23 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-discount-amount.component.js +50 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-discount-amount.module.js +23 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-fields-base.component.js +22 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-line-discount.component.js +50 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-line-discount.module.js +23 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-price-list.component.js +49 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-price-list.module.js +23 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-price.component.js +49 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-price.module.js +23 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-quantity.component.js +36 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-quantity.module.js +23 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-quantum-discount.component.js +50 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-quantum-discount.module.js +23 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-reference.component.js +48 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-reference.module.js +23 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-special-discount.component.js +50 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-special-discount.module.js +23 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-vat.component.js +49 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-vat.module.js +23 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-warehouse.component.js +49 -0
- package/esm2015/lib/component/transaction-line-fields/transaction-line-warehouse.module.js +24 -0
- package/esm2015/lib/component/transaction-line-grid/transaction-line-grid.component.js +23 -0
- package/esm2015/lib/component/transaction-line-grid/transaction-line-grid.module.js +21 -0
- package/esm2015/lib/component/transaction-line-side-panel/transaction-line-side-panel.component.js +91 -0
- package/esm2015/lib/component/transaction-line-side-panel/transaction-line-side-panel.module.js +36 -0
- package/esm2015/lib/component/transaction-line-side-panel-default/transaction-line-side-panel-default.component.js +134 -0
- package/esm2015/lib/component/transaction-line-side-panel-default/transaction-line-side-panel-default.module.js +56 -0
- package/esm2015/lib/component/transaction-lines/transaction-lines.component.js +128 -0
- package/esm2015/lib/component/transaction-lines/transaction-lines.module.js +31 -0
- package/esm2015/lib/component/transaction-lines-grid/transaction-lines-grid.component.js +63 -0
- package/esm2015/lib/component/transaction-lines-grid/transaction-lines-grid.module.js +27 -0
- package/esm2015/lib/component/transaction-nav-bar/transaction-nav-bar-button/transaction-nav-bar-button.component.js +29 -0
- package/esm2015/lib/component/transaction-nav-bar/transaction-nav-bar.component.js +65 -0
- package/esm2015/lib/component/transaction-nav-bar/transaction-nav-bar.module.js +26 -0
- package/esm2015/lib/component/transaction-receiving-goods-details/transaction-receiving-goods-details.component.js +39 -0
- package/esm2015/lib/component/transaction-receiving-goods-details/transaction-receiving-goods-details.module.js +25 -0
- package/esm2015/lib/component/transaction-receiving-goods-history/transaction-receiving-goods-history.component.js +28 -0
- package/esm2015/lib/component/transaction-receiving-goods-history/transaction-receiving-goods-history.module.js +27 -0
- package/esm2015/lib/component/transaction-totals/transaction-totals.component.js +44 -0
- package/esm2015/lib/component/transaction-totals/transaction-totals.module.js +23 -0
- package/esm2015/lib/enum/content-view-mode.enum.js +10 -0
- package/esm2015/lib/enum/icon.enum.js +28 -0
- package/esm2015/lib/enum/language-code.enum.js +8 -0
- package/esm2015/lib/enum/order-discount-type.enum.js +7 -0
- package/esm2015/lib/enum/status-type.enum.js +5 -0
- package/esm2015/lib/enum/tab-category.enum.js +10 -0
- package/esm2015/lib/enum/time-size.type.js +10 -0
- package/esm2015/lib/factory/business-object-factory.js +120 -0
- package/esm2015/lib/factory/decorators/boolean.decorator.js +102 -0
- package/esm2015/lib/factory/decorators/complex-array.decorator.js +55 -0
- package/esm2015/lib/factory/decorators/complex-field.decorator.js +57 -0
- package/esm2015/lib/factory/decorators/date-field.decorator.js +36 -0
- package/esm2015/lib/factory/decorators/string-number.decorator.js +43 -0
- package/esm2015/lib/model/business-object.js +81 -0
- package/esm2015/lib/model/delivery-type.js +3 -0
- package/esm2015/lib/model/icon-svg.js +27 -0
- package/esm2015/lib/model/standard-text.js +3 -0
- package/esm2015/lib/model/text-value-container.js +3 -0
- package/esm2015/lib/pipe/append.pipe.js +17 -0
- package/esm2015/lib/pipe/co-currency.pipe.js +47 -0
- package/esm2015/lib/pipe/date-duration.pipe.js +57 -0
- package/esm2015/lib/pipe/delivery-time.pipe.js +36 -0
- package/esm2015/lib/pipe/localize.pipe.js +28 -0
- package/esm2015/lib/pipe/pipe.module.js +37 -0
- package/esm2015/lib/pipe/safe-html.pipe.js +19 -0
- package/esm2015/lib/pipe/safe-style.pipe.js +19 -0
- package/esm2015/lib/service/dialog.service.js +76 -0
- package/esm2015/lib/service/dictionary.service.js +76 -0
- package/esm2015/lib/service/icon-cache.service.js +51 -0
- package/esm2015/lib/service/ione-connector-adapter.service.js +836 -0
- package/esm2015/lib/service/options.service.js +69 -0
- package/esm2015/lib/service/pending-reason.service.js +183 -0
- package/esm2015/lib/service/transaction.service.js +679 -0
- package/esm2015/lib/utils/array-utils.js +183 -0
- package/esm2015/lib/utils/is-nill.function.js +5 -0
- package/esm2015/lib/utils/string-utils.js +64 -0
- package/esm2015/public_api.js +28 -10
- package/fesm2015/colijnit-transaction.js +7894 -6976
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/{assets → lib/assets}/dictionary/text.properties.d.ts +0 -0
- package/{app → lib}/component/checkout/checkout-login/checkout-login.component.d.ts +0 -0
- package/{app → lib}/component/checkout/checkout-login/checkout-login.component.scss +0 -0
- package/{app → lib}/component/checkout/checkout-overview-delivery-address/checkout-overview-delivery-address.component.d.ts +0 -0
- package/{app → lib}/component/checkout/checkout-overview-delivery-address/checkout-overview-delivery-address.component.scss +0 -0
- package/{app → lib}/component/checkout/checkout-overview-delivery-edit/checkout-overview-delivery-edit.component.d.ts +23 -36
- package/lib/component/checkout/checkout-overview-delivery-edit/style/_layout.scss +98 -0
- package/lib/component/checkout/checkout-overview-delivery-edit/style/_material-definition.scss +12 -0
- package/lib/component/checkout/checkout-overview-delivery-edit/style/_theme.scss +17 -0
- package/lib/component/checkout/checkout-overview-delivery-edit/style/material.scss +7 -0
- package/{app → lib}/component/checkout/checkout-overview-relation-edit/checkout-overview-relation-edit.component.d.ts +40 -12
- package/lib/component/checkout/checkout-overview-relation-edit/style/_layout.scss +125 -0
- package/lib/component/checkout/checkout-overview-relation-edit/style/_material-definition.scss +18 -0
- package/{app → lib}/component/checkout/checkout-overview-relation-edit/style/_theme.scss +1 -1
- package/lib/component/checkout/checkout-overview-relation-edit/style/material.scss +10 -0
- package/{app → lib}/component/checkout/checkout-relation-suggestions-list/checkout-relation-suggestions-list.component.d.ts +0 -0
- package/{app → lib}/component/checkout/checkout-relation-suggestions-list/style/_layout.scss +3 -2
- package/{app/component/checkout/checkout-overview-relation-address → lib/component/checkout/checkout-relation-suggestions-list}/style/_material-definition.scss +0 -0
- package/{app → lib}/component/checkout/checkout-relation-suggestions-list/style/_theme.scss +1 -1
- package/{app → lib}/component/checkout/checkout-relation-suggestions-list/style/material.scss +1 -1
- package/{app → lib}/component/checkout/checkout-relation-suggestions-list-item/checkout-relation-suggestions-list-item.component.d.ts +0 -0
- package/{app → lib}/component/checkout/checkout-relation-suggestions-list-item/style/_layout.scss +1 -1
- package/{app → lib}/component/checkout/checkout-relation-suggestions-list-item/style/_material-definition.scss +0 -0
- package/{app → lib}/component/checkout/checkout-relation-suggestions-list-item/style/_theme.scss +1 -1
- package/{app/component/core/base → lib/component/checkout/checkout-relation-suggestions-list-item}/style/material.scss +1 -1
- package/lib/component/checkout/checkout.component.d.ts +36 -0
- package/lib/component/checkout/checkout.module.d.ts +2 -0
- package/lib/component/checkout/style/_layout.scss +31 -0
- package/lib/component/checkout/style/_material-definition.scss +5 -0
- package/lib/component/checkout/style/_theme.scss +8 -0
- package/lib/component/checkout/style/material.scss +10 -0
- package/lib/component/confirmation-dialog/confirmation-dialog.component.d.ts +12 -0
- package/lib/component/confirmation-dialog/confirmation-dialog.module.d.ts +2 -0
- package/lib/component/confirmation-dialog/style/_layout.scss +22 -0
- package/lib/component/confirmation-dialog/style/_material-definition.scss +2 -0
- package/lib/component/confirmation-dialog/style/_theme.scss +6 -0
- package/lib/component/confirmation-dialog/style/material.scss +5 -0
- package/{app → lib}/component/core/base/default-ok-cancel-buttons.component.d.ts +0 -0
- package/lib/component/core/base/dialog-base.component.d.ts +4 -0
- package/{app → lib}/component/core/base/style/_layout.scss +1 -1
- package/{app/component/checkout/checkout-relation-suggestions-list → lib/component/core/base}/style/_material-definition.scss +0 -0
- package/{app → lib}/component/core/base/style/_theme.scss +1 -1
- package/{app/component/checkout/checkout-overview-relation-address → lib/component/core/base}/style/material.scss +1 -1
- package/{app → lib}/component/core/base/transaction-base.component.d.ts +7 -23
- package/{app → lib}/component/core/characteristic-answer/characteristic-answer.component.scss +3 -1
- package/{app → lib}/component/core/core.module.d.ts +0 -0
- package/lib/component/core/enum/app-popup-button-type.enum.d.ts +9 -0
- package/lib/component/core/enum/app-popup-type.enum.d.ts +6 -0
- package/{app → lib}/component/core/icon/icon.component.d.ts +3 -2
- package/{app → lib}/component/core/icon/icon.component.scss +3 -1
- package/lib/component/core/image-display/image-display.component.d.ts +5 -0
- package/lib/component/core/image-display/style/_layout.scss +55 -0
- package/lib/component/core/image-display/style/_material-definition.scss +4 -0
- package/{app → lib}/component/core/image-display/style/_theme.scss +1 -1
- package/{app → lib}/component/core/image-display/style/material.scss +1 -1
- package/{app → lib}/component/core/relation/customer-groups.component.d.ts +0 -0
- package/lib/component/core/relation/relation-customer-groups.component.scss +6 -0
- package/{app → lib}/component/core/stock-status-indicator/stock-status-indicator.component.d.ts +0 -0
- package/{app → lib}/component/core/stock-status-indicator/stock-status-indicator.component.scss +3 -1
- package/lib/component/delivery-type-tile/delivery-type-tile.component.d.ts +10 -0
- package/lib/component/delivery-type-tile/delivery-type-tile.module.d.ts +2 -0
- package/lib/component/delivery-type-tile/style/_layout.scss +35 -0
- package/lib/component/delivery-type-tile/style/_material-definition.scss +16 -0
- package/lib/component/delivery-type-tile/style/_theme.scss +6 -0
- package/lib/component/delivery-type-tile/style/material.scss +5 -0
- package/lib/component/discount/discount.component.d.ts +19 -0
- package/lib/component/discount/discount.module.d.ts +2 -0
- package/{app/component/checkout/checkout-overview-block/checkout-overview-block.component.scss → lib/component/discount/style/_layout.scss} +0 -0
- package/{app/component/core/base → lib/component/discount}/style/_material-definition.scss +0 -0
- package/{app/component/checkout/checkout-overview/checkout-overview.component.scss → lib/component/discount/style/_theme.scss} +0 -0
- package/{app/component/core/image-display/style/_material-definition.scss → lib/component/discount/style/material.scss} +0 -0
- package/lib/component/order-confirmation-create/style/_layout.scss +5 -0
- package/lib/component/order-confirmation-create/style/_material-definition.scss +1 -0
- package/lib/component/order-confirmation-create/style/_theme.scss +5 -0
- package/{app/component/checkout/checkout-relation-suggestions-list-item → lib/component/order-confirmation-create}/style/material.scss +1 -1
- package/lib/component/order-confirmation-grid.component/order-confirmation-grid.component.d.ts +15 -0
- package/lib/component/order-confirmation-grid.component/order-confirmation-grid.module.d.ts +2 -0
- package/lib/component/order-confirmation-grid.component/style/_layout.scss +5 -0
- package/lib/component/order-confirmation-grid.component/style/_material-definition.scss +1 -0
- package/lib/component/order-confirmation-grid.component/style/_theme.scss +5 -0
- package/lib/component/order-confirmation-grid.component/style/material.scss +4 -0
- package/lib/component/order-grid/order-grid.component.d.ts +23 -0
- package/lib/component/order-grid/order-grid.module.d.ts +2 -0
- package/lib/component/order-grid/style/_layout.scss +21 -0
- package/lib/component/order-grid/style/_material-definition.scss +2 -0
- package/lib/component/order-grid/style/_theme.scss +6 -0
- package/lib/component/order-grid/style/material.scss +4 -0
- package/lib/component/payment/payment.component.d.ts +18 -0
- package/lib/component/payment/payment.module.d.ts +2 -0
- package/lib/component/payment/style/_layout.scss +54 -0
- package/lib/component/payment/style/_material-definition.scss +17 -0
- package/lib/component/payment/style/_theme.scss +16 -0
- package/lib/component/payment/style/material.scss +5 -0
- package/lib/component/payment-tile/payment-tile.component.d.ts +9 -0
- package/lib/component/payment-tile/payment-tile.module.d.ts +2 -0
- package/lib/component/payment-tile/style/_layout.scss +22 -0
- package/{app/component/core/no-image-display/no-image-display.component.scss → lib/component/payment-tile/style/_material-definition.scss} +0 -0
- package/lib/component/payment-tile/style/_theme.scss +6 -0
- package/lib/component/payment-tile/style/material.scss +5 -0
- package/lib/component/relation-address/relation-address.component.d.ts +28 -0
- package/lib/component/relation-address/relation-address.module.d.ts +2 -0
- package/lib/component/relation-address/style/_layout.scss +25 -0
- package/lib/component/relation-address/style/_material-definition.scss +3 -0
- package/lib/component/relation-address/style/_theme.scss +7 -0
- package/lib/component/relation-address/style/material.scss +5 -0
- package/lib/component/relation-address-select/relation-address-select.component.d.ts +33 -0
- package/lib/component/relation-address-select/relation-address-select.module.d.ts +2 -0
- package/lib/component/relation-address-select/style/_layout.scss +85 -0
- package/lib/component/relation-address-select/style/_material-definition.scss +4 -0
- package/lib/component/relation-address-select/style/_theme.scss +6 -0
- package/lib/component/relation-address-select/style/material.scss +5 -0
- package/lib/component/relation-address-tile/relation-address-tile.component.d.ts +14 -0
- package/lib/component/relation-address-tile/relation-address-tile.module.d.ts +2 -0
- package/lib/component/relation-address-tile/style/_layout.scss +42 -0
- package/lib/component/relation-address-tile/style/_material-definition.scss +16 -0
- package/lib/component/relation-address-tile/style/_theme.scss +21 -0
- package/lib/component/relation-address-tile/style/material.scss +5 -0
- package/lib/component/seller-information/seller-information.component.d.ts +13 -0
- package/lib/component/seller-information/seller-information.module.d.ts +2 -0
- package/lib/component/seller-information/style/_layout.scss +21 -0
- package/lib/component/seller-information/style/_material-definition.scss +2 -0
- package/lib/component/seller-information/style/_theme.scss +7 -0
- package/lib/component/seller-information/style/material.scss +4 -0
- package/lib/component/shared/transaction-article-text/style/_layout.scss +42 -0
- package/lib/component/shared/transaction-article-text/style/_material-definition.scss +7 -0
- package/lib/component/shared/transaction-article-text/style/_theme.scss +11 -0
- package/lib/component/shared/transaction-article-text/style/material.scss +5 -0
- package/lib/component/shared/transaction-article-text/transaction-article-text.component.d.ts +31 -0
- package/lib/component/shared/transaction-article-text/transaction-article-text.module.d.ts +2 -0
- package/lib/component/shared/transaction-article-text-overview/style/_layout.scss +56 -0
- package/lib/component/shared/transaction-article-text-overview/style/_material-definition.scss +9 -0
- package/lib/component/shared/transaction-article-text-overview/style/_theme.scss +9 -0
- package/lib/component/shared/transaction-article-text-overview/style/material.scss +4 -0
- package/lib/component/shared/transaction-article-text-overview/transaction-article-text-overview.component.d.ts +30 -0
- package/lib/component/shared/transaction-article-text-overview/transaction-article-text-overview.module.d.ts +2 -0
- package/lib/component/shopping-cart/shopping-cart.component.d.ts +15 -0
- package/lib/component/shopping-cart/shopping-cart.module.d.ts +2 -0
- package/lib/component/shopping-cart/style/_layout.scss +33 -0
- package/lib/component/shopping-cart/style/_material-definition.scss +10 -0
- package/lib/component/shopping-cart/style/_theme.scss +14 -0
- package/lib/component/shopping-cart/style/material.scss +4 -0
- package/{app/component/shopping-cart → lib/component/shopping-cart-OLD}/shopping-cart-manager/shopping-cart-manager.component.scss +4 -2
- package/lib/component/shopping-cart-preview/shopping-cart-preview.component.d.ts +13 -0
- package/lib/component/shopping-cart-preview/shopping-cart-preview.module.d.ts +2 -0
- package/lib/component/shopping-cart-preview/style/_layout.scss +48 -0
- package/lib/component/shopping-cart-preview/style/_material-definition.scss +20 -0
- package/lib/component/shopping-cart-preview/style/_theme.scss +17 -0
- package/lib/component/shopping-cart-preview/style/material.scss +4 -0
- package/lib/component/stepper/component/stepper-step.component.d.ts +12 -0
- package/lib/component/stepper/stepper.component.d.ts +35 -0
- package/lib/component/stepper/stepper.module.d.ts +2 -0
- package/lib/component/stepper/style/_layout.scss +107 -0
- package/lib/component/stepper/style/_material-definition.scss +18 -0
- package/lib/component/stepper/style/_theme.scss +43 -0
- package/lib/component/stepper/style/material.scss +4 -0
- package/lib/component/tile/style/_layout.scss +36 -0
- package/lib/component/tile/style/_material-definition.scss +16 -0
- package/lib/component/tile/style/_theme.scss +36 -0
- package/lib/component/tile/style/material.scss +4 -0
- package/lib/component/tile/tile.component.d.ts +6 -0
- package/lib/component/tile/tile.module.d.ts +2 -0
- package/lib/component/transaction/style/_layout.scss +31 -0
- package/lib/component/transaction/style/_material-definition.scss +7 -0
- package/lib/component/transaction/style/_theme.scss +24 -0
- package/lib/component/transaction/style/material.scss +11 -0
- package/lib/component/transaction/transaction.component.d.ts +39 -0
- package/lib/component/transaction/transaction.module.d.ts +2 -0
- package/lib/component/transaction-commit-bar/style/_layout.scss +16 -0
- package/lib/component/transaction-commit-bar/style/_material-definition.scss +1 -0
- package/lib/component/transaction-commit-bar/style/_theme.scss +7 -0
- package/lib/component/transaction-commit-bar/style/material.scss +4 -0
- package/lib/component/transaction-commit-bar/transaction-commit-bar.component.d.ts +11 -0
- package/lib/component/transaction-commit-bar/transaction-commit-bar.module.d.ts +2 -0
- package/lib/component/transaction-confirmation-history/style/_layout.scss +7 -0
- package/lib/component/transaction-confirmation-history/style/_material-definition.scss +1 -0
- package/lib/component/transaction-confirmation-history/style/_theme.scss +7 -0
- package/lib/component/transaction-confirmation-history/style/material.scss +4 -0
- package/lib/component/transaction-confirmation-history/transaction-confirmation-history.component.d.ts +5 -0
- package/lib/component/transaction-confirmation-history/transaction-confirmation-history.module.d.ts +2 -0
- package/lib/component/transaction-header/style/_layout.scss +38 -0
- package/lib/component/transaction-header/style/_material-definition.scss +8 -0
- package/lib/component/transaction-header/style/_theme.scss +11 -0
- package/lib/component/transaction-header/style/material.scss +7 -0
- package/lib/component/transaction-header/transaction-header.component.d.ts +12 -0
- package/lib/component/transaction-header/transaction-header.module.d.ts +2 -0
- package/lib/component/transaction-header-contact/style/_layout.scss +25 -0
- package/lib/component/transaction-header-contact/style/_material-definition.scss +7 -0
- package/lib/component/transaction-header-contact/style/_theme.scss +11 -0
- package/lib/component/transaction-header-contact/style/material.scss +4 -0
- package/lib/component/transaction-header-contact/transaction-header-contact.component.d.ts +4 -0
- package/lib/component/transaction-header-contact/transaction-header-contact.module.d.ts +2 -0
- package/lib/component/transaction-header-delivery/style/_layout.scss +54 -0
- package/lib/component/transaction-header-delivery/style/_material-definition.scss +12 -0
- package/lib/component/transaction-header-delivery/style/_theme.scss +24 -0
- package/lib/component/transaction-header-delivery/style/material.scss +4 -0
- package/lib/component/transaction-header-delivery/transaction-header-delivery.component.d.ts +13 -0
- package/lib/component/transaction-header-delivery/transaction-header-delivery.module.d.ts +2 -0
- package/lib/component/transaction-header-relation/style/_layout.scss +25 -0
- package/lib/component/transaction-header-relation/style/_material-definition.scss +7 -0
- package/lib/component/transaction-header-relation/style/_theme.scss +11 -0
- package/lib/component/transaction-header-relation/style/material.scss +4 -0
- package/lib/component/transaction-header-relation/transaction-header-relation.component.d.ts +4 -0
- package/lib/component/transaction-header-relation/transaction-header-relation.module.d.ts +2 -0
- package/lib/component/transaction-history-grid/style/_layout.scss +7 -0
- package/{app/component/service-order/transaction-edit-article-text/transaction-edit-article-text.component.scss → lib/component/transaction-history-grid/style/_material-definition.scss} +0 -0
- package/lib/component/transaction-history-grid/style/_theme.scss +7 -0
- package/lib/component/transaction-history-grid/style/material.scss +4 -0
- package/lib/component/transaction-history-grid/transaction-history-grid.component.d.ts +14 -0
- package/lib/component/transaction-history-grid/transaction-history-grid.module.d.ts +2 -0
- package/lib/component/transaction-history-grid-status/style/_layout.scss +28 -0
- package/{app/component/service-order/transaction-article-text-overview/transaction-article-text-overview.component.scss → lib/component/transaction-history-grid-status/style/_material-definition.scss} +0 -0
- package/lib/component/transaction-history-grid-status/style/_theme.scss +7 -0
- package/lib/component/transaction-history-grid-status/style/material.scss +4 -0
- package/lib/component/transaction-history-grid-status/transaction-history-grid-status.component.d.ts +9 -0
- package/lib/component/transaction-history-grid-status/transaction-history-grid-status.module.d.ts +2 -0
- package/lib/component/transaction-line/style/_layout.scss +143 -0
- package/lib/component/transaction-line/style/_material-definition.scss +29 -0
- package/lib/component/transaction-line/style/_theme.scss +41 -0
- package/lib/component/transaction-line/style/material.scss +9 -0
- package/lib/component/transaction-line/transaction-line.component.d.ts +52 -0
- package/lib/component/transaction-line/transaction-line.module.d.ts +2 -0
- package/lib/component/transaction-line-fields/transaction-line-commission-code.component.d.ts +12 -0
- package/lib/component/transaction-line-fields/transaction-line-commission-code.module.d.ts +2 -0
- package/lib/component/transaction-line-fields/transaction-line-delivery-date.component.d.ts +7 -0
- package/lib/component/transaction-line-fields/transaction-line-delivery-date.module.d.ts +2 -0
- package/lib/component/transaction-line-fields/transaction-line-delivery-method.component.d.ts +12 -0
- package/lib/component/transaction-line-fields/transaction-line-delivery-method.module.d.ts +2 -0
- package/lib/component/transaction-line-fields/transaction-line-discount-amount.component.d.ts +10 -0
- package/lib/component/transaction-line-fields/transaction-line-discount-amount.module.d.ts +2 -0
- package/lib/component/transaction-line-fields/transaction-line-fields-base.component.d.ts +6 -0
- package/lib/component/transaction-line-fields/transaction-line-line-discount.component.d.ts +10 -0
- package/lib/component/transaction-line-fields/transaction-line-line-discount.module.d.ts +2 -0
- package/lib/component/transaction-line-fields/transaction-line-price-list.component.d.ts +12 -0
- package/lib/component/transaction-line-fields/transaction-line-price-list.module.d.ts +2 -0
- package/lib/component/transaction-line-fields/transaction-line-price.component.d.ts +10 -0
- package/lib/component/transaction-line-fields/transaction-line-price.module.d.ts +2 -0
- package/lib/component/transaction-line-fields/transaction-line-quantity.component.d.ts +7 -0
- package/lib/component/transaction-line-fields/transaction-line-quantity.module.d.ts +2 -0
- package/lib/component/transaction-line-fields/transaction-line-quantum-discount.component.d.ts +10 -0
- package/lib/component/transaction-line-fields/transaction-line-quantum-discount.module.d.ts +2 -0
- package/lib/component/transaction-line-fields/transaction-line-reference.component.d.ts +10 -0
- package/lib/component/transaction-line-fields/transaction-line-reference.module.d.ts +2 -0
- package/lib/component/transaction-line-fields/transaction-line-special-discount.component.d.ts +10 -0
- package/lib/component/transaction-line-fields/transaction-line-special-discount.module.d.ts +2 -0
- package/lib/component/transaction-line-fields/transaction-line-vat.component.d.ts +12 -0
- package/lib/component/transaction-line-fields/transaction-line-vat.module.d.ts +2 -0
- package/lib/component/transaction-line-fields/transaction-line-warehouse.component.d.ts +12 -0
- package/lib/component/transaction-line-fields/transaction-line-warehouse.module.d.ts +2 -0
- package/lib/component/transaction-line-grid/style/_layout.scss +6 -0
- package/{app/component/service-order/transaction-sidebar/transaction-line-accordion.component.scss → lib/component/transaction-line-grid/style/_material-definition.scss} +0 -0
- package/lib/component/transaction-line-grid/style/_theme.scss +6 -0
- package/lib/component/transaction-line-grid/style/material.scss +4 -0
- package/lib/component/transaction-line-grid/transaction-line-grid.component.d.ts +5 -0
- package/lib/component/transaction-line-grid/transaction-line-grid.module.d.ts +2 -0
- package/lib/component/transaction-line-side-panel/style/_layout.scss +64 -0
- package/lib/component/transaction-line-side-panel/style/_material-definition.scss +8 -0
- package/lib/component/transaction-line-side-panel/style/_theme.scss +9 -0
- package/lib/component/transaction-line-side-panel/style/material.scss +9 -0
- package/lib/component/transaction-line-side-panel/transaction-line-side-panel.component.d.ts +18 -0
- package/lib/component/transaction-line-side-panel/transaction-line-side-panel.module.d.ts +2 -0
- package/lib/component/transaction-line-side-panel-default/style/_layout.scss +29 -0
- package/lib/component/transaction-line-side-panel-default/style/_material-definition.scss +10 -0
- package/lib/component/transaction-line-side-panel-default/style/_theme.scss +7 -0
- package/lib/component/transaction-line-side-panel-default/style/material.scss +4 -0
- package/lib/component/transaction-line-side-panel-default/transaction-line-side-panel-default.component.d.ts +16 -0
- package/lib/component/transaction-line-side-panel-default/transaction-line-side-panel-default.module.d.ts +2 -0
- package/lib/component/transaction-lines/style/_layout.scss +33 -0
- package/lib/component/transaction-lines/style/_material-definition.scss +3 -0
- package/lib/component/transaction-lines/style/_theme.scss +19 -0
- package/lib/component/transaction-lines/style/material.scss +7 -0
- package/lib/component/transaction-lines/transaction-lines.component.d.ts +37 -0
- package/lib/component/transaction-lines/transaction-lines.module.d.ts +2 -0
- package/lib/component/transaction-lines-grid/style/_layout.scss +37 -0
- package/lib/component/transaction-lines-grid/style/_material-definition.scss +19 -0
- package/lib/component/transaction-lines-grid/style/_theme.scss +15 -0
- package/lib/component/transaction-lines-grid/style/material.scss +5 -0
- package/lib/component/transaction-lines-grid/transaction-lines-grid.component.d.ts +20 -0
- package/lib/component/transaction-lines-grid/transaction-lines-grid.module.d.ts +2 -0
- package/lib/component/transaction-nav-bar/style/_layout.scss +13 -0
- package/lib/component/transaction-nav-bar/style/_material-definition.scss +1 -0
- package/lib/component/transaction-nav-bar/style/_theme.scss +7 -0
- package/lib/component/transaction-nav-bar/style/material.scss +4 -0
- package/lib/component/transaction-nav-bar/transaction-nav-bar-button/transaction-nav-bar-button.component.d.ts +14 -0
- package/lib/component/transaction-nav-bar/transaction-nav-bar-button/transaction-nav-bar-button.component.scss +23 -0
- package/lib/component/transaction-nav-bar/transaction-nav-bar.component.d.ts +18 -0
- package/lib/component/transaction-nav-bar/transaction-nav-bar.module.d.ts +2 -0
- package/lib/component/transaction-receiving-goods-details/style/_layout.scss +38 -0
- package/lib/component/transaction-receiving-goods-details/style/_material-definition.scss +1 -0
- package/lib/component/transaction-receiving-goods-details/style/_theme.scss +7 -0
- package/lib/component/transaction-receiving-goods-details/style/material.scss +4 -0
- package/lib/component/transaction-receiving-goods-details/transaction-receiving-goods-details.component.d.ts +6 -0
- package/lib/component/transaction-receiving-goods-details/transaction-receiving-goods-details.module.d.ts +2 -0
- package/lib/component/transaction-receiving-goods-history/style/_layout.scss +7 -0
- package/lib/component/transaction-receiving-goods-history/style/_material-definition.scss +1 -0
- package/lib/component/transaction-receiving-goods-history/style/_theme.scss +7 -0
- package/lib/component/transaction-receiving-goods-history/style/material.scss +4 -0
- package/lib/component/transaction-receiving-goods-history/transaction-receiving-goods-history.component.d.ts +5 -0
- package/lib/component/transaction-receiving-goods-history/transaction-receiving-goods-history.module.d.ts +2 -0
- package/lib/component/transaction-totals/style/_layout.scss +35 -0
- package/lib/component/transaction-totals/style/_material-definition.scss +15 -0
- package/lib/component/transaction-totals/style/_theme.scss +10 -0
- package/lib/component/transaction-totals/style/material.scss +4 -0
- package/lib/component/transaction-totals/transaction-totals.component.d.ts +9 -0
- package/lib/component/transaction-totals/transaction-totals.module.d.ts +2 -0
- package/{app → lib}/enum/content-view-mode.enum.d.ts +0 -0
- package/lib/enum/icon.enum.d.ts +26 -0
- package/{app → lib}/enum/language-code.enum.d.ts +0 -0
- package/{app → lib}/enum/order-discount-type.enum.d.ts +0 -0
- package/lib/enum/status-type.enum.d.ts +3 -0
- package/lib/enum/tab-category.enum.d.ts +8 -0
- package/{app → lib}/enum/time-size.type.d.ts +0 -0
- package/{factory → lib/factory}/business-object-factory.d.ts +1 -1
- package/{factory → lib/factory}/decorators/boolean.decorator.d.ts +0 -0
- package/{factory → lib/factory}/decorators/complex-array.decorator.d.ts +0 -0
- package/{factory → lib/factory}/decorators/complex-field.decorator.d.ts +0 -0
- package/{factory → lib/factory}/decorators/date-field.decorator.d.ts +0 -0
- package/{factory → lib/factory}/decorators/string-number.decorator.d.ts +0 -0
- package/{app → lib}/model/business-object.d.ts +0 -0
- package/lib/model/delivery-type.d.ts +7 -0
- package/lib/model/icon-svg.d.ts +4 -0
- package/{app → lib}/model/standard-text.d.ts +0 -0
- package/{app → lib}/model/text-value-container.d.ts +0 -0
- package/{app → lib}/pipe/append.pipe.d.ts +0 -0
- package/{app → lib}/pipe/co-currency.pipe.d.ts +0 -0
- package/{app → lib}/pipe/date-duration.pipe.d.ts +0 -0
- package/{app → lib}/pipe/delivery-time.pipe.d.ts +0 -0
- package/{app → lib}/pipe/localize.pipe.d.ts +0 -0
- package/lib/pipe/pipe.module.d.ts +2 -0
- package/lib/pipe/safe-html.pipe.d.ts +7 -0
- package/{app/pipe/safe-style-pipe.d.ts → lib/pipe/safe-style.pipe.d.ts} +0 -0
- package/lib/service/dialog.service.d.ts +12 -0
- package/{app → lib}/service/dictionary.service.d.ts +0 -0
- package/lib/service/icon-cache.service.d.ts +18 -0
- package/{app → lib}/service/ione-connector-adapter.service.d.ts +34 -13
- package/{app → lib}/service/options.service.d.ts +3 -4
- package/lib/service/pending-reason.service.d.ts +32 -0
- package/{app → lib}/service/transaction.service.d.ts +35 -55
- package/{style → lib/style}/_mixin.scss +0 -0
- package/{style → lib/style}/_variables.scss +29 -3
- package/{utils → lib/utils}/array-utils.d.ts +0 -0
- package/{utils → lib/utils}/is-nill.function.d.ts +0 -0
- package/{app → lib}/utils/string-utils.d.ts +0 -0
- package/package.json +27 -33
- package/public_api.d.ts +27 -6
- package/app/app.component.scss +0 -39
- package/app/component/checkout/checkout/checkout.component.d.ts +0 -34
- package/app/component/checkout/checkout/checkout.component.scss +0 -137
- package/app/component/checkout/checkout-overview/checkout-overview.component.d.ts +0 -42
- package/app/component/checkout/checkout-overview-block/checkout-overview-block.component.d.ts +0 -12
- package/app/component/checkout/checkout-overview-delivery-edit/checkout-overview-delivery-edit.component.scss +0 -3
- package/app/component/checkout/checkout-overview-relation-address/checkout-overview-relation-address.component.d.ts +0 -23
- package/app/component/checkout/checkout-overview-relation-address/style/_layout.scss +0 -19
- package/app/component/checkout/checkout-overview-relation-address/style/_theme.scss +0 -7
- package/app/component/checkout/checkout-overview-relation-edit/style/_layout.scss +0 -92
- package/app/component/checkout/checkout-overview-relation-edit/style/_material-definition.scss +0 -15
- package/app/component/checkout/checkout-overview-relation-edit/style/material.scss +0 -5
- package/app/component/checkout/checkout-transaction/checkout-transaction.component.d.ts +0 -16
- package/app/component/checkout/checkout-transaction/checkout-transaction.component.scss +0 -11
- package/app/component/checkout/ione-checkout.component.d.ts +0 -41
- package/app/component/checkout/ione-checkout.module.d.ts +0 -2
- package/app/component/core/characteristic-answer/characteristic-answer.component.d.ts +0 -22
- package/app/component/core/directive/template-wrapper.directive.d.ts +0 -13
- package/app/component/core/image-display/image-display.component.d.ts +0 -14
- package/app/component/core/image-display/style/_layout.scss +0 -39
- package/app/component/core/no-image-display/no-image-display.component.d.ts +0 -5
- package/app/component/service-order/ione-service-order-module.d.ts +0 -2
- package/app/component/service-order/ione-service-order.component.d.ts +0 -25
- package/app/component/service-order/service-order.component.d.ts +0 -52
- package/app/component/service-order/service-order.component.scss +0 -152
- package/app/component/service-order/summary/transaction-article-summary.component.d.ts +0 -17
- package/app/component/service-order/summary/transaction-delivery-summary.component.d.ts +0 -20
- package/app/component/service-order/summary/transaction-delivery-summary.component.scss +0 -20
- package/app/component/service-order/summary/transaction-order-summary.component.d.ts +0 -16
- package/app/component/service-order/summary/transaction-payment-info.component.d.ts +0 -14
- package/app/component/service-order/summary/transaction-product-contract-summary.component.d.ts +0 -7
- package/app/component/service-order/summary/transaction-product-summary.component.d.ts +0 -15
- package/app/component/service-order/summary/transaction-service-status.component.d.ts +0 -15
- package/app/component/service-order/summary/transaction-service-summary.component.d.ts +0 -15
- package/app/component/service-order/summary/transaction-summary-block.component.d.ts +0 -16
- package/app/component/service-order/summary/transaction-summary-block.component.scss +0 -107
- package/app/component/service-order/transaction-article-text/transaction-article-text.component.d.ts +0 -33
- package/app/component/service-order/transaction-article-text/transaction-article-text.component.scss +0 -6
- package/app/component/service-order/transaction-article-text-overview/transaction-article-text-overview.component.d.ts +0 -23
- package/app/component/service-order/transaction-edit-article-text/transaction-edit-article-text.component.d.ts +0 -19
- package/app/component/service-order/transaction-header-block/transaction-header-block.component.d.ts +0 -15
- package/app/component/service-order/transaction-header-block/transaction-header-block.component.scss +0 -65
- package/app/component/service-order/transaction-manager/transaction-manager.component.d.ts +0 -64
- package/app/component/service-order/transaction-manager/transaction-manager.component.scss +0 -52
- package/app/component/service-order/transaction-order-line-view/transaction-order-line-view.component.d.ts +0 -16
- package/app/component/service-order/transaction-order-line-view/transaction-order-line-view.component.scss +0 -88
- package/app/component/service-order/transaction-order-lines/transaction-order-lines.component.d.ts +0 -25
- package/app/component/service-order/transaction-order-lines/transaction-order-lines.component.scss +0 -83
- package/app/component/service-order/transaction-order-totals/transaction-order-totals.component.d.ts +0 -6
- package/app/component/service-order/transaction-order-totals/transaction-order-totals.component.scss +0 -24
- package/app/component/service-order/transaction-relation/transaction-relation-address.component.d.ts +0 -22
- package/app/component/service-order/transaction-relation/transaction-relation-edit.component.d.ts +0 -29
- package/app/component/service-order/transaction-relation/transaction-relation-edit.component.scss +0 -24
- package/app/component/service-order/transaction-sidebar/transaction-line-accordion.component.d.ts +0 -11
- package/app/component/service-order/transaction-sidebar/transaction-sidebar-right.component.d.ts +0 -26
- package/app/component/service-order/transaction-sidebar/transaction-sidebar-right.component.scss +0 -17
- package/app/component/service-order/warehouse/warehouse.component.d.ts +0 -35
- package/app/component/service-order/warehouse/warehouse.component.scss +0 -52
- package/app/component/shopping-cart/ione-shopping-cart.component.d.ts +0 -71
- package/app/component/shopping-cart/ione-shopping-cart.module.d.ts +0 -2
- package/app/component/shopping-cart/shopping-cart/shopping-cart.component.d.ts +0 -61
- package/app/component/shopping-cart/shopping-cart/shopping-cart.component.scss +0 -79
- package/app/component/shopping-cart/shopping-cart-line/shopping-cart-line.component.d.ts +0 -34
- package/app/component/shopping-cart/shopping-cart-line/shopping-cart-line.component.scss +0 -107
- package/app/component/shopping-cart/shopping-cart-manager/shopping-cart-manager.component.d.ts +0 -91
- package/app/enum/checkout-steps.enum.d.ts +0 -7
- package/app/enum/position-grid-row.enum.d.ts +0 -4
- package/app/model/transaction-add-text-line-request.d.ts +0 -9
- package/app/service/transaction-event.service.d.ts +0 -53
- package/esm2015/app/component/checkout/checkout/checkout.component.js +0 -157
- package/esm2015/app/component/checkout/checkout-login/checkout-login.component.js +0 -106
- package/esm2015/app/component/checkout/checkout-overview/checkout-overview.component.js +0 -185
- package/esm2015/app/component/checkout/checkout-overview-block/checkout-overview-block.component.js +0 -47
- package/esm2015/app/component/checkout/checkout-overview-delivery-address/checkout-overview-delivery-address.component.js +0 -47
- package/esm2015/app/component/checkout/checkout-overview-delivery-edit/checkout-overview-delivery-edit.component.js +0 -420
- package/esm2015/app/component/checkout/checkout-overview-relation-address/checkout-overview-relation-address.component.js +0 -103
- package/esm2015/app/component/checkout/checkout-overview-relation-edit/checkout-overview-relation-edit.component.js +0 -377
- package/esm2015/app/component/checkout/checkout-relation-suggestions-list/checkout-relation-suggestions-list.component.js +0 -30
- package/esm2015/app/component/checkout/checkout-relation-suggestions-list-item/checkout-relation-suggestions-list-item.component.js +0 -31
- package/esm2015/app/component/checkout/checkout-transaction/checkout-transaction.component.js +0 -55
- package/esm2015/app/component/checkout/ione-checkout.component.js +0 -137
- package/esm2015/app/component/checkout/ione-checkout.module.js +0 -76
- package/esm2015/app/component/core/base/default-ok-cancel-buttons.component.js +0 -41
- package/esm2015/app/component/core/base/transaction-base.component.js +0 -146
- package/esm2015/app/component/core/characteristic-answer/characteristic-answer.component.js +0 -100
- package/esm2015/app/component/core/core.module.js +0 -48
- package/esm2015/app/component/core/directive/template-wrapper.directive.js +0 -69
- package/esm2015/app/component/core/image-display/image-display.component.js +0 -45
- package/esm2015/app/component/core/no-image-display/no-image-display.component.js +0 -26
- package/esm2015/app/component/core/relation/customer-groups.component.js +0 -40
- package/esm2015/app/component/service-order/ione-service-order-module.js +0 -114
- package/esm2015/app/component/service-order/ione-service-order.component.js +0 -96
- package/esm2015/app/component/service-order/service-order.component.js +0 -199
- package/esm2015/app/component/service-order/summary/transaction-article-summary.component.js +0 -55
- package/esm2015/app/component/service-order/summary/transaction-delivery-summary.component.js +0 -59
- package/esm2015/app/component/service-order/summary/transaction-order-summary.component.js +0 -43
- package/esm2015/app/component/service-order/summary/transaction-payment-info.component.js +0 -35
- package/esm2015/app/component/service-order/summary/transaction-product-contract-summary.component.js +0 -38
- package/esm2015/app/component/service-order/summary/transaction-product-summary.component.js +0 -41
- package/esm2015/app/component/service-order/summary/transaction-service-status.component.js +0 -37
- package/esm2015/app/component/service-order/summary/transaction-service-summary.component.js +0 -38
- package/esm2015/app/component/service-order/summary/transaction-summary-block.component.js +0 -53
- package/esm2015/app/component/service-order/transaction-article-text/transaction-article-text.component.js +0 -140
- package/esm2015/app/component/service-order/transaction-article-text-overview/transaction-article-text-overview.component.js +0 -105
- package/esm2015/app/component/service-order/transaction-edit-article-text/transaction-edit-article-text.component.js +0 -73
- package/esm2015/app/component/service-order/transaction-header-block/transaction-header-block.component.js +0 -83
- package/esm2015/app/component/service-order/transaction-manager/transaction-manager.component.js +0 -314
- package/esm2015/app/component/service-order/transaction-order-line-view/transaction-order-line-view.component.js +0 -76
- package/esm2015/app/component/service-order/transaction-order-lines/transaction-order-lines.component.js +0 -71
- package/esm2015/app/component/service-order/transaction-order-totals/transaction-order-totals.component.js +0 -36
- package/esm2015/app/component/service-order/transaction-relation/transaction-relation-address.component.js +0 -116
- package/esm2015/app/component/service-order/transaction-relation/transaction-relation-edit.component.js +0 -225
- package/esm2015/app/component/service-order/transaction-sidebar/transaction-line-accordion.component.js +0 -172
- package/esm2015/app/component/service-order/transaction-sidebar/transaction-sidebar-right.component.js +0 -120
- package/esm2015/app/component/service-order/warehouse/warehouse.component.js +0 -133
- package/esm2015/app/component/shopping-cart/ione-shopping-cart.component.js +0 -185
- package/esm2015/app/component/shopping-cart/ione-shopping-cart.module.js +0 -62
- package/esm2015/app/component/shopping-cart/shopping-cart/shopping-cart.component.js +0 -294
- package/esm2015/app/component/shopping-cart/shopping-cart-line/shopping-cart-line.component.js +0 -172
- package/esm2015/app/component/shopping-cart/shopping-cart-manager/shopping-cart-manager.component.js +0 -451
- package/esm2015/app/enum/checkout-steps.enum.js +0 -10
- package/esm2015/app/enum/content-view-mode.enum.js +0 -10
- package/esm2015/app/enum/language-code.enum.js +0 -8
- package/esm2015/app/enum/order-discount-type.enum.js +0 -7
- package/esm2015/app/enum/position-grid-row.enum.js +0 -6
- package/esm2015/app/enum/time-size.type.js +0 -10
- package/esm2015/app/model/business-object.js +0 -81
- package/esm2015/app/model/standard-text.js +0 -3
- package/esm2015/app/model/text-value-container.js +0 -3
- package/esm2015/app/model/transaction-add-text-line-request.js +0 -11
- package/esm2015/app/pipe/append.pipe.js +0 -17
- package/esm2015/app/pipe/co-currency.pipe.js +0 -47
- package/esm2015/app/pipe/date-duration.pipe.js +0 -57
- package/esm2015/app/pipe/delivery-time.pipe.js +0 -33
- package/esm2015/app/pipe/localize.pipe.js +0 -28
- package/esm2015/app/pipe/safe-style-pipe.js +0 -19
- package/esm2015/app/service/dictionary.service.js +0 -76
- package/esm2015/app/service/ione-connector-adapter.service.js +0 -567
- package/esm2015/app/service/options.service.js +0 -91
- package/esm2015/app/service/transaction-event.service.js +0 -26
- package/esm2015/app/service/transaction.service.js +0 -584
- package/esm2015/app/utils/string-utils.js +0 -64
- package/esm2015/assets/dictionary/text.properties.js +0 -332
- package/esm2015/factory/business-object-factory.js +0 -120
- package/esm2015/factory/decorators/boolean.decorator.js +0 -102
- package/esm2015/factory/decorators/complex-array.decorator.js +0 -55
- package/esm2015/factory/decorators/complex-field.decorator.js +0 -57
- package/esm2015/factory/decorators/date-field.decorator.js +0 -36
- package/esm2015/factory/decorators/string-number.decorator.js +0 -43
- package/esm2015/utils/array-utils.js +0 -183
- package/esm2015/utils/is-nill.function.js +0 -5
- package/style/styles.scss +0 -367
- package/styles.scss +0 -11
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Pipe } from "@angular/core";
|
|
2
|
+
import { DomSanitizer } from "@angular/platform-browser";
|
|
3
|
+
export class SafeStylePipe {
|
|
4
|
+
constructor(_sanitizer) {
|
|
5
|
+
this._sanitizer = _sanitizer;
|
|
6
|
+
}
|
|
7
|
+
transform(value) {
|
|
8
|
+
return this._sanitizer.bypassSecurityTrustStyle(value);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
SafeStylePipe.decorators = [
|
|
12
|
+
{ type: Pipe, args: [{
|
|
13
|
+
name: "safeStyle"
|
|
14
|
+
},] }
|
|
15
|
+
];
|
|
16
|
+
SafeStylePipe.ctorParameters = () => [
|
|
17
|
+
{ type: DomSanitizer }
|
|
18
|
+
];
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2FmZS1zdHlsZS5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHJhbnNhY3Rpb24vc3JjL2xpYi9waXBlL3NhZmUtc3R5bGUucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsSUFBSSxFQUFnQixNQUFNLGVBQWUsQ0FBQztBQUNsRCxPQUFPLEVBQUMsWUFBWSxFQUFZLE1BQU0sMkJBQTJCLENBQUM7QUFLbEUsTUFBTSxPQUFPLGFBQWE7SUFFeEIsWUFBb0IsVUFBd0I7UUFBeEIsZUFBVSxHQUFWLFVBQVUsQ0FBYztJQUFHLENBQUM7SUFFaEQsU0FBUyxDQUFDLEtBQWE7UUFDckIsT0FBTyxJQUFJLENBQUMsVUFBVSxDQUFDLHdCQUF3QixDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQ3pELENBQUM7OztZQVRGLElBQUksU0FBQztnQkFDSixJQUFJLEVBQUUsV0FBVzthQUNsQjs7O1lBSk8sWUFBWSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7UGlwZSwgUGlwZVRyYW5zZm9ybX0gZnJvbSBcIkBhbmd1bGFyL2NvcmVcIjtcclxuaW1wb3J0IHtEb21TYW5pdGl6ZXIsIFNhZmVTdHlsZX0gZnJvbSBcIkBhbmd1bGFyL3BsYXRmb3JtLWJyb3dzZXJcIjtcclxuXHJcbkBQaXBlKHtcclxuICBuYW1lOiBcInNhZmVTdHlsZVwiXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBTYWZlU3R5bGVQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XHJcblxyXG4gIGNvbnN0cnVjdG9yKHByaXZhdGUgX3Nhbml0aXplcjogRG9tU2FuaXRpemVyKSB7fVxyXG5cclxuICB0cmFuc2Zvcm0odmFsdWU6IHN0cmluZyk6IFNhZmVTdHlsZSB8IGFueSB7XHJcbiAgICByZXR1cm4gdGhpcy5fc2FuaXRpemVyLmJ5cGFzc1NlY3VyaXR5VHJ1c3RTdHlsZSh2YWx1ZSk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { ApplicationRef, ComponentFactoryResolver, Injectable, Injector } from "@angular/core";
|
|
3
|
+
import { AppPopupButtonType } from "../component/core/enum/app-popup-button-type.enum";
|
|
4
|
+
import { ConfirmationDialogComponent } from "../component/confirmation-dialog/confirmation-dialog.component";
|
|
5
|
+
import { AppPopupType } from "../component/core/enum/app-popup-type.enum";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export class DialogService {
|
|
8
|
+
constructor(_compFactoryResolver, appRef, injector) {
|
|
9
|
+
this._compFactoryResolver = _compFactoryResolver;
|
|
10
|
+
this.appRef = appRef;
|
|
11
|
+
this.injector = injector;
|
|
12
|
+
}
|
|
13
|
+
showYesNo(title, text) {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
const data = {
|
|
16
|
+
title: title,
|
|
17
|
+
text: text,
|
|
18
|
+
type: AppPopupType.Confirmation
|
|
19
|
+
};
|
|
20
|
+
const response = yield this._createComponent(ConfirmationDialogComponent, data);
|
|
21
|
+
return response === AppPopupButtonType.Yes;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
showError(message) {
|
|
25
|
+
const data = {
|
|
26
|
+
title: 'ERROR',
|
|
27
|
+
text: message,
|
|
28
|
+
type: AppPopupType.Error
|
|
29
|
+
};
|
|
30
|
+
return this._createComponent(ConfirmationDialogComponent, data);
|
|
31
|
+
}
|
|
32
|
+
showInformation(message) {
|
|
33
|
+
const data = {
|
|
34
|
+
title: 'INFORMATION',
|
|
35
|
+
text: message,
|
|
36
|
+
type: AppPopupType.Information
|
|
37
|
+
};
|
|
38
|
+
return this._createComponent(ConfirmationDialogComponent, data);
|
|
39
|
+
}
|
|
40
|
+
_createComponent(componentClass, data) {
|
|
41
|
+
return new Promise((resolve) => {
|
|
42
|
+
this._componentRef = this._compFactoryResolver
|
|
43
|
+
.resolveComponentFactory(componentClass)
|
|
44
|
+
.create(this.injector);
|
|
45
|
+
for (let key in data) {
|
|
46
|
+
if (data.hasOwnProperty(key)) {
|
|
47
|
+
this._componentRef.instance[key] = data[key];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
this.appRef.attachView(this._componentRef.hostView);
|
|
51
|
+
const domElem = this._componentRef.hostView
|
|
52
|
+
.rootNodes[0];
|
|
53
|
+
document.body.appendChild(domElem);
|
|
54
|
+
this._componentRef.onDestroy(() => {
|
|
55
|
+
this.appRef.detachView(this._componentRef.hostView);
|
|
56
|
+
});
|
|
57
|
+
this._componentRef.instance.onClose = (output) => {
|
|
58
|
+
this.appRef.detachView(this._componentRef.hostView);
|
|
59
|
+
this._componentRef = undefined;
|
|
60
|
+
resolve(output);
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
DialogService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DialogService_Factory() { return new DialogService(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(i0.ApplicationRef), i0.ɵɵinject(i0.INJECTOR)); }, token: DialogService, providedIn: "root" });
|
|
66
|
+
DialogService.decorators = [
|
|
67
|
+
{ type: Injectable, args: [{
|
|
68
|
+
providedIn: "root"
|
|
69
|
+
},] }
|
|
70
|
+
];
|
|
71
|
+
DialogService.ctorParameters = () => [
|
|
72
|
+
{ type: ComponentFactoryResolver },
|
|
73
|
+
{ type: ApplicationRef },
|
|
74
|
+
{ type: Injector }
|
|
75
|
+
];
|
|
76
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90cmFuc2FjdGlvbi9zcmMvbGliL3NlcnZpY2UvZGlhbG9nLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBQyxjQUFjLEVBQUUsd0JBQXdCLEVBQW1CLFVBQVUsRUFBRSxRQUFRLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDOUcsT0FBTyxFQUFDLGtCQUFrQixFQUFDLE1BQU0sbURBQW1ELENBQUM7QUFDckYsT0FBTyxFQUFDLDJCQUEyQixFQUFDLE1BQU0sZ0VBQWdFLENBQUM7QUFDM0csT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLDRDQUE0QyxDQUFDOztBQUt4RSxNQUFNLE9BQU8sYUFBYTtJQUl4QixZQUNVLG9CQUE4QyxFQUM5QyxNQUFzQixFQUN0QixRQUFrQjtRQUZsQix5QkFBb0IsR0FBcEIsb0JBQW9CLENBQTBCO1FBQzlDLFdBQU0sR0FBTixNQUFNLENBQWdCO1FBQ3RCLGFBQVEsR0FBUixRQUFRLENBQVU7SUFFNUIsQ0FBQztJQUVZLFNBQVMsQ0FBQyxLQUFhLEVBQUUsSUFBWTs7WUFDaEQsTUFBTSxJQUFJLEdBQU87Z0JBQ2YsS0FBSyxFQUFFLEtBQUs7Z0JBQ1osSUFBSSxFQUFFLElBQUk7Z0JBQ1YsSUFBSSxFQUFFLFlBQVksQ0FBQyxZQUFZO2FBQ2hDLENBQUM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VmLmhvc3RWaWV3KTtcclxuICAgICAgICB0aGlzLl9jb21wb25lbnRSZWYgPSB1bmRlZmluZWQ7XHJcbiAgICAgICAgcmVzb2x2ZShvdXRwdXQpO1xyXG4gICAgICB9XHJcbiAgICB9KVxyXG4gIH1cclxuXHJcbn1cclxuIl19
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { Injectable } from "@angular/core";
|
|
3
|
+
import { LanguageCode } from "../enum/language-code.enum";
|
|
4
|
+
import { StringUtils } from "../utils/string-utils";
|
|
5
|
+
import { Dictionary } from "../assets/dictionary/text.properties";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
// The localization service, providing peers with text translation functionality.
|
|
8
|
+
export class DictionaryService {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.dictionaryUrl = "js/browser/res/dictionary/";
|
|
11
|
+
// private _dictionaryPromise: Map<LanguageCode, Promise<{ [key: string]: string }>> = new Map<LanguageCode, Promise<{ [key: string]: string }>>();
|
|
12
|
+
this._dictionaries = new Map();
|
|
13
|
+
// Some dictionary values have one or more '|~' texts in them, meant to be replaced with client-side given texts.
|
|
14
|
+
this._placeholder = "|~";
|
|
15
|
+
}
|
|
16
|
+
get language() {
|
|
17
|
+
return this._language;
|
|
18
|
+
}
|
|
19
|
+
set rootUrl(value) {
|
|
20
|
+
this._rootUrl = value;
|
|
21
|
+
this._dictBasePath = this._rootUrl + "/" + this.dictionaryUrl;
|
|
22
|
+
}
|
|
23
|
+
// Loads the dictionary for given language in memory.
|
|
24
|
+
setDictionary(language) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
this._language = language || LanguageCode.Dutch;
|
|
27
|
+
this._loadDictionary();
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
_loadDictionary() {
|
|
31
|
+
if (!this._dictionaries.has(this._language)) {
|
|
32
|
+
const dictionary = new Dictionary();
|
|
33
|
+
// eslint-disable-next-line no-magic-numbers
|
|
34
|
+
if (dictionary.strings[this._language.substr(0, 2).toLowerCase()] !== undefined) {
|
|
35
|
+
// eslint-disable-next-line no-magic-numbers
|
|
36
|
+
this._dictionaries.set(this._language, dictionary.strings[this._language.substr(0, 2).toLowerCase()]);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Returns the localized text for the given dictionary key.
|
|
42
|
+
* @param {string} key
|
|
43
|
+
* @param {boolean} [upperCaseFirst = true] False for first letter lowercase, true for first letter uppercase for returned dict val
|
|
44
|
+
* @param {string[]} replacementTexts Rest params for replacement of '|~' in returned dict value
|
|
45
|
+
* @returns {string} The translated text for given dictionary key
|
|
46
|
+
*/
|
|
47
|
+
get(key, upperCaseFirst = true, ...replacementTexts) {
|
|
48
|
+
if (!StringUtils.IsStringWithLength(key)) {
|
|
49
|
+
return key || "";
|
|
50
|
+
}
|
|
51
|
+
if (this.language === undefined) {
|
|
52
|
+
this._language = LanguageCode.Dutch;
|
|
53
|
+
this._loadDictionary();
|
|
54
|
+
}
|
|
55
|
+
let text = this._dictionaries.get(this.language)[key];
|
|
56
|
+
text = StringUtils.IsStringWithLength(text) ? text : key;
|
|
57
|
+
if (upperCaseFirst) {
|
|
58
|
+
text = text.charAt(0).toUpperCase() + text.slice(1);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
text = text.charAt(0).toLowerCase() + text.slice(1);
|
|
62
|
+
}
|
|
63
|
+
if (replacementTexts.length > 0) {
|
|
64
|
+
text = StringUtils.ReplaceOccurrencesIn(text, this._placeholder, ...replacementTexts);
|
|
65
|
+
}
|
|
66
|
+
return text;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
DictionaryService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DictionaryService_Factory() { return new DictionaryService(); }, token: DictionaryService, providedIn: "root" });
|
|
70
|
+
DictionaryService.decorators = [
|
|
71
|
+
{ type: Injectable, args: [{
|
|
72
|
+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NlT2NjdXJyZW5jZXNJbih0ZXh0LCB0aGlzLl9wbGFjZWhvbGRlciwgLi4ucmVwbGFjZW1lbnRUZXh0cyk7XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIHRleHQ7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Injectable } from "@angular/core";
|
|
2
|
+
import { DomSanitizer } from "@angular/platform-browser";
|
|
3
|
+
import { IconSvg } from "../model/icon-svg";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/platform-browser";
|
|
6
|
+
export class IconCacheService {
|
|
7
|
+
constructor(_sanitizer) {
|
|
8
|
+
this._sanitizer = _sanitizer;
|
|
9
|
+
this._iconCache = {};
|
|
10
|
+
this.setIconCache();
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* All the icons as a large JSON object, from the all-icons.json file.
|
|
14
|
+
* The object has property keys that are the icon names, and property values with the data string of the actual svg icon.
|
|
15
|
+
*/
|
|
16
|
+
get iconCache() {
|
|
17
|
+
return this._iconCache;
|
|
18
|
+
}
|
|
19
|
+
getIcon(iconName) {
|
|
20
|
+
if (iconName) {
|
|
21
|
+
return this._iconCache[iconName.toLowerCase()];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
getIconAsBase64(iconName) {
|
|
25
|
+
const icon = IconSvg[iconName];
|
|
26
|
+
const base64Data = window.btoa(icon);
|
|
27
|
+
return this._sanitizer.bypassSecurityTrustUrl(`data:image/svg+xml;base64,${base64Data}`);
|
|
28
|
+
}
|
|
29
|
+
getRawIcon(iconName) {
|
|
30
|
+
if (iconName) {
|
|
31
|
+
return IconSvg[iconName.toLowerCase()];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
setIconCache() {
|
|
35
|
+
for (const key in IconSvg) {
|
|
36
|
+
if (IconSvg.hasOwnProperty(key) && typeof IconSvg[key] !== "function") {
|
|
37
|
+
this._iconCache[key.toLowerCase()] = this._sanitizer.bypassSecurityTrustHtml(IconSvg[key]);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
IconCacheService.ɵprov = i0.ɵɵdefineInjectable({ factory: function IconCacheService_Factory() { return new IconCacheService(i0.ɵɵinject(i1.DomSanitizer)); }, token: IconCacheService, providedIn: "root" });
|
|
43
|
+
IconCacheService.decorators = [
|
|
44
|
+
{ type: Injectable, args: [{
|
|
45
|
+
providedIn: "root"
|
|
46
|
+
},] }
|
|
47
|
+
];
|
|
48
|
+
IconCacheService.ctorParameters = () => [
|
|
49
|
+
{ type: DomSanitizer }
|
|
50
|
+
];
|
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWNvbi1jYWNoZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHJhbnNhY3Rpb24vc3JjL2xpYi9zZXJ2aWNlL2ljb24tY2FjaGUuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBQyxZQUFZLEVBQVcsTUFBTSwyQkFBMkIsQ0FBQztBQUVqRSxPQUFPLEVBQUMsT0FBTyxFQUFDLE1BQU0sbUJBQW1CLENBQUM7OztBQUsxQyxNQUFNLE9BQU8sZ0JBQWdCO0lBVzNCLFlBQ1UsVUFBd0I7UUFBeEIsZUFBVSxHQUFWLFVBQVUsQ0FBYztRQUgxQixlQUFVLEdBQXFDLEVBQUUsQ0FBQztRQUt4RCxJQUFJLENBQUMsWUFBWSxFQUFFLENBQUM7SUFDdEIsQ0FBQztJQWREOzs7T0FHRztJQUNILElBQVcsU0FBUztRQUNsQixPQUFPLElBQUksQ0FBQyxVQUFVLENBQUM7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