npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

konyvtar-js

v1.5.1

Published

An opensource library/package of code wrappers for ExtJS 6.2.0 GPL

Downloads

276

Readme

konyvtar-js

npm version npm downloads npm downloads npm downloads npm downloads node contributors stars commits last commit License

An opensource library/package of code wrappers for ExtJS 6.2.0 GPL

Quickstart

Installation

$ npm install --save konyvtar-js

Usage (NPM):

const kony = require('konyvter-js');

Example (Using express and express-es6-template-engine):

@app.js

const express = require('express');
const es6Renderer = require('express-es6-template-engine');
const kony = require('konyvtar-js');

const app = express();

app.engine('html', es6Renderer);
app.set('views', 'views');
app.set('view engine', 'html');

app.get('/', function (req, res) {
    res.render('template', {
        locals: {
            kony
        }
    });
});

app.listen(3000);

@template.html

<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="/lib/extjs/ext-all.js"></script>
    <script type="text/javascript" src="/lib/extjs/classic/theme-triton/theme-triton.js"></script>
    <script type="text/javascript" src="/lib/extjs/packages/charts/classic/charts.js"></script>
    <script type="text/javascript" src="/lib/extjs/packages/ux/classic/ux.js"></script>
    <script type="text/javascript"> var Kony = ${kony}; </script>
</head>
<body>
</body>
</html>

Usage (Single File):

@template.html

<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="/lib/extjs/ext-all.js"></script>
    <script type="text/javascript" src="/lib/extjs/classic/theme-triton/theme-triton.js"></script>
    <script type="text/javascript" src="/lib/extjs/packages/charts/classic/charts.js"></script>
    <script type="text/javascript" src="/lib/extjs/packages/ux/classic/ux.js"></script>
    <script type="text/javascript" src="/path/to/konyvtar.js</script>
</head>
<body>
</body>
</html>

Running Tests

$ npm test

Documentation

Table of Contents

Features

Component

  • query
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'button',
 * *    reference: 'sample-button'
 * * }
 *
 * * @Controller
 * * Kony.component.query('button[reference = sample-button]');
 *
 * @param {string} queryString
 */
Kony.component.query(queryString);
  • reference
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'button',
 * *    reference: 'sample-button'
 * * }
 *
 * * @Controller
 * * Kony.component.reference('button', 'sample-button');
 *
 * @param {string} component
 * @param {string} reference
 */
Kony.component.reference(component, reference);

Store

  • create
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.store.create('/users', { active: true }, grid, true, 25);
 *
 * @param {string} url
 * @param {object} extraParams
 * @param {string} component
 * @param {boolean} autoLoad
 * @param {number} pageSize
 */
Kony.store.create(url, extraParams, component, autoLoad, pageSize);
  • tree
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.store.tree('/menus', { userId: 2 }, grid, true, true);
 *
 * @param {string} url
 * @param {object} extraParams
 * @param {string} component
 * @param {boolean} autoLoad
 * @param {boolean} folderSort
 */
Kony.store.tree(url, extraParams, component, autoLoad, folderSort);
  • local
/**
 * * Sample Usage:
 *
 * * @Controller
 * * var employees = [
 * *    { name: 'John Doe' },
 * *    { name: 'Jane Doe' }
 * * ];
 * * Kony.store.local(employees);
 *
 * @param {array} records
 */
Kony.store.local(records);

Grid

  • render
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    columns: [
 * *        { text: 'Name', renderer: Kony.grid.render.default() }
 * *    ]
 * * }
 */
Kony.grid.render.default();

/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    columns: [
 * *        { text: 'Name', renderer: Kony.grid.render.qTip() }
 * *    ]
 * * }
 */
Kony.grid.render.qTip();

/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    columns: [
 * *        { text: 'Is Active', renderer: Kony.grid.render.checkColumn() }
 * *    ]
 * * }
 */
Kony.grid.render.checkColumn();

/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    columns: [
 * *        { text: 'Is Active', renderer: Kony.grid.render.yesNo() }
 * *    ]
 * * }
 */
Kony.grid.render.yesNo();

/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    columns: [
 * *        { text: 'Loan Balance', renderer: Kony.grid.render.currency() }
 * *    ]
 * * }
 */
Kony.grid.render.currency();

/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    columns: [
 * *        { text: 'Installment Flat Rate', renderer: Kony.grid.render.accurate() }
 * *    ]
 * * }
 */
Kony.grid.render.accurate();

/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    columns: [
 * *        { text: 'Birthday', renderer: Kony.grid.render.fullDate() }
 * *    ]
 * * }
 */
Kony.grid.render.fullDate();

/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    columns: [
 * *        { text: 'Birthday', renderer: Kony.grid.render.ymdDate() }
 * *    ]
 * * }
 */
Kony.grid.render.ymdDate();

