@fusedashlabs/widgets 0.4.4 → 0.5.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.
- package/CHANGELOG.md +23 -0
- package/README.md +24 -3
- package/dist/catalog/engine.d.ts +9 -0
- package/dist/catalog/engine.d.ts.map +1 -0
- package/dist/catalog/engine.js +28 -0
- package/dist/catalog/engine.js.map +1 -0
- package/dist/catalog/evaluate.d.ts +11 -0
- package/dist/catalog/evaluate.d.ts.map +1 -0
- package/dist/catalog/evaluate.js +18 -0
- package/dist/catalog/evaluate.js.map +1 -0
- package/dist/catalog/index.d.ts +8 -0
- package/dist/catalog/index.d.ts.map +1 -0
- package/dist/catalog/index.js +25 -0
- package/dist/catalog/index.js.map +1 -0
- package/dist/catalog/load.d.ts +11 -0
- package/dist/catalog/load.d.ts.map +1 -0
- package/dist/catalog/load.js +140 -0
- package/dist/catalog/load.js.map +1 -0
- package/dist/catalog/schema.d.ts +5 -0
- package/dist/catalog/schema.d.ts.map +1 -0
- package/dist/catalog/schema.js +143 -0
- package/dist/catalog/schema.js.map +1 -0
- package/dist/catalog/types.d.ts +83 -0
- package/dist/catalog/types.d.ts.map +1 -0
- package/dist/catalog/types.js +45 -0
- package/dist/catalog/types.js.map +1 -0
- package/dist/catalog/when.d.ts +13 -0
- package/dist/catalog/when.d.ts.map +1 -0
- package/dist/catalog/when.js +236 -0
- package/dist/catalog/when.js.map +1 -0
- package/dist/components/approval-bar/element/ui9000-approval-bar.d.ts +17 -0
- package/dist/components/approval-bar/element/ui9000-approval-bar.d.ts.map +1 -0
- package/dist/components/approval-bar/element/ui9000-approval-bar.js +83 -0
- package/dist/components/approval-bar/element/ui9000-approval-bar.js.map +1 -0
- package/dist/components/approval-bar/index.d.ts +4 -0
- package/dist/components/approval-bar/index.d.ts.map +1 -0
- package/dist/components/approval-bar/index.js +11 -0
- package/dist/components/approval-bar/index.js.map +1 -0
- package/dist/components/approval-bar/lib/normalize.d.ts +7 -0
- package/dist/components/approval-bar/lib/normalize.d.ts.map +1 -0
- package/dist/components/approval-bar/lib/normalize.js +12 -0
- package/dist/components/approval-bar/lib/normalize.js.map +1 -0
- package/dist/components/approval-bar/metadata.json.d.ts +99 -0
- package/dist/components/approval-bar/metadata.json.js +63 -0
- package/dist/components/approval-bar/metadata.json.js.map +1 -0
- package/dist/components/bar-chart/element/styles.js +3 -3
- package/dist/components/bar-chart/element/styles.js.map +1 -1
- package/dist/components/bar-chart/metadata.json.d.ts +53 -0
- package/dist/components/bar-chart/metadata.json.js +21 -0
- package/dist/components/bar-chart/metadata.json.js.map +1 -1
- package/dist/components/box-plot-chart/element/styles.js +3 -3
- package/dist/components/box-plot-chart/element/styles.js.map +1 -1
- package/dist/components/button/element/ui9000-button.d.ts +15 -0
- package/dist/components/button/element/ui9000-button.d.ts.map +1 -0
- package/dist/components/button/element/ui9000-button.js +56 -0
- package/dist/components/button/element/ui9000-button.js.map +1 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +9 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button/metadata.json.d.ts +99 -0
- package/dist/components/button/metadata.json.js +63 -0
- package/dist/components/button/metadata.json.js.map +1 -0
- package/dist/components/chart-renderer/element/styles.d.ts.map +1 -1
- package/dist/components/chart-renderer/element/styles.js +4 -1
- package/dist/components/chart-renderer/element/styles.js.map +1 -1
- package/dist/components/chart-renderer/element/ui9000-chart-renderer.d.ts.map +1 -1
- package/dist/components/chart-renderer/element/ui9000-chart-renderer.js +12 -0
- package/dist/components/chart-renderer/element/ui9000-chart-renderer.js.map +1 -1
- package/dist/components/chart-renderer/metadata.json.d.ts +7 -1
- package/dist/components/chart-renderer/metadata.json.js +4 -1
- package/dist/components/chart-renderer/metadata.json.js.map +1 -1
- package/dist/components/checkbox/element/ui9000-checkbox.d.ts +16 -0
- package/dist/components/checkbox/element/ui9000-checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/element/ui9000-checkbox.js +71 -0
- package/dist/components/checkbox/element/ui9000-checkbox.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/index.js +9 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/checkbox/metadata.json.d.ts +99 -0
- package/dist/components/checkbox/metadata.json.js +63 -0
- package/dist/components/checkbox/metadata.json.js.map +1 -0
- package/dist/components/custom-widget/element/styles.d.ts +2 -0
- package/dist/components/custom-widget/element/styles.d.ts.map +1 -0
- package/dist/components/custom-widget/element/styles.js +286 -0
- package/dist/components/custom-widget/element/styles.js.map +1 -0
- package/dist/components/custom-widget/element/ui9000-custom-widget.d.ts +47 -0
- package/dist/components/custom-widget/element/ui9000-custom-widget.d.ts.map +1 -0
- package/dist/components/custom-widget/element/ui9000-custom-widget.js +242 -0
- package/dist/components/custom-widget/element/ui9000-custom-widget.js.map +1 -0
- package/dist/components/custom-widget/index.d.ts +4 -0
- package/dist/components/custom-widget/index.d.ts.map +1 -0
- package/dist/components/custom-widget/index.js +19 -0
- package/dist/components/custom-widget/index.js.map +1 -0
- package/dist/components/custom-widget/lib/content.d.ts +2 -0
- package/dist/components/custom-widget/lib/content.d.ts.map +1 -0
- package/dist/components/custom-widget/lib/index.d.ts +8 -0
- package/dist/components/custom-widget/lib/index.d.ts.map +1 -0
- package/dist/components/custom-widget/lib/layout.d.ts +35 -0
- package/dist/components/custom-widget/lib/layout.d.ts.map +1 -0
- package/dist/components/custom-widget/lib/layout.js +13 -0
- package/dist/components/custom-widget/lib/layout.js.map +1 -0
- package/dist/components/custom-widget/lib/markdown.d.ts +2 -0
- package/dist/components/custom-widget/lib/markdown.d.ts.map +1 -0
- package/dist/components/custom-widget/lib/normalize.d.ts +6 -0
- package/dist/components/custom-widget/lib/normalize.d.ts.map +1 -0
- package/dist/components/custom-widget/lib/normalize.js +144 -0
- package/dist/components/custom-widget/lib/normalize.js.map +1 -0
- package/dist/components/custom-widget/lib/table.d.ts +2 -0
- package/dist/components/custom-widget/lib/table.d.ts.map +1 -0
- package/dist/components/custom-widget/lib/types.d.ts +55 -0
- package/dist/components/custom-widget/lib/types.d.ts.map +1 -0
- package/dist/components/custom-widget/metadata.json.d.ts +97 -0
- package/dist/components/custom-widget/metadata.json.js +45 -0
- package/dist/components/custom-widget/metadata.json.js.map +1 -0
- package/dist/components/date-input/element/ui9000-date-input.d.ts +16 -0
- package/dist/components/date-input/element/ui9000-date-input.d.ts.map +1 -0
- package/dist/components/date-input/element/ui9000-date-input.js +71 -0
- package/dist/components/date-input/element/ui9000-date-input.js.map +1 -0
- package/dist/components/date-input/index.d.ts +3 -0
- package/dist/components/date-input/index.d.ts.map +1 -0
- package/dist/components/date-input/index.js +9 -0
- package/dist/components/date-input/index.js.map +1 -0
- package/dist/components/date-input/metadata.json.d.ts +99 -0
- package/dist/components/date-input/metadata.json.js +63 -0
- package/dist/components/date-input/metadata.json.js.map +1 -0
- package/dist/components/entity-detail/element/ui9000-entity-detail.d.ts +17 -0
- package/dist/components/entity-detail/element/ui9000-entity-detail.d.ts.map +1 -0
- package/dist/components/entity-detail/element/ui9000-entity-detail.js +91 -0
- package/dist/components/entity-detail/element/ui9000-entity-detail.js.map +1 -0
- package/dist/components/entity-detail/index.d.ts +4 -0
- package/dist/components/entity-detail/index.d.ts.map +1 -0
- package/dist/components/entity-detail/index.js +11 -0
- package/dist/components/entity-detail/index.js.map +1 -0
- package/dist/components/entity-detail/lib/normalize.d.ts +17 -0
- package/dist/components/entity-detail/lib/normalize.d.ts.map +1 -0
- package/dist/components/entity-detail/lib/normalize.js +34 -0
- package/dist/components/entity-detail/lib/normalize.js.map +1 -0
- package/dist/components/entity-detail/metadata.json.d.ts +110 -0
- package/dist/components/entity-detail/metadata.json.js +63 -0
- package/dist/components/entity-detail/metadata.json.js.map +1 -0
- package/dist/components/event-timeline/element/ui9000-event-timeline.d.ts +17 -0
- package/dist/components/event-timeline/element/ui9000-event-timeline.d.ts.map +1 -0
- package/dist/components/event-timeline/element/ui9000-event-timeline.js +78 -0
- package/dist/components/event-timeline/element/ui9000-event-timeline.js.map +1 -0
- package/dist/components/event-timeline/index.d.ts +4 -0
- package/dist/components/event-timeline/index.d.ts.map +1 -0
- package/dist/components/event-timeline/index.js +11 -0
- package/dist/components/event-timeline/index.js.map +1 -0
- package/dist/components/event-timeline/lib/normalize.d.ts +10 -0
- package/dist/components/event-timeline/lib/normalize.d.ts.map +1 -0
- package/dist/components/event-timeline/lib/normalize.js +25 -0
- package/dist/components/event-timeline/lib/normalize.js.map +1 -0
- package/dist/components/event-timeline/metadata.json.d.ts +124 -0
- package/dist/components/event-timeline/metadata.json.js +63 -0
- package/dist/components/event-timeline/metadata.json.js.map +1 -0
- package/dist/components/evidence-panel/element/ui9000-evidence-panel.d.ts +17 -0
- package/dist/components/evidence-panel/element/ui9000-evidence-panel.d.ts.map +1 -0
- package/dist/components/evidence-panel/element/ui9000-evidence-panel.js +84 -0
- package/dist/components/evidence-panel/element/ui9000-evidence-panel.js.map +1 -0
- package/dist/components/evidence-panel/index.d.ts +4 -0
- package/dist/components/evidence-panel/index.d.ts.map +1 -0
- package/dist/components/evidence-panel/index.js +11 -0
- package/dist/components/evidence-panel/index.js.map +1 -0
- package/dist/components/evidence-panel/lib/normalize.d.ts +19 -0
- package/dist/components/evidence-panel/lib/normalize.d.ts.map +1 -0
- package/dist/components/evidence-panel/lib/normalize.js +33 -0
- package/dist/components/evidence-panel/lib/normalize.js.map +1 -0
- package/dist/components/evidence-panel/metadata.json.d.ts +114 -0
- package/dist/components/evidence-panel/metadata.json.js +63 -0
- package/dist/components/evidence-panel/metadata.json.js.map +1 -0
- package/dist/components/form/element/ui9000-form.d.ts +21 -0
- package/dist/components/form/element/ui9000-form.d.ts.map +1 -0
- package/dist/components/form/element/ui9000-form.js +115 -0
- package/dist/components/form/element/ui9000-form.js.map +1 -0
- package/dist/components/form/index.d.ts +4 -0
- package/dist/components/form/index.d.ts.map +1 -0
- package/dist/components/form/index.js +11 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/form/lib/normalize.d.ts +14 -0
- package/dist/components/form/lib/normalize.d.ts.map +1 -0
- package/dist/components/form/lib/normalize.js +36 -0
- package/dist/components/form/lib/normalize.js.map +1 -0
- package/dist/components/form/metadata.json.d.ts +94 -0
- package/dist/components/form/metadata.json.js +63 -0
- package/dist/components/form/metadata.json.js.map +1 -0
- package/dist/components/histogram-chart/element/styles.js +2 -2
- package/dist/components/histogram-chart/element/styles.js.map +1 -1
- package/dist/components/histogram-chart/metadata.json.d.ts +47 -0
- package/dist/components/histogram-chart/metadata.json.js +21 -0
- package/dist/components/histogram-chart/metadata.json.js.map +1 -1
- package/dist/components/image/element/ui9000-image.d.ts +17 -0
- package/dist/components/image/element/ui9000-image.d.ts.map +1 -0
- package/dist/components/image/element/ui9000-image.js +74 -0
- package/dist/components/image/element/ui9000-image.js.map +1 -0
- package/dist/components/image/index.d.ts +4 -0
- package/dist/components/image/index.d.ts.map +1 -0
- package/dist/components/image/index.js +13 -0
- package/dist/components/image/index.js.map +1 -0
- package/dist/components/image/lib/url.d.ts +14 -0
- package/dist/components/image/lib/url.d.ts.map +1 -0
- package/dist/components/image/lib/url.js +23 -0
- package/dist/components/image/lib/url.js.map +1 -0
- package/dist/components/image/metadata.json.d.ts +95 -0
- package/dist/components/image/metadata.json.js +63 -0
- package/dist/components/image/metadata.json.js.map +1 -0
- package/dist/components/kpi-widget/metadata.json.d.ts +47 -0
- package/dist/components/kpi-widget/metadata.json.js +21 -0
- package/dist/components/kpi-widget/metadata.json.js.map +1 -1
- package/dist/components/line-chart/element/styles.js +2 -2
- package/dist/components/line-chart/element/styles.js.map +1 -1
- package/dist/components/lollipop/element/styles.js +3 -3
- package/dist/components/lollipop/element/styles.js.map +1 -1
- package/dist/components/map-chart/metadata.json.d.ts +54 -2
- package/dist/components/map-chart/metadata.json.js +23 -2
- package/dist/components/map-chart/metadata.json.js.map +1 -1
- package/dist/components/multi-select/element/ui9000-multi-select.d.ts +16 -0
- package/dist/components/multi-select/element/ui9000-multi-select.d.ts.map +1 -0
- package/dist/components/multi-select/element/ui9000-multi-select.js +77 -0
- package/dist/components/multi-select/element/ui9000-multi-select.js.map +1 -0
- package/dist/components/multi-select/index.d.ts +3 -0
- package/dist/components/multi-select/index.d.ts.map +1 -0
- package/dist/components/multi-select/index.js +9 -0
- package/dist/components/multi-select/index.js.map +1 -0
- package/dist/components/multi-select/metadata.json.d.ts +99 -0
- package/dist/components/multi-select/metadata.json.js +63 -0
- package/dist/components/multi-select/metadata.json.js.map +1 -0
- package/dist/components/network-graph/metadata.json.d.ts +53 -2
- package/dist/components/network-graph/metadata.json.js +23 -2
- package/dist/components/network-graph/metadata.json.js.map +1 -1
- package/dist/components/number-input/element/ui9000-number-input.d.ts +16 -0
- package/dist/components/number-input/element/ui9000-number-input.d.ts.map +1 -0
- package/dist/components/number-input/element/ui9000-number-input.js +71 -0
- package/dist/components/number-input/element/ui9000-number-input.js.map +1 -0
- package/dist/components/number-input/index.d.ts +3 -0
- package/dist/components/number-input/index.d.ts.map +1 -0
- package/dist/components/number-input/index.js +9 -0
- package/dist/components/number-input/index.js.map +1 -0
- package/dist/components/number-input/metadata.json.d.ts +99 -0
- package/dist/components/number-input/metadata.json.js +63 -0
- package/dist/components/number-input/metadata.json.js.map +1 -0
- package/dist/components/select/element/ui9000-select.d.ts +16 -0
- package/dist/components/select/element/ui9000-select.d.ts.map +1 -0
- package/dist/components/select/element/ui9000-select.js +73 -0
- package/dist/components/select/element/ui9000-select.js.map +1 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/index.js +9 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/select/metadata.json.d.ts +99 -0
- package/dist/components/select/metadata.json.js +63 -0
- package/dist/components/select/metadata.json.js.map +1 -0
- package/dist/components/step-line-chart/element/styles.js +2 -2
- package/dist/components/step-line-chart/element/styles.js.map +1 -1
- package/dist/components/table/element/styles.d.ts +2 -0
- package/dist/components/table/element/styles.d.ts.map +1 -0
- package/dist/components/table/element/styles.js +105 -0
- package/dist/components/table/element/styles.js.map +1 -0
- package/dist/components/table/element/ui9000-table.d.ts +17 -0
- package/dist/components/table/element/ui9000-table.d.ts.map +1 -0
- package/dist/components/table/element/ui9000-table.js +113 -0
- package/dist/components/table/element/ui9000-table.js.map +1 -0
- package/dist/components/table/index.d.ts +4 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/table/index.js +14 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/table/lib/table.d.ts +55 -0
- package/dist/components/table/lib/table.d.ts.map +1 -0
- package/dist/components/table/lib/table.js +181 -0
- package/dist/components/table/lib/table.js.map +1 -0
- package/dist/components/table/metadata.json.d.ts +88 -0
- package/dist/components/table/metadata.json.js +63 -0
- package/dist/components/table/metadata.json.js.map +1 -0
- package/dist/components/text/element/ui9000-text.d.ts +16 -0
- package/dist/components/text/element/ui9000-text.d.ts.map +1 -0
- package/dist/components/text/element/ui9000-text.js +90 -0
- package/dist/components/text/element/ui9000-text.js.map +1 -0
- package/dist/components/text/index.d.ts +4 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/components/text/index.js +11 -0
- package/dist/components/text/index.js.map +1 -0
- package/dist/components/text/lib/content.d.ts +2 -0
- package/dist/components/text/lib/content.d.ts.map +1 -0
- package/dist/components/text/lib/markdown.d.ts +4 -0
- package/dist/components/text/lib/markdown.d.ts.map +1 -0
- package/dist/components/text/lib/markdown.js +125 -0
- package/dist/components/text/lib/markdown.js.map +1 -0
- package/dist/components/text/metadata.json.d.ts +98 -0
- package/dist/components/text/metadata.json.js +63 -0
- package/dist/components/text/metadata.json.js.map +1 -0
- package/dist/components/text-input/element/ui9000-text-input.d.ts +16 -0
- package/dist/components/text-input/element/ui9000-text-input.d.ts.map +1 -0
- package/dist/components/text-input/element/ui9000-text-input.js +70 -0
- package/dist/components/text-input/element/ui9000-text-input.js.map +1 -0
- package/dist/components/text-input/index.d.ts +3 -0
- package/dist/components/text-input/index.d.ts.map +1 -0
- package/dist/components/text-input/index.js +9 -0
- package/dist/components/text-input/index.js.map +1 -0
- package/dist/components/text-input/metadata.json.d.ts +99 -0
- package/dist/components/text-input/metadata.json.js +63 -0
- package/dist/components/text-input/metadata.json.js.map +1 -0
- package/dist/element/chart-shell-styles.d.ts.map +1 -1
- package/dist/element/chart-shell-styles.js +11 -4
- package/dist/element/chart-shell-styles.js.map +1 -1
- package/dist/element/dispatch-ui9000.d.ts +11 -0
- package/dist/element/dispatch-ui9000.d.ts.map +1 -0
- package/dist/element/dispatch-ui9000.js +21 -0
- package/dist/element/dispatch-ui9000.js.map +1 -0
- package/dist/element/surface-styles.d.ts +2 -0
- package/dist/element/surface-styles.d.ts.map +1 -0
- package/dist/element/surface-styles.js +84 -0
- package/dist/element/surface-styles.js.map +1 -0
- package/dist/element/ui9000-chart-base.d.ts +5 -0
- package/dist/element/ui9000-chart-base.d.ts.map +1 -1
- package/dist/element/ui9000-chart-base.js +7 -1
- package/dist/element/ui9000-chart-base.js.map +1 -1
- package/dist/index.d.ts +20 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +116 -1
- package/dist/index.js.map +1 -1
- package/dist/lazy/approval-bar.d.ts +4 -0
- package/dist/lazy/approval-bar.d.ts.map +1 -0
- package/dist/lazy/approval-bar.js +5 -0
- package/dist/lazy/approval-bar.js.map +1 -0
- package/dist/lazy/button.d.ts +4 -0
- package/dist/lazy/button.d.ts.map +1 -0
- package/dist/lazy/button.js +5 -0
- package/dist/lazy/button.js.map +1 -0
- package/dist/lazy/checkbox.d.ts +4 -0
- package/dist/lazy/checkbox.d.ts.map +1 -0
- package/dist/lazy/checkbox.js +5 -0
- package/dist/lazy/checkbox.js.map +1 -0
- package/dist/lazy/custom-widget.d.ts +4 -0
- package/dist/lazy/custom-widget.d.ts.map +1 -0
- package/dist/lazy/custom-widget.js +5 -0
- package/dist/lazy/custom-widget.js.map +1 -0
- package/dist/lazy/date-input.d.ts +4 -0
- package/dist/lazy/date-input.d.ts.map +1 -0
- package/dist/lazy/date-input.js +5 -0
- package/dist/lazy/date-input.js.map +1 -0
- package/dist/lazy/entity-detail.d.ts +4 -0
- package/dist/lazy/entity-detail.d.ts.map +1 -0
- package/dist/lazy/entity-detail.js +5 -0
- package/dist/lazy/entity-detail.js.map +1 -0
- package/dist/lazy/event-timeline.d.ts +4 -0
- package/dist/lazy/event-timeline.d.ts.map +1 -0
- package/dist/lazy/event-timeline.js +5 -0
- package/dist/lazy/event-timeline.js.map +1 -0
- package/dist/lazy/evidence-panel.d.ts +4 -0
- package/dist/lazy/evidence-panel.d.ts.map +1 -0
- package/dist/lazy/evidence-panel.js +5 -0
- package/dist/lazy/evidence-panel.js.map +1 -0
- package/dist/lazy/form.d.ts +4 -0
- package/dist/lazy/form.d.ts.map +1 -0
- package/dist/lazy/form.js +5 -0
- package/dist/lazy/form.js.map +1 -0
- package/dist/lazy/image.d.ts +4 -0
- package/dist/lazy/image.d.ts.map +1 -0
- package/dist/lazy/image.js +5 -0
- package/dist/lazy/image.js.map +1 -0
- package/dist/lazy/index.d.ts +17 -1
- package/dist/lazy/index.d.ts.map +1 -1
- package/dist/lazy/index.js +128 -0
- package/dist/lazy/index.js.map +1 -1
- package/dist/lazy/multi-select.d.ts +4 -0
- package/dist/lazy/multi-select.d.ts.map +1 -0
- package/dist/lazy/multi-select.js +5 -0
- package/dist/lazy/multi-select.js.map +1 -0
- package/dist/lazy/number-input.d.ts +4 -0
- package/dist/lazy/number-input.d.ts.map +1 -0
- package/dist/lazy/number-input.js +5 -0
- package/dist/lazy/number-input.js.map +1 -0
- package/dist/lazy/select.d.ts +4 -0
- package/dist/lazy/select.d.ts.map +1 -0
- package/dist/lazy/select.js +5 -0
- package/dist/lazy/select.js.map +1 -0
- package/dist/lazy/table.d.ts +4 -0
- package/dist/lazy/table.d.ts.map +1 -0
- package/dist/lazy/table.js +5 -0
- package/dist/lazy/table.js.map +1 -0
- package/dist/lazy/text-input.d.ts +4 -0
- package/dist/lazy/text-input.d.ts.map +1 -0
- package/dist/lazy/text-input.js +5 -0
- package/dist/lazy/text-input.js.map +1 -0
- package/dist/lazy/text.d.ts +4 -0
- package/dist/lazy/text.d.ts.map +1 -0
- package/dist/lazy/text.js +5 -0
- package/dist/lazy/text.js.map +1 -0
- package/dist/lib/labelled-control.d.ts +12 -0
- package/dist/lib/labelled-control.d.ts.map +1 -0
- package/dist/lib/labelled-control.js +14 -0
- package/dist/lib/labelled-control.js.map +1 -0
- package/package.json +134 -1
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { KPI_ROW_HEIGHT, PANE_GAP } from "../lib/layout.js";
|
|
3
|
+
const customWidgetStyles = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
position: relative;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
min-height: 220px;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
border-radius: 8px;
|
|
12
|
+
color: var(--ui9000-color-text, #111827);
|
|
13
|
+
font-family: var(--ui9000-font-family, system-ui, sans-serif);
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.custom-root {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
min-height: inherit;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Nested charts keep plot chrome; the pane is the rounded zone */
|
|
27
|
+
.pane ui9000-chart-renderer {
|
|
28
|
+
min-height: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.kpi-band {
|
|
32
|
+
flex: 0 0 auto;
|
|
33
|
+
height: ${KPI_ROW_HEIGHT}px;
|
|
34
|
+
min-height: ${KPI_ROW_HEIGHT}px;
|
|
35
|
+
max-height: ${KPI_ROW_HEIGHT}px;
|
|
36
|
+
width: 100%;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.custom-content {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex: 1 1 auto;
|
|
43
|
+
min-height: 0;
|
|
44
|
+
min-width: 0;
|
|
45
|
+
width: 100%;
|
|
46
|
+
gap: ${PANE_GAP}px;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.pane {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: stretch;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
min-width: 0;
|
|
56
|
+
min-height: 0;
|
|
57
|
+
flex: 1 1 0;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
--ui9000-host-min-height: 0;
|
|
60
|
+
--ui9000-plot-min-height: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.pane[data-kind='chartWidget'],
|
|
64
|
+
.pane[data-kind='tableWidget'],
|
|
65
|
+
.pane[data-kind='textWidget'],
|
|
66
|
+
.pane[data-kind='imageWidget'] {
|
|
67
|
+
border: 1px solid var(--ui9000-color-border, #e5e7eb);
|
|
68
|
+
border-radius: 8px;
|
|
69
|
+
background: var(--ui9000-color-surface, #fff);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.custom-content[data-direction='vertical'][data-panes='2'] .pane {
|
|
73
|
+
flex: 1 1 50%;
|
|
74
|
+
max-width: 50%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.custom-content[data-direction='horizontal'][data-panes='2'] .pane {
|
|
78
|
+
flex: 1 1 0;
|
|
79
|
+
min-height: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.pane > * {
|
|
83
|
+
display: block;
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
min-width: 0;
|
|
87
|
+
min-height: 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.pane-empty,
|
|
91
|
+
.default-state {
|
|
92
|
+
display: grid;
|
|
93
|
+
place-items: center;
|
|
94
|
+
align-content: center;
|
|
95
|
+
width: 100%;
|
|
96
|
+
height: 100%;
|
|
97
|
+
padding: 1rem;
|
|
98
|
+
text-align: center;
|
|
99
|
+
color: var(--ui9000-color-text-muted, #6b7280);
|
|
100
|
+
font-size: 0.875rem;
|
|
101
|
+
line-height: 1.4;
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.pane-empty strong,
|
|
106
|
+
.default-state strong {
|
|
107
|
+
display: block;
|
|
108
|
+
margin-bottom: 0.25rem;
|
|
109
|
+
color: var(--ui9000-color-text, #111827);
|
|
110
|
+
font-weight: 600;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.default-state span,
|
|
114
|
+
.pane-empty span {
|
|
115
|
+
max-width: 34ch;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.table-root {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
width: 100%;
|
|
122
|
+
height: 100%;
|
|
123
|
+
min-height: 0;
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
box-sizing: border-box;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.table-scroll {
|
|
129
|
+
flex: 1 1 auto;
|
|
130
|
+
min-height: 0;
|
|
131
|
+
width: 100%;
|
|
132
|
+
overflow: auto;
|
|
133
|
+
scrollbar-width: thin;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.table {
|
|
137
|
+
width: 100%;
|
|
138
|
+
/* collapse lets tbody text paint through sticky headers */
|
|
139
|
+
border-collapse: separate;
|
|
140
|
+
border-spacing: 0;
|
|
141
|
+
table-layout: fixed;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.table thead {
|
|
145
|
+
position: sticky;
|
|
146
|
+
top: 0;
|
|
147
|
+
z-index: 2;
|
|
148
|
+
background: var(--ui9000-color-surface, #ffffff);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.table thead th {
|
|
152
|
+
position: sticky;
|
|
153
|
+
top: 0;
|
|
154
|
+
z-index: 2;
|
|
155
|
+
background: var(--ui9000-color-surface, #ffffff);
|
|
156
|
+
background-clip: padding-box;
|
|
157
|
+
color: var(--ui9000-color-text, #111827);
|
|
158
|
+
font-weight: 600;
|
|
159
|
+
font-size: 13px;
|
|
160
|
+
letter-spacing: 0.01em;
|
|
161
|
+
text-transform: capitalize;
|
|
162
|
+
box-shadow: 0 1px 0 var(--ui9000-color-grid, #e5e7eb);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.table th,
|
|
166
|
+
.table td {
|
|
167
|
+
padding: 10px 12px;
|
|
168
|
+
vertical-align: middle;
|
|
169
|
+
overflow: hidden;
|
|
170
|
+
text-overflow: ellipsis;
|
|
171
|
+
white-space: nowrap;
|
|
172
|
+
border-bottom: 1px solid var(--ui9000-color-grid, #e5e7eb);
|
|
173
|
+
color: var(--ui9000-color-text-muted, #6b7280);
|
|
174
|
+
font-size: 14px;
|
|
175
|
+
font-weight: 400;
|
|
176
|
+
line-height: 20px;
|
|
177
|
+
text-align: left;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.table tbody tr:last-child td {
|
|
181
|
+
border-bottom: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.table-badge {
|
|
185
|
+
display: inline-block;
|
|
186
|
+
padding: 2px 8px;
|
|
187
|
+
border-radius: 999px;
|
|
188
|
+
font-size: 12px;
|
|
189
|
+
font-weight: 600;
|
|
190
|
+
line-height: 16px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.table-badge[data-type='success'] {
|
|
194
|
+
color: #0f7b4a;
|
|
195
|
+
background: #d9f5e7;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.table-badge[data-type='error'] {
|
|
199
|
+
color: #b42318;
|
|
200
|
+
background: #fde8e6;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.text-pane {
|
|
204
|
+
width: 100%;
|
|
205
|
+
height: 100%;
|
|
206
|
+
min-height: 0;
|
|
207
|
+
overflow: auto;
|
|
208
|
+
padding: 8px;
|
|
209
|
+
box-sizing: border-box;
|
|
210
|
+
font-size: 14px;
|
|
211
|
+
font-weight: 400;
|
|
212
|
+
line-height: 20px;
|
|
213
|
+
color: var(--ui9000-color-text, #111827);
|
|
214
|
+
text-align: left;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.text-pane .md p {
|
|
218
|
+
margin: 0 0 10px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.text-pane .md h1,
|
|
222
|
+
.text-pane .md h2,
|
|
223
|
+
.text-pane .md h3 {
|
|
224
|
+
margin: 0 0 8px;
|
|
225
|
+
font-weight: 600;
|
|
226
|
+
color: var(--ui9000-color-text, #111827);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.text-pane .md h1 {
|
|
230
|
+
font-size: 1.25rem;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.text-pane .md h2 {
|
|
234
|
+
font-size: 1.1rem;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.text-pane .md h3 {
|
|
238
|
+
font-size: 1rem;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.text-pane .md ul,
|
|
242
|
+
.text-pane .md ol {
|
|
243
|
+
margin: 0 0 10px;
|
|
244
|
+
padding-left: 16px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.text-pane .md li {
|
|
248
|
+
margin: 1px 0;
|
|
249
|
+
padding-bottom: 5px;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.text-pane .md code {
|
|
253
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
254
|
+
font-size: 0.9em;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.text-pane .md pre {
|
|
258
|
+
margin: 0 0 10px;
|
|
259
|
+
padding: 8px;
|
|
260
|
+
overflow: auto;
|
|
261
|
+
background: var(--ui9000-color-background, #f3f4f6);
|
|
262
|
+
border-radius: 6px;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.text-pane .md a {
|
|
266
|
+
color: var(--ui9000-color-primary, #473dd9);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.image-pane {
|
|
270
|
+
display: flex;
|
|
271
|
+
width: 100%;
|
|
272
|
+
height: 100%;
|
|
273
|
+
border-radius: 6px;
|
|
274
|
+
overflow: hidden;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.image-pane img {
|
|
278
|
+
width: 100%;
|
|
279
|
+
height: 100%;
|
|
280
|
+
object-fit: cover;
|
|
281
|
+
}
|
|
282
|
+
`;
|
|
283
|
+
export {
|
|
284
|
+
customWidgetStyles
|
|
285
|
+
};
|
|
286
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/custom-widget/element/styles.ts"],"sourcesContent":["import { css } from 'lit';\n\nimport { KPI_ROW_HEIGHT, PANE_GAP } from '../lib/layout.js';\n\nexport const customWidgetStyles = css`\n :host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n min-height: 220px;\n overflow: hidden;\n border-radius: 8px;\n color: var(--ui9000-color-text, #111827);\n font-family: var(--ui9000-font-family, system-ui, sans-serif);\n box-sizing: border-box;\n }\n\n .custom-root {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: inherit;\n overflow: hidden;\n }\n\n /* Nested charts keep plot chrome; the pane is the rounded zone */\n .pane ui9000-chart-renderer {\n min-height: 0;\n }\n\n .kpi-band {\n flex: 0 0 auto;\n height: ${KPI_ROW_HEIGHT}px;\n min-height: ${KPI_ROW_HEIGHT}px;\n max-height: ${KPI_ROW_HEIGHT}px;\n width: 100%;\n overflow: hidden;\n }\n\n .custom-content {\n display: flex;\n flex: 1 1 auto;\n min-height: 0;\n min-width: 0;\n width: 100%;\n gap: ${PANE_GAP}px;\n overflow: hidden;\n box-sizing: border-box;\n }\n\n .pane {\n display: flex;\n align-items: stretch;\n justify-content: center;\n min-width: 0;\n min-height: 0;\n flex: 1 1 0;\n overflow: hidden;\n --ui9000-host-min-height: 0;\n --ui9000-plot-min-height: 0;\n }\n\n .pane[data-kind='chartWidget'],\n .pane[data-kind='tableWidget'],\n .pane[data-kind='textWidget'],\n .pane[data-kind='imageWidget'] {\n border: 1px solid var(--ui9000-color-border, #e5e7eb);\n border-radius: 8px;\n background: var(--ui9000-color-surface, #fff);\n }\n\n .custom-content[data-direction='vertical'][data-panes='2'] .pane {\n flex: 1 1 50%;\n max-width: 50%;\n }\n\n .custom-content[data-direction='horizontal'][data-panes='2'] .pane {\n flex: 1 1 0;\n min-height: 0;\n }\n\n .pane > * {\n display: block;\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n }\n\n .pane-empty,\n .default-state {\n display: grid;\n place-items: center;\n align-content: center;\n width: 100%;\n height: 100%;\n padding: 1rem;\n text-align: center;\n color: var(--ui9000-color-text-muted, #6b7280);\n font-size: 0.875rem;\n line-height: 1.4;\n box-sizing: border-box;\n }\n\n .pane-empty strong,\n .default-state strong {\n display: block;\n margin-bottom: 0.25rem;\n color: var(--ui9000-color-text, #111827);\n font-weight: 600;\n }\n\n .default-state span,\n .pane-empty span {\n max-width: 34ch;\n }\n\n .table-root {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n box-sizing: border-box;\n }\n\n .table-scroll {\n flex: 1 1 auto;\n min-height: 0;\n width: 100%;\n overflow: auto;\n scrollbar-width: thin;\n }\n\n .table {\n width: 100%;\n /* collapse lets tbody text paint through sticky headers */\n border-collapse: separate;\n border-spacing: 0;\n table-layout: fixed;\n }\n\n .table thead {\n position: sticky;\n top: 0;\n z-index: 2;\n background: var(--ui9000-color-surface, #ffffff);\n }\n\n .table thead th {\n position: sticky;\n top: 0;\n z-index: 2;\n background: var(--ui9000-color-surface, #ffffff);\n background-clip: padding-box;\n color: var(--ui9000-color-text, #111827);\n font-weight: 600;\n font-size: 13px;\n letter-spacing: 0.01em;\n text-transform: capitalize;\n box-shadow: 0 1px 0 var(--ui9000-color-grid, #e5e7eb);\n }\n\n .table th,\n .table td {\n padding: 10px 12px;\n vertical-align: middle;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-bottom: 1px solid var(--ui9000-color-grid, #e5e7eb);\n color: var(--ui9000-color-text-muted, #6b7280);\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n text-align: left;\n }\n\n .table tbody tr:last-child td {\n border-bottom: none;\n }\n\n .table-badge {\n display: inline-block;\n padding: 2px 8px;\n border-radius: 999px;\n font-size: 12px;\n font-weight: 600;\n line-height: 16px;\n }\n\n .table-badge[data-type='success'] {\n color: #0f7b4a;\n background: #d9f5e7;\n }\n\n .table-badge[data-type='error'] {\n color: #b42318;\n background: #fde8e6;\n }\n\n .text-pane {\n width: 100%;\n height: 100%;\n min-height: 0;\n overflow: auto;\n padding: 8px;\n box-sizing: border-box;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--ui9000-color-text, #111827);\n text-align: left;\n }\n\n .text-pane .md p {\n margin: 0 0 10px;\n }\n\n .text-pane .md h1,\n .text-pane .md h2,\n .text-pane .md h3 {\n margin: 0 0 8px;\n font-weight: 600;\n color: var(--ui9000-color-text, #111827);\n }\n\n .text-pane .md h1 {\n font-size: 1.25rem;\n }\n\n .text-pane .md h2 {\n font-size: 1.1rem;\n }\n\n .text-pane .md h3 {\n font-size: 1rem;\n }\n\n .text-pane .md ul,\n .text-pane .md ol {\n margin: 0 0 10px;\n padding-left: 16px;\n }\n\n .text-pane .md li {\n margin: 1px 0;\n padding-bottom: 5px;\n }\n\n .text-pane .md code {\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 0.9em;\n }\n\n .text-pane .md pre {\n margin: 0 0 10px;\n padding: 8px;\n overflow: auto;\n background: var(--ui9000-color-background, #f3f4f6);\n border-radius: 6px;\n }\n\n .text-pane .md a {\n color: var(--ui9000-color-primary, #473dd9);\n }\n\n .image-pane {\n display: flex;\n width: 100%;\n height: 100%;\n border-radius: 6px;\n overflow: hidden;\n }\n\n .image-pane img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n`;\n"],"names":[],"mappings":";;AAIO,MAAM,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cA8BpB,cAAc;AAAA,kBACV,cAAc;AAAA,kBACd,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAWrB,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
import { Ui9000ChartElement } from '../../../element/ui9000-chart-base.js';
|
|
3
|
+
import { WidgetScale } from '../../../types/index.js';
|
|
4
|
+
import { ArrangingDirection } from '../lib/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* FuseDash CustomWidget shell: title, optional KPI band, and up to two arranged
|
|
7
|
+
* panes. Chart panes mount `ui9000-chart-renderer`, the KPI band mounts
|
|
8
|
+
* `ui9000-kpi-widget`; table / text / image panes mount those primitives.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Ui9000CustomWidget extends Ui9000ChartElement {
|
|
11
|
+
static styles: import('lit').CSSResult[];
|
|
12
|
+
scale: WidgetScale;
|
|
13
|
+
/** Overrides `arranging.direction` from the payload */
|
|
14
|
+
direction: ArrangingDirection | '';
|
|
15
|
+
showGrid: boolean;
|
|
16
|
+
showLegend: boolean;
|
|
17
|
+
showTooltip: boolean;
|
|
18
|
+
private _model;
|
|
19
|
+
connectedCallback(): void;
|
|
20
|
+
willUpdate(changed: PropertyValues): void;
|
|
21
|
+
/** Register the child elements this model actually uses. */
|
|
22
|
+
private loadPaneElements;
|
|
23
|
+
private get resolvedDirection();
|
|
24
|
+
/** chart-renderer reads absent as "unset", so forward an explicit value */
|
|
25
|
+
private flag;
|
|
26
|
+
/**
|
|
27
|
+
* Inner FuseDash chartType for the chart pane. Must be forwarded as
|
|
28
|
+
* `chart-type` so the renderer does not treat `isCustom` as customWidget.
|
|
29
|
+
*/
|
|
30
|
+
private paneChartType;
|
|
31
|
+
/** KPI cards only — omit widget `name` so the band does not repeat the shell title */
|
|
32
|
+
private kpiDataJson;
|
|
33
|
+
private renderEmpty;
|
|
34
|
+
private renderTable;
|
|
35
|
+
private renderText;
|
|
36
|
+
private renderImage;
|
|
37
|
+
private renderPane;
|
|
38
|
+
private renderKpiBand;
|
|
39
|
+
render(): TemplateResult<1>;
|
|
40
|
+
}
|
|
41
|
+
export declare function registerCustomWidget(): void;
|
|
42
|
+
declare global {
|
|
43
|
+
interface HTMLElementTagNameMap {
|
|
44
|
+
'ui9000-custom-widget': Ui9000CustomWidget;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=ui9000-custom-widget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui9000-custom-widget.d.ts","sourceRoot":"","sources":["../../../../src/components/custom-widget/element/ui9000-custom-widget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAI9E,OAAO,EAAoB,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE7F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,iBAAiB,CAAC;AA0BzB;;;;GAIG;AACH,qBACa,kBAAmB,SAAQ,kBAAkB;IACxD,OAAgB,MAAM,4BAA0C;IAGhE,KAAK,EAAE,WAAW,CAAa;IAE/B,uDAAuD;IAEvD,SAAS,EAAE,kBAAkB,GAAG,EAAE,CAAM;IAGxC,QAAQ,UAAQ;IAGhB,UAAU,UAAQ;IAGlB,WAAW,UAAQ;IAGnB,OAAO,CAAC,MAAM,CAAkC;IAEvC,iBAAiB,IAAI,IAAI;IAMzB,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAOlD,4DAA4D;YAC9C,gBAAgB;IAkB9B,OAAO,KAAK,iBAAiB,GAI5B;IAED,2EAA2E;IAC3E,OAAO,CAAC,IAAI;IAIZ;;;OAGG;IACH,OAAO,CAAC,aAAa;IAKrB,sFAAsF;IACtF,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,UAAU;IAiClB,OAAO,CAAC,aAAa;IAYZ,MAAM;CAyBhB;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAI3C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,sBAAsB,EAAE,kBAAkB,CAAC;KAC5C;CACF"}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { html, nothing } from "lit";
|
|
2
|
+
import { property, state, customElement } from "lit/decorators.js";
|
|
3
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
4
|
+
import { Ui9000ChartElement } from "../../../element/ui9000-chart-base.js";
|
|
5
|
+
import { loadChart } from "../../../lazy/index.js";
|
|
6
|
+
import { parseJsonAttr } from "../../../utils/chart-helpers.js";
|
|
7
|
+
import { customWidgetStyles } from "./styles.js";
|
|
8
|
+
import { normalizeCustomWidget } from "../lib/normalize.js";
|
|
9
|
+
import { paneFlexDirection } from "../lib/layout.js";
|
|
10
|
+
import { chartShellStyles } from "../../../element/chart-shell-styles.js";
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
14
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
15
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
16
|
+
if (decorator = decorators[i])
|
|
17
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
18
|
+
if (kind && result) __defProp(target, key, result);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
const flagConverter = {
|
|
22
|
+
fromAttribute: (value) => value !== null && value !== "false",
|
|
23
|
+
toAttribute: (value) => value ? "" : "false"
|
|
24
|
+
};
|
|
25
|
+
const EMPTY_MODEL = {
|
|
26
|
+
title: "",
|
|
27
|
+
direction: "vertical",
|
|
28
|
+
hasKpi: false,
|
|
29
|
+
panes: [],
|
|
30
|
+
widget: null,
|
|
31
|
+
isEmpty: true
|
|
32
|
+
};
|
|
33
|
+
const DEFAULT_STATE_TITLE = "Choose an Option";
|
|
34
|
+
const DEFAULT_STATE_SUBTITLE = "We recommend starting with a chart, then enhancing your widget with lists, tables, or descriptions.";
|
|
35
|
+
let Ui9000CustomWidget = class extends Ui9000ChartElement {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(...arguments);
|
|
38
|
+
this.scale = "default";
|
|
39
|
+
this.direction = "";
|
|
40
|
+
this.showGrid = true;
|
|
41
|
+
this.showLegend = true;
|
|
42
|
+
this.showTooltip = true;
|
|
43
|
+
this._model = EMPTY_MODEL;
|
|
44
|
+
}
|
|
45
|
+
connectedCallback() {
|
|
46
|
+
super.connectedCallback();
|
|
47
|
+
this._model = normalizeCustomWidget(parseJsonAttr(this.dataJson, null));
|
|
48
|
+
void this.loadPaneElements();
|
|
49
|
+
}
|
|
50
|
+
willUpdate(changed) {
|
|
51
|
+
if (changed.has("dataJson")) {
|
|
52
|
+
this._model = normalizeCustomWidget(parseJsonAttr(this.dataJson, null));
|
|
53
|
+
void this.loadPaneElements();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** Register the child elements this model actually uses. */
|
|
57
|
+
async loadPaneElements() {
|
|
58
|
+
const pending = [];
|
|
59
|
+
if (this._model.hasKpi) pending.push(loadChart("kpi-widget"));
|
|
60
|
+
if (this._model.panes.some((pane) => pane.kind === "chartWidget" && pane.renderable)) {
|
|
61
|
+
pending.push(loadChart("chart-renderer"));
|
|
62
|
+
}
|
|
63
|
+
if (this._model.panes.some((pane) => pane.kind === "tableWidget" && pane.renderable)) {
|
|
64
|
+
pending.push(loadChart("table"));
|
|
65
|
+
}
|
|
66
|
+
if (this._model.panes.some((pane) => pane.kind === "textWidget" && pane.renderable)) {
|
|
67
|
+
pending.push(loadChart("text"));
|
|
68
|
+
}
|
|
69
|
+
if (this._model.panes.some((pane) => pane.kind === "imageWidget" && pane.renderable)) {
|
|
70
|
+
pending.push(loadChart("image"));
|
|
71
|
+
}
|
|
72
|
+
await Promise.all(pending);
|
|
73
|
+
}
|
|
74
|
+
get resolvedDirection() {
|
|
75
|
+
return this.direction === "horizontal" || this.direction === "vertical" ? this.direction : this._model.direction;
|
|
76
|
+
}
|
|
77
|
+
/** chart-renderer reads absent as "unset", so forward an explicit value */
|
|
78
|
+
flag(value) {
|
|
79
|
+
return value ? "" : "false";
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Inner FuseDash chartType for the chart pane. Must be forwarded as
|
|
83
|
+
* `chart-type` so the renderer does not treat `isCustom` as customWidget.
|
|
84
|
+
*/
|
|
85
|
+
paneChartType() {
|
|
86
|
+
var _a;
|
|
87
|
+
const chartType = (_a = this._model.widget) == null ? void 0 : _a.chartType;
|
|
88
|
+
return typeof chartType === "string" ? chartType.trim() : "";
|
|
89
|
+
}
|
|
90
|
+
/** KPI cards only — omit widget `name` so the band does not repeat the shell title */
|
|
91
|
+
kpiDataJson() {
|
|
92
|
+
var _a;
|
|
93
|
+
const kpis = (_a = this._model.widget) == null ? void 0 : _a.kpis;
|
|
94
|
+
return JSON.stringify(Array.isArray(kpis) ? kpis : []);
|
|
95
|
+
}
|
|
96
|
+
renderEmpty(title, subtitle, className) {
|
|
97
|
+
return html`
|
|
98
|
+
<div class=${className}>
|
|
99
|
+
<div>
|
|
100
|
+
<strong>${title}</strong>
|
|
101
|
+
<span>${subtitle}</span>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
`;
|
|
105
|
+
}
|
|
106
|
+
renderTable(pane) {
|
|
107
|
+
const table = pane.table;
|
|
108
|
+
if (!table) {
|
|
109
|
+
return this.renderEmpty(pane.emptyTitle, pane.emptySubtitle, "pane-empty");
|
|
110
|
+
}
|
|
111
|
+
return html`
|
|
112
|
+
<div class="pane" data-kind=${pane.kind}>
|
|
113
|
+
<ui9000-table data=${JSON.stringify(table)}></ui9000-table>
|
|
114
|
+
</div>
|
|
115
|
+
`;
|
|
116
|
+
}
|
|
117
|
+
renderText(pane) {
|
|
118
|
+
if (!pane.text) {
|
|
119
|
+
return html`
|
|
120
|
+
<div class="pane" data-kind=${pane.kind}>
|
|
121
|
+
${this.renderEmpty(pane.emptyTitle, pane.emptySubtitle, "pane-empty")}
|
|
122
|
+
</div>
|
|
123
|
+
`;
|
|
124
|
+
}
|
|
125
|
+
return html`
|
|
126
|
+
<div class="pane" data-kind=${pane.kind}>
|
|
127
|
+
<ui9000-text data=${JSON.stringify({ text: pane.text })}></ui9000-text>
|
|
128
|
+
</div>
|
|
129
|
+
`;
|
|
130
|
+
}
|
|
131
|
+
renderImage(pane) {
|
|
132
|
+
if (!pane.image) {
|
|
133
|
+
return html`
|
|
134
|
+
<div class="pane" data-kind=${pane.kind}>
|
|
135
|
+
${this.renderEmpty(pane.emptyTitle, pane.emptySubtitle, "pane-empty")}
|
|
136
|
+
</div>
|
|
137
|
+
`;
|
|
138
|
+
}
|
|
139
|
+
return html`
|
|
140
|
+
<div class="pane" data-kind=${pane.kind}>
|
|
141
|
+
<ui9000-image data=${JSON.stringify({ src: pane.image.src, alt: pane.image.alt })}></ui9000-image>
|
|
142
|
+
</div>
|
|
143
|
+
`;
|
|
144
|
+
}
|
|
145
|
+
renderPane(pane) {
|
|
146
|
+
if (pane.kind === "tableWidget") {
|
|
147
|
+
return pane.renderable ? this.renderTable(pane) : html`
|
|
148
|
+
<div class="pane" data-kind=${pane.kind}>
|
|
149
|
+
${this.renderEmpty(pane.emptyTitle, pane.emptySubtitle, "pane-empty")}
|
|
150
|
+
</div>
|
|
151
|
+
`;
|
|
152
|
+
}
|
|
153
|
+
if (pane.kind === "textWidget") return this.renderText(pane);
|
|
154
|
+
if (pane.kind === "imageWidget") return this.renderImage(pane);
|
|
155
|
+
if (!pane.renderable) {
|
|
156
|
+
return html`
|
|
157
|
+
<div class="pane" data-kind=${pane.kind}>
|
|
158
|
+
${this.renderEmpty(pane.emptyTitle, pane.emptySubtitle, "pane-empty")}
|
|
159
|
+
</div>
|
|
160
|
+
`;
|
|
161
|
+
}
|
|
162
|
+
return html`
|
|
163
|
+
<div class="pane" data-kind=${pane.kind}>
|
|
164
|
+
<ui9000-chart-renderer
|
|
165
|
+
embedded
|
|
166
|
+
data=${this.dataJson}
|
|
167
|
+
chart-type=${this.paneChartType()}
|
|
168
|
+
scale=${this.scale}
|
|
169
|
+
show-header="false"
|
|
170
|
+
show-grid=${this.flag(this.showGrid)}
|
|
171
|
+
show-legend=${this.flag(this.showLegend)}
|
|
172
|
+
show-tooltip=${this.flag(this.showTooltip)}
|
|
173
|
+
></ui9000-chart-renderer>
|
|
174
|
+
</div>
|
|
175
|
+
`;
|
|
176
|
+
}
|
|
177
|
+
renderKpiBand() {
|
|
178
|
+
return html`
|
|
179
|
+
<div class="kpi-band">
|
|
180
|
+
<ui9000-kpi-widget
|
|
181
|
+
data=${this.kpiDataJson()}
|
|
182
|
+
scale=${this.scale}
|
|
183
|
+
show-header="false"
|
|
184
|
+
></ui9000-kpi-widget>
|
|
185
|
+
</div>
|
|
186
|
+
`;
|
|
187
|
+
}
|
|
188
|
+
render() {
|
|
189
|
+
const model = this._model;
|
|
190
|
+
const title = this.headerTitle();
|
|
191
|
+
return html`
|
|
192
|
+
<div class="widget-shell custom-root" part="shell">
|
|
193
|
+
${this.renderShellHeader(title)} ${model.hasKpi ? this.renderKpiBand() : nothing}
|
|
194
|
+
${model.isEmpty ? this.renderEmpty(DEFAULT_STATE_TITLE, DEFAULT_STATE_SUBTITLE, "default-state") : html`
|
|
195
|
+
<div
|
|
196
|
+
class="custom-content"
|
|
197
|
+
data-direction=${this.resolvedDirection}
|
|
198
|
+
data-panes=${model.panes.length}
|
|
199
|
+
style=${styleMap({
|
|
200
|
+
flexDirection: paneFlexDirection(this.resolvedDirection)
|
|
201
|
+
})}
|
|
202
|
+
>
|
|
203
|
+
${model.panes.map((pane) => this.renderPane(pane))}
|
|
204
|
+
</div>
|
|
205
|
+
`}
|
|
206
|
+
${this.renderShellLabelTooltip()}
|
|
207
|
+
</div>
|
|
208
|
+
`;
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
Ui9000CustomWidget.styles = [customWidgetStyles, chartShellStyles];
|
|
212
|
+
__decorateClass([
|
|
213
|
+
property({ type: String, attribute: "scale" })
|
|
214
|
+
], Ui9000CustomWidget.prototype, "scale", 2);
|
|
215
|
+
__decorateClass([
|
|
216
|
+
property({ type: String, attribute: "direction" })
|
|
217
|
+
], Ui9000CustomWidget.prototype, "direction", 2);
|
|
218
|
+
__decorateClass([
|
|
219
|
+
property({ converter: flagConverter, attribute: "show-grid" })
|
|
220
|
+
], Ui9000CustomWidget.prototype, "showGrid", 2);
|
|
221
|
+
__decorateClass([
|
|
222
|
+
property({ converter: flagConverter, attribute: "show-legend" })
|
|
223
|
+
], Ui9000CustomWidget.prototype, "showLegend", 2);
|
|
224
|
+
__decorateClass([
|
|
225
|
+
property({ converter: flagConverter, attribute: "show-tooltip" })
|
|
226
|
+
], Ui9000CustomWidget.prototype, "showTooltip", 2);
|
|
227
|
+
__decorateClass([
|
|
228
|
+
state()
|
|
229
|
+
], Ui9000CustomWidget.prototype, "_model", 2);
|
|
230
|
+
Ui9000CustomWidget = __decorateClass([
|
|
231
|
+
customElement("ui9000-custom-widget")
|
|
232
|
+
], Ui9000CustomWidget);
|
|
233
|
+
function registerCustomWidget() {
|
|
234
|
+
if (!customElements.get("ui9000-custom-widget")) {
|
|
235
|
+
customElements.define("ui9000-custom-widget", Ui9000CustomWidget);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
export {
|
|
239
|
+
Ui9000CustomWidget,
|
|
240
|
+
registerCustomWidget
|
|
241
|
+
};
|
|
242
|
+
//# sourceMappingURL=ui9000-custom-widget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui9000-custom-widget.js","sources":["../../../../src/components/custom-widget/element/ui9000-custom-widget.ts"],"sourcesContent":["import { html, nothing, type PropertyValues, type TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { styleMap } from 'lit/directives/style-map.js';\n\nimport { chartShellStyles, Ui9000ChartElement } from '../../../element/ui9000-chart-base.js';\nimport { loadChart } from '../../../lazy/index.js';\nimport type { WidgetScale } from '../../../types/index.js';\nimport { parseJsonAttr } from '../../../utils/chart-helpers.js';\nimport {\n normalizeCustomWidget,\n paneFlexDirection,\n type ArrangingDirection,\n type CustomPane,\n type CustomWidgetModel,\n} from '../lib/index.js';\nimport { customWidgetStyles } from './styles.js';\n\n/**\n * `show-*` flags default to on; `show-x=\"false\"` turns them off. Matches how\n * `ui9000-chart-renderer` reads the same attributes.\n */\nconst flagConverter = {\n fromAttribute: (value: string | null): boolean => value !== null && value !== 'false',\n toAttribute: (value: boolean): string => (value ? '' : 'false'),\n};\n\nconst EMPTY_MODEL: CustomWidgetModel = {\n title: '',\n direction: 'vertical',\n hasKpi: false,\n panes: [],\n widget: null,\n isEmpty: true,\n};\n\n/** Client `WidgetDefaultState` copy, minus the editor-only toolbar */\nconst DEFAULT_STATE_TITLE = 'Choose an Option';\nconst DEFAULT_STATE_SUBTITLE =\n 'We recommend starting with a chart, then enhancing your widget with lists, tables, or descriptions.';\n\n/**\n * FuseDash CustomWidget shell: title, optional KPI band, and up to two arranged\n * panes. Chart panes mount `ui9000-chart-renderer`, the KPI band mounts\n * `ui9000-kpi-widget`; table / text / image panes mount those primitives.\n */\n@customElement('ui9000-custom-widget')\nexport class Ui9000CustomWidget extends Ui9000ChartElement {\n static override styles = [customWidgetStyles, chartShellStyles];\n\n @property({ type: String, attribute: 'scale' })\n scale: WidgetScale = 'default';\n\n /** Overrides `arranging.direction` from the payload */\n @property({ type: String, attribute: 'direction' })\n direction: ArrangingDirection | '' = '';\n\n @property({ converter: flagConverter, attribute: 'show-grid' })\n showGrid = true;\n\n @property({ converter: flagConverter, attribute: 'show-legend' })\n showLegend = true;\n\n @property({ converter: flagConverter, attribute: 'show-tooltip' })\n showTooltip = true;\n\n @state()\n private _model: CustomWidgetModel = EMPTY_MODEL;\n\n override connectedCallback(): void {\n super.connectedCallback();\n this._model = normalizeCustomWidget(parseJsonAttr<unknown>(this.dataJson, null));\n void this.loadPaneElements();\n }\n\n override willUpdate(changed: PropertyValues): void {\n if (changed.has('dataJson')) {\n this._model = normalizeCustomWidget(parseJsonAttr<unknown>(this.dataJson, null));\n void this.loadPaneElements();\n }\n }\n\n /** Register the child elements this model actually uses. */\n private async loadPaneElements(): Promise<void> {\n const pending: Promise<unknown>[] = [];\n if (this._model.hasKpi) pending.push(loadChart('kpi-widget'));\n if (this._model.panes.some((pane) => pane.kind === 'chartWidget' && pane.renderable)) {\n pending.push(loadChart('chart-renderer'));\n }\n if (this._model.panes.some((pane) => pane.kind === 'tableWidget' && pane.renderable)) {\n pending.push(loadChart('table'));\n }\n if (this._model.panes.some((pane) => pane.kind === 'textWidget' && pane.renderable)) {\n pending.push(loadChart('text'));\n }\n if (this._model.panes.some((pane) => pane.kind === 'imageWidget' && pane.renderable)) {\n pending.push(loadChart('image'));\n }\n await Promise.all(pending);\n }\n\n private get resolvedDirection(): ArrangingDirection {\n return this.direction === 'horizontal' || this.direction === 'vertical'\n ? this.direction\n : this._model.direction;\n }\n\n /** chart-renderer reads absent as \"unset\", so forward an explicit value */\n private flag(value: boolean): string {\n return value ? '' : 'false';\n }\n\n /**\n * Inner FuseDash chartType for the chart pane. Must be forwarded as\n * `chart-type` so the renderer does not treat `isCustom` as customWidget.\n */\n private paneChartType(): string {\n const chartType = this._model.widget?.chartType;\n return typeof chartType === 'string' ? chartType.trim() : '';\n }\n\n /** KPI cards only — omit widget `name` so the band does not repeat the shell title */\n private kpiDataJson(): string {\n const kpis = this._model.widget?.kpis;\n return JSON.stringify(Array.isArray(kpis) ? kpis : []);\n }\n\n private renderEmpty(title: string, subtitle: string, className: string): TemplateResult {\n return html`\n <div class=${className}>\n <div>\n <strong>${title}</strong>\n <span>${subtitle}</span>\n </div>\n </div>\n `;\n }\n\n private renderTable(pane: CustomPane): TemplateResult {\n const table = pane.table;\n if (!table) {\n return this.renderEmpty(pane.emptyTitle, pane.emptySubtitle, 'pane-empty');\n }\n return html`\n <div class=\"pane\" data-kind=${pane.kind}>\n <ui9000-table data=${JSON.stringify(table)}></ui9000-table>\n </div>\n `;\n }\n\n private renderText(pane: CustomPane): TemplateResult {\n if (!pane.text) {\n return html`\n <div class=\"pane\" data-kind=${pane.kind}>\n ${this.renderEmpty(pane.emptyTitle, pane.emptySubtitle, 'pane-empty')}\n </div>\n `;\n }\n return html`\n <div class=\"pane\" data-kind=${pane.kind}>\n <ui9000-text data=${JSON.stringify({ text: pane.text })}></ui9000-text>\n </div>\n `;\n }\n\n private renderImage(pane: CustomPane): TemplateResult {\n if (!pane.image) {\n return html`\n <div class=\"pane\" data-kind=${pane.kind}>\n ${this.renderEmpty(pane.emptyTitle, pane.emptySubtitle, 'pane-empty')}\n </div>\n `;\n }\n return html`\n <div class=\"pane\" data-kind=${pane.kind}>\n <ui9000-image data=${JSON.stringify({ src: pane.image.src, alt: pane.image.alt })}></ui9000-image>\n </div>\n `;\n }\n\n private renderPane(pane: CustomPane): TemplateResult {\n if (pane.kind === 'tableWidget') {\n return pane.renderable ? this.renderTable(pane) : html`\n <div class=\"pane\" data-kind=${pane.kind}>\n ${this.renderEmpty(pane.emptyTitle, pane.emptySubtitle, 'pane-empty')}\n </div>\n `;\n }\n if (pane.kind === 'textWidget') return this.renderText(pane);\n if (pane.kind === 'imageWidget') return this.renderImage(pane);\n if (!pane.renderable) {\n return html`\n <div class=\"pane\" data-kind=${pane.kind}>\n ${this.renderEmpty(pane.emptyTitle, pane.emptySubtitle, 'pane-empty')}\n </div>\n `;\n }\n return html`\n <div class=\"pane\" data-kind=${pane.kind}>\n <ui9000-chart-renderer\n embedded\n data=${this.dataJson}\n chart-type=${this.paneChartType()}\n scale=${this.scale}\n show-header=\"false\"\n show-grid=${this.flag(this.showGrid)}\n show-legend=${this.flag(this.showLegend)}\n show-tooltip=${this.flag(this.showTooltip)}\n ></ui9000-chart-renderer>\n </div>\n `;\n }\n\n private renderKpiBand(): TemplateResult {\n return html`\n <div class=\"kpi-band\">\n <ui9000-kpi-widget\n data=${this.kpiDataJson()}\n scale=${this.scale}\n show-header=\"false\"\n ></ui9000-kpi-widget>\n </div>\n `;\n }\n\n override render() {\n const model = this._model;\n const title = this.headerTitle();\n\n return html`\n <div class=\"widget-shell custom-root\" part=\"shell\">\n ${this.renderShellHeader(title)} ${model.hasKpi ? this.renderKpiBand() : nothing}\n ${model.isEmpty\n ? this.renderEmpty(DEFAULT_STATE_TITLE, DEFAULT_STATE_SUBTITLE, 'default-state')\n : html`\n <div\n class=\"custom-content\"\n data-direction=${this.resolvedDirection}\n data-panes=${model.panes.length}\n style=${styleMap({\n flexDirection: paneFlexDirection(this.resolvedDirection),\n })}\n >\n ${model.panes.map((pane) => this.renderPane(pane))}\n </div>\n `}\n ${this.renderShellLabelTooltip()}\n </div>\n `;\n }\n}\n\nexport function registerCustomWidget(): void {\n if (!customElements.get('ui9000-custom-widget')) {\n customElements.define('ui9000-custom-widget', Ui9000CustomWidget);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ui9000-custom-widget': Ui9000CustomWidget;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,gBAAgB;AAAA,EACpB,eAAe,CAAC,UAAkC,UAAU,QAAQ,UAAU;AAAA,EAC9E,aAAa,CAAC,UAA4B,QAAQ,KAAK;AACzD;AAEA,MAAM,cAAiC;AAAA,EACrC,OAAO;AAAA,EACP,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,OAAO,CAAA;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AACX;AAGA,MAAM,sBAAsB;AAC5B,MAAM,yBACJ;AAQK,IAAM,qBAAN,cAAiC,mBAAmB;AAAA,EAApD,cAAA;AAAA,UAAA,GAAA,SAAA;AAIL,SAAA,QAAqB;AAIrB,SAAA,YAAqC;AAGrC,SAAA,WAAW;AAGX,SAAA,aAAa;AAGb,SAAA,cAAc;AAGd,SAAQ,SAA4B;AAAA,EAAA;AAAA,EAE3B,oBAA0B;AACjC,UAAM,kBAAA;AACN,SAAK,SAAS,sBAAsB,cAAuB,KAAK,UAAU,IAAI,CAAC;AAC/E,SAAK,KAAK,iBAAA;AAAA,EACZ;AAAA,EAES,WAAW,SAA+B;AACjD,QAAI,QAAQ,IAAI,UAAU,GAAG;AAC3B,WAAK,SAAS,sBAAsB,cAAuB,KAAK,UAAU,IAAI,CAAC;AAC/E,WAAK,KAAK,iBAAA;AAAA,IACZ;AAAA,EACF;AAAA;AAAA,EAGA,MAAc,mBAAkC;AAC9C,UAAM,UAA8B,CAAA;AACpC,QAAI,KAAK,OAAO,gBAAgB,KAAK,UAAU,YAAY,CAAC;AAC5D,QAAI,KAAK,OAAO,MAAM,KAAK,CAAC,SAAS,KAAK,SAAS,iBAAiB,KAAK,UAAU,GAAG;AACpF,cAAQ,KAAK,UAAU,gBAAgB,CAAC;AAAA,IAC1C;AACA,QAAI,KAAK,OAAO,MAAM,KAAK,CAAC,SAAS,KAAK,SAAS,iBAAiB,KAAK,UAAU,GAAG;AACpF,cAAQ,KAAK,UAAU,OAAO,CAAC;AAAA,IACjC;AACA,QAAI,KAAK,OAAO,MAAM,KAAK,CAAC,SAAS,KAAK,SAAS,gBAAgB,KAAK,UAAU,GAAG;AACnF,cAAQ,KAAK,UAAU,MAAM,CAAC;AAAA,IAChC;AACA,QAAI,KAAK,OAAO,MAAM,KAAK,CAAC,SAAS,KAAK,SAAS,iBAAiB,KAAK,UAAU,GAAG;AACpF,cAAQ,KAAK,UAAU,OAAO,CAAC;AAAA,IACjC;AACA,UAAM,QAAQ,IAAI,OAAO;AAAA,EAC3B;AAAA,EAEA,IAAY,oBAAwC;AAClD,WAAO,KAAK,cAAc,gBAAgB,KAAK,cAAc,aACzD,KAAK,YACL,KAAK,OAAO;AAAA,EAClB;AAAA;AAAA,EAGQ,KAAK,OAAwB;AACnC,WAAO,QAAQ,KAAK;AAAA,EACtB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMQ,gBAAwB;;AAC9B,UAAM,aAAY,UAAK,OAAO,WAAZ,mBAAoB;AACtC,WAAO,OAAO,cAAc,WAAW,UAAU,SAAS;AAAA,EAC5D;AAAA;AAAA,EAGQ,cAAsB;;AAC5B,UAAM,QAAO,UAAK,OAAO,WAAZ,mBAAoB;AACjC,WAAO,KAAK,UAAU,MAAM,QAAQ,IAAI,IAAI,OAAO,EAAE;AAAA,EACvD;AAAA,EAEQ,YAAY,OAAe,UAAkB,WAAmC;AACtF,WAAO;AAAA,mBACQ,SAAS;AAAA;AAAA,oBAER,KAAK;AAAA,kBACP,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIxB;AAAA,EAEQ,YAAY,MAAkC;AACpD,UAAM,QAAQ,KAAK;AACnB,QAAI,CAAC,OAAO;AACV,aAAO,KAAK,YAAY,KAAK,YAAY,KAAK,eAAe,YAAY;AAAA,IAC3E;AACA,WAAO;AAAA,oCACyB,KAAK,IAAI;AAAA,6BAChB,KAAK,UAAU,KAAK,CAAC;AAAA;AAAA;AAAA,EAGhD;AAAA,EAEQ,WAAW,MAAkC;AACnD,QAAI,CAAC,KAAK,MAAM;AACd,aAAO;AAAA,sCACyB,KAAK,IAAI;AAAA,YACnC,KAAK,YAAY,KAAK,YAAY,KAAK,eAAe,YAAY,CAAC;AAAA;AAAA;AAAA,IAG3E;AACA,WAAO;AAAA,oCACyB,KAAK,IAAI;AAAA,4BACjB,KAAK,UAAU,EAAE,MAAM,KAAK,KAAA,CAAM,CAAC;AAAA;AAAA;AAAA,EAG7D;AAAA,EAEQ,YAAY,MAAkC;AACpD,QAAI,CAAC,KAAK,OAAO;AACf,aAAO;AAAA,sCACyB,KAAK,IAAI;AAAA,YACnC,KAAK,YAAY,KAAK,YAAY,KAAK,eAAe,YAAY,CAAC;AAAA;AAAA;AAAA,IAG3E;AACA,WAAO;AAAA,oCACyB,KAAK,IAAI;AAAA,6BAChB,KAAK,UAAU,EAAE,KAAK,KAAK,MAAM,KAAK,KAAK,KAAK,MAAM,IAAA,CAAK,CAAC;AAAA;AAAA;AAAA,EAGvF;AAAA,EAEQ,WAAW,MAAkC;AACnD,QAAI,KAAK,SAAS,eAAe;AAC/B,aAAO,KAAK,aAAa,KAAK,YAAY,IAAI,IAAI;AAAA,sCAClB,KAAK,IAAI;AAAA,YACnC,KAAK,YAAY,KAAK,YAAY,KAAK,eAAe,YAAY,CAAC;AAAA;AAAA;AAAA,IAG3E;AACA,QAAI,KAAK,SAAS,aAAc,QAAO,KAAK,WAAW,IAAI;AAC3D,QAAI,KAAK,SAAS,cAAe,QAAO,KAAK,YAAY,IAAI;AAC7D,QAAI,CAAC,KAAK,YAAY;AACpB,aAAO;AAAA,sCACyB,KAAK,IAAI;AAAA,YACnC,KAAK,YAAY,KAAK,YAAY,KAAK,eAAe,YAAY,CAAC;AAAA;AAAA;AAAA,IAG3E;AACA,WAAO;AAAA,oCACyB,KAAK,IAAI;AAAA;AAAA;AAAA,iBAG5B,KAAK,QAAQ;AAAA,uBACP,KAAK,eAAe;AAAA,kBACzB,KAAK,KAAK;AAAA;AAAA,sBAEN,KAAK,KAAK,KAAK,QAAQ,CAAC;AAAA,wBACtB,KAAK,KAAK,KAAK,UAAU,CAAC;AAAA,yBACzB,KAAK,KAAK,KAAK,WAAW,CAAC;AAAA;AAAA;AAAA;AAAA,EAIlD;AAAA,EAEQ,gBAAgC;AACtC,WAAO;AAAA;AAAA;AAAA,iBAGM,KAAK,aAAa;AAAA,kBACjB,KAAK,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EAK1B;AAAA,EAES,SAAS;AAChB,UAAM,QAAQ,KAAK;AACnB,UAAM,QAAQ,KAAK,YAAA;AAEnB,WAAO;AAAA;AAAA,UAED,KAAK,kBAAkB,KAAK,CAAC,IAAI,MAAM,SAAS,KAAK,cAAA,IAAkB,OAAO;AAAA,UAC9E,MAAM,UACJ,KAAK,YAAY,qBAAqB,wBAAwB,eAAe,IAC7E;AAAA;AAAA;AAAA,iCAGqB,KAAK,iBAAiB;AAAA,6BAC1B,MAAM,MAAM,MAAM;AAAA,wBACvB,SAAS;AAAA,MACf,eAAe,kBAAkB,KAAK,iBAAiB;AAAA,IAAA,CACxD,CAAC;AAAA;AAAA,kBAEA,MAAM,MAAM,IAAI,CAAC,SAAS,KAAK,WAAW,IAAI,CAAC,CAAC;AAAA;AAAA,aAErD;AAAA,UACH,KAAK,yBAAyB;AAAA;AAAA;AAAA,EAGtC;AACF;AA3Ma,mBACK,SAAS,CAAC,oBAAoB,gBAAgB;AAG9D,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,SAAS;AAAA,GAHnC,mBAIX,WAAA,SAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,aAAa;AAAA,GAPvC,mBAQX,WAAA,aAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,WAAW,eAAe,WAAW,aAAa;AAAA,GAVnD,mBAWX,WAAA,YAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,WAAW,eAAe,WAAW,eAAe;AAAA,GAbrD,mBAcX,WAAA,cAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,WAAW,eAAe,WAAW,gBAAgB;AAAA,GAhBtD,mBAiBX,WAAA,eAAA,CAAA;AAGQ,gBAAA;AAAA,EADP,MAAA;AAAM,GAnBI,mBAoBH,WAAA,UAAA,CAAA;AApBG,qBAAN,gBAAA;AAAA,EADN,cAAc,sBAAsB;AAAA,GACxB,kBAAA;AA6MN,SAAS,uBAA6B;AAC3C,MAAI,CAAC,eAAe,IAAI,sBAAsB,GAAG;AAC/C,mBAAe,OAAO,wBAAwB,kBAAkB;AAAA,EAClE;AACF;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Ui9000CustomWidget, registerCustomWidget } from './element/ui9000-custom-widget.js';
|
|
2
|
+
export { isContentChartType, normalizeCustomWidget, normalizeTableModel, paneFlexDirection, KPI_ROW_HEIGHT, MAX_PANES, PANE_GAP, type ArrangingDirection, type CustomPane, type CustomPaneKind, type CustomTableModel, type CustomWidgetArranging, type CustomWidgetModel, type CustomWidgetPayload, } from './lib/index.js';
|
|
3
|
+
export { default as customWidgetMetadata } from './metadata.json';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/custom-widget/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,QAAQ,EACR,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { registerCustomWidget } from "./element/ui9000-custom-widget.js";
|
|
2
|
+
import { Ui9000CustomWidget } from "./element/ui9000-custom-widget.js";
|
|
3
|
+
import { default as default2 } from "./metadata.json.js";
|
|
4
|
+
import { KPI_ROW_HEIGHT, MAX_PANES, PANE_GAP, paneFlexDirection } from "./lib/layout.js";
|
|
5
|
+
import { isContentChartType, normalizeCustomWidget } from "./lib/normalize.js";
|
|
6
|
+
import { normalizeTableModel } from "../table/lib/table.js";
|
|
7
|
+
export {
|
|
8
|
+
KPI_ROW_HEIGHT,
|
|
9
|
+
MAX_PANES,
|
|
10
|
+
PANE_GAP,
|
|
11
|
+
Ui9000CustomWidget,
|
|
12
|
+
default2 as customWidgetMetadata,
|
|
13
|
+
isContentChartType,
|
|
14
|
+
normalizeCustomWidget,
|
|
15
|
+
normalizeTableModel,
|
|
16
|
+
paneFlexDirection,
|
|
17
|
+
registerCustomWidget
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/components/custom-widget/lib/content.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { KPI_ROW_HEIGHT, MAX_PANES, PANE_GAP, paneFlexDirection, panesFromSlots, limitSelectedPanes, isPaneSlotDisabled, PANE_SLOT_KEYS, type CustomWidgetPaneSlot, type CustomWidgetSlots, } from './layout.js';
|
|
2
|
+
export { isContentChartType, normalizeCustomWidget } from './normalize.js';
|
|
3
|
+
export { renderMarkdown } from './markdown.js';
|
|
4
|
+
export { buildLiveTableRowsFromSources, formatTableCell, normalizeTableModel, parseTableHeaders, } from './table.js';
|
|
5
|
+
export { normalizeImageContent, normalizeTextContent } from './content.js';
|
|
6
|
+
export type { ArrangingDirection, CustomPane, CustomPaneKind, CustomWidgetArranging, CustomWidgetModel, CustomWidgetPayload, } from './types.js';
|
|
7
|
+
export type { CustomTableModel, TableCellModel, TableColumnSource, TableHeader } from './table.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|