@activewidgets/jquery
Advanced tools
+7
-45
@@ -1,46 +0,8 @@ | ||
| import css from '@activewidgets/datagrid/style'; | ||
| import adapter from '@activewidgets/frameworks/jquery'; | ||
| import $ from 'jquery'; | ||
| import * as preact from 'preact'; | ||
| import htm from 'htm'; | ||
| import * as components from '@activewidgets/datagrid/js'; | ||
| import * as metadata from '@activewidgets/datagrid/metadata'; | ||
| function styleInject(css, ref) { | ||
| if ( ref === void 0 ) ref = {}; | ||
| var insertAt = ref.insertAt; | ||
| if (!css || typeof document === 'undefined') { return; } | ||
| var head = document.head || document.getElementsByTagName('head')[0]; | ||
| var style = document.createElement('style'); | ||
| style.type = 'text/css'; | ||
| if (insertAt === 'top') { | ||
| if (head.firstChild) { | ||
| head.insertBefore(style, head.firstChild); | ||
| } else { | ||
| head.appendChild(style); | ||
| } | ||
| } else { | ||
| head.appendChild(style); | ||
| } | ||
| if (style.styleSheet) { | ||
| style.styleSheet.cssText = css; | ||
| } else { | ||
| style.appendChild(document.createTextNode(css)); | ||
| } | ||
| } | ||
| var _adapter = adapter(preact, $), | ||
| h = _adapter.h, | ||
| build = _adapter.build; | ||
| var tpl = htm.bind(h); | ||
| build(components, metadata); | ||
| styleInject(css); | ||
| export { build, h, tpl }; | ||
| /** | ||
| * @activewidgets/html/bundle 3.0.0 | ||
| * Copyright (C) 2020 ActiveWidgets SARL. All Rights Reserved. | ||
| * This code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this package. | ||
| */ | ||
| import t from"@activewidgets/datagrid/style";import e from"@activewidgets/frameworks/jquery";import r from"jquery";import*as i from"preact";import d from"htm";import*as a from"@activewidgets/datagrid/js";import*as o from"@activewidgets/datagrid/metadata";var m=e(i,r),s=m.h,n=m.build,p=d.bind(s);n(a,o),function(t,e){void 0===e&&(e={});var r=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css","top"===r&&i.firstChild?i.insertBefore(d,i.firstChild):i.appendChild(d),d.styleSheet?d.styleSheet.cssText=t:d.appendChild(document.createTextNode(t))}}(t,{insertAt:"top"});export{n as build,s as h,p as tpl}; | ||
| //# sourceMappingURL=bundle.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"bundle.js","sources":["../../node_modules/style-inject/dist/style-inject.es.js","../../js/framework.js","../../js/datagrid.js","../../bundle/index.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","\r\nimport adapter from '@activewidgets/frameworks/jquery';\r\nimport $ from 'jquery';\r\nimport * as preact from 'preact';\r\nimport htm from 'htm';\r\n\r\nexport const {h, build} = adapter(preact, $);\r\nexport const tpl = htm.bind(h);\r\n","\r\nimport {build} from './framework.js';\r\nimport * as components from '@activewidgets/datagrid/js';\r\nimport * as metadata from '@activewidgets/datagrid/metadata';\r\n\r\nbuild(components, metadata);\r\n","\r\nimport css from '@activewidgets/datagrid/style';\r\nimport styleInject from 'style-inject';\r\nexport * from '../js/index.js';\r\n\r\nstyleInject(css);\r\n\r\n"],"names":["adapter","preact","$","h","build","tpl","htm","bind","components","metadata","styleInject","css"],"mappings":";;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH;;eCnB0BA,OAAO,CAACC,MAAD,EAASC,CAAT;IAAnBC,aAAAA;IAAGC,iBAAAA;IACJC,GAAG,GAAGC,GAAG,CAACC,IAAJ,CAASJ,CAAT,CAAZ;;ACFPC,KAAK,CAACI,UAAD,EAAaC,QAAb,CAAL;;ACAAC,WAAW,CAACC,GAAD,CAAX;;;;"} | ||
| {"version":3,"file":"bundle.js","sources":["../../js/framework.js","../../js/datagrid.js","../../node_modules/style-inject/dist/style-inject.es.js","../../bundle/index.js"],"sourcesContent":["/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport adapter from '@activewidgets/frameworks/jquery';\r\nimport $ from 'jquery';\r\nimport * as preact from 'preact';\r\nimport htm from 'htm';\r\n\r\nexport const {h, build} = adapter(preact, $);\r\nexport const tpl = htm.bind(h);\r\n","/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport {build} from './framework.js';\r\nimport * as components from '@activewidgets/datagrid/js';\r\nimport * as metadata from '@activewidgets/datagrid/metadata';\r\n\r\nbuild(components, metadata);\r\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport css from '@activewidgets/datagrid/style';\r\nimport styleInject from 'style-inject';\r\nexport * from '../js/index.js';\r\n\r\nstyleInject(css, {insertAt: 'top'});\r\n\r\n"],"names":["adapter","preact","$","h","build","tpl","htm","bind","components","metadata","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","styleInject"],"mappings":";;;;;;qQAW0BA,EAAQC,EAAQC,GAA5BC,IAAAA,EAAGC,IAAAA,MACJC,EAAMC,EAAIC,KAAKJ,GCF5BC,EAAMI,EAAYC,GCVlB,SAAqBC,EAAKC,QACX,IAARA,IAAiBA,EAAM,IAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,KCjB9Ce,CAIYf,EAAK,CAACE,SAAU"} |
+7
-1
@@ -1,2 +0,8 @@ | ||
| import '@activewidgets/datagrid/css'; | ||
| /** | ||
| * @activewidgets/js/css 3.0.0 | ||
| * Copyright (C) 2020 ActiveWidgets SARL. All Rights Reserved. | ||
| * This code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this package. | ||
| */ | ||
| import"@activewidgets/datagrid/css"; | ||
| //# sourceMappingURL=css.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} | ||
| {"version":3,"file":"css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"} |
+7
-15
@@ -1,16 +0,8 @@ | ||
| import adapter from '@activewidgets/frameworks/jquery'; | ||
| import $ from 'jquery'; | ||
| import * as preact from 'preact'; | ||
| import htm from 'htm'; | ||
| import * as components from '@activewidgets/datagrid/js'; | ||
| import * as metadata from '@activewidgets/datagrid/metadata'; | ||
| var _adapter = adapter(preact, $), | ||
| h = _adapter.h, | ||
| build = _adapter.build; | ||
| var tpl = htm.bind(h); | ||
| build(components, metadata); | ||
| export { build, h, tpl }; | ||
| /** | ||
| * @activewidgets/html/js 3.0.0 | ||
| * Copyright (C) 2020 ActiveWidgets SARL. All Rights Reserved. | ||
| * This code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this package. | ||
| */ | ||
| import r from"@activewidgets/frameworks/jquery";import t from"jquery";import*as a from"preact";import i from"htm";import*as m from"@activewidgets/datagrid/js";import*as o from"@activewidgets/datagrid/metadata";var e=r(a,t),d=e.h,p=e.build,s=i.bind(d);p(m,o);export{p as build,d as h,s as tpl}; | ||
| //# sourceMappingURL=js.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"js.js","sources":["../../js/framework.js","../../js/datagrid.js"],"sourcesContent":["\r\nimport adapter from '@activewidgets/frameworks/jquery';\r\nimport $ from 'jquery';\r\nimport * as preact from 'preact';\r\nimport htm from 'htm';\r\n\r\nexport const {h, build} = adapter(preact, $);\r\nexport const tpl = htm.bind(h);\r\n","\r\nimport {build} from './framework.js';\r\nimport * as components from '@activewidgets/datagrid/js';\r\nimport * as metadata from '@activewidgets/datagrid/metadata';\r\n\r\nbuild(components, metadata);\r\n"],"names":["adapter","preact","$","h","build","tpl","htm","bind","components","metadata"],"mappings":";;;;;;;eAM0BA,OAAO,CAACC,MAAD,EAASC,CAAT;IAAnBC,aAAAA;IAAGC,iBAAAA;IACJC,GAAG,GAAGC,GAAG,CAACC,IAAJ,CAASJ,CAAT;;ACFnBC,KAAK,CAACI,UAAD,EAAaC,QAAb,CAAL;;;;"} | ||
| {"version":3,"file":"js.js","sources":["../../js/framework.js","../../js/datagrid.js"],"sourcesContent":["/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport adapter from '@activewidgets/frameworks/jquery';\r\nimport $ from 'jquery';\r\nimport * as preact from 'preact';\r\nimport htm from 'htm';\r\n\r\nexport const {h, build} = adapter(preact, $);\r\nexport const tpl = htm.bind(h);\r\n","/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport {build} from './framework.js';\r\nimport * as components from '@activewidgets/datagrid/js';\r\nimport * as metadata from '@activewidgets/datagrid/metadata';\r\n\r\nbuild(components, metadata);\r\n"],"names":["adapter","preact","$","h","build","tpl","htm","bind","components","metadata"],"mappings":";;;;;;wNAW0BA,EAAQC,EAAQC,GAA5BC,IAAAA,EAAGC,IAAAA,MACJC,EAAMC,EAAIC,KAAKJ,GCF5BC,EAAMI,EAAYC"} |
+7
-16
@@ -1,17 +0,8 @@ | ||
| import '@activewidgets/datagrid/css'; | ||
| import adapter from '@activewidgets/frameworks/jquery'; | ||
| import $ from 'jquery'; | ||
| import * as preact from 'preact'; | ||
| import htm from 'htm'; | ||
| import * as components from '@activewidgets/datagrid/js'; | ||
| import * as metadata from '@activewidgets/datagrid/metadata'; | ||
| var _adapter = adapter(preact, $), | ||
| h = _adapter.h, | ||
| build = _adapter.build; | ||
| var tpl = htm.bind(h); | ||
| build(components, metadata); | ||
| export { build, h, tpl }; | ||
| /** | ||
| * @activewidgets/jquery 3.0.0 | ||
| * Copyright (C) 2020 ActiveWidgets SARL. All Rights Reserved. | ||
| * This code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this package. | ||
| */ | ||
| import"@activewidgets/datagrid/css";import r from"@activewidgets/frameworks/jquery";import t from"jquery";import*as i from"preact";import a from"htm";import*as m from"@activewidgets/datagrid/js";import*as o from"@activewidgets/datagrid/metadata";var e=r(i,t),d=e.h,s=e.build,p=a.bind(d);s(m,o);export{s as build,d as h,p as tpl}; | ||
| //# sourceMappingURL=package.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"package.js","sources":["../../js/framework.js","../../js/datagrid.js"],"sourcesContent":["\r\nimport adapter from '@activewidgets/frameworks/jquery';\r\nimport $ from 'jquery';\r\nimport * as preact from 'preact';\r\nimport htm from 'htm';\r\n\r\nexport const {h, build} = adapter(preact, $);\r\nexport const tpl = htm.bind(h);\r\n","\r\nimport {build} from './framework.js';\r\nimport * as components from '@activewidgets/datagrid/js';\r\nimport * as metadata from '@activewidgets/datagrid/metadata';\r\n\r\nbuild(components, metadata);\r\n"],"names":["adapter","preact","$","h","build","tpl","htm","bind","components","metadata"],"mappings":";;;;;;;;eAM0BA,OAAO,CAACC,MAAD,EAASC,CAAT;IAAnBC,aAAAA;IAAGC,iBAAAA;IACJC,GAAG,GAAGC,GAAG,CAACC,IAAJ,CAASJ,CAAT;;ACFnBC,KAAK,CAACI,UAAD,EAAaC,QAAb,CAAL;;;;"} | ||
| {"version":3,"file":"package.js","sources":["../../js/framework.js","../../js/datagrid.js"],"sourcesContent":["/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport adapter from '@activewidgets/frameworks/jquery';\r\nimport $ from 'jquery';\r\nimport * as preact from 'preact';\r\nimport htm from 'htm';\r\n\r\nexport const {h, build} = adapter(preact, $);\r\nexport const tpl = htm.bind(h);\r\n","/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport {build} from './framework.js';\r\nimport * as components from '@activewidgets/datagrid/js';\r\nimport * as metadata from '@activewidgets/datagrid/metadata';\r\n\r\nbuild(components, metadata);\r\n"],"names":["adapter","preact","$","h","build","tpl","htm","bind","components","metadata"],"mappings":";;;;;;4PAW0BA,EAAQC,EAAQC,GAA5BC,IAAAA,EAAGC,IAAAA,MACJC,EAAMC,EAAIC,KAAKJ,GCF5BC,EAAMI,EAAYC"} |
+7
-29
@@ -1,29 +0,7 @@ | ||
| (function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports,require('@activewidgets/datagrid/style'),require('@activewidgets/frameworks/jquery'),require('jquery'),require('preact'),require('htm'),require('@activewidgets/datagrid/js'),require('@activewidgets/datagrid/metadata')):typeof define==='function'&&define.amd?define(['exports','@activewidgets/datagrid/style','@activewidgets/frameworks/jquery','jquery','preact','htm','@activewidgets/datagrid/js','@activewidgets/datagrid/metadata'],f):(g=g||self,f((g.ActiveWidgets=g.ActiveWidgets||{},g.ActiveWidgets.jQuery={}),g.ActiveWidgets.Styles,g.ActiveWidgets.Frameworks.jQuery,g.jQuery,g.preact,g.htm,g.ActiveWidgets.Components,g.ActiveWidgets.Metadata));}(this,(function(exports, css, adapter, $, preact, htm, components, metadata){'use strict';css=css&&css.hasOwnProperty('default')?css['default']:css;adapter=adapter&&adapter.hasOwnProperty('default')?adapter['default']:adapter;$=$&&$.hasOwnProperty('default')?$['default']:$;htm=htm&&htm.hasOwnProperty('default')?htm['default']:htm;function styleInject(css, ref) { | ||
| if ( ref === void 0 ) ref = {}; | ||
| var insertAt = ref.insertAt; | ||
| if (!css || typeof document === 'undefined') { return; } | ||
| var head = document.head || document.getElementsByTagName('head')[0]; | ||
| var style = document.createElement('style'); | ||
| style.type = 'text/css'; | ||
| if (insertAt === 'top') { | ||
| if (head.firstChild) { | ||
| head.insertBefore(style, head.firstChild); | ||
| } else { | ||
| head.appendChild(style); | ||
| } | ||
| } else { | ||
| head.appendChild(style); | ||
| } | ||
| if (style.styleSheet) { | ||
| style.styleSheet.cssText = css; | ||
| } else { | ||
| style.appendChild(document.createTextNode(css)); | ||
| } | ||
| }var _adapter = adapter(preact, $), | ||
| h = _adapter.h, | ||
| build = _adapter.build; | ||
| var tpl = htm.bind(h);build(components, metadata);styleInject(css);exports.build=build;exports.h=h;exports.tpl=tpl;Object.defineProperty(exports,'__esModule',{value:true});})));//# sourceMappingURL=bundle.js.map | ||
| /** | ||
| * @activewidgets/html/bundle 3.0.0 | ||
| * Copyright (C) 2020 ActiveWidgets SARL. All Rights Reserved. | ||
| * This code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this package. | ||
| */ | ||
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@activewidgets/datagrid/style"),require("@activewidgets/frameworks/jquery"),require("jquery"),require("preact"),require("htm"),require("@activewidgets/datagrid/js"),require("@activewidgets/datagrid/metadata")):"function"==typeof define&&define.amd?define(["exports","@activewidgets/datagrid/style","@activewidgets/frameworks/jquery","jquery","preact","htm","@activewidgets/datagrid/js","@activewidgets/datagrid/metadata"],t):t(((e=e||self).ActiveWidgets=e.ActiveWidgets||{},e.ActiveWidgets.jQuery={}),e.ActiveWidgets.Styles,e.ActiveWidgets.Frameworks.jQuery,e.jQuery,e.preact,e.htm,e.ActiveWidgets.Components,e.ActiveWidgets.Metadata)}(this,(function(e,t,i,d,r,a,s,u){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t,i=i&&i.hasOwnProperty("default")?i.default:i,d=d&&d.hasOwnProperty("default")?d.default:d,a=a&&a.hasOwnProperty("default")?a.default:a;var n=i(r,d),c=n.h,o=n.build,f=a.bind(c);o(s,u),function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var d=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&d.firstChild?d.insertBefore(r,d.firstChild):d.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(t,{insertAt:"top"}),e.build=o,e.h=c,e.tpl=f,Object.defineProperty(e,"__esModule",{value:!0})}));//# sourceMappingURL=bundle.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"bundle.js","sources":["../../node_modules/style-inject/dist/style-inject.es.js","../../js/framework.js","../../js/datagrid.js","../../bundle/index.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","\r\nimport adapter from '@activewidgets/frameworks/jquery';\r\nimport $ from 'jquery';\r\nimport * as preact from 'preact';\r\nimport htm from 'htm';\r\n\r\nexport const {h, build} = adapter(preact, $);\r\nexport const tpl = htm.bind(h);\r\n","\r\nimport {build} from './framework.js';\r\nimport * as components from '@activewidgets/datagrid/js';\r\nimport * as metadata from '@activewidgets/datagrid/metadata';\r\n\r\nbuild(components, metadata);\r\n","\r\nimport css from '@activewidgets/datagrid/style';\r\nimport styleInject from 'style-inject';\r\nexport * from '../js/index.js';\r\n\r\nstyleInject(css);\r\n\r\n"],"names":["adapter","preact","$","h","build","tpl","htm","bind","components","metadata","styleInject","css"],"mappings":"oiCAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH,gBCnB0BA,OAAO,CAACC,MAAD,EAASC,CAAT;IAAnBC,aAAAA;IAAGC,iBAAAA;IACJC,GAAG,GAAGC,GAAG,CAACC,IAAJ,CAASJ,CAAT,CAAZ,CCFPC,KAAK,CAACI,UAAD,EAAaC,QAAb,CAAL,CCAAC,WAAW,CAACC,GAAD,CAAX"} | ||
| {"version":3,"file":"bundle.js","sources":["../../js/framework.js","../../js/datagrid.js","../../node_modules/style-inject/dist/style-inject.es.js","../../bundle/index.js"],"sourcesContent":["/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport adapter from '@activewidgets/frameworks/jquery';\r\nimport $ from 'jquery';\r\nimport * as preact from 'preact';\r\nimport htm from 'htm';\r\n\r\nexport const {h, build} = adapter(preact, $);\r\nexport const tpl = htm.bind(h);\r\n","/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport {build} from './framework.js';\r\nimport * as components from '@activewidgets/datagrid/js';\r\nimport * as metadata from '@activewidgets/datagrid/metadata';\r\n\r\nbuild(components, metadata);\r\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport css from '@activewidgets/datagrid/style';\r\nimport styleInject from 'style-inject';\r\nexport * from '../js/index.js';\r\n\r\nstyleInject(css, {insertAt: 'top'});\r\n\r\n"],"names":["adapter","preact","$","h","build","tpl","htm","bind","components","metadata","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","styleInject"],"mappings":";;;;;;07BAW0BA,EAAQC,EAAQC,GAA5BC,IAAAA,EAAGC,IAAAA,MACJC,EAAMC,EAAIC,KAAKJ,GCF5BC,EAAMI,EAAYC,GCVlB,SAAqBC,EAAKC,QACX,IAARA,IAAiBA,EAAM,IAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,KCjB9Ce,CAIYf,EAAK,CAACE,SAAU"} |
+7
-1
@@ -1,1 +0,7 @@ | ||
| (function(f){typeof define==='function'&&define.amd?define(['@activewidgets/datagrid/css'],f):f();}((function(){'use strict';})));//# sourceMappingURL=css.js.map | ||
| /** | ||
| * @activewidgets/js/css 3.0.0 | ||
| * Copyright (C) 2020 ActiveWidgets SARL. All Rights Reserved. | ||
| * This code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this package. | ||
| */ | ||
| !function(e){"function"==typeof define&&define.amd?define(["@activewidgets/datagrid/css"],e):e()}((function(){}));//# sourceMappingURL=css.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} | ||
| {"version":3,"file":"css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"} |
+7
-4
@@ -1,4 +0,7 @@ | ||
| (function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports,require('@activewidgets/frameworks/jquery'),require('jquery'),require('preact'),require('htm'),require('@activewidgets/datagrid/js'),require('@activewidgets/datagrid/metadata')):typeof define==='function'&&define.amd?define(['exports','@activewidgets/frameworks/jquery','jquery','preact','htm','@activewidgets/datagrid/js','@activewidgets/datagrid/metadata'],f):(g=g||self,f((g.ActiveWidgets=g.ActiveWidgets||{},g.ActiveWidgets.jQuery={}),g.ActiveWidgets.Frameworks.jQuery,g.jQuery,g.preact,g.htm,g.ActiveWidgets.Components,g.ActiveWidgets.Metadata));}(this,(function(exports, adapter, $, preact, htm, components, metadata){'use strict';adapter=adapter&&adapter.hasOwnProperty('default')?adapter['default']:adapter;$=$&&$.hasOwnProperty('default')?$['default']:$;htm=htm&&htm.hasOwnProperty('default')?htm['default']:htm;var _adapter = adapter(preact, $), | ||
| h = _adapter.h, | ||
| build = _adapter.build; | ||
| var tpl = htm.bind(h);build(components, metadata);exports.build=build;exports.h=h;exports.tpl=tpl;Object.defineProperty(exports,'__esModule',{value:true});})));//# sourceMappingURL=js.js.map | ||
| /** | ||
| * @activewidgets/html/js 3.0.0 | ||
| * Copyright (C) 2020 ActiveWidgets SARL. All Rights Reserved. | ||
| * This code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this package. | ||
| */ | ||
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@activewidgets/frameworks/jquery"),require("jquery"),require("preact"),require("htm"),require("@activewidgets/datagrid/js"),require("@activewidgets/datagrid/metadata")):"function"==typeof define&&define.amd?define(["exports","@activewidgets/frameworks/jquery","jquery","preact","htm","@activewidgets/datagrid/js","@activewidgets/datagrid/metadata"],t):t(((e=e||self).ActiveWidgets=e.ActiveWidgets||{},e.ActiveWidgets.jQuery={}),e.ActiveWidgets.Frameworks.jQuery,e.jQuery,e.preact,e.htm,e.ActiveWidgets.Components,e.ActiveWidgets.Metadata)}(this,(function(e,t,i,r,a,d,s){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t,i=i&&i.hasOwnProperty("default")?i.default:i,a=a&&a.hasOwnProperty("default")?a.default:a;var u=t(r,i),c=u.h,o=u.build,f=a.bind(c);o(d,s),e.build=o,e.h=c,e.tpl=f,Object.defineProperty(e,"__esModule",{value:!0})}));//# sourceMappingURL=js.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"js.js","sources":["../../js/framework.js","../../js/datagrid.js"],"sourcesContent":["\r\nimport adapter from '@activewidgets/frameworks/jquery';\r\nimport $ from 'jquery';\r\nimport * as preact from 'preact';\r\nimport htm from 'htm';\r\n\r\nexport const {h, build} = adapter(preact, $);\r\nexport const tpl = htm.bind(h);\r\n","\r\nimport {build} from './framework.js';\r\nimport * as components from '@activewidgets/datagrid/js';\r\nimport * as metadata from '@activewidgets/datagrid/metadata';\r\n\r\nbuild(components, metadata);\r\n"],"names":["adapter","preact","$","h","build","tpl","htm","bind","components","metadata"],"mappings":"o5BAM0BA,OAAO,CAACC,MAAD,EAASC,CAAT;IAAnBC,aAAAA;IAAGC,iBAAAA;IACJC,GAAG,GAAGC,GAAG,CAACC,IAAJ,CAASJ,CAAT,ECFnBC,KAAK,CAACI,UAAD,EAAaC,QAAb,CAAL"} | ||
| {"version":3,"file":"js.js","sources":["../../js/framework.js","../../js/datagrid.js"],"sourcesContent":["/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport adapter from '@activewidgets/frameworks/jquery';\r\nimport $ from 'jquery';\r\nimport * as preact from 'preact';\r\nimport htm from 'htm';\r\n\r\nexport const {h, build} = adapter(preact, $);\r\nexport const tpl = htm.bind(h);\r\n","/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport {build} from './framework.js';\r\nimport * as components from '@activewidgets/datagrid/js';\r\nimport * as metadata from '@activewidgets/datagrid/metadata';\r\n\r\nbuild(components, metadata);\r\n"],"names":["adapter","preact","$","h","build","tpl","htm","bind","components","metadata"],"mappings":";;;;;;2yBAW0BA,EAAQC,EAAQC,GAA5BC,IAAAA,EAAGC,IAAAA,MACJC,EAAMC,EAAIC,KAAKJ,GCF5BC,EAAMI,EAAYC"} |
@@ -1,4 +0,7 @@ | ||
| (function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports,require('@activewidgets/datagrid/css'),require('@activewidgets/frameworks/jquery'),require('jquery'),require('preact'),require('htm'),require('@activewidgets/datagrid/js'),require('@activewidgets/datagrid/metadata')):typeof define==='function'&&define.amd?define(['exports','@activewidgets/datagrid/css','@activewidgets/frameworks/jquery','jquery','preact','htm','@activewidgets/datagrid/js','@activewidgets/datagrid/metadata'],f):(g=g||self,f((g.ActiveWidgets=g.ActiveWidgets||{},g.ActiveWidgets.jQuery={}),null,g.ActiveWidgets.Frameworks.jQuery,g.jQuery,g.preact,g.htm,g.ActiveWidgets.Components,g.ActiveWidgets.Metadata));}(this,(function(exports, css, adapter, $, preact, htm, components, metadata){'use strict';adapter=adapter&&adapter.hasOwnProperty('default')?adapter['default']:adapter;$=$&&$.hasOwnProperty('default')?$['default']:$;htm=htm&&htm.hasOwnProperty('default')?htm['default']:htm;var _adapter = adapter(preact, $), | ||
| h = _adapter.h, | ||
| build = _adapter.build; | ||
| var tpl = htm.bind(h);build(components, metadata);exports.build=build;exports.h=h;exports.tpl=tpl;Object.defineProperty(exports,'__esModule',{value:true});})));//# sourceMappingURL=package.js.map | ||
| /** | ||
| * @activewidgets/jquery 3.0.0 | ||
| * Copyright (C) 2020 ActiveWidgets SARL. All Rights Reserved. | ||
| * This code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this package. | ||
| */ | ||
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@activewidgets/datagrid/css"),require("@activewidgets/frameworks/jquery"),require("jquery"),require("preact"),require("htm"),require("@activewidgets/datagrid/js"),require("@activewidgets/datagrid/metadata")):"function"==typeof define&&define.amd?define(["exports","@activewidgets/datagrid/css","@activewidgets/frameworks/jquery","jquery","preact","htm","@activewidgets/datagrid/js","@activewidgets/datagrid/metadata"],t):t(((e=e||self).ActiveWidgets=e.ActiveWidgets||{},e.ActiveWidgets.jQuery={}),null,e.ActiveWidgets.Frameworks.jQuery,e.jQuery,e.preact,e.htm,e.ActiveWidgets.Components,e.ActiveWidgets.Metadata)}(this,(function(e,t,i,r,a,d,s,u){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i,r=r&&r.hasOwnProperty("default")?r.default:r,d=d&&d.hasOwnProperty("default")?d.default:d;var c=i(a,r),o=c.h,f=c.build,g=d.bind(o);f(s,u),e.build=f,e.h=o,e.tpl=g,Object.defineProperty(e,"__esModule",{value:!0})}));//# sourceMappingURL=package.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"package.js","sources":["../../js/framework.js","../../js/datagrid.js"],"sourcesContent":["\r\nimport adapter from '@activewidgets/frameworks/jquery';\r\nimport $ from 'jquery';\r\nimport * as preact from 'preact';\r\nimport htm from 'htm';\r\n\r\nexport const {h, build} = adapter(preact, $);\r\nexport const tpl = htm.bind(h);\r\n","\r\nimport {build} from './framework.js';\r\nimport * as components from '@activewidgets/datagrid/js';\r\nimport * as metadata from '@activewidgets/datagrid/metadata';\r\n\r\nbuild(components, metadata);\r\n"],"names":["adapter","preact","$","h","build","tpl","htm","bind","components","metadata"],"mappings":"m+BAM0BA,OAAO,CAACC,MAAD,EAASC,CAAT;IAAnBC,aAAAA;IAAGC,iBAAAA;IACJC,GAAG,GAAGC,GAAG,CAACC,IAAJ,CAASJ,CAAT,ECFnBC,KAAK,CAACI,UAAD,EAAaC,QAAb,CAAL"} | ||
| {"version":3,"file":"package.js","sources":["../../js/framework.js","../../js/datagrid.js"],"sourcesContent":["/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport adapter from '@activewidgets/frameworks/jquery';\r\nimport $ from 'jquery';\r\nimport * as preact from 'preact';\r\nimport htm from 'htm';\r\n\r\nexport const {h, build} = adapter(preact, $);\r\nexport const tpl = htm.bind(h);\r\n","/**\r\n * Copyright (c) ActiveWidgets SARL. All Rights Reserved.\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE file in the root directory of this source tree.\r\n */\r\n\r\nimport {build} from './framework.js';\r\nimport * as components from '@activewidgets/datagrid/js';\r\nimport * as metadata from '@activewidgets/datagrid/metadata';\r\n\r\nbuild(components, metadata);\r\n"],"names":["adapter","preact","$","h","build","tpl","htm","bind","components","metadata"],"mappings":";;;;;;u3BAW0BA,EAAQC,EAAQC,GAA5BC,IAAAA,EAAGC,IAAAA,MACJC,EAAMC,EAAIC,KAAKJ,GCF5BC,EAAMI,EAAYC"} |
+1
-1
| MIT License | ||
| Copyright (c) 2018 ActiveWidgets | ||
| Copyright (c) 2020 ActiveWidgets | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
+11
-8
| { | ||
| "name": "@activewidgets/jquery", | ||
| "version": "0.0.11", | ||
| "version": "3.0.0", | ||
| "description": "Datagrid component for jQuery", | ||
@@ -16,3 +16,3 @@ "author": "ActiveWidgets SARL", | ||
| "scripts": { | ||
| "build": "rimraf dist/* && rollup -c", | ||
| "build": "rimraf dist/* && rollup -c && node rewrite-map.js", | ||
| "output": "npm run build && rimraf out/* && build-examples", | ||
@@ -24,6 +24,6 @@ "prepack": "npm run build && rimraf out/*", | ||
| "dependencies": { | ||
| "@activewidgets/datagrid": "0.0.11", | ||
| "@activewidgets/frameworks": "0.0.11", | ||
| "@activewidgets/datagrid": "3.0.0", | ||
| "@activewidgets/frameworks": "3.0.0", | ||
| "htm": "3.0.2", | ||
| "preact": "10.2.1" | ||
| "preact": "10.3.0" | ||
| }, | ||
@@ -35,3 +35,3 @@ "peerDependencies": { | ||
| "@activewidgets/examples": "0.0.5", | ||
| "@activewidgets/options": "0.0.11", | ||
| "@activewidgets/options": "3.0.0", | ||
| "@activewidgets/puppeteer": "0.0.4", | ||
@@ -42,2 +42,3 @@ "@activewidgets/testing": "0.0.3", | ||
| "@rollup/plugin-node-resolve": "^6", | ||
| "jquery": "^3", | ||
| "postcss-import": "^12", | ||
@@ -76,3 +77,5 @@ "rimraf": "^3", | ||
| "keywords": [ | ||
| "datagrid" | ||
| "activewidgets", | ||
| "datagrid", | ||
| "jquery" | ||
| ], | ||
@@ -82,3 +85,3 @@ "bugs": { | ||
| }, | ||
| "homepage": "https://github.com/activewidgets/jquery#readme" | ||
| "homepage": "https://activewidgets.com" | ||
| } |
+158
-2
@@ -1,2 +0,158 @@ | ||
| # html | ||
| ActiveWidgets components for jQuery | ||
| ### | ||
| # ActiveWidgets/jQuery • Datagrid | ||
| [](https://www.npmjs.com/package/@activewidgets/jquery "View this project on npm") | ||
| [](https://www.npmjs.com/package/@activewidgets/jquery "npm package downloads/month") | ||
| [](https://github.com/activewidgets/jquery/issues "See Github issues") | ||
| [](https://github.com/activewidgets/jquery "Open Github repo") | ||
| ActiveWidgets is a multi-framework UI component library. This package provides **datagrid component** for **jQuery**. | ||
| [Live demo](https://jquery.activewidgets.com) / [Developer guide](https://docs.activewidgets.com/guide/) / [API reference](https://docs.activewidgets.com/api/) | ||
| [](https://jquery.activewidgets.com) | ||
| - [Installation](#installation) | ||
| - [Usage](#usage) | ||
| - [CDN links](#cdn-links) | ||
| - [Data properties](#data-properties) | ||
| - [User events](#user-events) | ||
| ## Installation | ||
| Add [@activewidgets/jquery](https://docs.activewidgets.com/api/packages/jquery/) to your project dependencies - | ||
| ```sh | ||
| > npm i --save @activewidgets/jquery | ||
| ``` | ||
| ## Usage | ||
| Import the library into your app - | ||
| ```js | ||
| import "@activewidgets/jquery"; | ||
| ``` | ||
| It will add `mount` function to jQuery. Now, assuming that you've added a placeholder `ax-datagrid` tag to the page | ||
| ```html | ||
| <ax-datagrid>Loading...</ax-datagrid> | ||
| ``` | ||
| Assign properties and mount an actual ActiveWidgets component at the placeholder position - | ||
| ```js | ||
| const rows = [ | ||
| { message: 'Hello, World!' } | ||
| ]; | ||
| $('ax-datagrid') | ||
| .prop('rows', rows) | ||
| .mount(); | ||
| ``` | ||
| [Live example](https://jquery.activewidgets.com/examples/local/hello-world/) | [Source on github](https://github.com/activewidgets/jquery/tree/master/examples/hello-world) | [Edit on Codesandbox](https://codesandbox.io/s/github/activewidgets/jquery/tree/master/examples/hello-world) | ||
| ## CDN links | ||
| For quick prototyping the package is also available over ActiveWidgets CDN - | ||
| ```html | ||
| <script src="https://cdn.activewidgets.com/jquery"></script> | ||
| ``` | ||
| [Live example](https://jquery.activewidgets.com/examples/local/cdn-es5/) | [Source on github](https://github.com/activewidgets/jquery/tree/master/examples/cdn-es5) | [Edit on Codesandbox](https://codesandbox.io/s/github/activewidgets/jquery/tree/master/examples/cdn-es5) | ||
| ## Mount function | ||
| The `mount` function does not require any arguments - it uses element tagName as a component ID. | ||
| ```html | ||
| <ax-datagrid id="my-grid-1"> ... </ax-datagrid> | ||
| ``` | ||
| You can apply any selector to find the placeholder element (but the tag must be `ax-datagrid`) | ||
| ```js | ||
| $('#my-grid-1') | ||
| .prop('rows', rows) | ||
| .mount(); | ||
| ``` | ||
| ## Data properties | ||
| You have to provide [columns](https://docs.activewidgets.com/api/datagrid/columns/) and [rows](https://docs.activewidgets.com/api/datagrid/rows/) properties to the datagrid to show some data. The properties of each `column` object define how the data will be rendered - | ||
| - [field](https://docs.activewidgets.com/api/datagrid/columns/#field) - where the cell data comes from (string|function) | ||
| - [header](https://docs.activewidgets.com/api/datagrid/columns/#header) - column header (string|object) | ||
| - [width](https://docs.activewidgets.com/api/datagrid/columns/#width) - column width (number, in pixels) | ||
| - [align](https://docs.activewidgets.com/api/datagrid/columns/#align) - cell text alignment (left|right|center) | ||
| - [format](https://docs.activewidgets.com/api/datagrid/columns/#format) - number/date format (string|function) | ||
| - [fixed](https://docs.activewidgets.com/api/datagrid/columns/#fixed) - fixed (true/false) for columns on the left or right side | ||
| The `style` (string|object) or `className` properties allow to change the styling of the column and cell elements. | ||
| ```js | ||
| const columns = [ | ||
| {header: 'Code', field: 'customerID', width: 80, style: 'background:#def', fixed: true}, | ||
| {header: 'Company Name', field: 'companyName', width: 160}, | ||
| {header: 'Contact', field: 'contactName', width: 120}, | ||
| {header: 'Title', field: 'contactTitle', width: 120}, | ||
| {header: 'Address', field: 'address', width: 120, align: 'right'} | ||
| ]; | ||
| const rows = northwind.customers; | ||
| $('ax-datagrid') | ||
| .prop({ columns, rows }) // use $.prop() to assign properties | ||
| .mount(); | ||
| ``` | ||
| [Live example](https://jquery.activewidgets.com/examples/local/columns/) | [Source on github](https://github.com/activewidgets/jquery/tree/master/examples/columns) | [Edit on Codesandbox](https://codesandbox.io/s/github/activewidgets/jquery/tree/master/examples/columns) | ||
| ## User events | ||
| In addition to the standard DOM keyboard and mouse events the datagrid emits composite | ||
| [mouse](https://docs.activewidgets.com/api/datagrid/mouse-event/) event which makes it easier to find the elements affected by the user action. | ||
| ```js | ||
| function onMouse({row}){ | ||
| alert(`row ${row.key} clicked!`); | ||
| } | ||
| $('ax-datagrid') | ||
| .prop({ columns, rows }) | ||
| .on('mouse', event => onMouse(event.detail)) // pass event.detail to your handler | ||
| .mount(); | ||
| ``` | ||
| [Live example](https://jquery.activewidgets.com/examples/local/events/) | [Source on github](https://github.com/activewidgets/jquery/tree/master/examples/events) | [Edit on Codesandbox](https://codesandbox.io/s/github/activewidgets/jquery/tree/master/examples/events) | ||
| When assigning an event handler, note that the event data is passed in the `event.detail` property (we are using DOM CustomEvent class). | ||
| ActiveWidgets custom events do not bubble, so you should always add an event handler at the component itself, not at some parent element. | ||
| ## More info | ||
| - [Live demo](https://react.activewidgets.com) | ||
| - [Developer guide](https://docs.activewidgets.com/guide/) | ||
| - [API reference](https://docs.activewidgets.com/api/) | ||
| - [Licensing](https://activewidgets.com/licenses/) | ||
| - [Support forum](https://activewidgets.com/messages/) | ||
| --- | ||
| [](https://activewidgets.com) | ||
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
27285
42.15%159
5200%16
6.67%76
-30.91%3
200%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated