@wirabyte/ui 0.0.0-stage → 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/LICENSE +21 -0
- package/README.md +74 -2
- package/accordion/accordion.component.d.ts +126 -0
- package/accordion/accordion.module.d.ts +9 -0
- package/accordion/accordion.types.d.ts +10 -0
- package/accordion/index.d.ts +5 -0
- package/accordion/public-api.d.ts +3 -0
- package/alert/alert-dialog.base.d.ts +79 -0
- package/alert/alert-dialog.component.d.ts +8 -0
- package/alert/alert.module.d.ts +8 -0
- package/alert/alert.service.d.ts +76 -0
- package/alert/alert.types.d.ts +87 -0
- package/alert/index.d.ts +5 -0
- package/alert/public-api.d.ts +5 -0
- package/animate/animate.directive.d.ts +34 -0
- package/animate/animate.module.d.ts +11 -0
- package/animate/animate.service.d.ts +36 -0
- package/animate/animate.styles.d.ts +2 -0
- package/animate/animate.types.d.ts +20 -0
- package/animate/index.d.ts +5 -0
- package/animate/public-api.d.ts +4 -0
- package/api/index.d.ts +5 -0
- package/api/public-api.d.ts +15 -0
- package/api/shared.module.d.ts +8 -0
- package/asidemenu/asidemenu.component.d.ts +221 -0
- package/asidemenu/asidemenu.module.d.ts +9 -0
- package/asidemenu/index.d.ts +5 -0
- package/asidemenu/public-api.d.ts +2 -0
- package/autocomplete/autocomplete.base.d.ts +181 -0
- package/autocomplete/autocomplete.component.d.ts +10 -0
- package/autocomplete/autocomplete.module.d.ts +9 -0
- package/autocomplete/autocomplete.types.d.ts +10 -0
- package/autocomplete/index.d.ts +5 -0
- package/autocomplete/public-api.d.ts +4 -0
- package/avatar/avatar.component.d.ts +38 -0
- package/avatar/avatar.module.d.ts +8 -0
- package/avatar/avatar.types.d.ts +2 -0
- package/avatar/index.d.ts +5 -0
- package/avatar/public-api.d.ts +3 -0
- package/badge/badge.component.d.ts +20 -0
- package/badge/badge.directive.d.ts +32 -0
- package/badge/badge.module.d.ts +9 -0
- package/badge/badge.styles.d.ts +2 -0
- package/badge/badge.types.d.ts +3 -0
- package/badge/index.d.ts +5 -0
- package/badge/public-api.d.ts +4 -0
- package/blockui/blockui.component.d.ts +41 -0
- package/blockui/blockui.module.d.ts +8 -0
- package/blockui/index.d.ts +5 -0
- package/blockui/public-api.d.ts +2 -0
- package/bottombar/bottombar.component.d.ts +79 -0
- package/bottombar/bottombar.module.d.ts +9 -0
- package/bottombar/index.d.ts +5 -0
- package/bottombar/public-api.d.ts +2 -0
- package/breadcrumb/breadcrumb.component.d.ts +41 -0
- package/breadcrumb/breadcrumb.module.d.ts +8 -0
- package/breadcrumb/index.d.ts +5 -0
- package/breadcrumb/public-api.d.ts +2 -0
- package/button/button-class.d.ts +8 -0
- package/button/button.component.d.ts +69 -0
- package/button/button.directive.d.ts +53 -0
- package/button/button.module.d.ts +9 -0
- package/button/button.styles.d.ts +2 -0
- package/button/button.types.d.ts +8 -0
- package/button/index.d.ts +5 -0
- package/button/public-api.d.ts +7 -0
- package/card/card-slots.d.ts +11 -0
- package/card/card.component.d.ts +41 -0
- package/card/card.module.d.ts +10 -0
- package/card/card.types.d.ts +5 -0
- package/card/index.d.ts +5 -0
- package/card/public-api.d.ts +4 -0
- package/carousel/carousel.component.d.ts +169 -0
- package/carousel/carousel.module.d.ts +10 -0
- package/carousel/carousel.types.d.ts +21 -0
- package/carousel/index.d.ts +5 -0
- package/carousel/public-api.d.ts +3 -0
- package/chart/chart.component.d.ts +11 -0
- package/chart/chart.module.d.ts +8 -0
- package/chart/index.d.ts +5 -0
- package/chart/public-api.d.ts +3 -0
- package/chartjs/chartjs.base.d.ts +70 -0
- package/chartjs/chartjs.component.d.ts +10 -0
- package/chartjs/chartjs.module.d.ts +8 -0
- package/chartjs/chartjs.types.d.ts +8 -0
- package/chartjs/index.d.ts +5 -0
- package/chartjs/public-api.d.ts +4 -0
- package/checkbox/checkbox.component.d.ts +59 -0
- package/checkbox/checkbox.module.d.ts +8 -0
- package/checkbox/checkbox.styles.d.ts +2 -0
- package/checkbox/checkbox.types.d.ts +4 -0
- package/checkbox/index.d.ts +5 -0
- package/checkbox/public-api.d.ts +5 -0
- package/chip/chip.component.d.ts +36 -0
- package/chip/chip.module.d.ts +8 -0
- package/chip/index.d.ts +5 -0
- package/chip/public-api.d.ts +2 -0
- package/colorpicker/colorpicker.component.d.ts +87 -0
- package/colorpicker/colorpicker.module.d.ts +8 -0
- package/colorpicker/index.d.ts +5 -0
- package/colorpicker/public-api.d.ts +2 -0
- package/config/forms.d.ts +17 -0
- package/config/index.d.ts +5 -0
- package/config/initializer.d.ts +3 -0
- package/config/menu-item.d.ts +52 -0
- package/config/options.d.ts +48 -0
- package/config/popup.d.ts +48 -0
- package/config/provide.d.ts +23 -0
- package/config/public-api.d.ts +17 -0
- package/config/ripple.d.ts +2 -0
- package/config/scroll-lock.d.ts +5 -0
- package/config/severity.d.ts +5 -0
- package/config/style-loader.d.ts +12 -0
- package/config/template.d.ts +19 -0
- package/config/theme.service.d.ts +46 -0
- package/config/version-guard.d.ts +14 -0
- package/config/version.d.ts +6 -0
- package/config/wu-config.service.d.ts +24 -0
- package/confirmdialog/confirmation.service.d.ts +25 -0
- package/confirmdialog/confirmdialog.base.d.ts +110 -0
- package/confirmdialog/confirmdialog.component.d.ts +11 -0
- package/confirmdialog/confirmdialog.module.d.ts +9 -0
- package/confirmdialog/confirmdialog.types.d.ts +37 -0
- package/confirmdialog/index.d.ts +5 -0
- package/confirmdialog/public-api.d.ts +5 -0
- package/contextmenu/contextmenu.component.d.ts +47 -0
- package/contextmenu/contextmenu.module.d.ts +8 -0
- package/contextmenu/index.d.ts +5 -0
- package/contextmenu/public-api.d.ts +2 -0
- package/core/carousel.d.ts +27 -0
- package/core/catalog.d.ts +446 -0
- package/core/chart/format.d.ts +19 -0
- package/core/chart/index.d.ts +6 -0
- package/core/chart/kinds.d.ts +78 -0
- package/core/chart/model.d.ts +500 -0
- package/core/chart/more.d.ts +33 -0
- package/core/chart/paths.d.ts +41 -0
- package/core/chart/scale.d.ts +22 -0
- package/core/color.d.ts +31 -0
- package/core/colorpicker.d.ts +23 -0
- package/core/compat.d.ts +11 -0
- package/core/config.d.ts +64 -0
- package/core/date.d.ts +130 -0
- package/core/datepicker.d.ts +184 -0
- package/core/dock.d.ts +6 -0
- package/core/editor.d.ts +117 -0
- package/core/errorpage.d.ts +15 -0
- package/core/excel.d.ts +239 -0
- package/core/exporters.d.ts +18 -0
- package/core/families.d.ts +13 -0
- package/core/fileupload.d.ts +24 -0
- package/core/flow/changes.d.ts +63 -0
- package/core/flow/edges.d.ts +52 -0
- package/core/flow/export.d.ts +56 -0
- package/core/flow/geometry.d.ts +117 -0
- package/core/flow/graph.d.ts +104 -0
- package/core/flow/history.d.ts +54 -0
- package/core/flow/index.d.ts +13 -0
- package/core/flow/interaction.d.ts +140 -0
- package/core/flow/layout.d.ts +57 -0
- package/core/flow/paths.d.ts +76 -0
- package/core/flow/text.d.ts +18 -0
- package/core/flow/types.d.ts +217 -0
- package/core/flow/viewport.d.ts +48 -0
- package/core/i18n.d.ts +24 -0
- package/core/imagecompare.d.ts +12 -0
- package/core/imagecropper.d.ts +183 -0
- package/core/index.d.ts +39 -0
- package/core/inputotp.d.ts +20 -0
- package/core/knob.d.ts +28 -0
- package/core/mask.d.ts +43 -0
- package/core/menu.d.ts +29 -0
- package/core/number.d.ts +66 -0
- package/core/organizationchart.d.ts +39 -0
- package/core/overrides.d.ts +109 -0
- package/core/picklist.d.ts +81 -0
- package/core/select.d.ts +44 -0
- package/core/splitter.d.ts +17 -0
- package/core/table.d.ts +48 -0
- package/core/terminal.d.ts +12 -0
- package/core/thai/buddhist.d.ts +22 -0
- package/core/thai/locale.d.ts +358 -0
- package/core/thai/text.d.ts +32 -0
- package/core/thai/thai-id.d.ts +6 -0
- package/core/tokens.d.ts +69 -0
- package/core/tree.d.ts +50 -0
- package/core/validation.d.ts +18 -0
- package/datepicker/datepicker.component.d.ts +275 -0
- package/datepicker/datepicker.module.d.ts +8 -0
- package/datepicker/datepicker.types.d.ts +10 -0
- package/datepicker/index.d.ts +5 -0
- package/datepicker/public-api.d.ts +3 -0
- package/dialog/dialog.base.d.ts +147 -0
- package/dialog/dialog.component.d.ts +11 -0
- package/dialog/dialog.module.d.ts +10 -0
- package/dialog/dialog.service.d.ts +104 -0
- package/dialog/dialog.types.d.ts +3 -0
- package/dialog/index.d.ts +5 -0
- package/dialog/public-api.d.ts +5 -0
- package/divider/divider.component.d.ts +20 -0
- package/divider/divider.module.d.ts +8 -0
- package/divider/divider.types.d.ts +4 -0
- package/divider/index.d.ts +5 -0
- package/divider/public-api.d.ts +3 -0
- package/dock/dock.component.d.ts +88 -0
- package/dock/dock.module.d.ts +9 -0
- package/dock/index.d.ts +5 -0
- package/dock/public-api.d.ts +2 -0
- package/dragdrop/dragdrop.directive.d.ts +65 -0
- package/dragdrop/dragdrop.module.d.ts +8 -0
- package/dragdrop/dragdrop.styles.d.ts +2 -0
- package/dragdrop/index.d.ts +5 -0
- package/dragdrop/public-api.d.ts +2 -0
- package/drawer/drawer.component.d.ts +102 -0
- package/drawer/drawer.module.d.ts +8 -0
- package/drawer/index.d.ts +5 -0
- package/drawer/public-api.d.ts +5 -0
- package/editor/editor-content.directive.d.ts +10 -0
- package/editor/editor-icon.directive.d.ts +8 -0
- package/editor/editor.base.d.ts +367 -0
- package/editor/editor.component.d.ts +11 -0
- package/editor/editor.dom.d.ts +91 -0
- package/editor/editor.icons.d.ts +13 -0
- package/editor/editor.module.d.ts +10 -0
- package/editor/editor.styles.d.ts +2 -0
- package/editor/editor.types.d.ts +92 -0
- package/editor/index.d.ts +5 -0
- package/editor/public-api.d.ts +6 -0
- package/emptystate/emptystate.component.d.ts +44 -0
- package/emptystate/emptystate.module.d.ts +8 -0
- package/emptystate/index.d.ts +5 -0
- package/emptystate/public-api.d.ts +2 -0
- package/errorpage/errorpage.component.d.ts +73 -0
- package/errorpage/errorpage.module.d.ts +8 -0
- package/errorpage/index.d.ts +5 -0
- package/errorpage/public-api.d.ts +2 -0
- package/esm2020/accordion/accordion.component.mjs +376 -0
- package/esm2020/accordion/accordion.module.mjs +19 -0
- package/esm2020/accordion/accordion.types.mjs +17 -0
- package/esm2020/accordion/public-api.mjs +4 -0
- package/esm2020/accordion/wirabyte-ui-accordion.mjs +5 -0
- package/esm2020/alert/alert-dialog.base.mjs +355 -0
- package/esm2020/alert/alert-dialog.component.mjs +21 -0
- package/esm2020/alert/alert.module.mjs +17 -0
- package/esm2020/alert/alert.service.mjs +142 -0
- package/esm2020/alert/alert.types.mjs +2 -0
- package/esm2020/alert/public-api.mjs +6 -0
- package/esm2020/alert/wirabyte-ui-alert.mjs +5 -0
- package/esm2020/animate/animate.directive.mjs +71 -0
- package/esm2020/animate/animate.module.mjs +21 -0
- package/esm2020/animate/animate.service.mjs +183 -0
- package/esm2020/animate/animate.styles.mjs +3 -0
- package/esm2020/animate/animate.types.mjs +2 -0
- package/esm2020/animate/public-api.mjs +5 -0
- package/esm2020/animate/wirabyte-ui-animate.mjs +5 -0
- package/esm2020/api/public-api.mjs +11 -0
- package/esm2020/api/shared.module.mjs +17 -0
- package/esm2020/api/wirabyte-ui-api.mjs +5 -0
- package/esm2020/asidemenu/asidemenu.component.mjs +811 -0
- package/esm2020/asidemenu/asidemenu.module.mjs +18 -0
- package/esm2020/asidemenu/public-api.mjs +3 -0
- package/esm2020/asidemenu/wirabyte-ui-asidemenu.mjs +5 -0
- package/esm2020/autocomplete/autocomplete.base.mjs +567 -0
- package/esm2020/autocomplete/autocomplete.component.mjs +24 -0
- package/esm2020/autocomplete/autocomplete.module.mjs +18 -0
- package/esm2020/autocomplete/autocomplete.types.mjs +2 -0
- package/esm2020/autocomplete/public-api.mjs +5 -0
- package/esm2020/autocomplete/wirabyte-ui-autocomplete.mjs +5 -0
- package/esm2020/avatar/avatar.component.mjs +81 -0
- package/esm2020/avatar/avatar.module.mjs +17 -0
- package/esm2020/avatar/avatar.types.mjs +2 -0
- package/esm2020/avatar/public-api.mjs +4 -0
- package/esm2020/avatar/wirabyte-ui-avatar.mjs +5 -0
- package/esm2020/badge/badge.component.mjs +52 -0
- package/esm2020/badge/badge.directive.mjs +111 -0
- package/esm2020/badge/badge.module.mjs +18 -0
- package/esm2020/badge/badge.styles.mjs +3 -0
- package/esm2020/badge/badge.types.mjs +2 -0
- package/esm2020/badge/public-api.mjs +5 -0
- package/esm2020/badge/wirabyte-ui-badge.mjs +5 -0
- package/esm2020/blockui/blockui.component.mjs +152 -0
- package/esm2020/blockui/blockui.module.mjs +17 -0
- package/esm2020/blockui/public-api.mjs +3 -0
- package/esm2020/blockui/wirabyte-ui-blockui.mjs +5 -0
- package/esm2020/bottombar/bottombar.component.mjs +209 -0
- package/esm2020/bottombar/bottombar.module.mjs +18 -0
- package/esm2020/bottombar/public-api.mjs +3 -0
- package/esm2020/bottombar/wirabyte-ui-bottombar.mjs +5 -0
- package/esm2020/breadcrumb/breadcrumb.component.mjs +86 -0
- package/esm2020/breadcrumb/breadcrumb.module.mjs +17 -0
- package/esm2020/breadcrumb/public-api.mjs +3 -0
- package/esm2020/breadcrumb/wirabyte-ui-breadcrumb.mjs +5 -0
- package/esm2020/button/button-class.mjs +26 -0
- package/esm2020/button/button.component.mjs +175 -0
- package/esm2020/button/button.directive.mjs +193 -0
- package/esm2020/button/button.module.mjs +18 -0
- package/esm2020/button/button.styles.mjs +3 -0
- package/esm2020/button/button.types.mjs +2 -0
- package/esm2020/button/public-api.mjs +8 -0
- package/esm2020/button/wirabyte-ui-button.mjs +5 -0
- package/esm2020/card/card-slots.mjs +27 -0
- package/esm2020/card/card.component.mjs +88 -0
- package/esm2020/card/card.module.mjs +19 -0
- package/esm2020/card/card.types.mjs +2 -0
- package/esm2020/card/public-api.mjs +5 -0
- package/esm2020/card/wirabyte-ui-card.mjs +5 -0
- package/esm2020/carousel/carousel.component.mjs +617 -0
- package/esm2020/carousel/carousel.module.mjs +19 -0
- package/esm2020/carousel/carousel.types.mjs +2 -0
- package/esm2020/carousel/public-api.mjs +4 -0
- package/esm2020/carousel/wirabyte-ui-carousel.mjs +5 -0
- package/esm2020/chart/chart.component.mjs +42 -0
- package/esm2020/chart/chart.module.mjs +17 -0
- package/esm2020/chart/public-api.mjs +3 -0
- package/esm2020/chart/wirabyte-ui-chart.mjs +5 -0
- package/esm2020/chartjs/chartjs.base.mjs +204 -0
- package/esm2020/chartjs/chartjs.component.mjs +41 -0
- package/esm2020/chartjs/chartjs.module.mjs +17 -0
- package/esm2020/chartjs/chartjs.types.mjs +2 -0
- package/esm2020/chartjs/public-api.mjs +5 -0
- package/esm2020/chartjs/wirabyte-ui-chartjs.mjs +5 -0
- package/esm2020/checkbox/checkbox.component.mjs +140 -0
- package/esm2020/checkbox/checkbox.module.mjs +17 -0
- package/esm2020/checkbox/checkbox.styles.mjs +3 -0
- package/esm2020/checkbox/checkbox.types.mjs +2 -0
- package/esm2020/checkbox/public-api.mjs +6 -0
- package/esm2020/checkbox/wirabyte-ui-checkbox.mjs +5 -0
- package/esm2020/chip/chip.component.mjs +76 -0
- package/esm2020/chip/chip.module.mjs +17 -0
- package/esm2020/chip/public-api.mjs +3 -0
- package/esm2020/chip/wirabyte-ui-chip.mjs +5 -0
- package/esm2020/colorpicker/colorpicker.component.mjs +308 -0
- package/esm2020/colorpicker/colorpicker.module.mjs +17 -0
- package/esm2020/colorpicker/public-api.mjs +3 -0
- package/esm2020/colorpicker/wirabyte-ui-colorpicker.mjs +5 -0
- package/esm2020/config/forms.mjs +38 -0
- package/esm2020/config/initializer.mjs +6 -0
- package/esm2020/config/menu-item.mjs +2 -0
- package/esm2020/config/options.mjs +3 -0
- package/esm2020/config/popup.mjs +153 -0
- package/esm2020/config/provide.mjs +45 -0
- package/esm2020/config/public-api.mjs +17 -0
- package/esm2020/config/ripple.mjs +13 -0
- package/esm2020/config/scroll-lock.mjs +31 -0
- package/esm2020/config/severity.mjs +9 -0
- package/esm2020/config/style-loader.mjs +32 -0
- package/esm2020/config/template.mjs +46 -0
- package/esm2020/config/theme.service.mjs +161 -0
- package/esm2020/config/version-guard.mjs +43 -0
- package/esm2020/config/version.mjs +3 -0
- package/esm2020/config/wirabyte-ui-config.mjs +5 -0
- package/esm2020/config/wu-config.service.mjs +50 -0
- package/esm2020/confirmdialog/confirmation.service.mjs +78 -0
- package/esm2020/confirmdialog/confirmdialog.base.mjs +274 -0
- package/esm2020/confirmdialog/confirmdialog.component.mjs +22 -0
- package/esm2020/confirmdialog/confirmdialog.module.mjs +18 -0
- package/esm2020/confirmdialog/confirmdialog.types.mjs +8 -0
- package/esm2020/confirmdialog/public-api.mjs +6 -0
- package/esm2020/confirmdialog/wirabyte-ui-confirmdialog.mjs +5 -0
- package/esm2020/contextmenu/contextmenu.component.mjs +159 -0
- package/esm2020/contextmenu/contextmenu.module.mjs +17 -0
- package/esm2020/contextmenu/public-api.mjs +3 -0
- package/esm2020/contextmenu/wirabyte-ui-contextmenu.mjs +5 -0
- package/esm2020/core/carousel.mjs +62 -0
- package/esm2020/core/catalog.mjs +203 -0
- package/esm2020/core/chart/format.mjs +66 -0
- package/esm2020/core/chart/index.mjs +7 -0
- package/esm2020/core/chart/kinds.mjs +1336 -0
- package/esm2020/core/chart/model.mjs +713 -0
- package/esm2020/core/chart/more.mjs +311 -0
- package/esm2020/core/chart/paths.mjs +160 -0
- package/esm2020/core/chart/scale.mjs +58 -0
- package/esm2020/core/color.mjs +94 -0
- package/esm2020/core/colorpicker.mjs +73 -0
- package/esm2020/core/compat.mjs +149 -0
- package/esm2020/core/config.mjs +163 -0
- package/esm2020/core/date.mjs +317 -0
- package/esm2020/core/datepicker.mjs +526 -0
- package/esm2020/core/dock.mjs +14 -0
- package/esm2020/core/editor.mjs +271 -0
- package/esm2020/core/errorpage.mjs +47 -0
- package/esm2020/core/excel.mjs +809 -0
- package/esm2020/core/exporters.mjs +241 -0
- package/esm2020/core/families.mjs +1756 -0
- package/esm2020/core/fileupload.mjs +48 -0
- package/esm2020/core/flow/changes.mjs +205 -0
- package/esm2020/core/flow/edges.mjs +87 -0
- package/esm2020/core/flow/export.mjs +231 -0
- package/esm2020/core/flow/geometry.mjs +309 -0
- package/esm2020/core/flow/graph.mjs +314 -0
- package/esm2020/core/flow/history.mjs +105 -0
- package/esm2020/core/flow/index.mjs +14 -0
- package/esm2020/core/flow/interaction.mjs +246 -0
- package/esm2020/core/flow/layout.mjs +586 -0
- package/esm2020/core/flow/paths.mjs +252 -0
- package/esm2020/core/flow/text.mjs +68 -0
- package/esm2020/core/flow/types.mjs +7 -0
- package/esm2020/core/flow/viewport.mjs +133 -0
- package/esm2020/core/i18n.mjs +78 -0
- package/esm2020/core/imagecompare.mjs +28 -0
- package/esm2020/core/imagecropper.mjs +483 -0
- package/esm2020/core/index.mjs +40 -0
- package/esm2020/core/inputotp.mjs +50 -0
- package/esm2020/core/knob.mjs +106 -0
- package/esm2020/core/mask.mjs +112 -0
- package/esm2020/core/menu.mjs +77 -0
- package/esm2020/core/number.mjs +131 -0
- package/esm2020/core/organizationchart.mjs +84 -0
- package/esm2020/core/overrides.mjs +169 -0
- package/esm2020/core/picklist.mjs +248 -0
- package/esm2020/core/select.mjs +161 -0
- package/esm2020/core/splitter.mjs +63 -0
- package/esm2020/core/table.mjs +174 -0
- package/esm2020/core/terminal.mjs +29 -0
- package/esm2020/core/thai/buddhist.mjs +129 -0
- package/esm2020/core/thai/locale.mjs +652 -0
- package/esm2020/core/thai/text.mjs +164 -0
- package/esm2020/core/thai/thai-id.mjs +22 -0
- package/esm2020/core/tokens.mjs +314 -0
- package/esm2020/core/tree.mjs +137 -0
- package/esm2020/core/validation.mjs +43 -0
- package/esm2020/core/wirabyte-ui-core.mjs +5 -0
- package/esm2020/datepicker/datepicker.component.mjs +921 -0
- package/esm2020/datepicker/datepicker.module.mjs +17 -0
- package/esm2020/datepicker/datepicker.types.mjs +2 -0
- package/esm2020/datepicker/public-api.mjs +4 -0
- package/esm2020/datepicker/wirabyte-ui-datepicker.mjs +5 -0
- package/esm2020/dialog/dialog.base.mjs +433 -0
- package/esm2020/dialog/dialog.component.mjs +18 -0
- package/esm2020/dialog/dialog.module.mjs +19 -0
- package/esm2020/dialog/dialog.service.mjs +237 -0
- package/esm2020/dialog/dialog.types.mjs +2 -0
- package/esm2020/dialog/public-api.mjs +6 -0
- package/esm2020/dialog/wirabyte-ui-dialog.mjs +5 -0
- package/esm2020/divider/divider.component.mjs +56 -0
- package/esm2020/divider/divider.module.mjs +17 -0
- package/esm2020/divider/divider.types.mjs +2 -0
- package/esm2020/divider/public-api.mjs +4 -0
- package/esm2020/divider/wirabyte-ui-divider.mjs +5 -0
- package/esm2020/dock/dock.component.mjs +287 -0
- package/esm2020/dock/dock.module.mjs +18 -0
- package/esm2020/dock/public-api.mjs +3 -0
- package/esm2020/dock/wirabyte-ui-dock.mjs +5 -0
- package/esm2020/dragdrop/dragdrop.directive.mjs +206 -0
- package/esm2020/dragdrop/dragdrop.module.mjs +17 -0
- package/esm2020/dragdrop/dragdrop.styles.mjs +3 -0
- package/esm2020/dragdrop/public-api.mjs +3 -0
- package/esm2020/dragdrop/wirabyte-ui-dragdrop.mjs +5 -0
- package/esm2020/drawer/drawer.component.mjs +300 -0
- package/esm2020/drawer/drawer.module.mjs +17 -0
- package/esm2020/drawer/public-api.mjs +6 -0
- package/esm2020/drawer/wirabyte-ui-drawer.mjs +5 -0
- package/esm2020/editor/editor-content.directive.mjs +24 -0
- package/esm2020/editor/editor-icon.directive.mjs +24 -0
- package/esm2020/editor/editor.base.mjs +2082 -0
- package/esm2020/editor/editor.component.mjs +20 -0
- package/esm2020/editor/editor.dom.mjs +787 -0
- package/esm2020/editor/editor.icons.mjs +106 -0
- package/esm2020/editor/editor.module.mjs +19 -0
- package/esm2020/editor/editor.styles.mjs +3 -0
- package/esm2020/editor/editor.types.mjs +6 -0
- package/esm2020/editor/public-api.mjs +7 -0
- package/esm2020/editor/wirabyte-ui-editor.mjs +5 -0
- package/esm2020/emptystate/emptystate.component.mjs +78 -0
- package/esm2020/emptystate/emptystate.module.mjs +17 -0
- package/esm2020/emptystate/public-api.mjs +3 -0
- package/esm2020/emptystate/wirabyte-ui-emptystate.mjs +5 -0
- package/esm2020/errorpage/errorpage.component.mjs +163 -0
- package/esm2020/errorpage/errorpage.module.mjs +17 -0
- package/esm2020/errorpage/public-api.mjs +3 -0
- package/esm2020/errorpage/wirabyte-ui-errorpage.mjs +5 -0
- package/esm2020/excel/excel.mjs +35 -0
- package/esm2020/excel/public-api.mjs +3 -0
- package/esm2020/excel/wirabyte-ui-excel.mjs +5 -0
- package/esm2020/fieldset/fieldset.component.mjs +74 -0
- package/esm2020/fieldset/fieldset.module.mjs +18 -0
- package/esm2020/fieldset/public-api.mjs +3 -0
- package/esm2020/fieldset/wirabyte-ui-fieldset.mjs +5 -0
- package/esm2020/fileupload/fileupload.base.mjs +563 -0
- package/esm2020/fileupload/fileupload.component.mjs +19 -0
- package/esm2020/fileupload/fileupload.module.mjs +18 -0
- package/esm2020/fileupload/fileupload.types.mjs +2 -0
- package/esm2020/fileupload/public-api.mjs +5 -0
- package/esm2020/fileupload/wirabyte-ui-fileupload.mjs +5 -0
- package/esm2020/floatlabel/floatlabel.component.mjs +53 -0
- package/esm2020/floatlabel/floatlabel.module.mjs +17 -0
- package/esm2020/floatlabel/floatlabel.types.mjs +2 -0
- package/esm2020/floatlabel/public-api.mjs +4 -0
- package/esm2020/floatlabel/wirabyte-ui-floatlabel.mjs +5 -0
- package/esm2020/flow/flow-background.component.mjs +183 -0
- package/esm2020/flow/flow-controls.component.mjs +267 -0
- package/esm2020/flow/flow-handle.component.mjs +130 -0
- package/esm2020/flow/flow-history.directive.mjs +129 -0
- package/esm2020/flow/flow-host.mjs +7 -0
- package/esm2020/flow/flow-minimap.component.mjs +322 -0
- package/esm2020/flow/flow-node-outlet.mjs +148 -0
- package/esm2020/flow/flow-node-resizer.component.mjs +208 -0
- package/esm2020/flow/flow-node-toolbar.component.mjs +119 -0
- package/esm2020/flow/flow-panel.component.mjs +37 -0
- package/esm2020/flow/flow-templates.mjs +100 -0
- package/esm2020/flow/flow.component.mjs +3245 -0
- package/esm2020/flow/flow.module.mjs +76 -0
- package/esm2020/flow/flow.types.mjs +7 -0
- package/esm2020/flow/public-api.mjs +17 -0
- package/esm2020/flow/wirabyte-ui-flow.mjs +5 -0
- package/esm2020/galleria/galleria.component.mjs +480 -0
- package/esm2020/galleria/galleria.module.mjs +17 -0
- package/esm2020/galleria/public-api.mjs +3 -0
- package/esm2020/galleria/wirabyte-ui-galleria.mjs +5 -0
- package/esm2020/i18n/i18n.module.mjs +37 -0
- package/esm2020/i18n/i18n.service.mjs +148 -0
- package/esm2020/i18n/i18n.types.mjs +3 -0
- package/esm2020/i18n/language-switch.component.mjs +91 -0
- package/esm2020/i18n/public-api.mjs +7 -0
- package/esm2020/i18n/translate.pipe.mjs +52 -0
- package/esm2020/i18n/wirabyte-ui-i18n.mjs +5 -0
- package/esm2020/iconfield/iconfield.component.mjs +73 -0
- package/esm2020/iconfield/iconfield.module.mjs +17 -0
- package/esm2020/iconfield/public-api.mjs +3 -0
- package/esm2020/iconfield/wirabyte-ui-iconfield.mjs +5 -0
- package/esm2020/image/image.base.mjs +183 -0
- package/esm2020/image/image.component.mjs +14 -0
- package/esm2020/image/image.module.mjs +18 -0
- package/esm2020/image/public-api.mjs +4 -0
- package/esm2020/image/wirabyte-ui-image.mjs +5 -0
- package/esm2020/imagecompare/imagecompare.component.mjs +200 -0
- package/esm2020/imagecompare/imagecompare.module.mjs +18 -0
- package/esm2020/imagecompare/public-api.mjs +3 -0
- package/esm2020/imagecompare/wirabyte-ui-imagecompare.mjs +5 -0
- package/esm2020/imagecropper/imagecropper.component.mjs +1253 -0
- package/esm2020/imagecropper/imagecropper.module.mjs +17 -0
- package/esm2020/imagecropper/imagecropper.types.mjs +6 -0
- package/esm2020/imagecropper/public-api.mjs +5 -0
- package/esm2020/imagecropper/wirabyte-ui-imagecropper.mjs +5 -0
- package/esm2020/inplace/inplace.component.mjs +145 -0
- package/esm2020/inplace/inplace.module.mjs +17 -0
- package/esm2020/inplace/public-api.mjs +3 -0
- package/esm2020/inplace/wirabyte-ui-inplace.mjs +5 -0
- package/esm2020/inputgroup/inputgroup.component.mjs +61 -0
- package/esm2020/inputgroup/inputgroup.module.mjs +17 -0
- package/esm2020/inputgroup/public-api.mjs +3 -0
- package/esm2020/inputgroup/wirabyte-ui-inputgroup.mjs +5 -0
- package/esm2020/inputmask/inputmask.base.mjs +319 -0
- package/esm2020/inputmask/inputmask.component.mjs +23 -0
- package/esm2020/inputmask/inputmask.module.mjs +17 -0
- package/esm2020/inputmask/public-api.mjs +4 -0
- package/esm2020/inputmask/wirabyte-ui-inputmask.mjs +5 -0
- package/esm2020/inputnumber/inputnumber.component.mjs +364 -0
- package/esm2020/inputnumber/inputnumber.module.mjs +17 -0
- package/esm2020/inputnumber/inputnumber.types.mjs +2 -0
- package/esm2020/inputnumber/public-api.mjs +4 -0
- package/esm2020/inputnumber/wirabyte-ui-inputnumber.mjs +5 -0
- package/esm2020/inputotp/inputotp.component.mjs +344 -0
- package/esm2020/inputotp/inputotp.module.mjs +18 -0
- package/esm2020/inputotp/inputotp.types.mjs +2 -0
- package/esm2020/inputotp/public-api.mjs +4 -0
- package/esm2020/inputotp/wirabyte-ui-inputotp.mjs +5 -0
- package/esm2020/inputtext/inputtext.directive.mjs +62 -0
- package/esm2020/inputtext/inputtext.module.mjs +17 -0
- package/esm2020/inputtext/inputtext.styles.mjs +3 -0
- package/esm2020/inputtext/inputtext.types.mjs +2 -0
- package/esm2020/inputtext/public-api.mjs +6 -0
- package/esm2020/inputtext/wirabyte-ui-inputtext.mjs +5 -0
- package/esm2020/keyfilter/keyfilter.directive.mjs +131 -0
- package/esm2020/keyfilter/keyfilter.module.mjs +17 -0
- package/esm2020/keyfilter/public-api.mjs +3 -0
- package/esm2020/keyfilter/wirabyte-ui-keyfilter.mjs +5 -0
- package/esm2020/knob/knob.component.mjs +207 -0
- package/esm2020/knob/knob.module.mjs +17 -0
- package/esm2020/knob/public-api.mjs +3 -0
- package/esm2020/knob/wirabyte-ui-knob.mjs +5 -0
- package/esm2020/listbox/listbox.component.mjs +520 -0
- package/esm2020/listbox/listbox.module.mjs +17 -0
- package/esm2020/listbox/public-api.mjs +3 -0
- package/esm2020/listbox/wirabyte-ui-listbox.mjs +5 -0
- package/esm2020/menu/menu.base.mjs +320 -0
- package/esm2020/menu/menu.component.mjs +19 -0
- package/esm2020/menu/menu.module.mjs +18 -0
- package/esm2020/menu/public-api.mjs +4 -0
- package/esm2020/menu/wirabyte-ui-menu.mjs +5 -0
- package/esm2020/menubar/menubar.base.mjs +568 -0
- package/esm2020/menubar/menubar.component.mjs +19 -0
- package/esm2020/menubar/menubar.module.mjs +18 -0
- package/esm2020/menubar/public-api.mjs +4 -0
- package/esm2020/menubar/wirabyte-ui-menubar.mjs +5 -0
- package/esm2020/message/message.component.mjs +107 -0
- package/esm2020/message/message.module.mjs +20 -0
- package/esm2020/message/message.types.mjs +2 -0
- package/esm2020/message/messages.base.mjs +109 -0
- package/esm2020/message/messages.component.mjs +62 -0
- package/esm2020/message/public-api.mjs +6 -0
- package/esm2020/message/wirabyte-ui-message.mjs +5 -0
- package/esm2020/metergroup/metergroup.component.mjs +146 -0
- package/esm2020/metergroup/metergroup.module.mjs +17 -0
- package/esm2020/metergroup/metergroup.types.mjs +26 -0
- package/esm2020/metergroup/public-api.mjs +4 -0
- package/esm2020/metergroup/wirabyte-ui-metergroup.mjs +5 -0
- package/esm2020/multiselect/multiselect.base.mjs +732 -0
- package/esm2020/multiselect/multiselect.component.mjs +26 -0
- package/esm2020/multiselect/multiselect.module.mjs +18 -0
- package/esm2020/multiselect/multiselect.styles.mjs +3 -0
- package/esm2020/multiselect/multiselect.types.mjs +2 -0
- package/esm2020/multiselect/public-api.mjs +6 -0
- package/esm2020/multiselect/wirabyte-ui-multiselect.mjs +5 -0
- package/esm2020/navbar/navbar.component.mjs +460 -0
- package/esm2020/navbar/navbar.module.mjs +18 -0
- package/esm2020/navbar/public-api.mjs +3 -0
- package/esm2020/navbar/wirabyte-ui-navbar.mjs +5 -0
- package/esm2020/orderlist/orderlist.base.mjs +411 -0
- package/esm2020/orderlist/orderlist.component.mjs +17 -0
- package/esm2020/orderlist/orderlist.module.mjs +18 -0
- package/esm2020/orderlist/orderlist.types.mjs +2 -0
- package/esm2020/orderlist/public-api.mjs +5 -0
- package/esm2020/orderlist/wirabyte-ui-orderlist.mjs +5 -0
- package/esm2020/organizationchart/organizationchart.component.mjs +200 -0
- package/esm2020/organizationchart/organizationchart.module.mjs +18 -0
- package/esm2020/organizationchart/organizationchart.types.mjs +2 -0
- package/esm2020/organizationchart/public-api.mjs +4 -0
- package/esm2020/organizationchart/wirabyte-ui-organizationchart.mjs +5 -0
- package/esm2020/paginator/paginator.base.mjs +188 -0
- package/esm2020/paginator/paginator.component.mjs +20 -0
- package/esm2020/paginator/paginator.module.mjs +17 -0
- package/esm2020/paginator/paginator.types.mjs +2 -0
- package/esm2020/paginator/public-api.mjs +5 -0
- package/esm2020/paginator/wirabyte-ui-paginator.mjs +5 -0
- package/esm2020/panel/panel.component.mjs +108 -0
- package/esm2020/panel/panel.module.mjs +19 -0
- package/esm2020/panel/panel.types.mjs +2 -0
- package/esm2020/panel/public-api.mjs +4 -0
- package/esm2020/panel/wirabyte-ui-panel.mjs +5 -0
- package/esm2020/panelmenu/panelmenu.base.mjs +181 -0
- package/esm2020/panelmenu/panelmenu.component.mjs +15 -0
- package/esm2020/panelmenu/panelmenu.module.mjs +18 -0
- package/esm2020/panelmenu/public-api.mjs +4 -0
- package/esm2020/panelmenu/wirabyte-ui-panelmenu.mjs +5 -0
- package/esm2020/password/password.component.mjs +233 -0
- package/esm2020/password/password.module.mjs +17 -0
- package/esm2020/password/password.types.mjs +14 -0
- package/esm2020/password/public-api.mjs +4 -0
- package/esm2020/password/wirabyte-ui-password.mjs +5 -0
- package/esm2020/picklist/list-drag.mjs +259 -0
- package/esm2020/picklist/picklist.base.mjs +649 -0
- package/esm2020/picklist/picklist.component.mjs +17 -0
- package/esm2020/picklist/picklist.module.mjs +18 -0
- package/esm2020/picklist/picklist.styles.mjs +3 -0
- package/esm2020/picklist/picklist.types.mjs +2 -0
- package/esm2020/picklist/public-api.mjs +8 -0
- package/esm2020/picklist/wirabyte-ui-picklist.mjs +5 -0
- package/esm2020/popover/popover.base.mjs +171 -0
- package/esm2020/popover/popover.component.mjs +17 -0
- package/esm2020/popover/popover.module.mjs +18 -0
- package/esm2020/popover/public-api.mjs +4 -0
- package/esm2020/popover/wirabyte-ui-popover.mjs +5 -0
- package/esm2020/presets/public-api.mjs +5 -0
- package/esm2020/presets/wirabyte-ui-presets.mjs +5 -0
- package/esm2020/progressbar/progressbar.component.mjs +117 -0
- package/esm2020/progressbar/progressbar.module.mjs +17 -0
- package/esm2020/progressbar/progressbar.types.mjs +19 -0
- package/esm2020/progressbar/public-api.mjs +4 -0
- package/esm2020/progressbar/wirabyte-ui-progressbar.mjs +5 -0
- package/esm2020/progressspinner/progressspinner.component.mjs +109 -0
- package/esm2020/progressspinner/progressspinner.module.mjs +17 -0
- package/esm2020/progressspinner/progressspinner.types.mjs +27 -0
- package/esm2020/progressspinner/public-api.mjs +4 -0
- package/esm2020/progressspinner/wirabyte-ui-progressspinner.mjs +5 -0
- package/esm2020/public-api.mjs +3 -0
- package/esm2020/radiobutton/public-api.mjs +7 -0
- package/esm2020/radiobutton/radio-registry.mjs +40 -0
- package/esm2020/radiobutton/radiobutton.component.mjs +125 -0
- package/esm2020/radiobutton/radiobutton.module.mjs +17 -0
- package/esm2020/radiobutton/radiobutton.styles.mjs +3 -0
- package/esm2020/radiobutton/radiobutton.types.mjs +2 -0
- package/esm2020/radiobutton/wirabyte-ui-radiobutton.mjs +5 -0
- package/esm2020/rating/public-api.mjs +4 -0
- package/esm2020/rating/rating.component.mjs +107 -0
- package/esm2020/rating/rating.module.mjs +17 -0
- package/esm2020/rating/rating.types.mjs +2 -0
- package/esm2020/rating/wirabyte-ui-rating.mjs +5 -0
- package/esm2020/result/public-api.mjs +3 -0
- package/esm2020/result/result.component.mjs +72 -0
- package/esm2020/result/result.module.mjs +17 -0
- package/esm2020/result/wirabyte-ui-result.mjs +5 -0
- package/esm2020/ripple/public-api.mjs +3 -0
- package/esm2020/ripple/ripple.directive.mjs +43 -0
- package/esm2020/ripple/ripple.module.mjs +17 -0
- package/esm2020/ripple/ripple.styles.mjs +3 -0
- package/esm2020/ripple/wirabyte-ui-ripple.mjs +5 -0
- package/esm2020/scroller/public-api.mjs +6 -0
- package/esm2020/scroller/scroller.component.mjs +305 -0
- package/esm2020/scroller/scroller.module.mjs +17 -0
- package/esm2020/scroller/wirabyte-ui-scroller.mjs +5 -0
- package/esm2020/scrollpanel/public-api.mjs +3 -0
- package/esm2020/scrollpanel/scrollpanel.component.mjs +67 -0
- package/esm2020/scrollpanel/scrollpanel.module.mjs +17 -0
- package/esm2020/scrollpanel/wirabyte-ui-scrollpanel.mjs +5 -0
- package/esm2020/select/public-api.mjs +7 -0
- package/esm2020/select/select.base.mjs +667 -0
- package/esm2020/select/select.component.mjs +26 -0
- package/esm2020/select/select.module.mjs +17 -0
- package/esm2020/select/select.styles.mjs +3 -0
- package/esm2020/select/select.types.mjs +2 -0
- package/esm2020/select/wirabyte-ui-select.mjs +5 -0
- package/esm2020/selectbutton/public-api.mjs +4 -0
- package/esm2020/selectbutton/selectbutton.component.mjs +174 -0
- package/esm2020/selectbutton/selectbutton.module.mjs +18 -0
- package/esm2020/selectbutton/selectbutton.types.mjs +2 -0
- package/esm2020/selectbutton/wirabyte-ui-selectbutton.mjs +5 -0
- package/esm2020/sitefooter/public-api.mjs +3 -0
- package/esm2020/sitefooter/sitefooter.component.mjs +139 -0
- package/esm2020/sitefooter/sitefooter.module.mjs +18 -0
- package/esm2020/sitefooter/wirabyte-ui-sitefooter.mjs +5 -0
- package/esm2020/skeleton/public-api.mjs +4 -0
- package/esm2020/skeleton/skeleton.component.mjs +51 -0
- package/esm2020/skeleton/skeleton.module.mjs +17 -0
- package/esm2020/skeleton/skeleton.types.mjs +2 -0
- package/esm2020/skeleton/wirabyte-ui-skeleton.mjs +5 -0
- package/esm2020/slider/public-api.mjs +3 -0
- package/esm2020/slider/slider.component.mjs +247 -0
- package/esm2020/slider/slider.module.mjs +17 -0
- package/esm2020/slider/wirabyte-ui-slider.mjs +5 -0
- package/esm2020/splitbutton/public-api.mjs +3 -0
- package/esm2020/splitbutton/splitbutton.component.mjs +180 -0
- package/esm2020/splitbutton/splitbutton.module.mjs +17 -0
- package/esm2020/splitbutton/wirabyte-ui-splitbutton.mjs +5 -0
- package/esm2020/splitter/public-api.mjs +5 -0
- package/esm2020/splitter/splitter-panel.component.mjs +32 -0
- package/esm2020/splitter/splitter.component.mjs +372 -0
- package/esm2020/splitter/splitter.module.mjs +19 -0
- package/esm2020/splitter/splitter.types.mjs +2 -0
- package/esm2020/splitter/wirabyte-ui-splitter.mjs +5 -0
- package/esm2020/stepper/public-api.mjs +4 -0
- package/esm2020/stepper/stepper.base.mjs +392 -0
- package/esm2020/stepper/stepper.component.mjs +191 -0
- package/esm2020/stepper/stepper.module.mjs +19 -0
- package/esm2020/stepper/wirabyte-ui-stepper.mjs +5 -0
- package/esm2020/steps/public-api.mjs +4 -0
- package/esm2020/steps/steps.base.mjs +148 -0
- package/esm2020/steps/steps.component.mjs +15 -0
- package/esm2020/steps/steps.module.mjs +17 -0
- package/esm2020/steps/wirabyte-ui-steps.mjs +5 -0
- package/esm2020/table/public-api.mjs +10 -0
- package/esm2020/table/table-celleditor.component.mjs +34 -0
- package/esm2020/table/table-filter.component.mjs +123 -0
- package/esm2020/table/table.base.mjs +1443 -0
- package/esm2020/table/table.celleditor.mjs +42 -0
- package/esm2020/table/table.component.mjs +21 -0
- package/esm2020/table/table.directives.mjs +1117 -0
- package/esm2020/table/table.filter.mjs +346 -0
- package/esm2020/table/table.module.mjs +99 -0
- package/esm2020/table/table.types.mjs +3 -0
- package/esm2020/table/wirabyte-ui-table.mjs +5 -0
- package/esm2020/tabmenu/public-api.mjs +3 -0
- package/esm2020/tabmenu/wirabyte-ui-tabmenu.mjs +5 -0
- package/esm2020/tabs/public-api.mjs +9 -0
- package/esm2020/tabs/tabmenu.base.mjs +196 -0
- package/esm2020/tabs/tabmenu.component.mjs +18 -0
- package/esm2020/tabs/tabmenu.module.mjs +18 -0
- package/esm2020/tabs/tabs.component.mjs +477 -0
- package/esm2020/tabs/tabs.module.mjs +20 -0
- package/esm2020/tabs/tabs.styles.mjs +3 -0
- package/esm2020/tabs/tabs.types.mjs +50 -0
- package/esm2020/tabs/wirabyte-ui-tabs.mjs +5 -0
- package/esm2020/tag/public-api.mjs +4 -0
- package/esm2020/tag/tag.component.mjs +52 -0
- package/esm2020/tag/tag.module.mjs +17 -0
- package/esm2020/tag/tag.types.mjs +2 -0
- package/esm2020/tag/wirabyte-ui-tag.mjs +5 -0
- package/esm2020/terminal/public-api.mjs +6 -0
- package/esm2020/terminal/terminal.component.mjs +150 -0
- package/esm2020/terminal/terminal.module.mjs +17 -0
- package/esm2020/terminal/terminal.service.mjs +35 -0
- package/esm2020/terminal/wirabyte-ui-terminal.mjs +5 -0
- package/esm2020/textarea/public-api.mjs +3 -0
- package/esm2020/textarea/textarea.directive.mjs +87 -0
- package/esm2020/textarea/textarea.module.mjs +17 -0
- package/esm2020/textarea/wirabyte-ui-textarea.mjs +5 -0
- package/esm2020/thai/public-api.mjs +4 -0
- package/esm2020/thai/thai.module.mjs +18 -0
- package/esm2020/thai/thai.pipes.mjs +115 -0
- package/esm2020/thai/wirabyte-ui-thai.mjs +5 -0
- package/esm2020/tieredmenu/public-api.mjs +3 -0
- package/esm2020/tieredmenu/tieredmenu.component.mjs +385 -0
- package/esm2020/tieredmenu/tieredmenu.module.mjs +17 -0
- package/esm2020/tieredmenu/wirabyte-ui-tieredmenu.mjs +5 -0
- package/esm2020/timeline/public-api.mjs +4 -0
- package/esm2020/timeline/timeline.base.mjs +66 -0
- package/esm2020/timeline/timeline.component.mjs +46 -0
- package/esm2020/timeline/timeline.module.mjs +18 -0
- package/esm2020/timeline/wirabyte-ui-timeline.mjs +5 -0
- package/esm2020/toast/message.service.mjs +34 -0
- package/esm2020/toast/public-api.mjs +6 -0
- package/esm2020/toast/toast.base.mjs +227 -0
- package/esm2020/toast/toast.component.mjs +17 -0
- package/esm2020/toast/toast.module.mjs +18 -0
- package/esm2020/toast/toast.types.mjs +2 -0
- package/esm2020/toast/wirabyte-ui-toast.mjs +5 -0
- package/esm2020/togglebutton/public-api.mjs +4 -0
- package/esm2020/togglebutton/togglebutton.component.mjs +129 -0
- package/esm2020/togglebutton/togglebutton.module.mjs +17 -0
- package/esm2020/togglebutton/togglebutton.types.mjs +2 -0
- package/esm2020/togglebutton/wirabyte-ui-togglebutton.mjs +5 -0
- package/esm2020/toggleswitch/public-api.mjs +4 -0
- package/esm2020/toggleswitch/toggleswitch.component.mjs +123 -0
- package/esm2020/toggleswitch/toggleswitch.module.mjs +17 -0
- package/esm2020/toggleswitch/toggleswitch.types.mjs +2 -0
- package/esm2020/toggleswitch/wirabyte-ui-toggleswitch.mjs +5 -0
- package/esm2020/toolbar/public-api.mjs +3 -0
- package/esm2020/toolbar/toolbar.component.mjs +67 -0
- package/esm2020/toolbar/toolbar.module.mjs +18 -0
- package/esm2020/toolbar/wirabyte-ui-toolbar.mjs +5 -0
- package/esm2020/tooltip/public-api.mjs +4 -0
- package/esm2020/tooltip/tooltip.directive.mjs +370 -0
- package/esm2020/tooltip/tooltip.module.mjs +17 -0
- package/esm2020/tooltip/tooltip.styles.mjs +3 -0
- package/esm2020/tooltip/tooltip.types.mjs +2 -0
- package/esm2020/tooltip/wirabyte-ui-tooltip.mjs +5 -0
- package/esm2020/tree/public-api.mjs +3 -0
- package/esm2020/tree/tree.component.mjs +453 -0
- package/esm2020/tree/tree.module.mjs +17 -0
- package/esm2020/tree/wirabyte-ui-tree.mjs +5 -0
- package/esm2020/treeselect/public-api.mjs +3 -0
- package/esm2020/treeselect/treeselect.component.mjs +410 -0
- package/esm2020/treeselect/treeselect.module.mjs +17 -0
- package/esm2020/treeselect/wirabyte-ui-treeselect.mjs +5 -0
- package/esm2020/validation/field-error.component.mjs +84 -0
- package/esm2020/validation/public-api.mjs +4 -0
- package/esm2020/validation/validation.module.mjs +19 -0
- package/esm2020/validation/validators.mjs +84 -0
- package/esm2020/validation/wirabyte-ui-validation.mjs +5 -0
- package/esm2020/wirabyte-ui.mjs +5 -0
- package/excel/excel.d.ts +24 -0
- package/excel/index.d.ts +5 -0
- package/excel/public-api.d.ts +3 -0
- package/fesm2015/wirabyte-ui-accordion.mjs +416 -0
- package/fesm2015/wirabyte-ui-accordion.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-alert.mjs +555 -0
- package/fesm2015/wirabyte-ui-alert.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-animate.mjs +280 -0
- package/fesm2015/wirabyte-ui-animate.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-api.mjs +34 -0
- package/fesm2015/wirabyte-ui-api.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-asidemenu.mjs +848 -0
- package/fesm2015/wirabyte-ui-asidemenu.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-autocomplete.mjs +619 -0
- package/fesm2015/wirabyte-ui-autocomplete.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-avatar.mjs +103 -0
- package/fesm2015/wirabyte-ui-avatar.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-badge.mjs +185 -0
- package/fesm2015/wirabyte-ui-badge.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-blockui.mjs +176 -0
- package/fesm2015/wirabyte-ui-blockui.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-bottombar.mjs +237 -0
- package/fesm2015/wirabyte-ui-bottombar.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-breadcrumb.mjs +109 -0
- package/fesm2015/wirabyte-ui-breadcrumb.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-button.mjs +415 -0
- package/fesm2015/wirabyte-ui-button.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-card.mjs +134 -0
- package/fesm2015/wirabyte-ui-card.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-carousel.mjs +647 -0
- package/fesm2015/wirabyte-ui-carousel.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-chart.mjs +63 -0
- package/fesm2015/wirabyte-ui-chart.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-chartjs.mjs +268 -0
- package/fesm2015/wirabyte-ui-chartjs.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-checkbox.mjs +164 -0
- package/fesm2015/wirabyte-ui-checkbox.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-chip.mjs +97 -0
- package/fesm2015/wirabyte-ui-chip.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-colorpicker.mjs +333 -0
- package/fesm2015/wirabyte-ui-colorpicker.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-config.mjs +624 -0
- package/fesm2015/wirabyte-ui-config.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-confirmdialog.mjs +421 -0
- package/fesm2015/wirabyte-ui-confirmdialog.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-contextmenu.mjs +185 -0
- package/fesm2015/wirabyte-ui-contextmenu.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-core.mjs +13312 -0
- package/fesm2015/wirabyte-ui-core.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-datepicker.mjs +951 -0
- package/fesm2015/wirabyte-ui-datepicker.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-dialog.mjs +707 -0
- package/fesm2015/wirabyte-ui-dialog.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-divider.mjs +77 -0
- package/fesm2015/wirabyte-ui-divider.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-dock.mjs +317 -0
- package/fesm2015/wirabyte-ui-dock.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-dragdrop.mjs +232 -0
- package/fesm2015/wirabyte-ui-dragdrop.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-drawer.mjs +326 -0
- package/fesm2015/wirabyte-ui-drawer.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-editor.mjs +3099 -0
- package/fesm2015/wirabyte-ui-editor.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-emptystate.mjs +101 -0
- package/fesm2015/wirabyte-ui-emptystate.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-errorpage.mjs +187 -0
- package/fesm2015/wirabyte-ui-errorpage.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-excel.mjs +49 -0
- package/fesm2015/wirabyte-ui-excel.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-fieldset.mjs +95 -0
- package/fesm2015/wirabyte-ui-fieldset.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-fileupload.mjs +607 -0
- package/fesm2015/wirabyte-ui-fileupload.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-floatlabel.mjs +74 -0
- package/fesm2015/wirabyte-ui-floatlabel.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-flow.mjs +4967 -0
- package/fesm2015/wirabyte-ui-flow.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-galleria.mjs +506 -0
- package/fesm2015/wirabyte-ui-galleria.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-i18n.mjs +330 -0
- package/fesm2015/wirabyte-ui-i18n.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-iconfield.mjs +94 -0
- package/fesm2015/wirabyte-ui-iconfield.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-image.mjs +218 -0
- package/fesm2015/wirabyte-ui-image.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-imagecompare.mjs +224 -0
- package/fesm2015/wirabyte-ui-imagecompare.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-imagecropper.mjs +1301 -0
- package/fesm2015/wirabyte-ui-imagecropper.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-inplace.mjs +167 -0
- package/fesm2015/wirabyte-ui-inplace.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-inputgroup.mjs +82 -0
- package/fesm2015/wirabyte-ui-inputgroup.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-inputmask.mjs +367 -0
- package/fesm2015/wirabyte-ui-inputmask.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-inputnumber.mjs +388 -0
- package/fesm2015/wirabyte-ui-inputnumber.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-inputotp.mjs +370 -0
- package/fesm2015/wirabyte-ui-inputotp.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-inputtext.mjs +85 -0
- package/fesm2015/wirabyte-ui-inputtext.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-keyfilter.mjs +155 -0
- package/fesm2015/wirabyte-ui-keyfilter.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-knob.mjs +229 -0
- package/fesm2015/wirabyte-ui-knob.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-listbox.mjs +543 -0
- package/fesm2015/wirabyte-ui-listbox.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-menu.mjs +365 -0
- package/fesm2015/wirabyte-ui-menu.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-menubar.mjs +614 -0
- package/fesm2015/wirabyte-ui-menubar.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-message.mjs +291 -0
- package/fesm2015/wirabyte-ui-message.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-metergroup.mjs +192 -0
- package/fesm2015/wirabyte-ui-metergroup.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-multiselect.mjs +795 -0
- package/fesm2015/wirabyte-ui-multiselect.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-navbar.mjs +491 -0
- package/fesm2015/wirabyte-ui-navbar.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-orderlist.mjs +450 -0
- package/fesm2015/wirabyte-ui-orderlist.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-organizationchart.mjs +225 -0
- package/fesm2015/wirabyte-ui-organizationchart.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-paginator.mjs +226 -0
- package/fesm2015/wirabyte-ui-paginator.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-panel.mjs +130 -0
- package/fesm2015/wirabyte-ui-panel.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-panelmenu.mjs +216 -0
- package/fesm2015/wirabyte-ui-panelmenu.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-password.mjs +271 -0
- package/fesm2015/wirabyte-ui-password.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-picklist.mjs +954 -0
- package/fesm2015/wirabyte-ui-picklist.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-popover.mjs +210 -0
- package/fesm2015/wirabyte-ui-popover.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-presets.mjs +10 -0
- package/fesm2015/wirabyte-ui-presets.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-progressbar.mjs +156 -0
- package/fesm2015/wirabyte-ui-progressbar.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-progressspinner.mjs +158 -0
- package/fesm2015/wirabyte-ui-progressspinner.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-radiobutton.mjs +186 -0
- package/fesm2015/wirabyte-ui-radiobutton.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-rating.mjs +129 -0
- package/fesm2015/wirabyte-ui-rating.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-result.mjs +95 -0
- package/fesm2015/wirabyte-ui-result.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-ripple.mjs +67 -0
- package/fesm2015/wirabyte-ui-ripple.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-scroller.mjs +330 -0
- package/fesm2015/wirabyte-ui-scroller.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-scrollpanel.mjs +90 -0
- package/fesm2015/wirabyte-ui-scrollpanel.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-select.mjs +730 -0
- package/fesm2015/wirabyte-ui-select.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-selectbutton.mjs +195 -0
- package/fesm2015/wirabyte-ui-selectbutton.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-sitefooter.mjs +166 -0
- package/fesm2015/wirabyte-ui-sitefooter.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-skeleton.mjs +72 -0
- package/fesm2015/wirabyte-ui-skeleton.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-slider.mjs +271 -0
- package/fesm2015/wirabyte-ui-slider.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-splitbutton.mjs +202 -0
- package/fesm2015/wirabyte-ui-splitbutton.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-splitter.mjs +431 -0
- package/fesm2015/wirabyte-ui-splitter.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-stepper.mjs +607 -0
- package/fesm2015/wirabyte-ui-stepper.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-steps.mjs +182 -0
- package/fesm2015/wirabyte-ui-steps.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-table.mjs +3223 -0
- package/fesm2015/wirabyte-ui-table.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-tabmenu.mjs +8 -0
- package/fesm2015/wirabyte-ui-tabmenu.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-tabs.mjs +790 -0
- package/fesm2015/wirabyte-ui-tabs.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-tag.mjs +73 -0
- package/fesm2015/wirabyte-ui-tag.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-terminal.mjs +207 -0
- package/fesm2015/wirabyte-ui-terminal.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-textarea.mjs +108 -0
- package/fesm2015/wirabyte-ui-textarea.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-thai.mjs +138 -0
- package/fesm2015/wirabyte-ui-thai.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-tieredmenu.mjs +417 -0
- package/fesm2015/wirabyte-ui-tieredmenu.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-timeline.mjs +130 -0
- package/fesm2015/wirabyte-ui-timeline.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-toast.mjs +294 -0
- package/fesm2015/wirabyte-ui-toast.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-togglebutton.mjs +151 -0
- package/fesm2015/wirabyte-ui-togglebutton.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-toggleswitch.mjs +144 -0
- package/fesm2015/wirabyte-ui-toggleswitch.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-toolbar.mjs +88 -0
- package/fesm2015/wirabyte-ui-toolbar.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-tooltip.mjs +398 -0
- package/fesm2015/wirabyte-ui-tooltip.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-tree.mjs +480 -0
- package/fesm2015/wirabyte-ui-tree.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-treeselect.mjs +438 -0
- package/fesm2015/wirabyte-ui-treeselect.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-validation.mjs +189 -0
- package/fesm2015/wirabyte-ui-validation.mjs.map +1 -0
- package/fesm2015/wirabyte-ui.mjs +9 -0
- package/fesm2015/wirabyte-ui.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-accordion.mjs +414 -0
- package/fesm2020/wirabyte-ui-accordion.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-alert.mjs +529 -0
- package/fesm2020/wirabyte-ui-alert.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-animate.mjs +276 -0
- package/fesm2020/wirabyte-ui-animate.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-api.mjs +34 -0
- package/fesm2020/wirabyte-ui-api.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-asidemenu.mjs +832 -0
- package/fesm2020/wirabyte-ui-asidemenu.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-autocomplete.mjs +608 -0
- package/fesm2020/wirabyte-ui-autocomplete.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-avatar.mjs +102 -0
- package/fesm2020/wirabyte-ui-avatar.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-badge.mjs +183 -0
- package/fesm2020/wirabyte-ui-badge.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-blockui.mjs +173 -0
- package/fesm2020/wirabyte-ui-blockui.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-bottombar.mjs +230 -0
- package/fesm2020/wirabyte-ui-bottombar.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-breadcrumb.mjs +107 -0
- package/fesm2020/wirabyte-ui-breadcrumb.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-button.mjs +412 -0
- package/fesm2020/wirabyte-ui-button.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-card.mjs +134 -0
- package/fesm2020/wirabyte-ui-card.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-carousel.mjs +638 -0
- package/fesm2020/wirabyte-ui-carousel.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-chart.mjs +63 -0
- package/fesm2020/wirabyte-ui-chart.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-chartjs.mjs +262 -0
- package/fesm2020/wirabyte-ui-chartjs.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-checkbox.mjs +164 -0
- package/fesm2020/wirabyte-ui-checkbox.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-chip.mjs +97 -0
- package/fesm2020/wirabyte-ui-chip.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-colorpicker.mjs +329 -0
- package/fesm2020/wirabyte-ui-colorpicker.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-config.mjs +621 -0
- package/fesm2020/wirabyte-ui-config.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-confirmdialog.mjs +395 -0
- package/fesm2020/wirabyte-ui-confirmdialog.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-contextmenu.mjs +180 -0
- package/fesm2020/wirabyte-ui-contextmenu.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-core.mjs +13367 -0
- package/fesm2020/wirabyte-ui-core.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-datepicker.mjs +942 -0
- package/fesm2020/wirabyte-ui-datepicker.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-dialog.mjs +698 -0
- package/fesm2020/wirabyte-ui-dialog.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-divider.mjs +77 -0
- package/fesm2020/wirabyte-ui-divider.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-dock.mjs +308 -0
- package/fesm2020/wirabyte-ui-dock.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-dragdrop.mjs +229 -0
- package/fesm2020/wirabyte-ui-dragdrop.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-drawer.mjs +321 -0
- package/fesm2020/wirabyte-ui-drawer.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-editor.mjs +3056 -0
- package/fesm2020/wirabyte-ui-editor.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-emptystate.mjs +99 -0
- package/fesm2020/wirabyte-ui-emptystate.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-errorpage.mjs +184 -0
- package/fesm2020/wirabyte-ui-errorpage.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-excel.mjs +43 -0
- package/fesm2020/wirabyte-ui-excel.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-fieldset.mjs +95 -0
- package/fesm2020/wirabyte-ui-fieldset.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-fileupload.mjs +599 -0
- package/fesm2020/wirabyte-ui-fileupload.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-floatlabel.mjs +74 -0
- package/fesm2020/wirabyte-ui-floatlabel.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-flow.mjs +4920 -0
- package/fesm2020/wirabyte-ui-flow.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-galleria.mjs +501 -0
- package/fesm2020/wirabyte-ui-galleria.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-i18n.mjs +321 -0
- package/fesm2020/wirabyte-ui-i18n.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-iconfield.mjs +94 -0
- package/fesm2020/wirabyte-ui-iconfield.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-image.mjs +214 -0
- package/fesm2020/wirabyte-ui-image.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-imagecompare.mjs +221 -0
- package/fesm2020/wirabyte-ui-imagecompare.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-imagecropper.mjs +1279 -0
- package/fesm2020/wirabyte-ui-imagecropper.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-inplace.mjs +166 -0
- package/fesm2020/wirabyte-ui-inplace.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-inputgroup.mjs +82 -0
- package/fesm2020/wirabyte-ui-inputgroup.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-inputmask.mjs +360 -0
- package/fesm2020/wirabyte-ui-inputmask.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-inputnumber.mjs +385 -0
- package/fesm2020/wirabyte-ui-inputnumber.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-inputotp.mjs +365 -0
- package/fesm2020/wirabyte-ui-inputotp.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-inputtext.mjs +85 -0
- package/fesm2020/wirabyte-ui-inputtext.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-keyfilter.mjs +152 -0
- package/fesm2020/wirabyte-ui-keyfilter.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-knob.mjs +228 -0
- package/fesm2020/wirabyte-ui-knob.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-listbox.mjs +541 -0
- package/fesm2020/wirabyte-ui-listbox.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-menu.mjs +356 -0
- package/fesm2020/wirabyte-ui-menu.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-menubar.mjs +604 -0
- package/fesm2020/wirabyte-ui-menubar.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-message.mjs +291 -0
- package/fesm2020/wirabyte-ui-message.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-metergroup.mjs +192 -0
- package/fesm2020/wirabyte-ui-metergroup.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-multiselect.mjs +778 -0
- package/fesm2020/wirabyte-ui-multiselect.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-navbar.mjs +481 -0
- package/fesm2020/wirabyte-ui-navbar.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-orderlist.mjs +445 -0
- package/fesm2020/wirabyte-ui-orderlist.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-organizationchart.mjs +221 -0
- package/fesm2020/wirabyte-ui-organizationchart.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-paginator.mjs +226 -0
- package/fesm2020/wirabyte-ui-paginator.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-panel.mjs +130 -0
- package/fesm2020/wirabyte-ui-panel.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-panelmenu.mjs +213 -0
- package/fesm2020/wirabyte-ui-panelmenu.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-password.mjs +267 -0
- package/fesm2020/wirabyte-ui-password.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-picklist.mjs +944 -0
- package/fesm2020/wirabyte-ui-picklist.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-popover.mjs +205 -0
- package/fesm2020/wirabyte-ui-popover.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-presets.mjs +10 -0
- package/fesm2020/wirabyte-ui-presets.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-progressbar.mjs +156 -0
- package/fesm2020/wirabyte-ui-progressbar.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-progressspinner.mjs +156 -0
- package/fesm2020/wirabyte-ui-progressspinner.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-radiobutton.mjs +186 -0
- package/fesm2020/wirabyte-ui-radiobutton.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-rating.mjs +128 -0
- package/fesm2020/wirabyte-ui-rating.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-result.mjs +93 -0
- package/fesm2020/wirabyte-ui-result.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-ripple.mjs +66 -0
- package/fesm2020/wirabyte-ui-ripple.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-scroller.mjs +326 -0
- package/fesm2020/wirabyte-ui-scroller.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-scrollpanel.mjs +88 -0
- package/fesm2020/wirabyte-ui-scrollpanel.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-select.mjs +713 -0
- package/fesm2020/wirabyte-ui-select.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-selectbutton.mjs +195 -0
- package/fesm2020/wirabyte-ui-selectbutton.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-sitefooter.mjs +160 -0
- package/fesm2020/wirabyte-ui-sitefooter.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-skeleton.mjs +72 -0
- package/fesm2020/wirabyte-ui-skeleton.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-slider.mjs +268 -0
- package/fesm2020/wirabyte-ui-slider.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-splitbutton.mjs +201 -0
- package/fesm2020/wirabyte-ui-splitbutton.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-splitter.mjs +422 -0
- package/fesm2020/wirabyte-ui-splitter.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-stepper.mjs +602 -0
- package/fesm2020/wirabyte-ui-stepper.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-steps.mjs +180 -0
- package/fesm2020/wirabyte-ui-steps.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-table.mjs +3201 -0
- package/fesm2020/wirabyte-ui-table.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-tabmenu.mjs +8 -0
- package/fesm2020/wirabyte-ui-tabmenu.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-tabs.mjs +769 -0
- package/fesm2020/wirabyte-ui-tabs.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-tag.mjs +73 -0
- package/fesm2020/wirabyte-ui-tag.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-terminal.mjs +203 -0
- package/fesm2020/wirabyte-ui-terminal.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-textarea.mjs +108 -0
- package/fesm2020/wirabyte-ui-textarea.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-thai.mjs +138 -0
- package/fesm2020/wirabyte-ui-thai.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-tieredmenu.mjs +406 -0
- package/fesm2020/wirabyte-ui-tieredmenu.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-timeline.mjs +130 -0
- package/fesm2020/wirabyte-ui-timeline.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-toast.mjs +291 -0
- package/fesm2020/wirabyte-ui-toast.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-togglebutton.mjs +150 -0
- package/fesm2020/wirabyte-ui-togglebutton.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-toggleswitch.mjs +144 -0
- package/fesm2020/wirabyte-ui-toggleswitch.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-toolbar.mjs +88 -0
- package/fesm2020/wirabyte-ui-toolbar.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-tooltip.mjs +393 -0
- package/fesm2020/wirabyte-ui-tooltip.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-tree.mjs +474 -0
- package/fesm2020/wirabyte-ui-tree.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-treeselect.mjs +431 -0
- package/fesm2020/wirabyte-ui-treeselect.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-validation.mjs +186 -0
- package/fesm2020/wirabyte-ui-validation.mjs.map +1 -0
- package/fesm2020/wirabyte-ui.mjs +9 -0
- package/fesm2020/wirabyte-ui.mjs.map +1 -0
- package/fieldset/fieldset.component.d.ts +35 -0
- package/fieldset/fieldset.module.d.ts +9 -0
- package/fieldset/index.d.ts +5 -0
- package/fieldset/public-api.d.ts +2 -0
- package/fileupload/fileupload.base.d.ts +175 -0
- package/fileupload/fileupload.component.d.ts +11 -0
- package/fileupload/fileupload.module.d.ts +9 -0
- package/fileupload/fileupload.types.d.ts +54 -0
- package/fileupload/index.d.ts +5 -0
- package/fileupload/public-api.d.ts +4 -0
- package/floatlabel/floatlabel.component.d.ts +21 -0
- package/floatlabel/floatlabel.module.d.ts +8 -0
- package/floatlabel/floatlabel.types.d.ts +1 -0
- package/floatlabel/index.d.ts +5 -0
- package/floatlabel/public-api.d.ts +3 -0
- package/flow/flow-background.component.d.ts +49 -0
- package/flow/flow-controls.component.d.ts +47 -0
- package/flow/flow-handle.component.d.ts +48 -0
- package/flow/flow-history.directive.d.ts +42 -0
- package/flow/flow-host.d.ts +48 -0
- package/flow/flow-minimap.component.d.ts +79 -0
- package/flow/flow-node-outlet.d.ts +46 -0
- package/flow/flow-node-resizer.component.d.ts +57 -0
- package/flow/flow-node-toolbar.component.d.ts +38 -0
- package/flow/flow-panel.component.d.ts +11 -0
- package/flow/flow-templates.d.ts +47 -0
- package/flow/flow.component.d.ts +633 -0
- package/flow/flow.module.d.ts +21 -0
- package/flow/flow.types.d.ts +210 -0
- package/flow/index.d.ts +5 -0
- package/flow/public-api.d.ts +16 -0
- package/galleria/galleria.component.d.ts +163 -0
- package/galleria/galleria.module.d.ts +8 -0
- package/galleria/index.d.ts +5 -0
- package/galleria/public-api.d.ts +2 -0
- package/i18n/i18n.module.d.ts +22 -0
- package/i18n/i18n.service.d.ts +54 -0
- package/i18n/i18n.types.d.ts +33 -0
- package/i18n/index.d.ts +5 -0
- package/i18n/language-switch.component.d.ts +50 -0
- package/i18n/public-api.d.ts +6 -0
- package/i18n/translate.pipe.d.ts +25 -0
- package/iconfield/iconfield.component.d.ts +30 -0
- package/iconfield/iconfield.module.d.ts +8 -0
- package/iconfield/index.d.ts +5 -0
- package/iconfield/public-api.d.ts +2 -0
- package/image/image.base.d.ts +83 -0
- package/image/image.component.d.ts +7 -0
- package/image/image.module.d.ts +9 -0
- package/image/index.d.ts +5 -0
- package/image/public-api.d.ts +3 -0
- package/imagecompare/imagecompare.component.d.ts +67 -0
- package/imagecompare/imagecompare.module.d.ts +9 -0
- package/imagecompare/index.d.ts +5 -0
- package/imagecompare/public-api.d.ts +2 -0
- package/imagecropper/imagecropper.component.d.ts +309 -0
- package/imagecropper/imagecropper.module.d.ts +8 -0
- package/imagecropper/imagecropper.types.d.ts +79 -0
- package/imagecropper/index.d.ts +5 -0
- package/imagecropper/public-api.d.ts +4 -0
- package/index.d.ts +5 -0
- package/inplace/index.d.ts +5 -0
- package/inplace/inplace.component.d.ts +59 -0
- package/inplace/inplace.module.d.ts +8 -0
- package/inplace/public-api.d.ts +2 -0
- package/inputgroup/index.d.ts +5 -0
- package/inputgroup/inputgroup.component.d.ts +26 -0
- package/inputgroup/inputgroup.module.d.ts +8 -0
- package/inputgroup/public-api.d.ts +2 -0
- package/inputmask/index.d.ts +5 -0
- package/inputmask/inputmask.base.d.ts +115 -0
- package/inputmask/inputmask.component.d.ts +10 -0
- package/inputmask/inputmask.module.d.ts +8 -0
- package/inputmask/public-api.d.ts +3 -0
- package/inputnumber/index.d.ts +5 -0
- package/inputnumber/inputnumber.component.d.ts +132 -0
- package/inputnumber/inputnumber.module.d.ts +8 -0
- package/inputnumber/inputnumber.types.d.ts +7 -0
- package/inputnumber/public-api.d.ts +3 -0
- package/inputotp/index.d.ts +5 -0
- package/inputotp/inputotp.component.d.ts +105 -0
- package/inputotp/inputotp.module.d.ts +9 -0
- package/inputotp/inputotp.types.d.ts +22 -0
- package/inputotp/public-api.d.ts +3 -0
- package/inputtext/index.d.ts +5 -0
- package/inputtext/inputtext.directive.d.ts +25 -0
- package/inputtext/inputtext.module.d.ts +8 -0
- package/inputtext/inputtext.styles.d.ts +2 -0
- package/inputtext/inputtext.types.d.ts +3 -0
- package/inputtext/public-api.d.ts +5 -0
- package/keyfilter/index.d.ts +5 -0
- package/keyfilter/keyfilter.directive.d.ts +29 -0
- package/keyfilter/keyfilter.module.d.ts +8 -0
- package/keyfilter/public-api.d.ts +2 -0
- package/knob/index.d.ts +5 -0
- package/knob/knob.component.d.ts +94 -0
- package/knob/knob.module.d.ts +8 -0
- package/knob/public-api.d.ts +2 -0
- package/listbox/index.d.ts +5 -0
- package/listbox/listbox.component.d.ts +186 -0
- package/listbox/listbox.module.d.ts +8 -0
- package/listbox/public-api.d.ts +2 -0
- package/menu/index.d.ts +5 -0
- package/menu/menu.base.d.ts +95 -0
- package/menu/menu.component.d.ts +11 -0
- package/menu/menu.module.d.ts +9 -0
- package/menu/public-api.d.ts +4 -0
- package/menubar/index.d.ts +5 -0
- package/menubar/menubar.base.d.ts +135 -0
- package/menubar/menubar.component.d.ts +11 -0
- package/menubar/menubar.module.d.ts +9 -0
- package/menubar/public-api.d.ts +4 -0
- package/message/index.d.ts +5 -0
- package/message/message.component.d.ts +50 -0
- package/message/message.module.d.ts +11 -0
- package/message/message.types.d.ts +5 -0
- package/message/messages.base.d.ts +50 -0
- package/message/messages.component.d.ts +7 -0
- package/message/public-api.d.ts +5 -0
- package/metergroup/index.d.ts +5 -0
- package/metergroup/metergroup.component.d.ts +59 -0
- package/metergroup/metergroup.module.d.ts +8 -0
- package/metergroup/metergroup.types.d.ts +42 -0
- package/metergroup/public-api.d.ts +3 -0
- package/multiselect/index.d.ts +5 -0
- package/multiselect/multiselect.base.d.ts +222 -0
- package/multiselect/multiselect.component.d.ts +11 -0
- package/multiselect/multiselect.module.d.ts +9 -0
- package/multiselect/multiselect.styles.d.ts +2 -0
- package/multiselect/multiselect.types.d.ts +20 -0
- package/multiselect/public-api.d.ts +5 -0
- package/navbar/index.d.ts +5 -0
- package/navbar/navbar.component.d.ts +172 -0
- package/navbar/navbar.module.d.ts +9 -0
- package/navbar/public-api.d.ts +2 -0
- package/orderlist/index.d.ts +5 -0
- package/orderlist/orderlist.base.d.ts +136 -0
- package/orderlist/orderlist.component.d.ts +10 -0
- package/orderlist/orderlist.module.d.ts +9 -0
- package/orderlist/orderlist.types.d.ts +10 -0
- package/orderlist/public-api.d.ts +4 -0
- package/organizationchart/index.d.ts +5 -0
- package/organizationchart/organizationchart.component.d.ts +76 -0
- package/organizationchart/organizationchart.module.d.ts +9 -0
- package/organizationchart/organizationchart.types.d.ts +10 -0
- package/organizationchart/public-api.d.ts +4 -0
- package/package.json +891 -3
- package/paginator/index.d.ts +5 -0
- package/paginator/paginator.base.d.ts +95 -0
- package/paginator/paginator.component.d.ts +10 -0
- package/paginator/paginator.module.d.ts +8 -0
- package/paginator/paginator.types.d.ts +7 -0
- package/paginator/public-api.d.ts +4 -0
- package/panel/index.d.ts +5 -0
- package/panel/panel.component.d.ts +51 -0
- package/panel/panel.module.d.ts +10 -0
- package/panel/panel.types.d.ts +2 -0
- package/panel/public-api.d.ts +3 -0
- package/panelmenu/index.d.ts +5 -0
- package/panelmenu/panelmenu.base.d.ts +53 -0
- package/panelmenu/panelmenu.component.d.ts +7 -0
- package/panelmenu/panelmenu.module.d.ts +9 -0
- package/panelmenu/public-api.d.ts +3 -0
- package/password/index.d.ts +5 -0
- package/password/password.component.d.ts +90 -0
- package/password/password.module.d.ts +8 -0
- package/password/password.types.d.ts +6 -0
- package/password/public-api.d.ts +3 -0
- package/picklist/index.d.ts +5 -0
- package/picklist/list-drag.d.ts +49 -0
- package/picklist/picklist.base.d.ts +217 -0
- package/picklist/picklist.component.d.ts +10 -0
- package/picklist/picklist.module.d.ts +9 -0
- package/picklist/picklist.styles.d.ts +2 -0
- package/picklist/picklist.types.d.ts +21 -0
- package/picklist/public-api.d.ts +7 -0
- package/popover/index.d.ts +5 -0
- package/popover/popover.base.d.ts +61 -0
- package/popover/popover.component.d.ts +10 -0
- package/popover/popover.module.d.ts +9 -0
- package/popover/public-api.d.ts +3 -0
- package/presets/index.d.ts +5 -0
- package/presets/public-api.d.ts +2 -0
- package/progressbar/index.d.ts +5 -0
- package/progressbar/progressbar.component.d.ts +62 -0
- package/progressbar/progressbar.module.d.ts +8 -0
- package/progressbar/progressbar.types.d.ts +16 -0
- package/progressbar/public-api.d.ts +3 -0
- package/progressspinner/index.d.ts +5 -0
- package/progressspinner/progressspinner.component.d.ts +50 -0
- package/progressspinner/progressspinner.module.d.ts +8 -0
- package/progressspinner/progressspinner.types.d.ts +9 -0
- package/progressspinner/public-api.d.ts +3 -0
- package/public-api.d.ts +2 -0
- package/radiobutton/index.d.ts +5 -0
- package/radiobutton/public-api.d.ts +6 -0
- package/radiobutton/radio-registry.d.ts +23 -0
- package/radiobutton/radiobutton.component.d.ts +57 -0
- package/radiobutton/radiobutton.module.d.ts +8 -0
- package/radiobutton/radiobutton.styles.d.ts +2 -0
- package/radiobutton/radiobutton.types.d.ts +4 -0
- package/rating/index.d.ts +5 -0
- package/rating/public-api.d.ts +3 -0
- package/rating/rating.component.d.ts +47 -0
- package/rating/rating.module.d.ts +8 -0
- package/rating/rating.types.d.ts +4 -0
- package/result/index.d.ts +5 -0
- package/result/public-api.d.ts +2 -0
- package/result/result.component.d.ts +39 -0
- package/result/result.module.d.ts +8 -0
- package/ripple/index.d.ts +5 -0
- package/ripple/public-api.d.ts +2 -0
- package/ripple/ripple.directive.d.ts +15 -0
- package/ripple/ripple.module.d.ts +8 -0
- package/ripple/ripple.styles.d.ts +2 -0
- package/schematics/collection.json +21 -0
- package/schematics/core/carousel.cjs +70 -0
- package/schematics/core/catalog.cjs +206 -0
- package/schematics/core/chart/format.cjs +68 -0
- package/schematics/core/chart/index.cjs +32 -0
- package/schematics/core/chart/kinds.cjs +1355 -0
- package/schematics/core/chart/model.cjs +717 -0
- package/schematics/core/chart/more.cjs +317 -0
- package/schematics/core/chart/paths.cjs +170 -0
- package/schematics/core/chart/scale.cjs +63 -0
- package/schematics/core/color.cjs +106 -0
- package/schematics/core/colorpicker.cjs +79 -0
- package/schematics/core/compat.cjs +152 -0
- package/schematics/core/config.cjs +172 -0
- package/schematics/core/date.cjs +346 -0
- package/schematics/core/datepicker.cjs +530 -0
- package/schematics/core/dock.cjs +16 -0
- package/schematics/core/editor.cjs +281 -0
- package/schematics/core/errorpage.cjs +52 -0
- package/schematics/core/excel.cjs +826 -0
- package/schematics/core/exporters.cjs +249 -0
- package/schematics/core/families.cjs +1758 -0
- package/schematics/core/fileupload.cjs +54 -0
- package/schematics/core/flow/changes.cjs +215 -0
- package/schematics/core/flow/edges.cjs +95 -0
- package/schematics/core/flow/export.cjs +236 -0
- package/schematics/core/flow/geometry.cjs +338 -0
- package/schematics/core/flow/graph.cjs +338 -0
- package/schematics/core/flow/history.cjs +109 -0
- package/schematics/core/flow/index.cjs +29 -0
- package/schematics/core/flow/interaction.cjs +264 -0
- package/schematics/core/flow/layout.cjs +592 -0
- package/schematics/core/flow/paths.cjs +268 -0
- package/schematics/core/flow/text.cjs +74 -0
- package/schematics/core/flow/types.cjs +7 -0
- package/schematics/core/flow/viewport.cjs +151 -0
- package/schematics/core/i18n.cjs +85 -0
- package/schematics/core/imagecompare.cjs +32 -0
- package/schematics/core/imagecropper.cjs +515 -0
- package/schematics/core/index.cjs +55 -0
- package/schematics/core/inputotp.cjs +56 -0
- package/schematics/core/knob.cjs +114 -0
- package/schematics/core/mask.cjs +122 -0
- package/schematics/core/menu.cjs +88 -0
- package/schematics/core/number.cjs +141 -0
- package/schematics/core/organizationchart.cjs +91 -0
- package/schematics/core/overrides.cjs +179 -0
- package/schematics/core/picklist.cjs +262 -0
- package/schematics/core/select.cjs +172 -0
- package/schematics/core/splitter.cjs +69 -0
- package/schematics/core/table.cjs +183 -0
- package/schematics/core/terminal.cjs +34 -0
- package/schematics/core/thai/buddhist.cjs +135 -0
- package/schematics/core/thai/locale.cjs +654 -0
- package/schematics/core/thai/text.cjs +173 -0
- package/schematics/core/thai/thai-id.cjs +26 -0
- package/schematics/core/tokens.cjs +335 -0
- package/schematics/core/tree.cjs +144 -0
- package/schematics/core/validation.cjs +46 -0
- package/schematics/from-primeng/index.cjs +221 -0
- package/schematics/from-primeng/mapping.cjs +195 -0
- package/schematics/from-primeng/schema.cjs +2 -0
- package/schematics/from-primeng/schema.json +17 -0
- package/schematics/migration.json +4 -0
- package/schematics/ng-add/index.cjs +318 -0
- package/schematics/ng-add/schema.cjs +2 -0
- package/schematics/ng-add/schema.json +325 -0
- package/schematics/utils/ast.cjs +185 -0
- package/schematics/utils/workspace.cjs +115 -0
- package/scroller/index.d.ts +5 -0
- package/scroller/public-api.d.ts +5 -0
- package/scroller/scroller.component.d.ts +135 -0
- package/scroller/scroller.module.d.ts +8 -0
- package/scrollpanel/index.d.ts +5 -0
- package/scrollpanel/public-api.d.ts +2 -0
- package/scrollpanel/scrollpanel.component.d.ts +27 -0
- package/scrollpanel/scrollpanel.module.d.ts +8 -0
- package/select/index.d.ts +5 -0
- package/select/public-api.d.ts +6 -0
- package/select/select.base.d.ts +217 -0
- package/select/select.component.d.ts +11 -0
- package/select/select.module.d.ts +8 -0
- package/select/select.styles.d.ts +2 -0
- package/select/select.types.d.ts +9 -0
- package/selectbutton/index.d.ts +5 -0
- package/selectbutton/public-api.d.ts +3 -0
- package/selectbutton/selectbutton.component.d.ts +70 -0
- package/selectbutton/selectbutton.module.d.ts +9 -0
- package/selectbutton/selectbutton.types.d.ts +9 -0
- package/sitefooter/index.d.ts +5 -0
- package/sitefooter/public-api.d.ts +2 -0
- package/sitefooter/sitefooter.component.d.ts +69 -0
- package/sitefooter/sitefooter.module.d.ts +9 -0
- package/skeleton/index.d.ts +5 -0
- package/skeleton/public-api.d.ts +3 -0
- package/skeleton/skeleton.component.d.ts +22 -0
- package/skeleton/skeleton.module.d.ts +8 -0
- package/skeleton/skeleton.types.d.ts +2 -0
- package/slider/index.d.ts +5 -0
- package/slider/public-api.d.ts +2 -0
- package/slider/slider.component.d.ts +79 -0
- package/slider/slider.module.d.ts +8 -0
- package/splitbutton/index.d.ts +5 -0
- package/splitbutton/public-api.d.ts +2 -0
- package/splitbutton/splitbutton.component.d.ts +75 -0
- package/splitbutton/splitbutton.module.d.ts +8 -0
- package/splitter/index.d.ts +5 -0
- package/splitter/public-api.d.ts +4 -0
- package/splitter/splitter-panel.component.d.ts +20 -0
- package/splitter/splitter.component.d.ts +109 -0
- package/splitter/splitter.module.d.ts +10 -0
- package/splitter/splitter.types.d.ts +8 -0
- package/stepper/index.d.ts +5 -0
- package/stepper/public-api.d.ts +3 -0
- package/stepper/stepper.base.d.ts +200 -0
- package/stepper/stepper.component.d.ts +41 -0
- package/stepper/stepper.module.d.ts +9 -0
- package/steps/index.d.ts +5 -0
- package/steps/public-api.d.ts +3 -0
- package/steps/steps.base.d.ts +52 -0
- package/steps/steps.component.d.ts +7 -0
- package/steps/steps.module.d.ts +8 -0
- package/table/index.d.ts +5 -0
- package/table/public-api.d.ts +9 -0
- package/table/table-celleditor.component.d.ts +14 -0
- package/table/table-filter.component.d.ts +11 -0
- package/table/table.base.d.ts +410 -0
- package/table/table.celleditor.d.ts +20 -0
- package/table/table.component.d.ts +12 -0
- package/table/table.directives.d.ts +330 -0
- package/table/table.filter.d.ts +131 -0
- package/table/table.module.d.ts +12 -0
- package/table/table.types.d.ts +180 -0
- package/tabmenu/index.d.ts +5 -0
- package/tabmenu/public-api.d.ts +2 -0
- package/tabs/index.d.ts +5 -0
- package/tabs/public-api.d.ts +8 -0
- package/tabs/tabmenu.base.d.ts +59 -0
- package/tabs/tabmenu.component.d.ts +10 -0
- package/tabs/tabmenu.module.d.ts +9 -0
- package/tabs/tabs.component.d.ts +147 -0
- package/tabs/tabs.module.d.ts +10 -0
- package/tabs/tabs.styles.d.ts +2 -0
- package/tabs/tabs.types.d.ts +21 -0
- package/tag/index.d.ts +5 -0
- package/tag/public-api.d.ts +3 -0
- package/tag/tag.component.d.ts +24 -0
- package/tag/tag.module.d.ts +8 -0
- package/tag/tag.types.d.ts +2 -0
- package/terminal/index.d.ts +5 -0
- package/terminal/public-api.d.ts +5 -0
- package/terminal/terminal.component.d.ts +58 -0
- package/terminal/terminal.module.d.ts +8 -0
- package/terminal/terminal.service.d.ts +20 -0
- package/textarea/index.d.ts +5 -0
- package/textarea/public-api.d.ts +2 -0
- package/textarea/textarea.directive.d.ts +33 -0
- package/textarea/textarea.module.d.ts +8 -0
- package/thai/index.d.ts +5 -0
- package/thai/public-api.d.ts +3 -0
- package/thai/thai.module.d.ts +8 -0
- package/thai/thai.pipes.d.ts +57 -0
- package/theme/_api.scss +71 -0
- package/theme/_color.scss +153 -0
- package/theme/_data.scss +9283 -0
- package/theme/_index.scss +424 -0
- package/theme/_version.scss +2 -0
- package/themes/arun-blue/theme.css +1446 -0
- package/themes/arun-green/theme.css +1446 -0
- package/themes/arun-orange/theme.css +1445 -0
- package/themes/arun-purple/theme.css +1446 -0
- package/themes/md-dark-deeppurple/theme.css +1309 -0
- package/themes/md-dark-indigo/theme.css +1309 -0
- package/themes/md-light-deeppurple/theme.css +1418 -0
- package/themes/md-light-indigo/theme.css +1418 -0
- package/themes/ratri-blue/theme.css +1309 -0
- package/themes/ratri-green/theme.css +1309 -0
- package/themes/ratri-orange/theme.css +1309 -0
- package/themes/ratri-purple/theme.css +1309 -0
- package/themes/sayan-blue/theme.css +1309 -0
- package/themes/sayan-green/theme.css +1309 -0
- package/themes/sayan-orange/theme.css +1309 -0
- package/themes/sayan-purple/theme.css +1309 -0
- package/themes/sila-dark-blue/theme.css +1309 -0
- package/themes/sila-dark-indigo/theme.css +1309 -0
- package/themes/sila-dark-purple/theme.css +1309 -0
- package/themes/sila-dark-teal/theme.css +1309 -0
- package/themes/sila-light-blue/theme.css +1446 -0
- package/themes/sila-light-indigo/theme.css +1446 -0
- package/themes/sila-light-purple/theme.css +1446 -0
- package/themes/sila-light-teal/theme.css +1446 -0
- package/themes/sila-light-wira/theme.css +1446 -0
- package/tieredmenu/index.d.ts +5 -0
- package/tieredmenu/public-api.d.ts +2 -0
- package/tieredmenu/tieredmenu.component.d.ts +90 -0
- package/tieredmenu/tieredmenu.module.d.ts +8 -0
- package/timeline/index.d.ts +5 -0
- package/timeline/public-api.d.ts +3 -0
- package/timeline/timeline.base.d.ts +36 -0
- package/timeline/timeline.component.d.ts +7 -0
- package/timeline/timeline.module.d.ts +9 -0
- package/toast/index.d.ts +5 -0
- package/toast/message.service.d.ts +19 -0
- package/toast/public-api.d.ts +5 -0
- package/toast/toast.base.d.ts +84 -0
- package/toast/toast.component.d.ts +10 -0
- package/toast/toast.module.d.ts +9 -0
- package/toast/toast.types.d.ts +28 -0
- package/togglebutton/index.d.ts +5 -0
- package/togglebutton/public-api.d.ts +3 -0
- package/togglebutton/togglebutton.component.d.ts +56 -0
- package/togglebutton/togglebutton.module.d.ts +8 -0
- package/togglebutton/togglebutton.types.d.ts +4 -0
- package/toggleswitch/index.d.ts +5 -0
- package/toggleswitch/public-api.d.ts +3 -0
- package/toggleswitch/toggleswitch.component.d.ts +52 -0
- package/toggleswitch/toggleswitch.module.d.ts +8 -0
- package/toggleswitch/toggleswitch.types.d.ts +4 -0
- package/toolbar/index.d.ts +5 -0
- package/toolbar/public-api.d.ts +2 -0
- package/toolbar/toolbar.component.d.ts +29 -0
- package/toolbar/toolbar.module.d.ts +9 -0
- package/tooltip/index.d.ts +5 -0
- package/tooltip/public-api.d.ts +3 -0
- package/tooltip/tooltip.directive.d.ts +87 -0
- package/tooltip/tooltip.module.d.ts +8 -0
- package/tooltip/tooltip.styles.d.ts +2 -0
- package/tooltip/tooltip.types.d.ts +14 -0
- package/tree/index.d.ts +5 -0
- package/tree/public-api.d.ts +2 -0
- package/tree/tree.component.d.ts +149 -0
- package/tree/tree.module.d.ts +8 -0
- package/treeselect/index.d.ts +5 -0
- package/treeselect/public-api.d.ts +2 -0
- package/treeselect/treeselect.component.d.ts +140 -0
- package/treeselect/treeselect.module.d.ts +8 -0
- package/utils/_index.scss +532 -0
- package/utils/_palettes.scss +23 -0
- package/utils/utils.css +9280 -0
- package/utils/utils.min.css +1 -0
- package/validation/field-error.component.d.ts +39 -0
- package/validation/index.d.ts +5 -0
- package/validation/public-api.d.ts +3 -0
- package/validation/validation.module.d.ts +9 -0
- package/validation/validators.d.ts +33 -0
|
@@ -0,0 +1,1279 @@
|
|
|
1
|
+
import { DOCUMENT, isPlatformBrowser, NgIf, NgFor, NgSwitch, NgSwitchCase, NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { InjectionToken, TemplateRef, inject, EventEmitter, ChangeDetectorRef, NgZone, PLATFORM_ID, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, ContentChildren, ContentChild, ViewChild, NgModule } from '@angular/core';
|
|
4
|
+
import { ɵtoBool, ɵuniqueId, WuConfig, ɵrefreshOnTranslation, ɵassertSupportedAngular, ɵWU_SKIP_VERSION_CHECK, ɵWuStyleLoader, ɵfindTemplate, WuTemplate } from '@wirabyte/ui/config';
|
|
5
|
+
import { ɵWU_BUTTON_CSS, ɵbuttonClass } from '@wirabyte/ui/button';
|
|
6
|
+
import { cropperToolbarGroups, normalizeAngle, normalizeCrop, sameCrop, roundCrop, clampCrop, rotateOrientation, zoomCrop, moveCrop, resizeCrop, panCrop, growCrop, viewWindow, parseAspectRatio, rotatedSize, padToRatio, orientationMatrix, clampView, initialCrop, cropArea, remapCrop, remapPoint, cropWidth, cropHeight, outputSize, MAX_CANVAS_AREA, base64ToFile, exifTransform, readExifOrientation } from '@wirabyte/ui/core';
|
|
7
|
+
export { base64ToFile } from '@wirabyte/ui/core';
|
|
8
|
+
|
|
9
|
+
const WU_IMAGE_CROPPER_OPTIONS = new InjectionToken('WU_IMAGE_CROPPER_OPTIONS');
|
|
10
|
+
function provideImageCropperOptions(options) {
|
|
11
|
+
return { provide: WU_IMAGE_CROPPER_OPTIONS, useValue: options };
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** Each zoom button press multiplies (or divides) the zoom by this. */
|
|
15
|
+
const ZOOM_STEP = 1.25;
|
|
16
|
+
/** The crop box never gets smaller than this on screen, so its handles stay usable. */
|
|
17
|
+
const MIN_BOX_PX = 16;
|
|
18
|
+
/** Wait after the last change before cropping again (autoCrop), in ms. */
|
|
19
|
+
const CROP_DELAY = 120;
|
|
20
|
+
const UPRIGHT = { rotate: 0, flipH: false, flipV: false };
|
|
21
|
+
const clamp = (v, lo, hi) => Math.min(hi, Math.max(lo, v));
|
|
22
|
+
const num = (v, fallback = 0) => {
|
|
23
|
+
const n = Number(v);
|
|
24
|
+
return v !== null && v !== '' && isFinite(n) ? n : fallback;
|
|
25
|
+
};
|
|
26
|
+
const asTemplate = (v) => (v instanceof TemplateRef ? v : null);
|
|
27
|
+
const groupTools = (toolbar) => cropperToolbarGroups(toolbar).map((tools) => ({ tools, zoom: tools.includes('zoomSlider') }));
|
|
28
|
+
const sameTurn = (a, b) => normalizeAngle(a.rotate) === normalizeAngle(b.rotate) && a.flipH === b.flipH && a.flipV === b.flipV;
|
|
29
|
+
/**
|
|
30
|
+
* Crops a picture: `<wu-imagecropper [imageFile]="file" [aspectRatio]="4 / 3" [resizeToWidth]="800"
|
|
31
|
+
* (imageCropped)="saved($event)">`. The picture comes from a File/Blob (`imageFile`), a file input's change event
|
|
32
|
+
* (`imageChangedEvent`), a URL or base64; JPEG photos from phones are turned upright from their EXIF orientation.
|
|
33
|
+
* Drag the box to move it, its corners and edges to resize it (the aspect ratio is kept unless
|
|
34
|
+
* `[maintainAspectRatio]="false"`); the toolbar zooms, turns, mirrors and resets. Keyboard on the focused box: arrows
|
|
35
|
+
* move it (Shift = 10 px), Alt + arrows resize it, + / − grow and shrink it. Ctrl + wheel or a pinch zooms; while
|
|
36
|
+
* zoomed in, dragging outside the box pans. The crop box is kept in image pixels, so resizing the window keeps it.
|
|
37
|
+
* `(imageCropped)` fires after each change (`[autoCrop]="false"` to call `crop()` yourself).
|
|
38
|
+
*/
|
|
39
|
+
class WuImageCropper {
|
|
40
|
+
/** Never enlarge: a crop smaller than `resizeToWidth` / `resizeToHeight` keeps its size. */
|
|
41
|
+
set onlyScaleDown(v) { this._onlyScaleDown = ɵtoBool(v); }
|
|
42
|
+
get onlyScaleDown() { return this._onlyScaleDown; }
|
|
43
|
+
/** Crop after every change (debounced). Default true. */
|
|
44
|
+
set autoCrop(v) { this._autoCrop = v === undefined || v === null || ɵtoBool(v); }
|
|
45
|
+
get autoCrop() { return this._autoCrop; }
|
|
46
|
+
/** Keep `aspectRatio` while resizing. Default true. */
|
|
47
|
+
set maintainAspectRatio(v) { this._keepRatio = v === undefined || v === null || ɵtoBool(v); }
|
|
48
|
+
get maintainAspectRatio() { return this._keepRatio; }
|
|
49
|
+
/** Pad the picture to `aspectRatio` (filled with `backgroundColor`) so the whole photo fits in the box. */
|
|
50
|
+
set containWithinAspectRatio(v) { this._contain = ɵtoBool(v); }
|
|
51
|
+
get containWithinAspectRatio() { return this._contain; }
|
|
52
|
+
/** A round mask over the box (the result is still a rectangle, for an avatar shown in a circle). */
|
|
53
|
+
set roundCropper(v) { this._round = ɵtoBool(v); }
|
|
54
|
+
get roundCropper() { return this._round; }
|
|
55
|
+
/** Hide the squares on the box (it can still be resized from its corners and edges). */
|
|
56
|
+
set hideResizeSquares(v) { this._hideSquares = ɵtoBool(v); }
|
|
57
|
+
get hideResizeSquares() { return this._hideSquares; }
|
|
58
|
+
/** The zoom / turn / mirror / reset toolbar under the picture. Default true. */
|
|
59
|
+
set showToolbar(v) { this._toolbar = v === undefined || v === null || ɵtoBool(v); }
|
|
60
|
+
get showToolbar() { return this._toolbar; }
|
|
61
|
+
/**
|
|
62
|
+
* Which built-in buttons the toolbar has: `'full'` (default), `'none'`, or a list such as
|
|
63
|
+
* `['zoom', '|', 'rotateLeft', 'rotateRight']` (`'|'` starts a group). A `tools` template adds the app's own buttons.
|
|
64
|
+
*/
|
|
65
|
+
set toolbar(v) {
|
|
66
|
+
this._tools = v ?? null;
|
|
67
|
+
this.toolGroups = groupTools(v ?? this.defaults.toolbar);
|
|
68
|
+
}
|
|
69
|
+
get toolbar() {
|
|
70
|
+
return this._tools;
|
|
71
|
+
}
|
|
72
|
+
set disabled(v) { this._disabled = ɵtoBool(v); }
|
|
73
|
+
get disabled() { return this._disabled; }
|
|
74
|
+
constructor() {
|
|
75
|
+
/** App-wide defaults from `provideImageCropperOptions()`; the inputs below start from them. */
|
|
76
|
+
this.defaults = inject(WU_IMAGE_CROPPER_OPTIONS, { optional: true }) || {};
|
|
77
|
+
// ---------- the result ----------
|
|
78
|
+
this.format = this.defaults.format ?? 'png';
|
|
79
|
+
/** 0–100, for jpeg and webp. Default 92. */
|
|
80
|
+
this.imageQuality = this.defaults.imageQuality ?? 92;
|
|
81
|
+
/** `'blob'` (default: `blob` + `objectUrl`) or `'base64'` (a data URL). */
|
|
82
|
+
this.output = this.defaults.output ?? 'blob';
|
|
83
|
+
/** Output width in pixels (0 = the crop's own size). With `resizeToHeight` too, the image fits inside both. */
|
|
84
|
+
this.resizeToWidth = 0;
|
|
85
|
+
this.resizeToHeight = 0;
|
|
86
|
+
// ---------- the crop box ----------
|
|
87
|
+
/** Width / height of the box, e.g. `1`, `4 / 3`, `'16:9'`. Default 1. */
|
|
88
|
+
this.aspectRatio = 1;
|
|
89
|
+
/** Limits in image pixels (0 = none). */
|
|
90
|
+
this.cropperMinWidth = 0;
|
|
91
|
+
this.cropperMinHeight = 0;
|
|
92
|
+
this.cropperMaxWidth = 0;
|
|
93
|
+
this.cropperMaxHeight = 0;
|
|
94
|
+
/** A fixed box size in image pixels (both needed): the box moves but does not resize. */
|
|
95
|
+
this.cropperStaticWidth = 0;
|
|
96
|
+
this.cropperStaticHeight = 0;
|
|
97
|
+
// ---------- turning and zoom ----------
|
|
98
|
+
/** Quarter turns clockwise (negative = anticlockwise), applied before `transform`. */
|
|
99
|
+
this.canvasRotation = 0;
|
|
100
|
+
/** Largest zoom. Default 10. */
|
|
101
|
+
this.maxZoom = this.defaults.maxZoom ?? 10;
|
|
102
|
+
// ---------- look ----------
|
|
103
|
+
/** Where a picture narrower than the component sits: `'center'` (default) or `'left'`. */
|
|
104
|
+
this.alignImage = 'center';
|
|
105
|
+
this.imageCropped = new EventEmitter();
|
|
106
|
+
/** Fires as a crop starts (the result follows in `imageCropped`). */
|
|
107
|
+
this.startCropImage = new EventEmitter();
|
|
108
|
+
this.imageLoaded = new EventEmitter();
|
|
109
|
+
/** The picture is shown; carries its size on screen in CSS pixels. */
|
|
110
|
+
this.cropperReady = new EventEmitter();
|
|
111
|
+
this.loadImageFailed = new EventEmitter();
|
|
112
|
+
/** The box moved or resized (image pixels, rounded). */
|
|
113
|
+
this.cropperChange = new EventEmitter();
|
|
114
|
+
/** Zoom, turn or mirror changed from the toolbar, keys, wheel or pinch. */
|
|
115
|
+
this.transformChange = new EventEmitter();
|
|
116
|
+
// ---------- what the template reads ----------
|
|
117
|
+
/** The built-in toolbar buttons, in groups. */
|
|
118
|
+
this.toolGroups = groupTools(this.defaults.toolbar);
|
|
119
|
+
/** What the `tools` template gets: the cropper as `let-cropper` (and as `cropper`). */
|
|
120
|
+
this.toolsContext = { $implicit: this, cropper: this };
|
|
121
|
+
/** A picture is loaded. */
|
|
122
|
+
this.ready = false;
|
|
123
|
+
this.loading = false;
|
|
124
|
+
this.failed = false;
|
|
125
|
+
/** The picture is loaded and laid out (the box can be drawn). */
|
|
126
|
+
this.shown = false;
|
|
127
|
+
this.dragging = false;
|
|
128
|
+
this.panning = false;
|
|
129
|
+
this.stageW = 0;
|
|
130
|
+
this.stageH = 0;
|
|
131
|
+
this.stageX = 0;
|
|
132
|
+
this.stageY = 0;
|
|
133
|
+
this.boxX = 0;
|
|
134
|
+
this.boxY = 0;
|
|
135
|
+
this.boxW = 0;
|
|
136
|
+
this.boxH = 0;
|
|
137
|
+
/** Crop size in image pixels, for the box's label. */
|
|
138
|
+
this.cropW = 0;
|
|
139
|
+
this.cropH = 0;
|
|
140
|
+
/** Zoom slider position, 0–100 on a log scale. */
|
|
141
|
+
this.zoomSlider = 0;
|
|
142
|
+
this.zoomPercent = 100;
|
|
143
|
+
this.canZoomIn = false;
|
|
144
|
+
this.canZoomOut = false;
|
|
145
|
+
this.squares = ['nw', 'n', 'ne', 'e', 'se', 's', 'sw', 'w'];
|
|
146
|
+
this.edges = ['n', 'e', 's', 'w'];
|
|
147
|
+
this.hintId = ɵuniqueId('wu-imagecropper-hint');
|
|
148
|
+
this._onlyScaleDown = false;
|
|
149
|
+
this._autoCrop = true;
|
|
150
|
+
this._keepRatio = true;
|
|
151
|
+
this._contain = false;
|
|
152
|
+
this._round = false;
|
|
153
|
+
this._hideSquares = false;
|
|
154
|
+
this._toolbar = true;
|
|
155
|
+
this._disabled = false;
|
|
156
|
+
this._tools = null;
|
|
157
|
+
this.source = null;
|
|
158
|
+
this.rect = { x1: 0, y1: 0, x2: 0, y2: 0 };
|
|
159
|
+
this.view = { zoom: 1, cx: 0, cy: 0 };
|
|
160
|
+
/** Turn and mirrors from `transform` / `rotation` and the toolbar (`canvasRotation` comes on top). */
|
|
161
|
+
this.turn = UPRIGHT;
|
|
162
|
+
/** The full orientation the current bounds were built for. */
|
|
163
|
+
this.applied = UPRIGHT;
|
|
164
|
+
this.bounds = { width: 0, height: 0 };
|
|
165
|
+
this.matrix = [1, 0, 0, 1, 0, 0];
|
|
166
|
+
/** CSS pixels per image pixel at zoom 1. */
|
|
167
|
+
this.fit = 0;
|
|
168
|
+
/** The picture's shape when it loaded. The viewport keeps it, so turning the picture does not change the height. */
|
|
169
|
+
this.shape = { width: 0, height: 0 };
|
|
170
|
+
this.viewportRatio = '';
|
|
171
|
+
this.pendingCropper = null;
|
|
172
|
+
this.announced = false;
|
|
173
|
+
this.loadSeq = 0;
|
|
174
|
+
this.cropSeq = 0;
|
|
175
|
+
this.lastObjectUrl = null;
|
|
176
|
+
this.cropTimer = null;
|
|
177
|
+
this.soonTimer = null;
|
|
178
|
+
this.soonTransform = false;
|
|
179
|
+
this.frameId = 0;
|
|
180
|
+
this.needLayout = false;
|
|
181
|
+
this.needDraw = false;
|
|
182
|
+
this.gesture = null;
|
|
183
|
+
this.pointers = new Map();
|
|
184
|
+
this.stopListen = null;
|
|
185
|
+
this.stopWheel = null;
|
|
186
|
+
this.resizeObserver = null;
|
|
187
|
+
this.stopResize = null;
|
|
188
|
+
this.destroyed = false;
|
|
189
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
190
|
+
this.zone = inject(NgZone);
|
|
191
|
+
this.doc = inject(DOCUMENT);
|
|
192
|
+
this.config = inject(WuConfig);
|
|
193
|
+
this.browser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
194
|
+
this.i18n = ɵrefreshOnTranslation();
|
|
195
|
+
ɵassertSupportedAngular(inject(ɵWU_SKIP_VERSION_CHECK, { optional: true }));
|
|
196
|
+
inject(ɵWuStyleLoader).load('button', ɵWU_BUTTON_CSS);
|
|
197
|
+
}
|
|
198
|
+
ngOnChanges(changes) {
|
|
199
|
+
if (changes['imageChangedEvent'] || changes['imageFile'] || changes['imageURL'] || changes['imageBase64'])
|
|
200
|
+
this.sourceChanged(changes);
|
|
201
|
+
if (changes['cropper']) {
|
|
202
|
+
const given = normalizeCrop(this.cropper);
|
|
203
|
+
if (!this.source)
|
|
204
|
+
this.pendingCropper = given;
|
|
205
|
+
else if (given && !sameCrop(given, roundCrop(this.rect)))
|
|
206
|
+
this.placeCrop(given);
|
|
207
|
+
}
|
|
208
|
+
if (!this.source) {
|
|
209
|
+
this.cdr.markForCheck();
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
let layout = false;
|
|
213
|
+
let draw = false;
|
|
214
|
+
let recrop = false;
|
|
215
|
+
if (changes['canvasRotation'] || changes['transform'] || changes['rotation'] || changes['containWithinAspectRatio'] ||
|
|
216
|
+
(this._contain && (changes['aspectRatio'] || changes['maintainAspectRatio'] || changes['cropperStaticWidth'] || changes['cropperStaticHeight']))) {
|
|
217
|
+
// canvasRotation alone keeps turns made with the toolbar; transform / rotation say what the turn is.
|
|
218
|
+
this.reorient(changes['transform'] || changes['rotation'] ? this.inputTurn() : this.turn, false);
|
|
219
|
+
}
|
|
220
|
+
if (changes['aspectRatio'] || changes['maintainAspectRatio'] || changes['cropperMinWidth'] || changes['cropperMinHeight'] ||
|
|
221
|
+
changes['cropperMaxWidth'] || changes['cropperMaxHeight'] || changes['cropperStaticWidth'] || changes['cropperStaticHeight']) {
|
|
222
|
+
this.rect = clampCrop(this.rect, this.windowRect(), this.limits());
|
|
223
|
+
recrop = true;
|
|
224
|
+
}
|
|
225
|
+
if (changes['zoom'] || changes['transform'] || changes['maxZoom']) {
|
|
226
|
+
const z = this.inputZoom();
|
|
227
|
+
if (this.applyZoom(z === null ? this.view.zoom : z))
|
|
228
|
+
draw = recrop = true;
|
|
229
|
+
}
|
|
230
|
+
if (changes['alignImage'])
|
|
231
|
+
layout = draw = true;
|
|
232
|
+
if (changes['format'] || changes['imageQuality'] || changes['output'] || changes['resizeToWidth'] || changes['resizeToHeight'] ||
|
|
233
|
+
changes['onlyScaleDown'] || changes['backgroundColor'] || changes['autoCrop'])
|
|
234
|
+
recrop = true;
|
|
235
|
+
if (changes['backgroundColor'])
|
|
236
|
+
draw = true;
|
|
237
|
+
this.sync();
|
|
238
|
+
this.render(layout, draw);
|
|
239
|
+
if (recrop)
|
|
240
|
+
this.scheduleCrop();
|
|
241
|
+
this.cdr.markForCheck();
|
|
242
|
+
}
|
|
243
|
+
ngAfterViewInit() {
|
|
244
|
+
if (!this.browser)
|
|
245
|
+
return;
|
|
246
|
+
const stage = this.stageRef?.nativeElement;
|
|
247
|
+
const viewport = this.viewportRef?.nativeElement;
|
|
248
|
+
this.zone.runOutsideAngular(() => {
|
|
249
|
+
if (stage) {
|
|
250
|
+
const wheel = (e) => this.wheel(e);
|
|
251
|
+
stage.addEventListener('wheel', wheel, { passive: false });
|
|
252
|
+
this.stopWheel = () => stage.removeEventListener('wheel', wheel);
|
|
253
|
+
}
|
|
254
|
+
if (viewport && typeof ResizeObserver !== 'undefined') {
|
|
255
|
+
this.resizeObserver = new ResizeObserver(() => this.render(true, true));
|
|
256
|
+
this.resizeObserver.observe(viewport);
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
const win = this.doc.defaultView;
|
|
260
|
+
const resize = () => this.render(true, true);
|
|
261
|
+
win?.addEventListener('resize', resize);
|
|
262
|
+
this.stopResize = () => win?.removeEventListener('resize', resize);
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
this.render(true, true);
|
|
266
|
+
}
|
|
267
|
+
ngOnDestroy() {
|
|
268
|
+
this.destroyed = true;
|
|
269
|
+
this.loadSeq++;
|
|
270
|
+
this.i18n.unsubscribe();
|
|
271
|
+
this.stopListen?.();
|
|
272
|
+
this.stopWheel?.();
|
|
273
|
+
this.stopResize?.();
|
|
274
|
+
this.resizeObserver?.disconnect();
|
|
275
|
+
if (this.frameId)
|
|
276
|
+
cancelAnimationFrame(this.frameId);
|
|
277
|
+
if (this.cropTimer)
|
|
278
|
+
clearTimeout(this.cropTimer);
|
|
279
|
+
if (this.soonTimer)
|
|
280
|
+
clearTimeout(this.soonTimer);
|
|
281
|
+
this.releaseSource();
|
|
282
|
+
}
|
|
283
|
+
// ---------- what the template reads ----------
|
|
284
|
+
get t() {
|
|
285
|
+
return this.config.translation;
|
|
286
|
+
}
|
|
287
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
288
|
+
get rootStyle() {
|
|
289
|
+
return this.style && typeof this.style === 'object' ? this.style : null;
|
|
290
|
+
}
|
|
291
|
+
/** The app's own toolbar buttons: `<ng-template #tools let-cropper>` or `wuTemplate="tools"`. */
|
|
292
|
+
get toolsTemplate() {
|
|
293
|
+
return asTemplate(this.toolsRef) || ɵfindTemplate(this.templates, 'tools');
|
|
294
|
+
}
|
|
295
|
+
/** A fixed-size box cannot be resized. */
|
|
296
|
+
get resizable() {
|
|
297
|
+
return !this._disabled && !(num(this.cropperStaticWidth) > 0 && num(this.cropperStaticHeight) > 0);
|
|
298
|
+
}
|
|
299
|
+
get boxLabel() {
|
|
300
|
+
return `${this.cropperFrameAriaLabel || this.t.cropArea}, ${this.cropW} × ${this.cropH}`;
|
|
301
|
+
}
|
|
302
|
+
buttonClass(extra) {
|
|
303
|
+
return ɵbuttonClass('p-button-text p-button-secondary') + ' wu-btn-icon-only ' + extra;
|
|
304
|
+
}
|
|
305
|
+
// ---------- methods for the app ----------
|
|
306
|
+
/**
|
|
307
|
+
* Crops now and resolves with the result (also emitted as `imageCropped`); null while no picture is loaded.
|
|
308
|
+
* `output` overrides the `output` input for this call.
|
|
309
|
+
*/
|
|
310
|
+
crop(output) {
|
|
311
|
+
return this.cropNow(output === 'base64' || output === 'blob' ? output : this.output, false);
|
|
312
|
+
}
|
|
313
|
+
/** Puts the box back to its starting size and place, zoom back to 1. */
|
|
314
|
+
resetCrop() {
|
|
315
|
+
if (!this.source)
|
|
316
|
+
return;
|
|
317
|
+
const zoomed = this.view.zoom !== 1;
|
|
318
|
+
this.startCrop();
|
|
319
|
+
this.commit({ transform: zoomed, draw: zoomed });
|
|
320
|
+
}
|
|
321
|
+
/** Undoes zoom, turns and mirrors and puts the box back (the toolbar's reset). */
|
|
322
|
+
reset() {
|
|
323
|
+
if (!this.source)
|
|
324
|
+
return;
|
|
325
|
+
this.turn = UPRIGHT;
|
|
326
|
+
this.updateBounds();
|
|
327
|
+
this.startCrop();
|
|
328
|
+
this.commit({ transform: true, layout: true, draw: true });
|
|
329
|
+
}
|
|
330
|
+
rotateLeft() {
|
|
331
|
+
this.reorient(rotateOrientation(this.turn, -1), true);
|
|
332
|
+
}
|
|
333
|
+
rotateRight() {
|
|
334
|
+
this.reorient(rotateOrientation(this.turn, 1), true);
|
|
335
|
+
}
|
|
336
|
+
flipHorizontal() {
|
|
337
|
+
this.reorient({ ...this.turn, flipH: !this.turn.flipH }, true);
|
|
338
|
+
}
|
|
339
|
+
flipVertical() {
|
|
340
|
+
this.reorient({ ...this.turn, flipV: !this.turn.flipV }, true);
|
|
341
|
+
}
|
|
342
|
+
zoomIn() {
|
|
343
|
+
if (this.applyZoom(this.view.zoom * ZOOM_STEP))
|
|
344
|
+
this.commit({ transform: true, draw: true });
|
|
345
|
+
}
|
|
346
|
+
zoomOut() {
|
|
347
|
+
if (this.applyZoom(this.view.zoom / ZOOM_STEP))
|
|
348
|
+
this.commit({ transform: true, draw: true });
|
|
349
|
+
}
|
|
350
|
+
// ---------- toolbar ----------
|
|
351
|
+
zoomSliderInput(event) {
|
|
352
|
+
const v = num(event.target.value);
|
|
353
|
+
const max = this.maxZoomValue();
|
|
354
|
+
if (this.applyZoom(Math.pow(max, clamp(v, 0, 100) / 100)))
|
|
355
|
+
this.commit({ transform: true, draw: true, soon: true });
|
|
356
|
+
}
|
|
357
|
+
// ---------- pointer ----------
|
|
358
|
+
pointerDown(event) {
|
|
359
|
+
if (this._disabled || !this.shown || (event.pointerType === 'mouse' && event.button !== 0))
|
|
360
|
+
return;
|
|
361
|
+
event.preventDefault();
|
|
362
|
+
// A new first pointer starts afresh, in case an earlier pointerup never arrived.
|
|
363
|
+
if (event.isPrimary)
|
|
364
|
+
this.pointers.clear();
|
|
365
|
+
this.pointers.set(event.pointerId, { x: event.clientX, y: event.clientY });
|
|
366
|
+
this.listen();
|
|
367
|
+
if (this.pointers.size === 2) {
|
|
368
|
+
this.startPinch();
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
if (this.pointers.size > 2)
|
|
372
|
+
return;
|
|
373
|
+
const target = event.target;
|
|
374
|
+
const handle = target?.closest('[data-handle]')?.getAttribute('data-handle');
|
|
375
|
+
const inBox = !!target?.closest('.wu-imagecropper-box');
|
|
376
|
+
this.boxRef?.nativeElement.focus({ preventScroll: true });
|
|
377
|
+
let mode = 'none';
|
|
378
|
+
if (handle && this.resizable)
|
|
379
|
+
mode = 'resize';
|
|
380
|
+
else if (inBox)
|
|
381
|
+
mode = 'move';
|
|
382
|
+
else if (this.view.zoom > 1)
|
|
383
|
+
mode = 'pan';
|
|
384
|
+
this.gesture = { mode, handle: handle || null, x: event.clientX, y: event.clientY, crop: { ...this.rect }, view: { ...this.view }, distance: 0 };
|
|
385
|
+
this.panning = mode === 'pan';
|
|
386
|
+
}
|
|
387
|
+
startPinch() {
|
|
388
|
+
const distance = this.pinchDistance();
|
|
389
|
+
this.gesture = { mode: distance > 0 ? 'pinch' : 'none', handle: null, x: 0, y: 0, crop: { ...this.rect }, view: { ...this.view }, distance };
|
|
390
|
+
this.panning = false;
|
|
391
|
+
}
|
|
392
|
+
pinchDistance() {
|
|
393
|
+
const p = Array.from(this.pointers.values());
|
|
394
|
+
return p.length < 2 ? 0 : Math.hypot(p[0].x - p[1].x, p[0].y - p[1].y);
|
|
395
|
+
}
|
|
396
|
+
listen() {
|
|
397
|
+
if (this.stopListen)
|
|
398
|
+
return;
|
|
399
|
+
const move = (e) => this.pointerMove(e);
|
|
400
|
+
const up = (e) => this.pointerUp(e);
|
|
401
|
+
this.zone.runOutsideAngular(() => {
|
|
402
|
+
this.doc.addEventListener('pointermove', move);
|
|
403
|
+
this.doc.addEventListener('pointerup', up);
|
|
404
|
+
this.doc.addEventListener('pointercancel', up);
|
|
405
|
+
});
|
|
406
|
+
this.stopListen = () => {
|
|
407
|
+
this.doc.removeEventListener('pointermove', move);
|
|
408
|
+
this.doc.removeEventListener('pointerup', up);
|
|
409
|
+
this.doc.removeEventListener('pointercancel', up);
|
|
410
|
+
this.stopListen = null;
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
/** Runs outside Angular: state changes here are drawn on the next frame. */
|
|
414
|
+
pointerMove(e) {
|
|
415
|
+
if (!this.pointers.has(e.pointerId))
|
|
416
|
+
return;
|
|
417
|
+
this.pointers.set(e.pointerId, { x: e.clientX, y: e.clientY });
|
|
418
|
+
const g = this.gesture;
|
|
419
|
+
if (!g || g.mode === 'none' || !this.source)
|
|
420
|
+
return;
|
|
421
|
+
e.preventDefault();
|
|
422
|
+
if (g.mode === 'pinch') {
|
|
423
|
+
const d = this.pinchDistance();
|
|
424
|
+
if (!d || !g.distance)
|
|
425
|
+
return;
|
|
426
|
+
const r = zoomCrop(this.bounds, g.view, g.crop, g.view.zoom * (d / g.distance), this.limits(), this.maxZoomValue());
|
|
427
|
+
this.view = r.view;
|
|
428
|
+
this.rect = r.crop;
|
|
429
|
+
this.render(false, true);
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
const s = this.scale || 1;
|
|
433
|
+
const dx = (e.clientX - g.x) / s;
|
|
434
|
+
const dy = (e.clientY - g.y) / s;
|
|
435
|
+
if (g.mode === 'move') {
|
|
436
|
+
this.rect = moveCrop(g.crop, dx, dy, this.windowRect());
|
|
437
|
+
}
|
|
438
|
+
else if (g.mode === 'resize' && g.handle) {
|
|
439
|
+
this.rect = resizeCrop(g.crop, g.handle, dx, dy, this.windowRect(), this.limits());
|
|
440
|
+
}
|
|
441
|
+
else if (g.mode === 'pan') {
|
|
442
|
+
const r = panCrop(this.bounds, g.view, g.crop, -dx, -dy);
|
|
443
|
+
this.view = r.view;
|
|
444
|
+
this.rect = r.crop;
|
|
445
|
+
}
|
|
446
|
+
this.dragging = true;
|
|
447
|
+
this.render(false, g.mode === 'pan');
|
|
448
|
+
}
|
|
449
|
+
pointerUp(e) {
|
|
450
|
+
if (!this.pointers.delete(e.pointerId))
|
|
451
|
+
return;
|
|
452
|
+
if (this.pointers.size > 0) {
|
|
453
|
+
// One finger of a pinch lifted: wait for the other rather than jumping into a drag.
|
|
454
|
+
if (this.gesture)
|
|
455
|
+
this.gesture = { ...this.gesture, mode: 'none' };
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
const g = this.gesture;
|
|
459
|
+
this.gesture = null;
|
|
460
|
+
this.stopListen?.();
|
|
461
|
+
const viewChanged = !!g && (g.view.zoom !== this.view.zoom || g.view.cx !== this.view.cx || g.view.cy !== this.view.cy);
|
|
462
|
+
const moved = !!g && (!sameCrop(g.crop, this.rect, 1e-6) || viewChanged);
|
|
463
|
+
this.zone.run(() => {
|
|
464
|
+
this.dragging = false;
|
|
465
|
+
this.panning = false;
|
|
466
|
+
if (moved)
|
|
467
|
+
this.commit({ transform: !!g && g.view.zoom !== this.view.zoom, draw: viewChanged });
|
|
468
|
+
else {
|
|
469
|
+
this.render(false, false);
|
|
470
|
+
this.cdr.markForCheck();
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
/** Ctrl + wheel (and a trackpad pinch, which arrives as one) zooms; a plain wheel scrolls the page. */
|
|
475
|
+
wheel(e) {
|
|
476
|
+
if (!e.ctrlKey || this._disabled || !this.shown)
|
|
477
|
+
return;
|
|
478
|
+
e.preventDefault();
|
|
479
|
+
const dy = e.deltaMode === 1 ? e.deltaY * 16 : e.deltaMode === 2 ? e.deltaY * 400 : e.deltaY;
|
|
480
|
+
const factor = Math.exp(-clamp(dy, -100, 100) * 0.002);
|
|
481
|
+
this.zone.run(() => {
|
|
482
|
+
if (this.applyZoom(this.view.zoom * factor))
|
|
483
|
+
this.commit({ transform: true, draw: true, soon: true });
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
// ---------- keyboard ----------
|
|
487
|
+
boxKey(event) {
|
|
488
|
+
if (this._disabled || !this.source)
|
|
489
|
+
return;
|
|
490
|
+
const s = this.scale || 1;
|
|
491
|
+
const step = Math.max(1, Math.round((event.shiftKey ? 10 : 1) / s));
|
|
492
|
+
const area = this.windowRect();
|
|
493
|
+
const limits = this.limits();
|
|
494
|
+
let next = null;
|
|
495
|
+
const key = event.key;
|
|
496
|
+
if (key === '+' || key === '=' || key === '-' || key === '_') {
|
|
497
|
+
if (!this.resizable)
|
|
498
|
+
return;
|
|
499
|
+
const amount = 2 * Math.max(1, Math.round(10 / s));
|
|
500
|
+
next = growCrop(this.rect, key === '+' || key === '=' ? amount : -amount, area, limits);
|
|
501
|
+
}
|
|
502
|
+
else if (key === 'ArrowLeft' || key === 'ArrowRight' || key === 'ArrowUp' || key === 'ArrowDown') {
|
|
503
|
+
const dx = key === 'ArrowLeft' ? -step : key === 'ArrowRight' ? step : 0;
|
|
504
|
+
const dy = key === 'ArrowUp' ? -step : key === 'ArrowDown' ? step : 0;
|
|
505
|
+
if (event.altKey) {
|
|
506
|
+
if (!this.resizable)
|
|
507
|
+
return;
|
|
508
|
+
next = dx ? resizeCrop(this.rect, 'e', dx, 0, area, limits) : resizeCrop(this.rect, 's', 0, dy, area, limits);
|
|
509
|
+
}
|
|
510
|
+
else {
|
|
511
|
+
next = moveCrop(this.rect, dx, dy, area);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
else {
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
event.preventDefault();
|
|
518
|
+
if (sameCrop(next, this.rect, 1e-6))
|
|
519
|
+
return;
|
|
520
|
+
this.rect = next;
|
|
521
|
+
this.commit({});
|
|
522
|
+
}
|
|
523
|
+
// ---------- loading ----------
|
|
524
|
+
sourceChanged(changes) {
|
|
525
|
+
if (changes['imageChangedEvent'] && this.imageChangedEvent) {
|
|
526
|
+
const file = fileFrom(this.imageChangedEvent);
|
|
527
|
+
if (file)
|
|
528
|
+
void this.load(file, 'blob');
|
|
529
|
+
return;
|
|
530
|
+
}
|
|
531
|
+
if (changes['imageFile'] && this.imageFile)
|
|
532
|
+
void this.load(this.imageFile, 'blob');
|
|
533
|
+
else if (changes['imageURL'] && this.imageURL)
|
|
534
|
+
void this.load(this.imageURL, 'url');
|
|
535
|
+
else if (changes['imageBase64'] && this.imageBase64)
|
|
536
|
+
void this.load(this.imageBase64, 'base64');
|
|
537
|
+
else if (!this.imageChangedEvent && !this.imageFile && !this.imageURL && !this.imageBase64)
|
|
538
|
+
this.clear();
|
|
539
|
+
}
|
|
540
|
+
async load(input, kind) {
|
|
541
|
+
if (!this.browser)
|
|
542
|
+
return;
|
|
543
|
+
const seq = ++this.loadSeq;
|
|
544
|
+
// The previous picture stays until the new one is decoded, so the layout does not jump.
|
|
545
|
+
this.loading = true;
|
|
546
|
+
this.failed = false;
|
|
547
|
+
this.cdr.markForCheck();
|
|
548
|
+
let src = null;
|
|
549
|
+
try {
|
|
550
|
+
src = await loadSource(input, kind, this.doc);
|
|
551
|
+
}
|
|
552
|
+
catch {
|
|
553
|
+
src = null;
|
|
554
|
+
}
|
|
555
|
+
if (seq !== this.loadSeq || this.destroyed) {
|
|
556
|
+
src?.close();
|
|
557
|
+
return;
|
|
558
|
+
}
|
|
559
|
+
this.releaseSource();
|
|
560
|
+
this.loading = false;
|
|
561
|
+
if (!src) {
|
|
562
|
+
this.ready = false;
|
|
563
|
+
this.failed = true;
|
|
564
|
+
this.sync();
|
|
565
|
+
this.render(true, true);
|
|
566
|
+
this.cdr.markForCheck();
|
|
567
|
+
this.loadImageFailed.emit();
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
this.source = src;
|
|
571
|
+
this.turn = this.inputTurn();
|
|
572
|
+
this.updateBounds();
|
|
573
|
+
this.shape = { ...this.bounds };
|
|
574
|
+
this.startCrop();
|
|
575
|
+
const given = this.pendingCropper;
|
|
576
|
+
this.pendingCropper = null;
|
|
577
|
+
if (given)
|
|
578
|
+
this.rect = clampCrop(given, this.windowRect(), this.limits());
|
|
579
|
+
const z = this.inputZoom();
|
|
580
|
+
if (z !== null && z !== 1)
|
|
581
|
+
this.applyZoom(z);
|
|
582
|
+
this.ready = true;
|
|
583
|
+
this.announced = false;
|
|
584
|
+
this.sync();
|
|
585
|
+
this.render(true, true);
|
|
586
|
+
this.cdr.markForCheck();
|
|
587
|
+
this.imageLoaded.emit({
|
|
588
|
+
original: { size: { width: src.rawWidth, height: src.rawHeight } },
|
|
589
|
+
transformed: { size: { width: src.width, height: src.height } },
|
|
590
|
+
exifTransform: { ...src.exif },
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
clear() {
|
|
594
|
+
this.loadSeq++;
|
|
595
|
+
this.releaseSource();
|
|
596
|
+
this.ready = this.loading = this.failed = false;
|
|
597
|
+
this.sync();
|
|
598
|
+
this.render(true, true);
|
|
599
|
+
this.cdr.markForCheck();
|
|
600
|
+
}
|
|
601
|
+
releaseSource() {
|
|
602
|
+
this.source?.close();
|
|
603
|
+
this.source = null;
|
|
604
|
+
}
|
|
605
|
+
// ---------- geometry ----------
|
|
606
|
+
/** CSS pixels per image pixel now. */
|
|
607
|
+
get scale() {
|
|
608
|
+
return this.fit * this.view.zoom;
|
|
609
|
+
}
|
|
610
|
+
windowRect() {
|
|
611
|
+
return viewWindow(this.bounds, this.view);
|
|
612
|
+
}
|
|
613
|
+
maxZoomValue() {
|
|
614
|
+
return Math.max(1, num(this.maxZoom, 10) || 10);
|
|
615
|
+
}
|
|
616
|
+
ratio() {
|
|
617
|
+
const sw = num(this.cropperStaticWidth);
|
|
618
|
+
const sh = num(this.cropperStaticHeight);
|
|
619
|
+
if (sw > 0 && sh > 0)
|
|
620
|
+
return sw / sh;
|
|
621
|
+
return this._keepRatio ? parseAspectRatio(this.aspectRatio) : null;
|
|
622
|
+
}
|
|
623
|
+
limits() {
|
|
624
|
+
const sw = num(this.cropperStaticWidth);
|
|
625
|
+
const sh = num(this.cropperStaticHeight);
|
|
626
|
+
if (sw > 0 && sh > 0)
|
|
627
|
+
return { minWidth: sw, maxWidth: sw, minHeight: sh, maxHeight: sh, ratio: sw / sh };
|
|
628
|
+
const s = this.scale;
|
|
629
|
+
const minPx = s > 0 ? MIN_BOX_PX / s : 0;
|
|
630
|
+
return {
|
|
631
|
+
minWidth: Math.max(num(this.cropperMinWidth), minPx),
|
|
632
|
+
minHeight: Math.max(num(this.cropperMinHeight), minPx),
|
|
633
|
+
maxWidth: num(this.cropperMaxWidth),
|
|
634
|
+
maxHeight: num(this.cropperMaxHeight),
|
|
635
|
+
ratio: this.ratio(),
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
/** Turn and mirrors the inputs ask for. */
|
|
639
|
+
inputTurn() {
|
|
640
|
+
const t = this.transform || {};
|
|
641
|
+
const r = this.rotation !== null && this.rotation !== undefined && this.rotation !== '' ? num(this.rotation) : num(t.rotate);
|
|
642
|
+
return { rotate: normalizeAngle(r), flipH: !!t.flipH, flipV: !!t.flipV };
|
|
643
|
+
}
|
|
644
|
+
/** Zoom the inputs ask for, or null for none. */
|
|
645
|
+
inputZoom() {
|
|
646
|
+
if (this.zoom !== null && this.zoom !== undefined && this.zoom !== '')
|
|
647
|
+
return num(this.zoom, 1);
|
|
648
|
+
const s = this.transform ? Number(this.transform.scale) : NaN;
|
|
649
|
+
return isFinite(s) && s > 0 ? s : null;
|
|
650
|
+
}
|
|
651
|
+
/** `turn` with `canvasRotation` on top. */
|
|
652
|
+
total() {
|
|
653
|
+
return { ...this.turn, rotate: normalizeAngle(this.turn.rotate + Math.round(num(this.canvasRotation)) * 90) };
|
|
654
|
+
}
|
|
655
|
+
/** The oriented picture's size for `o`, padded to the aspect ratio with `containWithinAspectRatio`. */
|
|
656
|
+
boundsFor(o) {
|
|
657
|
+
const src = this.source;
|
|
658
|
+
if (!src)
|
|
659
|
+
return { width: 0, height: 0 };
|
|
660
|
+
const turned = rotatedSize(src.width, src.height, o.rotate);
|
|
661
|
+
const ratio = this.ratio();
|
|
662
|
+
return this._contain && ratio ? padToRatio(turned, ratio) : turned;
|
|
663
|
+
}
|
|
664
|
+
updateBounds() {
|
|
665
|
+
const src = this.source;
|
|
666
|
+
if (!src)
|
|
667
|
+
return;
|
|
668
|
+
const o = this.total();
|
|
669
|
+
this.bounds = this.boundsFor(o);
|
|
670
|
+
this.matrix = orientationMatrix(src.width, src.height, o, this.bounds);
|
|
671
|
+
this.applied = o;
|
|
672
|
+
}
|
|
673
|
+
startCrop() {
|
|
674
|
+
this.view = clampView(this.bounds, { zoom: 1, cx: this.bounds.width / 2, cy: this.bounds.height / 2 });
|
|
675
|
+
this.rect = initialCrop(cropArea(this.bounds), this.limits());
|
|
676
|
+
}
|
|
677
|
+
/** A box from the app: shown at zoom 1 if it lies outside what is in view. */
|
|
678
|
+
placeCrop(given) {
|
|
679
|
+
const win = this.windowRect();
|
|
680
|
+
if (given.x1 < win.x1 || given.y1 < win.y1 || given.x2 > win.x2 || given.y2 > win.y2) {
|
|
681
|
+
this.view = clampView(this.bounds, { zoom: 1, cx: 0, cy: 0 });
|
|
682
|
+
this.render(false, true);
|
|
683
|
+
}
|
|
684
|
+
this.rect = clampCrop(given, this.windowRect(), this.limits());
|
|
685
|
+
this.sync();
|
|
686
|
+
this.render(false, false);
|
|
687
|
+
this.scheduleCrop();
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* Turns / mirrors to `next`, carrying the box along. A fresh box when the angle is not a quarter turn or the padding
|
|
691
|
+
* of `containWithinAspectRatio` changes shape.
|
|
692
|
+
*/
|
|
693
|
+
reorient(next, user) {
|
|
694
|
+
const fromSize = this.bounds;
|
|
695
|
+
const from = this.applied;
|
|
696
|
+
this.turn = { rotate: normalizeAngle(next.rotate), flipH: !!next.flipH, flipV: !!next.flipV };
|
|
697
|
+
if (!this.source)
|
|
698
|
+
return;
|
|
699
|
+
const to = this.total();
|
|
700
|
+
if (sameTurn(from, to) && sameSize(this.boundsFor(to), fromSize))
|
|
701
|
+
return;
|
|
702
|
+
this.updateBounds();
|
|
703
|
+
const crop = remapCrop(this.rect, fromSize, from, this.bounds, to, !!this.ratio());
|
|
704
|
+
const centre = remapPoint(this.view.cx, this.view.cy, fromSize, from, this.bounds, to);
|
|
705
|
+
if (crop && centre && sameSize(rotatedSize(fromSize.width, fromSize.height, to.rotate - from.rotate), this.bounds)) {
|
|
706
|
+
this.view = clampView(this.bounds, { zoom: this.view.zoom, cx: centre.x, cy: centre.y }, this.maxZoomValue());
|
|
707
|
+
this.rect = clampCrop(crop, this.windowRect(), this.limits());
|
|
708
|
+
}
|
|
709
|
+
else {
|
|
710
|
+
this.startCrop();
|
|
711
|
+
}
|
|
712
|
+
if (user) {
|
|
713
|
+
this.commit({ transform: true, layout: true, draw: true });
|
|
714
|
+
}
|
|
715
|
+
else {
|
|
716
|
+
this.sync();
|
|
717
|
+
this.render(true, true);
|
|
718
|
+
this.scheduleCrop();
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
applyZoom(zoom) {
|
|
722
|
+
if (!this.source || !isFinite(zoom))
|
|
723
|
+
return false;
|
|
724
|
+
const r = zoomCrop(this.bounds, this.view, this.rect, zoom, this.limits(), this.maxZoomValue());
|
|
725
|
+
const same = r.view.zoom === this.view.zoom && r.view.cx === this.view.cx && r.view.cy === this.view.cy && sameCrop(r.crop, this.rect, 1e-6);
|
|
726
|
+
this.view = r.view;
|
|
727
|
+
this.rect = r.crop;
|
|
728
|
+
return !same;
|
|
729
|
+
}
|
|
730
|
+
// ---------- drawing ----------
|
|
731
|
+
/** Works out what the template shows from the state (no DOM reads). */
|
|
732
|
+
sync() {
|
|
733
|
+
this.shown = this.ready && this.fit > 0;
|
|
734
|
+
const win = this.windowRect();
|
|
735
|
+
const s = this.scale;
|
|
736
|
+
this.boxX = (this.rect.x1 - win.x1) * s;
|
|
737
|
+
this.boxY = (this.rect.y1 - win.y1) * s;
|
|
738
|
+
this.boxW = cropWidth(this.rect) * s;
|
|
739
|
+
this.boxH = cropHeight(this.rect) * s;
|
|
740
|
+
this.cropW = Math.round(cropWidth(this.rect));
|
|
741
|
+
this.cropH = Math.round(cropHeight(this.rect));
|
|
742
|
+
const max = this.maxZoomValue();
|
|
743
|
+
this.zoomSlider = max > 1 ? Math.round((Math.log(this.view.zoom) / Math.log(max)) * 100) : 0;
|
|
744
|
+
this.zoomPercent = Math.round(this.view.zoom * 100);
|
|
745
|
+
this.canZoomOut = this.view.zoom > 1.0001;
|
|
746
|
+
this.canZoomIn = this.view.zoom < max - 0.0001;
|
|
747
|
+
}
|
|
748
|
+
/** Lays out, refreshes the template and redraws on the next frame (outside Angular, once per frame). */
|
|
749
|
+
render(layout, draw) {
|
|
750
|
+
if (!this.browser || this.destroyed)
|
|
751
|
+
return;
|
|
752
|
+
this.needLayout = this.needLayout || layout;
|
|
753
|
+
this.needDraw = this.needDraw || draw;
|
|
754
|
+
if (this.frameId)
|
|
755
|
+
return;
|
|
756
|
+
this.zone.runOutsideAngular(() => {
|
|
757
|
+
this.frameId = requestAnimationFrame(() => {
|
|
758
|
+
this.frameId = 0;
|
|
759
|
+
if (this.destroyed)
|
|
760
|
+
return;
|
|
761
|
+
const layoutNow = this.needLayout;
|
|
762
|
+
const drawNow = this.needDraw;
|
|
763
|
+
this.needLayout = this.needDraw = false;
|
|
764
|
+
if (layoutNow)
|
|
765
|
+
this.layout();
|
|
766
|
+
this.sync();
|
|
767
|
+
this.cdr.detectChanges();
|
|
768
|
+
if (layoutNow || drawNow)
|
|
769
|
+
this.draw();
|
|
770
|
+
this.announce();
|
|
771
|
+
});
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Measures the room for the picture and fits the stage into it. The room has the shape of the picture as loaded;
|
|
776
|
+
* a turned picture fits inside it, so the page below does not jump.
|
|
777
|
+
*/
|
|
778
|
+
layout() {
|
|
779
|
+
const viewport = this.viewportRef?.nativeElement;
|
|
780
|
+
const frame = this.frameRef?.nativeElement;
|
|
781
|
+
if (!viewport || !frame)
|
|
782
|
+
return;
|
|
783
|
+
const ratio = this.ready && this.shape.width > 0 && this.shape.height > 0 ? `${this.shape.width} / ${this.shape.height}` : '';
|
|
784
|
+
if (ratio !== this.viewportRatio) {
|
|
785
|
+
this.viewportRatio = ratio;
|
|
786
|
+
viewport.style.aspectRatio = ratio;
|
|
787
|
+
}
|
|
788
|
+
const aw = frame.clientWidth;
|
|
789
|
+
const ah = frame.clientHeight;
|
|
790
|
+
if (!this.ready || !aw || !ah || !this.bounds.width || !this.bounds.height) {
|
|
791
|
+
this.fit = 0;
|
|
792
|
+
return;
|
|
793
|
+
}
|
|
794
|
+
const fit = Math.min(aw / this.bounds.width, ah / this.bounds.height);
|
|
795
|
+
this.fit = fit;
|
|
796
|
+
this.stageW = this.bounds.width * fit;
|
|
797
|
+
this.stageH = this.bounds.height * fit;
|
|
798
|
+
this.stageX = this.alignImage === 'left' ? 0 : (aw - this.stageW) / 2;
|
|
799
|
+
this.stageY = (ah - this.stageH) / 2;
|
|
800
|
+
}
|
|
801
|
+
draw() {
|
|
802
|
+
const canvas = this.canvasRef?.nativeElement;
|
|
803
|
+
if (!canvas)
|
|
804
|
+
return;
|
|
805
|
+
const src = this.source;
|
|
806
|
+
const ctx = canvas.getContext('2d');
|
|
807
|
+
if (!ctx)
|
|
808
|
+
return;
|
|
809
|
+
if (!src || !this.shown) {
|
|
810
|
+
canvas.width = canvas.height = 1;
|
|
811
|
+
ctx.clearRect(0, 0, 1, 1);
|
|
812
|
+
return;
|
|
813
|
+
}
|
|
814
|
+
const dpr = Math.min(Math.max(this.doc.defaultView?.devicePixelRatio || 1, 1), 3);
|
|
815
|
+
const cw = Math.max(1, Math.round(this.stageW * dpr));
|
|
816
|
+
const ch = Math.max(1, Math.round(this.stageH * dpr));
|
|
817
|
+
if (canvas.width !== cw)
|
|
818
|
+
canvas.width = cw;
|
|
819
|
+
if (canvas.height !== ch)
|
|
820
|
+
canvas.height = ch;
|
|
821
|
+
const win = this.windowRect();
|
|
822
|
+
const sx = cw / cropWidth(win);
|
|
823
|
+
const sy = ch / cropHeight(win);
|
|
824
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
825
|
+
ctx.clearRect(0, 0, cw, ch);
|
|
826
|
+
ctx.setTransform(sx, 0, 0, sy, -win.x1 * sx, -win.y1 * sy);
|
|
827
|
+
if (this.backgroundColor) {
|
|
828
|
+
ctx.fillStyle = this.backgroundColor;
|
|
829
|
+
ctx.fillRect(0, 0, this.bounds.width, this.bounds.height);
|
|
830
|
+
}
|
|
831
|
+
ctx.imageSmoothingEnabled = true;
|
|
832
|
+
ctx.imageSmoothingQuality = 'high';
|
|
833
|
+
const m = this.matrix;
|
|
834
|
+
ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
|
|
835
|
+
ctx.drawImage(src.image, 0, 0);
|
|
836
|
+
}
|
|
837
|
+
/** The first time a picture is shown: `cropperReady`, the starting box for `[(cropper)]`, the first crop. */
|
|
838
|
+
announce() {
|
|
839
|
+
if (this.announced || !this.shown)
|
|
840
|
+
return;
|
|
841
|
+
this.announced = true;
|
|
842
|
+
this.zone.run(() => {
|
|
843
|
+
this.cropperReady.emit({ width: Math.round(this.stageW), height: Math.round(this.stageH) });
|
|
844
|
+
this.cropperChange.emit(roundCrop(this.rect));
|
|
845
|
+
this.scheduleCrop(0);
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
// ---------- telling the app ----------
|
|
849
|
+
/** After a change by the user: redraw, tell the app, crop again. */
|
|
850
|
+
commit(o) {
|
|
851
|
+
this.sync();
|
|
852
|
+
this.cdr.markForCheck();
|
|
853
|
+
this.render(!!o.layout, !!o.draw);
|
|
854
|
+
if (o.soon)
|
|
855
|
+
this.emitSoon(!!o.transform);
|
|
856
|
+
else
|
|
857
|
+
this.emitChanges(!!o.transform);
|
|
858
|
+
this.scheduleCrop();
|
|
859
|
+
}
|
|
860
|
+
emitChanges(transform) {
|
|
861
|
+
this.cropperChange.emit(roundCrop(this.rect));
|
|
862
|
+
if (transform)
|
|
863
|
+
this.transformChange.emit(this.currentTransform());
|
|
864
|
+
}
|
|
865
|
+
/** For changes that stream (slider, wheel): tell the app once they settle. */
|
|
866
|
+
emitSoon(transform) {
|
|
867
|
+
this.soonTransform = this.soonTransform || transform;
|
|
868
|
+
if (this.soonTimer)
|
|
869
|
+
clearTimeout(this.soonTimer);
|
|
870
|
+
this.zone.runOutsideAngular(() => {
|
|
871
|
+
this.soonTimer = setTimeout(() => {
|
|
872
|
+
this.soonTimer = null;
|
|
873
|
+
const t = this.soonTransform;
|
|
874
|
+
this.soonTransform = false;
|
|
875
|
+
this.zone.run(() => this.emitChanges(t));
|
|
876
|
+
}, 150);
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
currentTransform() {
|
|
880
|
+
return { ...(this.transform || {}), scale: this.view.zoom, rotate: this.turn.rotate, flipH: this.turn.flipH, flipV: this.turn.flipV };
|
|
881
|
+
}
|
|
882
|
+
scheduleCrop(delay = CROP_DELAY) {
|
|
883
|
+
if (!this._autoCrop || !this.ready || !this.browser || this.destroyed)
|
|
884
|
+
return;
|
|
885
|
+
if (this.cropTimer)
|
|
886
|
+
clearTimeout(this.cropTimer);
|
|
887
|
+
this.zone.runOutsideAngular(() => {
|
|
888
|
+
this.cropTimer = setTimeout(() => {
|
|
889
|
+
this.cropTimer = null;
|
|
890
|
+
this.zone.run(() => void this.cropNow(this.output, true));
|
|
891
|
+
}, delay);
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
// ---------- cropping ----------
|
|
895
|
+
async cropNow(output, auto) {
|
|
896
|
+
const src = this.source;
|
|
897
|
+
if (!src || !this.ready || this.destroyed)
|
|
898
|
+
return null;
|
|
899
|
+
const seq = ++this.cropSeq;
|
|
900
|
+
this.startCropImage.emit();
|
|
901
|
+
let event = null;
|
|
902
|
+
try {
|
|
903
|
+
event = await this.produce(src, { ...this.rect }, output);
|
|
904
|
+
}
|
|
905
|
+
catch (e) {
|
|
906
|
+
console.warn('[wiraui] imagecropper: the picture could not be cropped (a cross-origin image without CORS?).', e);
|
|
907
|
+
}
|
|
908
|
+
if (!event)
|
|
909
|
+
return null;
|
|
910
|
+
if (seq !== this.cropSeq || this.destroyed || src !== this.source) {
|
|
911
|
+
// A newer crop is on its way: this one is out of date.
|
|
912
|
+
if (auto) {
|
|
913
|
+
if (event.objectUrl)
|
|
914
|
+
URL.revokeObjectURL(event.objectUrl);
|
|
915
|
+
return null;
|
|
916
|
+
}
|
|
917
|
+
return event;
|
|
918
|
+
}
|
|
919
|
+
if (event.objectUrl) {
|
|
920
|
+
if (this.lastObjectUrl)
|
|
921
|
+
URL.revokeObjectURL(this.lastObjectUrl);
|
|
922
|
+
this.lastObjectUrl = event.objectUrl;
|
|
923
|
+
}
|
|
924
|
+
this.imageCropped.emit(event);
|
|
925
|
+
return event;
|
|
926
|
+
}
|
|
927
|
+
async produce(src, rect, output) {
|
|
928
|
+
const size = outputSize(cropWidth(rect), cropHeight(rect), {
|
|
929
|
+
resizeToWidth: num(this.resizeToWidth),
|
|
930
|
+
resizeToHeight: num(this.resizeToHeight),
|
|
931
|
+
onlyScaleDown: this._onlyScaleDown,
|
|
932
|
+
ratio: this.ratio(),
|
|
933
|
+
});
|
|
934
|
+
const canvas = this.paintCrop(src, rect, size);
|
|
935
|
+
if (!canvas)
|
|
936
|
+
return null;
|
|
937
|
+
const type = 'image/' + this.formatName();
|
|
938
|
+
const quality = clamp(num(this.imageQuality, 92), 0, 100) / 100;
|
|
939
|
+
const base = { width: size.width, height: size.height, cropperPosition: this.screenPosition(rect), imagePosition: roundCrop(rect) };
|
|
940
|
+
if (output === 'base64')
|
|
941
|
+
return { ...base, base64: canvas.toDataURL(type, quality) };
|
|
942
|
+
const blob = await new Promise((resolve) => canvas.toBlob(resolve, type, quality));
|
|
943
|
+
if (!blob)
|
|
944
|
+
return null;
|
|
945
|
+
return { ...base, blob, objectUrl: URL.createObjectURL(blob) };
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Draws the crop at the output size. A big reduction in one step looks jagged in some browsers, so the crop is
|
|
949
|
+
* drawn at up to 2ⁿ times the size and halved n times.
|
|
950
|
+
*/
|
|
951
|
+
paintCrop(src, rect, size) {
|
|
952
|
+
const cw = cropWidth(rect);
|
|
953
|
+
const ch = cropHeight(rect);
|
|
954
|
+
let n = 0;
|
|
955
|
+
while (n < 4 && size.width * 2 ** (n + 1) <= cw && size.height * 2 ** (n + 1) <= ch && size.width * size.height * 4 ** (n + 1) <= MAX_CANVAS_AREA)
|
|
956
|
+
n++;
|
|
957
|
+
const w = size.width * 2 ** n;
|
|
958
|
+
const h = size.height * 2 ** n;
|
|
959
|
+
const first = this.newCanvas(w, h, n === 0);
|
|
960
|
+
const ctx = first?.getContext('2d');
|
|
961
|
+
if (!first || !ctx)
|
|
962
|
+
return null;
|
|
963
|
+
let canvas = first;
|
|
964
|
+
const sx = w / cw;
|
|
965
|
+
const sy = h / ch;
|
|
966
|
+
ctx.setTransform(sx, 0, 0, sy, -rect.x1 * sx, -rect.y1 * sy);
|
|
967
|
+
const m = this.matrix;
|
|
968
|
+
ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
|
|
969
|
+
ctx.drawImage(src.image, 0, 0);
|
|
970
|
+
for (let i = n - 1; i >= 0; i--) {
|
|
971
|
+
const next = this.newCanvas(size.width * 2 ** i, size.height * 2 ** i, i === 0);
|
|
972
|
+
const nctx = next?.getContext('2d');
|
|
973
|
+
if (!next || !nctx)
|
|
974
|
+
return null;
|
|
975
|
+
nctx.drawImage(canvas, 0, 0, next.width, next.height);
|
|
976
|
+
canvas = next;
|
|
977
|
+
}
|
|
978
|
+
return canvas;
|
|
979
|
+
}
|
|
980
|
+
/** A canvas; `final` fills it with the background colour first (white for JPEG, which has no transparency). */
|
|
981
|
+
newCanvas(width, height, final) {
|
|
982
|
+
const canvas = this.doc.createElement('canvas');
|
|
983
|
+
canvas.width = width;
|
|
984
|
+
canvas.height = height;
|
|
985
|
+
const ctx = canvas.getContext('2d');
|
|
986
|
+
if (!ctx)
|
|
987
|
+
return null;
|
|
988
|
+
const format = this.formatName();
|
|
989
|
+
const fill = this.backgroundColor || (format === 'jpeg' || format === 'bmp' ? '#ffffff' : '');
|
|
990
|
+
if (final && fill) {
|
|
991
|
+
ctx.fillStyle = fill;
|
|
992
|
+
ctx.fillRect(0, 0, width, height);
|
|
993
|
+
}
|
|
994
|
+
ctx.imageSmoothingEnabled = true;
|
|
995
|
+
ctx.imageSmoothingQuality = 'high';
|
|
996
|
+
return canvas;
|
|
997
|
+
}
|
|
998
|
+
/** `format` in lower case, `jpg` read as `jpeg`. */
|
|
999
|
+
formatName() {
|
|
1000
|
+
const f = String(this.format || 'png').toLowerCase();
|
|
1001
|
+
return f === 'jpg' ? 'jpeg' : f;
|
|
1002
|
+
}
|
|
1003
|
+
/** Where the box is over the shown picture, in CSS pixels. */
|
|
1004
|
+
screenPosition(rect) {
|
|
1005
|
+
const win = this.windowRect();
|
|
1006
|
+
const s = this.scale;
|
|
1007
|
+
return roundCrop({ x1: (rect.x1 - win.x1) * s, y1: (rect.y1 - win.y1) * s, x2: (rect.x2 - win.x1) * s, y2: (rect.y2 - win.y1) * s });
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
WuImageCropper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WuImageCropper, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1011
|
+
WuImageCropper.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: WuImageCropper, isStandalone: true, selector: "wu-imagecropper, wu-imageCropper, wu-image-cropper, image-cropper", inputs: { imageFile: "imageFile", imageChangedEvent: "imageChangedEvent", imageURL: "imageURL", imageBase64: "imageBase64", format: "format", imageQuality: "imageQuality", output: "output", resizeToWidth: "resizeToWidth", resizeToHeight: "resizeToHeight", onlyScaleDown: "onlyScaleDown", backgroundColor: "backgroundColor", autoCrop: "autoCrop", aspectRatio: "aspectRatio", maintainAspectRatio: "maintainAspectRatio", containWithinAspectRatio: "containWithinAspectRatio", cropperMinWidth: "cropperMinWidth", cropperMinHeight: "cropperMinHeight", cropperMaxWidth: "cropperMaxWidth", cropperMaxHeight: "cropperMaxHeight", cropperStaticWidth: "cropperStaticWidth", cropperStaticHeight: "cropperStaticHeight", roundCropper: "roundCropper", hideResizeSquares: "hideResizeSquares", cropper: "cropper", canvasRotation: "canvasRotation", transform: "transform", rotation: "rotation", zoom: "zoom", maxZoom: "maxZoom", allowMoveImage: "allowMoveImage", alignImage: "alignImage", showToolbar: "showToolbar", toolbar: "toolbar", disabled: "disabled", ariaLabel: "ariaLabel", imageAltText: "imageAltText", cropperFrameAriaLabel: "cropperFrameAriaLabel", styleClass: "styleClass", style: "style", initialStepSize: "initialStepSize", checkImageType: "checkImageType", options: "options" }, outputs: { imageCropped: "imageCropped", startCropImage: "startCropImage", imageLoaded: "imageLoaded", cropperReady: "cropperReady", loadImageFailed: "loadImageFailed", cropperChange: "cropperChange", transformChange: "transformChange" }, queries: [{ propertyName: "toolsRef", first: true, predicate: ["tools"] }, { propertyName: "templates", predicate: WuTemplate }], viewQueries: [{ propertyName: "viewportRef", first: true, predicate: ["viewport"], descendants: true }, { propertyName: "frameRef", first: true, predicate: ["frame"], descendants: true }, { propertyName: "stageRef", first: true, predicate: ["stage"], descendants: true }, { propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true }, { propertyName: "boxRef", first: true, predicate: ["box"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"wu-imagecropper\"\n [class.wu-imagecropper-ready]=\"shown\"\n [class.wu-imagecropper-empty]=\"!ready\"\n [class.wu-imagecropper-loading]=\"loading\"\n [class.wu-imagecropper-failed]=\"failed\"\n [class.wu-imagecropper-disabled]=\"disabled\"\n [class.wu-imagecropper-round]=\"roundCropper\"\n [class.wu-imagecropper-dragging]=\"dragging\"\n [class]=\"styleClass || ''\"\n [style]=\"rootStyle\"\n role=\"group\"\n [attr.aria-label]=\"ariaLabel || t.imageCropper\"\n [attr.aria-busy]=\"loading || null\"\n>\n <div #viewport class=\"wu-imagecropper-viewport\">\n <div #frame class=\"wu-imagecropper-frame\">\n <div\n #stage\n class=\"wu-imagecropper-stage\"\n [class.wu-imagecropper-pannable]=\"shown && canZoomOut && !disabled\"\n [class.wu-imagecropper-panning]=\"panning\"\n [style.visibility]=\"shown ? null : 'hidden'\"\n [style.left.px]=\"stageX\"\n [style.top.px]=\"stageY\"\n [style.width.px]=\"stageW\"\n [style.height.px]=\"stageH\"\n (pointerdown)=\"pointerDown($event)\"\n >\n <canvas\n #canvas\n class=\"wu-imagecropper-canvas\"\n [attr.role]=\"imageAltText ? 'img' : null\"\n [attr.aria-label]=\"imageAltText || null\"\n [attr.aria-hidden]=\"imageAltText ? null : 'true'\"\n ></canvas>\n <div *ngIf=\"shown\" class=\"wu-imagecropper-shade\" aria-hidden=\"true\">\n <div class=\"wu-imagecropper-hole\" [style.left.px]=\"boxX\" [style.top.px]=\"boxY\" [style.width.px]=\"boxW\" [style.height.px]=\"boxH\"></div>\n </div>\n <div\n *ngIf=\"shown\"\n #box\n class=\"wu-imagecropper-box\"\n role=\"group\"\n [attr.tabindex]=\"disabled ? null : 0\"\n [attr.aria-label]=\"boxLabel\"\n [attr.aria-describedby]=\"hintId\"\n [attr.aria-disabled]=\"disabled || null\"\n [style.left.px]=\"boxX\"\n [style.top.px]=\"boxY\"\n [style.width.px]=\"boxW\"\n [style.height.px]=\"boxH\"\n (keydown)=\"boxKey($event)\"\n >\n <span class=\"wu-imagecropper-grid\" aria-hidden=\"true\"></span>\n <ng-container *ngIf=\"resizable\">\n <span *ngFor=\"let e of edges\" [class]=\"'wu-imagecropper-edge wu-imagecropper-edge-' + e\" [attr.data-handle]=\"e\" aria-hidden=\"true\"></span>\n <span\n *ngFor=\"let h of squares\"\n [class]=\"'wu-imagecropper-handle wu-imagecropper-handle-' + h + (hideResizeSquares ? ' wu-imagecropper-handle-hidden' : '')\"\n [attr.data-handle]=\"h\"\n aria-hidden=\"true\"\n ></span>\n </ng-container>\n </div>\n </div>\n </div>\n <span [id]=\"hintId\" class=\"wu-imagecropper-hint\">{{ t.cropAreaHint }}</span>\n <div *ngIf=\"!ready\" class=\"wu-imagecropper-status\" [attr.role]=\"failed && !loading ? 'alert' : null\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\"></rect>\n <circle cx=\"8.5\" cy=\"9.5\" r=\"1.5\"></circle>\n <path d=\"m21 16-5-5-9 9\"></path>\n </svg>\n <span *ngIf=\"loading\">{{ t.loading }}</span>\n <span *ngIf=\"failed && !loading\">{{ t.imageLoadFailed }}</span>\n </div>\n </div>\n\n <div\n *ngIf=\"showToolbar && ready && (toolGroups.length || toolsTemplate)\"\n class=\"wu-imagecropper-toolbar\"\n role=\"toolbar\"\n [attr.aria-label]=\"ariaLabel || t.imageCropper\"\n >\n <div *ngFor=\"let group of toolGroups\" class=\"wu-imagecropper-group\" [class.wu-imagecropper-group-zoom]=\"group.zoom\">\n <ng-container *ngFor=\"let tool of group.tools\" [ngSwitch]=\"tool\">\n <button *ngSwitchCase=\"'zoomOut'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-zoom-out')\" [disabled]=\"disabled || !canZoomOut\" [attr.aria-label]=\"t.zoomOut\" [attr.title]=\"t.zoomOut\" (click)=\"zoomOut()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\"><circle cx=\"11\" cy=\"11\" r=\"7\"></circle><path d=\"M8 11h6M20.5 20.5 16 16\"></path></svg>\n </button>\n <input\n *ngSwitchCase=\"'zoomSlider'\"\n type=\"range\"\n class=\"wu-imagecropper-zoom\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [value]=\"zoomSlider\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"t.zoom\"\n [attr.aria-valuetext]=\"zoomPercent + '%'\"\n (input)=\"zoomSliderInput($event)\"\n />\n <button *ngSwitchCase=\"'zoomIn'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-zoom-in')\" [disabled]=\"disabled || !canZoomIn\" [attr.aria-label]=\"t.zoomIn\" [attr.title]=\"t.zoomIn\" (click)=\"zoomIn()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\"><circle cx=\"11\" cy=\"11\" r=\"7\"></circle><path d=\"M8 11h6M11 8v6M20.5 20.5 16 16\"></path></svg>\n </button>\n <button *ngSwitchCase=\"'rotateLeft'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-rotate-left')\" [disabled]=\"disabled\" [attr.aria-label]=\"t.rotateLeft\" [attr.title]=\"t.rotateLeft\" (click)=\"rotateLeft()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 4v6h6\"></path><path d=\"M4 10a8 8 0 1 1 1.7 7\"></path></svg>\n </button>\n <button *ngSwitchCase=\"'rotateRight'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-rotate-right')\" [disabled]=\"disabled\" [attr.aria-label]=\"t.rotateRight\" [attr.title]=\"t.rotateRight\" (click)=\"rotateRight()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M20 4v6h-6\"></path><path d=\"M20 10A8 8 0 1 0 18.3 17\"></path></svg>\n </button>\n <button *ngSwitchCase=\"'flipHorizontal'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-flip-h')\" [disabled]=\"disabled\" [attr.aria-label]=\"t.flipHorizontal\" [attr.title]=\"t.flipHorizontal\" (click)=\"flipHorizontal()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 3v18\" stroke-dasharray=\"2 2.5\"></path><path d=\"M9 7 4 17h5z\"></path><path d=\"M15 7l5 10h-5z\"></path></svg>\n </button>\n <button *ngSwitchCase=\"'flipVertical'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-flip-v')\" [disabled]=\"disabled\" [attr.aria-label]=\"t.flipVertical\" [attr.title]=\"t.flipVertical\" (click)=\"flipVertical()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3 12h18\" stroke-dasharray=\"2 2.5\"></path><path d=\"M7 9 17 4v5z\"></path><path d=\"M7 15l10 5v-5z\"></path></svg>\n </button>\n <button *ngSwitchCase=\"'reset'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-reset')\" [disabled]=\"disabled\" [attr.aria-label]=\"t.resetCrop\" [attr.title]=\"t.resetCrop\" (click)=\"reset()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3 12a9 9 0 1 0 2.6-6.4\"></path><path d=\"M3 4v5h5\"></path></svg>\n </button>\n </ng-container>\n </div>\n <div *ngIf=\"toolsTemplate\" class=\"wu-imagecropper-group wu-imagecropper-group-custom\">\n <ng-container *ngTemplateOutlet=\"toolsTemplate; context: toolsContext\"></ng-container>\n </div>\n </div>\n</div>\n", styles: ["@layer wiraui.components{:is(wu-imagecropper,wu-image-cropper,image-cropper){display:block;max-width:100%;min-width:0}.wu-imagecropper{--_handle: var(--wu-imagecropper-handle-size);--_hit: .375rem;--_pad: calc(var(--_handle) / 2 + 1px);box-sizing:border-box;display:flex;flex-direction:column;height:100%;max-width:100%;min-width:0;overflow:hidden;border:var(--wu-imagecropper-border-width) solid var(--wu-border);border-radius:var(--wu-imagecropper-radius);background:var(--wu-imagecropper-bg);color:var(--wu-text)}.wu-imagecropper-viewport{position:relative;box-sizing:content-box;flex:1 1 auto;width:calc(100% - var(--_pad) * 2);min-height:0;max-height:var(--wu-imagecropper-max-height);padding:var(--_pad);overflow:hidden}.wu-imagecropper-empty .wu-imagecropper-viewport{min-height:var(--wu-imagecropper-min-height)}.wu-imagecropper-frame{position:absolute;inset:var(--_pad)}.wu-imagecropper-stage{position:absolute;top:0;left:0;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;background-color:var(--wu-card-bg);background-image:linear-gradient(45deg,var(--wu-hover-bg) 25%,transparent 25%,transparent 75%,var(--wu-hover-bg) 75%),linear-gradient(45deg,var(--wu-hover-bg) 25%,transparent 25%,transparent 75%,var(--wu-hover-bg) 75%);background-position:0 0,.5rem .5rem;background-size:1rem 1rem}.wu-imagecropper-pannable{cursor:grab}.wu-imagecropper-panning{cursor:grabbing}.wu-imagecropper-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;pointer-events:none}.wu-imagecropper-shade{position:absolute;inset:0;overflow:hidden;pointer-events:none}.wu-imagecropper-hole{position:absolute;box-shadow:0 0 0 9999px var(--wu-imagecropper-mask)}.wu-imagecropper-box{position:absolute;box-sizing:border-box;border:1px solid var(--wu-imagecropper-line);box-shadow:0 0 0 1px #0000004d;cursor:move;touch-action:none;outline:none}.wu-imagecropper-box:focus-visible{border-color:var(--wu-primary-color);outline:var(--wu-control-focus-outline);outline-offset:var(--wu-control-focus-offset);box-shadow:0 0 0 1px var(--wu-primary-color),var(--wu-control-focus-shadow)}.wu-imagecropper-round .wu-imagecropper-hole,.wu-imagecropper-round .wu-imagecropper-box,.wu-imagecropper-round .wu-imagecropper-grid{border-radius:50%}.wu-imagecropper-grid{--_line: var(--wu-imagecropper-grid-color);position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .15s ease;background-image:linear-gradient(to right,transparent calc(100% / 3 - .5px),var(--_line) 0,var(--_line) calc(100% / 3 + .5px),transparent 0,transparent calc(200% / 3 - .5px),var(--_line) 0,var(--_line) calc(200% / 3 + .5px),transparent 0),linear-gradient(to bottom,transparent calc(100% / 3 - .5px),var(--_line) 0,var(--_line) calc(100% / 3 + .5px),transparent 0,transparent calc(200% / 3 - .5px),var(--_line) 0,var(--_line) calc(200% / 3 + .5px),transparent 0)}.wu-imagecropper-dragging .wu-imagecropper-grid{opacity:1}.wu-imagecropper-edge{position:absolute}.wu-imagecropper-edge-n,.wu-imagecropper-edge-s{left:var(--_hit);right:var(--_hit);height:calc(var(--_hit) * 2);cursor:ns-resize}.wu-imagecropper-edge-n{top:calc(var(--_hit) * -1)}.wu-imagecropper-edge-s{bottom:calc(var(--_hit) * -1)}.wu-imagecropper-edge-e,.wu-imagecropper-edge-w{top:var(--_hit);bottom:var(--_hit);width:calc(var(--_hit) * 2);cursor:ew-resize}.wu-imagecropper-edge-e{right:calc(var(--_hit) * -1)}.wu-imagecropper-edge-w{left:calc(var(--_hit) * -1)}.wu-imagecropper-handle{position:absolute;z-index:1;box-sizing:border-box;width:var(--_handle);height:var(--_handle);margin:calc(var(--_handle) / -2) 0 0 calc(var(--_handle) / -2);border:1px solid var(--wu-imagecropper-handle-border);border-radius:2px;background:var(--wu-imagecropper-handle-bg);box-shadow:0 1px 2px #0000004d}.wu-imagecropper-handle:before{content:\"\";position:absolute;inset:calc(var(--_hit) * -1)}.wu-imagecropper-handle-hidden{border-color:transparent;background:transparent;box-shadow:none}.wu-imagecropper-handle-nw{top:0;left:0;cursor:nwse-resize}.wu-imagecropper-handle-n{top:0;left:50%;cursor:ns-resize}.wu-imagecropper-handle-ne{top:0;left:100%;cursor:nesw-resize}.wu-imagecropper-handle-e{top:50%;left:100%;cursor:ew-resize}.wu-imagecropper-handle-se{top:100%;left:100%;cursor:nwse-resize}.wu-imagecropper-handle-s{top:100%;left:50%;cursor:ns-resize}.wu-imagecropper-handle-sw{top:100%;left:0;cursor:nesw-resize}.wu-imagecropper-handle-w{top:50%;left:0;cursor:ew-resize}.wu-imagecropper-disabled .wu-imagecropper-box,.wu-imagecropper-disabled .wu-imagecropper-stage{cursor:default}.wu-imagecropper-status{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1rem;color:var(--wu-text-muted);text-align:center}.wu-imagecropper-status svg{width:2.5rem;height:2.5rem;opacity:.6}.wu-imagecropper-hint{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.wu-imagecropper-toolbar{display:flex;flex:none;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--wu-imagecropper-toolbar-gap) calc(var(--wu-imagecropper-toolbar-gap) * 4);padding:var(--wu-imagecropper-toolbar-padding);border-top:var(--wu-imagecropper-border-width) solid var(--wu-border);background:var(--wu-card-bg)}.wu-imagecropper-group{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--wu-imagecropper-toolbar-gap);min-width:0}.wu-imagecropper-group-zoom{flex:1 1 12rem;flex-wrap:nowrap;max-width:18rem}.wu-imagecropper-toolbar .wu-btn{flex:none}.wu-imagecropper-toolbar .wu-btn svg{display:block;width:1.125rem;height:1.125rem}.wu-imagecropper-zoom{flex:1 1 auto;width:100%;min-width:3rem;height:1.5rem;margin:0;accent-color:var(--wu-primary-color);cursor:pointer}.wu-imagecropper-zoom:focus-visible{outline:var(--wu-control-focus-outline);outline-offset:var(--wu-control-focus-offset);box-shadow:var(--wu-control-focus-shadow);border-radius:var(--wu-radius-sm)}.wu-imagecropper-zoom:disabled{opacity:var(--wu-disabled-opacity);cursor:default}@media (pointer: coarse){.wu-imagecropper{--_handle: calc(var(--wu-imagecropper-handle-size) * 1.35);--_hit: .625rem}}@media (prefers-reduced-motion: reduce){.wu-imagecropper-grid{transition:none}}}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WuImageCropper, decorators: [{
|
|
1013
|
+
type: Component,
|
|
1014
|
+
args: [{ selector: 'wu-imagecropper, wu-imageCropper, wu-image-cropper, image-cropper', standalone: true, imports: [NgIf, NgFor, NgSwitch, NgSwitchCase, NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"wu-imagecropper\"\n [class.wu-imagecropper-ready]=\"shown\"\n [class.wu-imagecropper-empty]=\"!ready\"\n [class.wu-imagecropper-loading]=\"loading\"\n [class.wu-imagecropper-failed]=\"failed\"\n [class.wu-imagecropper-disabled]=\"disabled\"\n [class.wu-imagecropper-round]=\"roundCropper\"\n [class.wu-imagecropper-dragging]=\"dragging\"\n [class]=\"styleClass || ''\"\n [style]=\"rootStyle\"\n role=\"group\"\n [attr.aria-label]=\"ariaLabel || t.imageCropper\"\n [attr.aria-busy]=\"loading || null\"\n>\n <div #viewport class=\"wu-imagecropper-viewport\">\n <div #frame class=\"wu-imagecropper-frame\">\n <div\n #stage\n class=\"wu-imagecropper-stage\"\n [class.wu-imagecropper-pannable]=\"shown && canZoomOut && !disabled\"\n [class.wu-imagecropper-panning]=\"panning\"\n [style.visibility]=\"shown ? null : 'hidden'\"\n [style.left.px]=\"stageX\"\n [style.top.px]=\"stageY\"\n [style.width.px]=\"stageW\"\n [style.height.px]=\"stageH\"\n (pointerdown)=\"pointerDown($event)\"\n >\n <canvas\n #canvas\n class=\"wu-imagecropper-canvas\"\n [attr.role]=\"imageAltText ? 'img' : null\"\n [attr.aria-label]=\"imageAltText || null\"\n [attr.aria-hidden]=\"imageAltText ? null : 'true'\"\n ></canvas>\n <div *ngIf=\"shown\" class=\"wu-imagecropper-shade\" aria-hidden=\"true\">\n <div class=\"wu-imagecropper-hole\" [style.left.px]=\"boxX\" [style.top.px]=\"boxY\" [style.width.px]=\"boxW\" [style.height.px]=\"boxH\"></div>\n </div>\n <div\n *ngIf=\"shown\"\n #box\n class=\"wu-imagecropper-box\"\n role=\"group\"\n [attr.tabindex]=\"disabled ? null : 0\"\n [attr.aria-label]=\"boxLabel\"\n [attr.aria-describedby]=\"hintId\"\n [attr.aria-disabled]=\"disabled || null\"\n [style.left.px]=\"boxX\"\n [style.top.px]=\"boxY\"\n [style.width.px]=\"boxW\"\n [style.height.px]=\"boxH\"\n (keydown)=\"boxKey($event)\"\n >\n <span class=\"wu-imagecropper-grid\" aria-hidden=\"true\"></span>\n <ng-container *ngIf=\"resizable\">\n <span *ngFor=\"let e of edges\" [class]=\"'wu-imagecropper-edge wu-imagecropper-edge-' + e\" [attr.data-handle]=\"e\" aria-hidden=\"true\"></span>\n <span\n *ngFor=\"let h of squares\"\n [class]=\"'wu-imagecropper-handle wu-imagecropper-handle-' + h + (hideResizeSquares ? ' wu-imagecropper-handle-hidden' : '')\"\n [attr.data-handle]=\"h\"\n aria-hidden=\"true\"\n ></span>\n </ng-container>\n </div>\n </div>\n </div>\n <span [id]=\"hintId\" class=\"wu-imagecropper-hint\">{{ t.cropAreaHint }}</span>\n <div *ngIf=\"!ready\" class=\"wu-imagecropper-status\" [attr.role]=\"failed && !loading ? 'alert' : null\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\"></rect>\n <circle cx=\"8.5\" cy=\"9.5\" r=\"1.5\"></circle>\n <path d=\"m21 16-5-5-9 9\"></path>\n </svg>\n <span *ngIf=\"loading\">{{ t.loading }}</span>\n <span *ngIf=\"failed && !loading\">{{ t.imageLoadFailed }}</span>\n </div>\n </div>\n\n <div\n *ngIf=\"showToolbar && ready && (toolGroups.length || toolsTemplate)\"\n class=\"wu-imagecropper-toolbar\"\n role=\"toolbar\"\n [attr.aria-label]=\"ariaLabel || t.imageCropper\"\n >\n <div *ngFor=\"let group of toolGroups\" class=\"wu-imagecropper-group\" [class.wu-imagecropper-group-zoom]=\"group.zoom\">\n <ng-container *ngFor=\"let tool of group.tools\" [ngSwitch]=\"tool\">\n <button *ngSwitchCase=\"'zoomOut'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-zoom-out')\" [disabled]=\"disabled || !canZoomOut\" [attr.aria-label]=\"t.zoomOut\" [attr.title]=\"t.zoomOut\" (click)=\"zoomOut()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\"><circle cx=\"11\" cy=\"11\" r=\"7\"></circle><path d=\"M8 11h6M20.5 20.5 16 16\"></path></svg>\n </button>\n <input\n *ngSwitchCase=\"'zoomSlider'\"\n type=\"range\"\n class=\"wu-imagecropper-zoom\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [value]=\"zoomSlider\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"t.zoom\"\n [attr.aria-valuetext]=\"zoomPercent + '%'\"\n (input)=\"zoomSliderInput($event)\"\n />\n <button *ngSwitchCase=\"'zoomIn'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-zoom-in')\" [disabled]=\"disabled || !canZoomIn\" [attr.aria-label]=\"t.zoomIn\" [attr.title]=\"t.zoomIn\" (click)=\"zoomIn()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\"><circle cx=\"11\" cy=\"11\" r=\"7\"></circle><path d=\"M8 11h6M11 8v6M20.5 20.5 16 16\"></path></svg>\n </button>\n <button *ngSwitchCase=\"'rotateLeft'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-rotate-left')\" [disabled]=\"disabled\" [attr.aria-label]=\"t.rotateLeft\" [attr.title]=\"t.rotateLeft\" (click)=\"rotateLeft()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 4v6h6\"></path><path d=\"M4 10a8 8 0 1 1 1.7 7\"></path></svg>\n </button>\n <button *ngSwitchCase=\"'rotateRight'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-rotate-right')\" [disabled]=\"disabled\" [attr.aria-label]=\"t.rotateRight\" [attr.title]=\"t.rotateRight\" (click)=\"rotateRight()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M20 4v6h-6\"></path><path d=\"M20 10A8 8 0 1 0 18.3 17\"></path></svg>\n </button>\n <button *ngSwitchCase=\"'flipHorizontal'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-flip-h')\" [disabled]=\"disabled\" [attr.aria-label]=\"t.flipHorizontal\" [attr.title]=\"t.flipHorizontal\" (click)=\"flipHorizontal()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 3v18\" stroke-dasharray=\"2 2.5\"></path><path d=\"M9 7 4 17h5z\"></path><path d=\"M15 7l5 10h-5z\"></path></svg>\n </button>\n <button *ngSwitchCase=\"'flipVertical'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-flip-v')\" [disabled]=\"disabled\" [attr.aria-label]=\"t.flipVertical\" [attr.title]=\"t.flipVertical\" (click)=\"flipVertical()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3 12h18\" stroke-dasharray=\"2 2.5\"></path><path d=\"M7 9 17 4v5z\"></path><path d=\"M7 15l10 5v-5z\"></path></svg>\n </button>\n <button *ngSwitchCase=\"'reset'\" type=\"button\" [class]=\"buttonClass('wu-imagecropper-reset')\" [disabled]=\"disabled\" [attr.aria-label]=\"t.resetCrop\" [attr.title]=\"t.resetCrop\" (click)=\"reset()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3 12a9 9 0 1 0 2.6-6.4\"></path><path d=\"M3 4v5h5\"></path></svg>\n </button>\n </ng-container>\n </div>\n <div *ngIf=\"toolsTemplate\" class=\"wu-imagecropper-group wu-imagecropper-group-custom\">\n <ng-container *ngTemplateOutlet=\"toolsTemplate; context: toolsContext\"></ng-container>\n </div>\n </div>\n</div>\n", styles: ["@layer wiraui.components{:is(wu-imagecropper,wu-image-cropper,image-cropper){display:block;max-width:100%;min-width:0}.wu-imagecropper{--_handle: var(--wu-imagecropper-handle-size);--_hit: .375rem;--_pad: calc(var(--_handle) / 2 + 1px);box-sizing:border-box;display:flex;flex-direction:column;height:100%;max-width:100%;min-width:0;overflow:hidden;border:var(--wu-imagecropper-border-width) solid var(--wu-border);border-radius:var(--wu-imagecropper-radius);background:var(--wu-imagecropper-bg);color:var(--wu-text)}.wu-imagecropper-viewport{position:relative;box-sizing:content-box;flex:1 1 auto;width:calc(100% - var(--_pad) * 2);min-height:0;max-height:var(--wu-imagecropper-max-height);padding:var(--_pad);overflow:hidden}.wu-imagecropper-empty .wu-imagecropper-viewport{min-height:var(--wu-imagecropper-min-height)}.wu-imagecropper-frame{position:absolute;inset:var(--_pad)}.wu-imagecropper-stage{position:absolute;top:0;left:0;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;background-color:var(--wu-card-bg);background-image:linear-gradient(45deg,var(--wu-hover-bg) 25%,transparent 25%,transparent 75%,var(--wu-hover-bg) 75%),linear-gradient(45deg,var(--wu-hover-bg) 25%,transparent 25%,transparent 75%,var(--wu-hover-bg) 75%);background-position:0 0,.5rem .5rem;background-size:1rem 1rem}.wu-imagecropper-pannable{cursor:grab}.wu-imagecropper-panning{cursor:grabbing}.wu-imagecropper-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;pointer-events:none}.wu-imagecropper-shade{position:absolute;inset:0;overflow:hidden;pointer-events:none}.wu-imagecropper-hole{position:absolute;box-shadow:0 0 0 9999px var(--wu-imagecropper-mask)}.wu-imagecropper-box{position:absolute;box-sizing:border-box;border:1px solid var(--wu-imagecropper-line);box-shadow:0 0 0 1px #0000004d;cursor:move;touch-action:none;outline:none}.wu-imagecropper-box:focus-visible{border-color:var(--wu-primary-color);outline:var(--wu-control-focus-outline);outline-offset:var(--wu-control-focus-offset);box-shadow:0 0 0 1px var(--wu-primary-color),var(--wu-control-focus-shadow)}.wu-imagecropper-round .wu-imagecropper-hole,.wu-imagecropper-round .wu-imagecropper-box,.wu-imagecropper-round .wu-imagecropper-grid{border-radius:50%}.wu-imagecropper-grid{--_line: var(--wu-imagecropper-grid-color);position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .15s ease;background-image:linear-gradient(to right,transparent calc(100% / 3 - .5px),var(--_line) 0,var(--_line) calc(100% / 3 + .5px),transparent 0,transparent calc(200% / 3 - .5px),var(--_line) 0,var(--_line) calc(200% / 3 + .5px),transparent 0),linear-gradient(to bottom,transparent calc(100% / 3 - .5px),var(--_line) 0,var(--_line) calc(100% / 3 + .5px),transparent 0,transparent calc(200% / 3 - .5px),var(--_line) 0,var(--_line) calc(200% / 3 + .5px),transparent 0)}.wu-imagecropper-dragging .wu-imagecropper-grid{opacity:1}.wu-imagecropper-edge{position:absolute}.wu-imagecropper-edge-n,.wu-imagecropper-edge-s{left:var(--_hit);right:var(--_hit);height:calc(var(--_hit) * 2);cursor:ns-resize}.wu-imagecropper-edge-n{top:calc(var(--_hit) * -1)}.wu-imagecropper-edge-s{bottom:calc(var(--_hit) * -1)}.wu-imagecropper-edge-e,.wu-imagecropper-edge-w{top:var(--_hit);bottom:var(--_hit);width:calc(var(--_hit) * 2);cursor:ew-resize}.wu-imagecropper-edge-e{right:calc(var(--_hit) * -1)}.wu-imagecropper-edge-w{left:calc(var(--_hit) * -1)}.wu-imagecropper-handle{position:absolute;z-index:1;box-sizing:border-box;width:var(--_handle);height:var(--_handle);margin:calc(var(--_handle) / -2) 0 0 calc(var(--_handle) / -2);border:1px solid var(--wu-imagecropper-handle-border);border-radius:2px;background:var(--wu-imagecropper-handle-bg);box-shadow:0 1px 2px #0000004d}.wu-imagecropper-handle:before{content:\"\";position:absolute;inset:calc(var(--_hit) * -1)}.wu-imagecropper-handle-hidden{border-color:transparent;background:transparent;box-shadow:none}.wu-imagecropper-handle-nw{top:0;left:0;cursor:nwse-resize}.wu-imagecropper-handle-n{top:0;left:50%;cursor:ns-resize}.wu-imagecropper-handle-ne{top:0;left:100%;cursor:nesw-resize}.wu-imagecropper-handle-e{top:50%;left:100%;cursor:ew-resize}.wu-imagecropper-handle-se{top:100%;left:100%;cursor:nwse-resize}.wu-imagecropper-handle-s{top:100%;left:50%;cursor:ns-resize}.wu-imagecropper-handle-sw{top:100%;left:0;cursor:nesw-resize}.wu-imagecropper-handle-w{top:50%;left:0;cursor:ew-resize}.wu-imagecropper-disabled .wu-imagecropper-box,.wu-imagecropper-disabled .wu-imagecropper-stage{cursor:default}.wu-imagecropper-status{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1rem;color:var(--wu-text-muted);text-align:center}.wu-imagecropper-status svg{width:2.5rem;height:2.5rem;opacity:.6}.wu-imagecropper-hint{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.wu-imagecropper-toolbar{display:flex;flex:none;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--wu-imagecropper-toolbar-gap) calc(var(--wu-imagecropper-toolbar-gap) * 4);padding:var(--wu-imagecropper-toolbar-padding);border-top:var(--wu-imagecropper-border-width) solid var(--wu-border);background:var(--wu-card-bg)}.wu-imagecropper-group{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--wu-imagecropper-toolbar-gap);min-width:0}.wu-imagecropper-group-zoom{flex:1 1 12rem;flex-wrap:nowrap;max-width:18rem}.wu-imagecropper-toolbar .wu-btn{flex:none}.wu-imagecropper-toolbar .wu-btn svg{display:block;width:1.125rem;height:1.125rem}.wu-imagecropper-zoom{flex:1 1 auto;width:100%;min-width:3rem;height:1.5rem;margin:0;accent-color:var(--wu-primary-color);cursor:pointer}.wu-imagecropper-zoom:focus-visible{outline:var(--wu-control-focus-outline);outline-offset:var(--wu-control-focus-offset);box-shadow:var(--wu-control-focus-shadow);border-radius:var(--wu-radius-sm)}.wu-imagecropper-zoom:disabled{opacity:var(--wu-disabled-opacity);cursor:default}@media (pointer: coarse){.wu-imagecropper{--_handle: calc(var(--wu-imagecropper-handle-size) * 1.35);--_hit: .625rem}}@media (prefers-reduced-motion: reduce){.wu-imagecropper-grid{transition:none}}}\n"] }]
|
|
1015
|
+
}], ctorParameters: function () { return []; }, propDecorators: { imageFile: [{
|
|
1016
|
+
type: Input
|
|
1017
|
+
}], imageChangedEvent: [{
|
|
1018
|
+
type: Input
|
|
1019
|
+
}], imageURL: [{
|
|
1020
|
+
type: Input
|
|
1021
|
+
}], imageBase64: [{
|
|
1022
|
+
type: Input
|
|
1023
|
+
}], format: [{
|
|
1024
|
+
type: Input
|
|
1025
|
+
}], imageQuality: [{
|
|
1026
|
+
type: Input
|
|
1027
|
+
}], output: [{
|
|
1028
|
+
type: Input
|
|
1029
|
+
}], resizeToWidth: [{
|
|
1030
|
+
type: Input
|
|
1031
|
+
}], resizeToHeight: [{
|
|
1032
|
+
type: Input
|
|
1033
|
+
}], onlyScaleDown: [{
|
|
1034
|
+
type: Input
|
|
1035
|
+
}], backgroundColor: [{
|
|
1036
|
+
type: Input
|
|
1037
|
+
}], autoCrop: [{
|
|
1038
|
+
type: Input
|
|
1039
|
+
}], aspectRatio: [{
|
|
1040
|
+
type: Input
|
|
1041
|
+
}], maintainAspectRatio: [{
|
|
1042
|
+
type: Input
|
|
1043
|
+
}], containWithinAspectRatio: [{
|
|
1044
|
+
type: Input
|
|
1045
|
+
}], cropperMinWidth: [{
|
|
1046
|
+
type: Input
|
|
1047
|
+
}], cropperMinHeight: [{
|
|
1048
|
+
type: Input
|
|
1049
|
+
}], cropperMaxWidth: [{
|
|
1050
|
+
type: Input
|
|
1051
|
+
}], cropperMaxHeight: [{
|
|
1052
|
+
type: Input
|
|
1053
|
+
}], cropperStaticWidth: [{
|
|
1054
|
+
type: Input
|
|
1055
|
+
}], cropperStaticHeight: [{
|
|
1056
|
+
type: Input
|
|
1057
|
+
}], roundCropper: [{
|
|
1058
|
+
type: Input
|
|
1059
|
+
}], hideResizeSquares: [{
|
|
1060
|
+
type: Input
|
|
1061
|
+
}], cropper: [{
|
|
1062
|
+
type: Input
|
|
1063
|
+
}], canvasRotation: [{
|
|
1064
|
+
type: Input
|
|
1065
|
+
}], transform: [{
|
|
1066
|
+
type: Input
|
|
1067
|
+
}], rotation: [{
|
|
1068
|
+
type: Input
|
|
1069
|
+
}], zoom: [{
|
|
1070
|
+
type: Input
|
|
1071
|
+
}], maxZoom: [{
|
|
1072
|
+
type: Input
|
|
1073
|
+
}], allowMoveImage: [{
|
|
1074
|
+
type: Input
|
|
1075
|
+
}], alignImage: [{
|
|
1076
|
+
type: Input
|
|
1077
|
+
}], showToolbar: [{
|
|
1078
|
+
type: Input
|
|
1079
|
+
}], toolbar: [{
|
|
1080
|
+
type: Input
|
|
1081
|
+
}], disabled: [{
|
|
1082
|
+
type: Input
|
|
1083
|
+
}], ariaLabel: [{
|
|
1084
|
+
type: Input
|
|
1085
|
+
}], imageAltText: [{
|
|
1086
|
+
type: Input
|
|
1087
|
+
}], cropperFrameAriaLabel: [{
|
|
1088
|
+
type: Input
|
|
1089
|
+
}], styleClass: [{
|
|
1090
|
+
type: Input
|
|
1091
|
+
}], style: [{
|
|
1092
|
+
type: Input
|
|
1093
|
+
}], initialStepSize: [{
|
|
1094
|
+
type: Input
|
|
1095
|
+
}], checkImageType: [{
|
|
1096
|
+
type: Input
|
|
1097
|
+
}], options: [{
|
|
1098
|
+
type: Input
|
|
1099
|
+
}], imageCropped: [{
|
|
1100
|
+
type: Output
|
|
1101
|
+
}], startCropImage: [{
|
|
1102
|
+
type: Output
|
|
1103
|
+
}], imageLoaded: [{
|
|
1104
|
+
type: Output
|
|
1105
|
+
}], cropperReady: [{
|
|
1106
|
+
type: Output
|
|
1107
|
+
}], loadImageFailed: [{
|
|
1108
|
+
type: Output
|
|
1109
|
+
}], cropperChange: [{
|
|
1110
|
+
type: Output
|
|
1111
|
+
}], transformChange: [{
|
|
1112
|
+
type: Output
|
|
1113
|
+
}], templates: [{
|
|
1114
|
+
type: ContentChildren,
|
|
1115
|
+
args: [WuTemplate]
|
|
1116
|
+
}], toolsRef: [{
|
|
1117
|
+
type: ContentChild,
|
|
1118
|
+
args: ['tools', { descendants: false }]
|
|
1119
|
+
}], viewportRef: [{
|
|
1120
|
+
type: ViewChild,
|
|
1121
|
+
args: ['viewport']
|
|
1122
|
+
}], frameRef: [{
|
|
1123
|
+
type: ViewChild,
|
|
1124
|
+
args: ['frame']
|
|
1125
|
+
}], stageRef: [{
|
|
1126
|
+
type: ViewChild,
|
|
1127
|
+
args: ['stage']
|
|
1128
|
+
}], canvasRef: [{
|
|
1129
|
+
type: ViewChild,
|
|
1130
|
+
args: ['canvas']
|
|
1131
|
+
}], boxRef: [{
|
|
1132
|
+
type: ViewChild,
|
|
1133
|
+
args: ['box']
|
|
1134
|
+
}] } });
|
|
1135
|
+
// ---------- reading pictures (browser only) ----------
|
|
1136
|
+
const sameSize = (a, b) => Math.abs(a.width - b.width) < 1e-6 && Math.abs(a.height - b.height) < 1e-6;
|
|
1137
|
+
/** The first file of a file input's change event (or a drop event). */
|
|
1138
|
+
function fileFrom(event) {
|
|
1139
|
+
if (!event || typeof event !== 'object')
|
|
1140
|
+
return null;
|
|
1141
|
+
const e = event;
|
|
1142
|
+
for (const el of [e.target, e.currentTarget]) {
|
|
1143
|
+
const files = el && typeof el === 'object' ? el.files : null;
|
|
1144
|
+
if (files && files.length)
|
|
1145
|
+
return files[0];
|
|
1146
|
+
}
|
|
1147
|
+
const dropped = e.dataTransfer?.files;
|
|
1148
|
+
return dropped && dropped.length ? dropped[0] : null;
|
|
1149
|
+
}
|
|
1150
|
+
async function loadSource(input, kind, doc) {
|
|
1151
|
+
let blob = null;
|
|
1152
|
+
if (typeof input !== 'string')
|
|
1153
|
+
blob = input;
|
|
1154
|
+
else if (kind === 'base64' || /^data:/i.test(input))
|
|
1155
|
+
blob = base64ToFile(input.trim());
|
|
1156
|
+
else {
|
|
1157
|
+
try {
|
|
1158
|
+
const res = await fetch(input);
|
|
1159
|
+
if (res.ok)
|
|
1160
|
+
blob = await res.blob();
|
|
1161
|
+
}
|
|
1162
|
+
catch {
|
|
1163
|
+
blob = null;
|
|
1164
|
+
}
|
|
1165
|
+
// fetch can be refused (CORS, a Content-Security-Policy): let an <img> try.
|
|
1166
|
+
if (!blob)
|
|
1167
|
+
return fromImage(await loadImage(input, doc, true), null, 1);
|
|
1168
|
+
}
|
|
1169
|
+
return decode(blob, doc);
|
|
1170
|
+
}
|
|
1171
|
+
async function decode(blob, doc) {
|
|
1172
|
+
const orientation = await orientationOf(blob);
|
|
1173
|
+
if (typeof createImageBitmap === 'function') {
|
|
1174
|
+
try {
|
|
1175
|
+
const options = { imageOrientation: 'from-image' };
|
|
1176
|
+
const bitmap = await createImageBitmap(blob, options);
|
|
1177
|
+
return upright(bitmap, bitmap.width, bitmap.height, orientation, () => bitmap.close());
|
|
1178
|
+
}
|
|
1179
|
+
catch {
|
|
1180
|
+
// An older browser without 'from-image', or a format createImageBitmap does not take (SVG): use an <img>.
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
const url = URL.createObjectURL(blob);
|
|
1184
|
+
try {
|
|
1185
|
+
return fromImage(await loadImage(url, doc, false), url, orientation, doc);
|
|
1186
|
+
}
|
|
1187
|
+
catch (e) {
|
|
1188
|
+
URL.revokeObjectURL(url);
|
|
1189
|
+
throw e;
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
/** A picture that is already upright. */
|
|
1193
|
+
function upright(image, width, height, orientation, close) {
|
|
1194
|
+
const exif = exifTransform(orientation);
|
|
1195
|
+
const swap = exif.rotate === 90 || exif.rotate === 270;
|
|
1196
|
+
return { image, width, height, rawWidth: swap ? height : width, rawHeight: swap ? width : height, exif, close };
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* From a loaded <img>. Current browsers turn JPEGs upright themselves; one that does not (no CSS image-orientation)
|
|
1200
|
+
* gets the EXIF orientation applied on a canvas.
|
|
1201
|
+
*/
|
|
1202
|
+
function fromImage(img, url, orientation, doc) {
|
|
1203
|
+
const release = () => {
|
|
1204
|
+
if (url)
|
|
1205
|
+
URL.revokeObjectURL(url);
|
|
1206
|
+
};
|
|
1207
|
+
const w = img.naturalWidth;
|
|
1208
|
+
const h = img.naturalHeight;
|
|
1209
|
+
const autoOriented = typeof CSS !== 'undefined' && typeof CSS.supports === 'function' && CSS.supports('image-orientation', 'from-image');
|
|
1210
|
+
if (orientation <= 1 || autoOriented || !doc)
|
|
1211
|
+
return upright(img, w, h, autoOriented ? orientation : 1, release);
|
|
1212
|
+
const exif = exifTransform(orientation);
|
|
1213
|
+
const o = { rotate: exif.rotate, flipH: exif.flip, flipV: false };
|
|
1214
|
+
const turned = rotatedSize(w, h, o.rotate);
|
|
1215
|
+
const k = Math.min(1, Math.sqrt(MAX_CANVAS_AREA / (turned.width * turned.height)));
|
|
1216
|
+
const canvas = doc.createElement('canvas');
|
|
1217
|
+
canvas.width = Math.max(1, Math.round(turned.width * k));
|
|
1218
|
+
canvas.height = Math.max(1, Math.round(turned.height * k));
|
|
1219
|
+
const ctx = canvas.getContext('2d');
|
|
1220
|
+
if (!ctx)
|
|
1221
|
+
return upright(img, w, h, 1, release);
|
|
1222
|
+
ctx.setTransform(k, 0, 0, k, 0, 0);
|
|
1223
|
+
const m = orientationMatrix(w, h, o, turned);
|
|
1224
|
+
ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
|
|
1225
|
+
ctx.drawImage(img, 0, 0);
|
|
1226
|
+
release();
|
|
1227
|
+
return { image: canvas, width: canvas.width, height: canvas.height, rawWidth: w, rawHeight: h, exif, close: () => undefined };
|
|
1228
|
+
}
|
|
1229
|
+
function loadImage(url, doc, cors) {
|
|
1230
|
+
return new Promise((resolve, reject) => {
|
|
1231
|
+
const img = doc.createElement('img');
|
|
1232
|
+
if (cors)
|
|
1233
|
+
img.crossOrigin = 'anonymous';
|
|
1234
|
+
img.decoding = 'async';
|
|
1235
|
+
img.onload = () => (img.naturalWidth && img.naturalHeight ? resolve(img) : reject(new Error('The image has no size.')));
|
|
1236
|
+
img.onerror = () => reject(new Error('The image could not be loaded.'));
|
|
1237
|
+
img.src = url;
|
|
1238
|
+
});
|
|
1239
|
+
}
|
|
1240
|
+
/** EXIF orientation from the first 64 KB of a JPEG (1 for anything else). */
|
|
1241
|
+
async function orientationOf(blob) {
|
|
1242
|
+
if (blob.type && !/jpe?g/i.test(blob.type))
|
|
1243
|
+
return 1;
|
|
1244
|
+
try {
|
|
1245
|
+
return readExifOrientation(await readBytes(blob.slice(0, 65536)));
|
|
1246
|
+
}
|
|
1247
|
+
catch {
|
|
1248
|
+
return 1;
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
function readBytes(blob) {
|
|
1252
|
+
return new Promise((resolve, reject) => {
|
|
1253
|
+
const reader = new FileReader();
|
|
1254
|
+
reader.onload = () => resolve(reader.result);
|
|
1255
|
+
reader.onerror = () => reject(reader.error);
|
|
1256
|
+
reader.readAsArrayBuffer(blob);
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
/** For NgModule apps. Standalone apps can import `WuImageCropper` directly. */
|
|
1261
|
+
class WuImageCropperModule {
|
|
1262
|
+
}
|
|
1263
|
+
WuImageCropperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WuImageCropperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1264
|
+
WuImageCropperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: WuImageCropperModule, imports: [WuImageCropper], exports: [WuImageCropper] });
|
|
1265
|
+
WuImageCropperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WuImageCropperModule, imports: [WuImageCropper] });
|
|
1266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WuImageCropperModule, decorators: [{
|
|
1267
|
+
type: NgModule,
|
|
1268
|
+
args: [{
|
|
1269
|
+
imports: [WuImageCropper],
|
|
1270
|
+
exports: [WuImageCropper],
|
|
1271
|
+
}]
|
|
1272
|
+
}] });
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* Generated bundle index. Do not edit.
|
|
1276
|
+
*/
|
|
1277
|
+
|
|
1278
|
+
export { WU_IMAGE_CROPPER_OPTIONS, WuImageCropper, WuImageCropperModule, provideImageCropperOptions };
|
|
1279
|
+
//# sourceMappingURL=wirabyte-ui-imagecropper.mjs.map
|