@hotstaq/admin-panel 0.2.4 → 0.2.6

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.
Files changed (46) hide show
  1. package/.vscode/launch.json +0 -1
  2. package/assets/html/admin-header.hott +25 -0
  3. package/build/src/AppAPI.d.ts.map +1 -1
  4. package/build/src/AppAPI.js +48 -1
  5. package/build/src/AppAPI.js.map +1 -1
  6. package/build/src/cli.js +2 -2
  7. package/build/src/cli.js.map +1 -1
  8. package/build/src/components/admin-button.d.ts +1 -1
  9. package/build/src/components/admin-button.d.ts.map +1 -1
  10. package/build/src/components/admin-button.js +1 -5
  11. package/build/src/components/admin-button.js.map +1 -1
  12. package/build/src/components/admin-dashboard.d.ts +2 -2
  13. package/build/src/components/admin-dashboard.d.ts.map +1 -1
  14. package/build/src/components/admin-dashboard.js +5 -50
  15. package/build/src/components/admin-dashboard.js.map +1 -1
  16. package/build/src/components/admin-edit.d.ts +2 -5
  17. package/build/src/components/admin-edit.d.ts.map +1 -1
  18. package/build/src/components/admin-edit.js +12 -16
  19. package/build/src/components/admin-edit.js.map +1 -1
  20. package/build/src/components/admin-table-field.d.ts +3 -6
  21. package/build/src/components/admin-table-field.d.ts.map +1 -1
  22. package/build/src/components/admin-table-field.js +9 -54
  23. package/build/src/components/admin-table-field.js.map +1 -1
  24. package/build/src/components/admin-table-row.d.ts +3 -6
  25. package/build/src/components/admin-table-row.d.ts.map +1 -1
  26. package/build/src/components/admin-table-row.js +15 -61
  27. package/build/src/components/admin-table-row.js.map +1 -1
  28. package/build/src/components/admin-table.d.ts +3 -3
  29. package/build/src/components/admin-table.d.ts.map +1 -1
  30. package/build/src/components/admin-table.js +11 -20
  31. package/build/src/components/admin-table.js.map +1 -1
  32. package/build/src/components/admin-text.d.ts +3 -3
  33. package/build/src/components/admin-text.d.ts.map +1 -1
  34. package/build/src/components/admin-text.js +13 -60
  35. package/build/src/components/admin-text.js.map +1 -1
  36. package/build-web/AdminPanelComponents.js +2 -2
  37. package/package.json +4 -4
  38. package/src/AppAPI.ts +55 -2
  39. package/src/cli.ts +2 -2
  40. package/src/components/admin-button.ts +2 -2
  41. package/src/components/admin-dashboard.ts +4 -3
  42. package/src/components/admin-edit.ts +4 -4
  43. package/src/components/admin-table-field.ts +6 -5
  44. package/src/components/admin-table-row.ts +6 -5
  45. package/src/components/admin-table.ts +6 -5
  46. package/src/components/admin-text.ts +5 -4
@@ -1,4 +1,4 @@
1
- import { HotStaq, Hot, HotAPI, HotComponent } from "hotstaq";
1
+ import { HotStaq, Hot, HotAPI, HotComponent, HotComponentOutput } from "hotstaq";
2
2
  import { AdminTableField } from "./admin-table-field";
3
3
 
4
4
  export class AdminTable extends HotComponent
@@ -128,22 +128,23 @@ export class AdminTable extends HotComponent
128
128
  /**
129
129
  * Get the list of data from the server.
130
130
  */
131
- // @ts-ignore
132
- async onPostPlace (parentHtmlElement: HTMLElement, htmlElement: HTMLElement): Promise<HTMLElement>
131
+ onPostPlace (parentHtmlElement: HTMLElement, htmlElement: HTMLElement): HTMLElement
133
132
  {
134
133
  setTimeout (async () =>
135
134
  {
136
135
  await this.refreshList ();
137
136
  }, 50);
137
+
138
+ return (null);
138
139
  }
139
140
 
140
- async output ()
141
+ output (): string | HotComponentOutput[]
141
142
  {
142
143
  return (`
143
144
  <div id = "${this.htmlElements[0].id}">
144
145
  <h2>${this.title}</h2>
145
146
  <div class="table-responsive">
146
- <table class="table table-striped table-sm">
147
+ <table id = "${this.htmlElements[0].id}Table" class="table table-striped table-sm">
147
148
  <thead hot-place-here = "header">
148
149
  </thead>
149
150
  <tbody hot-place-here = "results">
@@ -1,4 +1,4 @@
1
- import { HotStaq, Hot, HotAPI, HotComponent } from "hotstaq";
1
+ import { HotStaq, Hot, HotAPI, HotComponent, HotComponentOutput } from "hotstaq";
2
2
 
3
3
  export class AdminText extends HotComponent
4
4
  {
@@ -18,8 +18,7 @@ export class AdminText extends HotComponent
18
18
  /**
19
19
  * Corrects the placement of the text elements for modals.
20
20
  */
21
- // @ts-ignore
22
- async onPostPlace (parentHtmlElement: HTMLElement, htmlElement: HTMLElement): Promise<HTMLElement>
21
+ onPostPlace (parentHtmlElement: HTMLElement, htmlElement: HTMLElement): HTMLElement
23
22
  {
24
23
  let placeHereArray = parentHtmlElement.querySelectorAll (`hot-place-here[type="modal"]`);
25
24
 
@@ -32,9 +31,11 @@ export class AdminText extends HotComponent
32
31
  // @ts-ignore
33
32
  parentHtmlElement.hotComponent.fieldElements[this.field] = htmlElement.querySelector ("input");
34
33
  }
34
+
35
+ return (null);
35
36
  }
36
37
 
37
- async output ()
38
+ output (): string | HotComponentOutput[]
38
39
  {
39
40
  let value: string = "";
40
41