@emuanalytics/flow-rdf-ui 4.0.0-preview.9 → 4.0.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/dist/custom-elements.json +2006 -2003
- package/dist/index.cjs +28 -17
- package/dist/index.d.cts +181 -45
- package/dist/index.d.mts +181 -45
- package/dist/index.d.ts +181 -45
- package/dist/index.mjs +29 -18
- package/dist/vscode.html-custom-data.json +210 -209
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const chart_js = require('chart.js');
|
|
4
|
+
const chartjsChartMatrix = require('chartjs-chart-matrix');
|
|
5
|
+
const AnnotationPlugin = require('chartjs-plugin-annotation');
|
|
6
|
+
const d3Scale = require('d3-scale');
|
|
3
7
|
const lit = require('lit');
|
|
4
8
|
const decorators_js = require('lit/decorators.js');
|
|
5
9
|
const classMap_js = require('lit/directives/class-map.js');
|
|
@@ -8,11 +12,7 @@ const staticHtml_js = require('lit/static-html.js');
|
|
|
8
12
|
const luxon = require('luxon');
|
|
9
13
|
const map_js = require('lit/directives/map.js');
|
|
10
14
|
const range_js = require('lit/directives/range.js');
|
|
11
|
-
const chart_js = require('chart.js');
|
|
12
15
|
const ref_js = require('lit/directives/ref.js');
|
|
13
|
-
const chartjsChartMatrix = require('chartjs-chart-matrix');
|
|
14
|
-
const AnnotationPlugin = require('chartjs-plugin-annotation');
|
|
15
|
-
const d3Scale = require('d3-scale');
|
|
16
16
|
const live_js = require('lit/directives/live.js');
|
|
17
17
|
const tinycolor = require('@ctrl/tinycolor');
|
|
18
18
|
const styleMap_js = require('lit/directives/style-map.js');
|
|
@@ -1451,8 +1451,8 @@ function unregisterIconLibrary(name) {
|
|
|
1451
1451
|
function setDefaultLocale(locale) {
|
|
1452
1452
|
luxon.Settings.defaultLocale = locale;
|
|
1453
1453
|
}
|
|
1454
|
-
function setDefaultTimeZone(
|
|
1455
|
-
luxon.Settings.defaultZone =
|
|
1454
|
+
function setDefaultTimeZone(timezone) {
|
|
1455
|
+
luxon.Settings.defaultZone = timezone;
|
|
1456
1456
|
}
|
|
1457
1457
|
|
|
1458
1458
|
function filterRuleSet(ruleset, options) {
|
|
@@ -1939,7 +1939,6 @@ function getAnimation(el, animationName, options) {
|
|
|
1939
1939
|
|
|
1940
1940
|
const connectedElements = /* @__PURE__ */ new Set();
|
|
1941
1941
|
const translations = /* @__PURE__ */ new Map();
|
|
1942
|
-
const isClient = isDefined(MutationObserver) && isDefined(document) && isDefined(document.documentElement);
|
|
1943
1942
|
let fallback;
|
|
1944
1943
|
let documentDirection = "ltr";
|
|
1945
1944
|
let documentLanguage = "en";
|
|
@@ -1953,8 +1952,8 @@ function registerTranslation(...translation) {
|
|
|
1953
1952
|
}
|
|
1954
1953
|
if (!fallback) {
|
|
1955
1954
|
fallback = t;
|
|
1956
|
-
const
|
|
1957
|
-
if (
|
|
1955
|
+
const isClient = isDefined(MutationObserver) && isDefined(document) && isDefined(document.documentElement);
|
|
1956
|
+
if (isClient) {
|
|
1958
1957
|
const documentElementObserver = new MutationObserver(update);
|
|
1959
1958
|
documentDirection = document.documentElement.dir || "ltr";
|
|
1960
1959
|
documentLanguage = document.documentElement.lang || navigator.language;
|
|
@@ -1968,6 +1967,7 @@ function registerTranslation(...translation) {
|
|
|
1968
1967
|
update();
|
|
1969
1968
|
}
|
|
1970
1969
|
function update() {
|
|
1970
|
+
const isClient = isDefined(document) && isDefined(document.documentElement);
|
|
1971
1971
|
if (isClient) {
|
|
1972
1972
|
documentDirection = document.documentElement.dir || "ltr";
|
|
1973
1973
|
documentLanguage = document.documentElement.lang || navigator.language;
|
|
@@ -3988,6 +3988,11 @@ const styles$U = lit.css`
|
|
|
3988
3988
|
color: var(--flow-ui-color-neutral-0);
|
|
3989
3989
|
}
|
|
3990
3990
|
|
|
3991
|
+
.badge--secondary {
|
|
3992
|
+
background-color: var(--flow-ui-color-secondary-500);
|
|
3993
|
+
color: var(--flow-ui-color-neutral-0);
|
|
3994
|
+
}
|
|
3995
|
+
|
|
3991
3996
|
.badge--success {
|
|
3992
3997
|
background-color: var(--flow-ui-color-success-600);
|
|
3993
3998
|
color: var(--flow-ui-color-neutral-0);
|
|
@@ -4022,6 +4027,10 @@ const styles$U = lit.css`
|
|
|
4022
4027
|
--pulse-color: var(--flow-ui-color-primary-500);
|
|
4023
4028
|
}
|
|
4024
4029
|
|
|
4030
|
+
.badge--pulse.badge--secondary {
|
|
4031
|
+
--pulse-color: var(--flow-ui-color-secondary-500);
|
|
4032
|
+
}
|
|
4033
|
+
|
|
4025
4034
|
.badge--pulse.badge--success {
|
|
4026
4035
|
--pulse-color: var(--flow-ui-color-success-600);
|
|
4027
4036
|
}
|
|
@@ -4081,6 +4090,7 @@ class FlowUiBadge extends FlowRdfElement {
|
|
|
4081
4090
|
class=${classMap_js.classMap({
|
|
4082
4091
|
badge: true,
|
|
4083
4092
|
"badge--primary": this.variant === "primary",
|
|
4093
|
+
"badge--secondary": this.variant === "secondary",
|
|
4084
4094
|
"badge--success": this.variant === "success",
|
|
4085
4095
|
"badge--neutral": this.variant === "neutral",
|
|
4086
4096
|
"badge--warning": this.variant === "warning",
|
|
@@ -13382,13 +13392,13 @@ const styles$y = lit.css`
|
|
|
13382
13392
|
}
|
|
13383
13393
|
|
|
13384
13394
|
/* Wrapper needed to support text ellipsis in flex item */
|
|
13385
|
-
.
|
|
13395
|
+
.gauge__title-wrapper {
|
|
13386
13396
|
flex: 1;
|
|
13387
13397
|
min-width: 0;
|
|
13388
13398
|
display: flex;
|
|
13389
13399
|
}
|
|
13390
13400
|
|
|
13391
|
-
.
|
|
13401
|
+
.gauge__title {
|
|
13392
13402
|
text-overflow: ellipsis;
|
|
13393
13403
|
white-space: nowrap;
|
|
13394
13404
|
overflow: hidden;
|
|
@@ -13522,7 +13532,7 @@ class FlowUiGauge extends FlowRdfElement {
|
|
|
13522
13532
|
<flow-ui-dialog class="gauge__info-dialog">
|
|
13523
13533
|
<div slot="label" class="gauge__info-dialog-label">
|
|
13524
13534
|
${this.headerIconTemplate()}
|
|
13525
|
-
<slot name="
|
|
13535
|
+
<slot name="title-text">${this.title}</slot>
|
|
13526
13536
|
</div>
|
|
13527
13537
|
<slot name="info"></slot>
|
|
13528
13538
|
<div slot="footer">
|
|
@@ -13542,9 +13552,9 @@ class FlowUiGauge extends FlowRdfElement {
|
|
|
13542
13552
|
>
|
|
13543
13553
|
<div part="header" class="gauge__header">
|
|
13544
13554
|
${this.headerIconTemplate()}
|
|
13545
|
-
<span class="
|
|
13546
|
-
<span part="
|
|
13547
|
-
<slot name="
|
|
13555
|
+
<span class="gauge__title-wrapper">
|
|
13556
|
+
<span part="title" class="gauge__title">
|
|
13557
|
+
<slot name="title">${this.title}</slot>
|
|
13548
13558
|
</span>
|
|
13549
13559
|
</span>
|
|
13550
13560
|
${hasInfo ? this.infoButtonTemplate() : lit.nothing}
|
|
@@ -13569,7 +13579,7 @@ __decorateClass$w([
|
|
|
13569
13579
|
], FlowUiGauge.prototype, "_infoDialog", 2);
|
|
13570
13580
|
__decorateClass$w([
|
|
13571
13581
|
decorators_js.property()
|
|
13572
|
-
], FlowUiGauge.prototype, "
|
|
13582
|
+
], FlowUiGauge.prototype, "title", 2);
|
|
13573
13583
|
__decorateClass$w([
|
|
13574
13584
|
decorators_js.property()
|
|
13575
13585
|
], FlowUiGauge.prototype, "units", 2);
|
|
@@ -24774,7 +24784,7 @@ function registerComponents() {
|
|
|
24774
24784
|
FlowUiVisuallyHidden.define("flow-ui-visually-hidden");
|
|
24775
24785
|
}
|
|
24776
24786
|
|
|
24777
|
-
const version = "4.0.0
|
|
24787
|
+
const version = "4.0.0";
|
|
24778
24788
|
|
|
24779
24789
|
const CONSOLE_HIGHLIGHT_STYLE = `
|
|
24780
24790
|
padding: 2px 4px;
|
|
@@ -24861,6 +24871,7 @@ const translation = {
|
|
|
24861
24871
|
const es = translation;
|
|
24862
24872
|
|
|
24863
24873
|
function initialize() {
|
|
24874
|
+
initializeChartJs();
|
|
24864
24875
|
registerTranslation(en);
|
|
24865
24876
|
registerTranslation(enGB);
|
|
24866
24877
|
registerTranslation(es);
|
package/dist/index.d.cts
CHANGED
|
@@ -572,31 +572,123 @@ declare module '@shoelace-style/animations' {
|
|
|
572
572
|
export const zoomOutUp: Animation;
|
|
573
573
|
}
|
|
574
574
|
|
|
575
|
-
/**
|
|
575
|
+
/**
|
|
576
|
+
* Returns a list of all supported animation names.
|
|
577
|
+
*
|
|
578
|
+
* Supply the required animation as the `name` property of the
|
|
579
|
+
* `<flow-ui-animation>` component.
|
|
580
|
+
*/
|
|
576
581
|
declare function getAnimationNames(): string[];
|
|
577
|
-
/**
|
|
582
|
+
/**
|
|
583
|
+
* Returns a list of all supported easing method names.
|
|
584
|
+
*
|
|
585
|
+
* Supply the required easing method as the `easing` property of the
|
|
586
|
+
* `<flow-ui-animation>` component.
|
|
587
|
+
*/
|
|
578
588
|
declare function getEasingNames(): string[];
|
|
579
589
|
|
|
590
|
+
/**
|
|
591
|
+
* @internal
|
|
592
|
+
*
|
|
593
|
+
* Registers standard Chart.js components and plugins,
|
|
594
|
+
* and sets default options.
|
|
595
|
+
*/
|
|
580
596
|
declare function initializeChartJs(): void;
|
|
581
597
|
declare function registerChartComponent(...components: ChartComponentLike[]): void;
|
|
582
598
|
|
|
583
|
-
/**
|
|
599
|
+
/**
|
|
600
|
+
*
|
|
601
|
+
* The following code shows how to import FontAwesome SVG icons from the `flow-rdf-ui/icons` package and add them to the
|
|
602
|
+
* default icon library.
|
|
603
|
+
* ```js
|
|
604
|
+
* // Import and register icons
|
|
605
|
+
* import {fasHouse, fasGear, fasUser} from '@emuanalytics/flow-rdf-ui/icons';
|
|
606
|
+
* import {addIcons} from '@emuanalytics/flow-rdf-ui';
|
|
607
|
+
* addIcons({fasHouse, fasGear, fasUser});
|
|
608
|
+
* ```
|
|
609
|
+
*
|
|
610
|
+
* Icons are registered under their camelCase name **and** kebab-case name.
|
|
611
|
+
* Once registered, they can be used in the following way:
|
|
612
|
+
*
|
|
613
|
+
* ```html
|
|
614
|
+
* <flow-ui-icon name="fas-house"></flow-ui-icon>
|
|
615
|
+
* ```
|
|
616
|
+
*
|
|
617
|
+
* Note that missing or mis-spelled icons will be displayed as <flow-ui-icon name="unknown"></flow-ui-icon>.
|
|
618
|
+
*
|
|
619
|
+
* For a list of available icons, see the [FontAwesome icon gallery](https://fontawesome.com/search?o=r&m=free).
|
|
620
|
+
*/
|
|
584
621
|
declare const addIcons: (icons: {
|
|
585
622
|
[name: string]: string;
|
|
586
623
|
}) => void;
|
|
587
624
|
|
|
588
625
|
type IconLibraryResolver = (name: string) => string;
|
|
589
626
|
type IconLibraryMutator = (svg: SVGElement) => void;
|
|
590
|
-
/**
|
|
627
|
+
/**
|
|
628
|
+
*
|
|
629
|
+
* Use this function to add a custom icon library to the registry or overrides an existing one.
|
|
630
|
+
* Provide a resolver function that returns the URL of the icon based on its name.
|
|
631
|
+
* Optionally, provide a mutator function that modifies the SVG element of the icon.
|
|
632
|
+
*
|
|
633
|
+
* Two icon libraries are included by default:
|
|
634
|
+
* - `system` (System icons used by `flow-rdf-ui` components)
|
|
635
|
+
* - `default` (FontAwesome 5.15.4)
|
|
636
|
+
*
|
|
637
|
+
* To use a custom icon library, set the `library` property of the `<flow-ui-icon>` component
|
|
638
|
+
* to the registered name of the library. If omitted, the `default` library is used.
|
|
639
|
+
*
|
|
640
|
+
* ```typescript
|
|
641
|
+
* // Register FontAwesome icon library using SVGs from Flo.w CDN
|
|
642
|
+
* registerIconLibrary('fa', {
|
|
643
|
+
* resolver: (name) => {
|
|
644
|
+
* const filename = name.replace(/^fa[rbs]-/, '');
|
|
645
|
+
* let folder = 'regular';
|
|
646
|
+
* if (name.substring(0, 4) === 'fas-') folder = 'solid';
|
|
647
|
+
* if (name.substring(0, 4) === 'fab-') folder = 'brands';
|
|
648
|
+
* return `https://flow-cdn.emu-analytics.net/icons/fontawesome-6.4.2/${folder}/${filename}.svg`;
|
|
649
|
+
* },
|
|
650
|
+
* mutator: (svg) => svg.setAttribute('fill', 'currentColor')
|
|
651
|
+
* });
|
|
652
|
+
* ```
|
|
653
|
+
*
|
|
654
|
+
* ```html
|
|
655
|
+
* <flow-ui-icon library="fa" name="fas-house"></flow-ui-icon>
|
|
656
|
+
* ```
|
|
657
|
+
*
|
|
658
|
+
* @param name The name of the custom icon library.
|
|
659
|
+
* @param options The icon library resolver and optional mutator.
|
|
660
|
+
* @param options.resolver A function that returns the URL of given icon.
|
|
661
|
+
* @param options.mutator An optional function that mutates the SVG element of the icon.
|
|
662
|
+
*/
|
|
591
663
|
declare function registerIconLibrary(name: string, options: {
|
|
592
664
|
resolver: IconLibraryResolver;
|
|
593
665
|
mutator?: IconLibraryMutator;
|
|
594
666
|
}): void;
|
|
595
|
-
/**
|
|
667
|
+
/**
|
|
668
|
+
* Removes a custom icon library from the registry.
|
|
669
|
+
*/
|
|
596
670
|
declare function unregisterIconLibrary(name: string): void;
|
|
597
671
|
|
|
672
|
+
/**
|
|
673
|
+
* Set the default locale used by date/time-sensitive components including
|
|
674
|
+
* `<flow-ui-calendar>`, `<flow-ui-date-time-picker>` and `<flow-ui-timer>`.
|
|
675
|
+
*
|
|
676
|
+
* The default locale is can be overridden by setting the `locale` attribute
|
|
677
|
+
* of date/time-sensitive components.
|
|
678
|
+
*
|
|
679
|
+
* @param locale Locale code (e.g. `'en'`, `'en-US'`, `'es-ES'`)
|
|
680
|
+
*/
|
|
598
681
|
declare function setDefaultLocale(locale: string): void;
|
|
599
|
-
|
|
682
|
+
/**
|
|
683
|
+
* Set the default timezone used by date/time-sensitive components including
|
|
684
|
+
* `<flow-ui-calendar>`, `<flow-ui-date-time-picker>` and `<flow-ui-timer>`.
|
|
685
|
+
*
|
|
686
|
+
* The default timezone is can be overridden by setting the `timezone` attribute
|
|
687
|
+
* of date/time-sensitive components.
|
|
688
|
+
*
|
|
689
|
+
* @param timezone Timezone (e.g. `'Europe/London'`, `'America/New_York'`)
|
|
690
|
+
*/
|
|
691
|
+
declare function setDefaultTimeZone(timezone: string): void;
|
|
600
692
|
|
|
601
693
|
interface VirtualElement {
|
|
602
694
|
getBoundingClientRect: () => DOMRect;
|
|
@@ -1096,38 +1188,84 @@ interface FlowQueryBuilderConverterOptions {
|
|
|
1096
1188
|
type FlowQueryBuilderConverter = (ruleSet: FlowQueryBuilderRuleSet, config: FlowQueryBuilderConfig, options?: FlowQueryBuilderConverterOptions) => any;
|
|
1097
1189
|
|
|
1098
1190
|
/**
|
|
1099
|
-
*
|
|
1191
|
+
* Recursively applies filters to the supplied {@link FlowQueryBuilderRuleSet}
|
|
1192
|
+
* returning a new rule set.
|
|
1100
1193
|
*
|
|
1101
|
-
* This
|
|
1194
|
+
* This is used to sanitize user queries before they are executed by removing
|
|
1195
|
+
* excluded fields or including only the specified fields.
|
|
1196
|
+
*
|
|
1197
|
+
* Note that `includeFields` takes precedence over `excludeFields`.
|
|
1198
|
+
*
|
|
1199
|
+
* ```ts
|
|
1200
|
+
* const ruleSet = {
|
|
1201
|
+
* condition: 'and',
|
|
1202
|
+
* rules: [ { field: 'a', ... }, { field: 'b', ... }, { field: 'c', ... } ]
|
|
1203
|
+
* };
|
|
1204
|
+
*
|
|
1205
|
+
* const filteredRuleSet = filterRuleSet(ruleSet, { excludeFields: ['b', 'c'] });
|
|
1206
|
+
* ```
|
|
1102
1207
|
*
|
|
1103
1208
|
* @param ruleset Rule set to filter
|
|
1104
|
-
* @param options
|
|
1209
|
+
* @param options Filter rules
|
|
1210
|
+
* @param options.excludeFields Fields to exclude from the {@link FlowQueryBuilderRuleSet}
|
|
1211
|
+
* @param options.includeFields Fields to include in the {@link FlowQueryBuilderRuleSet}
|
|
1105
1212
|
*/
|
|
1106
1213
|
declare function filterRuleSet(ruleset: FlowQueryBuilderRuleSet, options: {
|
|
1107
1214
|
excludeFields?: string[];
|
|
1108
1215
|
includeFields?: string[];
|
|
1109
1216
|
}): FlowQueryBuilderRuleSet;
|
|
1217
|
+
/**
|
|
1218
|
+
* Recursively renames fields in the supplied {@link FlowQueryBuilderRuleSet}
|
|
1219
|
+
* returning a new rule set.
|
|
1220
|
+
*
|
|
1221
|
+
* This can be used to sanitize user queries before they are executed.
|
|
1222
|
+
*
|
|
1223
|
+
* ```ts
|
|
1224
|
+
* const ruleSet = {
|
|
1225
|
+
* condition: 'and',
|
|
1226
|
+
* rules: [ { field: 'a', ... }, { field: 'b', ... }, ... } ]
|
|
1227
|
+
* };
|
|
1228
|
+
*
|
|
1229
|
+
* const renamedRuleSet = renameRuleSetFields(ruleSet, { a: 'renamedA' });
|
|
1230
|
+
*
|
|
1231
|
+
* // renamedRuleSet = {
|
|
1232
|
+
* // condition: 'and',
|
|
1233
|
+
* // rules: [ { field: 'renamedA', ... }, { field: 'b', ... }, ... } ]
|
|
1234
|
+
* // };
|
|
1235
|
+
*
|
|
1236
|
+
* ```
|
|
1237
|
+
*
|
|
1238
|
+
* @param ruleset Rule set to rename.
|
|
1239
|
+
* @param replacements Set of field name replacements.
|
|
1240
|
+
* @returns A new {@link FlowQueryBuilderRuleSet} with renamed fields.
|
|
1241
|
+
*/
|
|
1110
1242
|
declare function renameRuleSetFields(ruleset: FlowQueryBuilderRuleSet, replacements: Record<string, string>): FlowQueryBuilderRuleSet;
|
|
1111
1243
|
/**
|
|
1112
|
-
*
|
|
1113
|
-
* a transform function to each rule.
|
|
1244
|
+
* Recursively applies a tranform function to the supplied {@link FlowQueryBuilderRuleSet} returning a new rule set.
|
|
1114
1245
|
*
|
|
1115
|
-
* The transform
|
|
1246
|
+
* The transform function should expect a single `FlowQueryBuilderRule` and return:
|
|
1116
1247
|
*
|
|
1117
|
-
* - the same rule
|
|
1248
|
+
* - the same rule unmodified or modified in place
|
|
1118
1249
|
* - `undefined` to exclude the rule from the rule set
|
|
1119
1250
|
*
|
|
1120
|
-
* This can be used to sanitize rule sets before they are used to perform queries.
|
|
1251
|
+
* This can be used to modify and sanitize rule sets before they are used to perform queries.
|
|
1121
1252
|
*
|
|
1122
|
-
* @param ruleSet
|
|
1123
|
-
* @param transformFn
|
|
1253
|
+
* @param ruleSet Query builder rule set to transform.
|
|
1254
|
+
* @param transformFn Transform function
|
|
1255
|
+
* @returns A new {@link FlowQueryBuilderRuleSet} with transformed rules.
|
|
1124
1256
|
*/
|
|
1125
1257
|
declare function transformRuleSet(ruleSet: FlowQueryBuilderRuleSet, transformFn: (rule: FlowQueryBuilderRule) => FlowQueryBuilderRule | undefined, clone?: boolean): FlowQueryBuilderRuleSet;
|
|
1126
1258
|
/**
|
|
1127
|
-
* Helper
|
|
1259
|
+
* Helper function to determine if the supplied argument is a {@link FlowQueryBuilderRule}
|
|
1128
1260
|
*/
|
|
1129
1261
|
declare const isRule: (r: unknown) => r is FlowQueryBuilderRule;
|
|
1262
|
+
/**
|
|
1263
|
+
* Helper function to determine if the supplied argument is a {@link FlowQueryBuilderRuleSet}
|
|
1264
|
+
*/
|
|
1130
1265
|
declare const isRuleSet: (r: unknown) => r is FlowQueryBuilderRuleSet;
|
|
1266
|
+
/**
|
|
1267
|
+
* Helper function to determine if the supplied argument is a {@link FlowQueryBuilderRule} or {@link FlowQueryBuilderRuleSet}
|
|
1268
|
+
*/
|
|
1131
1269
|
declare const isRuleOrRuleset: (r: unknown) => r is FlowQueryBuilderRule | FlowQueryBuilderRuleSet;
|
|
1132
1270
|
|
|
1133
1271
|
declare const converter$1: FlowQueryBuilderConverter;
|
|
@@ -1135,7 +1273,19 @@ declare const converter$1: FlowQueryBuilderConverter;
|
|
|
1135
1273
|
declare const converter: FlowQueryBuilderConverter;
|
|
1136
1274
|
|
|
1137
1275
|
/**
|
|
1138
|
-
*
|
|
1276
|
+
* Call this function to register all Flo.w RDF UI custom elements.
|
|
1277
|
+
*
|
|
1278
|
+
* Alternatively, you can register each required custom element individually
|
|
1279
|
+
* using the `define` method of the custom element class as shown below:
|
|
1280
|
+
*
|
|
1281
|
+
* ```typescript
|
|
1282
|
+
* // Selectively register the `<flow-ui-alert>` custom element
|
|
1283
|
+
* import { FlowAlert } from '@emuanalytics/flow-rdf-ui';
|
|
1284
|
+
* FlowAlert.define('flow-ui-alert');
|
|
1285
|
+
* ```
|
|
1286
|
+
*
|
|
1287
|
+
* This function is called automatically when using the `flow-rdf-angular`
|
|
1288
|
+
* support library.
|
|
1139
1289
|
*/
|
|
1140
1290
|
declare function registerComponents(): void;
|
|
1141
1291
|
|
|
@@ -1157,25 +1307,7 @@ interface ExistsOptions {
|
|
|
1157
1307
|
}
|
|
1158
1308
|
/** Registers one or more translations */
|
|
1159
1309
|
declare function registerTranslation(...translation: Translation$1[]): void;
|
|
1160
|
-
/**
|
|
1161
|
-
* Localize Reactive Controller for components built with Lit
|
|
1162
|
-
*
|
|
1163
|
-
* To use this controller, import the class and instantiate it in a custom element constructor:
|
|
1164
|
-
*
|
|
1165
|
-
* private localize = new LocalizeController(this);
|
|
1166
|
-
*
|
|
1167
|
-
* This will add the element to the set and make it respond to changes to <html dir|lang> automatically. To make it
|
|
1168
|
-
* respond to changes to its own dir|lang properties, make it a property:
|
|
1169
|
-
*
|
|
1170
|
-
* @property() dir: string;
|
|
1171
|
-
* @property() lang: string;
|
|
1172
|
-
*
|
|
1173
|
-
* To use a translation method, call it like this:
|
|
1174
|
-
*
|
|
1175
|
-
* ${this.localize.term('term_key_here')}
|
|
1176
|
-
* ${this.localize.date('2021-12-03')}
|
|
1177
|
-
* ${this.localize.number(1000000)}
|
|
1178
|
-
*/
|
|
1310
|
+
/** @internal */
|
|
1179
1311
|
declare class LocalizeController$1<UserTranslation extends Translation$1 = DefaultTranslation> implements ReactiveController {
|
|
1180
1312
|
host: ReactiveControllerHost & HTMLElement;
|
|
1181
1313
|
constructor(host: ReactiveControllerHost & HTMLElement);
|
|
@@ -1204,6 +1336,7 @@ declare class LocalizeController$1<UserTranslation extends Translation$1 = Defau
|
|
|
1204
1336
|
relativeTime(value: number, unit: Intl.RelativeTimeFormatUnit, options?: Intl.RelativeTimeFormatOptions): string;
|
|
1205
1337
|
}
|
|
1206
1338
|
|
|
1339
|
+
/** @internal */
|
|
1207
1340
|
declare class LocalizeController extends LocalizeController$1<Translation> {
|
|
1208
1341
|
}
|
|
1209
1342
|
|
|
@@ -1233,6 +1366,12 @@ interface Translation extends Translation$1 {
|
|
|
1233
1366
|
toggleColorFormat: string;
|
|
1234
1367
|
}
|
|
1235
1368
|
|
|
1369
|
+
/**
|
|
1370
|
+
* Initializes the the `flow-rdf-ui` library.
|
|
1371
|
+
*
|
|
1372
|
+
* This function is called automatically when using the `flow-rdf-angular`
|
|
1373
|
+
* support library.
|
|
1374
|
+
*/
|
|
1236
1375
|
declare function initialize(): void;
|
|
1237
1376
|
|
|
1238
1377
|
/**
|
|
@@ -1440,7 +1579,7 @@ declare global {
|
|
|
1440
1579
|
declare class FlowUiBadge extends FlowRdfElement {
|
|
1441
1580
|
static styles: CSSResultGroup;
|
|
1442
1581
|
/** The badge's theme variant. */
|
|
1443
|
-
variant: 'primary' | 'success' | 'neutral' | 'warning' | 'danger';
|
|
1582
|
+
variant: 'primary' | 'secondary' | 'success' | 'neutral' | 'warning' | 'danger';
|
|
1444
1583
|
/** Draws a pill-style badge with rounded edges. */
|
|
1445
1584
|
pill: boolean;
|
|
1446
1585
|
/** Makes the badge pulsate to draw attention. */
|
|
@@ -1940,8 +2079,6 @@ declare global {
|
|
|
1940
2079
|
*
|
|
1941
2080
|
* - Consistent theming with other flow-rdf-ui components.
|
|
1942
2081
|
* - Additional plugins and charts types for commonly-used charts.
|
|
1943
|
-
* - Convenience child components (`flow-ui-chart-data` and `flow-ui-chart-scale`) for defining chart data and scales.
|
|
1944
|
-
*
|
|
1945
2082
|
* @tagname flow-ui-chart
|
|
1946
2083
|
* @summary The chart component displays Chart.js charts.
|
|
1947
2084
|
*
|
|
@@ -3321,7 +3458,7 @@ declare global {
|
|
|
3321
3458
|
* @dependency flow-ui-dialog
|
|
3322
3459
|
* @dependency flow-ui-button
|
|
3323
3460
|
*
|
|
3324
|
-
* @slot
|
|
3461
|
+
* @slot title - The gauge's title. Alternatively, you can use the `title` attribute.
|
|
3325
3462
|
* @slot value - The gauge's value. Alternatively, you can use the `value` attribute.
|
|
3326
3463
|
* @slot unit - Alternatively, you can use the `unit` attribute.
|
|
3327
3464
|
* @slot info - The content to display in the gauge's info dialog. If this is set then an info button will be displayed in the gauge's header.
|
|
@@ -3329,17 +3466,16 @@ declare global {
|
|
|
3329
3466
|
* @csspart base - The component's base wrapper.
|
|
3330
3467
|
* @csspart header - The gauge's header.
|
|
3331
3468
|
* @csspart header-icon - The icon in the gauge's header.
|
|
3332
|
-
* @csspart
|
|
3469
|
+
* @csspart title - The text in the gauge's header.
|
|
3333
3470
|
* @csspart info-button - The info button in the gauge's header (if info dialog configured).
|
|
3334
|
-
*
|
|
3335
3471
|
*/
|
|
3336
3472
|
declare class FlowUiGauge extends FlowRdfElement {
|
|
3337
3473
|
static styles: CSSResultGroup;
|
|
3338
3474
|
private readonly hasSlotController;
|
|
3339
3475
|
private _formatter;
|
|
3340
3476
|
private _infoDialog;
|
|
3341
|
-
/** The
|
|
3342
|
-
|
|
3477
|
+
/** The title text of the gauge. Alternatively, use the `title` slot to enhance the title with HTML markup. */
|
|
3478
|
+
title: string;
|
|
3343
3479
|
/** The units of the gauge value. */
|
|
3344
3480
|
units: string;
|
|
3345
3481
|
/** The value to display in the gauge. */
|