{"id":21250336,"url":"https://github.com/zwillinge/webix-typescript-demo","last_synced_at":"2026-05-20T19:47:40.375Z","repository":{"id":81944377,"uuid":"88357387","full_name":"Zwillinge/webix-typescript-demo","owner":"Zwillinge","description":"Demo app of using Webix with TypeScript","archived":false,"fork":false,"pushed_at":"2017-04-17T15:03:52.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T20:32:16.736Z","etag":null,"topics":["typescript","webix"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zwillinge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-15T15:51:41.000Z","updated_at":"2017-04-17T15:06:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"44e34423-8ab0-4542-97ca-39f3a9f2264e","html_url":"https://github.com/Zwillinge/webix-typescript-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zwillinge%2Fwebix-typescript-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zwillinge%2Fwebix-typescript-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zwillinge%2Fwebix-typescript-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zwillinge%2Fwebix-typescript-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zwillinge","download_url":"https://codeload.github.com/Zwillinge/webix-typescript-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243685589,"owners_count":20330983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["typescript","webix"],"created_at":"2024-11-21T03:17:39.609Z","updated_at":"2025-12-29T19:35:22.739Z","avatar_url":"https://github.com/Zwillinge.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Webix + TypeScript Demo Application\n=========\n\n### How to start\n\nHow to run standalone\n\n```\nnpm install\nnpm run server\n```\n\nAfter that, open http://localhost:8080 in the browser.\n\nHow to run with Apache\n\n```\nnpm install\nnpm run watch\n```\n\nHow to build codebase\n\n```\nnpm install\nnpm run codebase\n```\n\nNote that latest versions of node.js and npm should be installed.\n\n### Typing within Webix widgets\n\nYou need to explicitely set the type of a Webix widget during initialization as **webix.ui.{widget}**: \n\n~~~js\nvar layout = \u003cwebix.ui.layout\u003e webix.ui({\n\trows:[ toolbar, datatable, pager] \n});\n~~~\n\nAnd for using its methods and events after initialization: \n\n~~~js\nvar grid:webix.ui.datatable = layout.getChildViews()[1];\ngrid.add({ title:\"New film\"}, 0);\n\n//or\n\nvar grid = (\u003cwebix.ui.datatable\u003elayout.getChildViews()[1]);\ngrid.add({ title:\"New film\"}, 0);\n~~~\n\nOr, when accessing  the widget by its id: \n\n~~~\n(\u003cwebix.ui.datatable\u003ewebix.$$(\"mygrid\")).add({ title:\"New film\"}, 0);\n~~~\n\nYou also need to set a widget type during attaching handler functions to a widget's events:\n\n~~~js\nvar grid:webix.ui.datatable = layout.getChildViews()[1];\ngrid.attachEvent(\"onAfterSelect\", function(){...});\n~~~ \n\n### Typing for widgets' configuration\n\nYou can provide the correct types for widgets' properties with the related **webix.ui.config{Widget}** types: \n\n~~~js\nvar datatable:webix.ui.datatableConfig = {\n\tview:\"datatable\",\n\teditable:true,\n\teditaction:\"dblclick\",\n\tautoConfig:true,\n\turl:\"..\",\n\tpager:\"pagerA\",\n\tscrollX:\"false\"\n};\n\nvar pager:webix.ui.pagerConfig = {\n\tview:\"pager\",\n\tid:\"pagerA\",\n\tgroup:10,\n\tsize:30\n}; \n\nvar layout= \u003cwebix.ui.layout\u003e webix.ui({\n\trows:[ datatable, pager] \n}); \n~~~\n\n### Creating a custom widget with strict typing\n\nAdding a custom property to configuration:\n\n~~~js\ninterface iconcheckConfig extends webix.ui.checkboxConfig{\n\ticon?:string;\n}\n~~~\n\nAdding or overriding methods and properties in the prototype:\n\n~~~js\ninterface IconCheckApi{\n\tname:string;\n\t$init(config:iconcheckConfig):void;\n\tgetIconLabel(icon:string, label:string):string;\n}\n\ninterface IconCheckView extends webix.ui.checkbox, IconCheckApi {}\n~~~\n\n\nCreating a new proto UI:\n\n~~~js\nconst api:IconCheck = { \nname:\"iconcheck\",\n\t$init:function(config){\n\t\tconfig.label = (\u003cIconCheckView\u003ethis).getIconLabel(config.icon, config.label);\n\t\tconfig.labelWidth = 100;\n\t},\n\tgetIconLabel:function(icon, label){\n\t\treturn \"\u003cspan class='webix_icon fa-\"+icon+\"'\u003e\u003c/span\u003e\"+label;\n\t}\n};\n\nwebix.protoUI(api, webix.ui.checkbox);\n~~~\n\nUsing the custom widget: \n\n~~~js\nvar iconcheckbox = \u003cIconCheckView\u003e webix.ui({\n\tview:\"iconcheck\",\n\ticon:\"cog\",\n\tlabel:\"Settings\"\n});\n~~~\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzwillinge%2Fwebix-typescript-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzwillinge%2Fwebix-typescript-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzwillinge%2Fwebix-typescript-demo/lists"}