intergalactic 15.52.0-prerelease.0-prerelease-3f2a94a7 → 15.53.0-prerelease-dfe34e97
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/CHANGELOG.md +31 -4
- package/accordion/lib/cjs/Accordion.js +7 -6
- package/accordion/lib/cjs/Accordion.js.map +1 -1
- package/accordion/lib/cjs/style/accordion.shadow.css +2 -2
- package/accordion/lib/es6/Accordion.js +7 -6
- package/accordion/lib/es6/Accordion.js.map +1 -1
- package/accordion/lib/es6/style/accordion.shadow.css +2 -2
- package/components.json +12 -12
- package/d3-chart/Pattern.d.ts +336 -0
- package/d3-chart/Plot.d.ts +4 -0
- package/d3-chart/RadialTree.d.ts +7 -2
- package/d3-chart/component/Chart/AbstractChart.type.d.ts +3 -0
- package/d3-chart/component/ChartLegend/BaseLegend.type.d.ts +3 -0
- package/d3-chart/component/ChartLegend/LegendItem/LegendItem.type.d.ts +7 -1
- package/d3-chart/index.d.ts +3 -0
- package/d3-chart/lib/cjs/Area.js +25 -13
- package/d3-chart/lib/cjs/Area.js.map +1 -1
- package/d3-chart/lib/cjs/Bar.js +23 -12
- package/d3-chart/lib/cjs/Bar.js.map +1 -1
- package/d3-chart/lib/cjs/Bubble.js +25 -13
- package/d3-chart/lib/cjs/Bubble.js.map +1 -1
- package/d3-chart/lib/cjs/Donut.js +28 -12
- package/d3-chart/lib/cjs/Donut.js.map +1 -1
- package/d3-chart/lib/cjs/Dots.js +55 -28
- package/d3-chart/lib/cjs/Dots.js.map +1 -1
- package/d3-chart/lib/cjs/GroupBar.js +4 -2
- package/d3-chart/lib/cjs/GroupBar.js.map +1 -1
- package/d3-chart/lib/cjs/HorizontalBar.js +23 -12
- package/d3-chart/lib/cjs/HorizontalBar.js.map +1 -1
- package/d3-chart/lib/cjs/Hover.js +6 -3
- package/d3-chart/lib/cjs/Hover.js.map +1 -1
- package/d3-chart/lib/cjs/Line.js +14 -6
- package/d3-chart/lib/cjs/Line.js.map +1 -1
- package/d3-chart/lib/cjs/Pattern.js +540 -0
- package/d3-chart/lib/cjs/Pattern.js.map +1 -0
- package/d3-chart/lib/cjs/Plot.js +4 -2
- package/d3-chart/lib/cjs/Plot.js.map +1 -1
- package/d3-chart/lib/cjs/Radar.js +126 -83
- package/d3-chart/lib/cjs/Radar.js.map +1 -1
- package/d3-chart/lib/cjs/RadialTree.js +126 -100
- package/d3-chart/lib/cjs/RadialTree.js.map +1 -1
- package/d3-chart/lib/cjs/ScatterPlot.js +22 -10
- package/d3-chart/lib/cjs/ScatterPlot.js.map +1 -1
- package/d3-chart/lib/cjs/StackBar.js +8 -4
- package/d3-chart/lib/cjs/StackBar.js.map +1 -1
- package/d3-chart/lib/cjs/StackedArea.js +4 -1
- package/d3-chart/lib/cjs/StackedArea.js.map +1 -1
- package/d3-chart/lib/cjs/Tooltip.js +21 -11
- package/d3-chart/lib/cjs/Tooltip.js.map +1 -1
- package/d3-chart/lib/cjs/Venn.js +28 -12
- package/d3-chart/lib/cjs/Venn.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/AbstractChart.js +7 -3
- package/d3-chart/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/d3-chart/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
- package/d3-chart/lib/cjs/component/ChartLegend/BaseLegend.js +4 -2
- package/d3-chart/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
- package/d3-chart/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +80 -53
- package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
- package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/legend-item.shadow.css +17 -3
- package/d3-chart/lib/cjs/index.js +19 -0
- package/d3-chart/lib/cjs/index.js.map +1 -1
- package/d3-chart/lib/cjs/style/area.shadow.css +6 -1
- package/d3-chart/lib/cjs/style/bar.shadow.css +7 -1
- package/d3-chart/lib/cjs/style/bubble.shadow.css +8 -1
- package/d3-chart/lib/cjs/style/donut.shadow.css +7 -1
- package/d3-chart/lib/cjs/style/dot.shadow.css +2 -2
- package/d3-chart/lib/cjs/style/radar.shadow.css +7 -1
- package/d3-chart/lib/cjs/style/radial-tree.shadow.css +5 -0
- package/d3-chart/lib/cjs/style/scatterplot.shadow.css +8 -1
- package/d3-chart/lib/cjs/style/tooltip.shadow.css +6 -6
- package/d3-chart/lib/cjs/style/venn.shadow.css +11 -0
- package/d3-chart/lib/cjs/types/Plot.d.js.map +1 -1
- package/d3-chart/lib/cjs/types/index.d.js +12 -0
- package/d3-chart/lib/cjs/types/index.d.js.map +1 -1
- package/d3-chart/lib/es6/Area.js +25 -13
- package/d3-chart/lib/es6/Area.js.map +1 -1
- package/d3-chart/lib/es6/Bar.js +23 -12
- package/d3-chart/lib/es6/Bar.js.map +1 -1
- package/d3-chart/lib/es6/Bubble.js +25 -13
- package/d3-chart/lib/es6/Bubble.js.map +1 -1
- package/d3-chart/lib/es6/Donut.js +28 -12
- package/d3-chart/lib/es6/Donut.js.map +1 -1
- package/d3-chart/lib/es6/Dots.js +56 -29
- package/d3-chart/lib/es6/Dots.js.map +1 -1
- package/d3-chart/lib/es6/GroupBar.js +4 -2
- package/d3-chart/lib/es6/GroupBar.js.map +1 -1
- package/d3-chart/lib/es6/HorizontalBar.js +23 -12
- package/d3-chart/lib/es6/HorizontalBar.js.map +1 -1
- package/d3-chart/lib/es6/Hover.js +6 -3
- package/d3-chart/lib/es6/Hover.js.map +1 -1
- package/d3-chart/lib/es6/Line.js +15 -7
- package/d3-chart/lib/es6/Line.js.map +1 -1
- package/d3-chart/lib/es6/Pattern.js +534 -0
- package/d3-chart/lib/es6/Pattern.js.map +1 -0
- package/d3-chart/lib/es6/Plot.js +4 -2
- package/d3-chart/lib/es6/Plot.js.map +1 -1
- package/d3-chart/lib/es6/Radar.js +126 -83
- package/d3-chart/lib/es6/Radar.js.map +1 -1
- package/d3-chart/lib/es6/RadialTree.js +127 -101
- package/d3-chart/lib/es6/RadialTree.js.map +1 -1
- package/d3-chart/lib/es6/ScatterPlot.js +22 -10
- package/d3-chart/lib/es6/ScatterPlot.js.map +1 -1
- package/d3-chart/lib/es6/StackBar.js +8 -4
- package/d3-chart/lib/es6/StackBar.js.map +1 -1
- package/d3-chart/lib/es6/StackedArea.js +4 -1
- package/d3-chart/lib/es6/StackedArea.js.map +1 -1
- package/d3-chart/lib/es6/Tooltip.js +22 -11
- package/d3-chart/lib/es6/Tooltip.js.map +1 -1
- package/d3-chart/lib/es6/Venn.js +28 -12
- package/d3-chart/lib/es6/Venn.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/AbstractChart.js +7 -3
- package/d3-chart/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/d3-chart/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
- package/d3-chart/lib/es6/component/ChartLegend/BaseLegend.js +4 -2
- package/d3-chart/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
- package/d3-chart/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +80 -53
- package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
- package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/d3-chart/lib/es6/component/ChartLegend/LegendItem/legend-item.shadow.css +17 -3
- package/d3-chart/lib/es6/index.js +1 -0
- package/d3-chart/lib/es6/index.js.map +1 -1
- package/d3-chart/lib/es6/style/area.shadow.css +6 -1
- package/d3-chart/lib/es6/style/bar.shadow.css +7 -1
- package/d3-chart/lib/es6/style/bubble.shadow.css +8 -1
- package/d3-chart/lib/es6/style/donut.shadow.css +7 -1
- package/d3-chart/lib/es6/style/dot.shadow.css +2 -2
- package/d3-chart/lib/es6/style/radar.shadow.css +7 -1
- package/d3-chart/lib/es6/style/radial-tree.shadow.css +5 -0
- package/d3-chart/lib/es6/style/scatterplot.shadow.css +8 -1
- package/d3-chart/lib/es6/style/tooltip.shadow.css +6 -6
- package/d3-chart/lib/es6/style/venn.shadow.css +11 -0
- package/d3-chart/lib/es6/types/Plot.d.js.map +1 -1
- package/d3-chart/lib/es6/types/index.d.js +3 -0
- package/d3-chart/lib/es6/types/index.d.js.map +1 -1
- package/d3-chart/lib/types/Pattern.d.ts +336 -0
- package/d3-chart/lib/types/Plot.d.ts +4 -0
- package/d3-chart/lib/types/RadialTree.d.ts +7 -2
- package/d3-chart/lib/types/component/Chart/AbstractChart.type.d.ts +3 -0
- package/d3-chart/lib/types/component/ChartLegend/BaseLegend.type.d.ts +3 -0
- package/d3-chart/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +7 -1
- package/d3-chart/lib/types/index.d.ts +3 -0
- package/date-picker/lib/cjs/components/RangePickerAbstract.js +8 -4
- package/date-picker/lib/cjs/components/RangePickerAbstract.js.map +1 -1
- package/date-picker/lib/es6/components/RangePickerAbstract.js +8 -4
- package/date-picker/lib/es6/components/RangePickerAbstract.js.map +1 -1
- package/drag-and-drop/index.d.ts +13 -2
- package/drag-and-drop/lib/cjs/DragAndDrop.js +96 -44
- package/drag-and-drop/lib/cjs/DragAndDrop.js.map +1 -1
- package/drag-and-drop/lib/cjs/index.d.js.map +1 -1
- package/drag-and-drop/lib/cjs/translations/de.json +5 -0
- package/drag-and-drop/lib/cjs/translations/en.json +5 -0
- package/drag-and-drop/lib/cjs/translations/es.json +5 -0
- package/drag-and-drop/lib/cjs/translations/fr.json +5 -0
- package/drag-and-drop/lib/cjs/translations/it.json +5 -0
- package/drag-and-drop/lib/cjs/translations/ja.json +5 -0
- package/drag-and-drop/lib/cjs/translations/ko.json +5 -0
- package/drag-and-drop/lib/cjs/translations/nl.json +5 -0
- package/drag-and-drop/lib/cjs/translations/pl.json +5 -0
- package/drag-and-drop/lib/cjs/translations/pt.json +5 -0
- package/drag-and-drop/lib/cjs/translations/sv.json +5 -0
- package/drag-and-drop/lib/cjs/translations/tr.json +5 -0
- package/drag-and-drop/lib/cjs/translations/vi.json +5 -0
- package/drag-and-drop/lib/cjs/translations/zh.json +5 -0
- package/drag-and-drop/lib/es6/DragAndDrop.js +96 -44
- package/drag-and-drop/lib/es6/DragAndDrop.js.map +1 -1
- package/drag-and-drop/lib/es6/index.d.js.map +1 -1
- package/drag-and-drop/lib/es6/translations/de.json +5 -0
- package/drag-and-drop/lib/es6/translations/en.json +5 -0
- package/drag-and-drop/lib/es6/translations/es.json +5 -0
- package/drag-and-drop/lib/es6/translations/fr.json +5 -0
- package/drag-and-drop/lib/es6/translations/it.json +5 -0
- package/drag-and-drop/lib/es6/translations/ja.json +5 -0
- package/drag-and-drop/lib/es6/translations/ko.json +5 -0
- package/drag-and-drop/lib/es6/translations/nl.json +5 -0
- package/drag-and-drop/lib/es6/translations/pl.json +5 -0
- package/drag-and-drop/lib/es6/translations/pt.json +5 -0
- package/drag-and-drop/lib/es6/translations/sv.json +5 -0
- package/drag-and-drop/lib/es6/translations/tr.json +5 -0
- package/drag-and-drop/lib/es6/translations/vi.json +5 -0
- package/drag-and-drop/lib/es6/translations/zh.json +5 -0
- package/drag-and-drop/lib/types/index.d.ts +13 -2
- package/package.json +1 -1
- package/pills/lib/cjs/Pills.js +44 -57
- package/pills/lib/cjs/Pills.js.map +1 -1
- package/pills/lib/cjs/style/pills.shadow.css +3 -9
- package/pills/lib/es6/Pills.js +44 -57
- package/pills/lib/es6/Pills.js.map +1 -1
- package/pills/lib/es6/style/pills.shadow.css +3 -9
- package/utils/lib/enhances/a11yEnhance.d.ts +9 -3
- package/utils/lib/enhances/a11yEnhance.js +11 -11
- package/utils/lib/enhances/a11yEnhance.js.map +1 -1
- package/utils/lib/enhances/a11yEnhance.mjs +11 -11
- package/utils/lib/enhances/a11yEnhance.mjs.map +1 -1
- package/utils/lib/themes/auto.css +3 -3
- package/utils/lib/themes/dark.css +2 -2
- package/utils/lib/themes/dark.json +1 -1
- package/utils/lib/themes/default.css +1 -1
- package/utils/lib/themes/light.css +1 -1
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "{itemText} erfasst, aktuelle Position ist {itemPosition} von {itemsCount}",
|
3
3
|
"grabbing": "Erfasse {itemText}, Ablageposition ist {itemPosition} von {itemsCount}",
|
4
4
|
"dropped": "{itemText} abgelegt, finale Position ist {itemPosition} von {itemsCount}",
|
5
|
+
"grabbedWithZone": "{itemText} erfasst, aktuelle Position ist {itemPosition} von {itemsCount} in {zoneName}",
|
6
|
+
"grabbingFullWithZone": "Erfasse {itemText}, Ablageposition ist {itemPosition} von {itemsCount} in {zoneName}",
|
7
|
+
"grabbingJustWithZone": "Erfasse {itemText}, Ablegen in {zoneName}",
|
8
|
+
"droppedFullWithZone": "{itemText} abgelegt, finale Position ist {itemPosition} von {itemsCount} in {zoneName}",
|
9
|
+
"droppedJustWithZone": "{itemText} abgelegt in {zoneName}",
|
5
10
|
"discarded": "Ziehen wurde abgebrochen"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "{itemText} grabbed, current position is {itemPosition} of {itemsCount}",
|
3
3
|
"grabbing": "Grabbing {itemText}, drop position is {itemPosition} of {itemsCount}",
|
4
4
|
"dropped": "{itemText} dropped, final position is {itemPosition} of {itemsCount}",
|
5
|
+
"grabbedWithZone": "{itemText} grabbed, current position is {itemPosition} of {itemsCount} in {zoneName}",
|
6
|
+
"grabbingFullWithZone": "Grabbing {itemText}, drop position is {itemPosition} of {itemsCount} in {zoneName}",
|
7
|
+
"grabbingJustWithZone": "Grabbing {itemText}, drop in {zoneName}",
|
8
|
+
"droppedFullWithZone": "{itemText} dropped, final position is {itemPosition} of {itemsCount} in {zoneName}",
|
9
|
+
"droppedJustWithZone": "{itemText} dropped in {zoneName}",
|
5
10
|
"discarded": "Dragging was discarded"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "Ítem {itemText} capturado, la posición actual es {itemPosition} de {itemsCount}",
|
3
3
|
"grabbing": "Ítem {itemText} capturado, la posición para soltar es {itemPosition} de {itemsCount}",
|
4
4
|
"dropped": "Ítem {itemText} soltado, la posición final es {itemPosition} de {itemsCount}",
|
5
|
+
"grabbedWithZone": "{itemText} capturado, la posición actual es {itemPosition} de {itemsCount} en {zoneName}",
|
6
|
+
"grabbingFullWithZone": "Capturando {itemText}, la posición para soltar es {itemPosition} de {itemsCount} en {zoneName}",
|
7
|
+
"grabbingJustWithZone": "Capturando {itemText}, soltar en {zoneName}",
|
8
|
+
"droppedFullWithZone": "{itemText} soltado, la posición final es {itemPosition} de {itemsCount} en {zoneName}",
|
9
|
+
"droppedJustWithZone": "{itemText} soltado en {zoneName}",
|
5
10
|
"discarded": "Se descartó el arrastre"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "L’élément « {itemText} » est saisi, la position actuelle est de {itemPosition} sur {itemsCount}",
|
3
3
|
"grabbing": "Saisie de l’élément « {itemText} », dépôt en position {itemPosition} sur {itemsCount}",
|
4
4
|
"dropped": "L’élément « {itemText} » est déposé, la position finale est de {itemPosition} sur {itemsCount}",
|
5
|
+
"grabbedWithZone": "L’élément « {itemText} » est saisi, la position actuelle est de {itemPosition} sur {itemsCount} dans {zoneName}",
|
6
|
+
"grabbingFullWithZone": "Saisie de l’élément « {itemText} », dépôt en position {itemPosition} sur {itemsCount} dans {zoneName}",
|
7
|
+
"grabbingJustWithZone": "L’élement « {itemText} » est saisi et déposé dans {zoneName}",
|
8
|
+
"droppedFullWithZone": "L’élément « {itemText} » est déposé, la position finale est de {itemPosition} sur {itemsCount} dans {zoneName}",
|
9
|
+
"droppedJustWithZone": "L’élement « {itemText} » est déposé dans {zoneName}",
|
5
10
|
"discarded": "Le glissement a été abandonné"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "Elemento {itemText} preso, la posizione attuale è {itemPosition} di {itemsCount}",
|
3
3
|
"grabbing": "Stai prendendo l'elemento {itemText}, la posizione di rilascio è {itemPosition} di {itemsCount}",
|
4
4
|
"dropped": "Elemento {itemText} rilasciato, la posizione finale è {itemPosition} di {itemsCount}",
|
5
|
+
"grabbedWithZone": "Elemento {itemText} preso, la posizione attuale è {itemPosition} di {itemsCount} nel {zoneName}",
|
6
|
+
"grabbingFullWithZone": "Stai prendendo l'elemento {itemText}, la posizione di rilascio è {itemPosition} di {itemsCount} nel {zoneName}",
|
7
|
+
"grabbingJustWithZone": "Stai prendendo l'elemento {itemText}, deposito in {zoneName}",
|
8
|
+
"droppedFullWithZone": "Elemento {itemText} depositato, la posizione finale è {itemPosition} di {itemsCount} nel {zoneName}",
|
9
|
+
"droppedJustWithZone": "{itemText} depositato in {zoneName}",
|
5
10
|
"discarded": "Il trascinamento è stato scartato"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "{itemText}が選択されており、現在位置は{itemsCount}の{itemPosition}です",
|
3
3
|
"grabbing": "{itemText}が選択されており、ドロップ位置は{itemsCount}の{itemPosition}です",
|
4
4
|
"dropped": "{itemText}がドロップされ、最終位置は{itemsCount}の{itemPosition}になりました",
|
5
|
+
"grabbedWithZone": "{itemText} を入手しました。現在の位置は{zoneName} の{itemsCount} の{itemPosition} です。",
|
6
|
+
"grabbingFullWithZone": "{itemText} を入手し、ドロップ位置は{zoneName} の{itemsCount} の{itemPosition} です",
|
7
|
+
"grabbingJustWithZone": "{itemText} を入手し、{zoneName} にドロップします",
|
8
|
+
"droppedFullWithZone": "{itemText} を入手しました。最終位置は{zoneName} の{itemsCount} の{itemPosition} です",
|
9
|
+
"droppedJustWithZone": "{itemText} が {zoneName} にドロップしました",
|
5
10
|
"discarded": "ドラッグは破棄されました"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "'{itemText}' 부분이 선택되었으며 현재 위치는 {itemsCount}개 단어 중 {itemPosition}번째입니다",
|
3
3
|
"grabbing": "선택한 '{itemText}' 부분을 이동할 위치는 {itemsCount}개 단어 중 {itemPosition}번째입니다",
|
4
4
|
"dropped": "'{itemText}' 부분을 이동했으며 최종 위치는 {itemsCount}개 단어 중 {itemPosition}번째입니다",
|
5
|
+
"grabbedWithZone": "{itemText} 링크가 확보되었으며, 현재 순위는 {zoneName}에서 {itemsCount}개 중 {itemPosition}위입니다.",
|
6
|
+
"grabbingFullWithZone": "확보한 {itemText} 링크의 순위가 하락하여 {zoneName}에서 {itemsCount}개 중 {itemPosition}위입니다.",
|
7
|
+
"grabbingJustWithZone": "확보한 {itemText} 링크의 순위가 {zoneName}에서 하락했습니다.",
|
8
|
+
"droppedFullWithZone": "{itemText} 링크가 손실되었으며 최종 순위는 {zoneName}에서 {itemsCount}개 중 {itemPosition}위입니다.",
|
9
|
+
"droppedJustWithZone": "{itemText} 링크가 {zoneName}에서 손실되었습니다.",
|
5
10
|
"discarded": "드래그에 실패했습니다"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "{itemText} vastgepakt, huidige positie is {itemPosition} van {itemsCount}",
|
3
3
|
"grabbing": "{itemText} is vastgepakt, nieuwe positie is {itemPosition} van {itemsCount}",
|
4
4
|
"dropped": "{itemText} losgelaten, eindpositie is {itemPosition} van {itemsCount}",
|
5
|
+
"grabbedWithZone": "{itemText} vastgepakt, huidige positie is {itemPosition} van {itemsCount} in {zoneName}",
|
6
|
+
"grabbingFullWithZone": "{itemText} is vastgepakt, nieuwe positie is {itemPosition} van {itemsCount} in {zoneName}",
|
7
|
+
"grabbingJustWithZone": "{itemText} is vastgepakt, nieuwe positie in {zoneName}",
|
8
|
+
"droppedFullWithZone": "{itemText} losgelaten, eindpositie is {itemPosition} van {itemsCount} in {zoneName}",
|
9
|
+
"droppedJustWithZone": "{itemText} heeft nieuwe positie in {zoneName}",
|
5
10
|
"discarded": "Verslepen genegeerd"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "Chwycono element {itemText}, bieżąca pozycja to {itemPosition} z {itemsCount}",
|
3
3
|
"grabbing": "Chwytanie elementu {itemText}, pozycja upuszczenia to {itemPosition} z {itemsCount}",
|
4
4
|
"dropped": "Upuszczono element {itemText}, ostateczna pozycja to {itemPosition} z {itemsCount}",
|
5
|
+
"grabbedWithZone": "Chwycono element {itemText}, bieżąca pozycja to {itemPosition} z {itemsCount} w strefie {zoneName}",
|
6
|
+
"grabbingFullWithZone": "Chwytanie elementu {itemText}, pozycja upuszczenia to {itemPosition} z {itemsCount} w strefie {zoneName}",
|
7
|
+
"grabbingJustWithZone": "Chwytanie elementu {itemText}, upuszczenie w strefie {zoneName}",
|
8
|
+
"droppedFullWithZone": "Upuszczono element {itemText}, ostateczna pozycja to {itemPosition} z {itemsCount} w strefie {zoneName}",
|
9
|
+
"droppedJustWithZone": "Upuszczono element {itemText} w strefie {zoneName}",
|
5
10
|
"discarded": "Przeciąganie zostało odrzucone"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "Item capturado: {itemText}. Posição atual: {itemPosition} de {itemsCount}.",
|
3
3
|
"grabbing": "Capturando item: {itemText}. Posição para soltar: {itemPosition} de {itemsCount}.",
|
4
4
|
"dropped": "Item solto: {itemText}. Posição final: {itemPosition} de {itemsCount}.",
|
5
|
+
"grabbedWithZone": "{itemText} capturado, a posição atual é {itemPosition} de {itemsCount} em {zoneName}",
|
6
|
+
"grabbingFullWithZone": "Capturando {itemText}, a posição para soltar é {itemPosition} de {itemsCount} em {zoneName}",
|
7
|
+
"grabbingJustWithZone": "Capturando {itemText}, soltar em {zoneName}",
|
8
|
+
"droppedFullWithZone": "{itemText} solto, a posição final é {itemPosition} de {itemsCount} em {zoneName}",
|
9
|
+
"droppedJustWithZone": "{itemText} solto em {zoneName}",
|
5
10
|
"discarded": "A ação de arrastar foi descartada"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "{itemText} valdes, nuvarande position är {itemPosition} av {itemsCount}",
|
3
3
|
"grabbing": "Väljer {itemText}, släppt position är {itemPosition} av {itemsCount}",
|
4
4
|
"dropped": "{itemText} släppdes, slutlig position är {itemPosition} av {itemsCount}",
|
5
|
+
"grabbedWithZone": "{itemText} valdes, nuvarande position är {itemPosition} av {itemsCount} i {zoneName}",
|
6
|
+
"grabbingFullWithZone": "Väljer {itemText}, släppt position är {itemPosition} av {itemsCount} i {zoneName}",
|
7
|
+
"grabbingJustWithZone": "Väljer {itemText}, släpp i {zoneName}",
|
8
|
+
"droppedFullWithZone": "{itemText} släpptes, slutgiltig position är {itemPosition} av {itemsCount} i {zoneName}",
|
9
|
+
"droppedJustWithZone": "{itemText} släpptes i {zoneName}",
|
5
10
|
"discarded": "Dragningen avvisades"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "{itemText} alındı, mevcut konum {itemPosition}/{itemsCount}",
|
3
3
|
"grabbing": "{itemText} alınıyor, bırakma konumu {itemPosition}/{itemsCount}",
|
4
4
|
"dropped": "{itemText} bırakıldı, son konum {itemPosition}/{itemsCount}",
|
5
|
+
"grabbedWithZone": "{itemText} alındı, mevcut konum {zoneName} içinde {itemPosition}/{itemsCount}",
|
6
|
+
"grabbingFullWithZone": "{itemText} alınıyor, bırakma konumu {zoneName} içinde {itemPosition}/{itemsCount}",
|
7
|
+
"grabbingJustWithZone": "{itemText} alınıyor, {zoneName} içine bırakın",
|
8
|
+
"droppedFullWithZone": "{itemText} bırakıldı, son konum {zoneName} içinde {itemPosition}/{itemsCount}",
|
9
|
+
"droppedJustWithZone": "{itemText} {zoneName} içine bırakıldı",
|
5
10
|
"discarded": "Sürükleme iptal edildi"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "Đã chọn {itemText}, vị trí hiện tại là {itemPosition} thuộc {itemsCount}",
|
3
3
|
"grabbing": "Chọn {itemText}, vị trí thả là {itemPosition} thuộc {itemsCount}",
|
4
4
|
"dropped": "Đã thả {itemText}, vị trí cuối cùng là {itemPosition} thuộc {itemsCount}",
|
5
|
+
"grabbedWithZone": "Đã chọn {itemText}, vị trí hiện tại là {itemPosition} thuộc {itemsCount} trong {zoneName}",
|
6
|
+
"grabbingFullWithZone": "Chọn {itemText}, vị trí thả là {itemPosition} thuộc {itemsCount} trong {zoneName}",
|
7
|
+
"grabbingJustWithZone": "Chọn {itemText}, thả vào {zoneName}",
|
8
|
+
"droppedFullWithZone": "Đã thả {itemText}, vị trí cuối cùng là {itemPosition} thuộc {itemsCount} trong {zoneName}",
|
9
|
+
"droppedJustWithZone": "Đã thả {itemText} vào {zoneName}",
|
5
10
|
"discarded": "Thao tác kéo đã bị loại bỏ"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "“{itemText}”已抓取,当前位置是 {itemPosition} / {itemsCount}",
|
3
3
|
"grabbing": "正在抓取 {itemText},掉落位置是 {itemPosition} / {itemsCount}",
|
4
4
|
"dropped": "“{itemText}”已掉落,最终位置是 {itemPosition} / {itemsCount}",
|
5
|
+
"grabbedWithZone": "“{itemText}”已抓取,当前位置是 {itemPosition} / {itemsCount},在 {zoneName}",
|
6
|
+
"grabbingFullWithZone": "正在抓取 {itemText},掉落位置是 {itemPosition} / {itemsCount},在 {zoneName}",
|
7
|
+
"grabbingJustWithZone": "正在抓取 {itemText},掉落于 {zoneName}",
|
8
|
+
"droppedFullWithZone": "“{itemText}”已抓取,最终位置是 {itemPosition} / {itemsCount},在 {zoneName}",
|
9
|
+
"droppedJustWithZone": "{itemText} 掉落于 {zoneName}",
|
5
10
|
"discarded": "拖动已被丢弃"
|
6
11
|
}
|
@@ -56,14 +56,24 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
|
|
56
56
|
a11yHint: null
|
57
57
|
});
|
58
58
|
_defineProperty(_assertThisInitialized(_this), "handleItemDragStart", function (index) {
|
59
|
-
var
|
60
|
-
var
|
59
|
+
var items = _this.state.items;
|
60
|
+
var currentItem = items[index];
|
61
|
+
if (!currentItem) return;
|
62
|
+
var itemText = currentItem.node.getAttribute('aria-label') || currentItem.node.textContent || "".concat(index + 1);
|
61
63
|
var getI18nText = _this.asProps.getI18nText;
|
62
|
-
var
|
63
|
-
var
|
64
|
+
var zoneName = currentItem.zoneName;
|
65
|
+
var zonedItems = !zoneName ? items : items.filter(function (i) {
|
66
|
+
return (i === null || i === void 0 ? void 0 : i.zoneName) === zoneName;
|
67
|
+
});
|
68
|
+
var itemsCount = zonedItems.length;
|
69
|
+
var itemPosition = zonedItems.findIndex(function (i) {
|
70
|
+
return (i === null || i === void 0 ? void 0 : i.id) === currentItem.id;
|
71
|
+
});
|
72
|
+
var a11yHint = getI18nText(zoneName ? 'grabbedWithZone' : 'grabbed', {
|
64
73
|
itemText: itemText,
|
65
|
-
itemPosition:
|
66
|
-
itemsCount: itemsCount
|
74
|
+
itemPosition: itemPosition + 1,
|
75
|
+
itemsCount: itemsCount,
|
76
|
+
zoneName: zoneName || ''
|
67
77
|
});
|
68
78
|
_this.setState(function (prevState) {
|
69
79
|
return {
|
@@ -86,21 +96,37 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
|
|
86
96
|
});
|
87
97
|
});
|
88
98
|
_defineProperty(_assertThisInitialized(_this), "handleItemDragOver", function (event) {
|
89
|
-
var _this$state$dragging
|
99
|
+
var _this$state$dragging;
|
90
100
|
event.preventDefault();
|
91
|
-
|
92
|
-
var
|
101
|
+
var getI18nText = _this.asProps.getI18nText;
|
102
|
+
var _this$state = _this.state,
|
103
|
+
items = _this$state.items,
|
104
|
+
dragging = _this$state.dragging;
|
105
|
+
if (!dragging) return;
|
106
|
+
var itemIndex = dragging.initialItemsRects.findIndex(function (rect) {
|
93
107
|
return rect && event.clientX > rect.x && event.clientX < rect.x + rect.width && event.clientY > rect.y && event.clientY < rect.y + rect.height;
|
94
108
|
});
|
95
|
-
var
|
96
|
-
var
|
97
|
-
|
98
|
-
var
|
109
|
+
var currentItem = items[itemIndex];
|
110
|
+
var draggingItem = items[dragging.index];
|
111
|
+
if (!currentItem || !draggingItem) return;
|
112
|
+
var node = currentItem.isDropZone ? draggingItem.node : currentItem.node;
|
113
|
+
var itemText = node.getAttribute('aria-label') || node.textContent || "".concat(itemIndex + 1);
|
114
|
+
var zoneName = currentItem.zoneName;
|
115
|
+
var zonedItems = !zoneName ? items : items.filter(function (i) {
|
116
|
+
return (i === null || i === void 0 ? void 0 : i.zoneName) === zoneName;
|
117
|
+
});
|
118
|
+
var itemsCount = zonedItems.length;
|
119
|
+
var itemPosition = zonedItems.findIndex(function (i) {
|
120
|
+
return (i === null || i === void 0 ? void 0 : i.id) === currentItem.id;
|
121
|
+
});
|
122
|
+
var i18nKey = !zoneName ? 'grabbing' : currentItem.isDropZone ? 'grabbingJustWithZone' : 'grabbingFullWithZone';
|
123
|
+
var a11yHint = getI18nText(i18nKey, {
|
99
124
|
itemText: itemText,
|
100
|
-
itemPosition:
|
101
|
-
itemsCount: itemsCount
|
125
|
+
itemPosition: itemPosition + 1,
|
126
|
+
itemsCount: itemsCount,
|
127
|
+
zoneName: zoneName || ''
|
102
128
|
});
|
103
|
-
if (itemIndex === ((_this$state$
|
129
|
+
if (itemIndex === ((_this$state$dragging = _this.state.dragging) === null || _this$state$dragging === void 0 ? void 0 : _this$state$dragging.index)) _this.setState({
|
104
130
|
previewSwap: null,
|
105
131
|
a11yHint: a11yHint
|
106
132
|
});else _this.setState({
|
@@ -117,20 +143,33 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
|
|
117
143
|
if (_this.state.previewSwap !== null && index === _this.state.dragging.index) return (_this$state$items$_th3 = _this.state.items[_this.state.previewSwap]) === null || _this$state$items$_th3 === void 0 ? void 0 : _this$state$items$_th3.children;
|
118
144
|
});
|
119
145
|
_defineProperty(_assertThisInitialized(_this), "handleItemDrop", function (index) {
|
120
|
-
var _this$state$items$ind5, _this$state$items$ind6, _this$state$items$ind7, _this$state$items$ind8, _items$index, _items$index2;
|
121
146
|
var _this$asProps = _this.asProps,
|
122
147
|
onDnD = _this$asProps.onDnD,
|
123
148
|
getI18nText = _this$asProps.getI18nText;
|
124
149
|
if (!onDnD) return;
|
125
|
-
var _this$
|
126
|
-
items = _this$
|
127
|
-
dragging = _this$
|
128
|
-
|
129
|
-
var
|
130
|
-
var
|
150
|
+
var _this$state2 = _this.state,
|
151
|
+
items = _this$state2.items,
|
152
|
+
dragging = _this$state2.dragging;
|
153
|
+
if (!dragging) return;
|
154
|
+
var currentItem = items[index];
|
155
|
+
var draggingItem = items[dragging.index];
|
156
|
+
if (!currentItem || !draggingItem) return;
|
157
|
+
var node = currentItem.isDropZone ? draggingItem.node : currentItem.node;
|
158
|
+
var itemText = node.getAttribute('aria-label') || node.textContent || "".concat(index + 1);
|
159
|
+
var zoneName = currentItem.zoneName;
|
160
|
+
var zonedItems = !zoneName ? items : items.filter(function (i) {
|
161
|
+
return (i === null || i === void 0 ? void 0 : i.zoneName) === zoneName;
|
162
|
+
});
|
163
|
+
var itemsCount = zonedItems.length;
|
164
|
+
var itemPosition = zonedItems.findIndex(function (i) {
|
165
|
+
return (i === null || i === void 0 ? void 0 : i.id) === currentItem.id;
|
166
|
+
});
|
167
|
+
var i18nKey = !zoneName ? 'dropped' : currentItem.isDropZone ? 'droppedJustWithZone' : 'droppedFullWithZone';
|
168
|
+
var a11yHint = getI18nText(i18nKey, {
|
131
169
|
itemText: itemText,
|
132
|
-
itemPosition:
|
133
|
-
itemsCount: itemsCount
|
170
|
+
itemPosition: itemPosition + 1,
|
171
|
+
itemsCount: itemsCount,
|
172
|
+
zoneName: zoneName || ''
|
134
173
|
});
|
135
174
|
_this.setState({
|
136
175
|
a11yHint: a11yHint,
|
@@ -138,21 +177,24 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
|
|
138
177
|
previewSwap: null,
|
139
178
|
hideHoverEffect: true
|
140
179
|
});
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
(_this$asProps$onInser = (_this$asProps2 = _this.asProps).onInsertDroppable) === null || _this$asProps$onInser === void 0 ? void 0 : _this$asProps$onInser.call(_this$asProps2, (_items$index3 = items[dragging.index]) === null || _items$index3 === void 0 ? void 0 : _items$index3.children, items[index].children);
|
151
|
-
} else {
|
152
|
-
var _this$asProps$onSwapD, _this$asProps3, _items$index4;
|
153
|
-
(_this$asProps$onSwapD = (_this$asProps3 = _this.asProps).onSwapDraggable) === null || _this$asProps$onSwapD === void 0 ? void 0 : _this$asProps$onSwapD.call(_this$asProps3, (_items$index4 = items[dragging.index]) === null || _items$index4 === void 0 ? void 0 : _items$index4.children, items[index].children);
|
180
|
+
if (dragging && items[dragging.index]) {
|
181
|
+
var fromNode = items[dragging.index];
|
182
|
+
if (fromNode) {
|
183
|
+
onDnD({
|
184
|
+
fromId: fromNode.id,
|
185
|
+
fromIndex: dragging.index,
|
186
|
+
toId: currentItem.id,
|
187
|
+
toIndex: index
|
188
|
+
});
|
154
189
|
}
|
155
190
|
}
|
191
|
+
if (!currentItem.draggingAllowed) {
|
192
|
+
var _this$asProps$onInser, _this$asProps2, _items$index;
|
193
|
+
(_this$asProps$onInser = (_this$asProps2 = _this.asProps).onInsertDroppable) === null || _this$asProps$onInser === void 0 ? void 0 : _this$asProps$onInser.call(_this$asProps2, (_items$index = items[dragging.index]) === null || _items$index === void 0 ? void 0 : _items$index.children, currentItem.children);
|
194
|
+
} else {
|
195
|
+
var _this$asProps$onSwapD, _this$asProps3, _items$index2;
|
196
|
+
(_this$asProps$onSwapD = (_this$asProps3 = _this.asProps).onSwapDraggable) === null || _this$asProps$onSwapD === void 0 ? void 0 : _this$asProps$onSwapD.call(_this$asProps3, (_items$index2 = items[dragging.index]) === null || _items$index2 === void 0 ? void 0 : _items$index2.children, currentItem.children);
|
197
|
+
}
|
156
198
|
});
|
157
199
|
_defineProperty(_assertThisInitialized(_this), "handleItemDragEnter", function (event) {
|
158
200
|
event.preventDefault();
|
@@ -236,7 +278,9 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
|
|
236
278
|
children = _ref7.children,
|
237
279
|
node = _ref7.node,
|
238
280
|
id = _ref7.id,
|
239
|
-
draggingAllowed = _ref7.draggingAllowed
|
281
|
+
draggingAllowed = _ref7.draggingAllowed,
|
282
|
+
zoneName = _ref7.zoneName,
|
283
|
+
isDropZone = _ref7.isDropZone;
|
240
284
|
_this.setState(function (prevState) {
|
241
285
|
var _prevState$items$inde, _prevState$items$inde2;
|
242
286
|
if (((_prevState$items$inde = prevState.items[index]) === null || _prevState$items$inde === void 0 ? void 0 : _prevState$items$inde.children) === children && ((_prevState$items$inde2 = prevState.items[index]) === null || _prevState$items$inde2 === void 0 ? void 0 : _prevState$items$inde2.node) === node) return prevState;
|
@@ -245,7 +289,9 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
|
|
245
289
|
children: children,
|
246
290
|
node: node,
|
247
291
|
id: id,
|
248
|
-
draggingAllowed: draggingAllowed
|
292
|
+
draggingAllowed: draggingAllowed,
|
293
|
+
zoneName: zoneName,
|
294
|
+
isDropZone: isDropZone
|
249
295
|
};
|
250
296
|
return {
|
251
297
|
items: _toConsumableArray(items)
|
@@ -267,7 +313,7 @@ var DragAndDropRoot = /*#__PURE__*/function (_Component) {
|
|
267
313
|
var itemIndex = customFocus;
|
268
314
|
if (typeof itemIndex === 'string') {
|
269
315
|
itemIndex = _this.state.items.findIndex(function (item) {
|
270
|
-
return item.id === itemIndex;
|
316
|
+
return (item === null || item === void 0 ? void 0 : item.id) === itemIndex;
|
271
317
|
});
|
272
318
|
}
|
273
319
|
if (itemIndex === -1 || typeof itemIndex !== 'number') return undefined;
|
@@ -364,7 +410,10 @@ var Draggable = function Draggable(props) {
|
|
364
410
|
children = props.children,
|
365
411
|
swapPreview = props.swapPreview,
|
366
412
|
Children = props.Children,
|
367
|
-
id = props.id
|
413
|
+
id = props.id,
|
414
|
+
zoneName = props.zoneName,
|
415
|
+
_props$isDropZone = props.isDropZone,
|
416
|
+
isDropZone = _props$isDropZone === void 0 ? false : _props$isDropZone;
|
368
417
|
var resolvedChildren = React.useMemo(function () {
|
369
418
|
return typeof children === 'function' ? children(props) : children;
|
370
419
|
}, [children, props]);
|
@@ -374,7 +423,9 @@ var Draggable = function Draggable(props) {
|
|
374
423
|
children: resolvedChildren,
|
375
424
|
node: ref.current,
|
376
425
|
id: id,
|
377
|
-
draggingAllowed: !noDrag
|
426
|
+
draggingAllowed: !noDrag,
|
427
|
+
zoneName: zoneName,
|
428
|
+
isDropZone: isDropZone
|
378
429
|
});
|
379
430
|
return function () {
|
380
431
|
return detach(index);
|
@@ -393,7 +444,8 @@ var DropZone = function DropZone(props) {
|
|
393
444
|
var SDropZone = DragAndDrop.Draggable;
|
394
445
|
var styles = props.styles;
|
395
446
|
return _ref6 = sstyled(styles), /*#__PURE__*/React.createElement(SDropZone, _ref6.cn("SDropZone", _objectSpread({}, _assignProps3({
|
396
|
-
"noDrag": true
|
447
|
+
"noDrag": true,
|
448
|
+
"isDropZone": true
|
397
449
|
}, _ref3))));
|
398
450
|
};
|
399
451
|
var DragAndDrop = createComponent(DragAndDropRoot, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DragAndDrop.js","names":["React","createComponent","sstyled","Component","Root","Box","localizedMessages","i18nEnhance","useEnhancedEffect","style","_sstyled","insert","noop","DragAndDropContext","createContext","attach","detach","DragAndDropRoot","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","items","dragging","previewSwap","hideHoverEffect","a11yHint","index","_this$state$items$ind","_this$state$items$ind2","_this$state$items$ind3","_this$state$items$ind4","itemText","state","node","getAttribute","textContent","getI18nText","asProps","itemsCount","itemPosition","setState","prevState","initialItemsRects","map","item","getBoundingClientRect","event","preventDefault","_this$state$dragging","_this$state$items$ite","_this$state$items$ite2","_this$state$items$ite3","_this$state$items$ite4","_this$state$dragging2","itemIndex","findIndex","rect","clientX","x","width","clientY","y","height","_this$state$items$_th","_this$state$items$_th2","_this$state$items$_th3","draggingAllowed","children","_this$state$items$ind5","_this$state$items$ind6","_this$state$items$ind7","_this$state$items$ind8","_items$index","_items$index2","_this$asProps","onDnD","_this$state","fromId","id","fromIndex","toId","toIndex","_this$asProps$onInser","_this$asProps2","_items$index3","onInsertDroppable","_this$asProps$onSwapD","_this$asProps3","_items$index4","onSwapDraggable","key","stopPropagation","handleItemDrop","setTimeout","_this$state$items","focus","handleItemDragStart","handleItemFocus","handleItemKeyDown","customFocus","undefined","getCustomFocusItemIndex","_ref7","_prevState$items$inde","_prevState$items$inde2","_toConsumableArray","_createClass","value","getDraggableProps","_","onDragStart","makeItemDragStartHandler","onDragEnd","handleItemDragEnd","onDragOver","handleItemDragOver","onDragEnter","handleItemDragEnter","onDrop","makeItemDropHandler","onMouseMove","handleItemMouseMove","onKeyDown","makeItemKeyDownHandler","onFocus","makeItemFocusHandler","dropPreview","dark","theme","swapPreview","getSwapPreview","componentDidMount","document","addEventListener","handlePageKeyDown","capture","componentWillUnmount","removeEventListener","componentDidUpdate","prevProps","render","_ref","_ref4","SA11yHint","context","styles","createElement","Provider","cn","_assignProps","i18n","locale","Draggable","props","_ref2","arguments[0]","_ref5","SDraggable","ref","useRef","_React$useContext","useContext","_props$placement","placement","_props$noDrag","noDrag","Children","resolvedChildren","useMemo","current","_objectSpread","_assignProps2","DropZone","_ref3","_ref6","SDropZone","DragAndDrop","_assignProps3","Dropable"],"sources":["../../src/DragAndDrop.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { sstyled, Component, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport useEnhancedEffect from '@semcore/utils/lib/use/useEnhancedEffect';\n\nimport style from './style/drag-and-drop.shadow.css';\n\ntype AsProps = {\n /**\n * @deprecated don't use this prop\n */\n theme?: 'dark' | 'default';\n /**\n * @deprecated use `onDnD` instead\n */\n onSwapDraggable?: (draggableNode: React.ReactNode, droppableNode: React.ReactNode) => void;\n /**\n * @deprecated use `onDnD` instead\n */\n onInsertDroppable?: (draggableNode: React.ReactNode, droppableNode: React.ReactNode) => void;\n /**\n * Contolled drag and drop handler\n */\n onDnD: (dndData: { fromIndex: number; fromId: string; toIndex: number; toId: string }) => void;\n /**\n * Index of id that indicates item that is currently under the user focus in case of real browser focus cannot be used.\n * When provided, drag and drop listens to whole page keyboard events. Doesn't provide `onCustomFocusChange` callback.\n */\n customFocus?: number | string;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n};\n\nconst noop: (...args: any[]) => any = () => {\n /* do nothing */\n};\nconst DragAndDropContext = React.createContext<{\n attach: (details: {\n index: number;\n children: React.ReactNode;\n node: HTMLElement;\n id: string;\n draggingAllowed: boolean;\n }) => void;\n detach: (index: number) => void;\n}>({\n attach: noop,\n detach: noop,\n});\n\ntype State = {\n items: {\n children: React.ReactNode;\n node: HTMLElement;\n id: string;\n draggingAllowed: boolean;\n }[];\n dragging: null | {\n index: number;\n initialItemsRects?: { x: number; y: number; width: number; height: number }[];\n };\n previewSwap: number | null;\n hideHoverEffect: boolean;\n a11yHint: string | null;\n};\n\nclass DragAndDropRoot extends Component<AsProps, {}, State> {\n static displayName = 'DragAndDrop';\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n theme: 'default',\n i18n: localizedMessages,\n locale: 'en',\n };\n static style = style;\n\n state: State = {\n items: [],\n dragging: null,\n previewSwap: null,\n hideHoverEffect: false, // https://stackoverflow.com/questions/67118739/hover-effect-reset-when-hovering-over-other-letters\n a11yHint: null,\n };\n\n handleItemDragStart = (index: number) => {\n const itemText =\n this.state.items[index]?.node?.getAttribute('aria-label') ||\n this.state.items[index]?.node?.textContent ||\n `${index + 1}`;\n\n const { getI18nText } = this.asProps;\n const itemsCount = this.state.items.length;\n const a11yHint = getI18nText('grabbed', {\n itemText,\n itemPosition: index + 1,\n itemsCount,\n });\n\n this.setState((prevState: State) => ({\n a11yHint: a11yHint,\n dragging: {\n index,\n initialItemsRects: prevState.items.map((item) => item?.node.getBoundingClientRect()),\n },\n }));\n };\n handleItemDragEnd = (event: DragEvent) => {\n event.preventDefault();\n this.setState({\n dragging: null,\n previewSwap: null,\n // hideHoverEffect: true\n });\n };\n handleItemDragOver = (event: DragEvent) => {\n event.preventDefault();\n if (!this.state.dragging?.initialItemsRects) return;\n const itemIndex = this.state.dragging.initialItemsRects.findIndex(\n (rect) =>\n rect &&\n event.clientX > rect.x &&\n event.clientX < rect.x + rect.width &&\n event.clientY > rect.y &&\n event.clientY < rect.y + rect.height,\n );\n const itemText =\n this.state.items[itemIndex]?.node?.getAttribute('aria-label') ||\n this.state.items[itemIndex]?.node?.textContent ||\n `${itemIndex + 1}`;\n const itemsCount = this.state.items.length;\n const { getI18nText } = this.asProps;\n const a11yHint = getI18nText('grabbing', {\n itemText,\n itemPosition: itemIndex + 1,\n itemsCount,\n });\n\n if (itemIndex === this.state.dragging?.index) this.setState({ previewSwap: null, a11yHint });\n else this.setState({ previewSwap: itemIndex, a11yHint });\n };\n getSwapPreview = (index: number) => {\n if (!this.state.dragging) return null;\n if (this.state.previewSwap === null) return null;\n if (this.state.items[this.state.previewSwap]?.draggingAllowed === false) return null;\n if (this.state.previewSwap === index)\n return this.state.items[this.state.dragging.index]?.children;\n if (this.state.previewSwap !== null && index === this.state.dragging.index)\n return this.state.items[this.state.previewSwap]?.children;\n };\n handleItemDrop = (index: number) => {\n const { onDnD, getI18nText } = this.asProps;\n if (!onDnD) return;\n const { items, dragging } = this.state;\n const itemText =\n this.state.items[index]?.node?.getAttribute('aria-label') ||\n this.state.items[index]?.node?.textContent ||\n `${index + 1}`;\n const itemsCount = this.state.items.length;\n const a11yHint = getI18nText('dropped', {\n itemText,\n itemPosition: index + 1,\n itemsCount,\n });\n\n this.setState({ a11yHint, dragging: null, previewSwap: null, hideHoverEffect: true });\n onDnD({\n fromId: items[dragging!.index]?.id,\n fromIndex: dragging!.index,\n toId: items[index]?.id,\n toIndex: index,\n });\n if (items[index]) {\n if (!items[index].draggingAllowed) {\n this.asProps.onInsertDroppable?.(items[dragging!.index]?.children, items[index].children);\n } else {\n this.asProps.onSwapDraggable?.(items[dragging!.index]?.children, items[index].children);\n }\n }\n };\n handleItemDragEnter = (event: DragEvent) => {\n event.preventDefault();\n };\n handleItemMouseMove = () => {\n if (!this.state.hideHoverEffect) return;\n this.setState({ hideHoverEffect: false });\n };\n handleItemKeyDown = (event: KeyboardEvent, index: number) => {\n if (event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n if (this.state.dragging) {\n const previewSwap = this.state.previewSwap;\n this.handleItemDrop(index);\n this.setState({ dragging: null, previewSwap: null, hideHoverEffect: true });\n setTimeout(() => {\n this.state.items[previewSwap as any]?.node.focus();\n }, 0);\n } else {\n this.handleItemDragStart(index);\n }\n return false;\n } else if (event.key === 'Escape' && this.state.dragging) {\n event.preventDefault();\n event.stopPropagation();\n const { getI18nText } = this.asProps;\n const a11yHint = getI18nText('discarded');\n this.setState({ a11yHint, dragging: null, previewSwap: null, hideHoverEffect: true });\n return false;\n }\n };\n handleItemFocus = (index: number) => {\n if (!this.state.dragging) return;\n this.setState({ previewSwap: index });\n };\n\n makeItemDragStartHandler = (index: number) => () => this.handleItemDragStart(index);\n makeItemDropHandler = (index: number) => () => this.handleItemDrop(index);\n makeItemFocusHandler = (index: number) => () => this.handleItemFocus(index);\n makeItemKeyDownHandler = (index: number) => (event: KeyboardEvent) =>\n this.handleItemKeyDown(event, index);\n\n getDraggableProps(_: any, index: number) {\n return {\n index,\n onDragStart: this.makeItemDragStartHandler(index),\n onDragEnd: this.handleItemDragEnd,\n onDragOver: this.handleItemDragOver,\n onDragEnter: this.handleItemDragEnter,\n onDrop: this.makeItemDropHandler(index),\n onMouseMove: this.handleItemMouseMove,\n onKeyDown: this.makeItemKeyDownHandler(index),\n onFocus: this.makeItemFocusHandler(index),\n dropPreview: index === this.state.previewSwap,\n dark: this.asProps.theme === 'dark',\n swapPreview: this.getSwapPreview(index),\n hideHoverEffect: this.state.hideHoverEffect,\n };\n }\n\n handlePageKeyDown = (event: KeyboardEvent) => {\n if (this.asProps.customFocus !== undefined) {\n const itemIndex = this.getCustomFocusItemIndex(this.asProps.customFocus);\n if (this.state.items[itemIndex!]) {\n this.handleItemKeyDown(event, itemIndex!);\n }\n }\n };\n\n attach = ({\n index,\n children,\n node,\n id,\n draggingAllowed,\n }: {\n index: number;\n children: React.ReactNode;\n node: HTMLElement;\n id: string;\n draggingAllowed: boolean;\n }) => {\n this.setState((prevState: State) => {\n if (prevState.items[index]?.children === children && prevState.items[index]?.node === node)\n return prevState;\n const { items } = prevState;\n items[index] = { children, node, id, draggingAllowed };\n return { items: [...items] };\n });\n };\n detach = (index: number) => {\n this.setState((prevState: State) => {\n if (!prevState.items[index]) return prevState;\n const { items } = prevState;\n (items as any)[index] = undefined;\n return { items: [...items] };\n });\n };\n\n getCustomFocusItemIndex = (customFocus: string | number | undefined) => {\n if (customFocus === undefined) return undefined;\n let itemIndex = customFocus;\n if (typeof itemIndex === 'string') {\n itemIndex = this.state.items.findIndex((item) => item.id === itemIndex);\n }\n if (itemIndex === -1 || typeof itemIndex !== 'number') return undefined;\n return itemIndex;\n };\n\n componentDidMount() {\n document.addEventListener('keydown', this.handlePageKeyDown, { capture: true });\n }\n\n componentWillUnmount() {\n document.removeEventListener('keydown', this.handlePageKeyDown, { capture: true });\n }\n\n componentDidUpdate(prevProps: AsProps) {\n if (prevProps.customFocus !== this.asProps.customFocus) {\n const itemIndex = this.getCustomFocusItemIndex(this.asProps.customFocus);\n if (this.state.items[itemIndex!]) this.handleItemFocus(itemIndex!);\n }\n }\n\n render() {\n const { attach, detach } = this;\n const SA11yHint = 'div';\n const { a11yHint } = this.state;\n const context = { attach, detach };\n\n return sstyled(this.asProps.styles)(\n <DragAndDropContext.Provider value={context}>\n {a11yHint && (\n <SA11yHint role='alert' aria-live='assertive'>\n {a11yHint}\n </SA11yHint>\n )}\n <Root render={Box} />\n </DragAndDropContext.Provider>,\n );\n }\n}\n\nconst Draggable = (props: any) => {\n const SDraggable = Root;\n const ref = React.useRef();\n const { attach, detach } = React.useContext(DragAndDropContext);\n const {\n styles,\n placement = 'right',\n noDrag = false,\n index,\n children,\n swapPreview,\n Children,\n id,\n } = props;\n const resolvedChildren = React.useMemo(\n () => (typeof children === 'function' ? children(props) : children),\n [children, props],\n );\n\n useEnhancedEffect(() => {\n attach({ index, children: resolvedChildren, node: ref.current!, id, draggingAllowed: !noDrag });\n return () => detach(index);\n }, [index, resolvedChildren, attach, detach, id]);\n\n return sstyled(styles)(\n <SDraggable render={Box} ref={ref} draggable={!noDrag} tabIndex={0} placement={placement}>\n {swapPreview ? swapPreview : <Children />}\n </SDraggable>,\n );\n};\n\nconst DropZone = (props: any) => {\n const SDropZone = Root;\n const { styles } = props;\n\n return sstyled(styles)(<SDropZone render={DragAndDrop.Draggable} noDrag />);\n};\n\nconst DragAndDrop = createComponent(DragAndDropRoot, {\n Draggable,\n DropZone,\n Dropable: DropZone,\n}) as any;\n\nexport default DragAndDrop;\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,OAAO,EAAEC,SAAS,EAAEC,IAAI,QAAQ,eAAe;AACzE,SAASC,GAAG,QAAQ,mBAAmB;AACvC,SAASC,iBAAiB,QAAQ,gDAAgD;AAClF,OAAOC,WAAW,MAAM,yCAAyC;AACjE,OAAOC,iBAAiB,MAAM,0CAA0C;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAA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version":3,"file":"DragAndDrop.js","names":["React","createComponent","sstyled","Component","Root","Box","localizedMessages","i18nEnhance","useEnhancedEffect","style","_sstyled","insert","noop","DragAndDropContext","createContext","attach","detach","DragAndDropRoot","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","items","dragging","previewSwap","hideHoverEffect","a11yHint","index","state","currentItem","itemText","node","getAttribute","textContent","getI18nText","asProps","zoneName","zonedItems","filter","i","itemsCount","itemPosition","findIndex","id","setState","prevState","initialItemsRects","map","item","getBoundingClientRect","event","preventDefault","_this$state$dragging","_this$state","itemIndex","rect","clientX","x","width","clientY","y","height","draggingItem","isDropZone","i18nKey","_this$state$items$_th","_this$state$items$_th2","_this$state$items$_th3","draggingAllowed","children","_this$asProps","onDnD","_this$state2","fromNode","fromId","fromIndex","toId","toIndex","_this$asProps$onInser","_this$asProps2","_items$index","onInsertDroppable","_this$asProps$onSwapD","_this$asProps3","_items$index2","onSwapDraggable","key","stopPropagation","handleItemDrop","setTimeout","_this$state$items","focus","handleItemDragStart","handleItemFocus","handleItemKeyDown","customFocus","undefined","getCustomFocusItemIndex","_ref7","_prevState$items$inde","_prevState$items$inde2","_toConsumableArray","_createClass","value","getDraggableProps","_","onDragStart","makeItemDragStartHandler","onDragEnd","handleItemDragEnd","onDragOver","handleItemDragOver","onDragEnter","handleItemDragEnter","onDrop","makeItemDropHandler","onMouseMove","handleItemMouseMove","onKeyDown","makeItemKeyDownHandler","onFocus","makeItemFocusHandler","dropPreview","dark","theme","swapPreview","getSwapPreview","componentDidMount","document","addEventListener","handlePageKeyDown","capture","componentWillUnmount","removeEventListener","componentDidUpdate","prevProps","render","_ref","_ref4","SA11yHint","context","styles","createElement","Provider","cn","_assignProps","i18n","locale","Draggable","props","_ref2","arguments[0]","_ref5","SDraggable","ref","useRef","_React$useContext","useContext","_props$placement","placement","_props$noDrag","noDrag","Children","_props$isDropZone","resolvedChildren","useMemo","current","_objectSpread","_assignProps2","DropZone","_ref3","_ref6","SDropZone","DragAndDrop","_assignProps3","Dropable"],"sources":["../../src/DragAndDrop.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { sstyled, Component, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport useEnhancedEffect from '@semcore/utils/lib/use/useEnhancedEffect';\n\nimport style from './style/drag-and-drop.shadow.css';\nimport { DropZoneProps } from './index';\n\ntype AsProps = {\n /**\n * @deprecated don't use this prop\n */\n theme?: 'dark' | 'default';\n /**\n * @deprecated use `onDnD` instead\n */\n onSwapDraggable?: (draggableNode: React.ReactNode, droppableNode: React.ReactNode) => void;\n /**\n * @deprecated use `onDnD` instead\n */\n onInsertDroppable?: (draggableNode: React.ReactNode, droppableNode: React.ReactNode) => void;\n /**\n * Contolled drag and drop handler\n */\n onDnD: (dndData: { fromIndex: number; fromId: string; toIndex: number; toId: string }) => void;\n /**\n * Index of id that indicates item that is currently under the user focus in case of real browser focus cannot be used.\n * When provided, drag and drop listens to whole page keyboard events. Doesn't provide `onCustomFocusChange` callback.\n */\n customFocus?: number | string;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n};\n\ntype AttachDetails = {\n index: number;\n children: React.ReactNode;\n node: HTMLElement;\n id: string;\n draggingAllowed: boolean;\n isDropZone?: boolean;\n zoneName?: string;\n};\n\nconst noop: (...args: any[]) => any = () => {\n /* do nothing */\n};\nconst DragAndDropContext = React.createContext<{\n attach: (details: AttachDetails) => void;\n detach: (index: number) => void;\n}>({\n attach: noop,\n detach: noop,\n});\n\ntype State = {\n items: Array<Omit<AttachDetails, 'index'> | undefined>;\n dragging: null | {\n index: number;\n initialItemsRects: Array<{ x: number; y: number; width: number; height: number } | undefined>;\n };\n previewSwap: number | null;\n hideHoverEffect: boolean;\n a11yHint: string | null;\n};\n\nclass DragAndDropRoot extends Component<AsProps, {}, State> {\n static displayName = 'DragAndDrop';\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n theme: 'default',\n i18n: localizedMessages,\n locale: 'en',\n };\n static style = style;\n\n state: State = {\n items: [],\n dragging: null,\n previewSwap: null,\n hideHoverEffect: false, // https://stackoverflow.com/questions/67118739/hover-effect-reset-when-hovering-over-other-letters\n a11yHint: null,\n };\n\n handleItemDragStart = (index: number) => {\n const { items } = this.state;\n const currentItem = items[index];\n if (!currentItem) return;\n\n const itemText =\n currentItem.node.getAttribute('aria-label') || currentItem.node.textContent || `${index + 1}`;\n\n const { getI18nText } = this.asProps;\n const zoneName = currentItem.zoneName;\n const zonedItems = !zoneName ? items : items.filter((i) => i?.zoneName === zoneName);\n const itemsCount = zonedItems.length;\n const itemPosition = zonedItems.findIndex((i) => i?.id === currentItem.id);\n const a11yHint = getI18nText(zoneName ? 'grabbedWithZone' : 'grabbed', {\n itemText,\n itemPosition: itemPosition + 1,\n itemsCount,\n zoneName: zoneName || '',\n });\n\n this.setState((prevState: State) => ({\n a11yHint: a11yHint,\n dragging: {\n index,\n initialItemsRects: prevState.items.map((item) => item?.node.getBoundingClientRect()),\n },\n }));\n };\n handleItemDragEnd = (event: DragEvent) => {\n event.preventDefault();\n this.setState({\n dragging: null,\n previewSwap: null,\n // hideHoverEffect: true\n });\n };\n handleItemDragOver = (event: DragEvent) => {\n event.preventDefault();\n const { getI18nText } = this.asProps;\n const { items, dragging } = this.state;\n if (!dragging) return;\n const itemIndex = dragging.initialItemsRects.findIndex(\n (rect) =>\n rect &&\n event.clientX > rect.x &&\n event.clientX < rect.x + rect.width &&\n event.clientY > rect.y &&\n event.clientY < rect.y + rect.height,\n );\n const currentItem = items[itemIndex];\n const draggingItem = items[dragging.index];\n if (!currentItem || !draggingItem) return;\n\n const node = currentItem.isDropZone ? draggingItem.node : currentItem.node;\n\n const itemText = node.getAttribute('aria-label') || node.textContent || `${itemIndex + 1}`;\n const zoneName = currentItem.zoneName;\n const zonedItems = !zoneName ? items : items.filter((i) => i?.zoneName === zoneName);\n const itemsCount = zonedItems.length;\n const itemPosition = zonedItems.findIndex((i) => i?.id === currentItem.id);\n\n const i18nKey = !zoneName\n ? 'grabbing'\n : currentItem.isDropZone\n ? 'grabbingJustWithZone'\n : 'grabbingFullWithZone';\n\n const a11yHint = getI18nText(i18nKey, {\n itemText,\n itemPosition: itemPosition + 1,\n itemsCount,\n zoneName: zoneName || '',\n });\n\n if (itemIndex === this.state.dragging?.index) this.setState({ previewSwap: null, a11yHint });\n else this.setState({ previewSwap: itemIndex, a11yHint });\n };\n getSwapPreview = (index: number) => {\n if (!this.state.dragging) return null;\n if (this.state.previewSwap === null) return null;\n if (this.state.items[this.state.previewSwap]?.draggingAllowed === false) return null;\n if (this.state.previewSwap === index)\n return this.state.items[this.state.dragging.index]?.children;\n if (this.state.previewSwap !== null && index === this.state.dragging.index)\n return this.state.items[this.state.previewSwap]?.children;\n };\n handleItemDrop = (index: number) => {\n const { onDnD, getI18nText } = this.asProps;\n if (!onDnD) return;\n\n const { items, dragging } = this.state;\n if (!dragging) return;\n const currentItem = items[index];\n const draggingItem = items[dragging.index];\n if (!currentItem || !draggingItem) return;\n\n const node = currentItem.isDropZone ? draggingItem.node : currentItem.node;\n const itemText = node.getAttribute('aria-label') || node.textContent || `${index + 1}`;\n const zoneName = currentItem.zoneName;\n const zonedItems = !zoneName ? items : items.filter((i) => i?.zoneName === zoneName);\n const itemsCount = zonedItems.length;\n const itemPosition = zonedItems.findIndex((i) => i?.id === currentItem.id);\n\n const i18nKey = !zoneName\n ? 'dropped'\n : currentItem.isDropZone\n ? 'droppedJustWithZone'\n : 'droppedFullWithZone';\n\n const a11yHint = getI18nText(i18nKey, {\n itemText,\n itemPosition: itemPosition + 1,\n itemsCount,\n zoneName: zoneName || '',\n });\n\n this.setState({ a11yHint, dragging: null, previewSwap: null, hideHoverEffect: true });\n if (dragging && items[dragging.index]) {\n const fromNode = items[dragging.index];\n if (fromNode) {\n onDnD({\n fromId: fromNode.id,\n fromIndex: dragging!.index,\n toId: currentItem.id,\n toIndex: index,\n });\n }\n }\n if (!currentItem.draggingAllowed) {\n this.asProps.onInsertDroppable?.(items[dragging!.index]?.children, currentItem.children);\n } else {\n this.asProps.onSwapDraggable?.(items[dragging!.index]?.children, currentItem.children);\n }\n };\n handleItemDragEnter = (event: DragEvent) => {\n event.preventDefault();\n };\n handleItemMouseMove = () => {\n if (!this.state.hideHoverEffect) return;\n this.setState({ hideHoverEffect: false });\n };\n handleItemKeyDown = (event: KeyboardEvent, index: number) => {\n if (event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n if (this.state.dragging) {\n const previewSwap = this.state.previewSwap;\n this.handleItemDrop(index);\n this.setState({ dragging: null, previewSwap: null, hideHoverEffect: true });\n setTimeout(() => {\n this.state.items[previewSwap as any]?.node.focus();\n }, 0);\n } else {\n this.handleItemDragStart(index);\n }\n return false;\n } else if (event.key === 'Escape' && this.state.dragging) {\n event.preventDefault();\n event.stopPropagation();\n const { getI18nText } = this.asProps;\n const a11yHint = getI18nText('discarded');\n this.setState({ a11yHint, dragging: null, previewSwap: null, hideHoverEffect: true });\n return false;\n }\n };\n handleItemFocus = (index: number) => {\n if (!this.state.dragging) return;\n this.setState({ previewSwap: index });\n };\n\n makeItemDragStartHandler = (index: number) => () => this.handleItemDragStart(index);\n makeItemDropHandler = (index: number) => () => this.handleItemDrop(index);\n makeItemFocusHandler = (index: number) => () => this.handleItemFocus(index);\n makeItemKeyDownHandler = (index: number) => (event: KeyboardEvent) =>\n this.handleItemKeyDown(event, index);\n\n getDraggableProps(_: any, index: number) {\n return {\n index,\n onDragStart: this.makeItemDragStartHandler(index),\n onDragEnd: this.handleItemDragEnd,\n onDragOver: this.handleItemDragOver,\n onDragEnter: this.handleItemDragEnter,\n onDrop: this.makeItemDropHandler(index),\n onMouseMove: this.handleItemMouseMove,\n onKeyDown: this.makeItemKeyDownHandler(index),\n onFocus: this.makeItemFocusHandler(index),\n dropPreview: index === this.state.previewSwap,\n dark: this.asProps.theme === 'dark',\n swapPreview: this.getSwapPreview(index),\n hideHoverEffect: this.state.hideHoverEffect,\n };\n }\n\n handlePageKeyDown = (event: KeyboardEvent) => {\n if (this.asProps.customFocus !== undefined) {\n const itemIndex = this.getCustomFocusItemIndex(this.asProps.customFocus);\n if (this.state.items[itemIndex!]) {\n this.handleItemKeyDown(event, itemIndex!);\n }\n }\n };\n\n attach = ({\n index,\n children,\n node,\n id,\n draggingAllowed,\n zoneName,\n isDropZone,\n }: AttachDetails) => {\n this.setState((prevState: State) => {\n if (prevState.items[index]?.children === children && prevState.items[index]?.node === node)\n return prevState;\n const { items } = prevState;\n items[index] = { children, node, id, draggingAllowed, zoneName, isDropZone };\n return { items: [...items] };\n });\n };\n detach = (index: number) => {\n this.setState((prevState: State) => {\n if (!prevState.items[index]) return prevState;\n const { items } = prevState;\n items[index] = undefined;\n return { items: [...items] };\n });\n };\n\n getCustomFocusItemIndex = (customFocus: string | number | undefined) => {\n if (customFocus === undefined) return undefined;\n let itemIndex = customFocus;\n if (typeof itemIndex === 'string') {\n itemIndex = this.state.items.findIndex((item) => item?.id === itemIndex);\n }\n if (itemIndex === -1 || typeof itemIndex !== 'number') return undefined;\n return itemIndex;\n };\n\n componentDidMount() {\n document.addEventListener('keydown', this.handlePageKeyDown, { capture: true });\n }\n\n componentWillUnmount() {\n document.removeEventListener('keydown', this.handlePageKeyDown, { capture: true });\n }\n\n componentDidUpdate(prevProps: AsProps) {\n if (prevProps.customFocus !== this.asProps.customFocus) {\n const itemIndex = this.getCustomFocusItemIndex(this.asProps.customFocus);\n if (this.state.items[itemIndex!]) this.handleItemFocus(itemIndex!);\n }\n }\n\n render() {\n const { attach, detach } = this;\n const SA11yHint = 'div';\n const { a11yHint } = this.state;\n const context = { attach, detach };\n\n return sstyled(this.asProps.styles)(\n <DragAndDropContext.Provider value={context}>\n {a11yHint && (\n <SA11yHint role='alert' aria-live='assertive'>\n {a11yHint}\n </SA11yHint>\n )}\n <Root render={Box} />\n </DragAndDropContext.Provider>,\n );\n }\n}\n\nconst Draggable = (props: any) => {\n const SDraggable = Root;\n const ref = React.useRef();\n const { attach, detach } = React.useContext(DragAndDropContext);\n const {\n styles,\n placement = 'right',\n noDrag = false,\n index,\n children,\n swapPreview,\n Children,\n id,\n zoneName,\n isDropZone = false,\n } = props;\n const resolvedChildren = React.useMemo(\n () => (typeof children === 'function' ? children(props) : children),\n [children, props],\n );\n\n useEnhancedEffect(() => {\n attach({\n index,\n children: resolvedChildren,\n node: ref.current!,\n id,\n draggingAllowed: !noDrag,\n zoneName,\n isDropZone,\n });\n return () => detach(index);\n }, [index, resolvedChildren, attach, detach, id]);\n\n return sstyled(styles)(\n <SDraggable render={Box} ref={ref} draggable={!noDrag} tabIndex={0} placement={placement}>\n {swapPreview ? swapPreview : <Children />}\n </SDraggable>,\n );\n};\n\nconst DropZone = (props: DropZoneProps) => {\n const SDropZone = Root;\n const { styles } = props;\n\n return sstyled(styles)(<SDropZone render={DragAndDrop.Draggable} noDrag isDropZone />);\n};\n\nconst DragAndDrop = createComponent(DragAndDropRoot, {\n Draggable,\n DropZone,\n Dropable: DropZone,\n}) as any;\n\nexport default DragAndDrop;\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,OAAO,EAAEC,SAAS,EAAEC,IAAI,QAAQ,eAAe;AACzE,SAASC,GAAG,QAAQ,mBAAmB;AACvC,SAASC,iBAAiB,QAAQ,gDAAgD;AAClF,OAAOC,WAAW,MAAM,yCAAyC;AACjE,OAAOC,iBAAiB,MAAM,0CAA0C;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAwCzE,IAAMC,IAA6B,GAAG,SAAhCA,IAA6BA,CAAA,EAAS;EAC1C;AAAA,CACD;AACD,IAAMC,k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
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Box, BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface IDragAndDropProps extends DragAndDropProps, UnknownProperties {}\nexport type DragAndDropProps = BoxProps & {\n /**\n * @deprecated don't use this prop\n */\n theme?: 'dark' | 'default';\n /**\n * @deprecated use `onDnD` instead\n */\n onSwapDraggable?: (draggableNode: React.ReactNode, droppableNode: React.ReactNode) => void;\n /**\n * @deprecated use `onDnD` instead\n */\n onInsertDroppable?: (draggableNode: React.ReactNode, droppableNode: React.ReactNode) => void;\n /**\n * Controlled drag and drop handler\n */\n onDnD: (dndData: { fromIndex: number; fromId: string; toIndex: number; toId: string }) => void;\n /**\n * Index of id that indicates item that is currently under the user focus in case of real browser focus cannot be used.\n * When provided, drag and drop listens to whole page keyboard events. Doesn't provide `onCustomFocusChange` callback.\n */\n customFocus?: number | string;\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IDraggableProps extends DraggableProps, UnknownProperties {}\nexport type DraggableProps = BoxProps & {\n /** Placement of visual drag-and-drop marker\n * @default right\n * */\n placement?: 'top' | 'right' | 'bottom' | 'left' | false;\n /** Disabled DropZone abilities of component\n * @default false\n * */\n noDrop?: boolean;\n /**\n * Used as `fromId` or `toId` in `onDnD` handler.\n */\n id?: string;\n};\n\n/** @deprecated */\nexport interface IDragAndDropContext extends DragAndDropContext, UnknownProperties {}\nexport type DragAndDropContext = {\n getDraggableProps: PropGetterFn;\n getDroppableProps: PropGetterFn;\n};\n\ndeclare const DragAndDrop: Intergalactic.Component<'div', DragAndDropProps, DragAndDropContext> & {\n Draggable: Intergalactic.Component<'div', DraggableProps>;\n DropZone: typeof Box
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Box, BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface IDragAndDropProps extends DragAndDropProps, UnknownProperties {}\nexport type DragAndDropProps = BoxProps & {\n /**\n * @deprecated don't use this prop\n */\n theme?: 'dark' | 'default';\n /**\n * @deprecated use `onDnD` instead\n */\n onSwapDraggable?: (draggableNode: React.ReactNode, droppableNode: React.ReactNode) => void;\n /**\n * @deprecated use `onDnD` instead\n */\n onInsertDroppable?: (draggableNode: React.ReactNode, droppableNode: React.ReactNode) => void;\n /**\n * Controlled drag and drop handler\n */\n onDnD: (dndData: { fromIndex: number; fromId: string; toIndex: number; toId: string }) => void;\n /**\n * Index of id that indicates item that is currently under the user focus in case of real browser focus cannot be used.\n * When provided, drag and drop listens to whole page keyboard events. Doesn't provide `onCustomFocusChange` callback.\n */\n customFocus?: number | string;\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IDraggableProps extends DraggableProps, UnknownProperties {}\nexport type DraggableProps = BoxProps & {\n /** Placement of visual drag-and-drop marker\n * @default right\n * */\n placement?: 'top' | 'right' | 'bottom' | 'left' | false;\n /** Disabled DropZone abilities of component\n * @default false\n * */\n noDrop?: boolean;\n /**\n * Used as `fromId` or `toId` in `onDnD` handler.\n */\n id?: string;\n /**\n * Used for add zoneName in a11y hints\n */\n zoneName?: string;\n};\n\n/** @deprecated */\nexport interface IDragAndDropContext extends DragAndDropContext, UnknownProperties {}\nexport type DragAndDropContext = {\n getDraggableProps: PropGetterFn;\n getDroppableProps: PropGetterFn;\n};\n\nexport type DropZoneProps = BoxProps & {\n /**\n * Used for add zoneName in a11y hints\n */\n zoneName?: string;\n};\n\ndeclare const DragAndDrop: Intergalactic.Component<'div', DragAndDropProps, DragAndDropContext> & {\n Draggable: Intergalactic.Component<'div', DraggableProps>;\n DropZone: Intergalactic.Component<typeof Box, DropZoneProps>;\n /** @deprecated use `DragAndDrop.DropZone` instead */\n Droppable: Intergalactic.Component<typeof Box, DropZoneProps>;\n};\n\nexport default DragAndDrop;\n"],"mappings":""}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "{itemText} erfasst, aktuelle Position ist {itemPosition} von {itemsCount}",
|
3
3
|
"grabbing": "Erfasse {itemText}, Ablageposition ist {itemPosition} von {itemsCount}",
|
4
4
|
"dropped": "{itemText} abgelegt, finale Position ist {itemPosition} von {itemsCount}",
|
5
|
+
"grabbedWithZone": "{itemText} erfasst, aktuelle Position ist {itemPosition} von {itemsCount} in {zoneName}",
|
6
|
+
"grabbingFullWithZone": "Erfasse {itemText}, Ablageposition ist {itemPosition} von {itemsCount} in {zoneName}",
|
7
|
+
"grabbingJustWithZone": "Erfasse {itemText}, Ablegen in {zoneName}",
|
8
|
+
"droppedFullWithZone": "{itemText} abgelegt, finale Position ist {itemPosition} von {itemsCount} in {zoneName}",
|
9
|
+
"droppedJustWithZone": "{itemText} abgelegt in {zoneName}",
|
5
10
|
"discarded": "Ziehen wurde abgebrochen"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "{itemText} grabbed, current position is {itemPosition} of {itemsCount}",
|
3
3
|
"grabbing": "Grabbing {itemText}, drop position is {itemPosition} of {itemsCount}",
|
4
4
|
"dropped": "{itemText} dropped, final position is {itemPosition} of {itemsCount}",
|
5
|
+
"grabbedWithZone": "{itemText} grabbed, current position is {itemPosition} of {itemsCount} in {zoneName}",
|
6
|
+
"grabbingFullWithZone": "Grabbing {itemText}, drop position is {itemPosition} of {itemsCount} in {zoneName}",
|
7
|
+
"grabbingJustWithZone": "Grabbing {itemText}, drop in {zoneName}",
|
8
|
+
"droppedFullWithZone": "{itemText} dropped, final position is {itemPosition} of {itemsCount} in {zoneName}",
|
9
|
+
"droppedJustWithZone": "{itemText} dropped in {zoneName}",
|
5
10
|
"discarded": "Dragging was discarded"
|
6
11
|
}
|
@@ -2,5 +2,10 @@
|
|
2
2
|
"grabbed": "Ítem {itemText} capturado, la posición actual es {itemPosition} de {itemsCount}",
|
3
3
|
"grabbing": "Ítem {itemText} capturado, la posición para soltar es {itemPosition} de {itemsCount}",
|
4
4
|
"dropped": "Ítem {itemText} soltado, la posición final es {itemPosition} de {itemsCount}",
|
5
|
+
"grabbedWithZone": "{itemText} capturado, la posición actual es {itemPosition} de {itemsCount} en {zoneName}",
|
6
|
+
"grabbingFullWithZone": "Capturando {itemText}, la posición para soltar es {itemPosition} de {itemsCount} en {zoneName}",
|
7
|
+
"grabbingJustWithZone": "Capturando {itemText}, soltar en {zoneName}",
|
8
|
+
"droppedFullWithZone": "{itemText} soltado, la posición final es {itemPosition} de {itemsCount} en {zoneName}",
|
9
|
+
"droppedJustWithZone": "{itemText} soltado en {zoneName}",
|
5
10
|
"discarded": "Se descartó el arrastre"
|
6
11
|
}
|