//
// Foundation 0.1.3: Blazor event handlers and typed event arguments.
// Generated by scripts/gen-blazor.mjs from custom-elements.json; do not edit. Copy this file into your project (any folder)
// next to the matching foundation.blazor.js (same version), and add "@using Remarkable.Foundation" to _Imports.razor.
//
#nullable enable
using System;
using System.Text.Json;
using Microsoft.AspNetCore.Components;
namespace Remarkable.Foundation;
///
/// Registers the Foundation events with the Razor compiler: @onrcsort, @onrctoggle, ... The Razor compiler
/// finds the attributes by this class name. foundation.blazor.js registers the same names in the browser.
///
[EventHandler("onrcaction", typeof(RcActionEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrccolumnvisibility", typeof(RcColumnVisibilityEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrccomplete", typeof(RcCompleteEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrccopy", typeof(RcCopyEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcdismiss", typeof(RcDismissEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcerror", typeof(RcErrorEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcfilter", typeof(RcFilterEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrchover", typeof(RcHoverEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcitemchange", typeof(RcItemChangeEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrclayout", typeof(RcLayoutEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcload", typeof(RcLoadEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcmonthchange", typeof(RcMonthChangeEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcmore", typeof(RcMoreEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcnextpage", typeof(RcNextPageEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcnodetoggle", typeof(RcNodeToggleEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcpage", typeof(RcPageEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcpick", typeof(RcPickEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcpoint", typeof(RcPointEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcpreviouspage", typeof(RcPreviousPageEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcready", typeof(RcReadyEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcremove", typeof(RcRemoveEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcrowclick", typeof(RcRowClickEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcselect", typeof(RcSelectEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcselectionchange", typeof(RcSelectionChangeEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcsort", typeof(RcSortEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcstatechange", typeof(RcStateChangeEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcstatuschange", typeof(RcStatusChangeEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcsubmit", typeof(RcSubmitEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcvaluechange", typeof(RcValueChangeEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcviewchange", typeof(RcViewChangeEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcbeforetoggle", typeof(RcToggleEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrctoggle", typeof(RcToggleEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcclose", typeof(RcCloseEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrccheckedchange", typeof(ChangeEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
[EventHandler("onrcpressedchange", typeof(ChangeEventArgs), enableStopPropagation: true, enablePreventDefault: true)]
public static class EventHandlers
{
/// Every DOM event name above, in the order they are declared (rc-* events, then the relayed native ones).
public static readonly string[] DomEvents = { "rc-action", "rc-column-visibility", "rc-complete", "rc-copy", "rc-dismiss", "rc-error", "rc-filter", "rc-hover", "rc-item-change", "rc-layout", "rc-load", "rc-month-change", "rc-more", "rc-next-page", "rc-node-toggle", "rc-page", "rc-pick", "rc-point", "rc-previous-page", "rc-ready", "rc-remove", "rc-row-click", "rc-select", "rc-selection-change", "rc-sort", "rc-state-change", "rc-status-change", "rc-submit", "rc-value-change", "rc-view-change", "beforetoggle", "toggle", "close" };
}
///
/// An rc-* overlay or disclosure is about to open or close (the native beforetoggle, relayed for this element only). Cancel an opening with @onrcbeforetoggle:preventDefault; a handler cannot decide it, Blazor handlers run after the event.
///
/// An rc-* overlay or disclosure opened or closed (the native toggle, relayed for this element only).
///
public class RcToggleEventArgs : EventArgs
{
/// open or closed: the state before.
public string OldState { get; set; } = "";
/// open or closed: the state after.
public string NewState { get; set; } = "";
/// True when the element is (or is becoming) open.
public bool IsOpen => NewState == "open";
}
///
/// An rc-* dialog, sheet, drawer or alert dialog closed (the native-style close), with its returnValue.
///
public class RcCloseEventArgs : EventArgs
{
/// The value the dialog closed with: a close button's or command's value, or empty.
public string ReturnValue { get; set; } = "";
}
///
/// An error an event reports, as name and message.
///
public class RcEventError
{
/// The error's name (TypeError, NotAllowedError, ...).
public string Name { get; set; } = "";
/// The error message.
public string Message { get; set; } = "";
}
///
/// rc-action (@onrcaction).
/// rc-sidebar-menu-action: the button was pressed
/// rc-sidebar-group-action: the button was pressed
/// rc-toast: a control inside rc-toast-action was activated; cancelable (cancel to keep the toast open). detail.control is the control.
///
public class RcActionEventArgs : EventArgs
{
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-column-visibility (@onrccolumnvisibility).
/// rc-data-table: a column was hidden or shown: { column, hidden } and the whole state
///
public class RcColumnVisibilityEventArgs : EventArgs
{
public string SortColumn { get; set; } = "";
public string SortDirection { get; set; } = "";
public string Query { get; set; } = "";
public JsonElement? Facets { get; set; }
public string[] HiddenColumns { get; set; } = System.Array.Empty();
public double Page { get; set; }
public double PageSize { get; set; }
public double PageCount { get; set; }
public double Total { get; set; }
public string[] Selected { get; set; } = System.Array.Empty();
public string Column { get; set; } = "";
public bool Hidden { get; set; }
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-complete (@onrccomplete).
/// rc-input-otp: { value } when every box is filled
///
public class RcCompleteEventArgs : EventArgs
{
public string Value { get; set; } = "";
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-copy (@onrccopy).
/// rc-code-block-copy-button: the code was copied; detail.value
/// rc-copy-button: the text was copied; detail.value
/// rc-json-tree: a value or path was copied; detail.value (the text), detail.path (the formatted path), detail.kind (value or path)
///
public class RcCopyEventArgs : EventArgs
{
public string Value { get; set; } = "";
public string? Path { get; set; }
public string? Kind { get; set; }
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-dismiss (@onrcdismiss).
/// rc-alert: the close button was activated; cancelable. Bubbles, composed.
///
public class RcDismissEventArgs : EventArgs
{
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-error (@onrcerror).
/// rc-async: the request failed; detail { src, status, error }
/// rc-chart: ECharts failed to load; detail { error }
/// rc-copy-button: the browser refused the copy; detail.error
/// rc-json-tree: value is not valid JSON; detail.error
///
public class RcErrorEventArgs : EventArgs
{
public string? Src { get; set; }
public double? Status { get; set; }
public JsonElement? Error { get; set; }
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-filter (@onrcfilter).
/// rc-data-table: the filter text or a faceted filter changed: the whole state
///
public class RcFilterEventArgs : EventArgs
{
public string SortColumn { get; set; } = "";
public string SortDirection { get; set; } = "";
public string Query { get; set; } = "";
public JsonElement? Facets { get; set; }
public string[] HiddenColumns { get; set; } = System.Array.Empty();
public double Page { get; set; }
public double PageSize { get; set; }
public double PageCount { get; set; }
public double Total { get; set; }
public string[] Selected { get; set; } = System.Array.Empty();
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-hover (@onrchover).
/// rc-calendar: the pointer or keyboard focus is on a day (or left the grid): { date } (ISO or null)
///
public class RcHoverEventArgs : EventArgs
{
public JsonElement? Date { get; set; }
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-item-change (@onrcitemchange).
/// rc-questionnaire: { item } before the shown item changes; preventDefault() keeps the current one
///
public class RcItemChangeEventArgs : EventArgs
{
public string Item { get; set; } = "";
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-layout (@onrclayout).
/// rc-resizable-panel-group: the panel sizes changed (a drag, a key); detail.sizes is every panel's size in percent, in order
///
public class RcLayoutEventArgs : EventArgs
{
public double[] Sizes { get; set; } = System.Array.Empty();
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-load (@onrcload).
/// rc-async: the fragment arrived and is shown; detail { src }
///
public class RcLoadEventArgs : EventArgs
{
public string Src { get; set; } = "";
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-month-change (@onrcmonthchange).
/// rc-calendar: the shown months changed: { month } (first shown month, YYYY-MM)
///
public class RcMonthChangeEventArgs : EventArgs
{
public string Month { get; set; } = "";
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-more (@onrcmore).
/// rc-pagination: Show more (or Retry) was activated
///
public class RcMoreEventArgs : EventArgs
{
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-next-page (@onrcnextpage).
/// rc-pagination-next: pressed, without href
/// rc-pagination: Next was activated
///
public class RcNextPageEventArgs : EventArgs
{
public double Page { get; set; }
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-node-toggle (@onrcnodetoggle).
/// rc-json-tree: a row was opened or closed; detail.path, detail.open
///
public class RcNodeToggleEventArgs : EventArgs
{
public string Path { get; set; } = "";
public bool Open { get; set; }
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-page (@onrcpage).
/// rc-data-table: the page or the page size changed: the whole state
/// rc-pagination-link: a link without href was pressed; detail.value
///
public class RcPageEventArgs : EventArgs
{
public string? SortColumn { get; set; }
public string? SortDirection { get; set; }
public string? Query { get; set; }
public JsonElement? Facets { get; set; }
public string[]? HiddenColumns { get; set; }
public double? Page { get; set; }
public double? PageSize { get; set; }
public double? PageCount { get; set; }
public double? Total { get; set; }
public string[]? Selected { get; set; }
public string? Value { get; set; }
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-pick (@onrcpick).
/// rc-calendar: the user chose a day: { date } (ISO). Bubbles, composed.
///
public class RcPickEventArgs : EventArgs
{
public string Date { get; set; } = "";
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-point (@onrcpoint).
/// rc-chart: the active point changed by keyboard or pointer; detail { index, category }
///
public class RcPointEventArgs : EventArgs
{
public double Index { get; set; }
public string Category { get; set; } = "";
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-previous-page (@onrcpreviouspage).
/// rc-pagination-previous: pressed, without href
/// rc-pagination: Previous was activated
///
public class RcPreviousPageEventArgs : EventArgs
{
public double Page { get; set; }
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-ready (@onrcready).
/// rc-chart: ECharts has loaded and the chart has been drawn (or redrawn)
///
public class RcReadyEventArgs : EventArgs
{
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-remove (@onrcremove).
/// rc-chip: the remove button was activated. Bubbles, composed.
/// rc-tabs-trigger: the user asked to remove the tab; detail.value is its value
///
public class RcRemoveEventArgs : EventArgs
{
public string? Value { get; set; }
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-row-click (@onrcrowclick).
/// rc-table-row: { row, value }: the row element and its value
///
public class RcRowClickEventArgs : EventArgs
{
public string Value { get; set; } = "";
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-select (@onrcselect).
/// rc-carousel: the slide at the start of the track changed; detail.index is its position from 0
/// rc-command-item: the item was picked; detail.value, detail.item; cancelable
/// rc-context-menu-item: the item was picked (cancelable: preventDefault() keeps the menu open)
/// rc-context-menu-checkbox-item: the item was picked; detail.checked is the new state (cancelable)
/// rc-context-menu-radio-item: the item was picked (cancelable)
/// rc-context-menu-content: on the item picked: detail.value, detail.item (detail.checked for a checkbox item); cancelable
/// rc-dropdown-menu-item: the item was picked (cancelable: preventDefault() keeps the menu open)
/// rc-dropdown-menu-checkbox-item: the item was picked; detail.checked is the new state (cancelable)
/// rc-dropdown-menu-radio-item: the item was picked (cancelable)
/// rc-dropdown-menu-content: on the item picked: detail.value, detail.item (detail.checked for a checkbox item); cancelable
/// rc-menubar-item: the item was picked (cancelable: preventDefault() keeps the menu open)
/// rc-menubar-checkbox-item: the item was picked; detail.checked is the new state (cancelable)
/// rc-menubar-radio-item: the item was picked (cancelable)
/// rc-menubar-content: on the item picked: detail.value, detail.item (detail.checked for a checkbox item); cancelable
/// rc-tabs: a tab was selected by the user; detail.value is its value
///
public class RcSelectEventArgs : EventArgs
{
public double? Index { get; set; }
public string? Value { get; set; }
public bool? Checked { get; set; }
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-selection-change (@onrcselectionchange).
/// rc-data-table: rows were selected or cleared: { count } and the whole state (selected holds the row values)
///
public class RcSelectionChangeEventArgs : EventArgs
{
public string SortColumn { get; set; } = "";
public string SortDirection { get; set; } = "";
public string Query { get; set; } = "";
public JsonElement? Facets { get; set; }
public string[] HiddenColumns { get; set; } = System.Array.Empty();
public double Page { get; set; }
public double PageSize { get; set; }
public double PageCount { get; set; }
public double Total { get; set; }
public string[] Selected { get; set; } = System.Array.Empty();
public double Count { get; set; }
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-sort (@onrcsort).
/// rc-data-table: the reader sorted a column: { column, sort } and the whole state
/// rc-table-head: { column, sort }, only outside an rc-table (inside one, the table fires it with its state)
/// rc-table: (from a header) { column, sort }; the product sorts and replaces the rows
///
public class RcSortEventArgs : EventArgs
{
public string? SortColumn { get; set; }
public string? SortDirection { get; set; }
public string? Query { get; set; }
public JsonElement? Facets { get; set; }
public string[]? HiddenColumns { get; set; }
public double? Page { get; set; }
public double? PageSize { get; set; }
public double? PageCount { get; set; }
public double? Total { get; set; }
public string[]? Selected { get; set; }
public string Column { get; set; } = "";
public string Sort { get; set; } = "";
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-state-change (@onrcstatechange).
/// rc-data-table: after any of the above, and once after persist restored a state: { reason } (sort, filter, page, visibility, selection or restore) and the whole state
///
public class RcStateChangeEventArgs : EventArgs
{
public string SortColumn { get; set; } = "";
public string SortDirection { get; set; } = "";
public string Query { get; set; } = "";
public JsonElement? Facets { get; set; }
public string[] HiddenColumns { get; set; } = System.Array.Empty();
public double Page { get; set; }
public double PageSize { get; set; }
public double PageCount { get; set; }
public double Total { get; set; }
public string[] Selected { get; set; } = System.Array.Empty();
public string Reason { get; set; } = "";
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-status-change (@onrcstatuschange).
/// rc-questionnaire-item: { name, status } when the status changes
///
public class RcStatusChangeEventArgs : EventArgs
{
public string Name { get; set; } = "";
public string Status { get; set; } = "";
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-submit (@onrcsubmit).
/// rc-questionnaire: { values, statuses } once every item passes; preventDefault() stops the form submit
///
public class RcSubmitEventArgs : EventArgs
{
public JsonElement? Values { get; set; }
public JsonElement? Statuses { get; set; }
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-value-change (@onrcvaluechange).
/// rc-accordion: a reader opened or closed an item; detail.value is the open item ('' for none) for single, the open items for multiple
///
public class RcValueChangeEventArgs : EventArgs
{
public JsonElement? Value { get; set; }
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}
///
/// rc-view-change (@onrcviewchange).
/// rc-chart: the table toggle was used; detail { view }
///
public class RcViewChangeEventArgs : EventArgs
{
public string View { get; set; } = "";
/// The whole event detail as sent (elements left out).
public JsonElement? Detail { get; set; }
}