How to use the svelte-native/dom.registerElement function in svelte-native

To help you get started, we’ve selected a few svelte-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github halfnelson / svelte-native-nativescript-ui / src / dataform / index.ts View on Github external
registerConfigElement('DataFormGridLayout', DataFormGridLayout, "layout");
        registerConfigElement('EntityProperty', EntityProperty, "properties", { "validators": NativeElementPropType.Array});
        registerConfigElement('PropertyEditor', PropertyEditor, "editor");
        registerConfigElement('PropertyEditorParams', PropertyEditorParams, "params");
        registerConfigElement('PropertyEditorStyle', PropertyEditorStyle, "propertyEditorStyle");
        registerConfigElement('PropertyGroup', PropertyGroup, "groups", { "properties": NativeElementPropType.Array });
        registerConfigElement('EmailValidator', EmailValidator, "validators");
        registerConfigElement('IsTrueValidator', IsTrueValidator, "validators");
        registerConfigElement('NonEmptyValidator', NonEmptyValidator, "validators");
        registerConfigElement('MaximumLengthValidator', MaximumLengthValidator, "validators");
        registerConfigElement('MinimumLengthValidator', MinimumLengthValidator, "validators");
        registerConfigElement('PhoneValidator', PhoneValidator, "validators");
        registerConfigElement('RangeValidator', RangeValidator, "validators");
        registerConfigElement('RegExValidator', RegExValidator, "validators");

        registerElement('radDataForm', () => new RadDataFormElement());
    }
}
github halfnelson / svelte-native-nativescript-ui / src / calendar / index.ts View on Github external
static register() {
        registerElement('radCalendar', () => new RadCalendarElement());
    }
}
github halfnelson / svelte-native-nativescript-ui / src / chart / index.ts View on Github external
static register() {

        const registerConfigElement = (tag: string, native: new () => any, parentProp: string = null) => 
            registerNativeConfigElement(tag, () => native, parentProp)

        const registerSeries = (tag: string, native: new () => any) => 
            registerElement(tag, () => new ChartSeriesElement(tag, native))

        //chart types
        registerElement('radPieChart', () => new PieChartElement());
        registerElement('radCartesianChart', () => new CartesianChartElement());
 
        //series types
        registerSeries('pieSeries', PieSeries);
        registerSeries('donutSeries', DonutSeries);
        registerSeries('lineSeries', LineSeries)
        registerSeries('splineSeries', SplineSeries)
        registerSeries('splineAreaSeries', SplineAreaSeries)
        registerSeries('areaSeries', AreaSeries)
        registerSeries('barSeries', BarSeries)
        registerSeries('rangeBarSeries', RangeBarSeries)
        registerSeries('bubbleSeries', BubbleSeries)
        registerSeries('scatterBubbleSeries', ScatterBubbleSeries)
        registerSeries('scatterSeries', ScatterSeries)
        registerSeries('candlestickSeries', CandlestickSeries)
        registerSeries('OhlcSeries', OhlcSeries)
github halfnelson / svelte-native-nativescript-ui / src / sidedrawer / index.ts View on Github external
static register() {
        registerElement('radSideDrawer', () => new RadSideDrawerElement());
    }
}
github halfnelson / svelte-native-nativescript-ui / src / chart / index.ts View on Github external
const registerSeries = (tag: string, native: new () => any) => 
            registerElement(tag, () => new ChartSeriesElement(tag, native))
github halfnelson / svelte-native-nativescript-ui / src / chart / index.ts View on Github external
//axes types
        registerConfigElement('categoricalAxis', CategoricalAxis)
        registerConfigElement('dateTimeCategoricalAxis', DateTimeCategoricalAxis)
        registerConfigElement('dateTimeContinuousAxis', DateTimeContinuousAxis)
        registerConfigElement('linearAxis', LinearAxis)
        registerConfigElement('logarithmicAxis', LogarithmicAxis)

        //grid
        registerConfigElement('radCartesianChartGrid', RadCartesianChartGrid, "grid")

        //legend
        registerConfigElement('radLegendView', RadLegendView, "legend")

        //palette
        registerConfigElement('paletteEntry', PaletteEntry, "entries")
        registerElement('palette', () => new PaletteElement())

        //Trackball
        registerConfigElement('trackball', Trackball, "trackball")

        //Annotations
        registerConfigElement('chartGridLineAnnotation', ChartGridLineAnnotation, "annotations")
        registerConfigElement('chartPlotBandAnnotation', ChartPlotBandAnnotation, "annotations")
    }
}