Code Monkey home page Code Monkey logo

meteor-webix's Introduction

Meteor.js - Webix UI integration

This is work in progress on integrating Meteor.js, the best full-stack JavaScript framework (see why) and Webix, arguably the best UI widgets library (see an extensive comparison on StackOverflow).

Stay tuned by clicking Watch/Star on GitHub.

Webix standalone admin app demo

Webix admin app demo screenshot

Meteor-Webix Demo

Usage

Get started by adding the webix:webix package and a skin. For example, to add the default skin:

meteor add webix:webix
meteor add webix:skin-flat

If you use Font Awesome icons, or have sortable tables or other UI components that need Font Awesome icons, install Font Awesome as well:

meteor add fortawesome:fontawesome

Use Meteor collections as usual and simply specify webix.proxy('meteor', Collection|Cursor) for the url and save properties of the component:

Movies = new Mongo.Collection('movies');

webix.ui({
  view: 'datatable',
  autoconfig: true,
  editable: true,
  url:  webix.proxy('meteor', Movies.find()),
  save: webix.proxy('meteor', Movies)
});

Learn more

What works

  • package tests (font loading via skins, visual check)
  • load and save data to/from reactive DataTable, List, and other widgets backed by linear data structures

Needs testing

  • paging
  • dynamic data loading
  • hierarchical widgets (Tree, TreeTable)

