@emuanalytics/flow-rdf-ui 0.0.28 → 0.0.30

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/index.d.mts CHANGED
@@ -424,10 +424,8 @@ declare global {
424
424
  }
425
425
 
426
426
  /**
427
+ * @tagname flow-ui-alert
427
428
  * @summary Alerts are used to display important messages inline or as toast notifications.
428
- * @documentation https://developer.emu-analytics.net/docs/flow-ui-rdf/components/alert
429
- * @status stable
430
- * @since 2.0
431
429
  *
432
430
  * @dependency flow-ui-icon-button
433
431
  *
@@ -487,6 +485,7 @@ declare class FlowAlert extends FlowRdfElement {
487
485
  toast(): Promise<void>;
488
486
  render(): lit.TemplateResult<1>;
489
487
  }
488
+
490
489
  declare global {
491
490
  interface HTMLElementTagNameMap {
492
491
  'flow-ui-alert': FlowAlert;
@@ -495,7 +494,7 @@ declare global {
495
494
 
496
495
  /**
497
496
  * @summary Animate elements declaratively with nearly 100 baked-in presets, or roll your own with custom keyframes. Powered by the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API).
498
- * @documentation https://developer.emu-analytics.net/docs/flow-ui-rdf/components/animation
497
+ * @documentation https://shoelace.style/components/animation
499
498
  * @status stable
500
499
  * @since 2.0
501
500
  *
@@ -506,7 +505,7 @@ declare global {
506
505
  * @slot - The element to animate. Avoid slotting in more than one element, as subsequent ones will be ignored. To
507
506
  * animate multiple elements, either wrap them in a single container or use multiple `<flow-ui-animation>` elements.
508
507
  */
