@progress/kendo-angular-treeview 6.0.2-dev.202202251428 → 7.0.0-dev.202204131935
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/bundles/kendo-angular-treeview.umd.js +5 -0
- package/{dist/es2015/check-mode.d.ts → check-mode.d.ts} +0 -0
- package/{dist/es2015/check.directive.d.ts → check.directive.d.ts} +5 -2
- package/{dist/es2015/checkable-settings.d.ts → checkable-settings.d.ts} +0 -0
- package/{dist/es2015/checkbox → checkbox}/checkbox.component.d.ts +7 -4
- package/{dist/es2015/checkbox → checkbox}/checkbox.module.d.ts +5 -0
- package/{dist/es2015/checkbox → checkbox}/checked-state.d.ts +0 -0
- package/{dist/es2015/data-bound-component.d.ts → data-bound-component.d.ts} +3 -0
- package/{dist/es2015/data-change-notification.service.d.ts → data-change-notification.service.d.ts} +0 -0
- package/{dist/es2015/default-callbacks.d.ts → default-callbacks.d.ts} +0 -0
- package/{dist/es2015/disable.directive.d.ts → disable.directive.d.ts} +4 -1
- package/{dist/es2015/drag-and-drop → drag-and-drop}/drag-and-drop-editing.directive.d.ts +4 -1
- package/{dist/es2015/drag-and-drop → drag-and-drop}/drag-and-drop-utils.d.ts +0 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/drag-and-drop.directive.d.ts +4 -1
- package/{dist/es2015/drag-and-drop → drag-and-drop}/drag-clue/drag-clue-template.directive.d.ts +3 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/drag-clue/drag-clue.component.d.ts +4 -1
- package/{dist/es2015/drag-and-drop → drag-and-drop}/drag-clue/drag-clue.service.d.ts +3 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/drop-hint/drop-hint-template.directive.d.ts +3 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/drop-hint/drop-hint.component.d.ts +3 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/drop-hint/drop-hint.service.d.ts +3 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/editing-services/drag-and-drop-asset.service.d.ts +6 -2
- package/{dist/es2015/drag-and-drop → drag-and-drop}/editing-services/flat-editing.service.d.ts +0 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/editing-services/hierarchy-editing.service.d.ts +0 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/models/drop-action.d.ts +0 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/models/drop-position.d.ts +0 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/models/editing-service.d.ts +0 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/models/preventable-event.d.ts +0 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/models/scroll-direction.d.ts +0 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/models/scroll-settings.d.ts +0 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/models/tree-item-filter-state.d.ts +0 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/models/treeitem-add-remove-args.d.ts +0 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/models/treeitem-drag-event.d.ts +2 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/models/treeitem-drag-start-event.d.ts +0 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/models/treeitem-drop-event.d.ts +0 -0
- package/{dist/es2015/drag-and-drop → drag-and-drop}/models.d.ts +0 -0
- package/{dist/es2015 → esm2015}/check-mode.js +1 -0
- package/{dist/es2015 → esm2015}/check.directive.js +23 -35
- package/{dist/es → esm2015}/checkable-settings.js +1 -0
- package/{dist/es2015 → esm2015}/checkbox/checkbox.component.js +47 -51
- package/esm2015/checkbox/checkbox.module.js +27 -0
- package/{dist/es2015 → esm2015}/checkbox/checked-state.js +1 -0
- package/esm2015/data-bound-component.js +19 -0
- package/{dist/es2015 → esm2015}/data-change-notification.service.js +0 -0
- package/{dist/es2015 → esm2015}/default-callbacks.js +0 -0
- package/{dist/es2015 → esm2015}/disable.directive.js +18 -24
- package/{dist/es2015 → esm2015}/drag-and-drop/drag-and-drop-editing.directive.js +14 -16
- package/{dist/es2015 → esm2015}/drag-and-drop/drag-and-drop-utils.js +7 -11
- package/{dist/es2015 → esm2015}/drag-and-drop/drag-and-drop.directive.js +48 -51
- package/{dist/es2015 → esm2015}/drag-and-drop/drag-clue/drag-clue-template.directive.js +14 -12
- package/esm2015/drag-and-drop/drag-clue/drag-clue.component.js +85 -0
- package/{dist/es2015 → esm2015}/drag-and-drop/drag-clue/drag-clue.service.js +9 -9
- package/{dist/es2015 → esm2015}/drag-and-drop/drop-hint/drop-hint-template.directive.js +14 -12
- package/esm2015/drag-and-drop/drop-hint/drop-hint.component.js +79 -0
- package/{dist/es2015 → esm2015}/drag-and-drop/drop-hint/drop-hint.service.js +9 -9
- package/{dist/es2015 → esm2015}/drag-and-drop/editing-services/drag-and-drop-asset.service.js +7 -0
- package/{dist/es2015 → esm2015}/drag-and-drop/editing-services/flat-editing.service.js +0 -0
- package/{dist/es2015 → esm2015}/drag-and-drop/editing-services/hierarchy-editing.service.js +0 -0
- package/{dist/es → esm2015}/drag-and-drop/models/drop-action.js +0 -0
- package/{dist/es → esm2015}/drag-and-drop/models/drop-position.js +0 -0
- package/{dist/es2015 → esm2015}/drag-and-drop/models/editing-service.js +1 -0
- package/{dist/es2015 → esm2015}/drag-and-drop/models/preventable-event.js +0 -0
- package/{dist/es → esm2015}/drag-and-drop/models/scroll-direction.js +0 -0
- package/{dist/es → esm2015}/drag-and-drop/models/scroll-settings.js +1 -0
- package/{dist/es → esm2015}/drag-and-drop/models/tree-item-filter-state.js +1 -0
- package/{dist/es → esm2015}/drag-and-drop/models/treeitem-add-remove-args.js +1 -0
- package/{dist/es2015 → esm2015}/drag-and-drop/models/treeitem-drag-event.js +2 -0
- package/{dist/es2015 → esm2015}/drag-and-drop/models/treeitem-drag-start-event.js +0 -0
- package/{dist/es2015 → esm2015}/drag-and-drop/models/treeitem-drop-event.js +0 -0
- package/{dist/es → esm2015}/drag-and-drop/models.js +3 -0
- package/{dist/es2015 → esm2015}/expand-state.service.js +8 -10
- package/{dist/es2015 → esm2015}/expand.directive.js +22 -31
- package/esm2015/expandable-component.js +19 -0
- package/{dist/es → esm2015}/filter-expand-settings.interface.js +1 -0
- package/{dist/es → esm2015}/filter-state.interface.js +1 -0
- package/{dist/es2015 → esm2015}/filtering-base.js +13 -13
- package/{dist/es2015 → esm2015}/flat-binding.directive.js +20 -34
- package/{dist/es2015 → esm2015}/funcs.js +0 -0
- package/{dist/es2015 → esm2015}/hierarchy-binding.directive.js +23 -33
- package/{dist/es2015 → esm2015}/index-builder.service.js +8 -10
- package/{dist/es2015/shared.module.d.ts → esm2015/kendo-angular-treeview.js} +2 -3
- package/esm2015/load-more/load-more-button-template.directive.js +31 -0
- package/{dist/es → esm2015}/load-more/load-more-request-args.js +1 -0
- package/{dist/es2015 → esm2015}/load-more/load-more-utils.js +0 -0
- package/{dist/es2015 → esm2015}/load-more/load-more.directive.js +21 -28
- package/{dist/es → esm2015}/load-more/load-more.service.js +1 -0
- package/{dist/es2015 → esm2015}/loading-indicator.directive.js +18 -22
- package/esm2015/loading-notification.service.js +23 -0
- package/{dist/es → esm2015}/main.js +0 -0
- package/{dist/es → esm2015}/navigation/navigation-item.interface.js +1 -0
- package/{dist/es2015 → esm2015}/navigation/navigation-model.js +0 -4
- package/{dist/es → esm2015}/navigation/navigation-state.interface.js +1 -0
- package/{dist/es2015 → esm2015}/navigation/navigation.service.js +9 -9
- package/{dist/es2015 → esm2015}/node-children.service.js +8 -10
- package/{dist/es → esm2015}/node-click-event.interface.js +1 -0
- package/{dist/es2015 → esm2015}/node-template.directive.js +14 -12
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es2015 → esm2015}/selection/select.directive.js +25 -35
- package/{dist/es → esm2015}/selection/selectable-settings.js +1 -0
- package/{dist/es → esm2015}/selection/selection-mode.js +1 -0
- package/{dist/es2015 → esm2015}/selection/selection.service.js +8 -10
- package/{dist/es2015 → esm2015}/shared.module.js +63 -16
- package/{dist/es → esm2015}/size.js +1 -0
- package/{dist/es → esm2015}/treeitem-lookup.interface.js +1 -0
- package/{dist/es → esm2015}/treeitem.interface.js +1 -0
- package/{dist/es2015 → esm2015}/treeview-filter-settings.js +0 -0
- package/{dist/es2015 → esm2015}/treeview-group.component.js +264 -135
- package/{dist/es2015 → esm2015}/treeview-item-content.directive.js +20 -30
- package/{dist/es2015 → esm2015}/treeview-item.directive.js +43 -81
- package/{dist/es2015 → esm2015}/treeview-lookup.service.js +8 -10
- package/{dist/es2015 → esm2015}/treeview.component.js +173 -213
- package/{dist/es2015 → esm2015}/treeview.module.js +26 -10
- package/{dist/es2015 → esm2015}/utils.js +6 -12
- package/{dist/es2015/expand-state.service.d.ts → expand-state.service.d.ts} +3 -0
- package/{dist/es2015/expand.directive.d.ts → expand.directive.d.ts} +5 -2
- package/{dist/es2015/expandable-component.d.ts → expandable-component.d.ts} +3 -0
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-treeview.js} +3415 -3313
- package/{dist/es2015/filter-expand-settings.interface.d.ts → filter-expand-settings.interface.d.ts} +0 -0
- package/{dist/es2015/filter-state.interface.d.ts → filter-state.interface.d.ts} +0 -0
- package/{dist/es2015/filtering-base.d.ts → filtering-base.d.ts} +6 -2
- package/{dist/es2015/flat-binding.directive.d.ts → flat-binding.directive.d.ts} +5 -2
- package/{dist/es2015/funcs.d.ts → funcs.d.ts} +0 -0
- package/{dist/es2015/hierarchy-binding.directive.d.ts → hierarchy-binding.directive.d.ts} +10 -6
- package/{dist/es2015/index-builder.service.d.ts → index-builder.service.d.ts} +3 -0
- package/{dist/es/treeview-filter-settings.js → kendo-angular-treeview.d.ts} +3 -6
- package/{dist/es2015/load-more → load-more}/load-more-button-template.directive.d.ts +3 -0
- package/{dist/es2015/load-more → load-more}/load-more-request-args.d.ts +0 -0
- package/{dist/es2015/load-more → load-more}/load-more-utils.d.ts +0 -0
- package/{dist/es2015/load-more → load-more}/load-more.directive.d.ts +4 -1
- package/{dist/es2015/load-more → load-more}/load-more.service.d.ts +0 -0
- package/{dist/es2015/loading-indicator.directive.d.ts → loading-indicator.directive.d.ts} +5 -1
- package/{dist/es2015/loading-notification.service.d.ts → loading-notification.service.d.ts} +3 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +0 -0
- package/{dist/es2015/navigation → navigation}/navigation-item.interface.d.ts +0 -0
- package/{dist/es2015/navigation → navigation}/navigation-model.d.ts +0 -0
- package/{dist/es2015/navigation → navigation}/navigation-state.interface.d.ts +0 -0
- package/{dist/es2015/navigation → navigation}/navigation.service.d.ts +9 -5
- package/{dist/es2015/node-children.service.d.ts → node-children.service.d.ts} +3 -0
- package/{dist/es2015/node-click-event.interface.d.ts → node-click-event.interface.d.ts} +0 -0
- package/{dist/es2015/node-template.directive.d.ts → node-template.directive.d.ts} +3 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +36 -104
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es2015/selection → selection}/select.directive.d.ts +6 -3
- package/{dist/es2015/selection → selection}/selectable-settings.d.ts +0 -0
- package/{dist/es2015/selection → selection}/selection-mode.d.ts +0 -0
- package/{dist/es2015/selection → selection}/selection.service.d.ts +3 -0
- package/shared.module.d.ts +36 -0
- package/size.d.ts +8 -0
- package/{dist/es2015/treeitem-lookup.interface.d.ts → treeitem-lookup.interface.d.ts} +0 -0
- package/{dist/es2015/treeitem.interface.d.ts → treeitem.interface.d.ts} +0 -0
- package/{dist/es2015/treeview-filter-settings.d.ts → treeview-filter-settings.d.ts} +0 -0
- package/{dist/es2015/treeview-group.component.d.ts → treeview-group.component.d.ts} +16 -7
- package/{dist/es2015/treeview-item-content.directive.d.ts → treeview-item-content.directive.d.ts} +3 -0
- package/{dist/es2015/treeview-item.directive.d.ts → treeview-item.directive.d.ts} +11 -6
- package/{dist/es2015/treeview-lookup.service.d.ts → treeview-lookup.service.d.ts} +3 -0
- package/{dist/es2015/treeview.component.d.ts → treeview.component.d.ts} +26 -15
- package/treeview.module.d.ts +28 -0
- package/{dist/es2015/utils.d.ts → utils.d.ts} +1 -1
- package/dist/cdn/js/kendo-angular-treeview.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/check-mode.js +0 -4
- package/dist/es/check.directive.js +0 -282
- package/dist/es/checkbox/checkbox.component.js +0 -127
- package/dist/es/checkbox/checkbox.module.js +0 -27
- package/dist/es/checkbox/checked-state.js +0 -4
- package/dist/es/data-bound-component.js +0 -21
- package/dist/es/data-change-notification.service.js +0 -18
- package/dist/es/default-callbacks.js +0 -32
- package/dist/es/disable.directive.js +0 -71
- package/dist/es/drag-and-drop/drag-and-drop-editing.directive.js +0 -65
- package/dist/es/drag-and-drop/drag-and-drop-utils.js +0 -274
- package/dist/es/drag-and-drop/drag-and-drop.directive.js +0 -334
- package/dist/es/drag-and-drop/drag-clue/drag-clue-template.directive.js +0 -34
- package/dist/es/drag-and-drop/drag-clue/drag-clue.component.js +0 -54
- package/dist/es/drag-and-drop/drag-clue/drag-clue.service.js +0 -132
- package/dist/es/drag-and-drop/drop-hint/drop-hint-template.directive.js +0 -31
- package/dist/es/drag-and-drop/drop-hint/drop-hint.component.js +0 -43
- package/dist/es/drag-and-drop/drop-hint/drop-hint.service.js +0 -46
- package/dist/es/drag-and-drop/editing-services/drag-and-drop-asset.service.js +0 -53
- package/dist/es/drag-and-drop/editing-services/flat-editing.service.js +0 -145
- package/dist/es/drag-and-drop/editing-services/hierarchy-editing.service.js +0 -90
- package/dist/es/drag-and-drop/models/editing-service.js +0 -4
- package/dist/es/drag-and-drop/models/preventable-event.js +0 -29
- package/dist/es/drag-and-drop/models/treeitem-drag-event.js +0 -14
- package/dist/es/drag-and-drop/models/treeitem-drag-start-event.js +0 -22
- package/dist/es/drag-and-drop/models/treeitem-drop-event.js +0 -36
- package/dist/es/expand-state.service.js +0 -26
- package/dist/es/expand.directive.js +0 -219
- package/dist/es/expandable-component.js +0 -21
- package/dist/es/filtering-base.js +0 -95
- package/dist/es/flat-binding.directive.js +0 -151
- package/dist/es/funcs.js +0 -15
- package/dist/es/hierarchy-binding.directive.js +0 -152
- package/dist/es/index-builder.service.js +0 -38
- package/dist/es/index.js +0 -30
- package/dist/es/load-more/load-more-button-template.directive.js +0 -30
- package/dist/es/load-more/load-more-utils.js +0 -35
- package/dist/es/load-more/load-more.directive.js +0 -114
- package/dist/es/loading-indicator.directive.js +0 -76
- package/dist/es/loading-notification.service.js +0 -23
- package/dist/es/navigation/navigation-model.js +0 -162
- package/dist/es/navigation/navigation.service.js +0 -243
- package/dist/es/node-children.service.js +0 -23
- package/dist/es/node-template.directive.js +0 -74
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/selection/select.directive.js +0 -152
- package/dist/es/selection/selection.service.js +0 -34
- package/dist/es/shared.module.js +0 -75
- package/dist/es/treeview-group.component.js +0 -393
- package/dist/es/treeview-item-content.directive.js +0 -85
- package/dist/es/treeview-item.directive.js +0 -306
- package/dist/es/treeview-lookup.service.js +0 -93
- package/dist/es/treeview.component.js +0 -853
- package/dist/es/treeview.module.js +0 -52
- package/dist/es/utils.js +0 -311
- package/dist/es2015/checkable-settings.js +0 -4
- package/dist/es2015/checkbox/checkbox.module.js +0 -24
- package/dist/es2015/data-bound-component.js +0 -18
- package/dist/es2015/drag-and-drop/drag-clue/drag-clue.component.js +0 -66
- package/dist/es2015/drag-and-drop/drop-hint/drop-hint.component.js +0 -61
- package/dist/es2015/drag-and-drop/models/drop-action.js +0 -17
- package/dist/es2015/drag-and-drop/models/drop-position.js +0 -13
- package/dist/es2015/drag-and-drop/models/scroll-direction.js +0 -12
- package/dist/es2015/drag-and-drop/models/scroll-settings.js +0 -4
- package/dist/es2015/drag-and-drop/models/tree-item-filter-state.js +0 -4
- package/dist/es2015/drag-and-drop/models/treeitem-add-remove-args.js +0 -4
- package/dist/es2015/drag-and-drop/models.js +0 -11
- package/dist/es2015/expandable-component.js +0 -18
- package/dist/es2015/filter-expand-settings.interface.js +0 -4
- package/dist/es2015/filter-state.interface.js +0 -4
- 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/load-more/load-more-button-template.directive.js +0 -29
- package/dist/es2015/load-more/load-more-request-args.js +0 -4
- package/dist/es2015/load-more/load-more.service.js +0 -4
- package/dist/es2015/loading-notification.service.js +0 -25
- package/dist/es2015/main.js +0 -26
- package/dist/es2015/navigation/navigation-item.interface.js +0 -4
- package/dist/es2015/navigation/navigation-state.interface.js +0 -4
- package/dist/es2015/node-click-event.interface.js +0 -4
- package/dist/es2015/selection/selectable-settings.js +0 -4
- package/dist/es2015/selection/selection-mode.js +0 -4
- package/dist/es2015/size.d.ts +0 -14
- package/dist/es2015/size.js +0 -4
- package/dist/es2015/treeitem-lookup.interface.js +0 -4
- package/dist/es2015/treeitem.interface.js +0 -4
- package/dist/es2015/treeview.module.d.ts +0 -9
- package/dist/fesm5/index.js +0 -5426
- package/dist/npm/check-mode.js +0 -6
- package/dist/npm/check.directive.js +0 -285
- package/dist/npm/checkable-settings.js +0 -6
- package/dist/npm/checkbox/checkbox.component.js +0 -129
- package/dist/npm/checkbox/checkbox.module.js +0 -29
- package/dist/npm/checkbox/checked-state.js +0 -6
- package/dist/npm/data-bound-component.js +0 -23
- package/dist/npm/data-change-notification.service.js +0 -20
- package/dist/npm/default-callbacks.js +0 -34
- package/dist/npm/disable.directive.js +0 -73
- package/dist/npm/drag-and-drop/drag-and-drop-editing.directive.js +0 -67
- package/dist/npm/drag-and-drop/drag-and-drop-utils.js +0 -278
- package/dist/npm/drag-and-drop/drag-and-drop.directive.js +0 -336
- package/dist/npm/drag-and-drop/drag-clue/drag-clue-template.directive.js +0 -36
- package/dist/npm/drag-and-drop/drag-clue/drag-clue.component.js +0 -56
- package/dist/npm/drag-and-drop/drag-clue/drag-clue.service.js +0 -134
- package/dist/npm/drag-and-drop/drop-hint/drop-hint-template.directive.js +0 -33
- package/dist/npm/drag-and-drop/drop-hint/drop-hint.component.js +0 -45
- package/dist/npm/drag-and-drop/drop-hint/drop-hint.service.js +0 -48
- package/dist/npm/drag-and-drop/editing-services/drag-and-drop-asset.service.js +0 -55
- package/dist/npm/drag-and-drop/editing-services/flat-editing.service.js +0 -147
- package/dist/npm/drag-and-drop/editing-services/hierarchy-editing.service.js +0 -92
- package/dist/npm/drag-and-drop/models/drop-action.js +0 -19
- package/dist/npm/drag-and-drop/models/drop-position.js +0 -15
- package/dist/npm/drag-and-drop/models/editing-service.js +0 -6
- package/dist/npm/drag-and-drop/models/preventable-event.js +0 -31
- package/dist/npm/drag-and-drop/models/scroll-direction.js +0 -14
- package/dist/npm/drag-and-drop/models/scroll-settings.js +0 -6
- package/dist/npm/drag-and-drop/models/tree-item-filter-state.js +0 -6
- package/dist/npm/drag-and-drop/models/treeitem-add-remove-args.js +0 -6
- package/dist/npm/drag-and-drop/models/treeitem-drag-event.js +0 -16
- package/dist/npm/drag-and-drop/models/treeitem-drag-start-event.js +0 -24
- package/dist/npm/drag-and-drop/models/treeitem-drop-event.js +0 -38
- package/dist/npm/drag-and-drop/models.js +0 -14
- package/dist/npm/expand-state.service.js +0 -28
- package/dist/npm/expand.directive.js +0 -221
- package/dist/npm/expandable-component.js +0 -23
- package/dist/npm/filter-expand-settings.interface.js +0 -6
- package/dist/npm/filter-state.interface.js +0 -6
- package/dist/npm/filtering-base.js +0 -97
- package/dist/npm/flat-binding.directive.js +0 -154
- package/dist/npm/funcs.js +0 -17
- package/dist/npm/hierarchy-binding.directive.js +0 -154
- package/dist/npm/index-builder.service.js +0 -40
- package/dist/npm/index.js +0 -55
- package/dist/npm/load-more/load-more-button-template.directive.js +0 -32
- package/dist/npm/load-more/load-more-request-args.js +0 -6
- package/dist/npm/load-more/load-more-utils.js +0 -37
- package/dist/npm/load-more/load-more.directive.js +0 -116
- package/dist/npm/load-more/load-more.service.js +0 -6
- package/dist/npm/loading-indicator.directive.js +0 -78
- package/dist/npm/loading-notification.service.js +0 -25
- package/dist/npm/main.js +0 -50
- package/dist/npm/navigation/navigation-item.interface.js +0 -6
- package/dist/npm/navigation/navigation-model.js +0 -166
- package/dist/npm/navigation/navigation-state.interface.js +0 -6
- package/dist/npm/navigation/navigation.service.js +0 -245
- package/dist/npm/node-children.service.js +0 -25
- package/dist/npm/node-click-event.interface.js +0 -6
- package/dist/npm/node-template.directive.js +0 -76
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/selection/select.directive.js +0 -154
- package/dist/npm/selection/selectable-settings.js +0 -6
- package/dist/npm/selection/selection-mode.js +0 -6
- package/dist/npm/selection/selection.service.js +0 -36
- package/dist/npm/shared.module.js +0 -77
- package/dist/npm/size.js +0 -6
- package/dist/npm/treeitem-lookup.interface.js +0 -6
- package/dist/npm/treeitem.interface.js +0 -6
- package/dist/npm/treeview-filter-settings.js +0 -14
- package/dist/npm/treeview-group.component.js +0 -395
- package/dist/npm/treeview-item-content.directive.js +0 -87
- package/dist/npm/treeview-item.directive.js +0 -308
- package/dist/npm/treeview-lookup.service.js +0 -95
- package/dist/npm/treeview.component.js +0 -855
- package/dist/npm/treeview.module.js +0 -54
- package/dist/npm/utils.js +0 -322
- package/dist/systemjs/kendo-angular-treeview.js +0 -5
|
@@ -1,336 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
10
|
-
var kendo_draggable_1 = require("@telerik/kendo-draggable");
|
|
11
|
-
var drag_clue_service_1 = require("./drag-clue/drag-clue.service");
|
|
12
|
-
var drop_hint_service_1 = require("./drop-hint/drop-hint.service");
|
|
13
|
-
var drag_clue_template_directive_1 = require("./drag-clue/drag-clue-template.directive");
|
|
14
|
-
var drop_hint_template_directive_1 = require("./drop-hint/drop-hint-template.directive");
|
|
15
|
-
var drag_and_drop_utils_1 = require("./drag-and-drop-utils");
|
|
16
|
-
var utils_1 = require("../utils");
|
|
17
|
-
var treeview_component_1 = require("../treeview.component");
|
|
18
|
-
var models_1 = require("./models");
|
|
19
|
-
var DEFAULT_SCROLL_SETTINGS = {
|
|
20
|
-
enabled: true,
|
|
21
|
-
step: 1,
|
|
22
|
-
interval: 1
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* A directive which enables the dragging and dropping items inside the current TreeView or between multiple linked TreeView component instances
|
|
26
|
-
* ([see example]({% slug draganddrop_treeview %})).
|
|
27
|
-
*
|
|
28
|
-
* Triggers the [`nodeDragStart`]({% slug api_treeview_treeviewcomponent %}#toc-nodedragstart),
|
|
29
|
-
* [`nodeDrag`]({% slug api_treeview_treeviewcomponent %}#toc-nodedrag),
|
|
30
|
-
* [`nodeDrop`]({% slug api_treeview_treeviewcomponent %}#toc-nodedrop),
|
|
31
|
-
* [`nodeDragEnd`]({% slug api_treeview_treeviewcomponent %}#toc-nodedragend),
|
|
32
|
-
* [`addItem`]({% slug api_treeview_treeviewcomponent %}#toc-additem) and
|
|
33
|
-
* [`removeItem`]({% slug api_treeview_treeviewcomponent %}#toc-removeitem)
|
|
34
|
-
* events when the corresponding actions occur on the respective TreeView instance.
|
|
35
|
-
*/
|
|
36
|
-
var DragAndDropDirective = /** @class */ (function () {
|
|
37
|
-
function DragAndDropDirective(element, zone, treeview, dragClueService, dropHintService) {
|
|
38
|
-
this.element = element;
|
|
39
|
-
this.zone = zone;
|
|
40
|
-
this.treeview = treeview;
|
|
41
|
-
this.dragClueService = dragClueService;
|
|
42
|
-
this.dropHintService = dropHintService;
|
|
43
|
-
/**
|
|
44
|
-
* Specifies whether the `removeItem` event will be fired after an item is dropped when the `ctrl` key is pressed.
|
|
45
|
-
* If enabled, the `removeItem` event will not be fired on the source TreeView
|
|
46
|
-
* ([see example]({% slug draganddrop_treeview %}#toc-multiple-treeviews)).
|
|
47
|
-
*
|
|
48
|
-
* @default false
|
|
49
|
-
*/
|
|
50
|
-
this.allowCopy = false;
|
|
51
|
-
/**
|
|
52
|
-
* Specifes the TreeViewComponent instances into which dragged items from the current TreeViewComponent can be dropped
|
|
53
|
-
* ([see example]({% slug draganddrop_treeview %}#toc-multiple-treeviews)).
|
|
54
|
-
*/
|
|
55
|
-
this.dropZoneTreeViews = [];
|
|
56
|
-
/**
|
|
57
|
-
* Specifies the distance in pixels from the initial item pointerdown event, before the dragging is initiated.
|
|
58
|
-
* The `nodeDragStart` and all consequent TreeView drag events will not be fired until the actual dragging begins.
|
|
59
|
-
*
|
|
60
|
-
* @default 5
|
|
61
|
-
*/
|
|
62
|
-
this.startDragAfter = 5;
|
|
63
|
-
/**
|
|
64
|
-
* Controlls the auto-scrolling behavior during drag-and-drop ([see example]({% slug draganddrop_treeview %}#toc-auto-scrolling)).
|
|
65
|
-
* Enbaled by default. To turn the auto-scrolling off, set this prop to `false`.
|
|
66
|
-
*
|
|
67
|
-
* By default, the scrolling will be performed by 1 pixel at every 1 millisecond, when the dragged item reaches the top or the bottom of the scrollable container.
|
|
68
|
-
* The `step` and `interval` can be overridden by providing a `DragAndDropScrollSettings` object to this prop.
|
|
69
|
-
*
|
|
70
|
-
* @default true
|
|
71
|
-
*/
|
|
72
|
-
this.autoScroll = true;
|
|
73
|
-
/**
|
|
74
|
-
* @hidden
|
|
75
|
-
*/
|
|
76
|
-
this.userSelectStyle = 'none';
|
|
77
|
-
/**
|
|
78
|
-
* Describes the offset of the parent element if the latter has the `transform` CSS prop applied.
|
|
79
|
-
* Transformed parents create new stacking context and the fixed children must be position based on the transformed parent.
|
|
80
|
-
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
|
|
81
|
-
*/
|
|
82
|
-
this.containerOffset = { top: 0, left: 0 };
|
|
83
|
-
this.treeview.touchActions = false;
|
|
84
|
-
}
|
|
85
|
-
Object.defineProperty(DragAndDropDirective.prototype, "scrollSettings", {
|
|
86
|
-
get: function () {
|
|
87
|
-
var userProvidedSettings = typeof this.autoScroll === 'boolean' ?
|
|
88
|
-
{ enabled: this.autoScroll } :
|
|
89
|
-
this.autoScroll;
|
|
90
|
-
return Object.assign({}, DEFAULT_SCROLL_SETTINGS, userProvidedSettings);
|
|
91
|
-
},
|
|
92
|
-
enumerable: true,
|
|
93
|
-
configurable: true
|
|
94
|
-
});
|
|
95
|
-
DragAndDropDirective.prototype.ngAfterContentInit = function () {
|
|
96
|
-
this.initalizeDraggable();
|
|
97
|
-
this.dragClueService.initialize(this.treeview.assetsContainer, this.dragClueTemplate && this.dragClueTemplate.templateRef);
|
|
98
|
-
this.dropHintService.initialize(this.treeview.assetsContainer, this.dropHintTemplate && this.dropHintTemplate.templateRef);
|
|
99
|
-
};
|
|
100
|
-
DragAndDropDirective.prototype.ngOnDestroy = function () {
|
|
101
|
-
this.draggable.destroy();
|
|
102
|
-
};
|
|
103
|
-
/**
|
|
104
|
-
* @hidden
|
|
105
|
-
*/
|
|
106
|
-
DragAndDropDirective.prototype.handlePress = function (_a) {
|
|
107
|
-
var originalEvent = _a.originalEvent;
|
|
108
|
-
if (!utils_1.isContent(originalEvent.target)) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
// store the drag target on press, show it only when it's actually dragged
|
|
112
|
-
this.draggedItem = utils_1.closestWithMatch(originalEvent.target, '.k-treeview-leaf');
|
|
113
|
-
// record the current pointer down coords - copared to the `startDragAfter` value to calculate whether to initiate dragging
|
|
114
|
-
this.pendingDragStartEvent = originalEvent;
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* @hidden
|
|
118
|
-
*/
|
|
119
|
-
DragAndDropDirective.prototype.handleDrag = function (_a) {
|
|
120
|
-
var _this = this;
|
|
121
|
-
var originalEvent = _a.originalEvent, clientX = _a.clientX, clientY = _a.clientY;
|
|
122
|
-
if (this.shouldInitiateDragStart({ clientX: clientX, clientY: clientY })) {
|
|
123
|
-
this.initiateDragStart();
|
|
124
|
-
}
|
|
125
|
-
if (!utils_1.isPresent(this.draggedItem) || utils_1.isPresent(this.pendingDragStartEvent)) {
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
var dropTarget = drag_and_drop_utils_1.getDropTarget(originalEvent);
|
|
129
|
-
if (kendo_angular_common_1.hasObservers(this.treeview.nodeDrag)) {
|
|
130
|
-
this.zone.run(function () { return _this.notifyDrag(originalEvent, dropTarget); });
|
|
131
|
-
}
|
|
132
|
-
var targetTreeView = this.getTargetTreeView(dropTarget);
|
|
133
|
-
var dropPosition = drag_and_drop_utils_1.getDropPosition(this.draggedItem, dropTarget, clientY, targetTreeView, this.containerOffset);
|
|
134
|
-
var dropHintAnchor = utils_1.closestWithMatch(dropTarget, '.k-treeview-mid');
|
|
135
|
-
var dropAction = drag_and_drop_utils_1.getDropAction(dropPosition, dropTarget);
|
|
136
|
-
var sourceItem = drag_and_drop_utils_1.treeItemFromEventTarget(this.treeview, this.draggedItem);
|
|
137
|
-
var destinationItem = drag_and_drop_utils_1.treeItemFromEventTarget(targetTreeView, dropTarget);
|
|
138
|
-
this.updateDropHintState(dropPosition, dropHintAnchor, dropAction, sourceItem, destinationItem);
|
|
139
|
-
this.updateDragClueState(dropAction, clientX, clientY, sourceItem, destinationItem);
|
|
140
|
-
if (this.scrollSettings.enabled) {
|
|
141
|
-
this.dragClueService.scrollIntoView(this.scrollSettings);
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
/**
|
|
145
|
-
* @hidden
|
|
146
|
-
*/
|
|
147
|
-
DragAndDropDirective.prototype.handleRelease = function (_a) {
|
|
148
|
-
var _this = this;
|
|
149
|
-
var originalEvent = _a.originalEvent, clientY = _a.clientY;
|
|
150
|
-
if (this.scrollSettings.enabled) {
|
|
151
|
-
this.dragClueService.cancelScroll();
|
|
152
|
-
}
|
|
153
|
-
if (!utils_1.isPresent(this.draggedItem) || utils_1.isPresent(this.pendingDragStartEvent)) {
|
|
154
|
-
this.pendingDragStartEvent = null;
|
|
155
|
-
this.draggedItem = null;
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
var dropTarget = drag_and_drop_utils_1.getDropTarget(originalEvent);
|
|
159
|
-
var sourceTree = this.treeview;
|
|
160
|
-
var destinationTree = this.getTargetTreeView(dropTarget);
|
|
161
|
-
var dropPosition = drag_and_drop_utils_1.getDropPosition(this.draggedItem, dropTarget, clientY, this.getTargetTreeView(dropTarget), this.containerOffset);
|
|
162
|
-
var sourceItem = drag_and_drop_utils_1.treeItemFromEventTarget(sourceTree, this.draggedItem);
|
|
163
|
-
var destinationItem = drag_and_drop_utils_1.treeItemFromEventTarget(destinationTree, dropTarget);
|
|
164
|
-
if (utils_1.isPresent(destinationItem) && utils_1.isPresent(dropPosition)) {
|
|
165
|
-
this.zone.run(function () { return _this.notifyDrop({ sourceItem: sourceItem, destinationItem: destinationItem, dropPosition: dropPosition, sourceTree: sourceTree, destinationTree: destinationTree }, originalEvent); });
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
this.dragClueService.animateDragClueToElementPosition(this.draggedItem);
|
|
169
|
-
}
|
|
170
|
-
if (kendo_angular_common_1.hasObservers(this.treeview.nodeDragEnd)) {
|
|
171
|
-
this.zone.run(function () { return _this.notifyDragEnd({ sourceItem: sourceItem, destinationItem: destinationItem, originalEvent: originalEvent }); });
|
|
172
|
-
}
|
|
173
|
-
this.dropHintService.hide();
|
|
174
|
-
this.draggedItem = null;
|
|
175
|
-
};
|
|
176
|
-
DragAndDropDirective.prototype.updateDropHintState = function (dropPosition, dropHintAnchor, dropAction, sourceItem, destinationItem) {
|
|
177
|
-
if (!utils_1.isPresent(dropHintAnchor) || dropPosition === models_1.DropPosition.Over || !utils_1.isPresent(dropPosition)) {
|
|
178
|
-
this.dropHintService.hide();
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
var anchorViewPortCoords = dropHintAnchor.getBoundingClientRect();
|
|
182
|
-
var insertBefore = dropPosition === models_1.DropPosition.Before;
|
|
183
|
-
var top = insertBefore ? anchorViewPortCoords.top : (anchorViewPortCoords.top + anchorViewPortCoords.height);
|
|
184
|
-
this.dropHintService.updateDropHintData(dropAction, sourceItem, destinationItem);
|
|
185
|
-
// clear any possible container offset created by parent elements with `transform` css property set
|
|
186
|
-
this.dropHintService.move(anchorViewPortCoords.left - this.containerOffset.left, top - this.containerOffset.top);
|
|
187
|
-
this.dropHintService.show();
|
|
188
|
-
};
|
|
189
|
-
DragAndDropDirective.prototype.updateDragClueState = function (dropAction, clientX, clientY, sourceItem, destinationItem) {
|
|
190
|
-
// clear any possible container offset created by parent elements with `transform` css property set
|
|
191
|
-
this.dragClueService.move(clientX - this.containerOffset.left, clientY - this.containerOffset.top);
|
|
192
|
-
this.dragClueService.updateDragClueData(dropAction, sourceItem, destinationItem);
|
|
193
|
-
this.dragClueService.show();
|
|
194
|
-
};
|
|
195
|
-
DragAndDropDirective.prototype.initalizeDraggable = function () {
|
|
196
|
-
var _this = this;
|
|
197
|
-
this.draggable = new kendo_draggable_1.default({
|
|
198
|
-
press: this.handlePress.bind(this),
|
|
199
|
-
drag: this.handleDrag.bind(this),
|
|
200
|
-
release: this.handleRelease.bind(this)
|
|
201
|
-
});
|
|
202
|
-
this.zone.runOutsideAngular(function () { return _this.draggable.bindTo(_this.element.nativeElement); });
|
|
203
|
-
};
|
|
204
|
-
DragAndDropDirective.prototype.notifyDragStart = function (originalEvent, dropTarget) {
|
|
205
|
-
var sourceItem = drag_and_drop_utils_1.treeItemFromEventTarget(this.treeview, dropTarget);
|
|
206
|
-
var event = new models_1.TreeItemDragStartEvent({ sourceItem: sourceItem, originalEvent: originalEvent });
|
|
207
|
-
this.treeview.nodeDragStart.emit(event);
|
|
208
|
-
return event;
|
|
209
|
-
};
|
|
210
|
-
DragAndDropDirective.prototype.notifyDrag = function (originalEvent, dropTarget) {
|
|
211
|
-
var dragEvent = {
|
|
212
|
-
sourceItem: drag_and_drop_utils_1.treeItemFromEventTarget(this.treeview, this.draggedItem),
|
|
213
|
-
destinationItem: drag_and_drop_utils_1.treeItemFromEventTarget(this.getTargetTreeView(dropTarget), dropTarget),
|
|
214
|
-
originalEvent: originalEvent
|
|
215
|
-
};
|
|
216
|
-
this.treeview.nodeDrag.emit(dragEvent);
|
|
217
|
-
};
|
|
218
|
-
DragAndDropDirective.prototype.notifyDrop = function (args, originalEvent) {
|
|
219
|
-
var event = new models_1.TreeItemDropEvent(args, originalEvent);
|
|
220
|
-
args.destinationTree.nodeDrop.emit(event);
|
|
221
|
-
// disable the animations on drop and restore them afterwards (if they were initially turned on)
|
|
222
|
-
this.disableAnimationsForNextTick(args.destinationTree);
|
|
223
|
-
if (args.sourceTree !== args.destinationTree) {
|
|
224
|
-
this.disableAnimationsForNextTick(args.sourceTree);
|
|
225
|
-
}
|
|
226
|
-
if (!event.isDefaultPrevented() && event.isValid) {
|
|
227
|
-
this.dragClueService.hide();
|
|
228
|
-
// order matters in a flat data binding scenario (first add, then remove)
|
|
229
|
-
args.destinationTree.addItem.emit(args);
|
|
230
|
-
if (!(originalEvent.ctrlKey && this.allowCopy)) {
|
|
231
|
-
args.sourceTree.removeItem.emit(args);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
else if (event.isDefaultPrevented()) {
|
|
235
|
-
// directly hide the clue if the default is prevented
|
|
236
|
-
this.dragClueService.hide();
|
|
237
|
-
}
|
|
238
|
-
else if (!event.isValid) {
|
|
239
|
-
// animate the clue back to the source item position if marked as invalid
|
|
240
|
-
this.dragClueService.animateDragClueToElementPosition(this.draggedItem);
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
DragAndDropDirective.prototype.notifyDragEnd = function (dragEndEvent) {
|
|
244
|
-
this.treeview.nodeDragEnd.emit(dragEndEvent);
|
|
245
|
-
};
|
|
246
|
-
DragAndDropDirective.prototype.getTargetTreeView = function (dropTarget) {
|
|
247
|
-
var treeViewTagName = this.treeview.element.nativeElement.tagName;
|
|
248
|
-
var targetTreeView = utils_1.closestWithMatch(dropTarget, treeViewTagName);
|
|
249
|
-
return [this.treeview].concat(this.dropZoneTreeViews).find(function (treeView) {
|
|
250
|
-
return utils_1.isPresent(treeView) && treeView.element.nativeElement === targetTreeView;
|
|
251
|
-
});
|
|
252
|
-
};
|
|
253
|
-
DragAndDropDirective.prototype.disableAnimationsForNextTick = function (treeView) {
|
|
254
|
-
// the treeView.animate getter returns `true` when the animations are turned off
|
|
255
|
-
// confusing, but seems on purpose (the `animate` prop sets the value of the @.disabled host-bound attribute)
|
|
256
|
-
if (treeView.animate) {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
treeView.animate = false;
|
|
260
|
-
this.zone.runOutsideAngular(function () {
|
|
261
|
-
return setTimeout(function () { return treeView.animate = true; });
|
|
262
|
-
});
|
|
263
|
-
};
|
|
264
|
-
DragAndDropDirective.prototype.shouldInitiateDragStart = function (currentPointerCoords) {
|
|
265
|
-
if (!utils_1.isPresent(this.pendingDragStartEvent)) {
|
|
266
|
-
return false;
|
|
267
|
-
}
|
|
268
|
-
var distanceFromPointerDown = Math.sqrt(Math.pow((this.pendingDragStartEvent.clientX - currentPointerCoords.clientX), 2) +
|
|
269
|
-
Math.pow((this.pendingDragStartEvent.clientY - currentPointerCoords.clientY), 2));
|
|
270
|
-
return distanceFromPointerDown >= this.startDragAfter;
|
|
271
|
-
};
|
|
272
|
-
DragAndDropDirective.prototype.initiateDragStart = function () {
|
|
273
|
-
var _this = this;
|
|
274
|
-
if (kendo_angular_common_1.hasObservers(this.treeview.nodeDragStart)) {
|
|
275
|
-
var dragStartEvent = this.zone.run(function () {
|
|
276
|
-
return _this.notifyDragStart(_this.pendingDragStartEvent, drag_and_drop_utils_1.getDropTarget(_this.pendingDragStartEvent));
|
|
277
|
-
});
|
|
278
|
-
if (dragStartEvent.isDefaultPrevented()) {
|
|
279
|
-
this.pendingDragStartEvent = null;
|
|
280
|
-
this.draggedItem = null;
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
this.dragClueService.cancelReturnAnimation();
|
|
285
|
-
this.dragClueService.updateText(this.draggedItem.innerText);
|
|
286
|
-
this.containerOffset = drag_and_drop_utils_1.getContainerOffset(this.draggedItem);
|
|
287
|
-
this.pendingDragStartEvent = null;
|
|
288
|
-
};
|
|
289
|
-
tslib_1.__decorate([
|
|
290
|
-
core_1.Input(),
|
|
291
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
292
|
-
], DragAndDropDirective.prototype, "allowCopy", void 0);
|
|
293
|
-
tslib_1.__decorate([
|
|
294
|
-
core_1.Input(),
|
|
295
|
-
tslib_1.__metadata("design:type", Array)
|
|
296
|
-
], DragAndDropDirective.prototype, "dropZoneTreeViews", void 0);
|
|
297
|
-
tslib_1.__decorate([
|
|
298
|
-
core_1.Input(),
|
|
299
|
-
tslib_1.__metadata("design:type", Number)
|
|
300
|
-
], DragAndDropDirective.prototype, "startDragAfter", void 0);
|
|
301
|
-
tslib_1.__decorate([
|
|
302
|
-
core_1.Input(),
|
|
303
|
-
tslib_1.__metadata("design:type", Object)
|
|
304
|
-
], DragAndDropDirective.prototype, "autoScroll", void 0);
|
|
305
|
-
tslib_1.__decorate([
|
|
306
|
-
core_1.ContentChild(drag_clue_template_directive_1.DragClueTemplateDirective, { static: false }),
|
|
307
|
-
tslib_1.__metadata("design:type", drag_clue_template_directive_1.DragClueTemplateDirective)
|
|
308
|
-
], DragAndDropDirective.prototype, "dragClueTemplate", void 0);
|
|
309
|
-
tslib_1.__decorate([
|
|
310
|
-
core_1.ContentChild(drop_hint_template_directive_1.DropHintTemplateDirective, { static: false }),
|
|
311
|
-
tslib_1.__metadata("design:type", drop_hint_template_directive_1.DropHintTemplateDirective)
|
|
312
|
-
], DragAndDropDirective.prototype, "dropHintTemplate", void 0);
|
|
313
|
-
tslib_1.__decorate([
|
|
314
|
-
core_1.HostBinding('style.user-select'),
|
|
315
|
-
core_1.HostBinding('style.-ms-user-select'),
|
|
316
|
-
core_1.HostBinding('style.-moz-user-select'),
|
|
317
|
-
core_1.HostBinding('style.-webkit-user-select'),
|
|
318
|
-
tslib_1.__metadata("design:type", String)
|
|
319
|
-
], DragAndDropDirective.prototype, "userSelectStyle", void 0);
|
|
320
|
-
DragAndDropDirective = tslib_1.__decorate([
|
|
321
|
-
core_1.Directive({
|
|
322
|
-
selector: '[kendoTreeViewDragAndDrop]',
|
|
323
|
-
providers: [
|
|
324
|
-
drag_clue_service_1.DragClueService,
|
|
325
|
-
drop_hint_service_1.DropHintService
|
|
326
|
-
]
|
|
327
|
-
}),
|
|
328
|
-
tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
|
|
329
|
-
core_1.NgZone,
|
|
330
|
-
treeview_component_1.TreeViewComponent,
|
|
331
|
-
drag_clue_service_1.DragClueService,
|
|
332
|
-
drop_hint_service_1.DropHintService])
|
|
333
|
-
], DragAndDropDirective);
|
|
334
|
-
return DragAndDropDirective;
|
|
335
|
-
}());
|
|
336
|
-
exports.DragAndDropDirective = DragAndDropDirective;
|
|
@@ -1,36 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
/**
|
|
10
|
-
* Represents the template for the TreeView drag clue when an item is dragged. To define the clue template,
|
|
11
|
-
* nest an `<ng-template>` tag with the `kendoTreeViewDragClueTemplate` directive inside a `<kendo-treeview>` tag
|
|
12
|
-
* ([see example]({% slug draganddrop_treeview %}#toc-templates)).
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* The text, attempted drop action, source item and destination item are available as context variables in the template:
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* - `let-text="text"` (`string`)
|
|
19
|
-
* - `let-action="action"` ([`DropAction`]({% slug api_treeview_dropaction %}))
|
|
20
|
-
* - `let-sourceItem="sourceItem"` ([`TreeItemLookup`]({% slug api_treeview_treeitemlookup %}))
|
|
21
|
-
* - `let-destinationItem="destinationItem"` ([`TreeItemLookup`]({% slug api_treeview_treeitemlookup %}))
|
|
22
|
-
*/
|
|
23
|
-
var DragClueTemplateDirective = /** @class */ (function () {
|
|
24
|
-
function DragClueTemplateDirective(templateRef) {
|
|
25
|
-
this.templateRef = templateRef;
|
|
26
|
-
}
|
|
27
|
-
DragClueTemplateDirective = tslib_1.__decorate([
|
|
28
|
-
core_1.Directive({
|
|
29
|
-
selector: '[kendoTreeViewDragClueTemplate]'
|
|
30
|
-
}),
|
|
31
|
-
tslib_1.__param(0, core_1.Optional()),
|
|
32
|
-
tslib_1.__metadata("design:paramtypes", [core_1.TemplateRef])
|
|
33
|
-
], DragClueTemplateDirective);
|
|
34
|
-
return DragClueTemplateDirective;
|
|
35
|
-
}());
|
|
36
|
-
exports.DragClueTemplateDirective = DragClueTemplateDirective;
|
|
@@ -1,56 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var models_1 = require("../models");
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
var DragClueComponent = /** @class */ (function () {
|
|
14
|
-
function DragClueComponent(cdr) {
|
|
15
|
-
this.cdr = cdr;
|
|
16
|
-
this.hostClasses = true;
|
|
17
|
-
this.posistionStyle = 'fixed';
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(DragClueComponent.prototype, "statusIconClass", {
|
|
20
|
-
get: function () {
|
|
21
|
-
switch (this.action) {
|
|
22
|
-
case models_1.DropAction.Add: return 'k-i-plus';
|
|
23
|
-
case models_1.DropAction.InsertTop: return 'k-i-insert-up';
|
|
24
|
-
case models_1.DropAction.InsertBottom: return 'k-i-insert-down';
|
|
25
|
-
case models_1.DropAction.InsertMiddle: return 'k-i-insert-middle';
|
|
26
|
-
case models_1.DropAction.Invalid:
|
|
27
|
-
default: return 'k-i-cancel';
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
enumerable: true,
|
|
31
|
-
configurable: true
|
|
32
|
-
});
|
|
33
|
-
// exposed as a public method that can be called from outside as the component uses `OnPush` strategy
|
|
34
|
-
DragClueComponent.prototype.detectChanges = function () {
|
|
35
|
-
this.cdr.detectChanges();
|
|
36
|
-
};
|
|
37
|
-
tslib_1.__decorate([
|
|
38
|
-
core_1.HostBinding('class.k-header'),
|
|
39
|
-
core_1.HostBinding('class.k-drag-clue'),
|
|
40
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
41
|
-
], DragClueComponent.prototype, "hostClasses", void 0);
|
|
42
|
-
tslib_1.__decorate([
|
|
43
|
-
core_1.HostBinding('style.position'),
|
|
44
|
-
tslib_1.__metadata("design:type", String)
|
|
45
|
-
], DragClueComponent.prototype, "posistionStyle", void 0);
|
|
46
|
-
DragClueComponent = tslib_1.__decorate([
|
|
47
|
-
core_1.Component({
|
|
48
|
-
changeDetection: core_1.ChangeDetectionStrategy.OnPush,
|
|
49
|
-
selector: 'kendo-treeview-drag-clue',
|
|
50
|
-
template: "\n <ng-container *ngIf=\"!template\">\n <span class=\"k-icon {{statusIconClass}} k-drag-status\"></span>\n <span>{{text}}</span>\n </ng-container>\n\n <ng-template\n *ngIf=\"template\"\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n text: text,\n action: action,\n sourceItem: sourceItem,\n destinationItem: destinationItem\n }\"\n >\n </ng-template>\n "
|
|
51
|
-
}),
|
|
52
|
-
tslib_1.__metadata("design:paramtypes", [core_1.ChangeDetectorRef])
|
|
53
|
-
], DragClueComponent);
|
|
54
|
-
return DragClueComponent;
|
|
55
|
-
}());
|
|
56
|
-
exports.DragClueComponent = DragClueComponent;
|
|
@@ -1,134 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var drag_clue_component_1 = require("./drag-clue.component");
|
|
10
|
-
var models_1 = require("../models");
|
|
11
|
-
var utils_1 = require("../../utils");
|
|
12
|
-
var drag_and_drop_asset_service_1 = require("../editing-services/drag-and-drop-asset.service");
|
|
13
|
-
var drag_and_drop_utils_1 = require("../drag-and-drop-utils");
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
exports.CLUE_OFFSET = 10;
|
|
18
|
-
/**
|
|
19
|
-
* @hidden
|
|
20
|
-
*/
|
|
21
|
-
exports.RETURN_ANIMATION_DURATION = 200;
|
|
22
|
-
/**
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
var DragClueService = /** @class */ (function (_super) {
|
|
26
|
-
tslib_1.__extends(DragClueService, _super);
|
|
27
|
-
function DragClueService(componentFactoryResolver) {
|
|
28
|
-
var _this = _super.call(this) || this;
|
|
29
|
-
_this.componentFactoryResolver = componentFactoryResolver;
|
|
30
|
-
return _this;
|
|
31
|
-
}
|
|
32
|
-
DragClueService.prototype.initialize = function (container, template) {
|
|
33
|
-
if (utils_1.isPresent(this._componentRef)) {
|
|
34
|
-
this.ngOnDestroy();
|
|
35
|
-
}
|
|
36
|
-
var clueComponentFactory = this.componentFactoryResolver.resolveComponentFactory(drag_clue_component_1.DragClueComponent);
|
|
37
|
-
this.componentRef = container.createComponent(clueComponentFactory);
|
|
38
|
-
this.hide();
|
|
39
|
-
this.componentRef.instance.template = template;
|
|
40
|
-
this.componentRef.changeDetectorRef.detectChanges();
|
|
41
|
-
};
|
|
42
|
-
DragClueService.prototype.ngOnDestroy = function () {
|
|
43
|
-
this.cancelReturnAnimation();
|
|
44
|
-
this.cancelScroll();
|
|
45
|
-
_super.prototype.ngOnDestroy.call(this);
|
|
46
|
-
};
|
|
47
|
-
DragClueService.prototype.move = function (left, top) {
|
|
48
|
-
_super.prototype.move.call(this, left, top, exports.CLUE_OFFSET);
|
|
49
|
-
};
|
|
50
|
-
DragClueService.prototype.animateDragClueToElementPosition = function (target) {
|
|
51
|
-
var _this = this;
|
|
52
|
-
if (!(utils_1.isPresent(target) && utils_1.isPresent(this.element.animate))) {
|
|
53
|
-
this.hide();
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
var targetElementViewPortCoords = target.getBoundingClientRect();
|
|
57
|
-
var clueElementViewPortCoords = this.element.getBoundingClientRect();
|
|
58
|
-
this.returnAnimation = this.element.animate([
|
|
59
|
-
{ transform: 'translate(0, 0)' },
|
|
60
|
-
{ transform: "translate(" + (targetElementViewPortCoords.left - clueElementViewPortCoords.left) + "px, " + (targetElementViewPortCoords.top - clueElementViewPortCoords.top) + "px)" }
|
|
61
|
-
], exports.RETURN_ANIMATION_DURATION);
|
|
62
|
-
this.returnAnimation.onfinish = function () { return _this.hide(); };
|
|
63
|
-
};
|
|
64
|
-
DragClueService.prototype.cancelReturnAnimation = function () {
|
|
65
|
-
if (!utils_1.isPresent(this.returnAnimation)) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
this.returnAnimation.cancel();
|
|
69
|
-
this.returnAnimation = null;
|
|
70
|
-
};
|
|
71
|
-
DragClueService.prototype.updateDragClueData = function (action, sourceItem, destinationItem) {
|
|
72
|
-
var dragClue = this.componentRef.instance;
|
|
73
|
-
if (action === dragClue.action && utils_1.dataItemsEqual(sourceItem, dragClue.sourceItem) && utils_1.dataItemsEqual(destinationItem, dragClue.destinationItem)) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
dragClue.action = action;
|
|
77
|
-
dragClue.sourceItem = sourceItem;
|
|
78
|
-
dragClue.destinationItem = destinationItem;
|
|
79
|
-
dragClue.detectChanges();
|
|
80
|
-
};
|
|
81
|
-
DragClueService.prototype.updateText = function (text) {
|
|
82
|
-
if (text === this.componentRef.instance.text) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
this.componentRef.instance.text = text;
|
|
86
|
-
this.componentRef.instance.detectChanges();
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Triggers the first scrollable parent to scroll upwards or downwards.
|
|
90
|
-
* Uses setInterval, so should be called outside the angular zone.
|
|
91
|
-
*/
|
|
92
|
-
DragClueService.prototype.scrollIntoView = function (_a) {
|
|
93
|
-
var step = _a.step, interval = _a.interval;
|
|
94
|
-
this.cancelScroll();
|
|
95
|
-
var scrollableContainer = drag_and_drop_utils_1.getScrollableContainer(this.element);
|
|
96
|
-
if (!utils_1.isPresent(scrollableContainer)) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
var containerRect = scrollableContainer.getBoundingClientRect();
|
|
100
|
-
var clueRect = this.element.getBoundingClientRect();
|
|
101
|
-
// if the beginning of the scrollable container is above the current viewport, fall-back to 0
|
|
102
|
-
var firstVisibleClientTopPart = Math.max(containerRect.top, 0);
|
|
103
|
-
// start scrolling up when the first visible item is dragged over
|
|
104
|
-
var topLimit = firstVisibleClientTopPart + clueRect.height;
|
|
105
|
-
// if the end of the scrollable container is beneath the current viewport, fall-back to its client height
|
|
106
|
-
// add the distance from the start of the viewport to the beginning of the container to ensure scrolling bottom begins when the actual end of the container is reached
|
|
107
|
-
var bottomLimit = firstVisibleClientTopPart + Math.min(containerRect.bottom, scrollableContainer.clientHeight);
|
|
108
|
-
if (clueRect.top < topLimit) {
|
|
109
|
-
this.scrollInterval = setInterval(function () {
|
|
110
|
-
return drag_and_drop_utils_1.scrollElementBy(scrollableContainer, step, models_1.ScrollDirection.Up);
|
|
111
|
-
}, interval);
|
|
112
|
-
}
|
|
113
|
-
else if (clueRect.bottom > bottomLimit) {
|
|
114
|
-
this.scrollInterval = setInterval(function () {
|
|
115
|
-
return drag_and_drop_utils_1.scrollElementBy(scrollableContainer, step, models_1.ScrollDirection.Down);
|
|
116
|
-
}, interval);
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* Cancels out the on-going scroll animation, if present.
|
|
121
|
-
*/
|
|
122
|
-
DragClueService.prototype.cancelScroll = function () {
|
|
123
|
-
if (utils_1.isPresent(this.scrollInterval)) {
|
|
124
|
-
clearInterval(this.scrollInterval);
|
|
125
|
-
this.scrollInterval = null;
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
DragClueService = tslib_1.__decorate([
|
|
129
|
-
core_1.Injectable(),
|
|
130
|
-
tslib_1.__metadata("design:paramtypes", [core_1.ComponentFactoryResolver])
|
|
131
|
-
], DragClueService);
|
|
132
|
-
return DragClueService;
|
|
133
|
-
}(drag_and_drop_asset_service_1.DragAndDropAssetService));
|
|
134
|
-
exports.DragClueService = DragClueService;
|
|
@@ -1,33 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
/**
|
|
10
|
-
* Represents the template for the TreeView drop hint when an item is dragged. To define the hint template,
|
|
11
|
-
* nest an `<ng-template>` tag with the `kendoTreeViewDropHintTemplate` directive inside a `<kendo-treeview>` tag
|
|
12
|
-
* ([see example]({% slug draganddrop_treeview %}#toc-templates)).
|
|
13
|
-
*
|
|
14
|
-
* The attempted drop action, source item and destination item are available as context variables in the template:
|
|
15
|
-
*
|
|
16
|
-
* - `let-action="action"` ([`DropAction`]({% slug api_treeview_dropaction %}))
|
|
17
|
-
* - `let-sourceItem="sourceItem"` ([`TreeItemLookup`]({% slug api_treeview_treeitemlookup %}))
|
|
18
|
-
* - `let-destinationItem="destinationItem"` ([`TreeItemLookup`]({% slug api_treeview_treeitemlookup %}))
|
|
19
|
-
*/
|
|
20
|
-
var DropHintTemplateDirective = /** @class */ (function () {
|
|
21
|
-
function DropHintTemplateDirective(templateRef) {
|
|
22
|
-
this.templateRef = templateRef;
|
|
23
|
-
}
|
|
24
|
-
DropHintTemplateDirective = tslib_1.__decorate([
|
|
25
|
-
core_1.Directive({
|
|
26
|
-
selector: '[kendoTreeViewDropHintTemplate]'
|
|
27
|
-
}),
|
|
28
|
-
tslib_1.__param(0, core_1.Optional()),
|
|
29
|
-
tslib_1.__metadata("design:paramtypes", [core_1.TemplateRef])
|
|
30
|
-
], DropHintTemplateDirective);
|
|
31
|
-
return DropHintTemplateDirective;
|
|
32
|
-
}());
|
|
33
|
-
exports.DropHintTemplateDirective = DropHintTemplateDirective;
|
|
@@ -1,45 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
var DropHintComponent = /** @class */ (function () {
|
|
13
|
-
function DropHintComponent(changeDetectorRef) {
|
|
14
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
15
|
-
this.hostClass = true;
|
|
16
|
-
this.position = 'fixed';
|
|
17
|
-
this.pointerEvents = 'none';
|
|
18
|
-
}
|
|
19
|
-
// exposed as a public method that can be called from outside as the component uses `OnPush` strategy
|
|
20
|
-
DropHintComponent.prototype.detectChanges = function () {
|
|
21
|
-
this.changeDetectorRef.detectChanges();
|
|
22
|
-
};
|
|
23
|
-
tslib_1.__decorate([
|
|
24
|
-
core_1.HostBinding('class.k-drop-hint-container'),
|
|
25
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
26
|
-
], DropHintComponent.prototype, "hostClass", void 0);
|
|
27
|
-
tslib_1.__decorate([
|
|
28
|
-
core_1.HostBinding('style.position'),
|
|
29
|
-
tslib_1.__metadata("design:type", String)
|
|
30
|
-
], DropHintComponent.prototype, "position", void 0);
|
|
31
|
-
tslib_1.__decorate([
|
|
32
|
-
core_1.HostBinding('style.pointer-events'),
|
|
33
|
-
tslib_1.__metadata("design:type", String)
|
|
34
|
-
], DropHintComponent.prototype, "pointerEvents", void 0);
|
|
35
|
-
DropHintComponent = tslib_1.__decorate([
|
|
36
|
-
core_1.Component({
|
|
37
|
-
changeDetection: core_1.ChangeDetectionStrategy.OnPush,
|
|
38
|
-
selector: 'kendo-treeview-drop-hint',
|
|
39
|
-
template: "\n <div\n *ngIf=\"!template\"\n class=\"k-drop-hint k-drop-hint-h\"\n >\n <div class='k-drop-hint-start'></div>\n <div class='k-drop-hint-line'></div>\n </div>\n\n <ng-template\n *ngIf=\"template\"\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n action: action,\n sourceItem: sourceItem,\n destinationItem: destinationItem\n }\"\n >\n <ng-template>\n "
|
|
40
|
-
}),
|
|
41
|
-
tslib_1.__metadata("design:paramtypes", [core_1.ChangeDetectorRef])
|
|
42
|
-
], DropHintComponent);
|
|
43
|
-
return DropHintComponent;
|
|
44
|
-
}());
|
|
45
|
-
exports.DropHintComponent = DropHintComponent;
|