@infineon/design-system 0.0.0-stage → 41.11.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/LICENSE +21 -0
- package/dist/cem.json +15580 -0
- package/dist/cjs/animation-DvEMST7j.js +42 -0
- package/dist/cjs/dom-utils-BdvOgC2b.js +19 -0
- package/dist/cjs/icons-oFc1Jyfp.js +1334 -0
- package/dist/cjs/ifx-accordion-item.cjs.entry.js +118 -0
- package/dist/cjs/ifx-accordion.cjs.entry.js +40 -0
- package/dist/cjs/ifx-action-list-item.cjs.entry.js +238 -0
- package/dist/cjs/ifx-action-list.cjs.entry.js +30 -0
- package/dist/cjs/ifx-ai-label.cjs.entry.js +23 -0
- package/dist/cjs/ifx-alert_2.cjs.entry.js +217 -0
- package/dist/cjs/ifx-basic-table.cjs.entry.js +218 -0
- package/dist/cjs/ifx-breadcrumb-item-label.cjs.entry.js +35 -0
- package/dist/cjs/ifx-breadcrumb-item.cjs.entry.js +116 -0
- package/dist/cjs/ifx-breadcrumb.cjs.entry.js +51 -0
- package/dist/cjs/ifx-button.cjs.entry.js +156 -0
- package/dist/cjs/ifx-card-headline.cjs.entry.js +33 -0
- package/dist/cjs/ifx-card-image.cjs.entry.js +37 -0
- package/dist/cjs/ifx-card-links.cjs.entry.js +18 -0
- package/dist/cjs/ifx-card-overline.cjs.entry.js +17 -0
- package/dist/cjs/ifx-card-text.cjs.entry.js +26 -0
- package/dist/cjs/ifx-card.cjs.entry.js +77 -0
- package/dist/cjs/ifx-checkbox-group.cjs.entry.js +77 -0
- package/dist/cjs/ifx-checkbox.cjs.entry.js +255 -0
- package/dist/cjs/ifx-chip-item_2.cjs.entry.js +392 -0
- package/dist/cjs/ifx-chip.cjs.entry.js +340 -0
- package/dist/cjs/ifx-content-switcher-item.cjs.entry.js +21 -0
- package/dist/cjs/ifx-content-switcher.cjs.entry.js +188 -0
- package/dist/cjs/ifx-counter.cjs.entry.js +74 -0
- package/dist/cjs/ifx-date-picker.cjs.entry.js +203 -0
- package/dist/cjs/ifx-download.cjs.entry.js +40 -0
- package/dist/cjs/ifx-dropdown-header.cjs.entry.js +17 -0
- package/dist/cjs/ifx-dropdown-item.cjs.entry.js +68 -0
- package/dist/cjs/ifx-dropdown-menu.cjs.entry.js +71 -0
- package/dist/cjs/ifx-dropdown-separator.cjs.entry.js +17 -0
- package/dist/cjs/ifx-dropdown-trigger-button.cjs.entry.js +29 -0
- package/dist/cjs/ifx-dropdown-trigger.cjs.entry.js +19 -0
- package/dist/cjs/ifx-dropdown.cjs.entry.js +257 -0
- package/dist/cjs/ifx-error-page.cjs.entry.js +54 -0
- package/dist/cjs/ifx-file-upload.cjs.entry.js +821 -0
- package/dist/cjs/ifx-filter-accordion.cjs.entry.js +67 -0
- package/dist/cjs/ifx-filter-bar.cjs.entry.js +119 -0
- package/dist/cjs/ifx-filter-search.cjs.entry.js +62 -0
- package/dist/cjs/ifx-filter-type-group.cjs.entry.js +168 -0
- package/dist/cjs/ifx-footer-column.cjs.entry.js +18 -0
- package/dist/cjs/ifx-footer.cjs.entry.js +35 -0
- package/dist/cjs/ifx-icon-button.cjs.entry.js +106 -0
- package/dist/cjs/ifx-icon.cjs.entry.js +134 -0
- package/dist/cjs/ifx-icons-preview.cjs.entry.js +15499 -0
- package/dist/cjs/ifx-indicator.cjs.entry.js +46 -0
- package/dist/cjs/ifx-link.cjs.entry.js +125 -0
- package/dist/cjs/ifx-list-entry.cjs.entry.js +44 -0
- package/dist/cjs/ifx-list.cjs.entry.js +143 -0
- package/dist/cjs/ifx-modal.cjs.entry.js +403 -0
- package/dist/cjs/ifx-multiselect-group.cjs.entry.js +42 -0
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js +1151 -0
- package/dist/cjs/ifx-navbar-item.cjs.entry.js +438 -0
- package/dist/cjs/ifx-navbar-profile.cjs.entry.js +173 -0
- package/dist/cjs/ifx-navbar.cjs.entry.js +705 -0
- package/dist/cjs/ifx-notification.cjs.entry.js +58 -0
- package/dist/cjs/ifx-overview-table.cjs.entry.js +59 -0
- package/dist/cjs/ifx-popover.cjs.entry.js +340 -0
- package/dist/cjs/ifx-progress-bar.cjs.entry.js +46 -0
- package/dist/cjs/ifx-radio-button-group.cjs.entry.js +77 -0
- package/dist/cjs/ifx-radio-button.cjs.entry.js +148 -0
- package/dist/cjs/ifx-search-bar.cjs.entry.js +123 -0
- package/dist/cjs/ifx-search-field.cjs.entry.js +562 -0
- package/dist/cjs/ifx-segment.cjs.entry.js +46 -0
- package/dist/cjs/ifx-segmented-control.cjs.entry.js +151 -0
- package/dist/cjs/ifx-select-group.cjs.entry.js +43 -0
- package/dist/cjs/ifx-select_2.cjs.entry.js +574 -0
- package/dist/cjs/ifx-set-filter.cjs.entry.js +83 -0
- package/dist/cjs/ifx-sidebar-item.cjs.entry.js +290 -0
- package/dist/cjs/ifx-sidebar-separator.cjs.entry.js +17 -0
- package/dist/cjs/ifx-sidebar-title.cjs.entry.js +24 -0
- package/dist/cjs/ifx-sidebar.cjs.entry.js +454 -0
- package/dist/cjs/ifx-slider.cjs.entry.js +364 -0
- package/dist/cjs/ifx-spinner.cjs.entry.js +53 -0
- package/dist/cjs/ifx-status.cjs.entry.js +36 -0
- package/dist/cjs/ifx-step.cjs.entry.js +104 -0
- package/dist/cjs/ifx-stepper.cjs.entry.js +168 -0
- package/dist/cjs/ifx-switch.cjs.entry.js +190 -0
- package/dist/cjs/ifx-tab.cjs.entry.js +42 -0
- package/dist/cjs/ifx-table.cjs.entry.js +1466 -0
- package/dist/cjs/ifx-tabs.cjs.entry.js +380 -0
- package/dist/cjs/ifx-templates-ui.cjs.entry.js +58 -0
- package/dist/cjs/ifx-text-field.cjs.entry.js +131 -0
- package/dist/cjs/ifx-textarea.cjs.entry.js +132 -0
- package/dist/cjs/ifx-toast-container.cjs.entry.js +114 -0
- package/dist/cjs/ifx-toast.cjs.entry.js +193 -0
- package/dist/cjs/ifx-tooltip.cjs.entry.js +228 -0
- package/dist/cjs/ifx-tree-view-item.cjs.entry.js +404 -0
- package/dist/cjs/ifx-tree-view.cjs.entry.js +70 -0
- package/dist/cjs/index-BiOrxEib.js +3361 -0
- package/dist/cjs/index-Bp6Dd2i1.js +94 -0
- package/dist/cjs/index.cjs.js +121 -0
- package/dist/cjs/infineon-design-system-stencil.cjs.js +45 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/main.esm-Y2lKtAqX.js +56050 -0
- package/dist/cjs/popper-Dmp8OTYh.js +1792 -0
- package/dist/cjs/toast-config-D0RjnbKw.js +21 -0
- package/dist/cjs/tracking-BPjaTlNR.js +144 -0
- package/dist/cjs/url-utils-CPE59br4.js +18 -0
- package/dist/collection/collection-manifest.json +105 -0
- package/dist/collection/components/accordion/accordion.css +10 -0
- package/dist/collection/components/accordion/accordion.js +76 -0
- package/dist/collection/components/accordion/accordionItem.css +128 -0
- package/dist/collection/components/accordion/accordionItem.js +250 -0
- package/dist/collection/components/action-list/action-list-item.css +71 -0
- package/dist/collection/components/action-list/action-list-item.js +409 -0
- package/dist/collection/components/action-list/action-list.css +8 -0
- package/dist/collection/components/action-list/action-list.js +56 -0
- package/dist/collection/components/ai-label/ai-label.css +55 -0
- package/dist/collection/components/ai-label/ai-label.js +68 -0
- package/dist/collection/components/alert/alert.css +142 -0
- package/dist/collection/components/alert/alert.js +167 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item-label.css +33 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item-label.js +121 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item.css +52 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item.js +146 -0
- package/dist/collection/components/breadcrumb/breadcrumb.css +14 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +54 -0
- package/dist/collection/components/button/button.css +247 -0
- package/dist/collection/components/button/button.js +383 -0
- package/dist/collection/components/card/card-headline/card-headline.css +36 -0
- package/dist/collection/components/card/card-headline/card-headline.js +41 -0
- package/dist/collection/components/card/card-image/card-image.css +24 -0
- package/dist/collection/components/card/card-image/card-image.js +136 -0
- package/dist/collection/components/card/card-links/card-links.css +18 -0
- package/dist/collection/components/card/card-links/card-links.js +20 -0
- package/dist/collection/components/card/card-overline/card-overline.css +25 -0
- package/dist/collection/components/card/card-overline/card-overline.js +18 -0
- package/dist/collection/components/card/card-text/card-text.css +30 -0
- package/dist/collection/components/card/card-text/card-text.js +33 -0
- package/dist/collection/components/card/card.css +187 -0
- package/dist/collection/components/card/card.js +221 -0
- package/dist/collection/components/checkbox/checkbox.css +154 -0
- package/dist/collection/components/checkbox/checkbox.js +546 -0
- package/dist/collection/components/checkbox-group/checkbox-group.css +70 -0
- package/dist/collection/components/checkbox-group/checkbox-group.js +278 -0
- package/dist/collection/components/chip/chip-item/chip-item.css +39 -0
- package/dist/collection/components/chip/chip-item/chip-item.js +199 -0
- package/dist/collection/components/chip/chip.css +180 -0
- package/dist/collection/components/chip/chip.js +581 -0
- package/dist/collection/components/chip/interfaces.js +1 -0
- package/dist/collection/components/content-switcher/content-switcher-item.css +38 -0
- package/dist/collection/components/content-switcher/content-switcher-item.js +65 -0
- package/dist/collection/components/content-switcher/content-switcher.css +32 -0
- package/dist/collection/components/content-switcher/content-switcher.js +223 -0
- package/dist/collection/components/counter/counter.css +69 -0
- package/dist/collection/components/counter/counter.js +131 -0
- package/dist/collection/components/date-picker/date-picker.css +206 -0
- package/dist/collection/components/date-picker/date-picker.js +522 -0
- package/dist/collection/components/download/download.css +0 -0
- package/dist/collection/components/download/download.js +65 -0
- package/dist/collection/components/dropdown/IOpenable.js +1 -0
- package/dist/collection/components/dropdown/dropdown-header/dropdown-header.css +18 -0
- package/dist/collection/components/dropdown/dropdown-header/dropdown-header.js +19 -0
- package/dist/collection/components/dropdown/dropdown-item/dropdown-item.css +58 -0
- package/dist/collection/components/dropdown/dropdown-item/dropdown-item.js +231 -0
- package/dist/collection/components/dropdown/dropdown-menu/dropdown-menu.css +32 -0
- package/dist/collection/components/dropdown/dropdown-menu/dropdown-menu.js +177 -0
- package/dist/collection/components/dropdown/dropdown-seperator/dropdown-separator.css +5 -0
- package/dist/collection/components/dropdown/dropdown-seperator/dropdown-separator.js +19 -0
- package/dist/collection/components/dropdown/dropdown-trigger/dropdown-trigger.css +4 -0
- package/dist/collection/components/dropdown/dropdown-trigger/dropdown-trigger.js +45 -0
- package/dist/collection/components/dropdown/dropdown-trigger-button/dropdown-trigger-button.css +14 -0
- package/dist/collection/components/dropdown/dropdown-trigger-button/dropdown-trigger-button.js +155 -0
- package/dist/collection/components/dropdown/dropdown.css +3 -0
- package/dist/collection/components/dropdown/dropdown.js +519 -0
- package/dist/collection/components/error-page/error-page.css +118 -0
- package/dist/collection/components/error-page/error-page.js +155 -0
- package/dist/collection/components/file-upload/file-upload.css +209 -0
- package/dist/collection/components/file-upload/file-upload.js +1796 -0
- package/dist/collection/components/footer/footer-column.css +28 -0
- package/dist/collection/components/footer/footer-column.js +20 -0
- package/dist/collection/components/footer/footer.css +137 -0
- package/dist/collection/components/footer/footer.js +67 -0
- package/dist/collection/components/icon/figma_code_connect_icons.js +34 -0
- package/dist/collection/components/icon/icon.css +10 -0
- package/dist/collection/components/icon/icon.js +183 -0
- package/dist/collection/components/icon-button/icon-button.css +131 -0
- package/dist/collection/components/icon-button/icon-button.js +321 -0
- package/dist/collection/components/icons-preview/icons-preview.css +93 -0
- package/dist/collection/components/icons-preview/icons-preview.js +78 -0
- package/dist/collection/components/indicator/indicator.css +45 -0
- package/dist/collection/components/indicator/indicator.js +137 -0
- package/dist/collection/components/link/link.css +107 -0
- package/dist/collection/components/link/link.js +298 -0
- package/dist/collection/components/modal/modal.css +196 -0
- package/dist/collection/components/modal/modal.js +560 -0
- package/dist/collection/components/navigation/navbar/navbar-item.css +278 -0
- package/dist/collection/components/navigation/navbar/navbar-item.js +812 -0
- package/dist/collection/components/navigation/navbar/navbar-profile.js +354 -0
- package/dist/collection/components/navigation/navbar/navbar.css +417 -0
- package/dist/collection/components/navigation/navbar/navbar.js +857 -0
- package/dist/collection/components/navigation/sidebar/sidebar-item.css +201 -0
- package/dist/collection/components/navigation/sidebar/sidebar-item.js +583 -0
- package/dist/collection/components/navigation/sidebar/sidebar-seperator/sidebar-separator.css +5 -0
- package/dist/collection/components/navigation/sidebar/sidebar-seperator/sidebar-separator.js +19 -0
- package/dist/collection/components/navigation/sidebar/sidebar-title.css +25 -0
- package/dist/collection/components/navigation/sidebar/sidebar-title.js +50 -0
- package/dist/collection/components/navigation/sidebar/sidebar.css +254 -0
- package/dist/collection/components/navigation/sidebar/sidebar.js +896 -0
- package/dist/collection/components/notification/notification.css +80 -0
- package/dist/collection/components/notification/notification.js +205 -0
- package/dist/collection/components/overview-table/overview-table.css +152 -0
- package/dist/collection/components/overview-table/overview-table.js +61 -0
- package/dist/collection/components/pagination/pagination.css +190 -0
- package/dist/collection/components/pagination/pagination.js +459 -0
- package/dist/collection/components/popover/popover.css +95 -0
- package/dist/collection/components/popover/popover.js +565 -0
- package/dist/collection/components/progress-bar/progress-bar.css +38 -0
- package/dist/collection/components/progress-bar/progress-bar.js +118 -0
- package/dist/collection/components/radio-button/radio-button.css +157 -0
- package/dist/collection/components/radio-button/radio-button.js +334 -0
- package/dist/collection/components/radio-button-group/radio-button-group.css +69 -0
- package/dist/collection/components/radio-button-group/radio-button-group.js +278 -0
- package/dist/collection/components/search-bar/search-bar.css +60 -0
- package/dist/collection/components/search-bar/search-bar.js +323 -0
- package/dist/collection/components/search-field/search-field.css +235 -0
- package/dist/collection/components/search-field/search-field.js +1156 -0
- package/dist/collection/components/segmented-control/segment/segment.css +46 -0
- package/dist/collection/components/segmented-control/segment/segment.js +145 -0
- package/dist/collection/components/segmented-control/segmented-control.css +47 -0
- package/dist/collection/components/segmented-control/segmented-control.js +319 -0
- package/dist/collection/components/select/multi-select/interfaces.js +1 -0
- package/dist/collection/components/select/multi-select/multiselect-group.css +18 -0
- package/dist/collection/components/select/multi-select/multiselect-group.js +92 -0
- package/dist/collection/components/select/multi-select/multiselect-option.css +113 -0
- package/dist/collection/components/select/multi-select/multiselect-option.js +530 -0
- package/dist/collection/components/select/multi-select/multiselect.css +337 -0
- package/dist/collection/components/select/multi-select/multiselect.js +1353 -0
- package/dist/collection/components/select/single-select/select-group.css +24 -0
- package/dist/collection/components/select/single-select/select-group.js +94 -0
- package/dist/collection/components/select/single-select/select-option.css +65 -0
- package/dist/collection/components/select/single-select/select-option.js +241 -0
- package/dist/collection/components/select/single-select/select.css +213 -0
- package/dist/collection/components/select/single-select/select.js +1030 -0
- package/dist/collection/components/slider/slider.css +157 -0
- package/dist/collection/components/slider/slider.js +703 -0
- package/dist/collection/components/spinner/spinner.css +66 -0
- package/dist/collection/components/spinner/spinner.js +151 -0
- package/dist/collection/components/status/status.css +196 -0
- package/dist/collection/components/status/status.js +102 -0
- package/dist/collection/components/stepper/interfaces.js +1 -0
- package/dist/collection/components/stepper/step/step.css +189 -0
- package/dist/collection/components/stepper/step/step.js +250 -0
- package/dist/collection/components/stepper/stepper.css +58 -0
- package/dist/collection/components/stepper/stepper.js +327 -0
- package/dist/collection/components/switch/switch.css +116 -0
- package/dist/collection/components/switch/switch.js +419 -0
- package/dist/collection/components/table-advanced-version/buttonCellRenderer.js +72 -0
- package/dist/collection/components/table-advanced-version/checkboxCellRenderer.js +67 -0
- package/dist/collection/components/table-advanced-version/checkboxHeaderRenderer.js +32 -0
- package/dist/collection/components/table-advanced-version/customLoadingOverlay.js +15 -0
- package/dist/collection/components/table-advanced-version/customNoRowsOverlay.js +17 -0
- package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.css +64 -0
- package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.js +195 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.css +70 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.js +124 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.css +30 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.js +216 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.css +14 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.js +231 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/utils.js +12 -0
- package/dist/collection/components/table-advanced-version/iconButtonCellRenderer.js +69 -0
- package/dist/collection/components/table-advanced-version/interfaces.js +17 -0
- package/dist/collection/components/table-advanced-version/linkCellRenderer.js +50 -0
- package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.css +7 -0
- package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.js +134 -0
- package/dist/collection/components/table-advanced-version/list/list.css +8 -0
- package/dist/collection/components/table-advanced-version/list/list.js +255 -0
- package/dist/collection/components/table-advanced-version/set-filter/set-filter.css +1 -0
- package/dist/collection/components/table-advanced-version/set-filter/setFilter.js +207 -0
- package/dist/collection/components/table-advanced-version/statusCellRenderer.js +30 -0
- package/dist/collection/components/table-advanced-version/table.css +7362 -0
- package/dist/collection/components/table-advanced-version/table.js +1598 -0
- package/dist/collection/components/table-advanced-version/tooltipCellRenderer.js +59 -0
- package/dist/collection/components/table-basic-version/customLoadingOverlay.js +15 -0
- package/dist/collection/components/table-basic-version/customNoRowsOverlay.js +17 -0
- package/dist/collection/components/table-basic-version/interfaces.js +8 -0
- package/dist/collection/components/table-basic-version/table.css +7211 -0
- package/dist/collection/components/table-basic-version/table.js +318 -0
- package/dist/collection/components/tabs/tab.css +3 -0
- package/dist/collection/components/tabs/tab.js +240 -0
- package/dist/collection/components/tabs/tabs.css +341 -0
- package/dist/collection/components/tabs/tabs.js +606 -0
- package/dist/collection/components/templates/template/template.css +76 -0
- package/dist/collection/components/templates/template/template.js +272 -0
- package/dist/collection/components/templates/templates-ui/templates-ui.css +33 -0
- package/dist/collection/components/templates/templates-ui/templates-ui.js +75 -0
- package/dist/collection/components/text-field/text-field.css +193 -0
- package/dist/collection/components/text-field/text-field.js +514 -0
- package/dist/collection/components/textarea/textarea.css +97 -0
- package/dist/collection/components/textarea/textarea.js +485 -0
- package/dist/collection/components/toast/toast-config.js +17 -0
- package/dist/collection/components/toast/toast-container/toast-container.css +58 -0
- package/dist/collection/components/toast/toast-container/toast-container.js +280 -0
- package/dist/collection/components/toast/toast-controller.js +116 -0
- package/dist/collection/components/toast/toast.css +68 -0
- package/dist/collection/components/toast/toast.js +397 -0
- package/dist/collection/components/tooltip/tooltip.css +164 -0
- package/dist/collection/components/tooltip/tooltip.js +380 -0
- package/dist/collection/components/tree-view/tree-view-item.css +112 -0
- package/dist/collection/components/tree-view/tree-view-item.js +603 -0
- package/dist/collection/components/tree-view/tree-view.css +19 -0
- package/dist/collection/components/tree-view/tree-view.js +187 -0
- package/dist/collection/global/setup.js +5 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/shared/utils/animation.js +37 -0
- package/dist/collection/shared/utils/colorNames.js +1 -0
- package/dist/collection/shared/utils/dom-ready.js +15 -0
- package/dist/collection/shared/utils/dom-utils.js +15 -0
- package/dist/collection/shared/utils/focus-trap.js +120 -0
- package/dist/collection/shared/utils/framework-detection.js +74 -0
- package/dist/collection/shared/utils/tracking.js +60 -0
- package/dist/collection/shared/utils/url-utils.js +14 -0
- package/dist/collection/storybook/public/favicon.svg +5 -0
- package/dist/components/ifx-accordion-item.d.ts +11 -0
- package/dist/components/ifx-accordion-item.js +1 -0
- package/dist/components/ifx-accordion.d.ts +11 -0
- package/dist/components/ifx-accordion.js +1 -0
- package/dist/components/ifx-action-list-item.d.ts +11 -0
- package/dist/components/ifx-action-list-item.js +1 -0
- package/dist/components/ifx-action-list.d.ts +11 -0
- package/dist/components/ifx-action-list.js +1 -0
- package/dist/components/ifx-ai-label.d.ts +11 -0
- package/dist/components/ifx-ai-label.js +1 -0
- package/dist/components/ifx-alert.d.ts +11 -0
- package/dist/components/ifx-alert.js +1 -0
- package/dist/components/ifx-basic-table.d.ts +11 -0
- package/dist/components/ifx-basic-table.js +1 -0
- package/dist/components/ifx-breadcrumb-item-label.d.ts +11 -0
- package/dist/components/ifx-breadcrumb-item-label.js +1 -0
- package/dist/components/ifx-breadcrumb-item.d.ts +11 -0
- package/dist/components/ifx-breadcrumb-item.js +1 -0
- package/dist/components/ifx-breadcrumb.d.ts +11 -0
- package/dist/components/ifx-breadcrumb.js +1 -0
- package/dist/components/ifx-button.d.ts +11 -0
- package/dist/components/ifx-button.js +1 -0
- package/dist/components/ifx-card-headline.d.ts +11 -0
- package/dist/components/ifx-card-headline.js +1 -0
- package/dist/components/ifx-card-image.d.ts +11 -0
- package/dist/components/ifx-card-image.js +1 -0
- package/dist/components/ifx-card-links.d.ts +11 -0
- package/dist/components/ifx-card-links.js +1 -0
- package/dist/components/ifx-card-overline.d.ts +11 -0
- package/dist/components/ifx-card-overline.js +1 -0
- package/dist/components/ifx-card-text.d.ts +11 -0
- package/dist/components/ifx-card-text.js +1 -0
- package/dist/components/ifx-card.d.ts +11 -0
- package/dist/components/ifx-card.js +1 -0
- package/dist/components/ifx-checkbox-group.d.ts +11 -0
- package/dist/components/ifx-checkbox-group.js +1 -0
- package/dist/components/ifx-checkbox.d.ts +11 -0
- package/dist/components/ifx-checkbox.js +1 -0
- package/dist/components/ifx-chip-item.d.ts +11 -0
- package/dist/components/ifx-chip-item.js +1 -0
- package/dist/components/ifx-chip.d.ts +11 -0
- package/dist/components/ifx-chip.js +1 -0
- package/dist/components/ifx-content-switcher-item.d.ts +11 -0
- package/dist/components/ifx-content-switcher-item.js +1 -0
- package/dist/components/ifx-content-switcher.d.ts +11 -0
- package/dist/components/ifx-content-switcher.js +1 -0
- package/dist/components/ifx-counter.d.ts +11 -0
- package/dist/components/ifx-counter.js +1 -0
- package/dist/components/ifx-date-picker.d.ts +11 -0
- package/dist/components/ifx-date-picker.js +1 -0
- package/dist/components/ifx-download.d.ts +11 -0
- package/dist/components/ifx-download.js +1 -0
- package/dist/components/ifx-dropdown-header.d.ts +11 -0
- package/dist/components/ifx-dropdown-header.js +1 -0
- package/dist/components/ifx-dropdown-item.d.ts +11 -0
- package/dist/components/ifx-dropdown-item.js +1 -0
- package/dist/components/ifx-dropdown-menu.d.ts +11 -0
- package/dist/components/ifx-dropdown-menu.js +1 -0
- package/dist/components/ifx-dropdown-separator.d.ts +11 -0
- package/dist/components/ifx-dropdown-separator.js +1 -0
- package/dist/components/ifx-dropdown-trigger-button.d.ts +11 -0
- package/dist/components/ifx-dropdown-trigger-button.js +1 -0
- package/dist/components/ifx-dropdown-trigger.d.ts +11 -0
- package/dist/components/ifx-dropdown-trigger.js +1 -0
- package/dist/components/ifx-dropdown.d.ts +11 -0
- package/dist/components/ifx-dropdown.js +1 -0
- package/dist/components/ifx-error-page.d.ts +11 -0
- package/dist/components/ifx-error-page.js +1 -0
- package/dist/components/ifx-file-upload.d.ts +11 -0
- package/dist/components/ifx-file-upload.js +1 -0
- package/dist/components/ifx-filter-accordion.d.ts +11 -0
- package/dist/components/ifx-filter-accordion.js +1 -0
- package/dist/components/ifx-filter-bar.d.ts +11 -0
- package/dist/components/ifx-filter-bar.js +1 -0
- package/dist/components/ifx-filter-search.d.ts +11 -0
- package/dist/components/ifx-filter-search.js +1 -0
- package/dist/components/ifx-filter-type-group.d.ts +11 -0
- package/dist/components/ifx-filter-type-group.js +1 -0
- package/dist/components/ifx-footer-column.d.ts +11 -0
- package/dist/components/ifx-footer-column.js +1 -0
- package/dist/components/ifx-footer.d.ts +11 -0
- package/dist/components/ifx-footer.js +1 -0
- package/dist/components/ifx-icon-button.d.ts +11 -0
- package/dist/components/ifx-icon-button.js +1 -0
- package/dist/components/ifx-icon.d.ts +11 -0
- package/dist/components/ifx-icon.js +1 -0
- package/dist/components/ifx-icons-preview.d.ts +11 -0
- package/dist/components/ifx-icons-preview.js +1 -0
- package/dist/components/ifx-indicator.d.ts +11 -0
- package/dist/components/ifx-indicator.js +1 -0
- package/dist/components/ifx-link.d.ts +11 -0
- package/dist/components/ifx-link.js +1 -0
- package/dist/components/ifx-list-entry.d.ts +11 -0
- package/dist/components/ifx-list-entry.js +1 -0
- package/dist/components/ifx-list.d.ts +11 -0
- package/dist/components/ifx-list.js +1 -0
- package/dist/components/ifx-modal.d.ts +11 -0
- package/dist/components/ifx-modal.js +1 -0
- package/dist/components/ifx-multiselect-group.d.ts +11 -0
- package/dist/components/ifx-multiselect-group.js +1 -0
- package/dist/components/ifx-multiselect-option.d.ts +11 -0
- package/dist/components/ifx-multiselect-option.js +1 -0
- package/dist/components/ifx-multiselect.d.ts +11 -0
- package/dist/components/ifx-multiselect.js +1 -0
- package/dist/components/ifx-navbar-item.d.ts +11 -0
- package/dist/components/ifx-navbar-item.js +1 -0
- package/dist/components/ifx-navbar-profile.d.ts +11 -0
- package/dist/components/ifx-navbar-profile.js +1 -0
- package/dist/components/ifx-navbar.d.ts +11 -0
- package/dist/components/ifx-navbar.js +1 -0
- package/dist/components/ifx-notification.d.ts +11 -0
- package/dist/components/ifx-notification.js +1 -0
- package/dist/components/ifx-overview-table.d.ts +11 -0
- package/dist/components/ifx-overview-table.js +1 -0
- package/dist/components/ifx-pagination.d.ts +11 -0
- package/dist/components/ifx-pagination.js +1 -0
- package/dist/components/ifx-popover.d.ts +11 -0
- package/dist/components/ifx-popover.js +1 -0
- package/dist/components/ifx-progress-bar.d.ts +11 -0
- package/dist/components/ifx-progress-bar.js +1 -0
- package/dist/components/ifx-radio-button-group.d.ts +11 -0
- package/dist/components/ifx-radio-button-group.js +1 -0
- package/dist/components/ifx-radio-button.d.ts +11 -0
- package/dist/components/ifx-radio-button.js +1 -0
- package/dist/components/ifx-search-bar.d.ts +11 -0
- package/dist/components/ifx-search-bar.js +1 -0
- package/dist/components/ifx-search-field.d.ts +11 -0
- package/dist/components/ifx-search-field.js +1 -0
- package/dist/components/ifx-segment.d.ts +11 -0
- package/dist/components/ifx-segment.js +1 -0
- package/dist/components/ifx-segmented-control.d.ts +11 -0
- package/dist/components/ifx-segmented-control.js +1 -0
- package/dist/components/ifx-select-group.d.ts +11 -0
- package/dist/components/ifx-select-group.js +1 -0
- package/dist/components/ifx-select-option.d.ts +11 -0
- package/dist/components/ifx-select-option.js +1 -0
- package/dist/components/ifx-select.d.ts +11 -0
- package/dist/components/ifx-select.js +1 -0
- package/dist/components/ifx-set-filter.d.ts +11 -0
- package/dist/components/ifx-set-filter.js +1 -0
- package/dist/components/ifx-sidebar-item.d.ts +11 -0
- package/dist/components/ifx-sidebar-item.js +1 -0
- package/dist/components/ifx-sidebar-separator.d.ts +11 -0
- package/dist/components/ifx-sidebar-separator.js +1 -0
- package/dist/components/ifx-sidebar-title.d.ts +11 -0
- package/dist/components/ifx-sidebar-title.js +1 -0
- package/dist/components/ifx-sidebar.d.ts +11 -0
- package/dist/components/ifx-sidebar.js +1 -0
- package/dist/components/ifx-slider.d.ts +11 -0
- package/dist/components/ifx-slider.js +1 -0
- package/dist/components/ifx-spinner.d.ts +11 -0
- package/dist/components/ifx-spinner.js +1 -0
- package/dist/components/ifx-status.d.ts +11 -0
- package/dist/components/ifx-status.js +1 -0
- package/dist/components/ifx-step.d.ts +11 -0
- package/dist/components/ifx-step.js +1 -0
- package/dist/components/ifx-stepper.d.ts +11 -0
- package/dist/components/ifx-stepper.js +1 -0
- package/dist/components/ifx-switch.d.ts +11 -0
- package/dist/components/ifx-switch.js +1 -0
- package/dist/components/ifx-tab.d.ts +11 -0
- package/dist/components/ifx-tab.js +1 -0
- package/dist/components/ifx-table.d.ts +11 -0
- package/dist/components/ifx-table.js +1 -0
- package/dist/components/ifx-tabs.d.ts +11 -0
- package/dist/components/ifx-tabs.js +1 -0
- package/dist/components/ifx-template.d.ts +11 -0
- package/dist/components/ifx-template.js +1 -0
- package/dist/components/ifx-templates-ui.d.ts +11 -0
- package/dist/components/ifx-templates-ui.js +1 -0
- package/dist/components/ifx-text-field.d.ts +11 -0
- package/dist/components/ifx-text-field.js +1 -0
- package/dist/components/ifx-textarea.d.ts +11 -0
- package/dist/components/ifx-textarea.js +1 -0
- package/dist/components/ifx-toast-container.d.ts +11 -0
- package/dist/components/ifx-toast-container.js +1 -0
- package/dist/components/ifx-toast.d.ts +11 -0
- package/dist/components/ifx-toast.js +1 -0
- package/dist/components/ifx-tooltip.d.ts +11 -0
- package/dist/components/ifx-tooltip.js +1 -0
- package/dist/components/ifx-tree-view-item.d.ts +11 -0
- package/dist/components/ifx-tree-view-item.js +1 -0
- package/dist/components/ifx-tree-view.d.ts +11 -0
- package/dist/components/ifx-tree-view.js +1 -0
- package/dist/components/index.d.ts +221 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-6rWkhPoz.js +1 -0
- package/dist/components/p-94ZtGp9D.js +1 -0
- package/dist/components/p-B2BXeRbX.js +1 -0
- package/dist/components/p-B9Se0P8X.js +1 -0
- package/dist/components/p-BQusv3OP.js +1 -0
- package/dist/components/p-BT3Wl1wi.js +1 -0
- package/dist/components/p-BT_2CyMS.js +1 -0
- package/dist/components/p-BfP9ezJQ.js +1 -0
- package/dist/components/p-BfTCfPZ1.js +6 -0
- package/dist/components/p-BsM3UmwT.js +1 -0
- package/dist/components/p-BwNZsorZ.js +1 -0
- package/dist/components/p-ByHlxOiP.js +1 -0
- package/dist/components/p-By_rGGZ6.js +1 -0
- package/dist/components/p-C0ZpAymO.js +1 -0
- package/dist/components/p-C2NpYb5B.js +1 -0
- package/dist/components/p-CFIxSP2i.js +1 -0
- package/dist/components/p-CHllTWC_.js +1 -0
- package/dist/components/p-CKEkzlHL.js +1 -0
- package/dist/components/p-COoPXL_o.js +1 -0
- package/dist/components/p-CZkp3I3Z.js +1 -0
- package/dist/components/p-Cof8Iu4T.js +1 -0
- package/dist/components/p-D8rBTzjL.js +1 -0
- package/dist/components/p-DMAv4MDG.js +1 -0
- package/dist/components/p-DqacDHEO.js +1 -0
- package/dist/components/p-M9y7mTsF.js +1 -0
- package/dist/components/p-OJkXkXZS.js +1 -0
- package/dist/components/p-QgsB_-OM.js +1 -0
- package/dist/components/p-tjdx4F2u.js +1 -0
- package/dist/components/p-uQx-50k_.js +1 -0
- package/dist/docs.d.ts +480 -0
- package/dist/docs.json +21723 -0
- package/dist/esm/animation-BT3Wl1wi.js +39 -0
- package/dist/esm/dom-utils-CtINY9El.js +17 -0
- package/dist/esm/icons-ZeLzvI0y.js +1331 -0
- package/dist/esm/ifx-accordion-item.entry.js +116 -0
- package/dist/esm/ifx-accordion.entry.js +38 -0
- package/dist/esm/ifx-action-list-item.entry.js +236 -0
- package/dist/esm/ifx-action-list.entry.js +28 -0
- package/dist/esm/ifx-ai-label.entry.js +21 -0
- package/dist/esm/ifx-alert_2.entry.js +214 -0
- package/dist/esm/ifx-basic-table.entry.js +216 -0
- package/dist/esm/ifx-breadcrumb-item-label.entry.js +33 -0
- package/dist/esm/ifx-breadcrumb-item.entry.js +114 -0
- package/dist/esm/ifx-breadcrumb.entry.js +49 -0
- package/dist/esm/ifx-button.entry.js +154 -0
- package/dist/esm/ifx-card-headline.entry.js +31 -0
- package/dist/esm/ifx-card-image.entry.js +35 -0
- package/dist/esm/ifx-card-links.entry.js +16 -0
- package/dist/esm/ifx-card-overline.entry.js +15 -0
- package/dist/esm/ifx-card-text.entry.js +24 -0
- package/dist/esm/ifx-card.entry.js +75 -0
- package/dist/esm/ifx-checkbox-group.entry.js +75 -0
- package/dist/esm/ifx-checkbox.entry.js +253 -0
- package/dist/esm/ifx-chip-item_2.entry.js +389 -0
- package/dist/esm/ifx-chip.entry.js +338 -0
- package/dist/esm/ifx-content-switcher-item.entry.js +19 -0
- package/dist/esm/ifx-content-switcher.entry.js +186 -0
- package/dist/esm/ifx-counter.entry.js +72 -0
- package/dist/esm/ifx-date-picker.entry.js +201 -0
- package/dist/esm/ifx-download.entry.js +38 -0
- package/dist/esm/ifx-dropdown-header.entry.js +15 -0
- package/dist/esm/ifx-dropdown-item.entry.js +66 -0
- package/dist/esm/ifx-dropdown-menu.entry.js +69 -0
- package/dist/esm/ifx-dropdown-separator.entry.js +15 -0
- package/dist/esm/ifx-dropdown-trigger-button.entry.js +27 -0
- package/dist/esm/ifx-dropdown-trigger.entry.js +17 -0
- package/dist/esm/ifx-dropdown.entry.js +255 -0
- package/dist/esm/ifx-error-page.entry.js +52 -0
- package/dist/esm/ifx-file-upload.entry.js +819 -0
- package/dist/esm/ifx-filter-accordion.entry.js +65 -0
- package/dist/esm/ifx-filter-bar.entry.js +117 -0
- package/dist/esm/ifx-filter-search.entry.js +60 -0
- package/dist/esm/ifx-filter-type-group.entry.js +166 -0
- package/dist/esm/ifx-footer-column.entry.js +16 -0
- package/dist/esm/ifx-footer.entry.js +33 -0
- package/dist/esm/ifx-icon-button.entry.js +104 -0
- package/dist/esm/ifx-icon.entry.js +132 -0
- package/dist/esm/ifx-icons-preview.entry.js +15497 -0
- package/dist/esm/ifx-indicator.entry.js +44 -0
- package/dist/esm/ifx-link.entry.js +123 -0
- package/dist/esm/ifx-list-entry.entry.js +42 -0
- package/dist/esm/ifx-list.entry.js +141 -0
- package/dist/esm/ifx-modal.entry.js +401 -0
- package/dist/esm/ifx-multiselect-group.entry.js +40 -0
- package/dist/esm/ifx-multiselect_2.entry.js +1148 -0
- package/dist/esm/ifx-navbar-item.entry.js +436 -0
- package/dist/esm/ifx-navbar-profile.entry.js +171 -0
- package/dist/esm/ifx-navbar.entry.js +703 -0
- package/dist/esm/ifx-notification.entry.js +56 -0
- package/dist/esm/ifx-overview-table.entry.js +57 -0
- package/dist/esm/ifx-popover.entry.js +338 -0
- package/dist/esm/ifx-progress-bar.entry.js +44 -0
- package/dist/esm/ifx-radio-button-group.entry.js +75 -0
- package/dist/esm/ifx-radio-button.entry.js +146 -0
- package/dist/esm/ifx-search-bar.entry.js +121 -0
- package/dist/esm/ifx-search-field.entry.js +560 -0
- package/dist/esm/ifx-segment.entry.js +44 -0
- package/dist/esm/ifx-segmented-control.entry.js +149 -0
- package/dist/esm/ifx-select-group.entry.js +41 -0
- package/dist/esm/ifx-select_2.entry.js +571 -0
- package/dist/esm/ifx-set-filter.entry.js +81 -0
- package/dist/esm/ifx-sidebar-item.entry.js +288 -0
- package/dist/esm/ifx-sidebar-separator.entry.js +15 -0
- package/dist/esm/ifx-sidebar-title.entry.js +22 -0
- package/dist/esm/ifx-sidebar.entry.js +452 -0
- package/dist/esm/ifx-slider.entry.js +362 -0
- package/dist/esm/ifx-spinner.entry.js +51 -0
- package/dist/esm/ifx-status.entry.js +34 -0
- package/dist/esm/ifx-step.entry.js +102 -0
- package/dist/esm/ifx-stepper.entry.js +166 -0
- package/dist/esm/ifx-switch.entry.js +188 -0
- package/dist/esm/ifx-tab.entry.js +40 -0
- package/dist/esm/ifx-table.entry.js +1464 -0
- package/dist/esm/ifx-tabs.entry.js +378 -0
- package/dist/esm/ifx-templates-ui.entry.js +56 -0
- package/dist/esm/ifx-text-field.entry.js +129 -0
- package/dist/esm/ifx-textarea.entry.js +130 -0
- package/dist/esm/ifx-toast-container.entry.js +112 -0
- package/dist/esm/ifx-toast.entry.js +191 -0
- package/dist/esm/ifx-tooltip.entry.js +226 -0
- package/dist/esm/ifx-tree-view-item.entry.js +402 -0
- package/dist/esm/ifx-tree-view.entry.js +68 -0
- package/dist/esm/index-BfTCfPZ1.js +92 -0
- package/dist/esm/index-CY4s4b6R.js +3330 -0
- package/dist/esm/index.js +119 -0
- package/dist/esm/infineon-design-system-stencil.js +41 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/main.esm-ByHlxOiP.js +56045 -0
- package/dist/esm/popper-BfP9ezJQ.js +1790 -0
- package/dist/esm/toast-config-CvlFl4bk.js +19 -0
- package/dist/esm/tracking-DNHOWgWh.js +141 -0
- package/dist/esm/url-utils-QgsB_-OM.js +16 -0
- package/dist/hydrate/index.d.ts +287 -0
- package/dist/hydrate/index.js +115426 -0
- package/dist/hydrate/index.mjs +115416 -0
- package/dist/hydrate/package.json +12 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/infineon-design-system-stencil/index.esm.js +1 -0
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.css +1 -0
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -0
- package/dist/infineon-design-system-stencil/p-00e44b86.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-04b2ca48.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-056c97d1.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-068f8d94.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-080482d5.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-0824da97.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-0eb80b01.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-1bde9db6.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-1c5cdf00.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-1d282105.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-1dba3e82.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-1ee2ae36.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-200b5cf4.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-25b276e7.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-27d6189d.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-33cee615.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-387628c3.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-3d79452f.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-3d99137a.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-46025b1d.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-49abd04b.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-4b0cfd87.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-507c06f6.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-58d3465b.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-5ca1e5f9.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-5e787c60.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-622b768a.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-62c217d9.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-633f7103.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-6ad38b43.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-6bc72aa7.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-6d5608f3.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-6dbe3565.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-6feba4bd.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-7637f1a9.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-767d1120.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-7a632c59.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-7cd30e96.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-7cfaf0b0.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-7d1bce96.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-7e39ffb5.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-83ac00d0.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-83ed07c5.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-85699507.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-85cab510.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-86f8257b.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-8712ed7c.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-89ca7297.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-8a9c392b.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-8d6f90ce.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-8f7f4367.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-90055cc1.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-91f93a99.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-981a5d47.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-982379c6.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-98b1d319.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-9ed59a1b.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-BT3Wl1wi.js +1 -0
- package/dist/infineon-design-system-stencil/p-BfP9ezJQ.js +1 -0
- package/dist/infineon-design-system-stencil/p-BfTCfPZ1.js +6 -0
- package/dist/infineon-design-system-stencil/p-ByHlxOiP.js +1 -0
- package/dist/infineon-design-system-stencil/p-CY4s4b6R.js +3 -0
- package/dist/infineon-design-system-stencil/p-CtINY9El.js +1 -0
- package/dist/infineon-design-system-stencil/p-CvlFl4bk.js +1 -0
- package/dist/infineon-design-system-stencil/p-DNHOWgWh.js +1 -0
- package/dist/infineon-design-system-stencil/p-QgsB_-OM.js +1 -0
- package/dist/infineon-design-system-stencil/p-ZeLzvI0y.js +1 -0
- package/dist/infineon-design-system-stencil/p-a64b4893.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-a749b6af.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-adee38e7.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-b024ca63.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-b0db38b1.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-b52e98b3.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-b8027aac.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-bc74a63e.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-bdc53480.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-bfd5c624.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-c2955de7.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-c436d915.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-c8de164f.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-d3194d57.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-d7614c74.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-d96c1ee9.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-db3f7660.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-e3fc01c1.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-e616abd0.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-e97262eb.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-ea5f0a88.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-ec37b6a4.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-ec538561.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-ee84f6e7.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-f290a76e.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-f4e8f76a.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-f4f3916e.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-f5b65911.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-f740a48b.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-f9273ee7.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-fbdef7ac.entry.js +1 -0
- package/dist/loader/cdn.js +1 -0
- package/dist/loader/index.cjs.js +1 -0
- package/dist/loader/index.d.ts +24 -0
- package/dist/loader/index.es2017.js +1 -0
- package/dist/loader/index.js +2 -0
- package/dist/types/components/accordion/accordion.d.ts +8 -0
- package/dist/types/components/accordion/accordionItem.d.ts +31 -0
- package/dist/types/components/action-list/action-list-item.d.ts +59 -0
- package/dist/types/components/action-list/action-list.d.ts +9 -0
- package/dist/types/components/ai-label/ai-label.d.ts +7 -0
- package/dist/types/components/alert/alert.d.ts +22 -0
- package/dist/types/components/breadcrumb/breadcrumb-item-label.d.ts +14 -0
- package/dist/types/components/breadcrumb/breadcrumb-item.d.ts +25 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +6 -0
- package/dist/types/components/button/button.d.ts +41 -0
- package/dist/types/components/card/card-headline/card-headline.d.ts +7 -0
- package/dist/types/components/card/card-image/card-image.d.ts +17 -0
- package/dist/types/components/card/card-links/card-links.d.ts +4 -0
- package/dist/types/components/card/card-overline/card-overline.d.ts +3 -0
- package/dist/types/components/card/card-text/card-text.d.ts +6 -0
- package/dist/types/components/card/card.d.ts +28 -0
- package/dist/types/components/checkbox/checkbox.d.ts +88 -0
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +30 -0
- package/dist/types/components/chip/chip-item/chip-item.d.ts +23 -0
- package/dist/types/components/chip/chip.d.ts +54 -0
- package/dist/types/components/chip/interfaces.d.ts +13 -0
- package/dist/types/components/content-switcher/content-switcher-item.d.ts +7 -0
- package/dist/types/components/content-switcher/content-switcher.d.ts +74 -0
- package/dist/types/components/counter/counter.d.ts +19 -0
- package/dist/types/components/date-picker/date-picker.d.ts +83 -0
- package/dist/types/components/download/download.d.ts +5 -0
- package/dist/types/components/dropdown/IOpenable.d.ts +3 -0
- package/dist/types/components/dropdown/dropdown-header/dropdown-header.d.ts +3 -0
- package/dist/types/components/dropdown/dropdown-item/dropdown-item.d.ts +23 -0
- package/dist/types/components/dropdown/dropdown-menu/dropdown-menu.d.ts +23 -0
- package/dist/types/components/dropdown/dropdown-seperator/dropdown-separator.d.ts +3 -0
- package/dist/types/components/dropdown/dropdown-trigger/dropdown-trigger.d.ts +6 -0
- package/dist/types/components/dropdown/dropdown-trigger-button/dropdown-trigger-button.d.ts +16 -0
- package/dist/types/components/dropdown/dropdown.d.ts +55 -0
- package/dist/types/components/error-page/error-page.d.ts +15 -0
- package/dist/types/components/file-upload/file-upload.d.ts +205 -0
- package/dist/types/components/footer/footer-column.d.ts +4 -0
- package/dist/types/components/footer/footer.d.ts +11 -0
- package/dist/types/components/icon/figma_code_connect_icons.d.ts +1 -0
- package/dist/types/components/icon/icon.d.ts +31 -0
- package/dist/types/components/icon-button/icon-button.d.ts +57 -0
- package/dist/types/components/icons-preview/icons-preview.d.ts +18 -0
- package/dist/types/components/indicator/indicator.d.ts +17 -0
- package/dist/types/components/link/link.d.ts +48 -0
- package/dist/types/components/modal/modal.d.ts +97 -0
- package/dist/types/components/navigation/navbar/navbar-item.d.ts +73 -0
- package/dist/types/components/navigation/navbar/navbar-profile.d.ts +41 -0
- package/dist/types/components/navigation/navbar/navbar.d.ts +70 -0
- package/dist/types/components/navigation/sidebar/sidebar-item.d.ts +65 -0
- package/dist/types/components/navigation/sidebar/sidebar-seperator/sidebar-separator.d.ts +3 -0
- package/dist/types/components/navigation/sidebar/sidebar-title.d.ts +7 -0
- package/dist/types/components/navigation/sidebar/sidebar.d.ts +87 -0
- package/dist/types/components/notification/notification.d.ts +23 -0
- package/dist/types/components/overview-table/overview-table.d.ts +11 -0
- package/dist/types/components/pagination/pagination.d.ts +45 -0
- package/dist/types/components/popover/popover.d.ts +55 -0
- package/dist/types/components/progress-bar/progress-bar.d.ts +14 -0
- package/dist/types/components/radio-button/radio-button.d.ts +37 -0
- package/dist/types/components/radio-button-group/radio-button-group.d.ts +30 -0
- package/dist/types/components/search-bar/search-bar.d.ts +60 -0
- package/dist/types/components/search-field/search-field.d.ts +178 -0
- package/dist/types/components/segmented-control/segment/segment.d.ts +16 -0
- package/dist/types/components/segmented-control/segmented-control.d.ts +40 -0
- package/dist/types/components/select/multi-select/interfaces.d.ts +9 -0
- package/dist/types/components/select/multi-select/multiselect-group.d.ts +15 -0
- package/dist/types/components/select/multi-select/multiselect-option.d.ts +43 -0
- package/dist/types/components/select/multi-select/multiselect.d.ts +123 -0
- package/dist/types/components/select/single-select/select-group.d.ts +17 -0
- package/dist/types/components/select/single-select/select-option.d.ts +31 -0
- package/dist/types/components/select/single-select/select.d.ts +129 -0
- package/dist/types/components/slider/slider.d.ts +76 -0
- package/dist/types/components/spinner/spinner.d.ts +27 -0
- package/dist/types/components/status/status.d.ts +11 -0
- package/dist/types/components/stepper/interfaces.d.ts +7 -0
- package/dist/types/components/stepper/step/step.d.ts +24 -0
- package/dist/types/components/stepper/stepper.d.ts +35 -0
- package/dist/types/components/switch/switch.d.ts +112 -0
- package/dist/types/components/table-advanced-version/buttonCellRenderer.d.ts +15 -0
- package/dist/types/components/table-advanced-version/checkboxCellRenderer.d.ts +15 -0
- package/dist/types/components/table-advanced-version/checkboxHeaderRenderer.d.ts +14 -0
- package/dist/types/components/table-advanced-version/customLoadingOverlay.d.ts +9 -0
- package/dist/types/components/table-advanced-version/customNoRowsOverlay.d.ts +9 -0
- package/dist/types/components/table-advanced-version/filter-bar/filter-bar.d.ts +26 -0
- package/dist/types/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.d.ts +20 -0
- package/dist/types/components/table-advanced-version/filter-type-group/filter-search/filter-search.d.ts +22 -0
- package/dist/types/components/table-advanced-version/filter-type-group/filter-type-group.d.ts +29 -0
- package/dist/types/components/table-advanced-version/filter-type-group/utils.d.ts +5 -0
- package/dist/types/components/table-advanced-version/iconButtonCellRenderer.d.ts +15 -0
- package/dist/types/components/table-advanced-version/interfaces.d.ts +53 -0
- package/dist/types/components/table-advanced-version/linkCellRenderer.d.ts +12 -0
- package/dist/types/components/table-advanced-version/list/list-entry/list-entry.d.ts +11 -0
- package/dist/types/components/table-advanced-version/list/list.d.ts +38 -0
- package/dist/types/components/table-advanced-version/set-filter/setFilter.d.ts +20 -0
- package/dist/types/components/table-advanced-version/statusCellRenderer.d.ts +8 -0
- package/dist/types/components/table-advanced-version/table.d.ts +146 -0
- package/dist/types/components/table-advanced-version/tooltipCellRenderer.d.ts +12 -0
- package/dist/types/components/table-basic-version/customLoadingOverlay.d.ts +9 -0
- package/dist/types/components/table-basic-version/customNoRowsOverlay.d.ts +9 -0
- package/dist/types/components/table-basic-version/interfaces.d.ts +9 -0
- package/dist/types/components/table-basic-version/table.d.ts +34 -0
- package/dist/types/components/tabs/tab.d.ts +26 -0
- package/dist/types/components/tabs/tabs.d.ts +64 -0
- package/dist/types/components/templates/template/template.d.ts +37 -0
- package/dist/types/components/templates/templates-ui/templates-ui.d.ts +10 -0
- package/dist/types/components/text-field/text-field.d.ts +55 -0
- package/dist/types/components/textarea/textarea.d.ts +54 -0
- package/dist/types/components/toast/toast-config.d.ts +7 -0
- package/dist/types/components/toast/toast-container/toast-container.d.ts +43 -0
- package/dist/types/components/toast/toast-controller.d.ts +51 -0
- package/dist/types/components/toast/toast.d.ts +58 -0
- package/dist/types/components/tooltip/tooltip.d.ts +34 -0
- package/dist/types/components/tree-view/tree-view-item.d.ts +79 -0
- package/dist/types/components/tree-view/tree-view.d.ts +21 -0
- package/dist/types/components.d.ts +8540 -0
- package/dist/types/global/setup.d.ts +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/shared/utils/animation.d.ts +13 -0
- package/dist/types/shared/utils/colorNames.d.ts +1 -0
- package/dist/types/shared/utils/dom-ready.d.ts +1 -0
- package/dist/types/shared/utils/dom-utils.d.ts +1 -0
- package/dist/types/shared/utils/focus-trap.d.ts +33 -0
- package/dist/types/shared/utils/framework-detection.d.ts +1 -0
- package/dist/types/shared/utils/tracking.d.ts +10 -0
- package/dist/types/shared/utils/url-utils.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1879 -0
- package/package.json +193 -3
- package/readme.md +229 -0
- package/README.md +0 -3
|
@@ -0,0 +1,821 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BiOrxEib.js');
|
|
4
|
+
var domUtils = require('./dom-utils-BdvOgC2b.js');
|
|
5
|
+
var tracking = require('./tracking-BPjaTlNR.js');
|
|
6
|
+
|
|
7
|
+
const fileUploadCss = () => `:host{font-family:var(--ifx-font-family, sans-serif)}.file-upload-wrapper{display:flex;flex-direction:column}.file-upload-wrapper.disabled{pointer-events:none}.file-upload-wrapper.disabled label,.file-upload-wrapper.disabled .file-upload-info{color:#575352}.file-upload-label{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;color:#1d1d1d}.file-upload-label .required{display:inline-block;margin-left:4px}.file-upload-label .required.error{color:#cd002f}.upload-dropzone{border:1px dashed #bfbbbb;padding:40px;text-align:center;cursor:pointer;color:#1d1d1d;transition:border-color 0.3s ease;border-radius:1px;background:#ffffff}.upload-dropzone ifx-icon{color:#0a8276}.upload-dropzone:hover{border:1px dashed #8d8786}.upload-dropzone.drag-over{border:1px solid #0a8276;background:#f7f7f7}.upload-dropzone.drag-over.error{border:1px solid #0a8276}.upload-dropzone.error{border-color:#cd002f}.disabled .upload-dropzone{pointer-events:none;border-color:#bfbbbb;color:#bfbbbb}.disabled .upload-dropzone ifx-icon{color:#bfbbbb}.upload-dropzone input{display:none}.file-upload-info{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0;color:#1d1d1d;margin:0;margin-top:4px}.file-upload-status{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0.2px;margin-top:8px}.file-upload-status.file-upload-status__error{display:flex;align-items:center;color:#cd002f}.file-upload-status.file-upload-status__error ifx-icon{position:relative;top:-1px;color:#cd002f;margin-right:8px}.upload-heading{font:600 1.125rem/1.625rem "Source Sans 3";font-family:var(--ifx-font-family);margin-bottom:8px}.file-list-wrapper{margin-top:16px}.file-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:16px}.file-item{border:1px solid #bfbbbb;padding-top:12px;padding-right:16px;padding-bottom:8px;padding-left:16px;display:flex;gap:8px}.file-info{width:100%;min-width:0}.file-top-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:-8px}.file-top-row ifx-icon{flex-shrink:0}.file-name-wrapper{display:flex;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;font-weight:400;font-size:0.875rem}.file-name-base{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1;min-width:0}.file-name-ext{flex-shrink:0;margin-left:0}.file-middle-row{display:flex;align-items:center;font-size:0.75rem;line-height:1rem;flex-wrap:wrap;color:#575352}.file-middle-row .file-status{margin-left:12px}.file-middle-row .file-status ifx-icon{margin-right:8px}.file-progress-row{margin-top:4px}.file-progress-row ifx-progress-bar{width:100%}.upload-success{border-color:#0a8276}.upload-success .file-status ifx-icon{position:relative;top:1px;color:#4ca460}.upload-failed{border-color:#cd002f}.upload-failed .file-status{color:#cd002f;margin-left:0}`;
|
|
8
|
+
|
|
9
|
+
const FileUpload = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.ifxFileUploadAdd = index.createEvent(this, "ifxFileUploadAdd", 7);
|
|
13
|
+
this.ifxFileUploadRemove = index.createEvent(this, "ifxFileUploadRemove", 7);
|
|
14
|
+
this.ifxFileUploadChange = index.createEvent(this, "ifxFileUploadChange", 7);
|
|
15
|
+
this.ifxFileUploadError = index.createEvent(this, "ifxFileUploadError", 7);
|
|
16
|
+
this.ifxFileUploadInvalid = index.createEvent(this, "ifxFileUploadInvalid", 7);
|
|
17
|
+
this.ifxFileUploadStart = index.createEvent(this, "ifxFileUploadStart", 7);
|
|
18
|
+
this.ifxFileUploadComplete = index.createEvent(this, "ifxFileUploadComplete", 7);
|
|
19
|
+
this.ifxFileUploadAllComplete = index.createEvent(this, "ifxFileUploadAllComplete", 7);
|
|
20
|
+
this.ifxFileUploadAbort = index.createEvent(this, "ifxFileUploadAbort", 7);
|
|
21
|
+
this.ifxFileUploadDrop = index.createEvent(this, "ifxFileUploadDrop", 7);
|
|
22
|
+
this.ifxFileUploadClick = index.createEvent(this, "ifxFileUploadClick", 7);
|
|
23
|
+
this.ifxFileUploadMaxFilesExceeded = index.createEvent(this, "ifxFileUploadMaxFilesExceeded", 7);
|
|
24
|
+
this.ifxFileUploadValidation = index.createEvent(this, "ifxFileUploadValidation", 7);
|
|
25
|
+
this.ifxFileUploadRetry = index.createEvent(this, "ifxFileUploadRetry", 7);
|
|
26
|
+
}
|
|
27
|
+
get hostElement() { return index.getElement(this); }
|
|
28
|
+
/** Enables drag-and-drop for file uploads. */
|
|
29
|
+
dragAndDrop = false;
|
|
30
|
+
/** Wether at least one file is rewuired. */
|
|
31
|
+
required = false;
|
|
32
|
+
/** If true, the upload is disabled and not interactive. */
|
|
33
|
+
disabled = false;
|
|
34
|
+
/** Maximum file size allowed in megabytes. */
|
|
35
|
+
maxFileSizeMB = 7;
|
|
36
|
+
/** Default set of allowed file extensions (used internally). Can be extended using `additionalAllowedFileTypes`. */
|
|
37
|
+
allowedFileTypes = undefined;
|
|
38
|
+
/** Extra file types to allow in addition to the default ones. */
|
|
39
|
+
additionalAllowedFileTypes = [];
|
|
40
|
+
/** When set to true, allows any file type to be uploaded (no file type restrictions). */
|
|
41
|
+
allowAnyFileType = false;
|
|
42
|
+
/** Custom file extensions to allow (e.g., 'xml', 'asc', 'cfg'). Recommended format: without dots. Also accepts format with dots like '.xml'. Do not use wildcards like '*.xml'. */
|
|
43
|
+
allowedFileExtensions = [];
|
|
44
|
+
/** Custom function that handels file upload and progress reporting. */
|
|
45
|
+
uploadHandler;
|
|
46
|
+
_maxFiles;
|
|
47
|
+
get maxFiles() {
|
|
48
|
+
return this._maxFiles;
|
|
49
|
+
}
|
|
50
|
+
set maxFiles(value) {
|
|
51
|
+
if (typeof value === "number" && value < 1) {
|
|
52
|
+
console.warn("Invalid `maxFiles` value. Must be >= 1. Value ignored.");
|
|
53
|
+
this._maxFiles = undefined;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this._maxFiles = value;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/** Main label for the upload component. */
|
|
60
|
+
label = "Label";
|
|
61
|
+
/** Error message shown when no file is uploaded but at least one is required. */
|
|
62
|
+
labelRequiredError = "At least one file must be uploaded";
|
|
63
|
+
/** Text for the “browse files” button or link. */
|
|
64
|
+
labelBrowseFiles = "Browse files";
|
|
65
|
+
/** Text shown in the drop zone area. */
|
|
66
|
+
labelDragAndDrop = "Drag & Drop or browse files to upload";
|
|
67
|
+
/** Heading label above the list of uploaded files. */
|
|
68
|
+
labelUploadedFilesHeading = "Uploaded files";
|
|
69
|
+
/** Message shown when a file is too large ({{size}} is replaced with max size). */
|
|
70
|
+
labelFileTooLarge = "Upload failed. Max file size: {{size}}MB.";
|
|
71
|
+
/** Message shown when the file type is not allowed. */
|
|
72
|
+
labelUnsupportedFileType = "Unsupported file type.";
|
|
73
|
+
/** Status text for a successfully uploaded file. */
|
|
74
|
+
labelUploaded = "Successfully uploaded";
|
|
75
|
+
/** Generic error message shown when upload fails. */
|
|
76
|
+
labelUploadFailed = "Upload failed. Please try again.";
|
|
77
|
+
/** Template text for listing supported formats and size ({{types}} and {{size}} are replaced). */
|
|
78
|
+
labelSupportedFormatsTemplate = "Supported file formats: {{types}}. Max file size: {{size}}MB.";
|
|
79
|
+
/** Singular word used for “file” in messages. */
|
|
80
|
+
labelFileSingular = "file";
|
|
81
|
+
/** Plural word used for “files” in messages. */
|
|
82
|
+
labelFilePlural = "files";
|
|
83
|
+
/** Info text about the maximum number of files allowed ({{count}} and {{files}} are replaced). */
|
|
84
|
+
labelMaxFilesInfo = "Up to {{count}} {{files}}.";
|
|
85
|
+
/** Error message shown when the max number of files is exceeded. */
|
|
86
|
+
labelMaxFilesExceeded = "Upload limit exceeded. Only {{count}} {{files}} allowed.";
|
|
87
|
+
/** ARIA label for the “browse files” control. */
|
|
88
|
+
ariaLabelBrowseFiles = "Browse files";
|
|
89
|
+
/** ARIA label for the drop zone area. */
|
|
90
|
+
ariaLabelDropzone = "Upload area. Click to browse or drag and drop files.";
|
|
91
|
+
/** ARIA label for the hidden/native file input element. */
|
|
92
|
+
ariaLabelFileInput = "Upload file";
|
|
93
|
+
/** ARIA label for the “remove file” action. */
|
|
94
|
+
ariaLabelRemoveFile = "Remove file";
|
|
95
|
+
/** ARIA label for the “cancel upload” action. */
|
|
96
|
+
ariaLabelCancelUpload = "Cancel upload";
|
|
97
|
+
/** ARIA label for the “retry upload” action. */
|
|
98
|
+
ariaLabelRetryUpload = "Retry upload";
|
|
99
|
+
/** ARIA label describing that an upload is currently in progress. */
|
|
100
|
+
ariaLabelUploadingStatus = "Upload in progress";
|
|
101
|
+
/** ARIA label describing that upload has completed successfully. */
|
|
102
|
+
ariaLabelUploadedStatus = "Upload completed";
|
|
103
|
+
/** ARIA label describing that the upload has failed. */
|
|
104
|
+
ariaLabelUploadFailedStatus = "Upload failed";
|
|
105
|
+
showDemoStates;
|
|
106
|
+
internalId = `ifx-file-upload-${Math.random().toString(36).substr(2, 9)}`;
|
|
107
|
+
isDragOver = false;
|
|
108
|
+
files = [];
|
|
109
|
+
uploadTasks = [];
|
|
110
|
+
rejectedSizeFiles = [];
|
|
111
|
+
rejectedTypeFiles = [];
|
|
112
|
+
requiredError = false;
|
|
113
|
+
statusMessage = null;
|
|
114
|
+
/** Fired when files are added (e.g. via browse or drop). */
|
|
115
|
+
ifxFileUploadAdd;
|
|
116
|
+
/** Fired when a file is removed from the list. */
|
|
117
|
+
ifxFileUploadRemove;
|
|
118
|
+
/** Fired whenever the list of selected files changes. */
|
|
119
|
+
ifxFileUploadChange;
|
|
120
|
+
/** Fired when an upload-related error occurs. */
|
|
121
|
+
ifxFileUploadError;
|
|
122
|
+
/** Fired when a file fails validation before upload. */
|
|
123
|
+
ifxFileUploadInvalid;
|
|
124
|
+
/** Fired when upload starts for a file. */
|
|
125
|
+
ifxFileUploadStart;
|
|
126
|
+
/** Fired when a single file upload finishes successfully. */
|
|
127
|
+
ifxFileUploadComplete;
|
|
128
|
+
/** Fired when all file uploads have finished successfully. */
|
|
129
|
+
ifxFileUploadAllComplete;
|
|
130
|
+
/** Fired when an ongoing upload is aborted/cancelled. */
|
|
131
|
+
ifxFileUploadAbort;
|
|
132
|
+
/** Fired when files are dropped onto the drop zone. */
|
|
133
|
+
ifxFileUploadDrop;
|
|
134
|
+
/** Fired when the upload area is clicked (typically to open file dialog). */
|
|
135
|
+
ifxFileUploadClick;
|
|
136
|
+
/** Fired when the user tries to add more than the allowed number of files. */
|
|
137
|
+
ifxFileUploadMaxFilesExceeded;
|
|
138
|
+
/** Fired after validating the current files (valid or invalid). */
|
|
139
|
+
ifxFileUploadValidation;
|
|
140
|
+
/** Fired when the user retries uploading a file after a failure. */
|
|
141
|
+
ifxFileUploadRetry;
|
|
142
|
+
fileInputEl = null;
|
|
143
|
+
extensionToMimeMap = {
|
|
144
|
+
/**
|
|
145
|
+
* Maps file extensions to MIME types.
|
|
146
|
+
* This is only used for translating `allowedFileTypes` (extensions) into MIME types,
|
|
147
|
+
* and for labeling in the UI. It does NOT define which files are globally allowed.
|
|
148
|
+
*
|
|
149
|
+
* Some extensions can map to multiple MIME types (e.g. ZIP files may be reported
|
|
150
|
+
* as `application/zip` on most systems, but as `application/x-zip-compressed`
|
|
151
|
+
* on Windows). All listed MIME types are accepted during validation.
|
|
152
|
+
*/
|
|
153
|
+
// Images
|
|
154
|
+
jpg: "image/jpeg",
|
|
155
|
+
jpeg: "image/jpeg",
|
|
156
|
+
png: "image/png",
|
|
157
|
+
gif: "image/gif",
|
|
158
|
+
svg: "image/svg+xml",
|
|
159
|
+
webp: "image/webp",
|
|
160
|
+
// Documents
|
|
161
|
+
pdf: "application/pdf",
|
|
162
|
+
doc: "application/msword",
|
|
163
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
164
|
+
xls: "application/vnd.ms-excel",
|
|
165
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
166
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
167
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
168
|
+
tsv: "text/tab-separated-values",
|
|
169
|
+
txt: "text/plain",
|
|
170
|
+
csv: "text/csv",
|
|
171
|
+
json: "application/json",
|
|
172
|
+
// Audio/Video
|
|
173
|
+
mp3: "audio/mpeg",
|
|
174
|
+
wav: "audio/wav",
|
|
175
|
+
mp4: "video/mp4",
|
|
176
|
+
mov: "video/quicktime",
|
|
177
|
+
webm: "video/webm",
|
|
178
|
+
// Archive / Code
|
|
179
|
+
zip: ["application/zip", "application/x-zip-compressed"],
|
|
180
|
+
rar: "application/vnd.rar",
|
|
181
|
+
tar: "application/x-tar",
|
|
182
|
+
gz: "application/gzip",
|
|
183
|
+
// Sonstiges
|
|
184
|
+
xml: "application/xml",
|
|
185
|
+
html: "text/html",
|
|
186
|
+
css: "text/css",
|
|
187
|
+
js: "application/javascript",
|
|
188
|
+
};
|
|
189
|
+
validateRequired() {
|
|
190
|
+
if (this.required && this.files.length === 0) {
|
|
191
|
+
this.requiredError = true;
|
|
192
|
+
if (this.statusMessage?.text !== this.labelRequiredError) {
|
|
193
|
+
this.statusMessage = {
|
|
194
|
+
type: "error",
|
|
195
|
+
text: this.labelRequiredError,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
this.ifxFileUploadValidation.emit({ valid: false });
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
this.requiredError = false;
|
|
202
|
+
if (this.statusMessage?.text === this.labelRequiredError) {
|
|
203
|
+
this.statusMessage = null;
|
|
204
|
+
}
|
|
205
|
+
this.ifxFileUploadValidation.emit({ valid: true });
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
pluralize(count) {
|
|
209
|
+
// If allowAnyFileType is true, use generic terms
|
|
210
|
+
if (this.allowAnyFileType) {
|
|
211
|
+
return count === 1 ? "file" : "files";
|
|
212
|
+
}
|
|
213
|
+
return count === 1 ? this.labelFileSingular : this.labelFilePlural;
|
|
214
|
+
}
|
|
215
|
+
getNormalizedFileTypes() {
|
|
216
|
+
// If allowedFileTypes is not set and allowedFileExtensions is set, return empty array
|
|
217
|
+
if (!this.allowedFileTypes &&
|
|
218
|
+
this.allowedFileExtensions &&
|
|
219
|
+
this.getNormalizedFileExtensions().length > 0) {
|
|
220
|
+
return [];
|
|
221
|
+
}
|
|
222
|
+
// If allowedFileTypes is not set and no allowedFileExtensions, use defaults
|
|
223
|
+
if (!this.allowedFileTypes) {
|
|
224
|
+
return [
|
|
225
|
+
"jpg",
|
|
226
|
+
"jpeg",
|
|
227
|
+
"png",
|
|
228
|
+
"pdf",
|
|
229
|
+
"xls",
|
|
230
|
+
"xlsx",
|
|
231
|
+
"tsv",
|
|
232
|
+
"mov",
|
|
233
|
+
"mp3",
|
|
234
|
+
"mp4",
|
|
235
|
+
];
|
|
236
|
+
}
|
|
237
|
+
if (Array.isArray(this.allowedFileTypes)) {
|
|
238
|
+
return this.allowedFileTypes;
|
|
239
|
+
}
|
|
240
|
+
try {
|
|
241
|
+
return JSON.parse(this.allowedFileTypes);
|
|
242
|
+
}
|
|
243
|
+
catch {
|
|
244
|
+
return this.allowedFileTypes.split(",").map((t) => t.trim());
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
getNormalizedFileExtensions() {
|
|
248
|
+
if (!this.allowedFileExtensions)
|
|
249
|
+
return [];
|
|
250
|
+
if (Array.isArray(this.allowedFileExtensions)) {
|
|
251
|
+
return this.allowedFileExtensions;
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
return JSON.parse(this.allowedFileExtensions);
|
|
255
|
+
}
|
|
256
|
+
catch {
|
|
257
|
+
return this.allowedFileExtensions.split(",").map((t) => t.trim());
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Enhanced file type validation that supports:
|
|
262
|
+
* - allowAnyFileType flag for unrestricted uploads (overrides all restrictions)
|
|
263
|
+
* - allowedFileTypes (predefined extensions mapped to MIME types) - if not set and allowedFileExtensions is set, ignored
|
|
264
|
+
* - additionalAllowedFileTypes (MIME types)
|
|
265
|
+
* - allowedFileExtensions (custom extensions) - if only this is set, only these extensions are allowed
|
|
266
|
+
*/
|
|
267
|
+
isFileTypeAllowed(file) {
|
|
268
|
+
// If allowAnyFileType is true, accept all files (overrides all restrictions)
|
|
269
|
+
if (this.allowAnyFileType) {
|
|
270
|
+
return true;
|
|
271
|
+
}
|
|
272
|
+
const fileExtension = this.getFileExtension(file.name);
|
|
273
|
+
// Check against allowedFileTypes (predefined extensions)
|
|
274
|
+
const normalizedTypes = this.getNormalizedFileTypes();
|
|
275
|
+
const allowedMimes = normalizedTypes
|
|
276
|
+
.flatMap((ext) => {
|
|
277
|
+
const mapped = this.extensionToMimeMap[ext.toLowerCase()];
|
|
278
|
+
if (!mapped)
|
|
279
|
+
return [];
|
|
280
|
+
return Array.isArray(mapped) ? mapped : [mapped];
|
|
281
|
+
})
|
|
282
|
+
.filter(Boolean);
|
|
283
|
+
if (allowedMimes.includes(file.type)) {
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
if (fileExtension &&
|
|
287
|
+
normalizedTypes.some((ext) => ext.replace(/^\./, "").toLowerCase() === fileExtension)) {
|
|
288
|
+
return true;
|
|
289
|
+
}
|
|
290
|
+
// Check against additionalAllowedFileTypes (MIME types)
|
|
291
|
+
const additionalMimeTypes = this.getAdditionalMimeTypes();
|
|
292
|
+
if (additionalMimeTypes.includes(file.type)) {
|
|
293
|
+
return true;
|
|
294
|
+
}
|
|
295
|
+
// Check against allowedFileExtensions (custom extensions)
|
|
296
|
+
const customExtensions = this.getNormalizedFileExtensions();
|
|
297
|
+
if (customExtensions.length > 0 && fileExtension) {
|
|
298
|
+
for (const ext of customExtensions) {
|
|
299
|
+
const normalizedExt = ext.startsWith(".")
|
|
300
|
+
? ext.substring(1).toLowerCase()
|
|
301
|
+
: ext.toLowerCase();
|
|
302
|
+
if (fileExtension === normalizedExt) {
|
|
303
|
+
return true;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Extracts file extension from filename (without dot)
|
|
311
|
+
*/
|
|
312
|
+
getFileExtension(filename) {
|
|
313
|
+
const lastDotIndex = filename.lastIndexOf(".");
|
|
314
|
+
if (lastDotIndex === -1 || lastDotIndex === filename.length - 1) {
|
|
315
|
+
return null;
|
|
316
|
+
}
|
|
317
|
+
return filename.substring(lastDotIndex + 1).toLowerCase();
|
|
318
|
+
}
|
|
319
|
+
getLabelFromMimeType(mime) {
|
|
320
|
+
for (const [ext, knownMime] of Object.entries(this.extensionToMimeMap)) {
|
|
321
|
+
if ((Array.isArray(knownMime) && knownMime.includes(mime)) ||
|
|
322
|
+
knownMime === mime) {
|
|
323
|
+
return ext.toUpperCase();
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
return mime; // fallback: show raw MIME
|
|
327
|
+
}
|
|
328
|
+
handleFileChange(event) {
|
|
329
|
+
const input = event.target;
|
|
330
|
+
if (!input.files)
|
|
331
|
+
return;
|
|
332
|
+
this.processFiles(input.files);
|
|
333
|
+
}
|
|
334
|
+
handleDrop(event) {
|
|
335
|
+
if (this.disabled)
|
|
336
|
+
return;
|
|
337
|
+
event.preventDefault();
|
|
338
|
+
event.stopPropagation();
|
|
339
|
+
this.isDragOver = false;
|
|
340
|
+
if (event.dataTransfer?.files) {
|
|
341
|
+
const droppedFiles = Array.from(event.dataTransfer.files);
|
|
342
|
+
const acceptedFiles = [];
|
|
343
|
+
const rejectedFiles = [];
|
|
344
|
+
droppedFiles.forEach((file) => {
|
|
345
|
+
const isValidType = this.isFileTypeAllowed(file);
|
|
346
|
+
const isValidSize = file.size <= this.maxFileSizeMB * 1024 * 1024;
|
|
347
|
+
if (isValidType && isValidSize)
|
|
348
|
+
acceptedFiles.push(file);
|
|
349
|
+
else
|
|
350
|
+
rejectedFiles.push(file);
|
|
351
|
+
});
|
|
352
|
+
this.ifxFileUploadDrop.emit({
|
|
353
|
+
droppedFiles,
|
|
354
|
+
acceptedFiles,
|
|
355
|
+
rejectedFiles,
|
|
356
|
+
});
|
|
357
|
+
this.processFiles(event.dataTransfer.files);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
handleDragOver(event) {
|
|
361
|
+
if (this.disabled)
|
|
362
|
+
return;
|
|
363
|
+
event.preventDefault();
|
|
364
|
+
this.isDragOver = true;
|
|
365
|
+
}
|
|
366
|
+
handleDragLeave(event) {
|
|
367
|
+
if (this.disabled)
|
|
368
|
+
return;
|
|
369
|
+
event.preventDefault();
|
|
370
|
+
this.isDragOver = false;
|
|
371
|
+
}
|
|
372
|
+
processFiles(fileList) {
|
|
373
|
+
const selectedFiles = Array.from(fileList);
|
|
374
|
+
const validFiles = [];
|
|
375
|
+
const rejectedSize = [];
|
|
376
|
+
const rejectedType = [];
|
|
377
|
+
selectedFiles.forEach((file) => {
|
|
378
|
+
const isValidType = this.isFileTypeAllowed(file);
|
|
379
|
+
const isValidSize = file.size <= this.maxFileSizeMB * 1024 * 1024;
|
|
380
|
+
const isDuplicate = this.files.some((existing) => existing.name === file.name && existing.size === file.size);
|
|
381
|
+
if (isDuplicate) {
|
|
382
|
+
this.ifxFileUploadInvalid.emit({ file, reason: "duplicate" });
|
|
383
|
+
this.ifxFileUploadError.emit({
|
|
384
|
+
file,
|
|
385
|
+
errorType: "duplicate",
|
|
386
|
+
message: `File "${file.name}" is already added`,
|
|
387
|
+
reason: "duplicate",
|
|
388
|
+
});
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
if (isValidType && isValidSize) {
|
|
392
|
+
validFiles.push(file);
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
if (!isValidType) {
|
|
396
|
+
rejectedType.push(file.name);
|
|
397
|
+
this.ifxFileUploadInvalid.emit({ file, reason: "invalid-type" });
|
|
398
|
+
}
|
|
399
|
+
if (!isValidSize) {
|
|
400
|
+
rejectedSize.push(file.name);
|
|
401
|
+
this.ifxFileUploadInvalid.emit({ file, reason: "invalid-size" });
|
|
402
|
+
}
|
|
403
|
+
this.ifxFileUploadError.emit({
|
|
404
|
+
file,
|
|
405
|
+
errorType: !isValidType ? "invalid-type" : "file-too-large",
|
|
406
|
+
message: "Invalid file rejected",
|
|
407
|
+
reason: !isValidType ? "unsupported-type" : "file-too-large",
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
this.rejectedSizeFiles = [...this.rejectedSizeFiles, ...rejectedSize];
|
|
412
|
+
this.rejectedTypeFiles = [...this.rejectedTypeFiles, ...rejectedType];
|
|
413
|
+
if (this.maxFiles &&
|
|
414
|
+
this.files.length + validFiles.length > this.maxFiles) {
|
|
415
|
+
const availableSlots = this.maxFiles - this.files.length;
|
|
416
|
+
const limitedFiles = validFiles.slice(0, Math.max(availableSlots, 0));
|
|
417
|
+
const overflowFiles = validFiles.slice(availableSlots);
|
|
418
|
+
this.files = [...this.files, ...limitedFiles];
|
|
419
|
+
limitedFiles.forEach((file) => this.startUpload(file));
|
|
420
|
+
if (limitedFiles.length > 0) {
|
|
421
|
+
this.ifxFileUploadAdd.emit({
|
|
422
|
+
addedFiles: limitedFiles,
|
|
423
|
+
files: this.files,
|
|
424
|
+
});
|
|
425
|
+
this.ifxFileUploadChange.emit({ files: this.files });
|
|
426
|
+
}
|
|
427
|
+
overflowFiles.forEach((file) => {
|
|
428
|
+
this.ifxFileUploadInvalid.emit({ file, reason: "too-many-files" });
|
|
429
|
+
this.ifxFileUploadError.emit({
|
|
430
|
+
file,
|
|
431
|
+
errorType: "too-many-files",
|
|
432
|
+
message: `Upload limit exceeded. Max ${this.maxFiles} files allowed.`,
|
|
433
|
+
reason: "too-many-files",
|
|
434
|
+
});
|
|
435
|
+
});
|
|
436
|
+
if (overflowFiles.length > 0) {
|
|
437
|
+
this.statusMessage = {
|
|
438
|
+
type: "error",
|
|
439
|
+
text: this.labelMaxFilesExceeded
|
|
440
|
+
.replace("{{count}}", this.maxFiles.toString())
|
|
441
|
+
.replace("{{files}}", this.pluralize(this.maxFiles)),
|
|
442
|
+
};
|
|
443
|
+
this.ifxFileUploadMaxFilesExceeded.emit({
|
|
444
|
+
maxFiles: this.maxFiles,
|
|
445
|
+
attempted: this.files.length + validFiles.length,
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
validFiles.forEach((file) => this.startUpload(file));
|
|
451
|
+
this.files = [...this.files, ...validFiles];
|
|
452
|
+
if (validFiles.length > 0) {
|
|
453
|
+
this.ifxFileUploadAdd.emit({ addedFiles: validFiles, files: this.files });
|
|
454
|
+
this.ifxFileUploadChange.emit({ files: this.files });
|
|
455
|
+
}
|
|
456
|
+
this.validateRequired();
|
|
457
|
+
}
|
|
458
|
+
retryUpload(file) {
|
|
459
|
+
const taskIndex = this.uploadTasks.findIndex((t) => t.file.name === file.name);
|
|
460
|
+
if (taskIndex !== -1) {
|
|
461
|
+
this.uploadTasks.splice(taskIndex, 1);
|
|
462
|
+
this.uploadTasks = [...this.uploadTasks];
|
|
463
|
+
}
|
|
464
|
+
this.ifxFileUploadRetry.emit({ file });
|
|
465
|
+
this.startUpload(file);
|
|
466
|
+
}
|
|
467
|
+
checkAndEmitAllComplete() {
|
|
468
|
+
if (this.uploadTasks.every((t) => t.completed || t.error)) {
|
|
469
|
+
const hasSuccessfulUploads = this.uploadTasks.some((t) => t.completed && !t.error);
|
|
470
|
+
if (hasSuccessfulUploads) {
|
|
471
|
+
const successfulFiles = this.uploadTasks
|
|
472
|
+
.filter((t) => t.completed && !t.error)
|
|
473
|
+
.map((t) => t.file);
|
|
474
|
+
this.ifxFileUploadAllComplete.emit({ files: successfulFiles });
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
resetFileInput() {
|
|
479
|
+
if (this.fileInputEl) {
|
|
480
|
+
this.fileInputEl.value = "";
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
updateTaskProgress(file, progress) {
|
|
484
|
+
const task = this.uploadTasks.find((t) => t.file === file);
|
|
485
|
+
if (task) {
|
|
486
|
+
const newProgress = Math.max(task.progress, Math.min(100, progress));
|
|
487
|
+
if (newProgress !== task.progress) {
|
|
488
|
+
task.progress = newProgress;
|
|
489
|
+
this.uploadTasks = [...this.uploadTasks];
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
startUpload(file) {
|
|
494
|
+
this.ifxFileUploadStart.emit({ file });
|
|
495
|
+
const task = {
|
|
496
|
+
file,
|
|
497
|
+
progress: 3, // Start with initial progress for better UX
|
|
498
|
+
intervalId: null,
|
|
499
|
+
completed: false,
|
|
500
|
+
};
|
|
501
|
+
this.uploadTasks = [...this.uploadTasks, task];
|
|
502
|
+
if (this.uploadHandler) {
|
|
503
|
+
this.uploadHandler(file, (percent) => {
|
|
504
|
+
this.updateTaskProgress(file, percent);
|
|
505
|
+
})
|
|
506
|
+
.then(() => {
|
|
507
|
+
task.progress = 100;
|
|
508
|
+
task.completed = true;
|
|
509
|
+
this.uploadTasks = [...this.uploadTasks];
|
|
510
|
+
this.ifxFileUploadComplete.emit({ file });
|
|
511
|
+
this.ifxFileUploadChange.emit({ files: this.files });
|
|
512
|
+
this.checkAndEmitAllComplete();
|
|
513
|
+
})
|
|
514
|
+
.catch(() => {
|
|
515
|
+
task.error = true;
|
|
516
|
+
this.uploadTasks = [...this.uploadTasks];
|
|
517
|
+
this.ifxFileUploadError.emit({
|
|
518
|
+
file,
|
|
519
|
+
errorType: "upload-failed",
|
|
520
|
+
message: "Upload handler rejected file",
|
|
521
|
+
reason: "custom",
|
|
522
|
+
});
|
|
523
|
+
this.checkAndEmitAllComplete();
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
527
|
+
const totalSize = file.size;
|
|
528
|
+
const fakeUploadSpeed = 100000;
|
|
529
|
+
let uploaded = 0;
|
|
530
|
+
task.intervalId = window.setInterval(() => {
|
|
531
|
+
uploaded += fakeUploadSpeed / 5;
|
|
532
|
+
const progress = Math.min(100, Math.round((uploaded / totalSize) * 100));
|
|
533
|
+
this.updateTaskProgress(file, progress);
|
|
534
|
+
if (progress >= 100) {
|
|
535
|
+
clearInterval(task.intervalId);
|
|
536
|
+
task.completed = true;
|
|
537
|
+
task.intervalId = null;
|
|
538
|
+
this.uploadTasks = [...this.uploadTasks];
|
|
539
|
+
this.ifxFileUploadComplete.emit({ file });
|
|
540
|
+
this.ifxFileUploadChange.emit({ files: this.files });
|
|
541
|
+
this.checkAndEmitAllComplete();
|
|
542
|
+
}
|
|
543
|
+
}, 200);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
cancelUpload(file) {
|
|
547
|
+
const taskIndex = this.uploadTasks.findIndex((t) => t.file.name === file.name);
|
|
548
|
+
if (taskIndex !== -1) {
|
|
549
|
+
const task = this.uploadTasks[taskIndex];
|
|
550
|
+
if (task?.intervalId !== null) {
|
|
551
|
+
clearInterval(task.intervalId);
|
|
552
|
+
}
|
|
553
|
+
this.uploadTasks = this.uploadTasks.filter((_, i) => i !== taskIndex);
|
|
554
|
+
}
|
|
555
|
+
this.files = this.files.filter((f) => f.name !== file.name);
|
|
556
|
+
this.ifxFileUploadAbort.emit({ file });
|
|
557
|
+
this.ifxFileUploadChange.emit({ files: this.files });
|
|
558
|
+
this.resetFileInput();
|
|
559
|
+
this.validateRequired();
|
|
560
|
+
}
|
|
561
|
+
removeFile(file) {
|
|
562
|
+
this.uploadTasks = this.uploadTasks.filter((task) => task.file.name !== file.name);
|
|
563
|
+
this.files = this.files.filter((f) => f.name !== file.name);
|
|
564
|
+
this.ifxFileUploadRemove.emit({ removedFile: file, files: this.files });
|
|
565
|
+
this.ifxFileUploadChange.emit({ files: this.files });
|
|
566
|
+
this.validateRequired();
|
|
567
|
+
this.resetFileInput();
|
|
568
|
+
if (this.maxFiles &&
|
|
569
|
+
this.files.length < this.maxFiles &&
|
|
570
|
+
this.statusMessage?.text !== this.labelRequiredError) {
|
|
571
|
+
this.statusMessage = null;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
clearRejectedFile(fileName, type) {
|
|
575
|
+
if (type === "size") {
|
|
576
|
+
this.rejectedSizeFiles = this.rejectedSizeFiles.filter((f) => f !== fileName);
|
|
577
|
+
}
|
|
578
|
+
else {
|
|
579
|
+
this.rejectedTypeFiles = this.rejectedTypeFiles.filter((f) => f !== fileName);
|
|
580
|
+
}
|
|
581
|
+
this.resetFileInput();
|
|
582
|
+
if (this.maxFiles && this.files.length < this.maxFiles) {
|
|
583
|
+
this.statusMessage = null;
|
|
584
|
+
}
|
|
585
|
+
this.validateRequired();
|
|
586
|
+
}
|
|
587
|
+
splitFileNameParts(file) {
|
|
588
|
+
const name = file.name;
|
|
589
|
+
const dotIndex = name.lastIndexOf(".");
|
|
590
|
+
if (dotIndex === -1)
|
|
591
|
+
return { base: name, ext: "" };
|
|
592
|
+
return {
|
|
593
|
+
base: name.substring(0, dotIndex),
|
|
594
|
+
ext: name.substring(dotIndex),
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
getFileIcon(file) {
|
|
598
|
+
const extension = file.name.split(".").pop()?.toLowerCase();
|
|
599
|
+
switch (extension) {
|
|
600
|
+
case "pdf":
|
|
601
|
+
return "file-pdf-16";
|
|
602
|
+
case "jpg":
|
|
603
|
+
case "jpeg":
|
|
604
|
+
return "file-jpg-16";
|
|
605
|
+
case "png":
|
|
606
|
+
return "file-png-16";
|
|
607
|
+
case "mov":
|
|
608
|
+
return "file-mov-16";
|
|
609
|
+
case "mp3":
|
|
610
|
+
return "file-mp3-16";
|
|
611
|
+
case "mp4":
|
|
612
|
+
return "file-mp4-16";
|
|
613
|
+
default:
|
|
614
|
+
return "file-16";
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
formatSize(bytes) {
|
|
618
|
+
if (bytes >= 1024 * 1024 * 1024) {
|
|
619
|
+
return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;
|
|
620
|
+
}
|
|
621
|
+
else if (bytes >= 1024 * 1024) {
|
|
622
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
623
|
+
}
|
|
624
|
+
else if (bytes >= 1024) {
|
|
625
|
+
return `${(bytes / 1024).toFixed(0)} KB`;
|
|
626
|
+
}
|
|
627
|
+
else {
|
|
628
|
+
return `${bytes} B`;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
getAcceptAttribute() {
|
|
632
|
+
// If allowAnyFileType is true, don't restrict the input
|
|
633
|
+
if (this.allowAnyFileType) {
|
|
634
|
+
return "";
|
|
635
|
+
}
|
|
636
|
+
const acceptValues = [];
|
|
637
|
+
// Add extensions from allowedFileTypes
|
|
638
|
+
const extensionTypes = this.getNormalizedFileTypes().map((ext) => "." + ext.toLowerCase());
|
|
639
|
+
acceptValues.push(...extensionTypes);
|
|
640
|
+
// Add MIME types from additionalAllowedFileTypes
|
|
641
|
+
const mimeTypes = this.getAdditionalMimeTypes();
|
|
642
|
+
acceptValues.push(...mimeTypes);
|
|
643
|
+
// Add custom file extensions
|
|
644
|
+
const customExtensions = this.getNormalizedFileExtensions();
|
|
645
|
+
customExtensions.forEach((ext) => {
|
|
646
|
+
const normalizedExt = ext.startsWith(".") ? ext : "." + ext;
|
|
647
|
+
acceptValues.push(normalizedExt);
|
|
648
|
+
});
|
|
649
|
+
return acceptValues.join(",");
|
|
650
|
+
}
|
|
651
|
+
getFormattedProgressText(task) {
|
|
652
|
+
const uploadedSize = Math.round((task.progress / 100) * task.file.size);
|
|
653
|
+
const uploadedText = this.formatSize(uploadedSize);
|
|
654
|
+
const totalText = this.formatSize(task.file.size);
|
|
655
|
+
return `${uploadedText} / ${totalText} uploaded`;
|
|
656
|
+
}
|
|
657
|
+
getAdditionalMimeTypes() {
|
|
658
|
+
if (!this.additionalAllowedFileTypes)
|
|
659
|
+
return [];
|
|
660
|
+
if (Array.isArray(this.additionalAllowedFileTypes))
|
|
661
|
+
return this.additionalAllowedFileTypes;
|
|
662
|
+
return this.additionalAllowedFileTypes.split(",").map((t) => t.trim());
|
|
663
|
+
}
|
|
664
|
+
getSupportedFileText() {
|
|
665
|
+
if (this.allowAnyFileType) {
|
|
666
|
+
let text = `All file types allowed. Max file size: ${this.maxFileSizeMB}MB.`;
|
|
667
|
+
if (this.labelMaxFilesInfo && this.maxFiles) {
|
|
668
|
+
const fileWord = this.pluralize(this.maxFiles);
|
|
669
|
+
const maxFilesText = this.labelMaxFilesInfo
|
|
670
|
+
.replace("{{count}}", this.maxFiles.toString())
|
|
671
|
+
.replace("{{files}}", fileWord);
|
|
672
|
+
text += ` ${maxFilesText}`;
|
|
673
|
+
}
|
|
674
|
+
return text;
|
|
675
|
+
}
|
|
676
|
+
const allTypes = [];
|
|
677
|
+
// Add extensions from allowedFileTypes
|
|
678
|
+
const extensions = this.getNormalizedFileTypes().map((ext) => ext.toUpperCase());
|
|
679
|
+
allTypes.push(...extensions);
|
|
680
|
+
// Add MIME types from additionalAllowedFileTypes
|
|
681
|
+
const mimeTypes = this.getAdditionalMimeTypes().map((mime) => this.getLabelFromMimeType(mime));
|
|
682
|
+
allTypes.push(...mimeTypes);
|
|
683
|
+
// Add custom file extensions
|
|
684
|
+
const customExtensions = this.getNormalizedFileExtensions().map((ext) => {
|
|
685
|
+
const cleanExt = ext.startsWith(".") ? ext.substring(1) : ext;
|
|
686
|
+
return cleanExt.toUpperCase();
|
|
687
|
+
});
|
|
688
|
+
allTypes.push(...customExtensions);
|
|
689
|
+
// Deduplicate labels (e.g. `application/zip` and `application/x-zip-compressed`
|
|
690
|
+
// both map to "ZIP") while preserving order.
|
|
691
|
+
const typesLabel = [...new Set(allTypes)].join(", ");
|
|
692
|
+
let text = this.labelSupportedFormatsTemplate
|
|
693
|
+
.replace("{{types}}", typesLabel)
|
|
694
|
+
.replace("{{size}}", this.maxFileSizeMB.toString());
|
|
695
|
+
if (this.labelMaxFilesInfo && this.maxFiles) {
|
|
696
|
+
const fileWord = this.pluralize(this.maxFiles);
|
|
697
|
+
const maxFilesText = this.labelMaxFilesInfo
|
|
698
|
+
.replace("{{count}}", this.maxFiles.toString())
|
|
699
|
+
.replace("{{files}}", fileWord);
|
|
700
|
+
text += ` ${maxFilesText}`;
|
|
701
|
+
}
|
|
702
|
+
return text;
|
|
703
|
+
}
|
|
704
|
+
getFormattedFileTooLargeText() {
|
|
705
|
+
return this.labelFileTooLarge.replace("{{size}}", this.maxFileSizeMB.toString());
|
|
706
|
+
}
|
|
707
|
+
renderStatusMessage() {
|
|
708
|
+
if (!this.statusMessage)
|
|
709
|
+
return null;
|
|
710
|
+
return (index.h("div", { class: `file-upload-status file-upload-status__${this.statusMessage.type}` }, this.statusMessage.type === "error" && (index.h("ifx-icon", { icon: "c-warning-16" })), this.statusMessage.text));
|
|
711
|
+
}
|
|
712
|
+
isInputDisabled() {
|
|
713
|
+
return (this.disabled ||
|
|
714
|
+
(this.maxFiles !== undefined && this.files.length >= this.maxFiles));
|
|
715
|
+
}
|
|
716
|
+
async componentDidLoad() {
|
|
717
|
+
if (!domUtils.isNestedInIfxComponent(this.hostElement)) {
|
|
718
|
+
const framework = tracking.detectFramework();
|
|
719
|
+
tracking.trackComponent("ifx-file-upload", await framework);
|
|
720
|
+
}
|
|
721
|
+
if (this.hostElement.hasAttribute("show-demo-states")) {
|
|
722
|
+
this.showDemoStates = true;
|
|
723
|
+
}
|
|
724
|
+
if (this.showDemoStates) {
|
|
725
|
+
this.injectDemoState();
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
/** Storybook Demo */
|
|
729
|
+
async injectDemoState() {
|
|
730
|
+
const dummyContent = new Array(50000).fill("a").join(""); // ~50 KB
|
|
731
|
+
const bigContent = dummyContent + dummyContent; // ~100 KB
|
|
732
|
+
const uploading = new File([dummyContent], "Image.jpg", {
|
|
733
|
+
type: "image/jpeg",
|
|
734
|
+
}); // ~50 KB
|
|
735
|
+
const uploaded = new File([bigContent], "File.pdf", {
|
|
736
|
+
type: "application/pdf",
|
|
737
|
+
}); // ~100 KB
|
|
738
|
+
const failed = new File([dummyContent], "Text.docx", {
|
|
739
|
+
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
740
|
+
}); // ~50 KB
|
|
741
|
+
const tooLarge = new File([bigContent + bigContent + bigContent], "Video.mp4", { type: "video/mp4" }); // ~300 KB
|
|
742
|
+
const unsupported = new File(["demo"], "Script.exe", {
|
|
743
|
+
type: "application/x-msdownload",
|
|
744
|
+
}); // very small
|
|
745
|
+
this.files = [uploaded, uploading, failed];
|
|
746
|
+
this.uploadTasks = [
|
|
747
|
+
{ file: uploaded, progress: 100, intervalId: null, completed: true },
|
|
748
|
+
{ file: uploading, progress: 40, intervalId: null, completed: false },
|
|
749
|
+
{
|
|
750
|
+
file: failed,
|
|
751
|
+
progress: 80,
|
|
752
|
+
intervalId: null,
|
|
753
|
+
completed: false,
|
|
754
|
+
error: true,
|
|
755
|
+
},
|
|
756
|
+
];
|
|
757
|
+
this.rejectedSizeFiles = [tooLarge.name];
|
|
758
|
+
this.rejectedTypeFiles = [unsupported.name];
|
|
759
|
+
}
|
|
760
|
+
/** Storybook Demo */
|
|
761
|
+
async triggerDemoValidation() {
|
|
762
|
+
this.validateRequired();
|
|
763
|
+
}
|
|
764
|
+
render() {
|
|
765
|
+
return (index.h("div", { key: 'dca54a990d8e7ceab7d967ef5d668a32fe73bd1d', class: {
|
|
766
|
+
"file-upload-wrapper": true,
|
|
767
|
+
disabled: this.disabled,
|
|
768
|
+
} }, this.label && (index.h("label", { key: '13024e8c1893aa0d7140c3c7401a22426afd5135', class: "file-upload-label", htmlFor: this.internalId }, this.label, this.required && (index.h("span", { key: 'e0bdc1a2ec35cd2f3bf3808a7d0d9c8999827a11', class: `required ${this.requiredError ? "error" : ""}` }, "*")))), this.dragAndDrop
|
|
769
|
+
? this.renderDragAndDropArea()
|
|
770
|
+
: this.renderUploadArea(), (this.files.length > 0 ||
|
|
771
|
+
this.rejectedSizeFiles.length > 0 ||
|
|
772
|
+
this.rejectedTypeFiles.length > 0) && (index.h("div", { key: '3fa499f4dec6a05ab50eb0890156f74857d0e05c', class: "file-list-wrapper" }, index.h("div", { key: '3dd79b686a52f964d75dd323027d8862d0ea4013', class: "upload-heading" }, this.labelUploadedFilesHeading), index.h("ul", { key: '47b913174f13cf93a28d5686d4efee5d68784d85', class: "file-list" }, this.rejectedSizeFiles.map((fileName) => (index.h("li", { class: "file-item upload-failed", key: `rejected-size-${fileName}` }, index.h("div", { class: "file-icon" }, index.h("ifx-icon", { icon: "file-16" })), index.h("div", { class: "file-info" }, index.h("div", { class: "file-top-row" }, index.h("span", { class: "file-name-wrapper" }, index.h("span", { class: "file-name-base" }, this.splitFileNameParts({ name: fileName })
|
|
773
|
+
.base), index.h("span", { class: "file-name-ext" }, this.splitFileNameParts({ name: fileName })
|
|
774
|
+
.ext)), index.h("div", { class: "file-actions" }, index.h("ifx-icon-button", { shape: "square", variant: "tertiary", icon: "delete-forever-16", size: "s", "aria-label": this.ariaLabelRemoveFile, onClick: () => this.clearRejectedFile(fileName, "size") }))), index.h("div", { class: "file-middle-row" }, index.h("span", { class: "file-status", "aria-label": this.labelFileTooLarge.replace("{{size}}", this.maxFileSizeMB.toString()) }, this.getFormattedFileTooLargeText())))))), this.rejectedTypeFiles.map((fileName) => (index.h("li", { class: "file-item upload-failed", key: `rejected-type-${fileName}` }, index.h("div", { class: "file-icon" }, index.h("ifx-icon", { icon: "file-16" })), index.h("div", { class: "file-info" }, index.h("div", { class: "file-top-row" }, index.h("span", { class: "file-name-wrapper" }, index.h("span", { class: "file-name-base" }, this.splitFileNameParts({ name: fileName })
|
|
775
|
+
.base), index.h("span", { class: "file-name-ext" }, this.splitFileNameParts({ name: fileName })
|
|
776
|
+
.ext)), index.h("div", { class: "file-actions" }, index.h("ifx-icon-button", { shape: "square", variant: "tertiary", icon: "delete-forever-16", size: "s", "aria-label": this.ariaLabelRemoveFile, onClick: () => this.clearRejectedFile(fileName, "type") }))), index.h("div", { class: "file-middle-row" }, index.h("span", { class: "file-status", "aria-label": this.labelUnsupportedFileType }, this.labelUnsupportedFileType)))))), this.files.map((file) => {
|
|
777
|
+
const task = this.uploadTasks.find((t) => t.file.name === file.name);
|
|
778
|
+
const progress = task?.progress ?? 100;
|
|
779
|
+
const isUploading = task && !task.completed;
|
|
780
|
+
const isError = task?.error === true;
|
|
781
|
+
const itemClass = isError
|
|
782
|
+
? "file-item upload-failed"
|
|
783
|
+
: isUploading
|
|
784
|
+
? "file-item uploading"
|
|
785
|
+
: "file-item upload-success";
|
|
786
|
+
const uniqueKey = `${file.name}-${file.size}`;
|
|
787
|
+
const { base, ext } = this.splitFileNameParts(file);
|
|
788
|
+
return (index.h("li", { class: itemClass, key: uniqueKey }, index.h("div", { class: "file-icon" }, index.h("ifx-icon", { icon: this.getFileIcon(file) })), index.h("div", { class: "file-info" }, index.h("div", { class: "file-top-row" }, index.h("span", { class: "file-name-wrapper" }, index.h("span", { class: "file-name-base" }, base), index.h("span", { class: "file-name-ext" }, ext)), index.h("div", { class: "file-actions" }, index.h("ifx-icon-button", { shape: "square", variant: "tertiary", icon: "refresh-16", size: "s", "aria-label": this.ariaLabelRetryUpload, onClick: () => this.retryUpload(file), style: {
|
|
789
|
+
display: isError ? "inline-flex" : "none",
|
|
790
|
+
} }), index.h("ifx-icon-button", { shape: "square", variant: "tertiary", icon: "cross-16", size: "s", "aria-label": this.ariaLabelCancelUpload, onClick: () => this.cancelUpload(file), style: {
|
|
791
|
+
display: isUploading ? "inline-flex" : "none",
|
|
792
|
+
} }), index.h("ifx-icon-button", { shape: "square", variant: "tertiary", icon: "delete-forever-16", size: "s", "aria-label": this.ariaLabelRemoveFile, onClick: () => this.removeFile(file), style: {
|
|
793
|
+
display: !isUploading ? "inline-flex" : "none",
|
|
794
|
+
} }))), index.h("div", { class: "file-middle-row" }, isUploading && task && !task.error && (index.h("span", { class: "file-uploading", "aria-label": this.ariaLabelUploadingStatus }, this.getFormattedProgressText(task))), !isUploading && !isError && (index.h("span", null, index.h("span", { class: "file-size" }, this.formatSize(file.size)), index.h("span", { class: "file-status", "aria-label": this.ariaLabelUploadedStatus }, index.h("ifx-icon", { icon: "check-16" }), this.labelUploaded))), isError && (index.h("span", { class: "file-status", "aria-label": this.ariaLabelUploadFailedStatus }, this.labelUploadFailed))), isUploading && task && !task.error && (index.h("div", { class: "file-progress-row" }, index.h("ifx-progress-bar", { size: "s", value: progress, "show-label": "true" }))))));
|
|
795
|
+
}))))));
|
|
796
|
+
}
|
|
797
|
+
renderUploadArea() {
|
|
798
|
+
const handleInputRef = (el) => {
|
|
799
|
+
this.fileInputEl = el;
|
|
800
|
+
};
|
|
801
|
+
return (index.h("div", { class: { "upload-button": true } }, index.h("ifx-button", { variant: "secondary", onClick: () => this.fileInputEl?.click(), disabled: this.isInputDisabled(), "aria-label": this.ariaLabelBrowseFiles }, index.h("ifx-icon", { icon: "upload-16" }), this.labelBrowseFiles), index.h("input", { id: this.internalId, ref: handleInputRef, type: "file", accept: this.getAcceptAttribute(), multiple: true, onChange: (e) => this.handleFileChange(e), style: { display: "none" }, disabled: this.isInputDisabled(), "aria-label": this.ariaLabelFileInput }), index.h("p", { class: "file-upload-info" }, this.getSupportedFileText()), this.renderStatusMessage()));
|
|
802
|
+
}
|
|
803
|
+
renderDragAndDropArea() {
|
|
804
|
+
const handleInputRef = (el) => {
|
|
805
|
+
this.fileInputEl = el;
|
|
806
|
+
};
|
|
807
|
+
const triggerInputClick = () => {
|
|
808
|
+
if (this.fileInputEl) {
|
|
809
|
+
this.fileInputEl.click();
|
|
810
|
+
}
|
|
811
|
+
};
|
|
812
|
+
return (index.h("div", { class: { disabled: this.isInputDisabled() } }, index.h("div", { class: {
|
|
813
|
+
"upload-dropzone": true,
|
|
814
|
+
"drag-over": this.isDragOver,
|
|
815
|
+
error: this.requiredError,
|
|
816
|
+
}, onClick: triggerInputClick, onDragOver: (e) => this.handleDragOver(e), onDragLeave: (e) => this.handleDragLeave(e), onDrop: (e) => this.handleDrop(e), role: "button", tabIndex: 0, "aria-label": this.ariaLabelDropzone }, index.h("ifx-icon", { icon: "upload-16", class: "custom-icon" }), index.h("p", null, this.labelDragAndDrop), index.h("p", { class: "file-upload-info" }, this.getSupportedFileText()), index.h("div", { style: { height: "0px", overflow: "hidden" } }, index.h("input", { id: this.internalId, ref: handleInputRef, type: "file", accept: this.getAcceptAttribute(), multiple: true, onChange: (e) => this.handleFileChange(e), disabled: this.isInputDisabled(), "aria-label": this.ariaLabelFileInput }))), this.renderStatusMessage()));
|
|
817
|
+
}
|
|
818
|
+
};
|
|
819
|
+
FileUpload.style = fileUploadCss();
|
|
820
|
+
|
|
821
|
+
exports.ifx_file_upload = FileUpload;
|