@apia/dashboard-controller 2.0.11 → 2.0.13
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.
|
@@ -34,8 +34,14 @@ function Drop(event, DragAndDrop2) {
|
|
|
34
34
|
const panelsArray = Array.from(newSection.children);
|
|
35
35
|
const childId = child.dataset.id;
|
|
36
36
|
if (childId) {
|
|
37
|
-
const index = panelsArray.
|
|
38
|
-
(panel) => panel.dataset.id === childId
|
|
37
|
+
const index = panelsArray.filter(
|
|
38
|
+
(panel) => !(panel.dataset.id === childId && !panel.classList.contains(
|
|
39
|
+
"apia_panel_falseDiv"
|
|
40
|
+
))
|
|
41
|
+
).findIndex(
|
|
42
|
+
(panel) => panel.dataset.id === childId && panel.classList.contains(
|
|
43
|
+
"apia_panel_falseDiv"
|
|
44
|
+
)
|
|
39
45
|
);
|
|
40
46
|
if (typeof index === "number" && newSection.dataset.locationid) {
|
|
41
47
|
void updatePanelPosition(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drop.js","sources":["../../../src/splash/events/Drop.ts"],"sourcesContent":["/* eslint-disable no-param-reassign */\r\nimport { getSpecificParent } from '@apia/util';\r\nimport { updatePanelPosition } from '../../position/usePanelPosition';\r\nimport { DragAndDrop } from '../util/DragAndDrop';\r\n\r\nexport function Drop(event: Event, DragAndDrop: DragAndDrop) {\r\n if (DragAndDrop.body) {\r\n const ev = event as DragEvent;\r\n const data = ev?.dataTransfer?.getData('text');\r\n\r\n const sections = DragAndDrop.body?.querySelectorAll('[data-locationid]');\r\n\r\n sections.forEach((sec) => {\r\n sec.setAttribute('style', '');\r\n });\r\n\r\n const draggingPanel = DragAndDrop.body.querySelector(\r\n `[data-panel][data-id=\"${DragAndDrop.draggingPanelId}\"]:not(.apia_panel_falseDiv)`,\r\n );\r\n\r\n if (draggingPanel) {\r\n draggingPanel.setAttribute('style', '');\r\n }\r\n const falseDiv = document.querySelector('.apia_panel_falseDiv');\r\n\r\n if (data) {\r\n const child = document.querySelector(\r\n `[data-panel][data-id=\"${data}\"]:not(.apia_panel_falseDiv)`,\r\n );\r\n sections.forEach((sec) => {\r\n if (sec.children.length === 1) {\r\n sec.setAttribute('style', '');\r\n }\r\n });\r\n if (falseDiv) {\r\n const newSection = getSpecificParent(\r\n falseDiv as HTMLElement,\r\n (current) => !!current.dataset.locationid,\r\n );\r\n\r\n if (newSection) {\r\n const panelsArray = Array.from(newSection.children);\r\n const childId = (child as HTMLElement).dataset.id;\r\n\r\n if (childId) {\r\n const index = panelsArray.
|
|
1
|
+
{"version":3,"file":"Drop.js","sources":["../../../src/splash/events/Drop.ts"],"sourcesContent":["/* eslint-disable no-param-reassign */\r\nimport { getSpecificParent } from '@apia/util';\r\nimport { updatePanelPosition } from '../../position/usePanelPosition';\r\nimport { DragAndDrop } from '../util/DragAndDrop';\r\n\r\nexport function Drop(event: Event, DragAndDrop: DragAndDrop) {\r\n if (DragAndDrop.body) {\r\n const ev = event as DragEvent;\r\n const data = ev?.dataTransfer?.getData('text');\r\n\r\n const sections = DragAndDrop.body?.querySelectorAll('[data-locationid]');\r\n\r\n sections.forEach((sec) => {\r\n sec.setAttribute('style', '');\r\n });\r\n\r\n const draggingPanel = DragAndDrop.body.querySelector(\r\n `[data-panel][data-id=\"${DragAndDrop.draggingPanelId}\"]:not(.apia_panel_falseDiv)`,\r\n );\r\n\r\n if (draggingPanel) {\r\n draggingPanel.setAttribute('style', '');\r\n }\r\n const falseDiv = document.querySelector('.apia_panel_falseDiv');\r\n\r\n if (data) {\r\n const child = document.querySelector(\r\n `[data-panel][data-id=\"${data}\"]:not(.apia_panel_falseDiv)`,\r\n );\r\n sections.forEach((sec) => {\r\n if (sec.children.length === 1) {\r\n sec.setAttribute('style', '');\r\n }\r\n });\r\n if (falseDiv) {\r\n const newSection = getSpecificParent(\r\n falseDiv as HTMLElement,\r\n (current) => !!current.dataset.locationid,\r\n );\r\n\r\n if (newSection) {\r\n const panelsArray = Array.from(newSection.children);\r\n const childId = (child as HTMLElement).dataset.id;\r\n\r\n if (childId) {\r\n const index = panelsArray\r\n .filter(\r\n (panel) =>\r\n !(\r\n (panel as HTMLElement).dataset.id === childId &&\r\n !(panel as HTMLElement).classList.contains(\r\n 'apia_panel_falseDiv',\r\n )\r\n ),\r\n )\r\n .findIndex(\r\n (panel) =>\r\n (panel as HTMLElement).dataset.id === childId &&\r\n (panel as HTMLElement).classList.contains(\r\n 'apia_panel_falseDiv',\r\n ),\r\n );\r\n\r\n if (typeof index === 'number' && newSection.dataset.locationid) {\r\n void updatePanelPosition(\r\n childId,\r\n newSection.dataset.locationid,\r\n index + 1,\r\n );\r\n }\r\n }\r\n }\r\n falseDiv.replaceWith(child as Node);\r\n }\r\n }\r\n\r\n DragAndDrop.draggingPanelId = '';\r\n DragAndDrop.panelData = [];\r\n DragAndDrop.drawMinimap();\r\n\r\n DragAndDrop.removePlaceholder();\r\n }\r\n}\r\n"],"names":["DragAndDrop"],"mappings":";;;AAKgB,SAAA,IAAA,CAAK,OAAcA,YAA0B,EAAA;AAC3D,EAAA,IAAIA,aAAY,IAAM,EAAA;AACpB,IAAA,MAAM,EAAK,GAAA,KAAA,CAAA;AACX,IAAA,MAAM,IAAO,GAAA,EAAA,EAAI,YAAc,EAAA,OAAA,CAAQ,MAAM,CAAA,CAAA;AAE7C,IAAA,MAAM,QAAWA,GAAAA,YAAAA,CAAY,IAAM,EAAA,gBAAA,CAAiB,mBAAmB,CAAA,CAAA;AAEvE,IAAS,QAAA,CAAA,OAAA,CAAQ,CAAC,GAAQ,KAAA;AACxB,MAAI,GAAA,CAAA,YAAA,CAAa,SAAS,EAAE,CAAA,CAAA;AAAA,KAC7B,CAAA,CAAA;AAED,IAAM,MAAA,aAAA,GAAgBA,aAAY,IAAK,CAAA,aAAA;AAAA,MACrC,CAAA,sBAAA,EAAyBA,aAAY,eAAe,CAAA,4BAAA,CAAA;AAAA,KACtD,CAAA;AAEA,IAAA,IAAI,aAAe,EAAA;AACjB,M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AAEF,YAAA,IAAI,OAAO,KAAA,KAAU,QAAY,IAAA,UAAA,CAAW,QAAQ,UAAY,EAAA;AAC9D,cAAK,KAAA,mBAAA;AAAA,gBACH,OAAA;AAAA,gBACA,WAAW,OAAQ,CAAA,UAAA;AAAA,gBACnB,KAAQ,GAAA,CAAA;AAAA,eACV,CAAA;AAAA,aACF;AAAA,WACF;AAAA,SACF;AACA,QAAA,QAAA,CAAS,YAAY,KAAa,CAAA,CAAA;AAAA,OACpC;AAAA,KACF;AAEA,IAAAA,aAAY,eAAkB,GAAA,EAAA,CAAA;AAC9B,IAAAA,YAAAA,CAAY,YAAY,EAAC,CAAA;AACzB,IAAAA,aAAY,WAAY,EAAA,CAAA;AAExB,IAAAA,aAAY,iBAAkB,EAAA,CAAA;AAAA,GAChC;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apia/dashboard-controller",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"author": "Alexis Leite <alexisleite@live.com>",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"libWatch": "rollup --watch --config ../../config/rollup.common.mjs --environment MODE:development,ENTRY:index.ts,WATCH:true"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@apia/api": "^2.0.
|
|
17
|
-
"@apia/components": "^2.0.
|
|
18
|
-
"@apia/icons": "^2.0.
|
|
19
|
-
"@apia/store": "^2.0.
|
|
20
|
-
"@apia/theme": "^2.0.
|
|
21
|
-
"@apia/util": "^2.0.
|
|
16
|
+
"@apia/api": "^2.0.13",
|
|
17
|
+
"@apia/components": "^2.0.13",
|
|
18
|
+
"@apia/icons": "^2.0.13",
|
|
19
|
+
"@apia/store": "^2.0.13",
|
|
20
|
+
"@apia/theme": "^2.0.13",
|
|
21
|
+
"@apia/util": "^2.0.13",
|
|
22
22
|
"@reduxjs/toolkit": "^1.9.3",
|
|
23
23
|
"react-redux": "^8.0.5"
|
|
24
24
|
},
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"access": "public",
|
|
38
38
|
"registry": "https://registry.npmjs.org/"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "635197e6047ae20594d980393f0e8dc300e641ec"
|
|
41
41
|
}
|