@pulzr/perses-figure-panel 0.2.1 → 0.3.0

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 (50) hide show
  1. package/README.md +21 -0
  2. package/__mf/js/{PulzrFigurePanel.577b888ef4.js → PulzrFigurePanel.b29c14b507.js} +2 -2
  3. package/__mf/js/async/{0.325dac5c70.js → 0.ee9b9a050d.js} +2 -2
  4. package/__mf/js/async/{0p.68da90f323.js → 0p.810fbfea5e.js} +2 -2
  5. package/__mf/js/async/{2.18619a1037.js → 2.e0e77c51ac.js} +2 -2
  6. package/__mf/js/async/{6.02956de769.js → 6.1033156971.js} +1 -1
  7. package/__mf/js/async/{9.952436a6ee.js → 9.f20ad249a8.js} +1 -1
  8. package/__mf/js/async/__federation_expose_PulzrFigurePanel.9472172973.js +1 -0
  9. package/__mf/js/async/{f.daba8eec81.js → f.9b147c6255.js} +2 -2
  10. package/__mf/js/async/k.39678d65e5.js +1 -0
  11. package/__mf/js/async/kk.62383e2b13.js +1 -0
  12. package/__mf/js/async/kx.899711f01e.js +83 -0
  13. package/__mf/js/async/kx.899711f01e.js.LICENSE.txt +55 -0
  14. package/__mf/js/async/mt.918f7f9b24.js +92 -0
  15. package/__mf/js/async/{b.5f50cdb328.js.LICENSE.txt → mt.918f7f9b24.js.LICENSE.txt} +0 -25
  16. package/__mf/js/async/{o.0d1a3636bd.js → o.ec154e6ff6.js} +1 -1
  17. package/__mf/js/async/{os.7ddd6e9621.js → os.e5e40daae1.js} +2 -2
  18. package/__mf/js/async/{p.3fb8172ba3.js → p.4a73008e86.js} +2 -2
  19. package/__mf/js/async/{s.f71e79b6e1.js → s.658d6a4164.js} +1 -1
  20. package/__mf/js/{main.d9b3dd4bc6.js → main.386bdfecce.js} +2 -2
  21. package/lib/panels/pulzr-figure-panel/PulzrFigurePanelComponent.d.ts +4 -1
  22. package/lib/panels/pulzr-figure-panel/PulzrFigurePanelComponent.d.ts.map +1 -1
  23. package/lib/panels/pulzr-figure-panel/PulzrFigurePanelComponent.js +499 -101
  24. package/lib/panels/pulzr-figure-panel/PulzrFigurePanelComponent.js.map +1 -1
  25. package/lib/panels/pulzr-figure-panel/PulzrFigurePanelSettingsEditor.d.ts.map +1 -1
  26. package/lib/panels/pulzr-figure-panel/PulzrFigurePanelSettingsEditor.js +128 -51
  27. package/lib/panels/pulzr-figure-panel/PulzrFigurePanelSettingsEditor.js.map +1 -1
  28. package/lib/panels/pulzr-figure-panel/figure.d.ts +25 -6
  29. package/lib/panels/pulzr-figure-panel/figure.d.ts.map +1 -1
  30. package/lib/panels/pulzr-figure-panel/figure.js +43 -11
  31. package/lib/panels/pulzr-figure-panel/figure.js.map +1 -1
  32. package/lib/panels/pulzr-figure-panel/pulzr-figure-panel-types.d.ts +22 -2
  33. package/lib/panels/pulzr-figure-panel/pulzr-figure-panel-types.d.ts.map +1 -1
  34. package/lib/panels/pulzr-figure-panel/pulzr-figure-panel-types.js.map +1 -1
  35. package/mf-manifest.json +19 -19
  36. package/mf-stats.json +19 -19
  37. package/package.json +1 -1
  38. package/__mf/js/async/5.9d2ef52231.js +0 -83
  39. package/__mf/js/async/5.9d2ef52231.js.LICENSE.txt +0 -30
  40. package/__mf/js/async/__federation_expose_PulzrFigurePanel.e4e9ee3624.js +0 -1
  41. package/__mf/js/async/b.5f50cdb328.js +0 -92
  42. package/__mf/js/async/k.7c4213442a.js +0 -1
  43. package/__mf/js/async/kk.c246b3edb4.js +0 -1
  44. /package/__mf/css/async/{b.7481ca0159.css → mt.7481ca0159.css} +0 -0
  45. /package/__mf/js/async/{0.325dac5c70.js.LICENSE.txt → 0.ee9b9a050d.js.LICENSE.txt} +0 -0
  46. /package/__mf/js/async/{0p.68da90f323.js.LICENSE.txt → 0p.810fbfea5e.js.LICENSE.txt} +0 -0
  47. /package/__mf/js/async/{2.18619a1037.js.LICENSE.txt → 2.e0e77c51ac.js.LICENSE.txt} +0 -0
  48. /package/__mf/js/async/{f.daba8eec81.js.LICENSE.txt → f.9b147c6255.js.LICENSE.txt} +0 -0
  49. /package/__mf/js/async/{os.7ddd6e9621.js.LICENSE.txt → os.e5e40daae1.js.LICENSE.txt} +0 -0
  50. /package/__mf/js/async/{p.3fb8172ba3.js.LICENSE.txt → p.4a73008e86.js.LICENSE.txt} +0 -0
