@progress/kendo-angular-dropdowns 6.0.2-dev.202202251358 → 7.0.0-next.202203232111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/es2015/autocomplete → autocomplete}/autocomplete.component.d.ts +34 -22
- package/{dist/es2015/autocomplete → autocomplete}/autocomplete.module.d.ts +7 -0
- package/bundles/kendo-angular-dropdowns.umd.js +5 -0
- package/{dist/es2015/comboboxes → comboboxes}/combobox-column/column-cell-template.directive.d.ts +3 -0
- package/{dist/es2015/comboboxes → comboboxes}/combobox-column/column-header-template.directive.d.ts +3 -0
- package/{dist/es2015/comboboxes → comboboxes}/combobox-column/combobox-column.component.d.ts +3 -0
- package/{dist/es2015/comboboxes → comboboxes}/combobox-column/util.d.ts +0 -0
- package/{dist/es2015/comboboxes → comboboxes}/combobox.component.d.ts +40 -26
- package/comboboxes/combobox.module.d.ts +31 -0
- package/{dist/es2015/comboboxes → comboboxes}/multicolumncombobox.component.d.ts +8 -5
- package/{dist/es2015/common → common}/constants/error-messages.d.ts +27 -27
- package/{dist/es2015/common → common}/constants/touch-enabled.d.ts +0 -0
- package/{dist/es2015/common → common}/data.service.d.ts +6 -2
- package/{dist/es2015/common → common}/disabled-items/disabled-items.service.d.ts +3 -0
- package/{dist/es2015/common → common}/disabled-items/item-disabled.d.ts +0 -0
- package/{dist/es2015/common → common}/filter-input.directive.d.ts +3 -0
- package/{dist/es2015/common → common}/filtering/filter-settings.d.ts +0 -0
- package/{dist/es2015/common → common}/filtering/filter.directive.d.ts +6 -2
- package/{dist/es2015/common → common}/filtering/filterable-component.d.ts +0 -0
- package/{dist/es2015/common → common}/list-item.directive.d.ts +3 -0
- package/{dist/es2015/common → common}/list.component.d.ts +11 -6
- package/{dist/es2015/common → common}/localization/custom-messages.component.d.ts +4 -1
- package/{dist/es2015/common → common}/localization/localized-messages.directive.d.ts +3 -0
- package/{dist/es2015/common → common}/localization/messages.d.ts +3 -0
- package/{dist/es2015/common → common}/models/checkboxes-settings.d.ts +1 -1
- package/{dist/es2015/common → common}/models/direction.d.ts +0 -0
- package/{dist/es2015/common → common}/models/fillmode.d.ts +0 -0
- package/{dist/es2015/common → common}/models/list-type.d.ts +0 -0
- package/{dist/es2015/common → common}/models/page-change-event.d.ts +0 -0
- package/{dist/es2015/common → common}/models/popup-settings.d.ts +0 -0
- package/{dist/es2015/common → common}/models/preventable-event.d.ts +0 -0
- package/{dist/es2015/common → common}/models/remove-tag-event.d.ts +0 -0
- package/{dist/es2015/common → common}/models/rounded.d.ts +0 -0
- package/{dist/es2015/common → common}/models/size.d.ts +0 -0
- package/{dist/es2015/common → common}/models/virtualization-settings.d.ts +0 -0
- package/{dist/es2015/common → common}/navigation/navigation-action.d.ts +0 -0
- package/{dist/es2015/common → common}/navigation/navigation.service.d.ts +3 -0
- package/{dist/es2015/common → common}/searchbar.component.d.ts +9 -4
- package/{dist/es2015/common → common}/selection/selectable.directive.d.ts +5 -2
- package/{dist/es2015/common → common}/selection/selection.service.d.ts +6 -2
- package/common/shared-directives.module.d.ts +37 -0
- package/common/shared.module.d.ts +26 -0
- package/{dist/es2015/common → common}/taglist.component.d.ts +7 -3
- package/{dist/es2015/common → common}/templates/custom-item-template.directive.d.ts +3 -0
- package/{dist/es2015/common → common}/templates/fixed-group-template.directive.d.ts +3 -0
- package/{dist/es2015/common → common}/templates/footer-template.directive.d.ts +3 -0
- package/{dist/es2015/common → common}/templates/group-tag-template.directive.d.ts +3 -0
- package/{dist/es2015/common → common}/templates/group-template.directive.d.ts +3 -0
- package/{dist/es2015/common → common}/templates/header-template.directive.d.ts +3 -0
- package/{dist/es2015/common → common}/templates/item-template.directive.d.ts +3 -0
- package/{dist/es2015/common → common}/templates/no-data-template.directive.d.ts +3 -0
- package/{dist/es2015/common → common}/templates/tag-template.directive.d.ts +3 -0
- package/{dist/es2015/common → common}/templates/template-context.directive.d.ts +4 -1
- package/{dist/es2015/common → common}/templates/value-template.directive.d.ts +3 -0
- package/{dist/es2015/common → common}/util.d.ts +3 -2
- package/{dist/es2015/dropdownlist → dropdownlist}/dropdownlist.component.d.ts +48 -35
- package/{dist/es2015/dropdownlist → dropdownlist}/dropdownlist.module.d.ts +7 -0
- package/{dist/es2015/dropdowns.module.d.ts → dropdowns.module.d.ts} +9 -0
- package/{dist/es2015/dropdowntrees → dropdowntrees}/checked-state/base-check.directive.d.ts +3 -0
- package/{dist/es2015/dropdowntrees → dropdowntrees}/checked-state/check-all.directive.d.ts +5 -2
- package/{dist/es2015/dropdowntrees → dropdowntrees}/checked-state/check.directive.d.ts +3 -0
- package/{dist/es2015/dropdowntrees → dropdowntrees}/checked-state/checkable-settings.d.ts +0 -0
- package/{dist/es2015/dropdowntrees → dropdowntrees}/checked-state/checked-item.d.ts +0 -0
- package/{dist/es2015/dropdowntrees → dropdowntrees}/data-binding/dropdowntree/flat-binding.directive.d.ts +5 -5
- package/{dist/es2015/dropdowntrees → dropdowntrees}/data-binding/dropdowntree/hierarchy-binding.directive.d.ts +4 -10
- package/{dist/es2015/dropdowntrees → dropdowntrees}/data-binding/multiselecttree/flat-binding.directive.d.ts +5 -5
- package/{dist/es2015/dropdowntrees → dropdowntrees}/data-binding/multiselecttree/hierarchy-binding.directive.d.ts +4 -10
- package/{dist/es2015/dropdowntrees → dropdowntrees}/dropdowntree.component.d.ts +49 -32
- package/dropdowntrees/dropdowntrees.module.d.ts +25 -0
- package/{dist/es2015/dropdowntrees → dropdowntrees}/expanded-state/expand.directive.d.ts +5 -1
- package/{dist/es2015/dropdowntrees → dropdowntrees}/multiselecttree.component.d.ts +57 -39
- package/{dist/es2015/dropdowntrees → dropdowntrees}/summary-tag/summary-tag.directive.d.ts +3 -0
- package/{dist/es2015/dropdowntrees → dropdowntrees}/templates/node-template.directive.d.ts +3 -0
- package/{dist/es2015 → esm2015}/autocomplete/autocomplete.component.js +264 -232
- package/esm2015/autocomplete/autocomplete.module.js +36 -0
- package/{dist/es2015 → esm2015}/comboboxes/combobox-column/column-cell-template.directive.js +12 -11
- package/esm2015/comboboxes/combobox-column/column-header-template.directive.js +26 -0
- package/esm2015/comboboxes/combobox-column/combobox-column.component.js +59 -0
- package/{dist/es2015 → esm2015}/comboboxes/combobox-column/util.js +0 -2
- package/{dist/es2015 → esm2015}/comboboxes/combobox.component.js +289 -255
- package/{dist/es2015 → esm2015}/comboboxes/combobox.module.js +23 -14
- package/esm2015/comboboxes/multicolumncombobox.component.js +653 -0
- package/{dist/es2015 → esm2015}/common/constants/error-messages.js +0 -1
- package/{dist/es2015 → esm2015}/common/constants/touch-enabled.js +0 -0
- package/{dist/es2015 → esm2015}/common/data.service.js +8 -10
- package/{dist/es2015 → esm2015}/common/disabled-items/disabled-items.service.js +9 -9
- package/{dist/es2015 → esm2015}/common/disabled-items/item-disabled.js +1 -0
- package/esm2015/common/filter-input.directive.js +34 -0
- package/{dist/es2015 → esm2015}/common/filtering/filter-settings.js +1 -0
- package/{dist/es2015 → esm2015}/common/filtering/filter.directive.js +19 -24
- package/{dist/es2015 → esm2015}/common/filtering/filterable-component.js +0 -0
- package/esm2015/common/list-item.directive.js +22 -0
- package/{dist/es2015 → esm2015}/common/list.component.js +194 -126
- package/esm2015/common/localization/custom-messages.component.js +41 -0
- package/esm2015/common/localization/localized-messages.directive.js +44 -0
- package/esm2015/common/localization/messages.js +25 -0
- package/{dist/es2015 → esm2015}/common/models/checkboxes-settings.js +0 -0
- package/{dist/es2015 → esm2015}/common/models/direction.js +1 -0
- package/{dist/es → esm2015}/common/models/fillmode.js +1 -0
- package/{dist/es → esm2015}/common/models/list-type.js +1 -0
- package/{dist/es → esm2015}/common/models/page-change-event.js +1 -0
- package/{dist/es → esm2015}/common/models/popup-settings.js +1 -0
- package/{dist/es2015 → esm2015}/common/models/preventable-event.js +0 -0
- package/{dist/es2015 → esm2015}/common/models/remove-tag-event.js +0 -0
- package/{dist/es → esm2015}/common/models/rounded.js +1 -0
- package/{dist/es → esm2015}/common/models/size.js +1 -0
- package/{dist/es2015 → esm2015}/common/models/virtualization-settings.js +0 -0
- package/{dist/es → esm2015}/common/navigation/navigation-action.js +1 -0
- package/{dist/es2015 → esm2015}/common/navigation/navigation.service.js +10 -11
- package/{dist/es2015 → esm2015}/common/searchbar.component.js +84 -97
- package/esm2015/common/selection/selectable.directive.js +76 -0
- package/{dist/es2015 → esm2015}/common/selection/selection.service.js +8 -10
- package/{dist/es2015 → esm2015}/common/shared-directives.module.js +37 -10
- package/esm2015/common/shared.module.js +59 -0
- package/{dist/es2015 → esm2015}/common/taglist.component.js +112 -87
- package/{dist/es2015 → esm2015}/common/templates/custom-item-template.directive.js +12 -12
- package/{dist/es2015 → esm2015}/common/templates/fixed-group-template.directive.js +12 -12
- package/{dist/es2015 → esm2015}/common/templates/footer-template.directive.js +12 -11
- package/{dist/es2015 → esm2015}/common/templates/group-tag-template.directive.js +12 -12
- package/{dist/es2015 → esm2015}/common/templates/group-template.directive.js +12 -12
- package/{dist/es2015 → esm2015}/common/templates/header-template.directive.js +12 -11
- package/{dist/es2015 → esm2015}/common/templates/item-template.directive.js +12 -11
- package/{dist/es2015 → esm2015}/common/templates/no-data-template.directive.js +12 -12
- package/{dist/es2015 → esm2015}/common/templates/tag-template.directive.js +12 -12
- package/esm2015/common/templates/template-context.directive.js +33 -0
- package/{dist/es2015 → esm2015}/common/templates/value-template.directive.js +12 -12
- package/{dist/es2015 → esm2015}/common/util.js +1 -3
- package/{dist/es2015 → esm2015}/dropdownlist/dropdownlist.component.js +362 -300
- package/esm2015/dropdownlist/dropdownlist.module.js +37 -0
- package/{dist/es → esm2015}/dropdowns.module.js +12 -12
- package/{dist/es2015 → esm2015}/dropdowntrees/checked-state/base-check.directive.js +13 -12
- package/{dist/es2015 → esm2015}/dropdowntrees/checked-state/check-all.directive.js +28 -42
- package/{dist/es2015 → esm2015}/dropdowntrees/checked-state/check.directive.js +20 -27
- package/{dist/es → esm2015}/dropdowntrees/checked-state/checkable-settings.js +1 -0
- package/{dist/es → esm2015}/dropdowntrees/checked-state/checked-item.js +1 -0
- package/esm2015/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.js +39 -0
- package/esm2015/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.js +35 -0
- package/esm2015/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.js +38 -0
- package/esm2015/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.js +35 -0
- package/{dist/es2015 → esm2015}/dropdowntrees/dropdowntree.component.js +373 -315
- package/esm2015/dropdowntrees/dropdowntrees.module.js +61 -0
- package/esm2015/dropdowntrees/expanded-state/expand.directive.js +38 -0
- package/{dist/es2015 → esm2015}/dropdowntrees/multiselecttree.component.js +427 -346
- package/{dist/es2015 → esm2015}/dropdowntrees/summary-tag/summary-tag.directive.js +15 -15
- package/esm2015/dropdowntrees/templates/node-template.directive.js +28 -0
- package/{dist/es2015/common/shared.module.d.ts → esm2015/kendo-angular-dropdowns.js} +2 -3
- package/{dist/es → esm2015}/main.js +11 -0
- package/{dist/es2015 → esm2015}/multiselect/multiselect.component.js +335 -288
- package/{dist/es2015 → esm2015}/multiselect/multiselect.module.js +19 -14
- package/{dist/es2015 → esm2015}/multiselect/summary-tag.directive.js +15 -15
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-dropdowns.js} +7873 -7141
- package/kendo-angular-dropdowns.d.ts +9 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +12 -1
- package/{dist/es2015/multiselect → multiselect}/multiselect.component.d.ts +41 -26
- package/{dist/es2015/multiselect → multiselect}/multiselect.module.d.ts +9 -0
- package/{dist/es2015/multiselect → multiselect}/summary-tag.directive.d.ts +3 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +37 -113
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/dist/cdn/js/kendo-angular-dropdowns.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/autocomplete/autocomplete.component.js +0 -1201
- package/dist/es/autocomplete/autocomplete.module.js +0 -36
- package/dist/es/comboboxes/combobox-column/column-cell-template.directive.js +0 -29
- package/dist/es/comboboxes/combobox-column/column-header-template.directive.js +0 -26
- package/dist/es/comboboxes/combobox-column/combobox-column.component.js +0 -78
- package/dist/es/comboboxes/combobox-column/util.js +0 -57
- package/dist/es/comboboxes/combobox.component.js +0 -1622
- package/dist/es/comboboxes/combobox.module.js +0 -52
- package/dist/es/comboboxes/multicolumncombobox.component.js +0 -230
- package/dist/es/common/constants/error-messages.js +0 -62
- package/dist/es/common/constants/touch-enabled.js +0 -9
- package/dist/es/common/data.service.js +0 -250
- package/dist/es/common/disabled-items/disabled-items.service.js +0 -45
- package/dist/es/common/disabled-items/item-disabled.js +0 -4
- package/dist/es/common/filter-input.directive.js +0 -37
- package/dist/es/common/filtering/filter-settings.js +0 -4
- package/dist/es/common/filtering/filter.directive.js +0 -141
- package/dist/es/common/filtering/filterable-component.js +0 -17
- package/dist/es/common/list-item.directive.js +0 -22
- package/dist/es/common/list.component.js +0 -503
- package/dist/es/common/localization/custom-messages.component.js +0 -44
- package/dist/es/common/localization/localized-messages.directive.js +0 -35
- package/dist/es/common/localization/messages.js +0 -34
- package/dist/es/common/models/checkboxes-settings.js +0 -15
- package/dist/es/common/models/direction.js +0 -4
- package/dist/es/common/models/preventable-event.js +0 -29
- package/dist/es/common/models/remove-tag-event.js +0 -24
- package/dist/es/common/models/virtualization-settings.js +0 -25
- package/dist/es/common/navigation/navigation.service.js +0 -147
- package/dist/es/common/searchbar.component.js +0 -253
- package/dist/es/common/selection/selectable.directive.js +0 -93
- package/dist/es/common/selection/selection.service.js +0 -107
- package/dist/es/common/shared-directives.module.js +0 -60
- package/dist/es/common/shared.module.js +0 -45
- package/dist/es/common/taglist.component.js +0 -179
- package/dist/es/common/templates/custom-item-template.directive.js +0 -47
- package/dist/es/common/templates/fixed-group-template.directive.js +0 -54
- package/dist/es/common/templates/footer-template.directive.js +0 -47
- package/dist/es/common/templates/group-tag-template.directive.js +0 -46
- package/dist/es/common/templates/group-template.directive.js +0 -54
- package/dist/es/common/templates/header-template.directive.js +0 -47
- package/dist/es/common/templates/item-template.directive.js +0 -46
- package/dist/es/common/templates/no-data-template.directive.js +0 -48
- package/dist/es/common/templates/tag-template.directive.js +0 -45
- package/dist/es/common/templates/template-context.directive.js +0 -40
- package/dist/es/common/templates/value-template.directive.js +0 -49
- package/dist/es/common/util.js +0 -337
- package/dist/es/dropdownlist/dropdownlist.component.js +0 -1649
- package/dist/es/dropdownlist/dropdownlist.module.js +0 -37
- package/dist/es/dropdowntrees/checked-state/base-check.directive.js +0 -68
- package/dist/es/dropdowntrees/checked-state/check-all.directive.js +0 -181
- package/dist/es/dropdowntrees/checked-state/check.directive.js +0 -169
- package/dist/es/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.js +0 -32
- package/dist/es/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.js +0 -42
- package/dist/es/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.js +0 -32
- package/dist/es/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.js +0 -42
- package/dist/es/dropdowntrees/dropdowntree.component.js +0 -1394
- package/dist/es/dropdowntrees/dropdowntrees.module.js +0 -45
- package/dist/es/dropdowntrees/expanded-state/expand.directive.js +0 -28
- package/dist/es/dropdowntrees/multiselecttree.component.js +0 -1683
- package/dist/es/dropdowntrees/summary-tag/summary-tag.directive.js +0 -63
- package/dist/es/dropdowntrees/templates/node-template.directive.js +0 -28
- package/dist/es/index.js +0 -30
- package/dist/es/multiselect/multiselect.component.js +0 -1734
- package/dist/es/multiselect/multiselect.module.js +0 -50
- package/dist/es/multiselect/summary-tag.directive.js +0 -65
- package/dist/es/package-metadata.js +0 -15
- package/dist/es2015/autocomplete/autocomplete.module.js +0 -33
- package/dist/es2015/comboboxes/combobox-column/column-header-template.directive.js +0 -25
- package/dist/es2015/comboboxes/combobox-column/combobox-column.component.js +0 -81
- package/dist/es2015/comboboxes/combobox.module.d.ts +0 -20
- package/dist/es2015/comboboxes/multicolumncombobox.component.js +0 -417
- package/dist/es2015/common/filter-input.directive.js +0 -35
- package/dist/es2015/common/list-item.directive.js +0 -21
- package/dist/es2015/common/localization/custom-messages.component.js +0 -36
- package/dist/es2015/common/localization/localized-messages.directive.js +0 -39
- package/dist/es2015/common/localization/messages.js +0 -28
- package/dist/es2015/common/models/fillmode.js +0 -4
- package/dist/es2015/common/models/list-type.js +0 -4
- package/dist/es2015/common/models/page-change-event.js +0 -4
- package/dist/es2015/common/models/popup-settings.js +0 -4
- package/dist/es2015/common/models/rounded.js +0 -4
- package/dist/es2015/common/models/size.js +0 -4
- package/dist/es2015/common/navigation/navigation-action.js +0 -24
- package/dist/es2015/common/selection/selectable.directive.js +0 -84
- package/dist/es2015/common/shared-directives.module.d.ts +0 -20
- package/dist/es2015/common/shared.module.js +0 -42
- package/dist/es2015/common/templates/template-context.directive.js +0 -35
- package/dist/es2015/dropdownlist/dropdownlist.module.js +0 -34
- package/dist/es2015/dropdowns.module.js +0 -50
- package/dist/es2015/dropdowntrees/checked-state/checkable-settings.js +0 -4
- package/dist/es2015/dropdowntrees/checked-state/checked-item.js +0 -4
- package/dist/es2015/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.js +0 -30
- package/dist/es2015/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.js +0 -35
- package/dist/es2015/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.js +0 -30
- package/dist/es2015/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.js +0 -35
- package/dist/es2015/dropdowntrees/dropdowntrees.module.d.ts +0 -9
- package/dist/es2015/dropdowntrees/dropdowntrees.module.js +0 -42
- package/dist/es2015/dropdowntrees/expanded-state/expand.directive.js +0 -26
- package/dist/es2015/dropdowntrees/templates/node-template.directive.js +0 -27
- package/dist/es2015/index.d.ts +0 -30
- package/dist/es2015/index.js +0 -30
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/main.js +0 -44
- package/dist/fesm5/index.js +0 -13097
- package/dist/npm/autocomplete/autocomplete.component.js +0 -1203
- package/dist/npm/autocomplete/autocomplete.module.js +0 -38
- package/dist/npm/comboboxes/combobox-column/column-cell-template.directive.js +0 -31
- package/dist/npm/comboboxes/combobox-column/column-header-template.directive.js +0 -28
- package/dist/npm/comboboxes/combobox-column/combobox-column.component.js +0 -80
- package/dist/npm/comboboxes/combobox-column/util.js +0 -59
- package/dist/npm/comboboxes/combobox.component.js +0 -1624
- package/dist/npm/comboboxes/combobox.module.js +0 -54
- package/dist/npm/comboboxes/multicolumncombobox.component.js +0 -232
- package/dist/npm/common/constants/error-messages.js +0 -64
- package/dist/npm/common/constants/touch-enabled.js +0 -11
- package/dist/npm/common/data.service.js +0 -252
- package/dist/npm/common/disabled-items/disabled-items.service.js +0 -47
- package/dist/npm/common/disabled-items/item-disabled.js +0 -6
- package/dist/npm/common/filter-input.directive.js +0 -39
- package/dist/npm/common/filtering/filter-settings.js +0 -6
- package/dist/npm/common/filtering/filter.directive.js +0 -143
- package/dist/npm/common/filtering/filterable-component.js +0 -19
- package/dist/npm/common/list-item.directive.js +0 -24
- package/dist/npm/common/list.component.js +0 -505
- package/dist/npm/common/localization/custom-messages.component.js +0 -46
- package/dist/npm/common/localization/localized-messages.directive.js +0 -37
- package/dist/npm/common/localization/messages.js +0 -36
- package/dist/npm/common/models/checkboxes-settings.js +0 -17
- package/dist/npm/common/models/direction.js +0 -6
- package/dist/npm/common/models/fillmode.js +0 -6
- package/dist/npm/common/models/list-type.js +0 -6
- package/dist/npm/common/models/page-change-event.js +0 -6
- package/dist/npm/common/models/popup-settings.js +0 -6
- package/dist/npm/common/models/preventable-event.js +0 -31
- package/dist/npm/common/models/remove-tag-event.js +0 -26
- package/dist/npm/common/models/rounded.js +0 -6
- package/dist/npm/common/models/size.js +0 -6
- package/dist/npm/common/models/virtualization-settings.js +0 -27
- package/dist/npm/common/navigation/navigation-action.js +0 -26
- package/dist/npm/common/navigation/navigation.service.js +0 -149
- package/dist/npm/common/searchbar.component.js +0 -255
- package/dist/npm/common/selection/selectable.directive.js +0 -95
- package/dist/npm/common/selection/selection.service.js +0 -109
- package/dist/npm/common/shared-directives.module.js +0 -62
- package/dist/npm/common/shared.module.js +0 -47
- package/dist/npm/common/taglist.component.js +0 -181
- package/dist/npm/common/templates/custom-item-template.directive.js +0 -49
- package/dist/npm/common/templates/fixed-group-template.directive.js +0 -56
- package/dist/npm/common/templates/footer-template.directive.js +0 -49
- package/dist/npm/common/templates/group-tag-template.directive.js +0 -48
- package/dist/npm/common/templates/group-template.directive.js +0 -56
- package/dist/npm/common/templates/header-template.directive.js +0 -49
- package/dist/npm/common/templates/item-template.directive.js +0 -48
- package/dist/npm/common/templates/no-data-template.directive.js +0 -50
- package/dist/npm/common/templates/tag-template.directive.js +0 -47
- package/dist/npm/common/templates/template-context.directive.js +0 -42
- package/dist/npm/common/templates/value-template.directive.js +0 -51
- package/dist/npm/common/util.js +0 -339
- package/dist/npm/dropdownlist/dropdownlist.component.js +0 -1651
- package/dist/npm/dropdownlist/dropdownlist.module.js +0 -39
- package/dist/npm/dropdowns.module.js +0 -55
- package/dist/npm/dropdowntrees/checked-state/base-check.directive.js +0 -70
- package/dist/npm/dropdowntrees/checked-state/check-all.directive.js +0 -183
- package/dist/npm/dropdowntrees/checked-state/check.directive.js +0 -171
- package/dist/npm/dropdowntrees/checked-state/checkable-settings.js +0 -6
- package/dist/npm/dropdowntrees/checked-state/checked-item.js +0 -6
- package/dist/npm/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.js +0 -34
- package/dist/npm/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.js +0 -44
- package/dist/npm/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.js +0 -34
- package/dist/npm/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.js +0 -44
- package/dist/npm/dropdowntrees/dropdowntree.component.js +0 -1399
- package/dist/npm/dropdowntrees/dropdowntrees.module.js +0 -47
- package/dist/npm/dropdowntrees/expanded-state/expand.directive.js +0 -30
- package/dist/npm/dropdowntrees/multiselecttree.component.js +0 -1688
- package/dist/npm/dropdowntrees/summary-tag/summary-tag.directive.js +0 -65
- package/dist/npm/dropdowntrees/templates/node-template.directive.js +0 -30
- package/dist/npm/index.js +0 -55
- package/dist/npm/main.js +0 -86
- package/dist/npm/multiselect/multiselect.component.js +0 -1736
- package/dist/npm/multiselect/multiselect.module.js +0 -52
- package/dist/npm/multiselect/summary-tag.directive.js +0 -67
- package/dist/npm/package-metadata.js +0 -17
- package/dist/systemjs/kendo-angular-dropdowns.js +0 -5
|
@@ -1,1683 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { ChangeDetectorRef, Component, ContentChild, ElementRef, EventEmitter, forwardRef, HostBinding, HostListener, Inject, Input, isDevMode, NgZone, Optional, Output, Renderer2, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
|
|
7
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
8
|
-
import { anyChanged, guid, hasObservers, Keys, KendoInput, isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
9
|
-
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
10
|
-
import { NavigationService } from '../common/navigation/navigation.service';
|
|
11
|
-
import { PopupService } from '@progress/kendo-angular-popup';
|
|
12
|
-
import { DataBoundComponent, ExpandableComponent, TreeViewComponent } from '@progress/kendo-angular-treeview';
|
|
13
|
-
import { DataService } from '../common/data.service';
|
|
14
|
-
import { DisabledItemsService } from '../common/disabled-items/disabled-items.service';
|
|
15
|
-
import { SelectionService } from '../common/selection/selection.service';
|
|
16
|
-
import { PreventableEvent } from '../common/models/preventable-event';
|
|
17
|
-
import { NavigationAction } from '../common/navigation/navigation-action';
|
|
18
|
-
import { getFillModeClass, getRoundedClass, getSizeClass, hasProps, isArray, isObject, isObjectArray, isPresent, isUntouched, noop, parseNumber, valueFrom } from '../common/util';
|
|
19
|
-
import { RemoveTagEvent } from '../common/models/remove-tag-event';
|
|
20
|
-
import { MultiSelectTreeMessages } from '../common/constants/error-messages';
|
|
21
|
-
import { HeaderTemplateDirective } from '../common/templates/header-template.directive';
|
|
22
|
-
import { FooterTemplateDirective } from '../common/templates/footer-template.directive';
|
|
23
|
-
import { NodeTemplateDirective } from './templates/node-template.directive';
|
|
24
|
-
import { NoDataTemplateDirective } from '../common/templates/no-data-template.directive';
|
|
25
|
-
import { TagTemplateDirective } from '../common/templates/tag-template.directive';
|
|
26
|
-
import { GroupTagTemplateDirective } from '../common/templates/group-tag-template.directive';
|
|
27
|
-
import { TOUCH_ENABLED } from '../common/constants/touch-enabled';
|
|
28
|
-
import { merge, of } from 'rxjs';
|
|
29
|
-
import { filter, tap } from 'rxjs/operators';
|
|
30
|
-
/* tslint:disable:member-ordering */
|
|
31
|
-
var DEFAULT_POPUP_SETTINGS = { animate: true };
|
|
32
|
-
var DEFAULT_CHECKABLE_SETTINGS = { checkChildren: true, checkOnClick: true };
|
|
33
|
-
var hasChildren = function () { return false; };
|
|
34
|
-
var ɵ0 = hasChildren;
|
|
35
|
-
var fetchChildren = function () { return of([]); };
|
|
36
|
-
var ɵ1 = fetchChildren;
|
|
37
|
-
var itemDisabled = function () { return false; };
|
|
38
|
-
var ɵ2 = itemDisabled;
|
|
39
|
-
var isNodeVisible = function () { return true; };
|
|
40
|
-
var ɵ3 = isNodeVisible;
|
|
41
|
-
/**
|
|
42
|
-
* Represents the [Kendo UI MultiSelectTree component for Angular]({% slug overview_multiselecttree %}).
|
|
43
|
-
*/
|
|
44
|
-
var MultiSelectTreeComponent = /** @class */ (function () {
|
|
45
|
-
function MultiSelectTreeComponent(wrapper, popupService, renderer, navigationService, _zone, localization, cdr, touchEnabled) {
|
|
46
|
-
this.wrapper = wrapper;
|
|
47
|
-
this.popupService = popupService;
|
|
48
|
-
this.renderer = renderer;
|
|
49
|
-
this.navigationService = navigationService;
|
|
50
|
-
this._zone = _zone;
|
|
51
|
-
this.localization = localization;
|
|
52
|
-
this.cdr = cdr;
|
|
53
|
-
this.touchEnabled = touchEnabled;
|
|
54
|
-
this.hostClasses = true;
|
|
55
|
-
this.role = 'combobox';
|
|
56
|
-
this.ariaHasPopup = 'tree';
|
|
57
|
-
/**
|
|
58
|
-
* Sets the levels in the data set where the values can be found when `valueField` is an Array.
|
|
59
|
-
* The field serves to correctly allocate a data item used when the MultiSelectTree is initialized with a value.
|
|
60
|
-
*/
|
|
61
|
-
this.valueDepth = [];
|
|
62
|
-
/**
|
|
63
|
-
* The hint which is displayed when the component is empty.
|
|
64
|
-
*/
|
|
65
|
-
this.placeholder = "";
|
|
66
|
-
/**
|
|
67
|
-
* Sets the height of the options list. By default, `listHeight` is 200px.
|
|
68
|
-
*
|
|
69
|
-
* > The `listHeight` property affects only the list of options and not the whole popup container.
|
|
70
|
-
* > To set the height of the popup container, use `popupSettings.height`.
|
|
71
|
-
*/
|
|
72
|
-
this.listHeight = 200;
|
|
73
|
-
/**
|
|
74
|
-
* Sets the disabled state of the component.
|
|
75
|
-
*/
|
|
76
|
-
this.disabled = false;
|
|
77
|
-
/**
|
|
78
|
-
* Sets the read-only state of the component.
|
|
79
|
-
*/
|
|
80
|
-
this.readonly = false;
|
|
81
|
-
/**
|
|
82
|
-
* Specifies the type of the selected value
|
|
83
|
-
* ([more information and example]({% slug valuebinding_multiselecttree %}#toc-primitive-values)).
|
|
84
|
-
* If set to `true`, the selected value has to be a primitive one.
|
|
85
|
-
*/
|
|
86
|
-
this.valuePrimitive = false;
|
|
87
|
-
/**
|
|
88
|
-
* Indicates whether the child nodes will be fetched on node expand or will be initially prefetched.
|
|
89
|
-
* @default false
|
|
90
|
-
*/
|
|
91
|
-
this.loadOnDemand = false;
|
|
92
|
-
/**
|
|
93
|
-
* @hidden
|
|
94
|
-
*
|
|
95
|
-
* Used by the kendo-label and kendo-floatinglabel to access and associate the focusable element with the provided label via aria-labelledby.
|
|
96
|
-
*/
|
|
97
|
-
this.focusableId = "k-" + guid();
|
|
98
|
-
/**
|
|
99
|
-
* If set to `true`, renders a button on hovering over the component.
|
|
100
|
-
* Clicking this button resets the value of the component to `undefined` and triggers the `change` event.
|
|
101
|
-
* @default true
|
|
102
|
-
*/
|
|
103
|
-
this.clearButton = true;
|
|
104
|
-
/**
|
|
105
|
-
* Renders the built-in input element for filtering the MultiSelectTree.
|
|
106
|
-
* If set to `true`, the component emits the `filterChange` event, which can be used to [filter the MultiSelectTree manually]({% slug filtering_multiselecttree %}#toc-manual-filtering).
|
|
107
|
-
* A built-in filtering implementation is available to use with the [`kendoMultiSelectTreeHierarchyBinding`]({% slug api_dropdowns_multiselecttreehierarchybindingdirective %}) and [`kendoMultiSelectTreeFlatBinding`]({% slug api_dropdowns_multiselecttreeflatbindingdirective %}) directives.
|
|
108
|
-
* @default false
|
|
109
|
-
*/
|
|
110
|
-
this.filterable = false;
|
|
111
|
-
/**
|
|
112
|
-
* If `checkАll` is set to `true` and the checkboxes are enabled, a tri-state checkbox appears above the embedded treeview.
|
|
113
|
-
* Clicking the checkbox checks or unchecks all enabled items of the treeview that are loaded.
|
|
114
|
-
* @default false
|
|
115
|
-
*/
|
|
116
|
-
this.checkAll = false;
|
|
117
|
-
/**
|
|
118
|
-
* A function which determines if a specific node has child nodes.
|
|
119
|
-
*/
|
|
120
|
-
this.hasChildren = hasChildren;
|
|
121
|
-
/**
|
|
122
|
-
* A function which provides the child nodes for a given parent node.
|
|
123
|
-
*/
|
|
124
|
-
this.fetchChildren = fetchChildren;
|
|
125
|
-
/**
|
|
126
|
-
* A callback which determines whether a tree node should be rendered as hidden. The utility .k-display-none class is used to hide the nodes.
|
|
127
|
-
* Useful for custom filtering implementations.
|
|
128
|
-
*/
|
|
129
|
-
this.isNodeVisible = isNodeVisible;
|
|
130
|
-
/**
|
|
131
|
-
* A function that is executed for each data item and determines if a specific item is disabled.
|
|
132
|
-
*/
|
|
133
|
-
this.itemDisabled = itemDisabled;
|
|
134
|
-
/**
|
|
135
|
-
* A user-defined callback function which receives an array of selected data items and maps them to an array of tags.
|
|
136
|
-
*
|
|
137
|
-
* @param { Any[] } dataItems - The selected data items from the list.
|
|
138
|
-
* @returns { Any[] } - The tags that will be rendered by the component.
|
|
139
|
-
*/
|
|
140
|
-
this.tagMapper = function (tags) { return tags || []; };
|
|
141
|
-
/**
|
|
142
|
-
* Fires each time the user focuses the MultiSelectTree.
|
|
143
|
-
*/
|
|
144
|
-
this.onFocus = new EventEmitter();
|
|
145
|
-
/**
|
|
146
|
-
* Fires each time the MultiSelectTree gets blurred.
|
|
147
|
-
*/
|
|
148
|
-
this.onBlur = new EventEmitter();
|
|
149
|
-
/**
|
|
150
|
-
* Fires each time the popup is about to open
|
|
151
|
-
* ([see example]({% slug openstate_multiselecttree %})).
|
|
152
|
-
* This event is preventable. If you cancel it, the popup will remain closed.
|
|
153
|
-
*/
|
|
154
|
-
this.open = new EventEmitter();
|
|
155
|
-
/**
|
|
156
|
-
* Fires after the popup has been opened.
|
|
157
|
-
*/
|
|
158
|
-
this.opened = new EventEmitter();
|
|
159
|
-
/**
|
|
160
|
-
* Fires each time the popup is about to close
|
|
161
|
-
* ([see example]({% slug openstate_multiselecttree %})).
|
|
162
|
-
* This event is preventable. If you cancel it, the popup will remain open.
|
|
163
|
-
*/
|
|
164
|
-
this.close = new EventEmitter();
|
|
165
|
-
/**
|
|
166
|
-
* Fires after the popup has been closed.
|
|
167
|
-
*/
|
|
168
|
-
this.closed = new EventEmitter();
|
|
169
|
-
/**
|
|
170
|
-
* Fires when the user expands a node in the popup TreeView.
|
|
171
|
-
*/
|
|
172
|
-
this.nodeExpand = new EventEmitter();
|
|
173
|
-
/**
|
|
174
|
-
* Fires when the user collapses a node in the popup TreeView.
|
|
175
|
-
*/
|
|
176
|
-
this.nodeCollapse = new EventEmitter();
|
|
177
|
-
/**
|
|
178
|
-
* Fires each time the value is changed
|
|
179
|
-
* ([see example]({% slug overview_multiselecttree %}#toc-events)).
|
|
180
|
-
*/
|
|
181
|
-
this.valueChange = new EventEmitter();
|
|
182
|
-
/**
|
|
183
|
-
* Fires each time a tag is about to be removed.
|
|
184
|
-
* This event is preventable. If you cancel it, the tag will not be removed.
|
|
185
|
-
*/
|
|
186
|
-
this.removeTag = new EventEmitter();
|
|
187
|
-
/**
|
|
188
|
-
* Fires when the value of the built-in filter input element changes.
|
|
189
|
-
*/
|
|
190
|
-
this.filterChange = new EventEmitter();
|
|
191
|
-
/**
|
|
192
|
-
* @hidden
|
|
193
|
-
*/
|
|
194
|
-
this.filterStateChange = new EventEmitter();
|
|
195
|
-
/**
|
|
196
|
-
* @hidden
|
|
197
|
-
*/
|
|
198
|
-
this.checkedItems = [];
|
|
199
|
-
/**
|
|
200
|
-
* @hidden
|
|
201
|
-
*/
|
|
202
|
-
this.checkBy = function (item) { return item; };
|
|
203
|
-
/**
|
|
204
|
-
* @hidden
|
|
205
|
-
*/
|
|
206
|
-
this.showAfter = 0;
|
|
207
|
-
/**
|
|
208
|
-
* @hidden
|
|
209
|
-
*/
|
|
210
|
-
this.allNodesHidden = false;
|
|
211
|
-
this.tagListId = guid();
|
|
212
|
-
this.tagPrefix = "tag-" + guid();
|
|
213
|
-
this.focusedTagIndex = undefined;
|
|
214
|
-
this._value = [];
|
|
215
|
-
this._tabindex = 0;
|
|
216
|
-
this._popupSettings = DEFAULT_POPUP_SETTINGS;
|
|
217
|
-
this._checkableSettings = DEFAULT_CHECKABLE_SETTINGS;
|
|
218
|
-
this._isFocused = false;
|
|
219
|
-
this._size = 'medium';
|
|
220
|
-
this._rounded = 'medium';
|
|
221
|
-
this._fillMode = 'solid';
|
|
222
|
-
this.subscriptions = [];
|
|
223
|
-
this.lastAction = 'check';
|
|
224
|
-
this.onTouchedCallback = noop;
|
|
225
|
-
this.onChangeCallback = noop;
|
|
226
|
-
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
227
|
-
this.subscribeEvents();
|
|
228
|
-
this.subscribeFocusEvents();
|
|
229
|
-
}
|
|
230
|
-
MultiSelectTreeComponent_1 = MultiSelectTreeComponent;
|
|
231
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "isDisabled", {
|
|
232
|
-
get: function () {
|
|
233
|
-
return this.disabled;
|
|
234
|
-
},
|
|
235
|
-
enumerable: true,
|
|
236
|
-
configurable: true
|
|
237
|
-
});
|
|
238
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "isLoading", {
|
|
239
|
-
get: function () {
|
|
240
|
-
return this.loading;
|
|
241
|
-
},
|
|
242
|
-
enumerable: true,
|
|
243
|
-
configurable: true
|
|
244
|
-
});
|
|
245
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "id", {
|
|
246
|
-
get: function () {
|
|
247
|
-
return this.focusableId;
|
|
248
|
-
},
|
|
249
|
-
enumerable: true,
|
|
250
|
-
configurable: true
|
|
251
|
-
});
|
|
252
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "hostTabIndex", {
|
|
253
|
-
get: function () {
|
|
254
|
-
return this.tabindex;
|
|
255
|
-
},
|
|
256
|
-
enumerable: true,
|
|
257
|
-
configurable: true
|
|
258
|
-
});
|
|
259
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "isAriaExpanded", {
|
|
260
|
-
get: function () {
|
|
261
|
-
return this.isOpen;
|
|
262
|
-
},
|
|
263
|
-
enumerable: true,
|
|
264
|
-
configurable: true
|
|
265
|
-
});
|
|
266
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "isReadonly", {
|
|
267
|
-
get: function () {
|
|
268
|
-
return this.readonly;
|
|
269
|
-
},
|
|
270
|
-
enumerable: true,
|
|
271
|
-
configurable: true
|
|
272
|
-
});
|
|
273
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "ariaDescribedBy", {
|
|
274
|
-
get: function () {
|
|
275
|
-
return this.tagListId;
|
|
276
|
-
},
|
|
277
|
-
enumerable: true,
|
|
278
|
-
configurable: true
|
|
279
|
-
});
|
|
280
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "ariaActiveDescendant", {
|
|
281
|
-
get: function () {
|
|
282
|
-
return this.focusedTagId;
|
|
283
|
-
},
|
|
284
|
-
enumerable: true,
|
|
285
|
-
configurable: true
|
|
286
|
-
});
|
|
287
|
-
/**
|
|
288
|
-
* @hidden
|
|
289
|
-
*/
|
|
290
|
-
MultiSelectTreeComponent.prototype.handleClick = function () {
|
|
291
|
-
this.togglePopup(!this.isOpen);
|
|
292
|
-
};
|
|
293
|
-
/**
|
|
294
|
-
* @hidden
|
|
295
|
-
*/
|
|
296
|
-
MultiSelectTreeComponent.prototype.handleKeydown = function (event) {
|
|
297
|
-
var deleteTag = this.isWrapperActive && event.keyCode === Keys.Backspace && this.tags.length > 0;
|
|
298
|
-
if (deleteTag) {
|
|
299
|
-
this.handleBackspace();
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
if (this.disabled || this.readonly) {
|
|
303
|
-
return;
|
|
304
|
-
}
|
|
305
|
-
var eventData = event;
|
|
306
|
-
var action = this.navigationService.process({
|
|
307
|
-
originalEvent: eventData
|
|
308
|
-
});
|
|
309
|
-
if (action === NavigationAction.Open) {
|
|
310
|
-
eventData.preventDefault();
|
|
311
|
-
}
|
|
312
|
-
};
|
|
313
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "treeview", {
|
|
314
|
-
get: function () {
|
|
315
|
-
return this._treeview;
|
|
316
|
-
},
|
|
317
|
-
set: function (treeview) {
|
|
318
|
-
var _this = this;
|
|
319
|
-
this._treeview = treeview;
|
|
320
|
-
if (treeview) {
|
|
321
|
-
// If filtering is enabled, focus the TreeView on mobile devices instead of the filter input
|
|
322
|
-
if (this.isFocused && !this.filterable && !this.checkAll || this.touchEnabled) {
|
|
323
|
-
treeview.focus();
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* the treeview animations are initially disabled (we don't want expand animations during popup opening)
|
|
327
|
-
* re-enables the animations for user interaction
|
|
328
|
-
* The Promise is required to properly change the `animate` property when
|
|
329
|
-
* the popup is appended to a container and opened upon initialization.
|
|
330
|
-
* Otherwise, the "Expression has changed..." type error will be thrown.
|
|
331
|
-
*/
|
|
332
|
-
Promise.resolve(null).then(function () { return _this.treeview.animate = true; });
|
|
333
|
-
}
|
|
334
|
-
},
|
|
335
|
-
enumerable: true,
|
|
336
|
-
configurable: true
|
|
337
|
-
});
|
|
338
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "tabindex", {
|
|
339
|
-
get: function () {
|
|
340
|
-
return this.disabled ? -1 : this._tabindex;
|
|
341
|
-
},
|
|
342
|
-
/**
|
|
343
|
-
* Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
344
|
-
*/
|
|
345
|
-
set: function (value) {
|
|
346
|
-
var providedTabIndex = parseNumber(value);
|
|
347
|
-
var defaultTabIndex = 0;
|
|
348
|
-
this._tabindex = !isNaN(providedTabIndex) ? providedTabIndex : defaultTabIndex;
|
|
349
|
-
},
|
|
350
|
-
enumerable: true,
|
|
351
|
-
configurable: true
|
|
352
|
-
});
|
|
353
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "size", {
|
|
354
|
-
get: function () {
|
|
355
|
-
return this._size;
|
|
356
|
-
},
|
|
357
|
-
/**
|
|
358
|
-
* Sets the size of the component.
|
|
359
|
-
*
|
|
360
|
-
* The possible values are:
|
|
361
|
-
* * `'small'`
|
|
362
|
-
* * `'medium'` (default)
|
|
363
|
-
* * `'large'`
|
|
364
|
-
* * `null`
|
|
365
|
-
*
|
|
366
|
-
*/
|
|
367
|
-
set: function (size) {
|
|
368
|
-
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
369
|
-
if (size) {
|
|
370
|
-
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
371
|
-
}
|
|
372
|
-
this._size = size;
|
|
373
|
-
},
|
|
374
|
-
enumerable: true,
|
|
375
|
-
configurable: true
|
|
376
|
-
});
|
|
377
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "rounded", {
|
|
378
|
-
get: function () {
|
|
379
|
-
return this._rounded;
|
|
380
|
-
},
|
|
381
|
-
/**
|
|
382
|
-
* Sets the border radius of the component.
|
|
383
|
-
*
|
|
384
|
-
* The possible values are:
|
|
385
|
-
* * `'small'`
|
|
386
|
-
* * `'medium'` (default)
|
|
387
|
-
* * `'large'`
|
|
388
|
-
* * `'full'`
|
|
389
|
-
* * `null`
|
|
390
|
-
*
|
|
391
|
-
*/
|
|
392
|
-
set: function (rounded) {
|
|
393
|
-
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
394
|
-
if (rounded) {
|
|
395
|
-
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
396
|
-
}
|
|
397
|
-
this._rounded = rounded;
|
|
398
|
-
},
|
|
399
|
-
enumerable: true,
|
|
400
|
-
configurable: true
|
|
401
|
-
});
|
|
402
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "fillMode", {
|
|
403
|
-
get: function () {
|
|
404
|
-
return this._fillMode;
|
|
405
|
-
},
|
|
406
|
-
/**
|
|
407
|
-
* Sets the fillMode of the component.
|
|
408
|
-
*
|
|
409
|
-
* The possible values are:
|
|
410
|
-
* * `'flat'`
|
|
411
|
-
* * `'solid'` (default)
|
|
412
|
-
* * `'outline'`
|
|
413
|
-
* * `null`
|
|
414
|
-
*
|
|
415
|
-
*/
|
|
416
|
-
set: function (fillMode) {
|
|
417
|
-
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
418
|
-
if (fillMode) {
|
|
419
|
-
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
420
|
-
}
|
|
421
|
-
this._fillMode = fillMode;
|
|
422
|
-
},
|
|
423
|
-
enumerable: true,
|
|
424
|
-
configurable: true
|
|
425
|
-
});
|
|
426
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "popupSettings", {
|
|
427
|
-
get: function () {
|
|
428
|
-
return this._popupSettings;
|
|
429
|
-
},
|
|
430
|
-
/**
|
|
431
|
-
* Configures the popup of the MultiSelectTree.
|
|
432
|
-
*
|
|
433
|
-
* The available options are:
|
|
434
|
-
* - `animate: Boolean`—Controls the popup animation. By default, the open and close animations are enabled.
|
|
435
|
-
* - `width: Number | String`—Sets the width of the popup container. By default, the width of the host element is used. If set to `auto`, the component automatically adjusts the width of the popup and no item labels are wrapped.
|
|
436
|
-
* - `height: Number`—Sets the height of the popup container.
|
|
437
|
-
* - `popupClass: String`—Specifies a list of CSS classes that are used to style the popup.
|
|
438
|
-
* - `appendTo: "root" | "component" | ViewContainerRef`—Specifies the component to which the popup will be appended.
|
|
439
|
-
*/
|
|
440
|
-
set: function (settings) {
|
|
441
|
-
this._popupSettings = Object.assign({}, DEFAULT_POPUP_SETTINGS, settings);
|
|
442
|
-
// `detectChanges` needed, otherwise upon value initialization and `appendTo` property
|
|
443
|
-
// an error is thrown => ExpressionChangedAfterItHasBeenCheckedError
|
|
444
|
-
this.cdr.detectChanges();
|
|
445
|
-
},
|
|
446
|
-
enumerable: true,
|
|
447
|
-
configurable: true
|
|
448
|
-
});
|
|
449
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "checkableSettings", {
|
|
450
|
-
get: function () {
|
|
451
|
-
return this._checkableSettings;
|
|
452
|
-
},
|
|
453
|
-
/**
|
|
454
|
-
* Defines the checkable settings of the MultiSelecTree nodes.
|
|
455
|
-
* If no value is provided, the default [`CheckableSettings`]({% slug api_dropdowns_multiselecttreecheckablesettings %}) are applied.
|
|
456
|
-
*/
|
|
457
|
-
set: function (settings) {
|
|
458
|
-
this._checkableSettings = Object.assign({}, DEFAULT_CHECKABLE_SETTINGS, settings);
|
|
459
|
-
},
|
|
460
|
-
enumerable: true,
|
|
461
|
-
configurable: true
|
|
462
|
-
});
|
|
463
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "data", {
|
|
464
|
-
get: function () {
|
|
465
|
-
return this._nodes;
|
|
466
|
-
},
|
|
467
|
-
/**
|
|
468
|
-
* Sets the data of the MultiSelectTree.
|
|
469
|
-
*
|
|
470
|
-
* > The data has to be provided in an array-like list with objects.
|
|
471
|
-
*/
|
|
472
|
-
set: function (data) {
|
|
473
|
-
this._nodes = data;
|
|
474
|
-
this.setState();
|
|
475
|
-
},
|
|
476
|
-
enumerable: true,
|
|
477
|
-
configurable: true
|
|
478
|
-
});
|
|
479
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "value", {
|
|
480
|
-
get: function () {
|
|
481
|
-
return this._value;
|
|
482
|
-
},
|
|
483
|
-
/**
|
|
484
|
-
* Sets the value of the MultiSelectTree.
|
|
485
|
-
* It can either be of the primitive (string, numbers) or of the complex (objects) type.
|
|
486
|
-
* To define the type, use the `valuePrimitive` option.
|
|
487
|
-
*
|
|
488
|
-
*/
|
|
489
|
-
set: function (value) {
|
|
490
|
-
this._value = value ? value : [];
|
|
491
|
-
this.setState();
|
|
492
|
-
},
|
|
493
|
-
enumerable: true,
|
|
494
|
-
configurable: true
|
|
495
|
-
});
|
|
496
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "dataItems", {
|
|
497
|
-
get: function () {
|
|
498
|
-
var _this = this;
|
|
499
|
-
return this._dataItems || this.value.map(function (value, index) { return ({
|
|
500
|
-
dataItem: value,
|
|
501
|
-
index: null,
|
|
502
|
-
level: _this.valueDepth[index] || 0
|
|
503
|
-
}); });
|
|
504
|
-
},
|
|
505
|
-
/**
|
|
506
|
-
* Keeps the current `dataItems` object in order to resolve selection.
|
|
507
|
-
* Needs to be provided when when programmatically setting a `value` and `valuePrimitive` is set to `true`.
|
|
508
|
-
*/
|
|
509
|
-
set: function (items) {
|
|
510
|
-
var _this = this;
|
|
511
|
-
this._dataItems = (items || []).map(function (item, index) {
|
|
512
|
-
if (hasProps(item, ['dataItem', 'index', 'level'])) {
|
|
513
|
-
return item;
|
|
514
|
-
}
|
|
515
|
-
return {
|
|
516
|
-
dataItem: item,
|
|
517
|
-
index: null,
|
|
518
|
-
level: _this.valueDepth[index] || 0
|
|
519
|
-
};
|
|
520
|
-
});
|
|
521
|
-
this.setState();
|
|
522
|
-
},
|
|
523
|
-
enumerable: true,
|
|
524
|
-
configurable: true
|
|
525
|
-
});
|
|
526
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "focusedTagId", {
|
|
527
|
-
/**
|
|
528
|
-
* @hidden
|
|
529
|
-
*/
|
|
530
|
-
get: function () {
|
|
531
|
-
if (!isPresent(this.focusedTagIndex) || this.isOpen) {
|
|
532
|
-
return null;
|
|
533
|
-
}
|
|
534
|
-
var dataItem = this.tags[this.focusedTagIndex];
|
|
535
|
-
return this.tagPrefix + "-" + valueFrom({ dataItem: dataItem }, this.valueField);
|
|
536
|
-
},
|
|
537
|
-
enumerable: true,
|
|
538
|
-
configurable: true
|
|
539
|
-
});
|
|
540
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "isFocused", {
|
|
541
|
-
get: function () {
|
|
542
|
-
return this._isFocused;
|
|
543
|
-
},
|
|
544
|
-
set: function (isFocused) {
|
|
545
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
546
|
-
this._isFocused = isFocused;
|
|
547
|
-
},
|
|
548
|
-
enumerable: true,
|
|
549
|
-
configurable: true
|
|
550
|
-
});
|
|
551
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "isOpen", {
|
|
552
|
-
/**
|
|
553
|
-
* Returns the current open state of the popup.
|
|
554
|
-
*/
|
|
555
|
-
get: function () {
|
|
556
|
-
return isPresent(this.popupRef);
|
|
557
|
-
},
|
|
558
|
-
enumerable: true,
|
|
559
|
-
configurable: true
|
|
560
|
-
});
|
|
561
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "width", {
|
|
562
|
-
get: function () {
|
|
563
|
-
var wrapperWidth = this.wrapper.nativeElement.offsetWidth;
|
|
564
|
-
var width = this.popupSettings.width || wrapperWidth;
|
|
565
|
-
var minWidth = isNaN(wrapperWidth) ? wrapperWidth : wrapperWidth + "px";
|
|
566
|
-
var maxWidth = isNaN(width) ? width : width + "px";
|
|
567
|
-
return { min: minWidth, max: maxWidth };
|
|
568
|
-
},
|
|
569
|
-
enumerable: true,
|
|
570
|
-
configurable: true
|
|
571
|
-
});
|
|
572
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "height", {
|
|
573
|
-
get: function () {
|
|
574
|
-
var popupHeight = this.popupSettings.height;
|
|
575
|
-
return isPresent(popupHeight) ? popupHeight + "px" : 'auto';
|
|
576
|
-
},
|
|
577
|
-
enumerable: true,
|
|
578
|
-
configurable: true
|
|
579
|
-
});
|
|
580
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "appendTo", {
|
|
581
|
-
get: function () {
|
|
582
|
-
var appendTo = this.popupSettings.appendTo;
|
|
583
|
-
if (!appendTo || appendTo === 'root') {
|
|
584
|
-
return undefined;
|
|
585
|
-
}
|
|
586
|
-
return appendTo === 'component' ? this.container : appendTo;
|
|
587
|
-
},
|
|
588
|
-
enumerable: true,
|
|
589
|
-
configurable: true
|
|
590
|
-
});
|
|
591
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "popupContainerClasses", {
|
|
592
|
-
/**
|
|
593
|
-
* @hidden
|
|
594
|
-
*/
|
|
595
|
-
get: function () {
|
|
596
|
-
var containerClasses = ['k-popup-dropdowntree'];
|
|
597
|
-
if (this.popupSettings.popupClass) {
|
|
598
|
-
containerClasses.push(this.popupSettings.popupClass);
|
|
599
|
-
}
|
|
600
|
-
return containerClasses;
|
|
601
|
-
},
|
|
602
|
-
enumerable: true,
|
|
603
|
-
configurable: true
|
|
604
|
-
});
|
|
605
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "nodes", {
|
|
606
|
-
get: function () {
|
|
607
|
-
return this.data;
|
|
608
|
-
},
|
|
609
|
-
/**
|
|
610
|
-
* @hidden
|
|
611
|
-
*
|
|
612
|
-
* Alias for `data`. Used for compatibility with the `DataBoundComponent` interface.
|
|
613
|
-
* Required for the data-binding directives.
|
|
614
|
-
*/
|
|
615
|
-
set: function (nodes) {
|
|
616
|
-
this.data = nodes;
|
|
617
|
-
},
|
|
618
|
-
enumerable: true,
|
|
619
|
-
configurable: true
|
|
620
|
-
});
|
|
621
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "children", {
|
|
622
|
-
get: function () {
|
|
623
|
-
return this.fetchChildren;
|
|
624
|
-
},
|
|
625
|
-
/**
|
|
626
|
-
* @hidden
|
|
627
|
-
*
|
|
628
|
-
* Alias for `fetchChildren`. Used for compatibility with the `DataBoundComponent` interface.
|
|
629
|
-
* Required for the data-binding directives
|
|
630
|
-
*/
|
|
631
|
-
set: function (callback) {
|
|
632
|
-
this.fetchChildren = callback;
|
|
633
|
-
},
|
|
634
|
-
enumerable: true,
|
|
635
|
-
configurable: true
|
|
636
|
-
});
|
|
637
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "expand", {
|
|
638
|
-
/**
|
|
639
|
-
* @hidden
|
|
640
|
-
*
|
|
641
|
-
* Alias for `nodeExpand`. Used for compatibility with the `ExpandableComponent` interface.
|
|
642
|
-
* Required for the expand-directive.
|
|
643
|
-
*/
|
|
644
|
-
get: function () {
|
|
645
|
-
return this.nodeExpand;
|
|
646
|
-
},
|
|
647
|
-
enumerable: true,
|
|
648
|
-
configurable: true
|
|
649
|
-
});
|
|
650
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "collapse", {
|
|
651
|
-
/**
|
|
652
|
-
* @hidden
|
|
653
|
-
*
|
|
654
|
-
* Alias for `nodeCollapse`. Used for compatibility with the `ExpandableComponent` interface.
|
|
655
|
-
* Required for the expand-directive.
|
|
656
|
-
*/
|
|
657
|
-
get: function () {
|
|
658
|
-
return this.nodeCollapse;
|
|
659
|
-
},
|
|
660
|
-
enumerable: true,
|
|
661
|
-
configurable: true
|
|
662
|
-
});
|
|
663
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "isExpanded", {
|
|
664
|
-
get: function () {
|
|
665
|
-
return this.isNodeExpanded;
|
|
666
|
-
},
|
|
667
|
-
/**
|
|
668
|
-
* @hidden
|
|
669
|
-
*
|
|
670
|
-
* Alias for `isNodeExpanded`. Used for compatibility with the `ExpandableComponent` interface.
|
|
671
|
-
* Required for the expand-directive.
|
|
672
|
-
*/
|
|
673
|
-
set: function (callback) {
|
|
674
|
-
this.isNodeExpanded = callback;
|
|
675
|
-
},
|
|
676
|
-
enumerable: true,
|
|
677
|
-
configurable: true
|
|
678
|
-
});
|
|
679
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "isVisible", {
|
|
680
|
-
get: function () {
|
|
681
|
-
return this.isNodeVisible;
|
|
682
|
-
},
|
|
683
|
-
/**
|
|
684
|
-
* @hidden
|
|
685
|
-
*
|
|
686
|
-
* Alias for `isNodeVisible`. Used for compatibility with the `DataBoundComponent` interface.
|
|
687
|
-
* The `DataBoundComponent` interface is used in the data-binding directives.
|
|
688
|
-
*/
|
|
689
|
-
set: function (callback) {
|
|
690
|
-
this.isNodeVisible = callback;
|
|
691
|
-
},
|
|
692
|
-
enumerable: true,
|
|
693
|
-
configurable: true
|
|
694
|
-
});
|
|
695
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "isTagFocused", {
|
|
696
|
-
get: function () {
|
|
697
|
-
return !this.isOpen && this.focusedTagIndex !== undefined;
|
|
698
|
-
},
|
|
699
|
-
enumerable: true,
|
|
700
|
-
configurable: true
|
|
701
|
-
});
|
|
702
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "isTreeViewActive", {
|
|
703
|
-
get: function () {
|
|
704
|
-
return this.treeview && this.treeview.isActive;
|
|
705
|
-
},
|
|
706
|
-
enumerable: true,
|
|
707
|
-
configurable: true
|
|
708
|
-
});
|
|
709
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "isWrapperActive", {
|
|
710
|
-
get: function () {
|
|
711
|
-
return document.activeElement === this.wrapper.nativeElement;
|
|
712
|
-
},
|
|
713
|
-
enumerable: true,
|
|
714
|
-
configurable: true
|
|
715
|
-
});
|
|
716
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "isFilterActive", {
|
|
717
|
-
get: function () {
|
|
718
|
-
return this.filterInput && document.activeElement === this.filterInput.nativeElement;
|
|
719
|
-
},
|
|
720
|
-
enumerable: true,
|
|
721
|
-
configurable: true
|
|
722
|
-
});
|
|
723
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "isCheckAllActive", {
|
|
724
|
-
get: function () {
|
|
725
|
-
return this.checkAllInput && document.activeElement === this.checkAllInput.nativeElement;
|
|
726
|
-
},
|
|
727
|
-
enumerable: true,
|
|
728
|
-
configurable: true
|
|
729
|
-
});
|
|
730
|
-
MultiSelectTreeComponent.prototype.ngOnInit = function () {
|
|
731
|
-
var _this = this;
|
|
732
|
-
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
733
|
-
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', String(this.isOpen));
|
|
734
|
-
this.subscriptions.push(this.localization
|
|
735
|
-
.changes.subscribe(function (_a) {
|
|
736
|
-
var rtl = _a.rtl;
|
|
737
|
-
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
738
|
-
_this.cdr.markForCheck();
|
|
739
|
-
}));
|
|
740
|
-
this.setComponentClasses();
|
|
741
|
-
};
|
|
742
|
-
/**
|
|
743
|
-
* @hidden
|
|
744
|
-
*/
|
|
745
|
-
MultiSelectTreeComponent.prototype.ngOnDestroy = function () {
|
|
746
|
-
this.destroyPopup();
|
|
747
|
-
this.unsubscribeEvents();
|
|
748
|
-
};
|
|
749
|
-
/**
|
|
750
|
-
* @hidden
|
|
751
|
-
*/
|
|
752
|
-
MultiSelectTreeComponent.prototype.ngOnChanges = function (changes) {
|
|
753
|
-
var _this = this;
|
|
754
|
-
if (anyChanged(['textField', 'valueField', 'valuePrimitive'], changes, false)) {
|
|
755
|
-
this.setState();
|
|
756
|
-
}
|
|
757
|
-
if (anyChanged(['valueDepth', 'value', 'dataItems'], changes, false)) {
|
|
758
|
-
if (changes.value && !changes.dataItems && !this.valuePrimitive) {
|
|
759
|
-
// Update the dataItems if the value is updated programmatically (non-primitive values only)
|
|
760
|
-
// In the primitive case, the client should update the dataItems as well
|
|
761
|
-
this.dataItems = this.value;
|
|
762
|
-
}
|
|
763
|
-
else {
|
|
764
|
-
// Re-map the dataItems because `valueDepth` is not yet available when the check directive parses the items
|
|
765
|
-
this.dataItems = this.dataItems.map(function (item, index) { return (tslib_1.__assign({}, item, { level: _this.valueDepth[index] || 0 })); });
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
};
|
|
769
|
-
/**
|
|
770
|
-
* @hidden
|
|
771
|
-
*/
|
|
772
|
-
MultiSelectTreeComponent.prototype.ngAfterContentChecked = function () {
|
|
773
|
-
this.verifySettings();
|
|
774
|
-
};
|
|
775
|
-
/**
|
|
776
|
-
* @hidden
|
|
777
|
-
*
|
|
778
|
-
* Used by the kendo-floatinglabel component to determine if the floating label
|
|
779
|
-
* should be rendered inside the input when the component is not focused.
|
|
780
|
-
*/
|
|
781
|
-
MultiSelectTreeComponent.prototype.isEmpty = function () {
|
|
782
|
-
return !Boolean(this.placeholder) && (!isPresent(this.value) || this.value.length === 0);
|
|
783
|
-
};
|
|
784
|
-
/**
|
|
785
|
-
* Focuses the MultiSelectTree.
|
|
786
|
-
*/
|
|
787
|
-
MultiSelectTreeComponent.prototype.focus = function () {
|
|
788
|
-
if (!this.disabled) {
|
|
789
|
-
this.wrapper.nativeElement.focus();
|
|
790
|
-
}
|
|
791
|
-
};
|
|
792
|
-
/**
|
|
793
|
-
* Blurs the MultiSelectTree.
|
|
794
|
-
*/
|
|
795
|
-
MultiSelectTreeComponent.prototype.blur = function () {
|
|
796
|
-
if (!this.disabled) {
|
|
797
|
-
this.wrapper.nativeElement.blur();
|
|
798
|
-
}
|
|
799
|
-
};
|
|
800
|
-
/**
|
|
801
|
-
* Focuses a specific item of the MultiSelectTree based on a provided index in the format of `1_1`.
|
|
802
|
-
* The targeted item should be expanded in order for it to be focused.
|
|
803
|
-
* If null or invalid index is provided the focus will be set on the first item.
|
|
804
|
-
*/
|
|
805
|
-
MultiSelectTreeComponent.prototype.focusItemAt = function (index) {
|
|
806
|
-
if (this.treeview) {
|
|
807
|
-
var lookup = this.treeview.itemLookup(index);
|
|
808
|
-
var isItemDisabled = !isPresent(lookup) || this.treeview.isDisabled(lookup.item.dataItem, lookup.item.index);
|
|
809
|
-
if (!isItemDisabled) {
|
|
810
|
-
this.treeview.focus(index);
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
};
|
|
814
|
-
/**
|
|
815
|
-
* Resets the value of the MultiSelectTree.
|
|
816
|
-
* If you use the `reset` method to clear the value of the component,
|
|
817
|
-
* the model will not update automatically and the `valueChange` event will not be fired.
|
|
818
|
-
*/
|
|
819
|
-
MultiSelectTreeComponent.prototype.reset = function () {
|
|
820
|
-
this.value = [];
|
|
821
|
-
this.dataItems = [];
|
|
822
|
-
this.valueDepth = [];
|
|
823
|
-
};
|
|
824
|
-
/**
|
|
825
|
-
* Toggles the visibility of the popup
|
|
826
|
-
* ([see example]({% slug openstate_multiselecttree %})).
|
|
827
|
-
* If you use the `toggle` method to open or close the popup, the `open` and `close` events will not be fired.
|
|
828
|
-
*
|
|
829
|
-
* @param open - The state of the popup.
|
|
830
|
-
*/
|
|
831
|
-
MultiSelectTreeComponent.prototype.toggle = function (open) {
|
|
832
|
-
var _this = this;
|
|
833
|
-
// The Promise is required to open the popup on load.
|
|
834
|
-
// Otherwise, the "ViewContainerRef not found..." error will be thrown.
|
|
835
|
-
Promise.resolve(null).then(function () {
|
|
836
|
-
var shouldOpen = isPresent(open) ? open : !isPresent(_this.popupRef);
|
|
837
|
-
_this.destroyPopup();
|
|
838
|
-
if (shouldOpen) {
|
|
839
|
-
_this.createPopup();
|
|
840
|
-
}
|
|
841
|
-
});
|
|
842
|
-
};
|
|
843
|
-
/**
|
|
844
|
-
* @hidden
|
|
845
|
-
*/
|
|
846
|
-
MultiSelectTreeComponent.prototype.handleFocus = function (event) {
|
|
847
|
-
var _this = this;
|
|
848
|
-
if (event.target !== this.wrapper.nativeElement) {
|
|
849
|
-
return;
|
|
850
|
-
}
|
|
851
|
-
event.stopImmediatePropagation();
|
|
852
|
-
if (!this.isFocused) {
|
|
853
|
-
this.isFocused = true;
|
|
854
|
-
if (hasObservers(this.onFocus)) {
|
|
855
|
-
this._zone.run(function () {
|
|
856
|
-
_this.onFocus.emit();
|
|
857
|
-
});
|
|
858
|
-
}
|
|
859
|
-
// Re-focus the treeview if `close` is prevented
|
|
860
|
-
if (this.isOpen && this.treeview) {
|
|
861
|
-
if (this.lastNodeOnFocus) {
|
|
862
|
-
this.lastNodeOnFocus.setAttribute('tabindex', '0');
|
|
863
|
-
}
|
|
864
|
-
this.treeview.focus();
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
};
|
|
868
|
-
/**
|
|
869
|
-
* @hidden
|
|
870
|
-
*/
|
|
871
|
-
MultiSelectTreeComponent.prototype.handleBlur = function (e) {
|
|
872
|
-
var _this = this;
|
|
873
|
-
var relatedTarget = e && e.relatedTarget;
|
|
874
|
-
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
875
|
-
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
876
|
-
return;
|
|
877
|
-
}
|
|
878
|
-
this.isFocused = false;
|
|
879
|
-
this.togglePopup(false);
|
|
880
|
-
if (hasObservers(this.onBlur) ||
|
|
881
|
-
isUntouched(this.wrapper.nativeElement)) {
|
|
882
|
-
this._zone.run(function () {
|
|
883
|
-
_this.onBlur.emit();
|
|
884
|
-
_this.onTouchedCallback();
|
|
885
|
-
});
|
|
886
|
-
}
|
|
887
|
-
};
|
|
888
|
-
/**
|
|
889
|
-
* @hidden
|
|
890
|
-
*/
|
|
891
|
-
MultiSelectTreeComponent.prototype.handleNodeClick = function (node) {
|
|
892
|
-
if (!this.isFocused) {
|
|
893
|
-
// Re-focus the MultiSelectTree when popup close is prevented and a node is clicked
|
|
894
|
-
// On click the focus should be on the clicked element which is why we need to update the lastNodeOnFocus
|
|
895
|
-
var parent_1 = node.originalEvent.target.parentElement.parentElement;
|
|
896
|
-
this.lastNodeOnFocus = parent_1;
|
|
897
|
-
this.focus();
|
|
898
|
-
}
|
|
899
|
-
};
|
|
900
|
-
/**
|
|
901
|
-
* @hidden
|
|
902
|
-
*/
|
|
903
|
-
MultiSelectTreeComponent.prototype.togglePopup = function (open) {
|
|
904
|
-
var _this = this;
|
|
905
|
-
var isDisabled = this.disabled || this.readonly;
|
|
906
|
-
var sameState = this.isOpen === open;
|
|
907
|
-
this._zone.run(function () {
|
|
908
|
-
_this.focusedTagIndex = undefined;
|
|
909
|
-
});
|
|
910
|
-
if (isDisabled || sameState) {
|
|
911
|
-
return;
|
|
912
|
-
}
|
|
913
|
-
var togglePrevented = this.triggerPopupEvents(open);
|
|
914
|
-
if (!togglePrevented) {
|
|
915
|
-
open ?
|
|
916
|
-
this.createPopup() :
|
|
917
|
-
this.destroyPopup();
|
|
918
|
-
}
|
|
919
|
-
else {
|
|
920
|
-
this.removeTreeViewFromTabOrder();
|
|
921
|
-
}
|
|
922
|
-
};
|
|
923
|
-
/**
|
|
924
|
-
* @hidden
|
|
925
|
-
*/
|
|
926
|
-
MultiSelectTreeComponent.prototype.messageFor = function (key) {
|
|
927
|
-
return this.localization.get(key);
|
|
928
|
-
};
|
|
929
|
-
/**
|
|
930
|
-
* @hidden
|
|
931
|
-
*/
|
|
932
|
-
MultiSelectTreeComponent.prototype.handleCheckedItemsChange = function (items) {
|
|
933
|
-
this.valueDepth = items.map(function (item) { return item.level; });
|
|
934
|
-
this.lastAction = items.length > this.dataItems.length ? 'check' : 'uncheck';
|
|
935
|
-
this.dataItems = items.slice();
|
|
936
|
-
this.updateValue(this.dataItems);
|
|
937
|
-
};
|
|
938
|
-
/**
|
|
939
|
-
* @hidden
|
|
940
|
-
*/
|
|
941
|
-
MultiSelectTreeComponent.prototype.handleRemoveTag = function (_a) {
|
|
942
|
-
var _this = this;
|
|
943
|
-
var tag = _a.tag, index = _a.index;
|
|
944
|
-
if (this.disabled || this.readonly) {
|
|
945
|
-
return;
|
|
946
|
-
}
|
|
947
|
-
var eventArgs = new RemoveTagEvent(tag);
|
|
948
|
-
this.removeTag.emit(eventArgs);
|
|
949
|
-
if (eventArgs.isDefaultPrevented()) {
|
|
950
|
-
return;
|
|
951
|
-
}
|
|
952
|
-
// Remove tags based on their position index
|
|
953
|
-
if (tag instanceof Array) {
|
|
954
|
-
// Remove group tag
|
|
955
|
-
this.dataItems = this.dataItems.filter(function (_item, i) { return i < _this.showAfter || _this.disabledIndices.has(i); });
|
|
956
|
-
this.valueDepth = this.valueDepth.filter(function (_item, i) { return i < _this.showAfter || _this.disabledIndices.has(i); });
|
|
957
|
-
}
|
|
958
|
-
else {
|
|
959
|
-
// Remove single tag
|
|
960
|
-
this.dataItems = this.dataItems.filter(function (_item, i) { return i !== index || _this.disabledIndices.has(i); });
|
|
961
|
-
this.valueDepth = this.valueDepth.filter(function (_item, i) { return i !== index || _this.disabledIndices.has(i); });
|
|
962
|
-
}
|
|
963
|
-
this.updateValue(this.dataItems);
|
|
964
|
-
// focus the wrapper if the component is not focused - the floating label reacts to focus/blur
|
|
965
|
-
if (!this.isFocused) {
|
|
966
|
-
this.focus();
|
|
967
|
-
}
|
|
968
|
-
};
|
|
969
|
-
/**
|
|
970
|
-
* @hidden
|
|
971
|
-
*/
|
|
972
|
-
MultiSelectTreeComponent.prototype.handleTagMapperChange = function (showAfter) {
|
|
973
|
-
this.showAfter = parseNumber(showAfter);
|
|
974
|
-
this.setTags();
|
|
975
|
-
};
|
|
976
|
-
/**
|
|
977
|
-
* @hidden
|
|
978
|
-
*/
|
|
979
|
-
MultiSelectTreeComponent.prototype.clearAll = function (event) {
|
|
980
|
-
var _this = this;
|
|
981
|
-
event.stopImmediatePropagation();
|
|
982
|
-
event.preventDefault();
|
|
983
|
-
this.focus();
|
|
984
|
-
this.value = this.value.filter(function (_item, index) { return _this.disabledIndices.has(index); });
|
|
985
|
-
this.dataItems = this.dataItems.filter(function (_item, index) { return _this.disabledIndices.has(index); });
|
|
986
|
-
this.valueDepth = this.valueDepth.filter(function (_depth, index) { return _this.disabledIndices.has(index); });
|
|
987
|
-
this.emitValueChange(this.value);
|
|
988
|
-
};
|
|
989
|
-
/**
|
|
990
|
-
* @hidden
|
|
991
|
-
*/
|
|
992
|
-
MultiSelectTreeComponent.prototype.writeValue = function (value) {
|
|
993
|
-
this.value = value || [];
|
|
994
|
-
// Update the dataItems if the value is updated programmatically (non-primitive values only)
|
|
995
|
-
// In the primitive case, the client should update the dataItems as well
|
|
996
|
-
if (!this.valuePrimitive) {
|
|
997
|
-
this.dataItems = this.value;
|
|
998
|
-
}
|
|
999
|
-
};
|
|
1000
|
-
/**
|
|
1001
|
-
* @hidden
|
|
1002
|
-
*/
|
|
1003
|
-
MultiSelectTreeComponent.prototype.registerOnChange = function (fn) {
|
|
1004
|
-
this.onChangeCallback = fn;
|
|
1005
|
-
};
|
|
1006
|
-
/**
|
|
1007
|
-
* @hidden
|
|
1008
|
-
*/
|
|
1009
|
-
MultiSelectTreeComponent.prototype.registerOnTouched = function (fn) {
|
|
1010
|
-
this.onTouchedCallback = fn;
|
|
1011
|
-
};
|
|
1012
|
-
/**
|
|
1013
|
-
* @hidden
|
|
1014
|
-
*/
|
|
1015
|
-
MultiSelectTreeComponent.prototype.setDisabledState = function (isDisabled) {
|
|
1016
|
-
this.disabled = isDisabled;
|
|
1017
|
-
this.cdr.markForCheck();
|
|
1018
|
-
};
|
|
1019
|
-
/**
|
|
1020
|
-
* @hidden
|
|
1021
|
-
*/
|
|
1022
|
-
MultiSelectTreeComponent.prototype.handleFilterInputChange = function (term) {
|
|
1023
|
-
var _this = this;
|
|
1024
|
-
this.filterChange.next(term);
|
|
1025
|
-
this.allNodesHidden = this.nodes.every(function (node, index) { return !_this.isVisible(node, String(index)); });
|
|
1026
|
-
};
|
|
1027
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "filterInputClasses", {
|
|
1028
|
-
/**
|
|
1029
|
-
* @hidden
|
|
1030
|
-
*/
|
|
1031
|
-
get: function () {
|
|
1032
|
-
return (this.size ? getSizeClass('input', this.size) : '') + " " + (this.fillMode ? 'k-input-' + this.fillMode : '') + " " + (this.rounded ? getRoundedClass(this.rounded) : '');
|
|
1033
|
-
},
|
|
1034
|
-
enumerable: true,
|
|
1035
|
-
configurable: true
|
|
1036
|
-
});
|
|
1037
|
-
Object.defineProperty(MultiSelectTreeComponent.prototype, "checkAllCheckboxClasses", {
|
|
1038
|
-
/**
|
|
1039
|
-
* @hidden
|
|
1040
|
-
*/
|
|
1041
|
-
get: function () {
|
|
1042
|
-
return "" + (this.size ? getSizeClass('checkbox', this.size) : '');
|
|
1043
|
-
},
|
|
1044
|
-
enumerable: true,
|
|
1045
|
-
configurable: true
|
|
1046
|
-
});
|
|
1047
|
-
/**
|
|
1048
|
-
* @hidden
|
|
1049
|
-
*/
|
|
1050
|
-
MultiSelectTreeComponent.prototype.toggleCheckAll = function () {
|
|
1051
|
-
this.checkAllInput.nativeElement.focus();
|
|
1052
|
-
this.checkAllInput.nativeElement.click();
|
|
1053
|
-
};
|
|
1054
|
-
MultiSelectTreeComponent.prototype.verifySettings = function () {
|
|
1055
|
-
if (!isDevMode()) {
|
|
1056
|
-
return;
|
|
1057
|
-
}
|
|
1058
|
-
if (!isPresent(this.valueField) || !isPresent(this.textField)) {
|
|
1059
|
-
throw new Error(MultiSelectTreeMessages.textAndValue);
|
|
1060
|
-
}
|
|
1061
|
-
if (!isArray(this.value)) {
|
|
1062
|
-
throw new Error(MultiSelectTreeMessages.array);
|
|
1063
|
-
}
|
|
1064
|
-
if (this.value.length > 0) {
|
|
1065
|
-
if (this.valuePrimitive && this.value.some(function (item) { return isObject(item); })) {
|
|
1066
|
-
throw new Error(MultiSelectTreeMessages.primitive);
|
|
1067
|
-
}
|
|
1068
|
-
var isEveryDataItemObject = this.dataItems.every(function (item) { return isObject(item.dataItem); });
|
|
1069
|
-
if (this.valuePrimitive && !isArray(this.dataItems)) {
|
|
1070
|
-
throw new Error(MultiSelectTreeMessages.dataItems);
|
|
1071
|
-
}
|
|
1072
|
-
if (this.valuePrimitive && !isEveryDataItemObject) {
|
|
1073
|
-
throw new Error(MultiSelectTreeMessages.dataItems);
|
|
1074
|
-
}
|
|
1075
|
-
if (this.valuePrimitive && this.dataItems.length !== this.value.length) {
|
|
1076
|
-
throw new Error(MultiSelectTreeMessages.dataItemsLength);
|
|
1077
|
-
}
|
|
1078
|
-
if (!this.valuePrimitive && !isObjectArray(this.value)) {
|
|
1079
|
-
throw new Error(MultiSelectTreeMessages.object);
|
|
1080
|
-
}
|
|
1081
|
-
if ((isArray(this.valueField) || isArray(this.textField)) && !isArray(this.valueDepth)) {
|
|
1082
|
-
throw new Error(MultiSelectTreeMessages.valueDepth);
|
|
1083
|
-
}
|
|
1084
|
-
if ((isArray(this.valueField) || isArray(this.textField)) && this.valueDepth.length === 0) {
|
|
1085
|
-
throw new Error(MultiSelectTreeMessages.valueDepth);
|
|
1086
|
-
}
|
|
1087
|
-
if ((isArray(this.valueField) || isArray(this.textField)) && this.valueDepth.length !== this.value.length) {
|
|
1088
|
-
throw new Error(MultiSelectTreeMessages.valueDepthLength);
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
};
|
|
1092
|
-
MultiSelectTreeComponent.prototype.emitValueChange = function (value) {
|
|
1093
|
-
this.onChangeCallback(value);
|
|
1094
|
-
this.valueChange.emit(value);
|
|
1095
|
-
};
|
|
1096
|
-
MultiSelectTreeComponent.prototype.triggerPopupEvents = function (open) {
|
|
1097
|
-
var eventArgs = new PreventableEvent();
|
|
1098
|
-
open ?
|
|
1099
|
-
this.open.emit(eventArgs) :
|
|
1100
|
-
this.close.emit(eventArgs);
|
|
1101
|
-
return eventArgs.isDefaultPrevented();
|
|
1102
|
-
};
|
|
1103
|
-
MultiSelectTreeComponent.prototype.createPopup = function () {
|
|
1104
|
-
var _this = this;
|
|
1105
|
-
var horizontalAlign = this.direction === "rtl" ? "right" : "left";
|
|
1106
|
-
var anchorPosition = { horizontal: horizontalAlign, vertical: 'bottom' };
|
|
1107
|
-
var popupPosition = { horizontal: horizontalAlign, vertical: 'top' };
|
|
1108
|
-
this.popupRef = this.popupService.open({
|
|
1109
|
-
anchor: this.wrapper,
|
|
1110
|
-
appendTo: this.appendTo,
|
|
1111
|
-
anchorAlign: anchorPosition,
|
|
1112
|
-
content: this.popupTemplate,
|
|
1113
|
-
popupAlign: popupPosition,
|
|
1114
|
-
positionMode: 'absolute',
|
|
1115
|
-
popupClass: this.popupContainerClasses
|
|
1116
|
-
});
|
|
1117
|
-
var popupWrapper = this.popupRef.popupElement;
|
|
1118
|
-
var _a = this.width, min = _a.min, max = _a.max;
|
|
1119
|
-
popupWrapper.style.minWidth = min;
|
|
1120
|
-
popupWrapper.style.width = max;
|
|
1121
|
-
popupWrapper.style.height = this.height;
|
|
1122
|
-
this.renderer.setAttribute(popupWrapper, 'dir', this.direction);
|
|
1123
|
-
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'true');
|
|
1124
|
-
this.popupRef.popupOpen.subscribe(function () {
|
|
1125
|
-
_this.cdr.detectChanges();
|
|
1126
|
-
_this.opened.emit();
|
|
1127
|
-
});
|
|
1128
|
-
this.popupRef.popupClose.subscribe(function () {
|
|
1129
|
-
_this.closed.emit();
|
|
1130
|
-
});
|
|
1131
|
-
};
|
|
1132
|
-
MultiSelectTreeComponent.prototype.destroyPopup = function () {
|
|
1133
|
-
var _this = this;
|
|
1134
|
-
if (this.popupRef) {
|
|
1135
|
-
this.popupRef.close();
|
|
1136
|
-
this.popupRef = null;
|
|
1137
|
-
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'false');
|
|
1138
|
-
if (this.filter !== "") {
|
|
1139
|
-
this.filter = "";
|
|
1140
|
-
this.allNodesHidden = false;
|
|
1141
|
-
if (hasObservers(this.filterChange)) {
|
|
1142
|
-
this._zone.run(function () {
|
|
1143
|
-
_this.filterChange.emit("");
|
|
1144
|
-
});
|
|
1145
|
-
}
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
};
|
|
1149
|
-
MultiSelectTreeComponent.prototype.subscribeEvents = function () {
|
|
1150
|
-
var _this = this;
|
|
1151
|
-
this.subscriptions.push(this.navigationService.open.subscribe(function () { return _this.togglePopup(true); }), this.navigationService.enter
|
|
1152
|
-
.pipe(tap(function (event) { return event.originalEvent.preventDefault(); }))
|
|
1153
|
-
.subscribe(function () { return _this.togglePopup(true); }), merge(this.navigationService.close, this.navigationService.esc).subscribe(function () {
|
|
1154
|
-
_this.focus();
|
|
1155
|
-
_this.togglePopup(false);
|
|
1156
|
-
}), this.navigationService.tab.subscribe(this.handleTabKey.bind(this)), this.navigationService.up.subscribe(this.handleUpKey.bind(this)), this.navigationService.down.subscribe(this.handleDownKey.bind(this)), this.navigationService.left
|
|
1157
|
-
.pipe(filter(function () { return !_this.isTreeViewActive; }))
|
|
1158
|
-
.subscribe(this.direction === 'rtl' ? this.handleRightKey.bind(this) : this.handleLeftKey.bind(this)), this.navigationService.right
|
|
1159
|
-
.pipe(filter(function () { return !_this.isTreeViewActive; }))
|
|
1160
|
-
.subscribe(this.direction === 'rtl' ? this.handleLeftKey.bind(this) : this.handleRightKey.bind(this)), this.navigationService.home.pipe(filter(function () { return !_this.isOpen; })).subscribe(this.handleHome.bind(this)), this.navigationService.end.pipe(filter(function () { return !_this.isOpen; })).subscribe(this.handleEnd.bind(this)), this.navigationService.backspace.pipe(filter(function () { return _this.isTagFocused; })).subscribe(this.handleBackspace.bind(this)), this.navigationService.delete.pipe(filter(function () { return _this.isTagFocused; })).subscribe(this.handleDelete.bind(this)));
|
|
1161
|
-
};
|
|
1162
|
-
MultiSelectTreeComponent.prototype.subscribeFocusEvents = function () {
|
|
1163
|
-
var _this = this;
|
|
1164
|
-
if (isDocumentAvailable()) {
|
|
1165
|
-
this.handleFocus = this.handleFocus.bind(this);
|
|
1166
|
-
this.handleDocumentBlur = this.handleDocumentBlur.bind(this);
|
|
1167
|
-
this._zone.runOutsideAngular(function () {
|
|
1168
|
-
var useCapture = true;
|
|
1169
|
-
document.addEventListener('focus', _this.handleFocus, useCapture);
|
|
1170
|
-
document.addEventListener('blur', _this.handleDocumentBlur, useCapture);
|
|
1171
|
-
});
|
|
1172
|
-
}
|
|
1173
|
-
};
|
|
1174
|
-
MultiSelectTreeComponent.prototype.unSubscribeFocusEvents = function () {
|
|
1175
|
-
if (isDocumentAvailable()) {
|
|
1176
|
-
var useCapture = true;
|
|
1177
|
-
document.removeEventListener('focus', this.handleFocus, useCapture);
|
|
1178
|
-
document.removeEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
1179
|
-
}
|
|
1180
|
-
};
|
|
1181
|
-
MultiSelectTreeComponent.prototype.handleDocumentBlur = function (event) {
|
|
1182
|
-
if (event.target !== this.wrapper.nativeElement) {
|
|
1183
|
-
return;
|
|
1184
|
-
}
|
|
1185
|
-
event.stopImmediatePropagation();
|
|
1186
|
-
this.handleBlur(event);
|
|
1187
|
-
};
|
|
1188
|
-
MultiSelectTreeComponent.prototype.handleTabKey = function () {
|
|
1189
|
-
this.focus();
|
|
1190
|
-
if (this.isOpen) {
|
|
1191
|
-
this.treeview.blur();
|
|
1192
|
-
this.removeTreeViewFromTabOrder();
|
|
1193
|
-
}
|
|
1194
|
-
};
|
|
1195
|
-
MultiSelectTreeComponent.prototype.handleUpKey = function (event) {
|
|
1196
|
-
if (!this.treeview) {
|
|
1197
|
-
return;
|
|
1198
|
-
}
|
|
1199
|
-
event.originalEvent.preventDefault();
|
|
1200
|
-
// Prevent toggling the focus between the filterInput and the wrapper elements with `up` key
|
|
1201
|
-
if (this.isWrapperActive) {
|
|
1202
|
-
return;
|
|
1203
|
-
}
|
|
1204
|
-
var isFirstNodeActive = this.treeview['navigationService']['activeIndex'] === '0';
|
|
1205
|
-
// Current focus is on the filter input => should focus the wrapper
|
|
1206
|
-
if (this.filterable && this.isFilterActive) {
|
|
1207
|
-
this.focus();
|
|
1208
|
-
// Current focus is on the treeview first node => should focus the check all checkbox if enabled
|
|
1209
|
-
}
|
|
1210
|
-
else if (this.checkAll && !this.isCheckAllActive && isFirstNodeActive) {
|
|
1211
|
-
this.checkAllInput.nativeElement.focus();
|
|
1212
|
-
// Current focus is either on the check all checkbox or the treeview's first node
|
|
1213
|
-
// => should focus either the filter input (if enabled) or the wrapper
|
|
1214
|
-
}
|
|
1215
|
-
else if (this.isCheckAllActive || isFirstNodeActive) {
|
|
1216
|
-
this.filterable ?
|
|
1217
|
-
this.filterInput.nativeElement.focus() :
|
|
1218
|
-
this.focus();
|
|
1219
|
-
}
|
|
1220
|
-
};
|
|
1221
|
-
MultiSelectTreeComponent.prototype.handleDownKey = function (event) {
|
|
1222
|
-
if (!this.treeview) {
|
|
1223
|
-
return;
|
|
1224
|
-
}
|
|
1225
|
-
event.originalEvent.preventDefault();
|
|
1226
|
-
// Current focus is on the wrapper => should focus the filter input
|
|
1227
|
-
if (this.filterable && this.isWrapperActive) {
|
|
1228
|
-
this.filterInput.nativeElement.focus();
|
|
1229
|
-
// Current focus is on the wrapper/filter input => should focus check all checkbox if enabled
|
|
1230
|
-
}
|
|
1231
|
-
else if (this.checkAll && (this.isWrapperActive || this.isFilterActive)) {
|
|
1232
|
-
this.checkAllInput.nativeElement.focus();
|
|
1233
|
-
// Should focus the treeview if filterable and check all are disabled
|
|
1234
|
-
}
|
|
1235
|
-
else if (!this.treeview.isActive) {
|
|
1236
|
-
this.treeview.focus();
|
|
1237
|
-
}
|
|
1238
|
-
this.focusedTagIndex = undefined;
|
|
1239
|
-
};
|
|
1240
|
-
MultiSelectTreeComponent.prototype.handleRightKey = function (event) {
|
|
1241
|
-
event.originalEvent.preventDefault();
|
|
1242
|
-
var last = this.tags.length - 1;
|
|
1243
|
-
if (this.focusedTagIndex === last) {
|
|
1244
|
-
this.focusedTagIndex = undefined;
|
|
1245
|
-
}
|
|
1246
|
-
else if (this.focusedTagIndex < last) {
|
|
1247
|
-
this.focusedTagIndex++;
|
|
1248
|
-
}
|
|
1249
|
-
else if (!this.focusedTagIndex) {
|
|
1250
|
-
this.focusedTagIndex = 0;
|
|
1251
|
-
}
|
|
1252
|
-
};
|
|
1253
|
-
MultiSelectTreeComponent.prototype.handleLeftKey = function (event) {
|
|
1254
|
-
event.originalEvent.preventDefault();
|
|
1255
|
-
if (this.focusedTagIndex === undefined || this.focusedTagIndex < 0) {
|
|
1256
|
-
this.focusedTagIndex = this.tags.length - 1;
|
|
1257
|
-
}
|
|
1258
|
-
else if (this.focusedTagIndex !== 0) {
|
|
1259
|
-
this.focusedTagIndex--;
|
|
1260
|
-
}
|
|
1261
|
-
};
|
|
1262
|
-
MultiSelectTreeComponent.prototype.handleEnd = function (event) {
|
|
1263
|
-
event.originalEvent.preventDefault();
|
|
1264
|
-
this.focusedTagIndex = this.tags.length - 1;
|
|
1265
|
-
};
|
|
1266
|
-
MultiSelectTreeComponent.prototype.handleHome = function (event) {
|
|
1267
|
-
event.originalEvent.preventDefault();
|
|
1268
|
-
this.focusedTagIndex = 0;
|
|
1269
|
-
};
|
|
1270
|
-
MultiSelectTreeComponent.prototype.handleBackspace = function () {
|
|
1271
|
-
if (this.focusedTagIndex !== undefined) {
|
|
1272
|
-
this.handleDelete();
|
|
1273
|
-
}
|
|
1274
|
-
else {
|
|
1275
|
-
var tag = this.tags[this.tags.length - 1];
|
|
1276
|
-
var index = this.tags.length - 1;
|
|
1277
|
-
this.handleRemoveTag({ tag: tag, index: index });
|
|
1278
|
-
}
|
|
1279
|
-
};
|
|
1280
|
-
MultiSelectTreeComponent.prototype.handleDelete = function () {
|
|
1281
|
-
var tag = this.tags[this.focusedTagIndex];
|
|
1282
|
-
var index = this.focusedTagIndex;
|
|
1283
|
-
this.handleRemoveTag({ tag: tag, index: index });
|
|
1284
|
-
if (this.focusedTagIndex === this.tags.length) {
|
|
1285
|
-
this.focusedTagIndex = undefined;
|
|
1286
|
-
}
|
|
1287
|
-
};
|
|
1288
|
-
MultiSelectTreeComponent.prototype.unsubscribeEvents = function () {
|
|
1289
|
-
this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
|
1290
|
-
this.unSubscribeFocusEvents();
|
|
1291
|
-
};
|
|
1292
|
-
/**
|
|
1293
|
-
* Remove the `TreeView` from the tab order, otherwise a focus loop between the page elements will occur
|
|
1294
|
-
* and the user will not be able to tab to the rest of the browser elements
|
|
1295
|
-
*/
|
|
1296
|
-
MultiSelectTreeComponent.prototype.removeTreeViewFromTabOrder = function () {
|
|
1297
|
-
var _this = this;
|
|
1298
|
-
var nodes = this.treeview.element.nativeElement.querySelectorAll('li');
|
|
1299
|
-
nodes.forEach(function (item) {
|
|
1300
|
-
if (item.getAttribute('tabindex') === '0') {
|
|
1301
|
-
_this.lastNodeOnFocus = item;
|
|
1302
|
-
_this.lastNodeOnFocus.setAttribute('tabindex', '-1');
|
|
1303
|
-
}
|
|
1304
|
-
});
|
|
1305
|
-
};
|
|
1306
|
-
MultiSelectTreeComponent.prototype.setState = function () {
|
|
1307
|
-
if (isPresent(this.dataItems) && isPresent(this.valueField)) {
|
|
1308
|
-
this.setTags();
|
|
1309
|
-
this.checkedItems = this.dataItems.slice();
|
|
1310
|
-
}
|
|
1311
|
-
this.cdr.markForCheck();
|
|
1312
|
-
};
|
|
1313
|
-
MultiSelectTreeComponent.prototype.setTags = function () {
|
|
1314
|
-
var source = this.dataItems.map(function (item) { return item.dataItem; });
|
|
1315
|
-
this.tags = this.tagMapper(source);
|
|
1316
|
-
this.disabledIndices = this.disabledItemsMapper();
|
|
1317
|
-
};
|
|
1318
|
-
MultiSelectTreeComponent.prototype.updateValue = function (value) {
|
|
1319
|
-
var _this = this;
|
|
1320
|
-
var newValue = this.valuePrimitive ?
|
|
1321
|
-
value.map(function (item) { return valueFrom(item, _this.valueField); }) :
|
|
1322
|
-
value.map(function (item) { return item.dataItem; });
|
|
1323
|
-
this.value = newValue;
|
|
1324
|
-
this.emitValueChange(this.value);
|
|
1325
|
-
};
|
|
1326
|
-
/**
|
|
1327
|
-
* @hidden
|
|
1328
|
-
*
|
|
1329
|
-
* Determines which of the provided tags should be disabled and stores their position indices
|
|
1330
|
-
*/
|
|
1331
|
-
MultiSelectTreeComponent.prototype.disabledItemsMapper = function () {
|
|
1332
|
-
var _this = this;
|
|
1333
|
-
return new Set(this.dataItems.reduce(function (indices, item, index) {
|
|
1334
|
-
if (_this.itemDisabled(item.dataItem, item.index)) {
|
|
1335
|
-
indices.push(index);
|
|
1336
|
-
}
|
|
1337
|
-
return indices;
|
|
1338
|
-
}, []));
|
|
1339
|
-
};
|
|
1340
|
-
MultiSelectTreeComponent.prototype.setComponentClasses = function () {
|
|
1341
|
-
if (this.size) {
|
|
1342
|
-
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
1343
|
-
}
|
|
1344
|
-
if (this.rounded) {
|
|
1345
|
-
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
1346
|
-
}
|
|
1347
|
-
if (this.fillMode) {
|
|
1348
|
-
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
1349
|
-
}
|
|
1350
|
-
};
|
|
1351
|
-
var MultiSelectTreeComponent_1;
|
|
1352
|
-
tslib_1.__decorate([
|
|
1353
|
-
HostBinding('class.k-dropdowntree'),
|
|
1354
|
-
HostBinding('class.k-input'),
|
|
1355
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
1356
|
-
], MultiSelectTreeComponent.prototype, "hostClasses", void 0);
|
|
1357
|
-
tslib_1.__decorate([
|
|
1358
|
-
HostBinding('class.k-disabled'),
|
|
1359
|
-
HostBinding('attr.aria-disabled'),
|
|
1360
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
1361
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
1362
|
-
], MultiSelectTreeComponent.prototype, "isDisabled", null);
|
|
1363
|
-
tslib_1.__decorate([
|
|
1364
|
-
HostBinding('class.k-loading'),
|
|
1365
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
1366
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
1367
|
-
], MultiSelectTreeComponent.prototype, "isLoading", null);
|
|
1368
|
-
tslib_1.__decorate([
|
|
1369
|
-
HostBinding('attr.id'),
|
|
1370
|
-
tslib_1.__metadata("design:type", String),
|
|
1371
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
1372
|
-
], MultiSelectTreeComponent.prototype, "id", null);
|
|
1373
|
-
tslib_1.__decorate([
|
|
1374
|
-
HostBinding('attr.dir'),
|
|
1375
|
-
tslib_1.__metadata("design:type", String)
|
|
1376
|
-
], MultiSelectTreeComponent.prototype, "direction", void 0);
|
|
1377
|
-
tslib_1.__decorate([
|
|
1378
|
-
HostBinding('attr.tabindex'),
|
|
1379
|
-
tslib_1.__metadata("design:type", Number),
|
|
1380
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
1381
|
-
], MultiSelectTreeComponent.prototype, "hostTabIndex", null);
|
|
1382
|
-
tslib_1.__decorate([
|
|
1383
|
-
HostBinding('attr.role'),
|
|
1384
|
-
tslib_1.__metadata("design:type", String)
|
|
1385
|
-
], MultiSelectTreeComponent.prototype, "role", void 0);
|
|
1386
|
-
tslib_1.__decorate([
|
|
1387
|
-
HostBinding('attr.aria-expanded'),
|
|
1388
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
1389
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
1390
|
-
], MultiSelectTreeComponent.prototype, "isAriaExpanded", null);
|
|
1391
|
-
tslib_1.__decorate([
|
|
1392
|
-
HostBinding('attr.aria-haspopup'),
|
|
1393
|
-
tslib_1.__metadata("design:type", String)
|
|
1394
|
-
], MultiSelectTreeComponent.prototype, "ariaHasPopup", void 0);
|
|
1395
|
-
tslib_1.__decorate([
|
|
1396
|
-
HostBinding('attr.readonly'),
|
|
1397
|
-
HostBinding('attr.aria-readonly'),
|
|
1398
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
1399
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
1400
|
-
], MultiSelectTreeComponent.prototype, "isReadonly", null);
|
|
1401
|
-
tslib_1.__decorate([
|
|
1402
|
-
HostBinding('attr.aria-describedby'),
|
|
1403
|
-
tslib_1.__metadata("design:type", String),
|
|
1404
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
1405
|
-
], MultiSelectTreeComponent.prototype, "ariaDescribedBy", null);
|
|
1406
|
-
tslib_1.__decorate([
|
|
1407
|
-
HostBinding('attr.aria-activedescendant'),
|
|
1408
|
-
tslib_1.__metadata("design:type", String),
|
|
1409
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
1410
|
-
], MultiSelectTreeComponent.prototype, "ariaActiveDescendant", null);
|
|
1411
|
-
tslib_1.__decorate([
|
|
1412
|
-
HostListener('click'),
|
|
1413
|
-
tslib_1.__metadata("design:type", Function),
|
|
1414
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
1415
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
1416
|
-
], MultiSelectTreeComponent.prototype, "handleClick", null);
|
|
1417
|
-
tslib_1.__decorate([
|
|
1418
|
-
HostListener('keydown', ['$event']),
|
|
1419
|
-
tslib_1.__metadata("design:type", Function),
|
|
1420
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1421
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
1422
|
-
], MultiSelectTreeComponent.prototype, "handleKeydown", null);
|
|
1423
|
-
tslib_1.__decorate([
|
|
1424
|
-
ContentChild(HeaderTemplateDirective, { static: false }),
|
|
1425
|
-
tslib_1.__metadata("design:type", HeaderTemplateDirective)
|
|
1426
|
-
], MultiSelectTreeComponent.prototype, "headerTemplate", void 0);
|
|
1427
|
-
tslib_1.__decorate([
|
|
1428
|
-
ContentChild(FooterTemplateDirective, { static: false }),
|
|
1429
|
-
tslib_1.__metadata("design:type", FooterTemplateDirective)
|
|
1430
|
-
], MultiSelectTreeComponent.prototype, "footerTemplate", void 0);
|
|
1431
|
-
tslib_1.__decorate([
|
|
1432
|
-
ContentChild(NodeTemplateDirective, { static: false }),
|
|
1433
|
-
tslib_1.__metadata("design:type", NodeTemplateDirective)
|
|
1434
|
-
], MultiSelectTreeComponent.prototype, "nodeTemplate", void 0);
|
|
1435
|
-
tslib_1.__decorate([
|
|
1436
|
-
ContentChild(NoDataTemplateDirective, { static: false }),
|
|
1437
|
-
tslib_1.__metadata("design:type", NoDataTemplateDirective)
|
|
1438
|
-
], MultiSelectTreeComponent.prototype, "noDataTemplate", void 0);
|
|
1439
|
-
tslib_1.__decorate([
|
|
1440
|
-
ContentChild(TagTemplateDirective, { static: false }),
|
|
1441
|
-
tslib_1.__metadata("design:type", TagTemplateDirective)
|
|
1442
|
-
], MultiSelectTreeComponent.prototype, "tagTemplate", void 0);
|
|
1443
|
-
tslib_1.__decorate([
|
|
1444
|
-
ContentChild(GroupTagTemplateDirective, { static: false }),
|
|
1445
|
-
tslib_1.__metadata("design:type", GroupTagTemplateDirective)
|
|
1446
|
-
], MultiSelectTreeComponent.prototype, "groupTagTemplate", void 0);
|
|
1447
|
-
tslib_1.__decorate([
|
|
1448
|
-
ViewChild('popupTemplate', { static: true }),
|
|
1449
|
-
tslib_1.__metadata("design:type", TemplateRef)
|
|
1450
|
-
], MultiSelectTreeComponent.prototype, "popupTemplate", void 0);
|
|
1451
|
-
tslib_1.__decorate([
|
|
1452
|
-
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
1453
|
-
tslib_1.__metadata("design:type", ViewContainerRef)
|
|
1454
|
-
], MultiSelectTreeComponent.prototype, "container", void 0);
|
|
1455
|
-
tslib_1.__decorate([
|
|
1456
|
-
ViewChild('treeview', { static: false }),
|
|
1457
|
-
tslib_1.__metadata("design:type", TreeViewComponent),
|
|
1458
|
-
tslib_1.__metadata("design:paramtypes", [TreeViewComponent])
|
|
1459
|
-
], MultiSelectTreeComponent.prototype, "treeview", null);
|
|
1460
|
-
tslib_1.__decorate([
|
|
1461
|
-
ViewChild('filterInput', { static: false }),
|
|
1462
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
1463
|
-
], MultiSelectTreeComponent.prototype, "filterInput", void 0);
|
|
1464
|
-
tslib_1.__decorate([
|
|
1465
|
-
ViewChild('checkAllInput', { static: false }),
|
|
1466
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
1467
|
-
], MultiSelectTreeComponent.prototype, "checkAllInput", void 0);
|
|
1468
|
-
tslib_1.__decorate([
|
|
1469
|
-
Input(),
|
|
1470
|
-
tslib_1.__metadata("design:type", Number),
|
|
1471
|
-
tslib_1.__metadata("design:paramtypes", [Number])
|
|
1472
|
-
], MultiSelectTreeComponent.prototype, "tabindex", null);
|
|
1473
|
-
tslib_1.__decorate([
|
|
1474
|
-
Input(),
|
|
1475
|
-
tslib_1.__metadata("design:type", String),
|
|
1476
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
1477
|
-
], MultiSelectTreeComponent.prototype, "size", null);
|
|
1478
|
-
tslib_1.__decorate([
|
|
1479
|
-
Input(),
|
|
1480
|
-
tslib_1.__metadata("design:type", String),
|
|
1481
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
1482
|
-
], MultiSelectTreeComponent.prototype, "rounded", null);
|
|
1483
|
-
tslib_1.__decorate([
|
|
1484
|
-
Input(),
|
|
1485
|
-
tslib_1.__metadata("design:type", String),
|
|
1486
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
1487
|
-
], MultiSelectTreeComponent.prototype, "fillMode", null);
|
|
1488
|
-
tslib_1.__decorate([
|
|
1489
|
-
Input(),
|
|
1490
|
-
tslib_1.__metadata("design:type", Object),
|
|
1491
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
1492
|
-
], MultiSelectTreeComponent.prototype, "popupSettings", null);
|
|
1493
|
-
tslib_1.__decorate([
|
|
1494
|
-
Input(),
|
|
1495
|
-
tslib_1.__metadata("design:type", Object),
|
|
1496
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
1497
|
-
], MultiSelectTreeComponent.prototype, "checkableSettings", null);
|
|
1498
|
-
tslib_1.__decorate([
|
|
1499
|
-
Input(),
|
|
1500
|
-
tslib_1.__metadata("design:type", Array),
|
|
1501
|
-
tslib_1.__metadata("design:paramtypes", [Array])
|
|
1502
|
-
], MultiSelectTreeComponent.prototype, "data", null);
|
|
1503
|
-
tslib_1.__decorate([
|
|
1504
|
-
Input(),
|
|
1505
|
-
tslib_1.__metadata("design:type", Array),
|
|
1506
|
-
tslib_1.__metadata("design:paramtypes", [Array])
|
|
1507
|
-
], MultiSelectTreeComponent.prototype, "value", null);
|
|
1508
|
-
tslib_1.__decorate([
|
|
1509
|
-
Input(),
|
|
1510
|
-
tslib_1.__metadata("design:type", Array),
|
|
1511
|
-
tslib_1.__metadata("design:paramtypes", [Array])
|
|
1512
|
-
], MultiSelectTreeComponent.prototype, "dataItems", null);
|
|
1513
|
-
tslib_1.__decorate([
|
|
1514
|
-
Input(),
|
|
1515
|
-
tslib_1.__metadata("design:type", Object)
|
|
1516
|
-
], MultiSelectTreeComponent.prototype, "textField", void 0);
|
|
1517
|
-
tslib_1.__decorate([
|
|
1518
|
-
Input(),
|
|
1519
|
-
tslib_1.__metadata("design:type", Object)
|
|
1520
|
-
], MultiSelectTreeComponent.prototype, "valueField", void 0);
|
|
1521
|
-
tslib_1.__decorate([
|
|
1522
|
-
Input(),
|
|
1523
|
-
tslib_1.__metadata("design:type", Array)
|
|
1524
|
-
], MultiSelectTreeComponent.prototype, "valueDepth", void 0);
|
|
1525
|
-
tslib_1.__decorate([
|
|
1526
|
-
Input(),
|
|
1527
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
1528
|
-
], MultiSelectTreeComponent.prototype, "loading", void 0);
|
|
1529
|
-
tslib_1.__decorate([
|
|
1530
|
-
Input(),
|
|
1531
|
-
tslib_1.__metadata("design:type", String)
|
|
1532
|
-
], MultiSelectTreeComponent.prototype, "placeholder", void 0);
|
|
1533
|
-
tslib_1.__decorate([
|
|
1534
|
-
Input(),
|
|
1535
|
-
tslib_1.__metadata("design:type", Number)
|
|
1536
|
-
], MultiSelectTreeComponent.prototype, "listHeight", void 0);
|
|
1537
|
-
tslib_1.__decorate([
|
|
1538
|
-
Input(),
|
|
1539
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
1540
|
-
], MultiSelectTreeComponent.prototype, "disabled", void 0);
|
|
1541
|
-
tslib_1.__decorate([
|
|
1542
|
-
Input(),
|
|
1543
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
1544
|
-
], MultiSelectTreeComponent.prototype, "readonly", void 0);
|
|
1545
|
-
tslib_1.__decorate([
|
|
1546
|
-
Input(),
|
|
1547
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
1548
|
-
], MultiSelectTreeComponent.prototype, "valuePrimitive", void 0);
|
|
1549
|
-
tslib_1.__decorate([
|
|
1550
|
-
Input(),
|
|
1551
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
1552
|
-
], MultiSelectTreeComponent.prototype, "loadOnDemand", void 0);
|
|
1553
|
-
tslib_1.__decorate([
|
|
1554
|
-
Input(),
|
|
1555
|
-
tslib_1.__metadata("design:type", String)
|
|
1556
|
-
], MultiSelectTreeComponent.prototype, "focusableId", void 0);
|
|
1557
|
-
tslib_1.__decorate([
|
|
1558
|
-
Input(),
|
|
1559
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
1560
|
-
], MultiSelectTreeComponent.prototype, "clearButton", void 0);
|
|
1561
|
-
tslib_1.__decorate([
|
|
1562
|
-
Input(),
|
|
1563
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
1564
|
-
], MultiSelectTreeComponent.prototype, "filterable", void 0);
|
|
1565
|
-
tslib_1.__decorate([
|
|
1566
|
-
Input(),
|
|
1567
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
1568
|
-
], MultiSelectTreeComponent.prototype, "checkAll", void 0);
|
|
1569
|
-
tslib_1.__decorate([
|
|
1570
|
-
Input(),
|
|
1571
|
-
tslib_1.__metadata("design:type", Function)
|
|
1572
|
-
], MultiSelectTreeComponent.prototype, "hasChildren", void 0);
|
|
1573
|
-
tslib_1.__decorate([
|
|
1574
|
-
Input(),
|
|
1575
|
-
tslib_1.__metadata("design:type", Function)
|
|
1576
|
-
], MultiSelectTreeComponent.prototype, "fetchChildren", void 0);
|
|
1577
|
-
tslib_1.__decorate([
|
|
1578
|
-
Input(),
|
|
1579
|
-
tslib_1.__metadata("design:type", Function)
|
|
1580
|
-
], MultiSelectTreeComponent.prototype, "isNodeExpanded", void 0);
|
|
1581
|
-
tslib_1.__decorate([
|
|
1582
|
-
Input(),
|
|
1583
|
-
tslib_1.__metadata("design:type", Function)
|
|
1584
|
-
], MultiSelectTreeComponent.prototype, "isNodeVisible", void 0);
|
|
1585
|
-
tslib_1.__decorate([
|
|
1586
|
-
Input(),
|
|
1587
|
-
tslib_1.__metadata("design:type", Function)
|
|
1588
|
-
], MultiSelectTreeComponent.prototype, "itemDisabled", void 0);
|
|
1589
|
-
tslib_1.__decorate([
|
|
1590
|
-
Input(),
|
|
1591
|
-
tslib_1.__metadata("design:type", Object)
|
|
1592
|
-
], MultiSelectTreeComponent.prototype, "tagMapper", void 0);
|
|
1593
|
-
tslib_1.__decorate([
|
|
1594
|
-
Output('focus'),
|
|
1595
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
1596
|
-
], MultiSelectTreeComponent.prototype, "onFocus", void 0);
|
|
1597
|
-
tslib_1.__decorate([
|
|
1598
|
-
Output('blur'),
|
|
1599
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
1600
|
-
], MultiSelectTreeComponent.prototype, "onBlur", void 0);
|
|
1601
|
-
tslib_1.__decorate([
|
|
1602
|
-
Output(),
|
|
1603
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
1604
|
-
], MultiSelectTreeComponent.prototype, "open", void 0);
|
|
1605
|
-
tslib_1.__decorate([
|
|
1606
|
-
Output(),
|
|
1607
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
1608
|
-
], MultiSelectTreeComponent.prototype, "opened", void 0);
|
|
1609
|
-
tslib_1.__decorate([
|
|
1610
|
-
Output(),
|
|
1611
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
1612
|
-
], MultiSelectTreeComponent.prototype, "close", void 0);
|
|
1613
|
-
tslib_1.__decorate([
|
|
1614
|
-
Output(),
|
|
1615
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
1616
|
-
], MultiSelectTreeComponent.prototype, "closed", void 0);
|
|
1617
|
-
tslib_1.__decorate([
|
|
1618
|
-
Output(),
|
|
1619
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
1620
|
-
], MultiSelectTreeComponent.prototype, "nodeExpand", void 0);
|
|
1621
|
-
tslib_1.__decorate([
|
|
1622
|
-
Output(),
|
|
1623
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
1624
|
-
], MultiSelectTreeComponent.prototype, "nodeCollapse", void 0);
|
|
1625
|
-
tslib_1.__decorate([
|
|
1626
|
-
Output(),
|
|
1627
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
1628
|
-
], MultiSelectTreeComponent.prototype, "valueChange", void 0);
|
|
1629
|
-
tslib_1.__decorate([
|
|
1630
|
-
Output(),
|
|
1631
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
1632
|
-
], MultiSelectTreeComponent.prototype, "removeTag", void 0);
|
|
1633
|
-
tslib_1.__decorate([
|
|
1634
|
-
Output(),
|
|
1635
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
1636
|
-
], MultiSelectTreeComponent.prototype, "filterChange", void 0);
|
|
1637
|
-
MultiSelectTreeComponent = MultiSelectTreeComponent_1 = tslib_1.__decorate([
|
|
1638
|
-
Component({
|
|
1639
|
-
exportAs: 'kendoMultiSelectTree',
|
|
1640
|
-
providers: [
|
|
1641
|
-
LocalizationService,
|
|
1642
|
-
NavigationService,
|
|
1643
|
-
DataService,
|
|
1644
|
-
DisabledItemsService,
|
|
1645
|
-
SelectionService,
|
|
1646
|
-
{
|
|
1647
|
-
provide: L10N_PREFIX,
|
|
1648
|
-
useValue: 'kendo.multiselecttree'
|
|
1649
|
-
},
|
|
1650
|
-
{
|
|
1651
|
-
multi: true,
|
|
1652
|
-
provide: NG_VALUE_ACCESSOR,
|
|
1653
|
-
useExisting: forwardRef(function () { return MultiSelectTreeComponent_1; })
|
|
1654
|
-
},
|
|
1655
|
-
{
|
|
1656
|
-
provide: DataBoundComponent,
|
|
1657
|
-
useExisting: forwardRef(function () { return MultiSelectTreeComponent_1; })
|
|
1658
|
-
},
|
|
1659
|
-
{
|
|
1660
|
-
provide: ExpandableComponent,
|
|
1661
|
-
useExisting: forwardRef(function () { return MultiSelectTreeComponent_1; })
|
|
1662
|
-
},
|
|
1663
|
-
{
|
|
1664
|
-
provide: KendoInput,
|
|
1665
|
-
useExisting: forwardRef(function () { return MultiSelectTreeComponent_1; })
|
|
1666
|
-
}
|
|
1667
|
-
],
|
|
1668
|
-
selector: 'kendo-multiselecttree',
|
|
1669
|
-
template: "\n <ng-container kendoMultiSelectTreeLocalizedMessages\n i18n-noDataText=\"kendo.multiselecttree.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.multiselecttree.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n\n i18n-checkAllText=\"kendo.multiselecttree.checkAllText|The text displayed for the check-all checkbox\"\n checkAllText=\"Check all\"\n >\n </ng-container>\n <kendo-taglist\n [size]=\"size\"\n [rounded]=\"rounded\"\n [fillMode]=\"fillMode\"\n [id]=\"tagListId\"\n [tags]=\"tags\"\n [focused]=\"focusedTagIndex\"\n [textField]=\"textField\"\n [valueField]=\"valueField\"\n [valueDepth]=\"valueDepth\"\n [disabled]=\"disabled\"\n [tagPrefix]=\"tagPrefix\"\n [template]=\"tagTemplate\"\n [groupTemplate]=\"groupTagTemplate\"\n [disabledIndices]=\"disabledIndices\"\n (removeTag)=\"handleRemoveTag($event)\"\n >\n <span *ngIf=\"!tags || !tags.length\"\n class=\"k-input-inner k-readonly\"\n >\n <span class=\"k-input-value-text\">{{ placeholder }}</span>\n </span>\n </kendo-taglist>\n <span\n *ngIf=\"!disabled && !loading && !readonly && clearButton && tags?.length\"\n class=\"k-clear-value\"\n [attr.title]=\"messageFor('clearTitle')\"\n role=\"button\"\n tabindex=\"-1\"\n (click)=\"clearAll($event)\"\n >\n <span class=\"k-icon k-i-x\"></span>\n </span>\n <span\n *ngIf=\"loading\"\n class=\"k-icon k-i-loading\"\n >\n </span>\n <ng-template #popupTemplate>\n <span\n *ngIf=\"filterable\"\n class=\"k-list-filter\"\n >\n <span\n class=\"k-textbox k-input\"\n [ngClass]=\"filterInputClasses\"\n >\n <span class=\"k-input-prefix\">\n <span class=\"k-input-icon k-icon k-i-search\"></span>\n </span>\n <input\n #filterInput\n (input)=\"handleFilterInputChange($event.target.value)\"\n [filterInput]=\"filterable && !touchEnabled\"\n (keydown)=\"handleKeydown($event)\"\n [(ngModel)]=\"filter\"\n class=\"k-input-inner\"\n role=\"textbox\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n tabindex=\"0\"\n aria-disabled=\"false\"\n aria-readonly=\"false\"\n [kendoEventsOutsideAngular]=\"{\n blur: handleBlur\n }\"\n [scope]=\"this\"\n >\n </span>\n </span>\n <!--header template-->\n <ng-template\n *ngIf=\"headerTemplate\"\n [templateContext]=\"{\n templateRef: headerTemplate?.templateRef\n }\">\n </ng-template>\n <div *ngIf=\"checkAll\" class=\"k-check-all\">\n <input\n #checkAllInput\n [checkAll]=\"!filterable && !touchEnabled\"\n type=\"checkbox\"\n class=\"k-checkbox\"\n [ngClass]=\"checkAllCheckboxClasses\"\n role=\"checkbox\"\n tabindex=\"0\"\n aria-disabled=\"false\"\n aria-readonly=\"false\"\n [treeview]=\"treeview\"\n [checkedItems]=\"checkedItems\"\n [valueField]=\"valueField\"\n [lastAction]=\"lastAction\"\n (checkedItemsChange)=\"handleCheckedItemsChange($event)\"\n (keydown)=\"handleKeydown($event)\"\n [kendoEventsOutsideAngular]=\"{\n blur: handleBlur\n }\"\n [scope]=\"this\"\n >\n <span\n class=\"k-checkbox-label\"\n (click)=\"toggleCheckAll()\"\n (mousedown)=\"$event.preventDefault()\"\n >\n {{ messageFor('checkAllText') }}\n </span>\n </div>\n <kendo-treeview\n #treeview\n [size]=\"size\"\n [nodes]=\"data\"\n [style.maxHeight.px]=\"listHeight\"\n [animate]=\"false\"\n kendoMultiSelectTreeCheckable\n [checkable]=\"checkableSettings\"\n [checkedItems]=\"checkedItems\"\n [valueField]=\"valueField\"\n [textField]=\"textField\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isNodeExpanded\"\n [isDisabled]=\"itemDisabled\"\n [nodeTemplate]=\"nodeTemplate\"\n [loadOnDemand]=\"loadOnDemand\"\n [filter]=\"filter\"\n [isVisible]=\"isNodeVisible\"\n (keydown)=\"handleKeydown($event)\"\n (nodeClick)=\"handleNodeClick($event)\"\n (expand)=\"nodeExpand.emit($event)\"\n (collapse)=\"nodeCollapse.emit($event)\"\n (checkedItemsChange)=\"handleCheckedItemsChange($event)\"\n [kendoEventsOutsideAngular]=\"{\n focusout: handleBlur\n }\"\n [scope]=\"this\"\n >\n </kendo-treeview>\n <!--footer template-->\n <ng-template\n *ngIf=\"footerTemplate\"\n [templateContext]=\"{\n templateRef: footerTemplate?.templateRef\n }\">\n </ng-template>\n <!--no-data template-->\n <div class=\"k-no-data\" *ngIf=\"data?.length === 0 || allNodesHidden\">\n <ng-template [ngIf]=\"noDataTemplate\"\n [templateContext]=\"{\n templateRef: noDataTemplate?.templateRef\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!noDataTemplate\">\n <div>{{ messageFor('noDataText') }}</div>\n </ng-template>\n </div>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
1670
|
-
}),
|
|
1671
|
-
tslib_1.__param(7, Optional()), tslib_1.__param(7, Inject(TOUCH_ENABLED)),
|
|
1672
|
-
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
1673
|
-
PopupService,
|
|
1674
|
-
Renderer2,
|
|
1675
|
-
NavigationService,
|
|
1676
|
-
NgZone,
|
|
1677
|
-
LocalizationService,
|
|
1678
|
-
ChangeDetectorRef, Boolean])
|
|
1679
|
-
], MultiSelectTreeComponent);
|
|
1680
|
-
return MultiSelectTreeComponent;
|
|
1681
|
-
}());
|
|
1682
|
-
export { MultiSelectTreeComponent };
|
|
1683
|
-
export { ɵ0, ɵ1, ɵ2, ɵ3 };
|