/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    columns: [
 * *        { text: 'Birthday', renderer: Kony.grid.render.dmyDate() }
 * *    ]
 * * }
 */
Kony.grid.render.dmyDate();

/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    columns: [
 * *        { text: 'Birthday', renderer: Kony.grid.render.mdyDate() }
 * *    ]
 * * }
 */
Kony.grid.render.mdyDate();
  • get
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    reference: 'sample-grid'
 * * }
 *
 * * @Controller
 * * Kony.grid.get('sample-grid');
 *
 * @param {string} reference
 */
Kony.grid.get(reference);
  • setup
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    reference: 'sample-button'
 * * }
 *
 * * @Controller
 * * Kony.grid.setup('sample-button', '/users', { active: true });
 *
 * @param {string} reference
 * @param {string} storeUrl
 * @param {object} filters
 */
Kony.grid.setup(reference, storeUrl, filters);
  • clear
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    reference: 'sample-grid'
 * * }
 *
 * * @Controller
 * * Kony.grid.clear('sample-grid');
 *
 * @param {string} reference
 */
Kony.grid.clear(reference);
  • getSelection
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    reference: 'sample-grid'
 * * }
 *
 * * @Controller
 * * Kony.grid.getSelection('sample-grid');
 *
 * @param {string} reference
 */
Kony.grid.getSelection(reference);
  • clearSelection
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    reference: 'sample-grid'
 * * }
 *
 * * @Controller
 * * Kony.grid.clearSelection('sample-grid');
 *
 * @param {string} reference
 */
Kony.grid.clearSelection(reference);
  • getStore
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    reference: 'sample-grid'
 * * }
 *
 * * @Controller
 * * Kony.grid.getStore('sample-grid');
 *
 * @param {string} reference
 */
Kony.grid.getStore(reference);
  • reload
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'grid',
 * *    reference: 'sample-grid'
 * * }
 *
 * * @Controller
 * * Kony.grid.reload('sample-grid');
 *
 * @param {string} reference
 */
Kony.grid.reload(reference);

Combobox

  • get
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'combobox',
 * *    reference: 'sample-combobox'
 * * }
 *
 * * @Controller
 * * Kony.combobox.get('sample-combobox');
 *
 * @param {string} reference
 */
Kony.combobox.get(reference);
  • setup
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'combobox',
 * *    reference: 'sample-combobox'
 * * }
 *
 * * @Controller
 * * Kony.combobox.setup('sample-combobox', '/contries', { region: southeast });
 *
 * @param {string} reference
 * @param {string} storeUrl
 * @param {object} filters
 */
Kony.combobox.setup(reference, storeUrl, filters);
  • getRecordById
/**
 *
 * * @View
 * * {
 * *    xtype: 'combobox',
 * *    reference: 'sample-combobox'
 * * }
 *
 * * @Controller
 * * Sample Usage: Kony.combobox.getRecordById('sample-combobox', 2);
 *
 * @param {string} reference
 * @param {number} id
 */
Kony.combobox.getRecordById(reference, id);

Form

  • get
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'form',
 * *    reference: 'sample-form'
 * * }
 *
 * * @Controller
 * * Kony.form.get('sample-form');
 *
 * @param {string} reference
 */
Kony.form.get(reference);
  • getValues
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'form',
 * *    reference: 'sample-form'
 * * }
 *
 * * @Controller
 * * Kony.form.getValues('sample-form');
 *
 * @param {string} reference
 */
Kony.form.getValues(reference);
  • loadRecord
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'form',
 * *    reference: 'sample-form'
 * * }
 *
 * * @Controller
 * * var employee = {
 * *    data: { name: 'John Doe' }
 * * };
 * * Kony.form.loadRecord('sample-form', employee);
 *
 * @param {string} reference
 * @param {object} record
 */
Kony.form.loadRecord(reference, record);
  • setReadOnly
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'form',
 * *    reference: 'sample-form'
 * * }
 *
 * * @Controller
 * * Kony.form.setReadOnly('sample-form', true);
 *
 * @param {string} reference
 * @param {boolean} isReadOnly
 */
Kony.form.setReadOnly(reference, isReadOnly);
  • clear
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'form',
 * *    reference: 'sample-form'
 * * }
 *
 * * @Controller
 * * Kony.form.clear('sample-form');
 *
 * @param {string} reference
 */
Kony.form.clear(reference);
  • isValid
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'form',
 * *    reference: 'sample-form'
 * * }
 *
 * * @Controller
 * * Kony.form.isValid('sample-form');
 *
 * @param {string} reference
 */
Kony.form.isValid(reference);
  • getInvalidFields
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'form',
 * *    reference: 'sample-form'
 * * }
 *
 * * @Controller
 * * Kony.form.getInvalidFields('sample-form');
 *
 * @param {string} reference
 */