TODO

  • clean up and merge the disparate Webix repos
  • map nested objects onto Webix forms (#10)
  • client-side error messages on failed server operations via Collection.deny
  • review
    • Webix wrapper for Meteor/Blaze reactive templates
    • routing
  • persist order of List/DataTable elements reordered via drag-and-drop (similar to rubaxa:sortable)
  • reactive Multiview, similar to templates:tabs

Licensing

Meteor package author: Dan Dascalescu (@dandv)

Acknowledgments: the Webix team, and especially Maksim Kozhukh (@mkozhukh) - the developers of the webix-meteor-data adapter.

Webix is (C) 2013-2015 XB Software and is available under commercial and GPLv3 licenses. A license exemption for non-GPL software is being worked on.

This Webix package for Meteor is published under the MIT license.

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

meteor-webix's People

Contributors

dandv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meteor-webix's Issues

Support skins

Webix has just announced that a Material Design theme is in the works:

Material design screenshot

The Atmosphere package is large enough that meteor displays a progress bar while downloading it, so perhaps separate packages in the webix namespace are the best solution.

CRUD Example broken: 'editor' of undefined

The CRUD webix.meteor.com Example is not working, throwing an exception when clicking on "Add".

2357a0b752e906e3c306898f4bf7d871407cc497.js:55
Uncaught TypeError: Cannot read property 'editor' of undefined
2357a0b752e906e3c306898f4bf7d871407cc497.js:55 webix.extend._get_editor_type
2357a0b752e906e3c306898f4bf7d871407cc497.js:55 webix.extend._get_editor_type
2357a0b752e906e3c306898f4bf7d871407cc497.js:52 webix.EditAbility.edit 
2357a0b752e906e3c306898f4bf7d871407cc497.js:55 webix.extend.editCell 
2357a0b752e906e3c306898f4bf7d871407cc497.js:103 i.elements.click 
2357a0b752e906e3c306898f4bf7d871407cc497.js:48 (anonymous function) 
2357a0b752e906e3c306898f4bf7d871407cc497.js:45 webix.EventSystem.callEvent
2357a0b752e906e3c306898f4bf7d871407cc497.js:45 (anonymous function)

Package version of webix:webix is wrong?

I am building my app using package based structure.

I include 'webix:webix' and a skin. When I look at the .meteor/local/build/programs/web.browser/packages/webix_webix.js, the header has this:

/*                                                                                                                     // 1
@license                                                                                                               // 2
webix UI v.2.3.8                                                                                                       // 3
This software is allowed to use under GPL or you need to obtain Commercial License                                     // 4
 to use it in non-GPL project. Please contact [email protected] for details                                              // 5
*/                                                                                                                     // 6

According to the docs, I was expecting 2.5.14

Any ideas?

Update to 2.4.7

Could you please update webix to 2.4.7. I need some of the new features and bugfixes.

Error callback for collection operations

I set unique field check for collection

Genres._ensureIndex({title: 1}, {unique: true});

and if I add document with same title to list I have an error in console

insert failed: MongoError: insertDocument :: caused by :: 11000 E11000 duplicate key error index: meteor.genres.$title_1  dup key: { : "New title" }

I want show alert message with error like a

webix.message("Document with same title is exist!");

but I don't know where paste this code.

Need add error callback to save section of meteor-data.js

Is this amazing project going to restart sometime soon?

This is the best project in the whole of Meteor by far.
With the data-adaptor you get instant CRUD immediately after setup, I've never seen anything like it.

But nothing has happened since April. Just wondering why.

Please excuse the directness, it's just that here is probably the best piece of software I've seen. But I can't use it because it looks like it's not being maintained. This is frustrating.

The basis is amazing, it just seems to need a few tweaks: for example there is apparently some kind of memory problem when you return to a page - nothing that can't be fixed.

It's Webix, not Meteor, that has control over the code, right? Since some elementary pull requests from the end of April have not been done, I assume that at Webix they just don't want to go on with this? Or am I barking up the wrong tree?

I've tried the alternatives - Datatables is the only one that comes close. Aldeed as usual has done a great job. Datatables display is great, but the editing extension costs money. Quite happy to pay the money, but I can't work out for the life of me how to get the editing extension to work with Meteor. So I've ended up doing my own editing code.

But Meteor Webix is the bees knees. I only wish I could use it.

Errors when building package webix:webix

These errors are reported when trying to run CRUD example:

Your app is crashing. Here's the latest log.

Started MongoDB.
Errors prevented startup:

While building package webix:webix:
error: File not found: webix/codebase/webix_debug.js
error: File not found: webix/codebase/webix.css
error: File not found: webix/codebase/fonts/PTS-webfont.eot
error: File not found: webix/codebase/fonts/PTS-webfont.ttf
error: File not found: webix/codebase/fonts/PTS-webfont.woff
error: File not found: webix/codebase/fonts/PTS-bold.eot
error: File not found: webix/codebase/fonts/PTS-bold.ttf
error: File not found: webix/codebase/fonts/PTS-bold.woff
error: File not found: webix-meteor-data/codebase/meteor-data.js

Meteor UserAccounts Webix project started

Opening this issue to bring this work to your attention and also I would like some help/advice on how to proceed w/ this project.

To determine if Webix could be a "good citizen" in the Meteor ego-system, I thought I'd attempt to implement the UserAccounts package in Webix.

The current project is hosted here: http://useraccounts-webix.meteor.com

What works:

  • The nav bar switches routes (home, private (secured) and signon)
  • Iron-router integration
  • The sign on button is integrated w/ the core UserAccounts atNavButton
  • The sign on form displays per the UserAccounts core definitions

What doesn't work

  • The events from Webix controls to Meteor event system for the sign on form input fields
  • If I add the "atTitle" to the "atPwdForm", the "sign-in" page increases in size
  • Haven't added the "resize" event

I've written up some thoughts of my design patterns, such as the choice to use Webix HTML Markup exclusively, and my current challenge, of which I am miserably failing, of mapping Webix events to Meteor events so that the UserAccounts core events can be emitted.

There's been significant success, imo, of seamlessly integrating Meteor templates with Webix markup - using this approach supports nested template interpolation, there are no limitations of using the Blaze template system.

You can read my overview of my design decisions at the Meteor Webix UserAccounts package

The Meteor-Webix UserAccounts Boilerplate project uses the package above. To use it, local package development has to be set up (e.g. ln -s ..)

Webix Form half-works

I have the following webix form submit code

{ view: 'button', label: 'Save', type: 'form', click: function(){
 var form = this.getFormView(); 
 var v = form.getValues(); 
 Meteor.call('updateUser', { name: v.name, surname: v.surname });
}}

This works. It does update the Meteor MongoDB. When I first load the page, it also fetches the form data and fills the form fields correctly.

But if I change the MongoDB manually from the back-end (via a shell), the expected change on my webix view does NOT happen ! An event is indeed triggered though (!), as I get a browser console error:

Stack:

Exception in queued task: TypeError: this._settings.store.attachEvent is not a function at Object.webix.DataProcessor.webix.proto._after_init_call (http://localhost:3000/packages/webix_webix.js?4da16d463223c73cab897d8cf6d4284ded156c15:28509:24) at Object.webix.proto.result (http://localhost:3000/packages/webix_webix.js?4da16d463223c73cab897d8cf6d4284ded156c15:261:19) at Object.webix.dp (http://localhost:3000/packages/webix_webix.js?4da16d463223c73cab897d8cf6d4284ded156c15:28438:11) at Object.webix.proxy.meteor.load.query.cursor.observe.changed (http://localhost:3000/packages/webix_webix.js?4da16d463223c73cab897d8cf6d4284ded156c15:31730:11) at LocalCollection._observeFromObserveChanges.observeChangesCallbacks.changed (http://localhost:3000/packages/minimongo.js?af9eb9d7447544ca9b839a3dcf7ed2da2209b56c:3928:28) at Object.LocalCollection._CachingChangeObserver.self.applyChange.changed (http://localhost:3000/packages/minimongo.js?af9eb9d7447544ca9b839a3dcf7ed2da2209b56c:3832:44) at http://localhost:3000/packages/minimongo.js?af9eb9d7447544ca9b839a3dcf7ed2da2209b56c:415:13 at _.extend.runTask (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:693:11) at _.extend.flush (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:721:10) at _.extend.drain (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:729:12)

Thank you for your time.

My webix view is defined as follows (I use ... for ommiting unecessary code):

{
 view: 'form', 
 url: webix.proxy('meteor', Meteor.users), 
 elements: [ 
    { id: '_id', view: 'text', name: '_id', label: 'ID', ...}, 
    { id: 'name', view: 'text', ...}, 
    { id: 'surname', ...}, 
    { view: 'button', label: 'Save', type: 'form', click: function(){ ... } } 
}

Sort?

I can't get the column sort to work in the CRUD example

Any way to update to webix 3.1?

Is it possible to update this package just by replacing the webix files with the latest version? If not, any way to update this to the latest webix version (3.1 as of now)?

Thanks for a great package!

Support routing with Webix layout

Hi Dan,

just wanted to let you know that I currently look for a solution for that. I can contribute the solution to this repository if you like.

What I have done:

Meteor Webix UserAccounts (v1.0.0)

Dan, I wanted to share this rewrite with you and get your opinion.

It was far easier not trying to shoehorn into Meteor User Accounts sub-system.

This is fully functioning ๐Ÿ˜Œ
-barton

Meteor Webix UserAccounts

Features:

  • Full integration with Templates
  • Webix HTML Markup
  • Accounts Password
  • Accounts Google
  • Email sent for Password Reset
  • Iron Router
  • Signin, Signup, ResetPassword, Changed Password Form Validatation

Live Functional Demo: http://webix-account-boilerplate.meteor.com/
Client Boilerplate Code: https://github.com/bartonhammond/webix-account-boilerplate
Meteor Webix User Account Package:https://github.com/bartonhammond/webix-account

Client boilerplate

Errors while adding packages

Hello, I have just tried to add your package in newly created meteor project, but it failed with this error:

taras@taras-HP-ProBook-450-G0:~/job/webix-second-try$ meteor add webix:webix
=> Errors while adding packages:

While checking for webix:[email protected]:
error: No compatible build found

Reactive Webix Forms

Is it possible to use this package with Webix forms to directly read write to a meteor collection?
Trying to build a settings page/form without save/submit.

The fields should update sub attributes in the settings attribute.

Collection:

Doc1:
    name: "A",
    address: "Test"
    settings:
        setting1: "value1",
        setting2: "value2"

Doc2: 
    name: "B",
    address: "Test"
    settings:
        setting1: "value1",
        setting2: "value2"

Publish/Subscribe Large collections

Hello,

I'm working on an Web App which is using the webix ui. I use the datatable. For the URL proxy I have a cursor with a find function on my collection to return all documents. I just need to read the data from the collection. My problem is that my collection contains about 10.000 documents. I was trying with the option datafetch etc. to limit the data preloaded. The problem is that as long as data are send via DDP to minimongo I can not click any line of the datatable. Just until all data are loaded its possible. I wanted to give the user a quick initial load with part of the data and after do a lazy loading in the background.
I use iron-router waiton function to retrive the data via Subscribe.

Is there a way to load just the first 100 documents into the webix datatable ui and later the rest dynamic in the background without loosing the possibility to click somewhere before all data are loaded?

I think its something with the proxy I use. Can I use a limit option on the proxy cursor for the first 100 documents but keep them loading all data afterwards in background?

Thanks for any hint.

Daniel

Editing a property of a JSON object (i.e. Mongo Document)

How does Webix work with objects/arrays (properties of a Mongo Document)?

For example, if I have this data format:

{
  "emails": [
    {
      "address": "[email protected]",
      "verified": false
    }
  ]
}

I can display it with:

columns: [
  ...
  { id: someID, map:"#emails[0].address#" };
  ...
]

However, I can't edit the email address in the proper location. If you edit the field as it is now, Webix updates the field from the id. So if the id was "address", there would be a new field called "address" with the edited string.

Is there a native way to link an object with an element in a Webix table?

Scrolling stops on mobiles and tablets straight after installing meteor webix

I installed webix with meteor so I could do CRUD on the database and it's been very good.
And since I was only doing stuff on my desktop I didn't notice this problem.

I just have to uninstall webix:webix and the problem with scrolling on non-desktops goes away.
Reinstalling and it returns.

I can only suppose it's some kind of incompatibility with Bootstrap. Trouble is of course that we're talking about an SPA. So even though I only use Webix on some admin-only pages, it's present on every page.

More complex database queries

I have got my datatable and its data is in the array of document:

db.modules.findOne()

{
    "_id" : "12fbc238-5cf8-4863-a2f8-b5901e0ca0f2",
    "content" : "dataTable",
    "data" : [
        {
            "id" : 1,
            "title" : "The Shawshank Redemption",
            "year" : 1994,
            "votes" : 678790,
            "rating" : 9.2,
            "rank" : 1
        },
        {
            "id" : 2,
            "title" : "The Godfather",
            "year" : 1972,
            "votes" : 511495,
            "rating" : 9.2,
            "rank" : 2
        }
    ]
}

I need to build my datatable with this "inner" data. Is it possible?

url: webix.proxy('meteor', Modules.find({_id: "12fbc238-5cf8-4863-a2f8-b5901e0ca0f2"}).data)

Does not work :(.

looks like, if I want to place some data to the datatable, I need to store different documents in the collection for each row of datatable.

Meteor style example

Hey,

thanks for your efforts in bringing webix to meteor!

I'm wondering if you could provide a more Meteor stylish example? I'm stugeling somehow to make the CRUD example work.

I particular for example how to integrate it in a Template.

Thanks,
Tobias

Missing Webix.css

Seems we're missing this css rule which is defined in webix.css inferring we don't have webix.css installed?

.webix_invalid .webix_inp_bottom_label{font-size:13px;color:#fd595f}

Compare css rule for the validation message after pressing Submit here:

http://docs.webix.com/samples/13_form/04_validation/12_validation_message.html

To the css rule for the validation message here after pressing Signin http://gitbook-meteor-webix-project.meteor.com/signin

Here is my meteor list

~/projects/webix/webix-accounts/gitbook-meteor-webix-project (develop)$ meteor list
accounts-google          1.0.6  Login service for Google accounts
accounts-password        1.1.3  Password support for accounts
anti:helpers             0.1.0+ A simple namespacing pattern for global helpers
bhammond:webix-accounts  0.0.8+ A webix user account system
blaze-html-templates     1.0.1  Compile HTML templates into reactive UI with Meteor Blaze
check                    1.0.6  Check whether a value matches a pattern
ecmascript               0.1.5  Compiler plugin that supports ES2015+ in all .js files
ejson                    1.0.7  Extended and Extensible JSON library
email                    1.0.7  Send email messages
es5-shim                 4.1.13  Shims and polyfills to improve ECMAScript 5 support
fortawesome:fontawesome  4.4.0  Font Awesome (official): 500+ scalable vector icons, customizable via CSS, Retina friendly
iron:router              1.0.9  Routing specifically designed for Meteor
jquery                   1.11.4  Manipulate the DOM using CSS selectors
meteor-base              1.0.1  Packages that every Meteor app needs
mobile-experience        1.0.1  Packages for a great mobile user experience
mongo                    1.1.2  Adaptor for using MongoDB and Minimongo over DDP
sacha:spin               2.3.1  Simple spinner package for Meteor
service-configuration    1.0.5  Manage the configuration for third-party services
session                  1.1.1  Session variable
standard-minifiers       1.0.1  Standard minifiers used with Meteor apps by default.
tracker                  1.0.9  Dependency tracker to allow reactive callbacks
webix:skin-compact       2.3.14  Compact skin for Webix UI
webix:webix              2.5.14  Reactive Webix UI widgets bound to Meteor collections: table/grid, list etc.

Vertical resizer breaks the crud example

I'm not sure whether this is a Webix issue or an issue with the example crud code, but I will post it here for the record. Steps to reproduce:

  1. Add { view: 'resizer' }, between lines 89 and 90 in crud.js to add a vertical resizer line between the data table and the filtered list.
  2. Drag the vertical resizer line left and right.

ISSUE: You will see that eventually both the toolbar and the data table will not resize correctly as you drag the vertical resizer line.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.