@koalarx/ui 14.0.7 → 14.0.9
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/alert/esm2020/index.mjs +6 -6
- package/alert/esm2020/koalarx-ui-alert.mjs +4 -4
- package/alert/esm2020/lib/dialog-alert.component.mjs +48 -48
- package/alert/esm2020/lib/koala.alert-config.interface.mjs +1 -1
- package/alert/esm2020/lib/koala.alert.enum.mjs +8 -8
- package/alert/esm2020/lib/koala.alert.module.mjs +46 -46
- package/alert/esm2020/lib/koala.alert.service.mjs +19 -19
- package/alert/esm2020/lib/koala.request-code-to-alert-enum.translate.mjs +17 -17
- package/alert/fesm2015/koalarx-ui-alert.mjs +111 -111
- package/alert/fesm2015/koalarx-ui-alert.mjs.map +1 -1
- package/alert/fesm2020/koalarx-ui-alert.mjs +109 -109
- package/alert/fesm2020/koalarx-ui-alert.mjs.map +1 -1
- package/alert/index.d.ts +6 -6
- package/alert/lib/dialog-alert.component.d.ts +10 -10
- package/alert/lib/koala.alert-config.interface.d.ts +14 -14
- package/alert/lib/koala.alert.enum.d.ts +7 -7
- package/alert/lib/koala.alert.module.d.ts +12 -12
- package/alert/lib/koala.alert.service.d.ts +10 -10
- package/alert/lib/koala.request-code-to-alert-enum.translate.d.ts +4 -4
- package/button/esm2020/index.mjs +2 -2
- package/button/esm2020/koalarx-ui-button.mjs +4 -4
- package/button/esm2020/lib/button.component.mjs +44 -44
- package/button/esm2020/lib/koala.button.module.mjs +40 -40
- package/button/fesm2015/koalarx-ui-button.mjs +67 -67
- package/button/fesm2015/koalarx-ui-button.mjs.map +1 -1
- package/button/fesm2020/koalarx-ui-button.mjs +67 -67
- package/button/fesm2020/koalarx-ui-button.mjs.map +1 -1
- package/button/index.d.ts +2 -2
- package/button/lib/button.component.d.ts +18 -18
- package/button/lib/koala.button.module.d.ts +12 -12
- package/common/esm2020/index.mjs +4 -4
- package/common/esm2020/koalarx-ui-common.mjs +4 -4
- package/common/esm2020/lib/mask-options.mjs +3 -3
- package/common/esm2020/lib/services/csv/koala.csv.service.mjs +36 -36
- package/common/esm2020/lib/services/xlsx/koala.xlsx-config.interface.mjs +1 -1
- package/common/esm2020/lib/services/xlsx/koala.xlsx.service.mjs +127 -127
- package/common/fesm2015/koalarx-ui-common.mjs +160 -160
- package/common/fesm2015/koalarx-ui-common.mjs.map +1 -1
- package/common/fesm2020/koalarx-ui-common.mjs +155 -155
- package/common/fesm2020/koalarx-ui-common.mjs.map +1 -1
- package/common/index.d.ts +4 -4
- package/common/lib/mask-options.d.ts +2 -2
- package/common/lib/services/csv/koala.csv.service.d.ts +10 -10
- package/common/lib/services/xlsx/koala.xlsx-config.interface.d.ts +11 -11
- package/common/lib/services/xlsx/koala.xlsx.service.d.ts +12 -12
- package/core/esm2020/index.mjs +36 -36
- package/core/esm2020/koalarx-ui-core.mjs +4 -4
- package/core/esm2020/lib/environments/koalaEnvironment.mjs +3 -3
- package/core/esm2020/lib/helpers/mat-form-field.helper.mjs +16 -16
- package/core/esm2020/lib/loader/loader-bar-page.component.mjs +24 -24
- package/core/esm2020/lib/loader/loader-bar-page.interface.mjs +1 -1
- package/core/esm2020/lib/loader/loader-config.interface.mjs +1 -1
- package/core/esm2020/lib/ngx-koala.module.mjs +47 -47
- package/core/esm2020/lib/page/koala-language.helper.mjs +113 -113
- package/core/esm2020/lib/page/koala-page-pallet-colors.interface.mjs +1 -1
- package/core/esm2020/lib/page/koala.page.module.mjs +76 -76
- package/core/esm2020/lib/page/koala.user-menu-options.interface.mjs +1 -1
- package/core/esm2020/lib/page/notifications/koala.notification.interface.mjs +1 -1
- package/core/esm2020/lib/page/notifications/notification.component.mjs +43 -43
- package/core/esm2020/lib/page/page.component.mjs +302 -302
- package/core/esm2020/lib/router/koala.parameter-hash-location-stategy.mjs +18 -18
- package/core/esm2020/lib/services/api-requester/factory/koala.response.factory.mjs +43 -43
- package/core/esm2020/lib/services/api-requester/helpers/error/koala.client.error.mjs +2 -2
- package/core/esm2020/lib/services/api-requester/helpers/error/koala.errors.helper.mjs +45 -45
- package/core/esm2020/lib/services/api-requester/helpers/error/koala.not-found.error.mjs +2 -2
- package/core/esm2020/lib/services/api-requester/helpers/error/koala.success.error.mjs +2 -2
- package/core/esm2020/lib/services/api-requester/helpers/error/koala.unhautorized.error.mjs +2 -2
- package/core/esm2020/lib/services/api-requester/helpers/service/koala.request-header.helper.mjs +14 -14
- package/core/esm2020/lib/services/api-requester/koala.api-requester.base.mjs +86 -86
- package/core/esm2020/lib/services/api-requester/koala.api-requester.cache.mjs +37 -37
- package/core/esm2020/lib/services/api-requester/koala.api-requester.service.mjs +158 -158
- package/core/esm2020/lib/services/loader/koala.loader.service.mjs +34 -34
- package/core/esm2020/lib/services/openid/koala-oauth2-config.interface.mjs +1 -1
- package/core/esm2020/lib/services/openid/koala.oauth.config.mjs +29 -29
- package/core/esm2020/lib/services/openid/koala.oauth2.service.mjs +188 -188
- package/core/esm2020/lib/services/request/koala.request.service.mjs +52 -52
- package/core/esm2020/lib/services/token/koala.token.service.mjs +55 -55
- package/core/esm2020/lib/services/token/token.factory.mjs +26 -26
- package/core/fesm2015/koalarx-ui-core.mjs +1294 -1294
- package/core/fesm2015/koalarx-ui-core.mjs.map +1 -1
- package/core/fesm2020/koalarx-ui-core.mjs +1256 -1256
- package/core/fesm2020/koalarx-ui-core.mjs.map +1 -1
- package/core/index.d.ts +30 -30
- package/core/lib/environments/koalaEnvironment.d.ts +15 -15
- package/core/lib/helpers/mat-form-field.helper.d.ts +3 -3
- package/core/lib/loader/loader-bar-page.component.d.ts +9 -9
- package/core/lib/loader/loader-bar-page.interface.d.ts +5 -5
- package/core/lib/loader/loader-config.interface.d.ts +7 -7
- package/core/lib/ngx-koala.module.d.ts +12 -12
- package/core/lib/page/koala-language.helper.d.ts +19 -19
- package/core/lib/page/koala-page-pallet-colors.interface.d.ts +38 -38
- package/core/lib/page/koala.page.module.d.ts +21 -21
- package/core/lib/page/koala.user-menu-options.interface.d.ts +5 -5
- package/core/lib/page/notifications/koala.notification.interface.d.ts +6 -6
- package/core/lib/page/notifications/notification.component.d.ts +15 -15
- package/core/lib/page/page.component.d.ts +58 -58
- package/core/lib/router/koala.parameter-hash-location-stategy.d.ts +7 -7
- package/core/lib/services/api-requester/factory/koala.response.factory.d.ts +5 -5
- package/core/lib/services/api-requester/helpers/error/koala.client.error.d.ts +2 -2
- package/core/lib/services/api-requester/helpers/error/koala.errors.helper.d.ts +13 -13
- package/core/lib/services/api-requester/helpers/error/koala.not-found.error.d.ts +2 -2
- package/core/lib/services/api-requester/helpers/error/koala.success.error.d.ts +2 -2
- package/core/lib/services/api-requester/helpers/error/koala.unhautorized.error.d.ts +2 -2
- package/core/lib/services/api-requester/helpers/service/koala.request-header.helper.d.ts +4 -4
- package/core/lib/services/api-requester/koala.api-requester.base.d.ts +19 -19
- package/core/lib/services/api-requester/koala.api-requester.cache.d.ts +13 -13
- package/core/lib/services/api-requester/koala.api-requester.service.d.ts +24 -24
- package/core/lib/services/loader/koala.loader.service.d.ts +14 -14
- package/core/lib/services/openid/koala-oauth2-config.interface.d.ts +11 -11
- package/core/lib/services/openid/koala.oauth.config.d.ts +9 -9
- package/core/lib/services/openid/koala.oauth2.service.d.ts +82 -82
- package/core/lib/services/request/koala.request.service.d.ts +11 -11
- package/core/lib/services/token/koala.token.service.d.ts +26 -26
- package/core/lib/services/token/token.factory.d.ts +9 -9
- package/dialog/esm2020/index.mjs +3 -3
- package/dialog/esm2020/koalarx-ui-dialog.mjs +4 -4
- package/dialog/esm2020/lib/dialog.component.mjs +25 -25
- package/dialog/esm2020/lib/koala.dialog-template.interface.mjs +1 -1
- package/dialog/esm2020/lib/koala.dialog.module.mjs +36 -36
- package/dialog/esm2020/lib/koala.dialog.service.mjs +57 -57
- package/dialog/fesm2015/koalarx-ui-dialog.mjs +96 -96
- package/dialog/fesm2015/koalarx-ui-dialog.mjs.map +1 -1
- package/dialog/fesm2020/koalarx-ui-dialog.mjs +96 -96
- package/dialog/fesm2020/koalarx-ui-dialog.mjs.map +1 -1
- package/dialog/index.d.ts +3 -3
- package/dialog/lib/dialog.component.d.ts +11 -11
- package/dialog/lib/koala.dialog-template.interface.d.ts +9 -9
- package/dialog/lib/koala.dialog.module.d.ts +11 -11
- package/dialog/lib/koala.dialog.service.d.ts +14 -14
- package/dynamic-component/esm2020/index.mjs +5 -5
- package/dynamic-component/esm2020/koalarx-ui-dynamic-component.mjs +4 -4
- package/dynamic-component/esm2020/lib/koala-dynamic-component.component.mjs +1 -1
- package/dynamic-component/esm2020/lib/koala-dynamic-component.directive.mjs +16 -16
- package/dynamic-component/esm2020/lib/koala-dynamic-component.factory.mjs +40 -40
- package/dynamic-component/esm2020/lib/koala-dynamic-component.mjs +6 -6
- package/dynamic-component/esm2020/lib/koala-dynamic-component.module.mjs +23 -23
- package/dynamic-component/fesm2015/koalarx-ui-dynamic-component.mjs +71 -71
- package/dynamic-component/fesm2015/koalarx-ui-dynamic-component.mjs.map +1 -1
- package/dynamic-component/fesm2020/koalarx-ui-dynamic-component.mjs +70 -70
- package/dynamic-component/fesm2020/koalarx-ui-dynamic-component.mjs.map +1 -1
- package/dynamic-component/index.d.ts +5 -5
- package/dynamic-component/lib/koala-dynamic-component.component.d.ts +3 -3
- package/dynamic-component/lib/koala-dynamic-component.d.ts +6 -6
- package/dynamic-component/lib/koala-dynamic-component.directive.d.ts +8 -8
- package/dynamic-component/lib/koala-dynamic-component.factory.d.ts +14 -14
- package/dynamic-component/lib/koala-dynamic-component.module.d.ts +8 -8
- package/file-button/esm2020/index.mjs +4 -4
- package/file-button/esm2020/koalarx-ui-file-button.mjs +4 -4
- package/file-button/esm2020/lib/file-button.component.mjs +125 -125
- package/file-button/esm2020/lib/koala.btn-file.service.mjs +25 -25
- package/file-button/esm2020/lib/koala.file-button.module.mjs +36 -36
- package/file-button/esm2020/lib/koala.file.interface.mjs +1 -1
- package/file-button/fesm2015/koalarx-ui-file-button.mjs +174 -174
- package/file-button/fesm2015/koalarx-ui-file-button.mjs.map +1 -1
- package/file-button/fesm2020/koalarx-ui-file-button.mjs +165 -165
- package/file-button/fesm2020/koalarx-ui-file-button.mjs.map +1 -1
- package/file-button/index.d.ts +4 -4
- package/file-button/lib/file-button.component.d.ts +29 -29
- package/file-button/lib/koala.btn-file.service.d.ts +11 -11
- package/file-button/lib/koala.file-button.module.d.ts +11 -11
- package/file-button/lib/koala.file.interface.d.ts +5 -5
- package/folder-page/esm2020/index.mjs +3 -3
- package/folder-page/esm2020/koalarx-ui-folder-page.mjs +4 -4
- package/folder-page/esm2020/lib/folder.component.mjs +70 -70
- package/folder-page/esm2020/lib/koala-navigate-history.interface.mjs +1 -1
- package/folder-page/esm2020/lib/koala.folder-page.module.mjs +40 -40
- package/folder-page/fesm2015/koalarx-ui-folder-page.mjs +95 -95
- package/folder-page/fesm2015/koalarx-ui-folder-page.mjs.map +1 -1
- package/folder-page/fesm2020/koalarx-ui-folder-page.mjs +94 -94
- package/folder-page/fesm2020/koalarx-ui-folder-page.mjs.map +1 -1
- package/folder-page/index.d.ts +3 -3
- package/folder-page/lib/folder.component.d.ts +21 -21
- package/folder-page/lib/koala-navigate-history.interface.d.ts +4 -4
- package/folder-page/lib/koala.folder-page.module.d.ts +12 -12
- package/form/esm2020/index.mjs +19 -19
- package/form/esm2020/koalarx-ui-form.mjs +4 -4
- package/form/esm2020/lib/btn-submit/btn-submit.component.mjs +49 -49
- package/form/esm2020/lib/directives/koala-autofocus.directive.mjs +25 -25
- package/form/esm2020/lib/dynamic-form/builder/dynamic-form.builder.mjs +139 -138
- package/form/esm2020/lib/dynamic-form/builder/fields/autocomplete.builder.mjs +37 -37
- package/form/esm2020/lib/dynamic-form/builder/fields/field.base.mjs +147 -147
- package/form/esm2020/lib/dynamic-form/builder/fields/field.builder.mjs +6 -6
- package/form/esm2020/lib/dynamic-form/builder/fields/more-items.builder.mjs +56 -56
- package/form/esm2020/lib/dynamic-form/dynamic-form.component.mjs +598 -598
- package/form/esm2020/lib/dynamic-form/enums/dynamic-form-type-field.enum.mjs +34 -34
- package/form/esm2020/lib/dynamic-form/interfaces/koala-custom-validator-fn.interface.mjs +1 -1
- package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-autocomplete-options.interface.mjs +1 -1
- package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-autocomplete-multiple-config.interface.mjs +1 -1
- package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-config.interface.mjs +2 -2
- package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-field.interface.mjs +1 -1
- package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-more-itens-show-field-config.interface.mjs +1 -1
- package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-show-field.interface.mjs +1 -1
- package/form/esm2020/lib/dynamic-form/interfaces/koala.dynamic-set-value.interface.mjs +1 -1
- package/form/esm2020/lib/dynamic-form/koala.dynamic-form.service.mjs +212 -212
- package/form/esm2020/lib/dynamic-form/validators/autocomplete-selected.validator.mjs +9 -9
- package/form/esm2020/lib/dynamic-form/validators/cnpj.validator.mjs +9 -9
- package/form/esm2020/lib/dynamic-form/validators/cpf.validator.mjs +9 -9
- package/form/esm2020/lib/dynamic-form/validators/date-max.validator.mjs +10 -10
- package/form/esm2020/lib/dynamic-form/validators/date-min.validator.mjs +10 -10
- package/form/esm2020/lib/dynamic-form/validators/koala-dynamic-form-validator-result.helper.mjs +9 -9
- package/form/esm2020/lib/dynamic-form/validators/validation.helper.mjs +85 -85
- package/form/esm2020/lib/form.abstract.mjs +41 -41
- package/form/esm2020/lib/koala.form.module.mjs +132 -132
- package/form/esm2020/lib/show-invalid-fields/show-invalid-fields.mjs +8 -8
- package/form/fesm2015/koalarx-ui-form.mjs +1517 -1516
- package/form/fesm2015/koalarx-ui-form.mjs.map +1 -1
- package/form/fesm2020/koalarx-ui-form.mjs +1499 -1498
- package/form/fesm2020/koalarx-ui-form.mjs.map +1 -1
- package/form/index.d.ts +19 -19
- package/form/lib/btn-submit/btn-submit.component.d.ts +20 -20
- package/form/lib/directives/koala-autofocus.directive.d.ts +10 -10
- package/form/lib/dynamic-form/builder/dynamic-form.builder.d.ts +21 -21
- package/form/lib/dynamic-form/builder/fields/autocomplete.builder.d.ts +16 -16
- package/form/lib/dynamic-form/builder/fields/field.base.d.ts +42 -42
- package/form/lib/dynamic-form/builder/fields/field.builder.d.ts +8 -8
- package/form/lib/dynamic-form/builder/fields/more-items.builder.d.ts +17 -17
- package/form/lib/dynamic-form/dynamic-form.component.d.ts +54 -54
- package/form/lib/dynamic-form/enums/dynamic-form-type-field.enum.d.ts +33 -33
- package/form/lib/dynamic-form/interfaces/koala-custom-validator-fn.interface.d.ts +4 -4
- package/form/lib/dynamic-form/interfaces/koala.dynamic-autocomplete-options.interface.d.ts +4 -4
- package/form/lib/dynamic-form/interfaces/koala.dynamic-form-autocomplete-multiple-config.interface.d.ts +4 -4
- package/form/lib/dynamic-form/interfaces/koala.dynamic-form-config.interface.d.ts +12 -11
- package/form/lib/dynamic-form/interfaces/koala.dynamic-form-field.interface.d.ts +69 -69
- package/form/lib/dynamic-form/interfaces/koala.dynamic-form-more-itens-show-field-config.interface.d.ts +8 -8
- package/form/lib/dynamic-form/interfaces/koala.dynamic-form-show-field.interface.d.ts +5 -5
- package/form/lib/dynamic-form/interfaces/koala.dynamic-set-value.interface.d.ts +4 -4
- package/form/lib/dynamic-form/koala.dynamic-form.service.d.ts +28 -28
- package/form/lib/dynamic-form/validators/autocomplete-selected.validator.d.ts +4 -4
- package/form/lib/dynamic-form/validators/cnpj.validator.d.ts +4 -4
- package/form/lib/dynamic-form/validators/cpf.validator.d.ts +4 -4
- package/form/lib/dynamic-form/validators/date-max.validator.d.ts +2 -2
- package/form/lib/dynamic-form/validators/date-min.validator.d.ts +2 -2
- package/form/lib/dynamic-form/validators/koala-dynamic-form-validator-result.helper.d.ts +7 -7
- package/form/lib/dynamic-form/validators/validation.helper.d.ts +4 -4
- package/form/lib/form.abstract.d.ts +16 -16
- package/form/lib/koala.form.module.d.ts +25 -25
- package/form/lib/show-invalid-fields/show-invalid-fields.d.ts +6 -6
- package/icon/esm2020/index.mjs +3 -3
- package/icon/esm2020/koalarx-ui-icon.mjs +4 -4
- package/icon/esm2020/lib/icon.component.mjs +41 -41
- package/icon/esm2020/lib/koala.icon.module.mjs +24 -24
- package/icon/esm2020/lib/koala.icon.type.mjs +1 -1
- package/icon/fesm2015/koalarx-ui-icon.mjs +56 -56
- package/icon/fesm2015/koalarx-ui-icon.mjs.map +1 -1
- package/icon/fesm2020/koalarx-ui-icon.mjs +55 -55
- package/icon/fesm2020/koalarx-ui-icon.mjs.map +1 -1
- package/icon/index.d.ts +3 -3
- package/icon/lib/icon.component.d.ts +14 -14
- package/icon/lib/koala.icon.module.d.ts +8 -8
- package/icon/lib/koala.icon.type.d.ts +1 -1
- package/icons-animated/esm2020/index.mjs +4 -4
- package/icons-animated/esm2020/koalarx-ui-icons-animated.mjs +4 -4
- package/icons-animated/esm2020/lib/icons/downloading/downloading-icon-animated.component.mjs +23 -23
- package/icons-animated/esm2020/lib/icons/loading/loading-icon-animated.component.mjs +23 -23
- package/icons-animated/esm2020/lib/icons-animated.component.mjs +20 -20
- package/icons-animated/esm2020/lib/icons-animated.service.mjs +27 -27
- package/icons-animated/esm2020/lib/koala-icons-animated.module.mjs +30 -30
- package/icons-animated/fesm2015/koalarx-ui-icons-animated.mjs +95 -95
- package/icons-animated/fesm2015/koalarx-ui-icons-animated.mjs.map +1 -1
- package/icons-animated/fesm2020/koalarx-ui-icons-animated.mjs +93 -93
- package/icons-animated/fesm2020/koalarx-ui-icons-animated.mjs.map +1 -1
- package/icons-animated/index.d.ts +4 -4
- package/icons-animated/lib/icons/downloading/downloading-icon-animated.component.d.ts +12 -12
- package/icons-animated/lib/icons/loading/loading-icon-animated.component.d.ts +12 -12
- package/icons-animated/lib/icons-animated.component.d.ts +8 -8
- package/icons-animated/lib/icons-animated.service.d.ts +9 -9
- package/icons-animated/lib/koala-icons-animated.module.d.ts +10 -10
- package/list/esm2020/index.mjs +11 -11
- package/list/esm2020/koalarx-ui-list.mjs +4 -4
- package/list/esm2020/lib/koala-list-btn-collapse-sub-list-config.interface.mjs +1 -1
- package/list/esm2020/lib/koala-list-filter.interface.mjs +1 -1
- package/list/esm2020/lib/koala-list-form-filter.interface.mjs +1 -1
- package/list/esm2020/lib/koala-list-item-menu-option.interface.mjs +1 -1
- package/list/esm2020/lib/koala-list-item.interface.mjs +1 -1
- package/list/esm2020/lib/koala.list-config.interface.mjs +1 -1
- package/list/esm2020/lib/koala.list.module.mjs +68 -68
- package/list/esm2020/lib/koala.list.service.mjs +15 -15
- package/list/esm2020/lib/list-builder/list.builder.mjs +104 -104
- package/list/esm2020/lib/list.abstract.mjs +163 -163
- package/list/esm2020/lib/list.component.mjs +172 -172
- package/list/esm2020/lib/providers/pagination/pagination.provider.mjs +32 -32
- package/list/fesm2015/koalarx-ui-list.mjs +521 -521
- package/list/fesm2015/koalarx-ui-list.mjs.map +1 -1
- package/list/fesm2020/koalarx-ui-list.mjs +491 -491
- package/list/fesm2020/koalarx-ui-list.mjs.map +1 -1
- package/list/index.d.ts +11 -11
- package/list/lib/koala-list-btn-collapse-sub-list-config.interface.d.ts +8 -8
- package/list/lib/koala-list-filter.interface.d.ts +10 -10
- package/list/lib/koala-list-form-filter.interface.d.ts +8 -8
- package/list/lib/koala-list-item-menu-option.interface.d.ts +7 -7
- package/list/lib/koala-list-item.interface.d.ts +13 -13
- package/list/lib/koala.list-config.interface.d.ts +37 -37
- package/list/lib/koala.list.module.d.ts +17 -17
- package/list/lib/koala.list.service.d.ts +7 -7
- package/list/lib/list-builder/list.builder.d.ts +32 -32
- package/list/lib/list.abstract.d.ts +44 -44
- package/list/lib/list.component.d.ts +54 -54
- package/list/lib/providers/pagination/pagination.provider.d.ts +9 -9
- package/menu/esm2020/index.mjs +5 -5
- package/menu/esm2020/koalarx-ui-menu.mjs +4 -4
- package/menu/esm2020/lib/koala.menu-module.interface.mjs +1 -1
- package/menu/esm2020/lib/koala.menu-tool.interface.mjs +1 -1
- package/menu/esm2020/lib/koala.menu.module.mjs +36 -36
- package/menu/esm2020/lib/koala.menu.service.mjs +24 -24
- package/menu/esm2020/lib/menu.component.mjs +100 -100
- package/menu/fesm2015/koalarx-ui-menu.mjs +139 -139
- package/menu/fesm2015/koalarx-ui-menu.mjs.map +1 -1
- package/menu/fesm2020/koalarx-ui-menu.mjs +135 -135
- package/menu/fesm2020/koalarx-ui-menu.mjs.map +1 -1
- package/menu/index.d.ts +5 -5
- package/menu/lib/koala.menu-module.interface.d.ts +12 -12
- package/menu/lib/koala.menu-tool.interface.d.ts +6 -6
- package/menu/lib/koala.menu.module.d.ts +11 -11
- package/menu/lib/koala.menu.service.d.ts +10 -10
- package/menu/lib/menu.component.d.ts +22 -22
- package/package.json +1 -1
- package/question/esm2020/index.mjs +4 -4
- package/question/esm2020/koalarx-ui-question.mjs +4 -4
- package/question/esm2020/lib/dialog-question.component.mjs +25 -25
- package/question/esm2020/lib/koala-question-config.interface.mjs +1 -1
- package/question/esm2020/lib/koala.question.module.mjs +40 -40
- package/question/esm2020/lib/koala.question.service.mjs +26 -26
- package/question/fesm2015/koalarx-ui-question.mjs +68 -68
- package/question/fesm2015/koalarx-ui-question.mjs.map +1 -1
- package/question/fesm2020/koalarx-ui-question.mjs +66 -66
- package/question/fesm2020/koalarx-ui-question.mjs.map +1 -1
- package/question/index.d.ts +4 -4
- package/question/lib/dialog-question.component.d.ts +10 -10
- package/question/lib/koala-question-config.interface.d.ts +5 -5
- package/question/lib/koala.question.module.d.ts +12 -12
- package/question/lib/koala.question.service.d.ts +10 -10
- package/snackbar/esm2020/index.mjs +4 -4
- package/snackbar/esm2020/koalarx-ui-snackbar.mjs +4 -4
- package/snackbar/esm2020/lib/koala.snackbar.component.mjs +22 -22
- package/snackbar/esm2020/lib/koala.snackbar.interface.mjs +1 -1
- package/snackbar/esm2020/lib/koala.snackbar.module.mjs +36 -36
- package/snackbar/esm2020/lib/koala.snackbar.service.mjs +35 -35
- package/snackbar/fesm2015/koalarx-ui-snackbar.mjs +74 -74
- package/snackbar/fesm2015/koalarx-ui-snackbar.mjs.map +1 -1
- package/snackbar/fesm2020/koalarx-ui-snackbar.mjs +72 -72
- package/snackbar/fesm2020/koalarx-ui-snackbar.mjs.map +1 -1
- package/snackbar/index.d.ts +4 -4
- package/snackbar/lib/koala.snackbar.component.d.ts +10 -10
- package/snackbar/lib/koala.snackbar.interface.d.ts +4 -4
- package/snackbar/lib/koala.snackbar.module.d.ts +10 -10
- package/snackbar/lib/koala.snackbar.service.d.ts +12 -12
|
@@ -12,127 +12,127 @@ import * as i5 from '@koalarx/ui/dynamic-component';
|
|
|
12
12
|
import { KoalaDynamicComponentModule } from '@koalarx/ui/dynamic-component';
|
|
13
13
|
import * as i1$1 from '@koalarx/ui/dialog';
|
|
14
14
|
|
|
15
|
-
var KoalaAlertEnum;
|
|
16
|
-
(function (KoalaAlertEnum) {
|
|
17
|
-
KoalaAlertEnum[KoalaAlertEnum["success"] = 200] = "success";
|
|
18
|
-
KoalaAlertEnum[KoalaAlertEnum["badRequest"] = 400] = "badRequest";
|
|
19
|
-
KoalaAlertEnum[KoalaAlertEnum["unhautorized"] = 401] = "unhautorized";
|
|
20
|
-
KoalaAlertEnum[KoalaAlertEnum["notFound"] = 404] = "notFound";
|
|
21
|
-
KoalaAlertEnum[KoalaAlertEnum["internalServerError"] = 500] = "internalServerError";
|
|
15
|
+
var KoalaAlertEnum;
|
|
16
|
+
(function (KoalaAlertEnum) {
|
|
17
|
+
KoalaAlertEnum[KoalaAlertEnum["success"] = 200] = "success";
|
|
18
|
+
KoalaAlertEnum[KoalaAlertEnum["badRequest"] = 400] = "badRequest";
|
|
19
|
+
KoalaAlertEnum[KoalaAlertEnum["unhautorized"] = 401] = "unhautorized";
|
|
20
|
+
KoalaAlertEnum[KoalaAlertEnum["notFound"] = 404] = "notFound";
|
|
21
|
+
KoalaAlertEnum[KoalaAlertEnum["internalServerError"] = 500] = "internalServerError";
|
|
22
22
|
})(KoalaAlertEnum || (KoalaAlertEnum = {}));
|
|
23
23
|
|
|
24
|
-
class DialogAlertComponent {
|
|
25
|
-
constructor(alert) {
|
|
26
|
-
this.alert = alert;
|
|
27
|
-
if (alert.alertEnum) {
|
|
28
|
-
switch (alert.alertEnum) {
|
|
29
|
-
case KoalaAlertEnum.success:
|
|
30
|
-
this.icon = 'check_circle';
|
|
31
|
-
this.iconColor = 'success';
|
|
32
|
-
break;
|
|
33
|
-
case KoalaAlertEnum.notFound:
|
|
34
|
-
this.icon = 'visibility_off';
|
|
35
|
-
this.iconColor = 'notFound';
|
|
36
|
-
break;
|
|
37
|
-
case KoalaAlertEnum.internalServerError:
|
|
38
|
-
this.icon = 'error';
|
|
39
|
-
this.iconColor = 'error';
|
|
40
|
-
break;
|
|
41
|
-
case KoalaAlertEnum.badRequest:
|
|
42
|
-
this.icon = 'warning';
|
|
43
|
-
this.iconColor = 'badRequest';
|
|
44
|
-
break;
|
|
45
|
-
case KoalaAlertEnum.unhautorized:
|
|
46
|
-
this.icon = 'no_encryption';
|
|
47
|
-
this.iconColor = 'unhautorized';
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
DialogAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
54
|
-
DialogAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
56
|
-
type: Component,
|
|
57
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"content\" mat-dialog-content>\n <mat-icon *ngIf=\"alert.alertEnum else avatar\" [ngClass]=\"iconColor ?? ''\">{{icon}}</mat-icon>\n <ng-template #avatar>\n <koala-dynamic-component [dynamicComponent]=\"alert.avatar\"></koala-dynamic-component>\n </ng-template>\n <p [innerHTML]=\"alert.message\" class=\"w-100 alert-message text-center\"></p>\n</div>\n<div align=\"center\" mat-dialog-actions>\n\t<div *ngFor=\"let action of alert?.actions\">\n\t <button\n\t\t (click)=\"action.action()\"\n\t\t *ngIf=\"action.show\"\n\t\t [color]=\"action.color\"\n\t\t mat-dialog-close\n\t\t mat-raised-button>\n\t {{action.text}}\n\t </button>\n\t</div>\n <button color=\"primary\" mat-dialog-close mat-raised-button>Ok</button>\n</div>\n", styles: [".content{color:#616161}.content .alert-message{display:inline-block;margin:15px auto;font-family:OpenSans,sans-serif;font-weight:700}.content mat-icon{position:relative;display:block;margin:15px auto;width:60px;height:60px;font-size:60px}.content mat-icon.success{color:#4caf50}.content mat-icon.notFound{color:#2196f3}.content mat-icon.error{color:#e53935}.content mat-icon.badRequest{color:#ffc107}.content mat-icon.unhautorized{color:#ff9800}\n"] }]
|
|
58
|
-
}], ctorParameters: function () {
|
|
59
|
-
return [{ type: undefined, decorators: [{
|
|
60
|
-
type: Inject,
|
|
61
|
-
args: [MAT_DIALOG_DATA]
|
|
62
|
-
}] }];
|
|
24
|
+
class DialogAlertComponent {
|
|
25
|
+
constructor(alert) {
|
|
26
|
+
this.alert = alert;
|
|
27
|
+
if (alert.alertEnum) {
|
|
28
|
+
switch (alert.alertEnum) {
|
|
29
|
+
case KoalaAlertEnum.success:
|
|
30
|
+
this.icon = 'check_circle';
|
|
31
|
+
this.iconColor = 'success';
|
|
32
|
+
break;
|
|
33
|
+
case KoalaAlertEnum.notFound:
|
|
34
|
+
this.icon = 'visibility_off';
|
|
35
|
+
this.iconColor = 'notFound';
|
|
36
|
+
break;
|
|
37
|
+
case KoalaAlertEnum.internalServerError:
|
|
38
|
+
this.icon = 'error';
|
|
39
|
+
this.iconColor = 'error';
|
|
40
|
+
break;
|
|
41
|
+
case KoalaAlertEnum.badRequest:
|
|
42
|
+
this.icon = 'warning';
|
|
43
|
+
this.iconColor = 'badRequest';
|
|
44
|
+
break;
|
|
45
|
+
case KoalaAlertEnum.unhautorized:
|
|
46
|
+
this.icon = 'no_encryption';
|
|
47
|
+
this.iconColor = 'unhautorized';
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
DialogAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogAlertComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
54
|
+
DialogAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DialogAlertComponent, selector: "ng-component", ngImport: i0, template: "<div class=\"content\" mat-dialog-content>\n <mat-icon *ngIf=\"alert.alertEnum else avatar\" [ngClass]=\"iconColor ?? ''\">{{icon}}</mat-icon>\n <ng-template #avatar>\n <koala-dynamic-component [dynamicComponent]=\"alert.avatar\"></koala-dynamic-component>\n </ng-template>\n <p [innerHTML]=\"alert.message\" class=\"w-100 alert-message text-center\"></p>\n</div>\n<div align=\"center\" mat-dialog-actions>\n\t<div *ngFor=\"let action of alert?.actions\">\n\t <button\n\t\t (click)=\"action.action()\"\n\t\t *ngIf=\"action.show\"\n\t\t [color]=\"action.color\"\n\t\t mat-dialog-close\n\t\t mat-raised-button>\n\t {{action.text}}\n\t </button>\n\t</div>\n <button color=\"primary\" mat-dialog-close mat-raised-button>Ok</button>\n</div>\n", styles: [".content{color:#616161}.content .alert-message{display:inline-block;margin:15px auto;font-family:OpenSans,sans-serif;font-weight:700}.content mat-icon{position:relative;display:block;margin:15px auto;width:60px;height:60px;font-size:60px}.content mat-icon.success{color:#4caf50}.content mat-icon.notFound{color:#2196f3}.content mat-icon.error{color:#e53935}.content mat-icon.badRequest{color:#ffc107}.content mat-icon.unhautorized{color:#ff9800}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.KoalaDynamicComponentFactory, selector: "koala-dynamic-component", inputs: ["dynamicComponent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogAlertComponent, decorators: [{
|
|
56
|
+
type: Component,
|
|
57
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"content\" mat-dialog-content>\n <mat-icon *ngIf=\"alert.alertEnum else avatar\" [ngClass]=\"iconColor ?? ''\">{{icon}}</mat-icon>\n <ng-template #avatar>\n <koala-dynamic-component [dynamicComponent]=\"alert.avatar\"></koala-dynamic-component>\n </ng-template>\n <p [innerHTML]=\"alert.message\" class=\"w-100 alert-message text-center\"></p>\n</div>\n<div align=\"center\" mat-dialog-actions>\n\t<div *ngFor=\"let action of alert?.actions\">\n\t <button\n\t\t (click)=\"action.action()\"\n\t\t *ngIf=\"action.show\"\n\t\t [color]=\"action.color\"\n\t\t mat-dialog-close\n\t\t mat-raised-button>\n\t {{action.text}}\n\t </button>\n\t</div>\n <button color=\"primary\" mat-dialog-close mat-raised-button>Ok</button>\n</div>\n", styles: [".content{color:#616161}.content .alert-message{display:inline-block;margin:15px auto;font-family:OpenSans,sans-serif;font-weight:700}.content mat-icon{position:relative;display:block;margin:15px auto;width:60px;height:60px;font-size:60px}.content mat-icon.success{color:#4caf50}.content mat-icon.notFound{color:#2196f3}.content mat-icon.error{color:#e53935}.content mat-icon.badRequest{color:#ffc107}.content mat-icon.unhautorized{color:#ff9800}\n"] }]
|
|
58
|
+
}], ctorParameters: function () {
|
|
59
|
+
return [{ type: undefined, decorators: [{
|
|
60
|
+
type: Inject,
|
|
61
|
+
args: [MAT_DIALOG_DATA]
|
|
62
|
+
}] }];
|
|
63
63
|
} });
|
|
64
64
|
|
|
65
|
-
class KoalaRequestCodeToAlertEnumTranslate {
|
|
66
|
-
static translate(statusCode) {
|
|
67
|
-
switch (statusCode) {
|
|
68
|
-
case 400:
|
|
69
|
-
case 422:
|
|
70
|
-
case 405:
|
|
71
|
-
return KoalaAlertEnum.badRequest;
|
|
72
|
-
case 404:
|
|
73
|
-
return KoalaAlertEnum.notFound;
|
|
74
|
-
case 401:
|
|
75
|
-
return KoalaAlertEnum.unhautorized;
|
|
76
|
-
default:
|
|
77
|
-
return KoalaAlertEnum.internalServerError;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
65
|
+
class KoalaRequestCodeToAlertEnumTranslate {
|
|
66
|
+
static translate(statusCode) {
|
|
67
|
+
switch (statusCode) {
|
|
68
|
+
case 400:
|
|
69
|
+
case 422:
|
|
70
|
+
case 405:
|
|
71
|
+
return KoalaAlertEnum.badRequest;
|
|
72
|
+
case 404:
|
|
73
|
+
return KoalaAlertEnum.notFound;
|
|
74
|
+
case 401:
|
|
75
|
+
return KoalaAlertEnum.unhautorized;
|
|
76
|
+
default:
|
|
77
|
+
return KoalaAlertEnum.internalServerError;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
class KoalaAlertService {
|
|
83
|
-
constructor(dialogService) {
|
|
84
|
-
this.dialogService = dialogService;
|
|
85
|
-
}
|
|
86
|
-
create(alertConfig) {
|
|
87
|
-
this.dialogService.open(DialogAlertComponent, 'auto', alertConfig);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
KoalaAlertService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
91
|
-
KoalaAlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
93
|
-
type: Injectable,
|
|
94
|
-
args: [{ providedIn: "any" }]
|
|
82
|
+
class KoalaAlertService {
|
|
83
|
+
constructor(dialogService) {
|
|
84
|
+
this.dialogService = dialogService;
|
|
85
|
+
}
|
|
86
|
+
create(alertConfig) {
|
|
87
|
+
this.dialogService.open(DialogAlertComponent, 'auto', alertConfig);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
KoalaAlertService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertService, deps: [{ token: i1$1.KoalaDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
91
|
+
KoalaAlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertService, providedIn: "any" });
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertService, decorators: [{
|
|
93
|
+
type: Injectable,
|
|
94
|
+
args: [{ providedIn: "any" }]
|
|
95
95
|
}], ctorParameters: function () { return [{ type: i1$1.KoalaDialogService }]; } });
|
|
96
96
|
|
|
97
|
-
class KoalaAlertModule {
|
|
98
|
-
}
|
|
99
|
-
KoalaAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
100
|
-
KoalaAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
101
|
-
MatDialogModule,
|
|
102
|
-
MatButtonModule,
|
|
103
|
-
MatIconModule,
|
|
104
|
-
KoalaDynamicComponentModule], exports: [DialogAlertComponent] });
|
|
105
|
-
KoalaAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
106
|
-
KoalaAlertService
|
|
107
|
-
], imports: [CommonModule,
|
|
108
|
-
MatDialogModule,
|
|
109
|
-
MatButtonModule,
|
|
110
|
-
MatIconModule,
|
|
111
|
-
KoalaDynamicComponentModule] });
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
113
|
-
type: NgModule,
|
|
114
|
-
args: [{
|
|
115
|
-
declarations: [
|
|
116
|
-
DialogAlertComponent
|
|
117
|
-
],
|
|
118
|
-
imports: [
|
|
119
|
-
CommonModule,
|
|
120
|
-
MatDialogModule,
|
|
121
|
-
MatButtonModule,
|
|
122
|
-
MatIconModule,
|
|
123
|
-
KoalaDynamicComponentModule
|
|
124
|
-
],
|
|
125
|
-
providers: [
|
|
126
|
-
KoalaAlertService
|
|
127
|
-
],
|
|
128
|
-
exports: [
|
|
129
|
-
DialogAlertComponent
|
|
130
|
-
]
|
|
131
|
-
}]
|
|
97
|
+
class KoalaAlertModule {
|
|
98
|
+
}
|
|
99
|
+
KoalaAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
100
|
+
KoalaAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertModule, declarations: [DialogAlertComponent], imports: [CommonModule,
|
|
101
|
+
MatDialogModule,
|
|
102
|
+
MatButtonModule,
|
|
103
|
+
MatIconModule,
|
|
104
|
+
KoalaDynamicComponentModule], exports: [DialogAlertComponent] });
|
|
105
|
+
KoalaAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertModule, providers: [
|
|
106
|
+
KoalaAlertService
|
|
107
|
+
], imports: [CommonModule,
|
|
108
|
+
MatDialogModule,
|
|
109
|
+
MatButtonModule,
|
|
110
|
+
MatIconModule,
|
|
111
|
+
KoalaDynamicComponentModule] });
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertModule, decorators: [{
|
|
113
|
+
type: NgModule,
|
|
114
|
+
args: [{
|
|
115
|
+
declarations: [
|
|
116
|
+
DialogAlertComponent
|
|
117
|
+
],
|
|
118
|
+
imports: [
|
|
119
|
+
CommonModule,
|
|
120
|
+
MatDialogModule,
|
|
121
|
+
MatButtonModule,
|
|
122
|
+
MatIconModule,
|
|
123
|
+
KoalaDynamicComponentModule
|
|
124
|
+
],
|
|
125
|
+
providers: [
|
|
126
|
+
KoalaAlertService
|
|
127
|
+
],
|
|
128
|
+
exports: [
|
|
129
|
+
DialogAlertComponent
|
|
130
|
+
]
|
|
131
|
+
}]
|
|
132
132
|
}] });
|
|
133
133
|
|
|
134
|
-
/**
|
|
135
|
-
* Generated bundle index. Do not edit.
|
|
134
|
+
/**
|
|
135
|
+
* Generated bundle index. Do not edit.
|
|
136
136
|
*/
|
|
137
137
|
|
|
138
138
|
export { DialogAlertComponent, KoalaAlertEnum, KoalaAlertModule, KoalaAlertService, KoalaRequestCodeToAlertEnumTranslate };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-alert.mjs","sources":["../../../projects/alert/src/lib/koala.alert.enum.ts","../../../projects/alert/src/lib/dialog-alert.component.ts","../../../projects/alert/src/lib/dialog-alert.component.html","../../../projects/alert/src/lib/koala.request-code-to-alert-enum.translate.ts","../../../projects/alert/src/lib/koala.alert.service.ts","../../../projects/alert/src/lib/koala.alert.module.ts","../../../projects/alert/src/koalarx-ui-alert.ts"],"sourcesContent":["export enum KoalaAlertEnum {\n success = 200,\n badRequest = 400,\n unhautorized = 401,\n notFound = 404,\n internalServerError = 500\n}\n","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { KoalaAlertConfigInterface } from './koala.alert-config.interface';\nimport { KoalaAlertEnum } from './koala.alert.enum';\n\n@Component({\n templateUrl: 'dialog-alert.component.html',\n styleUrls: ['dialog-alert.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DialogAlertComponent {\n public icon?: string;\n public iconColor?: string;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) public alert: KoalaAlertConfigInterface\n ) {\n if (alert.alertEnum) {\n switch (alert.alertEnum) {\n case KoalaAlertEnum.success:\n this.icon = 'check_circle';\n this.iconColor = 'success';\n break;\n case KoalaAlertEnum.notFound:\n this.icon = 'visibility_off';\n this.iconColor = 'notFound';\n break;\n case KoalaAlertEnum.internalServerError:\n this.icon = 'error';\n this.iconColor = 'error';\n break;\n case KoalaAlertEnum.badRequest:\n this.icon = 'warning';\n this.iconColor = 'badRequest';\n break;\n case KoalaAlertEnum.unhautorized:\n this.icon = 'no_encryption';\n this.iconColor = 'unhautorized';\n break;\n }\n }\n }\n}\n","<div class=\"content\" mat-dialog-content>\n <mat-icon *ngIf=\"alert.alertEnum else avatar\" [ngClass]=\"iconColor ?? ''\">{{icon}}</mat-icon>\n <ng-template #avatar>\n <koala-dynamic-component [dynamicComponent]=\"alert.avatar\"></koala-dynamic-component>\n </ng-template>\n <p [innerHTML]=\"alert.message\" class=\"w-100 alert-message text-center\"></p>\n</div>\n<div align=\"center\" mat-dialog-actions>\n\t<div *ngFor=\"let action of alert?.actions\">\n\t <button\n\t\t (click)=\"action.action()\"\n\t\t *ngIf=\"action.show\"\n\t\t [color]=\"action.color\"\n\t\t mat-dialog-close\n\t\t mat-raised-button>\n\t {{action.text}}\n\t </button>\n\t</div>\n <button color=\"primary\" mat-dialog-close mat-raised-button>Ok</button>\n</div>\n","import { KoalaAlertEnum } from './koala.alert.enum';\n\nexport class KoalaRequestCodeToAlertEnumTranslate {\n\n public static translate(statusCode: number): KoalaAlertEnum {\n switch (statusCode) {\n case 400:\n case 422:\n case 405:\n return KoalaAlertEnum.badRequest;\n case 404:\n return KoalaAlertEnum.notFound;\n case 401:\n return KoalaAlertEnum.unhautorized;\n default:\n return KoalaAlertEnum.internalServerError;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DialogAlertComponent } from './dialog-alert.component';\nimport { KoalaAlertConfigInterface } from './koala.alert-config.interface';\nimport { KoalaDialogService } from '@koalarx/ui/dialog';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaAlertService {\n\n constructor(private dialogService: KoalaDialogService) {\n }\n\n public create(alertConfig: KoalaAlertConfigInterface) {\n this.dialogService.open(DialogAlertComponent, 'auto', alertConfig);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DialogAlertComponent } from './dialog-alert.component';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { KoalaAlertService } from './koala.alert.service';\nimport { CommonModule } from '@angular/common';\nimport { KoalaDynamicComponentModule } from \"@koalarx/ui/dynamic-component\";\n\n@NgModule({\n declarations: [\n DialogAlertComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n MatButtonModule,\n MatIconModule,\n KoalaDynamicComponentModule\n ],\n providers: [\n KoalaAlertService\n ],\n exports: [\n DialogAlertComponent\n ]\n})\nexport class KoalaAlertModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AAAY,IAAA,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,CAAC;oBAC9B,MAAM;gBACR,KAAK,cAAc,CAAC,YAAY;AAC9B,oBAAA,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;AAC5B,oBAAA,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC;oBAChC,MAAM;AACT,aAAA;AACF,SAAA;KACF;;AA/BU,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-alert.mjs","sources":["../../../projects/alert/src/lib/koala.alert.enum.ts","../../../projects/alert/src/lib/dialog-alert.component.ts","../../../projects/alert/src/lib/dialog-alert.component.html","../../../projects/alert/src/lib/koala.request-code-to-alert-enum.translate.ts","../../../projects/alert/src/lib/koala.alert.service.ts","../../../projects/alert/src/lib/koala.alert.module.ts","../../../projects/alert/src/koalarx-ui-alert.ts"],"sourcesContent":["export enum KoalaAlertEnum {\n success = 200,\n badRequest = 400,\n unhautorized = 401,\n notFound = 404,\n internalServerError = 500\n}\n","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { KoalaAlertConfigInterface } from './koala.alert-config.interface';\nimport { KoalaAlertEnum } from './koala.alert.enum';\n\n@Component({\n templateUrl: 'dialog-alert.component.html',\n styleUrls: ['dialog-alert.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DialogAlertComponent {\n public icon?: string;\n public iconColor?: string;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) public alert: KoalaAlertConfigInterface\n ) {\n if (alert.alertEnum) {\n switch (alert.alertEnum) {\n case KoalaAlertEnum.success:\n this.icon = 'check_circle';\n this.iconColor = 'success';\n break;\n case KoalaAlertEnum.notFound:\n this.icon = 'visibility_off';\n this.iconColor = 'notFound';\n break;\n case KoalaAlertEnum.internalServerError:\n this.icon = 'error';\n this.iconColor = 'error';\n break;\n case KoalaAlertEnum.badRequest:\n this.icon = 'warning';\n this.iconColor = 'badRequest';\n break;\n case KoalaAlertEnum.unhautorized:\n this.icon = 'no_encryption';\n this.iconColor = 'unhautorized';\n break;\n }\n }\n }\n}\n","<div class=\"content\" mat-dialog-content>\n <mat-icon *ngIf=\"alert.alertEnum else avatar\" [ngClass]=\"iconColor ?? ''\">{{icon}}</mat-icon>\n <ng-template #avatar>\n <koala-dynamic-component [dynamicComponent]=\"alert.avatar\"></koala-dynamic-component>\n </ng-template>\n <p [innerHTML]=\"alert.message\" class=\"w-100 alert-message text-center\"></p>\n</div>\n<div align=\"center\" mat-dialog-actions>\n\t<div *ngFor=\"let action of alert?.actions\">\n\t <button\n\t\t (click)=\"action.action()\"\n\t\t *ngIf=\"action.show\"\n\t\t [color]=\"action.color\"\n\t\t mat-dialog-close\n\t\t mat-raised-button>\n\t {{action.text}}\n\t </button>\n\t</div>\n <button color=\"primary\" mat-dialog-close mat-raised-button>Ok</button>\n</div>\n","import { KoalaAlertEnum } from './koala.alert.enum';\n\nexport class KoalaRequestCodeToAlertEnumTranslate {\n\n public static translate(statusCode: number): KoalaAlertEnum {\n switch (statusCode) {\n case 400:\n case 422:\n case 405:\n return KoalaAlertEnum.badRequest;\n case 404:\n return KoalaAlertEnum.notFound;\n case 401:\n return KoalaAlertEnum.unhautorized;\n default:\n return KoalaAlertEnum.internalServerError;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DialogAlertComponent } from './dialog-alert.component';\nimport { KoalaAlertConfigInterface } from './koala.alert-config.interface';\nimport { KoalaDialogService } from '@koalarx/ui/dialog';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaAlertService {\n\n constructor(private dialogService: KoalaDialogService) {\n }\n\n public create(alertConfig: KoalaAlertConfigInterface) {\n this.dialogService.open(DialogAlertComponent, 'auto', alertConfig);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DialogAlertComponent } from './dialog-alert.component';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { KoalaAlertService } from './koala.alert.service';\nimport { CommonModule } from '@angular/common';\nimport { KoalaDynamicComponentModule } from \"@koalarx/ui/dynamic-component\";\n\n@NgModule({\n declarations: [\n DialogAlertComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n MatButtonModule,\n MatIconModule,\n KoalaDynamicComponentModule\n ],\n providers: [\n KoalaAlertService\n ],\n exports: [\n DialogAlertComponent\n ]\n})\nexport class KoalaAlertModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AAAY,IAAA,eAMX;AAND,CAAA,UAAY,cAAc,EAAA;IACxB,cAAA,CAAA,cAAA,CAAA,SAAA,CAAA,GAAA,GAAA,CAAA,GAAA,SAAa,CAAA;IACb,cAAA,CAAA,cAAA,CAAA,YAAA,CAAA,GAAA,GAAA,CAAA,GAAA,YAAgB,CAAA;IAChB,cAAA,CAAA,cAAA,CAAA,cAAA,CAAA,GAAA,GAAA,CAAA,GAAA,cAAkB,CAAA;IAClB,cAAA,CAAA,cAAA,CAAA,UAAA,CAAA,GAAA,GAAA,CAAA,GAAA,UAAc,CAAA;IACd,cAAA,CAAA,cAAA,CAAA,qBAAA,CAAA,GAAA,GAAA,CAAA,GAAA,qBAAyB,CAAA;AAC3B,CAAC,EANW,cAAc,KAAd,cAAc,GAMzB,EAAA,CAAA,CAAA;;MCIY,oBAAoB,CAAA;AAI/B,IAAA,WAAA,CACkC,KAAgC,EAAA;AAAhC,QAAA,IAAK,CAAA,KAAA,GAAL,KAAK,CAA2B;QAEhE,IAAI,KAAK,CAAC,SAAS,EAAE;YACnB,QAAQ,KAAK,CAAC,SAAS;gBACrB,KAAK,cAAc,CAAC,OAAO;AACzB,oBAAA,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;AAC3B,oBAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;oBAC3B,MAAM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ui/dynamic-component';
|
|
|
12
12
|
import { KoalaDynamicComponentModule } from '@koalarx/ui/dynamic-component';
|
|
13
13
|
import * as i1$1 from '@koalarx/ui/dialog';
|
|
14
14
|
|
|
15
|
-
var KoalaAlertEnum;
|
|
16
|
-
(function (KoalaAlertEnum) {
|
|
17
|
-
KoalaAlertEnum[KoalaAlertEnum["success"] = 200] = "success";
|
|
18
|
-
KoalaAlertEnum[KoalaAlertEnum["badRequest"] = 400] = "badRequest";
|
|
19
|
-
KoalaAlertEnum[KoalaAlertEnum["unhautorized"] = 401] = "unhautorized";
|
|
20
|
-
KoalaAlertEnum[KoalaAlertEnum["notFound"] = 404] = "notFound";
|
|
21
|
-
KoalaAlertEnum[KoalaAlertEnum["internalServerError"] = 500] = "internalServerError";
|
|
15
|
+
var KoalaAlertEnum;
|
|
16
|
+
(function (KoalaAlertEnum) {
|
|
17
|
+
KoalaAlertEnum[KoalaAlertEnum["success"] = 200] = "success";
|
|
18
|
+
KoalaAlertEnum[KoalaAlertEnum["badRequest"] = 400] = "badRequest";
|
|
19
|
+
KoalaAlertEnum[KoalaAlertEnum["unhautorized"] = 401] = "unhautorized";
|
|
20
|
+
KoalaAlertEnum[KoalaAlertEnum["notFound"] = 404] = "notFound";
|
|
21
|
+
KoalaAlertEnum[KoalaAlertEnum["internalServerError"] = 500] = "internalServerError";
|
|
22
22
|
})(KoalaAlertEnum || (KoalaAlertEnum = {}));
|
|
23
23
|
|
|
24
|
-
class DialogAlertComponent {
|
|
25
|
-
constructor(alert) {
|
|
26
|
-
this.alert = alert;
|
|
27
|
-
if (alert.alertEnum) {
|
|
28
|
-
switch (alert.alertEnum) {
|
|
29
|
-
case KoalaAlertEnum.success:
|
|
30
|
-
this.icon = 'check_circle';
|
|
31
|
-
this.iconColor = 'success';
|
|
32
|
-
break;
|
|
33
|
-
case KoalaAlertEnum.notFound:
|
|
34
|
-
this.icon = 'visibility_off';
|
|
35
|
-
this.iconColor = 'notFound';
|
|
36
|
-
break;
|
|
37
|
-
case KoalaAlertEnum.internalServerError:
|
|
38
|
-
this.icon = 'error';
|
|
39
|
-
this.iconColor = 'error';
|
|
40
|
-
break;
|
|
41
|
-
case KoalaAlertEnum.badRequest:
|
|
42
|
-
this.icon = 'warning';
|
|
43
|
-
this.iconColor = 'badRequest';
|
|
44
|
-
break;
|
|
45
|
-
case KoalaAlertEnum.unhautorized:
|
|
46
|
-
this.icon = 'no_encryption';
|
|
47
|
-
this.iconColor = 'unhautorized';
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
DialogAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
54
|
-
DialogAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
56
|
-
type: Component,
|
|
57
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"content\" mat-dialog-content>\n <mat-icon *ngIf=\"alert.alertEnum else avatar\" [ngClass]=\"iconColor ?? ''\">{{icon}}</mat-icon>\n <ng-template #avatar>\n <koala-dynamic-component [dynamicComponent]=\"alert.avatar\"></koala-dynamic-component>\n </ng-template>\n <p [innerHTML]=\"alert.message\" class=\"w-100 alert-message text-center\"></p>\n</div>\n<div align=\"center\" mat-dialog-actions>\n\t<div *ngFor=\"let action of alert?.actions\">\n\t <button\n\t\t (click)=\"action.action()\"\n\t\t *ngIf=\"action.show\"\n\t\t [color]=\"action.color\"\n\t\t mat-dialog-close\n\t\t mat-raised-button>\n\t {{action.text}}\n\t </button>\n\t</div>\n <button color=\"primary\" mat-dialog-close mat-raised-button>Ok</button>\n</div>\n", styles: [".content{color:#616161}.content .alert-message{display:inline-block;margin:15px auto;font-family:OpenSans,sans-serif;font-weight:700}.content mat-icon{position:relative;display:block;margin:15px auto;width:60px;height:60px;font-size:60px}.content mat-icon.success{color:#4caf50}.content mat-icon.notFound{color:#2196f3}.content mat-icon.error{color:#e53935}.content mat-icon.badRequest{color:#ffc107}.content mat-icon.unhautorized{color:#ff9800}\n"] }]
|
|
58
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
59
|
-
type: Inject,
|
|
60
|
-
args: [MAT_DIALOG_DATA]
|
|
24
|
+
class DialogAlertComponent {
|
|
25
|
+
constructor(alert) {
|
|
26
|
+
this.alert = alert;
|
|
27
|
+
if (alert.alertEnum) {
|
|
28
|
+
switch (alert.alertEnum) {
|
|
29
|
+
case KoalaAlertEnum.success:
|
|
30
|
+
this.icon = 'check_circle';
|
|
31
|
+
this.iconColor = 'success';
|
|
32
|
+
break;
|
|
33
|
+
case KoalaAlertEnum.notFound:
|
|
34
|
+
this.icon = 'visibility_off';
|
|
35
|
+
this.iconColor = 'notFound';
|
|
36
|
+
break;
|
|
37
|
+
case KoalaAlertEnum.internalServerError:
|
|
38
|
+
this.icon = 'error';
|
|
39
|
+
this.iconColor = 'error';
|
|
40
|
+
break;
|
|
41
|
+
case KoalaAlertEnum.badRequest:
|
|
42
|
+
this.icon = 'warning';
|
|
43
|
+
this.iconColor = 'badRequest';
|
|
44
|
+
break;
|
|
45
|
+
case KoalaAlertEnum.unhautorized:
|
|
46
|
+
this.icon = 'no_encryption';
|
|
47
|
+
this.iconColor = 'unhautorized';
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
DialogAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogAlertComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
54
|
+
DialogAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DialogAlertComponent, selector: "ng-component", ngImport: i0, template: "<div class=\"content\" mat-dialog-content>\n <mat-icon *ngIf=\"alert.alertEnum else avatar\" [ngClass]=\"iconColor ?? ''\">{{icon}}</mat-icon>\n <ng-template #avatar>\n <koala-dynamic-component [dynamicComponent]=\"alert.avatar\"></koala-dynamic-component>\n </ng-template>\n <p [innerHTML]=\"alert.message\" class=\"w-100 alert-message text-center\"></p>\n</div>\n<div align=\"center\" mat-dialog-actions>\n\t<div *ngFor=\"let action of alert?.actions\">\n\t <button\n\t\t (click)=\"action.action()\"\n\t\t *ngIf=\"action.show\"\n\t\t [color]=\"action.color\"\n\t\t mat-dialog-close\n\t\t mat-raised-button>\n\t {{action.text}}\n\t </button>\n\t</div>\n <button color=\"primary\" mat-dialog-close mat-raised-button>Ok</button>\n</div>\n", styles: [".content{color:#616161}.content .alert-message{display:inline-block;margin:15px auto;font-family:OpenSans,sans-serif;font-weight:700}.content mat-icon{position:relative;display:block;margin:15px auto;width:60px;height:60px;font-size:60px}.content mat-icon.success{color:#4caf50}.content mat-icon.notFound{color:#2196f3}.content mat-icon.error{color:#e53935}.content mat-icon.badRequest{color:#ffc107}.content mat-icon.unhautorized{color:#ff9800}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.KoalaDynamicComponentFactory, selector: "koala-dynamic-component", inputs: ["dynamicComponent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogAlertComponent, decorators: [{
|
|
56
|
+
type: Component,
|
|
57
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"content\" mat-dialog-content>\n <mat-icon *ngIf=\"alert.alertEnum else avatar\" [ngClass]=\"iconColor ?? ''\">{{icon}}</mat-icon>\n <ng-template #avatar>\n <koala-dynamic-component [dynamicComponent]=\"alert.avatar\"></koala-dynamic-component>\n </ng-template>\n <p [innerHTML]=\"alert.message\" class=\"w-100 alert-message text-center\"></p>\n</div>\n<div align=\"center\" mat-dialog-actions>\n\t<div *ngFor=\"let action of alert?.actions\">\n\t <button\n\t\t (click)=\"action.action()\"\n\t\t *ngIf=\"action.show\"\n\t\t [color]=\"action.color\"\n\t\t mat-dialog-close\n\t\t mat-raised-button>\n\t {{action.text}}\n\t </button>\n\t</div>\n <button color=\"primary\" mat-dialog-close mat-raised-button>Ok</button>\n</div>\n", styles: [".content{color:#616161}.content .alert-message{display:inline-block;margin:15px auto;font-family:OpenSans,sans-serif;font-weight:700}.content mat-icon{position:relative;display:block;margin:15px auto;width:60px;height:60px;font-size:60px}.content mat-icon.success{color:#4caf50}.content mat-icon.notFound{color:#2196f3}.content mat-icon.error{color:#e53935}.content mat-icon.badRequest{color:#ffc107}.content mat-icon.unhautorized{color:#ff9800}\n"] }]
|
|
58
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
59
|
+
type: Inject,
|
|
60
|
+
args: [MAT_DIALOG_DATA]
|
|
61
61
|
}] }]; } });
|
|
62
62
|
|
|
63
|
-
class KoalaRequestCodeToAlertEnumTranslate {
|
|
64
|
-
static translate(statusCode) {
|
|
65
|
-
switch (statusCode) {
|
|
66
|
-
case 400:
|
|
67
|
-
case 422:
|
|
68
|
-
case 405:
|
|
69
|
-
return KoalaAlertEnum.badRequest;
|
|
70
|
-
case 404:
|
|
71
|
-
return KoalaAlertEnum.notFound;
|
|
72
|
-
case 401:
|
|
73
|
-
return KoalaAlertEnum.unhautorized;
|
|
74
|
-
default:
|
|
75
|
-
return KoalaAlertEnum.internalServerError;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
63
|
+
class KoalaRequestCodeToAlertEnumTranslate {
|
|
64
|
+
static translate(statusCode) {
|
|
65
|
+
switch (statusCode) {
|
|
66
|
+
case 400:
|
|
67
|
+
case 422:
|
|
68
|
+
case 405:
|
|
69
|
+
return KoalaAlertEnum.badRequest;
|
|
70
|
+
case 404:
|
|
71
|
+
return KoalaAlertEnum.notFound;
|
|
72
|
+
case 401:
|
|
73
|
+
return KoalaAlertEnum.unhautorized;
|
|
74
|
+
default:
|
|
75
|
+
return KoalaAlertEnum.internalServerError;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
class KoalaAlertService {
|
|
81
|
-
constructor(dialogService) {
|
|
82
|
-
this.dialogService = dialogService;
|
|
83
|
-
}
|
|
84
|
-
create(alertConfig) {
|
|
85
|
-
this.dialogService.open(DialogAlertComponent, 'auto', alertConfig);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
KoalaAlertService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
89
|
-
KoalaAlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
91
|
-
type: Injectable,
|
|
92
|
-
args: [{ providedIn: "any" }]
|
|
80
|
+
class KoalaAlertService {
|
|
81
|
+
constructor(dialogService) {
|
|
82
|
+
this.dialogService = dialogService;
|
|
83
|
+
}
|
|
84
|
+
create(alertConfig) {
|
|
85
|
+
this.dialogService.open(DialogAlertComponent, 'auto', alertConfig);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
KoalaAlertService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertService, deps: [{ token: i1$1.KoalaDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
89
|
+
KoalaAlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertService, providedIn: "any" });
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertService, decorators: [{
|
|
91
|
+
type: Injectable,
|
|
92
|
+
args: [{ providedIn: "any" }]
|
|
93
93
|
}], ctorParameters: function () { return [{ type: i1$1.KoalaDialogService }]; } });
|
|
94
94
|
|
|
95
|
-
class KoalaAlertModule {
|
|
96
|
-
}
|
|
97
|
-
KoalaAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
98
|
-
KoalaAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
99
|
-
MatDialogModule,
|
|
100
|
-
MatButtonModule,
|
|
101
|
-
MatIconModule,
|
|
102
|
-
KoalaDynamicComponentModule], exports: [DialogAlertComponent] });
|
|
103
|
-
KoalaAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
104
|
-
KoalaAlertService
|
|
105
|
-
], imports: [CommonModule,
|
|
106
|
-
MatDialogModule,
|
|
107
|
-
MatButtonModule,
|
|
108
|
-
MatIconModule,
|
|
109
|
-
KoalaDynamicComponentModule] });
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
111
|
-
type: NgModule,
|
|
112
|
-
args: [{
|
|
113
|
-
declarations: [
|
|
114
|
-
DialogAlertComponent
|
|
115
|
-
],
|
|
116
|
-
imports: [
|
|
117
|
-
CommonModule,
|
|
118
|
-
MatDialogModule,
|
|
119
|
-
MatButtonModule,
|
|
120
|
-
MatIconModule,
|
|
121
|
-
KoalaDynamicComponentModule
|
|
122
|
-
],
|
|
123
|
-
providers: [
|
|
124
|
-
KoalaAlertService
|
|
125
|
-
],
|
|
126
|
-
exports: [
|
|
127
|
-
DialogAlertComponent
|
|
128
|
-
]
|
|
129
|
-
}]
|
|
95
|
+
class KoalaAlertModule {
|
|
96
|
+
}
|
|
97
|
+
KoalaAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
98
|
+
KoalaAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertModule, declarations: [DialogAlertComponent], imports: [CommonModule,
|
|
99
|
+
MatDialogModule,
|
|
100
|
+
MatButtonModule,
|
|
101
|
+
MatIconModule,
|
|
102
|
+
KoalaDynamicComponentModule], exports: [DialogAlertComponent] });
|
|
103
|
+
KoalaAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertModule, providers: [
|
|
104
|
+
KoalaAlertService
|
|
105
|
+
], imports: [CommonModule,
|
|
106
|
+
MatDialogModule,
|
|
107
|
+
MatButtonModule,
|
|
108
|
+
MatIconModule,
|
|
109
|
+
KoalaDynamicComponentModule] });
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaAlertModule, decorators: [{
|
|
111
|
+
type: NgModule,
|
|
112
|
+
args: [{
|
|
113
|
+
declarations: [
|
|
114
|
+
DialogAlertComponent
|
|
115
|
+
],
|
|
116
|
+
imports: [
|
|
117
|
+
CommonModule,
|
|
118
|
+
MatDialogModule,
|
|
119
|
+
MatButtonModule,
|
|
120
|
+
MatIconModule,
|
|
121
|
+
KoalaDynamicComponentModule
|
|
122
|
+
],
|
|
123
|
+
providers: [
|
|
124
|
+
KoalaAlertService
|
|
125
|
+
],
|
|
126
|
+
exports: [
|
|
127
|
+
DialogAlertComponent
|
|
128
|
+
]
|
|
129
|
+
}]
|
|
130
130
|
}] });
|
|
131
131
|
|
|
132
|
-
/**
|
|
133
|
-
* Generated bundle index. Do not edit.
|
|
132
|
+
/**
|
|
133
|
+
* Generated bundle index. Do not edit.
|
|
134
134
|
*/
|
|
135
135
|
|
|
136
136
|
export { DialogAlertComponent, KoalaAlertEnum, KoalaAlertModule, KoalaAlertService, KoalaRequestCodeToAlertEnumTranslate };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-alert.mjs","sources":["../../../projects/alert/src/lib/koala.alert.enum.ts","../../../projects/alert/src/lib/dialog-alert.component.ts","../../../projects/alert/src/lib/dialog-alert.component.html","../../../projects/alert/src/lib/koala.request-code-to-alert-enum.translate.ts","../../../projects/alert/src/lib/koala.alert.service.ts","../../../projects/alert/src/lib/koala.alert.module.ts","../../../projects/alert/src/koalarx-ui-alert.ts"],"sourcesContent":["export enum KoalaAlertEnum {\n success = 200,\n badRequest = 400,\n unhautorized = 401,\n notFound = 404,\n internalServerError = 500\n}\n","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { KoalaAlertConfigInterface } from './koala.alert-config.interface';\nimport { KoalaAlertEnum } from './koala.alert.enum';\n\n@Component({\n templateUrl: 'dialog-alert.component.html',\n styleUrls: ['dialog-alert.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DialogAlertComponent {\n public icon?: string;\n public iconColor?: string;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) public alert: KoalaAlertConfigInterface\n ) {\n if (alert.alertEnum) {\n switch (alert.alertEnum) {\n case KoalaAlertEnum.success:\n this.icon = 'check_circle';\n this.iconColor = 'success';\n break;\n case KoalaAlertEnum.notFound:\n this.icon = 'visibility_off';\n this.iconColor = 'notFound';\n break;\n case KoalaAlertEnum.internalServerError:\n this.icon = 'error';\n this.iconColor = 'error';\n break;\n case KoalaAlertEnum.badRequest:\n this.icon = 'warning';\n this.iconColor = 'badRequest';\n break;\n case KoalaAlertEnum.unhautorized:\n this.icon = 'no_encryption';\n this.iconColor = 'unhautorized';\n break;\n }\n }\n }\n}\n","<div class=\"content\" mat-dialog-content>\n <mat-icon *ngIf=\"alert.alertEnum else avatar\" [ngClass]=\"iconColor ?? ''\">{{icon}}</mat-icon>\n <ng-template #avatar>\n <koala-dynamic-component [dynamicComponent]=\"alert.avatar\"></koala-dynamic-component>\n </ng-template>\n <p [innerHTML]=\"alert.message\" class=\"w-100 alert-message text-center\"></p>\n</div>\n<div align=\"center\" mat-dialog-actions>\n\t<div *ngFor=\"let action of alert?.actions\">\n\t <button\n\t\t (click)=\"action.action()\"\n\t\t *ngIf=\"action.show\"\n\t\t [color]=\"action.color\"\n\t\t mat-dialog-close\n\t\t mat-raised-button>\n\t {{action.text}}\n\t </button>\n\t</div>\n <button color=\"primary\" mat-dialog-close mat-raised-button>Ok</button>\n</div>\n","import { KoalaAlertEnum } from './koala.alert.enum';\n\nexport class KoalaRequestCodeToAlertEnumTranslate {\n\n public static translate(statusCode: number): KoalaAlertEnum {\n switch (statusCode) {\n case 400:\n case 422:\n case 405:\n return KoalaAlertEnum.badRequest;\n case 404:\n return KoalaAlertEnum.notFound;\n case 401:\n return KoalaAlertEnum.unhautorized;\n default:\n return KoalaAlertEnum.internalServerError;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DialogAlertComponent } from './dialog-alert.component';\nimport { KoalaAlertConfigInterface } from './koala.alert-config.interface';\nimport { KoalaDialogService } from '@koalarx/ui/dialog';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaAlertService {\n\n constructor(private dialogService: KoalaDialogService) {\n }\n\n public create(alertConfig: KoalaAlertConfigInterface) {\n this.dialogService.open(DialogAlertComponent, 'auto', alertConfig);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DialogAlertComponent } from './dialog-alert.component';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { KoalaAlertService } from './koala.alert.service';\nimport { CommonModule } from '@angular/common';\nimport { KoalaDynamicComponentModule } from \"@koalarx/ui/dynamic-component\";\n\n@NgModule({\n declarations: [\n DialogAlertComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n MatButtonModule,\n MatIconModule,\n KoalaDynamicComponentModule\n ],\n providers: [\n KoalaAlertService\n ],\n exports: [\n DialogAlertComponent\n ]\n})\nexport class KoalaAlertModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;IAAY,eAMX;AAND,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,cAAA,CAAA,SAAA,CAAA,GAAA,GAAA,CAAA,GAAA,SAAa,CAAA;AACb,IAAA,cAAA,CAAA,cAAA,CAAA,YAAA,CAAA,GAAA,GAAA,CAAA,GAAA,YAAgB,CAAA;AAChB,IAAA,cAAA,CAAA,cAAA,CAAA,cAAA,CAAA,GAAA,GAAA,CAAA,GAAA,cAAkB,CAAA;AAClB,IAAA,cAAA,CAAA,cAAA,CAAA,UAAA,CAAA,GAAA,GAAA,CAAA,GAAA,UAAc,CAAA;AACd,IAAA,cAAA,CAAA,cAAA,CAAA,qBAAA,CAAA,GAAA,GAAA,CAAA,GAAA,qBAAyB,CAAA;AAC3B,CAAC,EANW,cAAc,KAAd,cAAc,GAMzB,EAAA,CAAA,CAAA;;MCIY,oBAAoB,CAAA;AAI/B,IAAA,WAAA,CACkC,KAAgC,EAAA;QAAhC,IAAK,CAAA,KAAA,GAAL,KAAK,CAA2B;QAEhE,IAAI,KAAK,CAAC,SAAS,EAAE;YACnB,QAAQ,KAAK,CAAC,SAAS;gBACrB,KAAK,cAAc,CAAC,OAAO;AACzB,oBAAA,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;AAC3B,oBAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;oBAC3B,MAAM;gBACR,KAAK,cAAc,CAAC,QAAQ;AAC1B,oBAAA,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;AAC7B,oBAAA,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC;oBAC5B,MAAM;gBACR,KAAK,cAAc,CAAC,mBAAmB;AACrC,oBAAA,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;AACpB,oBAAA,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC;oBACzB,MAAM;gBACR,KAAK,cAAc,CAAC,UAAU;AAC5B,oBAAA,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;AACtB,oBAAA,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC;oBAC9B,MAAM;gBACR,KAAK,cAAc,CAAC,YAAY;AAC9B,oBAAA,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;AAC5B,oBAAA,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC;oBAChC,MAAM;AACT,aAAA;AACF,SAAA;KACF;;AA/BU,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-alert.mjs","sources":["../../../projects/alert/src/lib/koala.alert.enum.ts","../../../projects/alert/src/lib/dialog-alert.component.ts","../../../projects/alert/src/lib/dialog-alert.component.html","../../../projects/alert/src/lib/koala.request-code-to-alert-enum.translate.ts","../../../projects/alert/src/lib/koala.alert.service.ts","../../../projects/alert/src/lib/koala.alert.module.ts","../../../projects/alert/src/koalarx-ui-alert.ts"],"sourcesContent":["export enum KoalaAlertEnum {\n success = 200,\n badRequest = 400,\n unhautorized = 401,\n notFound = 404,\n internalServerError = 500\n}\n","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { KoalaAlertConfigInterface } from './koala.alert-config.interface';\nimport { KoalaAlertEnum } from './koala.alert.enum';\n\n@Component({\n templateUrl: 'dialog-alert.component.html',\n styleUrls: ['dialog-alert.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DialogAlertComponent {\n public icon?: string;\n public iconColor?: string;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) public alert: KoalaAlertConfigInterface\n ) {\n if (alert.alertEnum) {\n switch (alert.alertEnum) {\n case KoalaAlertEnum.success:\n this.icon = 'check_circle';\n this.iconColor = 'success';\n break;\n case KoalaAlertEnum.notFound:\n this.icon = 'visibility_off';\n this.iconColor = 'notFound';\n break;\n case KoalaAlertEnum.internalServerError:\n this.icon = 'error';\n this.iconColor = 'error';\n break;\n case KoalaAlertEnum.badRequest:\n this.icon = 'warning';\n this.iconColor = 'badRequest';\n break;\n case KoalaAlertEnum.unhautorized:\n this.icon = 'no_encryption';\n this.iconColor = 'unhautorized';\n break;\n }\n }\n }\n}\n","<div class=\"content\" mat-dialog-content>\n <mat-icon *ngIf=\"alert.alertEnum else avatar\" [ngClass]=\"iconColor ?? ''\">{{icon}}</mat-icon>\n <ng-template #avatar>\n <koala-dynamic-component [dynamicComponent]=\"alert.avatar\"></koala-dynamic-component>\n </ng-template>\n <p [innerHTML]=\"alert.message\" class=\"w-100 alert-message text-center\"></p>\n</div>\n<div align=\"center\" mat-dialog-actions>\n\t<div *ngFor=\"let action of alert?.actions\">\n\t <button\n\t\t (click)=\"action.action()\"\n\t\t *ngIf=\"action.show\"\n\t\t [color]=\"action.color\"\n\t\t mat-dialog-close\n\t\t mat-raised-button>\n\t {{action.text}}\n\t </button>\n\t</div>\n <button color=\"primary\" mat-dialog-close mat-raised-button>Ok</button>\n</div>\n","import { KoalaAlertEnum } from './koala.alert.enum';\n\nexport class KoalaRequestCodeToAlertEnumTranslate {\n\n public static translate(statusCode: number): KoalaAlertEnum {\n switch (statusCode) {\n case 400:\n case 422:\n case 405:\n return KoalaAlertEnum.badRequest;\n case 404:\n return KoalaAlertEnum.notFound;\n case 401:\n return KoalaAlertEnum.unhautorized;\n default:\n return KoalaAlertEnum.internalServerError;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DialogAlertComponent } from './dialog-alert.component';\nimport { KoalaAlertConfigInterface } from './koala.alert-config.interface';\nimport { KoalaDialogService } from '@koalarx/ui/dialog';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaAlertService {\n\n constructor(private dialogService: KoalaDialogService) {\n }\n\n public create(alertConfig: KoalaAlertConfigInterface) {\n this.dialogService.open(DialogAlertComponent, 'auto', alertConfig);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DialogAlertComponent } from './dialog-alert.component';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { KoalaAlertService } from './koala.alert.service';\nimport { CommonModule } from '@angular/common';\nimport { KoalaDynamicComponentModule } from \"@koalarx/ui/dynamic-component\";\n\n@NgModule({\n declarations: [\n DialogAlertComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n MatButtonModule,\n MatIconModule,\n KoalaDynamicComponentModule\n ],\n providers: [\n KoalaAlertService\n ],\n exports: [\n DialogAlertComponent\n ]\n})\nexport class KoalaAlertModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;IAAY,eAMX;AAND,CAAA,UAAY,cAAc,EAAA;AACxB,I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