@syncfusion/ej2-navigations 25.2.4 → 26.1.35-750253
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 +3 -2
- package/dist/ej2-navigations.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js.map +1 -1
- package/dist/es6/ej2-navigations.es2015.js +1311 -1106
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +960 -740
- package/dist/es6/ej2-navigations.es5.js.map +1 -1
- package/dist/global/ej2-navigations.min.js +2 -2
- package/dist/global/ej2-navigations.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/accordion/accordion.d.ts +0 -3
- package/src/accordion/accordion.js +5 -5
- package/src/appbar/appbar.js +1 -1
- package/src/breadcrumb/breadcrumb-model.d.ts +7 -0
- package/src/breadcrumb/breadcrumb.d.ts +6 -0
- package/src/breadcrumb/breadcrumb.js +20 -6
- package/src/carousel/carousel.d.ts +1 -0
- package/src/carousel/carousel.js +12 -9
- package/src/common/menu-base.js +21 -13
- package/src/sidebar/sidebar-model.d.ts +5 -6
- package/src/sidebar/sidebar.d.ts +8 -6
- package/src/sidebar/sidebar.js +2 -3
- package/src/stepper/stepper-model.d.ts +7 -1
- package/src/stepper/stepper.d.ts +7 -3
- package/src/stepper/stepper.js +141 -76
- package/src/stepper-base/stepper-base-model.d.ts +1 -1
- package/src/stepper-base/stepper-base.d.ts +4 -4
- package/src/stepper-base/stepper-base.js +13 -8
- package/src/tab/tab-model.d.ts +1 -1
- package/src/tab/tab.d.ts +0 -3
- package/src/tab/tab.js +2 -2
- package/src/toolbar/toolbar-model.d.ts +1 -1
- package/src/toolbar/toolbar.js +13 -9
- package/src/treeview/treeview-model.d.ts +60 -53
- package/src/treeview/treeview.d.ts +134 -29
- package/src/treeview/treeview.js +572 -392
- package/styles/accordion/_bds-definition.scss +0 -13
- package/styles/accordion/_bootstrap-dark-definition.scss +0 -9
- package/styles/accordion/_bootstrap-definition.scss +0 -14
- package/styles/accordion/_bootstrap4-definition.scss +0 -9
- package/styles/accordion/_bootstrap5-definition.scss +8 -22
- package/styles/accordion/_bootstrap5.3-definition.scss +168 -0
- package/styles/accordion/_fabric-dark-definition.scss +0 -8
- package/styles/accordion/_fabric-definition.scss +0 -13
- package/styles/accordion/_fluent-definition.scss +0 -13
- package/styles/accordion/_fluent2-definition.scss +167 -0
- package/styles/accordion/_fusionnew-definition.scss +1 -15
- package/styles/accordion/_highcontrast-definition.scss +0 -13
- package/styles/accordion/_highcontrast-light-definition.scss +0 -11
- package/styles/accordion/_layout.scss +0 -2
- package/styles/accordion/_material-dark-definition.scss +0 -11
- package/styles/accordion/_material-definition.scss +0 -13
- package/styles/accordion/_material3-definition.scss +3 -17
- package/styles/accordion/_tailwind-definition.scss +0 -13
- package/styles/accordion/_theme.scss +0 -3
- package/styles/accordion/bootstrap-dark.css +11 -9
- package/styles/accordion/bootstrap.css +11 -10
- package/styles/accordion/bootstrap4.css +11 -9
- package/styles/accordion/bootstrap5-dark.css +20 -20
- package/styles/accordion/bootstrap5.css +20 -20
- package/styles/accordion/fabric-dark.css +11 -9
- package/styles/accordion/fabric.css +11 -10
- package/styles/accordion/fluent-dark.css +11 -10
- package/styles/accordion/fluent.css +11 -10
- package/styles/accordion/fluent2.css +1574 -0
- package/styles/accordion/fluent2.scss +4 -0
- package/styles/accordion/highcontrast-light.css +11 -9
- package/styles/accordion/highcontrast.css +11 -10
- package/styles/accordion/icons/_bds.scss +0 -2
- package/styles/accordion/icons/_bootstrap-dark.scss +0 -2
- package/styles/accordion/icons/_bootstrap.scss +0 -2
- package/styles/accordion/icons/_bootstrap4.scss +0 -2
- package/styles/accordion/icons/_bootstrap5.3.scss +15 -0
- package/styles/accordion/icons/_bootstrap5.scss +0 -2
- package/styles/accordion/icons/_fabric-dark.scss +0 -2
- package/styles/accordion/icons/_fabric.scss +0 -2
- package/styles/accordion/icons/_fluent.scss +0 -2
- package/styles/accordion/icons/_fluent2.scss +15 -0
- package/styles/accordion/icons/_fusionnew.scss +0 -2
- package/styles/accordion/icons/_highcontrast-light.scss +0 -2
- package/styles/accordion/icons/_highcontrast.scss +0 -2
- package/styles/accordion/icons/_material-dark.scss +0 -2
- package/styles/accordion/icons/_material.scss +0 -2
- package/styles/accordion/icons/_material3.scss +0 -2
- package/styles/accordion/icons/_tailwind.scss +0 -2
- package/styles/accordion/material-dark.css +11 -9
- package/styles/accordion/material.css +11 -10
- package/styles/accordion/material3-dark.css +12 -12
- package/styles/accordion/material3.css +12 -12
- package/styles/accordion/tailwind-dark.css +11 -10
- package/styles/accordion/tailwind.css +11 -10
- package/styles/appbar/_bds-definition.scss +1 -3
- package/styles/appbar/_bootstrap-dark-definition.scss +0 -2
- package/styles/appbar/_bootstrap-definition.scss +0 -2
- package/styles/appbar/_bootstrap4-definition.scss +0 -2
- package/styles/appbar/_bootstrap5-definition.scss +0 -2
- package/styles/appbar/_bootstrap5.3-definition.scss +6 -0
- package/styles/appbar/_fabric-dark-definition.scss +0 -2
- package/styles/appbar/_fabric-definition.scss +0 -2
- package/styles/appbar/_fluent-definition.scss +0 -2
- package/styles/appbar/_fluent2-definition.scss +24 -0
- package/styles/appbar/_fusionnew-definition.scss +0 -2
- package/styles/appbar/_highcontrast-definition.scss +0 -2
- package/styles/appbar/_highcontrast-light-definition.scss +0 -2
- package/styles/appbar/_layout.scss +3 -2
- package/styles/appbar/_material-dark-definition.scss +0 -2
- package/styles/appbar/_material-definition.scss +0 -2
- package/styles/appbar/_material3-definition.scss +0 -2
- package/styles/appbar/_tailwind-definition.scss +0 -2
- package/styles/appbar/_theme.scss +0 -2
- package/styles/appbar/bootstrap-dark.css +52 -23
- package/styles/appbar/bootstrap.css +52 -23
- package/styles/appbar/bootstrap4.css +52 -23
- package/styles/appbar/bootstrap5-dark.css +52 -23
- package/styles/appbar/bootstrap5.css +52 -23
- package/styles/appbar/fabric-dark.css +52 -23
- package/styles/appbar/fabric.css +52 -23
- package/styles/appbar/fluent-dark.css +52 -23
- package/styles/appbar/fluent.css +52 -23
- package/styles/appbar/fluent2.css +1332 -0
- package/styles/appbar/fluent2.scss +3 -0
- package/styles/appbar/highcontrast-light.css +52 -23
- package/styles/appbar/highcontrast.css +52 -23
- package/styles/appbar/material-dark.css +52 -23
- package/styles/appbar/material.css +52 -23
- package/styles/appbar/material3-dark.css +62 -26
- package/styles/appbar/material3.css +62 -26
- package/styles/appbar/tailwind-dark.css +52 -23
- package/styles/appbar/tailwind.css +52 -23
- package/styles/bootstrap-dark.css +1042 -643
- package/styles/bootstrap-dark.scss +47 -14
- package/styles/bootstrap.css +1050 -656
- package/styles/bootstrap.scss +47 -14
- package/styles/bootstrap4.css +1060 -673
- package/styles/bootstrap4.scss +47 -14
- package/styles/bootstrap5-dark.css +1101 -736
- package/styles/bootstrap5-dark.scss +47 -14
- package/styles/bootstrap5.css +1101 -736
- package/styles/bootstrap5.scss +47 -14
- package/styles/breadcrumb/_all.scss +0 -1
- package/styles/breadcrumb/_bds-definition.scss +1 -1
- package/styles/breadcrumb/_bootstrap5.3-definition.scss +57 -0
- package/styles/breadcrumb/_fluent-definition.scss +2 -1
- package/styles/breadcrumb/_fluent2-definition.scss +61 -0
- package/styles/breadcrumb/_layout.scss +92 -10
- package/styles/breadcrumb/_theme.scss +31 -2
- package/styles/breadcrumb/bootstrap-dark.css +37 -22
- package/styles/breadcrumb/bootstrap.css +37 -22
- package/styles/breadcrumb/bootstrap4.css +37 -22
- package/styles/breadcrumb/bootstrap5-dark.css +37 -22
- package/styles/breadcrumb/bootstrap5.css +37 -22
- package/styles/breadcrumb/fabric-dark.css +37 -22
- package/styles/breadcrumb/fabric.css +37 -22
- package/styles/breadcrumb/fluent-dark.css +39 -24
- package/styles/breadcrumb/fluent.css +39 -24
- package/styles/breadcrumb/fluent2.css +1489 -0
- package/styles/breadcrumb/fluent2.scss +4 -0
- package/styles/breadcrumb/highcontrast-light.css +37 -22
- package/styles/breadcrumb/highcontrast.css +37 -22
- package/styles/breadcrumb/icons/_bds.scss +0 -2
- package/styles/breadcrumb/icons/_bootstrap-dark.scss +0 -2
- package/styles/breadcrumb/icons/_bootstrap.scss +0 -2
- package/styles/breadcrumb/icons/_bootstrap4.scss +0 -2
- package/styles/breadcrumb/icons/_bootstrap5.3.scss +23 -0
- package/styles/breadcrumb/icons/_bootstrap5.scss +0 -2
- package/styles/breadcrumb/icons/_fabric-dark.scss +0 -2
- package/styles/breadcrumb/icons/_fabric.scss +0 -2
- package/styles/breadcrumb/icons/_fluent.scss +0 -2
- package/styles/breadcrumb/icons/_fluent2.scss +23 -0
- package/styles/breadcrumb/icons/_fusionnew.scss +0 -2
- package/styles/breadcrumb/icons/_highcontrast-light.scss +0 -2
- package/styles/breadcrumb/icons/_highcontrast.scss +0 -2
- package/styles/breadcrumb/icons/_material-dark.scss +0 -2
- package/styles/breadcrumb/icons/_material.scss +0 -2
- package/styles/breadcrumb/icons/_material3.scss +0 -2
- package/styles/breadcrumb/icons/_tailwind-dark.scss +0 -2
- package/styles/breadcrumb/icons/_tailwind.scss +0 -2
- package/styles/breadcrumb/material-dark.css +37 -22
- package/styles/breadcrumb/material.css +37 -22
- package/styles/breadcrumb/material3-dark.css +39 -23
- package/styles/breadcrumb/material3.css +39 -23
- package/styles/breadcrumb/tailwind-dark.css +37 -22
- package/styles/breadcrumb/tailwind.css +37 -22
- package/styles/carousel/_bds-definition.scss +0 -7
- package/styles/carousel/_bootstrap-dark-definition.scss +0 -7
- package/styles/carousel/_bootstrap-definition.scss +0 -7
- package/styles/carousel/_bootstrap4-definition.scss +0 -7
- package/styles/carousel/_bootstrap5-definition.scss +0 -7
- package/styles/carousel/_bootstrap5.3-definition.scss +20 -0
- package/styles/carousel/_fabric-dark-definition.scss +0 -7
- package/styles/carousel/_fabric-definition.scss +0 -7
- package/styles/carousel/_fluent-definition.scss +0 -7
- package/styles/carousel/_fluent2-definition.scss +21 -0
- package/styles/carousel/_fusionnew-definition.scss +0 -7
- package/styles/carousel/_highcontrast-definition.scss +0 -7
- package/styles/carousel/_highcontrast-light-definition.scss +0 -7
- package/styles/carousel/_layout.scss +0 -2
- package/styles/carousel/_material-dark-definition.scss +0 -7
- package/styles/carousel/_material-definition.scss +0 -7
- package/styles/carousel/_material3-definition.scss +0 -7
- package/styles/carousel/_tailwind-definition.scss +0 -7
- package/styles/carousel/_theme.scss +8 -2
- package/styles/carousel/bootstrap-dark.css +93 -39
- package/styles/carousel/bootstrap.css +93 -39
- package/styles/carousel/bootstrap4.css +93 -39
- package/styles/carousel/bootstrap5-dark.css +93 -39
- package/styles/carousel/bootstrap5.css +93 -39
- package/styles/carousel/fabric-dark.css +93 -39
- package/styles/carousel/fabric.css +93 -39
- package/styles/carousel/fluent-dark.css +93 -39
- package/styles/carousel/fluent.css +93 -39
- package/styles/carousel/fluent2.css +1405 -0
- package/styles/carousel/fluent2.scss +5 -0
- package/styles/carousel/highcontrast-light.css +93 -39
- package/styles/carousel/highcontrast.css +93 -39
- package/styles/carousel/icons/_bootstrap5.3.scss +30 -0
- package/styles/carousel/icons/_fluent2.scss +30 -0
- package/styles/carousel/material-dark.css +93 -39
- package/styles/carousel/material.css +93 -39
- package/styles/carousel/material3-dark.css +98 -41
- package/styles/carousel/material3.css +98 -41
- package/styles/carousel/tailwind-dark.css +93 -39
- package/styles/carousel/tailwind.css +93 -39
- package/styles/context-menu/_bds-definition.scss +5 -2
- package/styles/context-menu/_bootstrap-dark-definition.scss +0 -3
- package/styles/context-menu/_bootstrap5-definition.scss +0 -1
- package/styles/context-menu/_bootstrap5.3-definition.scss +51 -0
- package/styles/context-menu/_fabric-dark-definition.scss +0 -3
- package/styles/context-menu/_fluent-definition.scss +0 -1
- package/styles/context-menu/_fluent2-definition.scss +52 -0
- package/styles/context-menu/_fusionnew-definition.scss +0 -1
- package/styles/context-menu/_highcontrast-light-definition.scss +0 -3
- package/styles/context-menu/_layout-mixin.scss +24 -0
- package/styles/context-menu/_layout.scss +44 -4
- package/styles/context-menu/_material-dark-definition.scss +0 -3
- package/styles/context-menu/_material3-definition.scss +0 -1
- package/styles/context-menu/_tailwind-definition.scss +0 -1
- package/styles/context-menu/_theme-mixin.scss +13 -0
- package/styles/context-menu/_theme.scss +6 -3
- package/styles/context-menu/bootstrap-dark.css +19 -11
- package/styles/context-menu/bootstrap.css +21 -12
- package/styles/context-menu/bootstrap4.css +21 -12
- package/styles/context-menu/bootstrap5-dark.css +36 -14
- package/styles/context-menu/bootstrap5.css +36 -14
- package/styles/context-menu/fabric-dark.css +19 -11
- package/styles/context-menu/fabric.css +19 -11
- package/styles/context-menu/fluent-dark.css +36 -14
- package/styles/context-menu/fluent.css +36 -14
- package/styles/context-menu/fluent2.css +1497 -0
- package/styles/context-menu/fluent2.scss +7 -0
- package/styles/context-menu/highcontrast-light.css +19 -11
- package/styles/context-menu/highcontrast.css +19 -11
- package/styles/context-menu/icons/_bds.scss +0 -2
- package/styles/context-menu/icons/_bootstrap-dark.scss +0 -2
- package/styles/context-menu/icons/_bootstrap.scss +0 -2
- package/styles/context-menu/icons/_bootstrap4.scss +0 -2
- package/styles/context-menu/icons/_bootstrap5.3.scss +31 -0
- package/styles/context-menu/icons/_bootstrap5.scss +0 -2
- package/styles/context-menu/icons/_fabric-dark.scss +0 -2
- package/styles/context-menu/icons/_fabric.scss +0 -2
- package/styles/context-menu/icons/_fluent.scss +0 -2
- package/styles/context-menu/icons/_fluent2.scss +31 -0
- package/styles/context-menu/icons/_fusionnew.scss +0 -2
- package/styles/context-menu/icons/_highcontrast-light.scss +0 -2
- package/styles/context-menu/icons/_highcontrast.scss +0 -2
- package/styles/context-menu/icons/_material-dark.scss +0 -2
- package/styles/context-menu/icons/_material.scss +0 -2
- package/styles/context-menu/icons/_material3.scss +0 -2
- package/styles/context-menu/icons/_tailwind-dark.scss +0 -2
- package/styles/context-menu/icons/_tailwind.scss +0 -2
- package/styles/context-menu/material-dark.css +49 -15
- package/styles/context-menu/material.css +49 -15
- package/styles/context-menu/material3-dark.css +38 -15
- package/styles/context-menu/material3.css +38 -15
- package/styles/context-menu/tailwind-dark.css +36 -14
- package/styles/context-menu/tailwind.css +36 -14
- package/styles/fabric-dark.css +1040 -641
- package/styles/fabric-dark.scss +47 -14
- package/styles/fabric.css +1042 -652
- package/styles/fabric.scss +47 -14
- package/styles/fluent-dark.css +1074 -698
- package/styles/fluent-dark.scss +47 -14
- package/styles/fluent.css +1074 -698
- package/styles/fluent.scss +47 -14
- package/styles/fluent2.css +13003 -0
- package/styles/fluent2.scss +47 -0
- package/styles/h-scroll/_bootstrap5.3-definition.scss +83 -0
- package/styles/h-scroll/_fluent2-definition.scss +83 -0
- package/styles/h-scroll/bootstrap-dark.css +22 -10
- package/styles/h-scroll/bootstrap.css +22 -10
- package/styles/h-scroll/bootstrap4.css +22 -10
- package/styles/h-scroll/bootstrap5-dark.css +41 -14
- package/styles/h-scroll/bootstrap5.css +41 -14
- package/styles/h-scroll/fabric-dark.css +22 -10
- package/styles/h-scroll/fabric.css +22 -10
- package/styles/h-scroll/fluent-dark.css +41 -14
- package/styles/h-scroll/fluent.css +41 -14
- package/styles/h-scroll/fluent2.css +1341 -0
- package/styles/h-scroll/fluent2.scss +4 -0
- package/styles/h-scroll/highcontrast-light.css +22 -10
- package/styles/h-scroll/highcontrast.css +22 -10
- package/styles/h-scroll/icons/_bootstrap5.3.scss +49 -0
- package/styles/h-scroll/icons/_fluent2.scss +49 -0
- package/styles/h-scroll/material-dark.css +41 -14
- package/styles/h-scroll/material.css +41 -14
- package/styles/h-scroll/material3-dark.css +44 -15
- package/styles/h-scroll/material3.css +44 -15
- package/styles/h-scroll/tailwind-dark.css +41 -14
- package/styles/h-scroll/tailwind.css +41 -14
- package/styles/highcontrast-light.css +1040 -641
- package/styles/highcontrast-light.scss +47 -14
- package/styles/highcontrast.css +1056 -655
- package/styles/highcontrast.scss +47 -14
- package/styles/material-dark.css +1144 -709
- package/styles/material-dark.scss +47 -14
- package/styles/material.css +1157 -726
- package/styles/material.scss +47 -14
- package/styles/material3-dark.css +1148 -731
- package/styles/material3-dark.scss +47 -14
- package/styles/material3.css +1148 -731
- package/styles/material3.scss +47 -14
- package/styles/menu/_bds-definition.scss +0 -1
- package/styles/menu/_bootstrap-dark-definition.scss +0 -3
- package/styles/menu/_bootstrap5-definition.scss +0 -1
- package/styles/menu/_bootstrap5.3-definition.scss +66 -0
- package/styles/menu/_fabric-dark-definition.scss +0 -3
- package/styles/menu/_fluent-definition.scss +0 -1
- package/styles/menu/_fluent2-definition.scss +67 -0
- package/styles/menu/_fusionnew-definition.scss +0 -1
- package/styles/menu/_layout.scss +38 -17
- package/styles/menu/_material-dark-definition.scss +0 -3
- package/styles/menu/_material3-definition.scss +0 -1
- package/styles/menu/_tailwind-definition.scss +0 -1
- package/styles/menu/_theme.scss +46 -14
- package/styles/menu/bootstrap-dark.css +41 -39
- package/styles/menu/bootstrap.css +43 -40
- package/styles/menu/bootstrap4.css +47 -50
- package/styles/menu/bootstrap5-dark.css +58 -42
- package/styles/menu/bootstrap5.css +58 -42
- package/styles/menu/fabric-dark.css +41 -39
- package/styles/menu/fabric.css +41 -39
- package/styles/menu/fluent-dark.css +60 -47
- package/styles/menu/fluent.css +60 -47
- package/styles/menu/fluent2.css +2226 -0
- package/styles/menu/fluent2.scss +8 -0
- package/styles/menu/highcontrast-light.css +41 -39
- package/styles/menu/highcontrast.css +41 -39
- package/styles/menu/icons/_bds.scss +2 -32
- package/styles/menu/icons/_bootstrap-dark.scss +2 -31
- package/styles/menu/icons/_bootstrap.scss +2 -32
- package/styles/menu/icons/_bootstrap4.scss +2 -32
- package/styles/menu/icons/_bootstrap5.3.scss +104 -0
- package/styles/menu/icons/_bootstrap5.scss +2 -32
- package/styles/menu/icons/_fabric-dark.scss +2 -32
- package/styles/menu/icons/_fabric.scss +2 -32
- package/styles/menu/icons/_fluent.scss +2 -32
- package/styles/menu/icons/_fluent2.scss +104 -0
- package/styles/menu/icons/_fusionnew.scss +2 -32
- package/styles/menu/icons/_highcontrast-light.scss +2 -32
- package/styles/menu/icons/_highcontrast.scss +2 -32
- package/styles/menu/icons/_material-dark.scss +2 -32
- package/styles/menu/icons/_material.scss +2 -32
- package/styles/menu/icons/_material3.scss +2 -32
- package/styles/menu/icons/_tailwind-dark.scss +2 -32
- package/styles/menu/icons/_tailwind.scss +2 -32
- package/styles/menu/material-dark.css +71 -43
- package/styles/menu/material.css +71 -43
- package/styles/menu/material3-dark.css +61 -43
- package/styles/menu/material3.css +61 -43
- package/styles/menu/tailwind-dark.css +58 -42
- package/styles/menu/tailwind.css +58 -42
- package/styles/pager/_bds-definition.scss +6 -6
- package/styles/pager/_bootstrap-dark-definition.scss +2 -2
- package/styles/pager/_bootstrap-definition.scss +8 -8
- package/styles/pager/_bootstrap4-definition.scss +10 -10
- package/styles/pager/_bootstrap5-definition.scss +19 -19
- package/styles/pager/_bootstrap5.3-definition.scss +166 -0
- package/styles/pager/_fabric-dark-definition.scss +3 -5
- package/styles/pager/_fabric-definition.scss +3 -3
- package/styles/pager/_fluent-definition.scss +11 -11
- package/styles/pager/_fluent2-definition.scss +152 -0
- package/styles/pager/_fusionnew-definition.scss +19 -19
- package/styles/pager/_highcontrast-definition.scss +2 -2
- package/styles/pager/_highcontrast-light-definition.scss +2 -4
- package/styles/pager/_layout.scss +340 -339
- package/styles/pager/_material-dark-definition.scss +4 -6
- package/styles/pager/_material-definition.scss +4 -4
- package/styles/pager/_material3-definition.scss +22 -22
- package/styles/pager/_tailwind-definition.scss +17 -17
- package/styles/pager/_theme.scss +43 -26
- package/styles/pager/bootstrap-dark.css +88 -76
- package/styles/pager/bootstrap.css +90 -78
- package/styles/pager/bootstrap4.css +90 -78
- package/styles/pager/bootstrap5-dark.css +114 -111
- package/styles/pager/bootstrap5.css +114 -111
- package/styles/pager/fabric-dark.css +86 -74
- package/styles/pager/fabric.css +86 -74
- package/styles/pager/fluent-dark.css +92 -80
- package/styles/pager/fluent.css +92 -80
- package/styles/pager/fluent2.css +1862 -0
- package/styles/pager/fluent2.scss +4 -0
- package/styles/pager/highcontrast-light.css +86 -74
- package/styles/pager/highcontrast.css +86 -74
- package/styles/pager/icons/_bootstrap5.3.scss +50 -0
- package/styles/pager/icons/_fluent2.scss +50 -0
- package/styles/pager/material-dark.css +86 -74
- package/styles/pager/material.css +86 -74
- package/styles/pager/material3-dark.css +107 -106
- package/styles/pager/material3.css +107 -106
- package/styles/pager/tailwind-dark.css +139 -144
- package/styles/pager/tailwind.css +139 -144
- package/styles/sidebar/_bds-definition.scss +8 -0
- package/styles/sidebar/_bootstrap5.3-definition.scss +6 -0
- package/styles/sidebar/_fluent2-definition.scss +8 -0
- package/styles/sidebar/_material3-definition.scss +0 -3
- package/styles/sidebar/_theme.scss +114 -45
- package/styles/sidebar/bootstrap-dark.css +124 -49
- package/styles/sidebar/bootstrap.css +124 -49
- package/styles/sidebar/bootstrap4.css +124 -49
- package/styles/sidebar/bootstrap5-dark.css +122 -47
- package/styles/sidebar/bootstrap5.css +122 -47
- package/styles/sidebar/fabric-dark.css +124 -49
- package/styles/sidebar/fabric.css +124 -49
- package/styles/sidebar/fluent-dark.css +122 -47
- package/styles/sidebar/fluent.css +122 -47
- package/styles/sidebar/fluent2.css +1263 -0
- package/styles/sidebar/fluent2.scss +3 -0
- package/styles/sidebar/highcontrast-light.css +124 -49
- package/styles/sidebar/highcontrast.css +124 -49
- package/styles/sidebar/material-dark.css +124 -49
- package/styles/sidebar/material.css +124 -49
- package/styles/sidebar/material3-dark.css +125 -49
- package/styles/sidebar/material3.css +125 -49
- package/styles/sidebar/tailwind-dark.css +122 -47
- package/styles/sidebar/tailwind.css +122 -47
- package/styles/stepper/_bds-definition.scss +0 -7
- package/styles/stepper/_bootstrap-dark-definition.scss +0 -7
- package/styles/stepper/_bootstrap-definition.scss +0 -7
- package/styles/stepper/_bootstrap4-definition.scss +0 -7
- package/styles/stepper/_bootstrap5-definition.scss +0 -7
- package/styles/stepper/_bootstrap5.3-definition.scss +73 -0
- package/styles/stepper/_fabric-dark-definition.scss +0 -7
- package/styles/stepper/_fabric-definition.scss +0 -7
- package/styles/stepper/_fluent-definition.scss +0 -7
- package/styles/stepper/_fluent2-definition.scss +72 -0
- package/styles/stepper/_fusionnew-definition.scss +0 -7
- package/styles/stepper/_highcontrast-definition.scss +0 -7
- package/styles/stepper/_highcontrast-light-definition.scss +0 -7
- package/styles/stepper/_layout.scss +90 -143
- package/styles/stepper/_material-dark-definition.scss +0 -7
- package/styles/stepper/_material-definition.scss +0 -7
- package/styles/stepper/_material3-definition.scss +0 -7
- package/styles/stepper/_tailwind-definition.scss +0 -7
- package/styles/stepper/_theme.scss +12 -20
- package/styles/stepper/bootstrap-dark.css +162 -118
- package/styles/stepper/bootstrap.css +162 -118
- package/styles/stepper/bootstrap4.css +162 -118
- package/styles/stepper/bootstrap5-dark.css +162 -118
- package/styles/stepper/bootstrap5.css +162 -118
- package/styles/stepper/fabric-dark.css +162 -118
- package/styles/stepper/fabric.css +162 -118
- package/styles/stepper/fluent-dark.css +162 -118
- package/styles/stepper/fluent.css +162 -118
- package/styles/stepper/fluent2.css +1742 -0
- package/styles/stepper/fluent2.scss +5 -0
- package/styles/stepper/highcontrast-light.css +162 -118
- package/styles/stepper/highcontrast.css +162 -118
- package/styles/stepper/icons/_bootstrap5.3.scss +5 -0
- package/styles/stepper/icons/_fluent2.scss +5 -0
- package/styles/stepper/material-dark.css +162 -118
- package/styles/stepper/material.css +162 -118
- package/styles/stepper/material3-dark.css +167 -119
- package/styles/stepper/material3.css +167 -119
- package/styles/stepper/tailwind-dark.css +162 -118
- package/styles/stepper/tailwind.css +162 -118
- package/styles/tab/_bds-definition.scss +5 -45
- package/styles/tab/_bootstrap-dark-definition.scss +0 -26
- package/styles/tab/_bootstrap-definition.scss +0 -35
- package/styles/tab/_bootstrap4-definition.scss +9 -42
- package/styles/tab/_bootstrap5-definition.scss +0 -26
- package/styles/tab/_bootstrap5.3-definition.scss +635 -0
- package/styles/tab/_fabric-dark-definition.scss +0 -22
- package/styles/tab/_fabric-definition.scss +1 -36
- package/styles/tab/_fluent-definition.scss +0 -31
- package/styles/tab/_fluent2-definition.scss +667 -0
- package/styles/tab/_fusionnew-definition.scss +0 -26
- package/styles/tab/_highcontrast-definition.scss +0 -35
- package/styles/tab/_highcontrast-light-definition.scss +0 -24
- package/styles/tab/_icons.scss +0 -2
- package/styles/tab/_layout.scss +29 -31
- package/styles/tab/_material-dark-definition.scss +0 -28
- package/styles/tab/_material-definition.scss +0 -39
- package/styles/tab/_material3-definition.scss +3 -28
- package/styles/tab/_tailwind-definition.scss +0 -39
- package/styles/tab/_theme.scss +21 -2
- package/styles/tab/bootstrap-dark.css +171 -78
- package/styles/tab/bootstrap.css +171 -83
- package/styles/tab/bootstrap4.css +177 -87
- package/styles/tab/bootstrap5-dark.css +171 -84
- package/styles/tab/bootstrap5.css +171 -84
- package/styles/tab/fabric-dark.css +171 -78
- package/styles/tab/fabric.css +173 -85
- package/styles/tab/fluent-dark.css +171 -81
- package/styles/tab/fluent.css +171 -81
- package/styles/tab/fluent2.css +5251 -0
- package/styles/tab/fluent2.scss +5 -0
- package/styles/tab/highcontrast-light.css +171 -78
- package/styles/tab/highcontrast.css +171 -83
- package/styles/tab/icons/_bds.scss +0 -2
- package/styles/tab/icons/_bootstrap-dark.scss +0 -2
- package/styles/tab/icons/_bootstrap.scss +0 -2
- package/styles/tab/icons/_bootstrap4.scss +0 -2
- package/styles/tab/icons/_bootstrap5.3.scss +90 -0
- package/styles/tab/icons/_bootstrap5.scss +0 -2
- package/styles/tab/icons/_fabric-dark.scss +0 -2
- package/styles/tab/icons/_fabric.scss +0 -2
- package/styles/tab/icons/_fluent.scss +0 -2
- package/styles/tab/icons/_fluent2.scss +98 -0
- package/styles/tab/icons/_fusionnew.scss +0 -2
- package/styles/tab/icons/_highcontrast-light.scss +0 -2
- package/styles/tab/icons/_highcontrast.scss +0 -2
- package/styles/tab/icons/_material-dark.scss +0 -2
- package/styles/tab/icons/_material.scss +0 -2
- package/styles/tab/icons/_material3.scss +0 -2
- package/styles/tab/icons/_tailwind.scss +0 -2
- package/styles/tab/material-dark.css +232 -84
- package/styles/tab/material.css +232 -90
- package/styles/tab/material3-dark.css +174 -85
- package/styles/tab/material3.css +174 -85
- package/styles/tab/tailwind-dark.css +217 -87
- package/styles/tab/tailwind.css +217 -87
- package/styles/tailwind-dark.css +1165 -763
- package/styles/tailwind-dark.scss +47 -14
- package/styles/tailwind.css +1165 -763
- package/styles/tailwind.scss +47 -14
- package/styles/toolbar/_bds-definition.scss +0 -18
- package/styles/toolbar/_bootstrap-dark-definition.scss +0 -15
- package/styles/toolbar/_bootstrap-definition.scss +0 -3
- package/styles/toolbar/_bootstrap4-definition.scss +0 -13
- package/styles/toolbar/_bootstrap5-definition.scss +0 -22
- package/styles/toolbar/_bootstrap5.3-definition.scss +198 -0
- package/styles/toolbar/_fabric-dark-definition.scss +0 -15
- package/styles/toolbar/_fabric-definition.scss +0 -13
- package/styles/toolbar/_fluent-definition.scss +0 -13
- package/styles/toolbar/_fluent2-definition.scss +197 -0
- package/styles/toolbar/_fusionnew-definition.scss +0 -22
- package/styles/toolbar/_highcontrast-definition.scss +0 -14
- package/styles/toolbar/_highcontrast-light-definition.scss +0 -15
- package/styles/toolbar/_layout.scss +18 -32
- package/styles/toolbar/_material-dark-definition.scss +0 -16
- package/styles/toolbar/_material-definition.scss +0 -16
- package/styles/toolbar/_material3-definition.scss +0 -21
- package/styles/toolbar/_tailwind-definition.scss +0 -13
- package/styles/toolbar/_theme.scss +66 -5
- package/styles/toolbar/bootstrap-dark.css +94 -61
- package/styles/toolbar/bootstrap.css +96 -62
- package/styles/toolbar/bootstrap4.css +96 -62
- package/styles/toolbar/bootstrap5-dark.css +111 -64
- package/styles/toolbar/bootstrap5.css +111 -64
- package/styles/toolbar/fabric-dark.css +94 -61
- package/styles/toolbar/fabric.css +94 -61
- package/styles/toolbar/fluent-dark.css +111 -64
- package/styles/toolbar/fluent.css +111 -64
- package/styles/toolbar/fluent2.css +2224 -0
- package/styles/toolbar/fluent2.scss +8 -0
- package/styles/toolbar/highcontrast-light.css +94 -61
- package/styles/toolbar/highcontrast.css +94 -61
- package/styles/toolbar/icons/_bds.scss +0 -2
- package/styles/toolbar/icons/_bootstrap-dark.scss +0 -2
- package/styles/toolbar/icons/_bootstrap.scss +0 -2
- package/styles/toolbar/icons/_bootstrap4.scss +0 -2
- package/styles/toolbar/icons/_bootstrap5.3.scss +14 -0
- package/styles/toolbar/icons/_bootstrap5.scss +0 -2
- package/styles/toolbar/icons/_fabric-dark.scss +0 -2
- package/styles/toolbar/icons/_fabric.scss +0 -2
- package/styles/toolbar/icons/_fluent.scss +0 -2
- package/styles/toolbar/icons/_fluent2.scss +14 -0
- package/styles/toolbar/icons/_fusionnew.scss +0 -2
- package/styles/toolbar/icons/_highcontrast-light.scss +0 -2
- package/styles/toolbar/icons/_highcontrast.scss +0 -2
- package/styles/toolbar/icons/_material-dark.scss +0 -2
- package/styles/toolbar/icons/_material.scss +0 -2
- package/styles/toolbar/icons/_material3.scss +0 -2
- package/styles/toolbar/icons/_tailwind.scss +0 -2
- package/styles/toolbar/material-dark.css +143 -69
- package/styles/toolbar/material.css +143 -70
- package/styles/toolbar/material3-dark.css +123 -65
- package/styles/toolbar/material3.css +123 -65
- package/styles/toolbar/tailwind-dark.css +111 -64
- package/styles/toolbar/tailwind.css +111 -64
- package/styles/treeview/_bootstrap5.3-definition.scss +119 -0
- package/styles/treeview/_fluent2-definition.scss +126 -0
- package/styles/treeview/_layout.scss +154 -146
- package/styles/treeview/_material3-definition.scss +1 -12
- package/styles/treeview/_theme.scss +154 -168
- package/styles/treeview/bootstrap-dark.css +106 -98
- package/styles/treeview/bootstrap.css +112 -100
- package/styles/treeview/bootstrap4.css +112 -104
- package/styles/treeview/bootstrap5-dark.css +112 -103
- package/styles/treeview/bootstrap5.css +112 -103
- package/styles/treeview/fabric-dark.css +106 -98
- package/styles/treeview/fabric.css +106 -98
- package/styles/treeview/fluent-dark.css +112 -103
- package/styles/treeview/fluent.css +112 -103
- package/styles/treeview/fluent2.css +2052 -0
- package/styles/treeview/fluent2.scss +6 -0
- package/styles/treeview/highcontrast-light.css +106 -98
- package/styles/treeview/highcontrast.css +122 -103
- package/styles/treeview/icons/_bootstrap5.3.scss +43 -0
- package/styles/treeview/icons/_fluent2.scss +43 -0
- package/styles/treeview/material-dark.css +115 -99
- package/styles/treeview/material.css +129 -101
- package/styles/treeview/material3-dark.css +136 -109
- package/styles/treeview/material3.css +136 -109
- package/styles/treeview/tailwind-dark.css +113 -105
- package/styles/treeview/tailwind.css +113 -105
- package/styles/v-scroll/_bootstrap5.3-definition.scss +49 -0
- package/styles/v-scroll/_fluent2-definition.scss +49 -0
- package/styles/v-scroll/bootstrap-dark.css +22 -10
- package/styles/v-scroll/bootstrap.css +22 -10
- package/styles/v-scroll/bootstrap4.css +22 -10
- package/styles/v-scroll/bootstrap5-dark.css +22 -10
- package/styles/v-scroll/bootstrap5.css +22 -10
- package/styles/v-scroll/fabric-dark.css +22 -10
- package/styles/v-scroll/fabric.css +22 -10
- package/styles/v-scroll/fluent-dark.css +22 -10
- package/styles/v-scroll/fluent.css +22 -10
- package/styles/v-scroll/fluent2.css +1248 -0
- package/styles/v-scroll/fluent2.scss +4 -0
- package/styles/v-scroll/highcontrast-light.css +22 -10
- package/styles/v-scroll/highcontrast.css +22 -10
- package/styles/v-scroll/icons/_bootstrap5.3.scss +27 -0
- package/styles/v-scroll/icons/_fluent2.scss +27 -0
- package/styles/v-scroll/material-dark.css +41 -14
- package/styles/v-scroll/material.css +41 -14
- package/styles/v-scroll/material3-dark.css +25 -11
- package/styles/v-scroll/material3.css +25 -11
- package/styles/v-scroll/tailwind-dark.css +22 -10
- package/styles/v-scroll/tailwind.css +22 -10
- package/CHANGELOG.md +0 -2355
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Browser, getUniqueID, Touch, EventHandler, isNullOrUndefined, selectAll, detach, classList, Property, NotifyPropertyChanges, Component, createElement, removeClass, select, ChildProperty, Collection, Animation, getValue, setValue, append, addClass, isBlazor, rippleEffect, KeyboardEvents, closest, getInstance, isVisible, SanitizeHtmlHelper, Event, Complex, formatUnit, setStyleAttribute, attributes, compile, isRippleEnabled, animationMode, remove, getRandomId, L10n, Draggable, isUndefined, getElement, Droppable, matches, extend, merge, initializeCSPTemplate } from '@syncfusion/ej2-base';
|
|
2
2
|
import { ListBase } from '@syncfusion/ej2-lists';
|
|
3
|
-
import { Popup,
|
|
3
|
+
import { getScrollableParent, Popup, getZindexPartial, fit, isCollide, calculatePosition, createSpinner, showSpinner, hideSpinner, Tooltip } from '@syncfusion/ej2-popups';
|
|
4
4
|
import { Button, createCheckBox, rippleMouseHandler } from '@syncfusion/ej2-buttons';
|
|
5
5
|
import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
6
6
|
import { Input } from '@syncfusion/ej2-inputs';
|
|
@@ -292,15 +292,15 @@ var HScroll = /** @__PURE__ @class */ (function (_super) {
|
|
|
292
292
|
};
|
|
293
293
|
HScroll.prototype.eleScrolling = function (scrollDis, trgt, isContinuous) {
|
|
294
294
|
var rootEle = this.element;
|
|
295
|
-
var classList
|
|
296
|
-
if (classList
|
|
297
|
-
classList
|
|
295
|
+
var classList = trgt.classList;
|
|
296
|
+
if (classList.contains(CLS_HSCROLLNAV)) {
|
|
297
|
+
classList = trgt.querySelector('.' + CLS_NAVARROW).classList;
|
|
298
298
|
}
|
|
299
299
|
if (this.contains(rootEle, CLS_RTL) && this.browserCheck) {
|
|
300
300
|
scrollDis = -scrollDis;
|
|
301
301
|
}
|
|
302
302
|
if ((!this.contains(rootEle, CLS_RTL) || this.browserCheck) || this.ieCheck) {
|
|
303
|
-
if (classList
|
|
303
|
+
if (classList.contains(CLS_NAVRIGHTARROW)) {
|
|
304
304
|
this.frameScrollRequest(scrollDis, 'add', isContinuous);
|
|
305
305
|
}
|
|
306
306
|
else {
|
|
@@ -308,7 +308,7 @@ var HScroll = /** @__PURE__ @class */ (function (_super) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
else {
|
|
311
|
-
if (classList
|
|
311
|
+
if (classList.contains(CLS_NAVLEFTARROW)) {
|
|
312
312
|
this.frameScrollRequest(scrollDis, 'add', isContinuous);
|
|
313
313
|
}
|
|
314
314
|
else {
|
|
@@ -785,14 +785,14 @@ var VScroll = /** @__PURE__ @class */ (function (_super) {
|
|
|
785
785
|
return element.classList.contains(className);
|
|
786
786
|
};
|
|
787
787
|
VScroll.prototype.eleScrolling = function (scrollDis, trgt, isContinuous) {
|
|
788
|
-
var classList
|
|
789
|
-
if (classList
|
|
790
|
-
classList
|
|
788
|
+
var classList = trgt.classList;
|
|
789
|
+
if (classList.contains(CLS_VSCROLLNAV)) {
|
|
790
|
+
classList = trgt.querySelector('.' + CLS_NAVARROW$1).classList;
|
|
791
791
|
}
|
|
792
|
-
if (classList
|
|
792
|
+
if (classList.contains(CLS_NAVDOWNARROW)) {
|
|
793
793
|
this.frameScrollRequest(scrollDis, 'add', isContinuous);
|
|
794
794
|
}
|
|
795
|
-
else if (classList
|
|
795
|
+
else if (classList.contains(CLS_NAVUPARROW)) {
|
|
796
796
|
this.frameScrollRequest(scrollDis, '', isContinuous);
|
|
797
797
|
}
|
|
798
798
|
};
|
|
@@ -981,7 +981,7 @@ var VScroll = /** @__PURE__ @class */ (function (_super) {
|
|
|
981
981
|
* @returns {HTMLElement} - Element
|
|
982
982
|
* @hidden
|
|
983
983
|
*/
|
|
984
|
-
function addScrolling(createElement
|
|
984
|
+
function addScrolling(createElement, container, content, scrollType, enableRtl, offset) {
|
|
985
985
|
var containerOffset;
|
|
986
986
|
var contentOffset;
|
|
987
987
|
var parentElem = container.parentElement;
|
|
@@ -994,14 +994,14 @@ function addScrolling(createElement$$1, container, content, scrollType, enableRt
|
|
|
994
994
|
contentOffset = content.getBoundingClientRect().width;
|
|
995
995
|
}
|
|
996
996
|
if (containerOffset < contentOffset) {
|
|
997
|
-
return createScrollbar(createElement
|
|
997
|
+
return createScrollbar(createElement, container, content, scrollType, enableRtl, offset);
|
|
998
998
|
}
|
|
999
999
|
else if (parentElem) {
|
|
1000
1000
|
var width = parentElem.getBoundingClientRect().width;
|
|
1001
1001
|
if (width < containerOffset && scrollType === 'hscroll') {
|
|
1002
1002
|
contentOffset = width;
|
|
1003
1003
|
container.style.maxWidth = width + 'px';
|
|
1004
|
-
return createScrollbar(createElement
|
|
1004
|
+
return createScrollbar(createElement, container, content, scrollType, enableRtl, offset);
|
|
1005
1005
|
}
|
|
1006
1006
|
return content;
|
|
1007
1007
|
}
|
|
@@ -1021,8 +1021,8 @@ function addScrolling(createElement$$1, container, content, scrollType, enableRt
|
|
|
1021
1021
|
* @returns {HTMLElement} - Element
|
|
1022
1022
|
* @hidden
|
|
1023
1023
|
*/
|
|
1024
|
-
function createScrollbar(createElement
|
|
1025
|
-
var scrollEle = createElement
|
|
1024
|
+
function createScrollbar(createElement, container, content, scrollType, enableRtl, offset) {
|
|
1025
|
+
var scrollEle = createElement('div', { className: 'e-menu-' + scrollType });
|
|
1026
1026
|
container.appendChild(scrollEle);
|
|
1027
1027
|
scrollEle.appendChild(content);
|
|
1028
1028
|
if (offset) {
|
|
@@ -1555,6 +1555,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1555
1555
|
return isNullOrUndefined(popup) ? null : select('.e-menu-parent', popup);
|
|
1556
1556
|
}
|
|
1557
1557
|
else {
|
|
1558
|
+
if (!document.body.contains(this.element) && navIdxLen === 0) {
|
|
1559
|
+
return null;
|
|
1560
|
+
}
|
|
1558
1561
|
return this.getWrapper().children[navIdxLen];
|
|
1559
1562
|
}
|
|
1560
1563
|
};
|
|
@@ -1721,8 +1724,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1721
1724
|
_this.isCMenu = false;
|
|
1722
1725
|
}
|
|
1723
1726
|
if (_this.isMenu && trgtpopUp && popupId.length) {
|
|
1724
|
-
// eslint-disable-next-line
|
|
1725
|
-
|
|
1727
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1728
|
+
var regExp = RegExp;
|
|
1729
|
+
trgtliId = new regExp('(.*)-ej2menu-' + _this.element.id + '-popup').exec(popupId)[1];
|
|
1726
1730
|
closedLi = trgtpopUp.querySelector('[id="' + trgtliId + '"]');
|
|
1727
1731
|
trgtLi = (liElem_1 && trgtpopUp.querySelector('[id="' + liElem_1.id + '"]'));
|
|
1728
1732
|
}
|
|
@@ -1953,6 +1957,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1953
1957
|
};
|
|
1954
1958
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1955
1959
|
MenuBase.prototype.copyObject = function (source, destination) {
|
|
1960
|
+
// eslint-disable-next-line guard-for-in
|
|
1956
1961
|
for (var prop in source) {
|
|
1957
1962
|
destination["" + prop] = source["" + prop];
|
|
1958
1963
|
}
|
|
@@ -2151,11 +2156,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2151
2156
|
}
|
|
2152
2157
|
li.focus();
|
|
2153
2158
|
cul = _this.getUlByNavIdx();
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
cul.children[index].focus();
|
|
2158
|
-
}
|
|
2159
|
+
var index = _this.isValidLI(cul.children[0], 0, _this.action);
|
|
2160
|
+
cul.children[index].classList.add(FOCUSED);
|
|
2161
|
+
cul.children[index].focus();
|
|
2159
2162
|
}
|
|
2160
2163
|
});
|
|
2161
2164
|
};
|
|
@@ -2274,10 +2277,10 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2274
2277
|
ul.style.top = top + px;
|
|
2275
2278
|
ul.style.left = left + px;
|
|
2276
2279
|
};
|
|
2277
|
-
MenuBase.prototype.toggleVisiblity = function (ul, isVisible
|
|
2278
|
-
if (isVisible
|
|
2279
|
-
ul.style.visibility = isVisible
|
|
2280
|
-
ul.style.display = isVisible
|
|
2280
|
+
MenuBase.prototype.toggleVisiblity = function (ul, isVisible) {
|
|
2281
|
+
if (isVisible === void 0) { isVisible = true; }
|
|
2282
|
+
ul.style.visibility = isVisible ? 'hidden' : '';
|
|
2283
|
+
ul.style.display = isVisible ? 'block' : 'none';
|
|
2281
2284
|
};
|
|
2282
2285
|
MenuBase.prototype.createItems = function (items) {
|
|
2283
2286
|
var _this = this;
|
|
@@ -2361,8 +2364,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2361
2364
|
MenuBase.prototype.moverHandler = function (e) {
|
|
2362
2365
|
var trgt = e.target;
|
|
2363
2366
|
this.liTrgt = trgt;
|
|
2364
|
-
if (!this.isMenu)
|
|
2367
|
+
if (!this.isMenu) {
|
|
2365
2368
|
this.isCmenuHover = true;
|
|
2369
|
+
}
|
|
2366
2370
|
var cli = this.getLI(trgt);
|
|
2367
2371
|
var wrapper = cli ? closest(cli, '.e-' + this.getModuleName() + '-wrapper') : this.getWrapper();
|
|
2368
2372
|
var hdrWrapper = this.getWrapper();
|
|
@@ -2418,8 +2422,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2418
2422
|
}
|
|
2419
2423
|
this.isClosed = false;
|
|
2420
2424
|
}
|
|
2421
|
-
if (!this.isMenu)
|
|
2425
|
+
if (!this.isMenu) {
|
|
2422
2426
|
this.isCmenuHover = false;
|
|
2427
|
+
}
|
|
2423
2428
|
};
|
|
2424
2429
|
MenuBase.prototype.removeStateWrapper = function () {
|
|
2425
2430
|
if (this.liTrgt) {
|
|
@@ -2429,10 +2434,10 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2429
2434
|
}
|
|
2430
2435
|
}
|
|
2431
2436
|
};
|
|
2432
|
-
MenuBase.prototype.removeLIStateByClass = function (classList
|
|
2437
|
+
MenuBase.prototype.removeLIStateByClass = function (classList, element) {
|
|
2433
2438
|
var li;
|
|
2434
2439
|
var _loop_1 = function (i) {
|
|
2435
|
-
classList
|
|
2440
|
+
classList.forEach(function (className) {
|
|
2436
2441
|
li = select('.' + className, element[i]);
|
|
2437
2442
|
if (li) {
|
|
2438
2443
|
li.classList.remove(className);
|
|
@@ -2542,14 +2547,16 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2542
2547
|
this.keyType = 'click';
|
|
2543
2548
|
if (this.showItemOnClick) {
|
|
2544
2549
|
this.setLISelected(cli);
|
|
2545
|
-
if (!this.isMenu)
|
|
2550
|
+
if (!this.isMenu) {
|
|
2546
2551
|
this.isCmenuHover = true;
|
|
2552
|
+
}
|
|
2547
2553
|
}
|
|
2548
2554
|
this.closeMenu(culIdx + 1, e);
|
|
2549
2555
|
if (this.showItemOnClick) {
|
|
2550
2556
|
this.setLISelected(cli);
|
|
2551
|
-
if (!this.isMenu)
|
|
2557
|
+
if (!this.isMenu) {
|
|
2552
2558
|
this.isCmenuHover = false;
|
|
2559
|
+
}
|
|
2553
2560
|
}
|
|
2554
2561
|
}
|
|
2555
2562
|
}
|
|
@@ -2640,7 +2647,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2640
2647
|
li.classList.add(SELECTED);
|
|
2641
2648
|
};
|
|
2642
2649
|
MenuBase.prototype.getLIByClass = function (ul, classname) {
|
|
2643
|
-
if (ul) {
|
|
2650
|
+
if (ul && ul.children) {
|
|
2644
2651
|
for (var i = 0, len = ul.children.length; i < len; i++) {
|
|
2645
2652
|
if (ul.children[i].classList.contains(classname)) {
|
|
2646
2653
|
return ul.children[i];
|
|
@@ -3016,8 +3023,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
3016
3023
|
};
|
|
3017
3024
|
MenuBase.prototype.end = function (ul, isMenuOpen) {
|
|
3018
3025
|
if (isMenuOpen) {
|
|
3019
|
-
if (this.isMenu || !Browser.isDevice)
|
|
3026
|
+
if (this.isMenu || !Browser.isDevice) {
|
|
3020
3027
|
ul.style.display = 'block';
|
|
3028
|
+
}
|
|
3021
3029
|
ul.style.maxHeight = '';
|
|
3022
3030
|
this.triggerOpen(ul);
|
|
3023
3031
|
if (ul.querySelector('.' + FOCUSED)) {
|
|
@@ -3433,10 +3441,6 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
3433
3441
|
return MenuBase;
|
|
3434
3442
|
}(Component));
|
|
3435
3443
|
|
|
3436
|
-
/**
|
|
3437
|
-
* Navigation Common modules
|
|
3438
|
-
*/
|
|
3439
|
-
|
|
3440
3444
|
var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
3441
3445
|
var extendStatics = function (d, b) {
|
|
3442
3446
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -3456,7 +3460,6 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
3456
3460
|
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;
|
|
3457
3461
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3458
3462
|
};
|
|
3459
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3460
3463
|
var CLS_VERTICAL = 'e-vertical';
|
|
3461
3464
|
var CLS_ITEMS = 'e-toolbar-items';
|
|
3462
3465
|
var CLS_ITEM = 'e-toolbar-item';
|
|
@@ -3993,8 +3996,8 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
3993
3996
|
}
|
|
3994
3997
|
return element;
|
|
3995
3998
|
};
|
|
3996
|
-
Toolbar.prototype.eleFocus = function (closest
|
|
3997
|
-
var sib = Object(closest
|
|
3999
|
+
Toolbar.prototype.eleFocus = function (closest, pos) {
|
|
4000
|
+
var sib = Object(closest)[pos + 'ElementSibling'];
|
|
3998
4001
|
if (sib) {
|
|
3999
4002
|
var skipEle = this.eleContains(sib);
|
|
4000
4003
|
if (skipEle) {
|
|
@@ -4004,7 +4007,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4004
4007
|
this.elementFocus(sib);
|
|
4005
4008
|
}
|
|
4006
4009
|
else if (this.tbarAlign) {
|
|
4007
|
-
var elem = Object(closest
|
|
4010
|
+
var elem = Object(closest.parentElement)[pos + 'ElementSibling'];
|
|
4008
4011
|
if (!isNullOrUndefined(elem) && elem.children.length === 0) {
|
|
4009
4012
|
elem = Object(elem)[pos + 'ElementSibling'];
|
|
4010
4013
|
}
|
|
@@ -4030,7 +4033,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4030
4033
|
}
|
|
4031
4034
|
}
|
|
4032
4035
|
}
|
|
4033
|
-
else if (!isNullOrUndefined(closest
|
|
4036
|
+
else if (!isNullOrUndefined(closest)) {
|
|
4034
4037
|
var tbrItems = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')' + ':not(.' + CLS_DISABLE$2 + ')' + ':not(.' + CLS_HIDDEN + ')');
|
|
4035
4038
|
if (pos === 'next' && tbrItems) {
|
|
4036
4039
|
this.elementFocus(tbrItems[0]);
|
|
@@ -4067,7 +4070,9 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4067
4070
|
itemObj = tempItem;
|
|
4068
4071
|
}
|
|
4069
4072
|
var eventArgs = { originalEvent: e, item: itemObj };
|
|
4070
|
-
var isClickBinded = itemObj && !isNullOrUndefined(itemObj.click) && typeof itemObj.click == 'object' ?
|
|
4073
|
+
var isClickBinded = itemObj && !isNullOrUndefined(itemObj.click) && typeof itemObj.click == 'object' ?
|
|
4074
|
+
!isNullOrUndefined(itemObj.click.observers) && itemObj.click.observers.length > 0 :
|
|
4075
|
+
!isNullOrUndefined(itemObj) && !isNullOrUndefined(itemObj.click);
|
|
4071
4076
|
if (isClickBinded) {
|
|
4072
4077
|
this.trigger('items[' + this.tbarEle.indexOf(clst) + '].click', eventArgs);
|
|
4073
4078
|
}
|
|
@@ -4492,7 +4497,6 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4492
4497
|
addClass([ele], this.cssClass.split(' '));
|
|
4493
4498
|
}
|
|
4494
4499
|
setStyleAttribute(this.element, { overflow: '' });
|
|
4495
|
-
var eleStyles = window.getComputedStyle(this.element);
|
|
4496
4500
|
var popup = new Popup(null, {
|
|
4497
4501
|
relateTo: this.element,
|
|
4498
4502
|
offsetY: (this.isVertical) ? 0 : this.getElementOffsetY(),
|
|
@@ -4720,6 +4724,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4720
4724
|
nav.setAttribute('role', 'button');
|
|
4721
4725
|
element.appendChild(nav);
|
|
4722
4726
|
};
|
|
4727
|
+
// eslint-disable-next-line max-len
|
|
4723
4728
|
Toolbar.prototype.tbarPriRef = function (inEle, indx, sepPri, el, des, elWid, wid, ig, eleStyles) {
|
|
4724
4729
|
var ignoreCount = ig;
|
|
4725
4730
|
var popEle = this.popObj.element;
|
|
@@ -4863,7 +4868,10 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4863
4868
|
}
|
|
4864
4869
|
el.style.position = '';
|
|
4865
4870
|
if (elWidth < width || destroy) {
|
|
4866
|
-
var inlineStyles = {
|
|
4871
|
+
var inlineStyles = {
|
|
4872
|
+
minWidth: el.style.minWidth, height: el.style.height,
|
|
4873
|
+
minHeight: el.style.minHeight
|
|
4874
|
+
};
|
|
4867
4875
|
setStyleAttribute(el, { minWidth: '', height: '', minHeight: '' });
|
|
4868
4876
|
if (!el.classList.contains(CLS_POPOVERFLOW)) {
|
|
4869
4877
|
el.classList.remove(CLS_POPUP);
|
|
@@ -5338,8 +5346,8 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5338
5346
|
this.add(innerEle, CLS_TEMPLATE);
|
|
5339
5347
|
var firstChild = innerEle.firstElementChild;
|
|
5340
5348
|
if (!isNullOrUndefined(firstChild)) {
|
|
5341
|
-
firstChild.setAttribute('tabindex', isNullOrUndefined(firstChild.getAttribute(
|
|
5342
|
-
firstChild.setAttribute('data-tabindex', isNullOrUndefined(firstChild.getAttribute(
|
|
5349
|
+
firstChild.setAttribute('tabindex', isNullOrUndefined(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
5350
|
+
firstChild.setAttribute('data-tabindex', isNullOrUndefined(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
5343
5351
|
}
|
|
5344
5352
|
this.tbarEle.push(innerEle);
|
|
5345
5353
|
};
|
|
@@ -5477,8 +5485,8 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5477
5485
|
if (isNullOrUndefined(this.trgtEle) && !curEle.parentElement.classList.contains(CLS_TEMPLATE)) {
|
|
5478
5486
|
if (!isNullOrUndefined(this.element.querySelector('.e-hor-nav')) && this.element.querySelector('.e-hor-nav').classList.contains('e-nav-active')) {
|
|
5479
5487
|
this.updateTabIndex('0');
|
|
5480
|
-
this.getDataTabindex(previousEle) === '-1' ?
|
|
5481
|
-
|
|
5488
|
+
var tabindexValue = this.getDataTabindex(previousEle) === '-1' ? '0' : this.getDataTabindex(previousEle);
|
|
5489
|
+
previousEle.setAttribute('tabindex', tabindexValue);
|
|
5482
5490
|
}
|
|
5483
5491
|
else {
|
|
5484
5492
|
this.updateTabIndex('-1');
|
|
@@ -5486,7 +5494,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5486
5494
|
curEle.removeAttribute('tabindex');
|
|
5487
5495
|
}
|
|
5488
5496
|
else {
|
|
5489
|
-
var tabIndex = parseInt(this.getDataTabindex(this.activeEle)) + 1;
|
|
5497
|
+
var tabIndex = parseInt(this.getDataTabindex(this.activeEle), 10) + 1;
|
|
5490
5498
|
this.activeEle.setAttribute('tabindex', tabIndex.toString());
|
|
5491
5499
|
}
|
|
5492
5500
|
}
|
|
@@ -5629,7 +5637,6 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5629
5637
|
*/
|
|
5630
5638
|
Toolbar.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
5631
5639
|
var tEle = this.element;
|
|
5632
|
-
var wid = tEle.offsetWidth;
|
|
5633
5640
|
this.extendedOpen();
|
|
5634
5641
|
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
5635
5642
|
var prop = _a[_i];
|
|
@@ -5826,10 +5833,6 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5826
5833
|
return Toolbar;
|
|
5827
5834
|
}(Component));
|
|
5828
5835
|
|
|
5829
|
-
/**
|
|
5830
|
-
* Toolbar modules
|
|
5831
|
-
*/
|
|
5832
|
-
|
|
5833
5836
|
var __extends$4 = (undefined && undefined.__extends) || (function () {
|
|
5834
5837
|
var extendStatics = function (d, b) {
|
|
5835
5838
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -5849,7 +5852,6 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
5849
5852
|
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;
|
|
5850
5853
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5851
5854
|
};
|
|
5852
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5853
5855
|
var CLS_ACRDN_ROOT = 'e-acrdn-root';
|
|
5854
5856
|
var CLS_ROOT$2 = 'e-accordion';
|
|
5855
5857
|
var CLS_ITEM$1 = 'e-acrdn-item';
|
|
@@ -6054,7 +6056,7 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
|
|
|
6054
6056
|
if (isNullOrUndefined(this.initExpand)) {
|
|
6055
6057
|
this.initExpand = [];
|
|
6056
6058
|
}
|
|
6057
|
-
if (this.expandedIndices.length > 0) {
|
|
6059
|
+
if (!isNullOrUndefined(this.expandedIndices) && this.expandedIndices.length > 0) {
|
|
6058
6060
|
this.initExpand = this.expandedIndices;
|
|
6059
6061
|
}
|
|
6060
6062
|
};
|
|
@@ -6186,7 +6188,7 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
|
|
|
6186
6188
|
if (!isNullOrUndefined(this.trgtEle)) {
|
|
6187
6189
|
this.ctrlTemplate();
|
|
6188
6190
|
}
|
|
6189
|
-
if (this.dataSource.length > 0) {
|
|
6191
|
+
if (!isNullOrUndefined(this.dataSource) && this.dataSource.length > 0) {
|
|
6190
6192
|
this.dataSource.forEach(function (item, index) {
|
|
6191
6193
|
innerDataSourceItem = _this.renderInnerItem(item, index);
|
|
6192
6194
|
ele.appendChild(innerDataSourceItem);
|
|
@@ -6531,7 +6533,7 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
|
|
|
6531
6533
|
var itemcnt = this.createElement('div', { className: CLS_CONTENT + ' ' + CLS_CTNHIDE, id: getUniqueID('acrdn_panel') });
|
|
6532
6534
|
attributes(itemcnt, { 'aria-hidden': 'true' });
|
|
6533
6535
|
var ctn = this.createElement('div', { className: CLS_CTENT });
|
|
6534
|
-
if (this.dataSource.length > 0) {
|
|
6536
|
+
if (!isNullOrUndefined(this.dataSource) && this.dataSource.length > 0) {
|
|
6535
6537
|
if (this.isReact) {
|
|
6536
6538
|
this.renderReactTemplates();
|
|
6537
6539
|
}
|
|
@@ -7158,7 +7160,7 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
|
|
|
7158
7160
|
setStyleAttribute(this.element, { 'width': formatUnit(newProp.width) });
|
|
7159
7161
|
break;
|
|
7160
7162
|
case 'expandMode':
|
|
7161
|
-
if (newProp.expandMode === 'Single' && this.expandedIndices.length > 1) {
|
|
7163
|
+
if (newProp.expandMode === 'Single' && !isNullOrUndefined(this.expandedIndices) && this.expandedIndices.length > 1) {
|
|
7162
7164
|
this.expandItem(false);
|
|
7163
7165
|
}
|
|
7164
7166
|
break;
|
|
@@ -7166,7 +7168,7 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
|
|
|
7166
7168
|
}
|
|
7167
7169
|
if (isRefresh) {
|
|
7168
7170
|
this.initExpand = [];
|
|
7169
|
-
if (this.expandedIndices.length > 0) {
|
|
7171
|
+
if (!isNullOrUndefined(this.expandedIndices) && this.expandedIndices.length > 0) {
|
|
7170
7172
|
this.initExpand = this.expandedIndices;
|
|
7171
7173
|
}
|
|
7172
7174
|
this.destroyItems();
|
|
@@ -7225,10 +7227,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
|
|
|
7225
7227
|
return Accordion;
|
|
7226
7228
|
}(Component));
|
|
7227
7229
|
|
|
7228
|
-
/**
|
|
7229
|
-
* Accordion all modules
|
|
7230
|
-
*/
|
|
7231
|
-
|
|
7232
7230
|
var __extends$5 = (undefined && undefined.__extends) || (function () {
|
|
7233
7231
|
var extendStatics = function (d, b) {
|
|
7234
7232
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -7248,8 +7246,6 @@ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
7248
7246
|
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;
|
|
7249
7247
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7250
7248
|
};
|
|
7251
|
-
/* eslint-disable @typescript-eslint/triple-slash-reference */
|
|
7252
|
-
/// <reference path='../common/menu-base-model.d.ts'/>
|
|
7253
7249
|
/**
|
|
7254
7250
|
* The ContextMenu is a graphical user interface that appears on the user right click/touch hold operation.
|
|
7255
7251
|
* ```html
|
|
@@ -7359,10 +7355,6 @@ var ContextMenu = /** @__PURE__ @class */ (function (_super) {
|
|
|
7359
7355
|
return ContextMenu;
|
|
7360
7356
|
}(MenuBase));
|
|
7361
7357
|
|
|
7362
|
-
/**
|
|
7363
|
-
* ContextMenu modules
|
|
7364
|
-
*/
|
|
7365
|
-
|
|
7366
7358
|
var __extends$6 = (undefined && undefined.__extends) || (function () {
|
|
7367
7359
|
var extendStatics = function (d, b) {
|
|
7368
7360
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -7382,8 +7374,6 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
7382
7374
|
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;
|
|
7383
7375
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7384
7376
|
};
|
|
7385
|
-
/* eslint-disable @typescript-eslint/triple-slash-reference */
|
|
7386
|
-
/// <reference path='../common/menu-base-model.d.ts'/>
|
|
7387
7377
|
var VMENU = 'e-vertical';
|
|
7388
7378
|
var SCROLLABLE = 'e-scrollable';
|
|
7389
7379
|
var HAMBURGER = 'e-hamburger';
|
|
@@ -7644,10 +7634,6 @@ var Menu = /** @__PURE__ @class */ (function (_super) {
|
|
|
7644
7634
|
return Menu;
|
|
7645
7635
|
}(MenuBase));
|
|
7646
7636
|
|
|
7647
|
-
/**
|
|
7648
|
-
* Menu modules
|
|
7649
|
-
*/
|
|
7650
|
-
|
|
7651
7637
|
var __extends$7 = (undefined && undefined.__extends) || (function () {
|
|
7652
7638
|
var extendStatics = function (d, b) {
|
|
7653
7639
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -8172,7 +8158,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
|
|
|
8172
8158
|
}
|
|
8173
8159
|
}
|
|
8174
8160
|
var tabIndex = isNullOrUndefined(item.tabIndex) ? '-1' : item.tabIndex.toString();
|
|
8175
|
-
var wrapAttrs = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-selected': 'false', 'aria-disabled': 'false' };
|
|
8161
|
+
var wrapAttrs = (item.disabled) ? { role: 'tab', 'aria-disabled': 'true' } : { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-selected': 'false', 'aria-disabled': 'false' };
|
|
8176
8162
|
tCont.appendChild(_this.btnCls.cloneNode(true));
|
|
8177
8163
|
var wrap = _this.createElement('div', { className: CLS_WRAP, attrs: wrapAttrs });
|
|
8178
8164
|
wrap.appendChild(tCont);
|
|
@@ -8583,7 +8569,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
|
|
|
8583
8569
|
}
|
|
8584
8570
|
};
|
|
8585
8571
|
Tab.prototype.setCssClass = function (ele, cls, val) {
|
|
8586
|
-
if (cls === '') {
|
|
8572
|
+
if (cls === '' || isNullOrUndefined(cls)) {
|
|
8587
8573
|
return;
|
|
8588
8574
|
}
|
|
8589
8575
|
var list = cls.split(' ');
|
|
@@ -10094,10 +10080,6 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
|
|
|
10094
10080
|
return Tab;
|
|
10095
10081
|
}(Component));
|
|
10096
10082
|
|
|
10097
|
-
/**
|
|
10098
|
-
* Tab modules
|
|
10099
|
-
*/
|
|
10100
|
-
|
|
10101
10083
|
var __extends$8 = (undefined && undefined.__extends) || (function () {
|
|
10102
10084
|
var extendStatics = function (d, b) {
|
|
10103
10085
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -10302,6 +10284,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10302
10284
|
_this.isInteracted = false;
|
|
10303
10285
|
_this.isRightClick = false;
|
|
10304
10286
|
_this.mouseDownStatus = false;
|
|
10287
|
+
_this.isDropIn = false;
|
|
10305
10288
|
return _this;
|
|
10306
10289
|
}
|
|
10307
10290
|
TreeView_1 = TreeView;
|
|
@@ -10470,7 +10453,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10470
10453
|
TreeView.prototype.templateComplier = function (template) {
|
|
10471
10454
|
if (template) {
|
|
10472
10455
|
this.hasTemplate = true;
|
|
10473
|
-
// eslint-disable-next-line
|
|
10474
10456
|
this.element.classList.add(INTERACTION);
|
|
10475
10457
|
try {
|
|
10476
10458
|
if (typeof template !== 'function' && document.querySelectorAll(template).length) {
|
|
@@ -10494,7 +10476,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10494
10476
|
this.isOffline = this.fields.dataSource.dataSource.offline;
|
|
10495
10477
|
if (this.fields.dataSource.ready) {
|
|
10496
10478
|
this.fields.dataSource.ready.then(function (e) {
|
|
10497
|
-
/* eslint-disable */
|
|
10498
10479
|
_this.isOffline = _this.fields.dataSource.dataSource.offline;
|
|
10499
10480
|
if (_this.fields.dataSource instanceof DataManager && _this.isOffline) {
|
|
10500
10481
|
_this.treeList.pop();
|
|
@@ -10554,13 +10535,13 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10554
10535
|
var prop = this.getActualProperties(mapper);
|
|
10555
10536
|
for (var _i = 0, _a = Object.keys(prop); _i < _a.length; _i++) {
|
|
10556
10537
|
var col = _a[_i];
|
|
10557
|
-
if (col !== 'dataSource' && col !== 'tableName' && col !== 'child' && !!mapper[col]
|
|
10558
|
-
&& col !== 'url' && columns.indexOf(mapper[col]) === -1) {
|
|
10559
|
-
columns.push(mapper[col]);
|
|
10538
|
+
if (col !== 'dataSource' && col !== 'tableName' && col !== 'child' && !!mapper["" + col]
|
|
10539
|
+
&& col !== 'url' && columns.indexOf(mapper["" + col]) === -1) {
|
|
10540
|
+
columns.push(mapper["" + col]);
|
|
10560
10541
|
}
|
|
10561
10542
|
}
|
|
10562
10543
|
query.select(columns);
|
|
10563
|
-
if (
|
|
10544
|
+
if (Object.prototype.hasOwnProperty.call(prop, 'tableName')) {
|
|
10564
10545
|
query.from(mapper.tableName);
|
|
10565
10546
|
}
|
|
10566
10547
|
}
|
|
@@ -10601,7 +10582,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10601
10582
|
}
|
|
10602
10583
|
};
|
|
10603
10584
|
TreeView.prototype.renderItems = function (isSorted) {
|
|
10604
|
-
/* eslint-disable */
|
|
10605
10585
|
this.listBaseOption.ariaAttributes.level = 1;
|
|
10606
10586
|
var sortedData = this.getSortedData(this.rootData);
|
|
10607
10587
|
this.ulElement = ListBase.createList(this.createElement, isSorted ? this.rootData : sortedData, this.listBaseOption);
|
|
@@ -10610,7 +10590,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10610
10590
|
if (this.loadOnDemand === false) {
|
|
10611
10591
|
var i = 0;
|
|
10612
10592
|
while (i < rootNodes.length) {
|
|
10613
|
-
this.renderChildNodes(rootNodes[i], true, null, true);
|
|
10593
|
+
this.renderChildNodes(rootNodes[parseInt(i.toString(), 10)], true, null, true);
|
|
10614
10594
|
i++;
|
|
10615
10595
|
}
|
|
10616
10596
|
}
|
|
@@ -10627,25 +10607,30 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10627
10607
|
};
|
|
10628
10608
|
/**
|
|
10629
10609
|
* Update the checkedNodes from datasource at initial rendering
|
|
10610
|
+
*
|
|
10611
|
+
* @returns {void}
|
|
10630
10612
|
*/
|
|
10631
|
-
TreeView.prototype.updateCheckedStateFromDS = function (
|
|
10613
|
+
TreeView.prototype.updateCheckedStateFromDS = function () {
|
|
10632
10614
|
this.validNodes = [];
|
|
10633
10615
|
if (this.treeData && this.showCheckBox) {
|
|
10634
10616
|
if (this.dataType === 1) {
|
|
10635
10617
|
var mapper = this.fields;
|
|
10636
10618
|
var resultData = new DataManager(this.treeData).executeLocal(new Query().where(mapper.isChecked, 'equal', true, false));
|
|
10637
10619
|
for (var i = 0; i < resultData.length; i++) {
|
|
10638
|
-
var resultId = resultData[i
|
|
10639
|
-
|
|
10620
|
+
var resultId = resultData[parseInt(i.toString(), 10)][this.fields.id]
|
|
10621
|
+
? resultData[parseInt(i.toString(), 10)][this.fields.id].toString()
|
|
10622
|
+
: null;
|
|
10640
10623
|
if (this.checkedNodes.indexOf(resultId) === -1 && !(this.isLoaded)) {
|
|
10641
10624
|
this.checkedNodes.push(resultId);
|
|
10642
10625
|
}
|
|
10643
|
-
if (resultData[i][this.fields.hasChildren]) {
|
|
10644
|
-
var
|
|
10626
|
+
if (resultData[parseInt(i.toString(), 10)][this.fields.hasChildren]) {
|
|
10627
|
+
var id = resultData[parseInt(i.toString(), 10)][this.fields.id];
|
|
10645
10628
|
var childData = new DataManager(this.treeData).
|
|
10646
|
-
executeLocal(new Query().where(mapper.parentID, 'equal',
|
|
10629
|
+
executeLocal(new Query().where(mapper.parentID, 'equal', id, false));
|
|
10647
10630
|
for (var child = 0; child < childData.length; child++) {
|
|
10648
|
-
var childId = childData[child
|
|
10631
|
+
var childId = childData[parseInt(child.toString(), 10)][this.fields.id]
|
|
10632
|
+
? childData[parseInt(child.toString(), 10)][this.fields.id].toString()
|
|
10633
|
+
: null;
|
|
10649
10634
|
if (this.checkedNodes.indexOf(childId) === -1 && this.autoCheck) {
|
|
10650
10635
|
this.checkedNodes.push(childId);
|
|
10651
10636
|
}
|
|
@@ -10655,7 +10640,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10655
10640
|
for (var i = 0; i < this.checkedNodes.length; i++) {
|
|
10656
10641
|
var mapper_1 = this.fields;
|
|
10657
10642
|
var checkState = new DataManager(this.treeData).
|
|
10658
|
-
executeLocal(new Query().where(mapper_1.id, 'equal', this.checkedNodes[i], true));
|
|
10643
|
+
executeLocal(new Query().where(mapper_1.id, 'equal', this.checkedNodes[parseInt(i.toString(), 10)], true));
|
|
10659
10644
|
if (checkState[0] && this.autoCheck) {
|
|
10660
10645
|
this.getCheckedNodeDetails(mapper_1, checkState);
|
|
10661
10646
|
this.checkIndeterminateState(checkState[0]);
|
|
@@ -10667,9 +10652,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10667
10652
|
}
|
|
10668
10653
|
}
|
|
10669
10654
|
var checkedData = new DataManager(this.treeData).
|
|
10670
|
-
executeLocal(new Query().where(mapper_1.parentID, 'equal', this.checkedNodes[i], true));
|
|
10655
|
+
executeLocal(new Query().where(mapper_1.parentID, 'equal', this.checkedNodes[parseInt(i.toString(), 10)], true));
|
|
10671
10656
|
for (var index = 0; index < checkedData.length; index++) {
|
|
10672
|
-
var checkedId = checkedData[index
|
|
10657
|
+
var checkedId = checkedData[parseInt(index.toString(), 10)][this.fields.id]
|
|
10658
|
+
? checkedData[parseInt(index.toString(), 10)][this.fields.id].toString()
|
|
10659
|
+
: null;
|
|
10673
10660
|
if (this.checkedNodes.indexOf(checkedId) === -1 && this.autoCheck) {
|
|
10674
10661
|
this.checkedNodes.push(checkedId);
|
|
10675
10662
|
}
|
|
@@ -10682,16 +10669,17 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10682
10669
|
else if (this.dataType === 2 || (this.fields.dataSource instanceof DataManager &&
|
|
10683
10670
|
this.isOffline)) {
|
|
10684
10671
|
for (var index = 0; index < this.treeData.length; index++) {
|
|
10685
|
-
var fieldId = this.treeData[index][this.fields.id] ? this.treeData[index][this.fields.id].toString() : '';
|
|
10686
|
-
if (this.treeData[index][this.fields.isChecked] &&
|
|
10672
|
+
var fieldId = this.treeData[parseInt(index.toString(), 10)][this.fields.id] ? this.treeData[parseInt(index.toString(), 10)][this.fields.id].toString() : '';
|
|
10673
|
+
if (this.treeData[parseInt(index.toString(), 10)][this.fields.isChecked] &&
|
|
10674
|
+
!(this.isLoaded) && this.checkedNodes.indexOf(fieldId) === -1) {
|
|
10687
10675
|
this.checkedNodes.push(fieldId);
|
|
10688
10676
|
}
|
|
10689
10677
|
if (this.checkedNodes.indexOf(fieldId) > -1 && this.validNodes.indexOf(fieldId) === -1) {
|
|
10690
10678
|
this.validNodes.push(fieldId);
|
|
10691
10679
|
}
|
|
10692
|
-
var childItems = getValue(this.fields.child.toString(), this.treeData[index]);
|
|
10680
|
+
var childItems = getValue(this.fields.child.toString(), this.treeData[parseInt(index.toString(), 10)]);
|
|
10693
10681
|
if (childItems) {
|
|
10694
|
-
this.updateChildCheckState(childItems, this.treeData[index]);
|
|
10682
|
+
this.updateChildCheckState(childItems, this.treeData[parseInt(index.toString(), 10)]);
|
|
10695
10683
|
}
|
|
10696
10684
|
}
|
|
10697
10685
|
this.validNodes = (this.enablePersistence) ? this.checkedNodes : this.validNodes;
|
|
@@ -10701,6 +10689,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10701
10689
|
};
|
|
10702
10690
|
/**
|
|
10703
10691
|
* To check whether the list data has sub child and to change the parent check state accordingly
|
|
10692
|
+
*
|
|
10693
|
+
* @param {FieldsSettingsModel} mapper - The mapper object containing field settings.
|
|
10694
|
+
* @param {Object[]} checkNodes - The array of checked nodes.
|
|
10695
|
+
* @returns {void}
|
|
10696
|
+
* @private
|
|
10704
10697
|
*/
|
|
10705
10698
|
TreeView.prototype.getCheckedNodeDetails = function (mapper, checkNodes) {
|
|
10706
10699
|
var id = checkNodes[0][this.fields.parentID] ? checkNodes[0][this.fields.parentID].toString() : null;
|
|
@@ -10708,13 +10701,14 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10708
10701
|
var element = this.element.querySelector('[data-uid="' + checkNodes[0][this.fields.id] + '"]');
|
|
10709
10702
|
var parentEle = this.element.querySelector('[data-uid="' + checkNodes[0][this.fields.parentID] + '"]');
|
|
10710
10703
|
if (!element && !parentEle) {
|
|
10711
|
-
var len = this.parentNodeCheck.length;
|
|
10712
10704
|
if (this.parentNodeCheck.indexOf(id) === -1) {
|
|
10713
10705
|
this.parentNodeCheck.push(id);
|
|
10714
10706
|
}
|
|
10715
10707
|
var childNodes = this.getChildNodes(this.treeData, id);
|
|
10716
10708
|
for (var i = 0; i < childNodes.length; i++) {
|
|
10717
|
-
var childId = childNodes[i
|
|
10709
|
+
var childId = childNodes[parseInt(i.toString(), 10)][this.fields.id]
|
|
10710
|
+
? childNodes[parseInt(i.toString(), 10)][this.fields.id].toString()
|
|
10711
|
+
: null;
|
|
10718
10712
|
if (this.checkedNodes.indexOf(childId) !== -1) {
|
|
10719
10713
|
count++;
|
|
10720
10714
|
}
|
|
@@ -10735,12 +10729,15 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10735
10729
|
};
|
|
10736
10730
|
/**
|
|
10737
10731
|
* Update the checkedNodes and parent state when all the child Nodes are in checkedstate at initial rendering
|
|
10732
|
+
*
|
|
10733
|
+
* @returns {void}
|
|
10734
|
+
* @private
|
|
10738
10735
|
*/
|
|
10739
10736
|
TreeView.prototype.updateParentCheckState = function () {
|
|
10740
10737
|
var indeterminate = selectAll('.' + INDETERMINATE, this.element);
|
|
10741
10738
|
var childCheckedElement;
|
|
10742
10739
|
for (var i = 0; i < indeterminate.length; i++) {
|
|
10743
|
-
var node = closest(indeterminate[i], '.' + LISTITEM);
|
|
10740
|
+
var node = closest(indeterminate[parseInt(i.toString(), 10)], '.' + LISTITEM);
|
|
10744
10741
|
var nodeId = node.getAttribute('data-uid').toString();
|
|
10745
10742
|
if (this.dataType === 1) {
|
|
10746
10743
|
childCheckedElement = new DataManager(this.treeData).
|
|
@@ -10752,7 +10749,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10752
10749
|
var count = 0;
|
|
10753
10750
|
if (childCheckedElement) {
|
|
10754
10751
|
for (var j = 0; j < childCheckedElement.length; j++) {
|
|
10755
|
-
var childId = childCheckedElement[j][this.fields.id].toString();
|
|
10752
|
+
var childId = childCheckedElement[parseInt(j.toString(), 10)][this.fields.id].toString();
|
|
10756
10753
|
if (this.checkedNodes.indexOf(childId) !== -1) {
|
|
10757
10754
|
count++;
|
|
10758
10755
|
}
|
|
@@ -10772,6 +10769,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10772
10769
|
};
|
|
10773
10770
|
/**
|
|
10774
10771
|
* Change the parent to indeterminate state whenever the child is in checked state which is not rendered in DOM
|
|
10772
|
+
*
|
|
10773
|
+
* @param {Object} data - The data object to check for indeterminate state.
|
|
10774
|
+
* @returns {void}
|
|
10775
|
+
* @private
|
|
10775
10776
|
*/
|
|
10776
10777
|
TreeView.prototype.checkIndeterminateState = function (data) {
|
|
10777
10778
|
var element;
|
|
@@ -10788,7 +10789,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10788
10789
|
}
|
|
10789
10790
|
}
|
|
10790
10791
|
else if (this.dataType === 2) {
|
|
10791
|
-
var len = this.parentNodeCheck.length;
|
|
10792
10792
|
if (this.parentNodeCheck.indexOf(data[this.fields.id].toString()) === -1) {
|
|
10793
10793
|
this.parentNodeCheck.push(data[this.fields.id].toString());
|
|
10794
10794
|
}
|
|
@@ -10796,13 +10796,19 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10796
10796
|
};
|
|
10797
10797
|
/**
|
|
10798
10798
|
* Update the checkedNodes for child and subchild from datasource (hierarchical datasource) at initial rendering
|
|
10799
|
+
*
|
|
10800
|
+
* @param {Object[]} childItems - The array of child items to update the checked state.
|
|
10801
|
+
* @param {Object} treeData - The tree data object containing field values.
|
|
10802
|
+
* @returns {void}
|
|
10803
|
+
* @private
|
|
10799
10804
|
*/
|
|
10800
10805
|
TreeView.prototype.updateChildCheckState = function (childItems, treeData) {
|
|
10801
10806
|
var count = 0;
|
|
10802
10807
|
var checkedParent = treeData[this.fields.id] ? treeData[this.fields.id].toString() : '';
|
|
10803
10808
|
for (var index = 0; index < childItems.length; index++) {
|
|
10804
|
-
var checkedChild = childItems[index][this.fields.id] ? childItems[index][this.fields.id].toString() : '';
|
|
10805
|
-
if (childItems[index][this.fields.isChecked] &&
|
|
10809
|
+
var checkedChild = childItems[parseInt(index.toString(), 10)][this.fields.id] ? childItems[parseInt(index.toString(), 10)][this.fields.id].toString() : '';
|
|
10810
|
+
if (childItems[parseInt(index.toString(), 10)][this.fields.isChecked] &&
|
|
10811
|
+
!(this.isLoaded) && this.checkedNodes.indexOf(checkedChild) === -1) {
|
|
10806
10812
|
this.checkedNodes.push(checkedChild);
|
|
10807
10813
|
}
|
|
10808
10814
|
if (this.checkedNodes.indexOf(checkedParent) !== -1 && this.checkedNodes.indexOf(checkedChild) === -1 && this.autoCheck) {
|
|
@@ -10814,11 +10820,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10814
10820
|
if (this.checkedNodes.indexOf(checkedChild) > -1 && this.validNodes.indexOf(checkedChild) === -1) {
|
|
10815
10821
|
this.validNodes.push(checkedChild);
|
|
10816
10822
|
}
|
|
10817
|
-
var subChildItems = getValue(this.fields.child.toString(), childItems[index]);
|
|
10823
|
+
var subChildItems = getValue(this.fields.child.toString(), childItems[parseInt(index.toString(), 10)]);
|
|
10818
10824
|
if (subChildItems && subChildItems.length) {
|
|
10819
|
-
if (this.parentCheckData.indexOf(treeData) === -1)
|
|
10825
|
+
if (this.parentCheckData.indexOf(treeData) === -1) {
|
|
10820
10826
|
this.parentCheckData.push(treeData);
|
|
10821
|
-
|
|
10827
|
+
}
|
|
10828
|
+
this.updateChildCheckState(subChildItems, childItems[parseInt(index.toString(), 10)]);
|
|
10822
10829
|
}
|
|
10823
10830
|
if (count === childItems.length && this.autoCheck && this.checkedNodes.indexOf(checkedParent) === -1) {
|
|
10824
10831
|
this.checkedNodes.push(checkedParent);
|
|
@@ -10827,8 +10834,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10827
10834
|
if (count !== 0 && this.autoCheck) {
|
|
10828
10835
|
this.checkIndeterminateState(treeData);
|
|
10829
10836
|
for (var len = 0; len < this.parentCheckData.length; len++) {
|
|
10830
|
-
if ((treeData !== this.parentCheckData[len
|
|
10831
|
-
|
|
10837
|
+
if ((treeData !== this.parentCheckData[parseInt(len.toString(), 10)]) &&
|
|
10838
|
+
(this.parentCheckData[parseInt(len.toString(), 10)])) {
|
|
10839
|
+
this.checkIndeterminateState(this.parentCheckData[parseInt(len.toString(), 10)]);
|
|
10832
10840
|
}
|
|
10833
10841
|
}
|
|
10834
10842
|
}
|
|
@@ -10845,23 +10853,14 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10845
10853
|
select('.' + CHECKBOXFRAME, checkboxEle).classList.add(CHECK);
|
|
10846
10854
|
e.item.setAttribute('aria-checked', 'true');
|
|
10847
10855
|
this.addCheck(e.item);
|
|
10848
|
-
if (Browser.userAgent.indexOf("Edg") > -1) {
|
|
10849
|
-
checkboxEle.setAttribute('aria-label', "checked");
|
|
10850
|
-
}
|
|
10851
10856
|
}
|
|
10852
10857
|
else if (!isNullOrUndefined(checkValue) && checkValue.toString() === 'true') {
|
|
10853
10858
|
select('.' + CHECKBOXFRAME, checkboxEle).classList.add(CHECK);
|
|
10854
10859
|
e.item.setAttribute('aria-checked', 'true');
|
|
10855
10860
|
this.addCheck(e.item);
|
|
10856
|
-
if (Browser.userAgent.indexOf("Edg") > -1) {
|
|
10857
|
-
checkboxEle.setAttribute('aria-label', "checked");
|
|
10858
|
-
}
|
|
10859
10861
|
}
|
|
10860
10862
|
else {
|
|
10861
10863
|
e.item.setAttribute('aria-checked', 'false');
|
|
10862
|
-
if (Browser.userAgent.indexOf("Edg") > -1) {
|
|
10863
|
-
checkboxEle.setAttribute('aria-label', "unchecked");
|
|
10864
|
-
}
|
|
10865
10864
|
}
|
|
10866
10865
|
var frame = select('.' + CHECKBOXFRAME, checkboxEle);
|
|
10867
10866
|
EventHandler.add(frame, 'mousedown', this.frameMouseHandler, this);
|
|
@@ -10876,7 +10875,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10876
10875
|
var fields = e.fields;
|
|
10877
10876
|
this.addActionClass(e, fields.selected, SELECTED$1);
|
|
10878
10877
|
this.addActionClass(e, fields.expanded, EXPANDED);
|
|
10879
|
-
e.item.setAttribute(
|
|
10878
|
+
e.item.setAttribute('tabindex', '-1');
|
|
10880
10879
|
EventHandler.add(e.item, 'focus', this.focusIn, this);
|
|
10881
10880
|
if (!isNullOrUndefined(this.nodeTemplateFn)) {
|
|
10882
10881
|
var textEle = e.item.querySelector('.' + LISTTEXT);
|
|
@@ -10887,7 +10886,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10887
10886
|
var eventArgs = {
|
|
10888
10887
|
node: e.item,
|
|
10889
10888
|
nodeData: e.curData,
|
|
10890
|
-
text: e.text
|
|
10889
|
+
text: e.text
|
|
10891
10890
|
};
|
|
10892
10891
|
if (!this.isRefreshed) {
|
|
10893
10892
|
this.trigger('drawNode', eventArgs);
|
|
@@ -10912,24 +10911,25 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10912
10911
|
if (this.fields.dataSource instanceof DataManager) {
|
|
10913
10912
|
for (var i = 0; i < ds.length; i++) {
|
|
10914
10913
|
if (this.isOffline) {
|
|
10915
|
-
if ((typeof mapper.child === 'string') && isNullOrUndefined(getValue(mapper.child, ds[i])) && !isNullOrUndefined(getValue(mapper.parentID, ds[i]))) {
|
|
10914
|
+
if ((typeof mapper.child === 'string') && isNullOrUndefined(getValue(mapper.child, ds[parseInt(i.toString(), 10)])) && !isNullOrUndefined(getValue(mapper.parentID, ds[parseInt(i.toString(), 10)]))) {
|
|
10916
10915
|
return 1;
|
|
10917
10916
|
}
|
|
10918
10917
|
}
|
|
10919
|
-
else if ((typeof mapper.child === 'string') && isNullOrUndefined(getValue(mapper.child, ds[i]))) {
|
|
10918
|
+
else if ((typeof mapper.child === 'string') && isNullOrUndefined(getValue(mapper.child, ds[parseInt(i.toString(), 10)]))) {
|
|
10920
10919
|
return 1;
|
|
10921
10920
|
}
|
|
10922
10921
|
}
|
|
10923
10922
|
return 2;
|
|
10924
10923
|
}
|
|
10925
10924
|
for (var i = 0, len = ds.length; i < len; i++) {
|
|
10926
|
-
if ((typeof mapper.child === 'string') && !isNullOrUndefined(getValue(mapper.child, ds[i]))) {
|
|
10925
|
+
if ((typeof mapper.child === 'string') && !isNullOrUndefined(getValue(mapper.child, ds[parseInt(i.toString(), 10)]))) {
|
|
10927
10926
|
return 2;
|
|
10928
10927
|
}
|
|
10929
10928
|
if (this.isChildObject()) {
|
|
10930
10929
|
return 2;
|
|
10931
10930
|
}
|
|
10932
|
-
if (!isNullOrUndefined(getValue(mapper.parentID, ds[i
|
|
10931
|
+
if (!isNullOrUndefined(getValue(mapper.parentID, ds[parseInt(i.toString(), 10)])) ||
|
|
10932
|
+
!isNullOrUndefined(getValue(mapper.hasChildren, ds[parseInt(i.toString(), 10)]))) {
|
|
10933
10933
|
return 1;
|
|
10934
10934
|
}
|
|
10935
10935
|
}
|
|
@@ -10940,7 +10940,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10940
10940
|
var ds = ListBase.getDataSource(dataSource, cusQuery);
|
|
10941
10941
|
var grpItem = [];
|
|
10942
10942
|
for (var j = 0; j < ds.length; j++) {
|
|
10943
|
-
var itemObj = ds[j].items;
|
|
10943
|
+
var itemObj = ds[parseInt(j.toString(), 10)].items;
|
|
10944
10944
|
grpItem.push(itemObj);
|
|
10945
10945
|
}
|
|
10946
10946
|
return grpItem;
|
|
@@ -10955,30 +10955,32 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10955
10955
|
var _this = this;
|
|
10956
10956
|
var iNodes = selectAll('.' + IMAGE, element);
|
|
10957
10957
|
for (var k = 0; k < iNodes.length; k++) {
|
|
10958
|
-
iNodes[k].setAttribute('alt', IMAGE);
|
|
10958
|
+
iNodes[parseInt(k.toString(), 10)].setAttribute('alt', IMAGE);
|
|
10959
10959
|
}
|
|
10960
10960
|
if (this.isLoaded) {
|
|
10961
10961
|
var sNodes = selectAll('.' + SELECTED$1, element);
|
|
10962
10962
|
for (var i = 0; i < sNodes.length; i++) {
|
|
10963
|
-
this.selectNode(sNodes[i], null);
|
|
10963
|
+
this.selectNode(sNodes[parseInt(i.toString(), 10)], null);
|
|
10964
10964
|
break;
|
|
10965
10965
|
}
|
|
10966
10966
|
removeClass(sNodes, SELECTED$1);
|
|
10967
10967
|
}
|
|
10968
10968
|
var cNodes = selectAll('.' + LISTITEM + ':not(.' + EXPANDED + ')', element);
|
|
10969
10969
|
for (var j = 0; j < cNodes.length; j++) {
|
|
10970
|
-
var icon = select('div.' + ICON, cNodes[j]);
|
|
10970
|
+
var icon = select('div.' + ICON, cNodes[parseInt(j.toString(), 10)]);
|
|
10971
10971
|
if (icon && icon.classList.contains(EXPANDABLE)) {
|
|
10972
|
-
this.disableExpandAttr(cNodes[j]);
|
|
10972
|
+
this.disableExpandAttr(cNodes[parseInt(j.toString(), 10)]);
|
|
10973
10973
|
}
|
|
10974
10974
|
}
|
|
10975
10975
|
var eNodes = selectAll('.' + EXPANDED, element);
|
|
10976
10976
|
if (!this.loadOnDemand && this.fields.dataSource instanceof DataManager) {
|
|
10977
|
-
this.isInitalExpand = this.treeData.filter(function (e) { return e[_this.fields.expanded]
|
|
10977
|
+
this.isInitalExpand = this.treeData.filter(function (e) { return e[_this.fields.expanded] === true; }).length > 0
|
|
10978
|
+
? true
|
|
10979
|
+
: this.isInitalExpand;
|
|
10978
10980
|
}
|
|
10979
10981
|
if (!this.isInitalExpand) {
|
|
10980
10982
|
for (var i = 0; i < eNodes.length; i++) {
|
|
10981
|
-
this.renderChildNodes(eNodes[i]);
|
|
10983
|
+
this.renderChildNodes(eNodes[parseInt(i.toString(), 10)]);
|
|
10982
10984
|
}
|
|
10983
10985
|
}
|
|
10984
10986
|
removeClass(eNodes, EXPANDED);
|
|
@@ -10998,13 +11000,13 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10998
11000
|
var liElement = selectAll('li', this.element);
|
|
10999
11001
|
var ulElement = void 0;
|
|
11000
11002
|
for (var i = 0; i < liElement.length; i++) {
|
|
11001
|
-
if (liElement[i].classList.contains(LISTITEM)) {
|
|
11002
|
-
ulElement = select('.' + PARENTITEM, liElement[i]);
|
|
11003
|
+
if (liElement[parseInt(i.toString(), 10)].classList.contains(LISTITEM)) {
|
|
11004
|
+
ulElement = select('.' + PARENTITEM, liElement[parseInt(i.toString(), 10)]);
|
|
11003
11005
|
if (ulElement) {
|
|
11004
|
-
this.ensureParentCheckState(liElement[i]);
|
|
11006
|
+
this.ensureParentCheckState(liElement[parseInt(i.toString(), 10)]);
|
|
11005
11007
|
}
|
|
11006
11008
|
else {
|
|
11007
|
-
this.ensureChildCheckState(liElement[i]);
|
|
11009
|
+
this.ensureChildCheckState(liElement[parseInt(i.toString(), 10)]);
|
|
11008
11010
|
}
|
|
11009
11011
|
}
|
|
11010
11012
|
}
|
|
@@ -11012,7 +11014,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11012
11014
|
else {
|
|
11013
11015
|
var indeterminate = selectAll('.' + INDETERMINATE, this.element);
|
|
11014
11016
|
for (var i = 0; i < indeterminate.length; i++) {
|
|
11015
|
-
indeterminate[i].classList.remove(INDETERMINATE);
|
|
11017
|
+
indeterminate[parseInt(i.toString(), 10)].classList.remove(INDETERMINATE);
|
|
11016
11018
|
}
|
|
11017
11019
|
}
|
|
11018
11020
|
};
|
|
@@ -11054,12 +11056,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11054
11056
|
var isChecked = element.getElementsByClassName(CHECKBOXFRAME)[0].classList.contains(CHECK);
|
|
11055
11057
|
var parentCheck = element.getElementsByClassName(CHECKBOXFRAME)[0].classList.contains(INDETERMINATE);
|
|
11056
11058
|
var childCheck = childElement.querySelectorAll('li');
|
|
11057
|
-
var expandState = childElement.parentElement.getAttribute('aria-expanded');
|
|
11058
11059
|
var checkedState = void 0;
|
|
11059
11060
|
for (var index = 0; index < checkBoxes.length; index++) {
|
|
11060
|
-
var childId = childCheck[index].getAttribute('data-uid');
|
|
11061
|
-
if (!isNullOrUndefined(this.currentLoadData) &&
|
|
11062
|
-
|
|
11061
|
+
var childId = childCheck[parseInt(index.toString(), 10)].getAttribute('data-uid');
|
|
11062
|
+
if (!isNullOrUndefined(this.currentLoadData) &&
|
|
11063
|
+
!isNullOrUndefined(getValue(this.fields.isChecked, this.currentLoadData[parseInt(index.toString(), 10)]))) {
|
|
11064
|
+
checkedState = getValue(this.fields.isChecked, this.currentLoadData[parseInt(index.toString(), 10)]) ? 'check' : 'uncheck';
|
|
11063
11065
|
if (this.ele !== -1) {
|
|
11064
11066
|
checkedState = isChecked ? 'check' : 'uncheck';
|
|
11065
11067
|
}
|
|
@@ -11070,7 +11072,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11070
11072
|
}
|
|
11071
11073
|
}
|
|
11072
11074
|
else {
|
|
11073
|
-
var isNodeChecked = checkBoxes[index
|
|
11075
|
+
var isNodeChecked = checkBoxes[parseInt(index.toString(), 10)]
|
|
11076
|
+
.getElementsByClassName(CHECKBOXFRAME)[0]
|
|
11077
|
+
.classList.contains(CHECK);
|
|
11074
11078
|
if (isChecked) {
|
|
11075
11079
|
checkedState = 'check';
|
|
11076
11080
|
}
|
|
@@ -11080,8 +11084,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11080
11084
|
else if (this.checkedNodes.indexOf(childId) !== -1 && this.isLoaded && (parentCheck || isChecked)) {
|
|
11081
11085
|
checkedState = 'check';
|
|
11082
11086
|
}
|
|
11083
|
-
else if (childCheck[index].classList.contains(CHILD) &&
|
|
11084
|
-
|
|
11087
|
+
else if (childCheck[parseInt(index.toString(), 10)].classList.contains(CHILD) &&
|
|
11088
|
+
(!isUndefined(this.parentNodeCheck) && this.autoCheck
|
|
11089
|
+
&& (isChecked || parentCheck) && this.parentNodeCheck.indexOf(childId) !== -1)) {
|
|
11085
11090
|
checkedState = 'indeterminate';
|
|
11086
11091
|
this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(childId), 1);
|
|
11087
11092
|
}
|
|
@@ -11094,7 +11099,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11094
11099
|
checkedState = 'uncheck';
|
|
11095
11100
|
}
|
|
11096
11101
|
}
|
|
11097
|
-
this.changeState(checkBoxes[index], checkedState, e, true, true);
|
|
11102
|
+
this.changeState(checkBoxes[parseInt(index.toString(), 10)], checkedState, e, true, true);
|
|
11098
11103
|
}
|
|
11099
11104
|
}
|
|
11100
11105
|
if (this.autoCheck && this.isLoaded) {
|
|
@@ -11103,13 +11108,15 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11103
11108
|
}
|
|
11104
11109
|
};
|
|
11105
11110
|
TreeView.prototype.doCheckBoxAction = function (nodes, doCheck) {
|
|
11106
|
-
var li = selectAll('.' + LISTITEM, this.element);
|
|
11107
11111
|
if (!isNullOrUndefined(nodes)) {
|
|
11108
11112
|
for (var len = nodes.length - 1; len >= 0; len--) {
|
|
11109
|
-
var liEle = this.getElement(nodes[len]);
|
|
11113
|
+
var liEle = this.getElement(nodes[parseInt(len.toString(), 10)]);
|
|
11110
11114
|
if (isNullOrUndefined(liEle)) {
|
|
11111
|
-
var node =
|
|
11112
|
-
|
|
11115
|
+
var node = nodes[len - (nodes.length - 1)]
|
|
11116
|
+
? nodes[len - (nodes.length - 1)].toString()
|
|
11117
|
+
: nodes[parseInt(len.toString(), 10)]
|
|
11118
|
+
? nodes[parseInt(len.toString(), 10)].toString()
|
|
11119
|
+
: null;
|
|
11113
11120
|
if (node !== '' && doCheck && node) {
|
|
11114
11121
|
this.setValidCheckedNode(node);
|
|
11115
11122
|
this.dynamicCheckState(node, doCheck);
|
|
@@ -11119,7 +11126,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11119
11126
|
var childItems = this.getChildNodes(this.treeData, node);
|
|
11120
11127
|
if (childItems) {
|
|
11121
11128
|
for (var i = 0; i < childItems.length; i++) {
|
|
11122
|
-
var id = childItems[i
|
|
11129
|
+
var id = childItems[parseInt(i.toString(), 10)][this.fields.id]
|
|
11130
|
+
? childItems[parseInt(i.toString(), 10)][this.fields.id].toString()
|
|
11131
|
+
: null;
|
|
11123
11132
|
if (this.checkedNodes.indexOf(id) !== -1) {
|
|
11124
11133
|
this.checkedNodes.splice(this.checkedNodes.indexOf(id), 1);
|
|
11125
11134
|
var ele = this.element.querySelector('[data-uid="' + id + '"]');
|
|
@@ -11147,20 +11156,20 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11147
11156
|
var checkBoxes = selectAll('.' + CHECKBOXWRAP, this.element);
|
|
11148
11157
|
if (this.loadOnDemand) {
|
|
11149
11158
|
for (var index = 0; index < checkBoxes.length; index++) {
|
|
11150
|
-
this.updateFieldChecked(checkBoxes[index], doCheck);
|
|
11151
|
-
this.changeState(checkBoxes[index], doCheck ? 'check' : 'uncheck', null, null, null, doCheck);
|
|
11159
|
+
this.updateFieldChecked(checkBoxes[parseInt(index.toString(), 10)], doCheck);
|
|
11160
|
+
this.changeState(checkBoxes[parseInt(index.toString(), 10)], doCheck ? 'check' : 'uncheck', null, null, null, doCheck);
|
|
11152
11161
|
}
|
|
11153
11162
|
}
|
|
11154
11163
|
else {
|
|
11155
11164
|
for (var index = 0; index < checkBoxes.length; index++) {
|
|
11156
|
-
this.updateFieldChecked(checkBoxes[index], doCheck);
|
|
11157
|
-
this.changeState(checkBoxes[index], doCheck ? 'check' : 'uncheck');
|
|
11165
|
+
this.updateFieldChecked(checkBoxes[parseInt(index.toString(), 10)], doCheck);
|
|
11166
|
+
this.changeState(checkBoxes[parseInt(index.toString(), 10)], doCheck ? 'check' : 'uncheck');
|
|
11158
11167
|
}
|
|
11159
11168
|
}
|
|
11160
11169
|
}
|
|
11161
11170
|
if (nodes) {
|
|
11162
11171
|
for (var j = 0; j < nodes.length - 1; j++) {
|
|
11163
|
-
var node = nodes[j] ? nodes[j].toString() : '';
|
|
11172
|
+
var node = nodes[parseInt(j.toString(), 10)] ? nodes[parseInt(j.toString(), 10)].toString() : '';
|
|
11164
11173
|
if (!doCheck) {
|
|
11165
11174
|
this.updateField(this.treeData, this.fields, node, 'isChecked', null);
|
|
11166
11175
|
}
|
|
@@ -11180,6 +11189,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11180
11189
|
};
|
|
11181
11190
|
/**
|
|
11182
11191
|
* Changes the parent and child check state while changing the checkedNodes via setmodel
|
|
11192
|
+
*
|
|
11193
|
+
* @param {string} node - The unique identifier of the node.
|
|
11194
|
+
* @param {boolean} doCheck - A boolean value indicating whether to check or uncheck the node.
|
|
11195
|
+
* @returns {void}
|
|
11196
|
+
* @private
|
|
11183
11197
|
*/
|
|
11184
11198
|
TreeView.prototype.dynamicCheckState = function (node, doCheck) {
|
|
11185
11199
|
if (this.dataType === 1) {
|
|
@@ -11189,13 +11203,13 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11189
11203
|
var id = resultId[0][this.fields.id] ? resultId[0][this.fields.id].toString() : null;
|
|
11190
11204
|
var parent_1 = resultId[0][this.fields.parentID] ? resultId[0][this.fields.parentID].toString() : null;
|
|
11191
11205
|
var parentElement = this.element.querySelector('[data-uid="' + parent_1 + '"]');
|
|
11192
|
-
var indeterminate = parentElement ? select('.' + INDETERMINATE, parentElement) : null;
|
|
11193
|
-
var check = parentElement ? select('.' + CHECK, parentElement) : null;
|
|
11194
11206
|
var element = this.element.querySelector('[data-uid="' + id + '"]');
|
|
11195
11207
|
var childNodes = this.getChildNodes(this.treeData, parent_1);
|
|
11196
11208
|
if (childNodes) {
|
|
11197
11209
|
for (var i = 0; i < childNodes.length; i++) {
|
|
11198
|
-
var childId = childNodes[i
|
|
11210
|
+
var childId = childNodes[parseInt(i.toString(), 10)][this.fields.id]
|
|
11211
|
+
? childNodes[parseInt(i.toString(), 10)][this.fields.id].toString()
|
|
11212
|
+
: null;
|
|
11199
11213
|
if (this.checkedNodes.indexOf(childId) !== -1) {
|
|
11200
11214
|
count++;
|
|
11201
11215
|
}
|
|
@@ -11229,13 +11243,13 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11229
11243
|
var parentElement = void 0;
|
|
11230
11244
|
var check = void 0;
|
|
11231
11245
|
for (var i = 0; i < this.treeData.length; i++) {
|
|
11232
|
-
id = this.treeData[i][this.fields.id] ? this.treeData[i][this.fields.id].toString() : '';
|
|
11246
|
+
id = this.treeData[parseInt(i.toString(), 10)][this.fields.id] ? this.treeData[parseInt(i.toString(), 10)][this.fields.id].toString() : '';
|
|
11233
11247
|
parentElement = this.element.querySelector('[data-uid="' + id + '"]');
|
|
11234
11248
|
check = parentElement ? select('.' + CHECK, parentElement) : null;
|
|
11235
11249
|
if (this.checkedNodes.indexOf(id) === -1 && parentElement && check && !doCheck) {
|
|
11236
11250
|
this.changeState(parentElement, 'uncheck', null);
|
|
11237
11251
|
}
|
|
11238
|
-
var subChild = getValue(this.fields.child.toString(), this.treeData[i]);
|
|
11252
|
+
var subChild = getValue(this.fields.child.toString(), this.treeData[parseInt(i.toString(), 10)]);
|
|
11239
11253
|
if (subChild) {
|
|
11240
11254
|
this.updateChildIndeterminate(subChild, id, node, doCheck, id);
|
|
11241
11255
|
}
|
|
@@ -11244,6 +11258,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11244
11258
|
};
|
|
11245
11259
|
/**
|
|
11246
11260
|
* updates the parent and child check state while changing the checkedNodes via setmodel for listData
|
|
11261
|
+
*
|
|
11262
|
+
* @param {string} node - The unique identifier of the node.
|
|
11263
|
+
* @param {boolean} doCheck - A boolean value indicating whether to check or uncheck the node.
|
|
11264
|
+
* @returns {void}
|
|
11265
|
+
* @private
|
|
11247
11266
|
*/
|
|
11248
11267
|
TreeView.prototype.updateIndeterminate = function (node, doCheck) {
|
|
11249
11268
|
var indeterminateData = this.getTreeData(node);
|
|
@@ -11255,7 +11274,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11255
11274
|
var childNodes = this.getChildNodes(this.treeData, parent);
|
|
11256
11275
|
if (childNodes) {
|
|
11257
11276
|
for (var i = 0; i < childNodes.length; i++) {
|
|
11258
|
-
var childId = childNodes[i
|
|
11277
|
+
var childId = childNodes[parseInt(i.toString(), 10)][this.fields.id]
|
|
11278
|
+
? childNodes[parseInt(i.toString(), 10)][this.fields.id].toString()
|
|
11279
|
+
: null;
|
|
11259
11280
|
if (this.checkedNodes.indexOf(childId) !== -1) {
|
|
11260
11281
|
count++;
|
|
11261
11282
|
}
|
|
@@ -11290,11 +11311,19 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11290
11311
|
};
|
|
11291
11312
|
/**
|
|
11292
11313
|
* updates the parent and child check state while changing the checkedNodes via setmodel for hierarchical data
|
|
11314
|
+
*
|
|
11315
|
+
* @param {Object[]} subChild - Array of child nodes
|
|
11316
|
+
* @param {string} parent - Parent identifier
|
|
11317
|
+
* @param {string} node - Current node identifier
|
|
11318
|
+
* @param {boolean} doCheck - Boolean indicating whether to perform a check
|
|
11319
|
+
* @param {string} [child] - Optional child identifier
|
|
11320
|
+
* @returns {void}
|
|
11321
|
+
* @private
|
|
11293
11322
|
*/
|
|
11294
11323
|
TreeView.prototype.updateChildIndeterminate = function (subChild, parent, node, doCheck, child) {
|
|
11295
11324
|
var count = 0;
|
|
11296
11325
|
for (var j = 0; j < subChild.length; j++) {
|
|
11297
|
-
var subId = subChild[j][this.fields.id] ? subChild[j][this.fields.id].toString() : '';
|
|
11326
|
+
var subId = subChild[parseInt(j.toString(), 10)][this.fields.id] ? subChild[parseInt(j.toString(), 10)][this.fields.id].toString() : '';
|
|
11298
11327
|
if (this.checkedNodes.indexOf(subId) !== -1) {
|
|
11299
11328
|
count++;
|
|
11300
11329
|
}
|
|
@@ -11347,7 +11376,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11347
11376
|
this.parentNodeCheck.push(parent);
|
|
11348
11377
|
}
|
|
11349
11378
|
}
|
|
11350
|
-
var innerChild = getValue(this.fields.child.toString(), subChild[j]);
|
|
11379
|
+
var innerChild = getValue(this.fields.child.toString(), subChild[parseInt(j.toString(), 10)]);
|
|
11351
11380
|
if (innerChild) {
|
|
11352
11381
|
this.updateChildIndeterminate(innerChild, subId, node, doCheck, child);
|
|
11353
11382
|
}
|
|
@@ -11396,17 +11425,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11396
11425
|
ariaState = state === 'check' ? 'true' : state === 'uncheck' ? 'false' : ariaState;
|
|
11397
11426
|
if (!isNullOrUndefined(ariaState)) {
|
|
11398
11427
|
currLi.setAttribute('aria-checked', ariaState);
|
|
11399
|
-
if (Browser.userAgent.indexOf("Edg") > -1) {
|
|
11400
|
-
if (ariaState === 'true') {
|
|
11401
|
-
wrapper.setAttribute('aria-label', "checked");
|
|
11402
|
-
}
|
|
11403
|
-
else if (ariaState === 'false') {
|
|
11404
|
-
wrapper.setAttribute('aria-label', "unchecked");
|
|
11405
|
-
}
|
|
11406
|
-
else if (ariaState === 'mixed') {
|
|
11407
|
-
wrapper.setAttribute('aria-label', "indeterminate");
|
|
11408
|
-
}
|
|
11409
|
-
}
|
|
11410
11428
|
}
|
|
11411
11429
|
if (isAdd) {
|
|
11412
11430
|
var data = [].concat([], this.checkActionNodes);
|
|
@@ -11458,7 +11476,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11458
11476
|
this.updateWrap();
|
|
11459
11477
|
}
|
|
11460
11478
|
this.renderReactTemplates();
|
|
11461
|
-
this.hasPid = this.rootData[0] ? this.rootData[0]
|
|
11479
|
+
this.hasPid = this.rootData[0] ? Object.prototype.hasOwnProperty.call(this.rootData[0], this.fields.parentID) : false;
|
|
11462
11480
|
this.doExpandAction();
|
|
11463
11481
|
}
|
|
11464
11482
|
};
|
|
@@ -11475,7 +11493,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11475
11493
|
var liEle = ulEle ? selectAll('.' + LISTITEM, ulEle) : this.liList;
|
|
11476
11494
|
var length = liEle.length;
|
|
11477
11495
|
for (var i = 0; i < length; i++) {
|
|
11478
|
-
this.calculateWrap(liEle[i]);
|
|
11496
|
+
this.calculateWrap(liEle[parseInt(i.toString(), 10)]);
|
|
11479
11497
|
}
|
|
11480
11498
|
};
|
|
11481
11499
|
TreeView.prototype.calculateWrap = function (liEle) {
|
|
@@ -11488,17 +11506,18 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11488
11506
|
var _this = this;
|
|
11489
11507
|
var eUids = this.expandedNodes;
|
|
11490
11508
|
if (!this.loadOnDemand && this.fields.dataSource instanceof DataManager) {
|
|
11491
|
-
this.isInitalExpand = this.treeData.filter(function (e) { return e[_this.fields.expanded]
|
|
11509
|
+
this.isInitalExpand = this.treeData.filter(function (e) { return e[_this.fields.expanded] === true; }).length > 0
|
|
11510
|
+
? true
|
|
11511
|
+
: this.isInitalExpand;
|
|
11492
11512
|
}
|
|
11493
11513
|
if (this.isInitalExpand && eUids.length > 0) {
|
|
11494
11514
|
this.setProperties({ expandedNodes: [] }, true);
|
|
11495
|
-
/* eslint-disable */
|
|
11496
11515
|
if (this.fields.dataSource instanceof DataManager) {
|
|
11497
11516
|
this.expandGivenNodes(eUids);
|
|
11498
11517
|
}
|
|
11499
11518
|
else {
|
|
11500
11519
|
for (var i = 0; i < eUids.length; i++) {
|
|
11501
|
-
var eNode = select('[data-uid="' + eUids[i] + '"]', this.element);
|
|
11520
|
+
var eNode = select('[data-uid="' + eUids[parseInt(i.toString(), 10)] + '"]', this.element);
|
|
11502
11521
|
if (!isNullOrUndefined(eNode)) {
|
|
11503
11522
|
var icon = select('.' + EXPANDABLE, select('.' + TEXTWRAP, eNode));
|
|
11504
11523
|
if (!isNullOrUndefined(icon)) {
|
|
@@ -11506,8 +11525,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11506
11525
|
}
|
|
11507
11526
|
}
|
|
11508
11527
|
else {
|
|
11509
|
-
if (eUids[i] && this.expandChildren.indexOf(eUids[i]) === -1) {
|
|
11510
|
-
this.expandChildren.push(eUids[i].toString());
|
|
11528
|
+
if (eUids[parseInt(i.toString(), 10)] && this.expandChildren.indexOf(eUids[parseInt(i.toString(), 10)]) === -1) {
|
|
11529
|
+
this.expandChildren.push(eUids[parseInt(i.toString(), 10)].toString());
|
|
11511
11530
|
}
|
|
11512
11531
|
continue;
|
|
11513
11532
|
}
|
|
@@ -11520,14 +11539,14 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11520
11539
|
}
|
|
11521
11540
|
};
|
|
11522
11541
|
TreeView.prototype.expandGivenNodes = function (arr) {
|
|
11523
|
-
var
|
|
11542
|
+
var _this = this;
|
|
11524
11543
|
this.expandCallback(arr[this.index], function () {
|
|
11525
|
-
|
|
11526
|
-
if (
|
|
11527
|
-
|
|
11544
|
+
_this.index++;
|
|
11545
|
+
if (_this.index < arr.length) {
|
|
11546
|
+
_this.expandGivenNodes(arr);
|
|
11528
11547
|
}
|
|
11529
11548
|
else {
|
|
11530
|
-
|
|
11549
|
+
_this.afterFinalized();
|
|
11531
11550
|
}
|
|
11532
11551
|
});
|
|
11533
11552
|
};
|
|
@@ -11564,12 +11583,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11564
11583
|
if (sUids.length > 0) {
|
|
11565
11584
|
this.setProperties({ selectedNodes: [] }, true);
|
|
11566
11585
|
for (var i = 0; i < sUids.length; i++) {
|
|
11567
|
-
var sNode = select('[data-uid="' + sUids[i] + '"]', this.element);
|
|
11586
|
+
var sNode = select('[data-uid="' + sUids[parseInt(i.toString(), 10)] + '"]', this.element);
|
|
11568
11587
|
if (sNode && !(sNode.classList.contains('e-active'))) {
|
|
11569
11588
|
this.selectNode(sNode, null, true);
|
|
11570
11589
|
}
|
|
11571
11590
|
else {
|
|
11572
|
-
this.selectedNodes.push(sUids[i]);
|
|
11591
|
+
this.selectedNodes.push(sUids[parseInt(i.toString(), 10)]);
|
|
11573
11592
|
}
|
|
11574
11593
|
if (!this.allowMultiSelection) {
|
|
11575
11594
|
break;
|
|
@@ -11583,8 +11602,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11583
11602
|
};
|
|
11584
11603
|
TreeView.prototype.selectGivenNodes = function (sNodes) {
|
|
11585
11604
|
for (var i = 0; i < sNodes.length; i++) {
|
|
11586
|
-
if (!sNodes[i].classList.contains('e-disable')) {
|
|
11587
|
-
this.selectNode(sNodes[i], null, true);
|
|
11605
|
+
if (!sNodes[parseInt(i.toString(), 10)].classList.contains('e-disable')) {
|
|
11606
|
+
this.selectNode(sNodes[parseInt(i.toString(), 10)], null, true);
|
|
11588
11607
|
}
|
|
11589
11608
|
if (!this.allowMultiSelection) {
|
|
11590
11609
|
break;
|
|
@@ -11592,15 +11611,17 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11592
11611
|
}
|
|
11593
11612
|
};
|
|
11594
11613
|
TreeView.prototype.clickHandler = function (event) {
|
|
11595
|
-
var target = Browser.isDevice && event.originalEvent.changedTouches && !Browser.isIos
|
|
11614
|
+
var target = Browser.isDevice && event.originalEvent.changedTouches && !Browser.isIos
|
|
11615
|
+
? document.elementFromPoint(event.originalEvent.changedTouches[0].clientX, event.originalEvent.changedTouches[0].clientY)
|
|
11616
|
+
: event.originalEvent.target;
|
|
11596
11617
|
EventHandler.remove(this.element, 'contextmenu', this.preventContextMenu);
|
|
11597
11618
|
if (!target || this.dragStartAction) {
|
|
11598
11619
|
return;
|
|
11599
11620
|
}
|
|
11600
11621
|
else {
|
|
11601
|
-
var classList
|
|
11622
|
+
var classList = target.classList;
|
|
11602
11623
|
var li = closest(target, '.' + LISTITEM);
|
|
11603
|
-
if (!li || (li.classList.contains(PREVENTSELECT) && !(classList
|
|
11624
|
+
if (!li || (li.classList.contains(PREVENTSELECT) && !(classList.contains(EXPANDABLE) || classList.contains(COLLAPSIBLE)))) {
|
|
11604
11625
|
return;
|
|
11605
11626
|
}
|
|
11606
11627
|
else if (event.originalEvent.which !== 3) {
|
|
@@ -11617,10 +11638,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11617
11638
|
return;
|
|
11618
11639
|
}
|
|
11619
11640
|
}
|
|
11620
|
-
if (classList
|
|
11641
|
+
if (classList.contains(EXPANDABLE)) {
|
|
11621
11642
|
this.expandAction(li, target, event);
|
|
11622
11643
|
}
|
|
11623
|
-
else if (classList
|
|
11644
|
+
else if (classList.contains(COLLAPSIBLE)) {
|
|
11624
11645
|
this.collapseNode(li, target, event);
|
|
11625
11646
|
}
|
|
11626
11647
|
else if (rippleElement && rippleIcons) {
|
|
@@ -11630,12 +11651,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11630
11651
|
else if (rippleIcons.classList.contains(RIPPLE) && rippleIcons.classList.contains(COLLAPSIBLE)) {
|
|
11631
11652
|
this.collapseNode(li, rippleIcons, event);
|
|
11632
11653
|
}
|
|
11633
|
-
else if (!classList
|
|
11654
|
+
else if (!classList.contains(PARENTITEM) && !classList.contains(LISTITEM)) {
|
|
11634
11655
|
this.toggleSelect(li, event.originalEvent, false);
|
|
11635
11656
|
}
|
|
11636
11657
|
}
|
|
11637
11658
|
else {
|
|
11638
|
-
if (!classList
|
|
11659
|
+
if (!classList.contains(PARENTITEM) && !classList.contains(LISTITEM)) {
|
|
11639
11660
|
this.toggleSelect(li, event.originalEvent, false);
|
|
11640
11661
|
}
|
|
11641
11662
|
}
|
|
@@ -11647,7 +11668,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11647
11668
|
}
|
|
11648
11669
|
};
|
|
11649
11670
|
TreeView.prototype.nodeCheckedEvent = function (wrapper, isCheck, e) {
|
|
11650
|
-
var currLi = closest(wrapper, '.' + LISTITEM);
|
|
11651
11671
|
var eventArgs = this.getCheckEvent(wrapper, isCheck ? 'uncheck' : 'check', e);
|
|
11652
11672
|
eventArgs.data = eventArgs.data.splice(0, eventArgs.data.length - 1);
|
|
11653
11673
|
this.trigger('nodeChecked', eventArgs);
|
|
@@ -11655,7 +11675,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11655
11675
|
TreeView.prototype.triggerClickEvent = function (e, li) {
|
|
11656
11676
|
var eventArgs = {
|
|
11657
11677
|
event: e,
|
|
11658
|
-
node: li
|
|
11678
|
+
node: li
|
|
11659
11679
|
};
|
|
11660
11680
|
this.trigger('nodeClicked', eventArgs);
|
|
11661
11681
|
};
|
|
@@ -11674,7 +11694,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11674
11694
|
addClass([icon], COLLAPSIBLE);
|
|
11675
11695
|
var start_1 = 0;
|
|
11676
11696
|
var end_1 = 0;
|
|
11677
|
-
var proxy_1 = this;
|
|
11678
11697
|
var ul_1 = select('.' + PARENTITEM, currLi);
|
|
11679
11698
|
var liEle_1 = currLi;
|
|
11680
11699
|
this.setHeight(liEle_1, ul_1);
|
|
@@ -11684,7 +11703,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11684
11703
|
name: this.animation.expand.effect,
|
|
11685
11704
|
duration: (this.animation.expand.duration === 0 && animationMode === 'Enable') ? 400 : this.animation.expand.duration,
|
|
11686
11705
|
timingFunction: this.animation.expand.easing,
|
|
11687
|
-
begin: function (
|
|
11706
|
+
begin: function () {
|
|
11688
11707
|
liEle_1.style.overflow = 'hidden';
|
|
11689
11708
|
if (!isNullOrUndefined(activeElement_1) && activeElement_1 instanceof HTMLElement) {
|
|
11690
11709
|
activeElement_1.classList.add(ITEM_ANIMATION_ACTIVE);
|
|
@@ -11694,7 +11713,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11694
11713
|
},
|
|
11695
11714
|
progress: function (args) {
|
|
11696
11715
|
args.element.style.display = 'block';
|
|
11697
|
-
|
|
11716
|
+
_this.animateHeight(args, start_1, end_1);
|
|
11698
11717
|
},
|
|
11699
11718
|
end: function (args) {
|
|
11700
11719
|
args.element.style.display = 'block';
|
|
@@ -11777,7 +11796,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11777
11796
|
addClass([icon], EXPANDABLE);
|
|
11778
11797
|
var start = 0;
|
|
11779
11798
|
var end = 0;
|
|
11780
|
-
var proxy = this;
|
|
11781
11799
|
var ul = select('.' + PARENTITEM, currLi);
|
|
11782
11800
|
var liEle = currLi;
|
|
11783
11801
|
var activeElement = select('.' + LISTITEM + '.' + ACTIVE, currLi);
|
|
@@ -11786,7 +11804,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11786
11804
|
name: this.animation.collapse.effect,
|
|
11787
11805
|
duration: (this.animation.collapse.duration === 0 && animationMode === 'Enable') ? 400 : this.animation.collapse.duration,
|
|
11788
11806
|
timingFunction: this.animation.collapse.easing,
|
|
11789
|
-
begin: function (
|
|
11807
|
+
begin: function () {
|
|
11790
11808
|
liEle.style.overflow = 'hidden';
|
|
11791
11809
|
if (!isNullOrUndefined(activeElement) && activeElement instanceof HTMLElement) {
|
|
11792
11810
|
activeElement.classList.add(ITEM_ANIMATION_ACTIVE);
|
|
@@ -11795,7 +11813,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11795
11813
|
end = liEle.offsetHeight;
|
|
11796
11814
|
},
|
|
11797
11815
|
progress: function (args) {
|
|
11798
|
-
|
|
11816
|
+
_this.animateHeight(args, start, end);
|
|
11799
11817
|
},
|
|
11800
11818
|
end: function (args) {
|
|
11801
11819
|
args.element.style.display = 'none';
|
|
@@ -11858,7 +11876,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11858
11876
|
}
|
|
11859
11877
|
this.showSpinner(eicon);
|
|
11860
11878
|
var childItems;
|
|
11861
|
-
/* eslint-disable */
|
|
11862
11879
|
if (this.fields.dataSource instanceof DataManager) {
|
|
11863
11880
|
var level = this.parents(parentLi, '.' + PARENTITEM).length;
|
|
11864
11881
|
var mapper_2 = this.getChildFields(this.fields, level, 1);
|
|
@@ -11891,6 +11908,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11891
11908
|
this.currentLoadData = this.getSortedData(childItems);
|
|
11892
11909
|
if (isNullOrUndefined(childItems) || childItems.length === 0) {
|
|
11893
11910
|
detach(eicon);
|
|
11911
|
+
if (eicon.classList.contains(LOAD)) {
|
|
11912
|
+
this.hideSpinner(eicon);
|
|
11913
|
+
}
|
|
11894
11914
|
this.removeExpand(parentLi, true);
|
|
11895
11915
|
return;
|
|
11896
11916
|
}
|
|
@@ -11941,7 +11961,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11941
11961
|
TreeView.prototype.disableTreeNodes = function (childItems) {
|
|
11942
11962
|
var i = 0;
|
|
11943
11963
|
while (i < childItems.length) {
|
|
11944
|
-
var id = childItems[i
|
|
11964
|
+
var id = childItems[parseInt(i.toString(), 10)][this.fields.id]
|
|
11965
|
+
? childItems[parseInt(i.toString(), 10)][this.fields.id].toString()
|
|
11966
|
+
: null;
|
|
11945
11967
|
if (this.disableNode !== undefined && this.disableNode.indexOf(id) !== -1) {
|
|
11946
11968
|
this.doDisableAction([id]);
|
|
11947
11969
|
}
|
|
@@ -11950,11 +11972,16 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11950
11972
|
};
|
|
11951
11973
|
/**
|
|
11952
11974
|
* Sets the child Item in selectedState while rendering the child node
|
|
11975
|
+
*
|
|
11976
|
+
* @param {Object[]} nodes - Array of nodes
|
|
11977
|
+
* @returns {void}
|
|
11953
11978
|
*/
|
|
11954
11979
|
TreeView.prototype.setSelectionForChildNodes = function (nodes) {
|
|
11955
11980
|
var i;
|
|
11956
11981
|
for (i = 0; i < nodes.length; i++) {
|
|
11957
|
-
var id = nodes[i
|
|
11982
|
+
var id = nodes[parseInt(i.toString(), 10)][this.fields.id]
|
|
11983
|
+
? nodes[parseInt(i.toString(), 10)][this.fields.id].toString()
|
|
11984
|
+
: null;
|
|
11958
11985
|
if (this.selectedNodes !== undefined && this.selectedNodes.indexOf(id) !== -1) {
|
|
11959
11986
|
this.doSelectionAction();
|
|
11960
11987
|
}
|
|
@@ -12001,16 +12028,24 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12001
12028
|
}
|
|
12002
12029
|
else {
|
|
12003
12030
|
if (typeof this.fields.child === 'string') {
|
|
12004
|
-
var index = obj.findIndex(function (data) {
|
|
12031
|
+
var index = obj.findIndex(function (data) {
|
|
12032
|
+
return getValue(_this.fields.id, data) &&
|
|
12033
|
+
getValue(_this.fields.id, data).toString() === parentId;
|
|
12034
|
+
});
|
|
12005
12035
|
if (index !== -1) {
|
|
12006
|
-
return getValue(this.fields.child, obj[index]);
|
|
12036
|
+
return getValue(this.fields.child, obj[parseInt(index.toString(), 10)]);
|
|
12007
12037
|
}
|
|
12008
12038
|
if (index === -1) {
|
|
12009
12039
|
for (var i = 0, objlen = obj.length; i < objlen; i++) {
|
|
12010
|
-
var tempArray = getValue(this.fields.child, obj[i]);
|
|
12011
|
-
var childIndex = !isNullOrUndefined(tempArray)
|
|
12040
|
+
var tempArray = getValue(this.fields.child, obj[parseInt(i.toString(), 10)]);
|
|
12041
|
+
var childIndex = !isNullOrUndefined(tempArray)
|
|
12042
|
+
? tempArray.findIndex(function (data) {
|
|
12043
|
+
return getValue(_this.fields.id, data) &&
|
|
12044
|
+
getValue(_this.fields.id, data).toString() === parentId;
|
|
12045
|
+
})
|
|
12046
|
+
: -1;
|
|
12012
12047
|
if (childIndex !== -1) {
|
|
12013
|
-
return getValue(this.fields.child, tempArray[childIndex]);
|
|
12048
|
+
return getValue(this.fields.child, tempArray[parseInt(childIndex.toString(), 10)]);
|
|
12014
12049
|
}
|
|
12015
12050
|
else if (!isNullOrUndefined(tempArray)) {
|
|
12016
12051
|
childNodes = this.getChildNodes(tempArray, parentId);
|
|
@@ -12034,16 +12069,24 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12034
12069
|
i++;
|
|
12035
12070
|
}
|
|
12036
12071
|
this.updateListProp(tempField);
|
|
12037
|
-
var index = obj.findIndex(function (data) {
|
|
12072
|
+
var index = obj.findIndex(function (data) {
|
|
12073
|
+
return getValue(_this.fields.id, data) &&
|
|
12074
|
+
getValue(_this.fields.id, data).toString() === parentId;
|
|
12075
|
+
});
|
|
12038
12076
|
if (index !== -1) {
|
|
12039
|
-
return getValue('child', obj[index]);
|
|
12077
|
+
return getValue('child', obj[parseInt(index.toString(), 10)]);
|
|
12040
12078
|
}
|
|
12041
12079
|
if (index === -1) {
|
|
12042
12080
|
for (var i_1 = 0, objlen = obj.length; i_1 < objlen; i_1++) {
|
|
12043
|
-
var tempArray = getValue('child', obj[i_1]);
|
|
12044
|
-
var childIndex = !isNullOrUndefined(tempArray)
|
|
12081
|
+
var tempArray = getValue('child', obj[parseInt(i_1.toString(), 10)]);
|
|
12082
|
+
var childIndex = !isNullOrUndefined(tempArray)
|
|
12083
|
+
? tempArray.findIndex(function (data) {
|
|
12084
|
+
return getValue(_this.fields.child.id, data) &&
|
|
12085
|
+
getValue(_this.fields.child.id, data).toString() === parentId;
|
|
12086
|
+
})
|
|
12087
|
+
: -1;
|
|
12045
12088
|
if (childIndex !== -1) {
|
|
12046
|
-
return getValue('child', tempArray[childIndex]);
|
|
12089
|
+
return getValue('child', tempArray[parseInt(childIndex.toString(), 10)]);
|
|
12047
12090
|
}
|
|
12048
12091
|
else if (!isNullOrUndefined(tempArray)) {
|
|
12049
12092
|
childNodes = this.getChildNodes(tempArray, parentId, false, level);
|
|
@@ -12063,13 +12106,14 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12063
12106
|
return childNodes;
|
|
12064
12107
|
}
|
|
12065
12108
|
for (var i = 0, objlen = data.length; i < objlen; i++) {
|
|
12066
|
-
if (!isNullOrUndefined(data[i
|
|
12067
|
-
|
|
12068
|
-
|
|
12109
|
+
if (!isNullOrUndefined(data[parseInt(i.toString(), 10)][0]) &&
|
|
12110
|
+
!isNullOrUndefined(getValue(this.fields.parentID, data[parseInt(i.toString(), 10)][0]))) {
|
|
12111
|
+
if (getValue(this.fields.parentID, data[parseInt(i.toString(), 10)][0]).toString() === parentId) {
|
|
12112
|
+
return data[parseInt(i.toString(), 10)];
|
|
12069
12113
|
}
|
|
12070
12114
|
}
|
|
12071
12115
|
else if (isRoot) {
|
|
12072
|
-
return data[i];
|
|
12116
|
+
return data[parseInt(i.toString(), 10)];
|
|
12073
12117
|
}
|
|
12074
12118
|
else {
|
|
12075
12119
|
return [];
|
|
@@ -12081,8 +12125,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12081
12125
|
if (expandChild) {
|
|
12082
12126
|
var cIcons = selectAll('.' + EXPANDABLE, element);
|
|
12083
12127
|
for (var i = 0, len = cIcons.length; i < len; i++) {
|
|
12084
|
-
var icon = cIcons[i];
|
|
12085
|
-
if (element.querySelector('.e-icons') !== cIcons[i]) {
|
|
12128
|
+
var icon = cIcons[parseInt(i.toString(), 10)];
|
|
12129
|
+
if (element.querySelector('.e-icons') !== cIcons[parseInt(i.toString(), 10)]) {
|
|
12086
12130
|
var curLi = closest(icon, '.' + LISTITEM);
|
|
12087
12131
|
this.expandArgs = this.getExpandEvent(curLi, null);
|
|
12088
12132
|
if (loaded !== true) {
|
|
@@ -12141,7 +12185,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12141
12185
|
endIndex = temp;
|
|
12142
12186
|
}
|
|
12143
12187
|
for (var i = startIndex; i <= endIndex; i++) {
|
|
12144
|
-
var currNode = this.liList[i];
|
|
12188
|
+
var currNode = this.liList[parseInt(i.toString(), 10)];
|
|
12145
12189
|
if (isVisible(currNode) && !currNode.classList.contains('e-disable')) {
|
|
12146
12190
|
this.addSelect(currNode);
|
|
12147
12191
|
}
|
|
@@ -12186,7 +12230,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12186
12230
|
var focusedNode = this.getFocusedNode();
|
|
12187
12231
|
if (focusedNode) {
|
|
12188
12232
|
removeClass([focusedNode], FOCUS);
|
|
12189
|
-
focusedNode.setAttribute(
|
|
12233
|
+
focusedNode.setAttribute('tabindex', '-1');
|
|
12190
12234
|
}
|
|
12191
12235
|
addClass([li], FOCUS);
|
|
12192
12236
|
li.setAttribute('tabindex', '0');
|
|
@@ -12237,7 +12281,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12237
12281
|
this.expandOnType = (this.expandOn === 'Auto') ? (Browser.isDevice ? 'Click' : 'DblClick') : this.expandOn;
|
|
12238
12282
|
};
|
|
12239
12283
|
TreeView.prototype.expandHandler = function (e) {
|
|
12240
|
-
var target = Browser.isDevice && e.originalEvent.changedTouches && !Browser.isIos
|
|
12284
|
+
var target = Browser.isDevice && e.originalEvent.changedTouches && !Browser.isIos
|
|
12285
|
+
? document.elementFromPoint(e.originalEvent.changedTouches[0].clientX, e.originalEvent.changedTouches[0].clientY)
|
|
12286
|
+
: e.originalEvent.target;
|
|
12241
12287
|
if (!target || target.classList.contains(INPUT) || target.classList.contains(ROOT) ||
|
|
12242
12288
|
target.classList.contains(PARENTITEM) || target.classList.contains(LISTITEM) ||
|
|
12243
12289
|
target.classList.contains(ICON) || this.showCheckBox && closest(target, '.' + CHECKBOXWRAP)) {
|
|
@@ -12253,11 +12299,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12253
12299
|
return;
|
|
12254
12300
|
}
|
|
12255
12301
|
else {
|
|
12256
|
-
var classList
|
|
12257
|
-
if (classList
|
|
12302
|
+
var classList = icon.classList;
|
|
12303
|
+
if (classList.contains(EXPANDABLE)) {
|
|
12258
12304
|
this.expandAction(currLi, icon, e);
|
|
12259
12305
|
}
|
|
12260
|
-
else if (classList
|
|
12306
|
+
else if (classList.contains(COLLAPSIBLE)) {
|
|
12261
12307
|
this.collapseNode(currLi, icon, e);
|
|
12262
12308
|
}
|
|
12263
12309
|
}
|
|
@@ -12296,11 +12342,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12296
12342
|
this.renderChildNodes(currLi, expandChild, callback);
|
|
12297
12343
|
var liEles = selectAll('.' + LISTITEM, currLi);
|
|
12298
12344
|
for (var i = 0; i < liEles.length; i++) {
|
|
12299
|
-
var id = this.getId(liEles[i]);
|
|
12345
|
+
var id = this.getId(liEles[parseInt(i.toString(), 10)]);
|
|
12300
12346
|
if (this.expandChildren.indexOf(id) !== -1 && this.expandChildren !== undefined) {
|
|
12301
|
-
var icon_1 = select('.' + EXPANDABLE, select('.' + TEXTWRAP, liEles[i]));
|
|
12347
|
+
var icon_1 = select('.' + EXPANDABLE, select('.' + TEXTWRAP, liEles[parseInt(i.toString(), 10)]));
|
|
12302
12348
|
if (!isNullOrUndefined(icon_1)) {
|
|
12303
|
-
this.expandAction(liEles[i], icon_1, null);
|
|
12349
|
+
this.expandAction(liEles[parseInt(i.toString(), 10)], icon_1, null);
|
|
12304
12350
|
}
|
|
12305
12351
|
this.expandChildren.splice(this.expandChildren.indexOf(id), 1);
|
|
12306
12352
|
}
|
|
@@ -12326,7 +12372,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12326
12372
|
var eventArgs = {
|
|
12327
12373
|
cancel: false,
|
|
12328
12374
|
event: e,
|
|
12329
|
-
node: focusedNode
|
|
12375
|
+
node: focusedNode
|
|
12330
12376
|
};
|
|
12331
12377
|
this.trigger('keyPress', eventArgs, function (observedArgs) {
|
|
12332
12378
|
if (!observedArgs.cancel) {
|
|
@@ -12383,7 +12429,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12383
12429
|
break;
|
|
12384
12430
|
case 'f2':
|
|
12385
12431
|
if (_this.allowEditing && !focusedNode.classList.contains('e-disable')) {
|
|
12386
|
-
_this.createTextbox(focusedNode
|
|
12432
|
+
_this.createTextbox(focusedNode);
|
|
12387
12433
|
}
|
|
12388
12434
|
break;
|
|
12389
12435
|
case 'ctrlA':
|
|
@@ -12409,8 +12455,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12409
12455
|
parent.scrollTop -= parentPos.top - pos.top;
|
|
12410
12456
|
}
|
|
12411
12457
|
}
|
|
12412
|
-
var isVisible
|
|
12413
|
-
if (!isVisible
|
|
12458
|
+
var isVisible = this.isVisibleInViewport(focusNode);
|
|
12459
|
+
if (!isVisible) {
|
|
12414
12460
|
focusNode.scrollIntoView(isUp);
|
|
12415
12461
|
}
|
|
12416
12462
|
};
|
|
@@ -12443,7 +12489,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12443
12489
|
var checkWrap = select('.' + CHECKBOXWRAP, focusedNode);
|
|
12444
12490
|
var isChecked = select(' .' + CHECKBOXFRAME, checkWrap).classList.contains(CHECK);
|
|
12445
12491
|
if (!focusedNode.classList.contains('e-disable')) {
|
|
12446
|
-
if (focusedNode.getElementsByClassName(
|
|
12492
|
+
if (focusedNode.getElementsByClassName('e-checkbox-disabled').length === 0) {
|
|
12447
12493
|
this.validateCheckNode(checkWrap, isChecked, focusedNode, e);
|
|
12448
12494
|
}
|
|
12449
12495
|
}
|
|
@@ -12468,7 +12514,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12468
12514
|
this.checkedElement.push(li.getAttribute('data-uid'));
|
|
12469
12515
|
if (this.autoCheck) {
|
|
12470
12516
|
var child = this.getChildNodes(this.treeData, li.getAttribute('data-uid'));
|
|
12471
|
-
(child !== null)
|
|
12517
|
+
if (child !== null) {
|
|
12518
|
+
this.allCheckNode(child, this.checkedElement, null, null, false);
|
|
12519
|
+
}
|
|
12520
|
+
else {
|
|
12521
|
+
child = null;
|
|
12522
|
+
}
|
|
12472
12523
|
}
|
|
12473
12524
|
}
|
|
12474
12525
|
this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true);
|
|
@@ -12488,6 +12539,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12488
12539
|
};
|
|
12489
12540
|
/**
|
|
12490
12541
|
* Update checkedNodes when UI interaction happens before the child node renders in DOM
|
|
12542
|
+
*
|
|
12543
|
+
* @param {Element} li - The list item element
|
|
12544
|
+
* @param {boolean} [doCheck] - Optional parameter to specify whether to perform a check
|
|
12545
|
+
* @returns {void}
|
|
12491
12546
|
*/
|
|
12492
12547
|
TreeView.prototype.ensureStateChange = function (li, doCheck) {
|
|
12493
12548
|
var childElement = select('.' + PARENTITEM, li);
|
|
@@ -12496,8 +12551,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12496
12551
|
if (this.dataType === 1 && this.autoCheck) {
|
|
12497
12552
|
var resultData = new DataManager(this.treeData).executeLocal(new Query().where(mapper.parentID, 'equal', parentIndex, true));
|
|
12498
12553
|
for (var i = 0; i < resultData.length; i++) {
|
|
12499
|
-
var resultId = resultData[i
|
|
12500
|
-
|
|
12554
|
+
var resultId = resultData[parseInt(i.toString(), 10)][this.fields.id]
|
|
12555
|
+
? resultData[parseInt(i.toString(), 10)][this.fields.id].toString()
|
|
12556
|
+
: null;
|
|
12557
|
+
var isCheck = resultData[parseInt(i.toString(), 10)][this.fields.isChecked]
|
|
12558
|
+
? resultData[parseInt(i.toString(), 10)][this.fields.isChecked].toString()
|
|
12559
|
+
: null;
|
|
12501
12560
|
if (this.checkedNodes.indexOf(parentIndex) !== -1 && this.checkedNodes.indexOf(resultId) === -1) {
|
|
12502
12561
|
this.checkedNodes.push(resultId);
|
|
12503
12562
|
var childItems = this.getChildNodes(this.treeData, resultId);
|
|
@@ -12531,7 +12590,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12531
12590
|
if (!doCheck) {
|
|
12532
12591
|
var checkedData = new DataManager(this.treeData).executeLocal(new Query().where(mapper.isChecked, 'equal', true, false));
|
|
12533
12592
|
for (var i = 0; i < checkedData.length; i++) {
|
|
12534
|
-
var id = checkedData[i
|
|
12593
|
+
var id = checkedData[parseInt(i.toString(), 10)][this.fields.id]
|
|
12594
|
+
? checkedData[parseInt(i.toString(), 10)][this.fields.id].toString()
|
|
12595
|
+
: null;
|
|
12535
12596
|
if (this.checkedNodes.indexOf(id) !== -1) {
|
|
12536
12597
|
this.checkedNodes.splice(this.checkedNodes.indexOf(id), 1);
|
|
12537
12598
|
}
|
|
@@ -12541,7 +12602,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12541
12602
|
}
|
|
12542
12603
|
else {
|
|
12543
12604
|
for (var i = 0; i < this.treeData.length; i++) {
|
|
12544
|
-
var checkedId = this.treeData[i
|
|
12605
|
+
var checkedId = this.treeData[parseInt(i.toString(), 10)][this.fields.id]
|
|
12606
|
+
? this.treeData[parseInt(i.toString(), 10)][this.fields.id].toString()
|
|
12607
|
+
: null;
|
|
12545
12608
|
if (this.checkedNodes.indexOf(checkedId) === -1) {
|
|
12546
12609
|
this.checkedNodes.push(checkedId);
|
|
12547
12610
|
}
|
|
@@ -12557,9 +12620,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12557
12620
|
};
|
|
12558
12621
|
TreeView.prototype.getChildItems = function (childItems, doCheck) {
|
|
12559
12622
|
for (var i = 0; i < childItems.length; i++) {
|
|
12560
|
-
var childId = childItems[i
|
|
12561
|
-
|
|
12562
|
-
null;
|
|
12623
|
+
var childId = childItems[parseInt(i.toString(), 10)][this.fields.id]
|
|
12624
|
+
? childItems[parseInt(i.toString(), 10)][this.fields.id].toString()
|
|
12625
|
+
: null;
|
|
12626
|
+
var childIsCheck = childItems[parseInt(i.toString(), 10)][this.fields.isChecked]
|
|
12627
|
+
? childItems[parseInt(i.toString(), 10)][this.fields.isChecked].toString()
|
|
12628
|
+
: null;
|
|
12563
12629
|
if (this.checkedNodes.indexOf(childId) !== -1 && !doCheck) {
|
|
12564
12630
|
this.checkedNodes.splice(this.checkedNodes.indexOf(childId), 1);
|
|
12565
12631
|
}
|
|
@@ -12577,11 +12643,19 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12577
12643
|
};
|
|
12578
12644
|
/**
|
|
12579
12645
|
* Update checkedNodes when UI interaction happens before the child node renders in DOM for hierarchical DS
|
|
12646
|
+
*
|
|
12647
|
+
* @param {Object[]} childItems - Array of child items
|
|
12648
|
+
* @param {string} parent - Parent identifier
|
|
12649
|
+
* @param {Element} childElement - Child DOM element
|
|
12650
|
+
* @param {boolean} [doCheck] - Optional parameter to specify whether to perform a check
|
|
12651
|
+
* @returns {void}
|
|
12580
12652
|
*/
|
|
12581
12653
|
TreeView.prototype.childStateChange = function (childItems, parent, childElement, doCheck) {
|
|
12582
12654
|
for (var i = 0; i < childItems.length; i++) {
|
|
12583
|
-
var checkedChild = childItems[i][this.fields.id] ? childItems[i][this.fields.id].toString() : '';
|
|
12584
|
-
var isCheck = childItems[i
|
|
12655
|
+
var checkedChild = childItems[parseInt(i.toString(), 10)][this.fields.id] ? childItems[parseInt(i.toString(), 10)][this.fields.id].toString() : '';
|
|
12656
|
+
var isCheck = childItems[parseInt(i.toString(), 10)][this.fields.isChecked]
|
|
12657
|
+
? childItems[parseInt(i.toString(), 10)][this.fields.isChecked].toString()
|
|
12658
|
+
: null;
|
|
12585
12659
|
if (this.autoCheck) {
|
|
12586
12660
|
if (this.checkedNodes.indexOf(parent) !== -1 && this.checkedNodes.indexOf(checkedChild) === -1) {
|
|
12587
12661
|
this.checkedNodes.push(checkedChild);
|
|
@@ -12610,7 +12684,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12610
12684
|
}
|
|
12611
12685
|
}
|
|
12612
12686
|
}
|
|
12613
|
-
var subChild = this.getChildNodes([childItems[i]], checkedChild);
|
|
12687
|
+
var subChild = this.getChildNodes([childItems[parseInt(i.toString(), 10)]], checkedChild);
|
|
12614
12688
|
if (subChild) {
|
|
12615
12689
|
this.childStateChange(subChild, parent, childElement, doCheck);
|
|
12616
12690
|
}
|
|
@@ -12620,25 +12694,30 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12620
12694
|
TreeView.prototype.allCheckNode = function (child, newCheck, checked, childCheck, validateCheck) {
|
|
12621
12695
|
if (child) {
|
|
12622
12696
|
for (var length_1 = 0; length_1 < child.length; length_1++) {
|
|
12623
|
-
var childId = getValue(this.fields.id, child[length_1]);
|
|
12697
|
+
var childId = getValue(this.fields.id, child[parseInt(length_1.toString(), 10)]);
|
|
12624
12698
|
var check = this.element.querySelector('[data-uid="' + childId + '"]');
|
|
12625
12699
|
//Validates isChecked case while no UI interaction has been performed on the node or it's parent
|
|
12626
12700
|
if (validateCheck !== false && this.checkedElement.indexOf(childId.toString()) === -1) {
|
|
12627
|
-
if (((check === null && !isNullOrUndefined(child[length_1][this.fields.isChecked]) &&
|
|
12701
|
+
if (((check === null && !isNullOrUndefined(child[parseInt(length_1.toString(), 10)][this.fields.isChecked]) &&
|
|
12702
|
+
newCheck.indexOf(childId.toString()) === -1)
|
|
12628
12703
|
|| childCheck === 0 || checked === 2)) {
|
|
12629
|
-
(child[length_1][this.fields.isChecked] !== false || checked === 2)
|
|
12630
|
-
|
|
12631
|
-
|
|
12704
|
+
if (child[parseInt(length_1.toString(), 10)][this.fields.isChecked] !== false || checked === 2) {
|
|
12705
|
+
newCheck.push(childId.toString());
|
|
12706
|
+
}
|
|
12707
|
+
else {
|
|
12708
|
+
childCheck = null;
|
|
12709
|
+
}
|
|
12710
|
+
childCheck = (child[parseInt(length_1.toString(), 10)][this.fields.isChecked] !== false || checked === 2) ? 0 : null;
|
|
12632
12711
|
}
|
|
12633
12712
|
}
|
|
12634
12713
|
//Pushes child checked node done thro' UI interaction
|
|
12635
12714
|
if (newCheck.indexOf(childId.toString()) === -1 && isNullOrUndefined(checked)) {
|
|
12636
12715
|
newCheck.push(childId.toString());
|
|
12637
12716
|
}
|
|
12638
|
-
var hierChildId = getValue(this.fields.child.toString(), child[length_1]);
|
|
12717
|
+
var hierChildId = getValue(this.fields.child.toString(), child[parseInt(length_1.toString(), 10)]);
|
|
12639
12718
|
//Gets if any next level children are available for child nodes
|
|
12640
|
-
if (getValue(this.fields.hasChildren, child[length_1]) === true || hierChildId) {
|
|
12641
|
-
var id = getValue(this.fields.id, child[length_1]);
|
|
12719
|
+
if (getValue(this.fields.hasChildren, child[parseInt(length_1.toString(), 10)]) === true || hierChildId) {
|
|
12720
|
+
var id = getValue(this.fields.id, child[parseInt(length_1.toString(), 10)]);
|
|
12642
12721
|
var childId_1 = void 0;
|
|
12643
12722
|
if (this.dataType === 1) {
|
|
12644
12723
|
childId_1 = this.getChildNodes(this.treeData, id.toString());
|
|
@@ -12647,8 +12726,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12647
12726
|
childId_1 = hierChildId;
|
|
12648
12727
|
}
|
|
12649
12728
|
if (childId_1) {
|
|
12650
|
-
(isNullOrUndefined(validateCheck))
|
|
12729
|
+
if (isNullOrUndefined(validateCheck)) {
|
|
12730
|
+
this.allCheckNode(childId_1, newCheck, checked, childCheck);
|
|
12731
|
+
}
|
|
12732
|
+
else {
|
|
12651
12733
|
this.allCheckNode(childId_1, newCheck, checked, childCheck, validateCheck);
|
|
12734
|
+
}
|
|
12652
12735
|
childCheck = null;
|
|
12653
12736
|
}
|
|
12654
12737
|
}
|
|
@@ -12733,7 +12816,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12733
12816
|
var nextNode;
|
|
12734
12817
|
do {
|
|
12735
12818
|
index++;
|
|
12736
|
-
nextNode = this.liList[index];
|
|
12819
|
+
nextNode = this.liList[parseInt(index.toString(), 10)];
|
|
12737
12820
|
if (isNullOrUndefined(nextNode)) {
|
|
12738
12821
|
return li;
|
|
12739
12822
|
}
|
|
@@ -12745,7 +12828,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12745
12828
|
var prevNode;
|
|
12746
12829
|
do {
|
|
12747
12830
|
index--;
|
|
12748
|
-
prevNode = this.liList[index];
|
|
12831
|
+
prevNode = this.liList[parseInt(index.toString(), 10)];
|
|
12749
12832
|
if (isNullOrUndefined(prevNode)) {
|
|
12750
12833
|
return li;
|
|
12751
12834
|
}
|
|
@@ -12756,7 +12839,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12756
12839
|
var index = 0;
|
|
12757
12840
|
var rootNode;
|
|
12758
12841
|
do {
|
|
12759
|
-
rootNode = this.liList[index];
|
|
12842
|
+
rootNode = this.liList[parseInt(index.toString(), 10)];
|
|
12760
12843
|
index++;
|
|
12761
12844
|
} while (!isVisible(rootNode));
|
|
12762
12845
|
return rootNode;
|
|
@@ -12765,14 +12848,14 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12765
12848
|
var index = this.liList.length - 1;
|
|
12766
12849
|
var endNode;
|
|
12767
12850
|
do {
|
|
12768
|
-
endNode = this.liList[index];
|
|
12851
|
+
endNode = this.liList[parseInt(index.toString(), 10)];
|
|
12769
12852
|
index--;
|
|
12770
12853
|
} while (!isVisible(endNode));
|
|
12771
12854
|
return endNode;
|
|
12772
12855
|
};
|
|
12773
12856
|
TreeView.prototype.setFocus = function (preNode, nextNode) {
|
|
12774
12857
|
removeClass([preNode], FOCUS);
|
|
12775
|
-
preNode.setAttribute(
|
|
12858
|
+
preNode.setAttribute('tabindex', '-1');
|
|
12776
12859
|
if (!nextNode.classList.contains('e-disable') && !nextNode.classList.contains(PREVENTSELECT)) {
|
|
12777
12860
|
addClass([nextNode], FOCUS);
|
|
12778
12861
|
nextNode.setAttribute('tabindex', '0');
|
|
@@ -12793,11 +12876,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12793
12876
|
if (!this.mouseDownStatus) {
|
|
12794
12877
|
var focusedElement = this.getFocusedNode();
|
|
12795
12878
|
if (focusedElement.classList.contains('e-disable') || focusedElement.classList.contains('e-prevent')) {
|
|
12796
|
-
focusedElement.setAttribute(
|
|
12879
|
+
focusedElement.setAttribute('tabindex', '-1');
|
|
12797
12880
|
this.navigateNode(true);
|
|
12798
12881
|
}
|
|
12799
12882
|
else {
|
|
12800
|
-
focusedElement.setAttribute(
|
|
12883
|
+
focusedElement.setAttribute('tabindex', '0');
|
|
12801
12884
|
addClass([focusedElement], FOCUS);
|
|
12802
12885
|
EventHandler.add(focusedElement, 'blur', this.focusOut, this);
|
|
12803
12886
|
}
|
|
@@ -12806,7 +12889,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12806
12889
|
};
|
|
12807
12890
|
TreeView.prototype.focusOut = function (event) {
|
|
12808
12891
|
var focusedElement = this.getFocusedNode();
|
|
12809
|
-
if (event.target
|
|
12892
|
+
if (event.target === focusedElement) {
|
|
12810
12893
|
removeClass([focusedElement], FOCUS);
|
|
12811
12894
|
EventHandler.remove(focusedElement, 'blur', this.focusOut);
|
|
12812
12895
|
}
|
|
@@ -12816,9 +12899,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12816
12899
|
return;
|
|
12817
12900
|
}
|
|
12818
12901
|
var target = e.target;
|
|
12819
|
-
var classList
|
|
12902
|
+
var classList = target.classList;
|
|
12820
12903
|
var currentLi = closest(target, '.' + LISTITEM);
|
|
12821
|
-
if (!currentLi || classList
|
|
12904
|
+
if (!currentLi || classList.contains(PARENTITEM) || classList.contains(LISTITEM)) {
|
|
12822
12905
|
this.removeHover();
|
|
12823
12906
|
return;
|
|
12824
12907
|
}
|
|
@@ -12834,8 +12917,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12834
12917
|
addClass([li], HOVER);
|
|
12835
12918
|
}
|
|
12836
12919
|
};
|
|
12837
|
-
|
|
12838
|
-
TreeView.prototype.onMouseLeave = function (e) {
|
|
12920
|
+
TreeView.prototype.onMouseLeave = function () {
|
|
12839
12921
|
this.removeHover();
|
|
12840
12922
|
};
|
|
12841
12923
|
TreeView.prototype.removeHover = function () {
|
|
@@ -12844,7 +12926,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12844
12926
|
removeClass(hoveredNode, HOVER);
|
|
12845
12927
|
}
|
|
12846
12928
|
};
|
|
12847
|
-
|
|
12848
12929
|
TreeView.prototype.getNodeData = function (currLi, fromDS) {
|
|
12849
12930
|
if (!isNullOrUndefined(currLi) && currLi.classList.contains(LISTITEM) &&
|
|
12850
12931
|
!isNullOrUndefined(closest(currLi, '.' + CONTROL)) && closest(currLi, '.' + CONTROL).classList.contains(ROOT)) {
|
|
@@ -12926,10 +13007,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12926
13007
|
}
|
|
12927
13008
|
else {
|
|
12928
13009
|
var liEle = closest(target, '.' + LISTITEM);
|
|
12929
|
-
this.createTextbox(liEle
|
|
13010
|
+
this.createTextbox(liEle);
|
|
12930
13011
|
}
|
|
12931
13012
|
};
|
|
12932
|
-
TreeView.prototype.createTextbox = function (liEle
|
|
13013
|
+
TreeView.prototype.createTextbox = function (liEle) {
|
|
12933
13014
|
var _this = this;
|
|
12934
13015
|
var oldInpEle = select('.' + TREEINPUT, this.element);
|
|
12935
13016
|
if (oldInpEle) {
|
|
@@ -12947,6 +13028,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12947
13028
|
if (!isNullOrUndefined(_this.nodeTemplateFn)) {
|
|
12948
13029
|
_this.destroyTemplate(liEle);
|
|
12949
13030
|
}
|
|
13031
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12950
13032
|
if (_this.isReact) {
|
|
12951
13033
|
setTimeout(function () {
|
|
12952
13034
|
_this.renderTextBox(eventArgs, textEle, style_1);
|
|
@@ -12964,7 +13046,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12964
13046
|
this.inputObj = Input.createInput({
|
|
12965
13047
|
element: inpEle,
|
|
12966
13048
|
properties: {
|
|
12967
|
-
enableRtl: this.enableRtl
|
|
13049
|
+
enableRtl: this.enableRtl
|
|
12968
13050
|
}
|
|
12969
13051
|
}, this.createElement);
|
|
12970
13052
|
this.inputObj.container.setAttribute('style', style);
|
|
@@ -12989,12 +13071,14 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12989
13071
|
var txtEle = closest(target, '.' + LISTTEXT);
|
|
12990
13072
|
var liEle = closest(target, '.' + LISTITEM);
|
|
12991
13073
|
detach(this.inputObj.container);
|
|
13074
|
+
Input.destroy({ element: target, properties: this.properties });
|
|
12992
13075
|
if (this.fields.dataSource instanceof DataManager && !this.isOffline) {
|
|
12993
13076
|
this.crudOperation('update', null, liEle, newText, null, null, true);
|
|
12994
13077
|
}
|
|
12995
13078
|
else {
|
|
12996
13079
|
this.appendNewText(liEle, txtEle, newText, true);
|
|
12997
13080
|
}
|
|
13081
|
+
EventHandler.remove(target, 'blur', this.inputFocusOut);
|
|
12998
13082
|
};
|
|
12999
13083
|
TreeView.prototype.appendNewText = function (liEle, txtEle, newText, isInput) {
|
|
13000
13084
|
var _this = this;
|
|
@@ -13016,7 +13100,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13016
13100
|
this.renderReactTemplates();
|
|
13017
13101
|
}
|
|
13018
13102
|
else {
|
|
13019
|
-
this.enableHtmlSanitizer
|
|
13103
|
+
if (this.enableHtmlSanitizer) {
|
|
13104
|
+
txtEle.innerText = SanitizeHtmlHelper.sanitize(newText);
|
|
13105
|
+
}
|
|
13106
|
+
else {
|
|
13107
|
+
txtEle.innerHTML = newText;
|
|
13108
|
+
}
|
|
13020
13109
|
}
|
|
13021
13110
|
if (isInput) {
|
|
13022
13111
|
removeClass([liEle], EDITING);
|
|
@@ -13067,9 +13156,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13067
13156
|
}
|
|
13068
13157
|
else if (this.dataType === 1) {
|
|
13069
13158
|
for (var i = 0, objlen = this.treeData.length; i < objlen; i++) {
|
|
13070
|
-
var dataId = getValue(this.fields.id, this.treeData[i]);
|
|
13071
|
-
if (!isNullOrUndefined(this.treeData[i]) && !isNullOrUndefined(dataId) && dataId.toString() === id) {
|
|
13072
|
-
return this.treeData[i];
|
|
13159
|
+
var dataId = getValue(this.fields.id, this.treeData[parseInt(i.toString(), 10)]);
|
|
13160
|
+
if (!isNullOrUndefined(this.treeData[parseInt(i.toString(), 10)]) && !isNullOrUndefined(dataId) && dataId.toString() === id) {
|
|
13161
|
+
return this.treeData[parseInt(i.toString(), 10)];
|
|
13073
13162
|
}
|
|
13074
13163
|
}
|
|
13075
13164
|
}
|
|
@@ -13084,27 +13173,27 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13084
13173
|
return newList;
|
|
13085
13174
|
}
|
|
13086
13175
|
for (var i = 0, objlen = obj.length; i < objlen; i++) {
|
|
13087
|
-
var dataId = getValue(mapper.id, obj[i]);
|
|
13088
|
-
if (obj[i] && dataId && dataId.toString() === id) {
|
|
13089
|
-
return obj[i];
|
|
13176
|
+
var dataId = getValue(mapper.id, obj[parseInt(i.toString(), 10)]);
|
|
13177
|
+
if (obj[parseInt(i.toString(), 10)] && dataId && dataId.toString() === id) {
|
|
13178
|
+
return obj[parseInt(i.toString(), 10)];
|
|
13090
13179
|
}
|
|
13091
|
-
else if (typeof mapper.child === 'string' && !isNullOrUndefined(getValue(mapper.child, obj[i]))) {
|
|
13092
|
-
var childData = getValue(mapper.child, obj[i]);
|
|
13180
|
+
else if (typeof mapper.child === 'string' && !isNullOrUndefined(getValue(mapper.child, obj[parseInt(i.toString(), 10)]))) {
|
|
13181
|
+
var childData = getValue(mapper.child, obj[parseInt(i.toString(), 10)]);
|
|
13093
13182
|
newList = this.getChildNodeObject(childData, this.getChildMapper(mapper), id);
|
|
13094
13183
|
if (newList !== undefined) {
|
|
13095
13184
|
break;
|
|
13096
13185
|
}
|
|
13097
13186
|
}
|
|
13098
|
-
else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', obj[i]))) {
|
|
13187
|
+
else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', obj[parseInt(i.toString(), 10)]))) {
|
|
13099
13188
|
var child = 'child';
|
|
13100
|
-
newList = this.getChildNodeObject(getValue(child, obj[i]), this.getChildMapper(mapper), id);
|
|
13189
|
+
newList = this.getChildNodeObject(getValue(child, obj[parseInt(i.toString(), 10)]), this.getChildMapper(mapper), id);
|
|
13101
13190
|
if (newList !== undefined) {
|
|
13102
13191
|
break;
|
|
13103
13192
|
}
|
|
13104
13193
|
}
|
|
13105
13194
|
else if (this.isChildObject()) {
|
|
13106
13195
|
var children = 'child';
|
|
13107
|
-
var childData = getValue(children, obj[i]);
|
|
13196
|
+
var childData = getValue(children, obj[parseInt(i.toString(), 10)]);
|
|
13108
13197
|
newList = this.getChildNodeObject(childData, this.getChildMapper(mapper), id);
|
|
13109
13198
|
if (newList !== undefined) {
|
|
13110
13199
|
break;
|
|
@@ -13124,7 +13213,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13124
13213
|
TreeView.prototype.initializeDrag = function () {
|
|
13125
13214
|
var _this = this;
|
|
13126
13215
|
var virtualEle;
|
|
13127
|
-
var proxy = this;
|
|
13128
13216
|
this.dragObj = new Draggable(this.element, {
|
|
13129
13217
|
enableTailMode: true, enableAutoScroll: true,
|
|
13130
13218
|
dragArea: this.dragArea,
|
|
@@ -13146,15 +13234,15 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13146
13234
|
}
|
|
13147
13235
|
var cloneEle = (dragWrap.cloneNode(true));
|
|
13148
13236
|
if (isNullOrUndefined(select('div.' + ICON, cloneEle))) {
|
|
13149
|
-
var icon =
|
|
13237
|
+
var icon = _this.createElement('div', { className: ICON + ' ' + EXPANDABLE });
|
|
13150
13238
|
cloneEle.insertBefore(icon, cloneEle.children[0]);
|
|
13151
13239
|
}
|
|
13152
13240
|
var cssClass = DRAGITEM + ' ' + ROOT + ' ' + _this.cssClass + ' ' + (_this.enableRtl ? RTL$1 : '');
|
|
13153
|
-
virtualEle =
|
|
13241
|
+
virtualEle = _this.createElement('div', { className: cssClass });
|
|
13154
13242
|
virtualEle.appendChild(cloneEle);
|
|
13155
13243
|
var nLen = _this.selectedNodes.length;
|
|
13156
13244
|
if (nLen > 1 && _this.allowMultiSelection && _this.dragLi.classList.contains(ACTIVE)) {
|
|
13157
|
-
var cNode =
|
|
13245
|
+
var cNode = _this.createElement('span', { className: DROPCOUNT, innerHTML: '' + nLen });
|
|
13158
13246
|
virtualEle.appendChild(cNode);
|
|
13159
13247
|
}
|
|
13160
13248
|
document.body.appendChild(virtualEle);
|
|
@@ -13192,14 +13280,15 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13192
13280
|
},
|
|
13193
13281
|
dragStop: function (e) {
|
|
13194
13282
|
removeClass([_this.element], DRAGGING);
|
|
13195
|
-
|
|
13283
|
+
if (!e.target.classList.contains('e-sibling')) {
|
|
13284
|
+
_this.removeVirtualEle();
|
|
13285
|
+
}
|
|
13196
13286
|
var dropTarget = e.target;
|
|
13197
13287
|
var preventTargetExpand = false;
|
|
13198
13288
|
var dropRoot = (closest(dropTarget, '.' + DROPPABLE));
|
|
13199
13289
|
if (!dropTarget || !dropRoot) {
|
|
13200
13290
|
detach(e.helper);
|
|
13201
13291
|
document.body.style.cursor = '';
|
|
13202
|
-
|
|
13203
13292
|
}
|
|
13204
13293
|
var listItem = closest(dropTarget, '.e-list-item');
|
|
13205
13294
|
var level;
|
|
@@ -13216,7 +13305,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13216
13305
|
detach(e.helper);
|
|
13217
13306
|
}
|
|
13218
13307
|
document.body.style.cursor = '';
|
|
13219
|
-
|
|
13308
|
+
if (dropTarget.classList.contains('e-sibling')) {
|
|
13309
|
+
_this.removeVirtualEle();
|
|
13310
|
+
}
|
|
13220
13311
|
}
|
|
13221
13312
|
_this.dragStartAction = false;
|
|
13222
13313
|
});
|
|
@@ -13224,15 +13315,17 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13224
13315
|
});
|
|
13225
13316
|
this.dropObj = new Droppable(this.element, {
|
|
13226
13317
|
out: function (e) {
|
|
13227
|
-
if (!isNullOrUndefined(e) && !e.target.classList.contains(SIBLING) &&
|
|
13318
|
+
if (!isNullOrUndefined(e) && !e.target.classList.contains(SIBLING) &&
|
|
13319
|
+
(_this.dropObj.dragData.default && _this.dropObj.dragData.default.helper.classList.contains(ROOT))) {
|
|
13228
13320
|
document.body.style.cursor = 'not-allowed';
|
|
13229
13321
|
}
|
|
13230
13322
|
},
|
|
13231
|
-
over: function (
|
|
13323
|
+
over: function () {
|
|
13232
13324
|
document.body.style.cursor = '';
|
|
13233
13325
|
},
|
|
13234
13326
|
drop: function (e) {
|
|
13235
13327
|
_this.dropAction(e);
|
|
13328
|
+
_this.removeVirtualEle();
|
|
13236
13329
|
}
|
|
13237
13330
|
});
|
|
13238
13331
|
};
|
|
@@ -13246,10 +13339,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13246
13339
|
var dropWrap = closest(e.target, '.' + TEXTWRAP);
|
|
13247
13340
|
var icon = select('div.' + ICON, virtualEle);
|
|
13248
13341
|
removeClass([icon], [DROPIN, DROPNEXT, DROPOUT, NODROP]);
|
|
13342
|
+
this.isDropIn = false;
|
|
13249
13343
|
this.removeVirtualEle();
|
|
13250
13344
|
document.body.style.cursor = '';
|
|
13251
|
-
var classList
|
|
13252
|
-
if (this.fullRowSelect && !dropWrap && !isNullOrUndefined(classList
|
|
13345
|
+
var classList = e.target.classList;
|
|
13346
|
+
if (this.fullRowSelect && !dropWrap && !isNullOrUndefined(classList) && classList.contains(FULLROW)) {
|
|
13253
13347
|
dropWrap = e.target.nextElementSibling;
|
|
13254
13348
|
}
|
|
13255
13349
|
if (dropRoot) {
|
|
@@ -13261,29 +13355,37 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13261
13355
|
(!dropLi.isSameNode(this.dragLi) && !this.isDescendant(this.dragLi, dropLi)))) {
|
|
13262
13356
|
if (this.hasTemplate && dropLi) {
|
|
13263
13357
|
var templateTarget = select(this.fullRowSelect ? '.' + FULLROW : '.' + TEXTWRAP, dropLi);
|
|
13264
|
-
if ((e && (!expand && !collapse) && e.event.offsetY < 7 && !checkWrapper) ||
|
|
13358
|
+
if ((e && (!expand && !collapse) && e.event.offsetY < 7 && !checkWrapper) ||
|
|
13359
|
+
(((expand && e.event.offsetY < 5) || (collapse && e.event.offsetX < 3)))) {
|
|
13265
13360
|
var index = this.fullRowSelect ? (1) : (0);
|
|
13266
13361
|
this.appendIndicator(dropLi, icon, index);
|
|
13267
13362
|
}
|
|
13268
|
-
else if ((e && (!expand && !collapse) &&
|
|
13363
|
+
else if ((e && (!expand && !collapse) &&
|
|
13364
|
+
!checkWrapper && templateTarget && e.event.offsetY > templateTarget.offsetHeight - 10) ||
|
|
13365
|
+
((expand && e.event.offsetY > 19) || (collapse && e.event.offsetX > 19))) {
|
|
13269
13366
|
var index = this.fullRowSelect ? (2) : (1);
|
|
13270
13367
|
this.appendIndicator(dropLi, icon, index);
|
|
13271
13368
|
}
|
|
13272
13369
|
else {
|
|
13273
13370
|
addClass([icon], DROPIN);
|
|
13371
|
+
this.isDropIn = true;
|
|
13274
13372
|
}
|
|
13275
13373
|
}
|
|
13276
13374
|
else {
|
|
13277
|
-
if ((dropLi && e && (!expand && !collapse) && (e.event.offsetY < 7) && !checkWrapper) ||
|
|
13375
|
+
if ((dropLi && e && (!expand && !collapse) && (e.event.offsetY < 7) && !checkWrapper) ||
|
|
13376
|
+
(((expand && e.event.offsetY < 5) || (collapse && e.event.offsetX < 3)))) {
|
|
13278
13377
|
var index = this.fullRowSelect ? (1) : (0);
|
|
13279
13378
|
this.appendIndicator(dropLi, icon, index);
|
|
13280
13379
|
}
|
|
13281
|
-
else if ((dropLi && e && (!expand && !collapse) &&
|
|
13380
|
+
else if ((dropLi && e && (!expand && !collapse) &&
|
|
13381
|
+
(e.target.offsetHeight > 0 && e.event.offsetY > (e.target.offsetHeight - 10)) && !checkWrapper) ||
|
|
13382
|
+
(((expand && e.event.offsetY > 19) || (collapse && e.event.offsetX > 19)))) {
|
|
13282
13383
|
var index = this.fullRowSelect ? (2) : (1);
|
|
13283
13384
|
this.appendIndicator(dropLi, icon, index);
|
|
13284
13385
|
}
|
|
13285
13386
|
else {
|
|
13286
13387
|
addClass([icon], DROPIN);
|
|
13388
|
+
this.isDropIn = true;
|
|
13287
13389
|
}
|
|
13288
13390
|
}
|
|
13289
13391
|
}
|
|
@@ -13319,22 +13421,20 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13319
13421
|
TreeView.prototype.appendIndicator = function (dropLi, icon, index) {
|
|
13320
13422
|
addClass([icon], DROPNEXT);
|
|
13321
13423
|
var virEle = this.createElement('div', { className: SIBLING });
|
|
13322
|
-
dropLi.insertBefore(virEle, dropLi.children[index]);
|
|
13424
|
+
dropLi.insertBefore(virEle, dropLi.children[parseInt(index.toString(), 10)]);
|
|
13323
13425
|
};
|
|
13324
|
-
/* eslint-disable */
|
|
13325
13426
|
TreeView.prototype.dropAction = function (e) {
|
|
13326
13427
|
var offsetY = e.event.offsetY;
|
|
13327
13428
|
var dropTarget = e.target;
|
|
13328
13429
|
var dragObj;
|
|
13329
13430
|
var level;
|
|
13330
13431
|
var drop = false;
|
|
13331
|
-
var dragInstance;
|
|
13332
13432
|
var nodeData = [];
|
|
13333
13433
|
var liArray = [];
|
|
13334
|
-
dragInstance = e.dragData.draggable;
|
|
13335
|
-
for (var
|
|
13336
|
-
if (dragInstance.ej2_instances[
|
|
13337
|
-
dragObj = dragInstance.ej2_instances[
|
|
13434
|
+
var dragInstance = e.dragData.draggable;
|
|
13435
|
+
for (var i = 0; i < dragInstance.ej2_instances.length; i++) {
|
|
13436
|
+
if (dragInstance.ej2_instances[parseInt(i.toString(), 10)] instanceof TreeView_1) {
|
|
13437
|
+
dragObj = dragInstance.ej2_instances[parseInt(i.toString(), 10)];
|
|
13338
13438
|
break;
|
|
13339
13439
|
}
|
|
13340
13440
|
}
|
|
@@ -13358,19 +13458,21 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13358
13458
|
var sNodes = selectAll('.' + ACTIVE, dragObj.element);
|
|
13359
13459
|
liArray = sNodes;
|
|
13360
13460
|
if (e.target.offsetHeight <= 33 && offsetY > e.target.offsetHeight - 10 && offsetY > 6) {
|
|
13361
|
-
for (var
|
|
13362
|
-
if (dropLi.isSameNode(sNodes[
|
|
13461
|
+
for (var i = sNodes.length - 1; i >= 0; i--) {
|
|
13462
|
+
if (dropLi.isSameNode(sNodes[parseInt(i.toString(), 10)]) ||
|
|
13463
|
+
this.isDescendant(sNodes[parseInt(i.toString(), 10)], dropLi)) {
|
|
13363
13464
|
continue;
|
|
13364
13465
|
}
|
|
13365
|
-
this.appendNode(dropTarget, sNodes[
|
|
13466
|
+
this.appendNode(dropTarget, sNodes[parseInt(i.toString(), 10)], dropLi, e, dragObj, offsetY);
|
|
13366
13467
|
}
|
|
13367
13468
|
}
|
|
13368
13469
|
else {
|
|
13369
|
-
for (var
|
|
13370
|
-
if (dropLi.isSameNode(sNodes[
|
|
13470
|
+
for (var i = 0; i < sNodes.length; i++) {
|
|
13471
|
+
if (dropLi.isSameNode(sNodes[parseInt(i.toString(), 10)]) ||
|
|
13472
|
+
this.isDescendant(sNodes[parseInt(i.toString(), 10)], dropLi)) {
|
|
13371
13473
|
continue;
|
|
13372
13474
|
}
|
|
13373
|
-
this.appendNode(dropTarget, sNodes[
|
|
13475
|
+
this.appendNode(dropTarget, sNodes[parseInt(i.toString(), 10)], dropLi, e, dragObj, offsetY);
|
|
13374
13476
|
}
|
|
13375
13477
|
}
|
|
13376
13478
|
}
|
|
@@ -13384,7 +13486,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13384
13486
|
this.preventExpand = false;
|
|
13385
13487
|
}
|
|
13386
13488
|
for (var i = 0; i < liArray.length; i++) {
|
|
13387
|
-
nodeData.push(this.getNode(liArray[i]));
|
|
13489
|
+
nodeData.push(this.getNode(liArray[parseInt(i.toString(), 10)]));
|
|
13388
13490
|
}
|
|
13389
13491
|
this.trigger('nodeDropped', this.getDragEvent(e.event, dragObj, dropTarget, e.target, e.dragData.draggedElement, null, level, drop));
|
|
13390
13492
|
if (dragObj.element.id !== this.element.id) {
|
|
@@ -13411,11 +13513,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13411
13513
|
this.dropAsSiblingNode(dragLi, dropLi, e, dragObj);
|
|
13412
13514
|
}
|
|
13413
13515
|
else {
|
|
13414
|
-
this.dropAsChildNode(dragLi, dropLi, dragObj, null, e, offsetY);
|
|
13516
|
+
this.dropAsChildNode(dragLi, dropLi, dragObj, null, e, offsetY, null, dropTarget);
|
|
13415
13517
|
}
|
|
13416
13518
|
}
|
|
13417
13519
|
else {
|
|
13418
|
-
this.dropAsChildNode(dragLi, dropLi, dragObj, null, e, offsetY, true);
|
|
13520
|
+
this.dropAsChildNode(dragLi, dropLi, dragObj, null, e, offsetY, true, dropTarget);
|
|
13419
13521
|
}
|
|
13420
13522
|
if (this.showCheckBox) {
|
|
13421
13523
|
this.ensureIndeterminate();
|
|
@@ -13458,7 +13560,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13458
13560
|
this.updateInstance();
|
|
13459
13561
|
}
|
|
13460
13562
|
};
|
|
13461
|
-
TreeView.prototype.dropAsChildNode = function (dragLi, dropLi, dragObj, index, e, pos, isCheck) {
|
|
13563
|
+
TreeView.prototype.dropAsChildNode = function (dragLi, dropLi, dragObj, index, e, pos, isCheck, dropTarget) {
|
|
13462
13564
|
var dragParentUl = closest(dragLi, '.' + PARENTITEM);
|
|
13463
13565
|
var dragParentLi = closest(dragParentUl, '.' + LISTITEM);
|
|
13464
13566
|
var dropParentUl = closest(dropLi, '.' + PARENTITEM);
|
|
@@ -13466,7 +13568,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13466
13568
|
if (e && e.target) {
|
|
13467
13569
|
templateTarget = select(this.fullRowSelect ? '.' + FULLROW : '.' + TEXTWRAP, dropLi);
|
|
13468
13570
|
}
|
|
13469
|
-
if (e && (pos < 7) && !isCheck) {
|
|
13571
|
+
if (e && ((pos < 7 && !dropTarget.classList.contains('e-sibling')) || (dropTarget.classList.contains('e-sibling') && !dropLi.lastChild.classList.contains('e-sibling'))) && !isCheck) {
|
|
13470
13572
|
dropParentUl.insertBefore(dragLi, dropLi);
|
|
13471
13573
|
this.moveData(dragLi, dropLi, dropParentUl, true, dragObj);
|
|
13472
13574
|
}
|
|
@@ -13480,7 +13582,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13480
13582
|
}
|
|
13481
13583
|
else {
|
|
13482
13584
|
var dropUl = this.expandParent(dropLi);
|
|
13483
|
-
var childLi = dropUl.childNodes[index];
|
|
13585
|
+
var childLi = !isNullOrUndefined(index) ? dropUl.childNodes[parseInt(index.toString(), 10)] : null;
|
|
13484
13586
|
dropUl.insertBefore(dragLi, childLi);
|
|
13485
13587
|
this.moveData(dragLi, childLi, dropUl, true, dragObj);
|
|
13486
13588
|
}
|
|
@@ -13516,7 +13618,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13516
13618
|
var childData = dragObj.removeChildNodes(id);
|
|
13517
13619
|
pos++;
|
|
13518
13620
|
for (var i = 0, len = childData.length; i < len; i++) {
|
|
13519
|
-
this.treeData.splice(pos, 0, childData[i]);
|
|
13621
|
+
this.treeData.splice(pos, 0, childData[parseInt(i.toString(), 10)]);
|
|
13520
13622
|
pos++;
|
|
13521
13623
|
}
|
|
13522
13624
|
dragObj.groupedData = dragObj.getGroupedData(dragObj.treeData, dragObj.fields.parentID);
|
|
@@ -13564,7 +13666,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13564
13666
|
}
|
|
13565
13667
|
if (isNullOrUndefined(dropUl)) {
|
|
13566
13668
|
var args = this.expandArgs;
|
|
13567
|
-
if (isNullOrUndefined(args) || args.name
|
|
13669
|
+
if (isNullOrUndefined(args) || (args && args.name !== 'nodeExpanding')) {
|
|
13568
13670
|
this.trigger('nodeExpanding', this.getExpandEvent(dropLi, null));
|
|
13569
13671
|
}
|
|
13570
13672
|
if (isNullOrUndefined(dropIcon)) {
|
|
@@ -13605,7 +13707,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13605
13707
|
if (!isNullOrUndefined(element)) {
|
|
13606
13708
|
var cNodes = element.childNodes;
|
|
13607
13709
|
for (var i = 0, len = cNodes.length; i < len; i++) {
|
|
13608
|
-
var liEle = cNodes[i];
|
|
13710
|
+
var liEle = cNodes[parseInt(i.toString(), 10)];
|
|
13609
13711
|
liEle.setAttribute('aria-level', '' + level);
|
|
13610
13712
|
this.updateChildAriaLevel(select('.' + PARENTITEM, liEle), level + 1);
|
|
13611
13713
|
}
|
|
@@ -13621,7 +13723,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13621
13723
|
}
|
|
13622
13724
|
var virEle = this.createElement('div', { className: SIBLING });
|
|
13623
13725
|
var index = this.fullRowSelect ? (pre ? 1 : 2) : (pre ? 0 : 1);
|
|
13624
|
-
e.target.insertBefore(virEle, e.target.children[index]);
|
|
13726
|
+
e.target.insertBefore(virEle, e.target.children[parseInt(index.toString(), 10)]);
|
|
13625
13727
|
};
|
|
13626
13728
|
TreeView.prototype.removeVirtualEle = function () {
|
|
13627
13729
|
var sibEle = select('.' + SIBLING);
|
|
@@ -13655,8 +13757,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13655
13757
|
dragParent = (drop === true) ? this.dragParent : dragParent;
|
|
13656
13758
|
if (cloneEle) {
|
|
13657
13759
|
while (i < 4) {
|
|
13658
|
-
if (select('.' + ICON, cloneEle).classList.contains(iconCss[i])) {
|
|
13659
|
-
iconClass = iconCss[i];
|
|
13760
|
+
if (select('.' + ICON, cloneEle).classList.contains(iconCss[parseInt(i.toString(), 10)])) {
|
|
13761
|
+
iconClass = iconCss[parseInt(i.toString(), 10)];
|
|
13660
13762
|
break;
|
|
13661
13763
|
}
|
|
13662
13764
|
i++;
|
|
@@ -13665,18 +13767,20 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13665
13767
|
if (index) {
|
|
13666
13768
|
var dropTar = 0;
|
|
13667
13769
|
for (i = 0; i < index.childElementCount; i++) {
|
|
13668
|
-
dropTar = (drop !== true && index.children[i] === draggedNode && dropLi !== draggedNode)
|
|
13669
|
-
|
|
13770
|
+
dropTar = (drop !== true && index.children[parseInt(i.toString(), 10)] === draggedNode && dropLi !== draggedNode)
|
|
13771
|
+
? ++dropTar
|
|
13772
|
+
: dropTar;
|
|
13773
|
+
if ((drop !== true && index.children[parseInt(i.toString(), 10)].classList.contains('e-hover'))) {
|
|
13670
13774
|
indexValue = (event.offsetY >= 23) ? i + 1 : i;
|
|
13671
13775
|
break;
|
|
13672
13776
|
}
|
|
13673
|
-
else if (index.children[i] === node) {
|
|
13777
|
+
else if (index.children[parseInt(i.toString(), 10)] === node) {
|
|
13674
13778
|
indexValue = (event.offsetY >= 23) ? i : i;
|
|
13675
13779
|
break;
|
|
13676
13780
|
}
|
|
13677
13781
|
}
|
|
13678
13782
|
indexValue = (dropTar !== 0) ? --indexValue : indexValue;
|
|
13679
|
-
position =
|
|
13783
|
+
position = this.isDropIn ? 'Inside' : ((event.offsetY < 7) ? 'Before' : 'After');
|
|
13680
13784
|
}
|
|
13681
13785
|
if (dropTarget) {
|
|
13682
13786
|
if (newParent.length === 0) {
|
|
@@ -13719,19 +13823,19 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13719
13823
|
dropTarget: targetParent,
|
|
13720
13824
|
dropIndicator: iconClass,
|
|
13721
13825
|
target: target,
|
|
13722
|
-
position: position
|
|
13826
|
+
position: position
|
|
13723
13827
|
};
|
|
13724
13828
|
};
|
|
13725
13829
|
TreeView.prototype.addFullRow = function (toAdd) {
|
|
13726
13830
|
var len = this.liList.length;
|
|
13727
13831
|
if (toAdd) {
|
|
13728
13832
|
for (var i = 0; i < len; i++) {
|
|
13729
|
-
this.createFullRow(this.liList[i]);
|
|
13833
|
+
this.createFullRow(this.liList[parseInt(i.toString(), 10)]);
|
|
13730
13834
|
}
|
|
13731
13835
|
}
|
|
13732
13836
|
else {
|
|
13733
13837
|
for (var i = 0; i < len; i++) {
|
|
13734
|
-
var rowDiv = select('.' + FULLROW, this.liList[i]);
|
|
13838
|
+
var rowDiv = select('.' + FULLROW, this.liList[parseInt(i.toString(), 10)]);
|
|
13735
13839
|
detach(rowDiv);
|
|
13736
13840
|
}
|
|
13737
13841
|
}
|
|
@@ -13760,7 +13864,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13760
13864
|
if (level > 0 && !isNullOrUndefined(element)) {
|
|
13761
13865
|
var cNodes = this.getVisibleNodes(excludeHiddenNodes, element.childNodes);
|
|
13762
13866
|
for (var i = 0, len = cNodes.length; i < len; i++) {
|
|
13763
|
-
var liEle = cNodes[i];
|
|
13867
|
+
var liEle = cNodes[parseInt(i.toString(), 10)];
|
|
13764
13868
|
var icon = select('.' + COLLAPSIBLE, select('.' + TEXTWRAP, liEle));
|
|
13765
13869
|
if (!isNullOrUndefined(icon)) {
|
|
13766
13870
|
this.collapseNode(liEle, icon, null);
|
|
@@ -13772,7 +13876,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13772
13876
|
TreeView.prototype.collapseAllNodes = function (excludeHiddenNodes) {
|
|
13773
13877
|
var cIcons = this.getVisibleNodes(excludeHiddenNodes, selectAll('.' + COLLAPSIBLE, this.element));
|
|
13774
13878
|
for (var i = 0, len = cIcons.length; i < len; i++) {
|
|
13775
|
-
var icon = cIcons[i];
|
|
13879
|
+
var icon = cIcons[parseInt(i.toString(), 10)];
|
|
13776
13880
|
var liEle = closest(icon, '.' + LISTITEM);
|
|
13777
13881
|
this.collapseNode(liEle, icon, null);
|
|
13778
13882
|
}
|
|
@@ -13781,7 +13885,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13781
13885
|
if (level > 0 && !isNullOrUndefined(element)) {
|
|
13782
13886
|
var eNodes = this.getVisibleNodes(excludeHiddenNodes, element.childNodes);
|
|
13783
13887
|
for (var i = 0, len = eNodes.length; i < len; i++) {
|
|
13784
|
-
var liEle = eNodes[i];
|
|
13888
|
+
var liEle = eNodes[parseInt(i.toString(), 10)];
|
|
13785
13889
|
var icon = select('.' + EXPANDABLE, select('.' + TEXTWRAP, liEle));
|
|
13786
13890
|
if (!isNullOrUndefined(icon)) {
|
|
13787
13891
|
this.expandAction(liEle, icon, null);
|
|
@@ -13793,7 +13897,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13793
13897
|
TreeView.prototype.expandAllNodes = function (excludeHiddenNodes) {
|
|
13794
13898
|
var eIcons = this.getVisibleNodes(excludeHiddenNodes, selectAll('.' + EXPANDABLE, this.element));
|
|
13795
13899
|
for (var i = 0, len = eIcons.length; i < len; i++) {
|
|
13796
|
-
var icon = eIcons[i];
|
|
13900
|
+
var icon = eIcons[parseInt(i.toString(), 10)];
|
|
13797
13901
|
var liEle = closest(icon, '.' + LISTITEM);
|
|
13798
13902
|
this.expandAction(liEle, icon, null, true);
|
|
13799
13903
|
}
|
|
@@ -13802,7 +13906,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13802
13906
|
var vNodes = Array.prototype.slice.call(nodes);
|
|
13803
13907
|
if (excludeHiddenNodes) {
|
|
13804
13908
|
for (var i = 0; i < vNodes.length; i++) {
|
|
13805
|
-
if (!isVisible(vNodes[i])) {
|
|
13909
|
+
if (!isVisible(vNodes[parseInt(i.toString(), 10)])) {
|
|
13806
13910
|
vNodes.splice(i, 1);
|
|
13807
13911
|
i--;
|
|
13808
13912
|
}
|
|
@@ -13837,7 +13941,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13837
13941
|
this.setProperties({ expandedNodes: [] }, true);
|
|
13838
13942
|
var eNodes = selectAll('[aria-expanded="true"]', this.element);
|
|
13839
13943
|
for (var i = 0, len = eNodes.length; i < len; i++) {
|
|
13840
|
-
this.addExpand(eNodes[i]);
|
|
13944
|
+
this.addExpand(eNodes[parseInt(i.toString(), 10)]);
|
|
13841
13945
|
}
|
|
13842
13946
|
};
|
|
13843
13947
|
TreeView.prototype.removeData = function (node) {
|
|
@@ -13861,7 +13965,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13861
13965
|
if (cNodes) {
|
|
13862
13966
|
for (var i = 0, len = cNodes.length; i < len; i++) {
|
|
13863
13967
|
var dm = new DataManager(this.treeData);
|
|
13864
|
-
var id = getValue(this.fields.id, cNodes[i]).toString();
|
|
13968
|
+
var id = getValue(this.fields.id, cNodes[parseInt(i.toString(), 10)]).toString();
|
|
13865
13969
|
var data = {};
|
|
13866
13970
|
var currId = this.isNumberTypeId ? parseFloat(id) : id;
|
|
13867
13971
|
data[this.fields.id] = currId;
|
|
@@ -13874,13 +13978,18 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13874
13978
|
};
|
|
13875
13979
|
TreeView.prototype.doGivenAction = function (nodes, selector, toExpand) {
|
|
13876
13980
|
for (var i = 0, len = nodes.length; i < len; i++) {
|
|
13877
|
-
var liEle = this.getElement(nodes[i]);
|
|
13981
|
+
var liEle = this.getElement(nodes[parseInt(i.toString(), 10)]);
|
|
13878
13982
|
if (isNullOrUndefined(liEle)) {
|
|
13879
13983
|
continue;
|
|
13880
13984
|
}
|
|
13881
13985
|
var icon = select('.' + selector, select('.' + TEXTWRAP, liEle));
|
|
13882
13986
|
if (!isNullOrUndefined(icon)) {
|
|
13883
|
-
|
|
13987
|
+
if (toExpand) {
|
|
13988
|
+
this.expandAction(liEle, icon, null);
|
|
13989
|
+
}
|
|
13990
|
+
else {
|
|
13991
|
+
this.collapseNode(liEle, icon, null);
|
|
13992
|
+
}
|
|
13884
13993
|
}
|
|
13885
13994
|
}
|
|
13886
13995
|
};
|
|
@@ -13895,7 +14004,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13895
14004
|
}
|
|
13896
14005
|
var li = ListBase.createListItemFromJson(this.createElement, sNodes, this.listBaseOption, level);
|
|
13897
14006
|
var id = this.getId(dropLi);
|
|
13898
|
-
var refNode;
|
|
13899
14007
|
var dropIcon1;
|
|
13900
14008
|
if (!isNullOrUndefined(dropLi)) {
|
|
13901
14009
|
dropIcon1 = select('div.' + ICON, dropLi);
|
|
@@ -13914,17 +14022,17 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13914
14022
|
else {
|
|
13915
14023
|
dropUl = dropEle;
|
|
13916
14024
|
}
|
|
13917
|
-
refNode = dropUl.childNodes[index];
|
|
14025
|
+
var refNode = !isNullOrUndefined(index) ? dropUl.childNodes[parseInt(index.toString(), 10)] : null;
|
|
13918
14026
|
if (!this.isFirstRender || this.dataType === 1) {
|
|
13919
14027
|
var args = this.expandArgs;
|
|
13920
14028
|
if (refNode || this.sortOrder === 'None') {
|
|
13921
14029
|
for (var i = 0; i < li.length; i++) {
|
|
13922
|
-
dropUl.insertBefore(li[i], refNode);
|
|
14030
|
+
dropUl.insertBefore(li[parseInt(i.toString(), 10)], refNode);
|
|
13923
14031
|
}
|
|
13924
14032
|
if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
|
|
13925
14033
|
this.preventExpand = false;
|
|
13926
14034
|
var dropIcon = select('div.' + ICON, dropLi);
|
|
13927
|
-
if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNullOrUndefined(args) || args.name
|
|
14035
|
+
if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNullOrUndefined(args) || args.name !== 'nodeExpanding')) {
|
|
13928
14036
|
this.expandAction(dropLi, dropIcon, null);
|
|
13929
14037
|
}
|
|
13930
14038
|
}
|
|
@@ -13932,12 +14040,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13932
14040
|
if (!refNode && ((this.sortOrder === 'Ascending') || (this.sortOrder === 'Descending'))) {
|
|
13933
14041
|
if (dropUl.childNodes.length === 0) {
|
|
13934
14042
|
for (var i = 0; i < li.length; i++) {
|
|
13935
|
-
dropUl.insertBefore(li[i], refNode);
|
|
14043
|
+
dropUl.insertBefore(li[parseInt(i.toString(), 10)], refNode);
|
|
13936
14044
|
}
|
|
13937
14045
|
if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
|
|
13938
14046
|
this.preventExpand = false;
|
|
13939
14047
|
var dropIcon = select('div.' + ICON, dropLi);
|
|
13940
|
-
if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNullOrUndefined(args) || args.name
|
|
14048
|
+
if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNullOrUndefined(args) || args.name !== 'nodeExpanding')) {
|
|
13941
14049
|
this.expandAction(dropLi, dropIcon, null);
|
|
13942
14050
|
}
|
|
13943
14051
|
}
|
|
@@ -13946,12 +14054,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13946
14054
|
var cNodes = dropUl.childNodes;
|
|
13947
14055
|
for (var i = 0; i < li.length; i++) {
|
|
13948
14056
|
for (var j = 0; j < cNodes.length; j++) {
|
|
13949
|
-
var returnValue = (this.sortOrder === 'Ascending') ? cNodes[j].textContent.toUpperCase() > li[i].innerText.toUpperCase() : cNodes[j].textContent.toUpperCase() < li[i].innerText.toUpperCase();
|
|
14057
|
+
var returnValue = (this.sortOrder === 'Ascending') ? cNodes[parseInt(j.toString(), 10)].textContent.toUpperCase() > li[parseInt(i.toString(), 10)].innerText.toUpperCase() : cNodes[parseInt(j.toString(), 10)].textContent.toUpperCase() < li[parseInt(i.toString(), 10)].innerText.toUpperCase();
|
|
13950
14058
|
if (returnValue) {
|
|
13951
|
-
dropUl.insertBefore(li[i], cNodes[j]);
|
|
14059
|
+
dropUl.insertBefore(li[parseInt(i.toString(), 10)], cNodes[parseInt(j.toString(), 10)]);
|
|
13952
14060
|
break;
|
|
13953
14061
|
}
|
|
13954
|
-
dropUl.insertBefore(li[i], cNodes[cNodes.length]);
|
|
14062
|
+
dropUl.insertBefore(li[parseInt(i.toString(), 10)], cNodes[cNodes.length]);
|
|
13955
14063
|
}
|
|
13956
14064
|
}
|
|
13957
14065
|
}
|
|
@@ -13964,9 +14072,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13964
14072
|
for (var j = 0; j < nodes.length; j++) {
|
|
13965
14073
|
if (!isNullOrUndefined(id)) {
|
|
13966
14074
|
var currId = this.isNumberTypeId ? parseFloat(id) : id;
|
|
13967
|
-
setValue(this.fields.parentID, currId, nodes[j]);
|
|
14075
|
+
setValue(this.fields.parentID, currId, nodes[parseInt(j.toString(), 10)]);
|
|
13968
14076
|
}
|
|
13969
|
-
this.treeData.splice(pos, 0, nodes[j]);
|
|
14077
|
+
this.treeData.splice(pos, 0, nodes[parseInt(j.toString(), 10)]);
|
|
13970
14078
|
pos++;
|
|
13971
14079
|
}
|
|
13972
14080
|
}
|
|
@@ -13979,24 +14087,24 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13979
14087
|
TreeView.prototype.updateListProp = function (mapper) {
|
|
13980
14088
|
var prop = this.getActualProperties(mapper);
|
|
13981
14089
|
this.listBaseOption.fields = prop;
|
|
13982
|
-
this.listBaseOption.fields.url =
|
|
14090
|
+
this.listBaseOption.fields.url = Object.prototype.hasOwnProperty.call(prop, 'navigateUrl') ? prop.navigateUrl : 'navigateUrl';
|
|
13983
14091
|
};
|
|
13984
14092
|
TreeView.prototype.getDataPos = function (obj, mapper, id) {
|
|
13985
14093
|
var pos = null;
|
|
13986
14094
|
for (var i = 0, objlen = obj.length; i < objlen; i++) {
|
|
13987
|
-
var nodeId = getValue(mapper.id, obj[i]);
|
|
13988
|
-
if (obj[i] && nodeId && nodeId.toString() === id) {
|
|
14095
|
+
var nodeId = getValue(mapper.id, obj[parseInt(i.toString(), 10)]);
|
|
14096
|
+
if (obj[parseInt(i.toString(), 10)] && nodeId && nodeId.toString() === id) {
|
|
13989
14097
|
return i;
|
|
13990
14098
|
}
|
|
13991
|
-
else if (typeof mapper.child === 'string' && !isNullOrUndefined(getValue(mapper.child, obj[i]))) {
|
|
13992
|
-
var data = getValue(mapper.child, obj[i]);
|
|
14099
|
+
else if (typeof mapper.child === 'string' && !isNullOrUndefined(getValue(mapper.child, obj[parseInt(i.toString(), 10)]))) {
|
|
14100
|
+
var data = getValue(mapper.child, obj[parseInt(i.toString(), 10)]);
|
|
13993
14101
|
pos = this.getDataPos(data, this.getChildMapper(mapper), id);
|
|
13994
14102
|
if (pos !== null) {
|
|
13995
14103
|
break;
|
|
13996
14104
|
}
|
|
13997
14105
|
}
|
|
13998
|
-
else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', obj[i]))) {
|
|
13999
|
-
var items = getValue('child', obj[i]);
|
|
14106
|
+
else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', obj[parseInt(i.toString(), 10)]))) {
|
|
14107
|
+
var items = getValue('child', obj[parseInt(i.toString(), 10)]);
|
|
14000
14108
|
pos = this.getDataPos(items, this.getChildMapper(mapper), id);
|
|
14001
14109
|
if (pos !== null) {
|
|
14002
14110
|
break;
|
|
@@ -14010,42 +14118,42 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14010
14118
|
if (isNullOrUndefined(id)) {
|
|
14011
14119
|
index = isNullOrUndefined(index) ? obj.length : index;
|
|
14012
14120
|
for (var k = 0, len = data.length; k < len; k++) {
|
|
14013
|
-
obj.splice(index, 0, data[k]);
|
|
14121
|
+
obj.splice(index, 0, data[parseInt(k.toString(), 10)]);
|
|
14014
14122
|
index++;
|
|
14015
14123
|
}
|
|
14016
14124
|
return updated;
|
|
14017
14125
|
}
|
|
14018
14126
|
for (var i = 0, objlen = obj.length; i < objlen; i++) {
|
|
14019
|
-
var nodeId = getValue(mapper.id, obj[i]);
|
|
14020
|
-
if (obj[i] && nodeId && nodeId.toString() === id) {
|
|
14021
|
-
if ((typeof mapper.child === 'string' && (obj[i
|
|
14022
|
-
((this.fields.dataSource instanceof DataManager) && obj[i
|
|
14127
|
+
var nodeId = getValue(mapper.id, obj[parseInt(i.toString(), 10)]);
|
|
14128
|
+
if (obj[parseInt(i.toString(), 10)] && nodeId && nodeId.toString() === id) {
|
|
14129
|
+
if ((typeof mapper.child === 'string' && (Object.prototype.hasOwnProperty.call(obj[parseInt(i.toString(), 10)], mapper.child) && obj[parseInt(i.toString(), 10)][mapper.child] !== null)) ||
|
|
14130
|
+
((this.fields.dataSource instanceof DataManager) && Object.prototype.hasOwnProperty.call(obj[parseInt(i.toString(), 10)], 'child'))) {
|
|
14023
14131
|
var key = (typeof mapper.child === 'string') ? mapper.child : 'child';
|
|
14024
|
-
var childData = getValue(key, obj[i]);
|
|
14132
|
+
var childData = getValue(key, obj[parseInt(i.toString(), 10)]);
|
|
14025
14133
|
if (isNullOrUndefined(childData)) {
|
|
14026
14134
|
childData = [];
|
|
14027
14135
|
}
|
|
14028
14136
|
index = isNullOrUndefined(index) ? childData.length : index;
|
|
14029
14137
|
for (var k = 0, len = data.length; k < len; k++) {
|
|
14030
|
-
childData.splice(index, 0, data[k]);
|
|
14138
|
+
childData.splice(index, 0, data[parseInt(k.toString(), 10)]);
|
|
14031
14139
|
index++;
|
|
14032
14140
|
}
|
|
14033
14141
|
}
|
|
14034
14142
|
else {
|
|
14035
14143
|
var key = (typeof mapper.child === 'string') ? mapper.child : 'child';
|
|
14036
|
-
obj[i][key] = data;
|
|
14144
|
+
obj[parseInt(i.toString(), 10)]["" + key] = data;
|
|
14037
14145
|
}
|
|
14038
14146
|
return true;
|
|
14039
14147
|
}
|
|
14040
|
-
else if (typeof mapper.child === 'string' && !isNullOrUndefined(getValue(mapper.child, obj[i]))) {
|
|
14041
|
-
var childObj = getValue(mapper.child, obj[i]);
|
|
14148
|
+
else if (typeof mapper.child === 'string' && !isNullOrUndefined(getValue(mapper.child, obj[parseInt(i.toString(), 10)]))) {
|
|
14149
|
+
var childObj = getValue(mapper.child, obj[parseInt(i.toString(), 10)]);
|
|
14042
14150
|
updated = this.addChildData(childObj, this.getChildMapper(mapper), id, data, index);
|
|
14043
14151
|
if (updated !== undefined) {
|
|
14044
14152
|
break;
|
|
14045
14153
|
}
|
|
14046
14154
|
}
|
|
14047
|
-
else if ((this.fields.dataSource instanceof DataManager) && !isNullOrUndefined(getValue('child', obj[i]))) {
|
|
14048
|
-
var childData = getValue('child', obj[i]);
|
|
14155
|
+
else if ((this.fields.dataSource instanceof DataManager) && !isNullOrUndefined(getValue('child', obj[parseInt(i.toString(), 10)]))) {
|
|
14156
|
+
var childData = getValue('child', obj[parseInt(i.toString(), 10)]);
|
|
14049
14157
|
updated = this.addChildData(childData, this.getChildMapper(mapper), id, data, index);
|
|
14050
14158
|
if (updated !== undefined) {
|
|
14051
14159
|
break;
|
|
@@ -14059,7 +14167,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14059
14167
|
var validID = this.checkValidId(validNodes);
|
|
14060
14168
|
this.validArr = [];
|
|
14061
14169
|
for (var i = 0, len = validID.length; i < len; i++) {
|
|
14062
|
-
var id = validID[i][this.fields.id].toString();
|
|
14170
|
+
var id = validID[parseInt(i.toString(), 10)][this.fields.id].toString();
|
|
14063
14171
|
if (id && this.disableNode.indexOf(id) === -1) {
|
|
14064
14172
|
this.disableNode.push(id);
|
|
14065
14173
|
}
|
|
@@ -14073,8 +14181,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14073
14181
|
TreeView.prototype.doEnableAction = function (nodes) {
|
|
14074
14182
|
var strNodes = this.nodeType(nodes);
|
|
14075
14183
|
for (var i = 0, len = strNodes.length; i < len; i++) {
|
|
14076
|
-
var liEle = this.getElement(strNodes[i]);
|
|
14077
|
-
var id = strNodes[i];
|
|
14184
|
+
var liEle = this.getElement(strNodes[parseInt(i.toString(), 10)]);
|
|
14185
|
+
var id = strNodes[parseInt(i.toString(), 10)];
|
|
14078
14186
|
if (id && this.disableNode.indexOf(id) !== -1) {
|
|
14079
14187
|
this.disableNode.splice(this.disableNode.indexOf(id), 1);
|
|
14080
14188
|
}
|
|
@@ -14088,13 +14196,13 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14088
14196
|
var validID = [];
|
|
14089
14197
|
for (var i = 0, len = nodes.length; i < len; i++) {
|
|
14090
14198
|
var id = void 0;
|
|
14091
|
-
if (typeof nodes[i] ==
|
|
14092
|
-
id = (nodes[i]) ? nodes[i].toString() : null;
|
|
14199
|
+
if (typeof nodes[parseInt(i.toString(), 10)] == 'string') {
|
|
14200
|
+
id = (nodes[parseInt(i.toString(), 10)]) ? nodes[parseInt(i.toString(), 10)].toString() : null;
|
|
14093
14201
|
}
|
|
14094
|
-
else if (typeof nodes[i] ===
|
|
14095
|
-
id = nodes[i] ? nodes[i].getAttribute(
|
|
14202
|
+
else if (typeof nodes[parseInt(i.toString(), 10)] === 'object') {
|
|
14203
|
+
id = nodes[parseInt(i.toString(), 10)] ? nodes[parseInt(i.toString(), 10)].getAttribute('data-uid').toString() : null;
|
|
14096
14204
|
}
|
|
14097
|
-
if (validID.indexOf(id)
|
|
14205
|
+
if (validID.indexOf(id) === -1) {
|
|
14098
14206
|
validID.push(id);
|
|
14099
14207
|
}
|
|
14100
14208
|
}
|
|
@@ -14109,11 +14217,13 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14109
14217
|
}
|
|
14110
14218
|
else if (this.dataType === 2) {
|
|
14111
14219
|
for (var k = 0; k < this.treeData.length; k++) {
|
|
14112
|
-
var id = this.treeData[k
|
|
14220
|
+
var id = this.treeData[parseInt(k.toString(), 10)][this.fields.id]
|
|
14221
|
+
? this.treeData[parseInt(k.toString(), 10)][this.fields.id].toString()
|
|
14222
|
+
: null;
|
|
14113
14223
|
if (node.indexOf(id) !== -1) {
|
|
14114
|
-
this.validArr.push(this.treeData[k]);
|
|
14224
|
+
this.validArr.push(this.treeData[parseInt(k.toString(), 10)]);
|
|
14115
14225
|
}
|
|
14116
|
-
var childItems = getValue(this.fields.child.toString(), this.treeData[k]);
|
|
14226
|
+
var childItems = getValue(this.fields.child.toString(), this.treeData[parseInt(k.toString(), 10)]);
|
|
14117
14227
|
if (childItems) {
|
|
14118
14228
|
this.filterNestedChild(childItems, node);
|
|
14119
14229
|
}
|
|
@@ -14123,11 +14233,13 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14123
14233
|
};
|
|
14124
14234
|
TreeView.prototype.filterNestedChild = function (treeData, nodes) {
|
|
14125
14235
|
for (var k = 0; k < treeData.length; k++) {
|
|
14126
|
-
var id = treeData[k
|
|
14236
|
+
var id = treeData[parseInt(k.toString(), 10)][this.fields.id]
|
|
14237
|
+
? treeData[parseInt(k.toString(), 10)][this.fields.id].toString()
|
|
14238
|
+
: null;
|
|
14127
14239
|
if (nodes.indexOf(id) !== -1) {
|
|
14128
|
-
this.validArr.push(treeData[k]);
|
|
14240
|
+
this.validArr.push(treeData[parseInt(k.toString(), 10)]);
|
|
14129
14241
|
}
|
|
14130
|
-
var childItems = getValue(this.fields.child.toString(), treeData[k]);
|
|
14242
|
+
var childItems = getValue(this.fields.child.toString(), treeData[parseInt(k.toString(), 10)]);
|
|
14131
14243
|
if (childItems) {
|
|
14132
14244
|
this.filterNestedChild(childItems, nodes);
|
|
14133
14245
|
}
|
|
@@ -14141,17 +14253,17 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14141
14253
|
this.removeField(this.treeData, this.fields, ['selected', 'expanded']);
|
|
14142
14254
|
var sleNodes = this.selectedNodes;
|
|
14143
14255
|
for (var l = 0, slelen = sleNodes.length; l < slelen; l++) {
|
|
14144
|
-
this.updateField(this.treeData, this.fields, sleNodes[l], 'selected', true);
|
|
14256
|
+
this.updateField(this.treeData, this.fields, sleNodes[parseInt(l.toString(), 10)], 'selected', true);
|
|
14145
14257
|
}
|
|
14146
14258
|
var enodes = this.expandedNodes;
|
|
14147
14259
|
for (var k = 0, nodelen = enodes.length; k < nodelen; k++) {
|
|
14148
|
-
this.updateField(this.treeData, this.fields, enodes[k], 'expanded', true);
|
|
14260
|
+
this.updateField(this.treeData, this.fields, enodes[parseInt(k.toString(), 10)], 'expanded', true);
|
|
14149
14261
|
}
|
|
14150
14262
|
if (this.showCheckBox) {
|
|
14151
14263
|
this.removeField(this.treeData, this.fields, ['isChecked']);
|
|
14152
14264
|
var cnodes = this.checkedNodes;
|
|
14153
14265
|
for (var m = 0, nodelen = cnodes.length; m < nodelen; m++) {
|
|
14154
|
-
this.updateField(this.treeData, this.fields, cnodes[m], 'isChecked', true);
|
|
14266
|
+
this.updateField(this.treeData, this.fields, cnodes[parseInt(m.toString(), 10)], 'isChecked', true);
|
|
14155
14267
|
}
|
|
14156
14268
|
}
|
|
14157
14269
|
};
|
|
@@ -14161,16 +14273,16 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14161
14273
|
}
|
|
14162
14274
|
for (var i = 0, objlen = obj.length; i < objlen; i++) {
|
|
14163
14275
|
for (var j = 0; j < names.length; j++) {
|
|
14164
|
-
var field = this.getMapperProp(mapper, names[j]);
|
|
14165
|
-
if (!isNullOrUndefined(obj[i][field])) {
|
|
14166
|
-
delete obj[i][field];
|
|
14276
|
+
var field = this.getMapperProp(mapper, names[parseInt(j.toString(), 10)]);
|
|
14277
|
+
if (!isNullOrUndefined(obj[parseInt(i.toString(), 10)]["" + field])) {
|
|
14278
|
+
delete obj[parseInt(i.toString(), 10)]["" + field];
|
|
14167
14279
|
}
|
|
14168
14280
|
}
|
|
14169
|
-
if (typeof mapper.child === 'string' && !isNullOrUndefined(getValue(mapper.child, obj[i]))) {
|
|
14170
|
-
this.removeField(getValue(mapper.child, obj[i]), this.getChildMapper(mapper), names);
|
|
14281
|
+
if (typeof mapper.child === 'string' && !isNullOrUndefined(getValue(mapper.child, obj[parseInt(i.toString(), 10)]))) {
|
|
14282
|
+
this.removeField(getValue(mapper.child, obj[parseInt(i.toString(), 10)]), this.getChildMapper(mapper), names);
|
|
14171
14283
|
}
|
|
14172
|
-
else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', obj[i]))) {
|
|
14173
|
-
this.removeField(getValue('child', obj[i]), this.getChildMapper(mapper), names);
|
|
14284
|
+
else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', obj[parseInt(i.toString(), 10)]))) {
|
|
14285
|
+
this.removeField(getValue('child', obj[parseInt(i.toString(), 10)]), this.getChildMapper(mapper), names);
|
|
14174
14286
|
}
|
|
14175
14287
|
}
|
|
14176
14288
|
};
|
|
@@ -14201,33 +14313,33 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14201
14313
|
this.updateChildField(obj, mapper, id, key, value);
|
|
14202
14314
|
}
|
|
14203
14315
|
};
|
|
14204
|
-
TreeView.prototype.updateChildField = function (obj, mapper, id, key, value, remove
|
|
14316
|
+
TreeView.prototype.updateChildField = function (obj, mapper, id, key, value, remove) {
|
|
14205
14317
|
var removedData;
|
|
14206
14318
|
if (isNullOrUndefined(obj)) {
|
|
14207
14319
|
return removedData;
|
|
14208
14320
|
}
|
|
14209
14321
|
for (var i = 0, objlen = obj.length; i < objlen; i++) {
|
|
14210
|
-
var nodeId = getValue(mapper.id, obj[i]);
|
|
14211
|
-
if (obj[i] && nodeId && nodeId.toString() === id) {
|
|
14212
|
-
if (remove
|
|
14322
|
+
var nodeId = getValue(mapper.id, obj[parseInt(i.toString(), 10)]);
|
|
14323
|
+
if (obj[parseInt(i.toString(), 10)] && nodeId && nodeId.toString() === id) {
|
|
14324
|
+
if (remove) {
|
|
14213
14325
|
removedData = obj.splice(i, 1);
|
|
14214
14326
|
}
|
|
14215
14327
|
else {
|
|
14216
|
-
setValue(this.getMapperProp(mapper, key), value, obj[i]);
|
|
14328
|
+
setValue(this.getMapperProp(mapper, key), value, obj[parseInt(i.toString(), 10)]);
|
|
14217
14329
|
removedData = [];
|
|
14218
14330
|
}
|
|
14219
14331
|
return removedData;
|
|
14220
14332
|
}
|
|
14221
|
-
else if (typeof mapper.child === 'string' && !isNullOrUndefined(getValue(mapper.child, obj[i]))) {
|
|
14222
|
-
var childData = getValue(mapper.child, obj[i]);
|
|
14223
|
-
removedData = this.updateChildField(childData, this.getChildMapper(mapper), id, key, value, remove
|
|
14333
|
+
else if (typeof mapper.child === 'string' && !isNullOrUndefined(getValue(mapper.child, obj[parseInt(i.toString(), 10)]))) {
|
|
14334
|
+
var childData = getValue(mapper.child, obj[parseInt(i.toString(), 10)]);
|
|
14335
|
+
removedData = this.updateChildField(childData, this.getChildMapper(mapper), id, key, value, remove);
|
|
14224
14336
|
if (removedData !== undefined) {
|
|
14225
14337
|
break;
|
|
14226
14338
|
}
|
|
14227
14339
|
}
|
|
14228
|
-
else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', obj[i]))) {
|
|
14229
|
-
var childItems = getValue('child', obj[i]);
|
|
14230
|
-
removedData = this.updateChildField(childItems, this.getChildMapper(mapper), id, key, value, remove
|
|
14340
|
+
else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', obj[parseInt(i.toString(), 10)]))) {
|
|
14341
|
+
var childItems = getValue('child', obj[parseInt(i.toString(), 10)]);
|
|
14342
|
+
removedData = this.updateChildField(childItems, this.getChildMapper(mapper), id, key, value, remove);
|
|
14231
14343
|
if (removedData !== undefined) {
|
|
14232
14344
|
break;
|
|
14233
14345
|
}
|
|
@@ -14240,7 +14352,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14240
14352
|
if (action === 'addNodes') {
|
|
14241
14353
|
var nodeData = [];
|
|
14242
14354
|
for (var i = 0; i < node.length; i++) {
|
|
14243
|
-
nodeData.push(this.getNode(this.getElement(isNullOrUndefined(node[i
|
|
14355
|
+
nodeData.push(this.getNode(this.getElement(isNullOrUndefined(node[parseInt(i.toString(), 10)][this.fields.id])
|
|
14356
|
+
? getValue(this.fields.id, node[parseInt(i.toString(), 10)]).toString()
|
|
14357
|
+
: null)));
|
|
14244
14358
|
}
|
|
14245
14359
|
node = nodeData;
|
|
14246
14360
|
}
|
|
@@ -14253,12 +14367,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14253
14367
|
TreeView.prototype.wireEditingEvents = function (toBind) {
|
|
14254
14368
|
var _this = this;
|
|
14255
14369
|
if (toBind && !this.disabled) {
|
|
14256
|
-
var proxy_2 = this;
|
|
14257
14370
|
this.touchEditObj = new Touch(this.element, {
|
|
14258
14371
|
tap: function (e) {
|
|
14259
14372
|
if (_this.isDoubleTapped(e) && e.tapCount === 2) {
|
|
14260
14373
|
e.originalEvent.preventDefault();
|
|
14261
|
-
|
|
14374
|
+
_this.editingHandler(e.originalEvent);
|
|
14262
14375
|
}
|
|
14263
14376
|
}
|
|
14264
14377
|
});
|
|
@@ -14270,11 +14383,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14270
14383
|
}
|
|
14271
14384
|
};
|
|
14272
14385
|
TreeView.prototype.wireClickEvent = function (toBind) {
|
|
14386
|
+
var _this = this;
|
|
14273
14387
|
if (toBind) {
|
|
14274
|
-
var proxy_3 = this;
|
|
14275
14388
|
this.touchClickObj = new Touch(this.element, {
|
|
14276
14389
|
tap: function (e) {
|
|
14277
|
-
|
|
14390
|
+
_this.clickHandler(e);
|
|
14278
14391
|
}
|
|
14279
14392
|
});
|
|
14280
14393
|
}
|
|
@@ -14287,12 +14400,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14287
14400
|
TreeView.prototype.wireExpandOnEvent = function (toBind) {
|
|
14288
14401
|
var _this = this;
|
|
14289
14402
|
if (toBind) {
|
|
14290
|
-
var proxy_4 = this;
|
|
14291
14403
|
this.touchExpandObj = new Touch(this.element, {
|
|
14292
14404
|
tap: function (e) {
|
|
14293
14405
|
if ((_this.expandOnType === 'Click' || (_this.expandOnType === 'DblClick' && _this.isDoubleTapped(e) && e.tapCount === 2))
|
|
14294
14406
|
&& e.originalEvent.which !== 3) {
|
|
14295
|
-
|
|
14407
|
+
_this.expandHandler(e);
|
|
14296
14408
|
}
|
|
14297
14409
|
}
|
|
14298
14410
|
});
|
|
@@ -14312,7 +14424,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14312
14424
|
EventHandler.add(this.element, 'contextmenu', this.preventContextMenu, this);
|
|
14313
14425
|
}
|
|
14314
14426
|
};
|
|
14315
|
-
|
|
14316
14427
|
TreeView.prototype.preventContextMenu = function (e) {
|
|
14317
14428
|
e.preventDefault();
|
|
14318
14429
|
};
|
|
@@ -14327,7 +14438,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14327
14438
|
this.keyboardModule = new KeyboardEvents(this.element, {
|
|
14328
14439
|
keyAction: this.keyActionHandler.bind(this),
|
|
14329
14440
|
keyConfigs: this.keyConfigs,
|
|
14330
|
-
eventName: 'keydown'
|
|
14441
|
+
eventName: 'keydown'
|
|
14331
14442
|
});
|
|
14332
14443
|
};
|
|
14333
14444
|
TreeView.prototype.unWireEvents = function () {
|
|
@@ -14397,6 +14508,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14397
14508
|
};
|
|
14398
14509
|
/**
|
|
14399
14510
|
* Checks whether the checkedNodes entered are valid and sets the valid checkedNodes while changing via setmodel
|
|
14511
|
+
*
|
|
14512
|
+
* @param {string} node - The unique identifier of the node.
|
|
14513
|
+
* @returns {void}
|
|
14514
|
+
* @private
|
|
14400
14515
|
*/
|
|
14401
14516
|
TreeView.prototype.setValidCheckedNode = function (node) {
|
|
14402
14517
|
if (this.dataType === 1) {
|
|
@@ -14409,7 +14524,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14409
14524
|
var childNodes = this.getChildNodes(this.treeData, parent_4);
|
|
14410
14525
|
var count = 0;
|
|
14411
14526
|
for (var len = 0; len < childNodes.length; len++) {
|
|
14412
|
-
var childId = childNodes[len][this.fields.id].toString();
|
|
14527
|
+
var childId = childNodes[parseInt(len.toString(), 10)][this.fields.id].toString();
|
|
14413
14528
|
if (this.checkedNodes.indexOf(childId) !== -1) {
|
|
14414
14529
|
count++;
|
|
14415
14530
|
}
|
|
@@ -14422,20 +14537,26 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14422
14537
|
}
|
|
14423
14538
|
else if (this.dataType === 2) {
|
|
14424
14539
|
for (var a = 0; a < this.treeData.length; a++) {
|
|
14425
|
-
var index = this.treeData[a][this.fields.id] ? this.treeData[a][this.fields.id].toString() : '';
|
|
14540
|
+
var index = this.treeData[parseInt(a.toString(), 10)][this.fields.id] ? this.treeData[parseInt(a.toString(), 10)][this.fields.id].toString() : '';
|
|
14426
14541
|
if (index === node && this.checkedNodes.indexOf(node) === -1) {
|
|
14427
14542
|
this.checkedNodes.push(node);
|
|
14428
14543
|
break;
|
|
14429
14544
|
}
|
|
14430
|
-
var childItems = getValue(this.fields.child.toString(), this.treeData[a]);
|
|
14545
|
+
var childItems = getValue(this.fields.child.toString(), this.treeData[parseInt(a.toString(), 10)]);
|
|
14431
14546
|
if (childItems) {
|
|
14432
|
-
this.setChildCheckState(childItems, node, this.treeData[a]);
|
|
14547
|
+
this.setChildCheckState(childItems, node, this.treeData[parseInt(a.toString(), 10)]);
|
|
14433
14548
|
}
|
|
14434
14549
|
}
|
|
14435
14550
|
}
|
|
14436
14551
|
};
|
|
14437
14552
|
/**
|
|
14438
14553
|
* Checks whether the checkedNodes entered are valid and sets the valid checkedNodes while changing via setmodel(for hierarchical DS)
|
|
14554
|
+
*
|
|
14555
|
+
* @param {Object[]} childItems - The child items to check.
|
|
14556
|
+
* @param {string} node - The node to set the check state for.
|
|
14557
|
+
* @param {Object} [treeData] - The optional tree data.
|
|
14558
|
+
* @returns {void}
|
|
14559
|
+
* @private
|
|
14439
14560
|
*/
|
|
14440
14561
|
TreeView.prototype.setChildCheckState = function (childItems, node, treeData) {
|
|
14441
14562
|
var checkedParent;
|
|
@@ -14445,7 +14566,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14445
14566
|
checkedParent = treeData[this.fields.id] ? treeData[this.fields.id].toString() : null;
|
|
14446
14567
|
}
|
|
14447
14568
|
for (var index = 0; index < childItems.length; index++) {
|
|
14448
|
-
var checkNode = childItems[index
|
|
14569
|
+
var checkNode = childItems[parseInt(index.toString(), 10)][this.fields.id]
|
|
14570
|
+
? childItems[parseInt(index.toString(), 10)][this.fields.id].toString()
|
|
14571
|
+
: null;
|
|
14449
14572
|
if (treeData && checkedParent && this.autoCheck) {
|
|
14450
14573
|
if (this.checkedNodes.indexOf(checkedParent) !== -1 && this.checkedNodes.indexOf(checkNode) === -1) {
|
|
14451
14574
|
this.checkedNodes.push(checkNode);
|
|
@@ -14465,7 +14588,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14465
14588
|
checkedParent = treeData[this.fields.id] ? treeData[this.fields.id].toString() : '';
|
|
14466
14589
|
}
|
|
14467
14590
|
for (var index = 0; index < childItems.length; index++) {
|
|
14468
|
-
var checkedChild = childItems[index][this.fields.id] ? childItems[index][this.fields.id].toString() : '';
|
|
14591
|
+
var checkedChild = childItems[parseInt(index.toString(), 10)][this.fields.id] ? childItems[parseInt(index.toString(), 10)][this.fields.id].toString() : '';
|
|
14469
14592
|
if (treeData && checkedParent && this.autoCheck) {
|
|
14470
14593
|
if (this.checkedNodes.indexOf(checkedParent) !== -1 && this.checkedNodes.indexOf(checkedChild) === -1) {
|
|
14471
14594
|
this.checkedNodes.push(checkedChild);
|
|
@@ -14474,9 +14597,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14474
14597
|
if (checkedChild === node && this.checkedNodes.indexOf(node) === -1) {
|
|
14475
14598
|
this.checkedNodes.push(node);
|
|
14476
14599
|
}
|
|
14477
|
-
var subChildItems = getValue(this.fields.child.toString(), childItems[index]);
|
|
14600
|
+
var subChildItems = getValue(this.fields.child.toString(), childItems[parseInt(index.toString(), 10)]);
|
|
14478
14601
|
if (subChildItems) {
|
|
14479
|
-
this.setChildCheckState(subChildItems, node, childItems[index]);
|
|
14602
|
+
this.setChildCheckState(subChildItems, node, childItems[parseInt(index.toString(), 10)]);
|
|
14480
14603
|
}
|
|
14481
14604
|
if (this.checkedNodes.indexOf(checkedChild) !== -1 && this.autoCheck) {
|
|
14482
14605
|
count++;
|
|
@@ -14489,7 +14612,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14489
14612
|
};
|
|
14490
14613
|
TreeView.prototype.setIndeterminate = function (nodes) {
|
|
14491
14614
|
for (var i = 0; i < nodes.length; i++) {
|
|
14492
|
-
this.setValidCheckedNode(nodes[i]);
|
|
14615
|
+
this.setValidCheckedNode(nodes[parseInt(i.toString(), 10)]);
|
|
14493
14616
|
}
|
|
14494
14617
|
};
|
|
14495
14618
|
TreeView.prototype.updatePosition = function (id, newData, isRefreshChild, childValue) {
|
|
@@ -14499,7 +14622,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14499
14622
|
if (isRefreshChild) {
|
|
14500
14623
|
this.removeChildNodes(id);
|
|
14501
14624
|
for (var j = 0; j < childValue.length; j++) {
|
|
14502
|
-
this.treeData.splice(pos, 0, childValue[j]);
|
|
14625
|
+
this.treeData.splice(pos, 0, childValue[parseInt(j.toString(), 10)]);
|
|
14503
14626
|
pos++;
|
|
14504
14627
|
}
|
|
14505
14628
|
}
|
|
@@ -14512,20 +14635,20 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14512
14635
|
TreeView.prototype.updateChildPosition = function (treeData, mapper, currID, newData, index) {
|
|
14513
14636
|
var found;
|
|
14514
14637
|
for (var i = 0, objlen = treeData.length; i < objlen; i++) {
|
|
14515
|
-
var nodeId = getValue(mapper.id, treeData[i]);
|
|
14516
|
-
if (treeData[i] && nodeId && nodeId.toString() === currID) {
|
|
14517
|
-
treeData[i] = newData[0];
|
|
14638
|
+
var nodeId = getValue(mapper.id, treeData[parseInt(i.toString(), 10)]);
|
|
14639
|
+
if (treeData[parseInt(i.toString(), 10)] && nodeId && nodeId.toString() === currID) {
|
|
14640
|
+
treeData[parseInt(i.toString(), 10)] = newData[0];
|
|
14518
14641
|
return true;
|
|
14519
14642
|
}
|
|
14520
|
-
else if (typeof mapper.child === 'string' && !isNullOrUndefined(getValue(mapper.child, treeData[i]))) {
|
|
14521
|
-
var childObj = getValue(mapper.child, treeData[i]);
|
|
14643
|
+
else if (typeof mapper.child === 'string' && !isNullOrUndefined(getValue(mapper.child, treeData[parseInt(i.toString(), 10)]))) {
|
|
14644
|
+
var childObj = getValue(mapper.child, treeData[parseInt(i.toString(), 10)]);
|
|
14522
14645
|
found = this.updateChildPosition(childObj, this.getChildMapper(mapper), currID, newData, index);
|
|
14523
14646
|
if (found !== undefined) {
|
|
14524
14647
|
break;
|
|
14525
14648
|
}
|
|
14526
14649
|
}
|
|
14527
|
-
else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', treeData[i]))) {
|
|
14528
|
-
var childData = getValue('child', treeData[i]);
|
|
14650
|
+
else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', treeData[parseInt(i.toString(), 10)]))) {
|
|
14651
|
+
var childData = getValue('child', treeData[parseInt(i.toString(), 10)]);
|
|
14529
14652
|
found = this.updateChildPosition(childData, this.getChildMapper(mapper), currID, newData, index);
|
|
14530
14653
|
if (found !== undefined) {
|
|
14531
14654
|
break;
|
|
@@ -14564,52 +14687,52 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14564
14687
|
nodesID = this.nodeType(nodes);
|
|
14565
14688
|
}
|
|
14566
14689
|
else if (target) {
|
|
14567
|
-
if (typeof target ==
|
|
14690
|
+
if (typeof target == 'string') {
|
|
14568
14691
|
nodesID[0] = target.toString();
|
|
14569
14692
|
}
|
|
14570
|
-
else if (typeof target ===
|
|
14571
|
-
nodesID[0] = target.getAttribute(
|
|
14693
|
+
else if (typeof target === 'object') {
|
|
14694
|
+
nodesID[0] = target.getAttribute('data-uid').toString();
|
|
14572
14695
|
}
|
|
14573
14696
|
}
|
|
14574
14697
|
for (var i = 0, len = nodesID.length; i < len; i++) {
|
|
14575
|
-
var liEle = this.getElement(nodesID[i]);
|
|
14698
|
+
var liEle = this.getElement(nodesID[parseInt(i.toString(), 10)]);
|
|
14576
14699
|
if (isNullOrUndefined(liEle)) {
|
|
14577
14700
|
continue;
|
|
14578
14701
|
}
|
|
14579
|
-
var removedData = this.getNodeObject(nodesID[i]);
|
|
14702
|
+
var removedData = this.getNodeObject(nodesID[parseInt(i.toString(), 10)]);
|
|
14580
14703
|
matchedArr.push(removedData);
|
|
14581
14704
|
}
|
|
14582
14705
|
switch (operation) {
|
|
14583
14706
|
case 'delete':
|
|
14584
|
-
if (nodes.length
|
|
14707
|
+
if (nodes.length === 1) {
|
|
14585
14708
|
crud = data.remove(key, matchedArr[0], query.fromTable, query);
|
|
14586
14709
|
}
|
|
14587
14710
|
else {
|
|
14588
14711
|
changes.deletedRecords = matchedArr;
|
|
14589
14712
|
crud = data.saveChanges(changes, key, query.fromTable, query);
|
|
14590
14713
|
}
|
|
14591
|
-
crud.then(function (
|
|
14714
|
+
crud.then(function () { return _this.deleteSuccess(nodesID); })
|
|
14592
14715
|
.catch(function (e) { return _this.dmFailure(e); });
|
|
14593
14716
|
break;
|
|
14594
14717
|
case 'update':
|
|
14595
14718
|
matchedArr[0][this.fields.text] = newText;
|
|
14596
14719
|
crud = data.update(key, matchedArr[0], query.fromTable, query);
|
|
14597
|
-
crud.then(function (
|
|
14720
|
+
crud.then(function () { return _this.editSucess(target, newText, prevent); })
|
|
14598
14721
|
.catch(function (e) { return _this.dmFailure(e, target, prevent); });
|
|
14599
14722
|
break;
|
|
14600
14723
|
case 'insert':
|
|
14601
|
-
if (newNode.length
|
|
14724
|
+
if (newNode.length === 1) {
|
|
14602
14725
|
crud = data.insert(newNode[0], query.fromTable, query);
|
|
14603
14726
|
}
|
|
14604
14727
|
else {
|
|
14605
14728
|
var arr = [];
|
|
14606
14729
|
for (var i = 0, len = newNode.length; i < len; i++) {
|
|
14607
|
-
arr.push(newNode[i]);
|
|
14730
|
+
arr.push(newNode[parseInt(i.toString(), 10)]);
|
|
14608
14731
|
}
|
|
14609
14732
|
changes.addedRecords = arr;
|
|
14610
14733
|
crud = data.saveChanges(changes, key, query.fromTable, query);
|
|
14611
14734
|
}
|
|
14612
|
-
crud.then(function (
|
|
14735
|
+
crud.then(function () {
|
|
14613
14736
|
var dropLi = _this.getElement(target);
|
|
14614
14737
|
_this.addSuccess(newNode, dropLi, index);
|
|
14615
14738
|
_this.preventExpand = false;
|
|
@@ -14620,7 +14743,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14620
14743
|
TreeView.prototype.deleteSuccess = function (nodes) {
|
|
14621
14744
|
var nodeData = [];
|
|
14622
14745
|
for (var i = 0, len = nodes.length; i < len; i++) {
|
|
14623
|
-
var liEle = this.getElement(nodes[i]);
|
|
14746
|
+
var liEle = this.getElement(nodes[parseInt(i.toString(), 10)]);
|
|
14624
14747
|
nodeData.push(this.getNode(liEle));
|
|
14625
14748
|
if (isNullOrUndefined(liEle)) {
|
|
14626
14749
|
continue;
|
|
@@ -14639,15 +14762,15 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14639
14762
|
this.appendNewText(liEle, txtEle, newText, prevent);
|
|
14640
14763
|
};
|
|
14641
14764
|
TreeView.prototype.addSuccess = function (nodes, dropLi, index) {
|
|
14765
|
+
var _this = this;
|
|
14642
14766
|
var dropUl;
|
|
14643
14767
|
var icon = dropLi ? dropLi.querySelector('.' + ICON) : null;
|
|
14644
|
-
var proxy = this;
|
|
14645
14768
|
if (dropLi && icon && icon.classList.contains(EXPANDABLE) &&
|
|
14646
14769
|
dropLi.querySelector('.' + PARENTITEM) === null) {
|
|
14647
|
-
|
|
14770
|
+
this.renderChildNodes(dropLi, null, function () {
|
|
14648
14771
|
dropUl = dropLi.querySelector('.' + PARENTITEM);
|
|
14649
|
-
|
|
14650
|
-
|
|
14772
|
+
_this.addGivenNodes(nodes, dropLi, index, true, dropUl);
|
|
14773
|
+
_this.triggerEvent('addNodes', nodes);
|
|
14651
14774
|
});
|
|
14652
14775
|
}
|
|
14653
14776
|
else {
|
|
@@ -14668,18 +14791,22 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14668
14791
|
};
|
|
14669
14792
|
TreeView.prototype.getHierarchicalParentId = function (node, data, parentsID) {
|
|
14670
14793
|
var _this = this;
|
|
14671
|
-
var index = data.findIndex(function (data) {
|
|
14672
|
-
|
|
14794
|
+
var index = data.findIndex(function (data) {
|
|
14795
|
+
return data[_this.fields.id] && data[_this.fields.id].toString() === node;
|
|
14796
|
+
});
|
|
14797
|
+
if (index === -1) {
|
|
14673
14798
|
for (var i = 0; i < data.length; i++) {
|
|
14674
|
-
var childItems = getValue(this.fields.child.toString(), data[i]);
|
|
14799
|
+
var childItems = getValue(this.fields.child.toString(), data[parseInt(i.toString(), 10)]);
|
|
14675
14800
|
if (!isNullOrUndefined(childItems)) {
|
|
14676
|
-
index = childItems.findIndex(function (data) {
|
|
14677
|
-
|
|
14801
|
+
index = childItems.findIndex(function (data) {
|
|
14802
|
+
return data[_this.fields.id] && data[_this.fields.id].toString() === node;
|
|
14803
|
+
});
|
|
14804
|
+
if (index === -1) {
|
|
14678
14805
|
this.getHierarchicalParentId(node, childItems, parentsID);
|
|
14679
14806
|
}
|
|
14680
14807
|
else {
|
|
14681
|
-
parentsID.push(data[i][this.fields.id].toString());
|
|
14682
|
-
this.getHierarchicalParentId(data[i][this.fields.id].toString(), this.treeData, parentsID);
|
|
14808
|
+
parentsID.push(data[parseInt(i.toString(), 10)][this.fields.id].toString());
|
|
14809
|
+
this.getHierarchicalParentId(data[parseInt(i.toString(), 10)][this.fields.id].toString(), this.treeData, parentsID);
|
|
14683
14810
|
break;
|
|
14684
14811
|
}
|
|
14685
14812
|
}
|
|
@@ -14689,9 +14816,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14689
14816
|
};
|
|
14690
14817
|
/**
|
|
14691
14818
|
* Called internally if any of the property value changed.
|
|
14692
|
-
*
|
|
14693
|
-
* @param
|
|
14694
|
-
* @
|
|
14819
|
+
*
|
|
14820
|
+
* @param {TreeViewModel} newProp - The new property value.
|
|
14821
|
+
* @param {TreeViewModel} oldProp - The old property value.
|
|
14822
|
+
* @returns {void}
|
|
14695
14823
|
* @private
|
|
14696
14824
|
*/
|
|
14697
14825
|
TreeView.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
@@ -14767,6 +14895,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14767
14895
|
this.isAnimate = false;
|
|
14768
14896
|
this.isFieldChange = true;
|
|
14769
14897
|
this.initialRender = true;
|
|
14898
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14770
14899
|
if (!this.isReact || this.isReact && !(this.fields.dataSource instanceof DataManager)) {
|
|
14771
14900
|
this.reRenderNodes();
|
|
14772
14901
|
}
|
|
@@ -14787,8 +14916,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14787
14916
|
var nodes = this.element.querySelectorAll('li');
|
|
14788
14917
|
var i = 0;
|
|
14789
14918
|
while (i < nodes.length) {
|
|
14790
|
-
if (nodes[i].getAttribute('aria-expanded') !== 'true') {
|
|
14791
|
-
this.renderChildNodes(nodes[i], true, null, true);
|
|
14919
|
+
if (nodes[parseInt(i.toString(), 10)].getAttribute('aria-expanded') !== 'true') {
|
|
14920
|
+
this.renderChildNodes(nodes[parseInt(i.toString(), 10)], true, null, true);
|
|
14792
14921
|
}
|
|
14793
14922
|
i++;
|
|
14794
14923
|
}
|
|
@@ -14821,6 +14950,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14821
14950
|
};
|
|
14822
14951
|
/**
|
|
14823
14952
|
* Removes the component from the DOM and detaches all its related event handlers. It also removes the attributes and classes.
|
|
14953
|
+
*
|
|
14954
|
+
* @returns {void}
|
|
14824
14955
|
*/
|
|
14825
14956
|
TreeView.prototype.destroy = function () {
|
|
14826
14957
|
this.clearTemplate();
|
|
@@ -14856,10 +14987,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14856
14987
|
/**
|
|
14857
14988
|
* Adds the collection of TreeView nodes based on target and index position. If target node is not specified,
|
|
14858
14989
|
* then the nodes are added as children of the given parentID or in the root level of TreeView.
|
|
14859
|
-
*
|
|
14990
|
+
*
|
|
14991
|
+
* @param { object } nodes - Specifies the array of JSON data that has to be added.
|
|
14860
14992
|
* @param { string | Element } target - Specifies ID of TreeView node/TreeView node as target element.
|
|
14861
14993
|
* @param { number } index - Specifies the index to place the newly added nodes in the target element.
|
|
14862
14994
|
* @param { boolean } preventTargetExpand - If set to true, the target parent node will be prevented from auto expanding.
|
|
14995
|
+
* @returns {void}
|
|
14863
14996
|
*/
|
|
14864
14997
|
TreeView.prototype.addNodes = function (nodes, target, index, preventTargetExpand) {
|
|
14865
14998
|
if (isNullOrUndefined(nodes)) {
|
|
@@ -14886,9 +15019,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14886
15019
|
else {
|
|
14887
15020
|
nodes = this.getSortedData(nodes);
|
|
14888
15021
|
for (var i = 0; i < nodes.length; i++) {
|
|
14889
|
-
var pid = getValue(this.fields.parentID, nodes[i]);
|
|
15022
|
+
var pid = getValue(this.fields.parentID, nodes[parseInt(i.toString(), 10)]);
|
|
14890
15023
|
dropLi = pid ? this.getElement(pid.toString()) : pid;
|
|
14891
|
-
this.addGivenNodes([nodes[i]], dropLi, index);
|
|
15024
|
+
this.addGivenNodes([nodes[parseInt(i.toString(), 10)]], dropLi, index);
|
|
14892
15025
|
}
|
|
14893
15026
|
}
|
|
14894
15027
|
this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
|
|
@@ -14906,19 +15039,23 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14906
15039
|
* Editing can also be enabled by using the `beginEdit` property, instead of clicking on the
|
|
14907
15040
|
* TreeView node. On passing the node ID or element through this property, the edit textBox
|
|
14908
15041
|
* will be created for the particular node thus allowing us to edit it.
|
|
15042
|
+
*
|
|
14909
15043
|
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
15044
|
+
* @returns {void}
|
|
14910
15045
|
*/
|
|
14911
15046
|
TreeView.prototype.beginEdit = function (node) {
|
|
14912
15047
|
var ele = this.getElement(node);
|
|
14913
15048
|
if (isNullOrUndefined(ele) || this.disabled) {
|
|
14914
15049
|
return;
|
|
14915
15050
|
}
|
|
14916
|
-
this.createTextbox(ele
|
|
15051
|
+
this.createTextbox(ele);
|
|
14917
15052
|
};
|
|
14918
15053
|
/**
|
|
14919
15054
|
* Checks all the unchecked nodes. You can also check specific nodes by passing array of unchecked nodes
|
|
14920
15055
|
* as argument to this method.
|
|
15056
|
+
*
|
|
14921
15057
|
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView node.
|
|
15058
|
+
* @returns {void}
|
|
14922
15059
|
*/
|
|
14923
15060
|
TreeView.prototype.checkAll = function (nodes) {
|
|
14924
15061
|
if (this.showCheckBox) {
|
|
@@ -14929,9 +15066,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14929
15066
|
* Collapses all the expanded TreeView nodes. You can collapse specific nodes by passing array of nodes as argument to this method.
|
|
14930
15067
|
* You can also collapse all the nodes excluding the hidden nodes by setting **excludeHiddenNodes** to true. If you want to collapse
|
|
14931
15068
|
* a specific level of nodes, set **level** as argument to collapseAll method.
|
|
15069
|
+
*
|
|
14932
15070
|
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/ array of TreeView node.
|
|
14933
15071
|
* @param {number} level - TreeView nodes will collapse up to the given level.
|
|
14934
15072
|
* @param {boolean} excludeHiddenNodes - Whether or not to exclude hidden nodes of TreeView when collapsing all nodes.
|
|
15073
|
+
* @returns {void}
|
|
14935
15074
|
*/
|
|
14936
15075
|
TreeView.prototype.collapseAll = function (nodes, level, excludeHiddenNodes) {
|
|
14937
15076
|
if (!isNullOrUndefined(nodes)) {
|
|
@@ -14948,7 +15087,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14948
15087
|
};
|
|
14949
15088
|
/**
|
|
14950
15089
|
* Disables the collection of nodes by passing the ID of nodes or node elements in the array.
|
|
15090
|
+
*
|
|
14951
15091
|
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView nodes.
|
|
15092
|
+
* @returns {void}
|
|
14952
15093
|
*/
|
|
14953
15094
|
TreeView.prototype.disableNodes = function (nodes) {
|
|
14954
15095
|
if (!isNullOrUndefined(nodes)) {
|
|
@@ -14957,7 +15098,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14957
15098
|
};
|
|
14958
15099
|
/**
|
|
14959
15100
|
* Enables the collection of disabled nodes by passing the ID of nodes or node elements in the array.
|
|
15101
|
+
*
|
|
14960
15102
|
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView nodes.
|
|
15103
|
+
* @returns {void}
|
|
14961
15104
|
*/
|
|
14962
15105
|
TreeView.prototype.enableNodes = function (nodes) {
|
|
14963
15106
|
if (!isNullOrUndefined(nodes)) {
|
|
@@ -14968,18 +15111,20 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14968
15111
|
* Ensures visibility of the TreeView node by using node ID or node element.
|
|
14969
15112
|
* When many TreeView nodes are present and we need to find a particular node, `ensureVisible` property
|
|
14970
15113
|
* helps bring the node to visibility by expanding the TreeView and scrolling to the specific node.
|
|
15114
|
+
*
|
|
14971
15115
|
* @param {string | Element} node - Specifies ID of TreeView node/TreeView nodes.
|
|
15116
|
+
* @returns {void}
|
|
14972
15117
|
*/
|
|
14973
15118
|
TreeView.prototype.ensureVisible = function (node) {
|
|
14974
15119
|
var parentsId = [];
|
|
14975
|
-
if (this.dataType
|
|
15120
|
+
if (this.dataType === 1) {
|
|
14976
15121
|
var nodeData = this.getTreeData(node);
|
|
14977
|
-
while (nodeData.length
|
|
15122
|
+
while (nodeData.length !== 0 && !isNullOrUndefined(nodeData[0][this.fields.parentID])) {
|
|
14978
15123
|
parentsId.push(nodeData[0][this.fields.parentID].toString());
|
|
14979
15124
|
nodeData = this.getTreeData(nodeData[0][this.fields.parentID].toString());
|
|
14980
15125
|
}
|
|
14981
15126
|
}
|
|
14982
|
-
else if (this.dataType
|
|
15127
|
+
else if (this.dataType === 2) {
|
|
14983
15128
|
parentsId = this.getHierarchicalParentId(node, this.treeData, parentsId);
|
|
14984
15129
|
}
|
|
14985
15130
|
this.expandAll(parentsId.reverse());
|
|
@@ -14989,16 +15134,18 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14989
15134
|
var parents = this.parents(liEle, '.' + LISTITEM);
|
|
14990
15135
|
this.expandAll(parents);
|
|
14991
15136
|
}
|
|
14992
|
-
setTimeout(function () { liEle.scrollIntoView({ behavior:
|
|
15137
|
+
setTimeout(function () { liEle.scrollIntoView({ behavior: 'smooth' }); }, 450);
|
|
14993
15138
|
}
|
|
14994
15139
|
};
|
|
14995
15140
|
/**
|
|
14996
15141
|
* Expands all the collapsed TreeView nodes. You can expand the specific nodes by passing the array of collapsed nodes
|
|
14997
15142
|
* as argument to this method. You can also expand all the collapsed nodes by excluding the hidden nodes by setting
|
|
14998
15143
|
* **excludeHiddenNodes** to true to this method. To expand a specific level of nodes, set **level** as argument to expandAll method.
|
|
15144
|
+
*
|
|
14999
15145
|
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView nodes.
|
|
15000
15146
|
* @param {number} level - TreeView nodes will expand up to the given level.
|
|
15001
15147
|
* @param {boolean} excludeHiddenNodes - Whether or not to exclude hidden nodes when expanding all nodes.
|
|
15148
|
+
* @returns {void}
|
|
15002
15149
|
*/
|
|
15003
15150
|
TreeView.prototype.expandAll = function (nodes, level, excludeHiddenNodes) {
|
|
15004
15151
|
if (!isNullOrUndefined(nodes)) {
|
|
@@ -15015,21 +15162,27 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
15015
15162
|
};
|
|
15016
15163
|
/**
|
|
15017
15164
|
* Gets all the checked nodes including child, whether it is loaded or not.
|
|
15165
|
+
*
|
|
15166
|
+
* @returns {string[]} - An array of strings representing the unique identifiers of checked nodes.
|
|
15018
15167
|
*/
|
|
15019
15168
|
TreeView.prototype.getAllCheckedNodes = function () {
|
|
15020
15169
|
var checkNodes = this.checkedNodes;
|
|
15021
15170
|
return checkNodes;
|
|
15022
15171
|
};
|
|
15023
15172
|
/**
|
|
15024
|
-
|
|
15025
|
-
|
|
15173
|
+
* Gets all the disabled nodes including child, whether it is loaded or not.
|
|
15174
|
+
*
|
|
15175
|
+
* @returns {string[]} An array of strings representing the unique identifiers of disabled nodes.
|
|
15176
|
+
*/
|
|
15026
15177
|
TreeView.prototype.getDisabledNodes = function () {
|
|
15027
15178
|
var disabledNodes = this.disableNode;
|
|
15028
15179
|
return disabledNodes;
|
|
15029
15180
|
};
|
|
15030
15181
|
/**
|
|
15031
15182
|
* Gets the node's data such as id, text, parentID, selected, isChecked, and expanded by passing the node element or it's ID.
|
|
15183
|
+
*
|
|
15032
15184
|
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
15185
|
+
* @returns {Object} - The data associated with the specified node.
|
|
15033
15186
|
*/
|
|
15034
15187
|
TreeView.prototype.getNode = function (node) {
|
|
15035
15188
|
var ele = this.getElement(node);
|
|
@@ -15041,8 +15194,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
15041
15194
|
* * If you pass the ID of TreeView node as arguments for this method then it will return the updated data source
|
|
15042
15195
|
* of the corresponding node otherwise it will return the entire updated data source of TreeView.
|
|
15043
15196
|
* * The updated data source also contains custom attributes if you specified in data source.
|
|
15197
|
+
*
|
|
15044
15198
|
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
15045
15199
|
* @isGenericType true
|
|
15200
|
+
* @returns {Object} - The tree data associated with the specified node or element.
|
|
15046
15201
|
*/
|
|
15047
15202
|
TreeView.prototype.getTreeData = function (node) {
|
|
15048
15203
|
var id = this.getId(node);
|
|
@@ -15057,10 +15212,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
15057
15212
|
};
|
|
15058
15213
|
/**
|
|
15059
15214
|
* Moves the collection of nodes within the same TreeView based on target or its index position.
|
|
15215
|
+
*
|
|
15060
15216
|
* @param {string[] | Element[]} sourceNodes - Specifies the array of TreeView nodes ID/array of TreeView node.
|
|
15061
15217
|
* @param {string | Element} target - Specifies ID of TreeView node/TreeView node as target element.
|
|
15062
15218
|
* @param {number} index - Specifies the index to place the moved nodes in the target element.
|
|
15063
15219
|
* @param { boolean } preventTargetExpand - If set to true, the target parent node will be prevented from auto expanding.
|
|
15220
|
+
* @returns {void}
|
|
15064
15221
|
*/
|
|
15065
15222
|
TreeView.prototype.moveNodes = function (sourceNodes, target, index, preventTargetExpand) {
|
|
15066
15223
|
var dropLi = this.getElement(target);
|
|
@@ -15069,13 +15226,13 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
15069
15226
|
return;
|
|
15070
15227
|
}
|
|
15071
15228
|
for (var i = 0; i < sourceNodes.length; i++) {
|
|
15072
|
-
var dragLi = this.getElement(sourceNodes[i]);
|
|
15229
|
+
var dragLi = this.getElement(sourceNodes[parseInt(i.toString(), 10)]);
|
|
15073
15230
|
nodeData.push(this.getNode(dragLi));
|
|
15074
15231
|
if (isNullOrUndefined(dragLi) || dropLi.isSameNode(dragLi) || this.isDescendant(dragLi, dropLi)) {
|
|
15075
15232
|
continue;
|
|
15076
15233
|
}
|
|
15077
15234
|
this.preventExpand = preventTargetExpand;
|
|
15078
|
-
this.dropAsChildNode(dragLi, dropLi, this, index);
|
|
15235
|
+
this.dropAsChildNode(dragLi, dropLi, this, index, null, null, null, dropLi);
|
|
15079
15236
|
}
|
|
15080
15237
|
if (this.fields.dataSource instanceof DataManager === false) {
|
|
15081
15238
|
this.preventExpand = false;
|
|
@@ -15084,35 +15241,35 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
15084
15241
|
};
|
|
15085
15242
|
/**
|
|
15086
15243
|
* Refreshes a particular node of the TreeView.
|
|
15244
|
+
*
|
|
15087
15245
|
* @param {string | Element} target - Specifies the ID of TreeView node or TreeView node as target element.
|
|
15088
|
-
* @param {
|
|
15246
|
+
* @param {Object[]} newData - Specifies the new data of TreeView node.
|
|
15247
|
+
* @returns {void}
|
|
15089
15248
|
*/
|
|
15090
15249
|
TreeView.prototype.refreshNode = function (target, newData) {
|
|
15091
15250
|
if (isNullOrUndefined(target) || isNullOrUndefined(newData)) {
|
|
15092
15251
|
return;
|
|
15093
15252
|
}
|
|
15094
|
-
var id;
|
|
15095
15253
|
var isRefreshChild = false;
|
|
15096
|
-
if (this.dataType
|
|
15254
|
+
if (this.dataType === 1 && newData.length > 1) {
|
|
15097
15255
|
isRefreshChild = true;
|
|
15098
15256
|
}
|
|
15099
|
-
else if (this.dataType
|
|
15257
|
+
else if (this.dataType === 2 && newData.length === 1) {
|
|
15100
15258
|
var updatedChildValue = getValue(this.fields.child.toString(), newData[0]);
|
|
15101
15259
|
if (!isNullOrUndefined(updatedChildValue)) {
|
|
15102
15260
|
isRefreshChild = true;
|
|
15103
15261
|
}
|
|
15104
15262
|
}
|
|
15105
15263
|
var liEle = this.getElement(target);
|
|
15106
|
-
id = liEle ? liEle.getAttribute('data-uid') : ((target) ? target.toString() : null);
|
|
15264
|
+
var id = liEle ? liEle.getAttribute('data-uid') : ((target) ? target.toString() : null);
|
|
15107
15265
|
this.refreshData = this.getNodeObject(id);
|
|
15108
15266
|
newData = JSON.parse(JSON.stringify(newData));
|
|
15109
|
-
/* eslint-disable */
|
|
15110
15267
|
var newNodeData;
|
|
15111
15268
|
var parentData;
|
|
15112
|
-
if (this.dataType
|
|
15269
|
+
if (this.dataType === 1 && isRefreshChild) {
|
|
15113
15270
|
for (var k = 0; k < newData.length; k++) {
|
|
15114
|
-
if (isNullOrUndefined(newData[k][this.fields.parentID])) {
|
|
15115
|
-
parentData = newData[k];
|
|
15271
|
+
if (isNullOrUndefined(newData[parseInt(k.toString(), 10)][this.fields.parentID])) {
|
|
15272
|
+
parentData = newData[parseInt(k.toString(), 10)];
|
|
15116
15273
|
newData.splice(k, 1);
|
|
15117
15274
|
break;
|
|
15118
15275
|
}
|
|
@@ -15135,7 +15292,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
15135
15292
|
var parentEle = liEle.parentElement;
|
|
15136
15293
|
var index = Array.prototype.indexOf.call(parentEle.childNodes, liEle);
|
|
15137
15294
|
remove(liEle);
|
|
15138
|
-
parentEle.insertBefore(newliEle[0], parentEle.childNodes[index]);
|
|
15295
|
+
parentEle.insertBefore(newliEle[0], parentEle.childNodes[parseInt(index.toString(), 10)]);
|
|
15139
15296
|
this.updatePosition(id, newNodeData, isRefreshChild, newData);
|
|
15140
15297
|
if (isRefreshChild && ul) {
|
|
15141
15298
|
this.expandAll([id]);
|
|
@@ -15166,9 +15323,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
15166
15323
|
}
|
|
15167
15324
|
liEle = this.getElement(target);
|
|
15168
15325
|
if (newNodeData[this.fields.tooltip]) {
|
|
15169
|
-
liEle.setAttribute(
|
|
15326
|
+
liEle.setAttribute('title', newNodeData[this.fields.tooltip]);
|
|
15170
15327
|
}
|
|
15171
|
-
if (
|
|
15328
|
+
if (Object.prototype.hasOwnProperty.call(newNodeData, this.fields.htmlAttributes) && newNodeData[this.fields.htmlAttributes]) {
|
|
15172
15329
|
var attr = {};
|
|
15173
15330
|
merge(attr, newNodeData[this.fields.htmlAttributes]);
|
|
15174
15331
|
if (attr.class) {
|
|
@@ -15188,7 +15345,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
15188
15345
|
};
|
|
15189
15346
|
/**
|
|
15190
15347
|
* Removes the collection of TreeView nodes by passing the array of node details as argument to this method.
|
|
15348
|
+
*
|
|
15191
15349
|
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView node.
|
|
15350
|
+
* @returns {void}
|
|
15192
15351
|
*/
|
|
15193
15352
|
TreeView.prototype.removeNodes = function (nodes) {
|
|
15194
15353
|
if (!isNullOrUndefined(nodes)) {
|
|
@@ -15202,8 +15361,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
15202
15361
|
};
|
|
15203
15362
|
/**
|
|
15204
15363
|
* Replaces the text of the TreeView node with the given text.
|
|
15364
|
+
*
|
|
15205
15365
|
* @param {string | Element} target - Specifies ID of TreeView node/TreeView node as target element.
|
|
15206
15366
|
* @param {string} newText - Specifies the new text of TreeView node.
|
|
15367
|
+
* @returns {void}
|
|
15207
15368
|
*/
|
|
15208
15369
|
TreeView.prototype.updateNode = function (target, newText) {
|
|
15209
15370
|
var _this = this;
|
|
@@ -15231,7 +15392,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
15231
15392
|
/**
|
|
15232
15393
|
* Unchecks all the checked nodes. You can also uncheck the specific nodes by passing array of checked nodes
|
|
15233
15394
|
* as argument to this method.
|
|
15395
|
+
*
|
|
15234
15396
|
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView node.
|
|
15397
|
+
* @returns {void}
|
|
15235
15398
|
*/
|
|
15236
15399
|
TreeView.prototype.uncheckAll = function (nodes) {
|
|
15237
15400
|
if (this.showCheckBox) {
|
|
@@ -15380,10 +15543,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
15380
15543
|
return TreeView;
|
|
15381
15544
|
}(Component));
|
|
15382
15545
|
|
|
15383
|
-
/**
|
|
15384
|
-
* TreeView modules
|
|
15385
|
-
*/
|
|
15386
|
-
|
|
15387
15546
|
var __extends$9 = (undefined && undefined.__extends) || (function () {
|
|
15388
15547
|
var extendStatics = function (d, b) {
|
|
15389
15548
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -15438,7 +15597,6 @@ var SIDEBARABSOLUTE = 'e-sidebar-absolute';
|
|
|
15438
15597
|
*/
|
|
15439
15598
|
var Sidebar = /** @__PURE__ @class */ (function (_super) {
|
|
15440
15599
|
__extends$9(Sidebar, _super);
|
|
15441
|
-
/* eslint-enable */
|
|
15442
15600
|
function Sidebar(options, element) {
|
|
15443
15601
|
return _super.call(this, options, element) || this;
|
|
15444
15602
|
}
|
|
@@ -15589,10 +15747,10 @@ var Sidebar = /** @__PURE__ @class */ (function (_super) {
|
|
|
15589
15747
|
this.modal = null;
|
|
15590
15748
|
}
|
|
15591
15749
|
};
|
|
15592
|
-
/* eslint-disable */
|
|
15593
15750
|
/**
|
|
15594
15751
|
* Hide the Sidebar component, if it is in an open state.
|
|
15595
15752
|
*
|
|
15753
|
+
* @param {Event} e - The event triggering the hide action.
|
|
15596
15754
|
* @returns {void}
|
|
15597
15755
|
*
|
|
15598
15756
|
*/
|
|
@@ -15655,10 +15813,10 @@ var Sidebar = /** @__PURE__ @class */ (function (_super) {
|
|
|
15655
15813
|
}
|
|
15656
15814
|
}
|
|
15657
15815
|
};
|
|
15658
|
-
/* eslint-disable */
|
|
15659
15816
|
/**
|
|
15660
15817
|
* Shows the Sidebar component, if it is in closed state.
|
|
15661
15818
|
*
|
|
15819
|
+
* @param {Event} e - The optional event triggering the show action.
|
|
15662
15820
|
* @returns {void}
|
|
15663
15821
|
*/
|
|
15664
15822
|
Sidebar.prototype.show = function (e) {
|
|
@@ -16104,11 +16262,7 @@ var Sidebar = /** @__PURE__ @class */ (function (_super) {
|
|
|
16104
16262
|
return Sidebar;
|
|
16105
16263
|
}(Component));
|
|
16106
16264
|
|
|
16107
|
-
|
|
16108
|
-
* Sidebar modules
|
|
16109
|
-
*/
|
|
16110
|
-
|
|
16111
|
-
var __extends$10 = (undefined && undefined.__extends) || (function () {
|
|
16265
|
+
var __extends$a = (undefined && undefined.__extends) || (function () {
|
|
16112
16266
|
var extendStatics = function (d, b) {
|
|
16113
16267
|
extendStatics = Object.setPrototypeOf ||
|
|
16114
16268
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -16121,7 +16275,7 @@ var __extends$10 = (undefined && undefined.__extends) || (function () {
|
|
|
16121
16275
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16122
16276
|
};
|
|
16123
16277
|
})();
|
|
16124
|
-
var __decorate$
|
|
16278
|
+
var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
16125
16279
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16126
16280
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
16127
16281
|
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;
|
|
@@ -16172,20 +16326,23 @@ var BreadcrumbOverflowMode;
|
|
|
16172
16326
|
BreadcrumbOverflowMode["None"] = "None";
|
|
16173
16327
|
})(BreadcrumbOverflowMode || (BreadcrumbOverflowMode = {}));
|
|
16174
16328
|
var BreadcrumbItem = /** @__PURE__ @class */ (function (_super) {
|
|
16175
|
-
__extends$
|
|
16329
|
+
__extends$a(BreadcrumbItem, _super);
|
|
16176
16330
|
function BreadcrumbItem() {
|
|
16177
16331
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
16178
16332
|
}
|
|
16179
|
-
__decorate$
|
|
16333
|
+
__decorate$a([
|
|
16180
16334
|
Property('')
|
|
16181
16335
|
], BreadcrumbItem.prototype, "text", void 0);
|
|
16182
|
-
__decorate$
|
|
16336
|
+
__decorate$a([
|
|
16337
|
+
Property('')
|
|
16338
|
+
], BreadcrumbItem.prototype, "id", void 0);
|
|
16339
|
+
__decorate$a([
|
|
16183
16340
|
Property('')
|
|
16184
16341
|
], BreadcrumbItem.prototype, "url", void 0);
|
|
16185
|
-
__decorate$
|
|
16342
|
+
__decorate$a([
|
|
16186
16343
|
Property(null)
|
|
16187
16344
|
], BreadcrumbItem.prototype, "iconCss", void 0);
|
|
16188
|
-
__decorate$
|
|
16345
|
+
__decorate$a([
|
|
16189
16346
|
Property(false)
|
|
16190
16347
|
], BreadcrumbItem.prototype, "disabled", void 0);
|
|
16191
16348
|
return BreadcrumbItem;
|
|
@@ -16204,7 +16361,7 @@ var BreadcrumbItem = /** @__PURE__ @class */ (function (_super) {
|
|
|
16204
16361
|
* ```
|
|
16205
16362
|
*/
|
|
16206
16363
|
var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
16207
|
-
__extends$
|
|
16364
|
+
__extends$a(Breadcrumb, _super);
|
|
16208
16365
|
/**
|
|
16209
16366
|
* Constructor for creating the widget.
|
|
16210
16367
|
*
|
|
@@ -16368,6 +16525,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
16368
16525
|
args.item.setAttribute(ARIADISABLED, 'true');
|
|
16369
16526
|
args.item.classList.add(DISABLEDCLASS);
|
|
16370
16527
|
}
|
|
16528
|
+
if (eventArgs.item.id) {
|
|
16529
|
+
args.item.setAttribute('id', eventArgs.item.id);
|
|
16530
|
+
}
|
|
16371
16531
|
if ((eventArgs.item.disabled || _this.disabled) && args.item.children.length && !_this.itemTemplate) {
|
|
16372
16532
|
args.item.children[0].setAttribute(TABINDEX, '-1');
|
|
16373
16533
|
}
|
|
@@ -16388,7 +16548,7 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
16388
16548
|
}
|
|
16389
16549
|
}
|
|
16390
16550
|
};
|
|
16391
|
-
for (var i = 0; i < len; i % 2 && j_1
|
|
16551
|
+
for (var i = 0; i < len; (i % 2 && j_1++), i++) {
|
|
16392
16552
|
isActiveItem = (this.activeItem && (this.activeItem === items[j_1].url ||
|
|
16393
16553
|
this.activeItem === items[j_1].text));
|
|
16394
16554
|
if (isCollasped && i > 1 && i < len - 2) {
|
|
@@ -16490,12 +16650,17 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
16490
16650
|
}
|
|
16491
16651
|
if (this.isReact) {
|
|
16492
16652
|
this.renderReactTemplates();
|
|
16653
|
+
setTimeout(function () {
|
|
16654
|
+
_this.calculateMaxItems();
|
|
16655
|
+
}, 5);
|
|
16493
16656
|
}
|
|
16494
16657
|
if (this.overflowMode === 'Wrap') {
|
|
16495
16658
|
this.element.appendChild(firstOl);
|
|
16496
16659
|
}
|
|
16497
16660
|
this.element.appendChild(ol);
|
|
16498
|
-
this.
|
|
16661
|
+
if (!this.isReact) {
|
|
16662
|
+
this.calculateMaxItems();
|
|
16663
|
+
}
|
|
16499
16664
|
}
|
|
16500
16665
|
};
|
|
16501
16666
|
Breadcrumb.prototype.calculateMaxItems = function () {
|
|
@@ -16568,11 +16733,10 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
16568
16733
|
};
|
|
16569
16734
|
Breadcrumb.prototype.beforeItemRenderChanges = function (prevItem, currItem, elem, isRightIcon) {
|
|
16570
16735
|
var wrapElem = elem.querySelector('.e-anchor-wrap');
|
|
16571
|
-
if (wrapElem
|
|
16736
|
+
if (wrapElem) {
|
|
16572
16737
|
wrapElem.parentElement.setAttribute('aria-label', 'home');
|
|
16573
|
-
wrapElem.parentElement.setAttribute('role', 'link');
|
|
16574
16738
|
}
|
|
16575
|
-
if (currItem.text !== prevItem.text) {
|
|
16739
|
+
if (currItem.text !== prevItem.text && wrapElem) {
|
|
16576
16740
|
wrapElem.childNodes.forEach(function (child) {
|
|
16577
16741
|
if (child.nodeType === Node.TEXT_NODE) {
|
|
16578
16742
|
child.textContent = currItem.text;
|
|
@@ -16663,7 +16827,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
16663
16827
|
this.endIndex = idx;
|
|
16664
16828
|
}
|
|
16665
16829
|
this.trigger('itemClick', { element: li, item: this.items[idx], event: e });
|
|
16666
|
-
|
|
16830
|
+
if (this.items[idx]) {
|
|
16831
|
+
this.activeItem = this.items[idx].url || this.items[idx].text;
|
|
16832
|
+
}
|
|
16667
16833
|
this.dataBind();
|
|
16668
16834
|
}
|
|
16669
16835
|
if (e.target.classList.contains('e-breadcrumb-collapsed')) {
|
|
@@ -16686,7 +16852,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
16686
16852
|
position: { X: 'left', Y: 'bottom' },
|
|
16687
16853
|
collision: { X: 'fit', Y: 'flip' },
|
|
16688
16854
|
open: function () {
|
|
16689
|
-
_this.popupUl
|
|
16855
|
+
if (_this.popupUl) {
|
|
16856
|
+
_this.popupUl.focus();
|
|
16857
|
+
}
|
|
16690
16858
|
}
|
|
16691
16859
|
});
|
|
16692
16860
|
this.popupWireEvents();
|
|
@@ -16831,7 +16999,7 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
16831
16999
|
Breadcrumb.prototype.destroy = function () {
|
|
16832
17000
|
var _this = this;
|
|
16833
17001
|
var classes = [];
|
|
16834
|
-
var attributes
|
|
17002
|
+
var attributes = ['aria-label'];
|
|
16835
17003
|
if (this.cssClass) {
|
|
16836
17004
|
classes.concat(this.cssClass.split(' '));
|
|
16837
17005
|
}
|
|
@@ -16840,7 +17008,7 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
16840
17008
|
}
|
|
16841
17009
|
if (this.disabled) {
|
|
16842
17010
|
classes.push(DISABLEDCLASS);
|
|
16843
|
-
attributes
|
|
17011
|
+
attributes.push(ARIADISABLED);
|
|
16844
17012
|
}
|
|
16845
17013
|
if (this.overflowMode === 'Wrap') {
|
|
16846
17014
|
classes.push(WRAPMODECLASS);
|
|
@@ -16851,67 +17019,63 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
16851
17019
|
this.unWireEvents();
|
|
16852
17020
|
this.element.innerHTML = '';
|
|
16853
17021
|
removeClass([this.element], classes);
|
|
16854
|
-
attributes
|
|
17022
|
+
attributes.forEach(function (attribute) {
|
|
16855
17023
|
_this.element.removeAttribute(attribute);
|
|
16856
17024
|
});
|
|
16857
17025
|
_super.prototype.destroy.call(this);
|
|
16858
17026
|
};
|
|
16859
|
-
__decorate$
|
|
17027
|
+
__decorate$a([
|
|
16860
17028
|
Property('')
|
|
16861
17029
|
], Breadcrumb.prototype, "url", void 0);
|
|
16862
|
-
__decorate$
|
|
17030
|
+
__decorate$a([
|
|
16863
17031
|
Collection([], BreadcrumbItem)
|
|
16864
17032
|
], Breadcrumb.prototype, "items", void 0);
|
|
16865
|
-
__decorate$
|
|
17033
|
+
__decorate$a([
|
|
16866
17034
|
Property('')
|
|
16867
17035
|
], Breadcrumb.prototype, "activeItem", void 0);
|
|
16868
|
-
__decorate$
|
|
17036
|
+
__decorate$a([
|
|
16869
17037
|
Property(-1)
|
|
16870
17038
|
], Breadcrumb.prototype, "maxItems", void 0);
|
|
16871
|
-
__decorate$
|
|
17039
|
+
__decorate$a([
|
|
16872
17040
|
Property('Menu')
|
|
16873
17041
|
], Breadcrumb.prototype, "overflowMode", void 0);
|
|
16874
|
-
__decorate$
|
|
17042
|
+
__decorate$a([
|
|
16875
17043
|
Property('')
|
|
16876
17044
|
], Breadcrumb.prototype, "cssClass", void 0);
|
|
16877
|
-
__decorate$
|
|
17045
|
+
__decorate$a([
|
|
16878
17046
|
Property(null)
|
|
16879
17047
|
], Breadcrumb.prototype, "itemTemplate", void 0);
|
|
16880
|
-
__decorate$
|
|
17048
|
+
__decorate$a([
|
|
16881
17049
|
Property('/')
|
|
16882
17050
|
], Breadcrumb.prototype, "separatorTemplate", void 0);
|
|
16883
|
-
__decorate$
|
|
17051
|
+
__decorate$a([
|
|
16884
17052
|
Property(true)
|
|
16885
17053
|
], Breadcrumb.prototype, "enableNavigation", void 0);
|
|
16886
|
-
__decorate$
|
|
17054
|
+
__decorate$a([
|
|
16887
17055
|
Property(false)
|
|
16888
17056
|
], Breadcrumb.prototype, "enableActiveItemNavigation", void 0);
|
|
16889
|
-
__decorate$
|
|
17057
|
+
__decorate$a([
|
|
16890
17058
|
Property(false)
|
|
16891
17059
|
], Breadcrumb.prototype, "disabled", void 0);
|
|
16892
|
-
__decorate$
|
|
17060
|
+
__decorate$a([
|
|
16893
17061
|
Property('')
|
|
16894
17062
|
], Breadcrumb.prototype, "locale", void 0);
|
|
16895
|
-
__decorate$
|
|
17063
|
+
__decorate$a([
|
|
16896
17064
|
Event()
|
|
16897
17065
|
], Breadcrumb.prototype, "beforeItemRender", void 0);
|
|
16898
|
-
__decorate$
|
|
17066
|
+
__decorate$a([
|
|
16899
17067
|
Event()
|
|
16900
17068
|
], Breadcrumb.prototype, "itemClick", void 0);
|
|
16901
|
-
__decorate$
|
|
17069
|
+
__decorate$a([
|
|
16902
17070
|
Event()
|
|
16903
17071
|
], Breadcrumb.prototype, "created", void 0);
|
|
16904
|
-
Breadcrumb = __decorate$
|
|
17072
|
+
Breadcrumb = __decorate$a([
|
|
16905
17073
|
NotifyPropertyChanges
|
|
16906
17074
|
], Breadcrumb);
|
|
16907
17075
|
return Breadcrumb;
|
|
16908
17076
|
}(Component));
|
|
16909
17077
|
|
|
16910
|
-
|
|
16911
|
-
* Breadcrumb modules
|
|
16912
|
-
*/
|
|
16913
|
-
|
|
16914
|
-
var __extends$11 = (undefined && undefined.__extends) || (function () {
|
|
17078
|
+
var __extends$b = (undefined && undefined.__extends) || (function () {
|
|
16915
17079
|
var extendStatics = function (d, b) {
|
|
16916
17080
|
extendStatics = Object.setPrototypeOf ||
|
|
16917
17081
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -16924,13 +17088,12 @@ var __extends$11 = (undefined && undefined.__extends) || (function () {
|
|
|
16924
17088
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16925
17089
|
};
|
|
16926
17090
|
})();
|
|
16927
|
-
var __decorate$
|
|
17091
|
+
var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
16928
17092
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16929
17093
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
16930
17094
|
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;
|
|
16931
17095
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16932
17096
|
};
|
|
16933
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
16934
17097
|
// Constant variables
|
|
16935
17098
|
var CLS_CAROUSEL = 'e-carousel';
|
|
16936
17099
|
var CLS_ACTIVE$2 = 'e-active';
|
|
@@ -16974,6 +17137,7 @@ var CLS_TRANSITION_END = 'e-transition-end';
|
|
|
16974
17137
|
* Specifies the action (touch & mouse) which enables the slide swiping action in carousel.
|
|
16975
17138
|
* * Touch - Enables or disables the swiping action in touch interaction.
|
|
16976
17139
|
* * Mouse - Enables or disables the swiping action in mouse interaction.
|
|
17140
|
+
*
|
|
16977
17141
|
* @aspNumberEnum
|
|
16978
17142
|
*/
|
|
16979
17143
|
var CarouselSwipeMode;
|
|
@@ -16985,26 +17149,26 @@ var CarouselSwipeMode;
|
|
|
16985
17149
|
})(CarouselSwipeMode || (CarouselSwipeMode = {}));
|
|
16986
17150
|
/** Specifies the carousel individual item. */
|
|
16987
17151
|
var CarouselItem = /** @__PURE__ @class */ (function (_super) {
|
|
16988
|
-
__extends$
|
|
17152
|
+
__extends$b(CarouselItem, _super);
|
|
16989
17153
|
function CarouselItem() {
|
|
16990
17154
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
16991
17155
|
}
|
|
16992
|
-
__decorate$
|
|
17156
|
+
__decorate$b([
|
|
16993
17157
|
Property()
|
|
16994
17158
|
], CarouselItem.prototype, "cssClass", void 0);
|
|
16995
|
-
__decorate$
|
|
17159
|
+
__decorate$b([
|
|
16996
17160
|
Property()
|
|
16997
17161
|
], CarouselItem.prototype, "interval", void 0);
|
|
16998
|
-
__decorate$
|
|
17162
|
+
__decorate$b([
|
|
16999
17163
|
Property()
|
|
17000
17164
|
], CarouselItem.prototype, "template", void 0);
|
|
17001
|
-
__decorate$
|
|
17165
|
+
__decorate$b([
|
|
17002
17166
|
Property()
|
|
17003
17167
|
], CarouselItem.prototype, "htmlAttributes", void 0);
|
|
17004
17168
|
return CarouselItem;
|
|
17005
17169
|
}(ChildProperty));
|
|
17006
17170
|
var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
17007
|
-
__extends$
|
|
17171
|
+
__extends$b(Carousel, _super);
|
|
17008
17172
|
/**
|
|
17009
17173
|
* Constructor for creating the Carousel widget
|
|
17010
17174
|
*
|
|
@@ -17159,15 +17323,16 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
17159
17323
|
this.renderPlayButton();
|
|
17160
17324
|
break;
|
|
17161
17325
|
case 'items':
|
|
17162
|
-
case 'dataSource':
|
|
17326
|
+
case 'dataSource': {
|
|
17163
17327
|
var selectedData = prop === 'dataSource' ? this.dataSource : this.items;
|
|
17164
|
-
if (selectedData.length > 0 && this.selectedIndex >= selectedData.length) {
|
|
17328
|
+
if (!isNullOrUndefined(selectedData) && selectedData.length > 0 && this.selectedIndex >= selectedData.length) {
|
|
17165
17329
|
this.setActiveSlide(selectedData.length - 1, 'Previous');
|
|
17166
17330
|
this.autoSlide();
|
|
17167
17331
|
}
|
|
17168
17332
|
this.reRenderSlides();
|
|
17169
17333
|
this.reRenderIndicators();
|
|
17170
17334
|
break;
|
|
17335
|
+
}
|
|
17171
17336
|
case 'partialVisible':
|
|
17172
17337
|
if (this.partialVisible) {
|
|
17173
17338
|
addClass([this.element], CLS_PARTIAL);
|
|
@@ -17241,7 +17406,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
17241
17406
|
_this.renderSlide(item, item.template, index, _this.itemsContainer, true);
|
|
17242
17407
|
});
|
|
17243
17408
|
}
|
|
17244
|
-
else if (this.dataSource.length > 0) {
|
|
17409
|
+
else if (!isNullOrUndefined(this.dataSource) && this.dataSource.length > 0) {
|
|
17245
17410
|
this.dataSource.slice(-numOfItems).forEach(function (item, index) {
|
|
17246
17411
|
_this.renderSlide(item, _this.itemTemplate, index, _this.itemsContainer, true);
|
|
17247
17412
|
});
|
|
@@ -17253,7 +17418,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
17253
17418
|
_this.renderSlide(item, item.template, index, _this.itemsContainer);
|
|
17254
17419
|
});
|
|
17255
17420
|
}
|
|
17256
|
-
else if (this.dataSource.length > 0) {
|
|
17421
|
+
else if (!isNullOrUndefined(this.dataSource) && this.dataSource.length > 0) {
|
|
17257
17422
|
this.slideItems = this.dataSource;
|
|
17258
17423
|
this.dataSource.forEach(function (item, index) {
|
|
17259
17424
|
_this.renderSlide(item, _this.itemTemplate, index, _this.itemsContainer);
|
|
@@ -17265,7 +17430,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
17265
17430
|
_this.renderSlide(item, item.template, index, _this.itemsContainer, true);
|
|
17266
17431
|
});
|
|
17267
17432
|
}
|
|
17268
|
-
else if (this.dataSource.length > 0) {
|
|
17433
|
+
else if (!isNullOrUndefined(this.dataSource) && this.dataSource.length > 0) {
|
|
17269
17434
|
this.dataSource.slice(0, numOfItems).forEach(function (item, index) {
|
|
17270
17435
|
_this.renderSlide(item, _this.itemTemplate, index, _this.itemsContainer, true);
|
|
17271
17436
|
});
|
|
@@ -17392,7 +17557,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
17392
17557
|
};
|
|
17393
17558
|
Carousel.prototype.renderIndicators = function () {
|
|
17394
17559
|
var _this = this;
|
|
17395
|
-
if (!this.showIndicators) {
|
|
17560
|
+
if (!this.showIndicators || isNullOrUndefined(this.indicatorsType)) {
|
|
17396
17561
|
return;
|
|
17397
17562
|
}
|
|
17398
17563
|
var indicatorClass = 'e-default';
|
|
@@ -17515,8 +17680,8 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
17515
17680
|
return;
|
|
17516
17681
|
}
|
|
17517
17682
|
var itemInterval = this.interval;
|
|
17518
|
-
if (this.items.length > 0 && !isNullOrUndefined(this.items[this.selectedIndex].interval)) {
|
|
17519
|
-
itemInterval = this.items[this.selectedIndex].interval;
|
|
17683
|
+
if (this.items.length > 0 && !isNullOrUndefined(this.items[this.selectedIndex || 0].interval)) {
|
|
17684
|
+
itemInterval = this.items[this.selectedIndex || 0].interval;
|
|
17520
17685
|
}
|
|
17521
17686
|
this.autoSlideInterval = setInterval(function () { return _this.autoSlideChange(); }, itemInterval);
|
|
17522
17687
|
};
|
|
@@ -17525,7 +17690,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
17525
17690
|
this.autoSlideInterval = null;
|
|
17526
17691
|
};
|
|
17527
17692
|
Carousel.prototype.getSlideIndex = function (direction) {
|
|
17528
|
-
var currentIndex = this.selectedIndex;
|
|
17693
|
+
var currentIndex = this.selectedIndex || 0;
|
|
17529
17694
|
if (direction === 'Previous') {
|
|
17530
17695
|
currentIndex--;
|
|
17531
17696
|
if (currentIndex < 0) {
|
|
@@ -17546,6 +17711,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
17546
17711
|
if (this.element.querySelectorAll("." + CLS_ITEM$3 + "." + CLS_PREV_SLIDE + ",." + CLS_ITEM$3 + "." + CLS_NEXT_SLIDE).length > 0) {
|
|
17547
17712
|
return;
|
|
17548
17713
|
}
|
|
17714
|
+
currentIndex = isNullOrUndefined(currentIndex) ? 0 : currentIndex;
|
|
17549
17715
|
var allSlides = [].slice.call(this.element.querySelectorAll("." + CLS_ITEM$3 + ":not(.e-cloned)"));
|
|
17550
17716
|
var activeSlide = this.element.querySelector("." + CLS_ITEM$3 + "." + CLS_ACTIVE$2);
|
|
17551
17717
|
if (isNullOrUndefined(activeSlide) && this.showIndicators) {
|
|
@@ -18147,93 +18313,91 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
18147
18313
|
this.itemsContainer = null;
|
|
18148
18314
|
_super.prototype.destroy.call(this);
|
|
18149
18315
|
};
|
|
18150
|
-
__decorate$
|
|
18316
|
+
__decorate$b([
|
|
18151
18317
|
Collection([], CarouselItem)
|
|
18152
18318
|
], Carousel.prototype, "items", void 0);
|
|
18153
|
-
__decorate$
|
|
18319
|
+
__decorate$b([
|
|
18154
18320
|
Property('Slide')
|
|
18155
18321
|
], Carousel.prototype, "animationEffect", void 0);
|
|
18156
|
-
__decorate$
|
|
18322
|
+
__decorate$b([
|
|
18157
18323
|
Property()
|
|
18158
18324
|
], Carousel.prototype, "previousButtonTemplate", void 0);
|
|
18159
|
-
__decorate$
|
|
18325
|
+
__decorate$b([
|
|
18160
18326
|
Property()
|
|
18161
18327
|
], Carousel.prototype, "nextButtonTemplate", void 0);
|
|
18162
|
-
__decorate$
|
|
18328
|
+
__decorate$b([
|
|
18163
18329
|
Property()
|
|
18164
18330
|
], Carousel.prototype, "indicatorsTemplate", void 0);
|
|
18165
|
-
__decorate$
|
|
18331
|
+
__decorate$b([
|
|
18166
18332
|
Property()
|
|
18167
18333
|
], Carousel.prototype, "playButtonTemplate", void 0);
|
|
18168
|
-
__decorate$
|
|
18334
|
+
__decorate$b([
|
|
18169
18335
|
Property()
|
|
18170
18336
|
], Carousel.prototype, "cssClass", void 0);
|
|
18171
|
-
__decorate$
|
|
18337
|
+
__decorate$b([
|
|
18172
18338
|
Property([])
|
|
18173
18339
|
], Carousel.prototype, "dataSource", void 0);
|
|
18174
|
-
__decorate$
|
|
18340
|
+
__decorate$b([
|
|
18175
18341
|
Property()
|
|
18176
18342
|
], Carousel.prototype, "itemTemplate", void 0);
|
|
18177
|
-
__decorate$
|
|
18343
|
+
__decorate$b([
|
|
18178
18344
|
Property(0)
|
|
18179
18345
|
], Carousel.prototype, "selectedIndex", void 0);
|
|
18180
|
-
__decorate$
|
|
18346
|
+
__decorate$b([
|
|
18181
18347
|
Property('100%')
|
|
18182
18348
|
], Carousel.prototype, "width", void 0);
|
|
18183
|
-
__decorate$
|
|
18349
|
+
__decorate$b([
|
|
18184
18350
|
Property('100%')
|
|
18185
18351
|
], Carousel.prototype, "height", void 0);
|
|
18186
|
-
__decorate$
|
|
18352
|
+
__decorate$b([
|
|
18187
18353
|
Property(5000)
|
|
18188
18354
|
], Carousel.prototype, "interval", void 0);
|
|
18189
|
-
__decorate$
|
|
18355
|
+
__decorate$b([
|
|
18190
18356
|
Property(true)
|
|
18191
18357
|
], Carousel.prototype, "autoPlay", void 0);
|
|
18192
|
-
__decorate$
|
|
18358
|
+
__decorate$b([
|
|
18193
18359
|
Property(true)
|
|
18194
18360
|
], Carousel.prototype, "pauseOnHover", void 0);
|
|
18195
|
-
__decorate$
|
|
18361
|
+
__decorate$b([
|
|
18196
18362
|
Property(true)
|
|
18197
18363
|
], Carousel.prototype, "loop", void 0);
|
|
18198
|
-
__decorate$
|
|
18364
|
+
__decorate$b([
|
|
18199
18365
|
Property(false)
|
|
18200
18366
|
], Carousel.prototype, "showPlayButton", void 0);
|
|
18201
|
-
__decorate$
|
|
18367
|
+
__decorate$b([
|
|
18202
18368
|
Property(true)
|
|
18203
18369
|
], Carousel.prototype, "enableTouchSwipe", void 0);
|
|
18204
|
-
__decorate$
|
|
18370
|
+
__decorate$b([
|
|
18205
18371
|
Property(true)
|
|
18206
18372
|
], Carousel.prototype, "showIndicators", void 0);
|
|
18207
|
-
__decorate$
|
|
18373
|
+
__decorate$b([
|
|
18208
18374
|
Property('Default')
|
|
18209
18375
|
], Carousel.prototype, "indicatorsType", void 0);
|
|
18210
|
-
__decorate$
|
|
18376
|
+
__decorate$b([
|
|
18211
18377
|
Property('Visible')
|
|
18212
18378
|
], Carousel.prototype, "buttonsVisibility", void 0);
|
|
18213
|
-
__decorate$
|
|
18379
|
+
__decorate$b([
|
|
18214
18380
|
Property(false)
|
|
18215
18381
|
], Carousel.prototype, "partialVisible", void 0);
|
|
18216
|
-
__decorate$
|
|
18382
|
+
__decorate$b([
|
|
18217
18383
|
Property(CarouselSwipeMode.Touch)
|
|
18218
18384
|
], Carousel.prototype, "swipeMode", void 0);
|
|
18219
|
-
__decorate$
|
|
18385
|
+
__decorate$b([
|
|
18220
18386
|
Property()
|
|
18221
18387
|
], Carousel.prototype, "htmlAttributes", void 0);
|
|
18222
|
-
__decorate$
|
|
18388
|
+
__decorate$b([
|
|
18223
18389
|
Event()
|
|
18224
18390
|
], Carousel.prototype, "slideChanging", void 0);
|
|
18225
|
-
__decorate$
|
|
18391
|
+
__decorate$b([
|
|
18226
18392
|
Event()
|
|
18227
18393
|
], Carousel.prototype, "slideChanged", void 0);
|
|
18228
|
-
Carousel = __decorate$
|
|
18394
|
+
Carousel = __decorate$b([
|
|
18229
18395
|
NotifyPropertyChanges
|
|
18230
18396
|
], Carousel);
|
|
18231
18397
|
return Carousel;
|
|
18232
18398
|
}(Component));
|
|
18233
18399
|
|
|
18234
|
-
|
|
18235
|
-
|
|
18236
|
-
var __extends$12 = (undefined && undefined.__extends) || (function () {
|
|
18400
|
+
var __extends$c = (undefined && undefined.__extends) || (function () {
|
|
18237
18401
|
var extendStatics = function (d, b) {
|
|
18238
18402
|
extendStatics = Object.setPrototypeOf ||
|
|
18239
18403
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -18246,7 +18410,7 @@ var __extends$12 = (undefined && undefined.__extends) || (function () {
|
|
|
18246
18410
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18247
18411
|
};
|
|
18248
18412
|
})();
|
|
18249
|
-
var __decorate$
|
|
18413
|
+
var __decorate$c = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
18250
18414
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18251
18415
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18252
18416
|
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;
|
|
@@ -18269,7 +18433,7 @@ var CLS_INHERIT = 'e-inherit';
|
|
|
18269
18433
|
* Set <c>CssClass</c> property with <code>e-inherit</code> CSS class to inherit the background and color from AppBar.
|
|
18270
18434
|
*/
|
|
18271
18435
|
var AppBar = /** @__PURE__ @class */ (function (_super) {
|
|
18272
|
-
__extends$
|
|
18436
|
+
__extends$c(AppBar, _super);
|
|
18273
18437
|
/**
|
|
18274
18438
|
* Constructor for creating the AppBar widget
|
|
18275
18439
|
*
|
|
@@ -18302,7 +18466,7 @@ var AppBar = /** @__PURE__ @class */ (function (_super) {
|
|
|
18302
18466
|
AppBar.prototype.render = function () {
|
|
18303
18467
|
this.element.classList.add(CLS_APPBAR);
|
|
18304
18468
|
if (this.element.tagName !== 'HEADER') {
|
|
18305
|
-
this.element.setAttribute('role', '
|
|
18469
|
+
this.element.setAttribute('role', 'banner');
|
|
18306
18470
|
}
|
|
18307
18471
|
if (this.cssClass) {
|
|
18308
18472
|
addClass([this.element], this.cssClass.split(' '));
|
|
@@ -18422,39 +18586,37 @@ var AppBar = /** @__PURE__ @class */ (function (_super) {
|
|
|
18422
18586
|
break;
|
|
18423
18587
|
}
|
|
18424
18588
|
};
|
|
18425
|
-
__decorate$
|
|
18589
|
+
__decorate$c([
|
|
18426
18590
|
Property('Regular')
|
|
18427
18591
|
], AppBar.prototype, "mode", void 0);
|
|
18428
|
-
__decorate$
|
|
18592
|
+
__decorate$c([
|
|
18429
18593
|
Property('Top')
|
|
18430
18594
|
], AppBar.prototype, "position", void 0);
|
|
18431
|
-
__decorate$
|
|
18595
|
+
__decorate$c([
|
|
18432
18596
|
Property()
|
|
18433
18597
|
], AppBar.prototype, "cssClass", void 0);
|
|
18434
|
-
__decorate$
|
|
18598
|
+
__decorate$c([
|
|
18435
18599
|
Property(false)
|
|
18436
18600
|
], AppBar.prototype, "isSticky", void 0);
|
|
18437
|
-
__decorate$
|
|
18601
|
+
__decorate$c([
|
|
18438
18602
|
Property()
|
|
18439
18603
|
], AppBar.prototype, "htmlAttributes", void 0);
|
|
18440
|
-
__decorate$
|
|
18604
|
+
__decorate$c([
|
|
18441
18605
|
Property('Light')
|
|
18442
18606
|
], AppBar.prototype, "colorMode", void 0);
|
|
18443
|
-
__decorate$
|
|
18607
|
+
__decorate$c([
|
|
18444
18608
|
Event()
|
|
18445
18609
|
], AppBar.prototype, "created", void 0);
|
|
18446
|
-
__decorate$
|
|
18610
|
+
__decorate$c([
|
|
18447
18611
|
Event()
|
|
18448
18612
|
], AppBar.prototype, "destroyed", void 0);
|
|
18449
|
-
AppBar = __decorate$
|
|
18613
|
+
AppBar = __decorate$c([
|
|
18450
18614
|
NotifyPropertyChanges
|
|
18451
18615
|
], AppBar);
|
|
18452
18616
|
return AppBar;
|
|
18453
18617
|
}(Component));
|
|
18454
18618
|
|
|
18455
|
-
|
|
18456
|
-
|
|
18457
|
-
var __extends$13 = (undefined && undefined.__extends) || (function () {
|
|
18619
|
+
var __extends$d = (undefined && undefined.__extends) || (function () {
|
|
18458
18620
|
var extendStatics = function (d, b) {
|
|
18459
18621
|
extendStatics = Object.setPrototypeOf ||
|
|
18460
18622
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -18467,7 +18629,7 @@ var __extends$13 = (undefined && undefined.__extends) || (function () {
|
|
|
18467
18629
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18468
18630
|
};
|
|
18469
18631
|
})();
|
|
18470
|
-
var __decorate$
|
|
18632
|
+
var __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
18471
18633
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18472
18634
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18473
18635
|
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;
|
|
@@ -18496,32 +18658,32 @@ var StepStatus;
|
|
|
18496
18658
|
* Specifies the steps of the Stepper.
|
|
18497
18659
|
*/
|
|
18498
18660
|
var Step = /** @__PURE__ @class */ (function (_super) {
|
|
18499
|
-
__extends$
|
|
18661
|
+
__extends$d(Step, _super);
|
|
18500
18662
|
function Step() {
|
|
18501
18663
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
18502
18664
|
}
|
|
18503
|
-
__decorate$
|
|
18665
|
+
__decorate$d([
|
|
18504
18666
|
Property('')
|
|
18505
18667
|
], Step.prototype, "cssClass", void 0);
|
|
18506
|
-
__decorate$
|
|
18668
|
+
__decorate$d([
|
|
18507
18669
|
Property(false)
|
|
18508
18670
|
], Step.prototype, "disabled", void 0);
|
|
18509
|
-
__decorate$
|
|
18671
|
+
__decorate$d([
|
|
18510
18672
|
Property('')
|
|
18511
18673
|
], Step.prototype, "iconCss", void 0);
|
|
18512
|
-
__decorate$
|
|
18674
|
+
__decorate$d([
|
|
18513
18675
|
Property(null)
|
|
18514
18676
|
], Step.prototype, "isValid", void 0);
|
|
18515
|
-
__decorate$
|
|
18677
|
+
__decorate$d([
|
|
18516
18678
|
Property('')
|
|
18517
18679
|
], Step.prototype, "label", void 0);
|
|
18518
|
-
__decorate$
|
|
18680
|
+
__decorate$d([
|
|
18519
18681
|
Property(false)
|
|
18520
18682
|
], Step.prototype, "optional", void 0);
|
|
18521
|
-
__decorate$
|
|
18683
|
+
__decorate$d([
|
|
18522
18684
|
Property(StepStatus.NotStarted)
|
|
18523
18685
|
], Step.prototype, "status", void 0);
|
|
18524
|
-
__decorate$
|
|
18686
|
+
__decorate$d([
|
|
18525
18687
|
Property('')
|
|
18526
18688
|
], Step.prototype, "text", void 0);
|
|
18527
18689
|
return Step;
|
|
@@ -18544,7 +18706,7 @@ var StepperOrientation;
|
|
|
18544
18706
|
* StepperBase component act as base class to the stepper component.
|
|
18545
18707
|
*/
|
|
18546
18708
|
var StepperBase = /** @__PURE__ @class */ (function (_super) {
|
|
18547
|
-
__extends$
|
|
18709
|
+
__extends$d(StepperBase, _super);
|
|
18548
18710
|
/**
|
|
18549
18711
|
* * Constructor for Base class
|
|
18550
18712
|
*
|
|
@@ -18561,13 +18723,14 @@ var StepperBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
18561
18723
|
* @private
|
|
18562
18724
|
* @returns {void}
|
|
18563
18725
|
*/
|
|
18726
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
18564
18727
|
StepperBase.prototype.preRender = function () {
|
|
18565
18728
|
};
|
|
18566
18729
|
/**
|
|
18567
18730
|
* This method is abstract member of the Component<HTMLElement>.
|
|
18568
18731
|
*
|
|
18569
18732
|
* @private
|
|
18570
|
-
* @returns {string}
|
|
18733
|
+
* @returns {string} - It returns the current module name.
|
|
18571
18734
|
*/
|
|
18572
18735
|
StepperBase.prototype.getModuleName = function () {
|
|
18573
18736
|
return 'stepperBase';
|
|
@@ -18576,7 +18739,7 @@ var StepperBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
18576
18739
|
* This method is abstract member of the Component<HTMLElement>.
|
|
18577
18740
|
*
|
|
18578
18741
|
* @private
|
|
18579
|
-
* @returns {string}
|
|
18742
|
+
* @returns {string} - It returns the persisted data.
|
|
18580
18743
|
*/
|
|
18581
18744
|
StepperBase.prototype.getPersistData = function () {
|
|
18582
18745
|
return this.addOnPersist([]);
|
|
@@ -18587,13 +18750,16 @@ var StepperBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
18587
18750
|
* @private
|
|
18588
18751
|
* @returns {void}
|
|
18589
18752
|
*/
|
|
18753
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
18590
18754
|
StepperBase.prototype.render = function () {
|
|
18591
18755
|
};
|
|
18592
18756
|
StepperBase.prototype.updateOrientaion = function (wrapper) {
|
|
18593
18757
|
if (wrapper.classList.contains('e-horizontal') || wrapper.classList.contains('e-vertical')) {
|
|
18594
|
-
wrapper.classList.
|
|
18758
|
+
wrapper.classList.remove('e-horizontal', 'e-vertical');
|
|
18759
|
+
}
|
|
18760
|
+
if (!(isNullOrUndefined(this.orientation))) {
|
|
18761
|
+
wrapper.classList.add('e-' + this.orientation.toLocaleLowerCase());
|
|
18595
18762
|
}
|
|
18596
|
-
wrapper.classList.add('e-' + this.orientation.toLocaleLowerCase());
|
|
18597
18763
|
};
|
|
18598
18764
|
StepperBase.prototype.renderProgressBar = function (wrapper) {
|
|
18599
18765
|
this.progressStep = this.createElement('div', { className: 'e-stepper-progressbar' });
|
|
@@ -18621,7 +18787,7 @@ var StepperBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
18621
18787
|
StepperBase.prototype.setProgressPosition = function (wrapper, isResize) {
|
|
18622
18788
|
var stepItemContainer = (wrapper.querySelector('.e-step-container'));
|
|
18623
18789
|
var stepItemEle = stepItemContainer.firstElementChild;
|
|
18624
|
-
if (isResize
|
|
18790
|
+
if (isResize !== true) {
|
|
18625
18791
|
var topPos = 0;
|
|
18626
18792
|
if (wrapper.classList.contains('e-label-before')) {
|
|
18627
18793
|
topPos = (stepItemContainer.offsetParent.offsetHeight - (stepItemEle.offsetHeight / 2) - 1);
|
|
@@ -18645,39 +18811,36 @@ var StepperBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
18645
18811
|
/**
|
|
18646
18812
|
* This method is abstract member of the Component<HTMLElement>.
|
|
18647
18813
|
*
|
|
18648
|
-
* @param newProp
|
|
18649
|
-
* @param oldProp
|
|
18814
|
+
* @param {StepperBaseModel} newProp - Specifies new properties
|
|
18815
|
+
* @param {StepperBaseModel} oldProp - Specifies old properties
|
|
18650
18816
|
* @private
|
|
18651
18817
|
* @returns {void}
|
|
18652
18818
|
*/
|
|
18819
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
|
|
18653
18820
|
StepperBase.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
18654
18821
|
};
|
|
18655
|
-
__decorate$
|
|
18822
|
+
__decorate$d([
|
|
18656
18823
|
Collection([], Step)
|
|
18657
18824
|
], StepperBase.prototype, "steps", void 0);
|
|
18658
|
-
__decorate$
|
|
18825
|
+
__decorate$d([
|
|
18659
18826
|
Property('')
|
|
18660
18827
|
], StepperBase.prototype, "cssClass", void 0);
|
|
18661
|
-
__decorate$
|
|
18828
|
+
__decorate$d([
|
|
18662
18829
|
Property(false)
|
|
18663
18830
|
], StepperBase.prototype, "readOnly", void 0);
|
|
18664
|
-
__decorate$
|
|
18831
|
+
__decorate$d([
|
|
18665
18832
|
Property(StepperOrientation.Horizontal)
|
|
18666
18833
|
], StepperBase.prototype, "orientation", void 0);
|
|
18667
|
-
__decorate$
|
|
18834
|
+
__decorate$d([
|
|
18668
18835
|
Event()
|
|
18669
18836
|
], StepperBase.prototype, "created", void 0);
|
|
18670
|
-
StepperBase = __decorate$
|
|
18837
|
+
StepperBase = __decorate$d([
|
|
18671
18838
|
NotifyPropertyChanges
|
|
18672
18839
|
], StepperBase);
|
|
18673
18840
|
return StepperBase;
|
|
18674
18841
|
}(Component));
|
|
18675
18842
|
|
|
18676
|
-
|
|
18677
|
-
* export all modules from current location
|
|
18678
|
-
*/
|
|
18679
|
-
|
|
18680
|
-
var __extends$14 = (undefined && undefined.__extends) || (function () {
|
|
18843
|
+
var __extends$e = (undefined && undefined.__extends) || (function () {
|
|
18681
18844
|
var extendStatics = function (d, b) {
|
|
18682
18845
|
extendStatics = Object.setPrototypeOf ||
|
|
18683
18846
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -18690,14 +18853,12 @@ var __extends$14 = (undefined && undefined.__extends) || (function () {
|
|
|
18690
18853
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18691
18854
|
};
|
|
18692
18855
|
})();
|
|
18693
|
-
var __decorate$
|
|
18856
|
+
var __decorate$e = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
18694
18857
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18695
18858
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18696
18859
|
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;
|
|
18697
18860
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
18698
18861
|
};
|
|
18699
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
18700
|
-
///<reference path='../stepper-base/stepper-base-model.d.ts'/>
|
|
18701
18862
|
var ITEMCONTAINER = 'e-step-container';
|
|
18702
18863
|
var ITEMLIST = 'e-stepper-steps';
|
|
18703
18864
|
var ICONCSS = 'e-indicator';
|
|
@@ -18718,7 +18879,7 @@ var LABELAFTER = 'e-label-after';
|
|
|
18718
18879
|
var LABELBEFORE = 'e-label-before';
|
|
18719
18880
|
var VERTICALSTEP = 'e-vertical';
|
|
18720
18881
|
var HORIZSTEP = 'e-horizontal';
|
|
18721
|
-
var STEPICON = 'e-step-
|
|
18882
|
+
var STEPICON = 'e-step-item';
|
|
18722
18883
|
var STEPTEXT = 'e-step-text';
|
|
18723
18884
|
var TEXT = 'e-text';
|
|
18724
18885
|
var STEPSLABEL = 'e-step-label';
|
|
@@ -18732,17 +18893,17 @@ var STEPPERIPROGRESSTIP = 'e-step-inprogress-tip';
|
|
|
18732
18893
|
* Defines the step progress animation of the Stepper.
|
|
18733
18894
|
*/
|
|
18734
18895
|
var StepperAnimationSettings = /** @__PURE__ @class */ (function (_super) {
|
|
18735
|
-
__extends$
|
|
18896
|
+
__extends$e(StepperAnimationSettings, _super);
|
|
18736
18897
|
function StepperAnimationSettings() {
|
|
18737
18898
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
18738
18899
|
}
|
|
18739
|
-
__decorate$
|
|
18900
|
+
__decorate$e([
|
|
18740
18901
|
Property(true)
|
|
18741
18902
|
], StepperAnimationSettings.prototype, "enable", void 0);
|
|
18742
|
-
__decorate$
|
|
18903
|
+
__decorate$e([
|
|
18743
18904
|
Property(2000)
|
|
18744
18905
|
], StepperAnimationSettings.prototype, "duration", void 0);
|
|
18745
|
-
__decorate$
|
|
18906
|
+
__decorate$e([
|
|
18746
18907
|
Property(0)
|
|
18747
18908
|
], StepperAnimationSettings.prototype, "delay", void 0);
|
|
18748
18909
|
return StepperAnimationSettings;
|
|
@@ -18801,7 +18962,7 @@ var StepType;
|
|
|
18801
18962
|
* ```
|
|
18802
18963
|
*/
|
|
18803
18964
|
var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
18804
|
-
__extends$
|
|
18965
|
+
__extends$e(Stepper, _super);
|
|
18805
18966
|
/**
|
|
18806
18967
|
* * Constructor for creating the Stepper component.
|
|
18807
18968
|
*
|
|
@@ -18838,7 +18999,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
18838
18999
|
/**
|
|
18839
19000
|
* To get component name.
|
|
18840
19001
|
*
|
|
18841
|
-
* @returns {string} -
|
|
19002
|
+
* @returns {string} - It returns the current module name.
|
|
18842
19003
|
* @private
|
|
18843
19004
|
*/
|
|
18844
19005
|
Stepper.prototype.getModuleName = function () {
|
|
@@ -18915,8 +19076,10 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
18915
19076
|
}
|
|
18916
19077
|
};
|
|
18917
19078
|
Stepper.prototype.updateStepType = function () {
|
|
18918
|
-
if (this.stepType.toLowerCase() === 'indicator' || 'label' || 'default') {
|
|
18919
|
-
this.stepType.toLowerCase() !== 'default'
|
|
19079
|
+
if (!(isNullOrUndefined(this.stepType)) && (this.stepType.toLowerCase() === 'indicator' || this.stepType.toLowerCase() === 'label' || this.stepType.toLowerCase() === 'default')) {
|
|
19080
|
+
if (this.stepType.toLowerCase() !== 'default') {
|
|
19081
|
+
this.element.classList.add('e-step-type-' + this.stepType.toLowerCase());
|
|
19082
|
+
}
|
|
18920
19083
|
if (((this.stepType.toLowerCase() === 'indicator' || 'label') && (this.labelContainer))) {
|
|
18921
19084
|
this.clearLabelPosition();
|
|
18922
19085
|
}
|
|
@@ -18946,7 +19109,10 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
18946
19109
|
var item = this.steps[parseInt(index.toString(), 10)];
|
|
18947
19110
|
var status_1 = item.status.toLowerCase();
|
|
18948
19111
|
if (isInitial && this.activeStep === 0 && index === 0) {
|
|
19112
|
+
var prevOnChange = this.isProtectedOnChange;
|
|
19113
|
+
this.isProtectedOnChange = true;
|
|
18949
19114
|
item.status = StepStatus.InProgress;
|
|
19115
|
+
this.isProtectedOnChange = prevOnChange;
|
|
18950
19116
|
}
|
|
18951
19117
|
if (item && status_1 !== 'notstarted' && index === this.activeStep) {
|
|
18952
19118
|
for (var i = 0; i < this.steps.length; i++) {
|
|
@@ -18991,12 +19157,13 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
18991
19157
|
this.stepperItemContainer.style.setProperty('--max-width', 100 / this.steps.length + '%');
|
|
18992
19158
|
}
|
|
18993
19159
|
var stepSpan = this.createElement('span', { className: 'e-step' });
|
|
19160
|
+
var item = this.steps[parseInt(index.toString(), 10)];
|
|
18994
19161
|
if (this.renderDefault(index) && (isNullOrUndefined(this.template) || this.template === '')) {
|
|
18995
19162
|
var isIndicator = (!this.element.classList.contains('e-step-type-default') && this.stepType.toLowerCase() === 'indicator') ? true : false;
|
|
18996
19163
|
if (isIndicator) {
|
|
18997
19164
|
stepSpan.classList.add('e-icons', INDICATORICON);
|
|
18998
19165
|
}
|
|
18999
|
-
if (!isIndicator) {
|
|
19166
|
+
if (!isIndicator && item.isValid == null) {
|
|
19000
19167
|
stepSpan.classList.add('e-step-content');
|
|
19001
19168
|
stepSpan.innerHTML = (index + 1).toString();
|
|
19002
19169
|
}
|
|
@@ -19004,15 +19171,22 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19004
19171
|
}
|
|
19005
19172
|
else if (isNullOrUndefined(this.template) || this.template === '') {
|
|
19006
19173
|
var isRender = true;
|
|
19007
|
-
|
|
19008
|
-
|
|
19009
|
-
|
|
19010
|
-
|
|
19011
|
-
|
|
19012
|
-
|
|
19174
|
+
if ((item.iconCss || (!item.iconCss && item.text && item.label)) && (((!item.text && !item.label) ||
|
|
19175
|
+
!this.element.classList.contains(LABELINDICATOR)))) {
|
|
19176
|
+
if (item.iconCss) {
|
|
19177
|
+
var itemIcon = item.iconCss.trim().split(' ');
|
|
19178
|
+
stepSpan.classList.add(ICONCSS);
|
|
19179
|
+
for (var i = 0; i < itemIcon.length; i++) {
|
|
19180
|
+
stepSpan.classList.add(itemIcon[parseInt(i.toString(), 10)]);
|
|
19181
|
+
}
|
|
19182
|
+
this.stepperItemContainer.classList.add(STEPICON);
|
|
19183
|
+
}
|
|
19184
|
+
else if (!item.iconCss && item.text && item.label) {
|
|
19185
|
+
stepSpan.classList.add(ICONCSS);
|
|
19186
|
+
stepSpan.innerHTML = item.text;
|
|
19187
|
+
this.stepperItemContainer.classList.add(STEPICON);
|
|
19013
19188
|
}
|
|
19014
19189
|
this.stepperItemContainer.appendChild(stepSpan);
|
|
19015
|
-
this.stepperItemContainer.classList.add(STEPICON);
|
|
19016
19190
|
if ((this.element.classList.contains(HORIZSTEP) && (this.labelPosition.toLowerCase() === 'start' || this.labelPosition.toLowerCase() === 'end') && item.label) ||
|
|
19017
19191
|
(this.element.classList.contains(VERTICALSTEP) && (this.labelPosition.toLowerCase() === 'top' || this.labelPosition.toLowerCase() === 'bottom') && item.label)) {
|
|
19018
19192
|
this.element.classList.add('e-label-' + this.labelPosition.toLowerCase());
|
|
@@ -19023,8 +19197,13 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19023
19197
|
isRender = false;
|
|
19024
19198
|
}
|
|
19025
19199
|
}
|
|
19026
|
-
if (item.text && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender &&
|
|
19027
|
-
|
|
19200
|
+
if (item.text && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender &&
|
|
19201
|
+
!(item.iconCss && item.label)) {
|
|
19202
|
+
if ((!item.iconCss && this.element.classList.contains(STEPINDICATOR)) ||
|
|
19203
|
+
((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !item.label)) {
|
|
19204
|
+
if (!item.iconCss && !item.label) {
|
|
19205
|
+
this.element.classList.add('e-step-type-indicator');
|
|
19206
|
+
}
|
|
19028
19207
|
this.checkValidState(item, stepSpan);
|
|
19029
19208
|
var prevOnChange = this.isProtectedOnChange;
|
|
19030
19209
|
this.isProtectedOnChange = true;
|
|
@@ -19032,21 +19211,13 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19032
19211
|
this.isProtectedOnChange = prevOnChange;
|
|
19033
19212
|
}
|
|
19034
19213
|
else {
|
|
19035
|
-
this.textContainer = this.createElement('span', { className: TEXTCSS });
|
|
19036
19214
|
var textSpan = this.createElement('span', { className: TEXT });
|
|
19037
19215
|
if (!item.label) {
|
|
19038
19216
|
textSpan.innerText = item.text;
|
|
19039
|
-
|
|
19040
|
-
this.stepperItemContainer.appendChild(
|
|
19217
|
+
textSpan.classList.add(TEXTCSS);
|
|
19218
|
+
this.stepperItemContainer.appendChild(textSpan);
|
|
19041
19219
|
this.stepperItemContainer.classList.add(STEPTEXT);
|
|
19042
19220
|
}
|
|
19043
|
-
if (!item.iconCss || this.element.classList.contains(LABELINDICATOR)) {
|
|
19044
|
-
this.stepperItemContainer.classList.add('e-step-text-only');
|
|
19045
|
-
if (!item.label && item.isValid !== null) {
|
|
19046
|
-
var iconSpan = this.createElement('span', { className: 'e-step-validation-icon e-icons' });
|
|
19047
|
-
this.textContainer.appendChild(iconSpan);
|
|
19048
|
-
}
|
|
19049
|
-
}
|
|
19050
19221
|
if (item.label && this.element.classList.contains(LABELINDICATOR)) {
|
|
19051
19222
|
textSpan.innerText = item.label;
|
|
19052
19223
|
}
|
|
@@ -19056,25 +19227,20 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19056
19227
|
this.isProtectedOnChange = prevOnChange;
|
|
19057
19228
|
}
|
|
19058
19229
|
}
|
|
19059
|
-
if (item.cssClass) {
|
|
19060
|
-
addClass([this.stepperItemContainer], item.cssClass.trim().split(' '));
|
|
19061
|
-
}
|
|
19062
|
-
if (item.disabled) {
|
|
19063
|
-
this.stepperItemContainer.classList[item.disabled ? 'add' : 'remove'](DISABLED$2);
|
|
19064
|
-
attributes(this.stepperItemContainer, { 'tabindex': '-1', 'aria-disabled': 'true' });
|
|
19065
|
-
}
|
|
19066
19230
|
if (item.label && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender) {
|
|
19067
19231
|
if (!item.iconCss && !item.text && this.element.classList.contains(STEPINDICATOR)) {
|
|
19068
19232
|
this.checkValidState(item, stepSpan, true);
|
|
19069
19233
|
}
|
|
19070
|
-
else if ((!((this.element.classList.contains(LABELINDICATOR)) && item.text)) ||
|
|
19234
|
+
else if ((!((this.element.classList.contains(LABELINDICATOR)) && item.text)) ||
|
|
19235
|
+
(this.element.classList.contains(LABELINDICATOR) && item.label)) {
|
|
19071
19236
|
this.labelContainer = this.createElement('span', { className: STEPLABEL });
|
|
19072
19237
|
var labelSpan = this.createElement('span', { className: LABEL });
|
|
19073
19238
|
labelSpan.innerText = item.label;
|
|
19074
19239
|
this.labelContainer.appendChild(labelSpan);
|
|
19075
19240
|
this.stepperItemContainer.classList.add(STEPSLABEL);
|
|
19076
19241
|
this.updateLabelPosition();
|
|
19077
|
-
if ((!item.iconCss && !item.text
|
|
19242
|
+
if ((!item.iconCss && !item.text && !this.stepperItemContainer.classList.contains(STEPICON)) ||
|
|
19243
|
+
this.element.classList.contains(LABELINDICATOR)) {
|
|
19078
19244
|
this.stepperItemContainer.classList.add('e-step-label-only');
|
|
19079
19245
|
if (item.isValid !== null) {
|
|
19080
19246
|
var iconSpan = this.createElement('span', { className: 'e-step-validation-icon e-icons' });
|
|
@@ -19083,22 +19249,37 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19083
19249
|
}
|
|
19084
19250
|
}
|
|
19085
19251
|
}
|
|
19086
|
-
|
|
19087
|
-
|
|
19088
|
-
|
|
19089
|
-
|
|
19090
|
-
|
|
19091
|
-
|
|
19092
|
-
|
|
19093
|
-
|
|
19094
|
-
|
|
19095
|
-
|
|
19096
|
-
|
|
19097
|
-
|
|
19098
|
-
|
|
19252
|
+
}
|
|
19253
|
+
if (item.optional) {
|
|
19254
|
+
var optionalSpan = this.createElement('span', { className: OPTIONAL });
|
|
19255
|
+
this.l10n.setLocale(this.locale);
|
|
19256
|
+
var optionalContent = this.l10n.getConstant('optional');
|
|
19257
|
+
optionalSpan.innerText = optionalContent;
|
|
19258
|
+
if (item.label && (this.labelContainer && ((this.element.classList.contains(LABELAFTER) && !this.stepperItemContainer.classList.contains('e-step-label-only'))
|
|
19259
|
+
|| (this.element.classList.contains(HORIZSTEP) && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains('e-step-label-only'))))
|
|
19260
|
+
|| (this.element.classList.contains(VERTICALSTEP) && this.element.classList.contains(LABELBEFORE))) {
|
|
19261
|
+
this.labelContainer.appendChild(optionalSpan);
|
|
19262
|
+
}
|
|
19263
|
+
else {
|
|
19264
|
+
this.stepperItemContainer.appendChild(optionalSpan);
|
|
19099
19265
|
}
|
|
19100
19266
|
if (item.isValid !== null) {
|
|
19101
|
-
|
|
19267
|
+
this.stepperItemContainer.classList.add(item.isValid ? 'e-step-valid' : 'e-step-error');
|
|
19268
|
+
}
|
|
19269
|
+
}
|
|
19270
|
+
if (item.cssClass) {
|
|
19271
|
+
addClass([this.stepperItemContainer], item.cssClass.trim().split(' '));
|
|
19272
|
+
}
|
|
19273
|
+
if (item.disabled) {
|
|
19274
|
+
this.stepperItemContainer.classList[item.disabled ? 'add' : 'remove'](DISABLED$2);
|
|
19275
|
+
attributes(this.stepperItemContainer, { 'tabindex': '-1', 'aria-disabled': 'true' });
|
|
19276
|
+
}
|
|
19277
|
+
if (item.isValid !== null) {
|
|
19278
|
+
if (item.isValid) {
|
|
19279
|
+
this.stepperItemContainer.classList.add('e-step-valid');
|
|
19280
|
+
}
|
|
19281
|
+
else {
|
|
19282
|
+
this.stepperItemContainer.classList.add('e-step-error');
|
|
19102
19283
|
}
|
|
19103
19284
|
}
|
|
19104
19285
|
this.renderItemContent(index, false);
|
|
@@ -19137,7 +19318,9 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19137
19318
|
var isBeforeLabel = (this.element.classList.contains(LABELBEFORE)) ? true : false;
|
|
19138
19319
|
var isStepVertical = (this.element.classList.contains(VERTICALSTEP)) ? true : false;
|
|
19139
19320
|
if (isStepVertical) {
|
|
19140
|
-
var iconOnly = (this.stepperItemContainer.classList.contains(STEPICON) &&
|
|
19321
|
+
var iconOnly = (this.stepperItemContainer.classList.contains(STEPICON) &&
|
|
19322
|
+
!this.stepperItemContainer.classList.contains(STEPTEXT) &&
|
|
19323
|
+
!this.stepperItemContainer.classList.contains(STEPSLABEL)) ? true : false;
|
|
19141
19324
|
var textEle = (this.stepperItemContainer.querySelector('.' + TEXTCSS));
|
|
19142
19325
|
if (textEle) {
|
|
19143
19326
|
this.textEleWidth = this.textEleWidth < textEle.offsetWidth ? textEle.offsetWidth : this.textEleWidth;
|
|
@@ -19194,7 +19377,12 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19194
19377
|
this.clearLabelPosition();
|
|
19195
19378
|
this.labelContainer.classList.add('e-label-' + this.updateCurrentLabel());
|
|
19196
19379
|
if (this.labelPosition.toLowerCase() === 'start' && this.orientation.toLowerCase() === 'vertical') {
|
|
19197
|
-
|
|
19380
|
+
if (this.stepperItemContainer.firstChild) {
|
|
19381
|
+
this.stepperItemContainer.firstChild.before(this.labelContainer);
|
|
19382
|
+
}
|
|
19383
|
+
else {
|
|
19384
|
+
this.stepperItemContainer.appendChild(this.labelContainer);
|
|
19385
|
+
}
|
|
19198
19386
|
}
|
|
19199
19387
|
else {
|
|
19200
19388
|
this.stepperItemContainer.appendChild(this.labelContainer);
|
|
@@ -19221,15 +19409,31 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19221
19409
|
else {
|
|
19222
19410
|
iconEle = itemElement.querySelector('.' + ICONCSS);
|
|
19223
19411
|
}
|
|
19412
|
+
if (!indicatorEle && this.element.classList.contains(STEPINDICATOR) && this.renderDefault(index)) {
|
|
19413
|
+
indicatorEle = itemElement.querySelector('.' + INDICATORICON);
|
|
19414
|
+
}
|
|
19224
19415
|
var textLabelIcon = itemElement.querySelector('.e-step-validation-icon');
|
|
19225
19416
|
var itemIcon = item.iconCss.trim().split(' ');
|
|
19226
19417
|
var validStep = itemElement.classList.contains('e-step-valid');
|
|
19227
19418
|
if (indicatorEle) {
|
|
19228
|
-
indicatorEle.classList.
|
|
19419
|
+
indicatorEle.classList.remove(INDICATORICON);
|
|
19420
|
+
if (indicatorEle.innerHTML !== '') {
|
|
19421
|
+
indicatorEle.innerHTML = '';
|
|
19422
|
+
}
|
|
19423
|
+
indicatorEle.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info', ICONCSS);
|
|
19424
|
+
}
|
|
19425
|
+
if (this.renderDefault(index) && !this.element.classList.contains(STEPINDICATOR)) {
|
|
19426
|
+
var stepSpan = itemElement.querySelector('.e-step');
|
|
19427
|
+
stepSpan.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info', ICONCSS);
|
|
19229
19428
|
}
|
|
19230
19429
|
if (iconEle) {
|
|
19231
|
-
|
|
19232
|
-
iconEle.
|
|
19430
|
+
if (iconEle.innerHTML !== '') {
|
|
19431
|
+
iconEle.innerHTML = '';
|
|
19432
|
+
}
|
|
19433
|
+
else if (itemIcon.length > 0) {
|
|
19434
|
+
for (var i = 0; i < itemIcon.length; i++) {
|
|
19435
|
+
iconEle.classList.remove(itemIcon[parseInt(i.toString(), 10)]);
|
|
19436
|
+
}
|
|
19233
19437
|
}
|
|
19234
19438
|
iconEle.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info');
|
|
19235
19439
|
}
|
|
@@ -19286,7 +19490,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19286
19490
|
this.updateTooltipContent(index);
|
|
19287
19491
|
this.tooltipObj.open(this.stepperItemElements[parseInt((index).toString(), 10)]);
|
|
19288
19492
|
if (this.stepType.toLocaleLowerCase() !== 'label' && ((this.stepType.toLocaleLowerCase() === 'indicator') ||
|
|
19289
|
-
(currentStep.label !== '' && currentStep.iconCss !== ''))) {
|
|
19493
|
+
(currentStep.label !== '' && currentStep.iconCss !== '') || (currentStep.label === null && currentStep.iconCss === '' && currentStep.text !== ''))) {
|
|
19290
19494
|
var tooltipPopupClass = currentStep.status.toLowerCase() === 'inprogress' ?
|
|
19291
19495
|
STEPPERTOOLTIP + " " + STEPPERIPROGRESSTIP + " " + (this.cssClass ? this.cssClass : '') : STEPPERTOOLTIP + " " + (this.cssClass ? this.cssClass : '');
|
|
19292
19496
|
this.tooltipObj.setProperties({ cssClass: tooltipPopupClass.trim() });
|
|
@@ -19338,8 +19542,12 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19338
19542
|
this.removeItemContent(listItems[parseInt((index).toString(), 10)]);
|
|
19339
19543
|
}
|
|
19340
19544
|
if (this.template) {
|
|
19341
|
-
|
|
19545
|
+
if (isrerender) {
|
|
19546
|
+
listItems[parseInt((index).toString(), 10)].classList.add(TEMPLATE);
|
|
19547
|
+
}
|
|
19548
|
+
else {
|
|
19342
19549
|
this.stepperItemContainer.classList.add(TEMPLATE);
|
|
19550
|
+
}
|
|
19343
19551
|
var item = this.steps[parseInt(index.toString(), 10)];
|
|
19344
19552
|
append(this.templateFunction({ step: item, currentStep: index }, this, 'stepperTemplate', (this.element.id + '_stepperTemplate'), this.isStringTemplate), isrerender ? listItems[parseInt((index).toString(), 10)] : this.stepperItemContainer);
|
|
19345
19553
|
}
|
|
@@ -19396,7 +19604,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19396
19604
|
element: itemElement, event: e, isInteracted: isInteracted,
|
|
19397
19605
|
previousStep: this.activeStep, activeStep: index, cancel: false
|
|
19398
19606
|
};
|
|
19399
|
-
if (isUpdated
|
|
19607
|
+
if (isUpdated !== false) {
|
|
19400
19608
|
var previousStep_1 = this.activeStep;
|
|
19401
19609
|
this.trigger('stepChanging', eventArgs, function (args) {
|
|
19402
19610
|
if (args.cancel) {
|
|
@@ -19433,13 +19641,17 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19433
19641
|
}
|
|
19434
19642
|
if (this.activeStep >= 0 && this.progressbar) {
|
|
19435
19643
|
if (this.element.classList.contains(HORIZSTEP)) {
|
|
19436
|
-
if ((this.element.classList.contains(LABELBEFORE) || this.element.classList.contains(LABELAFTER)) &&
|
|
19644
|
+
if ((this.element.classList.contains(LABELBEFORE) || this.element.classList.contains(LABELAFTER)) &&
|
|
19645
|
+
!this.element.classList.contains(STEPINDICATOR) &&
|
|
19437
19646
|
this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(STEPICON)) {
|
|
19438
19647
|
var progressPos = this.element.querySelector('.e-stepper-progressbar');
|
|
19439
|
-
var selectedEle = this.stepperItemElements[parseInt(this.activeStep.toString(), 10)]
|
|
19440
|
-
|
|
19648
|
+
var selectedEle = this.stepperItemElements[parseInt(this.activeStep.toString(), 10)]
|
|
19649
|
+
.firstChild;
|
|
19650
|
+
var value = this.activeStep === 0 ? 0 : (selectedEle.offsetLeft - progressPos.offsetLeft +
|
|
19651
|
+
(selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
|
|
19441
19652
|
if (this.element.classList.contains(RTL$3)) {
|
|
19442
|
-
value = (progressPos.getBoundingClientRect().right - selectedEle.getBoundingClientRect().right +
|
|
19653
|
+
value = (progressPos.getBoundingClientRect().right - selectedEle.getBoundingClientRect().right +
|
|
19654
|
+
(selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
|
|
19443
19655
|
this.progressbar.style.setProperty(PROGRESSVALUE$1, (value) + '%');
|
|
19444
19656
|
}
|
|
19445
19657
|
else {
|
|
@@ -19453,15 +19665,19 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19453
19665
|
totalLiWidth = totalLiWidth + this.stepperItemElements[parseInt(j.toString(), 10)].offsetWidth;
|
|
19454
19666
|
if (j <= this.activeStep) {
|
|
19455
19667
|
if (j < this.activeStep) {
|
|
19456
|
-
activeLiWidth = activeLiWidth +
|
|
19668
|
+
activeLiWidth = activeLiWidth +
|
|
19669
|
+
this.stepperItemElements[parseInt(j.toString(), 10)].offsetWidth;
|
|
19457
19670
|
}
|
|
19458
|
-
else if (j
|
|
19459
|
-
activeLiWidth = activeLiWidth +
|
|
19671
|
+
else if (j === this.activeStep && j !== 0) {
|
|
19672
|
+
activeLiWidth = activeLiWidth +
|
|
19673
|
+
(this.stepperItemElements[parseInt(j.toString(), 10)].offsetWidth / 2);
|
|
19460
19674
|
}
|
|
19461
19675
|
}
|
|
19462
19676
|
}
|
|
19463
|
-
var spaceWidth = (this.stepperItemList.offsetWidth - totalLiWidth) /
|
|
19464
|
-
|
|
19677
|
+
var spaceWidth = (this.stepperItemList.offsetWidth - totalLiWidth) /
|
|
19678
|
+
(this.stepperItemElements.length - 1);
|
|
19679
|
+
var progressValue = ((activeLiWidth + (spaceWidth * this.activeStep)) /
|
|
19680
|
+
this.stepperItemList.offsetWidth) * 100;
|
|
19465
19681
|
this.progressbar.style.setProperty(PROGRESSVALUE$1, (progressValue) + '%');
|
|
19466
19682
|
}
|
|
19467
19683
|
}
|
|
@@ -19490,7 +19706,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19490
19706
|
var prevOnChange_1 = this.isProtectedOnChange;
|
|
19491
19707
|
this.isProtectedOnChange = true;
|
|
19492
19708
|
if (isUpdated !== false) {
|
|
19493
|
-
if (i < this.activeStep || (this.steps.length - 1 === this.activeStep && item.status.toLowerCase() ===
|
|
19709
|
+
if (i < this.activeStep || (this.steps.length - 1 === this.activeStep && item.status.toLowerCase() === 'completed')) {
|
|
19494
19710
|
item.status = StepStatus.Completed;
|
|
19495
19711
|
}
|
|
19496
19712
|
else if (i === this.activeStep) {
|
|
@@ -19502,17 +19718,17 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19502
19718
|
if (stepStatus && this.activeStep === i) {
|
|
19503
19719
|
item.status = stepStatus;
|
|
19504
19720
|
}
|
|
19505
|
-
if (item.status.toLowerCase() ===
|
|
19721
|
+
if (item.status.toLowerCase() === 'completed') {
|
|
19506
19722
|
itemElement.classList.remove(SELECTED$2, INPROGRESS, NOTSTARTED);
|
|
19507
19723
|
itemElement.classList.add(COMPLETED);
|
|
19508
19724
|
}
|
|
19509
|
-
if (item.status.toLowerCase() ===
|
|
19725
|
+
if (item.status.toLowerCase() === 'notstarted') {
|
|
19510
19726
|
itemElement.classList.remove(SELECTED$2, INPROGRESS, COMPLETED);
|
|
19511
19727
|
itemElement.classList.add(NOTSTARTED);
|
|
19512
19728
|
}
|
|
19513
19729
|
}
|
|
19514
19730
|
this.isProtectedOnChange = prevOnChange_1;
|
|
19515
|
-
if (this.renderDefault(i) && this.element.classList.contains(STEPINDICATOR)) {
|
|
19731
|
+
if (this.renderDefault(i) && this.element.classList.contains(STEPINDICATOR) && !itemElement.classList.contains('e-step-valid') && !itemElement.classList.contains('e-step-error')) {
|
|
19516
19732
|
if (itemElement.classList.contains(COMPLETED)) {
|
|
19517
19733
|
itemElement.firstChild.classList.remove('e-icons', 'e-step-indicator');
|
|
19518
19734
|
itemElement.firstChild.classList.add(ICONCSS, 'e-icons', 'e-check');
|
|
@@ -19652,10 +19868,10 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19652
19868
|
}
|
|
19653
19869
|
if ((e.action === 'home' || e.action === 'end')) {
|
|
19654
19870
|
if (e.action === 'home') {
|
|
19655
|
-
isRTL ?
|
|
19871
|
+
index = isRTL ? stepItems.length - 1 : 0;
|
|
19656
19872
|
}
|
|
19657
19873
|
else {
|
|
19658
|
-
isRTL ?
|
|
19874
|
+
index = isRTL ? 0 : stepItems.length - 1;
|
|
19659
19875
|
}
|
|
19660
19876
|
}
|
|
19661
19877
|
if (index >= 0 && index < stepItems.length) {
|
|
@@ -19685,10 +19901,18 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19685
19901
|
this.updateElementClassArray();
|
|
19686
19902
|
this.removeItemElements();
|
|
19687
19903
|
this.element.querySelector('.e-stepper-progressbar').remove();
|
|
19688
|
-
|
|
19689
|
-
|
|
19690
|
-
|
|
19691
|
-
|
|
19904
|
+
if (isUpdate) {
|
|
19905
|
+
this.updatePosition();
|
|
19906
|
+
}
|
|
19907
|
+
if (isStepType) {
|
|
19908
|
+
this.updateStepType();
|
|
19909
|
+
}
|
|
19910
|
+
if (this.readOnly && !this.element.classList.contains(READONLY)) {
|
|
19911
|
+
this.element.classList.add(READONLY);
|
|
19912
|
+
}
|
|
19913
|
+
if (this.enableRtl && !this.element.classList.contains(RTL$3)) {
|
|
19914
|
+
this.element.classList.add(RTL$3);
|
|
19915
|
+
}
|
|
19692
19916
|
this.updateOrientaion(this.element);
|
|
19693
19917
|
this.renderItems();
|
|
19694
19918
|
this.renderProgressBar(this.element);
|
|
@@ -19743,8 +19967,10 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19743
19967
|
this.renderStepperItems(true);
|
|
19744
19968
|
break;
|
|
19745
19969
|
case 'activeStep':
|
|
19746
|
-
this.activeStep = (newProp.activeStep > this.steps.length - 1 || newProp.activeStep < -1) ?
|
|
19747
|
-
|
|
19970
|
+
this.activeStep = (newProp.activeStep > this.steps.length - 1 || newProp.activeStep < -1) ?
|
|
19971
|
+
oldProp.activeStep : this.activeStep;
|
|
19972
|
+
if (this.activeStep >= 0 && this.stepperItemElements[parseInt(this.activeStep.toString(), 10)]
|
|
19973
|
+
.classList.contains(DISABLED$2)) {
|
|
19748
19974
|
this.activeStep = oldProp.activeStep;
|
|
19749
19975
|
}
|
|
19750
19976
|
if (this.linear) {
|
|
@@ -19793,53 +20019,47 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19793
20019
|
}
|
|
19794
20020
|
}
|
|
19795
20021
|
};
|
|
19796
|
-
__decorate$
|
|
20022
|
+
__decorate$e([
|
|
19797
20023
|
Property(0)
|
|
19798
20024
|
], Stepper.prototype, "activeStep", void 0);
|
|
19799
|
-
__decorate$
|
|
20025
|
+
__decorate$e([
|
|
19800
20026
|
Complex({}, StepperAnimationSettings)
|
|
19801
20027
|
], Stepper.prototype, "animation", void 0);
|
|
19802
|
-
__decorate$
|
|
20028
|
+
__decorate$e([
|
|
19803
20029
|
Property(false)
|
|
19804
20030
|
], Stepper.prototype, "linear", void 0);
|
|
19805
|
-
__decorate$
|
|
20031
|
+
__decorate$e([
|
|
19806
20032
|
Property(false)
|
|
19807
20033
|
], Stepper.prototype, "showTooltip", void 0);
|
|
19808
|
-
__decorate$
|
|
20034
|
+
__decorate$e([
|
|
19809
20035
|
Property('')
|
|
19810
20036
|
], Stepper.prototype, "template", void 0);
|
|
19811
|
-
__decorate$
|
|
20037
|
+
__decorate$e([
|
|
19812
20038
|
Property('')
|
|
19813
20039
|
], Stepper.prototype, "tooltipTemplate", void 0);
|
|
19814
|
-
__decorate$
|
|
20040
|
+
__decorate$e([
|
|
19815
20041
|
Property(StepLabelPosition.Bottom)
|
|
19816
20042
|
], Stepper.prototype, "labelPosition", void 0);
|
|
19817
|
-
__decorate$
|
|
20043
|
+
__decorate$e([
|
|
19818
20044
|
Property(StepType.Default)
|
|
19819
20045
|
], Stepper.prototype, "stepType", void 0);
|
|
19820
|
-
__decorate$
|
|
20046
|
+
__decorate$e([
|
|
19821
20047
|
Event()
|
|
19822
20048
|
], Stepper.prototype, "stepChanged", void 0);
|
|
19823
|
-
__decorate$
|
|
20049
|
+
__decorate$e([
|
|
19824
20050
|
Event()
|
|
19825
20051
|
], Stepper.prototype, "stepChanging", void 0);
|
|
19826
|
-
__decorate$
|
|
20052
|
+
__decorate$e([
|
|
19827
20053
|
Event()
|
|
19828
20054
|
], Stepper.prototype, "stepClick", void 0);
|
|
19829
|
-
__decorate$
|
|
20055
|
+
__decorate$e([
|
|
19830
20056
|
Event()
|
|
19831
20057
|
], Stepper.prototype, "beforeStepRender", void 0);
|
|
19832
|
-
Stepper = __decorate$
|
|
20058
|
+
Stepper = __decorate$e([
|
|
19833
20059
|
NotifyPropertyChanges
|
|
19834
20060
|
], Stepper);
|
|
19835
20061
|
return Stepper;
|
|
19836
20062
|
}(StepperBase));
|
|
19837
20063
|
|
|
19838
|
-
|
|
19839
|
-
|
|
19840
|
-
/**
|
|
19841
|
-
* Navigation all modules
|
|
19842
|
-
*/
|
|
19843
|
-
|
|
19844
|
-
export { MenuAnimationSettings, MenuItem, FieldSettings, HScroll, VScroll, addScrolling, destroyScroll, Item, Toolbar, AccordionActionSettings, AccordionAnimationSettings, AccordionItem, Accordion, ContextMenu, Menu, TabActionSettings, TabAnimationSettings, Header, TabItem, Tab, FieldsSettings, ActionSettings, NodeAnimationSettings, TreeView, Sidebar, BreadcrumbOverflowMode, BreadcrumbItem, Breadcrumb, CarouselSwipeMode, CarouselItem, Carousel, AppBar, StepStatus, Step, StepperOrientation, StepperBase, StepperAnimationSettings, StepLabelPosition, StepType, Stepper };
|
|
20064
|
+
export { Accordion, AccordionActionSettings, AccordionAnimationSettings, AccordionItem, ActionSettings, AppBar, Breadcrumb, BreadcrumbItem, BreadcrumbOverflowMode, Carousel, CarouselItem, CarouselSwipeMode, ContextMenu, FieldSettings, FieldsSettings, HScroll, Header, Item, Menu, MenuAnimationSettings, MenuItem, NodeAnimationSettings, Sidebar, Step, StepLabelPosition, StepStatus, StepType, Stepper, StepperAnimationSettings, StepperBase, StepperOrientation, Tab, TabActionSettings, TabAnimationSettings, TabItem, Toolbar, TreeView, VScroll, addScrolling, destroyScroll };
|
|
19845
20065
|
//# sourceMappingURL=ej2-navigations.es5.js.map
|