@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
|
@@ -10,177 +10,177 @@ import { MatButtonModule } from '@angular/material/button';
|
|
|
10
10
|
import * as i4 from '@angular/material/icon';
|
|
11
11
|
import { MatIconModule } from '@angular/material/icon';
|
|
12
12
|
|
|
13
|
-
class KoalaBtnFileService {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.setFileSubject = new BehaviorSubject(null);
|
|
16
|
-
this.fileListSubject = new BehaviorSubject([]);
|
|
17
|
-
}
|
|
18
|
-
async setFile(file) {
|
|
19
|
-
if (file) {
|
|
20
|
-
this.setFileSubject.next(file);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
removeFile(files, index) {
|
|
24
|
-
files.splice(index, 1);
|
|
25
|
-
this.fileListSubject.next(files);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
KoalaBtnFileService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
29
|
-
KoalaBtnFileService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
31
|
-
type: Injectable,
|
|
32
|
-
args: [{ providedIn: "any" }]
|
|
13
|
+
class KoalaBtnFileService {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.setFileSubject = new BehaviorSubject(null);
|
|
16
|
+
this.fileListSubject = new BehaviorSubject([]);
|
|
17
|
+
}
|
|
18
|
+
async setFile(file) {
|
|
19
|
+
if (file) {
|
|
20
|
+
this.setFileSubject.next(file);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
removeFile(files, index) {
|
|
24
|
+
files.splice(index, 1);
|
|
25
|
+
this.fileListSubject.next(files);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
KoalaBtnFileService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaBtnFileService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
29
|
+
KoalaBtnFileService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaBtnFileService, providedIn: "any" });
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaBtnFileService, decorators: [{
|
|
31
|
+
type: Injectable,
|
|
32
|
+
args: [{ providedIn: "any" }]
|
|
33
33
|
}] });
|
|
34
34
|
|
|
35
|
-
class FileButtonComponent {
|
|
36
|
-
constructor() {
|
|
37
|
-
this.autoclear = true;
|
|
38
|
-
this.getFiles = new EventEmitter();
|
|
39
|
-
this.files = [];
|
|
40
|
-
this.textSubject = new BehaviorSubject('');
|
|
41
|
-
}
|
|
42
|
-
ngOnInit() {
|
|
43
|
-
this.style = `color: ${this.color}!important;background-color: ${this.backgroundColor}!important;`;
|
|
44
|
-
this.textSubject.next(this.text ?? '');
|
|
45
|
-
if (this.setFile) {
|
|
46
|
-
this.setFile.subscribe(async (file) => {
|
|
47
|
-
if (file) {
|
|
48
|
-
const fileResult = await this.convertFile(file);
|
|
49
|
-
if (fileResult) {
|
|
50
|
-
this.files.push(fileResult);
|
|
51
|
-
}
|
|
52
|
-
this.generateTextButton();
|
|
53
|
-
this.getFiles.emit(this.files);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
if (this.updateFileList) {
|
|
58
|
-
this.updateFileList.subscribe((fileList) => {
|
|
59
|
-
this.files = fileList;
|
|
60
|
-
this.generateTextButton();
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
async emitFiles(files) {
|
|
65
|
-
if (files) {
|
|
66
|
-
if (files?.length > 0) {
|
|
67
|
-
for (let f = 0; f <= files.length; f++) {
|
|
68
|
-
const file = files.item(f);
|
|
69
|
-
if (file) {
|
|
70
|
-
const fileResult = await this.convertFile(file);
|
|
71
|
-
if (fileResult) {
|
|
72
|
-
this.files.push(fileResult);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
this.getFiles.emit(this.files);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
this.getFiles.emit([]);
|
|
80
|
-
}
|
|
81
|
-
this.generateTextButton();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
open() {
|
|
85
|
-
const elFile = this.file?.nativeElement;
|
|
86
|
-
if (elFile)
|
|
87
|
-
elFile.value = '';
|
|
88
|
-
if (this.autoclear) {
|
|
89
|
-
this.files = [];
|
|
90
|
-
this.getFiles.emit([]);
|
|
91
|
-
this.generateTextButton();
|
|
92
|
-
}
|
|
93
|
-
elFile?.click();
|
|
94
|
-
}
|
|
95
|
-
generateTextButton() {
|
|
96
|
-
this.textSubject.next(this.files.length > 0
|
|
97
|
-
? `${this.files.length} arquivo${this.files.length > 1 ? 's' : ''} selecionado`
|
|
98
|
-
: this.text ?? '');
|
|
99
|
-
}
|
|
100
|
-
async convertFile(file) {
|
|
101
|
-
const blobFile = await new Promise((resolve) => {
|
|
102
|
-
const fileReader = new FileReader();
|
|
103
|
-
fileReader.readAsDataURL(file);
|
|
104
|
-
fileReader.onload = () => {
|
|
105
|
-
resolve(fileReader.result);
|
|
106
|
-
};
|
|
107
|
-
});
|
|
108
|
-
if (blobFile) {
|
|
109
|
-
const fileSplit = blobFile.toString().split(';base64,');
|
|
110
|
-
return {
|
|
111
|
-
filename: file.name,
|
|
112
|
-
type: fileSplit[0].replace('data:', ''),
|
|
113
|
-
base64: fileSplit[1],
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
FileButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
120
|
-
FileButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
122
|
-
type: Component,
|
|
123
|
-
args: [{ selector: 'koala-file-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<input #file (change)=\"emitFiles(file.files)\" [accept]=\"accept\" [multiple]=\"multiple\"\n style=\"display: none;\"\n type=\"file\"/>\n<button\n\t(click)=\"open()\"\n\t*ngIf=\"text else iconButton\"\n\t[disabled]=\"disabled\"\n\t[matTooltipDisabled]=\"!tooltip\"\n\t[matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\tclass=\"koala-button\"\n\tmat-button\n\tmatTooltipPosition=\"above\"\n\ttype=\"button\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n\t{{textSubject | async}}\n</button>\n<ng-template #iconButton>\n <button\n\t (click)=\"open()\"\n\t [disabled]=\"disabled\"\n\t [matTooltipDisabled]=\"!tooltip\"\n\t [matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\t class=\"koala-icon-button\"\n\t mat-icon-button\n\t matTooltipPosition=\"before\"\n\t type=\"button\">\n <mat-icon>{{icon}}</mat-icon>\n </button>\n</ng-template>\n", styles: [".koala-button{padding:2px 8px}.koala-icon-button:disabled,.koala-button:disabled{background:#cccccc!important;color:#616161!important;cursor:not-allowed}.koala-icon-button{height:25px;line-height:25px;width:25px}.koala-icon-button mat-icon{font-size:20px;height:20px;line-height:20px;position:relative;width:20px}\n"] }]
|
|
124
|
-
}], propDecorators: { color: [{
|
|
125
|
-
type: Input
|
|
126
|
-
}], backgroundColor: [{
|
|
127
|
-
type: Input
|
|
128
|
-
}], icon: [{
|
|
129
|
-
type: Input
|
|
130
|
-
}], text: [{
|
|
131
|
-
type: Input
|
|
132
|
-
}], tooltip: [{
|
|
133
|
-
type: Input
|
|
134
|
-
}], disabled: [{
|
|
135
|
-
type: Input
|
|
136
|
-
}], multiple: [{
|
|
137
|
-
type: Input
|
|
138
|
-
}], accept: [{
|
|
139
|
-
type: Input
|
|
140
|
-
}], setFile: [{
|
|
141
|
-
type: Input
|
|
142
|
-
}], updateFileList: [{
|
|
143
|
-
type: Input
|
|
144
|
-
}], autoclear: [{
|
|
145
|
-
type: Input
|
|
146
|
-
}], getFiles: [{
|
|
147
|
-
type: Output
|
|
148
|
-
}], file: [{
|
|
149
|
-
type: ViewChild,
|
|
150
|
-
args: ['file', { static: true }]
|
|
35
|
+
class FileButtonComponent {
|
|
36
|
+
constructor() {
|
|
37
|
+
this.autoclear = true;
|
|
38
|
+
this.getFiles = new EventEmitter();
|
|
39
|
+
this.files = [];
|
|
40
|
+
this.textSubject = new BehaviorSubject('');
|
|
41
|
+
}
|
|
42
|
+
ngOnInit() {
|
|
43
|
+
this.style = `color: ${this.color}!important;background-color: ${this.backgroundColor}!important;`;
|
|
44
|
+
this.textSubject.next(this.text ?? '');
|
|
45
|
+
if (this.setFile) {
|
|
46
|
+
this.setFile.subscribe(async (file) => {
|
|
47
|
+
if (file) {
|
|
48
|
+
const fileResult = await this.convertFile(file);
|
|
49
|
+
if (fileResult) {
|
|
50
|
+
this.files.push(fileResult);
|
|
51
|
+
}
|
|
52
|
+
this.generateTextButton();
|
|
53
|
+
this.getFiles.emit(this.files);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
if (this.updateFileList) {
|
|
58
|
+
this.updateFileList.subscribe((fileList) => {
|
|
59
|
+
this.files = fileList;
|
|
60
|
+
this.generateTextButton();
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async emitFiles(files) {
|
|
65
|
+
if (files) {
|
|
66
|
+
if (files?.length > 0) {
|
|
67
|
+
for (let f = 0; f <= files.length; f++) {
|
|
68
|
+
const file = files.item(f);
|
|
69
|
+
if (file) {
|
|
70
|
+
const fileResult = await this.convertFile(file);
|
|
71
|
+
if (fileResult) {
|
|
72
|
+
this.files.push(fileResult);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
this.getFiles.emit(this.files);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
this.getFiles.emit([]);
|
|
80
|
+
}
|
|
81
|
+
this.generateTextButton();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
open() {
|
|
85
|
+
const elFile = this.file?.nativeElement;
|
|
86
|
+
if (elFile)
|
|
87
|
+
elFile.value = '';
|
|
88
|
+
if (this.autoclear) {
|
|
89
|
+
this.files = [];
|
|
90
|
+
this.getFiles.emit([]);
|
|
91
|
+
this.generateTextButton();
|
|
92
|
+
}
|
|
93
|
+
elFile?.click();
|
|
94
|
+
}
|
|
95
|
+
generateTextButton() {
|
|
96
|
+
this.textSubject.next(this.files.length > 0
|
|
97
|
+
? `${this.files.length} arquivo${this.files.length > 1 ? 's' : ''} selecionado`
|
|
98
|
+
: this.text ?? '');
|
|
99
|
+
}
|
|
100
|
+
async convertFile(file) {
|
|
101
|
+
const blobFile = await new Promise((resolve) => {
|
|
102
|
+
const fileReader = new FileReader();
|
|
103
|
+
fileReader.readAsDataURL(file);
|
|
104
|
+
fileReader.onload = () => {
|
|
105
|
+
resolve(fileReader.result);
|
|
106
|
+
};
|
|
107
|
+
});
|
|
108
|
+
if (blobFile) {
|
|
109
|
+
const fileSplit = blobFile.toString().split(';base64,');
|
|
110
|
+
return {
|
|
111
|
+
filename: file.name,
|
|
112
|
+
type: fileSplit[0].replace('data:', ''),
|
|
113
|
+
base64: fileSplit[1],
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
FileButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
120
|
+
FileButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FileButtonComponent, selector: "koala-file-button", inputs: { color: "color", backgroundColor: "backgroundColor", icon: "icon", text: "text", tooltip: "tooltip", disabled: "disabled", multiple: "multiple", accept: "accept", setFile: "setFile", updateFileList: "updateFileList", autoclear: "autoclear" }, outputs: { getFiles: "getFiles" }, viewQueries: [{ propertyName: "file", first: true, predicate: ["file"], descendants: true, static: true }], ngImport: i0, template: "<input #file (change)=\"emitFiles(file.files)\" [accept]=\"accept\" [multiple]=\"multiple\"\n style=\"display: none;\"\n type=\"file\"/>\n<button\n\t(click)=\"open()\"\n\t*ngIf=\"text else iconButton\"\n\t[disabled]=\"disabled\"\n\t[matTooltipDisabled]=\"!tooltip\"\n\t[matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\tclass=\"koala-button\"\n\tmat-button\n\tmatTooltipPosition=\"above\"\n\ttype=\"button\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n\t{{textSubject | async}}\n</button>\n<ng-template #iconButton>\n <button\n\t (click)=\"open()\"\n\t [disabled]=\"disabled\"\n\t [matTooltipDisabled]=\"!tooltip\"\n\t [matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\t class=\"koala-icon-button\"\n\t mat-icon-button\n\t matTooltipPosition=\"before\"\n\t type=\"button\">\n <mat-icon>{{icon}}</mat-icon>\n </button>\n</ng-template>\n", styles: [".koala-button{padding:2px 8px}.koala-icon-button:disabled,.koala-button:disabled{background:#cccccc!important;color:#616161!important;cursor:not-allowed}.koala-icon-button{height:25px;line-height:25px;width:25px}.koala-icon-button mat-icon{font-size:20px;height:20px;line-height:20px;position:relative;width:20px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { 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: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileButtonComponent, decorators: [{
|
|
122
|
+
type: Component,
|
|
123
|
+
args: [{ selector: 'koala-file-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<input #file (change)=\"emitFiles(file.files)\" [accept]=\"accept\" [multiple]=\"multiple\"\n style=\"display: none;\"\n type=\"file\"/>\n<button\n\t(click)=\"open()\"\n\t*ngIf=\"text else iconButton\"\n\t[disabled]=\"disabled\"\n\t[matTooltipDisabled]=\"!tooltip\"\n\t[matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\tclass=\"koala-button\"\n\tmat-button\n\tmatTooltipPosition=\"above\"\n\ttype=\"button\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n\t{{textSubject | async}}\n</button>\n<ng-template #iconButton>\n <button\n\t (click)=\"open()\"\n\t [disabled]=\"disabled\"\n\t [matTooltipDisabled]=\"!tooltip\"\n\t [matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\t class=\"koala-icon-button\"\n\t mat-icon-button\n\t matTooltipPosition=\"before\"\n\t type=\"button\">\n <mat-icon>{{icon}}</mat-icon>\n </button>\n</ng-template>\n", styles: [".koala-button{padding:2px 8px}.koala-icon-button:disabled,.koala-button:disabled{background:#cccccc!important;color:#616161!important;cursor:not-allowed}.koala-icon-button{height:25px;line-height:25px;width:25px}.koala-icon-button mat-icon{font-size:20px;height:20px;line-height:20px;position:relative;width:20px}\n"] }]
|
|
124
|
+
}], propDecorators: { color: [{
|
|
125
|
+
type: Input
|
|
126
|
+
}], backgroundColor: [{
|
|
127
|
+
type: Input
|
|
128
|
+
}], icon: [{
|
|
129
|
+
type: Input
|
|
130
|
+
}], text: [{
|
|
131
|
+
type: Input
|
|
132
|
+
}], tooltip: [{
|
|
133
|
+
type: Input
|
|
134
|
+
}], disabled: [{
|
|
135
|
+
type: Input
|
|
136
|
+
}], multiple: [{
|
|
137
|
+
type: Input
|
|
138
|
+
}], accept: [{
|
|
139
|
+
type: Input
|
|
140
|
+
}], setFile: [{
|
|
141
|
+
type: Input
|
|
142
|
+
}], updateFileList: [{
|
|
143
|
+
type: Input
|
|
144
|
+
}], autoclear: [{
|
|
145
|
+
type: Input
|
|
146
|
+
}], getFiles: [{
|
|
147
|
+
type: Output
|
|
148
|
+
}], file: [{
|
|
149
|
+
type: ViewChild,
|
|
150
|
+
args: ['file', { static: true }]
|
|
151
151
|
}] } });
|
|
152
152
|
|
|
153
|
-
class KoalaFileButtonModule {
|
|
154
|
-
}
|
|
155
|
-
KoalaFileButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
156
|
-
KoalaFileButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
157
|
-
MatTooltipModule,
|
|
158
|
-
MatButtonModule,
|
|
159
|
-
MatIconModule], exports: [FileButtonComponent] });
|
|
160
|
-
KoalaFileButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
161
|
-
MatTooltipModule,
|
|
162
|
-
MatButtonModule,
|
|
163
|
-
MatIconModule] });
|
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
165
|
-
type: NgModule,
|
|
166
|
-
args: [{
|
|
167
|
-
exports: [
|
|
168
|
-
FileButtonComponent
|
|
169
|
-
],
|
|
170
|
-
declarations: [
|
|
171
|
-
FileButtonComponent
|
|
172
|
-
],
|
|
173
|
-
imports: [
|
|
174
|
-
CommonModule,
|
|
175
|
-
MatTooltipModule,
|
|
176
|
-
MatButtonModule,
|
|
177
|
-
MatIconModule
|
|
178
|
-
]
|
|
179
|
-
}]
|
|
153
|
+
class KoalaFileButtonModule {
|
|
154
|
+
}
|
|
155
|
+
KoalaFileButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaFileButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
156
|
+
KoalaFileButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: KoalaFileButtonModule, declarations: [FileButtonComponent], imports: [CommonModule,
|
|
157
|
+
MatTooltipModule,
|
|
158
|
+
MatButtonModule,
|
|
159
|
+
MatIconModule], exports: [FileButtonComponent] });
|
|
160
|
+
KoalaFileButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaFileButtonModule, imports: [CommonModule,
|
|
161
|
+
MatTooltipModule,
|
|
162
|
+
MatButtonModule,
|
|
163
|
+
MatIconModule] });
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KoalaFileButtonModule, decorators: [{
|
|
165
|
+
type: NgModule,
|
|
166
|
+
args: [{
|
|
167
|
+
exports: [
|
|
168
|
+
FileButtonComponent
|
|
169
|
+
],
|
|
170
|
+
declarations: [
|
|
171
|
+
FileButtonComponent
|
|
172
|
+
],
|
|
173
|
+
imports: [
|
|
174
|
+
CommonModule,
|
|
175
|
+
MatTooltipModule,
|
|
176
|
+
MatButtonModule,
|
|
177
|
+
MatIconModule
|
|
178
|
+
]
|
|
179
|
+
}]
|
|
180
180
|
}] });
|
|
181
181
|
|
|
182
|
-
/**
|
|
183
|
-
* Generated bundle index. Do not edit.
|
|
182
|
+
/**
|
|
183
|
+
* Generated bundle index. Do not edit.
|
|
184
184
|
*/
|
|
185
185
|
|
|
186
186
|
export { FileButtonComponent, KoalaBtnFileService, KoalaFileButtonModule };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-file-button.mjs","sources":["../../../projects/file-button/src/lib/koala.btn-file.service.ts","../../../projects/file-button/src/lib/file-button.component.ts","../../../projects/file-button/src/lib/file-button.component.html","../../../projects/file-button/src/lib/koala.file-button.module.ts","../../../projects/file-button/src/koalarx-ui-file-button.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { KoalaFileInterface } from './koala.file.interface';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaBtnFileService {\n\tpublic setFileSubject = new BehaviorSubject<File|null>(null);\n\tpublic fileListSubject = new BehaviorSubject<KoalaFileInterface[]>([]);\n\n\tpublic async setFile(file: File) {\n\t\tif (file) {\n\t\t\tthis.setFileSubject.next(file);\n\t\t}\n\t}\n\n\tpublic removeFile(files: KoalaFileInterface[], index: number) {\n\t\tfiles.splice(index, 1);\n\t\tthis.fileListSubject.next(files);\n\t}\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { KoalaFileInterface } from './koala.file.interface';\nimport { BehaviorSubject } from 'rxjs';\n\n@Component({\n selector: 'koala-file-button',\n templateUrl: 'file-button.component.html',\n styleUrls: ['file-button.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FileButtonComponent implements OnInit {\n @Input() color?: string;\n @Input() backgroundColor?: string;\n @Input() icon?: string;\n @Input() text?: string;\n @Input() tooltip?: string;\n @Input() disabled?: boolean;\n @Input() multiple?: boolean;\n @Input() accept?: string;\n @Input() setFile?: BehaviorSubject<File>;\n @Input() updateFileList?: BehaviorSubject<KoalaFileInterface[]>;\n @Input() autoclear = true;\n @Output() getFiles = new EventEmitter<KoalaFileInterface[]>();\n public files: KoalaFileInterface[] = [];\n public style?: string;\n\n @ViewChild('file', { static: true }) private file?: ElementRef<HTMLInputElement>;\n\n public textSubject = new BehaviorSubject<string>('');\n\n ngOnInit() {\n this.style = `color: ${this.color}!important;background-color: ${this.backgroundColor}!important;`;\n this.textSubject.next(this.text ?? '');\n if (this.setFile) {\n this.setFile.subscribe(async (file) => {\n if (file) {\n const fileResult = await this.convertFile(file);\n if (fileResult) {\n this.files.push(fileResult);\n }\n this.generateTextButton();\n this.getFiles.emit(this.files);\n }\n });\n }\n\n if (this.updateFileList) {\n this.updateFileList.subscribe((fileList) => {\n this.files = fileList;\n this.generateTextButton();\n });\n }\n }\n\n public async emitFiles(files: FileList | null) {\n if (files) {\n if (files?.length > 0) {\n for (let f = 0; f <= files.length; f++) {\n const file = files.item(f);\n if (file) {\n const fileResult = await this.convertFile(file);\n if (fileResult) {\n this.files.push(fileResult);\n }\n }\n }\n\n this.getFiles.emit(this.files);\n } else {\n this.getFiles.emit([]);\n }\n this.generateTextButton();\n }\n }\n\n public open() {\n const elFile = this.file?.nativeElement;\n if (elFile) elFile.value = '';\n if (this.autoclear) {\n this.files = [];\n this.getFiles.emit([]);\n this.generateTextButton();\n }\n elFile?.click();\n }\n\n private generateTextButton() {\n this.textSubject.next(\n this.files.length > 0\n ? `${this.files.length} arquivo${this.files.length > 1 ? 's' : ''} selecionado`\n : this.text ?? '',\n );\n }\n\n private async convertFile(file: File): Promise<KoalaFileInterface | null> {\n const blobFile = await new Promise<string | ArrayBuffer | null>((resolve) => {\n const fileReader = new FileReader();\n fileReader.readAsDataURL(file);\n fileReader.onload = () => {\n resolve(fileReader.result);\n };\n });\n if (blobFile) {\n const fileSplit = blobFile.toString().split(';base64,');\n return {\n filename: file.name,\n type: fileSplit[0].replace('data:', ''),\n base64: fileSplit[1],\n };\n }\n\n return null;\n }\n}\n","<input #file (change)=\"emitFiles(file.files)\" [accept]=\"accept\" [multiple]=\"multiple\"\n style=\"display: none;\"\n type=\"file\"/>\n<button\n\t(click)=\"open()\"\n\t*ngIf=\"text else iconButton\"\n\t[disabled]=\"disabled\"\n\t[matTooltipDisabled]=\"!tooltip\"\n\t[matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\tclass=\"koala-button\"\n\tmat-button\n\tmatTooltipPosition=\"above\"\n\ttype=\"button\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n\t{{textSubject | async}}\n</button>\n<ng-template #iconButton>\n <button\n\t (click)=\"open()\"\n\t [disabled]=\"disabled\"\n\t [matTooltipDisabled]=\"!tooltip\"\n\t [matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\t class=\"koala-icon-button\"\n\t mat-icon-button\n\t matTooltipPosition=\"before\"\n\t type=\"button\">\n <mat-icon>{{icon}}</mat-icon>\n </button>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { FileButtonComponent } from './file-button.component';\n\n@NgModule({\n exports: [\n FileButtonComponent\n ],\n\tdeclarations: [\n\t\tFileButtonComponent\n\t],\n\timports: [\n\t\tCommonModule,\n\t\tMatTooltipModule,\n\t\tMatButtonModule,\n\t\tMatIconModule\n\t]\n})\nexport class KoalaFileButtonModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAKa,mBAAmB,CAAA;AADhC,IAAA,WAAA,GAAA;AAEQ,QAAA,IAAA,CAA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AA,EAAA,CAAA,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;;;MEdxB,qBAAqB,CAAA;;mHAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;oHAArB,qBAAqB,EAAA,YAAA,EAAA,CAThC,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAGnB,YAAY;QACZ,gBAAgB;QAChB,eAAe;AACf,QAAA,aAAa,aATX,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAYV,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YANhC,YAAY;QACZ,gBAAgB;QAChB,eAAe;QACf,aAAa,CAAA,EAAA,CAAA,CAAA;4FAGF,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAdjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,mBAAmB;AACpB,qBAAA;AACF,oBAAA,YAAY,EAAE;wBACb,mBAAmB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,YAAY;wBACZ,gBAAgB;wBAChB,eAAe;wBACf,aAAa;AACb,qBAAA;AACD,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koalarx-ui-file-button.mjs","sources":["../../../projects/file-button/src/lib/koala.btn-file.service.ts","../../../projects/file-button/src/lib/file-button.component.ts","../../../projects/file-button/src/lib/file-button.component.html","../../../projects/file-button/src/lib/koala.file-button.module.ts","../../../projects/file-button/src/koalarx-ui-file-button.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { KoalaFileInterface } from './koala.file.interface';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaBtnFileService {\n\tpublic setFileSubject = new BehaviorSubject<File|null>(null);\n\tpublic fileListSubject = new BehaviorSubject<KoalaFileInterface[]>([]);\n\n\tpublic async setFile(file: File) {\n\t\tif (file) {\n\t\t\tthis.setFileSubject.next(file);\n\t\t}\n\t}\n\n\tpublic removeFile(files: KoalaFileInterface[], index: number) {\n\t\tfiles.splice(index, 1);\n\t\tthis.fileListSubject.next(files);\n\t}\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { KoalaFileInterface } from './koala.file.interface';\nimport { BehaviorSubject } from 'rxjs';\n\n@Component({\n selector: 'koala-file-button',\n templateUrl: 'file-button.component.html',\n styleUrls: ['file-button.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FileButtonComponent implements OnInit {\n @Input() color?: string;\n @Input() backgroundColor?: string;\n @Input() icon?: string;\n @Input() text?: string;\n @Input() tooltip?: string;\n @Input() disabled?: boolean;\n @Input() multiple?: boolean;\n @Input() accept?: string;\n @Input() setFile?: BehaviorSubject<File>;\n @Input() updateFileList?: BehaviorSubject<KoalaFileInterface[]>;\n @Input() autoclear = true;\n @Output() getFiles = new EventEmitter<KoalaFileInterface[]>();\n public files: KoalaFileInterface[] = [];\n public style?: string;\n\n @ViewChild('file', { static: true }) private file?: ElementRef<HTMLInputElement>;\n\n public textSubject = new BehaviorSubject<string>('');\n\n ngOnInit() {\n this.style = `color: ${this.color}!important;background-color: ${this.backgroundColor}!important;`;\n this.textSubject.next(this.text ?? '');\n if (this.setFile) {\n this.setFile.subscribe(async (file) => {\n if (file) {\n const fileResult = await this.convertFile(file);\n if (fileResult) {\n this.files.push(fileResult);\n }\n this.generateTextButton();\n this.getFiles.emit(this.files);\n }\n });\n }\n\n if (this.updateFileList) {\n this.updateFileList.subscribe((fileList) => {\n this.files = fileList;\n this.generateTextButton();\n });\n }\n }\n\n public async emitFiles(files: FileList | null) {\n if (files) {\n if (files?.length > 0) {\n for (let f = 0; f <= files.length; f++) {\n const file = files.item(f);\n if (file) {\n const fileResult = await this.convertFile(file);\n if (fileResult) {\n this.files.push(fileResult);\n }\n }\n }\n\n this.getFiles.emit(this.files);\n } else {\n this.getFiles.emit([]);\n }\n this.generateTextButton();\n }\n }\n\n public open() {\n const elFile = this.file?.nativeElement;\n if (elFile) elFile.value = '';\n if (this.autoclear) {\n this.files = [];\n this.getFiles.emit([]);\n this.generateTextButton();\n }\n elFile?.click();\n }\n\n private generateTextButton() {\n this.textSubject.next(\n this.files.length > 0\n ? `${this.files.length} arquivo${this.files.length > 1 ? 's' : ''} selecionado`\n : this.text ?? '',\n );\n }\n\n private async convertFile(file: File): Promise<KoalaFileInterface | null> {\n const blobFile = await new Promise<string | ArrayBuffer | null>((resolve) => {\n const fileReader = new FileReader();\n fileReader.readAsDataURL(file);\n fileReader.onload = () => {\n resolve(fileReader.result);\n };\n });\n if (blobFile) {\n const fileSplit = blobFile.toString().split(';base64,');\n return {\n filename: file.name,\n type: fileSplit[0].replace('data:', ''),\n base64: fileSplit[1],\n };\n }\n\n return null;\n }\n}\n","<input #file (change)=\"emitFiles(file.files)\" [accept]=\"accept\" [multiple]=\"multiple\"\n style=\"display: none;\"\n type=\"file\"/>\n<button\n\t(click)=\"open()\"\n\t*ngIf=\"text else iconButton\"\n\t[disabled]=\"disabled\"\n\t[matTooltipDisabled]=\"!tooltip\"\n\t[matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\tclass=\"koala-button\"\n\tmat-button\n\tmatTooltipPosition=\"above\"\n\ttype=\"button\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n\t{{textSubject | async}}\n</button>\n<ng-template #iconButton>\n <button\n\t (click)=\"open()\"\n\t [disabled]=\"disabled\"\n\t [matTooltipDisabled]=\"!tooltip\"\n\t [matTooltip]=\"tooltip ?? ''\"\n [style]=\"style\"\n\t class=\"koala-icon-button\"\n\t mat-icon-button\n\t matTooltipPosition=\"before\"\n\t type=\"button\">\n <mat-icon>{{icon}}</mat-icon>\n </button>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { FileButtonComponent } from './file-button.component';\n\n@NgModule({\n exports: [\n FileButtonComponent\n ],\n\tdeclarations: [\n\t\tFileButtonComponent\n\t],\n\timports: [\n\t\tCommonModule,\n\t\tMatTooltipModule,\n\t\tMatButtonModule,\n\t\tMatIconModule\n\t]\n})\nexport class KoalaFileButtonModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAKa,mBAAmB,CAAA;AADhC,IAAA,WAAA,GAAA;AAEQ,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,eAAe,CAAY,IAAI,CAAC,CAAC;AACtD,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,eAAe,CAAuB,EAAE,CAAC,CAAC;AAYvE,KAAA;IAVO,MAAM,OAAO,CAAC,IAAU,EAAA;AAC9B,QAAA,IAAI,IAAI,EAAE;AACT,YAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/B,SAAA;KACD;IAEM,UAAU,CAAC,KAA2B,EAAE,KAAa,EAAA;AAC3D,QAAA,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AACvB,QAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACjC;;gHAbW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,Q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,oBAAA,OAAO,EAAE;wBACP,mBAAmB;AACpB,qBAAA;AACF,oBAAA,YAAY,EAAE;wBACb,mBAAmB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,YAAY;wBACZ,gBAAgB;wBAChB,eAAe;wBACf,aAAa;AACb,qBAAA;AACD,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
|
package/file-button/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './lib/koala.btn-file.service';
|
|
2
|
-
export * from './lib/file-button.component';
|
|
3
|
-
export * from './lib/koala.file-button.module';
|
|
4
|
-
export * from './lib/koala.file.interface';
|
|
1
|
+
export * from './lib/koala.btn-file.service';
|
|
2
|
+
export * from './lib/file-button.component';
|
|
3
|
+
export * from './lib/koala.file-button.module';
|
|
4
|
+
export * from './lib/koala.file.interface';
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { KoalaFileInterface } from './koala.file.interface';
|
|
3
|
-
import { BehaviorSubject } from 'rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class FileButtonComponent implements OnInit {
|
|
6
|
-
color?: string;
|
|
7
|
-
backgroundColor?: string;
|
|
8
|
-
icon?: string;
|
|
9
|
-
text?: string;
|
|
10
|
-
tooltip?: string;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
multiple?: boolean;
|
|
13
|
-
accept?: string;
|
|
14
|
-
setFile?: BehaviorSubject<File>;
|
|
15
|
-
updateFileList?: BehaviorSubject<KoalaFileInterface[]>;
|
|
16
|
-
autoclear: boolean;
|
|
17
|
-
getFiles: EventEmitter<KoalaFileInterface[]>;
|
|
18
|
-
files: KoalaFileInterface[];
|
|
19
|
-
style?: string;
|
|
20
|
-
private file?;
|
|
21
|
-
textSubject: BehaviorSubject<string>;
|
|
22
|
-
ngOnInit(): void;
|
|
23
|
-
emitFiles(files: FileList | null): Promise<void>;
|
|
24
|
-
open(): void;
|
|
25
|
-
private generateTextButton;
|
|
26
|
-
private convertFile;
|
|
27
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FileButtonComponent, never>;
|
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FileButtonComponent, "koala-file-button", never, { "color": "color"; "backgroundColor": "backgroundColor"; "icon": "icon"; "text": "text"; "tooltip": "tooltip"; "disabled": "disabled"; "multiple": "multiple"; "accept": "accept"; "setFile": "setFile"; "updateFileList": "updateFileList"; "autoclear": "autoclear"; }, { "getFiles": "getFiles"; }, never, never, false>;
|
|
29
|
-
}
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { KoalaFileInterface } from './koala.file.interface';
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FileButtonComponent implements OnInit {
|
|
6
|
+
color?: string;
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
text?: string;
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
accept?: string;
|
|
14
|
+
setFile?: BehaviorSubject<File>;
|
|
15
|
+
updateFileList?: BehaviorSubject<KoalaFileInterface[]>;
|
|
16
|
+
autoclear: boolean;
|
|
17
|
+
getFiles: EventEmitter<KoalaFileInterface[]>;
|
|
18
|
+
files: KoalaFileInterface[];
|
|
19
|
+
style?: string;
|
|
20
|
+
private file?;
|
|
21
|
+
textSubject: BehaviorSubject<string>;
|
|
22
|
+
ngOnInit(): void;
|
|
23
|
+
emitFiles(files: FileList | null): Promise<void>;
|
|
24
|
+
open(): void;
|
|
25
|
+
private generateTextButton;
|
|
26
|
+
private convertFile;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileButtonComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileButtonComponent, "koala-file-button", never, { "color": "color"; "backgroundColor": "backgroundColor"; "icon": "icon"; "text": "text"; "tooltip": "tooltip"; "disabled": "disabled"; "multiple": "multiple"; "accept": "accept"; "setFile": "setFile"; "updateFileList": "updateFileList"; "autoclear": "autoclear"; }, { "getFiles": "getFiles"; }, never, never, false>;
|
|
29
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BehaviorSubject } from 'rxjs';
|
|
2
|
-
import { KoalaFileInterface } from './koala.file.interface';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class KoalaBtnFileService {
|
|
5
|
-
setFileSubject: BehaviorSubject<File | null>;
|
|
6
|
-
fileListSubject: BehaviorSubject<KoalaFileInterface[]>;
|
|
7
|
-
setFile(file: File): Promise<void>;
|
|
8
|
-
removeFile(files: KoalaFileInterface[], index: number): void;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<KoalaBtnFileService, never>;
|
|
10
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<KoalaBtnFileService>;
|
|
11
|
-
}
|
|
1
|
+
import { BehaviorSubject } from 'rxjs';
|
|
2
|
+
import { KoalaFileInterface } from './koala.file.interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class KoalaBtnFileService {
|
|
5
|
+
setFileSubject: BehaviorSubject<File | null>;
|
|
6
|
+
fileListSubject: BehaviorSubject<KoalaFileInterface[]>;
|
|
7
|
+
setFile(file: File): Promise<void>;
|
|
8
|
+
removeFile(files: KoalaFileInterface[], index: number): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KoalaBtnFileService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<KoalaBtnFileService>;
|
|
11
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./file-button.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
import * as i3 from "@angular/material/tooltip";
|
|
5
|
-
import * as i4 from "@angular/material/button";
|
|
6
|
-
import * as i5 from "@angular/material/icon";
|
|
7
|
-
export declare class KoalaFileButtonModule {
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<KoalaFileButtonModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<KoalaFileButtonModule, [typeof i1.FileButtonComponent], [typeof i2.CommonModule, typeof i3.MatTooltipModule, typeof i4.MatButtonModule, typeof i5.MatIconModule], [typeof i1.FileButtonComponent]>;
|
|
10
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<KoalaFileButtonModule>;
|
|
11
|
-
}
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./file-button.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/material/tooltip";
|
|
5
|
+
import * as i4 from "@angular/material/button";
|
|
6
|
+
import * as i5 from "@angular/material/icon";
|
|
7
|
+
export declare class KoalaFileButtonModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KoalaFileButtonModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<KoalaFileButtonModule, [typeof i1.FileButtonComponent], [typeof i2.CommonModule, typeof i3.MatTooltipModule, typeof i4.MatButtonModule, typeof i5.MatIconModule], [typeof i1.FileButtonComponent]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<KoalaFileButtonModule>;
|
|
11
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface KoalaFileInterface {
|
|
2
|
-
type: string;
|
|
3
|
-
base64: string;
|
|
4
|
-
filename: string;
|
|
5
|
-
}
|
|
1
|
+
export interface KoalaFileInterface {
|
|
2
|
+
type: string;
|
|
3
|
+
base64: string;
|
|
4
|
+
filename: string;
|
|
5
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './lib/folder.component';
|
|
2
|
-
export * from './lib/koala.folder-page.module';
|
|
3
|
-
export * from './lib/koala-navigate-history.interface';
|
|
1
|
+
export * from './lib/folder.component';
|
|
2
|
+
export * from './lib/koala.folder-page.module';
|
|
3
|
+
export * from './lib/koala-navigate-history.interface';
|
|
4
4
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9mb2xkZXItcGFnZS9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLGdDQUFnQyxDQUFDO0FBQy9DLGNBQWMsd0NBQXdDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9mb2xkZXIuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2tvYWxhLmZvbGRlci1wYWdlLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9rb2FsYS1uYXZpZ2F0ZS1oaXN0b3J5LmludGVyZmFjZSc7XG4iXX0=
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
5
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia29hbGFyeC11aS1mb2xkZXItcGFnZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2ZvbGRlci1wYWdlL3NyYy9rb2FsYXJ4LXVpLWZvbGRlci1wYWdlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|