@contributte/datagrid 0.0.0-20250625-7fda2aa → 0.0.0-20250630-e270140
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/assets/ajax/naja.ts
CHANGED
|
@@ -15,8 +15,7 @@ import type {
|
|
|
15
15
|
SuccessEventDetail as BaseSuccessEventDetail,
|
|
16
16
|
} from "../types";
|
|
17
17
|
import { Datagrid } from "../datagrid";
|
|
18
|
-
import { BeforeEvent, ErrorEvent, Payload as NajaPayload, SuccessEvent } from "naja
|
|
19
|
-
import { InteractionEvent } from "naja/dist/core/UIHandler";
|
|
18
|
+
import { BeforeEvent, ErrorEvent, Payload as NajaPayload, SuccessEvent, InteractionEvent } from "naja";
|
|
20
19
|
|
|
21
20
|
export interface BaseRequestParams extends AjaxBaseRequestParams, Request {
|
|
22
21
|
url: string;
|
|
@@ -14,17 +14,16 @@ export class TomSelect implements Selectpicker {
|
|
|
14
14
|
const Select = this.select ?? window()?.TomSelect ?? null;
|
|
15
15
|
|
|
16
16
|
if (Select) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
continue;
|
|
17
|
+
elements.forEach(element => {
|
|
18
|
+
if(element.hasAttribute('data-Tom-Initialised')){
|
|
19
|
+
return;
|
|
21
20
|
}
|
|
21
|
+
element.setAttribute('data-Tom-Initialised','true');
|
|
22
22
|
|
|
23
23
|
new Select(
|
|
24
24
|
element as TomInput,
|
|
25
|
-
typeof this.opts === "function" ? this.opts(element) : this.opts
|
|
26
|
-
|
|
27
|
-
}
|
|
25
|
+
typeof this.opts === "function" ? this.opts(element) : this.opts)
|
|
26
|
+
})
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
}
|
|
@@ -15,12 +15,22 @@ export class TreeViewPlugin implements DatagridPlugin {
|
|
|
15
15
|
if (childrenBlock.classList.contains('showed')) {
|
|
16
16
|
childrenBlock.innerHTML = '';
|
|
17
17
|
childrenBlock.classList.remove('showed');
|
|
18
|
-
rowBlock
|
|
18
|
+
if (rowBlock) {
|
|
19
|
+
const chevron = rowBlock.querySelector<HTMLAnchorElement>(`a.chevron`);
|
|
20
|
+
if (chevron) {
|
|
21
|
+
chevron.style.transform = "rotate(0deg)";
|
|
22
|
+
}
|
|
23
|
+
}
|
|
19
24
|
return;
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
childrenBlock.classList.add('showed');
|
|
23
|
-
rowBlock
|
|
28
|
+
if (rowBlock) {
|
|
29
|
+
const chevron = rowBlock.querySelector<HTMLAnchorElement>(`a.chevron`);
|
|
30
|
+
if (chevron) {
|
|
31
|
+
chevron.style.transform = "rotate(90deg)";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
24
34
|
const snippets = payload.snippets;
|
|
25
35
|
for (const snippetName in snippets) {
|
|
26
36
|
const snippet = snippets[snippetName];
|