@colijnit/sharedcomponents 1.0.54 → 1.0.56
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/.browserslistrc +16 -0
- package/.editorconfig +16 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/tasks.json +42 -0
- package/README.md +11 -8
- package/Sharedcomponents.iml +11 -0
- package/angular.json +177 -0
- package/custom-login-bundle.webpack.config.js +3 -0
- package/karma.conf.js +44 -0
- package/move-assets.js +14 -0
- package/package.json +68 -31
- package/projects/sharedcomponents/.browserslistrc +16 -0
- package/projects/sharedcomponents/README.md +24 -0
- package/projects/sharedcomponents/karma.conf.js +44 -0
- package/projects/sharedcomponents/ng-package.json +17 -0
- package/projects/sharedcomponents/package.json +23 -0
- package/projects/sharedcomponents/src/lib/assets/dictionary/text.properties.ts +8 -0
- package/projects/sharedcomponents/src/lib/assets/icons/account.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/angle_left_solid.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/angle_right_solid.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/arrow_fat_right.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/arrow_point_left.svg +8 -0
- package/projects/sharedcomponents/src/lib/assets/icons/arrow_point_right.svg +4 -0
- package/projects/sharedcomponents/src/lib/assets/icons/at_solid.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/bring_forward_regular.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/check_duotone.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/check_round.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/cross_skinny.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/delete_left_regular.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/delivery_truck.svg +12 -0
- package/projects/sharedcomponents/src/lib/assets/icons/email.svg +5 -0
- package/projects/sharedcomponents/src/lib/assets/icons/envelope_regular.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/eye_regular.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/file_export_regular.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/file_export_solid.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/file_pdf_regular.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/file_pdf_solid.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/file_signature_regular.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/house_blank_regular.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/lock.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/message_sms_regular.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/message_sms_solid.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/pdf.svg +15 -0
- package/projects/sharedcomponents/src/lib/assets/icons/print.svg +10 -0
- package/projects/sharedcomponents/src/lib/assets/icons/print_regular.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/print_solid.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/signature_field.svg +9 -0
- package/projects/sharedcomponents/src/lib/assets/icons/tag_regular.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/x_solid.svg +1 -0
- package/projects/sharedcomponents/src/lib/assets/icons/xml.svg +1 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-base-view.component.ts +68 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-day-view.component.ts +35 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-event.component.ts +73 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-events.component.ts +53 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-half-hour-cell.component.ts +81 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-header.component.ts +275 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-cell.component.ts +38 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-view-labels.component.ts +50 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-view.component.ts +46 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-month-view.component.ts +65 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-select-event.component.ts +39 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-view.component.ts +41 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-week-select-view.component.ts +63 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-week-view.component.ts +50 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/date-planning/component/agenda/style/_layout.scss +12 -12
- package/{lib → projects/sharedcomponents/src/lib}/components/date-planning/component/agenda/style/_material-definition.scss +2 -1
- package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/view-select.component.ts +43 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-all-months.component.ts +37 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-all-years.component.ts +52 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-header.component.ts +123 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-view.component.ts +200 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar.component.ts +35 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/date-planning.component.ts +141 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/date-planning.module.ts +61 -0
- package/projects/sharedcomponents/src/lib/components/date-planning/style/material.scss +7 -0
- package/projects/sharedcomponents/src/lib/components/docsign/component/signature/signature.component.ts +82 -0
- package/projects/sharedcomponents/src/lib/components/docsign/component/signatures/signatures.component.ts +50 -0
- package/projects/sharedcomponents/src/lib/components/docsign/docsign.component.ts +270 -0
- package/projects/sharedcomponents/src/lib/components/docsign/docsign.module.ts +22 -0
- package/projects/sharedcomponents/src/lib/components/key-pad/key-pad.component.ts +216 -0
- package/projects/sharedcomponents/src/lib/components/key-pad/key-pad.module.ts +20 -0
- package/projects/sharedcomponents/src/lib/components/layout-switcher/layout-switcher.component.ts +98 -0
- package/projects/sharedcomponents/src/lib/components/layout-switcher/layout-switcher.module.ts +21 -0
- package/projects/sharedcomponents/src/lib/components/linear-gauge/co-linear-gauge.component.ts +57 -0
- package/projects/sharedcomponents/src/lib/components/linear-gauge/co-linear-gauge.module.ts +17 -0
- package/projects/sharedcomponents/src/lib/components/login/components/login-base.component.ts +98 -0
- package/projects/sharedcomponents/src/lib/components/login/components/login-change-password.component.ts +194 -0
- package/projects/sharedcomponents/src/lib/components/login/components/login-mfa-code-entry.component.ts +41 -0
- package/projects/sharedcomponents/src/lib/components/login/components/login-mfa-code-setup.component.ts +44 -0
- package/projects/sharedcomponents/src/lib/components/login/components/login-username-password.component.ts +167 -0
- package/projects/sharedcomponents/src/lib/components/login/localization/login-translation.ts +15 -0
- package/projects/sharedcomponents/src/lib/components/login/login.component.ts +137 -0
- package/projects/sharedcomponents/src/lib/components/login/login.module.ts +53 -0
- package/projects/sharedcomponents/src/lib/components/login/service/login-adapter.service.ts +58 -0
- package/projects/sharedcomponents/src/lib/components/login/service/login.service.ts +50 -0
- package/projects/sharedcomponents/src/lib/components/screen-config-generator/enums/field-type.enum.ts +9 -0
- package/projects/sharedcomponents/src/lib/components/screen-config-generator/models/Config.ts +6 -0
- package/projects/sharedcomponents/src/lib/components/screen-config-generator/models/Field.ts +8 -0
- package/projects/sharedcomponents/src/lib/components/screen-config-generator/models/Header.ts +8 -0
- package/projects/sharedcomponents/src/lib/components/screen-config-generator/models/Module.ts +6 -0
- package/projects/sharedcomponents/src/lib/components/screen-config-generator/models/Rubric.ts +10 -0
- package/projects/sharedcomponents/src/lib/components/screen-config-generator/models/ScreenConfig.ts +9 -0
- package/projects/sharedcomponents/src/lib/components/screen-config-generator/models/SubCat.ts +9 -0
- package/projects/sharedcomponents/src/lib/components/screen-config-generator/models/SubRubric.ts +8 -0
- package/projects/sharedcomponents/src/lib/components/screen-config-generator/screen-config-generator.component.ts +539 -0
- package/projects/sharedcomponents/src/lib/components/screen-config-generator/screen-config-generator.module.ts +21 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/layout-selection/layout-selection.component.ts +91 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/layout-selection/layout-selection.module.ts +19 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/printer-selection/printer-selection.component.ts +84 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/printer-selection/printer-selection.module.ts +19 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/send-method-email/send-method-email.component.ts +63 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/send-method-email/send-method-email.module.ts +24 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/send-method-pdf/send-method-pdf.component.ts +38 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/send-method-pdf/send-method-pdf.module.ts +21 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/send-method-pdf/style/_layout.scss +25 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/send-method-pdf/style/_material-definition.scss +5 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/send-method-pdf/style/_theme.scss +5 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.component.ts +60 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.module.ts +26 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/signature-button/signature-button.component.ts +42 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/signature-button/signature-button.module.ts +19 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/components/signature-button/style/material.scss +4 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/model/email-address-viewmodel.ts +9 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.component.ts +325 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.module.ts +32 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-params.interface.ts +13 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/service/send-method.service.ts +63 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/style/_layout.scss +1 -1
- package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/style/material.scss +1 -0
- package/projects/sharedcomponents/src/lib/components/simple-tags/simple-tags.component.ts +243 -0
- package/projects/sharedcomponents/src/lib/components/simple-tags/simple-tags.module.ts +24 -0
- package/projects/sharedcomponents/src/lib/components/statusbar/statusbar-popup.component.ts +100 -0
- package/projects/sharedcomponents/src/lib/components/statusbar/statusbar.component.ts +107 -0
- package/projects/sharedcomponents/src/lib/components/statusbar/statusbar.module.ts +25 -0
- package/projects/sharedcomponents/src/lib/components/stock/components/allocation-stock-history/allocation-stock-history.component.ts +45 -0
- package/projects/sharedcomponents/src/lib/components/stock/components/order-commission-stock-history/order-commission-stock-history.component.ts +45 -0
- package/projects/sharedcomponents/src/lib/components/stock/components/order-stock-history/order-stock-history.component.ts +45 -0
- package/projects/sharedcomponents/src/lib/components/stock/components/order-stock-tab/order-stock-tab.component.ts +43 -0
- package/projects/sharedcomponents/src/lib/components/stock/components/order-supply-stock-history/order-supply-stock-history.component.ts +45 -0
- package/projects/sharedcomponents/src/lib/components/stock/components/order-tab/order-tab.component.ts +71 -0
- package/projects/sharedcomponents/src/lib/components/stock/components/stock-history/stock-history.component.ts +52 -0
- package/projects/sharedcomponents/src/lib/components/stock/components/stock-location/stock-location.component.ts +276 -0
- package/projects/sharedcomponents/src/lib/components/stock/components/stock-prognose/stock-prognose.component.ts +49 -0
- package/projects/sharedcomponents/src/lib/components/stock/components/stock-tab/stock-tab.component.ts +40 -0
- package/projects/sharedcomponents/src/lib/components/stock/localization/translation.ts +60 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock-history-tabs/stock-history-tabs.component.ts +32 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock-information/stock-information.component.ts +56 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock-information-grid/stock-information-grid.component.ts +500 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock-tabs/stock-tabs.component.ts +276 -0
- package/{lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.d.ts → projects/sharedcomponents/src/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.ts} +2 -2
- package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-change-amount.component.ts +77 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-transfer.component.ts +178 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock.component.ts +228 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock.module.ts +97 -0
- package/projects/sharedcomponents/src/lib/components/stock-statusbar/stock-statusbar.component.ts +23 -0
- package/projects/sharedcomponents/src/lib/components/stock-statusbar/stock-statusbar.module.ts +17 -0
- package/projects/sharedcomponents/src/lib/components/tab-bar/tab-bar.component.ts +106 -0
- package/projects/sharedcomponents/src/lib/components/tab-bar/tab-bar.module.ts +20 -0
- package/projects/sharedcomponents/src/lib/components/tab-bar/tab.interface.ts +5 -0
- package/projects/sharedcomponents/src/lib/components/tags/component/tag-join-label/tag-join-label.component.ts +61 -0
- package/projects/sharedcomponents/src/lib/components/tags/component/tag-label/tag-label.component.ts +47 -0
- package/projects/sharedcomponents/src/lib/components/tags/component/treeview/model/tree-view-node-item.ts +132 -0
- package/projects/sharedcomponents/src/lib/components/tags/component/treeview/treeview.component.ts +258 -0
- package/projects/sharedcomponents/src/lib/components/tags/tags.component.ts +192 -0
- package/projects/sharedcomponents/src/lib/components/tags/tags.module.ts +27 -0
- package/projects/sharedcomponents/src/lib/directives/click-outside.directive.ts +25 -0
- package/projects/sharedcomponents/src/lib/enum/calendar-view.enum.ts +8 -0
- package/projects/sharedcomponents/src/lib/enum/gauge-color.enum.ts +8 -0
- package/{lib/enum/icon.enum.d.ts → projects/sharedcomponents/src/lib/enum/icon.enum.ts} +3 -2
- package/projects/sharedcomponents/src/lib/enum/keyboard-code.enum.ts +30 -0
- package/projects/sharedcomponents/src/lib/enum/language-code.enum.ts +6 -0
- package/projects/sharedcomponents/src/lib/enum/login-component-extra-action-type.enum.ts +4 -0
- package/projects/sharedcomponents/src/lib/enum/login-component-page.type.enum.ts +6 -0
- package/projects/sharedcomponents/src/lib/enum/login-component-query-variables-name.enum.ts +5 -0
- package/{lib/enum/month.enum.d.ts → projects/sharedcomponents/src/lib/enum/month.enum.ts} +2 -1
- package/projects/sharedcomponents/src/lib/enum/tag-category.enum.ts +20 -0
- package/projects/sharedcomponents/src/lib/enum/thumb-three-way-state.ts +18 -0
- package/{lib/enum/time-period.enum.d.ts → projects/sharedcomponents/src/lib/enum/time-period.enum.ts} +2 -1
- package/projects/sharedcomponents/src/lib/localization/localization.module.ts +17 -0
- package/projects/sharedcomponents/src/lib/localization/localize.pipe.ts +21 -0
- package/projects/sharedcomponents/src/lib/localization/localize.service.ts +28 -0
- package/projects/sharedcomponents/src/lib/localization/translation.ts +2 -0
- package/projects/sharedcomponents/src/lib/model/agenda-event-per-day.model.ts +6 -0
- package/projects/sharedcomponents/src/lib/model/agenda-event.model.ts +19 -0
- package/projects/sharedcomponents/src/lib/model/agenda-null-objects.ts +11 -0
- package/projects/sharedcomponents/src/lib/model/constant/all-months.ts +17 -0
- package/projects/sharedcomponents/src/lib/model/date-range.ts +10 -0
- package/projects/sharedcomponents/src/lib/model/day.model.ts +9 -0
- package/projects/sharedcomponents/src/lib/model/icon-svg.ts +37 -0
- package/projects/sharedcomponents/src/lib/model/month.model.ts +11 -0
- package/projects/sharedcomponents/src/lib/model/send-method.ts +13 -0
- package/projects/sharedcomponents/src/lib/model/settings.ts +5 -0
- package/projects/sharedcomponents/src/lib/model/tag-tree-item.bo.ts +28 -0
- package/projects/sharedcomponents/src/lib/model/time-window.bo.ts +21 -0
- package/projects/sharedcomponents/src/lib/model/tree-object.ts +13 -0
- package/projects/sharedcomponents/src/lib/model/tree-view-default.model.ts +107 -0
- package/projects/sharedcomponents/src/lib/model/tree-view-node-default.model.ts +196 -0
- package/projects/sharedcomponents/src/lib/model/tree-view-node-item-options.model.ts +12 -0
- package/projects/sharedcomponents/src/lib/model/tree-view-node.model.ts +150 -0
- package/projects/sharedcomponents/src/lib/model/tree-view.model.ts +57 -0
- package/projects/sharedcomponents/src/lib/model/week.model.ts +5 -0
- package/projects/sharedcomponents/src/lib/model/weekday.model.ts +17 -0
- package/projects/sharedcomponents/src/lib/pipe/array-number.pipe.ts +14 -0
- package/projects/sharedcomponents/src/lib/pipe/master-pipes.ts +7 -0
- package/projects/sharedcomponents/src/lib/pipe/ucfirst.pipe.ts +14 -0
- package/projects/sharedcomponents/src/lib/service/dictionary.service.ts +86 -0
- package/projects/sharedcomponents/src/lib/service/icon-cache.service.ts +51 -0
- package/projects/sharedcomponents/src/lib/service/options.service.ts +43 -0
- package/projects/sharedcomponents/src/lib/service/shared-connector.service.ts +401 -0
- package/projects/sharedcomponents/src/lib/service/shared-initializer.service.ts +29 -0
- package/projects/sharedcomponents/src/lib/service/shared.service.ts +49 -0
- package/projects/sharedcomponents/src/lib/service/stock.service.ts +124 -0
- package/projects/sharedcomponents/src/lib/utils/array-utils.ts +225 -0
- package/projects/sharedcomponents/src/lib/utils/calendar.utils.ts +75 -0
- package/projects/sharedcomponents/src/lib/utils/check-precision-and-scale-result.ts +5 -0
- package/projects/sharedcomponents/src/lib/utils/check-within-stepped-bounds-result.ts +8 -0
- package/projects/sharedcomponents/src/lib/utils/css-utils.ts +275 -0
- package/projects/sharedcomponents/src/lib/utils/date-utils.ts +302 -0
- package/projects/sharedcomponents/src/lib/utils/function/not-nill.function.ts +4 -0
- package/projects/sharedcomponents/src/lib/utils/is-nill.function.ts +4 -0
- package/projects/sharedcomponents/src/lib/utils/map-utils.ts +44 -0
- package/projects/sharedcomponents/src/lib/utils/number-utils.ts +439 -0
- package/projects/sharedcomponents/src/lib/utils/object-utils.ts +310 -0
- package/projects/sharedcomponents/src/lib/utils/string-utils.ts +67 -0
- package/projects/sharedcomponents/src/lib/utils/tree-utils.ts +63 -0
- package/{public-api.d.ts → projects/sharedcomponents/src/public-api.ts} +7 -0
- package/projects/sharedcomponents/src/test.ts +27 -0
- package/projects/sharedcomponents/tsconfig.lib.json +18 -0
- package/projects/sharedcomponents/tsconfig.lib.prod.json +10 -0
- package/projects/sharedcomponents/tsconfig.spec.json +17 -0
- package/script/create-bundle-version.js +19 -0
- package/script/merge-icons.js +39 -0
- package/src/app/app.component.scss +31 -0
- package/src/app/app.component.spec.ts +31 -0
- package/src/app/app.component.ts +454 -0
- package/src/app/app.module.ts +69 -0
- package/src/app/bundle/index.html +14 -0
- package/src/app/bundle/login/login-bundle.component.scss +6 -0
- package/src/app/bundle/login/login-bundle.component.ts +111 -0
- package/src/app/bundle/login/login-bundle.module.ts +30 -0
- package/src/app/bundle/main-login-bundle.ts +11 -0
- package/src/app/bundle/polyfills.ts +63 -0
- package/src/app/test-data.service.ts +60 -0
- package/src/assets/.gitkeep +0 -0
- package/src/environments/environment.bundle.prod.ts +3 -0
- package/src/environments/environment.prod.ts +3 -0
- package/src/environments/environment.ts +16 -0
- package/src/favicon.ico +0 -0
- package/src/index.html +13 -0
- package/src/main.ts +12 -0
- package/src/polyfills.ts +53 -0
- package/src/styles.scss +54 -0
- package/src/test.ts +26 -0
- package/tsconfig.app.json +15 -0
- package/tsconfig.bundle.json +38 -0
- package/tsconfig.json +64 -0
- package/tsconfig.spec.json +18 -0
- package/webpack.login.bundle.config.js +32 -0
- package/bundles/colijnit-sharedcomponents.umd.js +0 -6630
- package/bundles/colijnit-sharedcomponents.umd.js.map +0 -1
- package/colijnit-sharedcomponents.d.ts +0 -72
- package/colijnit-sharedcomponents.metadata.json +0 -1
- package/esm2015/colijnit-sharedcomponents.js +0 -73
- package/esm2015/lib/assets/dictionary/text.properties.js +0 -11
- package/esm2015/lib/components/date-planning/component/agenda/agenda-base-view.component.js +0 -61
- package/esm2015/lib/components/date-planning/component/agenda/agenda-day-view.component.js +0 -32
- package/esm2015/lib/components/date-planning/component/agenda/agenda-event.component.js +0 -54
- package/esm2015/lib/components/date-planning/component/agenda/agenda-events.component.js +0 -43
- package/esm2015/lib/components/date-planning/component/agenda/agenda-half-hour-cell.component.js +0 -68
- package/esm2015/lib/components/date-planning/component/agenda/agenda-header.component.js +0 -232
- package/esm2015/lib/components/date-planning/component/agenda/agenda-hour-cell.component.js +0 -36
- package/esm2015/lib/components/date-planning/component/agenda/agenda-hour-view-labels.component.js +0 -50
- package/esm2015/lib/components/date-planning/component/agenda/agenda-hour-view.component.js +0 -46
- package/esm2015/lib/components/date-planning/component/agenda/agenda-month-view.component.js +0 -61
- package/esm2015/lib/components/date-planning/component/agenda/agenda-select-event.component.js +0 -39
- package/esm2015/lib/components/date-planning/component/agenda/agenda-view.component.js +0 -35
- package/esm2015/lib/components/date-planning/component/agenda/agenda-week-select-view.component.js +0 -64
- package/esm2015/lib/components/date-planning/component/agenda/agenda-week-view.component.js +0 -48
- package/esm2015/lib/components/date-planning/component/agenda/view-select.component.js +0 -42
- package/esm2015/lib/components/date-planning/component/calendar/calendar-all-months.component.js +0 -34
- package/esm2015/lib/components/date-planning/component/calendar/calendar-all-years.component.js +0 -48
- package/esm2015/lib/components/date-planning/component/calendar/calendar-header.component.js +0 -107
- package/esm2015/lib/components/date-planning/component/calendar/calendar-view.component.js +0 -178
- package/esm2015/lib/components/date-planning/component/calendar/calendar.component.js +0 -34
- package/esm2015/lib/components/date-planning/date-planning.component.js +0 -108
- package/esm2015/lib/components/date-planning/date-planning.module.js +0 -63
- package/esm2015/lib/components/docsign/component/signature/signature.component.js +0 -75
- package/esm2015/lib/components/docsign/component/signatures/signatures.component.js +0 -44
- package/esm2015/lib/components/docsign/docsign.component.js +0 -242
- package/esm2015/lib/components/docsign/docsign.module.js +0 -23
- package/esm2015/lib/components/key-pad/key-pad.component.js +0 -200
- package/esm2015/lib/components/key-pad/key-pad.module.js +0 -22
- package/esm2015/lib/components/layout-switcher/layout-switcher.component.js +0 -74
- package/esm2015/lib/components/layout-switcher/layout-switcher.module.js +0 -21
- package/esm2015/lib/components/linear-gauge/co-linear-gauge.component.js +0 -59
- package/esm2015/lib/components/linear-gauge/co-linear-gauge.module.js +0 -19
- package/esm2015/lib/components/send-method-dialog/components/layout-selection/layout-selection.component.js +0 -79
- package/esm2015/lib/components/send-method-dialog/components/layout-selection/layout-selection.module.js +0 -21
- package/esm2015/lib/components/send-method-dialog/components/printer-selection/printer-selection.component.js +0 -85
- package/esm2015/lib/components/send-method-dialog/components/printer-selection/printer-selection.module.js +0 -21
- package/esm2015/lib/components/send-method-dialog/components/send-method-email/send-method-email.component.js +0 -64
- package/esm2015/lib/components/send-method-dialog/components/send-method-email/send-method-email.module.js +0 -26
- package/esm2015/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.component.js +0 -59
- package/esm2015/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.module.js +0 -28
- package/esm2015/lib/components/send-method-dialog/components/signature-button/signature-button.component.js +0 -38
- package/esm2015/lib/components/send-method-dialog/components/signature-button/signature-button.module.js +0 -21
- package/esm2015/lib/components/send-method-dialog/model/email-address-viewmodel.js +0 -7
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +0 -243
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.module.js +0 -33
- package/esm2015/lib/components/send-method-dialog/send-method-params.interface.js +0 -2
- package/esm2015/lib/components/send-method-dialog/service/send-method.service.js +0 -59
- package/esm2015/lib/components/simple-tags/simple-tags.component.js +0 -229
- package/esm2015/lib/components/simple-tags/simple-tags.module.js +0 -26
- package/esm2015/lib/components/statusbar/statusbar-popup.component.js +0 -97
- package/esm2015/lib/components/statusbar/statusbar.component.js +0 -81
- package/esm2015/lib/components/statusbar/statusbar.module.js +0 -27
- package/esm2015/lib/components/stock/components/allocation-stock-history/allocation-stock-history.component.js +0 -46
- package/esm2015/lib/components/stock/components/order-commission-stock-history/order-commission-stock-history.component.js +0 -46
- package/esm2015/lib/components/stock/components/order-stock-history/order-stock-history.component.js +0 -46
- package/esm2015/lib/components/stock/components/order-stock-tab/order-stock-tab.component.js +0 -46
- package/esm2015/lib/components/stock/components/order-supply-stock-history/order-supply-stock-history.component.js +0 -46
- package/esm2015/lib/components/stock/components/order-tab/order-tab.component.js +0 -65
- package/esm2015/lib/components/stock/components/stock-history/stock-history.component.js +0 -51
- package/esm2015/lib/components/stock/components/stock-location/stock-location.component.js +0 -236
- package/esm2015/lib/components/stock/components/stock-prognose/stock-prognose.component.js +0 -51
- package/esm2015/lib/components/stock/components/stock-tab/stock-tab.component.js +0 -40
- package/esm2015/lib/components/stock/localization/translation.js +0 -63
- package/esm2015/lib/components/stock/stock-history-tabs/stock-history-tabs.component.js +0 -33
- package/esm2015/lib/components/stock/stock-information/stock-information.component.js +0 -48
- package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +0 -457
- package/esm2015/lib/components/stock/stock-tabs/stock-tabs.component.js +0 -220
- package/esm2015/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.js +0 -2
- package/esm2015/lib/components/stock/stock-transfer/stock-change-amount.component.js +0 -72
- package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +0 -147
- package/esm2015/lib/components/stock/stock.component.js +0 -186
- package/esm2015/lib/components/stock/stock.module.js +0 -80
- package/esm2015/lib/components/stock-statusbar/stock-statusbar.component.js +0 -23
- package/esm2015/lib/components/stock-statusbar/stock-statusbar.module.js +0 -19
- package/esm2015/lib/components/tab-bar/tab-bar.component.js +0 -85
- package/esm2015/lib/components/tab-bar/tab-bar.module.js +0 -21
- package/esm2015/lib/components/tab-bar/tab.interface.js +0 -2
- package/esm2015/lib/enum/calendar-view.enum.js +0 -8
- package/esm2015/lib/enum/gauge-color.enum.js +0 -10
- package/esm2015/lib/enum/icon.enum.js +0 -38
- package/esm2015/lib/enum/keyboard-code.enum.js +0 -32
- package/esm2015/lib/enum/language-code.enum.js +0 -8
- package/esm2015/lib/enum/month.enum.js +0 -17
- package/esm2015/lib/enum/thumb-three-way-state.js +0 -19
- package/esm2015/lib/enum/time-period.enum.js +0 -11
- package/esm2015/lib/localization/localization.module.js +0 -19
- package/esm2015/lib/localization/localize.pipe.js +0 -26
- package/esm2015/lib/localization/localize.service.js +0 -30
- package/esm2015/lib/localization/translation.js +0 -3
- package/esm2015/lib/model/agenda-event-per-day.model.js +0 -6
- package/esm2015/lib/model/agenda-event.model.js +0 -8
- package/esm2015/lib/model/agenda-null-objects.js +0 -11
- package/esm2015/lib/model/constant/all-months.js +0 -17
- package/esm2015/lib/model/date-range.js +0 -5
- package/esm2015/lib/model/day.model.js +0 -7
- package/esm2015/lib/model/icon-svg.js +0 -37
- package/esm2015/lib/model/month.model.js +0 -11
- package/esm2015/lib/model/send-method.js +0 -8
- package/esm2015/lib/model/settings.js +0 -4
- package/esm2015/lib/model/time-window.bo.js +0 -26
- package/esm2015/lib/model/week.model.js +0 -6
- package/esm2015/lib/model/weekday.model.js +0 -10
- package/esm2015/lib/pipe/array-number.pipe.js +0 -15
- package/esm2015/lib/pipe/master-pipes.js +0 -7
- package/esm2015/lib/pipe/ucfirst.pipe.js +0 -16
- package/esm2015/lib/service/dictionary.service.js +0 -76
- package/esm2015/lib/service/icon-cache.service.js +0 -51
- package/esm2015/lib/service/options.service.js +0 -48
- package/esm2015/lib/service/shared-connector.service.js +0 -424
- package/esm2015/lib/service/shared.service.js +0 -60
- package/esm2015/lib/service/stock.service.js +0 -110
- package/esm2015/lib/utils/calendar.utils.js +0 -69
- package/esm2015/lib/utils/date-utils.js +0 -264
- package/esm2015/lib/utils/function/not-nill.function.js +0 -5
- package/esm2015/lib/utils/map-utils.js +0 -41
- package/esm2015/lib/utils/string-utils.js +0 -64
- package/esm2015/public-api.js +0 -24
- package/fesm2015/colijnit-sharedcomponents.js +0 -6884
- package/fesm2015/colijnit-sharedcomponents.js.map +0 -1
- package/lib/assets/dictionary/text.properties.d.ts +0 -3
- package/lib/components/date-planning/component/agenda/agenda-base-view.component.d.ts +0 -21
- package/lib/components/date-planning/component/agenda/agenda-day-view.component.d.ts +0 -6
- package/lib/components/date-planning/component/agenda/agenda-event.component.d.ts +0 -17
- package/lib/components/date-planning/component/agenda/agenda-events.component.d.ts +0 -12
- package/lib/components/date-planning/component/agenda/agenda-half-hour-cell.component.d.ts +0 -18
- package/lib/components/date-planning/component/agenda/agenda-header.component.d.ts +0 -47
- package/lib/components/date-planning/component/agenda/agenda-hour-cell.component.d.ts +0 -9
- package/lib/components/date-planning/component/agenda/agenda-hour-view-labels.component.d.ts +0 -8
- package/lib/components/date-planning/component/agenda/agenda-hour-view.component.d.ts +0 -7
- package/lib/components/date-planning/component/agenda/agenda-month-view.component.d.ts +0 -10
- package/lib/components/date-planning/component/agenda/agenda-select-event.component.d.ts +0 -12
- package/lib/components/date-planning/component/agenda/agenda-view.component.d.ts +0 -11
- package/lib/components/date-planning/component/agenda/agenda-week-select-view.component.d.ts +0 -10
- package/lib/components/date-planning/component/agenda/agenda-week-view.component.d.ts +0 -8
- package/lib/components/date-planning/component/agenda/view-select.component.d.ts +0 -11
- package/lib/components/date-planning/component/calendar/calendar-all-months.component.d.ts +0 -9
- package/lib/components/date-planning/component/calendar/calendar-all-years.component.d.ts +0 -9
- package/lib/components/date-planning/component/calendar/calendar-header.component.d.ts +0 -23
- package/lib/components/date-planning/component/calendar/calendar-view.component.d.ts +0 -31
- package/lib/components/date-planning/component/calendar/calendar.component.d.ts +0 -10
- package/lib/components/date-planning/date-planning.component.d.ts +0 -26
- package/lib/components/date-planning/date-planning.module.d.ts +0 -2
- package/lib/components/date-planning/style/material.scss +0 -5
- package/lib/components/docsign/component/signature/signature.component.d.ts +0 -16
- package/lib/components/docsign/component/signatures/signatures.component.d.ts +0 -12
- package/lib/components/docsign/docsign.component.d.ts +0 -94
- package/lib/components/docsign/docsign.module.d.ts +0 -2
- package/lib/components/key-pad/key-pad.component.d.ts +0 -38
- package/lib/components/key-pad/key-pad.module.d.ts +0 -2
- package/lib/components/layout-switcher/layout-switcher.component.d.ts +0 -16
- package/lib/components/layout-switcher/layout-switcher.module.d.ts +0 -2
- package/lib/components/linear-gauge/co-linear-gauge.component.d.ts +0 -11
- package/lib/components/linear-gauge/co-linear-gauge.module.d.ts +0 -2
- package/lib/components/send-method-dialog/components/layout-selection/layout-selection.component.d.ts +0 -19
- package/lib/components/send-method-dialog/components/layout-selection/layout-selection.module.d.ts +0 -2
- package/lib/components/send-method-dialog/components/printer-selection/printer-selection.component.d.ts +0 -19
- package/lib/components/send-method-dialog/components/printer-selection/printer-selection.module.d.ts +0 -2
- package/lib/components/send-method-dialog/components/send-method-email/send-method-email.component.d.ts +0 -14
- package/lib/components/send-method-dialog/components/send-method-email/send-method-email.module.d.ts +0 -2
- package/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.component.d.ts +0 -12
- package/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.module.d.ts +0 -2
- package/lib/components/send-method-dialog/components/signature-button/signature-button.component.d.ts +0 -12
- package/lib/components/send-method-dialog/components/signature-button/signature-button.module.d.ts +0 -2
- package/lib/components/send-method-dialog/model/email-address-viewmodel.d.ts +0 -5
- package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +0 -68
- package/lib/components/send-method-dialog/send-method-dialog.module.d.ts +0 -2
- package/lib/components/send-method-dialog/send-method-params.interface.d.ts +0 -13
- package/lib/components/send-method-dialog/service/send-method.service.d.ts +0 -23
- package/lib/components/simple-tags/simple-tags.component.d.ts +0 -31
- package/lib/components/simple-tags/simple-tags.module.d.ts +0 -2
- package/lib/components/statusbar/statusbar-popup.component.d.ts +0 -21
- package/lib/components/statusbar/statusbar.component.d.ts +0 -26
- package/lib/components/statusbar/statusbar.module.d.ts +0 -2
- package/lib/components/stock/components/allocation-stock-history/allocation-stock-history.component.d.ts +0 -9
- package/lib/components/stock/components/order-commission-stock-history/order-commission-stock-history.component.d.ts +0 -9
- package/lib/components/stock/components/order-stock-history/order-stock-history.component.d.ts +0 -9
- package/lib/components/stock/components/order-stock-tab/order-stock-tab.component.d.ts +0 -11
- package/lib/components/stock/components/order-supply-stock-history/order-supply-stock-history.component.d.ts +0 -9
- package/lib/components/stock/components/order-tab/order-tab.component.d.ts +0 -20
- package/lib/components/stock/components/stock-history/stock-history.component.d.ts +0 -13
- package/lib/components/stock/components/stock-location/stock-location.component.d.ts +0 -50
- package/lib/components/stock/components/stock-prognose/stock-prognose.component.d.ts +0 -11
- package/lib/components/stock/components/stock-tab/stock-tab.component.d.ts +0 -9
- package/lib/components/stock/localization/translation.d.ts +0 -60
- package/lib/components/stock/stock-history-tabs/stock-history-tabs.component.d.ts +0 -7
- package/lib/components/stock/stock-information/stock-information.component.d.ts +0 -8
- package/lib/components/stock/stock-information-grid/stock-information-grid.component.d.ts +0 -75
- package/lib/components/stock/stock-tabs/stock-tabs.component.d.ts +0 -54
- package/lib/components/stock/stock-transfer/stock-change-amount.component.d.ts +0 -18
- package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +0 -42
- package/lib/components/stock/stock.component.d.ts +0 -57
- package/lib/components/stock/stock.module.d.ts +0 -2
- package/lib/components/stock-statusbar/stock-statusbar.component.d.ts +0 -4
- package/lib/components/stock-statusbar/stock-statusbar.module.d.ts +0 -2
- package/lib/components/tab-bar/tab-bar.component.d.ts +0 -21
- package/lib/components/tab-bar/tab-bar.module.d.ts +0 -2
- package/lib/components/tab-bar/tab.interface.d.ts +0 -5
- package/lib/enum/calendar-view.enum.d.ts +0 -6
- package/lib/enum/gauge-color.enum.d.ts +0 -8
- package/lib/enum/keyboard-code.enum.d.ts +0 -30
- package/lib/enum/language-code.enum.d.ts +0 -6
- package/lib/enum/thumb-three-way-state.d.ts +0 -6
- package/lib/localization/localization.module.d.ts +0 -2
- package/lib/localization/localize.pipe.d.ts +0 -7
- package/lib/localization/localize.service.d.ts +0 -7
- package/lib/localization/translation.d.ts +0 -2
- package/lib/model/agenda-event-per-day.model.d.ts +0 -5
- package/lib/model/agenda-event.model.d.ts +0 -16
- package/lib/model/agenda-null-objects.d.ts +0 -10
- package/lib/model/constant/all-months.d.ts +0 -2
- package/lib/model/date-range.d.ts +0 -7
- package/lib/model/day.model.d.ts +0 -8
- package/lib/model/icon-svg.d.ts +0 -4
- package/lib/model/month.model.d.ts +0 -5
- package/lib/model/send-method.d.ts +0 -7
- package/lib/model/settings.d.ts +0 -3
- package/lib/model/time-window.bo.d.ts +0 -13
- package/lib/model/week.model.d.ts +0 -4
- package/lib/model/weekday.model.d.ts +0 -16
- package/lib/pipe/array-number.pipe.d.ts +0 -4
- package/lib/pipe/master-pipes.d.ts +0 -1
- package/lib/pipe/ucfirst.pipe.d.ts +0 -4
- package/lib/service/dictionary.service.d.ts +0 -21
- package/lib/service/icon-cache.service.d.ts +0 -18
- package/lib/service/options.service.d.ts +0 -13
- package/lib/service/shared-connector.service.d.ts +0 -53
- package/lib/service/shared.service.d.ts +0 -18
- package/lib/service/stock.service.d.ts +0 -41
- package/lib/utils/calendar.utils.d.ts +0 -10
- package/lib/utils/date-utils.d.ts +0 -44
- package/lib/utils/function/not-nill.function.d.ts +0 -1
- package/lib/utils/map-utils.d.ts +0 -16
- package/lib/utils/string-utils.d.ts +0 -22
- /package/{lib → projects/sharedcomponents/src/lib}/components/date-planning/component/agenda/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/date-planning/component/agenda/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/date-planning/component/calendar/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/date-planning/component/calendar/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/date-planning/component/calendar/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/date-planning/component/calendar/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/date-planning/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/date-planning/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/date-planning/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/key-pad/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/key-pad/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/key-pad/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/key-pad/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/layout-switcher/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/layout-switcher/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/layout-switcher/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/layout-switcher/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/linear-gauge/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/linear-gauge/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/linear-gauge/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/linear-gauge/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/login/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/login/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/login/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/login/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/screen-config-generator/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/screen-config-generator/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/screen-config-generator/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/screen-config-generator/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/layout-selection/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/layout-selection/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/layout-selection/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/layout-selection/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/printer-selection/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/printer-selection/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/printer-selection/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/printer-selection/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/send-method-email/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/send-method-email/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/send-method-email/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/send-method-email/style/material.scss +0 -0
- /package/{lib/components/send-method-dialog/components/send-method-printer → projects/sharedcomponents/src/lib/components/send-method-dialog/components/send-method-pdf}/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/send-method-printer/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/send-method-printer/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/send-method-printer/style/_theme.scss +0 -0
- /package/{lib/components/send-method-dialog/components/signature-button → projects/sharedcomponents/src/lib/components/send-method-dialog/components/send-method-printer}/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/signature-button/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/signature-button/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/components/signature-button/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/simple-tags/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/simple-tags/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/simple-tags/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/simple-tags/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/statusbar/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/statusbar/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/statusbar/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/statusbar/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/stock-statusbar/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/stock-statusbar/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/stock-statusbar/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/stock-statusbar/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/tab-bar/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/tab-bar/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/tab-bar/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/tab-bar/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/tags/component/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/tags/component/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/tags/component/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/tags/component/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/tags/component/tag-join-label/style/_layout.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/tags/component/tag-join-label/style/_material-definition.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/tags/component/tag-join-label/style/_theme.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/components/tags/component/tag-join-label/style/material.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/style/_mixin.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/style/_variables.scss +0 -0
- /package/{lib → projects/sharedcomponents/src/lib}/style/sharedcomponents-globals.scss +0 -0
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
import {ObjectUtils} from "./object-utils";
|
|
2
|
+
import {CheckWithinSteppedBoundsResult} from "./check-within-stepped-bounds-result";
|
|
3
|
+
import {ArrayUtils} from "./array-utils";
|
|
4
|
+
import {CheckPrecisionAndScaleResult} from "./check-precision-and-scale-result";
|
|
5
|
+
import {isNill} from "./is-nill.function";
|
|
6
|
+
import {notNill} from "./function/not-nill.function";
|
|
7
|
+
|
|
8
|
+
// Static utility function holder related to numeric variable evaluations and operations.
|
|
9
|
+
export class NumberUtils {
|
|
10
|
+
// For user-typed number input; supports comma's as decimal delimiter.
|
|
11
|
+
public static ParseIntNumberInput(arg: any): number {
|
|
12
|
+
return NumberUtils.ParseInt(NumberUtils._NumberInputToNumberStr(arg));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Parses given argument to an integer, using a native parseInt() function with a radix of 10. Returns NaN if parsing was not possible.
|
|
16
|
+
public static ParseInt(arg: any): number {
|
|
17
|
+
if (isNill(arg) || Array.isArray(arg)) {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return parseInt(arg, 10);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// For user-typed number input; supports comma's as decimal delimiter.
|
|
25
|
+
public static ParseFloatNumberInput(arg: any, decimalPrecision: number = 2): number {
|
|
26
|
+
return NumberUtils.ParseFloat(NumberUtils._NumberInputToNumberStr(arg), decimalPrecision);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public static ParseFloatNumberInputKeepPrecision(arg: any): number {
|
|
30
|
+
const correctedInputStr: string = NumberUtils._NumberInputToNumberStr(arg);
|
|
31
|
+
const decimalPrecision: number = this.GetDecimalPlaces(correctedInputStr);
|
|
32
|
+
return NumberUtils.ParseFloat(correctedInputStr, decimalPrecision);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Returns given arg as a float number with given decimal precision, if possible. Returns NaN if parse conversion failed.
|
|
37
|
+
*
|
|
38
|
+
* @param {any} arg The argument to parse to a float
|
|
39
|
+
* @param {number} decimalPrecision The number of decimals, or the precision, the parsed return float should have
|
|
40
|
+
* @returns {number} NaN if not possible, else the parsed float value
|
|
41
|
+
*/
|
|
42
|
+
public static ParseFloat(arg: any, decimalPrecision: number = 2): number {
|
|
43
|
+
if (!ObjectUtils.AllExist(arg, decimalPrecision) || Array.isArray(arg)) {
|
|
44
|
+
return NaN;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!NumberUtils.IsInteger(decimalPrecision) || decimalPrecision < 0) {
|
|
48
|
+
decimalPrecision = 2;
|
|
49
|
+
// toFixed() can only handle up until 20
|
|
50
|
+
} else if (decimalPrecision > 20) {
|
|
51
|
+
decimalPrecision = 20;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return parseFloat(parseFloat(arg).toFixed(decimalPrecision));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Returns given arg as a float number with given decimal precision, if possible. Returns NaN if parse conversion failed.
|
|
59
|
+
*
|
|
60
|
+
* @param arg The argument to parse to a float
|
|
61
|
+
* @returns {number} The argument as a float with its original decimal precision intact
|
|
62
|
+
*/
|
|
63
|
+
public static ParseFloatKeepPrecision(arg: any): number {
|
|
64
|
+
const decimalPrecision: number = this.GetDecimalPlaces(arg);
|
|
65
|
+
return this.ParseFloat(arg, decimalPrecision);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Returns the given argument as a number. Returns given defaultValue if conversion of argument was impossible.
|
|
70
|
+
* @param arg
|
|
71
|
+
* @param {number} [defaultValue = 0]
|
|
72
|
+
* @returns {number}
|
|
73
|
+
*/
|
|
74
|
+
public static ParseNumberOrDefault(arg: any, defaultValue: number = 0): number {
|
|
75
|
+
if (Array.isArray(arg)) {
|
|
76
|
+
return defaultValue;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (!NumberUtils.IsNumber(arg)) {
|
|
80
|
+
arg = parseFloat(arg);
|
|
81
|
+
arg = isNaN(arg) ? defaultValue : arg;
|
|
82
|
+
}
|
|
83
|
+
return arg;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Returns true iff given argument is an integer number. Returns false on non-numbers or numbers with significant decimals.
|
|
87
|
+
public static IsInteger(arg: any): boolean {
|
|
88
|
+
if (isNaN(arg) || Array.isArray(arg)) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
const argAsFloat: number = parseFloat(arg);
|
|
92
|
+
return ((argAsFloat | 0) === argAsFloat); // returns whether 'arg converted to an integer equals arg'
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Returns the number of decimal places of the given number. Returns 0 if no decimals whatsoever could be found on given arg.
|
|
96
|
+
public static GetDecimalPlaces(arg: any, maxAnswer: number = 1000): number {
|
|
97
|
+
const match: RegExpMatchArray = ("" + arg).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
|
|
98
|
+
if (!match) {
|
|
99
|
+
return 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
let answer: number = Math.max(0,
|
|
103
|
+
// number of digits right of decimal point.
|
|
104
|
+
(match[1] ? match[1].length : 0)
|
|
105
|
+
// adjust for scientific notation
|
|
106
|
+
- (match[2] ? +match[2] : 0));
|
|
107
|
+
|
|
108
|
+
if (answer > maxAnswer) {
|
|
109
|
+
answer = maxAnswer;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return answer;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Parses given numberInput to a number, or returns given defaultValue if parse not possible. Allows ',' char as decimal delimiter.
|
|
116
|
+
public static ParseNumberInputOrDefault(numberInput: any, defaultValue: number = 0): number {
|
|
117
|
+
return NumberUtils.ParseNumberOrDefault(NumberUtils._NumberInputToNumberStr(numberInput), defaultValue);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Returns whether the type of given argument is 'number'.
|
|
121
|
+
public static IsNumber(arg: any): boolean {
|
|
122
|
+
return typeof arg === "number" && !isNaN(arg);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Returns whether given arg is indeed not a number (it's NaN or it has another type than 'number')
|
|
127
|
+
* Our exact copy of AS Flex'es isNaN(arg) function. Always use this method for copying Flex isNaN(..) occurences into TypeScript.
|
|
128
|
+
* @param arg
|
|
129
|
+
* @returns {boolean}
|
|
130
|
+
* @constructor
|
|
131
|
+
*/
|
|
132
|
+
public static IsNaN(arg: any): boolean {
|
|
133
|
+
return isNaN(arg) || !NumberUtils.IsNumber(arg);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Our copy of CoMath.NaN. Returns number, or substitute if NumberUtils.IsNaN(number) holds true.
|
|
137
|
+
public static NaN(number: any, substitute: number = 0): number {
|
|
138
|
+
return NumberUtils.IsNaN(number) ? substitute : number;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Returns whether the value is parasable as a number.
|
|
142
|
+
public static IsParsableNumber(arg: any): boolean {
|
|
143
|
+
if (Array.isArray(arg)) {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return !isNaN(parseFloat(arg));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
public static IsParsableNumberInput(numberInput: any): boolean {
|
|
151
|
+
return NumberUtils.IsParsableNumber(NumberUtils._NumberInputToNumberStr(numberInput));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Returns whether given arg is parseable as a number, and whether the lengts of its number parse result is equal to its original length.
|
|
156
|
+
* I.e. this function returns FALSE with given number-parsable strings, but that have non-numeric appendices, eg '2233ff'. That arg
|
|
157
|
+
* IS number-parseable, but not a strict 'string number', the latter being what this method actually checks for.
|
|
158
|
+
*/
|
|
159
|
+
public static IsStringNumber(arg: string): boolean {
|
|
160
|
+
if (!NumberUtils.IsParsableNumber(arg)) {
|
|
161
|
+
return false;
|
|
162
|
+
} else {
|
|
163
|
+
return arg.toString().length === parseFloat(arg).toString().length;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
public static IsListOfNumbers(arg: string, separator: string = ","): boolean {
|
|
168
|
+
const nrs: string[] = arg.split(separator);
|
|
169
|
+
if (nrs.length === 0) {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
return nrs.filter(s => NumberUtils.IsStringNumber(s)).length === nrs.length;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Returns given argument as a string representation of a number parse, e.g. "1" for a number parse result of arg to 1.
|
|
176
|
+
public static ParseStringNumber(arg: string): number {
|
|
177
|
+
if (!this.IsStringNumber(arg)) {
|
|
178
|
+
return NaN;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return NumberUtils.ParseFloatKeepPrecision(arg);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
public static ParseStringNumberDefault(arg: string | any, defaultValue: number = 0): number {
|
|
185
|
+
return NumberUtils.NaN(NumberUtils.ParseStringNumber(arg), defaultValue);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Returns a random integer in range [lowerBound .. upperBound], an inclusive range. Returns NaN if not possible.
|
|
190
|
+
* Given bounds are truncated first, before serving as the true lower- and upper bounds for the random int.
|
|
191
|
+
*/
|
|
192
|
+
public static RandomInt(lowerBoundInt: number, upperBoundInt: number): number {
|
|
193
|
+
if (!NumberUtils.IsNumber(lowerBoundInt) || !NumberUtils.IsNumber(upperBoundInt) || lowerBoundInt > upperBoundInt) {
|
|
194
|
+
return NaN;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
lowerBoundInt = Math.trunc(lowerBoundInt);
|
|
198
|
+
upperBoundInt = Math.trunc(upperBoundInt);
|
|
199
|
+
|
|
200
|
+
if (lowerBoundInt === upperBoundInt) {
|
|
201
|
+
return lowerBoundInt;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const delta: number = upperBoundInt - lowerBoundInt;
|
|
205
|
+
return (Math.round(Math.random() * delta) + lowerBoundInt);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Adds thousands comma's to given value, E.g. '1000' to '1,000'. Returns empty string if value was undefined.
|
|
209
|
+
public static AddThousandsCommasTo(value: any): string {
|
|
210
|
+
if (isNill(value)) {
|
|
211
|
+
return "";
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Function used to check wether a given number is composed of another number, power-of-two wise.
|
|
219
|
+
* Example usage: NumberUtils.NumIsComposedOf(articleListObject.publication, ArticlePublication.Selector).
|
|
220
|
+
* This would return whether or not that articleListObject was publicated for selector or not, where articleListObject.publication
|
|
221
|
+
* was possibly a 'COMPOSITE that was made out of (including)' ArticlePublication.Selector.
|
|
222
|
+
*/
|
|
223
|
+
public static NumIsComposedOfOtherPowTwoNum(bigNrToCheck: number, powTwoNumItShouldBeComposedOf: number): boolean {
|
|
224
|
+
if (!bigNrToCheck) {
|
|
225
|
+
return false;
|
|
226
|
+
} else if (!powTwoNumItShouldBeComposedOf) {
|
|
227
|
+
return true;
|
|
228
|
+
} else {
|
|
229
|
+
return ((bigNrToCheck & powTwoNumItShouldBeComposedOf) === powTwoNumItShouldBeComposedOf);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Returns given nr, or the given default number (default 0) if the nr number was undefined or otherwise not a number.
|
|
235
|
+
* Same as CoMath.NaN from AS code (used as its substitute in transaction logic)
|
|
236
|
+
* @param nr
|
|
237
|
+
* @param defaultNr
|
|
238
|
+
* @returns {number}
|
|
239
|
+
*/
|
|
240
|
+
public static NrOrDefault(nr: number, defaultNr: number = 0): number {
|
|
241
|
+
if (notNill(nr) && NumberUtils.IsNumber(nr)) {
|
|
242
|
+
return nr;
|
|
243
|
+
} else {
|
|
244
|
+
return defaultNr;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Returns whether given nrToCheck is within the given precision and scale limits. Precision and scale, here, are Oracle DB terms.
|
|
250
|
+
* This function can thus be used to check whether the given number is safe to send to the 'database' beforehand, if we know the
|
|
251
|
+
* precision and scale of the number in the db declaration.
|
|
252
|
+
*
|
|
253
|
+
* I.e. A number declared in the Oracle DB as number(5, 2) has a precision of 5 and a scale of 2.
|
|
254
|
+
*
|
|
255
|
+
* @param {number} nrToCheck
|
|
256
|
+
* @param {number} precision The number of significant digits, including possibly negative scale. E.g. 3 in '123' and 5 in '51.123'
|
|
257
|
+
* @param {number} [scale = 0] The number of significant digits AFTER the decimal point. E.g. 1 in 5432.1 and 3 in 54000.003
|
|
258
|
+
* @returns {CheckPrecisionAndScaleResult} Whether given nrToCheck is ok for given precision and scale, and if not, the
|
|
259
|
+
* nearest number that IS ok for those constraints.
|
|
260
|
+
*/
|
|
261
|
+
public static CheckPrecisionAndScale(nrToCheck: number, precision: number, scale: number = 0): CheckPrecisionAndScaleResult {
|
|
262
|
+
// let's say any undefined number is checked OK, and all numbers are checked OK for an undefined precision
|
|
263
|
+
if (!ObjectUtils.AllExist(nrToCheck, precision, scale)) {
|
|
264
|
+
return {isOk: true, nearestOkNr: NaN};
|
|
265
|
+
}
|
|
266
|
+
// no number can have 0 or less than 0 significant digits, in our universe
|
|
267
|
+
if (precision < 1 || precision - scale < 1) {
|
|
268
|
+
return {isOk: false, nearestOkNr: NaN};
|
|
269
|
+
}
|
|
270
|
+
// begin check
|
|
271
|
+
const isNegative: boolean = (nrToCheck < 0);
|
|
272
|
+
const nrParts: string[] = nrToCheck.toString().split(".");
|
|
273
|
+
// remove minus sign if negative
|
|
274
|
+
if (isNegative) {
|
|
275
|
+
nrParts[0] = nrParts[0].slice(1);
|
|
276
|
+
}
|
|
277
|
+
const numCountBeforeDot: number = nrParts[0].length;
|
|
278
|
+
const allowedNumCountBeforeDot: number = precision - scale;
|
|
279
|
+
if (numCountBeforeDot <= allowedNumCountBeforeDot) {
|
|
280
|
+
return {isOk: true, nearestOkNr: nrToCheck};
|
|
281
|
+
} else {
|
|
282
|
+
// cut a part from the "before decimal number" so that the number is not too big anymore
|
|
283
|
+
const numCountToRemove: number = numCountBeforeDot - allowedNumCountBeforeDot;
|
|
284
|
+
// remove the right-most numbers before the decimal dot
|
|
285
|
+
nrParts[0] = nrParts[0].slice(0, -1 * numCountToRemove);
|
|
286
|
+
// add minus sign again if it was negative
|
|
287
|
+
if (isNegative) {
|
|
288
|
+
nrParts[0] = "-" + nrParts[0];
|
|
289
|
+
}
|
|
290
|
+
// build and return composite number again
|
|
291
|
+
let nearestOkNr: number;
|
|
292
|
+
if (nrParts[1]) {
|
|
293
|
+
nearestOkNr = Number(nrParts[0] + "." + nrParts[1]);
|
|
294
|
+
} else {
|
|
295
|
+
nearestOkNr = Number(nrParts[0]);
|
|
296
|
+
}
|
|
297
|
+
return {isOk: false, nearestOkNr: nearestOkNr};
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Returns whether given x is OK within the given min, max and step boundaries, where it should hold that nrToCheck = min + N * step,
|
|
303
|
+
* with N integer or 0.
|
|
304
|
+
* @param {number} nrToCheck Number to check whether it's within the given bounds
|
|
305
|
+
* @param min Inclusive
|
|
306
|
+
* @param max Inclusive
|
|
307
|
+
* @param stepSize
|
|
308
|
+
* @returns {CheckWithinSteppedBounds} Returns remainder of undefined when nrToCheck was OUTSIDE [min, max], else full result object.
|
|
309
|
+
*/
|
|
310
|
+
public static CheckWithinSteppedBounds(
|
|
311
|
+
nrToCheck: number,
|
|
312
|
+
min: number,
|
|
313
|
+
max: number,
|
|
314
|
+
stepSize: number = 1
|
|
315
|
+
): CheckWithinSteppedBoundsResult {
|
|
316
|
+
if (nrToCheck < min || nrToCheck > max) {
|
|
317
|
+
return {isOk: false, remainder: undefined};
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// we're in [min, max], but still check if nrToCheck = min + N * step holds (for N integer or 0)
|
|
321
|
+
let remainder: number = (nrToCheck - min) % stepSize;
|
|
322
|
+
// correct float for largest precision amongst input numbers
|
|
323
|
+
remainder = NumberUtils.ParseFloat(remainder, NumberUtils._GetLargestDecimalPrecisionOf(nrToCheck, min, stepSize));
|
|
324
|
+
return {isOk: (remainder === 0), remainder: remainder};
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Finds the number closest to the originalNumber, that adheres to the given bounds. That is, for which it holds that
|
|
329
|
+
* nr = min + N * step with N integer or 0.
|
|
330
|
+
* @param {number} originalNr Find closest answer to this number
|
|
331
|
+
* @param min Inclusive
|
|
332
|
+
* @param max Inclusive
|
|
333
|
+
* @param stepSize
|
|
334
|
+
* @returns {boolean} The closest OK number for bounds.
|
|
335
|
+
*/
|
|
336
|
+
public static GetNearestNumberWithinSteppedBounds(originalNr: number, min: number, max: number, stepSize: number = 1): number {
|
|
337
|
+
if (originalNr < min) {
|
|
338
|
+
return min;
|
|
339
|
+
} else if (originalNr > max) {
|
|
340
|
+
return NumberUtils.GetTrueSteppedBoundsMax(min, max, stepSize);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const boundsCheck: CheckWithinSteppedBoundsResult = NumberUtils.CheckWithinSteppedBounds(originalNr, min, max, stepSize);
|
|
344
|
+
if (boundsCheck.isOk) {
|
|
345
|
+
return originalNr;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
let answer: number;
|
|
349
|
+
|
|
350
|
+
const remainder: number = boundsCheck.remainder;
|
|
351
|
+
if (remainder) {
|
|
352
|
+
// round up or down?
|
|
353
|
+
if ((remainder / stepSize) < 0.5) {
|
|
354
|
+
// round down, but not below min
|
|
355
|
+
answer = (originalNr - remainder >= min ? originalNr - remainder : min);
|
|
356
|
+
} else {
|
|
357
|
+
// round up, but not above max
|
|
358
|
+
answer = (originalNr + stepSize - remainder <= max ? originalNr + stepSize - remainder :
|
|
359
|
+
NumberUtils.GetTrueSteppedBoundsMax(min, max, stepSize));
|
|
360
|
+
}
|
|
361
|
+
} else {
|
|
362
|
+
// is this real life, why wasn't our stepped bounds check OK?
|
|
363
|
+
answer = originalNr;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// 'correct' float errors
|
|
367
|
+
answer = NumberUtils.ParseFloat(answer, NumberUtils._GetLargestDecimalPrecisionOf(originalNr, min, max, stepSize));
|
|
368
|
+
return answer;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Returns the true maximum allowed value for the given "stepped bounds": min, stepSize and max, for which it holds that each allowed
|
|
373
|
+
* value Y = min + stepSize * N, for any INTEGER or 0 N where it also holds, of course, that Y <= max.
|
|
374
|
+
* @param min
|
|
375
|
+
* @param max
|
|
376
|
+
* @param stepSize
|
|
377
|
+
*/
|
|
378
|
+
public static GetTrueSteppedBoundsMax(min: number, max: number, stepSize: number = 1): number {
|
|
379
|
+
// solve max integer X in formula min + X * step <= max, and return min + X * stepSize for that X
|
|
380
|
+
const maxSteps: number = Math.floor((max - min) / stepSize);
|
|
381
|
+
// 'correct' float errors
|
|
382
|
+
return NumberUtils.ParseFloat(min + maxSteps * stepSize, NumberUtils._GetLargestDecimalPrecisionOf(min, min, max));
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// Returns the nearest number, relative to the given originalNr, that is within the given [min, max] inclusive bounds.
|
|
386
|
+
public static GetNearestNumberWithinBounds(originalNr: number, min: number, max: number): number {
|
|
387
|
+
let answer: number = originalNr;
|
|
388
|
+
|
|
389
|
+
if (originalNr < min) {
|
|
390
|
+
answer = min;
|
|
391
|
+
} else if (originalNr > max) {
|
|
392
|
+
answer = max;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
return answer;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// Returns the string representation of given number. If it's not a number, returns the empty string.
|
|
399
|
+
public static ToString(nr: number): string {
|
|
400
|
+
if (!NumberUtils.IsNaN(nr)) {
|
|
401
|
+
return "" + nr;
|
|
402
|
+
} else {
|
|
403
|
+
return "";
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
public static DecimalsToStepIncrement(numberOfDecimals: number): number {
|
|
408
|
+
return Math.pow(10, -1 * numberOfDecimals);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
public static Round(value: number, decimals: number): number {
|
|
412
|
+
const factor: number = Math.pow(10, decimals);
|
|
413
|
+
return Math.round(value * factor) / factor;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// @returns The inclusive max value
|
|
417
|
+
public static PrecisionScaleToMaxValue(precision: number, scale: number): number {
|
|
418
|
+
const oneStep: number = this.DecimalsToStepIncrement(scale);
|
|
419
|
+
const maxExclusive: number = Math.pow(10, precision - scale);
|
|
420
|
+
return maxExclusive - oneStep;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// @returns the difference between given 2 numbers
|
|
424
|
+
public static DifferenceBetweenNumbers(numberA: number, numberB: number): number {
|
|
425
|
+
return Math.abs(numberA - numberB);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
private static _GetLargestDecimalPrecisionOf(...args: number[]): number {
|
|
429
|
+
const result = ArrayUtils.GetMaxCalculatedValue(args, (arg: number) => {
|
|
430
|
+
return NumberUtils.GetDecimalPlaces(arg);
|
|
431
|
+
});
|
|
432
|
+
return result;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// Returns given number input as a number that's useable by Javascript. Allows for incoming ',' decimal delimiter.
|
|
436
|
+
private static _NumberInputToNumberStr(numberInput: string): string {
|
|
437
|
+
return (numberInput + "").replace(",", ".");
|
|
438
|
+
}
|
|
439
|
+
}
|