509
- declare class FlowAnimation extends FlowRdfElement {
508
+ declare class SlAnimation extends FlowRdfElement {
510
509
  static styles: CSSResultGroup;
511
510
  private animation?;
512
511
  private hasStarted;
@@ -528,7 +527,7 @@ declare class FlowAnimation extends FlowRdfElement {
528
527
  /** The number of milliseconds each iteration of the animation takes to complete. */
529
528
  duration: number;
530
529
  /**
531
- * The easing function to use for the animation. This can be a Flo.w RDF UI easing function or a custom easing function
530
+ * The easing function to use for the animation. This can be a Shoelace easing function or a custom easing function
532
531
  * such as `cubic-bezier(0, 1, .76, 1.14)`.
533
532
  */
534
533
  easing: string;
@@ -549,7 +548,7 @@ declare class FlowAnimation extends FlowRdfElement {
549
548
  */
550
549
  playbackRate: number;
551
550
  /** Gets and sets the current animation time. */
552
- get currentTime(): number;
551
+ get currentTime(): CSSNumberish;
553
552
  set currentTime(time: number);
554
553
  connectedCallback(): void;
555
554
  disconnectedCallback(): void;
@@ -567,9 +566,10 @@ declare class FlowAnimation extends FlowRdfElement {
567
566
  finish(): void;
568
567
  render(): lit.TemplateResult<1>;
569
568
  }
569
+
570
570
  declare global {
571
571
  interface HTMLElementTagNameMap {
572
- 'flow-ui-animation': FlowAnimation;
572
+ 'flow-ui-animation': SlAnimation;
573
573
  }
574
574
  }
575
575
 
@@ -1185,6 +1185,7 @@ declare global {
1185
1185
  */
1186
1186
  declare class FlowCheckbox extends FlowRdfElement implements FlowRdfFormControl {
1187
1187
  static styles: CSSResultGroup;
1188
+ private readonly hasSlotController;
1188
1189
  private readonly formControlController;
1189
1190
  input: HTMLInputElement;
1190
1191
  private hasFocus;
@@ -1300,15 +1301,6 @@ declare global {
1300
1301
  }
1301
1302
  }
1302
1303
 
1303
- type FlowSelectEvent = CustomEvent<{
1304
- item: FlowMenuItem;
1305
- }>;
1306
- declare global {
1307
- interface GlobalEventHandlersEventMap {
1308
- 'flow-ui-select': FlowSelectEvent;
1309
- }
1310
- }
1311
-
1312
1304
  /**
1313
1305
  * @summary Menus provide a list of options for the user to choose from.
1314
1306
  * @documentation https://developer.emu-analytics.net/docs/flow-ui-rdf/components/menu
@@ -1349,8 +1341,9 @@ declare global {
1349
1341
  }
1350
1342
 
1351
1343
  /**
1344
+ * @tagname flow-ui-dropdown
1352
1345
  * @summary Dropdowns expose additional content that "drops down" in a panel.
1353
- * @documentation https://developer.emu-analytics.net/docs/flow-ui-rdf/components/dropdown
1346
+ * @documentation https://shoelace.style/components/dropdown
1354
1347
  * @status stable
1355
1348
  * @since 2.0
1356
1349
  *
@@ -1364,19 +1357,24 @@ declare global {
1364
1357
  * @event flow-ui-hide - Emitted when the dropdown closes.
1365
1358
  * @event flow-ui-after-hide - Emitted after the dropdown closes and all animations are complete.
1366
1359
  *
1367
- * @csspart base - The component's base wrapper.
1360
+ * @csspart base - The component's base wrapper, an `<flow-ui-popup>` element.
1361
+ * @csspart base__popup - The popup's exported `popup` part. Use this to target the tooltip's popup container.
1368
1362
  * @csspart trigger - The container that wraps the trigger.
1369
1363
  * @csspart panel - The panel that gets shown when the dropdown is open.
1370
1364
  *
1371
1365
  * @animation dropdown.show - The animation to use when showing the dropdown.
1372
1366
  * @animation dropdown.hide - The animation to use when hiding the dropdown.
1373
1367
  */
1374
- declare class FlowDropdown extends FlowRdfElement {
1368
+ declare class SlDropdown extends FlowRdfElement {
1375
1369
  static styles: CSSResultGroup;
1370
+ static dependencies: {
1371
+ 'flow-ui-popup': typeof SlPopup;
1372
+ };
1376
1373
  popup: SlPopup;
1377
1374
  trigger: HTMLSlotElement;
1378
1375
  panel: HTMLSlotElement;
1379
1376
  private readonly localize;
1377
+ private closeWatcher;
1380
1378
  /**
1381
1379
  * Indicates whether or not the dropdown is open. You can toggle this attribute to show and hide the dropdown, or you
1382
1380
  * can use the `show()` and `hide()` methods and this attribute will reflect the dropdown's open state.
@@ -1403,28 +1401,26 @@ declare class FlowDropdown extends FlowRdfElement {
1403
1401
  distance: number;
1404
1402
  /** The distance in pixels from which to offset the panel along its trigger. */
1405
1403
  skidding: number;
1406
- /**
1407
- * Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and
1408
- * `--arrow-color` custom properties. For additional customizations, you can also target the arrow using
1409
- * `::part(arrow)` in your stylesheet.
1410
- */
1411
- arrow: boolean;
1412
1404
  /**
1413
1405
  * Enable this option to prevent the panel from being clipped when the component is placed inside a container with
1414
1406
  * `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.
1415
1407
  */
1416
1408
  hoist: boolean;
1409
+ /**
1410
+ * Syncs the popup width or height to that of the trigger element.
1411
+ */
1412
+ sync: 'width' | 'height' | 'both' | undefined;
1417
1413
  connectedCallback(): void;
1418
1414
  firstUpdated(): void;
1419
1415
  disconnectedCallback(): void;
1420
1416
  focusOnTrigger(): void;
1421
1417
  getMenu(): FlowMenu | undefined;
1422
- handleKeyDown(event: KeyboardEvent): void;
1423
- handleDocumentKeyDown(event: KeyboardEvent): void;
1424
- handleDocumentMouseDown(event: MouseEvent): void;
1425
- handlePanelSelect(event: FlowSelectEvent): void;
1418
+ private handleKeyDown;
1419
+ private handleDocumentKeyDown;
1420
+ private handleDocumentMouseDown;
1421
+ private handlePanelSelect;
1426
1422
  handleTriggerClick(): void;
1427
- handleTriggerKeyDown(event: KeyboardEvent): void;
1423
+ handleTriggerKeyDown(event: KeyboardEvent): Promise<void>;
1428
1424
  handleTriggerKeyUp(event: KeyboardEvent): void;
1429
1425
  handleTriggerSlotChange(): void;
1430
1426
  updateAccessibleTrigger(): void;
@@ -1445,11 +1441,12 @@ declare class FlowDropdown extends FlowRdfElement {
1445
1441
 
1446
1442
  declare global {
1447
1443
  interface HTMLElementTagNameMap {
1448
- 'flow-ui-dropdown': FlowDropdown;
1444
+ 'flow-ui-dropdown': SlDropdown;
1449
1445
  }
1450
1446
  }
1451
1447
 
1452
1448
  /**
1449
+ * @tagname flow-ui-input
1453
1450
  * @summary Inputs collect data from the user.
1454
1451
  * @documentation https://developer.emu-analytics.net/docs/flow-ui-rdf/components/input
1455
1452
  * @status stable
@@ -1617,6 +1614,7 @@ declare class FlowInput extends FlowRdfElement implements FlowRdfFormControl {
1617
1614
  setCustomValidity(message: string): void;
1618
1615
  render(): lit.TemplateResult<1>;
1619
1616
  }
1617
+
1620
1618
  declare global {
1621
1619
  interface HTMLElementTagNameMap {
1622
1620
  'flow-ui-input': FlowInput;
@@ -1702,7 +1700,7 @@ declare class FlowColorPicker extends FlowRdfElement implements FlowRdfFormContr
1702
1700
  private readonly localize;
1703
1701
  base: HTMLElement;
1704
1702
  input: FlowInput;
1705
- dropdown: FlowDropdown;
1703
+ dropdown: SlDropdown;
1706
1704
  previewButton: HTMLButtonElement;
1707
1705
  trigger: HTMLButtonElement;
1708
1706
  private hasFocus;
@@ -2367,10 +2365,13 @@ declare global {
2367
2365
  * @tagname flow-ui-number-stepper
2368
2366
  * @summary Number steppers are specialized input fields for selecting numbers.
2369
2367
  */
2370
- declare class FlowNumberStepper extends FlowRdfElement {
2368
+ declare class FlowNumberStepper extends FlowRdfElement implements FlowRdfFormControl {
2371
2369
  static styles: CSSResultGroup;
2370
+ private readonly formControlController;
2372
2371
  private _input;
2373
2372
  private _formatter;
2373
+ /** The name of the input, submitted as a name/value pair with form data. */
2374
+ name: string;
2374
2375
  value: number | '';
2375
2376
  step: number;
2376
2377
  min: number;
@@ -2378,11 +2379,24 @@ declare class FlowNumberStepper extends FlowRdfElement {
2378
2379
  format: string;
2379
2380
  size: 'small' | 'medium' | 'large';
2380
2381
  placeholder: string;
2382
+ /** Gets the validity state object */
2383
+ get validity(): ValidityState;
2384
+ /** Gets the validation message */
2385
+ get validationMessage(): string;
2386
+ /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
2387
+ checkValidity(): boolean;
2388
+ /** Gets the associated form, if one exists. */
2389
+ getForm(): HTMLFormElement | null;
2390
+ /** Checks for validity and shows the browser's validation message if the control is invalid. */
2391
+ reportValidity(): boolean;
2392
+ /** Sets a custom validation message. Pass an empty string to restore validity. */
2393
+ setCustomValidity(message: string): void;
2394
+ firstUpdated(): void;
2381
2395
  connectedCallback(): void;
2382
2396
  disconnectedCallback(): void;
2383
2397
  stepUp(emitEvent?: boolean): void;
2384
2398
  stepDown(emitEvent?: boolean): void;
2385
- handleValueChange(): void;
2399
+ handleValueChange(): Promise<void>;
2386
2400
  handleFormatChange(): void;
2387
2401
  private handleInputChange;
2388
2402
  private clampValue;
@@ -2494,7 +2508,7 @@ declare class FlowPanelHeader extends FlowRdfElement {
2494
2508
 
2495
2509
  declare global {
2496
2510
  interface HTMLElementTagNameMap {
2497
- 'fliow-ui-panel-header': FlowPanelHeader;
2511
+ 'flow-ui-panel-header': FlowPanelHeader;
2498
2512
  }
2499
2513
  }
2500
2514
 
@@ -2601,6 +2615,220 @@ declare global {
2601
2615
  }
2602
2616
  }
2603
2617
 
2618
+ interface FlowQueryBuilderRuleSet {
2619
+ condition: string;
2620
+ rules: Array<FlowQueryBuilderRuleSet | FlowQueryBuilderRule>;
2621
+ }
2622
+ interface FlowQueryBuilderRule<ValueType = any> {
2623
+ field?: string;
2624
+ value?: ValueType;
2625
+ operator?: string;
2626
+ enabled?: boolean;
2627
+ }
2628
+ interface FlowQueryBuilderOption {
2629
+ name: string;
2630
+ value: string;
2631
+ }
2632
+ interface FlowQueryBuilderFieldMap {
2633
+ [key: string]: FlowQueryBuilderField;
2634
+ }
2635
+ interface FlowQueryBuilderFieldBase<ValueType = any> {
2636
+ name: string;
2637
+ type: string;
2638
+ value?: ValueType;
2639
+ nullable?: boolean;
2640
+ operators?: string[];
2641
+ defaultValue?: ValueType | (() => ValueType);
2642
+ defaultOperator?: string;
2643
+ convertValue?: (value: ValueType) => any;
2644
+ validator?: (rule: FlowQueryBuilderRule<ValueType>) => string;
2645
+ }
2646
+ interface FlowQueryBuilderStringField extends FlowQueryBuilderFieldBase<string> {
2647
+ type: 'string';
2648
+ }
2649
+ interface FlowQueryBuilderNumberField extends FlowQueryBuilderFieldBase<number> {
2650
+ type: 'number';
2651
+ min?: number;
2652
+ max?: number;
2653
+ step?: number;
2654
+ }
2655
+ interface FlowQueryBuilderDateTimeFieldBase extends FlowQueryBuilderFieldBase<string> {
2656
+ dateFormat?: string | (() => string);
2657
+ timezone?: string | (() => string);
2658
+ locale?: string | (() => string);
2659
+ }
2660
+ interface FlowQueryBuilderDateTimeField extends FlowQueryBuilderDateTimeFieldBase {
2661
+ type: 'datetime';
2662
+ }
2663
+ interface FlowQueryBuilderDateField extends FlowQueryBuilderDateTimeFieldBase {
2664
+ type: 'date';
2665
+ }
2666
+ interface FlowQueryBuilderTimeField extends FlowQueryBuilderDateTimeFieldBase {
2667
+ type: 'time';
2668
+ }
2669
+ interface FlowQueryBuilderSelectField extends FlowQueryBuilderFieldBase<string> {
2670
+ type: 'select';
2671
+ options?: FlowQueryBuilderOption[];
2672
+ }
2673
+ interface FlowQueryBuilderMultiSelectField extends FlowQueryBuilderFieldBase<string[]> {
2674
+ type: 'multiselect';
2675
+ options?: FlowQueryBuilderOption[];
2676
+ }
2677
+ interface FlowQueryBuilderFieldTypeMap {
2678
+ string: FlowQueryBuilderStringField;
2679
+ number: FlowQueryBuilderNumberField;
2680
+ datetime: FlowQueryBuilderDateTimeField;
2681
+ date: FlowQueryBuilderDateField;
2682
+ time: FlowQueryBuilderTimeField;
2683
+ select: FlowQueryBuilderSelectField;
2684
+ multiselect: FlowQueryBuilderMultiSelectField;
2685
+ }
2686
+ type FlowQueryBuilderFieldType = keyof FlowQueryBuilderFieldTypeMap;
2687
+ type FlowQueryBuilderField = FlowQueryBuilderFieldTypeMap[keyof FlowQueryBuilderFieldTypeMap];
2688
+ type FlowQueryBuilderTemplateFn<FieldType extends FlowQueryBuilderFieldType> = (rule: FlowQueryBuilderRule<FlowQueryBuilderFieldTypeMap[FieldType]['value']>, field: FlowQueryBuilderFieldTypeMap[FieldType], qb: FlowQueryBuilder, update: () => void) => TemplateResult;
2689
+ interface FlowQueryBuilderConfig {
2690
+ fields: FlowQueryBuilderFieldMap;
2691
+ }
2692
+ interface FlowQueryBuilderFieldDefinition<Field extends FlowQueryBuilderFieldType> {
2693
+ operators: string[];
2694
+ template: FlowQueryBuilderTemplateFn<Field>;
2695
+ }
2696
+ interface FlowQueryBuilderConverterOptions {
2697
+ includeFields?: string[];
2698
+ excludeFields?: string[];
2699
+ renameFields?: Record<string, string>;
2700
+ }
2701
+ type FlowQueryBuilderConverter = (ruleSet: FlowQueryBuilderRuleSet, config: FlowQueryBuilderConfig, options?: FlowQueryBuilderConverterOptions) => any;
2702
+
2703
+ type NoUnion<T, U = T> = T extends U ? ([U] extends [T] ? T : never) : never;
2704
+ /**
2705
+ * @tagname flow-ui-query-builder
2706
+ * @summary Query builder component
2707
+ *
2708
+ * @event flow-ui-change - Emitted when the control's value changes.
2709
+ */
2710
+ declare class FlowQueryBuilder extends FlowRdfElement {
2711
+ static styles: CSSResultGroup;
2712
+ private static fieldDefinitions;
2713
+ /**
2714
+ * Register a custom field definition.
2715
+ *
2716
+ * A field definition is used to add support for a custom field type. A field type comprises:
2717
+ *
2718
+ * - a field `type` string
2719
+ * - a `template` function that returns the template for the field's value control
2720
+ * - an array of `operators` that are valid for the field
2721
+ *
2722
+ * @param type
2723
+ * @param fieldDefinition
2724
+ */
2725
+ static registerFieldDefinition<T extends FlowQueryBuilderFieldType>(type: T, fieldDefinition: FlowQueryBuilderFieldDefinition<NoUnion<T>>): void;
2726
+ /**
2727
+ *
2728
+ */
2729
+ static convertToFlowQuery: FlowQueryBuilderConverter;
2730
+ /**
2731
+ * Static helper method to determine if supplied argument is
2732
+ * a `FlowQueryBuilderRule`.
2733
+ *
2734
+ * @param value A value to test
2735
+ */
2736
+ static isRule(value: unknown): value is FlowQueryBuilderRule;
2737
+ /**
2738
+ * Static helper method to determine if supplied argument is
2739
+ * a `FlowQueryBuilderRuleSet`.
2740
+ *
2741
+ * @param value A value to test
2742
+ * @returns `true` if supplied value is a FlowQueryBuilderRuleSet
2743
+ */
2744
+ static isRuleSet(value: unknown): value is FlowQueryBuilderRuleSet;
2745
+ /**
2746
+ * Static helper method to recursively filter a `FlowQueryBuilderRuleSet`.
2747
+ *
2748
+ * This can be used to sanitize user queries before they are executed.
2749
+ *
2750
+ * @param ruleset Rule set to filter
2751
+ * @param options Fields to include or exclude
2752
+ * @returns The filtered rule set
2753
+ */
2754
+ static filterRuleSet(ruleset: FlowQueryBuilderRuleSet, options: {
2755
+ excludeFields?: string[];
2756
+ includeFields?: string[];
2757
+ }): FlowQueryBuilderRuleSet;
2758
+ /**
2759
+ * Static helper method to rename fields in a `FlowQueryBuilderRuleSet`.
2760
+ *
2761
+ * @param ruleSet A `FlowQueryBuilderRuleSet` to rename.
2762
+ * @param replacements Mapping of string to string for renaming fields.
2763
+ * @returns The renamed rule set.
2764
+ */
2765
+ static renameRuleSetFields(ruleset: FlowQueryBuilderRuleSet, replacements: Record<string, string>): FlowQueryBuilderRuleSet;
2766
+ /**
2767
+ * Static helper method to recursively apply a transform function to each rule
2768
+ * in a `FlowQueryBuilderRuleSet`.
2769
+ *
2770
+ * The transform fn should expect a single FlowQueryBuilderRule and return:
2771
+ *
2772
+ * - the same rule unmodifed or modified in place
2773
+ * - `undefined` to exclude the rule from the rule set
2774
+ *
2775
+ * This can be used to sanitize rule sets before they are used to perform queries.
2776
+ *
2777
+ * @param ruleSet query builder rule set
2778
+ * @param transformFn transform function
2779
+ * @returns The modified rule set
2780
+ */
2781
+ static transformRuleSet(ruleSet: FlowQueryBuilderRuleSet, transformFn: (rule: FlowQueryBuilderRule) => FlowQueryBuilderRule | undefined): FlowQueryBuilderRuleSet;
2782
+ private readonly hasSlotController;
2783
+ /** The query builder's value object. */
2784
+ value: FlowQueryBuilderRuleSet;
2785
+ /** The query builder's configuration object. */
2786
+ config: FlowQueryBuilderConfig;
2787
+ /** The query builder's size. */
2788
+ size: 'small' | 'medium' | 'large';
2789
+ /** Disables the select control. */
2790
+ disabled: boolean;
2791
+ /** The query builders's label. If you need to display HTML, use the `label` slot instead. */
2792
+ label: string;
2793
+ /** The query builders's help text. If you need to display HTML, use the `help-text` slot instead. */
2794
+ helpText: string;
2795
+ /** Display tree connector lines between query rules */
2796
+ treeLines: boolean;
2797
+ /** @internal */
2798
+ subQueryBuilder: boolean;
2799
+ private valueTemplateForRule;
2800
+ private getDefault;
2801
+ private handleAddRule;
2802
+ private handleAddRuleSet;
2803
+ /**
2804
+ * Handles removal of a rule set (displayed by a sub-query builder) in response to a remove event.
2805
+ *
2806
+ * @param ev
2807
+ * @param index
2808
+ */
2809
+ private handleRemoveRule;
2810
+ private handleSubQueryValueChange;
2811
+ private handleFieldChanged;
2812
+ private handleOperatorChanged;
2813
+ private handleEnabledChanged;
2814
+ private handleConditionChange;
2815
+ private emitValueChange;
2816
+ private operatorsForField;
2817
+ private defaultOperatorsForFieldType;
2818
+ private toolbarTemplate;
2819
+ private ruleTemplate;
2820
+ private ruleValueTemplate;
2821
+ private subQueryBuilderTemplate;
2822
+ private emptyRulesetTemplate;
2823
+ render(): lit.TemplateResult<1>;
2824
+ }
2825
+
2826
+ declare global {
2827
+ interface HTMLElementTagNameMap {
2828
+ 'flow-ui-query-builder': FlowQueryBuilder;
2829
+ }
2830
+ }
2831
+
2604
2832
  interface FormControlControllerOptions {
2605
2833
  /** A function that returns the form containing the form control. */
2606
2834
  form: (input: FlowRdfFormControl) => HTMLFormElement | null;
@@ -3196,7 +3424,7 @@ declare class FlowPanelDivider extends FlowRdfElement {
3196
3424
 
3197
3425
  declare global {
3198
3426
  interface HTMLElementTagNameMap {
3199
- 'fliow-ui-split-view-divider': FlowPanelDivider;
3427
+ 'flow-ui-split-view-divider': FlowPanelDivider;
3200
3428
  }
3201
3429
  }
3202
3430
 
@@ -3376,8 +3604,8 @@ declare global {
3376
3604
  */
3377
3605
  declare class FlowStepper extends FlowRdfElement {
3378
3606
  static styles: CSSResultGroup;
3379
- bodySlot: HTMLSlotElement;
3380
- headerScrollContainer: HTMLDivElement;
3607
+ private bodySlot;
3608
+ private headerScrollContainer;
3381
3609
  private readonly attrId;
3382
3610
  private readonly componentId;
3383
3611
  private activePanel?;
@@ -3426,7 +3654,7 @@ declare global {
3426
3654
  declare class FlowSwitch extends FlowRdfElement implements FlowRdfFormControl {
3427
3655
  static styles: CSSResultGroup;
3428
3656
  private readonly formControlController;
3429
- input: HTMLInputElement;
3657
+ private input;
3430
3658
  private hasFocus;
3431
3659
  title: string;
3432
3660
  /** The name of the switch, submitted as a name/value pair with form data. */
@@ -3792,12 +4020,70 @@ declare global {
3792
4020
  }
3793
4021
 
3794
4022
  /**
3795
-
4023
+ * The timer component is the primary time control for Flo.w time-based visualizations. The current timer value is typically bound to a reactive state property
4024
+ * so that reactive queries and computed state will be re-evaluated when the timer changes.
4025
+ *
4026
+ * The timer value is an ISO8601 date/time string.
4027
+ *
4028
+ * The timer operates in two modes:
4029
+ *
4030
+ * - running - the timer is set to 'real time' and updates every second.
4031
+ * - paused - the timer is set to a specific time and does not update automatically.
4032
+ *
4033
+ * Selecting a date/time with the timer step controls or the popup calendar will set the timer to paused mode.
4034
+ * Clicking the play button switches the timer to 'real time' running mode.
4035
+ * The mode can also be set programmatically using the `running` attribute.
4036
+ *
4037
+ * @tagname flow-ui-timer
4038
+ * @summary The timer component is the primary time control for Flo.w time-based visualizations.
4039
+ *
4040
+ * @event flow-ui-change - Emitted when the control's value changes.
4041
+ * @event flow-ui-input - Emitted when the control receives input.
3796
4042
  */
3797
4043
  declare class FlowTimer extends FlowRdfElement {
3798
4044
  static styles: CSSResultGroup;
4045
+ private ticker;
4046
+ private tickerSubscription;
4047
+ private minorStepDuration;
4048
+ private majorStepDuration;
4049
+ private dropdown;
4050
+ private calendar;
4051
+ private _displayDateTime;
4052
+ /**
4053
+ * The value of the timer. (ISO8601 date/time string)
4054
+ */
4055
+ value: string;
4056
+ /**
4057
+ * The timezone to use for display. (IANA timezone string).
4058
+ * If not set, the timezone will be the browser's local timezone.
4059
+ */
4060
+ timezone?: string;
4061
+ /**
4062
+ * The locale to use for display. (IETF BCP 47 language tag).
4063
+ * If not set, the locale will be the browser's default locale.
4064
+ */
4065
+ locale?: string;
4066
+ running: boolean;
4067
+ dateFormat: string;
4068
+ dayFormat: string;
4069
+ timeFormat: string;
4070
+ zoneFormat: string;
4071
+ majorStep: string;
4072
+ minorStep: string;
4073
+ hideZone: boolean;
3799
4074
  connectedCallback(): void;
3800
4075
  disconnectedCallback(): void;
4076
+ /**
4077
+ * @internal
4078
+ */
4079
+ updateDisplayValue(): void;
4080
+ updateParsedSteps(): void;
4081
+ updateRunning(): void;
4082
+ private setDisplayDateTime;
4083
+ private handleDateTimeKeyDown;
4084
+ private handleCalendarChange;
4085
+ private handlePlayPauseClicked;
4086
+ private handleStepClicked;
3801
4087
  render(): lit.TemplateResult<1>;
3802
4088
  }
3803
4089
 
@@ -4112,14 +4398,19 @@ declare function escapeMaplibreString(value: string): string;
4112
4398
  /**
4113
4399
  * @tagname flow-ui-tool-button-group
4114
4400
  * @summary Tool buttons groups are used to build toolbars.
4401
+ *
4402
+ * @event flow-ui-change - Emitted when the control's value changes.
4403
+ * @event flow-ui-input - Emitted when the control receives input.
4404
+ *
4405
+ *
4115
4406
  */
4116
4407
  declare class FlowToolButtonGroup extends FlowRdfElement implements FlowRdfFormControl {
4117
4408
  static styles: CSSResultGroup;
4409
+ /** @internal */
4118
4410
  protected readonly formControlController: FormControlController;
4119
4411
  private customValidityMessage;
4120
4412
  private validationTimeout;
4121
- defaultSlot: HTMLSlotElement;
4122
- validationInput: HTMLInputElement;
4413
+ private validationInput;
4123
4414
  private errorMessage;
4124
4415
  /**
4125
4416
  * The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot
@@ -4162,10 +4453,15 @@ declare class FlowToolButtonGroup extends FlowRdfElement implements FlowRdfFormC
4162
4453
  private handleInvalid;
4163
4454
  private syncButtons;
4164
4455
  private updateCheckedButtons;
4456
+ /** @internal */
4165
4457
  handleSizeChange(): void;
4458
+ /** @internal */
4166
4459
  handleOutlineChange(): void;
4460
+ /** @internal */
4167
4461
  handlePillChange(): void;
4462
+ /** @internal */
4168
4463
  handleValueChange(): void;
4464
+ /** @internal */
4169
4465
  updateTabbableState(): void;
4170
4466
  /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
4171
4467
  checkValidity(): boolean;
@@ -4481,6 +4777,15 @@ declare global {
4481
4777
  }
4482
4778
  }
4483
4779
 
4780
+ type FlowSelectEvent = CustomEvent<{
4781
+ item: FlowMenuItem;
4782
+ }>;
4783
+ declare global {
4784
+ interface GlobalEventHandlersEventMap {
4785
+ 'flow-ui-select': FlowSelectEvent;
4786
+ }
4787
+ }
4788
+
4484
4789
  type FlowSelectionChangeEvent = CustomEvent<{
4485
4790
  selection: FlowTreeItem[];
4486
4791
  }>;
@@ -4584,4 +4889,4 @@ declare function unregisterIconLibrary(name: string): void;
4584
4889
  declare function setDefaultLocale(locale: string): void;
4585
4890
  declare function setDefaultTimeZone(timeZone: string): void;
4586
4891
 
4587
- export { BaseColorMapperField, BaseColorStopOptions, ColorMapperField, ColorMapperOptions, ColorMapperValue, ColorStopOptions, ColorStopValue, FlowAfterCollapseEvent, FlowAfterExpandEvent, FlowAfterHideEvent, FlowAfterShowEvent, FlowAlert, FlowAnimation, FlowAvatar, FlowBadge, FlowBlurEvent, FlowBreadcrumb, FlowBreadcrumbItem, FlowButton, FlowButtonGroup, FlowCalendar, FlowCancelEvent, FlowCard, FlowCarousel, FlowCarouselItem, FlowChangeEvent, FlowChart, FlowCheckbox, FlowClearEvent, FlowCloseEvent, FlowCollapseEvent, FlowColorMapper, FlowColorPicker, FlowColorStopComponent as FlowColorStop, FlowDatetimePicker as FlowDateTimePicker, FlowDetails, FlowDialog, FlowDivider, FlowDragEndEvent, FlowDragEvent, FlowDragStartEvent, FlowDrawer, FlowDropdown, FlowErrorEvent, FlowExpandEvent, FlowFinishEvent, FlowFocusEvent, FlowGauge, FlowHideEvent, FlowHoverEvent, FlowIcon, FlowIconButton, FlowInitialFocusEvent, FlowInput, FlowInputEvent, FlowInvalidEvent, FlowLazyChangeEvent, FlowLazyLoadEvent, FlowLoadEvent, FlowMenu, FlowMenuItem, FlowMenuLabel, FlowMutationEvent, FlowMutationObserver, FlowNumberStepper, FlowOption, FlowPanel, FlowPanelHeader, FlowPanelToggleEvent, SlPopup as FlowPopup, FlowProgressBar, FlowProgressRing, FlowRadio, FlowRadioGroup, FlowRange, FlowRemoveEvent, FlowRepositionEvent, FlowRequestCloseEvent, FlowResizeEvent, FlowResizeObserver, FlowScrollView, FlowSelect, FlowSelectEvent, FlowSelectionChangeEvent, FlowShowEvent, FlowSlideChange, FlowSpinner, FlowSplitView, FlowPanelDivider as FlowSplitViewDivider, FlowSplitViewPane, FlowSplitViewToggleButton, FlowStartEvent, FlowStepper, FlowStepperPanel, FlowSwitch, FlowTab, FlowTabGroup, FlowTabHideEvent, FlowTabPanel, FlowTabShowEvent, FlowTag, FlowTextarea, FlowTimer, FlowToolButton, FlowToolButtonGroup, FlowTooltip, FlowTree, FlowTreeItem, FlowVisuallyHidden, NumberColorMapperField, NumberColorStopOptions, SelectColorMapperField, SelectColorStopOptions, StringColorMapperField, StringColorStopOptions, addIcons, colorMapperValueToMaplibreExpression, escapeMaplibreString, getAnimationNames, getBasePath, getEasingNames, initializeChartJs, registerChartComponent, registerIconLibrary, setBasePath, setDefaultLocale, setDefaultTimeZone, unregisterIconLibrary };
4892
+ export { BaseColorMapperField, BaseColorStopOptions, ColorMapperField, ColorMapperOptions, ColorMapperValue, ColorStopOptions, ColorStopValue, FlowAfterCollapseEvent, FlowAfterExpandEvent, FlowAfterHideEvent, FlowAfterShowEvent, FlowAlert, SlAnimation as FlowAnimation, FlowAvatar, FlowBadge, FlowBlurEvent, FlowBreadcrumb, FlowBreadcrumbItem, FlowButton, FlowButtonGroup, FlowCalendar, FlowCancelEvent, FlowCard, FlowCarousel, FlowCarouselItem, FlowChangeEvent, FlowChart, FlowCheckbox, FlowClearEvent, FlowCloseEvent, FlowCollapseEvent, FlowColorMapper, FlowColorPicker, FlowColorStopComponent as FlowColorStop, FlowDatetimePicker as FlowDateTimePicker, FlowDetails, FlowDialog, FlowDivider, FlowDragEndEvent, FlowDragEvent, FlowDragStartEvent, FlowDrawer, SlDropdown as FlowDropdown, FlowErrorEvent, FlowExpandEvent, FlowFinishEvent, FlowFocusEvent, FlowGauge, FlowHideEvent, FlowHoverEvent, FlowIcon, FlowIconButton, FlowInitialFocusEvent, FlowInput, FlowInputEvent, FlowInvalidEvent, FlowLazyChangeEvent, FlowLazyLoadEvent, FlowLoadEvent, FlowMenu, FlowMenuItem, FlowMenuLabel, FlowMutationEvent, FlowMutationObserver, FlowNumberStepper, FlowOption, FlowPanel, FlowPanelHeader, FlowPanelToggleEvent, SlPopup as FlowPopup, FlowProgressBar, FlowProgressRing, FlowQueryBuilder, FlowRadio, FlowRadioGroup, FlowRange, FlowRemoveEvent, FlowRepositionEvent, FlowRequestCloseEvent, FlowResizeEvent, FlowResizeObserver, FlowScrollView, FlowSelect, FlowSelectEvent, FlowSelectionChangeEvent, FlowShowEvent, FlowSlideChange, FlowSpinner, FlowSplitView, FlowPanelDivider as FlowSplitViewDivider, FlowSplitViewPane, FlowSplitViewToggleButton, FlowStartEvent, FlowStepper, FlowStepperPanel, FlowSwitch, FlowTab, FlowTabGroup, FlowTabHideEvent, FlowTabPanel, FlowTabShowEvent, FlowTag, FlowTextarea, FlowTimer, FlowToolButton, FlowToolButtonGroup, FlowTooltip, FlowTree, FlowTreeItem, FlowVisuallyHidden, NumberColorMapperField, NumberColorStopOptions, SelectColorMapperField, SelectColorStopOptions, StringColorMapperField, StringColorStopOptions, addIcons, colorMapperValueToMaplibreExpression, escapeMaplibreString, getAnimationNames, getBasePath, getEasingNames, initializeChartJs, registerChartComponent, registerIconLibrary, setBasePath, setDefaultLocale, setDefaultTimeZone, unregisterIconLibrary };