package/README.md CHANGED
@@ -22,8 +22,29 @@ spec:
22
22
  - `timeInParts` says a time as people do, `6h 46m` rather than `6.8h`, when `format` is in seconds, minutes or hours.
23
23
  - `subtitle` is a line under the title and `detail` a small box under the figure, each filled from the query's series: `{{name}}` is that series' value, `{{name|%}}` the value as a percent. `of {{booked_space_hours}} booked hours, occupied`.
24
24
  - `changeStyle: size` reads the change as its size, `↑ 35.8% vs previous period`: whole past 100%, `0%` within a twentieth of one, colored by good or bad news. The default, `signed`, is `↑ +0.7% vs last week`, flat within half a percent.
25
+ - `changeStyle: badge` puts the change small beside the figure, `↗ 133%`, sized as `size` and colored by good or bad news, with no compared label; the figure is bold, as on the console's Overview cards. `caption` shows under it when there is nothing to compare with.
26
+ - `sparkline: {series, color}` draws an area under the figure, 32px high, of every value over time of the series named (any query of the panel, for example one by day); `color` is the figure's unless set.
27
+ - `rows` lists figures under the figure, each a line: `label` on the left, on the right the last value of the series named `series`, formatted by its `format` (and `timeInParts`), and its change as a badge against that series' twin, `<series> · previous period` or `<series> · last year`, when there is one (`lowerIsBetter` per row). `suffix` puts words after the value: `1.8 / space / day`.
28
+ - The figure is the first series that is neither the sparkline's nor a row's, and its period before is its own twin by name (`<figure> · previous period`), so one query can ask for several measures compared.
25
29
  - `of: {series, label}` shows a rate as a count of a total beside it, `1690/2639 Spaces Occupied`: the total is the last value of the series named `series`, which the same query asks for (for example `measures: [peak_rate, spaces]`).
26
30
 
31
+ A pillar, as the Overview has them:
32
+
33
+ ```yaml
34
+ spec:
35
+ plugin:
36
+ kind: PulzrFigurePanel
37
+ spec:
38
+ format: { unit: percent-decimal, decimalPlaces: 1 }
39
+ color: '#10b981'
40
+ changeStyle: badge
41
+ sparkline: { series: Occupancy by day }
42
+ rows:
43
+ - { label: Sessions, series: Sessions, format: { unit: decimal, decimalPlaces: 0 } }
44
+ - { label: Typical stay, series: Typical stay, format: { unit: minutes }, timeInParts: true }
45
+ - { label: Turnover, series: Turnover, format: { unit: decimal, decimalPlaces: 1 } }
46
+ ```
47
+
27
48
  ## Install
28
49
 
29
50
  Put the archive (`PulzrFigurePanel-<version>.tar.gz`, from the releases) in a folder listed in the Perses server's `plugin.archive_paths`, or `npm install @pulzr/perses-figure-panel` to embed it.