Exemple #1
0
            public static void AddCloseable(BunitJSInterop jsInterop)
            {
                var module = jsInterop.SetupModule(new JSClosableModule(jsInterop.JSRuntime, new VersionProvider()).ModuleFileName);

                module.SetupVoid("registerClosableComponent", _ => true);
                module.SetupVoid("unregisterClosableComponent", _ => true);
            }
            public static void AddDatePicker(BunitJSInterop jsInterop)
            {
                AddUtilities(jsInterop);

                jsInterop.SetupModule(new JSDatePickerModule(jsInterop.JSRuntime, new VersionProvider()).ModuleFileName)
                .SetupVoid("initialize", _ => true);
            }
Exemple #3
0
 public static void AddUtilities( BunitJSInterop jsInterop )
 {
     var module = jsInterop.SetupModule( new JSUtilitiesModule( jsInterop.JSRuntime, new VersionProvider() ).ModuleFileName );
     module.SetupVoid( "import", _ => true );
     module.SetupVoid( "setProperty", _ => true );
     module.Setup<string>( "getUserAgent", _ => true );
 }
Exemple #4
0
            public static void AddTextEdit(BunitJSInterop jsInterop)
            {
                var module = jsInterop.SetupModule(new JSTextEditModule(jsInterop.JSRuntime, new VersionProvider()).ModuleFileName);

                module.SetupVoid("initialize", _ => true);
                module.SetupVoid("destroy", _ => true);
            }
Exemple #5
0
            public static void AddModal(BunitJSInterop jsInterop)
            {
                var module = jsInterop.SetupModule(new MockJsModule(jsInterop.JSRuntime, new VersionProvider()).ModuleFileName);

                module.SetupVoid("open", _ => true);
                module.SetupVoid("close", _ => true);
            }
Exemple #6
0
            public static void AddSelect( BunitJSInterop jsInterop )
            {
                AddUtilities( jsInterop );

                var module = jsInterop.SetupModule( new JSSelectModule( jsInterop.JSRuntime, new VersionProvider() ).ModuleFileName );
                module.SetupVoid( "import", _ => true );
                module.Setup<String[]>( "getSelectedOptions", _ => true );
            }
Exemple #7
0
            public static void AddButton( BunitJSInterop jsInterop )
            {
                AddUtilities( jsInterop );

                var module = jsInterop.SetupModule( new JSButtonModule( jsInterop.JSRuntime, new VersionProvider() ).ModuleFileName );
                module.SetupVoid( "import", _ => true );
                module.SetupVoid( "initialize", _ => true );
                module.SetupVoid( "destroy", _ => true );
            }
Exemple #8
0
            public static void AddModal(BunitJSInterop jsInterop)
            {
                AddUtilities(jsInterop);

                var module = jsInterop.SetupModule(new MockJsModule(jsInterop.JSRuntime, new VersionProvider()).ModuleFileName);

                module.SetupVoid("import", _ => true).SetVoidResult();
                module.SetupVoid("open", _ => true).SetVoidResult();
                module.SetupVoid("close", _ => true).SetVoidResult();
            }
Exemple #9
0
            public static void AddNumericEdit(BunitJSInterop jsInterop)
            {
                AddUtilities(jsInterop);

                var module = jsInterop.SetupModule(new JSNumericPickerModule(jsInterop.JSRuntime, new VersionProvider()).ModuleFileName);

                module.SetupVoid("import", _ => true).SetVoidResult();
                module.SetupVoid("initialize", _ => true).SetVoidResult();
                module.SetupVoid("destroy", _ => true).SetVoidResult();
            }
Exemple #10
0
            public static void AddTable( BunitJSInterop jsInterop )
            {
                AddUtilities( jsInterop );

                var module = jsInterop.SetupModule( new JSTableModule( jsInterop.JSRuntime, new VersionProvider() ).ModuleFileName );
                module.SetupVoid( "initializeTableFixedHeader", _ => true );
                module.SetupVoid( "destroyTableFixedHeader", _ => true );
                module.SetupVoid( "fixedHeaderScrollTableToPixels", _ => true );
                module.SetupVoid( "fixedHeaderScrollTableToRow", _ => true );
                module.SetupVoid( "initializeResizable", _ => true );
                module.SetupVoid( "destroyResizable", _ => true );
            }
Exemple #11
0
            public static void AddDataGrid( BunitJSInterop jsInterop )
            {
                AddButton( jsInterop );
                AddTextEdit( jsInterop );
                AddModal( jsInterop );
                AddTable( jsInterop );
                AddSelect( jsInterop );
                AddClosable( jsInterop );

                var module = jsInterop.SetupModule( new JSDataGridModule( jsInterop.JSRuntime, new VersionProvider() ).ModuleFileName );
                module.SetupVoid( "initialize", _ => true );
                module.SetupVoid( "scrollTo", _ => true );
            }