@gravitee/ui-components 3.25.3-typescript-8a53edf → 3.25.3-typescript-e7256ca
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/package.json +3 -4
- package/src/atoms/gv-autocomplete.d.ts +104 -0
- package/src/atoms/gv-autocomplete.js +1 -461
- package/src/atoms/gv-button.d.ts +109 -0
- package/src/atoms/gv-button.js +1 -410
- package/src/atoms/gv-checkbox.d.ts +114 -0
- package/src/atoms/gv-checkbox.js +1 -187
- package/src/atoms/gv-date-picker-calendar.d.ts +190 -0
- package/src/atoms/gv-date-picker-calendar.js +1 -894
- package/src/atoms/gv-date-picker-cell.d.ts +80 -0
- package/src/atoms/gv-date-picker-cell.js +1 -190
- package/src/atoms/gv-date-picker.d.ts +194 -0
- package/src/atoms/gv-date-picker.js +1 -671
- package/src/atoms/gv-file-upload.d.ts +64 -0
- package/src/atoms/gv-file-upload.js +1 -367
- package/src/atoms/gv-icon.d.ts +26 -0
- package/src/atoms/gv-icon.js +1 -103
- package/src/atoms/gv-image.d.ts +45 -0
- package/src/atoms/gv-image.js +1 -144
- package/src/atoms/gv-input-message.d.ts +20 -0
- package/src/atoms/gv-input-message.js +1 -84
- package/src/atoms/gv-input.d.ts +246 -0
- package/src/atoms/gv-input.js +1 -561
- package/src/atoms/gv-link.d.ts +67 -0
- package/src/atoms/gv-link.js +1 -210
- package/src/atoms/gv-message.d.ts +23 -0
- package/src/atoms/gv-message.js +1 -128
- package/src/atoms/gv-metric.d.ts +32 -0
- package/src/atoms/gv-metric.js +1 -117
- package/src/atoms/gv-relative-time.d.ts +45 -0
- package/src/atoms/gv-relative-time.js +1 -156
- package/src/atoms/gv-select-native.d.ts +174 -0
- package/src/atoms/gv-select-native.js +1 -388
- package/src/atoms/gv-select.d.ts +71 -0
- package/src/atoms/gv-select.js +1 -437
- package/src/atoms/gv-spinner.d.ts +10 -0
- package/src/atoms/gv-spinner.js +1 -57
- package/src/atoms/gv-state.d.ts +50 -0
- package/src/atoms/gv-state.js +1 -130
- package/src/atoms/gv-switch.d.ts +60 -0
- package/src/atoms/gv-switch.js +1 -243
- package/src/atoms/gv-tag.d.ts +69 -0
- package/src/atoms/gv-tag.js +1 -168
- package/src/atoms/gv-text.d.ts +110 -0
- package/src/atoms/gv-text.js +1 -168
- package/src/charts/gv-chart-bar.d.ts +50 -0
- package/src/charts/gv-chart-bar.js +1 -103
- package/src/charts/gv-chart-gauge.d.ts +58 -0
- package/src/charts/gv-chart-gauge.js +1 -100
- package/src/charts/gv-chart-histogram.d.ts +48 -0
- package/src/charts/gv-chart-histogram.js +1 -83
- package/src/charts/gv-chart-line.d.ts +52 -0
- package/src/charts/gv-chart-line.js +1 -224
- package/src/charts/gv-chart-map.d.ts +50 -0
- package/src/charts/gv-chart-map.js +1 -112
- package/src/charts/gv-chart-pie.d.ts +50 -0
- package/src/charts/gv-chart-pie.js +1 -91
- package/src/index.d.ts +77 -0
- package/src/index.js +1 -77
- package/src/lib/cron-expression.d.ts +1 -0
- package/src/lib/cron-expression.js +1 -205
- package/src/lib/date.d.ts +1 -0
- package/src/lib/date.js +1 -44
- package/src/lib/events.d.ts +1 -0
- package/src/lib/events.js +1 -26
- package/src/lib/http-client-schema-form.d.ts +68 -0
- package/src/lib/http-client-schema-form.js +1 -67
- package/src/lib/http.d.ts +222 -0
- package/src/lib/http.js +1 -237
- package/src/lib/i18n.d.ts +30 -0
- package/src/lib/i18n.js +1 -103
- package/src/lib/item.d.ts +12 -0
- package/src/lib/item.js +1 -118
- package/src/lib/properties.d.ts +42 -0
- package/src/lib/properties.js +1 -189
- package/src/lib/schema-form.d.ts +5 -0
- package/src/lib/schema-form.js +1 -44
- package/src/lib/studio.d.ts +2 -0
- package/src/lib/studio.js +1 -141
- package/src/lib/style.d.ts +6 -0
- package/src/lib/style.js +1 -41
- package/src/lib/text-format.d.ts +6 -0
- package/src/lib/text-format.js +1 -69
- package/src/lib/theme.d.ts +4 -0
- package/src/lib/theme.js +1 -63
- package/src/lib/utils.d.ts +9 -0
- package/src/lib/utils.js +1 -111
- package/src/mixins/chart-element.d.ts +39 -0
- package/src/mixins/chart-element.js +1 -165
- package/src/mixins/input-element.d.ts +64 -0
- package/src/mixins/input-element.js +1 -144
- package/src/mixins/item-resource.d.ts +56 -0
- package/src/mixins/item-resource.js +1 -120
- package/src/mixins/keyboard-element.d.ts +25 -0
- package/src/mixins/keyboard-element.js +1 -69
- package/src/mixins/update-after-browser.d.ts +11 -0
- package/src/mixins/update-after-browser.js +1 -30
- package/src/mixins/with-resize-observer.d.ts +12 -0
- package/src/mixins/with-resize-observer.js +1 -68
- package/src/mixins/with-skeleton-attribute.d.ts +35 -0
- package/src/mixins/with-skeleton-attribute.js +1 -112
- package/src/molecules/gv-card-full.d.ts +78 -0
- package/src/molecules/gv-card-full.js +1 -218
- package/src/molecules/gv-card-list.d.ts +33 -0
- package/src/molecules/gv-card-list.js +1 -113
- package/src/molecules/gv-card.d.ts +65 -0
- package/src/molecules/gv-card.js +1 -133
- package/src/molecules/gv-category-list.d.ts +17 -0
- package/src/molecules/gv-category-list.js +1 -60
- package/src/molecules/gv-category.d.ts +64 -0
- package/src/molecules/gv-category.js +1 -170
- package/src/molecules/gv-code.d.ts +192 -0
- package/src/molecules/gv-code.js +1 -359
- package/src/molecules/gv-confirm.d.ts +60 -0
- package/src/molecules/gv-confirm.js +1 -188
- package/src/molecules/gv-cron-editor.d.ts +115 -0
- package/src/molecules/gv-cron-editor.js +1 -710
- package/src/molecules/gv-dropdown-menu.d.ts +28 -0
- package/src/molecules/gv-dropdown-menu.js +1 -116
- package/src/molecules/gv-expandable.d.ts +37 -0
- package/src/molecules/gv-expandable.js +1 -122
- package/src/molecules/gv-expression-language.d.ts +150 -0
- package/src/molecules/gv-expression-language.js +1 -270
- package/src/molecules/gv-identity-picture.d.ts +44 -0
- package/src/molecules/gv-identity-picture.js +1 -148
- package/src/molecules/gv-list.d.ts +123 -0
- package/src/molecules/gv-list.js +1 -227
- package/src/molecules/gv-metrics.d.ts +65 -0
- package/src/molecules/gv-metrics.js +1 -162
- package/src/molecules/gv-modal.d.ts +64 -0
- package/src/molecules/gv-modal.js +1 -213
- package/src/molecules/gv-nav.d.ts +41 -0
- package/src/molecules/gv-nav.js +1 -196
- package/src/molecules/gv-option.d.ts +65 -0
- package/src/molecules/gv-option.js +1 -242
- package/src/molecules/gv-plans.d.ts +73 -0
- package/src/molecules/gv-plans.js +1 -429
- package/src/molecules/gv-popover.d.ts +91 -0
- package/src/molecules/gv-popover.js +1 -351
- package/src/molecules/gv-promote.d.ts +108 -0
- package/src/molecules/gv-promote.js +1 -209
- package/src/molecules/gv-rating-list.d.ts +77 -0
- package/src/molecules/gv-rating-list.js +1 -365
- package/src/molecules/gv-rating.d.ts +55 -0
- package/src/molecules/gv-rating.js +1 -253
- package/src/molecules/gv-row-expandable.d.ts +8 -0
- package/src/molecules/gv-row-expandable.js +1 -45
- package/src/molecules/gv-row.d.ts +37 -0
- package/src/molecules/gv-row.js +1 -210
- package/src/molecules/gv-stats.d.ts +53 -0
- package/src/molecules/gv-stats.js +1 -121
- package/src/molecules/gv-stepper.d.ts +46 -0
- package/src/molecules/gv-stepper.js +1 -288
- package/src/molecules/gv-table.d.ts +159 -0
- package/src/molecules/gv-table.js +1 -685
- package/src/molecules/gv-tree.d.ts +44 -0
- package/src/molecules/gv-tree.js +1 -250
- package/src/organisms/gv-documentation.d.ts +52 -0
- package/src/organisms/gv-documentation.js +1 -215
- package/src/organisms/gv-header.d.ts +60 -0
- package/src/organisms/gv-header.js +1 -288
- package/src/organisms/gv-http-client.d.ts +57 -0
- package/src/organisms/gv-http-client.js +1 -275
- package/src/organisms/gv-menu.d.ts +74 -0
- package/src/organisms/gv-menu.js +1 -263
- package/src/organisms/gv-newsletter-subscription.d.ts +82 -0
- package/src/organisms/gv-newsletter-subscription.js +1 -271
- package/src/organisms/gv-pagination.d.ts +63 -0
- package/src/organisms/gv-pagination.js +1 -198
- package/src/organisms/gv-properties.d.ts +229 -0
- package/src/organisms/gv-properties.js +1 -920
- package/src/organisms/gv-resizable-views.d.ts +33 -0
- package/src/organisms/gv-resizable-views.js +1 -396
- package/src/organisms/gv-resources.d.ts +125 -0
- package/src/organisms/gv-resources.js +1 -535
- package/src/organisms/gv-schema-form-array.d.ts +55 -0
- package/src/organisms/gv-schema-form-array.js +1 -250
- package/src/organisms/gv-schema-form-control-object.d.ts +64 -0
- package/src/organisms/gv-schema-form-control-object.js +1 -154
- package/src/organisms/gv-schema-form-control.d.ts +90 -0
- package/src/organisms/gv-schema-form-control.js +1 -443
- package/src/organisms/gv-schema-form.d.ts +156 -0
- package/src/organisms/gv-schema-form.js +1 -751
- package/src/organisms/gv-tabs.d.ts +56 -0
- package/src/organisms/gv-tabs.js +1 -210
- package/src/organisms/gv-user-menu.d.ts +56 -0
- package/src/organisms/gv-user-menu.js +1 -314
- package/src/organisms/gv-vertical-menu.d.ts +28 -0
- package/src/organisms/gv-vertical-menu.js +1 -123
- package/src/policy-studio/gv-flow-step.d.ts +142 -0
- package/src/policy-studio/gv-flow-step.js +1 -464
- package/src/policy-studio/gv-flow.d.ts +89 -0
- package/src/policy-studio/gv-flow.js +1 -621
- package/src/policy-studio/gv-policy-studio-menu.d.ts +94 -0
- package/src/policy-studio/gv-policy-studio-menu.js +1 -750
- package/src/policy-studio/gv-policy-studio.d.ts +464 -0
- package/src/policy-studio/gv-policy-studio.js +1 -1842
- package/src/styles/empty.d.ts +1 -0
- package/src/styles/empty.js +1 -36
- package/src/styles/input.d.ts +1 -0
- package/src/styles/input.js +1 -263
- package/src/styles/link.d.ts +1 -0
- package/src/styles/link.js +1 -32
- package/src/styles/shapes.d.ts +2 -0
- package/src/styles/shapes.js +1 -17
- package/src/styles/skeleton.d.ts +1 -0
- package/src/styles/skeleton.js +1 -53
- package/src/styles/zoom.d.ts +1 -0
- package/src/styles/zoom.js +1 -40
- package/src/theme/gv-theme.d.ts +81 -0
- package/src/theme/gv-theme.js +1 -203
- package/wc/gv-autocomplete.d.ts +1 -0
- package/wc/gv-autocomplete.js +1 -1
- package/wc/gv-button.d.ts +1 -0
- package/wc/gv-button.js +1 -1
- package/wc/gv-card-full.d.ts +1 -0
- package/wc/gv-card-full.js +1 -1
- package/wc/gv-card-list.d.ts +1 -0
- package/wc/gv-card-list.js +1 -1
- package/wc/gv-card.d.ts +1 -0
- package/wc/gv-card.js +1 -1
- package/wc/gv-category-list.d.ts +1 -0
- package/wc/gv-category-list.js +1 -1
- package/wc/gv-category.d.ts +1 -0
- package/wc/gv-category.js +1 -1
- package/wc/gv-chart-bar.d.ts +1 -0
- package/wc/gv-chart-bar.js +1 -1
- package/wc/gv-chart-gauge.d.ts +1 -0
- package/wc/gv-chart-gauge.js +1 -1
- package/wc/gv-chart-histogram.d.ts +1 -0
- package/wc/gv-chart-histogram.js +1 -1
- package/wc/gv-chart-line.d.ts +1 -0
- package/wc/gv-chart-line.js +1 -1
- package/wc/gv-chart-map.d.ts +1 -0
- package/wc/gv-chart-map.js +1 -1
- package/wc/gv-chart-pie.d.ts +1 -0
- package/wc/gv-chart-pie.js +1 -1
- package/wc/gv-checkbox.d.ts +1 -0
- package/wc/gv-checkbox.js +1 -1
- package/wc/gv-code.d.ts +1 -0
- package/wc/gv-code.js +1 -1
- package/wc/gv-confirm.d.ts +1 -0
- package/wc/gv-confirm.js +1 -1
- package/wc/gv-cron-editor.d.ts +1 -0
- package/wc/gv-cron-editor.js +1 -1
- package/wc/gv-date-picker-calendar.d.ts +1 -0
- package/wc/gv-date-picker-calendar.js +1 -1
- package/wc/gv-date-picker-cell.d.ts +1 -0
- package/wc/gv-date-picker-cell.js +1 -1
- package/wc/gv-date-picker.d.ts +1 -0
- package/wc/gv-date-picker.js +1 -1
- package/wc/gv-documentation.d.ts +1 -0
- package/wc/gv-documentation.js +1 -1
- package/wc/gv-dropdown-menu.d.ts +1 -0
- package/wc/gv-dropdown-menu.js +1 -1
- package/wc/gv-expandable.d.ts +1 -0
- package/wc/gv-expandable.js +1 -1
- package/wc/gv-expression-language.d.ts +1 -0
- package/wc/gv-expression-language.js +1 -1
- package/wc/gv-file-upload.d.ts +1 -0
- package/wc/gv-file-upload.js +1 -1
- package/wc/gv-flow-step.d.ts +1 -0
- package/wc/gv-flow-step.js +1 -1
- package/wc/gv-flow.d.ts +1 -0
- package/wc/gv-flow.js +1 -1
- package/wc/gv-header.d.ts +1 -0
- package/wc/gv-header.js +1 -1
- package/wc/gv-http-client.d.ts +1 -0
- package/wc/gv-http-client.js +1 -1
- package/wc/gv-icon.d.ts +1 -0
- package/wc/gv-icon.js +1 -1
- package/wc/gv-identity-picture.d.ts +1 -0
- package/wc/gv-identity-picture.js +1 -1
- package/wc/gv-image.d.ts +1 -0
- package/wc/gv-image.js +1 -1
- package/wc/gv-input-message.d.ts +1 -0
- package/wc/gv-input-message.js +1 -1
- package/wc/gv-input.d.ts +1 -0
- package/wc/gv-input.js +1 -1
- package/wc/gv-link.d.ts +1 -0
- package/wc/gv-link.js +1 -1
- package/wc/gv-list.d.ts +1 -0
- package/wc/gv-list.js +1 -1
- package/wc/gv-menu.d.ts +1 -0
- package/wc/gv-menu.js +1 -1
- package/wc/gv-message.d.ts +1 -0
- package/wc/gv-message.js +1 -1
- package/wc/gv-metric.d.ts +1 -0
- package/wc/gv-metric.js +1 -1
- package/wc/gv-metrics.d.ts +1 -0
- package/wc/gv-metrics.js +1 -1
- package/wc/gv-modal.d.ts +1 -0
- package/wc/gv-modal.js +1 -1
- package/wc/gv-nav.d.ts +1 -0
- package/wc/gv-nav.js +1 -1
- package/wc/gv-newsletter-subscription.d.ts +1 -0
- package/wc/gv-newsletter-subscription.js +1 -1
- package/wc/gv-option.d.ts +1 -0
- package/wc/gv-option.js +1 -1
- package/wc/gv-pagination.d.ts +1 -0
- package/wc/gv-pagination.js +1 -1
- package/wc/gv-plans.d.ts +1 -0
- package/wc/gv-plans.js +1 -1
- package/wc/gv-policy-studio-menu.d.ts +1 -0
- package/wc/gv-policy-studio-menu.js +1 -1
- package/wc/gv-policy-studio.d.ts +1 -0
- package/wc/gv-policy-studio.js +1 -1
- package/wc/gv-popover.d.ts +1 -0
- package/wc/gv-popover.js +1 -1
- package/wc/gv-promote.d.ts +1 -0
- package/wc/gv-promote.js +1 -1
- package/wc/gv-properties.d.ts +1 -0
- package/wc/gv-properties.js +1 -1
- package/wc/gv-rating-list.d.ts +1 -0
- package/wc/gv-rating-list.js +1 -1
- package/wc/gv-rating.d.ts +1 -0
- package/wc/gv-rating.js +1 -1
- package/wc/gv-relative-time.d.ts +1 -0
- package/wc/gv-relative-time.js +1 -1
- package/wc/gv-resizable-views.d.ts +1 -0
- package/wc/gv-resizable-views.js +1 -1
- package/wc/gv-resources.d.ts +1 -0
- package/wc/gv-resources.js +1 -1
- package/wc/gv-row-expandable.d.ts +1 -0
- package/wc/gv-row-expandable.js +1 -1
- package/wc/gv-row.d.ts +1 -0
- package/wc/gv-row.js +1 -1
- package/wc/gv-schema-form-array.d.ts +1 -0
- package/wc/gv-schema-form-array.js +1 -1
- package/wc/gv-schema-form-control-object.d.ts +1 -0
- package/wc/gv-schema-form-control-object.js +1 -1
- package/wc/gv-schema-form-control.d.ts +1 -0
- package/wc/gv-schema-form-control.js +1 -1
- package/wc/gv-schema-form.d.ts +1 -0
- package/wc/gv-schema-form.js +1 -1
- package/wc/gv-select-native.d.ts +1 -0
- package/wc/gv-select-native.js +1 -1
- package/wc/gv-select.d.ts +1 -0
- package/wc/gv-select.js +1 -1
- package/wc/gv-spinner.d.ts +1 -0
- package/wc/gv-spinner.js +1 -1
- package/wc/gv-state.d.ts +1 -0
- package/wc/gv-state.js +1 -1
- package/wc/gv-stats.d.ts +1 -0
- package/wc/gv-stats.js +1 -1
- package/wc/gv-stepper.d.ts +1 -0
- package/wc/gv-stepper.js +1 -1
- package/wc/gv-switch.d.ts +1 -0
- package/wc/gv-switch.js +1 -1
- package/wc/gv-table.d.ts +1 -0
- package/wc/gv-table.js +1 -1
- package/wc/gv-tabs.d.ts +1 -0
- package/wc/gv-tabs.js +1 -1
- package/wc/gv-tag.d.ts +1 -0
- package/wc/gv-tag.js +1 -1
- package/wc/gv-text.d.ts +1 -0
- package/wc/gv-text.js +1 -1
- package/wc/gv-theme.d.ts +1 -0
- package/wc/gv-theme.js +1 -1
- package/wc/gv-tree.d.ts +1 -0
- package/wc/gv-tree.js +1 -1
- package/wc/gv-user-menu.d.ts +1 -0
- package/wc/gv-user-menu.js +1 -1
- package/wc/gv-vertical-menu.d.ts +1 -0
- package/wc/gv-vertical-menu.js +1 -1
- package/CHANGELOG.md +0 -1292
- package/LICENSE.txt +0 -202
- package/README.md +0 -195
- package/src/.eslintrc.js +0 -19
- package/src/theme/definition.json +0 -1762
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
declare const GvText_base: {
|
|
2
|
+
new (): {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
_id: string;
|
|
5
|
+
valid: boolean;
|
|
6
|
+
invalid: boolean;
|
|
7
|
+
updateState(value: any): void;
|
|
8
|
+
setValidity(isInvalid?: boolean, violation?: string): void;
|
|
9
|
+
firstUpdated(): void;
|
|
10
|
+
updated(changedProperties: any): void;
|
|
11
|
+
getInputElement(): any;
|
|
12
|
+
readonly offsetHeight: any;
|
|
13
|
+
renderLabel(): "" | import("lit-html").TemplateResult<1>;
|
|
14
|
+
};
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
readonly properties: {
|
|
17
|
+
disabled: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
reflect: boolean;
|
|
20
|
+
};
|
|
21
|
+
required: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
reflect: boolean;
|
|
24
|
+
};
|
|
25
|
+
readonly: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
reflect: boolean;
|
|
28
|
+
};
|
|
29
|
+
skeleton: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
};
|
|
32
|
+
value: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
reflect: boolean;
|
|
35
|
+
};
|
|
36
|
+
label: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
};
|
|
39
|
+
title: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
};
|
|
42
|
+
name: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
};
|
|
45
|
+
placeholder: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
};
|
|
48
|
+
description: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
};
|
|
51
|
+
autofocus: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
};
|
|
54
|
+
invalid: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
reflect: boolean;
|
|
57
|
+
};
|
|
58
|
+
valid: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
reflect: boolean;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
readonly styles: import("lit").CSSResult[];
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* A wrapper of a <text> component.
|
|
67
|
+
*
|
|
68
|
+
* ## Details
|
|
69
|
+
* * has @theme facet
|
|
70
|
+
*
|
|
71
|
+
* @fires gv-text:input - mirrors native textarea events with the `value` on `detail`
|
|
72
|
+
*
|
|
73
|
+
* @attr {Boolean} disabled - same as native text element `disabled` attribute
|
|
74
|
+
* @attr {Boolean} required - same as native text element `required` attribute
|
|
75
|
+
* @attr {Boolean} skeleton - enable skeleton screen UI pattern (loading hint)
|
|
76
|
+
* @attr {String} value - the value of the text
|
|
77
|
+
* @attr {String} label - label of the text
|
|
78
|
+
* @attr {String} title - title of the text
|
|
79
|
+
* @attr {String} name - name of the text
|
|
80
|
+
* @attr {String} placeholder - an example value to display in the text when empty
|
|
81
|
+
* @attr {Length} rows - number of rows of the text element
|
|
82
|
+
* @attr {Boolean} autofocus - true to put the focus on the input
|
|
83
|
+
* @attr {Boolean} [readonly=false] - true if field is readonly mode
|
|
84
|
+
* @attr {Boolean} [autosize=false] - true if field auto resize when content change
|
|
85
|
+
*
|
|
86
|
+
* @cssprop {Color} [--gv-input--bdc=var(--gv-theme-neutral-color-dark, #d9d9d9)] - Border color
|
|
87
|
+
* @cssprop {Length} [--gv-text--fz=var(--gv-theme-font-size-m, 14px)] - Font size
|
|
88
|
+
* @cssprop {Length} [--gv-text--lh=var(--gv-theme-font-size-m, 14px)] - Line height
|
|
89
|
+
*/
|
|
90
|
+
export class GvText extends GvText_base {
|
|
91
|
+
static get properties(): {
|
|
92
|
+
rows: {
|
|
93
|
+
type: NumberConstructor;
|
|
94
|
+
};
|
|
95
|
+
minlength: {
|
|
96
|
+
type: NumberConstructor;
|
|
97
|
+
};
|
|
98
|
+
maxlength: {
|
|
99
|
+
type: NumberConstructor;
|
|
100
|
+
};
|
|
101
|
+
autosize: {
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
rows: number;
|
|
106
|
+
_onInput(e: any): void;
|
|
107
|
+
value: any;
|
|
108
|
+
render(): "" | import("lit-html").TemplateResult<1>;
|
|
109
|
+
}
|
|
110
|
+
export {};
|
package/src/atoms/gv-text.js
CHANGED
|
@@ -1,168 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { classMap } from 'lit/directives/class-map';
|
|
17
|
-
import { ifDefined } from 'lit/directives/if-defined';
|
|
18
|
-
import { LitElement, css, html } from 'lit';
|
|
19
|
-
import { skeleton } from '../styles/skeleton';
|
|
20
|
-
import { dispatchCustomEvent } from '../lib/events';
|
|
21
|
-
import { InputElement } from '../mixins/input-element';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* A wrapper of a <text> component.
|
|
25
|
-
*
|
|
26
|
-
* ## Details
|
|
27
|
-
* * has @theme facet
|
|
28
|
-
*
|
|
29
|
-
* @fires gv-text:input - mirrors native textarea events with the `value` on `detail`
|
|
30
|
-
*
|
|
31
|
-
* @attr {Boolean} disabled - same as native text element `disabled` attribute
|
|
32
|
-
* @attr {Boolean} required - same as native text element `required` attribute
|
|
33
|
-
* @attr {Boolean} skeleton - enable skeleton screen UI pattern (loading hint)
|
|
34
|
-
* @attr {String} value - the value of the text
|
|
35
|
-
* @attr {String} label - label of the text
|
|
36
|
-
* @attr {String} title - title of the text
|
|
37
|
-
* @attr {String} name - name of the text
|
|
38
|
-
* @attr {String} placeholder - an example value to display in the text when empty
|
|
39
|
-
* @attr {Length} rows - number of rows of the text element
|
|
40
|
-
* @attr {Boolean} autofocus - true to put the focus on the input
|
|
41
|
-
* @attr {Boolean} [readonly=false] - true if field is readonly mode
|
|
42
|
-
* @attr {Boolean} [autosize=false] - true if field auto resize when content change
|
|
43
|
-
*
|
|
44
|
-
* @cssprop {Color} [--gv-input--bdc=var(--gv-theme-neutral-color-dark, #d9d9d9)] - Border color
|
|
45
|
-
* @cssprop {Length} [--gv-text--fz=var(--gv-theme-font-size-m, 14px)] - Font size
|
|
46
|
-
* @cssprop {Length} [--gv-text--lh=var(--gv-theme-font-size-m, 14px)] - Line height
|
|
47
|
-
*/
|
|
48
|
-
export class GvText extends InputElement(LitElement) {
|
|
49
|
-
static get properties() {
|
|
50
|
-
return {
|
|
51
|
-
rows: { type: Number },
|
|
52
|
-
minlength: { type: Number },
|
|
53
|
-
maxlength: { type: Number },
|
|
54
|
-
autosize: { type: Boolean },
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
static get styles() {
|
|
59
|
-
return [
|
|
60
|
-
...super.styles,
|
|
61
|
-
skeleton,
|
|
62
|
-
// language=CSS
|
|
63
|
-
css`
|
|
64
|
-
.box {
|
|
65
|
-
position: relative;
|
|
66
|
-
line-height: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/* BASE */
|
|
70
|
-
.textarea {
|
|
71
|
-
--fz: var(--gv-text--fz, var(--gv-theme-font-size-m, 14px));
|
|
72
|
-
--tmp: var(--gv-text--lh, var(--gv-theme-font-size-m, 14px));
|
|
73
|
-
--lh: calc(var(--tmp) + 3px);
|
|
74
|
-
border: 1px solid var(--gv-input--bdc, var(--gv-theme-neutral-color-dark, #d9d9d9));
|
|
75
|
-
box-sizing: border-box;
|
|
76
|
-
border-radius: 4px;
|
|
77
|
-
outline: none;
|
|
78
|
-
padding: 10px 5px;
|
|
79
|
-
width: 100%;
|
|
80
|
-
resize: none;
|
|
81
|
-
font-size: var(--fz);
|
|
82
|
-
line-height: var(--lh);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
div.textarea {
|
|
86
|
-
white-space: pre;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
textarea:disabled {
|
|
90
|
-
cursor: default;
|
|
91
|
-
opacity: 0.5;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
textarea:required {
|
|
95
|
-
box-shadow: none;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
label {
|
|
99
|
-
display: block;
|
|
100
|
-
line-height: 15px;
|
|
101
|
-
padding: 0 0 0.2rem 0;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/* Hack for FF */
|
|
105
|
-
textarea {
|
|
106
|
-
font-family: inherit;
|
|
107
|
-
}
|
|
108
|
-
`,
|
|
109
|
-
];
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
constructor() {
|
|
113
|
-
super();
|
|
114
|
-
this.rows = 10;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
getInputElement() {
|
|
118
|
-
return this.shadowRoot.querySelector('textarea');
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
_onInput(e) {
|
|
122
|
-
this.updateState(e.target.value);
|
|
123
|
-
this.value = e.target.value;
|
|
124
|
-
dispatchCustomEvent(this, 'input', this.value);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
render() {
|
|
128
|
-
const classes = {
|
|
129
|
-
skeleton: this.skeleton,
|
|
130
|
-
required: this.required,
|
|
131
|
-
textarea: true,
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
if (this.readonly) {
|
|
135
|
-
if (this.value || this.value.trim() !== '') {
|
|
136
|
-
return html`
|
|
137
|
-
${this.renderLabel()}
|
|
138
|
-
<div class="${classMap(classes)}" .title=${ifDefined(this.title || this.label)}>${ifDefined(this.value)}</div>
|
|
139
|
-
`;
|
|
140
|
-
}
|
|
141
|
-
return '';
|
|
142
|
-
}
|
|
143
|
-
const rows = this.autosize && this.value ? this.value.split('\n').length : this.rows;
|
|
144
|
-
return html`
|
|
145
|
-
<div class="box">
|
|
146
|
-
${this.renderLabel()}
|
|
147
|
-
<textarea
|
|
148
|
-
class="${classMap(classes)}"
|
|
149
|
-
id=${this._id}
|
|
150
|
-
.name=${ifDefined(this.name)}
|
|
151
|
-
.title=${ifDefined(this.title || this.label)}
|
|
152
|
-
.required=${this.required}
|
|
153
|
-
?readonly="${this.readonly}"
|
|
154
|
-
maxlength="${this.maxlength}"
|
|
155
|
-
minlength="${this.minlength}"
|
|
156
|
-
aria-required=${!!this.required}
|
|
157
|
-
?disabled=${this.disabled || this.skeleton}
|
|
158
|
-
.placeholder=${ifDefined(this.placeholder)}
|
|
159
|
-
.value=${ifDefined(this.value)}
|
|
160
|
-
rows="${this.rows < rows ? rows : this.rows}"
|
|
161
|
-
@input=${this._onInput}
|
|
162
|
-
></textarea>
|
|
163
|
-
</div>
|
|
164
|
-
`;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
window.customElements.define('gv-text', GvText);
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.GvText=void 0;const e=require("lit/directives/class-map"),t=require("lit/directives/if-defined"),i=require("lit"),r=require("../styles/skeleton"),s=require("../lib/events"),a=require("../mixins/input-element");class l extends((0,a.InputElement)(i.LitElement)){static get properties(){return{rows:{type:Number},minlength:{type:Number},maxlength:{type:Number},autosize:{type:Boolean}}}static get styles(){return[...super.styles,r.skeleton,i.css`.box{position:relative;line-height:0}.textarea{--fz:var(--gv-text--fz, var(--gv-theme-font-size-m, 14px));--tmp:var(--gv-text--lh, var(--gv-theme-font-size-m, 14px));--lh:calc(var(--tmp) + 3px);border:1px solid var(--gv-input--bdc,var(--gv-theme-neutral-color-dark,#d9d9d9));box-sizing:border-box;border-radius:4px;outline:0;padding:10px 5px;width:100%;resize:none;font-size:var(--fz);line-height:var(--lh)}div.textarea{white-space:pre}textarea:disabled{cursor:default;opacity:.5}textarea:required{box-shadow:none}label{display:block;line-height:15px;padding:0 0 .2rem 0}textarea{font-family:inherit}`]}constructor(){super(),this.rows=10}getInputElement(){return this.shadowRoot.querySelector("textarea")}_onInput(e){this.updateState(e.target.value),this.value=e.target.value,(0,s.dispatchCustomEvent)(this,"input",this.value)}render(){const r={skeleton:this.skeleton,required:this.required,textarea:!0};if(this.readonly)return this.value||""!==this.value.trim()?i.html`${this.renderLabel()}<div class="${(0,e.classMap)(r)}" .title="${(0,t.ifDefined)(this.title||this.label)}">${(0,t.ifDefined)(this.value)}</div>`:"";const s=this.autosize&&this.value?this.value.split("\n").length:this.rows;return i.html`<div class="box">${this.renderLabel()} <textarea class="${(0,e.classMap)(r)}" id="${this._id}" .name="${(0,t.ifDefined)(this.name)}" .title="${(0,t.ifDefined)(this.title||this.label)}" .required="${this.required}" ?readonly="${this.readonly}" maxlength="${this.maxlength}" minlength="${this.minlength}" aria-required="${!!this.required}" ?disabled="${this.disabled||this.skeleton}" .placeholder="${(0,t.ifDefined)(this.placeholder)}" .value="${(0,t.ifDefined)(this.value)}" rows="${this.rows<s?s:this.rows}" @input="${this._onInput}"></textarea></div>`}}exports.GvText=l,window.customElements.define("gv-text",l);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare const GvChartBar_base: {
|
|
2
|
+
new (): {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
_skeletonAttribute: string;
|
|
5
|
+
_eventListener: () => void;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
disconnectedCallback(): void;
|
|
8
|
+
getOptions(): Promise<void>;
|
|
9
|
+
updated(changedProperties: any): void;
|
|
10
|
+
_additionalOptions: void | undefined;
|
|
11
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
12
|
+
_invisible: boolean;
|
|
13
|
+
_skeleton: boolean;
|
|
14
|
+
_error: boolean;
|
|
15
|
+
_empty: boolean;
|
|
16
|
+
};
|
|
17
|
+
readonly properties: {
|
|
18
|
+
series: {
|
|
19
|
+
type: ArrayConstructor;
|
|
20
|
+
};
|
|
21
|
+
options: {
|
|
22
|
+
type: ArrayConstructor;
|
|
23
|
+
};
|
|
24
|
+
_additionalOptions: {
|
|
25
|
+
type: ObjectConstructor;
|
|
26
|
+
attribute: boolean;
|
|
27
|
+
};
|
|
28
|
+
_series: {
|
|
29
|
+
type: ArrayConstructor;
|
|
30
|
+
attribute: boolean;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly styles: import("lit").CSSResult[];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Bar chart component
|
|
37
|
+
*
|
|
38
|
+
* ⚠️ This component is based on `highcharts`.
|
|
39
|
+
* To use this component in your project be sure the dependency is installed or
|
|
40
|
+
* install it with: `npm install highcharts --save`
|
|
41
|
+
*
|
|
42
|
+
* @fires gv-chart-bar:select - Custom event with selected value
|
|
43
|
+
*
|
|
44
|
+
* @attr {Array} series - The series to display on the bar chart.
|
|
45
|
+
* @attr {Array} options - The list of options to display.
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
export class GvChartBar extends GvChartBar_base {
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -1,103 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { LitElement } from 'lit';
|
|
17
|
-
import '../atoms/gv-button';
|
|
18
|
-
import '../atoms/gv-tag';
|
|
19
|
-
import { ChartElement } from '../mixins/chart-element';
|
|
20
|
-
import { dispatchCustomEvent } from '../lib/events';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Bar chart component
|
|
24
|
-
*
|
|
25
|
-
* ⚠️ This component is based on `highcharts`.
|
|
26
|
-
* To use this component in your project be sure the dependency is installed or
|
|
27
|
-
* install it with: `npm install highcharts --save`
|
|
28
|
-
*
|
|
29
|
-
* @fires gv-chart-bar:select - Custom event with selected value
|
|
30
|
-
*
|
|
31
|
-
* @attr {Array} series - The series to display on the bar chart.
|
|
32
|
-
* @attr {Array} options - The list of options to display.
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
export class GvChartBar extends ChartElement(LitElement) {
|
|
36
|
-
async getOptions() {
|
|
37
|
-
let total = 0;
|
|
38
|
-
const categories = [];
|
|
39
|
-
if (this._series && this._series.values) {
|
|
40
|
-
this.options.data.forEach((data, i) => {
|
|
41
|
-
data.y = this._series.values[this.options.data[i].name] || 0;
|
|
42
|
-
categories.push(data.name);
|
|
43
|
-
});
|
|
44
|
-
this.options.data.forEach((d) => {
|
|
45
|
-
total += d.y;
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
if (!total) {
|
|
49
|
-
this._empty = true;
|
|
50
|
-
}
|
|
51
|
-
return {
|
|
52
|
-
chart: {
|
|
53
|
-
type: 'bar',
|
|
54
|
-
},
|
|
55
|
-
series: total === 0 ? [] : [this.options],
|
|
56
|
-
xAxis: {
|
|
57
|
-
categories: categories,
|
|
58
|
-
},
|
|
59
|
-
legend: {
|
|
60
|
-
enabled: false,
|
|
61
|
-
},
|
|
62
|
-
yAxis: {
|
|
63
|
-
allowDecimals: false,
|
|
64
|
-
title: {
|
|
65
|
-
text: null,
|
|
66
|
-
},
|
|
67
|
-
min: 0,
|
|
68
|
-
},
|
|
69
|
-
plotOptions: {
|
|
70
|
-
bar: {
|
|
71
|
-
dataLabels: {
|
|
72
|
-
enabled: true,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
series: {
|
|
76
|
-
animation: false,
|
|
77
|
-
events: {
|
|
78
|
-
click: (event) => {
|
|
79
|
-
event.preventDefault();
|
|
80
|
-
dispatchCustomEvent(this, 'select', event.point.options);
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
tooltip: {
|
|
86
|
-
pointFormat: 'Nb hits: <b>{point.y}</b>',
|
|
87
|
-
},
|
|
88
|
-
title: {
|
|
89
|
-
text: 'Total: ' + total,
|
|
90
|
-
useHTML: true,
|
|
91
|
-
align: 'left',
|
|
92
|
-
verticalAlign: 'bottom',
|
|
93
|
-
y: 10,
|
|
94
|
-
style: {
|
|
95
|
-
fontSize: '12px',
|
|
96
|
-
fontWeight: 'bold',
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
window.customElements.define('gv-chart-bar', GvChartBar);
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.GvChartBar=void 0;const t=require("lit");require("../atoms/gv-button"),require("../atoms/gv-tag");const e=require("../mixins/chart-element"),s=require("../lib/events");class i extends((0,e.ChartElement)(t.LitElement)){async getOptions(){let t=0;const e=[];return this._series&&this._series.values&&(this.options.data.forEach(((t,s)=>{t.y=this._series.values[this.options.data[s].name]||0,e.push(t.name)})),this.options.data.forEach((e=>{t+=e.y}))),t||(this._empty=!0),{chart:{type:"bar"},series:0===t?[]:[this.options],xAxis:{categories:e},legend:{enabled:!1},yAxis:{allowDecimals:!1,title:{text:null},min:0},plotOptions:{bar:{dataLabels:{enabled:!0}},series:{animation:!1,events:{click:t=>{t.preventDefault(),(0,s.dispatchCustomEvent)(this,"select",t.point.options)}}}},tooltip:{pointFormat:"Nb hits: <b>{point.y}</b>"},title:{text:"Total: "+t,useHTML:!0,align:"left",verticalAlign:"bottom",y:10,style:{fontSize:"12px",fontWeight:"bold"}}}}}exports.GvChartBar=i,window.customElements.define("gv-chart-bar",i);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
declare const GvChartGauge_base: {
|
|
2
|
+
new (): {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
_skeletonAttribute: string;
|
|
5
|
+
_eventListener: () => void;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
disconnectedCallback(): void;
|
|
8
|
+
getOptions(): Promise<void>;
|
|
9
|
+
updated(changedProperties: any): void;
|
|
10
|
+
_additionalOptions: void | undefined;
|
|
11
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
12
|
+
_invisible: boolean;
|
|
13
|
+
_skeleton: boolean;
|
|
14
|
+
_error: boolean;
|
|
15
|
+
_empty: boolean;
|
|
16
|
+
};
|
|
17
|
+
readonly properties: {
|
|
18
|
+
series: {
|
|
19
|
+
type: ArrayConstructor;
|
|
20
|
+
};
|
|
21
|
+
options: {
|
|
22
|
+
type: ArrayConstructor;
|
|
23
|
+
};
|
|
24
|
+
_additionalOptions: {
|
|
25
|
+
type: ObjectConstructor;
|
|
26
|
+
attribute: boolean;
|
|
27
|
+
};
|
|
28
|
+
_series: {
|
|
29
|
+
type: ArrayConstructor;
|
|
30
|
+
attribute: boolean;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly styles: import("lit").CSSResult[];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Gauge chart component
|
|
37
|
+
*
|
|
38
|
+
* ⚠️ This component is based on `highcharts`.
|
|
39
|
+
* To use this component in your project be sure the dependency is installed or
|
|
40
|
+
* install it with: `npm install highcharts --save`
|
|
41
|
+
*
|
|
42
|
+
* @attr {number} max - The maximum value of the gauge.
|
|
43
|
+
* @attr {Array} series - Array of the series to display.
|
|
44
|
+
* @attr {Object} tooltip - The list of tooltip attributes to overwrite.
|
|
45
|
+
* @attr {Object} pane - The pane serves as a container for axes and backgrounds for circular gauges and polar charts.
|
|
46
|
+
*/
|
|
47
|
+
export class GvChartGauge extends GvChartGauge_base {
|
|
48
|
+
static get properties(): {
|
|
49
|
+
/** @required */
|
|
50
|
+
max: {
|
|
51
|
+
type: NumberConstructor;
|
|
52
|
+
};
|
|
53
|
+
series: {
|
|
54
|
+
type: ArrayConstructor;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -1,100 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { LitElement } from 'lit';
|
|
17
|
-
import { ChartElement } from '../mixins/chart-element';
|
|
18
|
-
import ChartModuleMore from 'highcharts/highcharts-more';
|
|
19
|
-
import Highcharts from 'highcharts';
|
|
20
|
-
import HCSolidGauge from 'highcharts/modules/solid-gauge';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Gauge chart component
|
|
24
|
-
*
|
|
25
|
-
* ⚠️ This component is based on `highcharts`.
|
|
26
|
-
* To use this component in your project be sure the dependency is installed or
|
|
27
|
-
* install it with: `npm install highcharts --save`
|
|
28
|
-
*
|
|
29
|
-
* @attr {number} max - The maximum value of the gauge.
|
|
30
|
-
* @attr {Array} series - Array of the series to display.
|
|
31
|
-
* @attr {Object} tooltip - The list of tooltip attributes to overwrite.
|
|
32
|
-
* @attr {Object} pane - The pane serves as a container for axes and backgrounds for circular gauges and polar charts.
|
|
33
|
-
*/
|
|
34
|
-
export class GvChartGauge extends ChartElement(LitElement) {
|
|
35
|
-
constructor() {
|
|
36
|
-
super();
|
|
37
|
-
ChartModuleMore(Highcharts);
|
|
38
|
-
HCSolidGauge(Highcharts);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static get properties() {
|
|
42
|
-
return {
|
|
43
|
-
/** @required */
|
|
44
|
-
max: { type: Number },
|
|
45
|
-
series: { type: Array },
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
async getOptions() {
|
|
50
|
-
this._empty = false;
|
|
51
|
-
return {
|
|
52
|
-
chart: {
|
|
53
|
-
type: 'solidgauge',
|
|
54
|
-
backgroundColor: 'transparent',
|
|
55
|
-
},
|
|
56
|
-
tooltip: {
|
|
57
|
-
enabled: false,
|
|
58
|
-
...this.tooltip,
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
pane: {
|
|
62
|
-
startAngle: 0,
|
|
63
|
-
endAngle: 360,
|
|
64
|
-
background: [
|
|
65
|
-
{
|
|
66
|
-
outerRadius: '112%',
|
|
67
|
-
innerRadius: '88%',
|
|
68
|
-
backgroundColor: 'transparent',
|
|
69
|
-
borderWidth: 0,
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
...this.pane,
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
yAxis: [
|
|
76
|
-
{
|
|
77
|
-
min: 0,
|
|
78
|
-
max: this.max,
|
|
79
|
-
lineWidth: 0,
|
|
80
|
-
tickPositions: [],
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
|
|
84
|
-
plotOptions: {
|
|
85
|
-
solidgauge: {
|
|
86
|
-
dataLabels: {
|
|
87
|
-
enabled: true,
|
|
88
|
-
},
|
|
89
|
-
linecap: 'round',
|
|
90
|
-
stickyTracking: false,
|
|
91
|
-
rounded: true,
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
series: this.series,
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
window.customElements.define('gv-chart-gauge', GvChartGauge);
|
|
1
|
+
var e=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.GvChartGauge=void 0;const t=require("lit"),r=require("../mixins/chart-element"),a=e(require("highcharts/highcharts-more")),i=e(require("highcharts")),s=e(require("highcharts/modules/solid-gauge"));class n extends((0,r.ChartElement)(t.LitElement)){constructor(){super(),(0,a.default)(i.default),(0,s.default)(i.default)}static get properties(){return{max:{type:Number},series:{type:Array}}}async getOptions(){return this._empty=!1,{chart:{type:"solidgauge",backgroundColor:"transparent"},tooltip:{enabled:!1,...this.tooltip},pane:{startAngle:0,endAngle:360,background:[{outerRadius:"112%",innerRadius:"88%",backgroundColor:"transparent",borderWidth:0}],...this.pane},yAxis:[{min:0,max:this.max,lineWidth:0,tickPositions:[]}],plotOptions:{solidgauge:{dataLabels:{enabled:!0},linecap:"round",stickyTracking:!1,rounded:!0}},series:this.series}}}exports.GvChartGauge=n,window.customElements.define("gv-chart-gauge",n);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
declare const GvChartHistogram_base: {
|
|
2
|
+
new (): {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
_skeletonAttribute: string;
|
|
5
|
+
_eventListener: () => void;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
disconnectedCallback(): void;
|
|
8
|
+
getOptions(): Promise<void>;
|
|
9
|
+
updated(changedProperties: any): void;
|
|
10
|
+
_additionalOptions: void | undefined;
|
|
11
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
12
|
+
_invisible: boolean;
|
|
13
|
+
_skeleton: boolean;
|
|
14
|
+
_error: boolean;
|
|
15
|
+
_empty: boolean;
|
|
16
|
+
};
|
|
17
|
+
readonly properties: {
|
|
18
|
+
series: {
|
|
19
|
+
type: ArrayConstructor;
|
|
20
|
+
};
|
|
21
|
+
options: {
|
|
22
|
+
type: ArrayConstructor;
|
|
23
|
+
};
|
|
24
|
+
_additionalOptions: {
|
|
25
|
+
type: ObjectConstructor;
|
|
26
|
+
attribute: boolean;
|
|
27
|
+
};
|
|
28
|
+
_series: {
|
|
29
|
+
type: ArrayConstructor;
|
|
30
|
+
attribute: boolean;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly styles: import("lit").CSSResult[];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Histogram chart component
|
|
37
|
+
*
|
|
38
|
+
* ⚠️ This component is based on `highcharts`.
|
|
39
|
+
* To use this component in your project be sure the dependency is installed or
|
|
40
|
+
* install it with: `npm install highcharts --save`
|
|
41
|
+
*
|
|
42
|
+
* @attr {Array} series - The series to display on the histogram chart.
|
|
43
|
+
* @attr {Object} options - The list of options to display.
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
export class GvChartHistogram extends GvChartHistogram_base {
|
|
47
|
+
}
|
|
48
|
+
export {};
|