@ebrains/components 1.3.0 → 1.4.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/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/{eds-avatar_28.cjs.entry.js → eds-avatar_29.cjs.entry.js} +172 -53
- package/dist/cjs/index-88c8039f.js +2 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input/eds-input.js +62 -2
- package/dist/collection/components/eds-input-field/eds-input-field.js +100 -26
- package/dist/collection/components/eds-input-field/eds-input-field.stories.js +19 -1
- package/dist/collection/components/eds-table/eds-table.js +7 -12
- package/dist/collection/components/eds-toast/eds-toast.js +20 -1
- package/dist/collection/shared-ui/eds-form/eds-form.js +20 -14
- package/dist/collection/utils/eds-form/formValidators.js +1 -1
- package/dist/collection/utils/eds-form/individualValidator.js +15 -1
- package/dist/collection/utils/eds-form/validateInput.js +1 -1
- package/dist/components/components.esm.js +1 -1
- package/dist/components/eds-form.js +37 -17
- package/dist/components/eds-input-field2.js +48 -22
- package/dist/components/eds-input2.js +14 -2
- package/dist/components/eds-table2.js +7 -12
- package/dist/components/eds-toast2.js +4 -2
- package/dist/components/p-b998223d.entry.js +1 -0
- package/dist/esm/components.js +1 -1
- package/dist/esm/{eds-avatar_28.entry.js → eds-avatar_29.entry.js} +172 -54
- package/dist/esm/index-fdb33359.js +2 -6
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +109 -54
- package/dist/hydrate/index.mjs +109 -54
- package/dist/stencil.config.js +7 -1
- package/dist/types/components/eds-input-elements/eds-input/eds-input.d.ts +3 -0
- package/dist/types/components/eds-input-field/eds-input-field.d.ts +8 -2
- package/dist/types/components/eds-input-field/eds-input-field.stories.d.ts +12 -0
- package/dist/types/components/eds-toast/eds-toast.d.ts +5 -0
- package/dist/types/components.d.ts +50 -4
- package/dist/types/utils/eds-form/individualValidator.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/eds-toast.cjs.entry.js +0 -77
- package/dist/components/p-326d9e55.entry.js +0 -1
- package/dist/components/p-4ffdf8ac.entry.js +0 -1
- package/dist/esm/eds-toast.entry.js +0 -73
package/dist/esm/components.js
CHANGED
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy(JSON.parse("[[\"eds-avatar_28\",[[1,\"eds-form\",{\"name\":[1],\"setFormUrl\":[4,\"set-form-url\"],\"formBtn\":[4,\"form-btn\"],\"formBtnLabel\":[1,\"form-btn-label\"],\"errorMessage\":[1,\"error-message\"],\"fields\":[1],\"initData\":[16],\"values\":[32],\"isSubmitting\":[32],\"hasError\":[32],\"errors\":[32],\"parsedFields\":[32],\"setData\":[64],\"getData\":[64]},null,{\"fields\":[\"parseFields\"]}],[1,\"eds-fullscreen-menu\",{\"links\":[1],\"menuLinks\":[1,\"menu-links\"],\"homeUrl\":[1,\"home-url\"],\"inverseHeader\":[4,\"inverse-header\"],\"isMenuOpen\":[32]},[[16,\"toggleheadermenu\",\"handleToggleMenu\"]]],[1,\"eds-user\",{\"user\":[1025]}],[1,\"eds-header\",{\"homeUrl\":[513,\"home-url\"],\"links\":[1],\"headerVariant\":[513,\"header-variant\"],\"menuEnabled\":[4,\"menu-enabled\"],\"isMenuOpen\":[32],\"isUserMenuOpen\":[32],\"isAuthenticated\":[32]},[[16,\"authStatusChanged\",\"onAuthStatusChanged\"]]],[1,\"eds-steps-v2\",{\"steps\":[1],\"type\":[1],\"imageSrc\":[1,\"image-src\"],\"imageWidth\":[2,\"image-width\"],\"bg\":[4],\"message\":[1],\"activeStep\":[32]},null,{\"activeStep\":[\"activeStepChanged\"]}],[1,\"eds-modal\",{\"heading\":[1,\"title\"],\"truncate\":[2],\"position\":[1],\"inverseHeader\":[4,\"inverse-header\"],\"isOpen\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64]},[[0,\"eds-modal-open\",\"handleGlobalOpen\"],[0,\"eds-modal-close\",\"handleGlobalClose\"],[8,\"keydown\",\"handleKeyDown\"]]],[1,\"eds-tabs\",{\"identifier\":[1,\"id\"],\"navAriaLabel\":[1,\"nav-aria-label\"],\"tabs\":[1],\"parsedTabs\":[32],\"activeIndex\":[32]},null,{\"tabs\":[\"parseTabs\"]}],[1,\"eds-footer\",{\"social\":[4],\"enableScrollTop\":[4,\"enable-scroll-top\"],\"fundedBy\":[1,\"funded-by\"],\"rightsReserved\":[1,\"rights-reserved\"],\"cookiesPreferences\":[1,\"cookies-preferences\"],\"enableCookiesSettings\":[4,\"enable-cookies-settings\"],\"backToTopAriaLabel\":[1,\"back-to-top-aria-label\"],\"showMatomoNotice\":[32]}],[1,\"eds-dropdown\",{\"icon\":[1],\"label\":[1],\"rounded\":[4],\"ariaLabel\":[1,\"aria-label\"],\"asNav\":[4,\"as-nav\"],\"dropdownPos\":[1,\"dropdown-pos\"],\"dropdownOffset\":[4,\"dropdown-offset\"],\"intent\":[1],\"isOpen\":[32],\"focusIndex\":[32]},[[8,\"click\",\"handleWindowClick\"],[8,\"keydown\",\"handleKeyDown\"]]],[1,\"eds-steps\",{\"steps\":[1],\"type\":[1],\"activeStep\":[32]},null,{\"activeStep\":[\"activeStepChanged\"]}],[1,\"eds-social-networks\",{\"heading\":[1,\"title\"]}],[1,\"eds-table\",{\"data\":[1,\"table-data\"],\"endpoint\":[1],\"config\":[1],\"rowsPerPage\":[2,\"rows-per-page\"],\"paginationEnabled\":[4,\"pagination-enabled\"],\"searchEnabled\":[4,\"search-enabled\"],\"hostWidth\":[1,\"host-width\"],\"columnSize\":[1,\"column-size\"],\"actions\":[1],\"actionTemplate\":[16],\"parsedActions\":[32],\"dataColumns\":[32],\"tbData\":[32],\"columns\":[32],\"currentPage\":[32],\"parsedConfig\":[32],\"totalRows\":[32],\"searchQuery\":[32],\"containerWidth\":[32]},null,{\"data\":[\"handleDataChange\",\"parseData\"],\"config\":[\"handleConfigChange\"],\"actions\":[\"handleActionsChange\"]}],[1,\"eds-pagination\",{\"currentPage\":[2,\"current-page\"],\"lastPage\":[2,\"last-page\"],\"perPage\":[2,\"per-page\"],\"total\":[2],\"url\":[1],\"mode\":[1],\"prevLabel\":[1,\"prev-label\"],\"nextLabel\":[1,\"next-label\"],\"prevUrl\":[1,\"prev-url\"],\"nextUrl\":[1,\"next-url\"],\"links\":[32]},null,{\"currentPage\":[\"onPageOrLastPageChange\"],\"lastPage\":[\"onPageOrLastPageChange\"]}],[1,\"eds-block-break\",{\"inverse\":[4]}],[1,\"eds-input-field\",{\"name\":[1],\"inputId\":[1,\"input-id\"],\"placeholder\":[1],\"disabled\":[4],\"required\":[4],\"label\":[1],\"hint\":[1],\"icon\":[1],\"link\":[16],\"message\":[1],\"error\":[4],\"checked\":[4],\"errorMessage\":[1,\"error-message\"],\"value\":[8],\"maxLength\":[2,\"max-length\"],\"options\":[1],\"type\":[1],\"onChangeNative\":[16],\"onInput\":[16],\"exposeValueEvents\":[4,\"expose-value-events\"]}],[1,\"eds-avatar\",{\"firstName\":[1,\"first-name\"],\"lastName\":[1,\"last-name\"],\"picture\":[1],\"initials\":[1],\"color\":[1]}],[0,\"eds-input\",{\"name\":[1],\"inputId\":[1,\"input-id\"],\"placeholder\":[1],\"disabled\":[4],\"hasMessage\":[4,\"has-message\"],\"error\":[4],\"checked\":[4],\"type\":[1],\"required\":[4],\"value\":[8],\"icon\":[1],\"maxLength\":[2,\"max-length\"],\"options\":[16],\"extraClass\":[1,\"extra-class\"],\"innerVal\":[32],\"maxLengthReached\":[32]},null,{\"value\":[\"onValueChanged\"]}],[1,\"eds-input-footer\",{\"name\":[1],\"errorMessage\":[1,\"error-message\"],\"message\":[1],\"error\":[4],\"link\":[16]}],[0,\"eds-input-search\",{\"name\":[1],\"inputId\":[1,\"input-id\"],\"placeholder\":[1],\"value\":[1],\"disabled\":[4],\"required\":[4],\"decorate\":[1],\"label\":[1],\"getInputElement\":[64]}],[0,\"eds-input-select\",{\"inputId\":[1,\"input-id\"],\"name\":[1],\"placeholder\":[1],\"disabled\":[4],\"hasMessage\":[4,\"has-message\"],\"error\":[4],\"required\":[4],\"options\":[16],\"value\":[8]}],[1,\"eds-input-label\",{\"label\":[1],\"name\":[1],\"required\":[4],\"disabled\":[4]}],[0,\"eds-input-range\",{\"name\":[1],\"inputId\":[1,\"input-id\"],\"disabled\":[4],\"required\":[4],\"min\":[2],\"max\":[2],\"step\":[2],\"value\":[2],\"sliderVal\":[32],\"getInputElement\":[64]},null,{\"value\":[\"onValueChange\"]}],[1,\"eds-tag\",{\"label\":[1],\"intent\":[1],\"size\":[1]}],[1,\"eds-logo\",{\"href\":[1],\"orientation\":[1],\"type\":[1],\"label\":[1]}],[1,\"eds-img\",{\"src\":[1],\"alt\":[1],\"width\":[2],\"height\":[2],\"srcset\":[1],\"sizes\":[1],\"formats\":[16],\"lazyload\":[4],\"withBg\":[4,\"with-bg\"],\"loaded\":[32],\"showBg\":[32]}],[1,\"eds-link\",{\"label\":[1],\"intent\":[1],\"icon\":[1],\"iconPos\":[1,\"icon-pos\"],\"iconSmall\":[4,\"icon-small\"],\"size\":[1],\"external\":[4],\"current\":[4],\"download\":[4],\"url\":[1],\"ariaLabel\":[1,\"aria-label\"],\"disabled\":[4],\"hideLabelOnSmallScreen\":[4,\"hide-label-on-small-screen\"],\"extraClass\":[1,\"extra-class\"]},[[0,\"parentContext\",\"handleParentContext\"]]],[1,\"eds-button\",{\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"elementType\":[1,\"element-type\"],\"intent\":[1],\"loading\":[4],\"disabled\":[4],\"pill\":[4],\"icon\":[1],\"size\":[1],\"iconPos\":[1,\"icon-pos\"],\"iconSmall\":[4,\"icon-small\"],\"extraClass\":[1,\"extra-class\"],\"triggerClick\":[16]},[[0,\"parentContext\",\"handleParentContext\"]]],[0,\"eds-icon-wrapper\",{\"icon\":[1],\"class\":[1],\"IconComponent\":[32]},null,{\"icon\":[\"iconChanged\"]}]]],[\"eds-trl\",[[0,\"eds-trl\",{\"applications\":[1]}]]],[\"logo-space\",[[1,\"logo-space\"]]],[\"svg-repository\",[[1,\"svg-repository\"]]],[\"docs-palettes\",[[0,\"docs-palettes\",{\"tabIndex\":[2,\"tab-index\"]}]]],[\"components-section\",[[0,\"components-section\",{\"tabIndex\":[2,\"tab-index\"]}]]],[\"eds-card-section\",[[1,\"eds-card-section\",{\"cards\":[1],\"occupyCols\":[2,\"occupy-cols\"]}]]],[\"eds-timeline\",[[1,\"eds-timeline\",{\"events\":[1],\"selectedEvent\":[32],\"parsedEvents\":[32]},null,{\"events\":[\"parseEvents\"]}]]],[\"docs-tokens\",[[0,\"docs-tokens\",{\"tabIndex\":[2,\"tab-index\"]}]]],[\"eds-card-tool\",[[1,\"eds-card-tool\",{\"cardTitle\":[1,\"card-title\"],\"url\":[1],\"description\":[1],\"image\":[8],\"avatar\":[1],\"shortAbbreviation\":[1,\"short-abbreviation\"],\"headingLevel\":[1,\"heading-level\"],\"tags\":[8],\"tiny\":[4],\"bg\":[4],\"withHover\":[4,\"with-hover\"],\"external\":[4],\"hierarchy\":[4]}]]],[\"eds-cookies-preference\",[[0,\"eds-cookies-preference\",{\"buttonText\":[1,\"button-text\"],\"intent\":[1],\"showMatomoNotice\":[32],\"noticeKey\":[32]}]]],[\"eds-app-root\",[[1,\"eds-app-root\",{\"isAuthenticated\":[32]}]]],[\"eds-card-project\",[[0,\"eds-card-project\",{\"image\":[8],\"editorialTitle\":[1,\"editorial-title\"],\"headingLevel\":[1,\"heading-level\"],\"categoryTitle\":[1,\"category-title\"],\"color\":[1],\"bgOnHover\":[4,\"bg-on-hover\"],\"vertical\":[4],\"titleProject\":[1,\"title-project\"],\"url\":[1],\"parsedImage\":[32]}]]],[\"eds-feedback\",[[1,\"eds-feedback\",{\"headingLevel\":[1,\"heading-level\"],\"type\":[1],\"count\":[2],\"label\":[1],\"description\":[1],\"textMapping\":[1,\"text-mapping\"],\"selectedRating\":[32]},[[16,\"rating\",\"ratingUpdated\"]]]]],[\"eds-toast-manager\",[[1,\"eds-toast-manager\",{\"toasts\":[32]}]]],[\"incorrect-use-of-colors\",[[0,\"incorrect-use-of-colors\"]]],[\"logo-variations-tabs\",[[0,\"logo-variations-tabs\",{\"tabIndex\":[2,\"tab-index\"]}]]],[\"correct-use-of-colors\",[[0,\"correct-use-of-colors\"]]],[\"eds-breadcrumb\",[[1,\"eds-breadcrumb\",{\"items\":[1],\"intent\":[1],\"parsedItems\":[32],\"isSmallScreen\":[32],\"maxVisibleItems\":[32]},null,{\"items\":[\"parseItems\"]}]]],[\"eds-frame\",[[1,\"eds-frame\",{\"frameLabel\":[1,\"frame-label\"],\"frameSrc\":[1,\"frame-src\"],\"urlLabel\":[1,\"url-label\"],\"errorMessage\":[1,\"error-message\"],\"url\":[1],\"intent\":[1],\"size\":[1],\"iframeError\":[32]}]]],[\"token-ratios\",[[0,\"token-ratios\"]]],[\"token-typography\",[[0,\"token-typography\"]]],[\"eds-card-tags\",[[1,\"eds-card-tags\",{\"accent\":[4],\"tags\":[16]}]]],[\"eds-gauge\",[[1,\"eds-gauge\",{\"size\":[2],\"valueMin\":[2,\"value-min\"],\"valueMax\":[2,\"value-max\"],\"value\":[2],\"thickness\":[2],\"variant\":[1]}]]],[\"eds-icon-arrow-diagonal\",[[0,\"eds-icon-arrow-diagonal\",{\"class\":[1]}]]],[\"eds-icon-arrow-right\",[[0,\"eds-icon-arrow-right\",{\"class\":[1]}]]],[\"eds-icon-bluesky\",[[0,\"eds-icon-bluesky\",{\"class\":[1]}]]],[\"eds-icon-bookmark\",[[0,\"eds-icon-bookmark\",{\"class\":[1]}]]],[\"eds-icon-chevron-down\",[[0,\"eds-icon-chevron-down\",{\"class\":[1]}]]],[\"eds-icon-chevron-left\",[[0,\"eds-icon-chevron-left\",{\"class\":[1]}]]],[\"eds-icon-chevron-right\",[[0,\"eds-icon-chevron-right\",{\"class\":[1]}]]],[\"eds-icon-chevron-up\",[[0,\"eds-icon-chevron-up\",{\"class\":[1]}]]],[\"eds-icon-close\",[[0,\"eds-icon-close\",{\"class\":[1]}]]],[\"eds-icon-copy\",[[0,\"eds-icon-copy\",{\"class\":[1]}]]],[\"eds-icon-eu\",[[0,\"eds-icon-eu\",{\"class\":[1]}]]],[\"eds-icon-external\",[[0,\"eds-icon-external\",{\"class\":[1]}]]],[\"eds-icon-facebook\",[[0,\"eds-icon-facebook\",{\"class\":[1]}]]],[\"eds-icon-gitlab\",[[0,\"eds-icon-gitlab\",{\"class\":[1]}]]],[\"eds-icon-linkedin\",[[0,\"eds-icon-linkedin\",{\"class\":[1]}]]],[\"eds-icon-loader\",[[0,\"eds-icon-loader\",{\"class\":[1]}]]],[\"eds-icon-mastodon\",[[0,\"eds-icon-mastodon\",{\"class\":[1]}]]],[\"eds-icon-menu\",[[0,\"eds-icon-menu\",{\"class\":[1]}]]],[\"eds-icon-minus\",[[0,\"eds-icon-minus\",{\"class\":[1]}]]],[\"eds-icon-more\",[[0,\"eds-icon-more\",{\"class\":[1]}]]],[\"eds-icon-paper\",[[0,\"eds-icon-paper\",{\"class\":[1]}]]],[\"eds-icon-plus\",[[0,\"eds-icon-plus\",{\"class\":[1]}]]],[\"eds-icon-portal\",[[0,\"eds-icon-portal\",{\"class\":[1]}]]],[\"eds-icon-private\",[[0,\"eds-icon-private\",{\"class\":[1]}]]],[\"eds-icon-public\",[[0,\"eds-icon-public\",{\"class\":[1]}]]],[\"eds-icon-search\",[[0,\"eds-icon-search\",{\"class\":[1]}]]],[\"eds-icon-star\",[[0,\"eds-icon-star\",{\"class\":[1]}]]],[\"eds-icon-success\",[[0,\"eds-icon-success\",{\"class\":[1]}]]],[\"eds-icon-thumbs-down\",[[0,\"eds-icon-thumbs-down\",{\"class\":[1]}]]],[\"eds-icon-thumbs-up\",[[0,\"eds-icon-thumbs-up\",{\"class\":[1]}]]],[\"eds-icon-tutorial\",[[0,\"eds-icon-tutorial\",{\"class\":[1]}]]],[\"eds-icon-twitter\",[[0,\"eds-icon-twitter\",{\"class\":[1]}]]],[\"eds-icon-unknown\",[[0,\"eds-icon-unknown\",{\"class\":[1]}]]],[\"eds-icon-updown\",[[0,\"eds-icon-updown\",{\"class\":[1]}]]],[\"eds-icon-user\",[[0,\"eds-icon-user\",{\"class\":[1]}]]],[\"eds-icon-youtube\",[[0,\"eds-icon-youtube\",{\"class\":[1]}]]],[\"eds-pie\",[[1,\"eds-pie\",{\"size\":[2],\"slices\":[1],\"thickness\":[2],\"display\":[1],\"legend\":[4],\"colorScheme\":[1,\"color-scheme\"]}]]],[\"eds-switch\",[[1,\"eds-switch\",{\"checked\":[1540],\"disabled\":[4],\"labelOn\":[1,\"label-on\"],\"labelOff\":[1,\"label-off\"]}]]],[\"eds-tooltip\",[[1,\"eds-tooltip\",{\"content\":[1]},[[1,\"mouseenter\",\"handleHover\"]]]]],[\"logo-wrong-usage\",[[1,\"logo-wrong-usage\"]]],[\"token-spacing\",[[0,\"token-spacing\"]]],[\"eds-accordion\",[[1,\"eds-accordion\",{\"heading\":[1,\"title\"],\"description\":[1],\"switchBg\":[4,\"switch-bg\"],\"expanded\":[4],\"clampText\":[4,\"clamp-text\"],\"isExpanded\":[32],\"panelHeight\":[32],\"shortContent\":[32],\"headerHeight\":[32]}]]],[\"eds-matomo-notice\",[[1,\"eds-matomo-notice\",{\"heading\":[1,\"title\"],\"description\":[1],\"optOutMessage\":[1,\"opt-out-message\"],\"forceShow\":[4,\"force-show\"],\"showNotice\":[32]},[[16,\"cookies\",\"toggleCookiesConsent\"]]]]],[\"eds-rating\",[[1,\"eds-rating\",{\"ratingType\":[1,\"rating-type\"],\"ratingCount\":[2,\"rating-count\"],\"selectedRating\":[32]}]]],[\"eds-spinner\",[[1,\"eds-spinner\",{\"size\":[1],\"thickness\":[1],\"borderColor\":[1,\"border-color\"],\"bottomColor\":[1,\"bottom-color\"],\"background\":[1],\"fullscreen\":[4]}]]],[\"eds-splash-screen\",[[1,\"eds-splash-screen\",{\"inverse\":[4],\"initPromise\":[16],\"isVisible\":[32]},[[8,\"hideSplash\",\"handleHideSplash\"]],{\"initPromise\":[\"watchInitPromise\"]}]]],[\"eds-toast\",[[1,\"eds-toast\",{\"message\":[1],\"intent\":[1],\"duration\":[2],\"visible\":[32]}]]],[\"eds-progress-bar\",[[1,\"eds-progress-bar\",{\"value\":[1026],\"rounded\":[4],\"updateValue\":[64]}]]],[\"eds-card-generic\",[[1,\"eds-card-generic\",{\"cardTitle\":[1,\"card-title\"],\"url\":[1],\"description\":[1],\"image\":[8],\"avatar\":[1],\"shortAbbreviation\":[1,\"short-abbreviation\"],\"headingLevel\":[1,\"heading-level\"],\"tags\":[1],\"tiny\":[4],\"bg\":[4],\"withHover\":[4,\"with-hover\"],\"hierarchy\":[4],\"parsedImage\":[32]},[[0,\"parentContext\",\"handleParentContext\"]]]]],[\"logo-variations-horizontal_2\",[[1,\"logo-variations-horizontal\"],[1,\"logo-variations-vertical\",{\"orientation\":[1],\"type\":[1]}]]],[\"eds-alert\",[[1,\"eds-alert\",{\"message\":[1],\"pressableLabel\":[1,\"pressable-label\"],\"pressableUrl\":[1,\"pressable-url\"],\"direction\":[1],\"intent\":[1],\"brd\":[1],\"withBtn\":[32]}]]],[\"token-list_3\",[[0,\"token-list\",{\"show\":[1]}],[0,\"token-radii\"],[0,\"token-shadows\"]]],[\"eds-section-core_2\",[[1,\"eds-section-core\",{\"tag\":[1],\"sectionTitle\":[1,\"section-title\"],\"headingLevel\":[1,\"heading-level\"]}],[0,\"eds-section-heading\",{\"sectionTitle\":[1,\"section-title\"],\"withContainer\":[4,\"with-container\"],\"headingLevel\":[1,\"heading-level\"],\"tag\":[1],\"spacingLarge\":[4,\"spacing-large\"]}]]],[\"eds-code-block\",[[1,\"eds-code-block\",{\"code\":[1],\"language\":[1],\"copied\":[32]}]]],[\"color-primary-palette_6\",[[0,\"gradient-secondary-palette\"],[0,\"color-primary-palette\"],[0,\"color-secondary-palette\",{\"show\":[1]}],[0,\"color-support-palette\"],[0,\"gradient-primary-palette\"],[0,\"gradient-support-palette\"]]],[\"eds-card-desc_2\",[[1,\"eds-card-desc\",{\"description\":[1],\"truncate\":[4],\"truncateLines\":[1,\"truncate-lines\"]}],[1,\"eds-card-title\",{\"url\":[1],\"titleClass\":[1,\"title-class\"],\"headingLevel\":[1,\"heading-level\"],\"externalLink\":[4,\"external-link\"],\"cardTitle\":[1,\"card-title\"],\"hierarchy\":[4]}]]]]"), options);
|
|
19
|
+
return bootstrapLazy(JSON.parse("[[\"eds-avatar_29\",[[1,\"eds-form\",{\"name\":[1],\"setFormUrl\":[4,\"set-form-url\"],\"formBtn\":[4,\"form-btn\"],\"formBtnLabel\":[1,\"form-btn-label\"],\"errorMessage\":[1,\"error-message\"],\"fields\":[1],\"initData\":[16],\"values\":[32],\"isSubmitting\":[32],\"hasError\":[32],\"errors\":[32],\"parsedFields\":[32],\"setData\":[64],\"getData\":[64]},null,{\"fields\":[\"parseFields\"]}],[1,\"eds-fullscreen-menu\",{\"links\":[1],\"menuLinks\":[1,\"menu-links\"],\"homeUrl\":[1,\"home-url\"],\"inverseHeader\":[4,\"inverse-header\"],\"isMenuOpen\":[32]},[[16,\"toggleheadermenu\",\"handleToggleMenu\"]]],[1,\"eds-user\",{\"user\":[1025]}],[1,\"eds-header\",{\"homeUrl\":[513,\"home-url\"],\"links\":[1],\"headerVariant\":[513,\"header-variant\"],\"menuEnabled\":[4,\"menu-enabled\"],\"isMenuOpen\":[32],\"isUserMenuOpen\":[32],\"isAuthenticated\":[32]},[[16,\"authStatusChanged\",\"onAuthStatusChanged\"]]],[1,\"eds-steps-v2\",{\"steps\":[1],\"type\":[1],\"imageSrc\":[1,\"image-src\"],\"imageWidth\":[2,\"image-width\"],\"bg\":[4],\"message\":[1],\"activeStep\":[32]},null,{\"activeStep\":[\"activeStepChanged\"]}],[1,\"eds-modal\",{\"heading\":[1,\"title\"],\"truncate\":[2],\"position\":[1],\"inverseHeader\":[4,\"inverse-header\"],\"isOpen\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64]},[[0,\"eds-modal-open\",\"handleGlobalOpen\"],[0,\"eds-modal-close\",\"handleGlobalClose\"],[8,\"keydown\",\"handleKeyDown\"]]],[1,\"eds-tabs\",{\"identifier\":[1,\"id\"],\"navAriaLabel\":[1,\"nav-aria-label\"],\"tabs\":[1],\"parsedTabs\":[32],\"activeIndex\":[32]},null,{\"tabs\":[\"parseTabs\"]}],[1,\"eds-footer\",{\"social\":[4],\"enableScrollTop\":[4,\"enable-scroll-top\"],\"fundedBy\":[1,\"funded-by\"],\"rightsReserved\":[1,\"rights-reserved\"],\"cookiesPreferences\":[1,\"cookies-preferences\"],\"enableCookiesSettings\":[4,\"enable-cookies-settings\"],\"backToTopAriaLabel\":[1,\"back-to-top-aria-label\"],\"showMatomoNotice\":[32]}],[1,\"eds-dropdown\",{\"icon\":[1],\"label\":[1],\"rounded\":[4],\"ariaLabel\":[1,\"aria-label\"],\"asNav\":[4,\"as-nav\"],\"dropdownPos\":[1,\"dropdown-pos\"],\"dropdownOffset\":[4,\"dropdown-offset\"],\"intent\":[1],\"isOpen\":[32],\"focusIndex\":[32]},[[8,\"click\",\"handleWindowClick\"],[8,\"keydown\",\"handleKeyDown\"]]],[1,\"eds-steps\",{\"steps\":[1],\"type\":[1],\"activeStep\":[32]},null,{\"activeStep\":[\"activeStepChanged\"]}],[1,\"eds-toast\",{\"message\":[1],\"intent\":[1],\"duration\":[2],\"visible\":[32]}],[1,\"eds-social-networks\",{\"heading\":[1,\"title\"]}],[1,\"eds-table\",{\"data\":[1,\"table-data\"],\"endpoint\":[1],\"config\":[1],\"rowsPerPage\":[2,\"rows-per-page\"],\"paginationEnabled\":[4,\"pagination-enabled\"],\"searchEnabled\":[4,\"search-enabled\"],\"hostWidth\":[1,\"host-width\"],\"columnSize\":[1,\"column-size\"],\"actions\":[1],\"actionTemplate\":[16],\"parsedActions\":[32],\"dataColumns\":[32],\"tbData\":[32],\"columns\":[32],\"currentPage\":[32],\"parsedConfig\":[32],\"totalRows\":[32],\"searchQuery\":[32],\"containerWidth\":[32]},null,{\"data\":[\"handleDataChange\",\"parseData\"],\"config\":[\"handleConfigChange\"],\"actions\":[\"handleActionsChange\"]}],[1,\"eds-pagination\",{\"currentPage\":[2,\"current-page\"],\"lastPage\":[2,\"last-page\"],\"perPage\":[2,\"per-page\"],\"total\":[2],\"url\":[1],\"mode\":[1],\"prevLabel\":[1,\"prev-label\"],\"nextLabel\":[1,\"next-label\"],\"prevUrl\":[1,\"prev-url\"],\"nextUrl\":[1,\"next-url\"],\"links\":[32]},null,{\"currentPage\":[\"onPageOrLastPageChange\"],\"lastPage\":[\"onPageOrLastPageChange\"]}],[1,\"eds-block-break\",{\"inverse\":[4]}],[1,\"eds-input-field\",{\"name\":[1],\"inputId\":[1,\"input-id\"],\"placeholder\":[1],\"disabled\":[4],\"required\":[4],\"label\":[1],\"hint\":[1],\"icon\":[1],\"link\":[16],\"message\":[1],\"error\":[4],\"checked\":[4],\"errorMessage\":[1,\"error-message\"],\"value\":[8],\"maxLength\":[2,\"max-length\"],\"min\":[2],\"max\":[2],\"step\":[2],\"options\":[1],\"type\":[1],\"onChangeNative\":[16],\"onInput\":[16],\"exposeValueEvents\":[4,\"expose-value-events\"]}],[1,\"eds-avatar\",{\"firstName\":[1,\"first-name\"],\"lastName\":[1,\"last-name\"],\"picture\":[1],\"initials\":[1],\"color\":[1]}],[0,\"eds-input\",{\"name\":[1],\"inputId\":[1,\"input-id\"],\"placeholder\":[1],\"disabled\":[4],\"hasMessage\":[4,\"has-message\"],\"error\":[4],\"checked\":[4],\"type\":[1],\"required\":[4],\"value\":[8],\"icon\":[1],\"maxLength\":[2,\"max-length\"],\"options\":[16],\"extraClass\":[1,\"extra-class\"],\"min\":[2],\"max\":[2],\"step\":[2],\"innerVal\":[32],\"maxLengthReached\":[32]},null,{\"value\":[\"onValueChanged\"]}],[1,\"eds-input-footer\",{\"name\":[1],\"errorMessage\":[1,\"error-message\"],\"message\":[1],\"error\":[4],\"link\":[16]}],[0,\"eds-input-search\",{\"name\":[1],\"inputId\":[1,\"input-id\"],\"placeholder\":[1],\"value\":[1],\"disabled\":[4],\"required\":[4],\"decorate\":[1],\"label\":[1],\"getInputElement\":[64]}],[0,\"eds-input-select\",{\"inputId\":[1,\"input-id\"],\"name\":[1],\"placeholder\":[1],\"disabled\":[4],\"hasMessage\":[4,\"has-message\"],\"error\":[4],\"required\":[4],\"options\":[16],\"value\":[8]}],[1,\"eds-input-label\",{\"label\":[1],\"name\":[1],\"required\":[4],\"disabled\":[4]}],[0,\"eds-input-range\",{\"name\":[1],\"inputId\":[1,\"input-id\"],\"disabled\":[4],\"required\":[4],\"min\":[2],\"max\":[2],\"step\":[2],\"value\":[2],\"sliderVal\":[32],\"getInputElement\":[64]},null,{\"value\":[\"onValueChange\"]}],[1,\"eds-tag\",{\"label\":[1],\"intent\":[1],\"size\":[1]}],[1,\"eds-logo\",{\"href\":[1],\"orientation\":[1],\"type\":[1],\"label\":[1]}],[1,\"eds-img\",{\"src\":[1],\"alt\":[1],\"width\":[2],\"height\":[2],\"srcset\":[1],\"sizes\":[1],\"formats\":[16],\"lazyload\":[4],\"withBg\":[4,\"with-bg\"],\"loaded\":[32],\"showBg\":[32]}],[1,\"eds-link\",{\"label\":[1],\"intent\":[1],\"icon\":[1],\"iconPos\":[1,\"icon-pos\"],\"iconSmall\":[4,\"icon-small\"],\"size\":[1],\"external\":[4],\"current\":[4],\"download\":[4],\"url\":[1],\"ariaLabel\":[1,\"aria-label\"],\"disabled\":[4],\"hideLabelOnSmallScreen\":[4,\"hide-label-on-small-screen\"],\"extraClass\":[1,\"extra-class\"]},[[0,\"parentContext\",\"handleParentContext\"]]],[1,\"eds-button\",{\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"elementType\":[1,\"element-type\"],\"intent\":[1],\"loading\":[4],\"disabled\":[4],\"pill\":[4],\"icon\":[1],\"size\":[1],\"iconPos\":[1,\"icon-pos\"],\"iconSmall\":[4,\"icon-small\"],\"extraClass\":[1,\"extra-class\"],\"triggerClick\":[16]},[[0,\"parentContext\",\"handleParentContext\"]]],[0,\"eds-icon-wrapper\",{\"icon\":[1],\"class\":[1],\"IconComponent\":[32]},null,{\"icon\":[\"iconChanged\"]}]]],[\"eds-trl\",[[0,\"eds-trl\",{\"applications\":[1]}]]],[\"logo-space\",[[1,\"logo-space\"]]],[\"svg-repository\",[[1,\"svg-repository\"]]],[\"docs-palettes\",[[0,\"docs-palettes\",{\"tabIndex\":[2,\"tab-index\"]}]]],[\"components-section\",[[0,\"components-section\",{\"tabIndex\":[2,\"tab-index\"]}]]],[\"eds-card-section\",[[1,\"eds-card-section\",{\"cards\":[1],\"occupyCols\":[2,\"occupy-cols\"]}]]],[\"eds-timeline\",[[1,\"eds-timeline\",{\"events\":[1],\"selectedEvent\":[32],\"parsedEvents\":[32]},null,{\"events\":[\"parseEvents\"]}]]],[\"docs-tokens\",[[0,\"docs-tokens\",{\"tabIndex\":[2,\"tab-index\"]}]]],[\"eds-card-tool\",[[1,\"eds-card-tool\",{\"cardTitle\":[1,\"card-title\"],\"url\":[1],\"description\":[1],\"image\":[8],\"avatar\":[1],\"shortAbbreviation\":[1,\"short-abbreviation\"],\"headingLevel\":[1,\"heading-level\"],\"tags\":[8],\"tiny\":[4],\"bg\":[4],\"withHover\":[4,\"with-hover\"],\"external\":[4],\"hierarchy\":[4]}]]],[\"eds-cookies-preference\",[[0,\"eds-cookies-preference\",{\"buttonText\":[1,\"button-text\"],\"intent\":[1],\"showMatomoNotice\":[32],\"noticeKey\":[32]}]]],[\"eds-app-root\",[[1,\"eds-app-root\",{\"isAuthenticated\":[32]}]]],[\"eds-card-project\",[[0,\"eds-card-project\",{\"image\":[8],\"editorialTitle\":[1,\"editorial-title\"],\"headingLevel\":[1,\"heading-level\"],\"categoryTitle\":[1,\"category-title\"],\"color\":[1],\"bgOnHover\":[4,\"bg-on-hover\"],\"vertical\":[4],\"titleProject\":[1,\"title-project\"],\"url\":[1],\"parsedImage\":[32]}]]],[\"eds-feedback\",[[1,\"eds-feedback\",{\"headingLevel\":[1,\"heading-level\"],\"type\":[1],\"count\":[2],\"label\":[1],\"description\":[1],\"textMapping\":[1,\"text-mapping\"],\"selectedRating\":[32]},[[16,\"rating\",\"ratingUpdated\"]]]]],[\"eds-toast-manager\",[[1,\"eds-toast-manager\",{\"toasts\":[32]}]]],[\"incorrect-use-of-colors\",[[0,\"incorrect-use-of-colors\"]]],[\"logo-variations-tabs\",[[0,\"logo-variations-tabs\",{\"tabIndex\":[2,\"tab-index\"]}]]],[\"correct-use-of-colors\",[[0,\"correct-use-of-colors\"]]],[\"eds-breadcrumb\",[[1,\"eds-breadcrumb\",{\"items\":[1],\"intent\":[1],\"parsedItems\":[32],\"isSmallScreen\":[32],\"maxVisibleItems\":[32]},null,{\"items\":[\"parseItems\"]}]]],[\"eds-frame\",[[1,\"eds-frame\",{\"frameLabel\":[1,\"frame-label\"],\"frameSrc\":[1,\"frame-src\"],\"urlLabel\":[1,\"url-label\"],\"errorMessage\":[1,\"error-message\"],\"url\":[1],\"intent\":[1],\"size\":[1],\"iframeError\":[32]}]]],[\"token-ratios\",[[0,\"token-ratios\"]]],[\"token-typography\",[[0,\"token-typography\"]]],[\"eds-card-tags\",[[1,\"eds-card-tags\",{\"accent\":[4],\"tags\":[16]}]]],[\"eds-gauge\",[[1,\"eds-gauge\",{\"size\":[2],\"valueMin\":[2,\"value-min\"],\"valueMax\":[2,\"value-max\"],\"value\":[2],\"thickness\":[2],\"variant\":[1]}]]],[\"eds-icon-arrow-diagonal\",[[0,\"eds-icon-arrow-diagonal\",{\"class\":[1]}]]],[\"eds-icon-arrow-right\",[[0,\"eds-icon-arrow-right\",{\"class\":[1]}]]],[\"eds-icon-bluesky\",[[0,\"eds-icon-bluesky\",{\"class\":[1]}]]],[\"eds-icon-bookmark\",[[0,\"eds-icon-bookmark\",{\"class\":[1]}]]],[\"eds-icon-chevron-down\",[[0,\"eds-icon-chevron-down\",{\"class\":[1]}]]],[\"eds-icon-chevron-left\",[[0,\"eds-icon-chevron-left\",{\"class\":[1]}]]],[\"eds-icon-chevron-right\",[[0,\"eds-icon-chevron-right\",{\"class\":[1]}]]],[\"eds-icon-chevron-up\",[[0,\"eds-icon-chevron-up\",{\"class\":[1]}]]],[\"eds-icon-close\",[[0,\"eds-icon-close\",{\"class\":[1]}]]],[\"eds-icon-copy\",[[0,\"eds-icon-copy\",{\"class\":[1]}]]],[\"eds-icon-eu\",[[0,\"eds-icon-eu\",{\"class\":[1]}]]],[\"eds-icon-external\",[[0,\"eds-icon-external\",{\"class\":[1]}]]],[\"eds-icon-facebook\",[[0,\"eds-icon-facebook\",{\"class\":[1]}]]],[\"eds-icon-gitlab\",[[0,\"eds-icon-gitlab\",{\"class\":[1]}]]],[\"eds-icon-linkedin\",[[0,\"eds-icon-linkedin\",{\"class\":[1]}]]],[\"eds-icon-loader\",[[0,\"eds-icon-loader\",{\"class\":[1]}]]],[\"eds-icon-mastodon\",[[0,\"eds-icon-mastodon\",{\"class\":[1]}]]],[\"eds-icon-menu\",[[0,\"eds-icon-menu\",{\"class\":[1]}]]],[\"eds-icon-minus\",[[0,\"eds-icon-minus\",{\"class\":[1]}]]],[\"eds-icon-more\",[[0,\"eds-icon-more\",{\"class\":[1]}]]],[\"eds-icon-paper\",[[0,\"eds-icon-paper\",{\"class\":[1]}]]],[\"eds-icon-plus\",[[0,\"eds-icon-plus\",{\"class\":[1]}]]],[\"eds-icon-portal\",[[0,\"eds-icon-portal\",{\"class\":[1]}]]],[\"eds-icon-private\",[[0,\"eds-icon-private\",{\"class\":[1]}]]],[\"eds-icon-public\",[[0,\"eds-icon-public\",{\"class\":[1]}]]],[\"eds-icon-search\",[[0,\"eds-icon-search\",{\"class\":[1]}]]],[\"eds-icon-star\",[[0,\"eds-icon-star\",{\"class\":[1]}]]],[\"eds-icon-success\",[[0,\"eds-icon-success\",{\"class\":[1]}]]],[\"eds-icon-thumbs-down\",[[0,\"eds-icon-thumbs-down\",{\"class\":[1]}]]],[\"eds-icon-thumbs-up\",[[0,\"eds-icon-thumbs-up\",{\"class\":[1]}]]],[\"eds-icon-tutorial\",[[0,\"eds-icon-tutorial\",{\"class\":[1]}]]],[\"eds-icon-twitter\",[[0,\"eds-icon-twitter\",{\"class\":[1]}]]],[\"eds-icon-unknown\",[[0,\"eds-icon-unknown\",{\"class\":[1]}]]],[\"eds-icon-updown\",[[0,\"eds-icon-updown\",{\"class\":[1]}]]],[\"eds-icon-user\",[[0,\"eds-icon-user\",{\"class\":[1]}]]],[\"eds-icon-youtube\",[[0,\"eds-icon-youtube\",{\"class\":[1]}]]],[\"eds-pie\",[[1,\"eds-pie\",{\"size\":[2],\"slices\":[1],\"thickness\":[2],\"display\":[1],\"legend\":[4],\"colorScheme\":[1,\"color-scheme\"]}]]],[\"eds-switch\",[[1,\"eds-switch\",{\"checked\":[1540],\"disabled\":[4],\"labelOn\":[1,\"label-on\"],\"labelOff\":[1,\"label-off\"]}]]],[\"eds-tooltip\",[[1,\"eds-tooltip\",{\"content\":[1]},[[1,\"mouseenter\",\"handleHover\"]]]]],[\"logo-wrong-usage\",[[1,\"logo-wrong-usage\"]]],[\"token-spacing\",[[0,\"token-spacing\"]]],[\"eds-matomo-notice\",[[1,\"eds-matomo-notice\",{\"heading\":[1,\"title\"],\"description\":[1],\"optOutMessage\":[1,\"opt-out-message\"],\"forceShow\":[4,\"force-show\"],\"showNotice\":[32]},[[16,\"cookies\",\"toggleCookiesConsent\"]]]]],[\"eds-rating\",[[1,\"eds-rating\",{\"ratingType\":[1,\"rating-type\"],\"ratingCount\":[2,\"rating-count\"],\"selectedRating\":[32]}]]],[\"eds-spinner\",[[1,\"eds-spinner\",{\"size\":[1],\"thickness\":[1],\"borderColor\":[1,\"border-color\"],\"bottomColor\":[1,\"bottom-color\"],\"background\":[1],\"fullscreen\":[4]}]]],[\"eds-splash-screen\",[[1,\"eds-splash-screen\",{\"inverse\":[4],\"initPromise\":[16],\"isVisible\":[32]},[[8,\"hideSplash\",\"handleHideSplash\"]],{\"initPromise\":[\"watchInitPromise\"]}]]],[\"eds-progress-bar\",[[1,\"eds-progress-bar\",{\"value\":[1026],\"rounded\":[4],\"updateValue\":[64]}]]],[\"eds-card-generic\",[[1,\"eds-card-generic\",{\"cardTitle\":[1,\"card-title\"],\"url\":[1],\"description\":[1],\"image\":[8],\"avatar\":[1],\"shortAbbreviation\":[1,\"short-abbreviation\"],\"headingLevel\":[1,\"heading-level\"],\"tags\":[1],\"tiny\":[4],\"bg\":[4],\"withHover\":[4,\"with-hover\"],\"hierarchy\":[4],\"parsedImage\":[32]},[[0,\"parentContext\",\"handleParentContext\"]]]]],[\"logo-variations-horizontal_2\",[[1,\"logo-variations-horizontal\"],[1,\"logo-variations-vertical\",{\"orientation\":[1],\"type\":[1]}]]],[\"eds-accordion\",[[1,\"eds-accordion\",{\"heading\":[1,\"title\"],\"description\":[1],\"switchBg\":[4,\"switch-bg\"],\"expanded\":[4],\"clampText\":[4,\"clamp-text\"],\"isExpanded\":[32],\"panelHeight\":[32],\"shortContent\":[32],\"headerHeight\":[32]}]]],[\"eds-alert\",[[1,\"eds-alert\",{\"message\":[1],\"pressableLabel\":[1,\"pressable-label\"],\"pressableUrl\":[1,\"pressable-url\"],\"direction\":[1],\"intent\":[1],\"brd\":[1],\"withBtn\":[32]}]]],[\"eds-code-block\",[[1,\"eds-code-block\",{\"code\":[1],\"language\":[1],\"copied\":[32]}]]],[\"token-list_3\",[[0,\"token-list\",{\"show\":[1]}],[0,\"token-radii\"],[0,\"token-shadows\"]]],[\"eds-section-core_2\",[[1,\"eds-section-core\",{\"tag\":[1],\"sectionTitle\":[1,\"section-title\"],\"headingLevel\":[1,\"heading-level\"]}],[0,\"eds-section-heading\",{\"sectionTitle\":[1,\"section-title\"],\"withContainer\":[4,\"with-container\"],\"headingLevel\":[1,\"heading-level\"],\"tag\":[1],\"spacingLarge\":[4,\"spacing-large\"]}]]],[\"color-primary-palette_6\",[[0,\"gradient-secondary-palette\"],[0,\"color-primary-palette\"],[0,\"color-secondary-palette\",{\"show\":[1]}],[0,\"color-support-palette\"],[0,\"gradient-primary-palette\"],[0,\"gradient-support-palette\"]]],[\"eds-card-desc_2\",[[1,\"eds-card-desc\",{\"description\":[1],\"truncate\":[4],\"truncateLines\":[1,\"truncate-lines\"]}],[1,\"eds-card-title\",{\"url\":[1],\"titleClass\":[1,\"title-class\"],\"headingLevel\":[1,\"heading-level\"],\"externalLink\":[4,\"external-link\"],\"cardTitle\":[1,\"card-title\"],\"hierarchy\":[4]}]]]]"), options);
|
|
20
20
|
});
|
|
@@ -412,11 +412,25 @@ const EdsFooter = class {
|
|
|
412
412
|
EdsFooter.style = EdsFooterStyle0;
|
|
413
413
|
|
|
414
414
|
// utils/validators.ts
|
|
415
|
-
function validateField(name, value, type, required, maxLength) {
|
|
415
|
+
function validateField(name, value, type, required, maxLength, min, max) {
|
|
416
416
|
const errors = [];
|
|
417
417
|
if (required && !value) {
|
|
418
418
|
errors.push(`${name} is required.`);
|
|
419
419
|
}
|
|
420
|
+
if (type === 'number') {
|
|
421
|
+
const parsed = typeof value === 'number' ? value : parseFloat(value);
|
|
422
|
+
if (isNaN(parsed)) {
|
|
423
|
+
errors.push(`${name} must be a valid number.`);
|
|
424
|
+
}
|
|
425
|
+
else {
|
|
426
|
+
if (typeof min === 'number' && parsed < min) {
|
|
427
|
+
errors.push(`${name} must be greater than or equal to ${min}.`);
|
|
428
|
+
}
|
|
429
|
+
if (typeof max === 'number' && parsed > max) {
|
|
430
|
+
errors.push(`${name} must be less than or equal to ${max}.`);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
420
434
|
if (maxLength && typeof value === 'string' && value.length > maxLength) {
|
|
421
435
|
errors.push(`${name} must be at most ${maxLength} characters.`);
|
|
422
436
|
}
|
|
@@ -510,7 +524,7 @@ isFieldVisible) {
|
|
|
510
524
|
const inputEl = findFieldElement(formEl, field.name);
|
|
511
525
|
if (inputEl) {
|
|
512
526
|
const value = inputEl.value;
|
|
513
|
-
const fieldErrors = validateField(field.name, value, field.type, field.required, field.maxlength);
|
|
527
|
+
const fieldErrors = validateField(field.name, value, field.type, field.required, field.maxlength, field.min, field.max);
|
|
514
528
|
if (fieldErrors.length > 0) {
|
|
515
529
|
errors[field.name] = fieldErrors;
|
|
516
530
|
hasError = true;
|
|
@@ -535,7 +549,7 @@ function validateInputField(field, value, formEl) {
|
|
|
535
549
|
}
|
|
536
550
|
return validateSingleBox(field.name, field.required, formEl);
|
|
537
551
|
}
|
|
538
|
-
return validateField(field.name, value, field.type, field.required, field.maxlength);
|
|
552
|
+
return validateField(field.name, value, field.type, field.required, field.maxlength, field.min, field.max);
|
|
539
553
|
}
|
|
540
554
|
|
|
541
555
|
/**
|
|
@@ -608,11 +622,12 @@ const EdsForm = class {
|
|
|
608
622
|
linkElement.dispatchEvent(event);
|
|
609
623
|
}
|
|
610
624
|
isFieldVisible(field) {
|
|
611
|
-
if (!field.condition)
|
|
625
|
+
if (!field.condition)
|
|
612
626
|
return true;
|
|
613
|
-
|
|
614
|
-
const
|
|
615
|
-
|
|
627
|
+
const actual = this.values[field.condition.field];
|
|
628
|
+
const expected = field.condition.value;
|
|
629
|
+
// Handle loose match between booleans and strings
|
|
630
|
+
return String(actual) === String(expected);
|
|
616
631
|
}
|
|
617
632
|
validateForm() {
|
|
618
633
|
const { errors, hasError } = validateFormFields(this.parsedFields, this.formEl, this.values, (field, values) => {
|
|
@@ -699,6 +714,7 @@ const EdsForm = class {
|
|
|
699
714
|
}
|
|
700
715
|
handleChange(e, field) {
|
|
701
716
|
const target = e.target;
|
|
717
|
+
let newValue = target.value;
|
|
702
718
|
if (target.type === 'checkbox') {
|
|
703
719
|
// Get the current comma separated string or default to an empty string.
|
|
704
720
|
const currentStr = this.values[field.name] || '';
|
|
@@ -714,13 +730,14 @@ const EdsForm = class {
|
|
|
714
730
|
// Remove the value from the array if the checkbox is unchecked.
|
|
715
731
|
valuesArray = valuesArray.filter((item) => item !== target.value);
|
|
716
732
|
}
|
|
717
|
-
|
|
718
|
-
this.values = Object.assign(Object.assign({}, this.values), { [field.name]: valuesArray.join(',') });
|
|
733
|
+
newValue = valuesArray.join(',');
|
|
719
734
|
}
|
|
720
|
-
else {
|
|
721
|
-
|
|
722
|
-
|
|
735
|
+
else if (target.type === 'radio') {
|
|
736
|
+
if (!target.checked)
|
|
737
|
+
return; // Only react to the selected radio
|
|
738
|
+
newValue = target.value;
|
|
723
739
|
}
|
|
740
|
+
this.values = Object.assign(Object.assign({}, this.values), { [field.name]: newValue });
|
|
724
741
|
// If it’s the password field, return here for no event emission
|
|
725
742
|
if (field.name === 'password') {
|
|
726
743
|
return;
|
|
@@ -729,13 +746,16 @@ const EdsForm = class {
|
|
|
729
746
|
this.form.emit({
|
|
730
747
|
event: 'change',
|
|
731
748
|
field: field.name,
|
|
732
|
-
value:
|
|
749
|
+
value: newValue,
|
|
733
750
|
message: `${field.name} updated`
|
|
734
751
|
//data: this.makeFormData()
|
|
735
752
|
});
|
|
736
753
|
}
|
|
737
754
|
handleInput(e, field) {
|
|
738
755
|
const target = e.target;
|
|
756
|
+
if (target.type === 'radio' && !target.checked)
|
|
757
|
+
return;
|
|
758
|
+
const newValue = target.value;
|
|
739
759
|
// Update the field's value in state.
|
|
740
760
|
//this.values = { ...this.values, [field.name]: target.value };
|
|
741
761
|
// Create a copy of the current errors.
|
|
@@ -755,7 +775,7 @@ const EdsForm = class {
|
|
|
755
775
|
this.form.emit({
|
|
756
776
|
event: 'input',
|
|
757
777
|
field: field.name,
|
|
758
|
-
value:
|
|
778
|
+
value: newValue,
|
|
759
779
|
message: `${field.name} updated`
|
|
760
780
|
//data: this.makeFormData()
|
|
761
781
|
});
|
|
@@ -819,13 +839,13 @@ const EdsForm = class {
|
|
|
819
839
|
render() {
|
|
820
840
|
const hiddenFields = this.parsedFields.filter((field) => field.type === 'hidden');
|
|
821
841
|
const otherFields = this.parsedFields.filter((field) => field.type !== 'hidden');
|
|
822
|
-
return (h("form", { key: '
|
|
842
|
+
return (h("form", { key: '98825e73a0279bed49b82caf2cc0529f30b53c70', ref: (el) => (this.formEl = el), autocomplete: "on", onSubmit: this.handleSubmit }, h("div", { key: '6b9abe2a6c2d091d57ea9ca383d9edb5d48445dc' }, h("slot", { key: '930bcd24d9b1c6ec1b29ccb1c3150897fa9d0a35' }), hiddenFields.map((field, index) => (h("eds-input", { key: index, type: "hidden", name: field.name, value: field.value }))), otherFields.map((field, index) => {
|
|
823
843
|
var _a, _b;
|
|
824
844
|
if (!this.isFieldVisible(field)) {
|
|
825
845
|
return null;
|
|
826
846
|
}
|
|
827
|
-
return (h("eds-input-field", { key: index, name: field.name, id: `${this.name}_${field.name}`, label: field.label, placeholder: field.placeholder, value: this.values[field.name] || null, type: field.type, icon: field.icon || null, disabled: field.disabled, required: field.required, maxLength: field.maxlength, hint: field.hint, link: field.link, message: field.message, error: ((_a = this.errors[field.name]) === null || _a === void 0 ? void 0 : _a.length) > 0, errorMessage: (_b = this.errors[field.name]) === null || _b === void 0 ? void 0 : _b.join('<br />'), onInput: (e) => this.handleInput(e, field), onChangeNative: (e) => this.handleChange(e, field), class: index > 0 ? 'mt-20' : '', options: field.options }));
|
|
828
|
-
})), this.formBtn && (h("div", { key: '
|
|
847
|
+
return (h("eds-input-field", { key: index, name: field.name, id: `${this.name}_${field.name}`, label: field.label, placeholder: field.placeholder, value: this.values[field.name] || null, min: field.min, max: field.max, step: field.step, type: field.type, icon: field.icon || null, disabled: field.disabled, required: field.required, maxLength: field.maxlength, hint: field.hint, link: field.link, message: field.message, error: ((_a = this.errors[field.name]) === null || _a === void 0 ? void 0 : _a.length) > 0, errorMessage: (_b = this.errors[field.name]) === null || _b === void 0 ? void 0 : _b.join('<br />'), onInput: (e) => this.handleInput(e, field), onChangeNative: (e) => this.handleChange(e, field), class: index > 0 ? 'mt-20' : '', options: field.options }));
|
|
848
|
+
})), this.formBtn && (h("div", { key: 'e0ab2f16ff4a677a2b09a1069212e374f6d6eff8', class: "mt-20" }, h("eds-button", { key: '781250d5e456a3f0176ade6e28356063c6981bb7', intent: "primary", label: this.formBtnLabel, disabled: this.isSubmitting, loading: this.isSubmitting, onClick: () => this.handleSubmit() })))));
|
|
829
849
|
}
|
|
830
850
|
get el() { return getElement(this); }
|
|
831
851
|
static get watchers() { return {
|
|
@@ -1068,6 +1088,9 @@ const EdsInput = class {
|
|
|
1068
1088
|
this.maxLength = undefined;
|
|
1069
1089
|
this.options = [];
|
|
1070
1090
|
this.extraClass = undefined;
|
|
1091
|
+
this.min = undefined;
|
|
1092
|
+
this.max = undefined;
|
|
1093
|
+
this.step = undefined;
|
|
1071
1094
|
this.innerVal = '';
|
|
1072
1095
|
this.maxLengthReached = false;
|
|
1073
1096
|
}
|
|
@@ -1090,12 +1113,18 @@ const EdsInput = class {
|
|
|
1090
1113
|
render() {
|
|
1091
1114
|
const withIcon = !!this.icon;
|
|
1092
1115
|
const describedBy = this.hasMessage || this.error ? `${this.name}-error` : '';
|
|
1093
|
-
return (h("div", { key: '
|
|
1116
|
+
return (h("div", { key: '8645092d1b4c53609cbac2077fd0575f7bae4aaa', class: "relative flex items-center" }, this.type === 'textarea' ? (h("textarea", { id: this.inputId || this.name, name: this.name, placeholder: this.placeholder, value: this.innerVal.toString(), required: this.required, disabled: this.disabled, class: `min-h-80 input input-textarea ${withIcon ? 'input-with-icon' : ''} ${this.error ? 'input-error' : ''} ${this.extraClass}`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, maxlength: this.maxLength, onInput: this.handleInput, onChange: this.handleInput })) : this.type === 'select' ? (h("select", { id: this.inputId || this.name, name: this.name, required: this.required, disabled: this.disabled, class: `input input-select ${this.error ? 'input-error' : ''} ${this.extraClass}`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, onInput: this.handleInput, onChange: this.handleInput }, this.options.map((option) => (h("option", { value: option.value, selected: option.value === this.innerVal, key: option.value }, option.label))))) : (h("input", Object.assign({ id: this.inputId || this.name, name: this.name, placeholder: this.placeholder, value: this.innerVal.toString(), required: this.required, disabled: this.disabled, type: this.type, checked: ['radio', 'checkbox'].includes(this.type) ? this.checked : undefined }, (this.type === 'number'
|
|
1117
|
+
? {
|
|
1118
|
+
min: this.min,
|
|
1119
|
+
max: this.max,
|
|
1120
|
+
step: this.step,
|
|
1121
|
+
}
|
|
1122
|
+
: {}), { class: `
|
|
1094
1123
|
${this.extraClass || ''}
|
|
1095
1124
|
input ${this.type === 'radio' ? 'input-radio' : this.type === 'checkbox' ? 'input-checkbox' : ''}
|
|
1096
1125
|
${withIcon && this.type !== 'radio' && this.type !== 'checkbox' ? 'input-icon pl-36' : ''}
|
|
1097
1126
|
${this.error ? 'input-error' : ''}
|
|
1098
|
-
`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, maxlength: this.maxLength, onInput: this.handleInput, onChange: this.handleInput })), this.maxLength && this.type === 'textarea' && (h("span", { key: '
|
|
1127
|
+
`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, maxlength: this.maxLength, onInput: this.handleInput, onChange: this.handleInput }))), this.maxLength && this.type === 'textarea' && (h("span", { key: '3cbf1dbffabb0cb895c6b69651933867584606d0', class: `input-counter f-ui-05 absolute bottom-8 right-8 ${this.maxLengthReached ? 'input-counter-error' : ''}` }, this.maxLength)), this.icon && (h("eds-icon-wrapper", { key: 'fb3a7051ecb72a5f425a0590dae14ee731e40a60', class: `absolute top-1/2 left-[4px] -translate-y-1/2 ${this.disabled ? 'text-lightest' : 'text-lightest'}`, icon: this.icon }))));
|
|
1099
1128
|
}
|
|
1100
1129
|
get el() { return getElement(this); }
|
|
1101
1130
|
static get watchers() { return {
|
|
@@ -1112,19 +1141,52 @@ const EdsInputField = class {
|
|
|
1112
1141
|
this.edsinput = createEvent(this, "edsinput", 7);
|
|
1113
1142
|
this.edschange = createEvent(this, "edschange", 7);
|
|
1114
1143
|
this.handleNativeInput = (ev) => {
|
|
1115
|
-
var _a;
|
|
1144
|
+
var _a, _b;
|
|
1116
1145
|
(_a = this.onInput) === null || _a === void 0 ? void 0 : _a.call(this, ev);
|
|
1117
1146
|
if (this.shouldEmitValue()) {
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1147
|
+
const target = ev.target;
|
|
1148
|
+
let value = target.value;
|
|
1149
|
+
if (this.type === 'checkbox' && ((_b = this.parsedOptions) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
1150
|
+
// checkbox group case
|
|
1151
|
+
const checkboxes = this.hostEl.querySelectorAll(`input[type="checkbox"][name="${this.name}"]`);
|
|
1152
|
+
value = Array.from(checkboxes)
|
|
1153
|
+
.filter(cb => cb.checked)
|
|
1154
|
+
.map(cb => cb.value);
|
|
1155
|
+
}
|
|
1156
|
+
else if (this.type === 'checkbox') {
|
|
1157
|
+
value = target.checked;
|
|
1158
|
+
}
|
|
1159
|
+
else if (this.type === 'radio') {
|
|
1160
|
+
value = target.value;
|
|
1161
|
+
}
|
|
1162
|
+
else {
|
|
1163
|
+
value = target.value;
|
|
1164
|
+
}
|
|
1165
|
+
this.edsinput.emit({ value });
|
|
1120
1166
|
}
|
|
1121
1167
|
};
|
|
1122
1168
|
this.handleNativeChange = (ev) => {
|
|
1123
|
-
var _a;
|
|
1169
|
+
var _a, _b;
|
|
1124
1170
|
(_a = this.onChangeNative) === null || _a === void 0 ? void 0 : _a.call(this, ev);
|
|
1125
1171
|
if (this.shouldEmitValue()) {
|
|
1126
1172
|
const target = ev.target;
|
|
1127
|
-
|
|
1173
|
+
let value = target.value;
|
|
1174
|
+
if (this.type === 'checkbox' && ((_b = this.parsedOptions) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
1175
|
+
// checkbox group case
|
|
1176
|
+
const checkboxes = this.hostEl.querySelectorAll(`input[type="checkbox"][name="${this.name}"]`);
|
|
1177
|
+
value = Array.from(checkboxes)
|
|
1178
|
+
.filter(cb => cb.checked)
|
|
1179
|
+
.map(cb => cb.value);
|
|
1180
|
+
}
|
|
1181
|
+
else if (this.type === 'checkbox') {
|
|
1182
|
+
value = target.checked;
|
|
1183
|
+
}
|
|
1184
|
+
else if (this.type === 'radio') {
|
|
1185
|
+
value = target.value;
|
|
1186
|
+
}
|
|
1187
|
+
else {
|
|
1188
|
+
value = target.value;
|
|
1189
|
+
}
|
|
1128
1190
|
this.edschange.emit({ value });
|
|
1129
1191
|
}
|
|
1130
1192
|
};
|
|
@@ -1143,6 +1205,9 @@ const EdsInputField = class {
|
|
|
1143
1205
|
this.errorMessage = undefined;
|
|
1144
1206
|
this.value = undefined;
|
|
1145
1207
|
this.maxLength = undefined;
|
|
1208
|
+
this.min = undefined;
|
|
1209
|
+
this.max = undefined;
|
|
1210
|
+
this.step = undefined;
|
|
1146
1211
|
this.options = undefined;
|
|
1147
1212
|
this.type = 'text';
|
|
1148
1213
|
this.onChangeNative = undefined;
|
|
@@ -1167,22 +1232,9 @@ const EdsInputField = class {
|
|
|
1167
1232
|
return [];
|
|
1168
1233
|
}
|
|
1169
1234
|
render() {
|
|
1170
|
-
const inputOpts = {
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
placeholder: this.placeholder,
|
|
1174
|
-
disabled: this.disabled,
|
|
1175
|
-
onInput: this.handleNativeInput,
|
|
1176
|
-
onChange: this.handleNativeChange,
|
|
1177
|
-
type: this.type,
|
|
1178
|
-
required: this.required,
|
|
1179
|
-
value: this.value,
|
|
1180
|
-
error: this.error,
|
|
1181
|
-
icon: this.icon,
|
|
1182
|
-
checked: this.checked
|
|
1183
|
-
};
|
|
1184
|
-
return (h("div", { key: '6f048dc1418d0738fc097d3c48148ccfdf70fbdc' }, this.type === 'checkbox' || this.type === 'radio' ? (this.parsedOptions.length > 0 ? (h("fieldset", { class: "space-y-4 mt-8" }, h("div", { class: "flex justify-between" }, this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, required: this.required })), this.hint && (h("p", { id: `${this.name}-hint`, class: "f-ui-05 text-lighter mt-8 ml-8" }, this.hint))), this.parsedOptions.map((option) => (h("div", { class: "flex items-center gap-x-2", key: option.value }, h("eds-input", Object.assign({}, inputOpts, { value: option.value, checked: typeof this.value === 'string' &&
|
|
1185
|
-
this.value.split(',').includes(String(option.value)) })), h("eds-input-label", { name: `${this.name}-${option.value}`, label: option.label })))))) : (h("div", { class: "flex items-center gap-x-8" }, h("eds-input", Object.assign({}, inputOpts, { value: this.value, checked: this.value === 'on' })), this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required }))))) : (h("div", null, h("div", { class: "flex justify-between" }, this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required })), this.hint && (h("p", { id: `${this.name}-hint`, class: "f-ui-05 text-lighter mt-8 ml-8" }, this.hint))), this.type === 'select' ? (h("eds-input-select", Object.assign({}, inputOpts, { options: this.parsedOptions }))) : this.type === 'file' ? (h("input", { type: "file", id: this.inputId || this.name, name: this.name, onChange: this.onChangeNative, disabled: this.disabled, required: this.required })) : this.type === 'search' ? (h("eds-input-search", { name: "search-box" })) : this.type === 'range' ? ((() => {
|
|
1235
|
+
const inputOpts = Object.assign({ name: this.name, id: this.inputId, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleNativeInput, onChange: this.handleNativeChange, type: this.type, required: this.required, value: this.value, error: this.error, icon: this.icon, checked: this.checked }, (this.type === 'number' ? { min: this.min, max: this.max, step: this.step } : {}));
|
|
1236
|
+
return (h("div", { key: '48926c14240f7e26d2277729d829d98ab17f9eee' }, this.type === 'checkbox' || this.type === 'radio' ? (this.parsedOptions.length > 0 ? (h("fieldset", { class: "space-y-4 mt-8" }, h("div", { class: "flex justify-between" }, this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, required: this.required })), this.hint && (h("p", { id: `${this.name}-hint`, class: "f-ui-05 text-lighter mt-8 ml-8" }, this.hint))), this.parsedOptions.map((option) => (h("div", { class: "flex items-center gap-x-2", key: option.value }, h("eds-input", Object.assign({}, inputOpts, { value: option.value, checked: typeof this.value === 'string' &&
|
|
1237
|
+
this.value.split(',').includes(String(option.value)) })), h("eds-input-label", { name: `${this.name}-${option.value}`, label: option.label })))))) : (h("div", { class: "flex items-center gap-x-8" }, h("eds-input", Object.assign({}, inputOpts, { value: this.value, checked: this.value === 'on' || this.checked })), this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required }))))) : (h("div", null, h("div", { class: "flex justify-between" }, this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required })), this.hint && (h("p", { id: `${this.name}-hint`, class: "f-ui-05 text-lighter mt-8 ml-8" }, this.hint))), this.type === 'select' ? (h("eds-input-select", Object.assign({}, inputOpts, { options: this.parsedOptions }))) : this.type === 'file' ? (h("input", { type: "file", id: this.inputId || this.name, name: this.name, onChange: this.onChangeNative, disabled: this.disabled, required: this.required })) : this.type === 'search' ? (h("eds-input-search", { name: "search-box" })) : this.type === 'range' ? ((() => {
|
|
1186
1238
|
var _a, _b, _c;
|
|
1187
1239
|
const rangeProps = {
|
|
1188
1240
|
name: inputOpts.name,
|
|
@@ -1195,7 +1247,7 @@ const EdsInputField = class {
|
|
|
1195
1247
|
const opt = this.parsedOptions;
|
|
1196
1248
|
const numberValue = typeof this.value === 'string' ? parseFloat(this.value) : this.value || 0;
|
|
1197
1249
|
return (h("eds-input-range", Object.assign({}, rangeProps, { min: (_a = opt[0]) === null || _a === void 0 ? void 0 : _a.value, max: (_b = opt[1]) === null || _b === void 0 ? void 0 : _b.value, step: (_c = opt[2]) === null || _c === void 0 ? void 0 : _c.value, value: numberValue })));
|
|
1198
|
-
})()) : (h("eds-input", Object.assign({}, inputOpts))))), h("div", { key: '
|
|
1250
|
+
})()) : (h("eds-input", Object.assign({}, inputOpts))))), h("div", { key: '72b565ac1c52a56d7e563e227baf187d72f2ba21', class: "mt-4" }, h("eds-input-footer", { key: '65c40184d6fd5dfc730a46ffe8e826687c7d6f36', id: `${this.name}-footer`, name: this.name, message: this.message, "error-message": this.errorMessage, error: this.error, link: this.link }))));
|
|
1199
1251
|
}
|
|
1200
1252
|
get hostEl() { return getElement(this); }
|
|
1201
1253
|
};
|
|
@@ -2413,10 +2465,9 @@ const EdsTable = class {
|
|
|
2413
2465
|
}
|
|
2414
2466
|
updateColumns() {
|
|
2415
2467
|
var _a, _b;
|
|
2416
|
-
//
|
|
2468
|
+
// Grab all data‐keys from the first row (if any) as before:
|
|
2417
2469
|
this.columns = this.tbData.length > 0 ? Object.keys(this.tbData[0]) : [];
|
|
2418
|
-
//
|
|
2419
|
-
// (you can call it anything; we’ll detect it in render())
|
|
2470
|
+
// Instead of pushing each action.name, add just a single “actions” column
|
|
2420
2471
|
if (((_b = (_a = this.parsedActions) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0 && this.tbData.length > 0) {
|
|
2421
2472
|
this.columns.push('actions');
|
|
2422
2473
|
}
|
|
@@ -2443,30 +2494,26 @@ const EdsTable = class {
|
|
|
2443
2494
|
const columnWidth = visibleColumnsCount > 0 ? Math.floor((currentContainerWidth / visibleColumnsCount) * this.divisionFactor()) : 100;
|
|
2444
2495
|
const paginatedRows = this.getPaginatedRows();
|
|
2445
2496
|
const lastPage = Math.ceil(this.totalRows / this.rowsPerPage);
|
|
2446
|
-
return (h("div", { key: '
|
|
2497
|
+
return (h("div", { key: 'f188b98870101f250e8515178d50763bb708ade5' }, this.searchEnabled && (h("div", { key: '96f046ad286df6cb46e9f9f6d3e45a69f90af108' }, h("eds-input-field", { key: 1, name: "search", "aria-label": "Search", type: "text", placeholder: "Search...", onInput: (event) => this.handleSearch(event) }))), h("div", { key: 'bbf27504732266f3e3ae299fcf742a653a23fdef', class: "mt-20" }, h("table", { key: 'a1c76a7b0d4c4a1382c34cf58a49896567610403', class: "block overflow-x-auto mt-6 p-0" }, h("thead", { key: 'ea7e4b5d1c48c63094a96ba5c8fb38bf8e805024' }, h("tr", { key: '6e49bc93f9678f5f6449269728ca893a88ceb51a', class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((col) => {
|
|
2447
2498
|
var _a;
|
|
2448
|
-
// 3) For the “actions” column, override the header to “Actions”
|
|
2449
2499
|
if (col === 'actions') {
|
|
2450
|
-
|
|
2451
|
-
return (h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${columnWidth - 4}px` } }, "Actions"));
|
|
2500
|
+
return (h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${columnWidth - 4}px` } }));
|
|
2452
2501
|
}
|
|
2453
|
-
// Otherwise, render column name or action label if you do want to override:
|
|
2454
2502
|
if (!((_a = this.parsedConfig[col]) === null || _a === void 0 ? void 0 : _a.hidden)) {
|
|
2455
2503
|
return (h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${columnWidth - 4}px` } }, this.capitalize(col)));
|
|
2456
2504
|
}
|
|
2457
2505
|
return null;
|
|
2458
|
-
}))), h("tbody", { key: '
|
|
2506
|
+
}))), h("tbody", { key: '7f09b3133241c4a19ad75c27134c04192e9dc357' }, paginatedRows.map((row) => (h("tr", { class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((col) => {
|
|
2459
2507
|
var _a;
|
|
2460
2508
|
if (col === 'actions') {
|
|
2461
|
-
// 4) Render ALL actions inside a single <td> for this row:
|
|
2462
2509
|
return (h("td", { class: "text-center border border-softer m-0 f-ui-02 break-words actions-cell", style: { minWidth: `${columnWidth - 4}px` } }, h("div", { style: { display: 'flex', gap: '0.5rem', justifyContent: 'center', flexWrap: 'wrap' } }, this.parsedActions.map((act) => (h("span", { style: { whiteSpace: 'nowrap' } }, this.renderSingleActionCell(act.name, row)))))));
|
|
2463
2510
|
}
|
|
2464
2511
|
if (!((_a = this.parsedConfig[col]) === null || _a === void 0 ? void 0 : _a.hidden)) {
|
|
2465
|
-
// Regular data cell
|
|
2512
|
+
// Regular data cell
|
|
2466
2513
|
return (h("td", { class: "text-center border border-softer m-0 py-8 f-ui-2 break-words", style: { minWidth: `${columnWidth - 4}px` } }, this.renderCell(row[col], col)));
|
|
2467
2514
|
}
|
|
2468
2515
|
return null;
|
|
2469
|
-
}))))))), this.shouldEnablePagination() && (h("div", { key: '
|
|
2516
|
+
}))))))), this.shouldEnablePagination() && (h("div", { key: 'ceb320ba2e1cb14e4220c653c92bb2a9e8bf3593', class: "mt-20" }, h("eds-pagination", { key: '19c22566443e476742fd7f5e232c9240ecb34bec', currentPage: this.currentPage, lastPage: lastPage, perPage: this.rowsPerPage, total: this.totalRows, mode: "default" })))));
|
|
2470
2517
|
}
|
|
2471
2518
|
get hostEl() { return getElement(this); }
|
|
2472
2519
|
static get watchers() { return {
|
|
@@ -2638,6 +2685,77 @@ const EdsTag = class {
|
|
|
2638
2685
|
};
|
|
2639
2686
|
EdsTag.style = EdsTagStyle0;
|
|
2640
2687
|
|
|
2688
|
+
const edsToastCss = ".relative{position:relative}.right-4{right:0.25rem}.bottom-4{bottom:0.25rem}.w-auto{width:auto}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-4{gap:0.25rem}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.ml-8{margin-left:0.5rem}.p-12{padding:0.75rem}.rounded-lg{border-radius:16px}.shadow-md{--tw-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),\n 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.bg-dark{background-color:var(--grey-300)}.bg-success{background-color:var(--green-200)}.bg-error{background-color:var(--red-200)}.bg-warning{background-color:var(--yellow-200)}.text-light{color:var(--grey-700)}.text-current{color:currentColor}.text-default{color:var(--black)}";
|
|
2689
|
+
const EdsToastStyle0 = edsToastCss;
|
|
2690
|
+
|
|
2691
|
+
const toastStyles = cva(['relative bottom-4 w-auto p-12 rounded-lg shadow-md'], {
|
|
2692
|
+
variants: {
|
|
2693
|
+
intent: {
|
|
2694
|
+
default: 'bg-dark text-light',
|
|
2695
|
+
success: 'bg-success text-dark',
|
|
2696
|
+
error: 'bg-error text-light',
|
|
2697
|
+
warning: 'bg-warning text-dark'
|
|
2698
|
+
}
|
|
2699
|
+
},
|
|
2700
|
+
defaultVariants: {
|
|
2701
|
+
intent: 'default'
|
|
2702
|
+
}
|
|
2703
|
+
});
|
|
2704
|
+
const EdsToast = class {
|
|
2705
|
+
constructor(hostRef) {
|
|
2706
|
+
registerInstance(this, hostRef);
|
|
2707
|
+
this.toast = createEvent(this, "toast", 7);
|
|
2708
|
+
/**
|
|
2709
|
+
* Dismisses the toast.
|
|
2710
|
+
*/
|
|
2711
|
+
this.dismissToast = () => {
|
|
2712
|
+
this.toast.emit({ visible: false, label: 'dismissed' });
|
|
2713
|
+
this.visible = false;
|
|
2714
|
+
};
|
|
2715
|
+
this.message = undefined;
|
|
2716
|
+
this.intent = 'default';
|
|
2717
|
+
this.duration = undefined;
|
|
2718
|
+
this.visible = true;
|
|
2719
|
+
}
|
|
2720
|
+
componentDidLoad() {
|
|
2721
|
+
const btn = this.el.shadowRoot.querySelector('eds-button');
|
|
2722
|
+
this.emitContext(btn);
|
|
2723
|
+
}
|
|
2724
|
+
/**
|
|
2725
|
+
* Emits a custom event called `parentContext` for a given button element.
|
|
2726
|
+
* This event provides context information about the toast component.
|
|
2727
|
+
*
|
|
2728
|
+
* @param btnElement - The link element to which the event will be dispatched.
|
|
2729
|
+
*/
|
|
2730
|
+
emitContext(btnElement) {
|
|
2731
|
+
const event = new CustomEvent('parentContext', {
|
|
2732
|
+
detail: {
|
|
2733
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
2734
|
+
identifier: null
|
|
2735
|
+
}
|
|
2736
|
+
});
|
|
2737
|
+
btnElement.dispatchEvent(event);
|
|
2738
|
+
}
|
|
2739
|
+
connectedCallback() {
|
|
2740
|
+
if (this.duration && this.duration > 0) {
|
|
2741
|
+
this.dismissTimeout = setTimeout(this.dismissToast, this.duration);
|
|
2742
|
+
}
|
|
2743
|
+
}
|
|
2744
|
+
disconnectedCallback() {
|
|
2745
|
+
// Clear the timeout when the component is removed
|
|
2746
|
+
clearTimeout(this.dismissTimeout);
|
|
2747
|
+
}
|
|
2748
|
+
render() {
|
|
2749
|
+
if (!this.visible) {
|
|
2750
|
+
return null;
|
|
2751
|
+
}
|
|
2752
|
+
const classes = toastStyles({ intent: this.intent });
|
|
2753
|
+
return (h("div", { class: classes, role: "alert", "aria-live": "assertive" }, h("div", { class: "flex items-center justify-between gap-4" }, h("span", { class: "f-ui-01" }, this.message), h("eds-button", { intent: "tertiary", icon: "close", "aria-label": "Close Toast", onClick: () => this.dismissToast(), "extra-class": "ml-8" }))));
|
|
2754
|
+
}
|
|
2755
|
+
get el() { return getElement(this); }
|
|
2756
|
+
};
|
|
2757
|
+
EdsToast.style = EdsToastStyle0;
|
|
2758
|
+
|
|
2641
2759
|
const edsUserCss = "hr,p{margin:0}.block{display:block}.flex{display:flex}.flex-col{flex-direction:column}.items-center{align-items:center}.text-default{color:var(--black)}.min-w-\\[280px\\]{min-width:280px}.p-8{padding:0.5rem}.gap-x-16{-moz-column-gap:1rem;column-gap:1rem}.gap-y-8{row-gap:0.5rem}.pb-16{padding-bottom:1rem}.border-b-2{border-bottom-width:2px}.border-softer{border-color:rgba(0, 0, 0, .1 )}.max-w-full{max-width:100%}.w-full{width:100%}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.text-light{color:var(--grey-700)}.mt-4{margin-top:0.25rem}.mt-16{margin-top:1rem}";
|
|
2642
2760
|
const EdsUserStyle0 = edsUserCss;
|
|
2643
2761
|
|
|
@@ -2676,4 +2794,4 @@ const EdsUser = class {
|
|
|
2676
2794
|
};
|
|
2677
2795
|
EdsUser.style = EdsUserStyle0;
|
|
2678
2796
|
|
|
2679
|
-
export { EdsAvatar as eds_avatar, EdsBlockBreak as eds_block_break, EdsButton as eds_button, EdsDropdown as eds_dropdown, EdsFooter as eds_footer, EdsForm as eds_form, EdsFullscreenMenu as eds_fullscreen_menu, EdsHeader as eds_header, EdsIconWrapper as eds_icon_wrapper, EdsImg as eds_img, EdsInput as eds_input, EdsInputField as eds_input_field, EdsInputFooter as eds_input_footer, EdsInputLabel as eds_input_label, EdsInputRange as eds_input_range, EdsInputSearch as eds_input_search, EdsInputSelect as eds_input_select, EdsLink as eds_link, EdsLogo as eds_logo, EdsModal as eds_modal, EdsPagination as eds_pagination, EdsSocialNetworks as eds_social_networks, EdsSteps as eds_steps, EdsStepsV2 as eds_steps_v2, EdsTable as eds_table, EdsTabs as eds_tabs, EdsTag as eds_tag, EdsUser as eds_user };
|
|
2797
|
+
export { EdsAvatar as eds_avatar, EdsBlockBreak as eds_block_break, EdsButton as eds_button, EdsDropdown as eds_dropdown, EdsFooter as eds_footer, EdsForm as eds_form, EdsFullscreenMenu as eds_fullscreen_menu, EdsHeader as eds_header, EdsIconWrapper as eds_icon_wrapper, EdsImg as eds_img, EdsInput as eds_input, EdsInputField as eds_input_field, EdsInputFooter as eds_input_footer, EdsInputLabel as eds_input_label, EdsInputRange as eds_input_range, EdsInputSearch as eds_input_search, EdsInputSelect as eds_input_select, EdsLink as eds_link, EdsLogo as eds_logo, EdsModal as eds_modal, EdsPagination as eds_pagination, EdsSocialNetworks as eds_social_networks, EdsSteps as eds_steps, EdsStepsV2 as eds_steps_v2, EdsTable as eds_table, EdsTabs as eds_tabs, EdsTag as eds_tag, EdsToast as eds_toast, EdsUser as eds_user };
|
|
@@ -52,10 +52,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
52
52
|
}
|
|
53
53
|
switch(bundleId) {
|
|
54
54
|
|
|
55
|
-
case 'eds-
|
|
55
|
+
case 'eds-avatar_29':
|
|
56
56
|
return import(
|
|
57
57
|
/* webpackMode: "lazy" */
|
|
58
|
-
'./eds-
|
|
58
|
+
'./eds-avatar_29.entry.js').then(processMod, consoleError);
|
|
59
59
|
case 'components-section':
|
|
60
60
|
return import(
|
|
61
61
|
/* webpackMode: "lazy" */
|
|
@@ -332,10 +332,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
332
332
|
return import(
|
|
333
333
|
/* webpackMode: "lazy" */
|
|
334
334
|
'./eds-splash-screen.entry.js').then(processMod, consoleError);
|
|
335
|
-
case 'eds-toast':
|
|
336
|
-
return import(
|
|
337
|
-
/* webpackMode: "lazy" */
|
|
338
|
-
'./eds-toast.entry.js').then(processMod, consoleError);
|
|
339
335
|
case 'logo-variations-horizontal_2':
|
|
340
336
|
return import(
|
|
341
337
|
/* webpackMode: "lazy" */
|