master-control 0.2.14 → 0.2.15
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/esm2022/lib/add-document/add-document.component.mjs +18 -0
- package/esm2022/lib/addition-button/addition-button.component.mjs +14 -0
- package/esm2022/lib/age-date/age-date.component.mjs +132 -0
- package/esm2022/lib/amount-textbox/amount-textbox.component.mjs +63 -0
- package/esm2022/lib/annuity-rate-logo/annuity-rate-logo.component.mjs +15 -0
- package/esm2022/lib/autocomplete/autocomplete.component.mjs +90 -0
- package/esm2022/lib/benefit-card/benefit-card.component.mjs +14 -0
- package/esm2022/lib/button/button.component.mjs +19 -0
- package/esm2022/lib/card/card.component.mjs +14 -0
- package/esm2022/lib/checkbox/checkbox.component.mjs +79 -0
- package/esm2022/lib/discount/discount.component.mjs +14 -0
- package/esm2022/lib/discount-v2/discount-v2.component.mjs +16 -0
- package/esm2022/lib/dob/dob.component.mjs +118 -0
- package/esm2022/lib/download-document/download-document.component.mjs +18 -0
- package/esm2022/lib/email-with-domain/email-with-domain.component.mjs +60 -0
- package/esm2022/lib/error-snackbar/error-snackbar.component.mjs +21 -0
- package/esm2022/lib/grey-label/grey-label.component.mjs +14 -0
- package/esm2022/lib/header/header.component.mjs +14 -0
- package/esm2022/lib/hr-line/hr-line.component.mjs +14 -0
- package/esm2022/lib/hyperlink/hyperlink.component.mjs +14 -0
- package/esm2022/lib/icon-button/icon-button.component.mjs +14 -0
- package/esm2022/lib/iframe/iframe.component.mjs +32 -0
- package/esm2022/lib/image/image.component.mjs +14 -0
- package/esm2022/lib/image-upload/image-upload.component.mjs +18 -0
- package/esm2022/lib/in-built-benefit/in-built-benefit.component.mjs +20 -0
- package/esm2022/lib/info/info.component.mjs +19 -0
- package/esm2022/lib/info-textbox/info-textbox.component.mjs +62 -0
- package/esm2022/lib/label/label.component.mjs +14 -0
- package/esm2022/lib/label-value-card/label-value-card.component.mjs +15 -0
- package/esm2022/lib/loader/loader.component.mjs +14 -0
- package/esm2022/lib/master-control.component.mjs +142 -0
- package/esm2022/lib/master-control.service.mjs +212 -0
- package/esm2022/lib/medial-questions/medial-questions.component.mjs +40283 -0
- package/esm2022/lib/mob-number/mob-number.component.mjs +65 -0
- package/esm2022/lib/multiple-select/multiple-select.component.mjs +119 -0
- package/esm2022/lib/neutral-snackbar/neutral-snackbar.component.mjs +21 -0
- package/esm2022/lib/other-benefits/other-benefits.component.mjs +14 -0
- package/esm2022/lib/otp-mob-number/otp-mob-number.component.mjs +63 -0
- package/esm2022/lib/otp-textbox/otp-textbox.component.mjs +68 -0
- package/esm2022/lib/page-nudge/page-nudge.component.mjs +14 -0
- package/esm2022/lib/pay-get-card/pay-get-card.component.mjs +29 -0
- package/esm2022/lib/radio/radio.component.mjs +58 -0
- package/esm2022/lib/search-multi-select/search-multi-select.component.mjs +127 -0
- package/esm2022/lib/select/select.component.mjs +99 -0
- package/esm2022/lib/select-textbox/select-textbox.component.mjs +83 -0
- package/esm2022/lib/stepper/stepper.component.mjs +25 -0
- package/esm2022/lib/sub-header/sub-header.component.mjs +14 -0
- package/esm2022/lib/subscript-textbox/subscript-textbox.component.mjs +62 -0
- package/esm2022/lib/success-snackbar/success-snackbar.component.mjs +21 -0
- package/esm2022/lib/suffix-textbox/suffix-textbox.component.mjs +65 -0
- package/esm2022/lib/tab/tab.component.mjs +32 -0
- package/esm2022/lib/table/table.component.mjs +82 -0
- package/esm2022/lib/tag-mob-number/tag-mob-number.component.mjs +66 -0
- package/esm2022/lib/textarea/textarea.component.mjs +20 -0
- package/esm2022/lib/textbox/textbox.component.mjs +67 -0
- package/esm2022/lib/textbox-with-image/textbox-with-image.component.mjs +57 -0
- package/esm2022/lib/textbox-with-text/textbox-with-text.component.mjs +58 -0
- package/esm2022/lib/textbox-with-underscore/textbox-with-underscore.component.mjs +71 -0
- package/esm2022/lib/toggle/toggle.component.mjs +20 -0
- package/esm2022/lib/toggle-button/toggle-button.component.mjs +16 -0
- package/esm2022/lib/underscore-mob-number/underscore-mob-number.component.mjs +74 -0
- package/esm2022/lib/upload/upload.component.mjs +24 -0
- package/esm2022/lib/warning-snackbar/warning-snackbar.component.mjs +21 -0
- package/esm2022/master-control.mjs +5 -0
- package/esm2022/public-api.mjs +60 -0
- package/fesm2022/master-control.mjs +42689 -0
- package/fesm2022/master-control.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/add-document/add-document.component.d.ts +6 -0
- package/lib/addition-button/addition-button.component.d.ts +6 -0
- package/lib/age-date/age-date.component.d.ts +20 -0
- package/lib/amount-textbox/amount-textbox.component.d.ts +17 -0
- package/lib/annuity-rate-logo/annuity-rate-logo.component.d.ts +7 -0
- package/lib/autocomplete/autocomplete.component.d.ts +25 -0
- package/lib/benefit-card/benefit-card.component.d.ts +6 -0
- package/lib/button/button.component.d.ts +9 -0
- package/lib/card/card.component.d.ts +6 -0
- package/lib/checkbox/checkbox.component.d.ts +20 -0
- package/lib/discount/discount.component.d.ts +6 -0
- package/lib/discount-v2/discount-v2.component.d.ts +6 -0
- package/lib/dob/dob.component.d.ts +32 -0
- package/lib/download-document/download-document.component.d.ts +6 -0
- package/lib/email-with-domain/email-with-domain.component.d.ts +19 -0
- package/lib/error-snackbar/error-snackbar.component.d.ts +10 -0
- package/lib/grey-label/grey-label.component.d.ts +6 -0
- package/lib/header/header.component.d.ts +6 -0
- package/lib/hr-line/hr-line.component.d.ts +6 -0
- package/lib/hyperlink/hyperlink.component.d.ts +6 -0
- package/lib/icon-button/icon-button.component.d.ts +6 -0
- package/lib/iframe/iframe.component.d.ts +13 -0
- package/lib/image/image.component.d.ts +6 -0
- package/lib/image-upload/image-upload.component.d.ts +6 -0
- package/lib/in-built-benefit/in-built-benefit.component.d.ts +8 -0
- package/lib/info/info.component.d.ts +9 -0
- package/lib/info-textbox/info-textbox.component.d.ts +16 -0
- package/lib/label/label.component.d.ts +6 -0
- package/lib/label-value-card/label-value-card.component.d.ts +7 -0
- package/lib/loader/loader.component.d.ts +6 -0
- package/lib/master-control.component.d.ts +9 -0
- package/lib/master-control.service.d.ts +11 -0
- package/lib/medial-questions/medial-questions.component.d.ts +63 -0
- package/lib/mob-number/mob-number.component.d.ts +21 -0
- package/lib/multiple-select/multiple-select.component.d.ts +27 -0
- package/lib/neutral-snackbar/neutral-snackbar.component.d.ts +10 -0
- package/lib/other-benefits/other-benefits.component.d.ts +6 -0
- package/lib/otp-mob-number/otp-mob-number.component.d.ts +17 -0
- package/lib/otp-textbox/otp-textbox.component.d.ts +17 -0
- package/lib/page-nudge/page-nudge.component.d.ts +6 -0
- package/lib/pay-get-card/pay-get-card.component.d.ts +11 -0
- package/lib/radio/radio.component.d.ts +18 -0
- package/lib/search-multi-select/search-multi-select.component.d.ts +27 -0
- package/lib/select/select.component.d.ts +22 -0
- package/lib/select-textbox/select-textbox.component.d.ts +17 -0
- package/lib/stepper/stepper.component.d.ts +11 -0
- package/lib/sub-header/sub-header.component.d.ts +6 -0
- package/lib/subscript-textbox/subscript-textbox.component.d.ts +16 -0
- package/lib/success-snackbar/success-snackbar.component.d.ts +10 -0
- package/lib/suffix-textbox/suffix-textbox.component.d.ts +16 -0
- package/lib/tab/tab.component.d.ts +14 -0
- package/lib/table/table.component.d.ts +23 -0
- package/lib/tag-mob-number/tag-mob-number.component.d.ts +17 -0
- package/lib/textarea/textarea.component.d.ts +9 -0
- package/lib/textbox/textbox.component.d.ts +20 -0
- package/lib/textbox-with-image/textbox-with-image.component.d.ts +16 -0
- package/lib/textbox-with-text/textbox-with-text.component.d.ts +16 -0
- package/lib/textbox-with-underscore/textbox-with-underscore.component.d.ts +18 -0
- package/lib/toggle/toggle.component.d.ts +9 -0
- package/lib/toggle-button/toggle-button.component.d.ts +6 -0
- package/lib/underscore-mob-number/underscore-mob-number.component.d.ts +19 -0
- package/lib/upload/upload.component.d.ts +9 -0
- package/lib/warning-snackbar/warning-snackbar.component.d.ts +10 -0
- package/master-control-0.2.15.tgz +0 -0
- package/package.json +25 -12
- package/{src/public-api.ts → public-api.d.ts} +56 -60
- package/ng-package.json +0 -7
- package/src/lib/add-document/add-document.component.css +0 -50
- package/src/lib/add-document/add-document.component.html +0 -31
- package/src/lib/add-document/add-document.component.ts +0 -17
- package/src/lib/addition-button/addition-button.component.css +0 -16
- package/src/lib/addition-button/addition-button.component.html +0 -20
- package/src/lib/addition-button/addition-button.component.ts +0 -13
- package/src/lib/age-date/age-date.component.css +0 -126
- package/src/lib/age-date/age-date.component.html +0 -82
- package/src/lib/age-date/age-date.component.ts +0 -104
- package/src/lib/amount-textbox/amount-textbox.component.css +0 -131
- package/src/lib/amount-textbox/amount-textbox.component.html +0 -69
- package/src/lib/amount-textbox/amount-textbox.component.ts +0 -53
- package/src/lib/annuity-rate-logo/annuity-rate-logo.component.css +0 -9
- package/src/lib/annuity-rate-logo/annuity-rate-logo.component.html +0 -6
- package/src/lib/annuity-rate-logo/annuity-rate-logo.component.ts +0 -13
- package/src/lib/autocomplete/autocomplete.component.css +0 -240
- package/src/lib/autocomplete/autocomplete.component.html +0 -61
- package/src/lib/autocomplete/autocomplete.component.ts +0 -85
- package/src/lib/benefit-card/benefit-card.component.css +0 -46
- package/src/lib/benefit-card/benefit-card.component.html +0 -25
- package/src/lib/benefit-card/benefit-card.component.ts +0 -13
- package/src/lib/button/button.component.css +0 -24
- package/src/lib/button/button.component.html +0 -22
- package/src/lib/button/button.component.ts +0 -16
- package/src/lib/card/card.component.css +0 -37
- package/src/lib/card/card.component.html +0 -24
- package/src/lib/card/card.component.ts +0 -13
- package/src/lib/checkbox/checkbox.component.css +0 -65
- package/src/lib/checkbox/checkbox.component.html +0 -23
- package/src/lib/checkbox/checkbox.component.ts +0 -70
- package/src/lib/discount/discount.component.css +0 -45
- package/src/lib/discount/discount.component.html +0 -51
- package/src/lib/discount/discount.component.ts +0 -14
- package/src/lib/discount-v2/discount-v2.component.css +0 -34
- package/src/lib/discount-v2/discount-v2.component.html +0 -20
- package/src/lib/discount-v2/discount-v2.component.ts +0 -14
- package/src/lib/dob/dob.component.css +0 -117
- package/src/lib/dob/dob.component.html +0 -88
- package/src/lib/dob/dob.component.ts +0 -107
- package/src/lib/download-document/download-document.component.css +0 -53
- package/src/lib/download-document/download-document.component.html +0 -38
- package/src/lib/download-document/download-document.component.ts +0 -17
- package/src/lib/email-with-domain/email-with-domain.component.css +0 -130
- package/src/lib/email-with-domain/email-with-domain.component.html +0 -73
- package/src/lib/email-with-domain/email-with-domain.component.ts +0 -51
- package/src/lib/error-snackbar/error-snackbar.component.css +0 -36
- package/src/lib/error-snackbar/error-snackbar.component.html +0 -21
- package/src/lib/error-snackbar/error-snackbar.component.ts +0 -19
- package/src/lib/grey-label/grey-label.component.css +0 -13
- package/src/lib/grey-label/grey-label.component.html +0 -7
- package/src/lib/grey-label/grey-label.component.ts +0 -13
- package/src/lib/header/header.component.css +0 -13
- package/src/lib/header/header.component.html +0 -9
- package/src/lib/header/header.component.ts +0 -14
- package/src/lib/hr-line/hr-line.component.css +0 -13
- package/src/lib/hr-line/hr-line.component.html +0 -7
- package/src/lib/hr-line/hr-line.component.ts +0 -13
- package/src/lib/hyperlink/hyperlink.component.css +0 -18
- package/src/lib/hyperlink/hyperlink.component.html +0 -8
- package/src/lib/hyperlink/hyperlink.component.ts +0 -13
- package/src/lib/icon-button/icon-button.component.css +0 -20
- package/src/lib/icon-button/icon-button.component.html +0 -17
- package/src/lib/icon-button/icon-button.component.ts +0 -13
- package/src/lib/iframe/iframe.component.css +0 -0
- package/src/lib/iframe/iframe.component.html +0 -7
- package/src/lib/iframe/iframe.component.ts +0 -32
- package/src/lib/image/image.component.css +0 -7
- package/src/lib/image/image.component.html +0 -3
- package/src/lib/image/image.component.ts +0 -13
- package/src/lib/image-upload/image-upload.component.css +0 -67
- package/src/lib/image-upload/image-upload.component.html +0 -61
- package/src/lib/image-upload/image-upload.component.ts +0 -17
- package/src/lib/in-built-benefit/in-built-benefit.component.css +0 -58
- package/src/lib/in-built-benefit/in-built-benefit.component.html +0 -30
- package/src/lib/in-built-benefit/in-built-benefit.component.ts +0 -16
- package/src/lib/info/info.component.css +0 -25
- package/src/lib/info/info.component.html +0 -21
- package/src/lib/info/info.component.ts +0 -15
- package/src/lib/info-textbox/info-textbox.component.css +0 -121
- package/src/lib/info-textbox/info-textbox.component.html +0 -83
- package/src/lib/info-textbox/info-textbox.component.ts +0 -52
- package/src/lib/label/label.component.css +0 -13
- package/src/lib/label/label.component.html +0 -7
- package/src/lib/label/label.component.ts +0 -14
- package/src/lib/label-value-card/label-value-card.component.css +0 -34
- package/src/lib/label-value-card/label-value-card.component.html +0 -12
- package/src/lib/label-value-card/label-value-card.component.ts +0 -15
- package/src/lib/loader/loader.component.css +0 -127
- package/src/lib/loader/loader.component.html +0 -37
- package/src/lib/loader/loader.component.spec.ts +0 -23
- package/src/lib/loader/loader.component.ts +0 -13
- package/src/lib/master-control.component.css +0 -0
- package/src/lib/master-control.component.html +0 -216
- package/src/lib/master-control.component.spec.ts +0 -23
- package/src/lib/master-control.component.ts +0 -143
- package/src/lib/master-control.service.spec.ts +0 -16
- package/src/lib/master-control.service.ts +0 -214
- package/src/lib/medial-questions/medial-questions.component.css +0 -52
- package/src/lib/medial-questions/medial-questions.component.html +0 -250
- package/src/lib/medial-questions/medial-questions.component.ts +0 -40371
- package/src/lib/medial-questions/questions.json +0 -39682
- package/src/lib/mob-number/mob-number.component.css +0 -141
- package/src/lib/mob-number/mob-number.component.html +0 -82
- package/src/lib/mob-number/mob-number.component.ts +0 -53
- package/src/lib/multiple-select/multiple-select.component.css +0 -331
- package/src/lib/multiple-select/multiple-select.component.html +0 -100
- package/src/lib/multiple-select/multiple-select.component.ts +0 -115
- package/src/lib/neutral-snackbar/neutral-snackbar.component.css +0 -31
- package/src/lib/neutral-snackbar/neutral-snackbar.component.html +0 -21
- package/src/lib/neutral-snackbar/neutral-snackbar.component.ts +0 -19
- package/src/lib/other-benefits/other-benefits.component.css +0 -78
- package/src/lib/other-benefits/other-benefits.component.html +0 -21
- package/src/lib/other-benefits/other-benefits.component.ts +0 -13
- package/src/lib/otp-mob-number/otp-mob-number.component.css +0 -171
- package/src/lib/otp-mob-number/otp-mob-number.component.html +0 -101
- package/src/lib/otp-mob-number/otp-mob-number.component.ts +0 -54
- package/src/lib/otp-textbox/otp-textbox.component.css +0 -168
- package/src/lib/otp-textbox/otp-textbox.component.html +0 -84
- package/src/lib/otp-textbox/otp-textbox.component.ts +0 -57
- package/src/lib/page-nudge/page-nudge.component.css +0 -35
- package/src/lib/page-nudge/page-nudge.component.html +0 -13
- package/src/lib/page-nudge/page-nudge.component.ts +0 -13
- package/src/lib/pay-get-card/pay-get-card.component.css +0 -36
- package/src/lib/pay-get-card/pay-get-card.component.html +0 -20
- package/src/lib/pay-get-card/pay-get-card.component.ts +0 -18
- package/src/lib/radio/radio.component.css +0 -57
- package/src/lib/radio/radio.component.html +0 -37
- package/src/lib/radio/radio.component.ts +0 -55
- package/src/lib/search-multi-select/search-multi-select.component.css +0 -325
- package/src/lib/search-multi-select/search-multi-select.component.html +0 -125
- package/src/lib/search-multi-select/search-multi-select.component.ts +0 -164
- package/src/lib/select/select.component.css +0 -246
- package/src/lib/select/select.component.html +0 -72
- package/src/lib/select/select.component.ts +0 -95
- package/src/lib/select-textbox/select-textbox.component.css +0 -262
- package/src/lib/select-textbox/select-textbox.component.html +0 -77
- package/src/lib/select-textbox/select-textbox.component.ts +0 -72
- package/src/lib/stepper/stepper.component.css +0 -25
- package/src/lib/stepper/stepper.component.html +0 -16
- package/src/lib/stepper/stepper.component.ts +0 -20
- package/src/lib/sub-header/sub-header.component.css +0 -13
- package/src/lib/sub-header/sub-header.component.html +0 -9
- package/src/lib/sub-header/sub-header.component.ts +0 -13
- package/src/lib/subscript-textbox/subscript-textbox.component.css +0 -139
- package/src/lib/subscript-textbox/subscript-textbox.component.html +0 -85
- package/src/lib/subscript-textbox/subscript-textbox.component.ts +0 -53
- package/src/lib/success-snackbar/success-snackbar.component.css +0 -32
- package/src/lib/success-snackbar/success-snackbar.component.html +0 -21
- package/src/lib/success-snackbar/success-snackbar.component.ts +0 -19
- package/src/lib/suffix-textbox/suffix-textbox.component.css +0 -157
- package/src/lib/suffix-textbox/suffix-textbox.component.html +0 -84
- package/src/lib/suffix-textbox/suffix-textbox.component.ts +0 -54
- package/src/lib/tab/tab.component.css +0 -19
- package/src/lib/tab/tab.component.html +0 -17
- package/src/lib/tab/tab.component.ts +0 -27
- package/src/lib/table/table.component.css +0 -121
- package/src/lib/table/table.component.html +0 -41
- package/src/lib/table/table.component.spec.ts +0 -23
- package/src/lib/table/table.component.ts +0 -84
- package/src/lib/tag-mob-number/tag-mob-number.component.css +0 -167
- package/src/lib/tag-mob-number/tag-mob-number.component.html +0 -95
- package/src/lib/tag-mob-number/tag-mob-number.component.ts +0 -55
- package/src/lib/textarea/textarea.component.css +0 -34
- package/src/lib/textarea/textarea.component.html +0 -23
- package/src/lib/textarea/textarea.component.ts +0 -16
- package/src/lib/textbox/textbox.component.css +0 -118
- package/src/lib/textbox/textbox.component.html +0 -80
- package/src/lib/textbox/textbox.component.ts +0 -55
- package/src/lib/textbox-with-image/textbox-with-image.component.css +0 -118
- package/src/lib/textbox-with-image/textbox-with-image.component.html +0 -82
- package/src/lib/textbox-with-image/textbox-with-image.component.ts +0 -47
- package/src/lib/textbox-with-text/textbox-with-text.component.css +0 -124
- package/src/lib/textbox-with-text/textbox-with-text.component.html +0 -84
- package/src/lib/textbox-with-text/textbox-with-text.component.ts +0 -53
- package/src/lib/textbox-with-underscore/textbox-with-underscore.component.css +0 -121
- package/src/lib/textbox-with-underscore/textbox-with-underscore.component.html +0 -79
- package/src/lib/textbox-with-underscore/textbox-with-underscore.component.ts +0 -62
- package/src/lib/toggle/toggle.component.css +0 -101
- package/src/lib/toggle/toggle.component.html +0 -39
- package/src/lib/toggle/toggle.component.ts +0 -16
- package/src/lib/toggle-button/toggle-button.component.css +0 -87
- package/src/lib/toggle-button/toggle-button.component.html +0 -34
- package/src/lib/toggle-button/toggle-button.component.ts +0 -14
- package/src/lib/underscore-mob-number/underscore-mob-number.component.css +0 -147
- package/src/lib/underscore-mob-number/underscore-mob-number.component.html +0 -87
- package/src/lib/underscore-mob-number/underscore-mob-number.component.ts +0 -65
- package/src/lib/upload/upload.component.css +0 -81
- package/src/lib/upload/upload.component.html +0 -62
- package/src/lib/upload/upload.component.ts +0 -20
- package/src/lib/warning-snackbar/warning-snackbar.component.css +0 -29
- package/src/lib/warning-snackbar/warning-snackbar.component.html +0 -21
- package/src/lib/warning-snackbar/warning-snackbar.component.ts +0 -19
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<mat-checkbox *ngIf="field() && field()?.isVisible"
|
|
2
|
-
[name]="field()?.fieldName"
|
|
3
|
-
[id]="field()?.fieldName"
|
|
4
|
-
[disabled]="field()?.isDisable"
|
|
5
|
-
[required]="field()?.validators?.isRequired"
|
|
6
|
-
[checked]="inputValue"
|
|
7
|
-
(change)="onCheckboxChange($event)"
|
|
8
|
-
[ngStyle]="
|
|
9
|
-
{
|
|
10
|
-
'--checkbox-border-radius': field()?.controlStyle?.borderRadius,
|
|
11
|
-
'--checkbox-bg-color': field()?.controlStyle?.background ,
|
|
12
|
-
'--checkbox-border-color-focus': field()?.controlStyle?.focusBorderColor ,
|
|
13
|
-
'--checkbox-bg-color-focus': field()?.controlStyle?.focusBackground ,
|
|
14
|
-
'--checkbox-font-size': field()?.controlStyle?.fontSize ,
|
|
15
|
-
'--checkbox-font-weight': field()?.controlStyle?.fontWeight ,
|
|
16
|
-
'--checkbox-font-color': field()?.controlStyle?.color ,
|
|
17
|
-
}"
|
|
18
|
-
>
|
|
19
|
-
{{ field()?.label }}
|
|
20
|
-
</mat-checkbox>
|
|
21
|
-
<div class="error-message" *ngIf="false">
|
|
22
|
-
{{field()?.validators?.isRequiredMessage}}.
|
|
23
|
-
</div>
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, input } from '@angular/core';
|
|
3
|
-
import { ControlValueAccessor, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
-
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
5
|
-
import { MasterControlService } from '../master-control.service';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'lib-checkbox',
|
|
10
|
-
standalone: true,
|
|
11
|
-
imports: [CommonModule , MatCheckboxModule, ReactiveFormsModule],
|
|
12
|
-
templateUrl: './checkbox.component.html',
|
|
13
|
-
styleUrl: './checkbox.component.css',
|
|
14
|
-
providers: [
|
|
15
|
-
{
|
|
16
|
-
provide: NG_VALUE_ACCESSOR,
|
|
17
|
-
useExisting: CheckboxComponent,
|
|
18
|
-
multi: true
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
})
|
|
22
|
-
export class CheckboxComponent implements ControlValueAccessor {
|
|
23
|
-
constructor(public masterService : MasterControlService){}
|
|
24
|
-
field: any = input.required<any>();
|
|
25
|
-
|
|
26
|
-
inputValue: any = null;
|
|
27
|
-
_onChange: any = (inputValue:any) => {};
|
|
28
|
-
_unTouched: any = () => {};
|
|
29
|
-
|
|
30
|
-
writeValue(obj: any): void{
|
|
31
|
-
this.inputValue=obj;
|
|
32
|
-
};
|
|
33
|
-
registerOnChange(fn: any): void{
|
|
34
|
-
this._onChange = fn;
|
|
35
|
-
};
|
|
36
|
-
registerOnTouched(fn: any): void{
|
|
37
|
-
this._unTouched = fn;
|
|
38
|
-
};
|
|
39
|
-
setDisabledState?(isDisabled: boolean): void{};
|
|
40
|
-
|
|
41
|
-
onInputChange(event: any): void {
|
|
42
|
-
this.inputValue = event.target.value;
|
|
43
|
-
this._onChange(this.inputValue);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
onCheckboxChange(event: any): void {
|
|
47
|
-
// const target = event.target as HTMLInputElement;
|
|
48
|
-
this.inputValue = event.checked;
|
|
49
|
-
this._onChange(this.inputValue);
|
|
50
|
-
this._unTouched();
|
|
51
|
-
const css = this.field()?.controlStyle;
|
|
52
|
-
if (event.checked) {
|
|
53
|
-
document.body.style.setProperty('--custom-checkbox-border-focus', css?.focusBorderColor || '#ffbb00');
|
|
54
|
-
document.body.style.setProperty('--custom-checkbox-bg-color-focus', css?.focusBackground || '#ffbb00');
|
|
55
|
-
document.body.style.setProperty('--custom-checkbox-border-radius-checkbox', css?.borderRadius || '4px');
|
|
56
|
-
document.body.style.setProperty('--custom-font-size', css?.fontSize || '16px');
|
|
57
|
-
document.body.style.setProperty('--custom-font-weight', css?.fontWeight || '400');
|
|
58
|
-
document.body.style.setProperty('--custom-font-family', css?.fontFamily || 'Mulish');
|
|
59
|
-
document.body.style.setProperty('--custom-font-color', css?.color || '#444');
|
|
60
|
-
} else {
|
|
61
|
-
document.body.style.setProperty('--custom-border-color-focus', css?.focusBorderColor || '#ddd');
|
|
62
|
-
document.body.style.setProperty('--custom-bg-color-focus', css?.focusBackground || '#999');
|
|
63
|
-
document.body.style.setProperty('--custom-border-radius-checkbox', css?.borderRadius || '4px');
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
onInputBlur(): void {
|
|
68
|
-
this._unTouched();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
* {
|
|
2
|
-
font-family: "mulish" !important;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.discount-label{
|
|
6
|
-
color: #ECAF07;
|
|
7
|
-
background: #FFFBE5;
|
|
8
|
-
}
|
|
9
|
-
.discount-card{
|
|
10
|
-
max-height: 100px;
|
|
11
|
-
max-width: 346px;
|
|
12
|
-
border: 1px solid #ECECEC;
|
|
13
|
-
box-shadow: 0px 2px 15px 2px #E3E6EC99;
|
|
14
|
-
border-radius: 8px;
|
|
15
|
-
padding: 12px 16px 12px 16px;
|
|
16
|
-
letter-spacing: 0px;
|
|
17
|
-
}
|
|
18
|
-
.discount-card{
|
|
19
|
-
max-width: var(--discount-card-width, 346px) !important;
|
|
20
|
-
border-radius: var(--discount-border-radius, 8px) !important;
|
|
21
|
-
border-color: var(--discount-border-color, #ECECEC) !important;
|
|
22
|
-
border-width: var(--discount-border-width, 1px) !important;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.h2-extrabold{
|
|
26
|
-
font-size: 20px;
|
|
27
|
-
font-weight: 800;
|
|
28
|
-
color: #444;
|
|
29
|
-
}
|
|
30
|
-
.b3-regular{
|
|
31
|
-
font-weight: 400;
|
|
32
|
-
font-size: 12px;
|
|
33
|
-
color: #444;
|
|
34
|
-
}
|
|
35
|
-
.apply-btn{
|
|
36
|
-
background: #ffbb00;
|
|
37
|
-
max-width: 78px;
|
|
38
|
-
max-height: 24px;
|
|
39
|
-
border-radius: 32px;
|
|
40
|
-
padding: 0px 12px 4px 12px;
|
|
41
|
-
border: 1px solid #ffbb00;
|
|
42
|
-
font-size: 12px;
|
|
43
|
-
font-weight: 700;
|
|
44
|
-
color: #000;
|
|
45
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<p
|
|
2
|
-
class="discount-label b2-bold px-1"
|
|
3
|
-
*ngIf="field() && field()?.isVisible && field()?.isShowLabel"
|
|
4
|
-
>
|
|
5
|
-
{{ field()?.label }}
|
|
6
|
-
</p>
|
|
7
|
-
<div
|
|
8
|
-
class="discount-card"
|
|
9
|
-
*ngIf="field() && field()?.isVisible"
|
|
10
|
-
[ngStyle]="
|
|
11
|
-
{
|
|
12
|
-
'--discount-border-width': field()?.controlStyle?.borderWidth,
|
|
13
|
-
'--discount-card-width': field()?.controlStyle?.width ,
|
|
14
|
-
'--discount-border-radius': field()?.controlStyle?.borderRadius ,
|
|
15
|
-
'--discount-border-color': field()?.controlStyle?.borderColor ,
|
|
16
|
-
}"
|
|
17
|
-
>
|
|
18
|
-
<div class="d-flex justify-content-between">
|
|
19
|
-
<div>
|
|
20
|
-
<img
|
|
21
|
-
src="https://cdn.godigit.com/retail-life/discount-img-lib.svg"
|
|
22
|
-
alt=""
|
|
23
|
-
class="mx-1"
|
|
24
|
-
/>
|
|
25
|
-
<span class="h2-extrabold">5% </span>
|
|
26
|
-
<span class="b3-regular">off</span>
|
|
27
|
-
</div>
|
|
28
|
-
<div>
|
|
29
|
-
<button class="apply-btn">
|
|
30
|
-
<span class="my-1">
|
|
31
|
-
Apply
|
|
32
|
-
<img
|
|
33
|
-
src="https://cdn.godigit.com/retail-life/arrow_forward_lib.svg"
|
|
34
|
-
alt=""
|
|
35
|
-
/>
|
|
36
|
-
</span>
|
|
37
|
-
</button>
|
|
38
|
-
</div>
|
|
39
|
-
<div *ngIf="false">
|
|
40
|
-
<button class="remove-btn">
|
|
41
|
-
<span> Remove x </span>
|
|
42
|
-
</button>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
<div>
|
|
46
|
-
<p class="b2-bold m-0">Good Health Discount</p>
|
|
47
|
-
<p class="b3-regular">
|
|
48
|
-
Get extra 5% discount for keeping a healthy lifestyle!
|
|
49
|
-
</p>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, input } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'lib-discount',
|
|
6
|
-
standalone: true,
|
|
7
|
-
imports: [CommonModule],
|
|
8
|
-
templateUrl: './discount.component.html',
|
|
9
|
-
styleUrl: './discount.component.css'
|
|
10
|
-
})
|
|
11
|
-
export class DiscountComponent {
|
|
12
|
-
field: any = input.required<any>();
|
|
13
|
-
|
|
14
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
.discount-card-v2{
|
|
2
|
-
border-width: var(--discount-design-border-width , 1px);
|
|
3
|
-
border-color: var(--discount-design-border-color , #0BB68B);
|
|
4
|
-
border-style: var(--discount-design-border-style , solid) ;
|
|
5
|
-
width: var(--discount-design-width , fit-content);
|
|
6
|
-
border-radius: var(--discount-design-border-radius , 8px);
|
|
7
|
-
box-shadow: 0px 2px 15px 2px rgba(227, 230, 236, 0.6);
|
|
8
|
-
background: var(--discount-design-bg , #fff);
|
|
9
|
-
}
|
|
10
|
-
.discount-heading{
|
|
11
|
-
font-weight: var(--discount-heading-font-weight , 700);
|
|
12
|
-
font-size: var(--discount-heading-font-size , 12px);
|
|
13
|
-
color: var(--discount-heading-font-color , #444);
|
|
14
|
-
}
|
|
15
|
-
.discount-btn-remove{
|
|
16
|
-
border-radius: 32px;
|
|
17
|
-
border: 1px solid #EE0000;
|
|
18
|
-
background-color: white;
|
|
19
|
-
font-size: 12px;
|
|
20
|
-
font-weight: 700;
|
|
21
|
-
color: #EE0000;
|
|
22
|
-
display: flex;
|
|
23
|
-
background: #fff;
|
|
24
|
-
}
|
|
25
|
-
.remove-btn-cross{
|
|
26
|
-
font-size: 12.5px !important;
|
|
27
|
-
transform: translate(0px, 2px);
|
|
28
|
-
}
|
|
29
|
-
*{
|
|
30
|
-
font-family: 'Mulish' !important;
|
|
31
|
-
}
|
|
32
|
-
.material-icons{
|
|
33
|
-
font-family: 'Material Icons' !important;
|
|
34
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<div class="px-3 py-2 discount-card-v2" *ngIf="field() && field()?.isVisible" [ngStyle]="
|
|
2
|
-
{
|
|
3
|
-
'--discount-design-border-width': field()?.controlStyle?.borderWidth,
|
|
4
|
-
'--discount-design-border-color': field()?.controlStyle?.borderColor ,
|
|
5
|
-
'--discount-design-border-style': field()?.controlStyle?.borderStyle ,
|
|
6
|
-
'--discount-design-width': field()?.controlStyle?.width ,
|
|
7
|
-
'--discount-design-border-radius': field()?.controlStyle?.borderRadius ,
|
|
8
|
-
'--discount-design-bg': field()?.controlStyle?.background ,
|
|
9
|
-
}">
|
|
10
|
-
<div class="mb-2 discount-heading" [ngStyle]="
|
|
11
|
-
{
|
|
12
|
-
'--discount-heading-font-weight': field()?.controlStyle?.fontWeight ,
|
|
13
|
-
'--discount-heading-font-size': field()?.controlStyle?.fontSize ,
|
|
14
|
-
'--discount-heading-font-color': field()?.controlStyle?.color
|
|
15
|
-
}">{{field()?.label}}</div>
|
|
16
|
-
<div>
|
|
17
|
-
<button class="px-2 mt-1 discount-btn-remove"><div>Remove</div> <mat-icon class="pt-1 remove-btn-cross">close</mat-icon></button>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, input } from '@angular/core';
|
|
3
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'lib-discount-v2',
|
|
7
|
-
standalone: true,
|
|
8
|
-
imports: [MatIconModule , CommonModule],
|
|
9
|
-
templateUrl: './discount-v2.component.html',
|
|
10
|
-
styleUrl: './discount-v2.component.css'
|
|
11
|
-
})
|
|
12
|
-
export class DiscountV2Component {
|
|
13
|
-
field: any = input.required<any>();
|
|
14
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
.field-lable{
|
|
2
|
-
font-size: 10px !important;
|
|
3
|
-
font-weight: 700 !important;
|
|
4
|
-
color: #444 !important;
|
|
5
|
-
margin-bottom: 0px !important;
|
|
6
|
-
}
|
|
7
|
-
.error-message{
|
|
8
|
-
color: red;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/* focus css for mat-form-field */
|
|
12
|
-
::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused
|
|
13
|
-
.mat-mdc-notch-piece {
|
|
14
|
-
border-color: var(--custom-border-color-focus, #ffbb00) !important;
|
|
15
|
-
border-width: var(--custom-border-width-focus, 1.5px) !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
::ng-deep .mat-mdc-form-field {
|
|
19
|
-
background-color: var(--custom-bg-color, #ffffff) !important;
|
|
20
|
-
border-radius: var(--custom-border-radius , 7px) !important;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* hover css for mat-form-field */
|
|
24
|
-
|
|
25
|
-
::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(
|
|
26
|
-
.mdc-text-field--focused
|
|
27
|
-
):hover
|
|
28
|
-
.mdc-notched-outline
|
|
29
|
-
.mdc-notched-outline__leading {
|
|
30
|
-
border-color: var(--custom-border-color-hover, #ffbb00) !important;
|
|
31
|
-
border-width: var(--custom-border-width-hover, 1.5px) !important;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(
|
|
35
|
-
.mdc-text-field--focused
|
|
36
|
-
):hover
|
|
37
|
-
.mdc-notched-outline
|
|
38
|
-
.mdc-notched-outline__notch {
|
|
39
|
-
border-color: var(--custom-border-color-hover, #ffbb00) !important;
|
|
40
|
-
border-width: var(--custom-border-width-hover, 1.5px) !important;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(
|
|
44
|
-
.mdc-text-field--focused
|
|
45
|
-
):hover
|
|
46
|
-
.mdc-notched-outline
|
|
47
|
-
.mdc-notched-outline__trailing {
|
|
48
|
-
border-color: var(--custom-border-color-hover, #ffbb00) !important;
|
|
49
|
-
border-width: var(--custom-border-width-hover, 1.5px) !important;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/* regular css for mat-form-field */
|
|
53
|
-
::ng-deep .mdc-text-field--outlined .mat-mdc-notch-piece {
|
|
54
|
-
border-color: var(--custom-border-color, #dddddd) !important;
|
|
55
|
-
border-width: var(--custom-border-width, 1.5px) !important;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* field css for mat-form-input-field */
|
|
59
|
-
::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled)
|
|
60
|
-
.mdc-text-field__input {
|
|
61
|
-
caret-color: var(--custom-caret-color, #ffbb00) !important;
|
|
62
|
-
/* font-size: var(--custom-font-size, 16px) !important; */
|
|
63
|
-
font-size: 12px !important;
|
|
64
|
-
font-weight: var(--custom-font-weight, 400) !important;
|
|
65
|
-
font-family: var(--custom-font-family, 'Mulish') !important;
|
|
66
|
-
color: var(--custom-font-color, #444444) !important;
|
|
67
|
-
}
|
|
68
|
-
/* Error state for mat-form-field */
|
|
69
|
-
::ng-deep .mat-form-field-invalid
|
|
70
|
-
.mdc-text-field--outlined .mat-mdc-notch-piece {
|
|
71
|
-
border-color: var(--custom-border-color-error, red) !important;
|
|
72
|
-
border-width: var(--custom-border-width-error, 1.5px) !important;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
::ng-deep .mat-mdc-form-field.mat-form-field-disabled{
|
|
76
|
-
background: var(--custom-bg-color-disabled, #ECECEC) !important;
|
|
77
|
-
}
|
|
78
|
-
::ng-deep .mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input {
|
|
79
|
-
color : var(--custom-font-color-disabled, #999999) !important;
|
|
80
|
-
}
|
|
81
|
-
::ng-deep .mdc-label {
|
|
82
|
-
color: var(--custom-font-color, #444) !important;
|
|
83
|
-
font-size: var(--custom-font-size, 16px) !important;
|
|
84
|
-
font-weight: var(--custom-font-weight, 400) !important;
|
|
85
|
-
font-family: var(--custom-font-family, 'Mulish') !important;
|
|
86
|
-
}
|
|
87
|
-
::placeholder {
|
|
88
|
-
color: #8f8f8f !important;
|
|
89
|
-
font-size: 12px !important;
|
|
90
|
-
}
|
|
91
|
-
::ng-deep .mat-mdc-form-field-hint-wrapper{
|
|
92
|
-
padding: 0px !important;
|
|
93
|
-
}
|
|
94
|
-
::ng-deep .mat-mdc-form-field-error-wrapper{
|
|
95
|
-
padding: 0px !important;
|
|
96
|
-
}
|
|
97
|
-
::ng-deep .mat-mdc-form-field-error{
|
|
98
|
-
color: #EE0000 !important;
|
|
99
|
-
font-size: 12px;
|
|
100
|
-
font-weight: 500;
|
|
101
|
-
font-family: "Mulish" !important;
|
|
102
|
-
letter-spacing: 0;
|
|
103
|
-
}
|
|
104
|
-
::ng-deep .mdc-text-field--outlined {
|
|
105
|
-
--mdc-outlined-text-field-container-shape: var(--custom-border-radius , 7px) !important;
|
|
106
|
-
}
|
|
107
|
-
::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece {
|
|
108
|
-
border-color: var(--custom-border-color-error, red) !important;
|
|
109
|
-
border-width: var(--custom-border-width-error, 1.5px) !important;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
::ng-deep .mat-mdc-form-field-subscript-wrapper {
|
|
113
|
-
display: none !important;
|
|
114
|
-
}
|
|
115
|
-
* {
|
|
116
|
-
font-family: "mulish" !important;
|
|
117
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
<label
|
|
2
|
-
*ngIf="field() && field()?.isVisible && field().isShowLabel"
|
|
3
|
-
class="field-lable"
|
|
4
|
-
>{{ field()?.label
|
|
5
|
-
}}<span style="color: red" *ngIf="field() && field()?.validators?.isRequired"
|
|
6
|
-
>*</span
|
|
7
|
-
></label
|
|
8
|
-
>
|
|
9
|
-
<mat-form-field
|
|
10
|
-
class="w-100"
|
|
11
|
-
appearance="outline"
|
|
12
|
-
*ngIf="field() && field()?.isVisible"
|
|
13
|
-
[ngStyle]="{
|
|
14
|
-
'--custom-border-color': field()?.controlStyle?.borderColor ,
|
|
15
|
-
'--custom-border-width': field()?.controlStyle?.borderWidth ,
|
|
16
|
-
'--custom-border-radius': field()?.controlStyle?.borderRadius ,
|
|
17
|
-
'--custom-border-color-focus': field()?.controlStyle?.focusBorderColor ,
|
|
18
|
-
'--custom-border-width-focus': field()?.controlStyle?.focusBorderWidth ,
|
|
19
|
-
'--custom-border-color-hover': field()?.controlStyle?.hoverBorderColor ,
|
|
20
|
-
'--custom-border-width-hover': field()?.controlStyle?.hoverBorderWidth ,
|
|
21
|
-
'--custom-border-color-error': field()?.controlStyle?.errorBorderColor ,
|
|
22
|
-
'--custom-border-width-error': field()?.controlStyle?.errorBorderWidth ,
|
|
23
|
-
'--custom-font-size': field()?.controlStyle?.fontSize ,
|
|
24
|
-
'--custom-font-weight': field()?.controlStyle?.fontWeight ,
|
|
25
|
-
'--custom-font-family': field()?.controlStyle?.fontFamily ,
|
|
26
|
-
'--custom-font-color': field()?.controlStyle?.color ,
|
|
27
|
-
'--custom-caret-color': field()?.controlStyle?.caretColor ,
|
|
28
|
-
'--custom-font-color-disabled' : field()?.controlStyle?.disableColor ,
|
|
29
|
-
'--custom-bg-color-disabled' : field()?.controlStyle?.disableBackground ,
|
|
30
|
-
'--custom-bg-color': field()?.controlStyle?.background ,
|
|
31
|
-
'--custom-bg-color-focus': field()?.controlStyle?.focusBackground ,
|
|
32
|
-
}"
|
|
33
|
-
>
|
|
34
|
-
@if(reactiveFormControlobject()) {
|
|
35
|
-
<input
|
|
36
|
-
matInput
|
|
37
|
-
autocomplete="none"
|
|
38
|
-
type="text"
|
|
39
|
-
[name]="field()?.fieldName"
|
|
40
|
-
[id]="field()?.fieldName"
|
|
41
|
-
[placeholder]="field()?.placeHolder"
|
|
42
|
-
[required]="field()?.validators?.isRequired"
|
|
43
|
-
[pattern]="field()?.validators?.pattern"
|
|
44
|
-
[matDatepicker]="picker"
|
|
45
|
-
(keyup)="dateDivisionFormat($event)"
|
|
46
|
-
[disabled]="field()?.isDisable"
|
|
47
|
-
(dateChange)="onInputChange($event)"
|
|
48
|
-
(blur)="onInputBlur($event)"
|
|
49
|
-
[value]="inputValue"
|
|
50
|
-
[formControl]="reactiveFormControlobject()"
|
|
51
|
-
/>
|
|
52
|
-
}@else {
|
|
53
|
-
<input
|
|
54
|
-
matInput
|
|
55
|
-
autocomplete="none"
|
|
56
|
-
type="text"
|
|
57
|
-
[name]="field()?.fieldName"
|
|
58
|
-
[id]="field()?.fieldName"
|
|
59
|
-
[placeholder]="field()?.placeHolder"
|
|
60
|
-
[required]="field()?.validators?.isRequired"
|
|
61
|
-
[pattern]="field()?.validators?.pattern"
|
|
62
|
-
[matDatepicker]="picker"
|
|
63
|
-
(keyup)="dateDivisionFormat($event)"
|
|
64
|
-
[disabled]="field()?.isDisable"
|
|
65
|
-
(dateChange)="onInputChange($event)"
|
|
66
|
-
(blur)="onInputBlur($event)"
|
|
67
|
-
[value]="inputValue"
|
|
68
|
-
/>
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
<mat-datepicker-toggle matSuffix [for]="picker" *ngIf="false">
|
|
72
|
-
<img
|
|
73
|
-
src="https://cdn.godigit.com/digitPlusAssets/retail-life-icon/svgicon/date_picker_icon.svg"
|
|
74
|
-
style="width: 16px"
|
|
75
|
-
matDatepickerToggleIcon
|
|
76
|
-
/>
|
|
77
|
-
</mat-datepicker-toggle>
|
|
78
|
-
<mat-datepicker #picker></mat-datepicker>
|
|
79
|
-
<mat-error *ngIf="false">
|
|
80
|
-
{{ field()?.validators?.isRequiredMessage }}
|
|
81
|
-
</mat-error>
|
|
82
|
-
</mat-form-field>
|
|
83
|
-
<div class="error-message" *ngIf="false">
|
|
84
|
-
{{ field()?.validators?.isRequiredMessage }}.
|
|
85
|
-
</div>
|
|
86
|
-
<div class="error-message" *ngIf="false">
|
|
87
|
-
{{ field()?.validators?.patternMessage }}.
|
|
88
|
-
</div>
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, input } from '@angular/core';
|
|
3
|
-
import { ControlValueAccessor, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
-
import { MomentDateAdapter, MomentDateModule } from '@angular/material-moment-adapter';
|
|
5
|
-
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
|
6
|
-
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
7
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
8
|
-
import { MatInputModule } from '@angular/material/input';
|
|
9
|
-
import { MasterControlService } from '../master-control.service';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export const MY_DATE_FORMAT = {
|
|
13
|
-
parse: {
|
|
14
|
-
dateInput: [
|
|
15
|
-
'DD-MM-YYYY',
|
|
16
|
-
'MM/DD/YYYY',
|
|
17
|
-
'YYYY/MM/DD',
|
|
18
|
-
'DD/MM/YYYY',
|
|
19
|
-
'DD MMM YYYY',
|
|
20
|
-
'DD MMMM YYYY',
|
|
21
|
-
'DD-MMM-YYYY'
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
|
-
display: {
|
|
25
|
-
dateInput: 'DD-MMM-YYYY',
|
|
26
|
-
monthYearLabel: 'MMM YYYY',
|
|
27
|
-
dateA11yLabel: 'DD-MMM-YYYY',
|
|
28
|
-
monthYearA11yLabel: 'MMMM YYYY'
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
@Component({
|
|
33
|
-
selector: 'lib-dob',
|
|
34
|
-
standalone: true,
|
|
35
|
-
imports: [MatInputModule, MatFormFieldModule, CommonModule, MatDatepickerModule, MomentDateModule, ReactiveFormsModule],
|
|
36
|
-
providers: [
|
|
37
|
-
{
|
|
38
|
-
provide: NG_VALUE_ACCESSOR,
|
|
39
|
-
useExisting: DobComponent,
|
|
40
|
-
multi: true
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
provide: DateAdapter,
|
|
44
|
-
useClass: MomentDateAdapter,
|
|
45
|
-
deps: []
|
|
46
|
-
},
|
|
47
|
-
{ provide: MAT_DATE_FORMATS, useValue: MY_DATE_FORMAT }
|
|
48
|
-
],
|
|
49
|
-
templateUrl: './dob.component.html',
|
|
50
|
-
styleUrl: './dob.component.css',
|
|
51
|
-
})
|
|
52
|
-
export class DobComponent implements ControlValueAccessor {
|
|
53
|
-
field: any = input.required<any>();
|
|
54
|
-
inputValue: any = null;
|
|
55
|
-
reactiveFormControlobject : any = input<any>();
|
|
56
|
-
|
|
57
|
-
constructor(public service : MasterControlService) {}
|
|
58
|
-
|
|
59
|
-
dateDivisionFormat(event: any) {
|
|
60
|
-
let evt = event.target;
|
|
61
|
-
if (evt.value.length > 2 && !evt.value.substr(2, 1).includes('-')) {
|
|
62
|
-
evt.value = [evt.value.slice(0, 2), '-', evt.value.slice(2)].join('');
|
|
63
|
-
} else if (
|
|
64
|
-
evt.value.length > 5 &&
|
|
65
|
-
Number(evt.value.substr(3, 2)) &&
|
|
66
|
-
!evt.value.substr(5, 1).includes('-')
|
|
67
|
-
) {
|
|
68
|
-
evt.value = [evt.value.slice(0, 5), '-', evt.value.slice(5)].join('');
|
|
69
|
-
} else if (
|
|
70
|
-
evt.value.length > 6 &&
|
|
71
|
-
!Number(evt.value.substr(3, 2)) &&
|
|
72
|
-
!evt.value.substr(6, 1).includes('-')
|
|
73
|
-
) {
|
|
74
|
-
evt.value = [evt.value.slice(0, 6), '-', evt.value.slice(6)].join('');
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
_onChange: any = (inputValue:any) => {};
|
|
79
|
-
_unTouched: any = () => {};
|
|
80
|
-
|
|
81
|
-
writeValue(obj: any): void{
|
|
82
|
-
this.inputValue=obj;
|
|
83
|
-
};
|
|
84
|
-
registerOnChange(fn: any): void{
|
|
85
|
-
this._onChange = fn;
|
|
86
|
-
};
|
|
87
|
-
registerOnTouched(fn: any): void{
|
|
88
|
-
this._unTouched = fn;
|
|
89
|
-
};
|
|
90
|
-
setDisabledState?(isDisabled: boolean): void{};
|
|
91
|
-
|
|
92
|
-
onInputChange(event: any): void {
|
|
93
|
-
this.inputValue = event.target.value;
|
|
94
|
-
this._onChange(this.inputValue);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
onInputBlur(event : any): void {
|
|
98
|
-
if (!this.service.checkIfValueIsEmpty(event.target.value)) {
|
|
99
|
-
if (isNaN(Date.parse(event.target.value))) {
|
|
100
|
-
event.target.value = '';
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
this._unTouched();
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
* {
|
|
2
|
-
font-family: "mulish" !important;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.upload-label{
|
|
6
|
-
opacity: 0;
|
|
7
|
-
}
|
|
8
|
-
.upload-btn {
|
|
9
|
-
width: 100% !important;
|
|
10
|
-
height: 48px !important;
|
|
11
|
-
padding: 10px;
|
|
12
|
-
border-radius: 8px;
|
|
13
|
-
}
|
|
14
|
-
.upload-btn {
|
|
15
|
-
width: var(--upload-width , 100%) !important;
|
|
16
|
-
border-radius: var(--upload-border-radius , 8px) !important;
|
|
17
|
-
}
|
|
18
|
-
.lightbackground {
|
|
19
|
-
border-color: #999;
|
|
20
|
-
border-width: 1px;
|
|
21
|
-
border-style: dashed;
|
|
22
|
-
background: #ffffff;
|
|
23
|
-
color: #444;
|
|
24
|
-
font-size: 14px;
|
|
25
|
-
font-weight: 700;
|
|
26
|
-
}
|
|
27
|
-
.lightbackground {
|
|
28
|
-
border-color: var(--upload-border-color , #999) !important;
|
|
29
|
-
border-width: var(--upload-border-width , 1px) !important;
|
|
30
|
-
border-style: var(--upload-border-style , dashed) !important;
|
|
31
|
-
background: var(--upload-background-color , #ffffff) !important;
|
|
32
|
-
}
|
|
33
|
-
.upload-icon {
|
|
34
|
-
display: flex;
|
|
35
|
-
justify-content: center;
|
|
36
|
-
gap: 7px;
|
|
37
|
-
}
|
|
38
|
-
.upload-text{
|
|
39
|
-
color: #444 !important;
|
|
40
|
-
font-weight: 700 !important;
|
|
41
|
-
font-size: 14px !important;
|
|
42
|
-
}
|
|
43
|
-
.upload-text{
|
|
44
|
-
color: var(--upload-font-color , #444) !important;
|
|
45
|
-
font-size: var( --upload-font-size , 14px) !important;
|
|
46
|
-
font-weight: var(--upload-font-weight , 700) !important;
|
|
47
|
-
}
|
|
48
|
-
.field-lable{
|
|
49
|
-
font-size: 10px !important;
|
|
50
|
-
font-weight: 700 !important;
|
|
51
|
-
color: #444 !important;
|
|
52
|
-
margin-bottom: 0px !important;
|
|
53
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<label class="field-lable upload-label" *ngIf="field() && field()?.isVisible && field()?.isShowLabel">{{field()?.label}}</label>
|
|
2
|
-
<input
|
|
3
|
-
hidden
|
|
4
|
-
[type]="field()?.controlType"
|
|
5
|
-
#fileInput
|
|
6
|
-
(click)="(fileInput.value)"
|
|
7
|
-
[required]="field()?.validators?.isRequired"
|
|
8
|
-
/>
|
|
9
|
-
<button
|
|
10
|
-
type="button"
|
|
11
|
-
class="upload-btn lightbackground"
|
|
12
|
-
*ngIf="field() && field()?.isVisible"
|
|
13
|
-
[ngStyle]="{
|
|
14
|
-
'--upload-width': field()?.controlStyle?.width ,
|
|
15
|
-
'--upload-border-radius': field()?.controlStyle?.borderRadius ,
|
|
16
|
-
'--upload-border-color': field()?.controlStyle?.borderColor ,
|
|
17
|
-
'--upload-border-width': field()?.controlStyle?.borderWidth ,
|
|
18
|
-
'--upload-border-style': field()?.controlStyle?.borderStyle ,
|
|
19
|
-
'--upload-background-color': field()?.controlStyle?.background ,
|
|
20
|
-
'--upload-focus-border-color': field()?.controlStyle?.focusBorderColor ,
|
|
21
|
-
'--upload-focus-background-color': field()?.controlStyle?.focusBackground ,
|
|
22
|
-
}"
|
|
23
|
-
>
|
|
24
|
-
<span class="upload-icon">
|
|
25
|
-
<span
|
|
26
|
-
><img
|
|
27
|
-
src="https://cdn.godigit.com/retail-life/Download_Icon.svg"
|
|
28
|
-
alt=""
|
|
29
|
-
class="mb-1"
|
|
30
|
-
/></span>
|
|
31
|
-
<span class="upload-text" [ngStyle]="{
|
|
32
|
-
'--upload-font-color': field()?.controlStyle?.color ,
|
|
33
|
-
'--upload-font-size': field()?.controlStyle?.fontSize ,
|
|
34
|
-
'--upload-font-weight': field()?.controlStyle?.fontWeight,
|
|
35
|
-
'--upload-focus-font-color': field()?.controlStyle?.focusColor ,
|
|
36
|
-
}">{{ field()?.label }}</span>
|
|
37
|
-
</span>
|
|
38
|
-
</button>
|