Kony.form.getInvalidFields(reference);

Button

  • get
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'button',
 * *    reference: 'sample-button'
 * * }
 *
 * * @Controller
 * * Kony.button.get('sample-button');
 *
 * @param {string} reference
 */
Kony.button.get(reference);
  • disable
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'button',
 * *    reference: 'sample-button'
 * * }
 *
 * * @Controller
 * * Kony.button.disable('sample-button');
 *
 * @param {string} reference
 */
Kony.button.disable(reference);
  • enable
/**
 * * Sample Usage:
 *
 * * @View
 * * {
 * *    xtype: 'button',
 * *    reference: 'sample-button'
 * * }
 *
 * * @Controller
 * * Kony.button.enable('sample-button');
 *
 * @param {string} reference
 */
Kony.button.enable(reference);

Render

  • default
/**
 * * Sample Usage:
 * * renderer: Kony.render.default(value);
 *
 * @param {*} value
 */
Kony.render.default(value);
  • yesNo
/**
 * * Sample Usage:
 * * renderer: Kony.render.yesNo(value);
 *
 * @param {number} value
 */
Kony.render.yesNo(value);
  • currency
/**
 * * Sample Usage:
 * * renderer: Kony.render.currency(value);
 *
 * @param {number} value
 */
Kony.render.currency(value);
  • accurate
/**
 * * Sample Usage:
 * * renderer: Kony.render.accurate(value);
 *
 * @param {number} value
 */
Kony.render.accurate(value);
  • fullDate
/**
 * * Sample Usage:
 * * renderer: Kony.render.fullDate(value);
 *
 * @param {string|date} value
 */
Kony.render.fullDate(value);
  • ymdDate
/**
 * * Sample Usage:
 * * renderer: Kony.render.ymdDate(value);
 *
 * @param {string|date} value
 */
Kony.render.ymdDate(value);
  • dmyDate
/**
 * * Sample Usage:
 * * renderer: Kony.render.dmyDate(value);
 *
 * @param {string|date} value
 */
Kony.render.dmyDate(value);
  • mdyDate
/**
 * * Sample Usage:
 * * renderer: Kony.render.mdyDate(value);
 *
 * @param {string|date} value
 */
Kony.render.mdyDate(value);
  • formatDate
/**
 * * Sample Usage:
 * * renderer: Kony.render.formatDate(value, 'YYYY');
 *
 * @param {string|date} value
 * @param {string} format
 */
Kony.render.formatDate(value, format);

Ajax

  • request
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.ajax.request('/login', 'POST', { user: john, pass: doe }, function (){}, function (){}, false);
 *
 * @param {string} url
 * @param {string} method
 * @param {object} params
 * @param {function} sucessCallback
 * @param {function} failureCallback
 * @param {boolean} async
 */
Kony.ajax.request(url, method, params, sucessCallback, failureCallback, async);

Url

  • convertObjectToQuery
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.url.convertObjectToQuery({ user: john, pass: doe });
 *
 * @param {object} params
 */
Kony.url.convertObjectToQuery(params);

Task

  • create
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.task.create(function (){});
 *
 * @param {function} callback
 */
Kony.task.create(callback);

Window

  • getHeight
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.window.getHeight();
 */
Kony.window.getHeight();
  • getWidth
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.window.getWidth();
 */
Kony.window.getWidth();

Message

  • custom
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.message.custom('Test', 'test', Ext.Msg.YESNO, Ext.Msg.QUESTION, function (){});
 *
 * @param {string} title
 * @param {string} message
 * @param {class} btn
 * @param {class} icon
 * @param {function} callback
 */
Kony.message.custom(title, message, btn, icon, callback);
  • alert
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.message.alert('test');
 *
 * @param {string} message
 */
Kony.message.alert(message);
  • confirm
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.message.confirm('test', function (){});
 *
 * @param {string} message
 * @param {function} callback
 */
Kony.message.confirm(message, callback);
  • error
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.message.error('test');
 *
 * @param {string} message
 */
Kony.message.error(message);
  • info
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.message.info('test');
 *
 * @param {string} message
 */
Kony.message.info(message);
  • *ask
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.message.ask('test', function (){});
 *
 * @param {string} message
 * @param {function} callback
 */
Kony.message.ask(message, callback);
  • warn
/**
 * * Sample Usage:
 *
 * * @Controller
 * * Kony.message.warn('test');
 *
 * @param {string} message
 */
Kony.message.warn(message);

About

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Related Projects

You might want to checkout these projects:

  • NchikotaJS - An opensource tech stack composed of ExpressJS, NodeJS, ExtJS.
  • PasserelleJS - An opensource API gateway built with ExpressJS.

Base Contributors

Contributors

Author

Eagan Martin

License

Copyright © 2019, Eagan Martin. Release under the GPL-3.0 License