mis-crystal-design-system 4.0.51 → 17.0.0
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/action-list/action-list.component.d.ts +3 -0
- package/action-list/action-list.module.d.ts +9 -0
- package/analytics/analytics.module.d.ts +4 -0
- package/analytics/analytics.service.d.ts +3 -0
- package/async-search-dropdown/async-dropdown.component.d.ts +6 -3
- package/async-search-dropdown/async-dropdown.module.d.ts +9 -0
- package/button/button.component.d.ts +3 -0
- package/button/button.directive.d.ts +3 -0
- package/button/button.module.d.ts +7 -0
- package/checkbox/checkbox.component.d.ts +3 -0
- package/checkbox/checkbox.module.d.ts +7 -0
- package/chip/chip.component.d.ts +3 -0
- package/chip/chip.module.d.ts +6 -0
- package/datepicker_v2/datepicker.module.d.ts +10 -0
- package/datepicker_v2/models/dp-config.model.d.ts +1 -1
- package/datepicker_v2/public_api.d.ts +1 -0
- package/datepicker_v2/tz-datepicker.directive.d.ts +3 -0
- package/datepicker_v2/tz-dp-container/tz-dp-container.component.d.ts +3 -0
- package/daterangepicker_v2/daterangepicker.module.d.ts +10 -0
- package/daterangepicker_v2/models/drp-config.model.d.ts +1 -1
- package/daterangepicker_v2/public_api.d.ts +1 -0
- package/daterangepicker_v2/tz-daterangepicker.directive.d.ts +3 -0
- package/daterangepicker_v2/tz-drp-container/tz-drp-container.component.d.ts +3 -0
- package/drawer/drawer-body/drawer-body.component.d.ts +3 -1
- package/drawer/drawer.module.d.ts +8 -0
- package/drawer/drawer.service.d.ts +3 -0
- package/dropdown/calculate-container-height.directive.d.ts +3 -0
- package/dropdown/dropdown.component.d.ts +3 -0
- package/dropdown/dropdown.module.d.ts +11 -0
- package/dynamic-form/dynamic-form.component.d.ts +11 -8
- package/dynamic-form/dynamic-form.module.d.ts +13 -0
- package/esm2022/action-list/action-list.component.mjs +363 -0
- package/esm2022/action-list/action-list.module.mjs +25 -0
- package/esm2022/analytics/analytics.module.mjs +18 -0
- package/esm2022/analytics/analytics.service.mjs +63 -0
- package/esm2022/async-search-dropdown/async-dropdown.component.mjs +467 -0
- package/esm2022/async-search-dropdown/async-dropdown.module.mjs +22 -0
- package/esm2022/button/button.component.mjs +88 -0
- package/esm2022/button/button.directive.mjs +61 -0
- package/esm2022/button/button.module.mjs +23 -0
- package/esm2022/checkbox/checkbox.component.mjs +124 -0
- package/esm2022/checkbox/checkbox.module.mjs +23 -0
- package/esm2022/chip/chip.component.mjs +82 -0
- package/esm2022/chip/chip.module.mjs +22 -0
- package/esm2022/datepicker_v2/datepicker.module.mjs +24 -0
- package/esm2022/datepicker_v2/mis-crystal-design-system-datepicker_v2.mjs +5 -0
- package/esm2022/datepicker_v2/public_api.mjs +4 -0
- package/esm2022/datepicker_v2/tz-datepicker.directive.mjs +164 -0
- package/esm2022/datepicker_v2/tz-dp-container/tz-dp-container.component.mjs +246 -0
- package/{esm2015/daterangepicker_v2/utils/index.js → esm2022/datepicker_v2/utils/index.mjs} +1 -1
- package/esm2022/daterangepicker_v2/daterangepicker.module.mjs +25 -0
- package/esm2022/daterangepicker_v2/mis-crystal-design-system-daterangepicker_v2.mjs +5 -0
- package/esm2022/daterangepicker_v2/public_api.mjs +4 -0
- package/esm2022/daterangepicker_v2/tz-daterangepicker.directive.mjs +135 -0
- package/esm2022/daterangepicker_v2/tz-drp-container/tz-drp-container.component.mjs +365 -0
- package/esm2022/daterangepicker_v2/utils/index.mjs +45 -0
- package/esm2022/drawer/drawer-body/drawer-body.component.mjs +59 -0
- package/{esm2015/drawer/drawer-ref.js → esm2022/drawer/drawer-ref.mjs} +4 -4
- package/esm2022/drawer/drawer.module.mjs +33 -0
- package/esm2022/drawer/drawer.service.mjs +56 -0
- package/esm2022/drawer/mis-crystal-design-system-drawer.mjs +5 -0
- package/esm2022/dropdown/calculate-container-height.directive.mjs +41 -0
- package/esm2022/dropdown/dropdown.component.mjs +404 -0
- package/esm2022/dropdown/dropdown.module.mjs +27 -0
- package/esm2022/dropdown/mis-crystal-design-system-dropdown.mjs +5 -0
- package/esm2022/dynamic-form/dynamic-form.component.mjs +705 -0
- package/esm2022/dynamic-form/dynamic-form.module.mjs +56 -0
- package/esm2022/fab/fab.component.mjs +145 -0
- package/esm2022/fab/fab.module.mjs +22 -0
- package/esm2022/input/directives/input/input.directive.mjs +40 -0
- package/esm2022/input/mis-input.component.mjs +85 -0
- package/esm2022/input/mis-input.module.mjs +21 -0
- package/esm2022/input-stepper/input-stepper/input-stepper.component.mjs +75 -0
- package/esm2022/input-stepper/input-stepper.module.mjs +25 -0
- package/esm2022/loader/loader.component.mjs +25 -0
- package/esm2022/loader/loader.module.mjs +22 -0
- package/esm2022/menu/menu-close.directive.mjs +25 -0
- package/esm2022/menu/menu.directive.mjs +77 -0
- package/esm2022/menu/menu.module.mjs +23 -0
- package/esm2022/mobile-filter/mobile-filter.component.mjs +178 -0
- package/esm2022/mobile-filter/mobile-filter.module.mjs +21 -0
- package/esm2022/modal/mis-crystal-design-system-modal.mjs +5 -0
- package/esm2022/modal/modal.module.mjs +33 -0
- package/esm2022/modal/modal.service.mjs +70 -0
- package/esm2022/modal/module-wrapper/module-wrapper.component.mjs +56 -0
- package/esm2022/multi-select-dropdown/multi-select-dropdown.component.mjs +477 -0
- package/esm2022/multi-select-dropdown/multi-select-dropdown.module.mjs +26 -0
- package/esm2022/nested-multi-select-dropdown/nested-multi-select-dropdown.component.mjs +509 -0
- package/esm2022/nested-multi-select-dropdown/nested-multi-select-dropdown.module.mjs +26 -0
- package/esm2022/phone-input/phone-input.component.mjs +116 -0
- package/esm2022/phone-input/phone-input.module.mjs +27 -0
- package/esm2022/radio-button/radio-button.component.mjs +57 -0
- package/esm2022/radio-button/radio-button.module.mjs +23 -0
- package/esm2022/ske-loader/ske-loader.component.mjs +54 -0
- package/esm2022/ske-loader/ske-loader.module.mjs +19 -0
- package/esm2022/slider/slider.component.mjs +46 -0
- package/esm2022/slider/slider.module.mjs +30 -0
- package/esm2022/snackbar/snackbar/snackbar.component.mjs +72 -0
- package/esm2022/snackbar/snackbar.module.mjs +36 -0
- package/esm2022/snackbar/snackbar.service.mjs +47 -0
- package/esm2022/specificdatepicker/mis-crystal-design-system-specificdatepicker.mjs +5 -0
- package/esm2022/specificdatepicker/public_api.mjs +5 -0
- package/esm2022/specificdatepicker/specificdatepicker.module.mjs +27 -0
- package/esm2022/specificdatepicker/tz-sdp-container/tz-sdp-container.component.mjs +619 -0
- package/esm2022/specificdatepicker/tz-specificdatepicker.directive.mjs +196 -0
- package/esm2022/specificdatepicker/utils/index.mjs +45 -0
- package/esm2022/star-rating/star-rating.component.mjs +113 -0
- package/esm2022/star-rating/star-rating.module.mjs +19 -0
- package/esm2022/switch/switch.component.mjs +56 -0
- package/esm2022/switch/switch.module.mjs +23 -0
- package/esm2022/table/custom-table-cell.directive.mjs +42 -0
- package/esm2022/table/filter/filter.component.mjs +169 -0
- package/esm2022/table/mis-crystal-design-system-table.mjs +5 -0
- package/esm2022/table/public_api.mjs +7 -0
- package/esm2022/table/sub-table/sub-table.component.mjs +192 -0
- package/esm2022/table/table.component.mjs +469 -0
- package/esm2022/table/table.module.mjs +27 -0
- package/esm2022/timepicker/mis-crystal-design-system-timepicker.mjs +5 -0
- package/esm2022/timepicker/timepicker.component.mjs +343 -0
- package/esm2022/timepicker/timepicker.directive.mjs +65 -0
- package/esm2022/timepicker/timepicker.module.mjs +26 -0
- package/esm2022/timerangepicker/timerangepicker.component.mjs +228 -0
- package/esm2022/timerangepicker/timerangepicker.module.mjs +24 -0
- package/esm2022/toast/toast.component.mjs +51 -0
- package/esm2022/toast/toast.data.service.mjs +30 -0
- package/esm2022/toast/toast.module.mjs +33 -0
- package/esm2022/toast/toast.service.mjs +91 -0
- package/esm2022/tooltip/tooltip-container/tooltip.component.mjs +78 -0
- package/esm2022/tooltip/tooltip.directive.mjs +137 -0
- package/esm2022/tooltip/tooltip.module.mjs +24 -0
- package/esm2022/virtual-scroll/virtual-scroll.component.mjs +188 -0
- package/esm2022/virtual-scroll/virtual-scroll.module.mjs +34 -0
- package/esm2022/widgets/classes/async-widget.mjs +23 -0
- package/esm2022/widgets/classes/base-widget.mjs +32 -0
- package/esm2022/widgets/classes/sync-widget.mjs +20 -0
- package/esm2022/widgets/classes/widget-group.mjs +32 -0
- package/esm2022/widgets/services/widget.service.mjs +18 -0
- package/esm2022/widgets/widgets.module.mjs +18 -0
- package/fab/fab.component.d.ts +6 -3
- package/fab/fab.module.d.ts +6 -0
- package/fesm2022/mis-crystal-design-system-action-list.mjs +391 -0
- package/fesm2022/mis-crystal-design-system-action-list.mjs.map +1 -0
- package/{fesm2015/mis-crystal-design-system-analytics.js → fesm2022/mis-crystal-design-system-analytics.mjs} +21 -15
- package/fesm2022/mis-crystal-design-system-analytics.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-async-search-dropdown.mjs +491 -0
- package/fesm2022/mis-crystal-design-system-async-search-dropdown.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-button.mjs +173 -0
- package/fesm2022/mis-crystal-design-system-button.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-checkbox.mjs +150 -0
- package/fesm2022/mis-crystal-design-system-checkbox.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-chip.mjs +108 -0
- package/fesm2022/mis-crystal-design-system-chip.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs +478 -0
- package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs +568 -0
- package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-drawer.mjs +173 -0
- package/fesm2022/mis-crystal-design-system-drawer.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-dropdown.mjs +472 -0
- package/fesm2022/mis-crystal-design-system-dropdown.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-dynamic-form.mjs +763 -0
- package/fesm2022/mis-crystal-design-system-dynamic-form.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-fab.mjs +171 -0
- package/fesm2022/mis-crystal-design-system-fab.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-input-stepper.mjs +104 -0
- package/fesm2022/mis-crystal-design-system-input-stepper.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-input.mjs +146 -0
- package/fesm2022/mis-crystal-design-system-input.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-loader.mjs +51 -0
- package/fesm2022/mis-crystal-design-system-loader.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-menu.mjs +124 -0
- package/fesm2022/mis-crystal-design-system-menu.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-mobile-filter.mjs +203 -0
- package/fesm2022/mis-crystal-design-system-mobile-filter.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-modal.mjs +173 -0
- package/fesm2022/mis-crystal-design-system-modal.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-multi-select-dropdown.mjs +506 -0
- package/fesm2022/mis-crystal-design-system-multi-select-dropdown.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-nested-multi-select-dropdown.mjs +538 -0
- package/fesm2022/mis-crystal-design-system-nested-multi-select-dropdown.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-phone-input.mjs +145 -0
- package/fesm2022/mis-crystal-design-system-phone-input.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-radio-button.mjs +83 -0
- package/fesm2022/mis-crystal-design-system-radio-button.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-ske-loader.mjs +77 -0
- package/fesm2022/mis-crystal-design-system-ske-loader.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-slider.mjs +80 -0
- package/fesm2022/mis-crystal-design-system-slider.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-snackbar.mjs +155 -0
- package/fesm2022/mis-crystal-design-system-snackbar.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs +884 -0
- package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-star-rating.mjs +136 -0
- package/fesm2022/mis-crystal-design-system-star-rating.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-styles.mjs +4 -0
- package/fesm2022/mis-crystal-design-system-styles.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-switch.mjs +82 -0
- package/fesm2022/mis-crystal-design-system-switch.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-table.mjs +888 -0
- package/fesm2022/mis-crystal-design-system-table.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-timepicker.mjs +429 -0
- package/fesm2022/mis-crystal-design-system-timepicker.mjs.map +1 -0
- package/{fesm2015/mis-crystal-design-system-timerangepicker.js → fesm2022/mis-crystal-design-system-timerangepicker.mjs} +73 -35
- package/fesm2022/mis-crystal-design-system-timerangepicker.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-toast.mjs +199 -0
- package/fesm2022/mis-crystal-design-system-toast.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-tooltip.mjs +238 -0
- package/fesm2022/mis-crystal-design-system-tooltip.mjs.map +1 -0
- package/{fesm2015/mis-crystal-design-system-utils.js → fesm2022/mis-crystal-design-system-utils.mjs} +1 -1
- package/fesm2022/mis-crystal-design-system-utils.mjs.map +1 -0
- package/fesm2022/mis-crystal-design-system-virtual-scroll.mjs +227 -0
- package/fesm2022/mis-crystal-design-system-virtual-scroll.mjs.map +1 -0
- package/{fesm2015/mis-crystal-design-system-widgets.js → fesm2022/mis-crystal-design-system-widgets.mjs} +13 -7
- package/fesm2022/mis-crystal-design-system-widgets.mjs.map +1 -0
- package/{fesm2015/mis-crystal-design-system.js → fesm2022/mis-crystal-design-system.mjs} +1 -1
- package/fesm2022/mis-crystal-design-system.mjs.map +1 -0
- package/input/directives/input/input.directive.d.ts +3 -0
- package/input/mis-input.component.d.ts +3 -0
- package/input/mis-input.module.d.ts +8 -0
- package/input-stepper/input-stepper/input-stepper.component.d.ts +3 -0
- package/input-stepper/input-stepper.module.d.ts +6 -0
- package/loader/loader.component.d.ts +3 -0
- package/loader/loader.module.d.ts +6 -0
- package/menu/menu-close.directive.d.ts +3 -0
- package/menu/menu.directive.d.ts +3 -0
- package/menu/menu.module.d.ts +9 -1
- package/mobile-filter/mobile-filter.component.d.ts +3 -0
- package/mobile-filter/mobile-filter.module.d.ts +8 -0
- package/modal/modal.module.d.ts +8 -0
- package/modal/modal.service.d.ts +3 -0
- package/modal/module-wrapper/module-wrapper.component.d.ts +3 -0
- package/multi-select-dropdown/multi-select-dropdown.component.d.ts +3 -0
- package/multi-select-dropdown/multi-select-dropdown.module.d.ts +10 -0
- package/nested-multi-select-dropdown/nested-multi-select-dropdown.component.d.ts +3 -0
- package/nested-multi-select-dropdown/nested-multi-select-dropdown.module.d.ts +10 -0
- package/package.json +240 -9
- package/phone-input/phone-input.component.d.ts +5 -2
- package/phone-input/phone-input.module.d.ts +10 -0
- package/radio-button/radio-button.component.d.ts +3 -0
- package/radio-button/radio-button.module.d.ts +7 -0
- package/ske-loader/ske-loader.component.d.ts +3 -0
- package/ske-loader/ske-loader.module.d.ts +6 -0
- package/slider/slider.component.d.ts +6 -3
- package/slider/slider.module.d.ts +7 -0
- package/snackbar/snackbar/snackbar.component.d.ts +3 -0
- package/snackbar/snackbar.module.d.ts +6 -0
- package/snackbar/snackbar.service.d.ts +5 -2
- package/specificdatepicker/models/sdp-config.model.d.ts +1 -1
- package/specificdatepicker/public_api.d.ts +2 -0
- package/specificdatepicker/specificdatepicker.module.d.ts +12 -0
- package/specificdatepicker/tz-sdp-container/tz-sdp-container.component.d.ts +5 -2
- package/specificdatepicker/tz-specificdatepicker.directive.d.ts +3 -0
- package/star-rating/star-rating.component.d.ts +3 -0
- package/star-rating/star-rating.module.d.ts +6 -0
- package/switch/switch.component.d.ts +3 -0
- package/switch/switch.module.d.ts +7 -0
- package/table/custom-table-cell.directive.d.ts +3 -0
- package/table/filter/filter.component.d.ts +4 -1
- package/table/public_api.d.ts +2 -0
- package/table/sub-table/sub-table.component.d.ts +3 -0
- package/table/table.component.d.ts +3 -0
- package/table/table.module.d.ts +11 -0
- package/timepicker/timepicker.component.d.ts +3 -0
- package/timepicker/timepicker.directive.d.ts +3 -0
- package/timepicker/timepicker.module.d.ts +10 -0
- package/timerangepicker/timerange.namespace.d.ts +1 -1
- package/timerangepicker/timerangepicker.component.d.ts +3 -0
- package/timerangepicker/timerangepicker.module.d.ts +8 -0
- package/toast/toast.component.d.ts +3 -0
- package/toast/toast.data.service.d.ts +3 -0
- package/toast/toast.module.d.ts +7 -0
- package/toast/toast.service.d.ts +4 -1
- package/tooltip/models/tooltip.model.d.ts +1 -1
- package/tooltip/tooltip-container/tooltip.component.d.ts +3 -0
- package/tooltip/tooltip.directive.d.ts +3 -0
- package/tooltip/tooltip.module.d.ts +8 -0
- package/virtual-scroll/virtual-scroll.component.d.ts +3 -0
- package/virtual-scroll/virtual-scroll.module.d.ts +8 -0
- package/widgets/interfaces/widgets.model.d.ts +1 -1
- package/widgets/services/widget.service.d.ts +3 -0
- package/widgets/widgets.module.d.ts +5 -0
- package/action-list/mis-crystal-design-system-action-list.d.ts +0 -4
- package/action-list/mis-crystal-design-system-action-list.metadata.json +0 -1
- package/action-list/package.json +0 -11
- package/analytics/mis-crystal-design-system-analytics.d.ts +0 -4
- package/analytics/mis-crystal-design-system-analytics.metadata.json +0 -1
- package/analytics/package.json +0 -11
- package/async-search-dropdown/mis-crystal-design-system-async-search-dropdown.d.ts +0 -4
- package/async-search-dropdown/mis-crystal-design-system-async-search-dropdown.metadata.json +0 -1
- package/async-search-dropdown/package.json +0 -11
- package/bundles/mis-crystal-design-system-action-list.umd.js +0 -509
- package/bundles/mis-crystal-design-system-action-list.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-action-list.umd.min.js +0 -16
- package/bundles/mis-crystal-design-system-action-list.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-analytics.umd.js +0 -422
- package/bundles/mis-crystal-design-system-analytics.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-analytics.umd.min.js +0 -16
- package/bundles/mis-crystal-design-system-analytics.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-async-search-dropdown.umd.js +0 -279
- package/bundles/mis-crystal-design-system-async-search-dropdown.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-async-search-dropdown.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-async-search-dropdown.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-button.umd.js +0 -134
- package/bundles/mis-crystal-design-system-button.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-button.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-button.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-checkbox.umd.js +0 -127
- package/bundles/mis-crystal-design-system-checkbox.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-checkbox.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-checkbox.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-chip.umd.js +0 -64
- package/bundles/mis-crystal-design-system-chip.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-chip.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-chip.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.js +0 -706
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js +0 -16
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.js +0 -464
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-drawer.umd.js +0 -169
- package/bundles/mis-crystal-design-system-drawer.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-drawer.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-drawer.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.js +0 -558
- package/bundles/mis-crystal-design-system-dropdown.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.min.js +0 -16
- package/bundles/mis-crystal-design-system-dropdown.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-dynamic-form.umd.js +0 -740
- package/bundles/mis-crystal-design-system-dynamic-form.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-dynamic-form.umd.min.js +0 -16
- package/bundles/mis-crystal-design-system-dynamic-form.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-fab.umd.js +0 -95
- package/bundles/mis-crystal-design-system-fab.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-fab.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-fab.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-input-stepper.umd.js +0 -85
- package/bundles/mis-crystal-design-system-input-stepper.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-input-stepper.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-input-stepper.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-input.umd.js +0 -116
- package/bundles/mis-crystal-design-system-input.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-input.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-input.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-loader.umd.js +0 -53
- package/bundles/mis-crystal-design-system-loader.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-loader.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-loader.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-menu.umd.js +0 -119
- package/bundles/mis-crystal-design-system-menu.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-menu.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-menu.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-mobile-filter.umd.js +0 -89
- package/bundles/mis-crystal-design-system-mobile-filter.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-mobile-filter.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-mobile-filter.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-modal.umd.js +0 -161
- package/bundles/mis-crystal-design-system-modal.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-modal.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-modal.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.js +0 -623
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.min.js +0 -16
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.js +0 -636
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.min.js +0 -16
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-phone-input.umd.js +0 -117
- package/bundles/mis-crystal-design-system-phone-input.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-phone-input.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-phone-input.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-radio-button.umd.js +0 -77
- package/bundles/mis-crystal-design-system-radio-button.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-radio-button.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-radio-button.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-ske-loader.umd.js +0 -65
- package/bundles/mis-crystal-design-system-ske-loader.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-ske-loader.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-ske-loader.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-slider.umd.js +0 -73
- package/bundles/mis-crystal-design-system-slider.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-slider.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-slider.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-snackbar.umd.js +0 -114
- package/bundles/mis-crystal-design-system-snackbar.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-snackbar.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-snackbar.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-specificdatepicker.umd.js +0 -977
- package/bundles/mis-crystal-design-system-specificdatepicker.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-specificdatepicker.umd.min.js +0 -16
- package/bundles/mis-crystal-design-system-specificdatepicker.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-star-rating.umd.js +0 -112
- package/bundles/mis-crystal-design-system-star-rating.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-star-rating.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-star-rating.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-styles.umd.js +0 -11
- package/bundles/mis-crystal-design-system-styles.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-styles.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-styles.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-switch.umd.js +0 -79
- package/bundles/mis-crystal-design-system-switch.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-switch.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-switch.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-table.umd.js +0 -784
- package/bundles/mis-crystal-design-system-table.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-table.umd.min.js +0 -16
- package/bundles/mis-crystal-design-system-table.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-timepicker.umd.js +0 -688
- package/bundles/mis-crystal-design-system-timepicker.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-timepicker.umd.min.js +0 -16
- package/bundles/mis-crystal-design-system-timepicker.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-timerangepicker.umd.js +0 -248
- package/bundles/mis-crystal-design-system-timerangepicker.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-timerangepicker.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-timerangepicker.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-toast.umd.js +0 -202
- package/bundles/mis-crystal-design-system-toast.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-toast.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-toast.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-tooltip.umd.js +0 -214
- package/bundles/mis-crystal-design-system-tooltip.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-tooltip.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-tooltip.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-utils.umd.js +0 -33
- package/bundles/mis-crystal-design-system-utils.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-utils.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system-utils.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-virtual-scroll.umd.js +0 -471
- package/bundles/mis-crystal-design-system-virtual-scroll.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-virtual-scroll.umd.min.js +0 -16
- package/bundles/mis-crystal-design-system-virtual-scroll.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system-widgets.umd.js +0 -478
- package/bundles/mis-crystal-design-system-widgets.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system-widgets.umd.min.js +0 -16
- package/bundles/mis-crystal-design-system-widgets.umd.min.js.map +0 -1
- package/bundles/mis-crystal-design-system.umd.js +0 -31
- package/bundles/mis-crystal-design-system.umd.js.map +0 -1
- package/bundles/mis-crystal-design-system.umd.min.js +0 -2
- package/bundles/mis-crystal-design-system.umd.min.js.map +0 -1
- package/button/mis-crystal-design-system-button.d.ts +0 -4
- package/button/mis-crystal-design-system-button.metadata.json +0 -1
- package/button/package.json +0 -11
- package/checkbox/mis-crystal-design-system-checkbox.d.ts +0 -4
- package/checkbox/mis-crystal-design-system-checkbox.metadata.json +0 -1
- package/checkbox/package.json +0 -11
- package/chip/mis-crystal-design-system-chip.d.ts +0 -4
- package/chip/mis-crystal-design-system-chip.metadata.json +0 -1
- package/chip/package.json +0 -11
- package/datepicker_v2/mis-crystal-design-system-datepicker_v2.d.ts +0 -7
- package/datepicker_v2/mis-crystal-design-system-datepicker_v2.metadata.json +0 -1
- package/datepicker_v2/package.json +0 -11
- package/daterangepicker_v2/mis-crystal-design-system-daterangepicker_v2.d.ts +0 -7
- package/daterangepicker_v2/mis-crystal-design-system-daterangepicker_v2.metadata.json +0 -1
- package/daterangepicker_v2/package.json +0 -11
- package/drawer/mis-crystal-design-system-drawer.d.ts +0 -5
- package/drawer/mis-crystal-design-system-drawer.metadata.json +0 -1
- package/drawer/package.json +0 -11
- package/dropdown/mis-crystal-design-system-dropdown.d.ts +0 -5
- package/dropdown/mis-crystal-design-system-dropdown.metadata.json +0 -1
- package/dropdown/package.json +0 -11
- package/dynamic-form/mis-crystal-design-system-dynamic-form.d.ts +0 -4
- package/dynamic-form/mis-crystal-design-system-dynamic-form.metadata.json +0 -1
- package/dynamic-form/package.json +0 -11
- package/esm2015/action-list/action-list.component.js +0 -161
- package/esm2015/action-list/action-list.module.js +0 -19
- package/esm2015/analytics/analytics.module.js +0 -14
- package/esm2015/analytics/analytics.service.js +0 -62
- package/esm2015/async-search-dropdown/async-dropdown.component.js +0 -243
- package/esm2015/async-search-dropdown/async-dropdown.module.js +0 -16
- package/esm2015/button/button.component.js +0 -43
- package/esm2015/button/button.directive.js +0 -57
- package/esm2015/button/button.module.js +0 -17
- package/esm2015/checkbox/checkbox.component.js +0 -79
- package/esm2015/checkbox/checkbox.module.js +0 -17
- package/esm2015/chip/chip.component.js +0 -31
- package/esm2015/chip/chip.module.js +0 -16
- package/esm2015/datepicker_v2/datepicker.module.js +0 -18
- package/esm2015/datepicker_v2/mis-crystal-design-system-datepicker_v2.js +0 -7
- package/esm2015/datepicker_v2/public_api.js +0 -3
- package/esm2015/datepicker_v2/tz-datepicker.directive.js +0 -144
- package/esm2015/datepicker_v2/tz-dp-container/tz-dp-container.component.js +0 -149
- package/esm2015/datepicker_v2/utils/index.js +0 -45
- package/esm2015/daterangepicker_v2/daterangepicker.module.js +0 -18
- package/esm2015/daterangepicker_v2/mis-crystal-design-system-daterangepicker_v2.js +0 -7
- package/esm2015/daterangepicker_v2/public_api.js +0 -3
- package/esm2015/daterangepicker_v2/tz-daterangepicker.directive.js +0 -123
- package/esm2015/daterangepicker_v2/tz-drp-container/tz-drp-container.component.js +0 -226
- package/esm2015/drawer/drawer-body/drawer-body.component.js +0 -41
- package/esm2015/drawer/drawer.module.js +0 -28
- package/esm2015/drawer/drawer.service.js +0 -59
- package/esm2015/drawer/mis-crystal-design-system-drawer.js +0 -6
- package/esm2015/dropdown/calculate-container-height.directive.js +0 -40
- package/esm2015/dropdown/dropdown.component.js +0 -169
- package/esm2015/dropdown/dropdown.module.js +0 -21
- package/esm2015/dropdown/mis-crystal-design-system-dropdown.js +0 -6
- package/esm2015/dynamic-form/dynamic-form.component.js +0 -308
- package/esm2015/dynamic-form/dynamic-form.module.js +0 -34
- package/esm2015/fab/fab.component.js +0 -63
- package/esm2015/fab/fab.module.js +0 -16
- package/esm2015/input/directives/input/input.directive.js +0 -38
- package/esm2015/input/mis-input.component.js +0 -45
- package/esm2015/input/mis-input.module.js +0 -15
- package/esm2015/input-stepper/input-stepper/input-stepper.component.js +0 -49
- package/esm2015/input-stepper/input-stepper.module.js +0 -19
- package/esm2015/loader/loader.component.js +0 -20
- package/esm2015/loader/loader.module.js +0 -16
- package/esm2015/menu/menu-close.directive.js +0 -18
- package/esm2015/menu/menu.directive.js +0 -70
- package/esm2015/menu/menu.module.js +0 -17
- package/esm2015/mobile-filter/mobile-filter.component.js +0 -54
- package/esm2015/mobile-filter/mobile-filter.module.js +0 -15
- package/esm2015/modal/mis-crystal-design-system-modal.js +0 -6
- package/esm2015/modal/modal.module.js +0 -28
- package/esm2015/modal/modal.service.js +0 -72
- package/esm2015/modal/module-wrapper/module-wrapper.component.js +0 -33
- package/esm2015/multi-select-dropdown/multi-select-dropdown.component.js +0 -269
- package/esm2015/multi-select-dropdown/multi-select-dropdown.module.js +0 -20
- package/esm2015/nested-multi-select-dropdown/nested-multi-select-dropdown.component.js +0 -265
- package/esm2015/nested-multi-select-dropdown/nested-multi-select-dropdown.module.js +0 -20
- package/esm2015/phone-input/phone-input.component.js +0 -85
- package/esm2015/phone-input/phone-input.module.js +0 -21
- package/esm2015/radio-button/radio-button.component.js +0 -45
- package/esm2015/radio-button/radio-button.module.js +0 -17
- package/esm2015/ske-loader/ske-loader.component.js +0 -31
- package/esm2015/ske-loader/ske-loader.module.js +0 -13
- package/esm2015/slider/slider.component.js +0 -38
- package/esm2015/slider/slider.module.js +0 -20
- package/esm2015/snackbar/snackbar/snackbar.component.js +0 -22
- package/esm2015/snackbar/snackbar.module.js +0 -31
- package/esm2015/snackbar/snackbar.service.js +0 -48
- package/esm2015/specificdatepicker/mis-crystal-design-system-specificdatepicker.js +0 -7
- package/esm2015/specificdatepicker/public_api.js +0 -3
- package/esm2015/specificdatepicker/specificdatepicker.module.js +0 -20
- package/esm2015/specificdatepicker/tz-sdp-container/tz-sdp-container.component.js +0 -356
- package/esm2015/specificdatepicker/tz-specificdatepicker.directive.js +0 -179
- package/esm2015/specificdatepicker/utils/index.js +0 -45
- package/esm2015/star-rating/star-rating.component.js +0 -78
- package/esm2015/star-rating/star-rating.module.js +0 -13
- package/esm2015/switch/switch.component.js +0 -39
- package/esm2015/switch/switch.module.js +0 -17
- package/esm2015/table/custom-table-cell.directive.js +0 -42
- package/esm2015/table/filter/filter.component.js +0 -75
- package/esm2015/table/mis-crystal-design-system-table.js +0 -6
- package/esm2015/table/public_api.js +0 -5
- package/esm2015/table/sub-table/sub-table.component.js +0 -69
- package/esm2015/table/table.component.js +0 -200
- package/esm2015/table/table.module.js +0 -21
- package/esm2015/timepicker/mis-crystal-design-system-timepicker.js +0 -6
- package/esm2015/timepicker/timepicker.component.js +0 -248
- package/esm2015/timepicker/timepicker.directive.js +0 -62
- package/esm2015/timepicker/timepicker.module.js +0 -20
- package/esm2015/timerangepicker/timerangepicker.component.js +0 -194
- package/esm2015/timerangepicker/timerangepicker.module.js +0 -18
- package/esm2015/toast/toast.component.js +0 -28
- package/esm2015/toast/toast.data.service.js +0 -29
- package/esm2015/toast/toast.module.js +0 -28
- package/esm2015/toast/toast.service.js +0 -96
- package/esm2015/tooltip/tooltip-container/tooltip.component.js +0 -35
- package/esm2015/tooltip/tooltip.directive.js +0 -128
- package/esm2015/tooltip/tooltip.module.js +0 -19
- package/esm2015/virtual-scroll/virtual-scroll.component.js +0 -111
- package/esm2015/virtual-scroll/virtual-scroll.module.js +0 -24
- package/esm2015/widgets/classes/async-widget.js +0 -23
- package/esm2015/widgets/classes/base-widget.js +0 -32
- package/esm2015/widgets/classes/sync-widget.js +0 -20
- package/esm2015/widgets/classes/widget-group.js +0 -32
- package/esm2015/widgets/services/widget.service.js +0 -16
- package/esm2015/widgets/widgets.module.js +0 -12
- package/fab/mis-crystal-design-system-fab.d.ts +0 -4
- package/fab/mis-crystal-design-system-fab.metadata.json +0 -1
- package/fab/package.json +0 -11
- package/fesm2015/mis-crystal-design-system-action-list.js +0 -184
- package/fesm2015/mis-crystal-design-system-action-list.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-analytics.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-async-search-dropdown.js +0 -262
- package/fesm2015/mis-crystal-design-system-async-search-dropdown.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-button.js +0 -120
- package/fesm2015/mis-crystal-design-system-button.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-checkbox.js +0 -100
- package/fesm2015/mis-crystal-design-system-checkbox.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-chip.js +0 -52
- package/fesm2015/mis-crystal-design-system-chip.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-datepicker_v2.js +0 -357
- package/fesm2015/mis-crystal-design-system-datepicker_v2.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-daterangepicker_v2.js +0 -413
- package/fesm2015/mis-crystal-design-system-daterangepicker_v2.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-drawer.js +0 -153
- package/fesm2015/mis-crystal-design-system-drawer.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-dropdown.js +0 -232
- package/fesm2015/mis-crystal-design-system-dropdown.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-dynamic-form.js +0 -346
- package/fesm2015/mis-crystal-design-system-dynamic-form.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-fab.js +0 -84
- package/fesm2015/mis-crystal-design-system-fab.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-input-stepper.js +0 -73
- package/fesm2015/mis-crystal-design-system-input-stepper.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-input.js +0 -99
- package/fesm2015/mis-crystal-design-system-input.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-loader.js +0 -41
- package/fesm2015/mis-crystal-design-system-loader.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-menu.js +0 -106
- package/fesm2015/mis-crystal-design-system-menu.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-mobile-filter.js +0 -74
- package/fesm2015/mis-crystal-design-system-mobile-filter.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-modal.js +0 -147
- package/fesm2015/mis-crystal-design-system-modal.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-multi-select-dropdown.js +0 -293
- package/fesm2015/mis-crystal-design-system-multi-select-dropdown.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-nested-multi-select-dropdown.js +0 -289
- package/fesm2015/mis-crystal-design-system-nested-multi-select-dropdown.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-phone-input.js +0 -109
- package/fesm2015/mis-crystal-design-system-phone-input.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-radio-button.js +0 -66
- package/fesm2015/mis-crystal-design-system-radio-button.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-ske-loader.js +0 -49
- package/fesm2015/mis-crystal-design-system-ske-loader.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-slider.js +0 -62
- package/fesm2015/mis-crystal-design-system-slider.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-snackbar.js +0 -101
- package/fesm2015/mis-crystal-design-system-snackbar.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-specificdatepicker.js +0 -599
- package/fesm2015/mis-crystal-design-system-specificdatepicker.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-star-rating.js +0 -96
- package/fesm2015/mis-crystal-design-system-star-rating.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-styles.js +0 -4
- package/fesm2015/mis-crystal-design-system-styles.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-switch.js +0 -60
- package/fesm2015/mis-crystal-design-system-switch.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-table.js +0 -406
- package/fesm2015/mis-crystal-design-system-table.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-timepicker.js +0 -330
- package/fesm2015/mis-crystal-design-system-timepicker.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-timerangepicker.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-toast.js +0 -174
- package/fesm2015/mis-crystal-design-system-toast.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-tooltip.js +0 -183
- package/fesm2015/mis-crystal-design-system-tooltip.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-utils.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-virtual-scroll.js +0 -141
- package/fesm2015/mis-crystal-design-system-virtual-scroll.js.map +0 -1
- package/fesm2015/mis-crystal-design-system-widgets.js.map +0 -1
- package/fesm2015/mis-crystal-design-system.js.map +0 -1
- package/input/mis-crystal-design-system-input.d.ts +0 -4
- package/input/mis-crystal-design-system-input.metadata.json +0 -1
- package/input/package.json +0 -11
- package/input-stepper/mis-crystal-design-system-input-stepper.d.ts +0 -4
- package/input-stepper/mis-crystal-design-system-input-stepper.metadata.json +0 -1
- package/input-stepper/package.json +0 -11
- package/loader/mis-crystal-design-system-loader.d.ts +0 -4
- package/loader/mis-crystal-design-system-loader.metadata.json +0 -1
- package/loader/package.json +0 -11
- package/menu/mis-crystal-design-system-menu.d.ts +0 -4
- package/menu/mis-crystal-design-system-menu.metadata.json +0 -1
- package/menu/package.json +0 -11
- package/mis-crystal-design-system.d.ts +0 -4
- package/mis-crystal-design-system.metadata.json +0 -1
- package/mobile-filter/mis-crystal-design-system-mobile-filter.d.ts +0 -4
- package/mobile-filter/mis-crystal-design-system-mobile-filter.metadata.json +0 -1
- package/mobile-filter/package.json +0 -11
- package/modal/mis-crystal-design-system-modal.d.ts +0 -5
- package/modal/mis-crystal-design-system-modal.metadata.json +0 -1
- package/modal/package.json +0 -11
- package/multi-select-dropdown/mis-crystal-design-system-multi-select-dropdown.d.ts +0 -4
- package/multi-select-dropdown/mis-crystal-design-system-multi-select-dropdown.metadata.json +0 -1
- package/multi-select-dropdown/package.json +0 -11
- package/nested-multi-select-dropdown/mis-crystal-design-system-nested-multi-select-dropdown.d.ts +0 -4
- package/nested-multi-select-dropdown/mis-crystal-design-system-nested-multi-select-dropdown.metadata.json +0 -1
- package/nested-multi-select-dropdown/package.json +0 -11
- package/phone-input/mis-crystal-design-system-phone-input.d.ts +0 -4
- package/phone-input/mis-crystal-design-system-phone-input.metadata.json +0 -1
- package/phone-input/package.json +0 -11
- package/radio-button/mis-crystal-design-system-radio-button.d.ts +0 -4
- package/radio-button/mis-crystal-design-system-radio-button.metadata.json +0 -1
- package/radio-button/package.json +0 -11
- package/ske-loader/mis-crystal-design-system-ske-loader.d.ts +0 -4
- package/ske-loader/mis-crystal-design-system-ske-loader.metadata.json +0 -1
- package/ske-loader/package.json +0 -11
- package/slider/mis-crystal-design-system-slider.d.ts +0 -4
- package/slider/mis-crystal-design-system-slider.metadata.json +0 -1
- package/slider/package.json +0 -11
- package/snackbar/mis-crystal-design-system-snackbar.d.ts +0 -4
- package/snackbar/mis-crystal-design-system-snackbar.metadata.json +0 -1
- package/snackbar/package.json +0 -11
- package/specificdatepicker/mis-crystal-design-system-specificdatepicker.d.ts +0 -7
- package/specificdatepicker/mis-crystal-design-system-specificdatepicker.metadata.json +0 -1
- package/specificdatepicker/package.json +0 -11
- package/star-rating/mis-crystal-design-system-star-rating.d.ts +0 -4
- package/star-rating/mis-crystal-design-system-star-rating.metadata.json +0 -1
- package/star-rating/package.json +0 -11
- package/styles/mis-crystal-design-system-styles.d.ts +0 -4
- package/styles/mis-crystal-design-system-styles.metadata.json +0 -1
- package/styles/package.json +0 -11
- package/switch/mis-crystal-design-system-switch.d.ts +0 -4
- package/switch/mis-crystal-design-system-switch.metadata.json +0 -1
- package/switch/package.json +0 -11
- package/table/mis-crystal-design-system-table.d.ts +0 -5
- package/table/mis-crystal-design-system-table.metadata.json +0 -1
- package/table/package.json +0 -11
- package/timepicker/mis-crystal-design-system-timepicker.d.ts +0 -5
- package/timepicker/mis-crystal-design-system-timepicker.metadata.json +0 -1
- package/timepicker/package.json +0 -11
- package/timerangepicker/mis-crystal-design-system-timerangepicker.d.ts +0 -4
- package/timerangepicker/mis-crystal-design-system-timerangepicker.metadata.json +0 -1
- package/timerangepicker/package.json +0 -11
- package/toast/mis-crystal-design-system-toast.d.ts +0 -4
- package/toast/mis-crystal-design-system-toast.metadata.json +0 -1
- package/toast/package.json +0 -11
- package/tooltip/mis-crystal-design-system-tooltip.d.ts +0 -4
- package/tooltip/mis-crystal-design-system-tooltip.metadata.json +0 -1
- package/tooltip/package.json +0 -11
- package/utils/mis-crystal-design-system-utils.d.ts +0 -4
- package/utils/mis-crystal-design-system-utils.metadata.json +0 -1
- package/utils/package.json +0 -11
- package/virtual-scroll/mis-crystal-design-system-virtual-scroll.d.ts +0 -4
- package/virtual-scroll/mis-crystal-design-system-virtual-scroll.metadata.json +0 -1
- package/virtual-scroll/package.json +0 -11
- package/widgets/mis-crystal-design-system-widgets.d.ts +0 -4
- package/widgets/mis-crystal-design-system-widgets.metadata.json +0 -1
- package/widgets/package.json +0 -11
- /package/{esm2015/action-list/index.js → esm2022/action-list/index.mjs} +0 -0
- /package/{esm2015/action-list/mis-crystal-design-system-action-list.js → esm2022/action-list/mis-crystal-design-system-action-list.mjs} +0 -0
- /package/{esm2015/action-list/public_api.js → esm2022/action-list/public_api.mjs} +0 -0
- /package/{esm2015/analytics/index.js → esm2022/analytics/index.mjs} +0 -0
- /package/{esm2015/analytics/mis-crystal-design-system-analytics.js → esm2022/analytics/mis-crystal-design-system-analytics.mjs} +0 -0
- /package/{esm2015/analytics/public_api.js → esm2022/analytics/public_api.mjs} +0 -0
- /package/{esm2015/async-search-dropdown/index.js → esm2022/async-search-dropdown/index.mjs} +0 -0
- /package/{esm2015/async-search-dropdown/mis-crystal-design-system-async-search-dropdown.js → esm2022/async-search-dropdown/mis-crystal-design-system-async-search-dropdown.mjs} +0 -0
- /package/{esm2015/async-search-dropdown/public_api.js → esm2022/async-search-dropdown/public_api.mjs} +0 -0
- /package/{esm2015/button/index.js → esm2022/button/index.mjs} +0 -0
- /package/{esm2015/button/mis-crystal-design-system-button.js → esm2022/button/mis-crystal-design-system-button.mjs} +0 -0
- /package/{esm2015/button/public_api.js → esm2022/button/public_api.mjs} +0 -0
- /package/{esm2015/checkbox/index.js → esm2022/checkbox/index.mjs} +0 -0
- /package/{esm2015/checkbox/mis-crystal-design-system-checkbox.js → esm2022/checkbox/mis-crystal-design-system-checkbox.mjs} +0 -0
- /package/{esm2015/checkbox/public_api.js → esm2022/checkbox/public_api.mjs} +0 -0
- /package/{esm2015/chip/index.js → esm2022/chip/index.mjs} +0 -0
- /package/{esm2015/chip/mis-crystal-design-system-chip.js → esm2022/chip/mis-crystal-design-system-chip.mjs} +0 -0
- /package/{esm2015/chip/public_api.js → esm2022/chip/public_api.mjs} +0 -0
- /package/{esm2015/datepicker_v2/datepicker-constants.js → esm2022/datepicker_v2/datepicker-constants.mjs} +0 -0
- /package/{esm2015/datepicker_v2/index.js → esm2022/datepicker_v2/index.mjs} +0 -0
- /package/{esm2015/datepicker_v2/models/dp-config.model.js → esm2022/datepicker_v2/models/dp-config.model.mjs} +0 -0
- /package/{esm2015/daterangepicker_v2/daterangepicker-constants.js → esm2022/daterangepicker_v2/daterangepicker-constants.mjs} +0 -0
- /package/{esm2015/daterangepicker_v2/index.js → esm2022/daterangepicker_v2/index.mjs} +0 -0
- /package/{esm2015/daterangepicker_v2/models/drp-config.model.js → esm2022/daterangepicker_v2/models/drp-config.model.mjs} +0 -0
- /package/{esm2015/drawer/drawer-constants.js → esm2022/drawer/drawer-constants.mjs} +0 -0
- /package/{esm2015/drawer/index.js → esm2022/drawer/index.mjs} +0 -0
- /package/{esm2015/drawer/public_api.js → esm2022/drawer/public_api.mjs} +0 -0
- /package/{esm2015/dropdown/index.js → esm2022/dropdown/index.mjs} +0 -0
- /package/{esm2015/dropdown/public_api.js → esm2022/dropdown/public_api.mjs} +0 -0
- /package/{esm2015/dynamic-form/dynamic-form.namespace.js → esm2022/dynamic-form/dynamic-form.namespace.mjs} +0 -0
- /package/{esm2015/dynamic-form/index.js → esm2022/dynamic-form/index.mjs} +0 -0
- /package/{esm2015/dynamic-form/mis-crystal-design-system-dynamic-form.js → esm2022/dynamic-form/mis-crystal-design-system-dynamic-form.mjs} +0 -0
- /package/{esm2015/dynamic-form/public_api.js → esm2022/dynamic-form/public_api.mjs} +0 -0
- /package/{esm2015/fab/index.js → esm2022/fab/index.mjs} +0 -0
- /package/{esm2015/fab/mis-crystal-design-system-fab.js → esm2022/fab/mis-crystal-design-system-fab.mjs} +0 -0
- /package/{esm2015/fab/public_api.js → esm2022/fab/public_api.mjs} +0 -0
- /package/{esm2015/index.js → esm2022/index.mjs} +0 -0
- /package/{esm2015/input/index.js → esm2022/input/index.mjs} +0 -0
- /package/{esm2015/input/mis-crystal-design-system-input.js → esm2022/input/mis-crystal-design-system-input.mjs} +0 -0
- /package/{esm2015/input/public_api.js → esm2022/input/public_api.mjs} +0 -0
- /package/{esm2015/input-stepper/index.js → esm2022/input-stepper/index.mjs} +0 -0
- /package/{esm2015/input-stepper/mis-crystal-design-system-input-stepper.js → esm2022/input-stepper/mis-crystal-design-system-input-stepper.mjs} +0 -0
- /package/{esm2015/input-stepper/public_api.js → esm2022/input-stepper/public_api.mjs} +0 -0
- /package/{esm2015/loader/index.js → esm2022/loader/index.mjs} +0 -0
- /package/{esm2015/loader/mis-crystal-design-system-loader.js → esm2022/loader/mis-crystal-design-system-loader.mjs} +0 -0
- /package/{esm2015/loader/public_api.js → esm2022/loader/public_api.mjs} +0 -0
- /package/{esm2015/menu/index.js → esm2022/menu/index.mjs} +0 -0
- /package/{esm2015/menu/mis-crystal-design-system-menu.js → esm2022/menu/mis-crystal-design-system-menu.mjs} +0 -0
- /package/{esm2015/menu/public_api.js → esm2022/menu/public_api.mjs} +0 -0
- /package/{esm2015/mis-crystal-design-system.js → esm2022/mis-crystal-design-system.mjs} +0 -0
- /package/{esm2015/mobile-filter/index.js → esm2022/mobile-filter/index.mjs} +0 -0
- /package/{esm2015/mobile-filter/mis-crystal-design-system-mobile-filter.js → esm2022/mobile-filter/mis-crystal-design-system-mobile-filter.mjs} +0 -0
- /package/{esm2015/mobile-filter/public_api.js → esm2022/mobile-filter/public_api.mjs} +0 -0
- /package/{esm2015/modal/index.js → esm2022/modal/index.mjs} +0 -0
- /package/{esm2015/modal/modal-constants.js → esm2022/modal/modal-constants.mjs} +0 -0
- /package/{esm2015/modal/modal-ref.js → esm2022/modal/modal-ref.mjs} +0 -0
- /package/{esm2015/modal/public_api.js → esm2022/modal/public_api.mjs} +0 -0
- /package/{esm2015/multi-select-dropdown/index.js → esm2022/multi-select-dropdown/index.mjs} +0 -0
- /package/{esm2015/multi-select-dropdown/mis-crystal-design-system-multi-select-dropdown.js → esm2022/multi-select-dropdown/mis-crystal-design-system-multi-select-dropdown.mjs} +0 -0
- /package/{esm2015/multi-select-dropdown/public_api.js → esm2022/multi-select-dropdown/public_api.mjs} +0 -0
- /package/{esm2015/nested-multi-select-dropdown/index.js → esm2022/nested-multi-select-dropdown/index.mjs} +0 -0
- /package/{esm2015/nested-multi-select-dropdown/mis-crystal-design-system-nested-multi-select-dropdown.js → esm2022/nested-multi-select-dropdown/mis-crystal-design-system-nested-multi-select-dropdown.mjs} +0 -0
- /package/{esm2015/nested-multi-select-dropdown/public_api.js → esm2022/nested-multi-select-dropdown/public_api.mjs} +0 -0
- /package/{esm2015/phone-input/index.js → esm2022/phone-input/index.mjs} +0 -0
- /package/{esm2015/phone-input/mis-crystal-design-system-phone-input.js → esm2022/phone-input/mis-crystal-design-system-phone-input.mjs} +0 -0
- /package/{esm2015/phone-input/public_api.js → esm2022/phone-input/public_api.mjs} +0 -0
- /package/{esm2015/public-api.js → esm2022/public-api.mjs} +0 -0
- /package/{esm2015/radio-button/index.js → esm2022/radio-button/index.mjs} +0 -0
- /package/{esm2015/radio-button/mis-crystal-design-system-radio-button.js → esm2022/radio-button/mis-crystal-design-system-radio-button.mjs} +0 -0
- /package/{esm2015/radio-button/public_api.js → esm2022/radio-button/public_api.mjs} +0 -0
- /package/{esm2015/ske-loader/index.js → esm2022/ske-loader/index.mjs} +0 -0
- /package/{esm2015/ske-loader/mis-crystal-design-system-ske-loader.js → esm2022/ske-loader/mis-crystal-design-system-ske-loader.mjs} +0 -0
- /package/{esm2015/ske-loader/public_api.js → esm2022/ske-loader/public_api.mjs} +0 -0
- /package/{esm2015/slider/index.js → esm2022/slider/index.mjs} +0 -0
- /package/{esm2015/slider/mis-crystal-design-system-slider.js → esm2022/slider/mis-crystal-design-system-slider.mjs} +0 -0
- /package/{esm2015/slider/public_api.js → esm2022/slider/public_api.mjs} +0 -0
- /package/{esm2015/snackbar/index.js → esm2022/snackbar/index.mjs} +0 -0
- /package/{esm2015/snackbar/mis-crystal-design-system-snackbar.js → esm2022/snackbar/mis-crystal-design-system-snackbar.mjs} +0 -0
- /package/{esm2015/snackbar/public_api.js → esm2022/snackbar/public_api.mjs} +0 -0
- /package/{esm2015/specificdatepicker/daterangepicker-constants.js → esm2022/specificdatepicker/daterangepicker-constants.mjs} +0 -0
- /package/{esm2015/specificdatepicker/index.js → esm2022/specificdatepicker/index.mjs} +0 -0
- /package/{esm2015/specificdatepicker/models/sdp-config.model.js → esm2022/specificdatepicker/models/sdp-config.model.mjs} +0 -0
- /package/{esm2015/star-rating/index.js → esm2022/star-rating/index.mjs} +0 -0
- /package/{esm2015/star-rating/mis-crystal-design-system-star-rating.js → esm2022/star-rating/mis-crystal-design-system-star-rating.mjs} +0 -0
- /package/{esm2015/star-rating/public_api.js → esm2022/star-rating/public_api.mjs} +0 -0
- /package/{esm2015/styles/index.js → esm2022/styles/index.mjs} +0 -0
- /package/{esm2015/styles/mis-crystal-design-system-styles.js → esm2022/styles/mis-crystal-design-system-styles.mjs} +0 -0
- /package/{esm2015/styles/public_api.js → esm2022/styles/public_api.mjs} +0 -0
- /package/{esm2015/switch/index.js → esm2022/switch/index.mjs} +0 -0
- /package/{esm2015/switch/mis-crystal-design-system-switch.js → esm2022/switch/mis-crystal-design-system-switch.mjs} +0 -0
- /package/{esm2015/switch/public_api.js → esm2022/switch/public_api.mjs} +0 -0
- /package/{esm2015/table/index.js → esm2022/table/index.mjs} +0 -0
- /package/{esm2015/timepicker/index.js → esm2022/timepicker/index.mjs} +0 -0
- /package/{esm2015/timepicker/public_api.js → esm2022/timepicker/public_api.mjs} +0 -0
- /package/{esm2015/timepicker/time.namespace.js → esm2022/timepicker/time.namespace.mjs} +0 -0
- /package/{esm2015/timerangepicker/index.js → esm2022/timerangepicker/index.mjs} +0 -0
- /package/{esm2015/timerangepicker/mis-crystal-design-system-timerangepicker.js → esm2022/timerangepicker/mis-crystal-design-system-timerangepicker.mjs} +0 -0
- /package/{esm2015/timerangepicker/public_api.js → esm2022/timerangepicker/public_api.mjs} +0 -0
- /package/{esm2015/timerangepicker/timerange.namespace.js → esm2022/timerangepicker/timerange.namespace.mjs} +0 -0
- /package/{esm2015/toast/index.js → esm2022/toast/index.mjs} +0 -0
- /package/{esm2015/toast/mis-crystal-design-system-toast.js → esm2022/toast/mis-crystal-design-system-toast.mjs} +0 -0
- /package/{esm2015/toast/public_api.js → esm2022/toast/public_api.mjs} +0 -0
- /package/{esm2015/tooltip/index.js → esm2022/tooltip/index.mjs} +0 -0
- /package/{esm2015/tooltip/mis-crystal-design-system-tooltip.js → esm2022/tooltip/mis-crystal-design-system-tooltip.mjs} +0 -0
- /package/{esm2015/tooltip/models/tooltip.model.js → esm2022/tooltip/models/tooltip.model.mjs} +0 -0
- /package/{esm2015/tooltip/public_api.js → esm2022/tooltip/public_api.mjs} +0 -0
- /package/{esm2015/utils/index.js → esm2022/utils/index.mjs} +0 -0
- /package/{esm2015/utils/mis-crystal-design-system-utils.js → esm2022/utils/mis-crystal-design-system-utils.mjs} +0 -0
- /package/{esm2015/virtual-scroll/index.js → esm2022/virtual-scroll/index.mjs} +0 -0
- /package/{esm2015/virtual-scroll/mis-crystal-design-system-virtual-scroll.js → esm2022/virtual-scroll/mis-crystal-design-system-virtual-scroll.mjs} +0 -0
- /package/{esm2015/virtual-scroll/public_api.js → esm2022/virtual-scroll/public_api.mjs} +0 -0
- /package/{esm2015/virtual-scroll/virtual-scroll.constants.js → esm2022/virtual-scroll/virtual-scroll.constants.mjs} +0 -0
- /package/{esm2015/widgets/index.js → esm2022/widgets/index.mjs} +0 -0
- /package/{esm2015/widgets/interfaces/widgets.model.js → esm2022/widgets/interfaces/widgets.model.mjs} +0 -0
- /package/{esm2015/widgets/mis-crystal-design-system-widgets.js → esm2022/widgets/mis-crystal-design-system-widgets.mjs} +0 -0
- /package/{esm2015/widgets/public_api.js → esm2022/widgets/public_api.mjs} +0 -0
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { FormArray, FormGroup, Validators, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
3
|
-
import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
|
|
4
|
-
import { OverlayModule } from '@angular/cdk/overlay';
|
|
5
|
-
import { ScrollingModule } from '@angular/cdk-experimental/scrolling';
|
|
6
|
-
import { DropdownModule } from 'mis-crystal-design-system/dropdown';
|
|
7
|
-
import * as moment from 'moment';
|
|
8
|
-
import { tz } from 'moment';
|
|
9
|
-
import 'moment-timezone';
|
|
10
|
-
import { SwitchModule } from 'mis-crystal-design-system/switch';
|
|
11
|
-
import { MultiSelectDropdownModule } from 'mis-crystal-design-system/multi-select-dropdown';
|
|
12
|
-
import { DatepickerModuleV2 } from 'mis-crystal-design-system/datepicker_v2';
|
|
13
|
-
|
|
14
|
-
class DynamicFormComponent {
|
|
15
|
-
constructor() {
|
|
16
|
-
/**
|
|
17
|
-
* formFields: Dynamic fields recieved from the API metadata to build a dynamic form
|
|
18
|
-
* formValues: Holds the value of the dynamic form with "key" being dynamic field "title"
|
|
19
|
-
* and value being the user input.
|
|
20
|
-
*/
|
|
21
|
-
this.formFields = [];
|
|
22
|
-
this.formValues = {};
|
|
23
|
-
// Need to deprecate these inputs and use constants.
|
|
24
|
-
this.activeBtnIconUrl = "";
|
|
25
|
-
this.calendarIconUrl = "";
|
|
26
|
-
/**
|
|
27
|
-
* formUpdated: Emits formValues Object whenever there is a change in the dynamic form.
|
|
28
|
-
*/
|
|
29
|
-
this.formUpdated = new EventEmitter();
|
|
30
|
-
/**
|
|
31
|
-
* formValid: Emits boolean depending on validity of the form
|
|
32
|
-
*/
|
|
33
|
-
this.formValid = new EventEmitter();
|
|
34
|
-
/**
|
|
35
|
-
* formInitialized: Emits dynamic form API on form initilization
|
|
36
|
-
*/
|
|
37
|
-
this.formInitialized = new EventEmitter();
|
|
38
|
-
}
|
|
39
|
-
ngOnInit() {
|
|
40
|
-
// Building the form
|
|
41
|
-
this.dynamicForm = this.generateDynamicForm(this.formFields, this.formValues);
|
|
42
|
-
// Subscribing to form changes and emiting values.
|
|
43
|
-
this.valueChangesSubscription$ = this.dynamicForm.valueChanges.subscribe(formValue => {
|
|
44
|
-
this.onFormValueChanges();
|
|
45
|
-
});
|
|
46
|
-
//api to expose functions
|
|
47
|
-
this.dynamicFormAPI = {
|
|
48
|
-
defaultFormValues: () => {
|
|
49
|
-
return this.generateDynamicFieldsValueObject(this.dynamicForm.value.dynamicFields);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
this.formInitialized.emit(this.dynamicFormAPI);
|
|
53
|
-
this.formValid.emit(this.dynamicForm.valid);
|
|
54
|
-
}
|
|
55
|
-
ngOnDestroy() {
|
|
56
|
-
var _a;
|
|
57
|
-
(_a = this.valueChangesSubscription$) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
58
|
-
}
|
|
59
|
-
onFormValueChanges() {
|
|
60
|
-
let formValues = this.generateDynamicFieldsValueObject(this.dynamicForm.value.dynamicFields);
|
|
61
|
-
this.formValid.emit(this.dynamicForm.valid);
|
|
62
|
-
this.formUpdated.emit(formValues);
|
|
63
|
-
console.log(formValues);
|
|
64
|
-
}
|
|
65
|
-
generateDynamicFieldsValueObject(formValues) {
|
|
66
|
-
let dynamicFieldsValue = {};
|
|
67
|
-
formValues.forEach((fieldValue, index) => {
|
|
68
|
-
var _a;
|
|
69
|
-
let formattedValue = this.mapFormFieldToFormValue(this.formFields[index], fieldValue.value);
|
|
70
|
-
if (((_a = fieldValue.subFields) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
71
|
-
let formattedSubFieldsValues = {};
|
|
72
|
-
fieldValue.subFields.forEach((subFieldValue, subIndex) => {
|
|
73
|
-
let subFormField = this.formFields[index].subFields[subIndex];
|
|
74
|
-
formattedSubFieldsValues[subFormField.configName] = this.mapFormFieldToFormValue(subFormField, subFieldValue);
|
|
75
|
-
});
|
|
76
|
-
dynamicFieldsValue[this.formFields[index].configName] = {
|
|
77
|
-
value: formattedValue,
|
|
78
|
-
subFields: formattedSubFieldsValues
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
dynamicFieldsValue[this.formFields[index].configName] = formattedValue;
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
return dynamicFieldsValue;
|
|
86
|
-
}
|
|
87
|
-
generateDynamicForm(formFields, formValues) {
|
|
88
|
-
var _a;
|
|
89
|
-
let formArray = new FormArray([]);
|
|
90
|
-
for (let field of formFields) {
|
|
91
|
-
let fieldValue = ((_a = formValues[field.configName]) === null || _a === void 0 ? void 0 : _a.value) ? formValues[field.configName].value : formValues[field.configName];
|
|
92
|
-
let fieldControl = this.mapFormValueToFormField(field, fieldValue);
|
|
93
|
-
let subFieldsControls = this.generateSubDynamicFields(formValues, field, fieldControl.value);
|
|
94
|
-
formArray.push(new FormGroup({
|
|
95
|
-
value: fieldControl,
|
|
96
|
-
subFields: subFieldsControls
|
|
97
|
-
}));
|
|
98
|
-
}
|
|
99
|
-
return new FormGroup({
|
|
100
|
-
dynamicFields: formArray
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
getDynamicFieldsControls() {
|
|
104
|
-
return this.dynamicForm.get("dynamicFields");
|
|
105
|
-
}
|
|
106
|
-
updateSubDynamicFields(field, formGroup, value) {
|
|
107
|
-
var _a;
|
|
108
|
-
if (((_a = field.subFields) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
109
|
-
let subFieldsControls = this.generateSubDynamicFields(this.formValues, field, value);
|
|
110
|
-
formGroup.removeControl('subFields');
|
|
111
|
-
formGroup.addControl('subFields', subFieldsControls);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
updateSelectedValueForSingleSelect(field, control, formGroup, value) {
|
|
115
|
-
var _a;
|
|
116
|
-
if (((_a = control.value) === null || _a === void 0 ? void 0 : _a.value) !== value.value) {
|
|
117
|
-
control.setValue(value);
|
|
118
|
-
}
|
|
119
|
-
else
|
|
120
|
-
control.setValue('');
|
|
121
|
-
this.updateSubDynamicFields(field, formGroup, value);
|
|
122
|
-
control.markAsTouched();
|
|
123
|
-
}
|
|
124
|
-
updateSelectedValueForMultiSelect(field, control, formGroup, values) {
|
|
125
|
-
let selectedValues = control.value;
|
|
126
|
-
for (let value of values) {
|
|
127
|
-
let itemIndex = selectedValues.findIndex(item => item.label === value.label);
|
|
128
|
-
if (itemIndex > -1) {
|
|
129
|
-
selectedValues.splice(itemIndex, 1);
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
selectedValues.push(Object.assign({}, value));
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
control.setValue(selectedValues);
|
|
136
|
-
this.updateSubDynamicFields(field, formGroup, values);
|
|
137
|
-
control.markAsTouched();
|
|
138
|
-
}
|
|
139
|
-
isCheckBoxSelected(value, selectedValues) {
|
|
140
|
-
return selectedValues.findIndex(item => item.label === value) > -1;
|
|
141
|
-
}
|
|
142
|
-
findSelectedIndex(subfields, value) {
|
|
143
|
-
const selectedIndex = subfields.findIndex(item => item.parentConfigValue === value);
|
|
144
|
-
return selectedIndex !== -1 ? selectedIndex : 0;
|
|
145
|
-
}
|
|
146
|
-
matchParentConfig(subfields, value) {
|
|
147
|
-
if (!subfields || subfields.length === 0) {
|
|
148
|
-
return false;
|
|
149
|
-
}
|
|
150
|
-
return subfields.some(item => item.parentConfigValue === value);
|
|
151
|
-
}
|
|
152
|
-
generateSubDynamicFields(formValues, parentField, parentValue) {
|
|
153
|
-
var _a;
|
|
154
|
-
let controls = new FormArray([]);
|
|
155
|
-
let subFields = parentField.subFields;
|
|
156
|
-
let subFieldsValues = ((_a = formValues[parentField.configName]) === null || _a === void 0 ? void 0 : _a.subFields) ? formValues[parentField.configName].subFields : {};
|
|
157
|
-
if (!subFields)
|
|
158
|
-
return controls;
|
|
159
|
-
if (parentField.fieldType === 'singleSelect') {
|
|
160
|
-
subFields = subFields.filter((subField) => { var _a; return subField.parentConfigValue === ((_a = parentValue) === null || _a === void 0 ? void 0 : _a.value); });
|
|
161
|
-
}
|
|
162
|
-
else if (parentField.fieldType === 'multiSelect') {
|
|
163
|
-
let parentValues = new Set(parentValue.map((value) => value.value));
|
|
164
|
-
subFields = subFields.filter((subField) => parentValues.has(subField.parentConfigValue));
|
|
165
|
-
}
|
|
166
|
-
if ((subFields === null || subFields === void 0 ? void 0 : subFields.length) > 0) {
|
|
167
|
-
for (let subField of subFields) {
|
|
168
|
-
controls.push(this.mapFormValueToFormField(subField, subFieldsValues[subField.configName]));
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return controls;
|
|
172
|
-
}
|
|
173
|
-
mapFormValueToFormField(formField, formValue) {
|
|
174
|
-
let validators = formField.validators ? [dynamicFieldValidator(formField.validators)] : [];
|
|
175
|
-
let control = new FormControl(null, validators);
|
|
176
|
-
if (formField.fieldType === "input") {
|
|
177
|
-
if (formField.fieldInputType === "text" || formField.fieldInputType === "textarea")
|
|
178
|
-
control.setValue(formValue ? formValue : "");
|
|
179
|
-
else if (formField.fieldInputType === "number")
|
|
180
|
-
control.setValue(formValue ? formValue : 0);
|
|
181
|
-
else if (formField.fieldInputType === "date") {
|
|
182
|
-
if (formValue && typeof formValue === "number") {
|
|
183
|
-
control.setValue(moment(formValue).tz(formField.fieldConfig.timezone).format(formField.fieldConfig.format));
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
control.setValue(moment().tz(formField.fieldConfig.timezone).format(formField.fieldConfig.format));
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
else if (formField.fieldType === "singleSelect") {
|
|
191
|
-
const findSelectedValue = () => {
|
|
192
|
-
let index = formField.itemsList.findIndex(item => item.value === formValue);
|
|
193
|
-
return index >= 0 ? formField.itemsList[index] : "";
|
|
194
|
-
};
|
|
195
|
-
if (formField.fieldInputType === "dropdown") {
|
|
196
|
-
if (!formValue)
|
|
197
|
-
control.setValue(formField.itemsList[0]);
|
|
198
|
-
else
|
|
199
|
-
control.setValue(findSelectedValue());
|
|
200
|
-
}
|
|
201
|
-
else if (formField.fieldInputType === "radio") {
|
|
202
|
-
control.setValue(findSelectedValue());
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
else if (formField.fieldType === "multiSelect") {
|
|
206
|
-
if (formValue && Array.isArray(formValue)) {
|
|
207
|
-
let selectedValues = [];
|
|
208
|
-
for (let value of formValue) {
|
|
209
|
-
let index = formField.itemsList.findIndex(item => item.value === value);
|
|
210
|
-
if (index > -1)
|
|
211
|
-
selectedValues.push(Object.assign({}, formField.itemsList[index]));
|
|
212
|
-
}
|
|
213
|
-
control.setValue(selectedValues);
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
control.setValue([]);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
else if (formField.fieldType === "boolean") {
|
|
220
|
-
control.setValue(!!formValue);
|
|
221
|
-
}
|
|
222
|
-
else
|
|
223
|
-
control.setValue(null);
|
|
224
|
-
return control;
|
|
225
|
-
}
|
|
226
|
-
mapFormFieldToFormValue(formField, formValue) {
|
|
227
|
-
var _a;
|
|
228
|
-
if (formField.fieldType === "input") {
|
|
229
|
-
if (formField.fieldInputType === "text" || formField.fieldInputType === "textarea")
|
|
230
|
-
return formValue;
|
|
231
|
-
else if (formField.fieldInputType === "number")
|
|
232
|
-
return +formValue;
|
|
233
|
-
else if (formField.fieldInputType === "date") {
|
|
234
|
-
return tz(formValue, formField.fieldConfig.format, formField.fieldConfig.timezone).valueOf();
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
else if (formField.fieldType === "singleSelect") {
|
|
238
|
-
return (_a = formValue === null || formValue === void 0 ? void 0 : formValue.value) !== null && _a !== void 0 ? _a : '';
|
|
239
|
-
}
|
|
240
|
-
else if (formField.fieldType === "multiSelect") {
|
|
241
|
-
return formValue === null || formValue === void 0 ? void 0 : formValue.map(item => item.value);
|
|
242
|
-
}
|
|
243
|
-
else if (formField.fieldType === "boolean") {
|
|
244
|
-
return formValue;
|
|
245
|
-
}
|
|
246
|
-
else
|
|
247
|
-
return formValue;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
DynamicFormComponent.decorators = [
|
|
251
|
-
{ type: Component, args: [{
|
|
252
|
-
selector: "mis-dynamic-form",
|
|
253
|
-
template: "<form [formGroup]=\"dynamicForm\">\n <ng-container formArrayName=\"dynamicFields\">\n <ng-container [formGroupName]=\"i\" *ngFor=\"let fieldControl of getDynamicFieldsControls().controls; let i = index\">\n <ng-container\n [ngTemplateOutlet]=\"dynamicField\"\n [ngTemplateOutletContext]=\"{\n $implicit: formFields[i],\n formGroup: fieldControl,\n control: fieldControl.controls.value\n }\"\n >\n </ng-container>\n <div class=\"sub-dynamic-form\" *ngIf=\"fieldControl.value && (!!formFields[i]?.subFields && formFields[i]?.subFields?.length > 0 && matchParentConfig(formFields[i]?.subFields, fieldControl.controls.value.value.value))\">\n <ng-container *ngFor=\"let subFieldControl of fieldControl.controls.subFields.controls;\">\n <ng-container\n [ngTemplateOutlet]=\"dynamicField\"\n [ngTemplateOutletContext]=\"{\n $implicit: formFields[i].subFields[findSelectedIndex(formFields[i]?.subFields, fieldControl.controls.value.value.value)],\n control: subFieldControl\n }\">\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n</form>\n\n\n<ng-template #dynamicField let-field let-control=\"control\" let-formgroup=\"formGroup\">\n\n <!-- fieldType: 'input' fieldInputType: 'text' | 'number' -->\n <div class=\"dynamic-field multi-line-field-container\"\n *ngIf=\"field.fieldType === 'input' && (field.fieldInputType === 'text' || field.fieldInputType === 'number')\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <input class=\"input-field ip-text\" [type]=\"field.fieldInputType\" [formControl]=\"control\"\n (ngModelChange)=\"updateSubDynamicFields(field, formgroup, $event)\" \n [ngStyle]=\"{'border': control.touched && control.errors ? '1px solid #B00020': ''}\"\n [placeholder]=\"field.placeholderText ? field.placeholderText : 'Input Text'\" \n [min]=\"field.fieldInputType === 'number' ? 0 : '' \"/>\n <ng-container *ngIf=\"control.touched && control.errors\"\n [ngTemplateOutlet]=\"dynamicFieldErrors\" \n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\"\n >\n </ng-container>\n </div>\n\n <!-- fieldType: 'input' fieldInputType: 'textarea' -->\n <div class=\"dynamic-field multi-line-field-container\"\n *ngIf=\"field.fieldType === 'input' && field.fieldInputType === 'textarea'\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <textarea class=\"input-field ip-textarea\" type=\"text\"\n [ngStyle]=\"{'border': control.touched && control.errors ? '1px solid #B00020': ''}\"\n [placeholder]=\"field.placeholderText ? field.placeholderText : 'Input Text'\" [formControl]=\"control\" (ngModelChange)=\"updateSubDynamicFields(field, formgroup, $event)\"></textarea>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n <!-- fieldType: 'input' fieldInputType: 'date' -->\n <div class=\"dynamic-field single-line-field-container\"\n *ngIf=\"field.fieldType === 'input' && field.fieldInputType === 'date'\">\n <p class=\"h6\">\n {{ field.title }}\n </p>\n <div class=\"date-picker-container\">\n <input class=\"date-picker\" readonly misTzDp [dpConfig]=\"field.fieldConfig\"\n (dateChange)=\"control.setValue($event)\" [selectedDate]=\"control.value\" [offsetY]=\"0\"\n [value]=\"control.value\" #dp />\n <img alt=\"data-picker\" *ngIf=\"calendarIconUrl\" class=\"date-picker-icon\" [src]=\"calendarIconUrl\"\n (click)=\"dp.click()\" />\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n <!-- fieldType: 'boolean' fieldInputType: 'toggle' -->\n <div class=\"dynamic-field single-line-field-container\"\n *ngIf=\"field.fieldType === 'boolean' && field.fieldInputType === 'toggle'\">\n <p class=\"h6\">\n {{ field.title }}\n </p>\n <mis-switch [control]=\"control\" (valueChanged)=\"updateSubDynamicFields(field, formgroup, $event)\"></mis-switch>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n <!-- fieldType: 'singleSelect' fieldInputType: 'dropdown' -->\n <div class=\"dynamic-field single-line-field-container\"\n *ngIf=\"field.fieldType === 'singleSelect' && field.fieldInputType === 'dropdown'\">\n <p class=\"h6\">\n {{ field.title }}\n </p>\n <mis-dropdown [searchEnabled]=\"false\" [width]=\"'140px'\" [data]=\"field.itemsList\" [selectedItem]=\"control.value\"\n (onChange)=\"updateSelectedValueForSingleSelect(field, control, formgroup, $event);\">\n </mis-dropdown>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n <!-- fieldType: 'singleSelect' fieldInputType: 'radio' -->\n <div class=\"dynamic-field multi-line-field-container\"\n *ngIf=\"field.fieldType === 'singleSelect' && field.fieldInputType === 'radio'\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <div id=\"checkboxes-container\">\n <div class=\"radio-checkbox-common\" *ngFor=\"let item of field.itemsList\"\n [ngClass]=\"{ 'checkbox-active': item.label === control.value?.label }\"\n (click)=\"updateSelectedValueForSingleSelect(field, control, formgroup, item);\">\n <img *ngIf=\"(item.label === control.value?.label) && activeBtnIconUrl\" [src]=\"activeBtnIconUrl\" alt=\"\" />\n <p class=\"h6\">{{ item.label }}</p>\n </div>\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n <!-- fieldType: 'multiSelect' fieldInputType: 'checkbox' -->\n <div class=\"dynamic-field multi-line-field-container\"\n *ngIf=\"field.fieldType === 'multiSelect' && field.fieldInputType === 'checkbox'\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <div id=\"checkboxes-container\">\n <div class=\"radio-checkbox-common\" *ngFor=\"let item of field.itemsList\"\n [ngClass]=\"{ 'checkbox-active': isCheckBoxSelected(item.label, control.value) }\"\n (click)=\"updateSelectedValueForMultiSelect(field, control, formgroup, [item])\">\n <img *ngIf=\"isCheckBoxSelected(item.label, control.value) && activeBtnIconUrl\" [src]=\"activeBtnIconUrl\"\n alt=\"\" />\n <p class=\"h6\">{{ item.label }}</p>\n </div>\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n <!-- fieldType: 'multiSelect' fieldInputType: 'dropdown' -->\n <div class=\"dynamic-field single-line-field-container\"\n *ngIf=\"field.fieldType === 'multiSelect' && field.fieldInputType === 'dropdown'\">\n <p class=\"h6\">\n {{ field.title }}\n </p>\n <mis-multi-select-dropdown [width]=\"'140px'\" [showSelectedCount]=\"true\" [dropdownListWidth]=\"'256px'\"\n [searchEnabled]=\"false\" [hideApplyButton]=\"true\" [data]=\"field.itemsList\"\n [selectedItems]=\"control.value\" (onChange)=\"updateSelectedValueForMultiSelect(field, control, formgroup, $event);\"></mis-multi-select-dropdown>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n</ng-template>\n\n<ng-template #dynamicFieldErrors let-errors>\n <div id=\"error-messages-container\">\n <ng-container *ngFor=\"let error of errors | keyvalue\">\n <p class=\"h8\">\n {{\" \u2022 \" + error.value}}\n </p>\n <div style=\"flex-basis: 100%; height: 0\"></div>\n </ng-container>\n </div>\n</ng-template>",
|
|
254
|
-
styles: ["p{margin:0;cursor:default}::ng-deep .main-container{margin:0;max-width:100%}.sub-dynamic-form{padding-left:24px}.dynamic-field ::ng-deep .container{height:32px!important}.single-line-field-container{justify-content:space-between;align-items:center}.multi-line-field-container,.single-line-field-container{display:flex;padding:28px 16px;border-bottom:1px solid var(--grey-seperators)}.multi-line-field-container{justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.field-title-sm{margin-bottom:8px;cursor:default}.input-field{width:100%;background-color:var(--grey-bg-1);border:1px solid var(--grey-seperators);border-radius:6px}.ip-text{height:44px;padding:8px 12px}.ip-textarea{max-height:94px;padding:8px}input:focus{outline:none}input::-moz-placeholder{color:var(--grey-seperators)}input:-ms-input-placeholder{color:var(--grey-seperators)}input::placeholder{color:var(--grey-seperators)}textarea:focus{outline:none}.date-picker-container{position:relative;width:140px}.date-picker-container .date-picker{cursor:pointer;height:32px;width:100%;font-size:14px;border-radius:6px;padding:0 12px;border:1px solid var(--grey-seperators);inset:10px auto auto 80px;background-color:var(--text-white)}.date-picker-container .date-picker:hover{background-color:var(--grey-hover)}.date-picker-container .date-picker-icon{position:absolute;top:50%;right:12px;transform:translateY(-50%);cursor:pointer}form .dynamic-field:last-child{border-bottom:none!important}#checkboxes-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.radio-checkbox-common{display:flex;justify-content:center;align-items:center;cursor:pointer;margin-right:8px;margin-bottom:8px;background-color:var(--text-white);padding:12px 16px;border:1px solid var(--text-muted);border-radius:8px}.radio-checkbox-common p{color:var(--text-muted);cursor:pointer}.radio-checkbox-common img{margin-right:8px}.checkbox-active{background-color:var(--pmry-500)}.checkbox-active p{color:var(--text-white)}#error-messages-container{margin-top:4px;width:100%;display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}#error-messages-container p{color:var(--sem-error)}"]
|
|
255
|
-
},] }
|
|
256
|
-
];
|
|
257
|
-
DynamicFormComponent.ctorParameters = () => [];
|
|
258
|
-
DynamicFormComponent.propDecorators = {
|
|
259
|
-
formFields: [{ type: Input }],
|
|
260
|
-
formValues: [{ type: Input }],
|
|
261
|
-
activeBtnIconUrl: [{ type: Input }],
|
|
262
|
-
calendarIconUrl: [{ type: Input }],
|
|
263
|
-
formUpdated: [{ type: Output }],
|
|
264
|
-
formValid: [{ type: Output }],
|
|
265
|
-
formInitialized: [{ type: Output }]
|
|
266
|
-
};
|
|
267
|
-
const dynamicFieldValidator = (validators) => {
|
|
268
|
-
return (control) => {
|
|
269
|
-
let value = control.value;
|
|
270
|
-
if (Array.isArray(value)) {
|
|
271
|
-
return null;
|
|
272
|
-
}
|
|
273
|
-
else if (typeof value === 'object') {
|
|
274
|
-
value = (value === null || value === void 0 ? void 0 : value.value) ? value.value : '';
|
|
275
|
-
}
|
|
276
|
-
let errors = null;
|
|
277
|
-
validators.forEach((validator) => {
|
|
278
|
-
let error = null;
|
|
279
|
-
let message = validator.message;
|
|
280
|
-
switch (validator.type) {
|
|
281
|
-
case "Required":
|
|
282
|
-
error = Validators.required(control);
|
|
283
|
-
if (error)
|
|
284
|
-
error = { Required: message };
|
|
285
|
-
break;
|
|
286
|
-
case "MinLength":
|
|
287
|
-
error = Validators.minLength(+validator.value)(control);
|
|
288
|
-
message = message.replace('${0}', error === null || error === void 0 ? void 0 : error.minlength.requiredLength);
|
|
289
|
-
if (error)
|
|
290
|
-
error = { MinLength: message };
|
|
291
|
-
break;
|
|
292
|
-
case "MaxLength":
|
|
293
|
-
error = Validators.maxLength(+validator.value)(control);
|
|
294
|
-
message = message.replace('${0}', error === null || error === void 0 ? void 0 : error.actualLength);
|
|
295
|
-
if (error)
|
|
296
|
-
error = { MaxLength: message };
|
|
297
|
-
break;
|
|
298
|
-
case "Email":
|
|
299
|
-
error = Validators.email(control);
|
|
300
|
-
if (error)
|
|
301
|
-
error = { Email: message };
|
|
302
|
-
break;
|
|
303
|
-
case "Custom":
|
|
304
|
-
error = Validators.pattern(`${validator.value}`)(control);
|
|
305
|
-
if (error)
|
|
306
|
-
error = { Custom: message };
|
|
307
|
-
break;
|
|
308
|
-
default:
|
|
309
|
-
break;
|
|
310
|
-
}
|
|
311
|
-
if (error)
|
|
312
|
-
errors = Object.assign(Object.assign({}, errors), error);
|
|
313
|
-
});
|
|
314
|
-
return errors;
|
|
315
|
-
};
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
class DynamicFormModule {
|
|
319
|
-
static forRoot() {
|
|
320
|
-
return { ngModule: DynamicFormModule, providers: [] };
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
DynamicFormModule.decorators = [
|
|
324
|
-
{ type: NgModule, args: [{
|
|
325
|
-
declarations: [DynamicFormComponent],
|
|
326
|
-
imports: [
|
|
327
|
-
CommonModule,
|
|
328
|
-
ReactiveFormsModule,
|
|
329
|
-
FormsModule,
|
|
330
|
-
OverlayModule,
|
|
331
|
-
ScrollingModule,
|
|
332
|
-
DropdownModule,
|
|
333
|
-
SwitchModule,
|
|
334
|
-
MultiSelectDropdownModule,
|
|
335
|
-
DatepickerModuleV2
|
|
336
|
-
],
|
|
337
|
-
exports: [DynamicFormComponent]
|
|
338
|
-
},] }
|
|
339
|
-
];
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Generated bundle index. Do not edit.
|
|
343
|
-
*/
|
|
344
|
-
|
|
345
|
-
export { DynamicFormComponent, DynamicFormModule };
|
|
346
|
-
//# sourceMappingURL=mis-crystal-design-system-dynamic-form.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-dynamic-form.js","sources":["../../../projects/mis-components/dynamic-form/dynamic-form.component.ts","../../../projects/mis-components/dynamic-form/dynamic-form.module.ts","../../../projects/mis-components/dynamic-form/mis-crystal-design-system-dynamic-form.ts"],"sourcesContent":["import { Component, EventEmitter, HostListener, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { NsDynamicForm } from \"./dynamic-form.namespace\";\nimport { AbstractControl, FormArray, FormControl, FormGroup, ValidationErrors, ValidatorFn, Validators } from \"@angular/forms\";\n\nimport * as moment from \"moment\";\nimport \"moment-timezone\";\nimport { Subscription } from \"rxjs\";\n\n@Component({\n selector: \"mis-dynamic-form\",\n templateUrl: \"./dynamic-form.component.html\",\n styleUrls: [\"./dynamic-form.component.scss\"]\n})\nexport class DynamicFormComponent implements OnInit, OnDestroy {\n /**\n * formFields: Dynamic fields recieved from the API metadata to build a dynamic form\n * formValues: Holds the value of the dynamic form with \"key\" being dynamic field \"title\"\n * and value being the user input.\n */\n @Input() formFields: Array<NsDynamicForm.IDynamicField> = [];\n @Input() formValues: { [key: string]: any } = {};\n // Need to deprecate these inputs and use constants.\n @Input() activeBtnIconUrl = \"\";\n @Input() calendarIconUrl = \"\";\n /**\n * dynamicForm: Constructed using formFields and formValues(in case of edit)\n */\n dynamicForm: FormGroup;\n\n /**\n * formUpdated: Emits formValues Object whenever there is a change in the dynamic form.\n */\n @Output() formUpdated = new EventEmitter<{ [key: string]: any }>();\n /**\n * formValid: Emits boolean depending on validity of the form\n */\n @Output() formValid = new EventEmitter<boolean>();\n /**\n * formInitialized: Emits dynamic form API on form initilization\n */\n @Output() formInitialized = new EventEmitter<any>();\n\n dynamicFormAPI: NsDynamicForm.IDynamicFormAPI;\n valueChangesSubscription$: Subscription;\n\n constructor() {}\n\n ngOnInit(): void {\n // Building the form\n this.dynamicForm = this.generateDynamicForm(this.formFields, this.formValues);\n\n // Subscribing to form changes and emiting values.\n this.valueChangesSubscription$ = this.dynamicForm.valueChanges.subscribe(formValue => {\n this.onFormValueChanges();\n });\n\n //api to expose functions\n this.dynamicFormAPI = {\n defaultFormValues: () => {\n return this.generateDynamicFieldsValueObject(this.dynamicForm.value.dynamicFields);\n }\n };\n this.formInitialized.emit(this.dynamicFormAPI);\n this.formValid.emit(this.dynamicForm.valid);\n }\n ngOnDestroy(): void {\n this.valueChangesSubscription$?.unsubscribe();\n }\n onFormValueChanges(): void {\n let formValues = this.generateDynamicFieldsValueObject(this.dynamicForm.value.dynamicFields);\n this.formValid.emit(this.dynamicForm.valid);\n this.formUpdated.emit(formValues);\n console.log(formValues)\n }\n generateDynamicFieldsValueObject(formValues: Array<any>): { [key: string]: any } {\n let dynamicFieldsValue = {};\n formValues.forEach((fieldValue, index) => {\n let formattedValue = this.mapFormFieldToFormValue(this.formFields[index], fieldValue.value);\n if (fieldValue.subFields?.length > 0) {\n let formattedSubFieldsValues = {}\n fieldValue.subFields.forEach((subFieldValue, subIndex) => {\n let subFormField = this.formFields[index].subFields[subIndex]\n formattedSubFieldsValues[subFormField.configName] = this.mapFormFieldToFormValue(subFormField, subFieldValue)\n })\n dynamicFieldsValue[this.formFields[index].configName] = {\n value: formattedValue,\n subFields: formattedSubFieldsValues\n }\n }\n else {\n dynamicFieldsValue[this.formFields[index].configName] = formattedValue;\n }\n });\n return dynamicFieldsValue;\n }\n generateDynamicForm(\n formFields: Array<NsDynamicForm.IDynamicField>,\n formValues: { [key: string]: any }\n ): FormGroup {\n let formArray = new FormArray([])\n\n for (let field of formFields) {\n let fieldValue = formValues[field.configName]?.value ? formValues[field.configName].value : formValues[field.configName]\n let fieldControl = this.mapFormValueToFormField(field, fieldValue);\n let subFieldsControls = this.generateSubDynamicFields(formValues, field, fieldControl.value);\n formArray.push(new FormGroup({\n value: fieldControl,\n subFields: subFieldsControls\n }))\n } \n return new FormGroup({\n dynamicFields: formArray\n })\n }\n \n getDynamicFieldsControls(): FormArray {\n return this.dynamicForm.get(\"dynamicFields\") as FormArray;\n }\n updateSubDynamicFields(\n field: NsDynamicForm.IDynamicField,\n formGroup: FormGroup,\n value: any\n ): void {\n if (field.subFields?.length > 0) {\n let subFieldsControls = this.generateSubDynamicFields(this.formValues, field, value);\n formGroup.removeControl('subFields')\n formGroup.addControl('subFields', subFieldsControls)\n }\n }\n updateSelectedValueForSingleSelect(\n field: NsDynamicForm.IDynamicField,\n control: FormControl,\n formGroup: FormGroup,\n value: any\n ): void {\n if (control.value?.value !== value.value) {\n control.setValue(value);\n }\n else control.setValue('');\n this.updateSubDynamicFields(field, formGroup, value);\n control.markAsTouched();\n }\n updateSelectedValueForMultiSelect(\n field: NsDynamicForm.IDynamicField,\n control: FormControl,\n formGroup: FormGroup,\n values: Array<any>\n ): void {\n let selectedValues: Array<{ label: string; value: any }> = control.value;\n for (let value of values) {\n let itemIndex = selectedValues.findIndex(item => item.label === value.label);\n if (itemIndex > -1) {\n selectedValues.splice(itemIndex, 1);\n } else {\n selectedValues.push({ ...value });\n }\n }\n control.setValue(selectedValues);\n this.updateSubDynamicFields(field, formGroup, values);\n control.markAsTouched();\n }\n isCheckBoxSelected(value: string, selectedValues: Array<{ label: string; value: string }>): boolean {\n return selectedValues.findIndex(item => item.label === value) > -1;\n }\n\n findSelectedIndex(subfields, value) {\n const selectedIndex = subfields.findIndex(item => item.parentConfigValue === value);\n return selectedIndex !== -1 ? selectedIndex : 0;\n }\n\n matchParentConfig(subfields, value) {\n if (!subfields || subfields.length === 0) {\n return false;\n }\n return subfields.some(item => item.parentConfigValue === value);\n }\n\n generateSubDynamicFields(\n formValues: any,\n parentField: NsDynamicForm.IDynamicField,\n parentValue: Array<{ label: string, value: string | number }> | {label: string, value: string } | string | number | boolean\n ): FormArray {\n let controls = new FormArray([])\n let subFields = parentField.subFields\n let subFieldsValues = formValues[parentField.configName]?.subFields ? formValues[parentField.configName].subFields : {}\n if(!subFields) return controls;\n if (parentField.fieldType === 'singleSelect') {\n subFields = subFields.filter((subField) => subField.parentConfigValue === (<{label: string, value: string }>parentValue)?.value);\n }\n else if (parentField.fieldType === 'multiSelect') {\n let parentValues = new Set((<Array<{ label: string, value: string | number }>>parentValue).map((value) => value.value));\n subFields = subFields.filter((subField) => parentValues.has(subField.parentConfigValue));\n }\n\n if (subFields?.length > 0) {\n for (let subField of subFields) {\n controls.push(this.mapFormValueToFormField(subField, subFieldsValues[subField.configName]))\n }\n }\n return controls;\n }\n mapFormValueToFormField(formField: NsDynamicForm.IDynamicField, formValue: any): any {\n let validators = formField.validators ? [dynamicFieldValidator(formField.validators)]: []\n let control = new FormControl(null, validators);\n\n if (formField.fieldType === \"input\") {\n if (formField.fieldInputType === \"text\" || formField.fieldInputType === \"textarea\") control.setValue(formValue ? formValue : \"\");\n else if (formField.fieldInputType === \"number\") control.setValue(formValue ? formValue : 0);\n else if (formField.fieldInputType === \"date\") {\n if (formValue && typeof formValue === \"number\") {\n control.setValue(moment(formValue).tz(formField.fieldConfig.timezone).format(formField.fieldConfig.format));\n } else {\n control.setValue(moment().tz(formField.fieldConfig.timezone).format(formField.fieldConfig.format));\n }\n }\n } else if (formField.fieldType === \"singleSelect\") {\n const findSelectedValue = () => {\n let index = formField.itemsList.findIndex(item => item.value === formValue)\n return index >= 0 ? formField.itemsList[index]: \"\";\n }\n if (formField.fieldInputType === \"dropdown\") {\n if (!formValue) control.setValue(formField.itemsList[0]);\n else control.setValue(findSelectedValue())\n }\n else if (formField.fieldInputType === \"radio\") {\n control.setValue(findSelectedValue())\n }\n } else if (formField.fieldType === \"multiSelect\") {\n if (formValue && Array.isArray(formValue)) {\n let selectedValues = [];\n for (let value of formValue) {\n let index = formField.itemsList.findIndex(item => item.value === value);\n if (index > -1) selectedValues.push({ ...formField.itemsList[index] });\n }\n control.setValue(selectedValues);\n } else {\n control.setValue([]);\n }\n } else if (formField.fieldType === \"boolean\") {\n control.setValue(!!formValue);\n } else control.setValue(null);\n return control;\n }\n mapFormFieldToFormValue(formField: NsDynamicForm.IDynamicField, formValue: any): any {\n if (formField.fieldType === \"input\") {\n if (formField.fieldInputType === \"text\" || formField.fieldInputType === \"textarea\") return formValue;\n else if (formField.fieldInputType === \"number\") return +formValue;\n else if (formField.fieldInputType === \"date\") {\n return moment.tz(formValue, formField.fieldConfig.format, formField.fieldConfig.timezone).valueOf();\n }\n } else if (formField.fieldType === \"singleSelect\") {\n return formValue?.value ?? '';\n } else if (formField.fieldType === \"multiSelect\") {\n return formValue?.map(item => item.value);\n } else if (formField.fieldType === \"boolean\") {\n return formValue;\n } else return formValue;\n }\n}\n\nexport const dynamicFieldValidator = (validators: Array<NsDynamicForm.IDynamicFieldValidator>): ValidatorFn => {\n return (control: AbstractControl): ValidationErrors | null => {\n let value = control.value\n if (Array.isArray(value)) {\n return null;\n }\n else if (typeof value === 'object') {\n value = value?.value ? value.value : ''\n }\n let errors = null\n\n validators.forEach((validator) => {\n let error = null\n let message = validator.message\n switch (validator.type) {\n case \"Required\":\n error = Validators.required(control)\n if(error) error = {Required: message}\n break;\n case \"MinLength\":\n error = Validators.minLength(+validator.value)(control)\n message = message.replace('${0}', error?.minlength.requiredLength)\n if(error) error = { MinLength: message }\n break;\n case \"MaxLength\":\n error = Validators.maxLength(+validator.value)(control)\n message = message.replace('${0}', error?.actualLength)\n if(error) error = { MaxLength: message }\n break;\n case \"Email\":\n error = Validators.email(control)\n if(error) error = {Email: message}\n break;\n case \"Custom\":\n error = Validators.pattern(`${validator.value}`)(control)\n if(error) error = {Custom: message}\n break;\n default:\n break;\n }\n if (error) errors = { ...errors, ...error }\n })\n return errors\n }\n}","import { CommonModule } from \"@angular/common\";\nimport { FormsModule } from \"@angular/forms\";\nimport { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { ScrollingModule } from \"@angular/cdk-experimental/scrolling\";\nimport { DropdownModule } from \"mis-crystal-design-system/dropdown\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { DynamicFormComponent } from \"./dynamic-form.component\";\nimport { SwitchModule } from \"mis-crystal-design-system/switch\";\nimport { MultiSelectDropdownModule } from \"mis-crystal-design-system/multi-select-dropdown\";\nimport { DatepickerModuleV2 } from \"mis-crystal-design-system/datepicker_v2\";\n\n@NgModule({\n declarations: [DynamicFormComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormsModule,\n OverlayModule,\n ScrollingModule,\n DropdownModule,\n SwitchModule,\n MultiSelectDropdownModule,\n DatepickerModuleV2\n ],\n exports: [DynamicFormComponent]\n})\nexport class DynamicFormModule {\n static forRoot(): ModuleWithProviders<DynamicFormModule> {\n return { ngModule: DynamicFormModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["moment.tz"],"mappings":";;;;;;;;;;;;;MAaa,oBAAoB;IAgC/B;;;;;;QA1BS,eAAU,GAAuC,EAAE,CAAC;QACpD,eAAU,GAA2B,EAAE,CAAC;;QAExC,qBAAgB,GAAG,EAAE,CAAC;QACtB,oBAAe,GAAG,EAAE,CAAC;;;;QASpB,gBAAW,GAAG,IAAI,YAAY,EAA0B,CAAC;;;;QAIzD,cAAS,GAAG,IAAI,YAAY,EAAW,CAAC;;;;QAIxC,oBAAe,GAAG,IAAI,YAAY,EAAO,CAAC;KAKpC;IAEhB,QAAQ;;QAEN,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;;QAG9E,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS;YAChF,IAAI,CAAC,kBAAkB,EAAE,CAAC;SAC3B,CAAC,CAAC;;QAGH,IAAI,CAAC,cAAc,GAAG;YACpB,iBAAiB,EAAE;gBACjB,OAAO,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;aACpF;SACF,CAAC;QACF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/C,IAAI,CAAC,SAAS,CAAC,IAAI,C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ementRef, Input, HostListener, NgModule } from '@angular/core';
|
|
2
|
-
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
|
|
5
|
-
/** @format */
|
|
6
|
-
class FabComponent {
|
|
7
|
-
constructor(eRef) {
|
|
8
|
-
this.eRef = eRef;
|
|
9
|
-
this.show = false;
|
|
10
|
-
this.options = {};
|
|
11
|
-
this.items = [];
|
|
12
|
-
this.isOpen = false;
|
|
13
|
-
}
|
|
14
|
-
clickout(event) {
|
|
15
|
-
if (!this.eRef.nativeElement.contains(event.target)) {
|
|
16
|
-
this.closeFab();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
ngOnInit() {
|
|
20
|
-
this.options = Object.assign({ size: 56, backgroundColorClosed: "#0937B2", backgroundColorOpened: "#3a5fc1" }, this.options);
|
|
21
|
-
}
|
|
22
|
-
ngOnDestroy() { }
|
|
23
|
-
clickItem(item) {
|
|
24
|
-
this.closeFab();
|
|
25
|
-
item.click();
|
|
26
|
-
}
|
|
27
|
-
closeFab() {
|
|
28
|
-
this.isOpen = false;
|
|
29
|
-
}
|
|
30
|
-
toogleFab() {
|
|
31
|
-
this.isOpen = !this.isOpen;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
FabComponent.decorators = [
|
|
35
|
-
{ type: Component, args: [{
|
|
36
|
-
selector: "mis-fab",
|
|
37
|
-
template: "<div class=\"fab-wrapper\" *ngIf=\"show\">\n <div class=\"fab-items\" *ngIf=\"isOpen\" @slideUpFab>\n <div class=\"fab-item\" *ngFor=\"let item of items.reverse(); let i = index\" (click)=\"clickItem(item)\">\n <div *ngIf=\"item.label\" class=\"fab-tooltip\">\n {{ item.label }}\n </div>\n <div\n class=\"fab-button\"\n [ngStyle]=\"{\n backgroundColor: item.backgroundColor || '#0937B2'\n }\"\n >\n <img [src]=\"item.icon\" class=\"add-img\" />\n </div>\n </div>\n </div>\n <div\n class=\"fab-container\"\n [ngStyle]=\"{\n backgroundColor: isOpen ? options.backgroundColorOpened : options.backgroundColorClosed\n }\"\n (click)=\"toogleFab()\"\n >\n <svg\n [@rotateButton]=\"isOpen ? 'rotated' : 'default'\"\n class=\"add-img\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M13.1424 5.15607C13.1424 4.51759 12.6313 4 12.0009 4C11.3704 4 10.8594 4.51759 10.8594 5.15607V10.8421H5.14149C4.51106 10.8421 4 11.3597 4 11.9982C4 12.6367 4.51106 13.1543 5.14149 13.1543H10.8594V18.8439C10.8594 19.4824 11.3704 20 12.0009 20C12.6313 20 13.1424 19.4824 13.1424 18.8439V13.1543H18.8585C19.4889 13.1543 20 12.6367 20 11.9982C20 11.3597 19.4889 10.8421 18.8585 10.8421H13.1424V5.15607Z\"\n fill=\"white\"\n />\n </svg>\n </div>\n</div>\n",
|
|
38
|
-
animations: [
|
|
39
|
-
trigger("slideUpFab", [
|
|
40
|
-
transition(":enter", [
|
|
41
|
-
style({ transform: "translateY(50px)", opacity: 0 }),
|
|
42
|
-
animate("300ms ease-out", style({ transform: "translateY(0px)", opacity: 1 }))
|
|
43
|
-
]),
|
|
44
|
-
transition(":leave", [animate("200ms ease-out", style({ transform: "translateY(70px)", opacity: 0 }))])
|
|
45
|
-
]),
|
|
46
|
-
trigger("rotateButton", [
|
|
47
|
-
state("default", style({ transform: "rotate(0)" })),
|
|
48
|
-
state("rotated", style({ transform: "rotate(45deg)" })),
|
|
49
|
-
transition("rotated => default", animate("300ms ease-out")),
|
|
50
|
-
transition("default => rotated", animate("200ms ease-in"))
|
|
51
|
-
])
|
|
52
|
-
],
|
|
53
|
-
styles: [".fab-wrapper{position:fixed;right:24px;bottom:24px;z-index:1000}.fab-wrapper .fab-item{position:relative;padding:0 0 16px 8px}.fab-wrapper .fab-item .fab-tooltip{position:absolute;background-color:#181f33;border-radius:4px;color:#fff;padding:8px;display:flex;justify-content:center;align-items:center;white-space:nowrap;right:100%;top:calc(50% - 8px);transform:translateY(-50%)}.fab-wrapper .fab-item .fab-button{width:40px;height:40px}.fab-wrapper .fab-container,.fab-wrapper .fab-item .fab-button{cursor:pointer;border-radius:50%;display:flex;justify-content:center;align-items:center}.fab-wrapper .fab-container{width:56px;height:56px}.add-img{height:24px;width:24px}"]
|
|
54
|
-
},] }
|
|
55
|
-
];
|
|
56
|
-
FabComponent.ctorParameters = () => [
|
|
57
|
-
{ type: ElementRef }
|
|
58
|
-
];
|
|
59
|
-
FabComponent.propDecorators = {
|
|
60
|
-
show: [{ type: Input }],
|
|
61
|
-
options: [{ type: Input }],
|
|
62
|
-
items: [{ type: Input }],
|
|
63
|
-
clickout: [{ type: HostListener, args: ["document:click", ["$event"],] }]
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
class FabModule {
|
|
67
|
-
static forRoot() {
|
|
68
|
-
return { ngModule: FabModule, providers: [] };
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
FabModule.decorators = [
|
|
72
|
-
{ type: NgModule, args: [{
|
|
73
|
-
declarations: [FabComponent],
|
|
74
|
-
imports: [CommonModule],
|
|
75
|
-
exports: [FabComponent]
|
|
76
|
-
},] }
|
|
77
|
-
];
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Generated bundle index. Do not edit.
|
|
81
|
-
*/
|
|
82
|
-
|
|
83
|
-
export { FabComponent, FabModule };
|
|
84
|
-
//# sourceMappingURL=mis-crystal-design-system-fab.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-fab.js","sources":["../../../projects/mis-components/fab/fab.component.ts","../../../projects/mis-components/fab/fab.module.ts","../../../projects/mis-components/fab/mis-crystal-design-system-fab.ts"],"sourcesContent":["/** @format */\n\nimport { Component, ElementRef, HostListener, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport { trigger, transition, style, animate, state } from \"@angular/animations\";\n\nexport type FabOptions = {\n backgroundColorClosed?: string;\n backgroundColorOpened?: string;\n size?: number;\n};\n\nexport type FabItem = {\n label?: string;\n icon: string;\n backgroundColor?: string;\n id?: string;\n click?: () => any;\n};\n\nexport type FabItems = FabItem[];\n\n@Component({\n selector: \"mis-fab\",\n templateUrl: \"./fab.component.html\",\n styleUrls: [\"./fab.component.scss\"],\n animations: [\n trigger(\"slideUpFab\", [\n transition(\":enter\", [\n style({ transform: \"translateY(50px)\", opacity: 0 }),\n animate(\"300ms ease-out\", style({ transform: \"translateY(0px)\", opacity: 1 }))\n ]),\n transition(\":leave\", [animate(\"200ms ease-out\", style({ transform: \"translateY(70px)\", opacity: 0 }))])\n ]),\n trigger(\"rotateButton\", [\n state(\"default\", style({ transform: \"rotate(0)\" })),\n state(\"rotated\", style({ transform: \"rotate(45deg)\" })),\n transition(\"rotated => default\", animate(\"300ms ease-out\")),\n transition(\"default => rotated\", animate(\"200ms ease-in\"))\n ])\n ]\n})\nexport class FabComponent implements OnInit, OnDestroy {\n @Input() show: boolean = false;\n @Input() options: FabOptions = {};\n @Input() items: FabItems = [];\n\n isOpen: boolean = false;\n\n constructor(private eRef: ElementRef) {}\n\n @HostListener(\"document:click\", [\"$event\"])\n clickout(event) {\n if (!this.eRef.nativeElement.contains(event.target)) {\n this.closeFab();\n }\n }\n\n ngOnInit(): void {\n this.options = {\n size: 56,\n backgroundColorClosed: \"#0937B2\",\n backgroundColorOpened: \"#3a5fc1\",\n ...this.options\n };\n }\n\n ngOnDestroy(): void {}\n\n clickItem(item: FabItem) {\n this.closeFab();\n item.click();\n }\n\n closeFab() {\n this.isOpen = false;\n }\n\n toogleFab() {\n this.isOpen = !this.isOpen;\n }\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { FabComponent } from \"./fab.component\";\n\n@NgModule({\n declarations: [FabComponent],\n imports: [CommonModule],\n exports: [FabComponent]\n})\nexport class FabModule {\n static forRoot(): ModuleWithProviders<FabModule> {\n return { ngModule: FabModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;MAyCa,YAAY;IAOvB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;QAN3B,SAAI,GAAY,KAAK,CAAC;QACtB,YAAO,GAAe,EAAE,CAAC;QACzB,UAAK,GAAa,EAAE,CAAC;QAE9B,WAAM,GAAY,KAAK,CAAC;KAEgB;IAGxC,QAAQ,CAAC,KAAK;QACZ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;YACnD,IAAI,CAAC,QAAQ,EAAE,CAAC;SACjB;KACF;IAED,QAAQ;QACN,IAAI,CAAC,OAAO,mBACV,IAAI,EAAE,EAAE,EACR,qBAAqB,EAAE,SAAS,EAChC,qBAAqB,EAAE,SAAS,IAC7B,IAAI,CAAC,OAAO,CAChB,CAAC;KACH;IAED,WAAW,MAAW;IAEtB,SAAS,CAAC,IAAa;QACrB,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,KAAK,EAAE,CAAC;KACd;IAED,QAAQ;QACN,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;KACrB;IAED,SAAS;QACP,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;KAC5B;;;YA1DF,SAAS,SAAC;gBACT,QAAQ,EAAE,SAAS;gBACnB,ygDAAmC;gBAEnC,UAAU,EAAE;oBACV,OAAO,CAAC,YAAY,EAAE;wBACpB,UAAU,CAAC,QAAQ,EAAE;4BACnB,KAAK,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;4BACpD,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;yBAC/E,CAAC;wBACF,UAAU,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;qBACxG,CAAC;oBACF,OAAO,CAAC,cAAc,EAAE;wBACtB,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,CAAC;wBACnD,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;wBACvD,UAAU,CAAC,oBAAoB,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;wBAC3D,UAAU,CAAC,oBAAoB,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;qBAC3D,CAAC;iBACH;;aACF;;;YAtCmB,UAAU;;;mBAwC3B,KAAK;sBACL,KAAK;oBACL,KAAK;uBAML,YAAY,SAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;;MCzC/B,SAAS;IACpB,OAAO,OAAO;QACZ,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;KAC/C;;;YARF,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,YAAY,CAAC;gBAC5B,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,OAAO,EAAE,CAAC,YAAY,CAAC;aACxB;;;ACRD;;;;;;"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
|
|
4
|
-
class InputStepperComponent {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.value = 1;
|
|
7
|
-
this.width = '200px';
|
|
8
|
-
this.minLimit = 0;
|
|
9
|
-
this.maxLimit = 2;
|
|
10
|
-
this.valueChange = new EventEmitter();
|
|
11
|
-
}
|
|
12
|
-
increment() {
|
|
13
|
-
if (this.value === this.maxLimit)
|
|
14
|
-
return;
|
|
15
|
-
this.value++;
|
|
16
|
-
this.emitValueChange();
|
|
17
|
-
}
|
|
18
|
-
decrement() {
|
|
19
|
-
if (this.value > 0) {
|
|
20
|
-
this.value--;
|
|
21
|
-
this.emitValueChange();
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
onInputChange(newValue) {
|
|
25
|
-
const parsedValue = parseInt(newValue, 10);
|
|
26
|
-
if (!isNaN(parsedValue)) {
|
|
27
|
-
this.value = parsedValue;
|
|
28
|
-
this.emitValueChange();
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
emitValueChange() {
|
|
32
|
-
console.log("value change", this.value);
|
|
33
|
-
this.valueChange.emit(this.value);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
InputStepperComponent.decorators = [
|
|
37
|
-
{ type: Component, args: [{
|
|
38
|
-
selector: 'mis-input-stepper',
|
|
39
|
-
template: "<div class=\"nudger\" [ngStyle]=\"{'max-width': width }\">\n <button (click)=\"decrement()\" [ngClass]=\"{'disabled': value === minLimit}\">-</button>\n <input type=\"text\" [value]=\"value\" (input)=\"onInputChange($event.target.value)\">\n <button (click)=\"increment()\" [ngClass]=\"{'disabled': value === maxLimit}\">+</button>\n</div>\n ",
|
|
40
|
-
styles: [".nudger{display:flex;align-items:center;justify-content:center;width:100%;border:1px solid #0937b2;border-radius:4px}button{padding:.5em 1em;cursor:pointer;border:none;transition:background-color .3s;color:#0937b2}button,button:hover{background-color:#fff}input{width:40%;text-align:center;padding:.5em 1em;color:#0937b2;border:none}@media screen and (max-width:600px){.nudger{max-width:150px}}.disabled{opacity:.6;cursor:not-allowed}"]
|
|
41
|
-
},] }
|
|
42
|
-
];
|
|
43
|
-
InputStepperComponent.ctorParameters = () => [];
|
|
44
|
-
InputStepperComponent.propDecorators = {
|
|
45
|
-
value: [{ type: Input }],
|
|
46
|
-
width: [{ type: Input }],
|
|
47
|
-
minLimit: [{ type: Input }],
|
|
48
|
-
maxLimit: [{ type: Input }],
|
|
49
|
-
valueChange: [{ type: Output }]
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
class InputStepperModule {
|
|
53
|
-
}
|
|
54
|
-
InputStepperModule.decorators = [
|
|
55
|
-
{ type: NgModule, args: [{
|
|
56
|
-
declarations: [
|
|
57
|
-
InputStepperComponent
|
|
58
|
-
],
|
|
59
|
-
imports: [
|
|
60
|
-
CommonModule
|
|
61
|
-
],
|
|
62
|
-
exports: [
|
|
63
|
-
InputStepperComponent
|
|
64
|
-
]
|
|
65
|
-
},] }
|
|
66
|
-
];
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Generated bundle index. Do not edit.
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
export { InputStepperComponent, InputStepperModule };
|
|
73
|
-
//# sourceMappingURL=mis-crystal-design-system-input-stepper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-input-stepper.js","sources":["../../../projects/mis-components/input-stepper/input-stepper/input-stepper.component.ts","../../../projects/mis-components/input-stepper/input-stepper.module.ts","../../../projects/mis-components/input-stepper/mis-crystal-design-system-input-stepper.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'mis-input-stepper',\n templateUrl: './input-stepper.component.html',\n styleUrls: ['./input-stepper.component.css']\n})\nexport class InputStepperComponent {\n @Input() value: number = 1;\n @Input() width?: string = '200px';\n @Input() minLimit : number = 0;\n @Input() maxLimit: number = 2;\n @Output() valueChange: EventEmitter<number> = new EventEmitter<number>();\n\n constructor() { }\n\n increment() {\n if(this.value === this.maxLimit) return;\n this.value++;\n this.emitValueChange();\n }\n\n decrement() {\n if (this.value > 0) {\n this.value--;\n this.emitValueChange();\n }\n }\n\n onInputChange(newValue: string) {\n const parsedValue = parseInt(newValue, 10);\n if (!isNaN(parsedValue)) {\n this.value = parsedValue;\n this.emitValueChange();\n }\n }\n\n private emitValueChange() {\n console.log(\"value change\", this.value);\n this.valueChange.emit(this.value);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { InputStepperComponent } from './input-stepper/input-stepper.component';\n\n\n\n@NgModule({\n declarations: [\n InputStepperComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n InputStepperComponent\n ]\n})\nexport class InputStepperModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAOa,qBAAqB;IAOhC;QANS,UAAK,GAAW,CAAC,CAAC;QAClB,UAAK,GAAY,OAAO,CAAC;QACzB,aAAQ,GAAY,CAAC,CAAC;QACtB,aAAQ,GAAW,CAAC,CAAC;QACpB,gBAAW,GAAyB,IAAI,YAAY,EAAU,CAAC;KAExD;IAEjB,SAAS;QACP,IAAG,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,QAAQ;YAAE,OAAO;QACxC,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,eAAe,EAAE,CAAC;KACxB;IAED,SAAS;QACP,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAClB,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,eAAe,EAAE,CAAC;SACxB;KACF;IAED,aAAa,CAAC,QAAgB;QAC5B,MAAM,WAAW,GAAG,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;YACvB,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC;YACzB,IAAI,CAAC,eAAe,EAAE,CAAC;SACxB;KACF;IAEO,eAAe;QACrB,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KA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