devextreme-react 23.1.5 → 23.2.1-alpha-23255-1813
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/LICENSE +21 -21
- package/accordion/package.json +6 -0
- package/action-sheet/package.json +6 -0
- package/autocomplete/package.json +6 -0
- package/bar-gauge/package.json +6 -0
- package/box/package.json +6 -0
- package/bullet/package.json +6 -0
- package/button/package.json +6 -0
- package/button-group/package.json +6 -0
- package/calendar/package.json +6 -0
- package/chart/package.json +6 -0
- package/check-box/package.json +6 -0
- package/circular-gauge/package.json +6 -0
- package/{accordion.d.ts → cjs/accordion.d.ts} +4 -4
- package/cjs/accordion.js +166 -0
- package/{action-sheet.d.ts → cjs/action-sheet.d.ts} +4 -4
- package/cjs/action-sheet.js +140 -0
- package/{autocomplete.d.ts → cjs/autocomplete.d.ts} +21 -21
- package/{autocomplete.js → cjs/autocomplete.js} +28 -5
- package/{bar-gauge.d.ts → cjs/bar-gauge.d.ts} +6 -6
- package/{bar-gauge.js → cjs/bar-gauge.js} +27 -5
- package/{box.d.ts → cjs/box.d.ts} +3 -3
- package/cjs/box.js +158 -0
- package/{bullet.d.ts → cjs/bullet.d.ts} +5 -5
- package/cjs/bullet.js +202 -0
- package/{button-group.d.ts → cjs/button-group.d.ts} +4 -4
- package/cjs/button-group.js +157 -0
- package/{button.d.ts → cjs/button.d.ts} +2 -2
- package/cjs/button.js +129 -0
- package/{calendar.d.ts → cjs/calendar.d.ts} +4 -4
- package/cjs/calendar.js +205 -0
- package/{chart.d.ts → cjs/chart.d.ts} +19 -19
- package/{chart.js → cjs/chart.js} +27 -5
- package/{check-box.d.ts → cjs/check-box.d.ts} +2 -2
- package/cjs/check-box.js +141 -0
- package/{circular-gauge.d.ts → cjs/circular-gauge.d.ts} +4 -4
- package/{circular-gauge.js → cjs/circular-gauge.js} +27 -5
- package/{color-box.d.ts → cjs/color-box.d.ts} +20 -20
- package/{color-box.js → cjs/color-box.js} +28 -5
- package/{common → cjs/common}/charts.d.ts +2 -2
- package/{common → cjs/common}/charts.js +2 -2
- package/{common → cjs/common}/data/custom-store.d.ts +2 -2
- package/{common → cjs/common}/data/custom-store.js +2 -2
- package/{common → cjs/common}/grids.d.ts +2 -2
- package/{common → cjs/common}/grids.js +2 -2
- package/{common → cjs/common}/index.d.ts +3 -3
- package/{common → cjs/common}/index.js +2 -2
- package/{context-menu.d.ts → cjs/context-menu.d.ts} +3 -3
- package/{context-menu.js → cjs/context-menu.js} +27 -5
- package/{core → cjs/core}/component-base.d.ts +5 -5
- package/{core → cjs/core}/component-base.js +30 -5
- package/{core → cjs/core}/component.d.ts +3 -3
- package/cjs/core/component.js +95 -0
- package/{core → cjs/core}/config.d.ts +2 -2
- package/{core → cjs/core}/config.js +2 -2
- package/{core → cjs/core}/configuration/comparer.d.ts +3 -3
- package/{core → cjs/core}/configuration/comparer.js +3 -3
- package/{core → cjs/core}/configuration/config-node.d.ts +2 -2
- package/{core → cjs/core}/configuration/config-node.js +2 -2
- package/{core → cjs/core}/configuration/react/element.d.ts +2 -2
- package/{core → cjs/core}/configuration/react/element.js +2 -2
- package/{core → cjs/core}/configuration/react/templates.d.ts +2 -2
- package/{core → cjs/core}/configuration/react/templates.js +2 -2
- package/{core → cjs/core}/configuration/react/tree.d.ts +2 -2
- package/{core → cjs/core}/configuration/react/tree.js +22 -3
- package/{core → cjs/core}/configuration/tree.d.ts +2 -2
- package/{core → cjs/core}/configuration/tree.js +2 -2
- package/{core → cjs/core}/configuration/utils.d.ts +2 -2
- package/{core → cjs/core}/configuration/utils.js +3 -3
- package/{core → cjs/core}/dx-template.d.ts +2 -2
- package/cjs/core/dx-template.js +99 -0
- package/{core → cjs/core}/extension-component.d.ts +4 -4
- package/{core → cjs/core}/extension-component.js +2 -2
- package/{core → cjs/core}/helpers.d.ts +2 -2
- package/{core → cjs/core}/helpers.js +2 -2
- package/{core → cjs/core}/nested-option.d.ts +5 -5
- package/cjs/core/nested-option.js +68 -0
- package/{core → cjs/core}/options-manager.d.ts +3 -3
- package/{core → cjs/core}/options-manager.js +2 -2
- package/{core → cjs/core}/template-wrapper.d.ts +2 -2
- package/cjs/core/template-wrapper.js +140 -0
- package/{core → cjs/core}/template.d.ts +3 -3
- package/cjs/core/template.js +88 -0
- package/{core → cjs/core}/templates-manager.d.ts +3 -3
- package/cjs/core/templates-manager.js +88 -0
- package/{core → cjs/core}/templates-renderer.d.ts +2 -2
- package/cjs/core/templates-renderer.js +103 -0
- package/{core → cjs/core}/templates-store.d.ts +2 -2
- package/{core → cjs/core}/templates-store.js +3 -3
- package/{core → cjs/core}/widget-config.d.ts +2 -2
- package/{core → cjs/core}/widget-config.js +4 -4
- package/{data-grid.d.ts → cjs/data-grid.d.ts} +54 -52
- package/{data-grid.js → cjs/data-grid.js} +27 -5
- package/{date-box.d.ts → cjs/date-box.d.ts} +30 -27
- package/{date-box.js → cjs/date-box.js} +28 -5
- package/{date-range-box.d.ts → cjs/date-range-box.d.ts} +30 -27
- package/{date-range-box.js → cjs/date-range-box.js} +28 -5
- package/{defer-rendering.d.ts → cjs/defer-rendering.d.ts} +3 -3
- package/{defer-rendering.js → cjs/defer-rendering.js} +27 -5
- package/{diagram.d.ts → cjs/diagram.d.ts} +2 -2
- package/{diagram.js → cjs/diagram.js} +27 -5
- package/{draggable.d.ts → cjs/draggable.d.ts} +2 -2
- package/cjs/draggable.js +132 -0
- package/{drawer.d.ts → cjs/drawer.d.ts} +2 -2
- package/cjs/drawer.js +143 -0
- package/{drop-down-box.d.ts → cjs/drop-down-box.d.ts} +20 -20
- package/{drop-down-box.js → cjs/drop-down-box.js} +28 -5
- package/{drop-down-button.d.ts → cjs/drop-down-button.d.ts} +17 -17
- package/{drop-down-button.js → cjs/drop-down-button.js} +27 -5
- package/{file-manager.d.ts → cjs/file-manager.d.ts} +3 -3
- package/{file-manager.js → cjs/file-manager.js} +27 -5
- package/{file-uploader.d.ts → cjs/file-uploader.d.ts} +2 -2
- package/cjs/file-uploader.js +167 -0
- package/{filter-builder.d.ts → cjs/filter-builder.d.ts} +9 -9
- package/cjs/filter-builder.js +200 -0
- package/{form.d.ts → cjs/form.d.ts} +22 -19
- package/{form.js → cjs/form.js} +28 -5
- package/{funnel.d.ts → cjs/funnel.d.ts} +5 -5
- package/{funnel.js → cjs/funnel.js} +27 -5
- package/{gallery.d.ts → cjs/gallery.d.ts} +3 -3
- package/cjs/gallery.js +152 -0
- package/{gantt.d.ts → cjs/gantt.d.ts} +11 -11
- package/{gantt.js → cjs/gantt.js} +27 -5
- package/{html-editor.d.ts → cjs/html-editor.d.ts} +12 -11
- package/{html-editor.js → cjs/html-editor.js} +28 -5
- package/{index.d.ts → cjs/index.d.ts} +2 -2
- package/{index.js → cjs/index.js} +2 -2
- package/{linear-gauge.d.ts → cjs/linear-gauge.d.ts} +4 -4
- package/{linear-gauge.js → cjs/linear-gauge.js} +27 -5
- package/{list.d.ts → cjs/list.d.ts} +13 -12
- package/cjs/list.js +336 -0
- package/{load-indicator.d.ts → cjs/load-indicator.d.ts} +3 -3
- package/cjs/load-indicator.js +96 -0
- package/{load-panel.d.ts → cjs/load-panel.d.ts} +2 -2
- package/{load-panel.js → cjs/load-panel.js} +27 -5
- package/{lookup.d.ts → cjs/lookup.d.ts} +17 -17
- package/{lookup.js → cjs/lookup.js} +28 -5
- package/{map.d.ts → cjs/map.d.ts} +2 -2
- package/cjs/map.js +214 -0
- package/{menu.d.ts → cjs/menu.d.ts} +3 -3
- package/{menu.js → cjs/menu.js} +27 -5
- package/{multi-view.d.ts → cjs/multi-view.d.ts} +3 -3
- package/cjs/multi-view.js +146 -0
- package/{number-box.d.ts → cjs/number-box.d.ts} +7 -7
- package/cjs/number-box.js +229 -0
- package/{pie-chart.d.ts → cjs/pie-chart.d.ts} +10 -10
- package/{pie-chart.js → cjs/pie-chart.js} +27 -5
- package/{pivot-grid-field-chooser.d.ts → cjs/pivot-grid-field-chooser.d.ts} +3 -3
- package/cjs/pivot-grid-field-chooser.js +178 -0
- package/{pivot-grid.d.ts → cjs/pivot-grid.d.ts} +3 -3
- package/{pivot-grid.js → cjs/pivot-grid.js} +27 -5
- package/{polar-chart.d.ts → cjs/polar-chart.d.ts} +10 -10
- package/{polar-chart.js → cjs/polar-chart.js} +27 -5
- package/{popover.d.ts → cjs/popover.d.ts} +8 -8
- package/{popover.js → cjs/popover.js} +27 -5
- package/{popup.d.ts → cjs/popup.d.ts} +8 -8
- package/{popup.js → cjs/popup.js} +27 -5
- package/{progress-bar.d.ts → cjs/progress-bar.d.ts} +2 -2
- package/cjs/progress-bar.js +138 -0
- package/{radio-group.d.ts → cjs/radio-group.d.ts} +3 -3
- package/cjs/radio-group.js +177 -0
- package/{range-selector.d.ts → cjs/range-selector.d.ts} +7 -7
- package/{range-selector.js → cjs/range-selector.js} +27 -5
- package/{range-slider.d.ts → cjs/range-slider.d.ts} +3 -3
- package/cjs/range-slider.js +191 -0
- package/{recurrence-editor.d.ts → cjs/recurrence-editor.d.ts} +2 -2
- package/cjs/recurrence-editor.js +135 -0
- package/{resizable.d.ts → cjs/resizable.d.ts} +6 -6
- package/cjs/resizable.js +115 -0
- package/{responsive-box.d.ts → cjs/responsive-box.d.ts} +3 -3
- package/cjs/responsive-box.js +171 -0
- package/{sankey.d.ts → cjs/sankey.d.ts} +5 -5
- package/{sankey.js → cjs/sankey.js} +27 -5
- package/{scheduler.d.ts → cjs/scheduler.d.ts} +10 -10
- package/cjs/scheduler.js +345 -0
- package/{scroll-view.d.ts → cjs/scroll-view.d.ts} +3 -3
- package/cjs/scroll-view.js +122 -0
- package/{select-box.d.ts → cjs/select-box.d.ts} +21 -21
- package/{select-box.js → cjs/select-box.js} +28 -5
- package/{slider.d.ts → cjs/slider.d.ts} +3 -3
- package/cjs/slider.js +188 -0
- package/{sortable.d.ts → cjs/sortable.d.ts} +2 -2
- package/cjs/sortable.js +153 -0
- package/{sparkline.d.ts → cjs/sparkline.d.ts} +5 -5
- package/cjs/sparkline.js +237 -0
- package/{speed-dial-action.d.ts → cjs/speed-dial-action.d.ts} +3 -3
- package/cjs/speed-dial-action.js +94 -0
- package/{switch.d.ts → cjs/switch.d.ts} +2 -2
- package/cjs/switch.js +138 -0
- package/{tab-panel.d.ts → cjs/tab-panel.d.ts} +4 -4
- package/cjs/tab-panel.js +188 -0
- package/{tabs.d.ts → cjs/tabs.d.ts} +3 -3
- package/cjs/tabs.js +183 -0
- package/{tag-box.d.ts → cjs/tag-box.d.ts} +21 -21
- package/{tag-box.js → cjs/tag-box.js} +28 -5
- package/{text-area.d.ts → cjs/text-area.d.ts} +2 -2
- package/cjs/text-area.js +180 -0
- package/{text-box.d.ts → cjs/text-box.d.ts} +6 -6
- package/cjs/text-box.js +227 -0
- package/{tile-view.d.ts → cjs/tile-view.d.ts} +3 -3
- package/cjs/tile-view.js +157 -0
- package/{toast.d.ts → cjs/toast.d.ts} +2 -2
- package/{toast.js → cjs/toast.js} +27 -5
- package/{toolbar.d.ts → cjs/toolbar.d.ts} +4 -4
- package/cjs/toolbar.js +140 -0
- package/{tooltip.d.ts → cjs/tooltip.d.ts} +6 -6
- package/{tooltip.js → cjs/tooltip.js} +27 -5
- package/{tree-list.d.ts → cjs/tree-list.d.ts} +53 -51
- package/{tree-list.js → cjs/tree-list.js} +27 -5
- package/{tree-map.d.ts → cjs/tree-map.d.ts} +4 -4
- package/{tree-map.js → cjs/tree-map.js} +27 -5
- package/{tree-view.d.ts → cjs/tree-view.d.ts} +10 -9
- package/cjs/tree-view.js +282 -0
- package/{validation-group.d.ts → cjs/validation-group.d.ts} +3 -3
- package/cjs/validation-group.js +91 -0
- package/{validation-summary.d.ts → cjs/validation-summary.d.ts} +3 -3
- package/cjs/validation-summary.js +116 -0
- package/{validator.d.ts → cjs/validator.d.ts} +5 -3
- package/{validator.js → cjs/validator.js} +27 -5
- package/{vector-map.d.ts → cjs/vector-map.d.ts} +8 -8
- package/{vector-map.js → cjs/vector-map.js} +27 -5
- package/color-box/package.json +6 -0
- package/common/charts/package.json +6 -0
- package/common/data/custom-store/package.json +6 -0
- package/common/grids/package.json +6 -0
- package/common/package.json +6 -0
- package/context-menu/package.json +6 -0
- package/core/template/package.json +6 -0
- package/data-grid/package.json +6 -0
- package/date-box/package.json +6 -0
- package/date-range-box/package.json +6 -0
- package/defer-rendering/package.json +6 -0
- package/diagram/package.json +6 -0
- package/draggable/package.json +6 -0
- package/drawer/package.json +6 -0
- package/drop-down-box/package.json +6 -0
- package/drop-down-button/package.json +6 -0
- package/{accordion.js → esm/accordion.js} +11 -15
- package/{action-sheet.js → esm/action-sheet.js} +11 -15
- package/esm/autocomplete.js +395 -0
- package/esm/bar-gauge.js +400 -0
- package/{box.js → esm/box.js} +11 -15
- package/{bullet.js → esm/bullet.js} +17 -27
- package/{button-group.js → esm/button-group.js} +11 -15
- package/{button.js → esm/button.js} +9 -13
- package/{calendar.js → esm/calendar.js} +19 -12
- package/esm/chart.js +1234 -0
- package/{check-box.js → esm/check-box.js} +10 -12
- package/esm/circular-gauge.js +373 -0
- package/esm/color-box.js +353 -0
- package/esm/common/charts.js +14 -0
- package/esm/common/data/custom-store.js +14 -0
- package/esm/common/grids.js +14 -0
- package/esm/common/index.js +14 -0
- package/esm/context-menu.js +304 -0
- package/esm/core/component-base.js +208 -0
- package/{core → esm/core}/component.js +12 -12
- package/esm/core/config.js +35 -0
- package/esm/core/configuration/comparer.js +98 -0
- package/esm/core/configuration/config-node.js +14 -0
- package/esm/core/configuration/react/element.js +62 -0
- package/esm/core/configuration/react/templates.js +74 -0
- package/esm/core/configuration/react/tree.js +101 -0
- package/esm/core/configuration/tree.js +118 -0
- package/esm/core/configuration/utils.js +47 -0
- package/{core → esm/core}/dx-template.js +13 -16
- package/esm/core/extension-component.js +46 -0
- package/esm/core/helpers.js +54 -0
- package/{core → esm/core}/nested-option.js +8 -9
- package/esm/core/options-manager.js +222 -0
- package/{core → esm/core}/template-wrapper.js +10 -12
- package/{core → esm/core}/template.js +6 -10
- package/{core → esm/core}/templates-manager.js +8 -10
- package/{core → esm/core}/templates-renderer.js +12 -12
- package/esm/core/templates-store.js +47 -0
- package/esm/core/widget-config.js +55 -0
- package/esm/data-grid.js +1287 -0
- package/esm/date-box.js +416 -0
- package/esm/date-range-box.js +398 -0
- package/esm/defer-rendering.js +175 -0
- package/esm/diagram.js +449 -0
- package/{draggable.js → esm/draggable.js} +11 -15
- package/{drawer.js → esm/drawer.js} +9 -12
- package/esm/drop-down-box.js +360 -0
- package/esm/drop-down-button.js +288 -0
- package/esm/file-manager.js +243 -0
- package/{file-uploader.js → esm/file-uploader.js} +10 -12
- package/{filter-builder.js → esm/filter-builder.js} +16 -25
- package/esm/form.js +478 -0
- package/esm/funnel.js +470 -0
- package/{gallery.js → esm/gallery.js} +11 -15
- package/esm/gantt.js +472 -0
- package/esm/html-editor.js +302 -0
- package/esm/index.js +92 -0
- package/esm/linear-gauge.js +376 -0
- package/{list.js → esm/list.js} +17 -27
- package/{load-indicator.js → esm/load-indicator.js} +9 -12
- package/esm/load-panel.js +242 -0
- package/esm/lookup.js +406 -0
- package/{map.js → esm/map.js} +16 -25
- package/esm/menu.js +317 -0
- package/{multi-view.js → esm/multi-view.js} +11 -15
- package/{number-box.js → esm/number-box.js} +14 -19
- package/esm/pie-chart.js +601 -0
- package/{pivot-grid-field-chooser.js → esm/pivot-grid-field-chooser.js} +15 -23
- package/esm/pivot-grid.js +248 -0
- package/esm/polar-chart.js +967 -0
- package/esm/popover.js +297 -0
- package/esm/popup.js +288 -0
- package/{progress-bar.js → esm/progress-bar.js} +10 -12
- package/{radio-group.js → esm/radio-group.js} +12 -15
- package/esm/range-selector.js +742 -0
- package/{range-slider.js → esm/range-slider.js} +14 -19
- package/{recurrence-editor.js → esm/recurrence-editor.js} +10 -12
- package/{resizable.js → esm/resizable.js} +9 -12
- package/{responsive-box.js → esm/responsive-box.js} +14 -21
- package/esm/sankey.js +363 -0
- package/{scheduler.js → esm/scheduler.js} +15 -23
- package/{scroll-view.js → esm/scroll-view.js} +9 -12
- package/esm/select-box.js +409 -0
- package/{slider.js → esm/slider.js} +14 -19
- package/{sortable.js → esm/sortable.js} +11 -15
- package/{sparkline.js → esm/sparkline.js} +17 -27
- package/{speed-dial-action.js → esm/speed-dial-action.js} +9 -12
- package/{switch.js → esm/switch.js} +10 -12
- package/{tab-panel.js → esm/tab-panel.js} +36 -15
- package/{tabs.js → esm/tabs.js} +34 -15
- package/esm/tag-box.js +433 -0
- package/{text-area.js → esm/text-area.js} +10 -12
- package/{text-box.js → esm/text-box.js} +13 -17
- package/{tile-view.js → esm/tile-view.js} +11 -15
- package/esm/toast.js +245 -0
- package/{toolbar.js → esm/toolbar.js} +11 -15
- package/esm/tooltip.js +265 -0
- package/esm/tree-list.js +1152 -0
- package/esm/tree-map.js +369 -0
- package/{tree-view.js → esm/tree-view.js} +14 -21
- package/{validation-group.js → esm/validation-group.js} +9 -12
- package/{validation-summary.js → esm/validation-summary.js} +11 -15
- package/esm/validator.js +213 -0
- package/esm/vector-map.js +444 -0
- package/file-manager/package.json +6 -0
- package/file-uploader/package.json +6 -0
- package/filter-builder/package.json +6 -0
- package/form/package.json +6 -0
- package/funnel/package.json +6 -0
- package/gallery/package.json +6 -0
- package/gantt/package.json +6 -0
- package/html-editor/package.json +6 -0
- package/linear-gauge/package.json +6 -0
- package/list/package.json +6 -0
- package/load-indicator/package.json +6 -0
- package/load-panel/package.json +6 -0
- package/lookup/package.json +6 -0
- package/map/package.json +6 -0
- package/menu/package.json +6 -0
- package/multi-view/package.json +6 -0
- package/number-box/package.json +6 -0
- package/package.json +15 -13
- package/pie-chart/package.json +6 -0
- package/pivot-grid/package.json +6 -0
- package/pivot-grid-field-chooser/package.json +6 -0
- package/polar-chart/package.json +6 -0
- package/popover/package.json +6 -0
- package/popup/package.json +6 -0
- package/progress-bar/package.json +6 -0
- package/radio-group/package.json +6 -0
- package/range-selector/package.json +6 -0
- package/range-slider/package.json +6 -0
- package/recurrence-editor/package.json +6 -0
- package/resizable/package.json +6 -0
- package/responsive-box/package.json +6 -0
- package/sankey/package.json +6 -0
- package/scheduler/package.json +6 -0
- package/scroll-view/package.json +6 -0
- package/select-box/package.json +6 -0
- package/slider/package.json +6 -0
- package/sortable/package.json +6 -0
- package/sparkline/package.json +6 -0
- package/speed-dial-action/package.json +6 -0
- package/switch/package.json +6 -0
- package/tab-panel/package.json +6 -0
- package/tabs/package.json +6 -0
- package/tag-box/package.json +6 -0
- package/template/package.json +6 -0
- package/text-area/package.json +6 -0
- package/text-box/package.json +6 -0
- package/tile-view/package.json +6 -0
- package/toast/package.json +6 -0
- package/toolbar/package.json +6 -0
- package/tooltip/package.json +6 -0
- package/tree-list/package.json +6 -0
- package/tree-map/package.json +6 -0
- package/tree-view/package.json +6 -0
- package/validation-group/package.json +6 -0
- package/validation-summary/package.json +6 -0
- package/validator/package.json +6 -0
- package/vector-map/package.json +6 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* devextreme-react
|
|
3
|
+
* Version: 23.2.1-alpha-23255-1813
|
|
4
|
+
* Build date: Tue Sep 12 2023
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
|
+
*
|
|
8
|
+
* This software may be modified and distributed under the terms
|
|
9
|
+
* of the MIT license. See the LICENSE file in the root of the project for details.
|
|
10
|
+
*
|
|
11
|
+
* https://github.com/DevExpress/devextreme-react
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { buildNode, buildTemplates } from './tree';
|
|
15
|
+
import { mergeNameParts } from './utils';
|
|
16
|
+
function compareTemplates(current, prev, changesAccum) {
|
|
17
|
+
var currentTemplatesOptions = {};
|
|
18
|
+
var currentTemplates = {};
|
|
19
|
+
var prevTemplatesOptions = {};
|
|
20
|
+
var prevTemplates = {};
|
|
21
|
+
buildTemplates(current, currentTemplatesOptions, currentTemplates);
|
|
22
|
+
buildTemplates(prev, prevTemplatesOptions, prevTemplates);
|
|
23
|
+
changesAccum.addRemovedValues(currentTemplatesOptions, prevTemplatesOptions, current.fullName);
|
|
24
|
+
// TODO: support switching to default templates
|
|
25
|
+
// appendRemovedValues(currentTemplates, prevTemplates, "", changesAccum.templates);
|
|
26
|
+
Object.keys(currentTemplatesOptions).forEach(function (key) {
|
|
27
|
+
if (currentTemplatesOptions[key] === prevTemplatesOptions[key]) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
changesAccum.options[mergeNameParts(current.fullName, key)] = currentTemplatesOptions[key];
|
|
31
|
+
});
|
|
32
|
+
Object.keys(currentTemplates).forEach(function (key) {
|
|
33
|
+
var currentTemplate = currentTemplates[key];
|
|
34
|
+
var prevTemplate = prevTemplates[key];
|
|
35
|
+
if (prevTemplate && currentTemplate.content === prevTemplate.content) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
changesAccum.templates[key] = currentTemplate;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function compare(current, prev, changesAccum) {
|
|
42
|
+
if (!prev) {
|
|
43
|
+
changesAccum.options[current.fullName] = buildNode(current, changesAccum.templates, true);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
changesAccum.addRemovedValues(current.options, prev.options, current.fullName);
|
|
47
|
+
changesAccum.addRemovedValues(current.configCollections, prev.configCollections, current.fullName);
|
|
48
|
+
changesAccum.addRemovedValues(current.configs, prev.configs, current.fullName);
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
50
|
+
compareCollections(current, prev, changesAccum);
|
|
51
|
+
Object.keys(current.configs).forEach(function (key) {
|
|
52
|
+
compare(current.configs[key], prev.configs[key], changesAccum);
|
|
53
|
+
});
|
|
54
|
+
Object.keys(current.options).forEach(function (key) {
|
|
55
|
+
if (current.options[key] === prev.options[key]) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
changesAccum.options[mergeNameParts(current.fullName, key)] = current.options[key];
|
|
59
|
+
});
|
|
60
|
+
compareTemplates(current, prev, changesAccum);
|
|
61
|
+
}
|
|
62
|
+
function appendRemovedValues(current, prev, path, changesAccum) {
|
|
63
|
+
var removedKeys = Object.keys(prev).filter(function (key) { return !Object.keys(current).includes(key); });
|
|
64
|
+
removedKeys.forEach(function (key) {
|
|
65
|
+
changesAccum.push(mergeNameParts(path, key));
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function getChanges(current, prev) {
|
|
69
|
+
var changesAccum = {
|
|
70
|
+
options: {},
|
|
71
|
+
removedOptions: [],
|
|
72
|
+
templates: {},
|
|
73
|
+
addRemovedValues: function (currentOptions, prevOptions, path) {
|
|
74
|
+
appendRemovedValues(currentOptions, prevOptions, path, this.removedOptions);
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
compare(current, prev, changesAccum);
|
|
78
|
+
return changesAccum;
|
|
79
|
+
}
|
|
80
|
+
function compareCollections(current, prev, changesAccum) {
|
|
81
|
+
Object.keys(current.configCollections).forEach(function (key) {
|
|
82
|
+
var currentCollection = current.configCollections[key];
|
|
83
|
+
var prevCollection = prev.configCollections[key] || [];
|
|
84
|
+
if (!currentCollection || currentCollection.length !== prevCollection.length) {
|
|
85
|
+
var updatedCollection_1 = [];
|
|
86
|
+
currentCollection.forEach(function (item) {
|
|
87
|
+
var config = buildNode(item, changesAccum.templates, true);
|
|
88
|
+
updatedCollection_1.push(config);
|
|
89
|
+
});
|
|
90
|
+
changesAccum.options[mergeNameParts(current.fullName, key)] = updatedCollection_1;
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
for (var i = 0; i < currentCollection.length; i += 1) {
|
|
94
|
+
compare(currentCollection[i], prevCollection[i], changesAccum);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
export { getChanges, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* devextreme-react
|
|
3
|
+
* Version: 23.2.1-alpha-23255-1813
|
|
4
|
+
* Build date: Tue Sep 12 2023
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
|
+
*
|
|
8
|
+
* This software may be modified and distributed under the terms
|
|
9
|
+
* of the MIT license. See the LICENSE file in the root of the project for details.
|
|
10
|
+
*
|
|
11
|
+
* https://github.com/DevExpress/devextreme-react
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* devextreme-react
|
|
3
|
+
* Version: 23.2.1-alpha-23255-1813
|
|
4
|
+
* Build date: Tue Sep 12 2023
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
|
+
*
|
|
8
|
+
* This software may be modified and distributed under the terms
|
|
9
|
+
* of the MIT license. See the LICENSE file in the root of the project for details.
|
|
10
|
+
*
|
|
11
|
+
* https://github.com/DevExpress/devextreme-react
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { Template as TemplateComp } from '../../template';
|
|
15
|
+
var ElementType;
|
|
16
|
+
(function (ElementType) {
|
|
17
|
+
ElementType[ElementType["Option"] = 0] = "Option";
|
|
18
|
+
ElementType[ElementType["Template"] = 1] = "Template";
|
|
19
|
+
ElementType[ElementType["Unknown"] = 2] = "Unknown";
|
|
20
|
+
})(ElementType || (ElementType = {}));
|
|
21
|
+
function getElementInfo(element, parentExpectedChildren) {
|
|
22
|
+
var reactElement = element;
|
|
23
|
+
if (!reactElement || !reactElement.type) {
|
|
24
|
+
return {
|
|
25
|
+
type: ElementType.Unknown,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
if (reactElement.type === TemplateComp) {
|
|
29
|
+
return {
|
|
30
|
+
type: ElementType.Template,
|
|
31
|
+
props: reactElement.props,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
var elementDescriptor = reactElement.type;
|
|
35
|
+
if (elementDescriptor.OptionName) {
|
|
36
|
+
var name_1 = elementDescriptor.OptionName;
|
|
37
|
+
var isCollectionItem = elementDescriptor.IsCollectionItem;
|
|
38
|
+
var expectation = parentExpectedChildren && parentExpectedChildren[name_1];
|
|
39
|
+
if (expectation) {
|
|
40
|
+
isCollectionItem = expectation.isCollectionItem;
|
|
41
|
+
if (expectation.optionName) {
|
|
42
|
+
name_1 = expectation.optionName;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
type: ElementType.Option,
|
|
47
|
+
descriptor: {
|
|
48
|
+
name: name_1,
|
|
49
|
+
isCollection: isCollectionItem,
|
|
50
|
+
templates: elementDescriptor.TemplateProps || [],
|
|
51
|
+
initialValuesProps: elementDescriptor.DefaultsProps || {},
|
|
52
|
+
predefinedValuesProps: elementDescriptor.PredefinedProps || {},
|
|
53
|
+
expectedChildren: elementDescriptor.ExpectedChildren || {},
|
|
54
|
+
},
|
|
55
|
+
props: reactElement.props,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
type: ElementType.Unknown,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export { getElementInfo, ElementType, };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* devextreme-react
|
|
3
|
+
* Version: 23.2.1-alpha-23255-1813
|
|
4
|
+
* Build date: Tue Sep 12 2023
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
|
+
*
|
|
8
|
+
* This software may be modified and distributed under the terms
|
|
9
|
+
* of the MIT license. See the LICENSE file in the root of the project for details.
|
|
10
|
+
*
|
|
11
|
+
* https://github.com/DevExpress/devextreme-react
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
function getAnonymousTemplate(props, templateMeta, hasTranscludedContent) {
|
|
15
|
+
if (templateMeta.tmplOption === 'template' && hasTranscludedContent) {
|
|
16
|
+
return {
|
|
17
|
+
optionName: templateMeta.tmplOption,
|
|
18
|
+
isAnonymous: true,
|
|
19
|
+
type: 'children',
|
|
20
|
+
content: props.children,
|
|
21
|
+
keyFn: props[templateMeta.keyFn],
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
if (props[templateMeta.render]) {
|
|
25
|
+
return {
|
|
26
|
+
optionName: templateMeta.tmplOption,
|
|
27
|
+
isAnonymous: true,
|
|
28
|
+
type: 'render',
|
|
29
|
+
content: props[templateMeta.render],
|
|
30
|
+
keyFn: props[templateMeta.keyFn],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
if (props[templateMeta.component]) {
|
|
34
|
+
return {
|
|
35
|
+
optionName: templateMeta.tmplOption,
|
|
36
|
+
isAnonymous: true,
|
|
37
|
+
type: 'component',
|
|
38
|
+
content: props[templateMeta.component],
|
|
39
|
+
keyFn: props[templateMeta.keyFn],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
function getNamedTemplate(props) {
|
|
45
|
+
if (!props.name) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
if (props.component) {
|
|
49
|
+
return {
|
|
50
|
+
optionName: props.name,
|
|
51
|
+
isAnonymous: false,
|
|
52
|
+
type: 'component',
|
|
53
|
+
content: props.component,
|
|
54
|
+
keyFn: props.keyFn,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
if (props.render) {
|
|
58
|
+
return {
|
|
59
|
+
optionName: props.name,
|
|
60
|
+
isAnonymous: false,
|
|
61
|
+
type: 'render',
|
|
62
|
+
content: props.render,
|
|
63
|
+
keyFn: props.keyFn,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
optionName: props.name,
|
|
68
|
+
isAnonymous: false,
|
|
69
|
+
type: 'children',
|
|
70
|
+
content: props.children,
|
|
71
|
+
keyFn: props.keyFn,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export { getAnonymousTemplate, getNamedTemplate, };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* devextreme-react
|
|
3
|
+
* Version: 23.2.1-alpha-23255-1813
|
|
4
|
+
* Build date: Tue Sep 12 2023
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
|
+
*
|
|
8
|
+
* This software may be modified and distributed under the terms
|
|
9
|
+
* of the MIT license. See the LICENSE file in the root of the project for details.
|
|
10
|
+
*
|
|
11
|
+
* https://github.com/DevExpress/devextreme-react
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
var __assign = (this && this.__assign) || function () {
|
|
15
|
+
__assign = Object.assign || function(t) {
|
|
16
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
17
|
+
s = arguments[i];
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
return __assign.apply(this, arguments);
|
|
24
|
+
};
|
|
25
|
+
import * as React from 'react';
|
|
26
|
+
import { separateProps } from '../../widget-config';
|
|
27
|
+
import { ElementType, getElementInfo, } from './element';
|
|
28
|
+
import { mergeNameParts } from '../utils';
|
|
29
|
+
import { getAnonymousTemplate, getNamedTemplate } from './templates';
|
|
30
|
+
export function processChildren(parentElement, parentFullName) {
|
|
31
|
+
var templates = [];
|
|
32
|
+
var configCollections = {};
|
|
33
|
+
var configs = {};
|
|
34
|
+
var hasTranscludedContent = false;
|
|
35
|
+
React.Children.map(parentElement.props.children, function (child) {
|
|
36
|
+
var element = getElementInfo(child, parentElement.descriptor.expectedChildren);
|
|
37
|
+
if (element.type === ElementType.Unknown) {
|
|
38
|
+
if (child !== null && child !== undefined && child !== false) {
|
|
39
|
+
hasTranscludedContent = true;
|
|
40
|
+
}
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (element.type === ElementType.Template) {
|
|
44
|
+
var template = getNamedTemplate(element.props);
|
|
45
|
+
if (template) {
|
|
46
|
+
templates.push(template);
|
|
47
|
+
}
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (element.descriptor.isCollection) {
|
|
51
|
+
var collection = configCollections[element.descriptor.name];
|
|
52
|
+
if (!collection) {
|
|
53
|
+
collection = [];
|
|
54
|
+
configCollections[element.descriptor.name] = collection;
|
|
55
|
+
}
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
57
|
+
var collectionItem = createConfigNode(element, mergeNameParts(parentFullName, element.descriptor.name) + "[" + collection.length + "]");
|
|
58
|
+
collection.push(collectionItem);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
62
|
+
var configNode = createConfigNode(element, parentFullName);
|
|
63
|
+
configs[element.descriptor.name] = configNode;
|
|
64
|
+
});
|
|
65
|
+
return {
|
|
66
|
+
configs: configs,
|
|
67
|
+
configCollections: configCollections,
|
|
68
|
+
templates: templates,
|
|
69
|
+
hasTranscludedContent: hasTranscludedContent,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function createConfigNode(element, path) {
|
|
73
|
+
var fullName = element.descriptor.isCollection
|
|
74
|
+
? path
|
|
75
|
+
: mergeNameParts(path, element.descriptor.name);
|
|
76
|
+
var separatedValues = separateProps(element.props, element.descriptor.initialValuesProps, element.descriptor.templates);
|
|
77
|
+
var childrenData = processChildren(element, fullName);
|
|
78
|
+
element.descriptor.templates.forEach(function (templateMeta) {
|
|
79
|
+
var template = getAnonymousTemplate(element.props, templateMeta, path.length > 0 ? childrenData.hasTranscludedContent : false);
|
|
80
|
+
if (template) {
|
|
81
|
+
childrenData.templates.push(template);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
return {
|
|
85
|
+
fullName: fullName,
|
|
86
|
+
predefinedOptions: element.descriptor.predefinedValuesProps,
|
|
87
|
+
initialOptions: separatedValues.defaults,
|
|
88
|
+
options: separatedValues.options,
|
|
89
|
+
templates: childrenData.templates,
|
|
90
|
+
configCollections: childrenData.configCollections,
|
|
91
|
+
configs: childrenData.configs,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function buildConfigTree(widgetDescriptor, props) {
|
|
95
|
+
return createConfigNode({
|
|
96
|
+
type: ElementType.Option,
|
|
97
|
+
descriptor: __assign({ name: '', isCollection: false }, widgetDescriptor),
|
|
98
|
+
props: props,
|
|
99
|
+
}, '');
|
|
100
|
+
}
|
|
101
|
+
export { buildConfigTree, };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* devextreme-react
|
|
3
|
+
* Version: 23.2.1-alpha-23255-1813
|
|
4
|
+
* Build date: Tue Sep 12 2023
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
|
+
*
|
|
8
|
+
* This software may be modified and distributed under the terms
|
|
9
|
+
* of the MIT license. See the LICENSE file in the root of the project for details.
|
|
10
|
+
*
|
|
11
|
+
* https://github.com/DevExpress/devextreme-react
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { mergeNameParts, parseOptionName } from './utils';
|
|
15
|
+
function buildTemplates(node, optionsAccum, templatesAccum) {
|
|
16
|
+
node.templates.forEach(function (template) {
|
|
17
|
+
if (template.isAnonymous) {
|
|
18
|
+
var templateName = mergeNameParts(node.fullName, template.optionName);
|
|
19
|
+
optionsAccum[template.optionName] = templateName;
|
|
20
|
+
templatesAccum[templateName] = template;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
templatesAccum[template.optionName] = template;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function buildNode(node, templatesAccum, ignoreInitialValues) {
|
|
28
|
+
var result = {};
|
|
29
|
+
Object.keys(node.predefinedOptions).forEach(function (key) {
|
|
30
|
+
result[key] = node.predefinedOptions[key];
|
|
31
|
+
});
|
|
32
|
+
Object.keys(node.configs).forEach(function (key) {
|
|
33
|
+
result[key] = buildNode(node.configs[key], templatesAccum, ignoreInitialValues);
|
|
34
|
+
});
|
|
35
|
+
Object.keys(node.configCollections).forEach(function (key) {
|
|
36
|
+
result[key] = node.configCollections[key].map(function (item) { return buildNode(item, templatesAccum, ignoreInitialValues); });
|
|
37
|
+
});
|
|
38
|
+
if (!ignoreInitialValues) {
|
|
39
|
+
Object.keys(node.initialOptions).forEach(function (key) {
|
|
40
|
+
result[key] = node.initialOptions[key];
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
Object.keys(node.options).forEach(function (key) {
|
|
44
|
+
result[key] = node.options[key];
|
|
45
|
+
});
|
|
46
|
+
buildTemplates(node, result, templatesAccum);
|
|
47
|
+
return result;
|
|
48
|
+
}
|
|
49
|
+
function buildConfig(root, ignoreInitialValues) {
|
|
50
|
+
var templatesAccum = {};
|
|
51
|
+
var options = buildNode(root, templatesAccum, ignoreInitialValues);
|
|
52
|
+
return {
|
|
53
|
+
templates: templatesAccum,
|
|
54
|
+
options: options,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
var ValueType;
|
|
58
|
+
(function (ValueType) {
|
|
59
|
+
ValueType[ValueType["Simple"] = 0] = "Simple";
|
|
60
|
+
ValueType[ValueType["Complex"] = 1] = "Complex";
|
|
61
|
+
ValueType[ValueType["Array"] = 2] = "Array";
|
|
62
|
+
})(ValueType || (ValueType = {}));
|
|
63
|
+
function findValueInObject(obj, path) {
|
|
64
|
+
var key = path.shift();
|
|
65
|
+
if (!key) {
|
|
66
|
+
return {
|
|
67
|
+
value: obj,
|
|
68
|
+
type: ValueType.Simple,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
if (obj instanceof Object && Object.keys(obj).includes(key)) {
|
|
72
|
+
return findValueInObject(obj[key], path);
|
|
73
|
+
}
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
function findValue(node, path) {
|
|
77
|
+
var name = path.shift();
|
|
78
|
+
if (!name) {
|
|
79
|
+
return {
|
|
80
|
+
value: buildConfig(node, true).options,
|
|
81
|
+
type: ValueType.Complex,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
var optionInfo = parseOptionName(name);
|
|
85
|
+
if (optionInfo.name in node.options) {
|
|
86
|
+
var options = optionInfo.isCollectionItem
|
|
87
|
+
? node.options[optionInfo.name][optionInfo.index]
|
|
88
|
+
: node.options[optionInfo.name];
|
|
89
|
+
return findValueInObject(options, path);
|
|
90
|
+
}
|
|
91
|
+
if (optionInfo.isCollectionItem) {
|
|
92
|
+
var collection = node.configCollections[optionInfo.name];
|
|
93
|
+
if (!collection) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
var item = collection[optionInfo.index];
|
|
97
|
+
if (!item) {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
return findValue(item, path);
|
|
101
|
+
}
|
|
102
|
+
var child = node.configs[optionInfo.name];
|
|
103
|
+
if (child) {
|
|
104
|
+
return findValue(child, path);
|
|
105
|
+
}
|
|
106
|
+
var childCollection = node.configCollections[optionInfo.name];
|
|
107
|
+
if (childCollection) {
|
|
108
|
+
if (path.length !== 0) {
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
value: childCollection.map(function (item) { return buildNode(item, {}, true); }),
|
|
113
|
+
type: ValueType.Array,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
export { ValueType, buildConfig, buildNode, buildTemplates, findValue, findValueInObject, };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* devextreme-react
|
|
3
|
+
* Version: 23.2.1-alpha-23255-1813
|
|
4
|
+
* Build date: Tue Sep 12 2023
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
|
+
*
|
|
8
|
+
* This software may be modified and distributed under the terms
|
|
9
|
+
* of the MIT license. See the LICENSE file in the root of the project for details.
|
|
10
|
+
*
|
|
11
|
+
* https://github.com/DevExpress/devextreme-react
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export function mergeNameParts() {
|
|
15
|
+
var args = [];
|
|
16
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
17
|
+
args[_i] = arguments[_i];
|
|
18
|
+
}
|
|
19
|
+
return args.filter(function (value) { return value; }).join('.');
|
|
20
|
+
}
|
|
21
|
+
export function parseOptionName(name) {
|
|
22
|
+
var parts = name.split('[');
|
|
23
|
+
if (parts.length === 1) {
|
|
24
|
+
return {
|
|
25
|
+
isCollectionItem: false,
|
|
26
|
+
name: name,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
isCollectionItem: true,
|
|
31
|
+
name: parts[0],
|
|
32
|
+
index: Number(parts[1].slice(0, -1)),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export var isIE = function () {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
var ua = (_b = (_a = window === null || window === void 0 ? void 0 : window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) !== null && _b !== void 0 ? _b : ''; // Check the userAgent property of the window.navigator object
|
|
38
|
+
var msie = ua.indexOf('MSIE'); // IE 10 or older
|
|
39
|
+
var trident = ua.indexOf('Trident/'); // IE 11
|
|
40
|
+
return msie > 0 || trident > 0;
|
|
41
|
+
};
|
|
42
|
+
export var shallowEquals = function (first, second) {
|
|
43
|
+
if (Object.keys(first).length !== Object.keys(second).length) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
return Object.keys(first).every(function (key) { return first[key] === second[key]; });
|
|
47
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* devextreme-react
|
|
3
|
-
* Version: 23.1
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 23.2.1-alpha-23255-1813
|
|
4
|
+
* Build date: Tue Sep 12 2023
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
*
|
|
@@ -11,19 +11,16 @@
|
|
|
11
11
|
* https://github.com/DevExpress/devextreme-react
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var helpers_1 = require("./helpers");
|
|
20
|
-
var template_wrapper_1 = require("./template-wrapper");
|
|
21
|
-
var component_base_1 = require("./component-base");
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
import * as events from 'devextreme/events';
|
|
16
|
+
import { DoubleKeyMap, generateID } from './helpers';
|
|
17
|
+
import { TemplateWrapper } from './template-wrapper';
|
|
18
|
+
import { DX_REMOVE_EVENT } from './component-base';
|
|
22
19
|
function unwrapElement(element) {
|
|
23
20
|
return element.get ? element.get(0) : element;
|
|
24
21
|
}
|
|
25
22
|
function createDxTemplate(createContentProvider, templatesStore, keyFn) {
|
|
26
|
-
var renderedTemplates = new
|
|
23
|
+
var renderedTemplates = new DoubleKeyMap();
|
|
27
24
|
return {
|
|
28
25
|
render: function (data) {
|
|
29
26
|
var container = unwrapElement(data.container);
|
|
@@ -36,19 +33,19 @@ function createDxTemplate(createContentProvider, templatesStore, keyFn) {
|
|
|
36
33
|
};
|
|
37
34
|
var _subscribeOnContainerRemoval = function () {
|
|
38
35
|
if (container.nodeType === Node.ELEMENT_NODE) {
|
|
39
|
-
events.one(container,
|
|
36
|
+
events.one(container, DX_REMOVE_EVENT, onRemoved);
|
|
40
37
|
}
|
|
41
38
|
};
|
|
42
39
|
var _unsubscribeOnContainerRemoval = function () {
|
|
43
40
|
if (container.nodeType === Node.ELEMENT_NODE) {
|
|
44
|
-
events.off(container,
|
|
41
|
+
events.off(container, DX_REMOVE_EVENT, onRemoved);
|
|
45
42
|
}
|
|
46
43
|
};
|
|
47
44
|
if (prevTemplateId) {
|
|
48
45
|
templateId = prevTemplateId;
|
|
49
46
|
}
|
|
50
47
|
else {
|
|
51
|
-
templateId = keyFn ? keyFn(data.model) : "__template_" +
|
|
48
|
+
templateId = keyFn ? keyFn(data.model) : "__template_" + generateID();
|
|
52
49
|
if (data.model !== undefined) {
|
|
53
50
|
renderedTemplates.set(key, templateId);
|
|
54
51
|
}
|
|
@@ -60,7 +57,7 @@ function createDxTemplate(createContentProvider, templatesStore, keyFn) {
|
|
|
60
57
|
index: data.index,
|
|
61
58
|
};
|
|
62
59
|
var contentProvider = createContentProvider();
|
|
63
|
-
return React.createElement(
|
|
60
|
+
return React.createElement(TemplateWrapper, {
|
|
64
61
|
content: contentProvider(props),
|
|
65
62
|
container: container,
|
|
66
63
|
onRemoved: onRemoved,
|
|
@@ -77,4 +74,4 @@ function createDxTemplate(createContentProvider, templatesStore, keyFn) {
|
|
|
77
74
|
},
|
|
78
75
|
};
|
|
79
76
|
}
|
|
80
|
-
|
|
77
|
+
export { createDxTemplate, };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* devextreme-react
|
|
3
|
+
* Version: 23.2.1-alpha-23255-1813
|
|
4
|
+
* Build date: Tue Sep 12 2023
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
|
+
*
|
|
8
|
+
* This software may be modified and distributed under the terms
|
|
9
|
+
* of the MIT license. See the LICENSE file in the root of the project for details.
|
|
10
|
+
*
|
|
11
|
+
* https://github.com/DevExpress/devextreme-react
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
var __extends = (this && this.__extends) || (function () {
|
|
15
|
+
var extendStatics = function (d, b) {
|
|
16
|
+
extendStatics = Object.setPrototypeOf ||
|
|
17
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
18
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
19
|
+
return extendStatics(d, b);
|
|
20
|
+
};
|
|
21
|
+
return function (d, b) {
|
|
22
|
+
if (typeof b !== "function" && b !== null)
|
|
23
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
24
|
+
extendStatics(d, b);
|
|
25
|
+
function __() { this.constructor = d; }
|
|
26
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
27
|
+
};
|
|
28
|
+
})();
|
|
29
|
+
import { ComponentBase } from './component-base';
|
|
30
|
+
var ExtensionComponent = /** @class */ (function (_super) {
|
|
31
|
+
__extends(ExtensionComponent, _super);
|
|
32
|
+
function ExtensionComponent() {
|
|
33
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
+
}
|
|
35
|
+
ExtensionComponent.prototype.componentDidMount = function () {
|
|
36
|
+
var onMounted = this.props.onMounted;
|
|
37
|
+
if (onMounted) {
|
|
38
|
+
onMounted(this._createWidget);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this._createWidget();
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
return ExtensionComponent;
|
|
45
|
+
}(ComponentBase));
|
|
46
|
+
export { ExtensionComponent, };
|