@syncfusion/ej2-navigations 16.4.47 → 16.4.52-46585
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/.eslintrc.json +259 -0
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +63 -0
- package/.github/PULL_REQUEST_TEMPLATE/feature.md +39 -0
- package/CHANGELOG.md +1419 -0
- package/README.md +226 -112
- package/appbar.d.ts +4 -0
- package/appbar.js +4 -0
- package/breadcrumb.d.ts +4 -0
- package/breadcrumb.js +4 -0
- package/carousel.d.ts +4 -0
- package/carousel.js +4 -0
- package/dist/ej2-navigations.min.js +1 -0
- package/dist/ej2-navigations.umd.min.js +1 -10
- package/dist/ej2-navigations.umd.min.js.map +1 -1
- package/dist/es6/ej2-navigations.es2015.js +8469 -2261
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +8157 -1833
- package/dist/es6/ej2-navigations.es5.js.map +1 -1
- package/dist/global/ej2-navigations.min.js +1 -10
- package/dist/global/ej2-navigations.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/helpers/e2e/accordionHelper.d.ts +56 -0
- package/helpers/e2e/accordionHelper.js +71 -0
- package/helpers/e2e/contextmenuHelper.d.ts +37 -0
- package/helpers/e2e/contextmenuHelper.js +53 -0
- package/helpers/e2e/index.d.ts +7 -0
- package/helpers/e2e/index.js +14 -0
- package/helpers/e2e/menuHelper.d.ts +37 -0
- package/helpers/e2e/menuHelper.js +53 -0
- package/helpers/e2e/sidebarHelper.d.ts +94 -0
- package/helpers/e2e/sidebarHelper.js +110 -0
- package/helpers/e2e/tabHelper.d.ts +60 -0
- package/helpers/e2e/tabHelper.js +74 -0
- package/helpers/e2e/toolbarHelper.d.ts +60 -0
- package/helpers/e2e/toolbarHelper.js +74 -0
- package/helpers/e2e/treeview.d.ts +50 -0
- package/helpers/e2e/treeview.js +80 -0
- package/package.json +105 -105
- package/src/accordion/accordion-model.d.ts +122 -45
- package/src/accordion/accordion.d.ts +169 -48
- package/src/accordion/accordion.js +530 -230
- package/src/appbar/appbar-model.d.ts +76 -0
- package/src/appbar/appbar.d.ts +115 -0
- package/src/appbar/appbar.js +220 -0
- package/src/appbar/index.d.ts +3 -0
- package/src/appbar/index.js +2 -0
- package/src/breadcrumb/breadcrumb-model.d.ts +161 -0
- package/src/breadcrumb/breadcrumb.d.ts +285 -0
- package/src/breadcrumb/breadcrumb.js +789 -0
- package/src/breadcrumb/index.d.ts +5 -0
- package/src/breadcrumb/index.js +4 -0
- package/src/carousel/carousel-model.d.ts +223 -0
- package/src/carousel/carousel.d.ts +344 -0
- package/src/carousel/carousel.js +1100 -0
- package/src/carousel/index.d.ts +3 -0
- package/src/carousel/index.js +2 -0
- package/src/common/h-scroll-model.d.ts +1 -0
- package/src/common/h-scroll.d.ts +21 -10
- package/src/common/h-scroll.js +58 -36
- package/src/common/index.d.ts +2 -0
- package/src/common/index.js +2 -0
- package/src/common/menu-base-model.d.ts +77 -22
- package/src/common/menu-base.d.ts +192 -41
- package/src/common/menu-base.js +1104 -366
- package/src/common/menu-scroll.d.ts +29 -0
- package/src/common/menu-scroll.js +103 -0
- package/src/common/v-scroll-model.d.ts +1 -0
- package/src/common/v-scroll.d.ts +20 -9
- package/src/common/v-scroll.js +47 -20
- package/src/context-menu/context-menu-model.d.ts +7 -3
- package/src/context-menu/context-menu.d.ts +25 -10
- package/src/context-menu/context-menu.js +27 -15
- package/src/index.d.ts +3 -0
- package/src/index.js +3 -0
- package/src/menu/menu-model.d.ts +34 -1
- package/src/menu/menu.d.ts +60 -6
- package/src/menu/menu.js +144 -18
- package/src/sidebar/sidebar-model.d.ts +54 -25
- package/src/sidebar/sidebar.d.ts +117 -22
- package/src/sidebar/sidebar.js +250 -120
- package/src/tab/tab-model.d.ts +156 -37
- package/src/tab/tab.d.ts +286 -61
- package/src/tab/tab.js +1136 -331
- package/src/toolbar/toolbar-model.d.ts +110 -29
- package/src/toolbar/toolbar.d.ts +185 -55
- package/src/toolbar/toolbar.js +595 -234
- package/src/treeview/treeview-model.d.ts +269 -83
- package/src/treeview/treeview.d.ts +497 -74
- package/src/treeview/treeview.js +2006 -409
- package/styles/accordion/_all.scss +0 -1
- package/styles/accordion/_bootstrap-dark-definition.scss +171 -67
- package/styles/accordion/_bootstrap-definition.scss +115 -11
- package/styles/accordion/_bootstrap4-definition.scss +182 -0
- package/styles/accordion/_bootstrap5-dark-definition.scss +1 -0
- package/styles/accordion/_bootstrap5-definition.scss +180 -0
- package/styles/accordion/_fabric-dark-definition.scss +171 -69
- package/styles/accordion/_fabric-definition.scss +119 -15
- package/styles/accordion/_fluent-dark-definition.scss +1 -0
- package/styles/accordion/_fluent-definition.scss +179 -0
- package/styles/accordion/_fusionnew-definition.scss +180 -0
- package/styles/accordion/_highcontrast-definition.scss +122 -23
- package/styles/accordion/_highcontrast-light-definition.scss +192 -95
- package/styles/accordion/_layout.scss +100 -162
- package/styles/accordion/_material-dark-definition.scss +173 -70
- package/styles/accordion/_material-definition.scss +115 -11
- package/styles/accordion/_tailwind-dark-definition.scss +1 -0
- package/styles/accordion/_tailwind-definition.scss +178 -0
- package/styles/accordion/_theme.scss +219 -224
- package/styles/accordion/bootstrap-dark.css +267 -181
- package/styles/accordion/bootstrap-dark.scss +1 -0
- package/styles/accordion/bootstrap.css +258 -172
- package/styles/accordion/bootstrap.scss +1 -0
- package/styles/accordion/bootstrap4.css +525 -0
- package/styles/accordion/bootstrap4.scss +4 -0
- package/styles/accordion/bootstrap5-dark.css +527 -0
- package/styles/accordion/bootstrap5-dark.scss +4 -0
- package/styles/accordion/bootstrap5.css +527 -0
- package/styles/accordion/bootstrap5.scss +4 -0
- package/styles/accordion/fabric-dark.css +266 -164
- package/styles/accordion/fabric-dark.scss +1 -0
- package/styles/accordion/fabric.css +266 -164
- package/styles/accordion/fabric.scss +1 -0
- package/styles/accordion/fluent-dark.css +526 -0
- package/styles/accordion/fluent-dark.scss +4 -0
- package/styles/accordion/fluent.css +526 -0
- package/styles/accordion/fluent.scss +4 -0
- package/styles/accordion/highcontrast-light.css +525 -0
- package/styles/accordion/highcontrast-light.scss +4 -0
- package/styles/accordion/highcontrast.css +243 -232
- package/styles/accordion/highcontrast.scss +1 -0
- package/styles/accordion/{_icons.scss → icons/_bootstrap-dark.scss} +3 -3
- package/styles/accordion/icons/_bootstrap.scss +17 -0
- package/styles/accordion/icons/_bootstrap4.scss +17 -0
- package/styles/accordion/icons/_bootstrap5-dark.scss +1 -0
- package/styles/accordion/icons/_bootstrap5.scss +17 -0
- package/styles/accordion/icons/_fabric-dark.scss +17 -0
- package/styles/accordion/icons/_fabric.scss +17 -0
- package/styles/accordion/icons/_fluent-dark.scss +1 -0
- package/styles/accordion/icons/_fluent.scss +17 -0
- package/styles/accordion/icons/_fusionnew.scss +17 -0
- package/styles/accordion/icons/_highcontrast-light.scss +17 -0
- package/styles/accordion/icons/_highcontrast.scss +17 -0
- package/styles/accordion/icons/_material-dark.scss +17 -0
- package/styles/accordion/icons/_material.scss +17 -0
- package/styles/accordion/icons/_material3.scss +17 -0
- package/styles/accordion/icons/_tailwind-dark.scss +1 -0
- package/styles/accordion/icons/_tailwind.scss +17 -0
- package/styles/accordion/material-dark.css +268 -173
- package/styles/accordion/material-dark.scss +1 -0
- package/styles/accordion/material.css +264 -169
- package/styles/accordion/material.scss +1 -0
- package/styles/accordion/tailwind-dark.css +527 -0
- package/styles/accordion/tailwind-dark.scss +4 -0
- package/styles/accordion/tailwind.css +527 -0
- package/styles/accordion/tailwind.scss +4 -0
- package/styles/appbar/_all.scss +2 -0
- package/styles/appbar/_bootstrap-dark-definition.scss +8 -0
- package/styles/appbar/_bootstrap-definition.scss +8 -0
- package/styles/appbar/_bootstrap4-definition.scss +8 -0
- package/styles/appbar/_bootstrap5-dark-definition.scss +1 -0
- package/styles/appbar/_bootstrap5-definition.scss +8 -0
- package/styles/appbar/_fabric-dark-definition.scss +8 -0
- package/styles/appbar/_fabric-definition.scss +8 -0
- package/styles/appbar/_fluent-dark-definition.scss +1 -0
- package/styles/appbar/_fluent-definition.scss +8 -0
- package/styles/appbar/_fusionnew-definition.scss +8 -0
- package/styles/appbar/_highcontrast-definition.scss +8 -0
- package/styles/appbar/_highcontrast-light-definition.scss +8 -0
- package/styles/appbar/_layout.scss +84 -0
- package/styles/appbar/_material-dark-definition.scss +8 -0
- package/styles/appbar/_material-definition.scss +8 -0
- package/styles/appbar/_tailwind-dark-definition.scss +1 -0
- package/styles/appbar/_tailwind-definition.scss +8 -0
- package/styles/appbar/_theme.scss +208 -0
- package/styles/appbar/bootstrap-dark.css +247 -0
- package/styles/appbar/bootstrap-dark.scss +3 -0
- package/styles/appbar/bootstrap.css +247 -0
- package/styles/appbar/bootstrap.scss +3 -0
- package/styles/appbar/bootstrap4.css +247 -0
- package/styles/appbar/bootstrap4.scss +3 -0
- package/styles/appbar/bootstrap5-dark.css +247 -0
- package/styles/appbar/bootstrap5-dark.scss +3 -0
- package/styles/appbar/bootstrap5.css +247 -0
- package/styles/appbar/bootstrap5.scss +3 -0
- package/styles/appbar/fabric-dark.css +247 -0
- package/styles/appbar/fabric-dark.scss +3 -0
- package/styles/appbar/fabric.css +247 -0
- package/styles/appbar/fabric.scss +3 -0
- package/styles/appbar/fluent-dark.css +247 -0
- package/styles/appbar/fluent-dark.scss +3 -0
- package/styles/appbar/fluent.css +247 -0
- package/styles/appbar/fluent.scss +3 -0
- package/styles/appbar/highcontrast-light.css +247 -0
- package/styles/appbar/highcontrast-light.scss +3 -0
- package/styles/appbar/highcontrast.css +247 -0
- package/styles/appbar/highcontrast.scss +3 -0
- package/styles/appbar/material-dark.css +248 -0
- package/styles/appbar/material-dark.scss +3 -0
- package/styles/appbar/material.css +248 -0
- package/styles/appbar/material.scss +3 -0
- package/styles/appbar/tailwind-dark.css +248 -0
- package/styles/appbar/tailwind-dark.scss +3 -0
- package/styles/appbar/tailwind.css +248 -0
- package/styles/appbar/tailwind.scss +3 -0
- package/styles/bootstrap-dark.css +5500 -3485
- package/styles/bootstrap-dark.scss +4 -0
- package/styles/bootstrap.css +5417 -3557
- package/styles/bootstrap.scss +4 -0
- package/styles/bootstrap4.css +10166 -0
- package/styles/bootstrap4.scss +13 -0
- package/styles/bootstrap5-dark.css +10207 -0
- package/styles/bootstrap5-dark.scss +13 -0
- package/styles/bootstrap5.css +10207 -0
- package/styles/bootstrap5.scss +13 -0
- package/styles/breadcrumb/_all.scss +3 -0
- package/styles/breadcrumb/_bootstrap-dark-definition.scss +54 -0
- package/styles/breadcrumb/_bootstrap-definition.scss +54 -0
- package/styles/breadcrumb/_bootstrap4-definition.scss +54 -0
- package/styles/breadcrumb/_bootstrap5-dark-definition.scss +1 -0
- package/styles/breadcrumb/_bootstrap5-definition.scss +59 -0
- package/styles/breadcrumb/_fabric-dark-definition.scss +59 -0
- package/styles/breadcrumb/_fabric-definition.scss +59 -0
- package/styles/breadcrumb/_fluent-dark-definition.scss +1 -0
- package/styles/breadcrumb/_fluent-definition.scss +62 -0
- package/styles/breadcrumb/_fusionnew-definition.scss +59 -0
- package/styles/breadcrumb/_highcontrast-definition.scss +61 -0
- package/styles/breadcrumb/_highcontrast-light-definition.scss +61 -0
- package/styles/breadcrumb/_layout.scss +491 -0
- package/styles/breadcrumb/_material-dark-definition.scss +50 -0
- package/styles/breadcrumb/_material-definition.scss +50 -0
- package/styles/breadcrumb/_tailwind-dark-definition.scss +1 -0
- package/styles/breadcrumb/_tailwind-definition.scss +60 -0
- package/styles/breadcrumb/_theme.scss +176 -0
- package/styles/breadcrumb/bootstrap-dark.css +395 -0
- package/styles/breadcrumb/bootstrap-dark.scss +4 -0
- package/styles/breadcrumb/bootstrap.css +395 -0
- package/styles/breadcrumb/bootstrap.scss +4 -0
- package/styles/breadcrumb/bootstrap4.css +395 -0
- package/styles/breadcrumb/bootstrap4.scss +4 -0
- package/styles/breadcrumb/bootstrap5-dark.css +409 -0
- package/styles/breadcrumb/bootstrap5-dark.scss +4 -0
- package/styles/breadcrumb/bootstrap5.css +409 -0
- package/styles/breadcrumb/bootstrap5.scss +4 -0
- package/styles/breadcrumb/fabric-dark.css +395 -0
- package/styles/breadcrumb/fabric-dark.scss +4 -0
- package/styles/breadcrumb/fabric.css +395 -0
- package/styles/breadcrumb/fabric.scss +4 -0
- package/styles/breadcrumb/fluent-dark.css +371 -0
- package/styles/breadcrumb/fluent-dark.scss +4 -0
- package/styles/breadcrumb/fluent.css +371 -0
- package/styles/breadcrumb/fluent.scss +4 -0
- package/styles/breadcrumb/highcontrast-light.css +402 -0
- package/styles/breadcrumb/highcontrast-light.scss +4 -0
- package/styles/breadcrumb/highcontrast.css +402 -0
- package/styles/breadcrumb/highcontrast.scss +4 -0
- package/styles/breadcrumb/icons/_bootstrap-dark.scss +14 -0
- package/styles/breadcrumb/icons/_bootstrap.scss +14 -0
- package/styles/breadcrumb/icons/_bootstrap4.scss +14 -0
- package/styles/breadcrumb/icons/_bootstrap5-dark.scss +1 -0
- package/styles/breadcrumb/icons/_bootstrap5.scss +25 -0
- package/styles/breadcrumb/icons/_fabric-dark.scss +14 -0
- package/styles/breadcrumb/icons/_fabric.scss +14 -0
- package/styles/breadcrumb/icons/_fluent-dark.scss +1 -0
- package/styles/breadcrumb/icons/_fluent.scss +25 -0
- package/styles/breadcrumb/icons/_fusionnew.scss +25 -0
- package/styles/breadcrumb/icons/_highcontrast-light.scss +14 -0
- package/styles/breadcrumb/icons/_highcontrast.scss +14 -0
- package/styles/breadcrumb/icons/_material-dark.scss +25 -0
- package/styles/breadcrumb/icons/_material.scss +25 -0
- package/styles/breadcrumb/icons/_material3.scss +25 -0
- package/styles/breadcrumb/icons/_tailwind-dark.scss +25 -0
- package/styles/breadcrumb/icons/_tailwind.scss +25 -0
- package/styles/breadcrumb/material-dark.css +379 -0
- package/styles/breadcrumb/material-dark.scss +4 -0
- package/styles/breadcrumb/material.css +379 -0
- package/styles/breadcrumb/material.scss +4 -0
- package/styles/breadcrumb/tailwind-dark.css +402 -0
- package/styles/breadcrumb/tailwind-dark.scss +4 -0
- package/styles/breadcrumb/tailwind.css +402 -0
- package/styles/breadcrumb/tailwind.scss +4 -0
- package/styles/carousel/_all.scss +2 -0
- package/styles/carousel/_bootstrap-dark-definition.scss +22 -0
- package/styles/carousel/_bootstrap-definition.scss +22 -0
- package/styles/carousel/_bootstrap4-definition.scss +22 -0
- package/styles/carousel/_bootstrap5-dark-definition.scss +1 -0
- package/styles/carousel/_bootstrap5-definition.scss +22 -0
- package/styles/carousel/_fabric-dark-definition.scss +22 -0
- package/styles/carousel/_fabric-definition.scss +22 -0
- package/styles/carousel/_fluent-dark-definition.scss +1 -0
- package/styles/carousel/_fluent-definition.scss +22 -0
- package/styles/carousel/_fusionnew-definition.scss +22 -0
- package/styles/carousel/_highcontrast-definition.scss +22 -0
- package/styles/carousel/_highcontrast-light-definition.scss +22 -0
- package/styles/carousel/_layout.scss +225 -0
- package/styles/carousel/_material-dark-definition.scss +22 -0
- package/styles/carousel/_material-definition.scss +22 -0
- package/styles/carousel/_tailwind-dark-definition.scss +1 -0
- package/styles/carousel/_tailwind-definition.scss +22 -0
- package/styles/carousel/_theme.scss +56 -0
- package/styles/carousel/bootstrap-dark.css +264 -0
- package/styles/carousel/bootstrap-dark.scss +5 -0
- package/styles/carousel/bootstrap.css +264 -0
- package/styles/carousel/bootstrap.scss +5 -0
- package/styles/carousel/bootstrap4.css +264 -0
- package/styles/carousel/bootstrap4.scss +5 -0
- package/styles/carousel/bootstrap5-dark.css +264 -0
- package/styles/carousel/bootstrap5-dark.scss +5 -0
- package/styles/carousel/bootstrap5.css +264 -0
- package/styles/carousel/bootstrap5.scss +5 -0
- package/styles/carousel/fabric-dark.css +264 -0
- package/styles/carousel/fabric-dark.scss +5 -0
- package/styles/carousel/fabric.css +264 -0
- package/styles/carousel/fabric.scss +5 -0
- package/styles/carousel/fluent-dark.css +264 -0
- package/styles/carousel/fluent-dark.scss +5 -0
- package/styles/carousel/fluent.css +264 -0
- package/styles/carousel/fluent.scss +5 -0
- package/styles/carousel/highcontrast-light.css +264 -0
- package/styles/carousel/highcontrast-light.scss +5 -0
- package/styles/carousel/highcontrast.css +264 -0
- package/styles/carousel/highcontrast.scss +5 -0
- package/styles/carousel/icons/_bootstrap-dark.scss +30 -0
- package/styles/carousel/icons/_bootstrap.scss +30 -0
- package/styles/carousel/icons/_bootstrap4.scss +30 -0
- package/styles/carousel/icons/_bootstrap5-dark.scss +1 -0
- package/styles/carousel/icons/_bootstrap5.scss +30 -0
- package/styles/carousel/icons/_fabric-dark.scss +30 -0
- package/styles/carousel/icons/_fabric.scss +30 -0
- package/styles/carousel/icons/_fluent-dark.scss +1 -0
- package/styles/carousel/icons/_fluent.scss +30 -0
- package/styles/carousel/icons/_fusionnew.scss +30 -0
- package/styles/carousel/icons/_highcontrast-light.scss +30 -0
- package/styles/carousel/icons/_highcontrast.scss +30 -0
- package/styles/carousel/icons/_material-dark.scss +30 -0
- package/styles/carousel/icons/_material.scss +30 -0
- package/styles/carousel/icons/_material3.scss +30 -0
- package/styles/carousel/icons/_tailwind-dark.scss +1 -0
- package/styles/carousel/icons/_tailwind.scss +30 -0
- package/styles/carousel/material-dark.css +265 -0
- package/styles/carousel/material-dark.scss +5 -0
- package/styles/carousel/material.css +265 -0
- package/styles/carousel/material.scss +5 -0
- package/styles/carousel/tailwind-dark.css +265 -0
- package/styles/carousel/tailwind-dark.scss +5 -0
- package/styles/carousel/tailwind.css +265 -0
- package/styles/carousel/tailwind.scss +5 -0
- package/styles/context-menu/_bootstrap-dark-definition.scss +49 -50
- package/styles/context-menu/_bootstrap-definition.scss +1 -3
- package/styles/context-menu/_bootstrap4-definition.scss +50 -0
- package/styles/context-menu/_bootstrap5-dark-definition.scss +1 -0
- package/styles/context-menu/_bootstrap5-definition.scss +52 -0
- package/styles/context-menu/_fabric-dark-definition.scss +49 -50
- package/styles/context-menu/_fabric-definition.scss +0 -2
- package/styles/context-menu/_fluent-dark-definition.scss +1 -0
- package/styles/context-menu/_fluent-definition.scss +52 -0
- package/styles/context-menu/_fusionnew-definition.scss +52 -0
- package/styles/context-menu/_highcontrast-definition.scss +0 -2
- package/styles/context-menu/_highcontrast-light-definition.scss +2 -3
- package/styles/context-menu/_layout-mixin.scss +19 -14
- package/styles/context-menu/_layout.scss +88 -5
- package/styles/context-menu/_material-dark-definition.scss +49 -50
- package/styles/context-menu/_material-definition.scss +3 -5
- package/styles/context-menu/_tailwind-dark-definition.scss +1 -0
- package/styles/context-menu/_tailwind-definition.scss +53 -0
- package/styles/context-menu/_theme-mixin.scss +16 -12
- package/styles/context-menu/_theme.scss +15 -1
- package/styles/context-menu/bootstrap-dark.css +203 -112
- package/styles/context-menu/bootstrap-dark.scss +3 -0
- package/styles/context-menu/bootstrap.css +203 -111
- package/styles/context-menu/bootstrap.scss +3 -0
- package/styles/context-menu/bootstrap4.css +367 -0
- package/styles/context-menu/bootstrap4.scss +7 -0
- package/styles/context-menu/bootstrap5-dark.css +355 -0
- package/styles/context-menu/bootstrap5-dark.scss +7 -0
- package/styles/context-menu/bootstrap5.css +355 -0
- package/styles/context-menu/bootstrap5.scss +7 -0
- package/styles/context-menu/fabric-dark.css +204 -113
- package/styles/context-menu/fabric-dark.scss +3 -0
- package/styles/context-menu/fabric.css +202 -110
- package/styles/context-menu/fabric.scss +3 -0
- package/styles/context-menu/fluent-dark.css +363 -0
- package/styles/context-menu/fluent-dark.scss +7 -0
- package/styles/context-menu/fluent.css +363 -0
- package/styles/context-menu/fluent.scss +7 -0
- package/styles/context-menu/highcontrast-light.css +366 -0
- package/styles/context-menu/highcontrast-light.scss +7 -0
- package/styles/context-menu/highcontrast.css +202 -110
- package/styles/context-menu/highcontrast.scss +3 -0
- package/styles/context-menu/icons/_bootstrap-dark.scss +5 -2
- package/styles/context-menu/icons/_bootstrap.scss +5 -2
- package/styles/context-menu/icons/_bootstrap4.scss +33 -0
- package/styles/context-menu/icons/_bootstrap5-dark.scss +1 -0
- package/styles/context-menu/icons/_bootstrap5.scss +33 -0
- package/styles/context-menu/icons/_fabric-dark.scss +5 -2
- package/styles/context-menu/icons/_fabric.scss +5 -2
- package/styles/context-menu/icons/_fluent-dark.scss +1 -0
- package/styles/context-menu/icons/_fluent.scss +33 -0
- package/styles/context-menu/icons/_fusionnew.scss +33 -0
- package/styles/context-menu/icons/_highcontrast-light.scss +5 -2
- package/styles/context-menu/icons/_highcontrast.scss +5 -2
- package/styles/context-menu/icons/_material-dark.scss +5 -2
- package/styles/context-menu/icons/_material.scss +5 -2
- package/styles/context-menu/icons/_material3.scss +33 -0
- package/styles/context-menu/icons/_tailwind-dark.scss +33 -0
- package/styles/context-menu/icons/_tailwind.scss +33 -0
- package/styles/context-menu/material-dark.css +221 -112
- package/styles/context-menu/material-dark.scss +3 -0
- package/styles/context-menu/material.css +225 -114
- package/styles/context-menu/material.scss +3 -0
- package/styles/context-menu/tailwind-dark.css +380 -0
- package/styles/context-menu/tailwind-dark.scss +7 -0
- package/styles/context-menu/tailwind.css +380 -0
- package/styles/context-menu/tailwind.scss +7 -0
- package/styles/fabric-dark.css +6281 -4215
- package/styles/fabric-dark.scss +4 -0
- package/styles/fabric.css +5956 -4045
- package/styles/fabric.scss +4 -0
- package/styles/fluent-dark.css +10172 -0
- package/styles/fluent-dark.scss +13 -0
- package/styles/fluent.css +10172 -0
- package/styles/fluent.scss +13 -0
- package/styles/h-scroll/_all.scss +1 -1
- package/styles/h-scroll/_bootstrap-dark-definition.scss +46 -40
- package/styles/h-scroll/_bootstrap-definition.scss +14 -7
- package/styles/h-scroll/_bootstrap4-definition.scss +56 -0
- package/styles/h-scroll/_bootstrap5-dark-definition.scss +1 -0
- package/styles/h-scroll/_bootstrap5-definition.scss +83 -0
- package/styles/h-scroll/_fabric-dark-definition.scss +48 -42
- package/styles/h-scroll/_fabric-definition.scss +17 -9
- package/styles/h-scroll/_fluent-dark-definition.scss +1 -0
- package/styles/h-scroll/_fluent-definition.scss +83 -0
- package/styles/h-scroll/_fusionnew-definition.scss +83 -0
- package/styles/h-scroll/_highcontrast-definition.scss +15 -17
- package/styles/h-scroll/_highcontrast-light-definition.scss +49 -46
- package/styles/h-scroll/_layout.scss +15 -15
- package/styles/h-scroll/_material-dark-definition.scss +56 -51
- package/styles/h-scroll/_material-definition.scss +21 -15
- package/styles/h-scroll/_tailwind-dark-definition.scss +1 -0
- package/styles/h-scroll/_tailwind-definition.scss +83 -0
- package/styles/h-scroll/_theme.scss +15 -29
- package/styles/h-scroll/bootstrap-dark.css +53 -66
- package/styles/h-scroll/bootstrap-dark.scss +1 -0
- package/styles/h-scroll/bootstrap.css +32 -80
- package/styles/h-scroll/bootstrap4.css +260 -0
- package/styles/h-scroll/bootstrap4.scss +4 -0
- package/styles/h-scroll/bootstrap5-dark.css +280 -0
- package/styles/h-scroll/bootstrap5-dark.scss +4 -0
- package/styles/h-scroll/bootstrap5.css +280 -0
- package/styles/h-scroll/bootstrap5.scss +4 -0
- package/styles/h-scroll/fabric-dark.css +54 -67
- package/styles/h-scroll/fabric-dark.scss +1 -0
- package/styles/h-scroll/fabric.css +32 -80
- package/styles/h-scroll/fluent-dark.css +280 -0
- package/styles/h-scroll/fluent-dark.scss +4 -0
- package/styles/h-scroll/fluent.css +280 -0
- package/styles/h-scroll/fluent.scss +4 -0
- package/styles/h-scroll/highcontrast-light.css +259 -0
- package/styles/h-scroll/highcontrast-light.scss +4 -0
- package/styles/h-scroll/highcontrast.css +26 -89
- package/styles/h-scroll/{_icons.scss → icons/_bootstrap-dark.scss} +13 -13
- package/styles/h-scroll/icons/_bootstrap.scss +3 -4
- package/styles/h-scroll/icons/_bootstrap4.scss +49 -0
- package/styles/h-scroll/icons/_bootstrap5-dark.scss +1 -0
- package/styles/h-scroll/icons/_bootstrap5.scss +49 -0
- package/styles/h-scroll/icons/_fabric-dark.scss +49 -0
- package/styles/h-scroll/icons/_fabric.scss +5 -5
- package/styles/h-scroll/icons/_fluent-dark.scss +1 -0
- package/styles/h-scroll/icons/_fluent.scss +49 -0
- package/styles/h-scroll/icons/_fusionnew.scss +49 -0
- package/styles/h-scroll/icons/_highcontrast-light.scss +49 -0
- package/styles/h-scroll/icons/_highcontrast.scss +5 -5
- package/styles/h-scroll/icons/_material-dark.scss +49 -0
- package/styles/h-scroll/icons/_material.scss +3 -3
- package/styles/h-scroll/icons/_material3.scss +49 -0
- package/styles/h-scroll/icons/_tailwind-dark.scss +1 -0
- package/styles/h-scroll/icons/_tailwind.scss +49 -0
- package/styles/h-scroll/material-dark.css +56 -70
- package/styles/h-scroll/material-dark.scss +1 -0
- package/styles/h-scroll/material.css +33 -82
- package/styles/h-scroll/tailwind-dark.css +281 -0
- package/styles/h-scroll/tailwind-dark.scss +4 -0
- package/styles/h-scroll/tailwind.css +281 -0
- package/styles/h-scroll/tailwind.scss +4 -0
- package/styles/highcontrast-light.css +10029 -0
- package/styles/highcontrast-light.scss +13 -0
- package/styles/highcontrast.css +6035 -4466
- package/styles/highcontrast.scss +4 -0
- package/styles/material-dark.css +7913 -5586
- package/styles/material-dark.scss +4 -0
- package/styles/material.css +5982 -3808
- package/styles/material.scss +4 -0
- package/styles/menu/_bootstrap-dark-definition.scss +29 -21
- package/styles/menu/_bootstrap-definition.scss +8 -1
- package/styles/menu/_bootstrap4-definition.scss +64 -0
- package/styles/menu/_bootstrap5-dark-definition.scss +1 -0
- package/styles/menu/_bootstrap5-definition.scss +67 -0
- package/styles/menu/_fabric-dark-definition.scss +30 -22
- package/styles/menu/_fabric-definition.scss +8 -1
- package/styles/menu/_fluent-dark-definition.scss +1 -0
- package/styles/menu/_fluent-definition.scss +67 -0
- package/styles/menu/_fusionnew-definition.scss +67 -0
- package/styles/menu/_highcontrast-definition.scss +9 -2
- package/styles/menu/_highcontrast-light-definition.scss +8 -1
- package/styles/menu/_layout.scss +360 -39
- package/styles/menu/_material-dark-definition.scss +27 -19
- package/styles/menu/_material-definition.scss +7 -0
- package/styles/menu/_tailwind-dark-definition.scss +1 -0
- package/styles/menu/_tailwind-definition.scss +66 -0
- package/styles/menu/_theme.scss +199 -15
- package/styles/menu/bootstrap-dark.css +715 -320
- package/styles/menu/bootstrap.css +696 -302
- package/styles/menu/bootstrap.scss +1 -0
- package/styles/menu/bootstrap4.css +1126 -0
- package/styles/menu/bootstrap4.scss +8 -0
- package/styles/menu/bootstrap5-dark.css +1083 -0
- package/styles/menu/bootstrap5-dark.scss +8 -0
- package/styles/menu/bootstrap5.css +1083 -0
- package/styles/menu/bootstrap5.scss +8 -0
- package/styles/menu/fabric-dark.css +714 -319
- package/styles/menu/fabric.css +694 -299
- package/styles/menu/fabric.scss +1 -0
- package/styles/menu/fluent-dark.css +1106 -0
- package/styles/menu/fluent-dark.scss +8 -0
- package/styles/menu/fluent.css +1106 -0
- package/styles/menu/fluent.scss +8 -0
- package/styles/menu/highcontrast-light.css +1088 -0
- package/styles/menu/highcontrast-light.scss +8 -0
- package/styles/menu/highcontrast.css +696 -301
- package/styles/menu/highcontrast.scss +1 -0
- package/styles/menu/icons/_bootstrap-dark.scss +58 -3
- package/styles/menu/icons/_bootstrap.scss +58 -3
- package/styles/menu/icons/_bootstrap4.scss +134 -0
- package/styles/menu/icons/_bootstrap5-dark.scss +1 -0
- package/styles/menu/icons/_bootstrap5.scss +134 -0
- package/styles/menu/icons/_fabric-dark.scss +62 -7
- package/styles/menu/icons/_fabric.scss +62 -7
- package/styles/menu/icons/_fluent-dark.scss +1 -0
- package/styles/menu/icons/_fluent.scss +134 -0
- package/styles/menu/icons/_fusionnew.scss +134 -0
- package/styles/menu/icons/_highcontrast-light.scss +58 -3
- package/styles/menu/icons/_highcontrast.scss +58 -3
- package/styles/menu/icons/_material-dark.scss +58 -3
- package/styles/menu/icons/_material.scss +58 -3
- package/styles/menu/icons/_material3.scss +134 -0
- package/styles/menu/icons/_tailwind-dark.scss +134 -0
- package/styles/menu/icons/_tailwind.scss +134 -0
- package/styles/menu/material-dark.css +713 -320
- package/styles/menu/material.css +697 -304
- package/styles/menu/material.scss +1 -0
- package/styles/menu/tailwind-dark.css +1102 -0
- package/styles/menu/tailwind-dark.scss +8 -0
- package/styles/menu/tailwind.css +1102 -0
- package/styles/menu/tailwind.scss +8 -0
- package/styles/pager/_all.scss +2 -0
- package/styles/pager/_bootstrap-dark-definition.scss +131 -0
- package/styles/pager/_bootstrap-definition.scss +131 -0
- package/styles/pager/_bootstrap4-definition.scss +131 -0
- package/styles/pager/_bootstrap5-dark-definition.scss +1 -0
- package/styles/pager/_bootstrap5-definition.scss +146 -0
- package/styles/pager/_fabric-dark-definition.scss +131 -0
- package/styles/pager/_fabric-definition.scss +129 -0
- package/styles/pager/_fluent-dark-definition.scss +1 -0
- package/styles/pager/_fluent-definition.scss +133 -0
- package/styles/pager/_fusionnew-definition.scss +146 -0
- package/styles/pager/_highcontrast-definition.scss +129 -0
- package/styles/pager/_highcontrast-light-definition.scss +131 -0
- package/styles/pager/_layout.scss +896 -0
- package/styles/pager/_material-dark-definition.scss +132 -0
- package/styles/pager/_material-definition.scss +130 -0
- package/styles/pager/_tailwind-dark-definition.scss +1 -0
- package/styles/pager/_tailwind-definition.scss +132 -0
- package/styles/pager/_theme.scss +152 -0
- package/styles/pager/bootstrap-dark.css +688 -0
- package/styles/pager/bootstrap-dark.scss +4 -0
- package/styles/pager/bootstrap.css +688 -0
- package/styles/pager/bootstrap.scss +4 -0
- package/styles/pager/bootstrap4.css +688 -0
- package/styles/pager/bootstrap4.scss +4 -0
- package/styles/pager/bootstrap5-dark.css +723 -0
- package/styles/pager/bootstrap5-dark.scss +4 -0
- package/styles/pager/bootstrap5.css +723 -0
- package/styles/pager/bootstrap5.scss +4 -0
- package/styles/pager/fabric-dark.css +688 -0
- package/styles/pager/fabric-dark.scss +4 -0
- package/styles/pager/fabric.css +688 -0
- package/styles/pager/fabric.scss +4 -0
- package/styles/pager/fluent-dark.css +690 -0
- package/styles/pager/fluent-dark.scss +4 -0
- package/styles/pager/fluent.css +690 -0
- package/styles/pager/fluent.scss +4 -0
- package/styles/pager/highcontrast-light.css +688 -0
- package/styles/pager/highcontrast-light.scss +4 -0
- package/styles/pager/highcontrast.css +688 -0
- package/styles/pager/highcontrast.scss +4 -0
- package/styles/pager/icons/_bootstrap-dark.scss +50 -0
- package/styles/pager/icons/_bootstrap.scss +50 -0
- package/styles/pager/icons/_bootstrap4.scss +50 -0
- package/styles/pager/icons/_bootstrap5-dark.scss +1 -0
- package/styles/pager/icons/_bootstrap5.scss +50 -0
- package/styles/pager/icons/_fabric-dark.scss +50 -0
- package/styles/pager/icons/_fabric.scss +50 -0
- package/styles/pager/icons/_fluent-dark.scss +1 -0
- package/styles/pager/icons/_fluent.scss +50 -0
- package/styles/pager/icons/_fusionnew.scss +50 -0
- package/styles/pager/icons/_highcontrast-light.scss +50 -0
- package/styles/pager/icons/_highcontrast.scss +46 -0
- package/styles/pager/icons/_material-dark.scss +50 -0
- package/styles/pager/icons/_material.scss +46 -0
- package/styles/pager/icons/_material3.scss +50 -0
- package/styles/pager/icons/_tailwind-dark.scss +1 -0
- package/styles/pager/icons/_tailwind.scss +50 -0
- package/styles/pager/material-dark.css +689 -0
- package/styles/pager/material-dark.scss +4 -0
- package/styles/pager/material.css +689 -0
- package/styles/pager/material.scss +4 -0
- package/styles/pager/tailwind-dark.css +815 -0
- package/styles/pager/tailwind-dark.scss +4 -0
- package/styles/pager/tailwind.css +815 -0
- package/styles/pager/tailwind.scss +4 -0
- package/styles/sidebar/_bootstrap4-definition.scss +4 -0
- package/styles/sidebar/_bootstrap5-dark-definition.scss +1 -0
- package/styles/sidebar/_bootstrap5-definition.scss +6 -0
- package/styles/sidebar/_fabric-definition.scss +0 -2
- package/styles/sidebar/_fluent-dark-definition.scss +1 -0
- package/styles/sidebar/_fluent-definition.scss +6 -0
- package/styles/sidebar/_fusionnew-definition.scss +6 -0
- package/styles/sidebar/_highcontrast-definition.scss +1 -1
- package/styles/sidebar/_icons.scss +1 -1
- package/styles/sidebar/_layout.scss +1 -0
- package/styles/sidebar/_tailwind-dark-definition.scss +1 -0
- package/styles/sidebar/_tailwind-definition.scss +6 -0
- package/styles/sidebar/_theme.scss +56 -34
- package/styles/sidebar/bootstrap-dark.css +29 -25
- package/styles/sidebar/bootstrap.css +29 -25
- package/styles/sidebar/bootstrap4.css +149 -0
- package/styles/sidebar/bootstrap4.scss +3 -0
- package/styles/sidebar/bootstrap5-dark.css +147 -0
- package/styles/sidebar/bootstrap5-dark.scss +3 -0
- package/styles/sidebar/bootstrap5.css +147 -0
- package/styles/sidebar/bootstrap5.scss +3 -0
- package/styles/sidebar/fabric-dark.css +29 -25
- package/styles/sidebar/fabric.css +29 -25
- package/styles/sidebar/fluent-dark.css +147 -0
- package/styles/sidebar/fluent-dark.scss +3 -0
- package/styles/sidebar/fluent.css +147 -0
- package/styles/sidebar/fluent.scss +3 -0
- package/styles/sidebar/highcontrast-light.css +149 -0
- package/styles/sidebar/highcontrast-light.scss +3 -0
- package/styles/sidebar/highcontrast.css +30 -26
- package/styles/sidebar/material-dark.css +29 -25
- package/styles/sidebar/material.css +29 -25
- package/styles/sidebar/tailwind-dark.css +148 -0
- package/styles/sidebar/tailwind-dark.scss +3 -0
- package/styles/sidebar/tailwind.css +148 -0
- package/styles/sidebar/tailwind.scss +3 -0
- package/styles/tab/_bootstrap-dark-definition.scss +632 -374
- package/styles/tab/_bootstrap-definition.scss +279 -13
- package/styles/tab/_bootstrap4-definition.scss +666 -0
- package/styles/tab/_bootstrap5-dark-definition.scss +1 -0
- package/styles/tab/_bootstrap5-definition.scss +656 -0
- package/styles/tab/_fabric-dark-definition.scss +644 -385
- package/styles/tab/_fabric-definition.scss +281 -15
- package/styles/tab/_fluent-dark-definition.scss +1 -0
- package/styles/tab/_fluent-definition.scss +664 -0
- package/styles/tab/_fusionnew-definition.scss +656 -0
- package/styles/tab/_highcontrast-definition.scss +283 -17
- package/styles/tab/_highcontrast-light-definition.scss +667 -411
- package/styles/tab/_icons.scss +1 -0
- package/styles/tab/_layout.scss +697 -753
- package/styles/tab/_material-dark-definition.scss +627 -370
- package/styles/tab/_material-definition.scss +277 -11
- package/styles/tab/_tailwind-dark-definition.scss +1 -0
- package/styles/tab/_tailwind-definition.scss +685 -0
- package/styles/tab/_theme.scss +402 -537
- package/styles/tab/bootstrap-dark.css +1226 -1067
- package/styles/tab/bootstrap-dark.scss +1 -0
- package/styles/tab/bootstrap.css +1173 -1106
- package/styles/tab/bootstrap4.css +4031 -0
- package/styles/tab/bootstrap4.scss +5 -0
- package/styles/tab/bootstrap5-dark.css +4029 -0
- package/styles/tab/bootstrap5-dark.scss +5 -0
- package/styles/tab/bootstrap5.css +4029 -0
- package/styles/tab/bootstrap5.scss +5 -0
- package/styles/tab/fabric-dark.css +1212 -1096
- package/styles/tab/fabric-dark.scss +1 -0
- package/styles/tab/fabric.css +1173 -1148
- package/styles/tab/fluent-dark.css +4031 -0
- package/styles/tab/fluent-dark.scss +5 -0
- package/styles/tab/fluent.css +4031 -0
- package/styles/tab/fluent.scss +5 -0
- package/styles/tab/highcontrast-light.css +4022 -0
- package/styles/tab/highcontrast-light.scss +5 -0
- package/styles/tab/highcontrast.css +1086 -1215
- package/styles/tab/icons/_bootstrap-dark.scss +108 -0
- package/styles/tab/icons/_bootstrap.scss +11 -35
- package/styles/tab/icons/_bootstrap4.scss +115 -0
- package/styles/tab/icons/_bootstrap5-dark.scss +1 -0
- package/styles/tab/icons/_bootstrap5.scss +104 -0
- package/styles/tab/icons/_fabric-dark.scss +108 -0
- package/styles/tab/icons/_fabric.scss +11 -35
- package/styles/tab/icons/_fluent-dark.scss +1 -0
- package/styles/tab/icons/_fluent.scss +108 -0
- package/styles/tab/icons/_fusionnew.scss +104 -0
- package/styles/tab/icons/_highcontrast-light.scss +104 -0
- package/styles/tab/icons/_highcontrast.scss +11 -28
- package/styles/tab/icons/_material-dark.scss +104 -0
- package/styles/tab/icons/_material.scss +9 -37
- package/styles/tab/icons/_material3.scss +104 -0
- package/styles/tab/icons/_tailwind-dark.scss +1 -0
- package/styles/tab/icons/_tailwind.scss +104 -0
- package/styles/tab/material-dark.css +1334 -955
- package/styles/tab/material-dark.scss +1 -0
- package/styles/tab/material.css +1280 -992
- package/styles/tab/tailwind-dark.css +4046 -0
- package/styles/tab/tailwind-dark.scss +5 -0
- package/styles/tab/tailwind.css +4046 -0
- package/styles/tab/tailwind.scss +5 -0
- package/styles/tailwind-dark.css +10351 -0
- package/styles/tailwind-dark.scss +13 -0
- package/styles/tailwind.css +10351 -0
- package/styles/tailwind.scss +13 -0
- package/styles/toolbar/_all.scss +1 -1
- package/styles/toolbar/_bootstrap-dark-definition.scss +193 -121
- package/styles/toolbar/_bootstrap-definition.scss +107 -34
- package/styles/toolbar/_bootstrap4-definition.scss +211 -0
- package/styles/toolbar/_bootstrap5-dark-definition.scss +1 -0
- package/styles/toolbar/_bootstrap5-definition.scss +220 -0
- package/styles/toolbar/_fabric-dark-definition.scss +208 -140
- package/styles/toolbar/_fabric-definition.scss +97 -28
- package/styles/toolbar/_fluent-dark-definition.scss +1 -0
- package/styles/toolbar/_fluent-definition.scss +210 -0
- package/styles/toolbar/_fusionnew-definition.scss +220 -0
- package/styles/toolbar/_highcontrast-definition.scss +99 -30
- package/styles/toolbar/_highcontrast-light-definition.scss +219 -149
- package/styles/toolbar/_layout.scss +690 -1087
- package/styles/toolbar/_material-dark-definition.scss +216 -148
- package/styles/toolbar/_material-definition.scss +117 -46
- package/styles/toolbar/_tailwind-dark-definition.scss +1 -0
- package/styles/toolbar/_tailwind-definition.scss +210 -0
- package/styles/toolbar/_theme.scss +246 -263
- package/styles/toolbar/bootstrap-dark.css +768 -1105
- package/styles/toolbar/bootstrap-dark.scss +1 -0
- package/styles/toolbar/bootstrap.css +761 -1111
- package/styles/toolbar/bootstrap.scss +1 -0
- package/styles/toolbar/bootstrap4.css +1071 -0
- package/styles/toolbar/bootstrap4.scss +8 -0
- package/styles/toolbar/bootstrap5-dark.css +1082 -0
- package/styles/toolbar/bootstrap5-dark.scss +8 -0
- package/styles/toolbar/bootstrap5.css +1082 -0
- package/styles/toolbar/bootstrap5.scss +8 -0
- package/styles/toolbar/fabric-dark.css +779 -1042
- package/styles/toolbar/fabric-dark.scss +1 -0
- package/styles/toolbar/fabric.css +767 -1041
- package/styles/toolbar/fabric.scss +1 -0
- package/styles/toolbar/fluent-dark.css +1081 -0
- package/styles/toolbar/fluent-dark.scss +8 -0
- package/styles/toolbar/fluent.css +1081 -0
- package/styles/toolbar/fluent.scss +8 -0
- package/styles/toolbar/highcontrast-light.css +1070 -0
- package/styles/toolbar/highcontrast-light.scss +8 -0
- package/styles/toolbar/highcontrast.css +744 -1089
- package/styles/toolbar/highcontrast.scss +1 -0
- package/styles/toolbar/icons/_bootstrap-dark.scss +16 -0
- package/styles/toolbar/icons/_bootstrap.scss +1 -1
- package/styles/toolbar/icons/_bootstrap4.scss +16 -0
- package/styles/toolbar/icons/_bootstrap5-dark.scss +1 -0
- package/styles/toolbar/icons/_bootstrap5.scss +16 -0
- package/styles/toolbar/icons/_fabric-dark.scss +16 -0
- package/styles/toolbar/icons/_fabric.scss +1 -1
- package/styles/toolbar/icons/_fluent-dark.scss +1 -0
- package/styles/toolbar/icons/_fluent.scss +16 -0
- package/styles/toolbar/icons/_fusionnew.scss +16 -0
- package/styles/toolbar/icons/_highcontrast-light.scss +16 -0
- package/styles/toolbar/icons/_highcontrast.scss +1 -1
- package/styles/toolbar/icons/_material-dark.scss +16 -0
- package/styles/toolbar/icons/_material.scss +1 -1
- package/styles/toolbar/icons/_material3.scss +16 -0
- package/styles/toolbar/icons/_tailwind-dark.scss +1 -0
- package/styles/toolbar/icons/_tailwind.scss +16 -0
- package/styles/toolbar/material-dark.css +747 -1010
- package/styles/toolbar/material-dark.scss +1 -0
- package/styles/toolbar/material.css +753 -1027
- package/styles/toolbar/material.scss +1 -0
- package/styles/toolbar/tailwind-dark.css +1082 -0
- package/styles/toolbar/tailwind-dark.scss +8 -0
- package/styles/toolbar/tailwind.css +1082 -0
- package/styles/toolbar/tailwind.scss +8 -0
- package/styles/treeview/_all.scss +1 -1
- package/styles/treeview/_bootstrap-dark-definition.scss +104 -117
- package/styles/treeview/_bootstrap-definition.scss +24 -38
- package/styles/treeview/_bootstrap4-definition.scss +141 -0
- package/styles/treeview/_bootstrap5-dark-definition.scss +1 -0
- package/styles/treeview/_bootstrap5-definition.scss +120 -0
- package/styles/treeview/_fabric-dark-definition.scss +102 -116
- package/styles/treeview/_fabric-definition.scss +24 -38
- package/styles/treeview/_fluent-dark-definition.scss +1 -0
- package/styles/treeview/_fluent-definition.scss +120 -0
- package/styles/treeview/_fusionnew-definition.scss +120 -0
- package/styles/treeview/_highcontrast-definition.scss +24 -38
- package/styles/treeview/_highcontrast-light-definition.scss +112 -126
- package/styles/treeview/_layout.scss +619 -28
- package/styles/treeview/_material-dark-definition.scss +104 -116
- package/styles/treeview/_material-definition.scss +25 -39
- package/styles/treeview/_tailwind-dark-definition.scss +1 -0
- package/styles/treeview/_tailwind-definition.scss +124 -0
- package/styles/treeview/_theme.scss +128 -27
- package/styles/treeview/bootstrap-dark.css +230 -172
- package/styles/treeview/bootstrap.css +230 -168
- package/styles/treeview/bootstrap4.css +829 -0
- package/styles/treeview/bootstrap4.scss +6 -0
- package/styles/treeview/bootstrap5-dark.css +847 -0
- package/styles/treeview/bootstrap5-dark.scss +6 -0
- package/styles/treeview/bootstrap5.css +847 -0
- package/styles/treeview/bootstrap5.scss +6 -0
- package/styles/treeview/fabric-dark.css +230 -168
- package/styles/treeview/fabric.css +230 -168
- package/styles/treeview/fluent-dark.css +852 -0
- package/styles/treeview/fluent-dark.scss +6 -0
- package/styles/treeview/fluent.css +852 -0
- package/styles/treeview/fluent.scss +6 -0
- package/styles/treeview/highcontrast-light.css +736 -0
- package/styles/treeview/highcontrast-light.scss +6 -0
- package/styles/treeview/highcontrast.css +230 -171
- package/styles/treeview/icons/_bootstrap-dark.scss +2 -2
- package/styles/treeview/icons/_bootstrap.scss +2 -2
- package/styles/treeview/icons/_bootstrap4.scss +39 -0
- package/styles/treeview/icons/_bootstrap5-dark.scss +1 -0
- package/styles/treeview/icons/_bootstrap5.scss +43 -0
- package/styles/treeview/icons/_fabric-dark.scss +2 -2
- package/styles/treeview/icons/_fabric.scss +2 -2
- package/styles/treeview/icons/_fluent-dark.scss +1 -0
- package/styles/treeview/icons/_fluent.scss +43 -0
- package/styles/treeview/icons/_fusionnew.scss +43 -0
- package/styles/treeview/icons/_highcontrast-light.scss +2 -2
- package/styles/treeview/icons/_highcontrast.scss +2 -2
- package/styles/treeview/icons/_material-dark.scss +2 -2
- package/styles/treeview/icons/_material.scss +2 -2
- package/styles/treeview/icons/_material3.scss +43 -0
- package/styles/treeview/icons/_tailwind-dark.scss +43 -0
- package/styles/treeview/icons/_tailwind.scss +43 -0
- package/styles/treeview/material-dark.css +242 -172
- package/styles/treeview/material.css +238 -167
- package/styles/treeview/tailwind-dark.css +840 -0
- package/styles/treeview/tailwind-dark.scss +6 -0
- package/styles/treeview/tailwind.css +840 -0
- package/styles/treeview/tailwind.scss +6 -0
- package/styles/v-scroll/_all.scss +1 -1
- package/styles/v-scroll/_bootstrap-dark-definition.scss +39 -38
- package/styles/v-scroll/_bootstrap-definition.scss +8 -8
- package/styles/v-scroll/_bootstrap4-definition.scss +49 -0
- package/styles/v-scroll/_bootstrap5-dark-definition.scss +1 -0
- package/styles/v-scroll/_bootstrap5-definition.scss +49 -0
- package/styles/v-scroll/_fabric-dark-definition.scss +41 -40
- package/styles/v-scroll/_fabric-definition.scss +10 -10
- package/styles/v-scroll/_fluent-dark-definition.scss +1 -0
- package/styles/v-scroll/_fluent-definition.scss +49 -0
- package/styles/v-scroll/_fusionnew-definition.scss +49 -0
- package/styles/v-scroll/_highcontrast-definition.scss +10 -11
- package/styles/v-scroll/_highcontrast-light-definition.scss +41 -41
- package/styles/v-scroll/_layout.scss +4 -4
- package/styles/v-scroll/_material-dark-definition.scss +46 -45
- package/styles/v-scroll/_material-definition.scss +10 -10
- package/styles/v-scroll/_tailwind-dark-definition.scss +1 -0
- package/styles/v-scroll/_tailwind-definition.scss +49 -0
- package/styles/v-scroll/_theme.scss +2 -27
- package/styles/v-scroll/bootstrap-dark.css +25 -51
- package/styles/v-scroll/bootstrap-dark.scss +1 -0
- package/styles/v-scroll/bootstrap.css +13 -58
- package/styles/v-scroll/bootstrap4.css +202 -0
- package/styles/v-scroll/bootstrap4.scss +4 -0
- package/styles/v-scroll/bootstrap5-dark.css +202 -0
- package/styles/v-scroll/bootstrap5-dark.scss +4 -0
- package/styles/v-scroll/bootstrap5.css +202 -0
- package/styles/v-scroll/bootstrap5.scss +4 -0
- package/styles/v-scroll/fabric-dark.css +26 -52
- package/styles/v-scroll/fabric-dark.scss +1 -0
- package/styles/v-scroll/fabric.css +14 -59
- package/styles/v-scroll/fluent-dark.css +202 -0
- package/styles/v-scroll/fluent-dark.scss +4 -0
- package/styles/v-scroll/fluent.css +202 -0
- package/styles/v-scroll/fluent.scss +4 -0
- package/styles/v-scroll/highcontrast-light.css +201 -0
- package/styles/v-scroll/highcontrast-light.scss +4 -0
- package/styles/v-scroll/highcontrast.css +14 -74
- package/styles/v-scroll/icons/_bootstrap-dark.scss +27 -0
- package/styles/v-scroll/icons/_bootstrap.scss +1 -1
- package/styles/v-scroll/icons/_bootstrap4.scss +27 -0
- package/styles/v-scroll/icons/_bootstrap5-dark.scss +1 -0
- package/styles/v-scroll/icons/_bootstrap5.scss +27 -0
- package/styles/v-scroll/icons/_fabric-dark.scss +27 -0
- package/styles/v-scroll/icons/_fabric.scss +3 -2
- package/styles/v-scroll/icons/_fluent-dark.scss +1 -0
- package/styles/v-scroll/icons/_fluent.scss +27 -0
- package/styles/v-scroll/icons/_fusionnew.scss +27 -0
- package/styles/v-scroll/icons/_highcontrast-light.scss +27 -0
- package/styles/v-scroll/icons/_highcontrast.scss +3 -2
- package/styles/v-scroll/{_icons.scss → icons/_material-dark.scss} +4 -3
- package/styles/v-scroll/icons/_material.scss +1 -0
- package/styles/v-scroll/icons/_material3.scss +27 -0
- package/styles/v-scroll/icons/_tailwind-dark.scss +1 -0
- package/styles/v-scroll/icons/_tailwind.scss +27 -0
- package/styles/v-scroll/material-dark.css +23 -50
- package/styles/v-scroll/material-dark.scss +1 -0
- package/styles/v-scroll/material.css +12 -58
- package/styles/v-scroll/tailwind-dark.css +203 -0
- package/styles/v-scroll/tailwind-dark.scss +4 -0
- package/styles/v-scroll/tailwind.css +203 -0
- package/styles/v-scroll/tailwind.scss +4 -0
- package/tslint.json +111 -0
- package/styles/toolbar/_icons.scss +0 -35
package/src/tab/tab.js
CHANGED
|
@@ -4,7 +4,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
5
|
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
return function (d, b) {
|
|
9
9
|
extendStatics(d, b);
|
|
10
10
|
function __() { this.constructor = d; }
|
|
@@ -17,14 +17,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
17
17
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
18
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
19
|
};
|
|
20
|
-
import { Component, Property, Event, closest, Collection, Complex, attributes, detach } from '@syncfusion/ej2-base';
|
|
20
|
+
import { Component, Property, Event, closest, Collection, Complex, attributes, detach, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
21
21
|
import { NotifyPropertyChanges, ChildProperty, select, isVisible } from '@syncfusion/ej2-base';
|
|
22
22
|
import { KeyboardEvents, Browser, formatUnit, L10n } from '@syncfusion/ej2-base';
|
|
23
|
-
import { setStyleAttribute as setStyle, isNullOrUndefined as isNOU, selectAll, addClass, removeClass } from '@syncfusion/ej2-base';
|
|
23
|
+
import { setStyleAttribute as setStyle, isNullOrUndefined as isNOU, selectAll, addClass, removeClass, remove } from '@syncfusion/ej2-base';
|
|
24
24
|
import { EventHandler, rippleEffect, Touch, compile, Animation } from '@syncfusion/ej2-base';
|
|
25
|
+
import { getRandomId, SanitizeHtmlHelper, Draggable } from '@syncfusion/ej2-base';
|
|
25
26
|
import { Toolbar } from '../toolbar/toolbar';
|
|
26
27
|
var CLS_TAB = 'e-tab';
|
|
27
28
|
var CLS_HEADER = 'e-tab-header';
|
|
29
|
+
var CLS_BLA_TEM = 'blazor-template';
|
|
28
30
|
var CLS_CONTENT = 'e-content';
|
|
29
31
|
var CLS_NEST = 'e-nested';
|
|
30
32
|
var CLS_ITEMS = 'e-items';
|
|
@@ -57,11 +59,17 @@ var CLS_IGNORE = 'e-ignore';
|
|
|
57
59
|
var CLS_OVERLAY = 'e-overlay';
|
|
58
60
|
var CLS_HSCRCNT = 'e-hscroll-content';
|
|
59
61
|
var CLS_VSCRCNT = 'e-vscroll-content';
|
|
60
|
-
var CLS_HORIZONTAL = 'e-horizontal';
|
|
61
62
|
var CLS_VTAB = 'e-vertical-tab';
|
|
62
63
|
var CLS_VERTICAL = 'e-vertical';
|
|
63
64
|
var CLS_VLEFT = 'e-vertical-left';
|
|
64
65
|
var CLS_VRIGHT = 'e-vertical-right';
|
|
66
|
+
var CLS_HBOTTOM = 'e-horizontal-bottom';
|
|
67
|
+
var CLS_FILL = 'e-fill-mode';
|
|
68
|
+
var TABITEMPREFIX = 'tabitem_';
|
|
69
|
+
var CLS_REORDER_ACTIVE_ITEM = 'e-reorder-active-item';
|
|
70
|
+
/**
|
|
71
|
+
* Objects used for configuring the Tab selecting item action properties.
|
|
72
|
+
*/
|
|
65
73
|
var TabActionSettings = /** @class */ (function (_super) {
|
|
66
74
|
__extends(TabActionSettings, _super);
|
|
67
75
|
function TabActionSettings() {
|
|
@@ -79,6 +87,9 @@ var TabActionSettings = /** @class */ (function (_super) {
|
|
|
79
87
|
return TabActionSettings;
|
|
80
88
|
}(ChildProperty));
|
|
81
89
|
export { TabActionSettings };
|
|
90
|
+
/**
|
|
91
|
+
* Objects used for configuring the Tab animation properties.
|
|
92
|
+
*/
|
|
82
93
|
var TabAnimationSettings = /** @class */ (function (_super) {
|
|
83
94
|
__extends(TabAnimationSettings, _super);
|
|
84
95
|
function TabAnimationSettings() {
|
|
@@ -124,6 +135,9 @@ var TabItem = /** @class */ (function (_super) {
|
|
|
124
135
|
__decorate([
|
|
125
136
|
Complex({}, Header)
|
|
126
137
|
], TabItem.prototype, "header", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
Property(null)
|
|
140
|
+
], TabItem.prototype, "headerTemplate", void 0);
|
|
127
141
|
__decorate([
|
|
128
142
|
Property('')
|
|
129
143
|
], TabItem.prototype, "content", void 0);
|
|
@@ -133,6 +147,15 @@ var TabItem = /** @class */ (function (_super) {
|
|
|
133
147
|
__decorate([
|
|
134
148
|
Property(false)
|
|
135
149
|
], TabItem.prototype, "disabled", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
Property(true)
|
|
152
|
+
], TabItem.prototype, "visible", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
Property()
|
|
155
|
+
], TabItem.prototype, "id", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
Property(-1)
|
|
158
|
+
], TabItem.prototype, "tabIndex", void 0);
|
|
136
159
|
return TabItem;
|
|
137
160
|
}(ChildProperty));
|
|
138
161
|
export { TabItem };
|
|
@@ -151,21 +174,22 @@ var Tab = /** @class */ (function (_super) {
|
|
|
151
174
|
__extends(Tab, _super);
|
|
152
175
|
/**
|
|
153
176
|
* Initializes a new instance of the Tab class.
|
|
154
|
-
*
|
|
155
|
-
* @param
|
|
177
|
+
*
|
|
178
|
+
* @param {TabModel} options - Specifies Tab model properties as options.
|
|
179
|
+
* @param {string | HTMLElement} element - Specifies the element that is rendered as a Tab.
|
|
156
180
|
*/
|
|
157
181
|
function Tab(options, element) {
|
|
158
182
|
var _this = _super.call(this, options, element) || this;
|
|
159
183
|
_this.show = {};
|
|
160
184
|
_this.hide = {};
|
|
161
|
-
_this.animateOptions = {};
|
|
162
|
-
_this.animObj = new Animation(_this.animateOptions);
|
|
163
185
|
_this.maxHeight = 0;
|
|
164
186
|
_this.title = 'Close';
|
|
187
|
+
_this.isInteracted = false;
|
|
165
188
|
_this.lastIndex = 0;
|
|
166
189
|
_this.isAdd = false;
|
|
167
190
|
_this.isIconAlone = false;
|
|
168
|
-
_this.
|
|
191
|
+
_this.draggableItems = [];
|
|
192
|
+
_this.resizeContext = _this.refreshActiveTabBorder.bind(_this);
|
|
169
193
|
/**
|
|
170
194
|
* Contains the keyboard configuration of the Tab.
|
|
171
195
|
*/
|
|
@@ -185,20 +209,24 @@ var Tab = /** @class */ (function (_super) {
|
|
|
185
209
|
}
|
|
186
210
|
/**
|
|
187
211
|
* Removes the component from the DOM and detaches all its related event handlers, attributes and classes.
|
|
188
|
-
*
|
|
212
|
+
*
|
|
213
|
+
* @returns {void}
|
|
189
214
|
*/
|
|
190
215
|
Tab.prototype.destroy = function () {
|
|
191
|
-
|
|
216
|
+
if (this.isReact || this.isAngular) {
|
|
217
|
+
this.clearTemplate();
|
|
218
|
+
}
|
|
192
219
|
if (!isNOU(this.tbObj)) {
|
|
193
220
|
this.tbObj.destroy();
|
|
221
|
+
this.tbObj = null;
|
|
194
222
|
}
|
|
195
223
|
this.unWireEvents();
|
|
196
|
-
|
|
197
|
-
_this.element.removeAttribute(val);
|
|
198
|
-
});
|
|
224
|
+
this.element.removeAttribute('aria-disabled');
|
|
199
225
|
this.expTemplateContent();
|
|
200
226
|
if (!this.isTemplate) {
|
|
201
|
-
this.element.
|
|
227
|
+
while (this.element.firstElementChild) {
|
|
228
|
+
remove(this.element.firstElementChild);
|
|
229
|
+
}
|
|
202
230
|
}
|
|
203
231
|
else {
|
|
204
232
|
var cntEle = select('.' + CLS_TAB + ' > .' + CLS_CONTENT, this.element);
|
|
@@ -207,12 +235,50 @@ var Tab = /** @class */ (function (_super) {
|
|
|
207
235
|
cntEle.innerHTML = this.cnt;
|
|
208
236
|
}
|
|
209
237
|
}
|
|
238
|
+
if (this.btnCls) {
|
|
239
|
+
this.btnCls = null;
|
|
240
|
+
}
|
|
241
|
+
this.hdrEle = null;
|
|
242
|
+
this.cntEle = null;
|
|
243
|
+
this.tbItems = null;
|
|
244
|
+
this.tbItem = null;
|
|
245
|
+
this.tbPop = null;
|
|
246
|
+
this.prevItem = null;
|
|
247
|
+
this.popEle = null;
|
|
248
|
+
this.bdrLine = null;
|
|
249
|
+
this.content = null;
|
|
250
|
+
this.dragItem = null;
|
|
251
|
+
this.cloneElement = null;
|
|
252
|
+
this.draggingItems = [];
|
|
253
|
+
if (this.draggableItems && this.draggableItems.length > 0) {
|
|
254
|
+
for (var i = 0; i < this.draggableItems.length; i++) {
|
|
255
|
+
this.draggableItems[i].destroy();
|
|
256
|
+
this.draggableItems[i] = null;
|
|
257
|
+
}
|
|
258
|
+
this.draggableItems = [];
|
|
259
|
+
}
|
|
210
260
|
_super.prototype.destroy.call(this);
|
|
211
261
|
this.trigger('destroyed');
|
|
212
262
|
};
|
|
263
|
+
/**
|
|
264
|
+
* Refresh the tab component
|
|
265
|
+
*
|
|
266
|
+
* @returns {void}
|
|
267
|
+
*/
|
|
268
|
+
Tab.prototype.refresh = function () {
|
|
269
|
+
if (this.isReact) {
|
|
270
|
+
this.clearTemplate();
|
|
271
|
+
}
|
|
272
|
+
_super.prototype.refresh.call(this);
|
|
273
|
+
if (this.isReact) {
|
|
274
|
+
this.renderReactTemplates();
|
|
275
|
+
}
|
|
276
|
+
};
|
|
213
277
|
/**
|
|
214
278
|
* Initialize component
|
|
279
|
+
*
|
|
215
280
|
* @private
|
|
281
|
+
* @returns {void}
|
|
216
282
|
*/
|
|
217
283
|
Tab.prototype.preRender = function () {
|
|
218
284
|
var nested = closest(this.element, '.' + CLS_CONTENT);
|
|
@@ -223,6 +289,9 @@ var Tab = /** @class */ (function (_super) {
|
|
|
223
289
|
this.isSwipeed = false;
|
|
224
290
|
this.itemIndexArray = [];
|
|
225
291
|
this.templateEle = [];
|
|
292
|
+
if (this.allowDragAndDrop) {
|
|
293
|
+
this.dragArea = !isNOU(this.dragArea) ? this.dragArea : '#' + this.element.id + ' ' + ('.' + CLS_HEADER);
|
|
294
|
+
}
|
|
226
295
|
if (!isNOU(nested)) {
|
|
227
296
|
nested.parentElement.classList.add(CLS_NEST);
|
|
228
297
|
this.isNested = true;
|
|
@@ -231,22 +300,30 @@ var Tab = /** @class */ (function (_super) {
|
|
|
231
300
|
var css = (name === 'msie') ? 'e-ie' : (name === 'edge') ? 'e-edge' : (name === 'safari') ? 'e-safari' : '';
|
|
232
301
|
setStyle(this.element, { 'width': formatUnit(this.width), 'height': formatUnit(this.height) });
|
|
233
302
|
this.setCssClass(this.element, this.cssClass, true);
|
|
234
|
-
attributes(this.element, {
|
|
303
|
+
attributes(this.element, { 'aria-disabled': 'false' });
|
|
235
304
|
this.setCssClass(this.element, css, true);
|
|
236
305
|
this.updatePopAnimationConfig();
|
|
237
306
|
};
|
|
238
307
|
/**
|
|
239
308
|
* Initialize the component rendering
|
|
309
|
+
*
|
|
240
310
|
* @private
|
|
311
|
+
* @returns {void}
|
|
241
312
|
*/
|
|
242
313
|
Tab.prototype.render = function () {
|
|
243
314
|
this.btnCls = this.createElement('span', { className: CLS_ICONS + ' ' + CLS_ICON_CLOSE, attrs: { title: this.title } });
|
|
315
|
+
this.tabId = this.element.id.length > 0 ? ('-' + this.element.id) : getRandomId();
|
|
244
316
|
this.renderContainer();
|
|
245
317
|
this.wireEvents();
|
|
246
318
|
this.initRender = false;
|
|
247
319
|
};
|
|
248
320
|
Tab.prototype.renderContainer = function () {
|
|
249
321
|
var ele = this.element;
|
|
322
|
+
this.items.forEach(function (item, index) {
|
|
323
|
+
if (isNOU(item.id) && !isNOU(item.setProperties)) {
|
|
324
|
+
item.setProperties({ id: TABITEMPREFIX + index.toString() }, true);
|
|
325
|
+
}
|
|
326
|
+
});
|
|
250
327
|
if (this.items.length > 0 && ele.children.length === 0) {
|
|
251
328
|
ele.appendChild(this.createElement('div', { className: CLS_CONTENT }));
|
|
252
329
|
this.setOrientation(this.headerPlacement, this.createElement('div', { className: CLS_HEADER }));
|
|
@@ -268,10 +345,9 @@ var Tab = /** @class */ (function (_super) {
|
|
|
268
345
|
}
|
|
269
346
|
this.renderContent();
|
|
270
347
|
if (selectAll('.' + CLS_TB_ITEM, this.element).length > 0) {
|
|
271
|
-
var scrCnt = void 0;
|
|
272
348
|
this.tbItems = select('.' + CLS_HEADER + ' .' + CLS_TB_ITEMS, this.element);
|
|
273
349
|
this.bdrLine = this.createElement('div', { className: CLS_INDICATOR + ' ' + CLS_HIDDEN + ' ' + CLS_IGNORE });
|
|
274
|
-
scrCnt = select('.' + this.scrCntClass, this.tbItems);
|
|
350
|
+
var scrCnt = select('.' + this.scrCntClass, this.tbItems);
|
|
275
351
|
if (!isNOU(scrCnt)) {
|
|
276
352
|
scrCnt.insertBefore(this.bdrLine, scrCnt.firstChild);
|
|
277
353
|
}
|
|
@@ -281,6 +357,15 @@ var Tab = /** @class */ (function (_super) {
|
|
|
281
357
|
this.setContentHeight(true);
|
|
282
358
|
this.select(this.selectedItem);
|
|
283
359
|
}
|
|
360
|
+
this.tbItem = selectAll('.' + CLS_TB_ITEM, this.hdrEle);
|
|
361
|
+
if (!isNOU(this.tbItem)) {
|
|
362
|
+
for (var i = 0; i < this.items.length; i++) {
|
|
363
|
+
if (this.tbItem[i]) {
|
|
364
|
+
var tabID = this.items[i].id;
|
|
365
|
+
this.tbItem[i].setAttribute('data-id', tabID);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
284
369
|
this.setRTL(this.enableRtl);
|
|
285
370
|
}
|
|
286
371
|
};
|
|
@@ -288,7 +373,7 @@ var Tab = /** @class */ (function (_super) {
|
|
|
288
373
|
var _this = this;
|
|
289
374
|
var hdrPlace = this.headerPlacement;
|
|
290
375
|
var tabItems = [];
|
|
291
|
-
this.hdrEle =
|
|
376
|
+
this.hdrEle = this.getTabHeader();
|
|
292
377
|
this.addVerticalClass();
|
|
293
378
|
if (!this.isTemplate) {
|
|
294
379
|
tabItems = this.parseObject(this.items, 0);
|
|
@@ -303,13 +388,15 @@ var Tab = /** @class */ (function (_super) {
|
|
|
303
388
|
hdrItems.push(this.hdrEle.children.item(i).innerHTML);
|
|
304
389
|
}
|
|
305
390
|
if (count > 0) {
|
|
306
|
-
this.hdrEle.
|
|
307
|
-
|
|
391
|
+
while (this.hdrEle.firstElementChild) {
|
|
392
|
+
detach(this.hdrEle.firstElementChild);
|
|
393
|
+
}
|
|
394
|
+
var tabItems_1 = this.createElement('div', { className: CLS_ITEMS });
|
|
395
|
+
this.hdrEle.appendChild(tabItems_1);
|
|
308
396
|
hdrItems.forEach(function (item, index) {
|
|
309
397
|
_this.lastIndex = index;
|
|
310
398
|
var attr = {
|
|
311
|
-
className: CLS_ITEM, id: CLS_ITEM + '_' + index
|
|
312
|
-
attrs: { role: 'tab', 'aria-controls': CLS_CONTENT + '_' + index, 'aria-selected': 'false' }
|
|
399
|
+
className: CLS_ITEM, id: CLS_ITEM + _this.tabId + '_' + index
|
|
313
400
|
};
|
|
314
401
|
var txt = _this.createElement('span', {
|
|
315
402
|
className: CLS_TEXT, innerHTML: item, attrs: { 'role': 'presentation' }
|
|
@@ -317,9 +404,12 @@ var Tab = /** @class */ (function (_super) {
|
|
|
317
404
|
var cont = _this.createElement('div', {
|
|
318
405
|
className: CLS_TEXT_WRAP, innerHTML: txt + _this.btnCls.outerHTML
|
|
319
406
|
}).outerHTML;
|
|
320
|
-
var wrap = _this.createElement('div', {
|
|
321
|
-
|
|
322
|
-
|
|
407
|
+
var wrap = _this.createElement('div', {
|
|
408
|
+
className: CLS_WRAP, innerHTML: cont,
|
|
409
|
+
attrs: { role: 'tab', tabIndex: '-1', 'aria-selected': 'false', 'aria-controls': CLS_CONTENT + _this.tabId + '_' + index, 'aria-disabled': 'false' }
|
|
410
|
+
});
|
|
411
|
+
tabItems_1.appendChild(_this.createElement('div', attr));
|
|
412
|
+
selectAll('.' + CLS_ITEM, tabItems_1)[index].appendChild(wrap);
|
|
323
413
|
});
|
|
324
414
|
}
|
|
325
415
|
}
|
|
@@ -328,12 +418,30 @@ var Tab = /** @class */ (function (_super) {
|
|
|
328
418
|
height: (hdrPlace === 'Left' || hdrPlace === 'Right') ? '100%' : 'auto',
|
|
329
419
|
overflowMode: this.overflowMode,
|
|
330
420
|
items: (tabItems.length !== 0) ? tabItems : [],
|
|
331
|
-
clicked: this.clickHandler.bind(this)
|
|
421
|
+
clicked: this.clickHandler.bind(this),
|
|
422
|
+
scrollStep: this.scrollStep,
|
|
423
|
+
enableHtmlSanitizer: this.enableHtmlSanitizer,
|
|
424
|
+
cssClass: this.cssClass
|
|
332
425
|
});
|
|
426
|
+
this.tbObj.isStringTemplate = true;
|
|
333
427
|
this.tbObj.createElement = this.createElement;
|
|
334
428
|
this.tbObj.appendTo(this.hdrEle);
|
|
335
|
-
this.
|
|
429
|
+
attributes(this.hdrEle, { role: 'tablist' });
|
|
430
|
+
if (!isNOU(this.element.getAttribute('aria-label'))) {
|
|
431
|
+
this.hdrEle.setAttribute('aria-label', this.element.getAttribute('aria-label'));
|
|
432
|
+
this.element.removeAttribute('aria-label');
|
|
433
|
+
}
|
|
434
|
+
else if (!isNOU(this.element.getAttribute('aria-labelledby'))) {
|
|
435
|
+
this.hdrEle.setAttribute('aria-labelledby', this.element.getAttribute('aria-labelledby'));
|
|
436
|
+
this.element.removeAttribute('aria-labelledby');
|
|
437
|
+
}
|
|
336
438
|
this.setCloseButton(this.showCloseButton);
|
|
439
|
+
var toolbarHeader = this.tbObj.element.querySelector('.' + CLS_TB_ITEMS);
|
|
440
|
+
if (!isNOU(toolbarHeader)) {
|
|
441
|
+
if (isNOU(toolbarHeader.id) || toolbarHeader.id === '') {
|
|
442
|
+
toolbarHeader.id = this.element.id + '_' + 'tab_header_items';
|
|
443
|
+
}
|
|
444
|
+
}
|
|
337
445
|
};
|
|
338
446
|
Tab.prototype.renderContent = function () {
|
|
339
447
|
this.cntEle = select('.' + CLS_CONTENT, this.element);
|
|
@@ -343,9 +451,9 @@ var Tab = /** @class */ (function (_super) {
|
|
|
343
451
|
var contents = this.cntEle.children;
|
|
344
452
|
for (var i = 0; i < hdrItem.length; i++) {
|
|
345
453
|
if (contents.length - 1 >= i) {
|
|
346
|
-
contents.item(i)
|
|
347
|
-
attributes(contents.item(i), { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM + '_' + i });
|
|
348
|
-
contents.item(i).id = CLS_CONTENT + '_' + i;
|
|
454
|
+
addClass([contents.item(i)], CLS_ITEM);
|
|
455
|
+
attributes(contents.item(i), { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM + this.tabId + '_' + i });
|
|
456
|
+
contents.item(i).id = CLS_CONTENT + this.tabId + '_' + i;
|
|
349
457
|
}
|
|
350
458
|
}
|
|
351
459
|
}
|
|
@@ -358,21 +466,42 @@ var Tab = /** @class */ (function (_super) {
|
|
|
358
466
|
};
|
|
359
467
|
Tab.prototype.parseObject = function (items, index) {
|
|
360
468
|
var _this = this;
|
|
361
|
-
var
|
|
469
|
+
var tbItems = selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element);
|
|
470
|
+
var maxId = this.lastIndex;
|
|
471
|
+
if (!this.isReplace && tbItems.length > 0) {
|
|
472
|
+
var idList_1 = [];
|
|
473
|
+
tbItems.forEach(function (item) {
|
|
474
|
+
idList_1.push(_this.getIndexFromEle(item.id));
|
|
475
|
+
});
|
|
476
|
+
maxId = Math.max.apply(Math, idList_1);
|
|
477
|
+
}
|
|
362
478
|
var tItems = [];
|
|
363
479
|
var txtWrapEle;
|
|
364
480
|
var spliceArray = [];
|
|
365
481
|
var i = 0;
|
|
366
482
|
items.forEach(function (item, i) {
|
|
367
|
-
var pos = (isNOU(item.header.iconPosition)) ? '' : item.header.iconPosition;
|
|
368
|
-
var css = (isNOU(item.header.iconCss)) ? '' : item.header.iconCss;
|
|
369
|
-
if (isNOU(item.
|
|
483
|
+
var pos = (isNOU(item.header) || isNOU(item.header.iconPosition)) ? '' : item.header.iconPosition;
|
|
484
|
+
var css = (isNOU(item.header) || isNOU(item.header.iconCss)) ? '' : item.header.iconCss;
|
|
485
|
+
if ((isNOU(item.headerTemplate)) && (isNOU(item.header) || isNOU(item.header.text) ||
|
|
486
|
+
((item.header.text.length === 0)) && (css === ''))) {
|
|
370
487
|
spliceArray.push(i);
|
|
371
488
|
return;
|
|
372
489
|
}
|
|
373
|
-
var txt = item.header.text;
|
|
374
|
-
|
|
490
|
+
var txt = item.headerTemplate || item.header.text;
|
|
491
|
+
if (typeof txt === 'string' && _this.enableHtmlSanitizer) {
|
|
492
|
+
txt = SanitizeHtmlHelper.sanitize(txt);
|
|
493
|
+
}
|
|
494
|
+
var itemIndex;
|
|
495
|
+
if (_this.isReplace && !isNOU(_this.tbId) && _this.tbId !== '') {
|
|
496
|
+
itemIndex = parseInt(_this.tbId.substring(_this.tbId.lastIndexOf('_') + 1), 10);
|
|
497
|
+
_this.tbId = '';
|
|
498
|
+
}
|
|
499
|
+
else {
|
|
500
|
+
itemIndex = index + i;
|
|
501
|
+
}
|
|
502
|
+
_this.lastIndex = ((tbItems.length === 0) ? i : ((_this.isReplace) ? (itemIndex) : (maxId + 1 + i)));
|
|
375
503
|
var disabled = (item.disabled) ? ' ' + CLS_DISABLE + ' ' + CLS_OVERLAY : '';
|
|
504
|
+
var hidden = (item.visible === false) ? ' ' + CLS_HIDDEN : '';
|
|
376
505
|
txtWrapEle = _this.createElement('div', { className: CLS_TEXT, attrs: { 'role': 'presentation' } });
|
|
377
506
|
var tHtml = ((txt instanceof Object) ? txt.outerHTML : txt);
|
|
378
507
|
var txtEmpty = (!isNOU(tHtml) && tHtml !== '');
|
|
@@ -380,7 +509,7 @@ var Tab = /** @class */ (function (_super) {
|
|
|
380
509
|
txtWrapEle.appendChild(txt);
|
|
381
510
|
}
|
|
382
511
|
else {
|
|
383
|
-
_this.headerTextCompile(txtWrapEle, txt);
|
|
512
|
+
_this.headerTextCompile(txtWrapEle, txt, i);
|
|
384
513
|
}
|
|
385
514
|
var tEle;
|
|
386
515
|
var icon = _this.createElement('span', {
|
|
@@ -406,21 +535,23 @@ var Tab = /** @class */ (function (_super) {
|
|
|
406
535
|
_this.isIconAlone = true;
|
|
407
536
|
}
|
|
408
537
|
}
|
|
409
|
-
var
|
|
538
|
+
var tabIndex = isNOU(item.tabIndex) ? '-1' : item.tabIndex.toString();
|
|
539
|
+
var wrapAttrs = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-selected': 'false', 'aria-disabled': 'false' };
|
|
410
540
|
tCont.appendChild(_this.btnCls.cloneNode(true));
|
|
411
541
|
var wrap = _this.createElement('div', { className: CLS_WRAP, attrs: wrapAttrs });
|
|
412
542
|
wrap.appendChild(tCont);
|
|
413
543
|
if (_this.itemIndexArray === []) {
|
|
414
|
-
_this.itemIndexArray.push(CLS_ITEM + '_' + _this.lastIndex);
|
|
544
|
+
_this.itemIndexArray.push(CLS_ITEM + _this.tabId + '_' + _this.lastIndex);
|
|
415
545
|
}
|
|
416
546
|
else {
|
|
417
|
-
_this.itemIndexArray.splice((index + i), 0, CLS_ITEM + '_' + _this.lastIndex);
|
|
547
|
+
_this.itemIndexArray.splice((index + i), 0, CLS_ITEM + _this.tabId + '_' + _this.lastIndex);
|
|
418
548
|
}
|
|
419
549
|
var attrObj = {
|
|
420
|
-
id: CLS_ITEM + '_' + _this.lastIndex
|
|
550
|
+
id: CLS_ITEM + _this.tabId + '_' + _this.lastIndex
|
|
421
551
|
};
|
|
422
552
|
var tItem = { htmlAttributes: attrObj, template: wrap };
|
|
423
|
-
tItem.cssClass = item.cssClass
|
|
553
|
+
tItem.cssClass = ((item.cssClass !== undefined) ? item.cssClass : ' ') + ' ' + disabled + ' ' + hidden + ' '
|
|
554
|
+
+ ((css !== '') ? 'e-i' + pos : '') + ' ' + ((!txtEmpty) ? CLS_ICON : '');
|
|
424
555
|
if (pos === 'top' || pos === 'bottom') {
|
|
425
556
|
_this.element.classList.add('e-vertical-icon');
|
|
426
557
|
}
|
|
@@ -432,16 +563,20 @@ var Tab = /** @class */ (function (_super) {
|
|
|
432
563
|
_this.items.splice(spliceItemIndex, 1);
|
|
433
564
|
});
|
|
434
565
|
}
|
|
435
|
-
(this.isIconAlone)
|
|
566
|
+
if (this.isIconAlone) {
|
|
567
|
+
this.element.classList.add(CLS_ICON_TAB);
|
|
568
|
+
}
|
|
569
|
+
else {
|
|
570
|
+
this.element.classList.remove(CLS_ICON_TAB);
|
|
571
|
+
}
|
|
436
572
|
return tItems;
|
|
437
573
|
};
|
|
438
|
-
Tab.prototype.removeActiveClass = function (
|
|
439
|
-
var
|
|
440
|
-
if (
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
hdrActEle.classList.remove(CLS_ACTIVE);
|
|
574
|
+
Tab.prototype.removeActiveClass = function () {
|
|
575
|
+
var tabHeader = this.getTabHeader();
|
|
576
|
+
if (tabHeader) {
|
|
577
|
+
var tabItems = selectAll('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE, tabHeader);
|
|
578
|
+
[].slice.call(tabItems).forEach(function (node) { return node.classList.remove(CLS_ACTIVE); });
|
|
579
|
+
[].slice.call(tabItems).forEach(function (node) { return node.firstElementChild.setAttribute('aria-selected', 'false'); });
|
|
445
580
|
}
|
|
446
581
|
};
|
|
447
582
|
Tab.prototype.checkPopupOverflow = function (ele) {
|
|
@@ -459,8 +594,7 @@ var Tab = /** @class */ (function (_super) {
|
|
|
459
594
|
}
|
|
460
595
|
if (isOverflow) {
|
|
461
596
|
ele.classList.add(CLS_TB_POPUP);
|
|
462
|
-
this.tbPop.insertBefore(ele
|
|
463
|
-
ele.outerHTML = '';
|
|
597
|
+
this.tbPop.insertBefore(ele, selectAll('.' + CLS_TB_POPUP, this.tbPop)[0]);
|
|
464
598
|
}
|
|
465
599
|
return true;
|
|
466
600
|
};
|
|
@@ -475,9 +609,8 @@ var Tab = /** @class */ (function (_super) {
|
|
|
475
609
|
if (this.tbItem.length !== 0) {
|
|
476
610
|
target.classList.remove(CLS_TB_POPUP);
|
|
477
611
|
target.removeAttribute('style');
|
|
478
|
-
this.tbItems.appendChild(target
|
|
612
|
+
this.tbItems.appendChild(target);
|
|
479
613
|
this.actEleId = target.id;
|
|
480
|
-
target.outerHTML = '';
|
|
481
614
|
if (this.checkPopupOverflow(lastChild)) {
|
|
482
615
|
var prevEle = this.tbItems.lastChild.previousElementSibling;
|
|
483
616
|
this.checkPopupOverflow(prevEle);
|
|
@@ -486,22 +619,26 @@ var Tab = /** @class */ (function (_super) {
|
|
|
486
619
|
}
|
|
487
620
|
return selectAll('.' + CLS_TB_ITEM, this.tbItems).length - 1;
|
|
488
621
|
};
|
|
489
|
-
Tab.prototype.updateOrientationAttribute = function () {
|
|
490
|
-
attributes(this.element, { 'aria-orientation': (this.isVertical() ? 'vertical' : 'horizontal') });
|
|
491
|
-
};
|
|
492
622
|
Tab.prototype.setCloseButton = function (val) {
|
|
493
623
|
var trg = select('.' + CLS_HEADER, this.element);
|
|
494
|
-
(val === true)
|
|
624
|
+
if (val === true) {
|
|
625
|
+
trg.classList.add(CLS_CLOSE_SHOW);
|
|
626
|
+
}
|
|
627
|
+
else {
|
|
628
|
+
trg.classList.remove(CLS_CLOSE_SHOW);
|
|
629
|
+
}
|
|
495
630
|
this.tbObj.refreshOverflow();
|
|
496
|
-
this.
|
|
631
|
+
this.refreshActiveTabBorder();
|
|
497
632
|
};
|
|
498
633
|
Tab.prototype.prevCtnAnimation = function (prev, current) {
|
|
499
634
|
var animation;
|
|
500
635
|
var checkRTL = this.enableRtl || this.element.classList.contains(CLS_RTL);
|
|
501
636
|
if (this.isPopup || prev <= current) {
|
|
502
637
|
if (this.animation.previous.effect === 'SlideLeftIn') {
|
|
503
|
-
animation = {
|
|
504
|
-
|
|
638
|
+
animation = {
|
|
639
|
+
name: 'SlideLeftOut',
|
|
640
|
+
duration: this.animation.previous.duration, timingFunction: this.animation.previous.easing
|
|
641
|
+
};
|
|
505
642
|
}
|
|
506
643
|
else {
|
|
507
644
|
animation = null;
|
|
@@ -509,8 +646,10 @@ var Tab = /** @class */ (function (_super) {
|
|
|
509
646
|
}
|
|
510
647
|
else {
|
|
511
648
|
if (this.animation.next.effect === 'SlideRightIn') {
|
|
512
|
-
animation = {
|
|
513
|
-
|
|
649
|
+
animation = {
|
|
650
|
+
name: 'SlideRightOut',
|
|
651
|
+
duration: this.animation.next.duration, timingFunction: this.animation.next.easing
|
|
652
|
+
};
|
|
514
653
|
}
|
|
515
654
|
else {
|
|
516
655
|
animation = null;
|
|
@@ -546,22 +685,26 @@ var Tab = /** @class */ (function (_super) {
|
|
|
546
685
|
Tab.prototype.triggerAnimation = function (id, value) {
|
|
547
686
|
var _this = this;
|
|
548
687
|
var prevIndex = this.prevIndex;
|
|
549
|
-
var itemCollection = [].slice.call(this.element.querySelector('.' + CLS_CONTENT).children);
|
|
550
688
|
var oldCnt;
|
|
689
|
+
var itemCollection = [].slice.call(this.element.querySelector('.' + CLS_CONTENT).children);
|
|
551
690
|
itemCollection.forEach(function (item) {
|
|
552
691
|
if (item.id === _this.prevActiveEle) {
|
|
553
692
|
oldCnt = item;
|
|
554
693
|
}
|
|
555
694
|
});
|
|
556
695
|
var prevEle = this.tbItem[prevIndex];
|
|
557
|
-
var
|
|
558
|
-
var newCnt = this.getTrgContent(this.cntEle, no);
|
|
696
|
+
var newCnt = this.getTrgContent(this.cntEle, this.extIndex(id));
|
|
559
697
|
if (isNOU(oldCnt) && !isNOU(prevEle)) {
|
|
560
698
|
var idNo = this.extIndex(prevEle.id);
|
|
561
699
|
oldCnt = this.getTrgContent(this.cntEle, idNo);
|
|
562
700
|
}
|
|
563
|
-
|
|
564
|
-
|
|
701
|
+
if (!isNOU(newCnt)) {
|
|
702
|
+
this.prevActiveEle = newCnt.id;
|
|
703
|
+
}
|
|
704
|
+
var isPrevent = isNOU(this.animation) || this.animation.next === {} || this.animation.previous === {}
|
|
705
|
+
|| isNOU(this.animation.next.effect) || isNOU(this.animation.previous.effect)
|
|
706
|
+
|| this.animation.previous.effect == 'None' || this.animation.next.effect == 'None';
|
|
707
|
+
if (this.initRender || value === false || this.animation === {} || isPrevent) {
|
|
565
708
|
if (oldCnt && oldCnt !== newCnt) {
|
|
566
709
|
oldCnt.classList.remove(CLS_ACTIVE);
|
|
567
710
|
}
|
|
@@ -615,18 +758,34 @@ var Tab = /** @class */ (function (_super) {
|
|
|
615
758
|
}
|
|
616
759
|
else {
|
|
617
760
|
if (!isNOU(trgParent) && trgParent.classList.contains(CLS_ACTIVE) === false) {
|
|
618
|
-
this.
|
|
761
|
+
this.selectTab(trgIndex, null, true);
|
|
619
762
|
if (!isNOU(this.popEle)) {
|
|
620
763
|
this.popObj.hide(this.hide);
|
|
621
764
|
}
|
|
622
765
|
}
|
|
623
766
|
}
|
|
624
767
|
};
|
|
768
|
+
Tab.prototype.getTabHeader = function () {
|
|
769
|
+
if (isNOU(this.element)) {
|
|
770
|
+
return undefined;
|
|
771
|
+
}
|
|
772
|
+
var headers = [].slice.call(this.element.children).filter(function (e) { return e.classList.contains(CLS_HEADER); });
|
|
773
|
+
if (headers.length > 0) {
|
|
774
|
+
return headers[0];
|
|
775
|
+
}
|
|
776
|
+
else {
|
|
777
|
+
var wrap = [].slice.call(this.element.children).filter(function (e) { return !e.classList.contains(CLS_BLA_TEM); })[0];
|
|
778
|
+
if (!wrap) {
|
|
779
|
+
return undefined;
|
|
780
|
+
}
|
|
781
|
+
return [].slice.call(wrap.children).filter(function (e) { return e.classList.contains(CLS_HEADER); })[0];
|
|
782
|
+
}
|
|
783
|
+
};
|
|
625
784
|
Tab.prototype.getEleIndex = function (item) {
|
|
626
|
-
return Array.prototype.indexOf.call(selectAll('.' +
|
|
785
|
+
return Array.prototype.indexOf.call(selectAll('.' + CLS_TB_ITEM, this.getTabHeader()), item);
|
|
627
786
|
};
|
|
628
787
|
Tab.prototype.extIndex = function (id) {
|
|
629
|
-
return id.replace(CLS_ITEM + '_', '');
|
|
788
|
+
return id.replace(CLS_ITEM + this.tabId + '_', '');
|
|
630
789
|
};
|
|
631
790
|
Tab.prototype.expTemplateContent = function () {
|
|
632
791
|
var _this = this;
|
|
@@ -636,18 +795,30 @@ var Tab = /** @class */ (function (_super) {
|
|
|
636
795
|
}
|
|
637
796
|
});
|
|
638
797
|
};
|
|
639
|
-
Tab.prototype.templateCompile = function (ele, cnt) {
|
|
798
|
+
Tab.prototype.templateCompile = function (ele, cnt, index) {
|
|
640
799
|
var tempEle = this.createElement('div');
|
|
641
|
-
this.compileElement(tempEle, cnt, 'content');
|
|
800
|
+
this.compileElement(tempEle, cnt, 'content', index);
|
|
642
801
|
if (tempEle.childNodes.length !== 0) {
|
|
643
802
|
ele.appendChild(tempEle);
|
|
644
803
|
}
|
|
804
|
+
if (this.isReact) {
|
|
805
|
+
this.renderReactTemplates();
|
|
806
|
+
}
|
|
645
807
|
};
|
|
646
|
-
Tab.prototype.compileElement = function (ele, val, prop) {
|
|
808
|
+
Tab.prototype.compileElement = function (ele, val, prop, index) {
|
|
809
|
+
var templateFn;
|
|
647
810
|
if (typeof val === 'string') {
|
|
648
811
|
val = val.trim();
|
|
812
|
+
if (this.isVue) {
|
|
813
|
+
templateFn = compile(SanitizeHtmlHelper.sanitize(val));
|
|
814
|
+
}
|
|
815
|
+
else {
|
|
816
|
+
ele.innerHTML = SanitizeHtmlHelper.sanitize(val);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
else {
|
|
820
|
+
templateFn = compile(val);
|
|
649
821
|
}
|
|
650
|
-
var templateFn = compile(val);
|
|
651
822
|
var templateFUN;
|
|
652
823
|
if (!isNOU(templateFn)) {
|
|
653
824
|
templateFUN = templateFn({}, this, prop);
|
|
@@ -658,12 +829,16 @@ var Tab = /** @class */ (function (_super) {
|
|
|
658
829
|
});
|
|
659
830
|
}
|
|
660
831
|
};
|
|
661
|
-
Tab.prototype.headerTextCompile = function (element, text) {
|
|
662
|
-
this.compileElement(element, text, '
|
|
832
|
+
Tab.prototype.headerTextCompile = function (element, text, index) {
|
|
833
|
+
this.compileElement(element, text, 'headerTemplate', index);
|
|
663
834
|
};
|
|
664
|
-
Tab.prototype.getContent = function (ele, cnt, callType) {
|
|
835
|
+
Tab.prototype.getContent = function (ele, cnt, callType, index) {
|
|
665
836
|
var eleStr;
|
|
837
|
+
cnt = isNOU(cnt) ? "" : cnt;
|
|
666
838
|
if (typeof cnt === 'string' || isNOU(cnt.innerHTML)) {
|
|
839
|
+
if (typeof cnt === 'string' && this.enableHtmlSanitizer) {
|
|
840
|
+
cnt = SanitizeHtmlHelper.sanitize(cnt);
|
|
841
|
+
}
|
|
667
842
|
if (cnt[0] === '.' || cnt[0] === '#') {
|
|
668
843
|
if (document.querySelectorAll(cnt).length) {
|
|
669
844
|
var eleVal = document.querySelector(cnt);
|
|
@@ -677,11 +852,11 @@ var Tab = /** @class */ (function (_super) {
|
|
|
677
852
|
}
|
|
678
853
|
}
|
|
679
854
|
else {
|
|
680
|
-
this.templateCompile(ele, cnt);
|
|
855
|
+
this.templateCompile(ele, cnt, index);
|
|
681
856
|
}
|
|
682
857
|
}
|
|
683
858
|
else {
|
|
684
|
-
this.templateCompile(ele, cnt);
|
|
859
|
+
this.templateCompile(ele, cnt, index);
|
|
685
860
|
}
|
|
686
861
|
}
|
|
687
862
|
else {
|
|
@@ -696,10 +871,10 @@ var Tab = /** @class */ (function (_super) {
|
|
|
696
871
|
Tab.prototype.getTrgContent = function (cntEle, no) {
|
|
697
872
|
var ele;
|
|
698
873
|
if (this.element.classList.contains(CLS_NEST)) {
|
|
699
|
-
ele = select('.' + CLS_NEST + '> .' + CLS_CONTENT + ' > #' + CLS_CONTENT + '_' + no, this.element);
|
|
874
|
+
ele = select('.' + CLS_NEST + '> .' + CLS_CONTENT + ' > #' + CLS_CONTENT + this.tabId + '_' + no, this.element);
|
|
700
875
|
}
|
|
701
876
|
else {
|
|
702
|
-
ele = this.findEle(cntEle.children, CLS_CONTENT + '_' + no);
|
|
877
|
+
ele = this.findEle(cntEle.children, CLS_CONTENT + this.tabId + '_' + no);
|
|
703
878
|
}
|
|
704
879
|
return ele;
|
|
705
880
|
};
|
|
@@ -722,7 +897,15 @@ var Tab = /** @class */ (function (_super) {
|
|
|
722
897
|
if (this.isVertical()) {
|
|
723
898
|
var tbPos = (this.headerPlacement === 'Left') ? CLS_VLEFT : CLS_VRIGHT;
|
|
724
899
|
addClass([this.hdrEle], [CLS_VERTICAL, tbPos]);
|
|
725
|
-
this.element.classList.
|
|
900
|
+
if (!this.element.classList.contains(CLS_NEST)) {
|
|
901
|
+
addClass([this.element], [CLS_VTAB, tbPos]);
|
|
902
|
+
}
|
|
903
|
+
else {
|
|
904
|
+
addClass([this.hdrEle], [CLS_VTAB, tbPos]);
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
if (this.headerPlacement === 'Bottom') {
|
|
908
|
+
addClass([this.hdrEle], [CLS_HBOTTOM]);
|
|
726
909
|
}
|
|
727
910
|
};
|
|
728
911
|
Tab.prototype.updatePopAnimationConfig = function () {
|
|
@@ -731,23 +914,39 @@ var Tab = /** @class */ (function (_super) {
|
|
|
731
914
|
};
|
|
732
915
|
Tab.prototype.changeOrientation = function (place) {
|
|
733
916
|
this.setOrientation(place, this.hdrEle);
|
|
917
|
+
var activeTab = this.hdrEle.querySelector('.' + CLS_ACTIVE);
|
|
734
918
|
var isVertical = this.hdrEle.classList.contains(CLS_VERTICAL) ? true : false;
|
|
735
919
|
removeClass([this.element], [CLS_VTAB]);
|
|
736
920
|
removeClass([this.hdrEle], [CLS_VERTICAL, CLS_VLEFT, CLS_VRIGHT]);
|
|
737
921
|
if (isVertical !== this.isVertical()) {
|
|
738
|
-
this.
|
|
739
|
-
|
|
740
|
-
|
|
922
|
+
this.changeToolbarOrientation();
|
|
923
|
+
if (!isNOU(activeTab) && activeTab.classList.contains(CLS_TB_POPUP)) {
|
|
924
|
+
this.popupHandler(activeTab);
|
|
925
|
+
}
|
|
741
926
|
}
|
|
742
927
|
this.addVerticalClass();
|
|
743
|
-
this.
|
|
744
|
-
this.
|
|
928
|
+
this.setActiveBorder();
|
|
929
|
+
this.focusItem();
|
|
930
|
+
};
|
|
931
|
+
Tab.prototype.focusItem = function () {
|
|
932
|
+
var curActItem = select(' #' + CLS_ITEM + this.tabId + '_' + this.selectedItem, this.hdrEle);
|
|
933
|
+
if (!isNOU(curActItem)) {
|
|
934
|
+
curActItem.firstElementChild.focus();
|
|
935
|
+
}
|
|
936
|
+
};
|
|
937
|
+
Tab.prototype.changeToolbarOrientation = function () {
|
|
938
|
+
this.tbObj.setProperties({ height: (this.isVertical() ? '100%' : 'auto'), width: (this.isVertical() ? 'auto' : '100%') }, true);
|
|
939
|
+
this.tbObj.changeOrientation();
|
|
940
|
+
this.updatePopAnimationConfig();
|
|
745
941
|
};
|
|
746
942
|
Tab.prototype.setOrientation = function (place, ele) {
|
|
747
|
-
|
|
943
|
+
var headerPos = Array.prototype.indexOf.call(this.element.children, ele);
|
|
944
|
+
var contentPos = Array.prototype.indexOf.call(this.element.children, this.element.querySelector('.' + CLS_CONTENT));
|
|
945
|
+
if (place === 'Bottom' && (contentPos > headerPos)) {
|
|
748
946
|
this.element.appendChild(ele);
|
|
749
947
|
}
|
|
750
948
|
else {
|
|
949
|
+
removeClass([ele], [CLS_HBOTTOM]);
|
|
751
950
|
this.element.insertBefore(ele, select('.' + CLS_CONTENT, this.element));
|
|
752
951
|
}
|
|
753
952
|
};
|
|
@@ -766,27 +965,31 @@ var Tab = /** @class */ (function (_super) {
|
|
|
766
965
|
}
|
|
767
966
|
};
|
|
768
967
|
Tab.prototype.setContentHeight = function (val) {
|
|
968
|
+
if (this.element.classList.contains(CLS_FILL)) {
|
|
969
|
+
removeClass([this.element], [CLS_FILL]);
|
|
970
|
+
}
|
|
769
971
|
if (isNOU(this.cntEle)) {
|
|
770
972
|
return;
|
|
771
973
|
}
|
|
772
|
-
var hdrEle =
|
|
974
|
+
var hdrEle = this.getTabHeader();
|
|
773
975
|
if (this.heightAdjustMode === 'None') {
|
|
774
976
|
if (this.height === 'auto') {
|
|
775
977
|
return;
|
|
776
978
|
}
|
|
777
979
|
else {
|
|
778
980
|
if (!this.isVertical()) {
|
|
779
|
-
setStyle(this.cntEle, { 'height': (this.element.
|
|
981
|
+
setStyle(this.cntEle, { 'height': (this.element.clientHeight - hdrEle.offsetHeight) + 'px' });
|
|
780
982
|
}
|
|
781
983
|
}
|
|
782
984
|
}
|
|
783
985
|
else if (this.heightAdjustMode === 'Fill') {
|
|
986
|
+
addClass([this.element], [CLS_FILL]);
|
|
784
987
|
setStyle(this.element, { 'height': '100%' });
|
|
785
|
-
|
|
988
|
+
this.cntEle.style.height = 'calc(100% - ' + this.hdrEle.offsetHeight + 'px)';
|
|
786
989
|
}
|
|
787
990
|
else if (this.heightAdjustMode === 'Auto') {
|
|
788
|
-
var cnt = selectAll('.' + CLS_CONTENT + ' > .' + CLS_ITEM, this.element);
|
|
789
991
|
if (this.isTemplate === true) {
|
|
992
|
+
var cnt = selectAll('.' + CLS_CONTENT + ' > .' + CLS_ITEM, this.element);
|
|
790
993
|
for (var i = 0; i < cnt.length; i++) {
|
|
791
994
|
cnt[i].setAttribute('style', 'display:block; visibility: visible');
|
|
792
995
|
this.maxHeight = Math.max(this.maxHeight, this.getHeight(cnt[i]));
|
|
@@ -798,21 +1001,26 @@ var Tab = /** @class */ (function (_super) {
|
|
|
798
1001
|
this.cntEle = select('.' + CLS_CONTENT, this.element);
|
|
799
1002
|
if (val === true) {
|
|
800
1003
|
this.cntEle.appendChild(this.createElement('div', {
|
|
801
|
-
id: (CLS_CONTENT + '_' + 0), className: CLS_ITEM + ' ' + CLS_ACTIVE,
|
|
802
|
-
attrs: { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM + '_' + 0 }
|
|
1004
|
+
id: (CLS_CONTENT + this.tabId + '_' + 0), className: CLS_ITEM + ' ' + CLS_ACTIVE,
|
|
1005
|
+
attrs: { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM + this.tabId + '_' + 0 }
|
|
803
1006
|
}));
|
|
804
1007
|
}
|
|
805
1008
|
var ele = this.cntEle.children.item(0);
|
|
806
1009
|
for (var i = 0; i < this.items.length; i++) {
|
|
807
|
-
this.getContent(ele, this.items[i].content, 'clone');
|
|
1010
|
+
this.getContent(ele, this.items[i].content, 'clone', i);
|
|
808
1011
|
this.maxHeight = Math.max(this.maxHeight, this.getHeight(ele));
|
|
809
1012
|
while (ele.firstChild) {
|
|
810
1013
|
ele.removeChild(ele.firstChild);
|
|
811
1014
|
}
|
|
812
1015
|
}
|
|
1016
|
+
if (this.isReact) {
|
|
1017
|
+
this.clearTemplate(['content']);
|
|
1018
|
+
}
|
|
813
1019
|
this.templateEle = [];
|
|
814
|
-
this.getContent(ele, this.items[0].content, 'render');
|
|
815
|
-
|
|
1020
|
+
this.getContent(ele, this.items[0].content, 'render', 0);
|
|
1021
|
+
if (this.prevIndex !== this.selectedItem) {
|
|
1022
|
+
ele.classList.remove(CLS_ACTIVE);
|
|
1023
|
+
}
|
|
816
1024
|
}
|
|
817
1025
|
setStyle(this.cntEle, { 'height': this.maxHeight + 'px' });
|
|
818
1026
|
}
|
|
@@ -826,28 +1034,29 @@ var Tab = /** @class */ (function (_super) {
|
|
|
826
1034
|
parseFloat(cs.getPropertyValue('margin-top')) + parseFloat(cs.getPropertyValue('margin-bottom'));
|
|
827
1035
|
};
|
|
828
1036
|
Tab.prototype.setActiveBorder = function () {
|
|
829
|
-
var
|
|
830
|
-
var
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
if (this.headerPlacement === 'Bottom') {
|
|
834
|
-
trgHdrEle = this.element.children[1];
|
|
835
|
-
trg = select('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE, this.element.children[1]);
|
|
1037
|
+
var trgHdrEle = this.getTabHeader();
|
|
1038
|
+
var trg = select('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE, trgHdrEle);
|
|
1039
|
+
if (isNOU(trg)) {
|
|
1040
|
+
return;
|
|
836
1041
|
}
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
1042
|
+
if (!this.reorderActiveTab) {
|
|
1043
|
+
if (trg.classList.contains(CLS_TB_POPUP) && !this.bdrLine.classList.contains(CLS_HIDDEN)) {
|
|
1044
|
+
this.bdrLine.classList.add(CLS_HIDDEN);
|
|
1045
|
+
}
|
|
1046
|
+
if (trgHdrEle && !trgHdrEle.classList.contains(CLS_REORDER_ACTIVE_ITEM)) {
|
|
1047
|
+
trgHdrEle.classList.add(CLS_REORDER_ACTIVE_ITEM);
|
|
1048
|
+
}
|
|
840
1049
|
}
|
|
841
|
-
if (
|
|
842
|
-
|
|
1050
|
+
else if (trgHdrEle) {
|
|
1051
|
+
trgHdrEle.classList.remove(CLS_REORDER_ACTIVE_ITEM);
|
|
843
1052
|
}
|
|
844
1053
|
var root = closest(trg, '.' + CLS_TAB);
|
|
845
1054
|
if (this.element !== root) {
|
|
846
1055
|
return;
|
|
847
1056
|
}
|
|
848
1057
|
this.tbItems = select('.' + CLS_TB_ITEMS, trgHdrEle);
|
|
849
|
-
bar = select('.' + CLS_INDICATOR, trgHdrEle);
|
|
850
|
-
scrollCnt = select('.' + CLS_TB_ITEMS + ' .' + this.scrCntClass, trgHdrEle);
|
|
1058
|
+
var bar = select('.' + CLS_INDICATOR, trgHdrEle);
|
|
1059
|
+
var scrollCnt = select('.' + CLS_TB_ITEMS + ' .' + this.scrCntClass, trgHdrEle);
|
|
851
1060
|
if (this.isVertical()) {
|
|
852
1061
|
setStyle(bar, { 'left': '', 'right': '' });
|
|
853
1062
|
var tbHeight = (isNOU(scrollCnt)) ? this.tbItems.offsetHeight : scrollCnt.offsetHeight;
|
|
@@ -859,7 +1068,13 @@ var Tab = /** @class */ (function (_super) {
|
|
|
859
1068
|
}
|
|
860
1069
|
}
|
|
861
1070
|
else {
|
|
862
|
-
|
|
1071
|
+
if (this.overflowMode === 'MultiRow') {
|
|
1072
|
+
var top_1 = this.headerPlacement === 'Bottom' ? trg.offsetTop : trg.offsetHeight + trg.offsetTop;
|
|
1073
|
+
setStyle(bar, { 'top': top_1 + 'px', 'height': '' });
|
|
1074
|
+
}
|
|
1075
|
+
else {
|
|
1076
|
+
setStyle(bar, { 'top': '', 'height': '' });
|
|
1077
|
+
}
|
|
863
1078
|
var tbWidth = (isNOU(scrollCnt)) ? this.tbItems.offsetWidth : scrollCnt.offsetWidth;
|
|
864
1079
|
if (tbWidth !== 0) {
|
|
865
1080
|
setStyle(bar, { 'left': trg.offsetLeft + 'px', 'right': tbWidth - (trg.offsetLeft + trg.offsetWidth) + 'px' });
|
|
@@ -868,42 +1083,44 @@ var Tab = /** @class */ (function (_super) {
|
|
|
868
1083
|
setStyle(bar, { 'left': 'auto', 'right': 'auto' });
|
|
869
1084
|
}
|
|
870
1085
|
}
|
|
871
|
-
if (!isNOU(this.bdrLine)) {
|
|
1086
|
+
if (!isNOU(this.bdrLine) && !trg.classList.contains(CLS_TB_POPUP)) {
|
|
872
1087
|
this.bdrLine.classList.remove(CLS_HIDDEN);
|
|
873
1088
|
}
|
|
874
1089
|
};
|
|
875
|
-
Tab.prototype.setActive = function (value) {
|
|
876
|
-
|
|
1090
|
+
Tab.prototype.setActive = function (value, skipDataBind, isInteracted) {
|
|
1091
|
+
if (skipDataBind === void 0) { skipDataBind = false; }
|
|
1092
|
+
if (isInteracted === void 0) { isInteracted = false; }
|
|
1093
|
+
this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
|
|
877
1094
|
var trg = this.tbItem[value];
|
|
878
|
-
if (value >= 0) {
|
|
879
|
-
this.setProperties({ selectedItem: value }, true);
|
|
880
|
-
}
|
|
881
1095
|
if (value < 0 || isNaN(value) || this.tbItem.length === 0) {
|
|
882
1096
|
return;
|
|
883
1097
|
}
|
|
1098
|
+
if (value >= 0 && !skipDataBind) {
|
|
1099
|
+
this.allowServerDataBinding = false;
|
|
1100
|
+
this.setProperties({ selectedItem: value }, true);
|
|
1101
|
+
this.allowServerDataBinding = true;
|
|
1102
|
+
if (!this.initRender) {
|
|
1103
|
+
this.serverDataBind();
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
884
1106
|
if (trg.classList.contains(CLS_ACTIVE)) {
|
|
885
1107
|
this.setActiveBorder();
|
|
886
1108
|
return;
|
|
887
1109
|
}
|
|
888
1110
|
if (!this.isTemplate) {
|
|
889
|
-
|
|
890
|
-
if (!isNOU(prev)) {
|
|
891
|
-
prev.removeAttribute('aria-controls');
|
|
892
|
-
}
|
|
893
|
-
attributes(trg, { 'aria-controls': CLS_CONTENT + '_' + value });
|
|
1111
|
+
attributes(trg.firstElementChild, { 'aria-controls': CLS_CONTENT + this.tabId + '_' + value });
|
|
894
1112
|
}
|
|
895
1113
|
var id = trg.id;
|
|
896
|
-
this.removeActiveClass(
|
|
1114
|
+
this.removeActiveClass();
|
|
897
1115
|
trg.classList.add(CLS_ACTIVE);
|
|
898
|
-
trg.setAttribute('aria-selected', 'true');
|
|
1116
|
+
trg.firstElementChild.setAttribute('aria-selected', 'true');
|
|
899
1117
|
var no = Number(this.extIndex(id));
|
|
900
1118
|
if (isNOU(this.prevActiveEle)) {
|
|
901
|
-
this.prevActiveEle = CLS_CONTENT + '_' + no;
|
|
1119
|
+
this.prevActiveEle = CLS_CONTENT + this.tabId + '_' + no;
|
|
902
1120
|
}
|
|
903
|
-
attributes(this.element, { 'aria-activedescendant': id });
|
|
904
1121
|
if (this.isTemplate) {
|
|
905
1122
|
if (select('.' + CLS_CONTENT, this.element).children.length > 0) {
|
|
906
|
-
var trg_1 = this.findEle(select('.' + CLS_CONTENT, this.element).children, CLS_CONTENT + '_' + no);
|
|
1123
|
+
var trg_1 = this.findEle(select('.' + CLS_CONTENT, this.element).children, CLS_CONTENT + this.tabId + '_' + no);
|
|
907
1124
|
if (!isNOU(trg_1)) {
|
|
908
1125
|
trg_1.classList.add(CLS_ACTIVE);
|
|
909
1126
|
}
|
|
@@ -915,12 +1132,12 @@ var Tab = /** @class */ (function (_super) {
|
|
|
915
1132
|
var item = this.getTrgContent(this.cntEle, this.extIndex(id));
|
|
916
1133
|
if (isNOU(item)) {
|
|
917
1134
|
this.cntEle.appendChild(this.createElement('div', {
|
|
918
|
-
id: CLS_CONTENT + '_' + this.extIndex(id), className: CLS_ITEM + ' ' + CLS_ACTIVE,
|
|
919
|
-
attrs: { role: 'tabpanel', 'aria-labelledby': CLS_ITEM + '_' + this.extIndex(id) }
|
|
1135
|
+
id: CLS_CONTENT + this.tabId + '_' + this.extIndex(id), className: CLS_ITEM + ' ' + CLS_ACTIVE,
|
|
1136
|
+
attrs: { role: 'tabpanel', 'aria-labelledby': CLS_ITEM + this.tabId + '_' + this.extIndex(id) }
|
|
920
1137
|
}));
|
|
921
1138
|
var eleTrg = this.getTrgContent(this.cntEle, this.extIndex(id));
|
|
922
|
-
var itemIndex = Array.prototype.indexOf.call(this.itemIndexArray,
|
|
923
|
-
this.getContent(eleTrg, this.items[itemIndex].content, 'render');
|
|
1139
|
+
var itemIndex = Array.prototype.indexOf.call(this.itemIndexArray, id);
|
|
1140
|
+
this.getContent(eleTrg, this.items[itemIndex].content, 'render', itemIndex);
|
|
924
1141
|
}
|
|
925
1142
|
else {
|
|
926
1143
|
item.classList.add(CLS_ACTIVE);
|
|
@@ -928,24 +1145,24 @@ var Tab = /** @class */ (function (_super) {
|
|
|
928
1145
|
this.triggerAnimation(id, this.enableAnimation);
|
|
929
1146
|
}
|
|
930
1147
|
this.setActiveBorder();
|
|
931
|
-
|
|
932
|
-
this.
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
1148
|
+
this.refreshItemVisibility(trg);
|
|
1149
|
+
if (!this.initRender && !skipDataBind) {
|
|
1150
|
+
trg.firstElementChild.focus();
|
|
1151
|
+
var eventArg = {
|
|
1152
|
+
previousItem: this.prevItem,
|
|
1153
|
+
previousIndex: this.prevIndex,
|
|
1154
|
+
selectedItem: trg,
|
|
1155
|
+
selectedIndex: value,
|
|
1156
|
+
selectedContent: select('#' + CLS_CONTENT + this.tabId + '_' + this.selectingID, this.content),
|
|
1157
|
+
isSwiped: this.isSwipeed,
|
|
1158
|
+
isInteracted: isInteracted
|
|
1159
|
+
};
|
|
943
1160
|
this.trigger('selected', eventArg);
|
|
944
1161
|
}
|
|
945
1162
|
};
|
|
946
1163
|
Tab.prototype.setItems = function (items) {
|
|
947
1164
|
this.isReplace = true;
|
|
948
|
-
this.tbItems = select('.' +
|
|
1165
|
+
this.tbItems = select('.' + CLS_TB_ITEMS, this.getTabHeader());
|
|
949
1166
|
this.tbObj.items = this.parseObject(items, 0);
|
|
950
1167
|
this.tbObj.dataBind();
|
|
951
1168
|
this.isReplace = false;
|
|
@@ -971,7 +1188,20 @@ var Tab = /** @class */ (function (_super) {
|
|
|
971
1188
|
tbPopObj.show(config);
|
|
972
1189
|
}
|
|
973
1190
|
};
|
|
1191
|
+
Tab.prototype.bindDraggable = function () {
|
|
1192
|
+
var _this = this;
|
|
1193
|
+
if (this.allowDragAndDrop) {
|
|
1194
|
+
var tabHeader = this.element.querySelector('.' + CLS_HEADER);
|
|
1195
|
+
if (tabHeader) {
|
|
1196
|
+
var items = tabHeader.querySelectorAll('.' + CLS_TB_ITEM);
|
|
1197
|
+
items.forEach(function (element) {
|
|
1198
|
+
_this.initializeDrag(element);
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
};
|
|
974
1203
|
Tab.prototype.wireEvents = function () {
|
|
1204
|
+
this.bindDraggable();
|
|
975
1205
|
window.addEventListener('resize', this.resizeContext);
|
|
976
1206
|
EventHandler.add(this.element, 'mouseover', this.hoverHandler, this);
|
|
977
1207
|
EventHandler.add(this.element, 'keydown', this.spaceKeyDown, this);
|
|
@@ -986,10 +1216,15 @@ var Tab = /** @class */ (function (_super) {
|
|
|
986
1216
|
});
|
|
987
1217
|
};
|
|
988
1218
|
Tab.prototype.unWireEvents = function () {
|
|
989
|
-
this.keyModule
|
|
990
|
-
|
|
991
|
-
|
|
1219
|
+
if (!isNOU(this.keyModule)) {
|
|
1220
|
+
this.keyModule.destroy();
|
|
1221
|
+
}
|
|
1222
|
+
if (!isNOU(this.tabKeyModule)) {
|
|
1223
|
+
this.tabKeyModule.destroy();
|
|
1224
|
+
}
|
|
1225
|
+
if (!isNOU(this.cntEle) && !isNOU(this.touchModule)) {
|
|
992
1226
|
this.touchModule.destroy();
|
|
1227
|
+
this.touchModule = null;
|
|
993
1228
|
}
|
|
994
1229
|
window.removeEventListener('resize', this.resizeContext);
|
|
995
1230
|
EventHandler.remove(this.element, 'mouseover', this.hoverHandler);
|
|
@@ -1010,8 +1245,8 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1010
1245
|
}
|
|
1011
1246
|
else {
|
|
1012
1247
|
this.isPopup = false;
|
|
1013
|
-
if (!isNOU(trgParent) && trgIndex !== this.selectedItem) {
|
|
1014
|
-
this.
|
|
1248
|
+
if (!isNOU(trgParent) && (trgIndex !== this.selectedItem || trgIndex !== this.prevIndex)) {
|
|
1249
|
+
this.selectTab(trgIndex, args.originalEvent, true);
|
|
1015
1250
|
}
|
|
1016
1251
|
}
|
|
1017
1252
|
};
|
|
@@ -1019,11 +1254,19 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1019
1254
|
if (e.velocity < 3 && isNOU(e.originalEvent.changedTouches)) {
|
|
1020
1255
|
return;
|
|
1021
1256
|
}
|
|
1257
|
+
if (this.isNested) {
|
|
1258
|
+
this.element.setAttribute('data-swipe', 'true');
|
|
1259
|
+
}
|
|
1260
|
+
var nestedTab = this.element.querySelector('[data-swipe="true"]');
|
|
1261
|
+
if (nestedTab) {
|
|
1262
|
+
nestedTab.removeAttribute('data-swipe');
|
|
1263
|
+
return;
|
|
1264
|
+
}
|
|
1022
1265
|
this.isSwipeed = true;
|
|
1023
1266
|
if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
|
|
1024
1267
|
for (var k = this.selectedItem - 1; k >= 0; k--) {
|
|
1025
1268
|
if (!this.tbItem[k].classList.contains(CLS_HIDDEN)) {
|
|
1026
|
-
this.
|
|
1269
|
+
this.selectTab(k, null, true);
|
|
1027
1270
|
break;
|
|
1028
1271
|
}
|
|
1029
1272
|
}
|
|
@@ -1031,7 +1274,7 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1031
1274
|
else if (e.swipeDirection === 'Left' && (this.selectedItem !== selectAll('.' + CLS_TB_ITEM, this.element).length - 1)) {
|
|
1032
1275
|
for (var i = this.selectedItem + 1; i < this.tbItem.length; i++) {
|
|
1033
1276
|
if (!this.tbItem[i].classList.contains(CLS_HIDDEN)) {
|
|
1034
|
-
this.
|
|
1277
|
+
this.selectTab(i, null, true);
|
|
1035
1278
|
break;
|
|
1036
1279
|
}
|
|
1037
1280
|
}
|
|
@@ -1052,12 +1295,14 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1052
1295
|
}
|
|
1053
1296
|
this.element.classList.add(CLS_FOCUS);
|
|
1054
1297
|
var trg = e.target;
|
|
1055
|
-
var
|
|
1056
|
-
var
|
|
1057
|
-
this.popEle = select('.' +
|
|
1298
|
+
var tabHeader = this.getTabHeader();
|
|
1299
|
+
var actEle = select('.' + CLS_ACTIVE, tabHeader);
|
|
1300
|
+
this.popEle = select('.' + CLS_TB_POP, tabHeader);
|
|
1058
1301
|
if (!isNOU(this.popEle)) {
|
|
1059
1302
|
this.popObj = this.popEle.ej2_instances[0];
|
|
1060
1303
|
}
|
|
1304
|
+
var item = closest(document.activeElement, '.' + CLS_TB_ITEM);
|
|
1305
|
+
var trgParent = closest(trg, '.' + CLS_TB_ITEM);
|
|
1061
1306
|
switch (e.action) {
|
|
1062
1307
|
case 'space':
|
|
1063
1308
|
case 'enter':
|
|
@@ -1074,16 +1319,17 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1074
1319
|
case 'shiftTab':
|
|
1075
1320
|
if (trg.classList.contains(CLS_WRAP)
|
|
1076
1321
|
&& closest(trg, '.' + CLS_TB_ITEM).classList.contains(CLS_ACTIVE) === false) {
|
|
1077
|
-
trg.setAttribute('tabindex', '-
|
|
1322
|
+
trg.setAttribute('tabindex', trg.getAttribute('data-tabindex'));
|
|
1078
1323
|
}
|
|
1079
1324
|
if (this.popObj && isVisible(this.popObj.element)) {
|
|
1080
1325
|
this.popObj.hide(this.hide);
|
|
1081
1326
|
}
|
|
1082
|
-
actEle.children.item(0).
|
|
1327
|
+
if (!isNOU(actEle) && actEle.children.item(0).getAttribute('tabindex') === '-1') {
|
|
1328
|
+
actEle.children.item(0).setAttribute('tabindex', '0');
|
|
1329
|
+
}
|
|
1083
1330
|
break;
|
|
1084
1331
|
case 'moveLeft':
|
|
1085
1332
|
case 'moveRight':
|
|
1086
|
-
var item = closest(document.activeElement, '.' + CLS_TB_ITEM);
|
|
1087
1333
|
if (!isNOU(item)) {
|
|
1088
1334
|
this.refreshItemVisibility(item);
|
|
1089
1335
|
}
|
|
@@ -1095,11 +1341,10 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1095
1341
|
}
|
|
1096
1342
|
break;
|
|
1097
1343
|
case 'delete':
|
|
1098
|
-
var trgParent = closest(trg, '.' + CLS_TB_ITEM);
|
|
1099
1344
|
if (this.showCloseButton === true && !isNOU(trgParent)) {
|
|
1100
1345
|
var nxtSib = trgParent.nextSibling;
|
|
1101
1346
|
if (!isNOU(nxtSib) && nxtSib.classList.contains(CLS_TB_ITEM)) {
|
|
1102
|
-
nxtSib.
|
|
1347
|
+
nxtSib.firstElementChild.focus();
|
|
1103
1348
|
}
|
|
1104
1349
|
this.removeTab(this.getEleIndex(trgParent));
|
|
1105
1350
|
}
|
|
@@ -1107,17 +1352,11 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1107
1352
|
break;
|
|
1108
1353
|
}
|
|
1109
1354
|
};
|
|
1110
|
-
Tab.prototype.refreshActElePosition = function () {
|
|
1111
|
-
var activeEle = select('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE, this.element);
|
|
1112
|
-
if (!isNOU(activeEle)) {
|
|
1113
|
-
this.select(this.getEleIndex(activeEle));
|
|
1114
|
-
}
|
|
1115
|
-
this.refreshActiveBorder();
|
|
1116
|
-
};
|
|
1117
1355
|
Tab.prototype.refreshItemVisibility = function (target) {
|
|
1118
1356
|
var scrCnt = select('.' + this.scrCntClass, this.tbItems);
|
|
1119
1357
|
if (!this.isVertical() && !isNOU(scrCnt)) {
|
|
1120
1358
|
var scrBar = select('.e-hscroll-bar', this.tbItems);
|
|
1359
|
+
scrBar.removeAttribute('tabindex');
|
|
1121
1360
|
var scrStart = scrBar.scrollLeft;
|
|
1122
1361
|
var scrEnd = scrStart + scrBar.offsetWidth;
|
|
1123
1362
|
var eleStart = target.offsetLeft;
|
|
@@ -1138,6 +1377,9 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1138
1377
|
return;
|
|
1139
1378
|
}
|
|
1140
1379
|
};
|
|
1380
|
+
Tab.prototype.getIndexFromEle = function (id) {
|
|
1381
|
+
return parseInt(id.substring(id.lastIndexOf('_') + 1), 10);
|
|
1382
|
+
};
|
|
1141
1383
|
Tab.prototype.hoverHandler = function (e) {
|
|
1142
1384
|
var trg = e.target;
|
|
1143
1385
|
if (!isNOU(trg.classList) && trg.classList.contains(CLS_ICON_CLOSE)) {
|
|
@@ -1149,61 +1391,80 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1149
1391
|
var changedProp = Object.keys(newProp.items);
|
|
1150
1392
|
for (var i = 0; i < changedProp.length; i++) {
|
|
1151
1393
|
var index = parseInt(Object.keys(newProp.items)[i], 10);
|
|
1152
|
-
var
|
|
1153
|
-
var
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
if ((textVal === '') && (icon === '')) {
|
|
1161
|
-
this.removeTab(index);
|
|
1394
|
+
var properties = Object.keys(newProp.items[index]);
|
|
1395
|
+
for (var j = 0; j < properties.length; j++) {
|
|
1396
|
+
var oldVal = Object(oldProp.items[index])[properties[j]];
|
|
1397
|
+
var newVal = Object(newProp.items[index])[properties[j]];
|
|
1398
|
+
var hdr = this.element.querySelectorAll('.' + CLS_TB_ITEM)[index];
|
|
1399
|
+
var itemIndex = void 0;
|
|
1400
|
+
if (hdr && !isNOU(hdr.id) && hdr.id !== '') {
|
|
1401
|
+
itemIndex = this.getIndexFromEle(hdr.id);
|
|
1162
1402
|
}
|
|
1163
1403
|
else {
|
|
1164
|
-
|
|
1165
|
-
arr.push(this.items[index]);
|
|
1166
|
-
this.items.splice(index, 1);
|
|
1167
|
-
this.itemIndexArray.splice(index, 1);
|
|
1168
|
-
this.tbObj.items.splice(index, 1);
|
|
1169
|
-
var isHiddenEle = hdrItem.classList.contains(CLS_HIDDEN);
|
|
1170
|
-
detach(hdrItem);
|
|
1171
|
-
this.isReplace = true;
|
|
1172
|
-
this.addTab(arr, index);
|
|
1173
|
-
if (isHiddenEle) {
|
|
1174
|
-
this.hideTab(index);
|
|
1175
|
-
}
|
|
1176
|
-
this.isReplace = false;
|
|
1404
|
+
itemIndex = index;
|
|
1177
1405
|
}
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1406
|
+
var hdrItem = select('.' + CLS_TB_ITEMS + ' #' + CLS_ITEM + this.tabId + '_' + itemIndex, this.element);
|
|
1407
|
+
var cntItem = select('.' + CLS_CONTENT + ' #' + CLS_CONTENT + this.tabId + '_' + itemIndex, this.element);
|
|
1408
|
+
if (properties[j] === 'header' || properties[j] === 'headerTemplate') {
|
|
1409
|
+
var icon = (isNOU(this.items[index].header) ||
|
|
1410
|
+
isNOU(this.items[index].header.iconCss)) ? '' : this.items[index].header.iconCss;
|
|
1411
|
+
var textVal = this.items[index].headerTemplate || this.items[index].header.text;
|
|
1412
|
+
if ((textVal === '') && (icon === '')) {
|
|
1413
|
+
this.removeTab(index);
|
|
1414
|
+
}
|
|
1415
|
+
else {
|
|
1416
|
+
this.tbId = hdr.id;
|
|
1417
|
+
var arr = [];
|
|
1418
|
+
arr.push(this.items[index]);
|
|
1419
|
+
this.items.splice(index, 1);
|
|
1420
|
+
this.itemIndexArray.splice(index, 1);
|
|
1421
|
+
this.tbObj.items.splice(index, 1);
|
|
1422
|
+
var isHiddenEle = hdrItem.classList.contains(CLS_HIDDEN);
|
|
1423
|
+
detach(hdrItem);
|
|
1424
|
+
this.isReplace = true;
|
|
1425
|
+
this.addTab(arr, index);
|
|
1426
|
+
if (isHiddenEle) {
|
|
1427
|
+
this.hideTab(index);
|
|
1428
|
+
}
|
|
1429
|
+
this.isReplace = false;
|
|
1430
|
+
}
|
|
1185
1431
|
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1432
|
+
if (properties[j] === 'content' && !isNOU(cntItem)) {
|
|
1433
|
+
var strVal = typeof newVal === 'string' || isNOU(newVal.innerHTML);
|
|
1434
|
+
if (strVal && (newVal[0] === '.' || newVal[0] === '#') && newVal.length) {
|
|
1435
|
+
var eleVal = document.querySelector(newVal);
|
|
1436
|
+
cntItem.appendChild(eleVal);
|
|
1437
|
+
eleVal.style.display = '';
|
|
1438
|
+
}
|
|
1439
|
+
else if (newVal === '' && oldVal[0] === '#') {
|
|
1440
|
+
document.body.appendChild(this.element.querySelector(oldVal)).style.display = 'none';
|
|
1441
|
+
cntItem.innerHTML = newVal;
|
|
1442
|
+
}
|
|
1443
|
+
else if (this.isReact) {
|
|
1444
|
+
cntItem.innerHTML = '';
|
|
1445
|
+
this.templateCompile(cntItem, newVal, index);
|
|
1446
|
+
}
|
|
1447
|
+
else if (typeof newVal !== 'function') {
|
|
1448
|
+
cntItem.innerHTML = newVal;
|
|
1449
|
+
}
|
|
1189
1450
|
}
|
|
1190
|
-
|
|
1191
|
-
|
|
1451
|
+
if (properties[j] === 'cssClass') {
|
|
1452
|
+
if (!isNOU(hdrItem)) {
|
|
1453
|
+
hdrItem.classList.remove(oldVal);
|
|
1454
|
+
hdrItem.classList.add(newVal);
|
|
1455
|
+
}
|
|
1456
|
+
if (!isNOU(cntItem)) {
|
|
1457
|
+
cntItem.classList.remove(oldVal);
|
|
1458
|
+
cntItem.classList.add(newVal);
|
|
1459
|
+
}
|
|
1192
1460
|
}
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
if (!isNOU(hdrItem)) {
|
|
1196
|
-
hdrItem.classList.remove(oldVal);
|
|
1197
|
-
hdrItem.classList.add(newVal);
|
|
1461
|
+
if (properties[j] === 'disabled') {
|
|
1462
|
+
this.enableTab(index, ((newVal === true) ? false : true));
|
|
1198
1463
|
}
|
|
1199
|
-
if (
|
|
1200
|
-
|
|
1201
|
-
cntItem.classList.add(newVal);
|
|
1464
|
+
if (properties[j] === 'visible') {
|
|
1465
|
+
this.hideTab(index, ((newVal === true) ? false : true));
|
|
1202
1466
|
}
|
|
1203
1467
|
}
|
|
1204
|
-
if (property === 'disabled') {
|
|
1205
|
-
this.enableTab(index, ((newVal === true) ? false : true));
|
|
1206
|
-
}
|
|
1207
1468
|
}
|
|
1208
1469
|
}
|
|
1209
1470
|
else {
|
|
@@ -1212,22 +1473,241 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1212
1473
|
this.reRenderItems();
|
|
1213
1474
|
}
|
|
1214
1475
|
else {
|
|
1476
|
+
if (this.isReact || this.isAngular) {
|
|
1477
|
+
this.clearTemplate();
|
|
1478
|
+
}
|
|
1215
1479
|
this.setItems(newProp.items);
|
|
1216
1480
|
if (this.templateEle.length > 0) {
|
|
1217
1481
|
this.expTemplateContent();
|
|
1218
1482
|
}
|
|
1219
1483
|
this.templateEle = [];
|
|
1220
|
-
select('.' + CLS_TAB + ' > .' + CLS_CONTENT, this.element)
|
|
1484
|
+
var selectElement = select('.' + CLS_TAB + ' > .' + CLS_CONTENT, this.element);
|
|
1485
|
+
while (selectElement.firstElementChild) {
|
|
1486
|
+
detach(selectElement.firstElementChild);
|
|
1487
|
+
}
|
|
1221
1488
|
this.select(this.selectedItem);
|
|
1489
|
+
this.draggableItems = [];
|
|
1490
|
+
this.bindDraggable();
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
};
|
|
1494
|
+
Tab.prototype.initializeDrag = function (target) {
|
|
1495
|
+
var _this = this;
|
|
1496
|
+
var dragObj = new Draggable(target, {
|
|
1497
|
+
dragArea: this.dragArea,
|
|
1498
|
+
dragTarget: '.' + CLS_TB_ITEM,
|
|
1499
|
+
clone: true,
|
|
1500
|
+
helper: this.helper.bind(this),
|
|
1501
|
+
dragStart: this.itemDragStart.bind(this),
|
|
1502
|
+
drag: function (e) {
|
|
1503
|
+
var dragIndex = _this.getEleIndex(_this.dragItem);
|
|
1504
|
+
var dropIndex;
|
|
1505
|
+
var dropItem;
|
|
1506
|
+
var dragArgs = {
|
|
1507
|
+
draggedItem: _this.dragItem,
|
|
1508
|
+
event: e.event,
|
|
1509
|
+
target: e.target,
|
|
1510
|
+
droppedItem: e.target.closest('.' + CLS_TB_ITEM),
|
|
1511
|
+
clonedElement: _this.cloneElement,
|
|
1512
|
+
index: dragIndex
|
|
1513
|
+
};
|
|
1514
|
+
if (!isNOU(e.target.closest('.' + CLS_TAB)) && !e.target.closest('.' + CLS_TAB).isEqualNode(_this.element) &&
|
|
1515
|
+
_this.dragArea !== '.' + CLS_HEADER) {
|
|
1516
|
+
_this.trigger('dragging', dragArgs);
|
|
1517
|
+
}
|
|
1518
|
+
else {
|
|
1519
|
+
if (!(e.target.closest(_this.dragArea)) && _this.overflowMode !== 'Popup') {
|
|
1520
|
+
document.body.style.cursor = 'not-allowed';
|
|
1521
|
+
addClass([_this.cloneElement], CLS_HIDDEN);
|
|
1522
|
+
if (_this.dragItem.classList.contains(CLS_HIDDEN)) {
|
|
1523
|
+
removeClass([_this.dragItem], CLS_HIDDEN);
|
|
1524
|
+
}
|
|
1525
|
+
_this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = 'visible';
|
|
1526
|
+
}
|
|
1527
|
+
else {
|
|
1528
|
+
document.body.style.cursor = '';
|
|
1529
|
+
_this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = 'hidden';
|
|
1530
|
+
if (_this.cloneElement.classList.contains(CLS_HIDDEN)) {
|
|
1531
|
+
removeClass([_this.cloneElement], CLS_HIDDEN);
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
if (_this.overflowMode === 'Scrollable' && !isNOU(_this.element.querySelector('.e-hscroll'))) {
|
|
1535
|
+
var scrollRightNavEle = _this.element.querySelector('.e-scroll-right-nav');
|
|
1536
|
+
var scrollLeftNavEle = _this.element.querySelector('.e-scroll-left-nav');
|
|
1537
|
+
var hscrollBar = _this.element.querySelector('.e-hscroll-bar');
|
|
1538
|
+
if (!isNOU(scrollRightNavEle) && Math.abs((scrollRightNavEle.offsetWidth / 2) +
|
|
1539
|
+
scrollRightNavEle.offsetLeft) > _this.cloneElement.offsetLeft + _this.cloneElement.offsetWidth) {
|
|
1540
|
+
hscrollBar.scrollLeft -= 10;
|
|
1541
|
+
}
|
|
1542
|
+
if (!isNOU(scrollLeftNavEle) && Math.abs((scrollLeftNavEle.offsetLeft + scrollLeftNavEle.offsetWidth) -
|
|
1543
|
+
_this.cloneElement.offsetLeft) > (scrollLeftNavEle.offsetWidth / 2)) {
|
|
1544
|
+
hscrollBar.scrollLeft += 10;
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
_this.cloneElement.style.pointerEvents = 'none';
|
|
1548
|
+
dropItem = closest(e.target, '.' + CLS_TB_ITEM + '.e-draggable');
|
|
1549
|
+
var scrollContentWidth = 0;
|
|
1550
|
+
if (_this.overflowMode === 'Scrollable' && !isNOU(_this.element.querySelector('.e-hscroll'))) {
|
|
1551
|
+
scrollContentWidth = _this.element.querySelector('.e-hscroll-content').offsetWidth;
|
|
1552
|
+
}
|
|
1553
|
+
if (dropItem != null && !dropItem.isSameNode(_this.dragItem) &&
|
|
1554
|
+
dropItem.closest('.' + CLS_TAB).isSameNode(_this.dragItem.closest('.' + CLS_TAB))) {
|
|
1555
|
+
dropIndex = _this.getEleIndex(dropItem);
|
|
1556
|
+
if (dropIndex < dragIndex &&
|
|
1557
|
+
(Math.abs((dropItem.offsetLeft + dropItem.offsetWidth) -
|
|
1558
|
+
_this.cloneElement.offsetLeft) > (dropItem.offsetWidth / 2))) {
|
|
1559
|
+
_this.dragAction(dropItem, dragIndex, dropIndex);
|
|
1560
|
+
}
|
|
1561
|
+
if (dropIndex > dragIndex &&
|
|
1562
|
+
(Math.abs(dropItem.offsetWidth / 2) + dropItem.offsetLeft -
|
|
1563
|
+
scrollContentWidth) < _this.cloneElement.offsetLeft + _this.cloneElement.offsetWidth) {
|
|
1564
|
+
_this.dragAction(dropItem, dragIndex, dropIndex);
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
_this.droppedIndex = _this.getEleIndex(_this.dragItem);
|
|
1568
|
+
_this.trigger('dragging', dragArgs);
|
|
1569
|
+
}
|
|
1570
|
+
},
|
|
1571
|
+
dragStop: this.itemDragStop.bind(this)
|
|
1572
|
+
});
|
|
1573
|
+
this.draggableItems.push(dragObj);
|
|
1574
|
+
};
|
|
1575
|
+
Tab.prototype.helper = function (e) {
|
|
1576
|
+
this.cloneElement = this.createElement('div');
|
|
1577
|
+
if (e.element) {
|
|
1578
|
+
this.cloneElement = (e.element.cloneNode(true));
|
|
1579
|
+
addClass([this.cloneElement], 'e-tab-clone-element');
|
|
1580
|
+
if (this.element.querySelector('.' + CLS_HEADER).classList.contains(CLS_CLOSE_SHOW)) {
|
|
1581
|
+
addClass([this.cloneElement], CLS_CLOSE_SHOW);
|
|
1582
|
+
}
|
|
1583
|
+
removeClass([this.cloneElement.querySelector('.' + CLS_WRAP)], 'e-ripple');
|
|
1584
|
+
if (!isNOU(this.cloneElement.querySelector('.e-ripple-element'))) {
|
|
1585
|
+
remove(this.cloneElement.querySelector('.e-ripple-element'));
|
|
1586
|
+
}
|
|
1587
|
+
document.body.appendChild(this.cloneElement);
|
|
1588
|
+
}
|
|
1589
|
+
return this.cloneElement;
|
|
1590
|
+
};
|
|
1591
|
+
Tab.prototype.itemDragStart = function (e) {
|
|
1592
|
+
var _this = this;
|
|
1593
|
+
this.draggingItems = this.items.map(function (x) { return x; });
|
|
1594
|
+
this.dragItem = e.element;
|
|
1595
|
+
var dragArgs = {
|
|
1596
|
+
draggedItem: e.element,
|
|
1597
|
+
event: e.event,
|
|
1598
|
+
target: e.target,
|
|
1599
|
+
droppedItem: null,
|
|
1600
|
+
index: this.getEleIndex(this.dragItem),
|
|
1601
|
+
clonedElement: this.cloneElement,
|
|
1602
|
+
cancel: false
|
|
1603
|
+
};
|
|
1604
|
+
this.trigger('onDragStart', dragArgs, function (tabitemDragArgs) {
|
|
1605
|
+
if (tabitemDragArgs.cancel) {
|
|
1606
|
+
detach(_this.cloneElement);
|
|
1607
|
+
}
|
|
1608
|
+
else {
|
|
1609
|
+
_this.removeActiveClass();
|
|
1610
|
+
addClass([_this.tbItems.querySelector('.' + CLS_INDICATOR)], CLS_HIDDEN);
|
|
1611
|
+
_this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = 'hidden';
|
|
1612
|
+
}
|
|
1613
|
+
});
|
|
1614
|
+
};
|
|
1615
|
+
Tab.prototype.dragAction = function (dropItem, dragsIndex, dropIndex) {
|
|
1616
|
+
if (this.items.length > 0) {
|
|
1617
|
+
var item = this.draggingItems[dragsIndex];
|
|
1618
|
+
this.draggingItems.splice(dragsIndex, 1);
|
|
1619
|
+
this.draggingItems.splice(dropIndex, 0, item);
|
|
1620
|
+
}
|
|
1621
|
+
if (this.overflowMode === 'MultiRow') {
|
|
1622
|
+
dropItem.parentNode.insertBefore(this.dragItem, dropItem.nextElementSibling);
|
|
1623
|
+
}
|
|
1624
|
+
if (dragsIndex > dropIndex) {
|
|
1625
|
+
if (!(this.dragItem.parentElement).isSameNode(dropItem.parentElement)) {
|
|
1626
|
+
if (this.overflowMode === 'Extended') {
|
|
1627
|
+
if (dropItem.isSameNode(dropItem.parentElement.lastChild)) {
|
|
1628
|
+
var popupContainer = this.dragItem.parentNode;
|
|
1629
|
+
dropItem.parentNode.insertBefore(this.dragItem, dropItem);
|
|
1630
|
+
popupContainer.insertBefore(dropItem.parentElement.lastChild, popupContainer.childNodes[0]);
|
|
1631
|
+
}
|
|
1632
|
+
else {
|
|
1633
|
+
this.dragItem.parentNode.insertBefore((dropItem.parentElement.lastChild), this.dragItem.parentElement.childNodes[0]);
|
|
1634
|
+
dropItem.parentNode.insertBefore(this.dragItem, dropItem);
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
else {
|
|
1638
|
+
var lastEle = (dropItem.parentElement).lastChild;
|
|
1639
|
+
if (dropItem.isSameNode(lastEle)) {
|
|
1640
|
+
var popupContainer = this.dragItem.parentNode;
|
|
1641
|
+
dropItem.parentNode.insertBefore(this.dragItem, dropItem);
|
|
1642
|
+
popupContainer.insertBefore(lastEle, popupContainer.childNodes[0]);
|
|
1643
|
+
}
|
|
1644
|
+
else {
|
|
1645
|
+
this.dragItem.parentNode.insertBefore((dropItem.parentElement).lastChild, this.dragItem.parentElement.childNodes[0]);
|
|
1646
|
+
dropItem.parentNode.insertBefore(this.dragItem, dropItem);
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
else {
|
|
1651
|
+
this.dragItem.parentNode.insertBefore(this.dragItem, dropItem);
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
if (dragsIndex < dropIndex) {
|
|
1655
|
+
if (!(this.dragItem.parentElement).isSameNode(dropItem.parentElement)) {
|
|
1656
|
+
if (this.overflowMode === 'Extended') {
|
|
1657
|
+
this.dragItem.parentElement.appendChild(dropItem.parentElement.firstElementChild);
|
|
1658
|
+
dropItem.parentNode.insertBefore(this.dragItem, dropItem.nextSibling);
|
|
1659
|
+
}
|
|
1660
|
+
else {
|
|
1661
|
+
this.dragItem.parentNode.insertBefore((dropItem.parentElement).lastChild, this.dragItem.parentElement.childNodes[0]);
|
|
1662
|
+
dropItem.parentNode.insertBefore(this.dragItem, dropItem);
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
else {
|
|
1666
|
+
this.dragItem.parentNode.insertBefore(this.dragItem, dropItem.nextElementSibling);
|
|
1222
1667
|
}
|
|
1223
1668
|
}
|
|
1224
1669
|
};
|
|
1670
|
+
Tab.prototype.itemDragStop = function (e) {
|
|
1671
|
+
var _this = this;
|
|
1672
|
+
detach(this.cloneElement);
|
|
1673
|
+
this.cloneElement = null;
|
|
1674
|
+
this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = 'visible';
|
|
1675
|
+
document.body.style.cursor = '';
|
|
1676
|
+
var dragStopArgs = {
|
|
1677
|
+
draggedItem: this.dragItem,
|
|
1678
|
+
event: e.event,
|
|
1679
|
+
target: e.target,
|
|
1680
|
+
droppedItem: this.tbItem[this.droppedIndex],
|
|
1681
|
+
clonedElement: null,
|
|
1682
|
+
index: this.droppedIndex,
|
|
1683
|
+
cancel: false
|
|
1684
|
+
};
|
|
1685
|
+
this.trigger('dragged', dragStopArgs, function (tabItemDropArgs) {
|
|
1686
|
+
if (tabItemDropArgs.cancel) {
|
|
1687
|
+
_this.refresh();
|
|
1688
|
+
}
|
|
1689
|
+
else {
|
|
1690
|
+
if (_this.items.length > 0 && _this.draggingItems.length > 0) {
|
|
1691
|
+
_this.items = _this.draggingItems;
|
|
1692
|
+
_this.selectedItem = _this.droppedIndex;
|
|
1693
|
+
_this.refresh();
|
|
1694
|
+
}
|
|
1695
|
+
else {
|
|
1696
|
+
_this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = '';
|
|
1697
|
+
removeClass([_this.tbItems.querySelector('.' + CLS_INDICATOR)], CLS_HIDDEN);
|
|
1698
|
+
_this.selectTab(_this.droppedIndex, null, true);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
});
|
|
1702
|
+
this.dragItem = null;
|
|
1703
|
+
};
|
|
1225
1704
|
/**
|
|
1226
1705
|
* Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
|
|
1227
|
-
*
|
|
1228
|
-
* @param
|
|
1706
|
+
*
|
|
1707
|
+
* @param {number} index - Index value of target Tab item.
|
|
1708
|
+
* @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
|
|
1229
1709
|
* By default, isEnable is true.
|
|
1230
|
-
* @returns void.
|
|
1710
|
+
* @returns {void}.
|
|
1231
1711
|
*/
|
|
1232
1712
|
Tab.prototype.enableTab = function (index, value) {
|
|
1233
1713
|
var tbItems = selectAll('.' + CLS_TB_ITEM, this.element)[index];
|
|
@@ -1236,11 +1716,11 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1236
1716
|
}
|
|
1237
1717
|
if (value === true) {
|
|
1238
1718
|
tbItems.classList.remove(CLS_DISABLE, CLS_OVERLAY);
|
|
1239
|
-
tbItems.
|
|
1719
|
+
tbItems.firstElementChild.setAttribute('tabindex', tbItems.firstElementChild.getAttribute('data-tabindex'));
|
|
1240
1720
|
}
|
|
1241
1721
|
else {
|
|
1242
1722
|
tbItems.classList.add(CLS_DISABLE, CLS_OVERLAY);
|
|
1243
|
-
tbItems.
|
|
1723
|
+
tbItems.firstElementChild.removeAttribute('tabindex');
|
|
1244
1724
|
if (tbItems.classList.contains(CLS_ACTIVE)) {
|
|
1245
1725
|
this.select(index + 1);
|
|
1246
1726
|
}
|
|
@@ -1249,112 +1729,188 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1249
1729
|
this.items[index].disabled = !value;
|
|
1250
1730
|
this.dataBind();
|
|
1251
1731
|
}
|
|
1252
|
-
tbItems.setAttribute('aria-disabled', (value === true) ? 'false' : 'true');
|
|
1732
|
+
tbItems.firstElementChild.setAttribute('aria-disabled', (value === true) ? 'false' : 'true');
|
|
1253
1733
|
};
|
|
1254
1734
|
/**
|
|
1255
1735
|
* Adds new items to the Tab that accepts an array as Tab items.
|
|
1256
|
-
*
|
|
1257
|
-
* @param
|
|
1258
|
-
* @
|
|
1736
|
+
*
|
|
1737
|
+
* @param {TabItemModel[]} items - An array of item that is added to the Tab.
|
|
1738
|
+
* @param {number} index - Number value that determines where the items to be added. By default, index is 0.
|
|
1739
|
+
* @returns {void}.
|
|
1259
1740
|
*/
|
|
1260
1741
|
Tab.prototype.addTab = function (items, index) {
|
|
1261
1742
|
var _this = this;
|
|
1262
|
-
var
|
|
1743
|
+
var addArgs = { addedItems: items, cancel: false };
|
|
1263
1744
|
if (!this.isReplace) {
|
|
1264
|
-
this.trigger('adding',
|
|
1745
|
+
this.trigger('adding', addArgs, function (tabAddingArgs) {
|
|
1746
|
+
if (!tabAddingArgs.cancel) {
|
|
1747
|
+
_this.addingTabContent(items, index);
|
|
1748
|
+
}
|
|
1749
|
+
});
|
|
1265
1750
|
}
|
|
1751
|
+
else {
|
|
1752
|
+
this.addingTabContent(items, index);
|
|
1753
|
+
}
|
|
1754
|
+
if (this.isReact) {
|
|
1755
|
+
this.renderReactTemplates();
|
|
1756
|
+
}
|
|
1757
|
+
};
|
|
1758
|
+
Tab.prototype.addingTabContent = function (items, index) {
|
|
1759
|
+
var _this = this;
|
|
1760
|
+
var lastEleIndex = 0;
|
|
1266
1761
|
this.hdrEle = select('.' + CLS_HEADER, this.element);
|
|
1267
1762
|
if (isNOU(this.hdrEle)) {
|
|
1268
1763
|
this.items = items;
|
|
1269
1764
|
this.reRenderItems();
|
|
1270
|
-
|
|
1271
|
-
}
|
|
1272
|
-
var itemsCount = selectAll('.' + CLS_TB_ITEM, this.element).length;
|
|
1273
|
-
if (itemsCount !== 0) {
|
|
1274
|
-
lastEleIndex = this.lastIndex + 1;
|
|
1275
|
-
}
|
|
1276
|
-
if (isNOU(index)) {
|
|
1277
|
-
index = itemsCount - 1;
|
|
1278
|
-
}
|
|
1279
|
-
if (itemsCount < index || index < 0 || isNaN(index)) {
|
|
1280
|
-
return;
|
|
1281
|
-
}
|
|
1282
|
-
if (itemsCount === 0 && !isNOU(this.hdrEle)) {
|
|
1283
|
-
this.hdrEle.style.display = '';
|
|
1284
|
-
}
|
|
1285
|
-
if (!isNOU(this.bdrLine)) {
|
|
1286
|
-
this.bdrLine.classList.add(CLS_HIDDEN);
|
|
1287
|
-
}
|
|
1288
|
-
this.tbItems = select('.' + CLS_HEADER + ' .' + CLS_TB_ITEMS, this.element);
|
|
1289
|
-
this.isAdd = true;
|
|
1290
|
-
var tabItems = this.parseObject(items, index);
|
|
1291
|
-
this.isAdd = false;
|
|
1292
|
-
var i = 0;
|
|
1293
|
-
var textValue;
|
|
1294
|
-
items.forEach(function (item, place) {
|
|
1295
|
-
textValue = item.header.text;
|
|
1296
|
-
if (!((isNOU(item.header) || isNOU(textValue) || (textValue.length === 0) && isNOU(item.header.iconCss)))) {
|
|
1297
|
-
_this.items.splice((index + i), 0, item);
|
|
1298
|
-
i++;
|
|
1299
|
-
}
|
|
1300
|
-
if (_this.isTemplate && !isNOU(item.header) && !isNOU(item.header.text)) {
|
|
1301
|
-
var no = lastEleIndex + place;
|
|
1302
|
-
var ele = _this.createElement('div', {
|
|
1303
|
-
id: CLS_CONTENT + '_' + no, className: CLS_ITEM, attrs: { role: 'tabpanel', 'aria-labelledby': CLS_ITEM + '_' + no }
|
|
1304
|
-
});
|
|
1305
|
-
_this.cntEle.insertBefore(ele, _this.cntEle.children[(index + place)]);
|
|
1306
|
-
var eleTrg = _this.getTrgContent(_this.cntEle, no.toString());
|
|
1307
|
-
_this.getContent(eleTrg, item.content, 'render');
|
|
1308
|
-
}
|
|
1309
|
-
});
|
|
1310
|
-
this.tbObj.addItems(tabItems, index);
|
|
1311
|
-
if (!this.isReplace) {
|
|
1312
|
-
this.trigger('added', { addedItems: items });
|
|
1313
|
-
}
|
|
1314
|
-
if (this.selectedItem === index) {
|
|
1315
|
-
this.select(index);
|
|
1765
|
+
this.bindDraggable();
|
|
1316
1766
|
}
|
|
1317
1767
|
else {
|
|
1318
|
-
this.
|
|
1768
|
+
var itemsCount = selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element).length;
|
|
1769
|
+
if (itemsCount !== 0) {
|
|
1770
|
+
lastEleIndex = this.lastIndex + 1;
|
|
1771
|
+
}
|
|
1772
|
+
if (isNOU(index)) {
|
|
1773
|
+
index = itemsCount - 1;
|
|
1774
|
+
}
|
|
1775
|
+
if (itemsCount < index || index < 0 || isNaN(index)) {
|
|
1776
|
+
return;
|
|
1777
|
+
}
|
|
1778
|
+
if (itemsCount === 0 && !isNOU(this.hdrEle)) {
|
|
1779
|
+
this.hdrEle.style.display = '';
|
|
1780
|
+
}
|
|
1781
|
+
if (!isNOU(this.bdrLine)) {
|
|
1782
|
+
this.bdrLine.classList.add(CLS_HIDDEN);
|
|
1783
|
+
}
|
|
1784
|
+
this.tbItems = select('.' + CLS_TB_ITEMS, this.getTabHeader());
|
|
1785
|
+
this.isAdd = true;
|
|
1786
|
+
var tabItems_2 = this.parseObject(items, index);
|
|
1787
|
+
this.isAdd = false;
|
|
1788
|
+
var i_1 = 0;
|
|
1789
|
+
var textValue_1;
|
|
1790
|
+
items.forEach(function (item, place) {
|
|
1791
|
+
textValue_1 = item.headerTemplate || item.header.text;
|
|
1792
|
+
if (!(isNOU(item.headerTemplate || item.header) || isNOU(textValue_1) ||
|
|
1793
|
+
(textValue_1.length === 0) && !isNOU(item.header) && isNOU(item.header.iconCss))) {
|
|
1794
|
+
if (tabItems_2[place]) {
|
|
1795
|
+
if (isNOU(item.id)) {
|
|
1796
|
+
item.id = CLS_ITEM + _this.tabId + '_' + TABITEMPREFIX + (lastEleIndex + place).toString();
|
|
1797
|
+
}
|
|
1798
|
+
tabItems_2[place].htmlAttributes['data-id'] = item.id;
|
|
1799
|
+
}
|
|
1800
|
+
_this.items.splice((index + i_1), 0, item);
|
|
1801
|
+
i_1++;
|
|
1802
|
+
}
|
|
1803
|
+
if (_this.isTemplate && !isNOU(item.header) && !isNOU(item.header.text)) {
|
|
1804
|
+
var no = lastEleIndex + place;
|
|
1805
|
+
var ele = _this.createElement('div', {
|
|
1806
|
+
id: CLS_CONTENT + _this.tabId + '_' + no, className: CLS_ITEM,
|
|
1807
|
+
attrs: { role: 'tabpanel', 'aria-labelledby': CLS_ITEM + '_' + no }
|
|
1808
|
+
});
|
|
1809
|
+
_this.cntEle.insertBefore(ele, _this.cntEle.children[(index + place)]);
|
|
1810
|
+
var eleTrg = _this.getTrgContent(_this.cntEle, no.toString());
|
|
1811
|
+
_this.getContent(eleTrg, item.content, 'render', index);
|
|
1812
|
+
}
|
|
1813
|
+
});
|
|
1814
|
+
this.tbObj.addItems(tabItems_2, index);
|
|
1815
|
+
if (!this.isReplace) {
|
|
1816
|
+
this.trigger('added', { addedItems: items });
|
|
1817
|
+
}
|
|
1818
|
+
if (this.selectedItem === index) {
|
|
1819
|
+
this.select(index);
|
|
1820
|
+
}
|
|
1821
|
+
else {
|
|
1822
|
+
this.setActiveBorder();
|
|
1823
|
+
this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
|
|
1824
|
+
}
|
|
1825
|
+
this.bindDraggable();
|
|
1319
1826
|
}
|
|
1320
1827
|
};
|
|
1321
1828
|
/**
|
|
1322
1829
|
* Removes the items in the Tab from the specified index.
|
|
1323
|
-
*
|
|
1324
|
-
* @
|
|
1830
|
+
*
|
|
1831
|
+
* @param {number} index - Index of target item that is going to be removed.
|
|
1832
|
+
* @returns {void}.
|
|
1325
1833
|
*/
|
|
1326
1834
|
Tab.prototype.removeTab = function (index) {
|
|
1835
|
+
var _this = this;
|
|
1327
1836
|
var trg = selectAll('.' + CLS_TB_ITEM, this.element)[index];
|
|
1328
|
-
var removeArgs = { removedItem: trg, removedIndex: index };
|
|
1329
|
-
this.trigger('removing', removeArgs);
|
|
1330
1837
|
if (isNOU(trg)) {
|
|
1331
1838
|
return;
|
|
1332
1839
|
}
|
|
1333
|
-
|
|
1334
|
-
this.
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1840
|
+
var removeArgs = { removedItem: trg, removedIndex: index, cancel: false };
|
|
1841
|
+
this.trigger('removing', removeArgs, function (tabRemovingArgs) {
|
|
1842
|
+
if (!tabRemovingArgs.cancel) {
|
|
1843
|
+
_this.tbObj.removeItems(index);
|
|
1844
|
+
if (_this.allowDragAndDrop && (index !== Array.prototype.indexOf.call(_this.itemIndexArray, trg.id))) {
|
|
1845
|
+
index = Array.prototype.indexOf.call(_this.itemIndexArray, trg.id);
|
|
1846
|
+
}
|
|
1847
|
+
var targetEleIndex = _this.itemIndexArray.indexOf(trg.id);
|
|
1848
|
+
_this.items.splice(targetEleIndex, 1);
|
|
1849
|
+
_this.itemIndexArray.splice(targetEleIndex, 1);
|
|
1850
|
+
_this.refreshActiveBorder();
|
|
1851
|
+
var cntTrg = select('#' + CLS_CONTENT + _this.tabId + '_' + _this.extIndex(trg.id), select('.' + CLS_CONTENT, _this.element));
|
|
1852
|
+
if (!isNOU(cntTrg)) {
|
|
1853
|
+
var registeredTemplate = _this.registeredTemplate;
|
|
1854
|
+
var portal = _this.portals;
|
|
1855
|
+
if (registeredTemplate && registeredTemplate.content) {
|
|
1856
|
+
var templateToClear = [];
|
|
1857
|
+
for (var i_2 = 0; i_2 < registeredTemplate.content.length; i_2++) {
|
|
1858
|
+
var registeredItem = registeredTemplate.content[i_2].rootNodes[0];
|
|
1859
|
+
var closestItem_1 = closest(registeredItem, '.' + CLS_ITEM);
|
|
1860
|
+
if (!isNullOrUndefined(registeredItem) && closestItem_1 === cntTrg) {
|
|
1861
|
+
templateToClear.push(registeredTemplate.content[i_2]);
|
|
1862
|
+
break;
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
if (templateToClear.length > 0) {
|
|
1866
|
+
_this.clearTemplate(['content'], templateToClear);
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
else if (portal) {
|
|
1870
|
+
for (var i = 0; i < portal.length; i++) {
|
|
1871
|
+
var portalItem = portal[i];
|
|
1872
|
+
var closestItem = closest(portalItem.containerInfo, '.' + CLS_ITEM);
|
|
1873
|
+
if (!isNullOrUndefined(portalItem) && closestItem === cntTrg) {
|
|
1874
|
+
_this.clearTemplate(['content'], i);
|
|
1875
|
+
break;
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
detach(cntTrg);
|
|
1880
|
+
}
|
|
1881
|
+
_this.trigger('removed', tabRemovingArgs);
|
|
1882
|
+
if (_this.draggableItems && _this.draggableItems.length > 0) {
|
|
1883
|
+
_this.draggableItems[index].destroy();
|
|
1884
|
+
_this.draggableItems[index] = null;
|
|
1885
|
+
_this.draggableItems.splice(index, 1);
|
|
1886
|
+
}
|
|
1887
|
+
if (trg.classList.contains(CLS_ACTIVE)) {
|
|
1888
|
+
index = (index > selectAll('.' + CLS_TB_ITEM + ':not(.' + CLS_TB_POPUP + ')', _this.element).length - 1) ? index - 1 : index;
|
|
1889
|
+
_this.enableAnimation = false;
|
|
1890
|
+
_this.selectedItem = index;
|
|
1891
|
+
_this.select(index);
|
|
1892
|
+
}
|
|
1893
|
+
else if (index !== _this.selectedItem) {
|
|
1894
|
+
if (index < _this.selectedItem) {
|
|
1895
|
+
index = _this.itemIndexArray.indexOf(_this.tbItem[_this.selectedItem].id);
|
|
1896
|
+
_this.setProperties({ selectedItem: index > -1 ? index : _this.selectedItem }, true);
|
|
1897
|
+
_this.prevIndex = _this.selectedItem;
|
|
1898
|
+
}
|
|
1899
|
+
_this.tbItem = selectAll('.' + CLS_TB_ITEM, _this.getTabHeader());
|
|
1900
|
+
}
|
|
1901
|
+
if (selectAll('.' + CLS_TB_ITEM, _this.element).length === 0) {
|
|
1902
|
+
_this.hdrEle.style.display = 'none';
|
|
1903
|
+
}
|
|
1904
|
+
_this.enableAnimation = true;
|
|
1905
|
+
}
|
|
1906
|
+
});
|
|
1352
1907
|
};
|
|
1353
1908
|
/**
|
|
1354
1909
|
* Shows or hides the Tab that is in the specified index.
|
|
1355
|
-
*
|
|
1356
|
-
* @param
|
|
1357
|
-
* @
|
|
1910
|
+
*
|
|
1911
|
+
* @param {number} index - Index value of target item.
|
|
1912
|
+
* @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
|
|
1913
|
+
* @returns {void}.
|
|
1358
1914
|
*/
|
|
1359
1915
|
Tab.prototype.hideTab = function (index, value) {
|
|
1360
1916
|
var items;
|
|
@@ -1402,22 +1958,35 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1402
1958
|
else {
|
|
1403
1959
|
this.element.classList.remove(CLS_HIDDEN);
|
|
1404
1960
|
items = selectAll('.' + CLS_TB_ITEM + ':not(.' + CLS_HIDDEN + ')', this.tbItems);
|
|
1961
|
+
item.classList.remove(CLS_HIDDEN);
|
|
1405
1962
|
if (items.length === 0) {
|
|
1406
1963
|
this.select(index);
|
|
1407
1964
|
}
|
|
1408
|
-
item.classList.remove(CLS_HIDDEN);
|
|
1409
1965
|
}
|
|
1410
1966
|
this.setActiveBorder();
|
|
1411
1967
|
item.setAttribute('aria-hidden', '' + value);
|
|
1968
|
+
if (this.overflowMode === 'Popup' && this.tbObj) {
|
|
1969
|
+
this.tbObj.refreshOverflow();
|
|
1970
|
+
}
|
|
1971
|
+
};
|
|
1972
|
+
Tab.prototype.selectTab = function (args, event, isInteracted) {
|
|
1973
|
+
if (event === void 0) { event = null; }
|
|
1974
|
+
if (isInteracted === void 0) { isInteracted = false; }
|
|
1975
|
+
this.isInteracted = isInteracted;
|
|
1976
|
+
this.select(args, event);
|
|
1412
1977
|
};
|
|
1413
1978
|
/**
|
|
1414
1979
|
* Specifies the index or HTMLElement to select an item from the Tab.
|
|
1415
|
-
*
|
|
1416
|
-
* @
|
|
1980
|
+
*
|
|
1981
|
+
* @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
|
|
1982
|
+
* @param {Event} event - An event which takes place in DOM.
|
|
1983
|
+
* @returns {void}
|
|
1417
1984
|
*/
|
|
1418
|
-
Tab.prototype.select = function (args) {
|
|
1419
|
-
|
|
1420
|
-
|
|
1985
|
+
Tab.prototype.select = function (args, event) {
|
|
1986
|
+
var _this = this;
|
|
1987
|
+
var tabHeader = this.getTabHeader();
|
|
1988
|
+
this.tbItems = select('.' + CLS_TB_ITEMS, tabHeader);
|
|
1989
|
+
this.tbItem = selectAll('.' + CLS_TB_ITEM, tabHeader);
|
|
1421
1990
|
this.content = select('.' + CLS_CONTENT, this.element);
|
|
1422
1991
|
this.prevItem = this.tbItem[this.prevIndex];
|
|
1423
1992
|
if (isNOU(this.selectedItem) || (this.selectedItem < 0) || (this.tbItem.length <= this.selectedItem) || isNaN(this.selectedItem)) {
|
|
@@ -1434,29 +2003,42 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1434
2003
|
this.selectingID = this.extIndex(trg.id);
|
|
1435
2004
|
}
|
|
1436
2005
|
if (!isNOU(this.prevItem) && !this.prevItem.classList.contains(CLS_DISABLE)) {
|
|
1437
|
-
this.prevItem.children.item(0).setAttribute('tabindex', '
|
|
2006
|
+
this.prevItem.children.item(0).setAttribute('tabindex', this.prevItem.firstElementChild.getAttribute('tabindex'));
|
|
1438
2007
|
}
|
|
1439
2008
|
var eventArg = {
|
|
2009
|
+
event: event,
|
|
1440
2010
|
previousItem: this.prevItem,
|
|
1441
2011
|
previousIndex: this.prevIndex,
|
|
1442
2012
|
selectedItem: this.tbItem[this.selectedItem],
|
|
1443
2013
|
selectedIndex: this.selectedItem,
|
|
1444
|
-
selectedContent: !isNOU(this.content) ?
|
|
2014
|
+
selectedContent: !isNOU(this.content) ?
|
|
2015
|
+
select('#' + CLS_CONTENT + this.tabId + '_' + this.selectedID, this.content) : null,
|
|
1445
2016
|
selectingItem: trg,
|
|
1446
2017
|
selectingIndex: args,
|
|
1447
|
-
selectingContent: !isNOU(this.content) ?
|
|
1448
|
-
|
|
2018
|
+
selectingContent: !isNOU(this.content) ?
|
|
2019
|
+
select('#' + CLS_CONTENT + this.tabId + '_' + this.selectingID, this.content) : null,
|
|
2020
|
+
isSwiped: this.isSwipeed,
|
|
2021
|
+
isInteracted: this.isInteracted,
|
|
2022
|
+
cancel: false
|
|
1449
2023
|
};
|
|
1450
|
-
if (!this.initRender
|
|
1451
|
-
this.trigger('selecting', eventArg)
|
|
2024
|
+
if (!this.initRender) {
|
|
2025
|
+
this.trigger('selecting', eventArg, function (selectArgs) {
|
|
2026
|
+
if (!selectArgs.cancel) {
|
|
2027
|
+
_this.selectingContent(args, _this.isInteracted);
|
|
2028
|
+
}
|
|
2029
|
+
});
|
|
1452
2030
|
}
|
|
1453
|
-
|
|
1454
|
-
|
|
2031
|
+
else {
|
|
2032
|
+
this.selectingContent(args, this.isInteracted);
|
|
1455
2033
|
}
|
|
2034
|
+
this.isInteracted = false;
|
|
2035
|
+
};
|
|
2036
|
+
Tab.prototype.selectingContent = function (args, isInteracted) {
|
|
1456
2037
|
if (typeof args === 'number') {
|
|
1457
|
-
if (!isNOU(this.tbItem[args]) && this.tbItem[args].classList.contains(CLS_DISABLE)
|
|
2038
|
+
if (!isNOU(this.tbItem[args]) && (this.tbItem[args].classList.contains(CLS_DISABLE) ||
|
|
2039
|
+
this.tbItem[args].classList.contains(CLS_HIDDEN))) {
|
|
1458
2040
|
for (var i = args + 1; i < this.items.length; i++) {
|
|
1459
|
-
if (this.items[i].disabled === false) {
|
|
2041
|
+
if (this.items[i].disabled === false && this.items[i].visible === true) {
|
|
1460
2042
|
args = i;
|
|
1461
2043
|
break;
|
|
1462
2044
|
}
|
|
@@ -1467,26 +2049,54 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1467
2049
|
}
|
|
1468
2050
|
if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
|
|
1469
2051
|
this.prevIndex = this.selectedItem;
|
|
1470
|
-
|
|
1471
|
-
|
|
2052
|
+
this.prevItem = this.tbItem[this.prevIndex];
|
|
2053
|
+
if (this.tbItem[args].classList.contains(CLS_TB_POPUP) && this.reorderActiveTab) {
|
|
2054
|
+
this.setActive(this.popupHandler(this.tbItem[args]), null, isInteracted);
|
|
2055
|
+
if ((!isNOU(this.items) && this.items.length > 0) && this.allowDragAndDrop) {
|
|
2056
|
+
this.tbItem = selectAll('.' + CLS_TB_ITEMS + ' .' + CLS_TB_ITEM, this.hdrEle);
|
|
2057
|
+
var item = this.items[args];
|
|
2058
|
+
this.items.splice(args, 1);
|
|
2059
|
+
this.items.splice(this.tbItem.length - 1, 0, item);
|
|
2060
|
+
var itemId = this.itemIndexArray[args];
|
|
2061
|
+
this.itemIndexArray.splice(args, 1);
|
|
2062
|
+
this.itemIndexArray.splice(this.tbItem.length - 1, 0, itemId);
|
|
2063
|
+
}
|
|
1472
2064
|
}
|
|
1473
2065
|
else {
|
|
1474
|
-
this.setActive(args);
|
|
2066
|
+
this.setActive(args, null, isInteracted);
|
|
1475
2067
|
}
|
|
1476
2068
|
}
|
|
1477
2069
|
else {
|
|
1478
|
-
this.setActive(0);
|
|
2070
|
+
this.setActive(0, null, isInteracted);
|
|
1479
2071
|
}
|
|
1480
2072
|
}
|
|
1481
2073
|
else if (args instanceof (HTMLElement)) {
|
|
1482
|
-
this.setActive(this.getEleIndex(args));
|
|
2074
|
+
this.setActive(this.getEleIndex(args), null, isInteracted);
|
|
1483
2075
|
}
|
|
1484
2076
|
};
|
|
2077
|
+
/**
|
|
2078
|
+
* Gets the item index from the Tab.
|
|
2079
|
+
*
|
|
2080
|
+
* @param {string} tabItemId - Item ID is used for getting index from the Tab.
|
|
2081
|
+
* @returns {number} - It returns item index.
|
|
2082
|
+
*/
|
|
2083
|
+
Tab.prototype.getItemIndex = function (tabItemId) {
|
|
2084
|
+
var tabIndex;
|
|
2085
|
+
for (var i = 0; i < this.tbItem.length; i++) {
|
|
2086
|
+
var value = this.tbItem[i].getAttribute('data-id');
|
|
2087
|
+
if (tabItemId === value) {
|
|
2088
|
+
tabIndex = i;
|
|
2089
|
+
break;
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
return tabIndex;
|
|
2093
|
+
};
|
|
1485
2094
|
/**
|
|
1486
2095
|
* Specifies the value to disable/enable the Tab component.
|
|
1487
2096
|
* When set to `true`, the component will be disabled.
|
|
2097
|
+
*
|
|
1488
2098
|
* @param {boolean} value - Based on this Boolean value, Tab will be enabled (false) or disabled (true).
|
|
1489
|
-
* @returns void.
|
|
2099
|
+
* @returns {void}.
|
|
1490
2100
|
*/
|
|
1491
2101
|
Tab.prototype.disable = function (value) {
|
|
1492
2102
|
this.setCssClass(this.element, CLS_DISABLE, value);
|
|
@@ -1494,14 +2104,16 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1494
2104
|
};
|
|
1495
2105
|
/**
|
|
1496
2106
|
* Get the properties to be maintained in the persisted state.
|
|
1497
|
-
*
|
|
2107
|
+
*
|
|
2108
|
+
* @returns {string} - It returns the persisted state.
|
|
1498
2109
|
*/
|
|
1499
2110
|
Tab.prototype.getPersistData = function () {
|
|
1500
2111
|
return this.addOnPersist(['selectedItem', 'actEleId']);
|
|
1501
2112
|
};
|
|
1502
2113
|
/**
|
|
1503
2114
|
* Returns the current module name.
|
|
1504
|
-
*
|
|
2115
|
+
*
|
|
2116
|
+
* @returns {string} - It returns the current module name.
|
|
1505
2117
|
* @private
|
|
1506
2118
|
*/
|
|
1507
2119
|
Tab.prototype.getModuleName = function () {
|
|
@@ -1509,12 +2121,14 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1509
2121
|
};
|
|
1510
2122
|
/**
|
|
1511
2123
|
* Gets called when the model property changes.The data that describes the old and new values of the property that changed.
|
|
1512
|
-
*
|
|
1513
|
-
* @param {TabModel}
|
|
1514
|
-
* @
|
|
2124
|
+
*
|
|
2125
|
+
* @param {TabModel} newProp - It contains the new value of data.
|
|
2126
|
+
* @param {TabModel} oldProp - It contains the old value of data.
|
|
2127
|
+
* @returns {void}
|
|
1515
2128
|
* @private
|
|
1516
2129
|
*/
|
|
1517
2130
|
Tab.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
2131
|
+
var _this = this;
|
|
1518
2132
|
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
1519
2133
|
var prop = _a[_i];
|
|
1520
2134
|
switch (prop) {
|
|
@@ -1526,7 +2140,21 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1526
2140
|
this.setContentHeight(false);
|
|
1527
2141
|
break;
|
|
1528
2142
|
case 'cssClass':
|
|
1529
|
-
this.
|
|
2143
|
+
var headerEle = this.element.querySelector('.' + CLS_HEADER);
|
|
2144
|
+
if (oldProp.cssClass !== '' && !isNullOrUndefined(oldProp.cssClass)) {
|
|
2145
|
+
this.setCssClass(this.element, oldProp.cssClass, false);
|
|
2146
|
+
this.setCssClass(this.element, newProp.cssClass, true);
|
|
2147
|
+
if (!isNullOrUndefined(headerEle)) {
|
|
2148
|
+
this.setCssClass(headerEle, oldProp.cssClass, false);
|
|
2149
|
+
this.setCssClass(headerEle, newProp.cssClass, true);
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
else {
|
|
2153
|
+
this.setCssClass(this.element, newProp.cssClass, true);
|
|
2154
|
+
if (!isNullOrUndefined(headerEle)) {
|
|
2155
|
+
this.setCssClass(headerEle, newProp.cssClass, true);
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
1530
2158
|
break;
|
|
1531
2159
|
case 'items':
|
|
1532
2160
|
this.evalOnPropertyChangeItems(newProp, oldProp);
|
|
@@ -1534,6 +2162,9 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1534
2162
|
case 'showCloseButton':
|
|
1535
2163
|
this.setCloseButton(newProp.showCloseButton);
|
|
1536
2164
|
break;
|
|
2165
|
+
case 'reorderActiveTab':
|
|
2166
|
+
this.refreshActiveTabBorder();
|
|
2167
|
+
break;
|
|
1537
2168
|
case 'selectedItem':
|
|
1538
2169
|
this.selectedItem = oldProp.selectedItem;
|
|
1539
2170
|
this.select(newProp.selectedItem);
|
|
@@ -1547,15 +2178,165 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1547
2178
|
case 'overflowMode':
|
|
1548
2179
|
this.tbObj.overflowMode = newProp.overflowMode;
|
|
1549
2180
|
this.tbObj.dataBind();
|
|
1550
|
-
this.
|
|
2181
|
+
this.refreshActiveTabBorder();
|
|
1551
2182
|
break;
|
|
1552
2183
|
case 'heightAdjustMode':
|
|
1553
2184
|
this.setContentHeight(false);
|
|
1554
2185
|
this.select(this.selectedItem);
|
|
1555
2186
|
break;
|
|
2187
|
+
case 'scrollStep':
|
|
2188
|
+
if (this.tbObj) {
|
|
2189
|
+
this.tbObj.scrollStep = this.scrollStep;
|
|
2190
|
+
}
|
|
2191
|
+
break;
|
|
2192
|
+
case 'allowDragAndDrop':
|
|
2193
|
+
this.bindDraggable();
|
|
2194
|
+
break;
|
|
2195
|
+
case 'dragArea':
|
|
2196
|
+
if (this.allowDragAndDrop) {
|
|
2197
|
+
this.draggableItems.forEach(function (item) {
|
|
2198
|
+
item.dragArea = _this.dragArea;
|
|
2199
|
+
});
|
|
2200
|
+
this.refresh();
|
|
2201
|
+
}
|
|
2202
|
+
break;
|
|
1556
2203
|
}
|
|
1557
2204
|
}
|
|
1558
2205
|
};
|
|
2206
|
+
/**
|
|
2207
|
+
* To refresh the active tab contents.
|
|
2208
|
+
*
|
|
2209
|
+
* @returns {void}
|
|
2210
|
+
*/
|
|
2211
|
+
Tab.prototype.refreshActiveTab = function () {
|
|
2212
|
+
if (this.isReact && this.isTemplate) {
|
|
2213
|
+
this.clearTemplate();
|
|
2214
|
+
}
|
|
2215
|
+
if (!this.isTemplate) {
|
|
2216
|
+
if (this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE)) {
|
|
2217
|
+
detach(this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE).children[0]);
|
|
2218
|
+
detach(this.element.querySelector('.' + CLS_CONTENT).querySelector('.' + CLS_ACTIVE).children[0]);
|
|
2219
|
+
var item = this.items[this.selectedItem];
|
|
2220
|
+
var pos = (isNOU(item.header) || isNOU(item.header.iconPosition)) ? '' : item.header.iconPosition;
|
|
2221
|
+
var css = (isNOU(item.header) || isNOU(item.header.iconCss)) ? '' : item.header.iconCss;
|
|
2222
|
+
var text = item.headerTemplate || item.header.text;
|
|
2223
|
+
var txtWrap = this.createElement('div', { className: CLS_TEXT, attrs: { 'role': 'presentation' } });
|
|
2224
|
+
if (!isNOU(text.tagName)) {
|
|
2225
|
+
txtWrap.appendChild(text);
|
|
2226
|
+
}
|
|
2227
|
+
else {
|
|
2228
|
+
this.headerTextCompile(txtWrap, text, this.selectedItem);
|
|
2229
|
+
}
|
|
2230
|
+
var tEle = void 0;
|
|
2231
|
+
var icon = this.createElement('span', {
|
|
2232
|
+
className: CLS_ICONS + ' ' + CLS_TAB_ICON + ' ' + CLS_ICON + '-' + pos + ' ' + css
|
|
2233
|
+
});
|
|
2234
|
+
var tConts = this.createElement('div', { className: CLS_TEXT_WRAP });
|
|
2235
|
+
tConts.appendChild(txtWrap);
|
|
2236
|
+
if ((text !== '' && text !== undefined) && css !== '') {
|
|
2237
|
+
if ((pos === 'left' || pos === 'top')) {
|
|
2238
|
+
tConts.insertBefore(icon, tConts.firstElementChild);
|
|
2239
|
+
}
|
|
2240
|
+
else {
|
|
2241
|
+
tConts.appendChild(icon);
|
|
2242
|
+
}
|
|
2243
|
+
tEle = txtWrap;
|
|
2244
|
+
this.isIconAlone = false;
|
|
2245
|
+
}
|
|
2246
|
+
else {
|
|
2247
|
+
tEle = ((css === '') ? txtWrap : icon);
|
|
2248
|
+
if (tEle === icon) {
|
|
2249
|
+
detach(txtWrap);
|
|
2250
|
+
tConts.appendChild(icon);
|
|
2251
|
+
this.isIconAlone = true;
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
var tabIndex = isNOU(item.tabIndex) ? '-1' : item.tabIndex.toString();
|
|
2255
|
+
var wrapAtt = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-selected': 'true', 'aria-disabled': 'false' };
|
|
2256
|
+
tConts.appendChild(this.btnCls.cloneNode(true));
|
|
2257
|
+
var wraper = this.createElement('div', { className: CLS_WRAP, attrs: wrapAtt });
|
|
2258
|
+
wraper.appendChild(tConts);
|
|
2259
|
+
if (pos === 'top' || pos === 'bottom') {
|
|
2260
|
+
this.element.classList.add('e-vertical-icon');
|
|
2261
|
+
}
|
|
2262
|
+
this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE).appendChild(wraper);
|
|
2263
|
+
var crElem = this.createElement('div');
|
|
2264
|
+
var cnt = item.content;
|
|
2265
|
+
var eleStr = void 0;
|
|
2266
|
+
if (typeof cnt === 'string' || isNOU(cnt.innerHTML)) {
|
|
2267
|
+
if (typeof cnt === 'string' && this.enableHtmlSanitizer) {
|
|
2268
|
+
cnt = SanitizeHtmlHelper.sanitize(cnt);
|
|
2269
|
+
}
|
|
2270
|
+
if (cnt[0] === '.' || cnt[0] === '#') {
|
|
2271
|
+
if (document.querySelectorAll(cnt).length) {
|
|
2272
|
+
var eleVal = document.querySelector(cnt);
|
|
2273
|
+
eleStr = eleVal.outerHTML.trim();
|
|
2274
|
+
crElem.appendChild(eleVal);
|
|
2275
|
+
eleVal.style.display = '';
|
|
2276
|
+
}
|
|
2277
|
+
else {
|
|
2278
|
+
this.compileElement(crElem, cnt, 'content', this.selectedItem);
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
else {
|
|
2282
|
+
this.compileElement(crElem, cnt, 'content', this.selectedItem);
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
else {
|
|
2286
|
+
crElem.appendChild(cnt);
|
|
2287
|
+
}
|
|
2288
|
+
if (!isNOU(eleStr)) {
|
|
2289
|
+
if (this.templateEle.indexOf(cnt.toString()) === -1) {
|
|
2290
|
+
this.templateEle.push(cnt.toString());
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
this.element.querySelector('.' + CLS_ITEM + '.' + CLS_ACTIVE).appendChild(crElem);
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2296
|
+
else {
|
|
2297
|
+
var tabItems = this.element.querySelector('.' + CLS_TB_ITEMS);
|
|
2298
|
+
var element = this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE);
|
|
2299
|
+
var index = this.getIndexFromEle(element.id);
|
|
2300
|
+
var header = element.innerText;
|
|
2301
|
+
var detachContent = this.element.querySelector('.' + CLS_CONTENT).querySelector('.' + CLS_ACTIVE).children[0];
|
|
2302
|
+
var mainContents = detachContent.innerHTML;
|
|
2303
|
+
detach(element);
|
|
2304
|
+
detach(detachContent);
|
|
2305
|
+
var attr = {
|
|
2306
|
+
className: CLS_TB_ITEM + ' ' + CLS_TEMPLATE + ' ' + CLS_ACTIVE, id: CLS_ITEM + this.tabId + '_' + index
|
|
2307
|
+
};
|
|
2308
|
+
var txtString = this.createElement('span', {
|
|
2309
|
+
className: CLS_TEXT, innerHTML: header, attrs: { 'role': 'presentation' }
|
|
2310
|
+
}).outerHTML;
|
|
2311
|
+
var conte = this.createElement('div', {
|
|
2312
|
+
className: CLS_TEXT_WRAP, innerHTML: txtString + this.btnCls.outerHTML
|
|
2313
|
+
}).outerHTML;
|
|
2314
|
+
var tabIndex = element.firstElementChild.getAttribute('data-tabindex');
|
|
2315
|
+
var wrap = this.createElement('div', {
|
|
2316
|
+
className: CLS_WRAP, innerHTML: conte,
|
|
2317
|
+
attrs: { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-controls': CLS_CONTENT + this.tabId + '_' + index, 'aria-selected': 'true', 'aria-disabled': 'false' }
|
|
2318
|
+
});
|
|
2319
|
+
tabItems.insertBefore(this.createElement('div', attr), tabItems.children[index + 1]);
|
|
2320
|
+
this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE).appendChild(wrap);
|
|
2321
|
+
var crElem = this.createElement('div', { innerHTML: mainContents });
|
|
2322
|
+
this.element.querySelector('.' + CLS_CONTENT).querySelector('.' + CLS_ACTIVE).appendChild(crElem);
|
|
2323
|
+
}
|
|
2324
|
+
if (this.isReact) {
|
|
2325
|
+
this.renderReactTemplates();
|
|
2326
|
+
}
|
|
2327
|
+
};
|
|
2328
|
+
/**
|
|
2329
|
+
* To refresh the active tab indicator.
|
|
2330
|
+
*
|
|
2331
|
+
* @returns {void}
|
|
2332
|
+
*/
|
|
2333
|
+
Tab.prototype.refreshActiveTabBorder = function () {
|
|
2334
|
+
var activeEle = select('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE, this.element);
|
|
2335
|
+
if (!isNOU(activeEle) && this.reorderActiveTab) {
|
|
2336
|
+
this.select(this.getEleIndex(activeEle));
|
|
2337
|
+
}
|
|
2338
|
+
this.refreshActiveBorder();
|
|
2339
|
+
};
|
|
1559
2340
|
__decorate([
|
|
1560
2341
|
Collection([], TabItem)
|
|
1561
2342
|
], Tab.prototype, "items", void 0);
|
|
@@ -1581,14 +2362,29 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1581
2362
|
Property('Scrollable')
|
|
1582
2363
|
], Tab.prototype, "overflowMode", void 0);
|
|
1583
2364
|
__decorate([
|
|
1584
|
-
Property(
|
|
1585
|
-
], Tab.prototype, "
|
|
2365
|
+
Property('Dynamic')
|
|
2366
|
+
], Tab.prototype, "loadOn", void 0);
|
|
1586
2367
|
__decorate([
|
|
1587
2368
|
Property(false)
|
|
1588
2369
|
], Tab.prototype, "enablePersistence", void 0);
|
|
2370
|
+
__decorate([
|
|
2371
|
+
Property(false)
|
|
2372
|
+
], Tab.prototype, "enableHtmlSanitizer", void 0);
|
|
1589
2373
|
__decorate([
|
|
1590
2374
|
Property(false)
|
|
1591
2375
|
], Tab.prototype, "showCloseButton", void 0);
|
|
2376
|
+
__decorate([
|
|
2377
|
+
Property(true)
|
|
2378
|
+
], Tab.prototype, "reorderActiveTab", void 0);
|
|
2379
|
+
__decorate([
|
|
2380
|
+
Property()
|
|
2381
|
+
], Tab.prototype, "scrollStep", void 0);
|
|
2382
|
+
__decorate([
|
|
2383
|
+
Property()
|
|
2384
|
+
], Tab.prototype, "dragArea", void 0);
|
|
2385
|
+
__decorate([
|
|
2386
|
+
Property(false)
|
|
2387
|
+
], Tab.prototype, "allowDragAndDrop", void 0);
|
|
1592
2388
|
__decorate([
|
|
1593
2389
|
Complex({}, TabAnimationSettings)
|
|
1594
2390
|
], Tab.prototype, "animation", void 0);
|
|
@@ -1613,6 +2409,15 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1613
2409
|
__decorate([
|
|
1614
2410
|
Event()
|
|
1615
2411
|
], Tab.prototype, "removed", void 0);
|
|
2412
|
+
__decorate([
|
|
2413
|
+
Event()
|
|
2414
|
+
], Tab.prototype, "onDragStart", void 0);
|
|
2415
|
+
__decorate([
|
|
2416
|
+
Event()
|
|
2417
|
+
], Tab.prototype, "dragging", void 0);
|
|
2418
|
+
__decorate([
|
|
2419
|
+
Event()
|
|
2420
|
+
], Tab.prototype, "dragged", void 0);
|
|
1616
2421
|
__decorate([
|
|
1617
2422
|
Event()
|
|
1618
2423
|
], Tab.prototype, "destroyed", void 0);
|