Completely updated React, fixed #11, (hopefully)
This commit is contained in:
1 parent
6e0afd6e2a
commit
34e5f5139a
13674 files changed
+333460
-473219
No files matched your search
+9
-9
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Bundle of @devexpress/dx-core
|
||||
* Generated: 2017-11-10
|
||||
* Version: 1.0.0-beta.1
|
||||
* Generated: 2018-03-02
|
||||
* Version: 1.0.3
|
||||
* License: https://js.devexpress.com/Licensing
|
||||
*/
|
||||
|
||||
@@ -186,22 +186,22 @@ var PluginHost = function () {
|
||||
this.plugins.filter(function (plugin) {
|
||||
return plugin.container;
|
||||
}).forEach(function (plugin) {
|
||||
if (knownOptionals.has(plugin.pluginName)) {
|
||||
throw getDependencyError(knownOptionals.get(plugin.pluginName), plugin.pluginName);
|
||||
if (knownOptionals.has(plugin.name)) {
|
||||
throw getDependencyError(knownOptionals.get(plugin.name), plugin.name);
|
||||
}
|
||||
|
||||
plugin.dependencies.forEach(function (dependency) {
|
||||
if (defined.has(dependency.pluginName)) return;
|
||||
if (defined.has(dependency.name)) return;
|
||||
if (dependency.optional) {
|
||||
if (!knownOptionals.has(dependency.pluginName)) {
|
||||
knownOptionals.set(dependency.pluginName, plugin.pluginName);
|
||||
if (!knownOptionals.has(dependency.name)) {
|
||||
knownOptionals.set(dependency.name, plugin.name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
throw getDependencyError(plugin.pluginName, dependency.pluginName);
|
||||
throw getDependencyError(plugin.name, dependency.name);
|
||||
});
|
||||
|
||||
defined.add(plugin.pluginName);
|
||||
defined.add(plugin.name);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"dx-core.es.js","sources":["../src/utils.js","../src/plugin-host.js","../src/event-emitter.js","../src/shallow-equal.js","../src/memoize.js","../src/easings.js"],"sourcesContent":["const compare = (a, b) => {\n const aPosition = a.position();\n const bPosition = b.position();\n for (let i = 0; i < Math.min(aPosition.length, bPosition.length); i += 1) {\n if (aPosition[i] < bPosition[i]) return -1;\n if (aPosition[i] > bPosition[i]) return 1;\n }\n return aPosition.length - bPosition.length;\n};\n\nexport const insertPlugin = (array, newItem) => {\n const result = array.slice();\n const targetIndex = array.findIndex(item => compare(newItem, item) < 0);\n result.splice(targetIndex < 0 ? array.length : targetIndex, 0, newItem);\n return result;\n};\n","import { insertPlugin } from './utils';\n\nconst getDependencyError = (pluginName, dependencyName) =>\n new Error(`The '${pluginName}' plugin requires '${dependencyName}' to be defined before it.`);\n\nexport class PluginHost {\n constructor() {\n this.plugins = [];\n this.subscriptions = [];\n this.gettersCache = {};\n }\n ensureDependencies() {\n const defined = new Set();\n const knownOptionals = new Map();\n this.plugins\n .filter(plugin => plugin.container)\n .forEach((plugin) => {\n if (knownOptionals.has(plugin.pluginName)) {\n throw (getDependencyError(knownOptionals.get(plugin.pluginName), plugin.pluginName));\n }\n\n plugin.dependencies\n .forEach((dependency) => {\n if (defined.has(dependency.pluginName)) return;\n if (dependency.optional) {\n if (!knownOptionals.has(dependency.pluginName)) {\n knownOptionals.set(dependency.pluginName, plugin.pluginName);\n }\n return;\n }\n throw (getDependencyError(plugin.pluginName, dependency.pluginName));\n });\n\n defined.add(plugin.pluginName);\n });\n }\n registerPlugin(plugin) {\n this.plugins = insertPlugin(this.plugins, plugin);\n this.cleanPluginsCache();\n }\n unregisterPlugin(plugin) {\n this.plugins.splice(this.plugins.indexOf(plugin), 1);\n this.cleanPluginsCache();\n }\n cleanPluginsCache() {\n this.validationRequired = true;\n this.gettersCache = {};\n this.knownKeysCache = {};\n }\n knownKeys(postfix) {\n if (!this.knownKeysCache[postfix]) {\n this.knownKeysCache[postfix] = Array.from(this.plugins\n .map(plugin => Object.keys(plugin))\n .map(keys => keys.filter(key => key.endsWith(postfix))[0])\n .filter(key => !!key)\n .reduce((acc, key) => acc.add(key), new Set()))\n .map(key => key.replace(postfix, ''));\n }\n return this.knownKeysCache[postfix];\n }\n collect(key, upTo) {\n if (this.validationRequired) {\n this.ensureDependencies();\n this.validationRequired = false;\n }\n\n if (!this.gettersCache[key]) {\n this.gettersCache[key] = this.plugins.map(plugin => plugin[key]).filter(plugin => !!plugin);\n }\n if (!upTo) return this.gettersCache[key];\n\n const upToIndex = this.plugins.indexOf(upTo);\n return this.gettersCache[key].filter((getter) => {\n const pluginIndex = this.plugins.findIndex(plugin => plugin[key] === getter);\n return pluginIndex < upToIndex;\n });\n }\n get(key, upTo) {\n const plugins = this.collect(key, upTo);\n\n if (!plugins.length) return undefined;\n\n let result = plugins[0]();\n plugins.slice(1).forEach((plugin) => {\n result = plugin(result);\n });\n return result;\n }\n registerSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index === -1) { this.subscriptions.push(subscription); }\n }\n unregisterSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index !== -1) { this.subscriptions.splice(this.subscriptions.indexOf(subscription), 1); }\n }\n broadcast(event, message) {\n this.subscriptions.forEach(subscription => subscription[event] && subscription[event](message));\n }\n}\n","export class EventEmitter {\n constructor() {\n this.handlers = [];\n }\n emit(e) {\n this.handlers.forEach(handler => handler(e));\n }\n subscribe(handler) {\n this.handlers.push(handler);\n }\n unsubscribe(handler) {\n this.handlers.splice(this.handlers.indexOf(handler), 1);\n }\n}\n","export function shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n const hasOwn = Object.prototype.hasOwnProperty;\n for (let i = 0; i < keysA.length; i += 1) {\n if (!hasOwn.call(objB, keysA[i]) ||\n objA[keysA[i]] !== objB[keysA[i]]) {\n return false;\n }\n\n const valA = objA[keysA[i]Line truncated
|
||||
{"version":3,"file":"dx-core.es.js","sources":["../src/utils.js","../src/plugin-host.js","../src/event-emitter.js","../src/shallow-equal.js","../src/memoize.js","../src/easings.js"],"sourcesContent":["const compare = (a, b) => {\n const aPosition = a.position();\n const bPosition = b.position();\n for (let i = 0; i < Math.min(aPosition.length, bPosition.length); i += 1) {\n if (aPosition[i] < bPosition[i]) return -1;\n if (aPosition[i] > bPosition[i]) return 1;\n }\n return aPosition.length - bPosition.length;\n};\n\nexport const insertPlugin = (array, newItem) => {\n const result = array.slice();\n const targetIndex = array.findIndex(item => compare(newItem, item) < 0);\n result.splice(targetIndex < 0 ? array.length : targetIndex, 0, newItem);\n return result;\n};\n","import { insertPlugin } from './utils';\n\nconst getDependencyError = (pluginName, dependencyName) =>\n new Error(`The '${pluginName}' plugin requires '${dependencyName}' to be defined before it.`);\n\nexport class PluginHost {\n constructor() {\n this.plugins = [];\n this.subscriptions = [];\n this.gettersCache = {};\n }\n ensureDependencies() {\n const defined = new Set();\n const knownOptionals = new Map();\n this.plugins\n .filter(plugin => plugin.container)\n .forEach((plugin) => {\n if (knownOptionals.has(plugin.name)) {\n throw (getDependencyError(knownOptionals.get(plugin.name), plugin.name));\n }\n\n plugin.dependencies\n .forEach((dependency) => {\n if (defined.has(dependency.name)) return;\n if (dependency.optional) {\n if (!knownOptionals.has(dependency.name)) {\n knownOptionals.set(dependency.name, plugin.name);\n }\n return;\n }\n throw (getDependencyError(plugin.name, dependency.name));\n });\n\n defined.add(plugin.name);\n });\n }\n registerPlugin(plugin) {\n this.plugins = insertPlugin(this.plugins, plugin);\n this.cleanPluginsCache();\n }\n unregisterPlugin(plugin) {\n this.plugins.splice(this.plugins.indexOf(plugin), 1);\n this.cleanPluginsCache();\n }\n cleanPluginsCache() {\n this.validationRequired = true;\n this.gettersCache = {};\n this.knownKeysCache = {};\n }\n knownKeys(postfix) {\n if (!this.knownKeysCache[postfix]) {\n this.knownKeysCache[postfix] = Array.from(this.plugins\n .map(plugin => Object.keys(plugin))\n .map(keys => keys.filter(key => key.endsWith(postfix))[0])\n .filter(key => !!key)\n .reduce((acc, key) => acc.add(key), new Set()))\n .map(key => key.replace(postfix, ''));\n }\n return this.knownKeysCache[postfix];\n }\n collect(key, upTo) {\n if (this.validationRequired) {\n this.ensureDependencies();\n this.validationRequired = false;\n }\n\n if (!this.gettersCache[key]) {\n this.gettersCache[key] = this.plugins.map(plugin => plugin[key]).filter(plugin => !!plugin);\n }\n if (!upTo) return this.gettersCache[key];\n\n const upToIndex = this.plugins.indexOf(upTo);\n return this.gettersCache[key].filter((getter) => {\n const pluginIndex = this.plugins.findIndex(plugin => plugin[key] === getter);\n return pluginIndex < upToIndex;\n });\n }\n get(key, upTo) {\n const plugins = this.collect(key, upTo);\n\n if (!plugins.length) return undefined;\n\n let result = plugins[0]();\n plugins.slice(1).forEach((plugin) => {\n result = plugin(result);\n });\n return result;\n }\n registerSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index === -1) { this.subscriptions.push(subscription); }\n }\n unregisterSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index !== -1) { this.subscriptions.splice(this.subscriptions.indexOf(subscription), 1); }\n }\n broadcast(event, message) {\n this.subscriptions.forEach(subscription => subscription[event] && subscription[event](message));\n }\n}\n","export class EventEmitter {\n constructor() {\n this.handlers = [];\n }\n emit(e) {\n this.handlers.forEach(handler => handler(e));\n }\n subscribe(handler) {\n this.handlers.push(handler);\n }\n unsubscribe(handler) {\n this.handlers.splice(this.handlers.indexOf(handler), 1);\n }\n}\n","export function shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n const hasOwn = Object.prototype.hasOwnProperty;\n for (let i = 0; i < keysA.length; i += 1) {\n if (!hasOwn.call(objB, keysA[i]) ||\n objA[keysA[i]] !== objB[keysA[i]]) {\n return false;\n }\n\n const valA = objA[keysA[i]];\n const valB = objB[keysA[i]];\n\n if (valA !== valLine truncated
|
||||
+9
-9
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Bundle of @devexpress/dx-core
|
||||
* Generated: 2017-11-10
|
||||
* Version: 1.0.0-beta.1
|
||||
* Generated: 2018-03-02
|
||||
* Version: 1.0.3
|
||||
* License: https://js.devexpress.com/Licensing
|
||||
*/
|
||||
|
||||
@@ -192,22 +192,22 @@ var PluginHost = function () {
|
||||
this.plugins.filter(function (plugin) {
|
||||
return plugin.container;
|
||||
}).forEach(function (plugin) {
|
||||
if (knownOptionals.has(plugin.pluginName)) {
|
||||
throw getDependencyError(knownOptionals.get(plugin.pluginName), plugin.pluginName);
|
||||
if (knownOptionals.has(plugin.name)) {
|
||||
throw getDependencyError(knownOptionals.get(plugin.name), plugin.name);
|
||||
}
|
||||
|
||||
plugin.dependencies.forEach(function (dependency) {
|
||||
if (defined.has(dependency.pluginName)) return;
|
||||
if (defined.has(dependency.name)) return;
|
||||
if (dependency.optional) {
|
||||
if (!knownOptionals.has(dependency.pluginName)) {
|
||||
knownOptionals.set(dependency.pluginName, plugin.pluginName);
|
||||
if (!knownOptionals.has(dependency.name)) {
|
||||
knownOptionals.set(dependency.name, plugin.name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
throw getDependencyError(plugin.pluginName, dependency.pluginName);
|
||||
throw getDependencyError(plugin.name, dependency.name);
|
||||
});
|
||||
|
||||
defined.add(plugin.pluginName);
|
||||
defined.add(plugin.name);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"dx-core.umd.js","sources":["../src/utils.js","../src/plugin-host.js","../src/event-emitter.js","../src/shallow-equal.js","../src/memoize.js","../src/easings.js"],"sourcesContent":["const compare = (a, b) => {\n const aPosition = a.position();\n const bPosition = b.position();\n for (let i = 0; i < Math.min(aPosition.length, bPosition.length); i += 1) {\n if (aPosition[i] < bPosition[i]) return -1;\n if (aPosition[i] > bPosition[i]) return 1;\n }\n return aPosition.length - bPosition.length;\n};\n\nexport const insertPlugin = (array, newItem) => {\n const result = array.slice();\n const targetIndex = array.findIndex(item => compare(newItem, item) < 0);\n result.splice(targetIndex < 0 ? array.length : targetIndex, 0, newItem);\n return result;\n};\n","import { insertPlugin } from './utils';\n\nconst getDependencyError = (pluginName, dependencyName) =>\n new Error(`The '${pluginName}' plugin requires '${dependencyName}' to be defined before it.`);\n\nexport class PluginHost {\n constructor() {\n this.plugins = [];\n this.subscriptions = [];\n this.gettersCache = {};\n }\n ensureDependencies() {\n const defined = new Set();\n const knownOptionals = new Map();\n this.plugins\n .filter(plugin => plugin.container)\n .forEach((plugin) => {\n if (knownOptionals.has(plugin.pluginName)) {\n throw (getDependencyError(knownOptionals.get(plugin.pluginName), plugin.pluginName));\n }\n\n plugin.dependencies\n .forEach((dependency) => {\n if (defined.has(dependency.pluginName)) return;\n if (dependency.optional) {\n if (!knownOptionals.has(dependency.pluginName)) {\n knownOptionals.set(dependency.pluginName, plugin.pluginName);\n }\n return;\n }\n throw (getDependencyError(plugin.pluginName, dependency.pluginName));\n });\n\n defined.add(plugin.pluginName);\n });\n }\n registerPlugin(plugin) {\n this.plugins = insertPlugin(this.plugins, plugin);\n this.cleanPluginsCache();\n }\n unregisterPlugin(plugin) {\n this.plugins.splice(this.plugins.indexOf(plugin), 1);\n this.cleanPluginsCache();\n }\n cleanPluginsCache() {\n this.validationRequired = true;\n this.gettersCache = {};\n this.knownKeysCache = {};\n }\n knownKeys(postfix) {\n if (!this.knownKeysCache[postfix]) {\n this.knownKeysCache[postfix] = Array.from(this.plugins\n .map(plugin => Object.keys(plugin))\n .map(keys => keys.filter(key => key.endsWith(postfix))[0])\n .filter(key => !!key)\n .reduce((acc, key) => acc.add(key), new Set()))\n .map(key => key.replace(postfix, ''));\n }\n return this.knownKeysCache[postfix];\n }\n collect(key, upTo) {\n if (this.validationRequired) {\n this.ensureDependencies();\n this.validationRequired = false;\n }\n\n if (!this.gettersCache[key]) {\n this.gettersCache[key] = this.plugins.map(plugin => plugin[key]).filter(plugin => !!plugin);\n }\n if (!upTo) return this.gettersCache[key];\n\n const upToIndex = this.plugins.indexOf(upTo);\n return this.gettersCache[key].filter((getter) => {\n const pluginIndex = this.plugins.findIndex(plugin => plugin[key] === getter);\n return pluginIndex < upToIndex;\n });\n }\n get(key, upTo) {\n const plugins = this.collect(key, upTo);\n\n if (!plugins.length) return undefined;\n\n let result = plugins[0]();\n plugins.slice(1).forEach((plugin) => {\n result = plugin(result);\n });\n return result;\n }\n registerSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index === -1) { this.subscriptions.push(subscription); }\n }\n unregisterSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index !== -1) { this.subscriptions.splice(this.subscriptions.indexOf(subscription), 1); }\n }\n broadcast(event, message) {\n this.subscriptions.forEach(subscription => subscription[event] && subscription[event](message));\n }\n}\n","export class EventEmitter {\n constructor() {\n this.handlers = [];\n }\n emit(e) {\n this.handlers.forEach(handler => handler(e));\n }\n subscribe(handler) {\n this.handlers.push(handler);\n }\n unsubscribe(handler) {\n this.handlers.splice(this.handlers.indexOf(handler), 1);\n }\n}\n","export function shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n const hasOwn = Object.prototype.hasOwnProperty;\n for (let i = 0; i < keysA.length; i += 1) {\n if (!hasOwn.call(objB, keysA[i]) ||\n objA[keysA[i]] !== objB[keysA[i]]) {\n return false;\n }\n\n const valA = objA[keysA[iLine truncated
|
||||
{"version":3,"file":"dx-core.umd.js","sources":["../src/utils.js","../src/plugin-host.js","../src/event-emitter.js","../src/shallow-equal.js","../src/memoize.js","../src/easings.js"],"sourcesContent":["const compare = (a, b) => {\n const aPosition = a.position();\n const bPosition = b.position();\n for (let i = 0; i < Math.min(aPosition.length, bPosition.length); i += 1) {\n if (aPosition[i] < bPosition[i]) return -1;\n if (aPosition[i] > bPosition[i]) return 1;\n }\n return aPosition.length - bPosition.length;\n};\n\nexport const insertPlugin = (array, newItem) => {\n const result = array.slice();\n const targetIndex = array.findIndex(item => compare(newItem, item) < 0);\n result.splice(targetIndex < 0 ? array.length : targetIndex, 0, newItem);\n return result;\n};\n","import { insertPlugin } from './utils';\n\nconst getDependencyError = (pluginName, dependencyName) =>\n new Error(`The '${pluginName}' plugin requires '${dependencyName}' to be defined before it.`);\n\nexport class PluginHost {\n constructor() {\n this.plugins = [];\n this.subscriptions = [];\n this.gettersCache = {};\n }\n ensureDependencies() {\n const defined = new Set();\n const knownOptionals = new Map();\n this.plugins\n .filter(plugin => plugin.container)\n .forEach((plugin) => {\n if (knownOptionals.has(plugin.name)) {\n throw (getDependencyError(knownOptionals.get(plugin.name), plugin.name));\n }\n\n plugin.dependencies\n .forEach((dependency) => {\n if (defined.has(dependency.name)) return;\n if (dependency.optional) {\n if (!knownOptionals.has(dependency.name)) {\n knownOptionals.set(dependency.name, plugin.name);\n }\n return;\n }\n throw (getDependencyError(plugin.name, dependency.name));\n });\n\n defined.add(plugin.name);\n });\n }\n registerPlugin(plugin) {\n this.plugins = insertPlugin(this.plugins, plugin);\n this.cleanPluginsCache();\n }\n unregisterPlugin(plugin) {\n this.plugins.splice(this.plugins.indexOf(plugin), 1);\n this.cleanPluginsCache();\n }\n cleanPluginsCache() {\n this.validationRequired = true;\n this.gettersCache = {};\n this.knownKeysCache = {};\n }\n knownKeys(postfix) {\n if (!this.knownKeysCache[postfix]) {\n this.knownKeysCache[postfix] = Array.from(this.plugins\n .map(plugin => Object.keys(plugin))\n .map(keys => keys.filter(key => key.endsWith(postfix))[0])\n .filter(key => !!key)\n .reduce((acc, key) => acc.add(key), new Set()))\n .map(key => key.replace(postfix, ''));\n }\n return this.knownKeysCache[postfix];\n }\n collect(key, upTo) {\n if (this.validationRequired) {\n this.ensureDependencies();\n this.validationRequired = false;\n }\n\n if (!this.gettersCache[key]) {\n this.gettersCache[key] = this.plugins.map(plugin => plugin[key]).filter(plugin => !!plugin);\n }\n if (!upTo) return this.gettersCache[key];\n\n const upToIndex = this.plugins.indexOf(upTo);\n return this.gettersCache[key].filter((getter) => {\n const pluginIndex = this.plugins.findIndex(plugin => plugin[key] === getter);\n return pluginIndex < upToIndex;\n });\n }\n get(key, upTo) {\n const plugins = this.collect(key, upTo);\n\n if (!plugins.length) return undefined;\n\n let result = plugins[0]();\n plugins.slice(1).forEach((plugin) => {\n result = plugin(result);\n });\n return result;\n }\n registerSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index === -1) { this.subscriptions.push(subscription); }\n }\n unregisterSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index !== -1) { this.subscriptions.splice(this.subscriptions.indexOf(subscription), 1); }\n }\n broadcast(event, message) {\n this.subscriptions.forEach(subscription => subscription[event] && subscription[event](message));\n }\n}\n","export class EventEmitter {\n constructor() {\n this.handlers = [];\n }\n emit(e) {\n this.handlers.forEach(handler => handler(e));\n }\n subscribe(handler) {\n this.handlers.push(handler);\n }\n unsubscribe(handler) {\n this.handlers.splice(this.handlers.indexOf(handler), 1);\n }\n}\n","export function shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n const hasOwn = Object.prototype.hasOwnProperty;\n for (let i = 0; i < keysA.length; i += 1) {\n if (!hasOwn.call(objB, keysA[i]) ||\n objA[keysA[i]] !== objB[keysA[i]]) {\n return false;\n }\n\n const valA = objA[keysA[i]];\n const valB = objB[keysA[i]];\n\n if (valA !== vaLine truncated
|
||||
+12
-12
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"_from": "@devexpress/dx-core",
|
||||
"_id": "@devexpress/dx-core@1.0.0-beta.1",
|
||||
"_id": "@devexpress/dx-core@1.0.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-4Kv5RTlmlK7o2DF5BB5r2yWgshvFrUSHWzJzdSyBtFxsQzvI3vJqS0Z0mAplZCyYfRk4xh9SRp6I9DML66v0EQ==",
|
||||
"_integrity": "sha512-M1Kjju074ddAQmaFuKypM/LdhCZsDISqhGj4LST2ZGQPlGpH89BMBEV8p+8MedFQQCG/svuS25AKip1Gs9KJgA==",
|
||||
"_location": "/@devexpress/dx-core",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
@@ -19,10 +19,10 @@
|
||||
"_requiredBy": [
|
||||
"#USER"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@devexpress/dx-core/-/dx-core-1.0.0-beta.1.tgz",
|
||||
"_shasum": "63383ec2bd3903d9a163c1316706cde32227d6b4",
|
||||
"_resolved": "https://registry.npmjs.org/@devexpress/dx-core/-/dx-core-1.0.3.tgz",
|
||||
"_shasum": "c310b540229f83d6be5797fb2a5da5491757d21b",
|
||||
"_spec": "@devexpress/dx-core",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI",
|
||||
"author": {
|
||||
"name": "Developer Express Inc.",
|
||||
"url": "https://www.devexpress.com/"
|
||||
@@ -35,20 +35,20 @@
|
||||
"description": "Core library for DevExtreme Reactive Components",
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-jest": "^21.2.0",
|
||||
"babel-jest": "^22.1.0",
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"core-js": "^2.5.1",
|
||||
"eslint": "^4.10.0",
|
||||
"core-js": "^2.5.3",
|
||||
"eslint": "^4.16.0",
|
||||
"eslint-config-airbnb-base": "^12.1.0",
|
||||
"eslint-plugin-filenames": "^1.2.0",
|
||||
"eslint-plugin-import": "^2.8.0",
|
||||
"eslint-plugin-jest": "^21.3.0",
|
||||
"jest": "^21.2.1",
|
||||
"eslint-plugin-jest": "^21.7.0",
|
||||
"jest": "^22.1.4",
|
||||
"rollup": "0.50.0",
|
||||
"rollup-plugin-babel": "^3.0.2",
|
||||
"rollup-plugin-babel": "^3.0.3",
|
||||
"rollup-plugin-license": "^0.5.0"
|
||||
},
|
||||
"files": [
|
||||
@@ -81,5 +81,5 @@
|
||||
"test:coverage": "jest --coverage",
|
||||
"test:watch": "jest --watch"
|
||||
},
|
||||
"version": "1.0.0-beta.1"
|
||||
"version": "1.0.3"
|
||||
}
|
||||
+302
-225
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Bundle of @devexpress/dx-grid-core
|
||||
* Generated: 2017-11-10
|
||||
* Version: 1.0.0-beta.1
|
||||
* Generated: 2018-03-02
|
||||
* Version: 1.0.3
|
||||
* License: https://js.devexpress.com/Licensing
|
||||
*/
|
||||
|
||||
@@ -19,10 +19,12 @@ var rowIdGetter = function rowIdGetter(getRowId, rows) {
|
||||
return getRowId;
|
||||
};
|
||||
|
||||
var cellValueGetter = function cellValueGetter(getCellValue, columns) {
|
||||
if (getCellValue) {
|
||||
return getCellValue;
|
||||
}
|
||||
var defaultGetCellValue = function defaultGetCellValue(row, columnName) {
|
||||
return row[columnName];
|
||||
};
|
||||
var cellValueGetter = function cellValueGetter() {
|
||||
var getCellValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultGetCellValue;
|
||||
var columns = arguments[1];
|
||||
|
||||
var useFastAccessor = true;
|
||||
var map = columns.reduce(function (acc, column) {
|
||||
@@ -33,28 +35,29 @@ var cellValueGetter = function cellValueGetter(getCellValue, columns) {
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
return useFastAccessor ? function (row, columnName) {
|
||||
return row[columnName];
|
||||
} : function (row, columnName) {
|
||||
return map[columnName] ? map[columnName](row, columnName) : row[columnName];
|
||||
if (useFastAccessor) {
|
||||
return getCellValue;
|
||||
}
|
||||
|
||||
return function (row, columnName) {
|
||||
return map[columnName] ? map[columnName](row, columnName) : getCellValue(row, columnName);
|
||||
};
|
||||
};
|
||||
|
||||
var setColumnSorting = function setColumnSorting(state, _ref) {
|
||||
var changeColumnSorting = function changeColumnSorting(state, _ref) {
|
||||
var columnName = _ref.columnName,
|
||||
direction = _ref.direction,
|
||||
keepOther = _ref.keepOther,
|
||||
cancel = _ref.cancel,
|
||||
sortIndex = _ref.sortIndex;
|
||||
var sorting = state.sorting;
|
||||
|
||||
|
||||
var nextSorting = [];
|
||||
if (keepOther === true) {
|
||||
nextSorting = Array.from(sorting).slice();
|
||||
nextSorting = sorting.slice();
|
||||
}
|
||||
if (Array.isArray(keepOther)) {
|
||||
nextSorting = Array.from(sorting).filter(function (columnSorting) {
|
||||
nextSorting = sorting.slice().filter(function (columnSorting) {
|
||||
return keepOther.indexOf(columnSorting.columnName) > -1;
|
||||
});
|
||||
}
|
||||
@@ -72,7 +75,7 @@ var setColumnSorting = function setColumnSorting(state, _ref) {
|
||||
nextSorting.splice(columnSortingIndex, 1);
|
||||
}
|
||||
|
||||
if (!cancel) {
|
||||
if (direction !== null) {
|
||||
var newIndexFallback = columnSortingIndex > -1 ? columnSortingIndex : nextSorting.length;
|
||||
var newIndex = sortIndex !== undefined ? sortIndex : newIndexFallback;
|
||||
nextSorting.splice(newIndex, 0, newColumnSorting);
|
||||
@@ -446,7 +449,7 @@ var defaultCompare = function defaultCompare(a, b) {
|
||||
};
|
||||
|
||||
var createCompare = function createCompare(sorting, getColumnCompare, getComparableValue) {
|
||||
return Array.from(sorting).reverse().reduce(function (prevCompare, columnSorting) {
|
||||
return sorting.slice().reverse().reduce(function (prevCompare, columnSorting) {
|
||||
var columnName = columnSorting.columnName;
|
||||
|
||||
var inverse = columnSorting.direction === 'desc';
|
||||
@@ -495,7 +498,7 @@ var sortedRows = function sortedRows(rows, sorting, getCellValue, getColumnCompa
|
||||
|
||||
if (!getRowLevelKey) {
|
||||
var _compare = createCompare(sorting, getColumnCompare, getCellValue);
|
||||
return mergeSort(Array.from(rows), _compare);
|
||||
return mergeSort(rows.slice(), _compare);
|
||||
}
|
||||
|
||||
var compare = createCompare(sorting, getColumnCompare, function (row, columnName) {
|
||||
@@ -510,14 +513,14 @@ var sortedRows = function sortedRows(rows, sorting, getCellValue, getColumnCompa
|
||||
return sortHierarchicalRows(rows, compare, getRowLevelKey);
|
||||
};
|
||||
|
||||
var setColumnFilter = function setColumnFilter(filters, _ref) {
|
||||
var changeColumnFilter = function changeColumnFilter(filters, _ref) {
|
||||
var columnName = _ref.columnName,
|
||||
config = _ref.config;
|
||||
|
||||
var filterIndex = filters.findIndex(function (f) {
|
||||
return f.columnName === columnName;
|
||||
});
|
||||
var nextState = Array.from(filters);
|
||||
var nextState = filters.slice();
|
||||
|
||||
if (config) {
|
||||
var filter = _extends({ columnName: columnName }, config);
|
||||
@@ -624,56 +627,67 @@ var filteredRows = function filteredRows(rows, filters, getCellValue, getColumnP
|
||||
|
||||
var GROUP_KEY_SEPARATOR = '|';
|
||||
|
||||
var groupByColumn = function groupByColumn(state, _ref) {
|
||||
var applyColumnGrouping = function applyColumnGrouping(grouping, _ref) {
|
||||
var columnName = _ref.columnName,
|
||||
groupIndex = _ref.groupIndex;
|
||||
|
||||
var grouping = Array.from(state.grouping);
|
||||
var groupingIndex = grouping.findIndex(function (g) {
|
||||
var nextGrouping = grouping.slice();
|
||||
var groupingIndex = nextGrouping.findIndex(function (g) {
|
||||
return g.columnName === columnName;
|
||||
});
|
||||
var targetIndex = groupIndex;
|
||||
|
||||
if (groupingIndex > -1) {
|
||||
grouping.splice(groupingIndex, 1);
|
||||
nextGrouping.splice(groupingIndex, 1);
|
||||
} else if (groupIndex === undefined) {
|
||||
targetIndex = grouping.length;
|
||||
targetIndex = nextGrouping.length;
|
||||
}
|
||||
|
||||
if (targetIndex > -1) {
|
||||
grouping.splice(targetIndex, 0, {
|
||||
nextGrouping.splice(targetIndex, 0, {
|
||||
columnName: columnName
|
||||
});
|
||||
}
|
||||
|
||||
var ungroupedColumnIndex = state.grouping.findIndex(function (group, index) {
|
||||
return !grouping[index] || group.columnName !== grouping[index].columnName;
|
||||
return nextGrouping;
|
||||
};
|
||||
|
||||
var changeColumnGrouping = function changeColumnGrouping(_ref2, _ref3) {
|
||||
var grouping = _ref2.grouping,
|
||||
expandedGroups = _ref2.expandedGroups;
|
||||
var columnName = _ref3.columnName,
|
||||
groupIndex = _ref3.groupIndex;
|
||||
|
||||
var nextGrouping = applyColumnGrouping(grouping, { columnName: columnName, groupIndex: groupIndex });
|
||||
|
||||
var ungroupedColumnIndex = grouping.findIndex(function (group, index) {
|
||||
return !nextGrouping[index] || group.columnName !== nextGrouping[index].columnName;
|
||||
});
|
||||
if (ungroupedColumnIndex === -1) {
|
||||
return {
|
||||
grouping: grouping
|
||||
grouping: nextGrouping
|
||||
};
|
||||
}
|
||||
|
||||
var filteredExpandedGroups = state.expandedGroups.filter(function (group) {
|
||||
var filteredExpandedGroups = expandedGroups.filter(function (group) {
|
||||
return group.split(GROUP_KEY_SEPARATOR).length <= ungroupedColumnIndex;
|
||||
});
|
||||
if (filteredExpandedGroups.length === state.expandedGroups.length) {
|
||||
if (filteredExpandedGroups.length === expandedGroups.length) {
|
||||
return {
|
||||
grouping: grouping
|
||||
grouping: nextGrouping
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
grouping: grouping,
|
||||
grouping: nextGrouping,
|
||||
expandedGroups: filteredExpandedGroups
|
||||
};
|
||||
};
|
||||
|
||||
var toggleExpandedGroups = function toggleExpandedGroups(state, _ref2) {
|
||||
var groupKey = _ref2.groupKey;
|
||||
var toggleExpandedGroups = function toggleExpandedGroups(state, _ref4) {
|
||||
var groupKey = _ref4.groupKey;
|
||||
|
||||
var expandedGroups = Array.from(state.expandedGroups);
|
||||
var expandedGroups = state.expandedGroups.slice();
|
||||
var groupKeyIndex = expandedGroups.indexOf(groupKey);
|
||||
|
||||
if (groupKeyIndex > -1) {
|
||||
@@ -687,40 +701,20 @@ var toggleExpandedGroups = function toggleExpandedGroups(state, _ref2) {
|
||||
};
|
||||
};
|
||||
|
||||
var draftGroupingChange = function draftGroupingChange(state, _ref3) {
|
||||
var columnName = _ref3.columnName,
|
||||
groupIndex = _ref3.groupIndex;
|
||||
return { groupingChange: { columnName: columnName, groupIndex: groupIndex } };
|
||||
var draftColumnGrouping = function draftColumnGrouping(_ref5, _ref6) {
|
||||
var grouping = _ref5.grouping,
|
||||
draftGrouping = _ref5.draftGrouping;
|
||||
var columnName = _ref6.columnName,
|
||||
groupIndex = _ref6.groupIndex;
|
||||
return {
|
||||
draftGrouping: applyColumnGrouping(draftGrouping || grouping, { columnName: columnName, groupIndex: groupIndex })
|
||||
};
|
||||
};
|
||||
|
||||
var cancelGroupingChange = function cancelGroupingChange() {
|
||||
return { groupingChange: null };
|
||||
};
|
||||
|
||||
var draftGrouping = function draftGrouping(grouping, groupingChange) {
|
||||
if (!groupingChange) return grouping;
|
||||
|
||||
var columnName = groupingChange.columnName,
|
||||
groupIndex = groupingChange.groupIndex;
|
||||
|
||||
var result = Array.from(grouping);
|
||||
|
||||
if (groupIndex !== -1) {
|
||||
result = result.filter(function (g) {
|
||||
return g.columnName !== columnName;
|
||||
});
|
||||
result.splice(groupIndex, 0, {
|
||||
columnName: columnName,
|
||||
draft: true,
|
||||
mode: grouping.length > result.length ? 'reorder' : 'add'
|
||||
});
|
||||
} else {
|
||||
result = result.map(function (g) {
|
||||
return g.columnName === columnName ? { columnName: columnName, draft: true, mode: 'remove' } : g;
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
var cancelColumnGroupingDraft = function cancelColumnGroupingDraft() {
|
||||
return {
|
||||
draftGrouping: null
|
||||
};
|
||||
};
|
||||
|
||||
var GRID_GROUP_TYPE = 'group';
|
||||
@@ -735,26 +729,26 @@ var groupRowLevelKeyGetter = function groupRowLevelKeyGetter(row) {
|
||||
return row[GRID_GROUP_LEVEL_KEY];
|
||||
};
|
||||
|
||||
var defaultColumnIdentity = function defaultColumnIdentity(value) {
|
||||
var defaultColumnCriteria = function defaultColumnCriteria(value) {
|
||||
return {
|
||||
key: String(value),
|
||||
value: value
|
||||
};
|
||||
};
|
||||
|
||||
var groupedRows = function groupedRows(rows, grouping, getCellValue, getColumnIdentity) {
|
||||
var groupedRows = function groupedRows(rows, grouping, getCellValue, getColumnCriteria) {
|
||||
var keyPrefix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
|
||||
|
||||
if (!grouping.length) return rows;
|
||||
|
||||
var columnName = grouping[0].columnName;
|
||||
|
||||
var groupIdentity = getColumnIdentity && getColumnIdentity(columnName) || defaultColumnIdentity;
|
||||
var groupCriteria = getColumnCriteria && getColumnCriteria(columnName) || defaultColumnCriteria;
|
||||
var groups = rows.reduce(function (acc, row) {
|
||||
var _groupIdentity = groupIdentity(getCellValue(row, columnName), row),
|
||||
key = _groupIdentity.key,
|
||||
_groupIdentity$value = _groupIdentity.value,
|
||||
value = _groupIdentity$value === undefined ? key : _groupIdentity$value;
|
||||
var _groupCriteria = groupCriteria(getCellValue(row, columnName), row),
|
||||
key = _groupCriteria.key,
|
||||
_groupCriteria$value = _groupCriteria.value,
|
||||
value = _groupCriteria$value === undefined ? key : _groupCriteria$value;
|
||||
|
||||
var sameKeyItems = acc.get(key);
|
||||
|
||||
@@ -778,7 +772,7 @@ var groupedRows = function groupedRows(rows, grouping, getCellValue, getColumnId
|
||||
|
||||
var compoundKey = '' + keyPrefix + key;
|
||||
acc.push((_acc$push = {}, defineProperty(_acc$push, GRID_GROUP_CHECK, true), defineProperty(_acc$push, GRID_GROUP_LEVEL_KEY, GRID_GROUP_TYPE + '_' + groupedBy), defineProperty(_acc$push, 'groupedBy', groupedBy), defineProperty(_acc$push, 'compoundKey', compoundKey), defineProperty(_acc$push, 'key', key), defineProperty(_acc$push, 'value', value), _acc$push));
|
||||
acc.push.apply(acc, toConsumableArray(groupedRows(items, nestedGrouping, getCellValue, getColumnIdentity, '' + compoundKey + GROUP_KEY_SEPARATOR)));
|
||||
acc.push.apply(acc, toConsumableArray(groupedRows(items, nestedGrouping, getCellValue, getColumnCriteria, '' + compoundKey + GROUP_KEY_SEPARATOR)));
|
||||
return acc;
|
||||
}, []);
|
||||
};
|
||||
@@ -789,6 +783,7 @@ var expandedGroupRows = function expandedGroupRows(rows, grouping, expandedGroup
|
||||
var groupingColumnNames = grouping.map(function (columnGrouping) {
|
||||
return columnGrouping.columnName;
|
||||
});
|
||||
var expandedGroupsSet = new Set(expandedGroups);
|
||||
var currentGroupExpanded = true;
|
||||
var currentGroupLevel = 0;
|
||||
|
||||
@@ -807,7 +802,7 @@ var expandedGroupRows = function expandedGroupRows(rows, grouping, expandedGroup
|
||||
return acc;
|
||||
}
|
||||
|
||||
currentGroupExpanded = expandedGroups.has(row.compoundKey);
|
||||
currentGroupExpanded = expandedGroupsSet.has(row.compoundKey);
|
||||
currentGroupLevel = groupLevel;
|
||||
|
||||
if (currentGroupExpanded) {
|
||||
@@ -864,19 +859,34 @@ var customGroupingRowIdGetter = function customGroupingRowIdGetter(getRowId, row
|
||||
};
|
||||
};
|
||||
|
||||
var groupingPanelItems = function groupingPanelItems(columns, grouping) {
|
||||
return grouping.map(function (_ref) {
|
||||
var columnName = _ref.columnName,
|
||||
draft = _ref.draft;
|
||||
|
||||
var column = columns.find(function (c) {
|
||||
return c.name === columnName;
|
||||
});
|
||||
var groupingPanelItems = function groupingPanelItems(columns, grouping, draftGrouping) {
|
||||
var items = draftGrouping.map(function (_ref) {
|
||||
var columnName = _ref.columnName;
|
||||
return {
|
||||
column: column,
|
||||
draft: draft
|
||||
column: columns.find(function (c) {
|
||||
return c.name === columnName;
|
||||
}),
|
||||
draft: !grouping.some(function (columnGrouping) {
|
||||
return columnGrouping.columnName === columnName;
|
||||
})
|
||||
};
|
||||
});
|
||||
|
||||
grouping.forEach(function (_ref2, index) {
|
||||
var columnName = _ref2.columnName;
|
||||
|
||||
if (draftGrouping.some(function (columnGrouping) {
|
||||
return columnGrouping.columnName === columnName;
|
||||
})) return;
|
||||
items.splice(index, 0, {
|
||||
column: columns.find(function (c) {
|
||||
return c.name === columnName;
|
||||
}),
|
||||
draft: true
|
||||
});
|
||||
});
|
||||
|
||||
return items;
|
||||
};
|
||||
|
||||
var setCurrentPage = function setCurrentPage(prevPage, page) {
|
||||
@@ -955,47 +965,21 @@ var lastRowOnPage = function lastRowOnPage(currentPage, pageSize, totalRowCount)
|
||||
return result;
|
||||
};
|
||||
|
||||
var setRowSelection = function setRowSelection(selection, _ref) {
|
||||
var rowId = _ref.rowId,
|
||||
selected = _ref.selected;
|
||||
|
||||
var selectedRows = Array.from(selection);
|
||||
var selectedIndex = selectedRows.indexOf(rowId);
|
||||
|
||||
var isRowSelected = selected;
|
||||
|
||||
if (isRowSelected === undefined) {
|
||||
isRowSelected = selectedIndex === -1;
|
||||
}
|
||||
|
||||
if (selectedIndex > -1 && !isRowSelected) {
|
||||
selectedRows.splice(selectedIndex, 1);
|
||||
} else if (selectedIndex === -1 && isRowSelected) {
|
||||
selectedRows.push(rowId);
|
||||
}
|
||||
|
||||
return selectedRows;
|
||||
};
|
||||
|
||||
var setRowsSelection = function setRowsSelection(selection, _ref2) {
|
||||
var rowIds = _ref2.rowIds,
|
||||
selected = _ref2.selected;
|
||||
|
||||
if (rowIds.length === 1) {
|
||||
return setRowSelection(selection, { rowId: rowIds[0], selected: selected });
|
||||
}
|
||||
var toggleSelection = function toggleSelection(selection, _ref) {
|
||||
var rowIds = _ref.rowIds,
|
||||
state = _ref.state;
|
||||
|
||||
var rowIdsSet = new Set(rowIds);
|
||||
|
||||
var isRowsSelected = selected;
|
||||
if (isRowsSelected === undefined) {
|
||||
var rowsState = state;
|
||||
if (rowsState === undefined) {
|
||||
var availableSelection = selection.filter(function (rowId) {
|
||||
return rowIdsSet.has(rowId);
|
||||
});
|
||||
isRowsSelected = availableSelection.length !== rowIdsSet.size;
|
||||
rowsState = availableSelection.length !== rowIdsSet.size;
|
||||
}
|
||||
|
||||
if (isRowsSelected) {
|
||||
if (rowsState) {
|
||||
var selectionSet = new Set(selection);
|
||||
return [].concat(toConsumableArray(selection), toConsumableArray(rowIds.filter(function (rowId) {
|
||||
return !selectionSet.has(rowId);
|
||||
@@ -1007,41 +991,63 @@ var setRowsSelection = function setRowsSelection(selection, _ref2) {
|
||||
});
|
||||
};
|
||||
|
||||
var getAvailableToSelect = function getAvailableToSelect(rows, getRowId, isGroupRow) {
|
||||
var rowsWithAvailableToSelect = function rowsWithAvailableToSelect(rows, getRowId, isGroupRow) {
|
||||
var dataRows = rows;
|
||||
if (isGroupRow) {
|
||||
dataRows = dataRows.filter(function (row) {
|
||||
return !isGroupRow(row);
|
||||
});
|
||||
}
|
||||
return dataRows.map(function (row) {
|
||||
return getRowId(row);
|
||||
return { rows: rows, availableToSelect: dataRows.map(function (row) {
|
||||
return getRowId(row);
|
||||
}) };
|
||||
};
|
||||
|
||||
var someSelected = function someSelected(_ref, selection) {
|
||||
var availableToSelect = _ref.availableToSelect;
|
||||
|
||||
var selectionSet = new Set(selection);
|
||||
|
||||
return availableToSelect.length !== 0 && selectionSet.size !== 0 && availableToSelect.some(function (elem) {
|
||||
return selectionSet.has(elem);
|
||||
}) && availableToSelect.some(function (elem) {
|
||||
return !selectionSet.has(elem);
|
||||
});
|
||||
};
|
||||
|
||||
var getAvailableSelection = function getAvailableSelection(selection, availableToSelect) {
|
||||
var availableToSelectSet = new Set(availableToSelect);
|
||||
return selection.filter(function (selected) {
|
||||
return availableToSelectSet.has(selected);
|
||||
var allSelected = function allSelected(_ref2, selection) {
|
||||
var availableToSelect = _ref2.availableToSelect;
|
||||
|
||||
var selectionSet = new Set(selection);
|
||||
|
||||
return selectionSet.size !== 0 && availableToSelect.length !== 0 && !availableToSelect.some(function (elem) {
|
||||
return !selectionSet.has(elem);
|
||||
});
|
||||
};
|
||||
|
||||
var startEditRows = function startEditRows(prevEditingRows, _ref) {
|
||||
var unwrapSelectedRows = function unwrapSelectedRows(_ref3) {
|
||||
var rows = _ref3.rows;
|
||||
return rows;
|
||||
};
|
||||
|
||||
var startEditRows = function startEditRows(prevEditingRowIds, _ref) {
|
||||
var rowIds = _ref.rowIds;
|
||||
return [].concat(toConsumableArray(prevEditingRows), toConsumableArray(rowIds));
|
||||
return [].concat(toConsumableArray(prevEditingRowIds), toConsumableArray(rowIds));
|
||||
};
|
||||
|
||||
var stopEditRows = function stopEditRows(prevEditingRows, _ref2) {
|
||||
var stopEditRows = function stopEditRows(prevEditingRowIds, _ref2) {
|
||||
var rowIds = _ref2.rowIds;
|
||||
|
||||
var rowIdSet = new Set(rowIds);
|
||||
return prevEditingRows.filter(function (id) {
|
||||
return prevEditingRowIds.filter(function (id) {
|
||||
return !rowIdSet.has(id);
|
||||
});
|
||||
};
|
||||
|
||||
var addRow = function addRow(addedRows, _ref3) {
|
||||
var row = _ref3.row;
|
||||
var addRow = function addRow(addedRows) {
|
||||
var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { row: {} },
|
||||
row = _ref3.row;
|
||||
|
||||
return [].concat(toConsumableArray(addedRows), [row]);
|
||||
};
|
||||
|
||||
@@ -1049,7 +1055,7 @@ var changeAddedRow = function changeAddedRow(addedRows, _ref4) {
|
||||
var rowId = _ref4.rowId,
|
||||
change = _ref4.change;
|
||||
|
||||
var result = Array.from(addedRows);
|
||||
var result = addedRows.slice();
|
||||
result[rowId] = _extends({}, result[rowId], change);
|
||||
return result;
|
||||
};
|
||||
@@ -1067,34 +1073,34 @@ var cancelAddedRows = function cancelAddedRows(addedRows, _ref5) {
|
||||
return result;
|
||||
};
|
||||
|
||||
var changeRow = function changeRow(prevChangedRows, _ref6) {
|
||||
var changeRow = function changeRow(prevRowChanges, _ref6) {
|
||||
var rowId = _ref6.rowId,
|
||||
change = _ref6.change;
|
||||
|
||||
var prevChange = prevChangedRows[rowId] || {};
|
||||
return _extends({}, prevChangedRows, defineProperty({}, rowId, _extends({}, prevChange, change)));
|
||||
var prevChange = prevRowChanges[rowId] || {};
|
||||
return _extends({}, prevRowChanges, defineProperty({}, rowId, _extends({}, prevChange, change)));
|
||||
};
|
||||
|
||||
var cancelChanges = function cancelChanges(prevChangedRows, _ref7) {
|
||||
var cancelChanges = function cancelChanges(prevRowChanges, _ref7) {
|
||||
var rowIds = _ref7.rowIds;
|
||||
|
||||
var result = _extends({}, prevChangedRows);
|
||||
var result = _extends({}, prevRowChanges);
|
||||
rowIds.forEach(function (rowId) {
|
||||
delete result[rowId];
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
var deleteRows = function deleteRows(deletedRows, _ref8) {
|
||||
var deleteRows = function deleteRows(deletedRowIds, _ref8) {
|
||||
var rowIds = _ref8.rowIds;
|
||||
return [].concat(toConsumableArray(deletedRows), toConsumableArray(rowIds));
|
||||
return [].concat(toConsumableArray(deletedRowIds), toConsumableArray(rowIds));
|
||||
};
|
||||
|
||||
var cancelDeletedRows = function cancelDeletedRows(deletedRows, _ref9) {
|
||||
var cancelDeletedRows = function cancelDeletedRows(deletedRowIds, _ref9) {
|
||||
var rowIds = _ref9.rowIds;
|
||||
|
||||
var rowIdSet = new Set(rowIds);
|
||||
return deletedRows.filter(function (rowId) {
|
||||
return deletedRowIds.filter(function (rowId) {
|
||||
return !rowIdSet.has(rowId);
|
||||
});
|
||||
};
|
||||
@@ -1118,21 +1124,30 @@ var addedRowsByIds = function addedRowsByIds(addedRows, rowIds) {
|
||||
return result;
|
||||
};
|
||||
|
||||
var computedCreateRowChange = function computedCreateRowChange(columns) {
|
||||
var map = columns.reduce(function (acc, column) {
|
||||
if (column.createRowChange) {
|
||||
acc[column.name] = column.createRowChange;
|
||||
var defaultCreateRowChange = function defaultCreateRowChange(row, value, columnName) {
|
||||
return defineProperty({}, columnName, value);
|
||||
};
|
||||
var createRowChangeGetter = function createRowChangeGetter() {
|
||||
var createRowChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultCreateRowChange;
|
||||
var columnExtensions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
||||
|
||||
var map = columnExtensions.reduce(function (acc, columnExtension) {
|
||||
if (columnExtension.createRowChange) {
|
||||
acc[columnExtension.columnName] = columnExtension.createRowChange;
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
return function (row, columnName, value) {
|
||||
return map[columnName] ? map[columnName](row, value, columnName) : defineProperty({}, columnName, value);
|
||||
return function (row, value, columnName) {
|
||||
if (map[columnName]) {
|
||||
return map[columnName](row, value, columnName);
|
||||
}
|
||||
return createRowChange(row, value, columnName);
|
||||
};
|
||||
};
|
||||
|
||||
var getRowChange = function getRowChange(changedRows, rowId) {
|
||||
return changedRows[rowId] || {};
|
||||
var getRowChange = function getRowChange(rowChanges, rowId) {
|
||||
return rowChanges[rowId] || {};
|
||||
};
|
||||
|
||||
var TABLE_REORDERING_TYPE = 'reordering';
|
||||
@@ -1143,7 +1158,7 @@ var changeColumnOrder = function changeColumnOrder(order, _ref) {
|
||||
|
||||
var sourceColumnIndex = order.indexOf(sourceColumnName);
|
||||
var targetColumnIndex = order.indexOf(targetColumnName);
|
||||
var newOrder = Array.from(order);
|
||||
var newOrder = order.slice();
|
||||
|
||||
newOrder.splice(sourceColumnIndex, 1);
|
||||
newOrder.splice(targetColumnIndex, 0, sourceColumnName);
|
||||
@@ -1154,7 +1169,7 @@ var TABLE_DATA_TYPE = 'data';
|
||||
var TABLE_NODATA_TYPE = 'nodata';
|
||||
|
||||
var orderedColumns = function orderedColumns(tableColumns, order) {
|
||||
var result = Array.from(tableColumns);
|
||||
var result = tableColumns.slice();
|
||||
|
||||
result.sort(function (a, b) {
|
||||
if (a.type !== TABLE_DATA_TYPE || b.type !== TABLE_DATA_TYPE) return 0;
|
||||
@@ -1194,7 +1209,11 @@ var tableColumnsWithWidths = function tableColumnsWithWidths(tableColumns, colum
|
||||
return tableColumns.reduce(function (acc, tableColumn) {
|
||||
if (tableColumn.type === 'data') {
|
||||
var columnName = tableColumn.column.name;
|
||||
var width = draftColumnWidths[columnName] || columnWidths[columnName];
|
||||
var isCurrentColumn = function isCurrentColumn(elem) {
|
||||
return elem.columnName === columnName;
|
||||
};
|
||||
var column = draftColumnWidths.find(isCurrentColumn) || columnWidths.find(isCurrentColumn);
|
||||
var width = column && column.width;
|
||||
if (width === undefined) {
|
||||
throw new Error(UNSET_COLUMN_WIDTH_ERROR.replace('$1', columnName));
|
||||
}
|
||||
@@ -1208,36 +1227,43 @@ var tableColumnsWithWidths = function tableColumnsWithWidths(tableColumns, colum
|
||||
|
||||
var MIN_SIZE = 40;
|
||||
|
||||
var changeTableColumnWidths = function changeTableColumnWidths(state, _ref) {
|
||||
var shifts = _ref.shifts;
|
||||
var changeTableColumnWidth = function changeTableColumnWidth(state, _ref) {
|
||||
var columnName = _ref.columnName,
|
||||
shift = _ref.shift;
|
||||
var columnWidths = state.columnWidths;
|
||||
|
||||
var updatedColumnWidths = Object.keys(shifts).reduce(function (acc, columnName) {
|
||||
var size = Math.max(MIN_SIZE, columnWidths[columnName] + shifts[columnName]);
|
||||
return Object.assign(acc, defineProperty({}, columnName, size));
|
||||
}, {});
|
||||
return _extends({}, state, {
|
||||
columnWidths: _extends({}, columnWidths, updatedColumnWidths),
|
||||
draftColumnWidths: {}
|
||||
var nextColumnWidth = columnWidths.slice();
|
||||
var index = nextColumnWidth.findIndex(function (elem) {
|
||||
return elem.columnName === columnName;
|
||||
});
|
||||
var updatedColumn = nextColumnWidth[index];
|
||||
var size = Math.max(MIN_SIZE, updatedColumn.width + shift);
|
||||
nextColumnWidth.splice(index, 1, { columnName: columnName, width: size });
|
||||
|
||||
return {
|
||||
columnWidths: nextColumnWidth
|
||||
};
|
||||
};
|
||||
|
||||
var changeDraftTableColumnWidths = function changeDraftTableColumnWidths(state, _ref2) {
|
||||
var shifts = _ref2.shifts;
|
||||
var columnWidths = state.columnWidths,
|
||||
draftColumnWidths = state.draftColumnWidths;
|
||||
var draftTableColumnWidth = function draftTableColumnWidth(state, _ref2) {
|
||||
var columnName = _ref2.columnName,
|
||||
shift = _ref2.shift;
|
||||
var columnWidths = state.columnWidths;
|
||||
|
||||
var updatedDraftColumnWidths = Object.keys(shifts).reduce(function (acc, columnName) {
|
||||
if (shifts[columnName] === null) {
|
||||
delete acc[columnName];
|
||||
return acc;
|
||||
}
|
||||
var size = Math.max(MIN_SIZE, columnWidths[columnName] + shifts[columnName]);
|
||||
return Object.assign(acc, defineProperty({}, columnName, size));
|
||||
}, Object.assign({}, draftColumnWidths));
|
||||
return _extends({}, state, {
|
||||
draftColumnWidths: updatedDraftColumnWidths
|
||||
var updatedColumn = columnWidths.find(function (elem) {
|
||||
return elem.columnName === columnName;
|
||||
});
|
||||
var size = Math.max(MIN_SIZE, updatedColumn.width + shift);
|
||||
|
||||
return {
|
||||
draftColumnWidths: [{ columnName: updatedColumn.columnName, width: size }]
|
||||
};
|
||||
};
|
||||
|
||||
var cancelTableColumnWidthDraft = function cancelTableColumnWidthDraft() {
|
||||
return {
|
||||
draftColumnWidths: []
|
||||
};
|
||||
};
|
||||
|
||||
var TABLE_EDIT_COMMAND_TYPE = 'editCommand';
|
||||
@@ -1268,8 +1294,8 @@ var isEditTableRow = function isEditTableRow(tableRow) {
|
||||
return tableRow.type === TABLE_EDIT_TYPE;
|
||||
};
|
||||
|
||||
var tableRowsWithEditing = function tableRowsWithEditing(tableRows, editingRows, addedRows, rowHeight) {
|
||||
var rowIds = new Set(editingRows);
|
||||
var tableRowsWithEditing = function tableRowsWithEditing(tableRows, editingRowIds, addedRows, rowHeight) {
|
||||
var rowIds = new Set(editingRowIds);
|
||||
var editedTableRows = tableRows.map(function (tableRow) {
|
||||
return tableRow.type === TABLE_DATA_TYPE && rowIds.has(tableRow.rowId) ? _extends({}, tableRow, {
|
||||
type: TABLE_EDIT_TYPE,
|
||||
@@ -1315,37 +1341,44 @@ var isGroupTableRow = function isGroupTableRow(tableRow) {
|
||||
return tableRow.type === TABLE_GROUP_TYPE;
|
||||
};
|
||||
|
||||
var tableColumnsWithDraftGrouping = function tableColumnsWithDraftGrouping(tableColumns, draftGrouping, showColumnWhenGrouped) {
|
||||
var tableColumnsWithDraftGrouping = function tableColumnsWithDraftGrouping(tableColumns, grouping, draftGrouping, showColumnWhenGrouped) {
|
||||
return tableColumns.reduce(function (acc, tableColumn) {
|
||||
var isDataColumn = tableColumn.type === TABLE_DATA_TYPE;
|
||||
var tableColumnName = isDataColumn ? tableColumn.column.name : '';
|
||||
var columnDraftGrouping = draftGrouping.find(function (grouping) {
|
||||
return grouping.columnName === tableColumnName;
|
||||
if (tableColumn.type !== TABLE_DATA_TYPE) {
|
||||
acc.push(tableColumn);
|
||||
return acc;
|
||||
}
|
||||
|
||||
var columnName = tableColumn.column.name;
|
||||
var columnGroupingExists = grouping.some(function (columnGrouping) {
|
||||
return columnGrouping.columnName === columnName;
|
||||
});
|
||||
var columnDraftGroupingExists = draftGrouping.some(function (columnGrouping) {
|
||||
return columnGrouping.columnName === columnName;
|
||||
});
|
||||
|
||||
if (!columnDraftGrouping || showColumnWhenGrouped(tableColumnName)) {
|
||||
return [].concat(toConsumableArray(acc), [tableColumn]);
|
||||
} else if (columnDraftGrouping.mode === 'remove' || columnDraftGrouping.mode === 'add') {
|
||||
return [].concat(toConsumableArray(acc), [_extends({}, tableColumn, {
|
||||
if (!columnGroupingExists && !columnDraftGroupingExists || showColumnWhenGrouped(columnName)) {
|
||||
acc.push(tableColumn);
|
||||
} else if (!columnGroupingExists && columnDraftGroupingExists || columnGroupingExists && !columnDraftGroupingExists) {
|
||||
acc.push(_extends({}, tableColumn, {
|
||||
draft: true
|
||||
})]);
|
||||
}));
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
};
|
||||
|
||||
var tableColumnsWithGrouping = function tableColumnsWithGrouping(tableColumns, grouping, draftGrouping, groupIndentColumnWidth, showColumnWhenGrouped) {
|
||||
var tableColumnsWithGrouping = function tableColumnsWithGrouping(columns, tableColumns, grouping, draftGrouping, indentColumnWidth, showColumnWhenGrouped) {
|
||||
return [].concat(toConsumableArray(grouping.map(function (columnGrouping) {
|
||||
var groupedColumn = tableColumns.find(function (tableColumn) {
|
||||
return tableColumn.type === TABLE_DATA_TYPE && tableColumn.column.name === columnGrouping.columnName;
|
||||
}).column;
|
||||
var groupedColumn = columns.find(function (column) {
|
||||
return column.name === columnGrouping.columnName;
|
||||
});
|
||||
return {
|
||||
key: TABLE_GROUP_TYPE + '_' + groupedColumn.name,
|
||||
type: TABLE_GROUP_TYPE,
|
||||
column: groupedColumn,
|
||||
width: groupIndentColumnWidth
|
||||
width: indentColumnWidth
|
||||
};
|
||||
})), toConsumableArray(tableColumnsWithDraftGrouping(tableColumns, draftGrouping, showColumnWhenGrouped)));
|
||||
})), toConsumableArray(tableColumnsWithDraftGrouping(tableColumns, grouping, draftGrouping, showColumnWhenGrouped)));
|
||||
};
|
||||
|
||||
var tableRowsWithGrouping = function tableRowsWithGrouping(tableRows, isGroupRow) {
|
||||
@@ -1375,8 +1408,8 @@ var tableRowsWithHeading = function tableRowsWithHeading(headerRows) {
|
||||
|
||||
var TABLE_DETAIL_TYPE = 'detail';
|
||||
|
||||
var isDetailRowExpanded = function isDetailRowExpanded(expandedRows, rowId) {
|
||||
return expandedRows.indexOf(rowId) > -1;
|
||||
var isDetailRowExpanded = function isDetailRowExpanded(expandedDetailRowIds, rowId) {
|
||||
return expandedDetailRowIds.indexOf(rowId) > -1;
|
||||
};
|
||||
var isDetailToggleTableCell = function isDetailToggleTableCell(tableRow, tableColumn) {
|
||||
return tableColumn.type === TABLE_DETAIL_TYPE && tableRow.type === TABLE_DATA_TYPE;
|
||||
@@ -1385,26 +1418,26 @@ var isDetailTableRow = function isDetailTableRow(tableRow) {
|
||||
return tableRow.type === TABLE_DETAIL_TYPE;
|
||||
};
|
||||
|
||||
var setDetailRowExpanded = function setDetailRowExpanded(prevExpanded, _ref) {
|
||||
var toggleDetailRowExpanded = function toggleDetailRowExpanded(prevExpanded, _ref) {
|
||||
var rowId = _ref.rowId,
|
||||
isExpanded = _ref.isExpanded;
|
||||
state = _ref.state;
|
||||
|
||||
var expandedRows = Array.from(prevExpanded);
|
||||
var expandedIndex = expandedRows.indexOf(rowId);
|
||||
var isRowExpanded = isExpanded !== undefined ? isExpanded : expandedIndex === -1;
|
||||
var expandedDetailRowIds = prevExpanded.slice();
|
||||
var expandedIndex = expandedDetailRowIds.indexOf(rowId);
|
||||
var rowState = state !== undefined ? state : expandedIndex === -1;
|
||||
|
||||
if (expandedIndex > -1 && !isRowExpanded) {
|
||||
expandedRows.splice(expandedIndex, 1);
|
||||
} else if (expandedIndex === -1 && isRowExpanded) {
|
||||
expandedRows.push(rowId);
|
||||
if (expandedIndex > -1 && !rowState) {
|
||||
expandedDetailRowIds.splice(expandedIndex, 1);
|
||||
} else if (expandedIndex === -1 && rowState) {
|
||||
expandedDetailRowIds.push(rowId);
|
||||
}
|
||||
|
||||
return expandedRows;
|
||||
return expandedDetailRowIds;
|
||||
};
|
||||
|
||||
var tableRowsWithExpandedDetail = function tableRowsWithExpandedDetail(tableRows, expandedRows, rowHeight) {
|
||||
var tableRowsWithExpandedDetail = function tableRowsWithExpandedDetail(tableRows, expandedDetailRowIds, rowHeight) {
|
||||
var result = tableRows;
|
||||
expandedRows.forEach(function (expandedRowId) {
|
||||
expandedDetailRowIds.forEach(function (expandedRowId) {
|
||||
var rowIndex = result.findIndex(function (tableRow) {
|
||||
return tableRow.type === TABLE_DATA_TYPE && tableRow.rowId === expandedRowId;
|
||||
});
|
||||
@@ -1426,8 +1459,8 @@ var tableRowsWithExpandedDetail = function tableRowsWithExpandedDetail(tableRows
|
||||
return result;
|
||||
};
|
||||
|
||||
var tableColumnsWithDetail = function tableColumnsWithDetail(tableColumns, detailToggleCellWidth) {
|
||||
return [{ key: TABLE_DETAIL_TYPE, type: TABLE_DETAIL_TYPE, width: detailToggleCellWidth }].concat(toConsumableArray(tableColumns));
|
||||
var tableColumnsWithDetail = function tableColumnsWithDetail(tableColumns, toggleColumnWidth) {
|
||||
return [{ key: TABLE_DETAIL_TYPE, type: TABLE_DETAIL_TYPE, width: toggleColumnWidth }].concat(toConsumableArray(tableColumns));
|
||||
};
|
||||
|
||||
var TABLE_SELECT_TYPE = 'select';
|
||||
@@ -1456,12 +1489,29 @@ var isDataTableRow = function isDataTableRow(tableRow) {
|
||||
return tableRow.type === TABLE_DATA_TYPE;
|
||||
};
|
||||
|
||||
var tableColumnsWithDataRows = function tableColumnsWithDataRows(columns) {
|
||||
var getColumnExtension = function getColumnExtension(columnExtensions, columnName) {
|
||||
if (!columnExtensions) {
|
||||
return {};
|
||||
}
|
||||
var columnExtension = columnExtensions.find(function (extension) {
|
||||
return extension.columnName === columnName;
|
||||
});
|
||||
if (!columnExtension) {
|
||||
return {};
|
||||
}
|
||||
return columnExtension;
|
||||
};
|
||||
|
||||
var tableColumnsWithDataRows = function tableColumnsWithDataRows(columns, columnExtensions) {
|
||||
return columns.map(function (column) {
|
||||
var name = column.name;
|
||||
|
||||
var columnExtension = getColumnExtension(columnExtensions, name);
|
||||
return {
|
||||
key: TABLE_DATA_TYPE + '_' + column.name,
|
||||
key: TABLE_DATA_TYPE + '_' + name,
|
||||
type: TABLE_DATA_TYPE,
|
||||
width: column.width,
|
||||
width: columnExtension.width,
|
||||
align: columnExtension.align,
|
||||
column: column
|
||||
};
|
||||
});
|
||||
@@ -1479,20 +1529,26 @@ var tableRowsWithDataRows = function tableRowsWithDataRows(rows, getRowId) {
|
||||
});
|
||||
};
|
||||
|
||||
var visibleTableColumns = function visibleTableColumns(tableColumns, hiddenColumns) {
|
||||
var visibleTableColumns = function visibleTableColumns(tableColumns, hiddenColumnNames) {
|
||||
return tableColumns.filter(function (tableColumn) {
|
||||
return hiddenColumns.indexOf(tableColumn.column.name) === -1;
|
||||
return tableColumn.type !== TABLE_DATA_TYPE || hiddenColumnNames.indexOf(tableColumn.column.name) === -1;
|
||||
});
|
||||
};
|
||||
|
||||
var columnChooserItems = function columnChooserItems(columns, hiddenColumns) {
|
||||
var tableDataColumnsExist = function tableDataColumnsExist(tableColumns) {
|
||||
return tableColumns.some(function (column) {
|
||||
return column.type === TABLE_DATA_TYPE;
|
||||
});
|
||||
};
|
||||
|
||||
var columnChooserItems = function columnChooserItems(columns, hiddenColumnNames) {
|
||||
return columns.map(function (column) {
|
||||
return { column: column, hidden: hiddenColumns.indexOf(column.name) !== -1 };
|
||||
return { column: column, hidden: hiddenColumnNames.indexOf(column.name) !== -1 };
|
||||
});
|
||||
};
|
||||
|
||||
var toggleColumn = function toggleColumn(hiddenColumns, columnName) {
|
||||
return hiddenColumns.indexOf(columnName) === -1 ? [].concat(toConsumableArray(hiddenColumns), [columnName]) : hiddenColumns.filter(function (hiddenColumn) {
|
||||
var toggleColumn = function toggleColumn(hiddenColumnNames, columnName) {
|
||||
return hiddenColumnNames.indexOf(columnName) === -1 ? [].concat(toConsumableArray(hiddenColumnNames), [columnName]) : hiddenColumnNames.filter(function (hiddenColumn) {
|
||||
return hiddenColumn !== columnName;
|
||||
});
|
||||
};
|
||||
@@ -1652,15 +1708,36 @@ var isOnTheSameLine = function isOnTheSameLine(geometry, y) {
|
||||
return y >= geometry.top && y <= geometry.bottom;
|
||||
};
|
||||
|
||||
var getGroupCellTargetIndex = function getGroupCellTargetIndex(geometries, sourceIndex, _ref) {
|
||||
var x = _ref.x,
|
||||
y = _ref.y;
|
||||
var rectToObject = function rectToObject(_ref) {
|
||||
var top = _ref.top,
|
||||
right = _ref.right,
|
||||
bottom = _ref.bottom,
|
||||
left = _ref.left;
|
||||
return {
|
||||
top: top, right: right, bottom: bottom, left: left
|
||||
};
|
||||
};
|
||||
|
||||
var collapseGapsBetweenItems = function collapseGapsBetweenItems(geometries) {
|
||||
return geometries.map(function (geometry, index) {
|
||||
if (index !== geometries.length - 1 && geometry.top === geometries[index + 1].top) {
|
||||
return _extends({}, geometry, {
|
||||
right: geometries[index + 1].left
|
||||
});
|
||||
}
|
||||
return geometry;
|
||||
});
|
||||
};
|
||||
|
||||
var getGroupCellTargetIndex = function getGroupCellTargetIndex(geometries, sourceIndex, _ref2) {
|
||||
var x = _ref2.x,
|
||||
y = _ref2.y;
|
||||
|
||||
if (geometries.length === 0) return 0;
|
||||
|
||||
var targetGeometries = sourceIndex !== -1 ? getTargetColumnGeometries(geometries, sourceIndex) : geometries;
|
||||
var targetGeometries = sourceIndex !== -1 ? getTargetColumnGeometries(geometries, sourceIndex) : geometries.map(rectToObject);
|
||||
|
||||
var targetIndex = targetGeometries.findIndex(function (geometry, index) {
|
||||
var targetIndex = collapseGapsBetweenItems(targetGeometries).findIndex(function (geometry, index) {
|
||||
var inVerticalBounds = isOnTheSameLine(geometry, y);
|
||||
var inHorizontalBounds = x >= geometry.left && x <= geometry.right;
|
||||
var shouldGoFirst = index === 0 && x < geometry.left;
|
||||
@@ -1692,5 +1769,5 @@ var getMessagesFormatter = function getMessagesFormatter(messages) {
|
||||
};
|
||||
};
|
||||
|
||||
export { getTableRowColumnsWithColSpan, getTableColumnGeometries, getTableTargetColumnIndex, getAnimations, filterActiveAnimations, evalAnimations, getGroupCellTargetIndex, getMessagesFormatter, rowIdGetter, cellValueGetter, setColumnSorting, getColumnSortingDirection, sortedRows, setColumnFilter, getColumnFilterConfig, filteredRows, groupByColumn, toggleExpandedGroups, draftGroupingChange, cancelGroupingChange, draftGrouping, groupRowChecker, groupRowLevelKeyGetter, groupedRows, expandedGroupRows, customGroupedRows, customGroupingRowIdGetter, groupingPanelItems, setCurrentPage, setPageSize, paginatedRows, rowsWithPageHeaders, pageCount, rowCount, firstRowOnPage, lastRowOnPage, setRowsSelection, getAvailableToSelect, getAvailableSelection, startEditRows, stopEditRows, addRow, changeAddedRow, cancelAddedRows, changeRow, cancelChanges, deleteRows, cancelDeletedRows, changedRowsByIds, addedRowsByIds, computedCreateRowChange, getRowChange, TABLE_REORDERING_TYPE, changeColumnOrder, orderedColumns, tableHeaderRowsWithReordering, draftOrder, tableColumnsWithWidths, changeTableColumnWidths, changeDraftTableColumnWidths, TABLE_EDIT_COMMAND_TYPE, isHeadingEditCommandsTableCell, isEditCommandsTableCell, tableColumnsWithEditing, TABLE_ADDED_TYPE, TABLE_EDIT_TYPE, isEditTableCell, isAddedTableRow, isEditTableRow, tableRowsWithEditing, TABLE_FILTER_TYPE, isFilterTableCell, isFilterTableRow, tableHeaderRowsWithFilter, TABLE_GROUP_TYPE, isGroupTableCell, isGroupIndentTableCell, isGroupTableRow, tableColumnsWithGrouping, tableRowsWithGrouping, TABLE_HEADING_TYPE, isHeadingTableCell, isHeadingTableRow, tableRowsWithHeading, TABLE_DETAIL_TYPE, isDetailRowExpanded, isDetailToggleTableCell, isDetailTableRow, setDetailRowExpanded, tableRowsWithExpandedDetail, tableColumnsWithDetail, TABLE_SELECT_TYPE, isSelectTableCell, isSelectAllTableCell, tableColumnsWithSelection, TABLE_DATA_TYPE, TABLE_NODATA_TYPE, isNoDataTableRow, isDataTableCell, isHeaderStubTableCell, isDataTableRow, tableColumnsWithDataRows, tableRowsWithDataRows, visibleTableColumns, columnChooserItems, toggleColumn };
|
||||
export { getColumnExtension, getTableRowColumnsWithColSpan, getTableColumnGeometries, getTableTargetColumnIndex, getAnimations, filterActiveAnimations, evalAnimations, getGroupCellTargetIndex, getMessagesFormatter, rowIdGetter, cellValueGetter, changeColumnSorting, getColumnSortingDirection, sortedRows, changeColumnFilter, getColumnFilterConfig, filteredRows, GROUP_KEY_SEPARATOR, changeColumnGrouping, toggleExpandedGroups, draftColumnGrouping, cancelColumnGroupingDraft, groupRowChecker, groupRowLevelKeyGetter, groupedRows, expandedGroupRows, customGroupedRows, customGroupingRowIdGetter, groupingPanelItems, setCurrentPage, setPageSize, paginatedRows, rowsWithPageHeaders, pageCount, rowCount, firstRowOnPage, lastRowOnPage, toggleSelection, rowsWithAvailableToSelect, someSelected, allSelected, unwrapSelectedRows, startEditRows, stopEditRows, addRow, changeAddedRow, cancelAddedRows, changeRow, cancelChanges, deleteRows, cancelDeletedRows, changedRowsByIds, addedRowsByIds, createRowChangeGetter, getRowChange, TABLE_REORDERING_TYPE, changeColumnOrder, orderedColumns, tableHeaderRowsWithReordering, draftOrder, tableColumnsWithWidths, changeTableColumnWidth, draftTableColumnWidth, cancelTableColumnWidthDraft, TABLE_EDIT_COMMAND_TYPE, isHeadingEditCommandsTableCell, isEditCommandsTableCell, tableColumnsWithEditing, TABLE_ADDED_TYPE, TABLE_EDIT_TYPE, isEditTableCell, isAddedTableRow, isEditTableRow, tableRowsWithEditing, TABLE_FILTER_TYPE, isFilterTableCell, isFilterTableRow, tableHeaderRowsWithFilter, TABLE_GROUP_TYPE, isGroupTableCell, isGroupIndentTableCell, isGroupTableRow, tableColumnsWithGrouping, tableRowsWithGrouping, TABLE_HEADING_TYPE, isHeadingTableCell, isHeadingTableRow, tableRowsWithHeading, TABLE_DETAIL_TYPE, isDetailRowExpanded, isDetailToggleTableCell, isDetailTableRow, toggleDetailRowExpanded, tableRowsWithExpandedDetail, tableColumnsWithDetail, TABLE_SELECT_TYPE, isSelectTableCell, isSelectAllTableCell, tableColumnsWithSelection, TABLE_DATA_TYPE, TABLE_NODATA_TYPE, isNoDataTableRow, isDataTableCell, isHeaderStubTableCell, isDataTableRow, tableColumnsWithDataRows, tableRowsWithDataRows, visibleTableColumns, tableDataColumnsExist, columnChooserItems, toggleColumn };
|
||||
//# sourceMappingURL=dx-grid-core.es.js.map
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"dx-grid-core.es.js","sources":["../src/plugins/grid-core/computeds.js","../src/plugins/sorting-state/reducers.js","../src/plugins/sorting-state/helpers.js","../src/utils/merge-sort.js","../src/utils/hierarchical-data.js","../src/plugins/local-sorting/computeds.js","../src/plugins/filtering-state/reducers.js","../src/plugins/filtering-state/helpers.js","../src/plugins/local-filtering/computeds.js","../src/plugins/grouping-state/constants.js","../src/plugins/grouping-state/reducers.js","../src/plugins/grouping-state/computeds.js","../src/plugins/local-grouping/constants.js","../src/plugins/local-grouping/computeds.js","../src/plugins/custom-grouping/computeds.js","../src/plugins/grouping-panel/helpers.js","../src/plugins/paging-state/reducers.js","../src/plugins/local-paging/computeds.js","../src/plugins/paging-panel/helpers.js","../src/plugins/selection-state/reducers.js","../src/plugins/selection-state/computeds.js","../src/plugins/editing-state/reducers.js","../src/plugins/editing-state/computeds.js","../src/plugins/editing-state/helpers.js","../src/plugins/table-column-reordering/constants.js","../src/plugins/table-column-reordering/reducers.js","../src/plugins/table-view/constants.js","../src/plugins/table-column-reordering/computeds.js","../src/plugins/table-column-resizing/computeds.js","../src/plugins/table-column-resizing/reducers.js","../src/plugins/table-edit-column/constants.js","../src/plugins/table-edit-row/constants.js","../src/plugins/table-header-row/constants.js","../src/plugins/table-edit-column/helpers.js","../src/plugins/table-edit-column/computeds.js","../src/plugins/table-edit-row/helpers.js","../src/plugins/table-edit-row/computeds.js","../src/plugins/table-filter-row/constants.js","../src/plugins/table-filter-row/helpers.js","../src/plugins/table-filter-row/computeds.js","../src/plugins/table-group-row/constants.js","../src/plugins/table-group-row/helpers.js","../src/plugins/table-group-row/computeds.js","../src/plugins/table-header-row/helpers.js","../src/plugins/table-header-row/computeds.js","../src/plugins/table-row-detail/constants.js","../src/plugins/table-row-detail/helpers.js","../src/plugins/table-row-detail/reducers.js","../src/plugins/table-row-detail/computeds.js","../src/plugins/table-selection/constants.js","../src/plugins/table-selection/helpers.js","../src/plugins/table-selection/computeds.js","../src/plugins/table-view/helpers.js","../src/plugins/table-view/computeds.js","../src/plugins/table-column-visibility/computeds.js","../src/column-chooser/computeds.js","../src/column-chooser/reducers.js","../src/utils/column-geometries.js","../src/utils/table.js","../src/utils/group-panel.js","../src/utils/messages-formatter.js"],"sourcesContent":["export const rowIdGetter = (getRowId, rows) => {\n if (!getRowId) {\n const map = new Map(rows.map((row, rowIndex) => [row, rowIndex]));\n return row => map.get(row);\n }\n return getRowId;\n};\n\nexport const cellValueGetter = (getCellValue, columns) => {\n if (getCellValue) {\n return getCellValue;\n }\n\n let useFastAccessor = true;\n const map = columns.reduce((acc, column) => {\n if (column.getCellValue) {\n useFastAccessor = false;\n acc[column.name] = column.getCellValue;\n }\n return acc;\n }, {});\n\n return useFastAccessor ?\n (row, columnName) => row[columnName] :\n (row, columnName) => (map[columnName] ? map[columnName](row, columnName) : row[columnName]);\n};\n","export const setColumnSorting = (state, {\n columnName, direction, keepOther, cancel, sortIndex,\n}) => {\n const { sorting } = state;\n\n let nextSorting = [];\n if (keepOther === true) {\n nextSorting = Array.from(sorting).slice();\n }\n if (Array.isArray(keepOther)) {\n nextSorting = Array.from(sorting)\n .filter(columnSorting => keepOther.indexOf(columnSorting.columnName) > -1);\n }\n\n const columnSortingIndex = sorting\n .findIndex(columnSorting => columnSorting.columnName === columnName);\n const columnSorting = sorting[columnSortingIndex];\n const newColumnSorting = {\n columnName,\n direction: direction ||\n (!columnSorting || columnSorting.direction === 'desc' ? 'asc' : 'desc'),\n };\n\n if (columnSortingIndex > -1) {\n nextSorting.splice(columnSortingIndex, 1);\n }\n\n if (!cancel) {\n const newIndexFallback = columnSortingIndex > -1 ? columnSortingIndex : nextSorting.length;\n const newIndex = sortIndex !== undefined ? sortIndex : newIndexFallback;\n nextSorting.splice(newIndex, 0, newColumnSorting);\n }\n\n return {\n sorting: nextSorting,\n };\n};\n","export const getColumnSortingDirection = (sorting, columnName) => {\n const columnSorting = sorting.filter(s => s.columnName === columnName)[0];\n return columnSorting ? columnSorting.direction : null;\n};\n","/* eslint-disable no-plusplus, no-param-reassign, no-use-before-define, no-constant-condition */\n\nconst merge = (array, auxiliary, lo, mid, hi, compare) => {\n let i = Line truncated
|
||||
{"version":3,"file":"dx-grid-core.es.js","sources":["../src/plugins/grid-core/computeds.js","../src/plugins/sorting-state/reducers.js","../src/plugins/sorting-state/helpers.js","../src/utils/merge-sort.js","../src/utils/hierarchical-data.js","../src/plugins/integrated-sorting/computeds.js","../src/plugins/filtering-state/reducers.js","../src/plugins/filtering-state/helpers.js","../src/plugins/integrated-filtering/computeds.js","../src/plugins/grouping-state/constants.js","../src/plugins/grouping-state/reducers.js","../src/plugins/integrated-grouping/constants.js","../src/plugins/integrated-grouping/computeds.js","../src/plugins/custom-grouping/computeds.js","../src/plugins/grouping-panel/helpers.js","../src/plugins/paging-state/reducers.js","../src/plugins/integrated-paging/computeds.js","../src/plugins/paging-panel/helpers.js","../src/plugins/selection-state/reducers.js","../src/plugins/integrated-selection/computeds.js","../src/plugins/editing-state/reducers.js","../src/plugins/editing-state/computeds.js","../src/plugins/editing-state/helpers.js","../src/plugins/table-column-reordering/constants.js","../src/plugins/table-column-reordering/reducers.js","../src/plugins/table/constants.js","../src/plugins/table-column-reordering/computeds.js","../src/plugins/table-column-resizing/computeds.js","../src/plugins/table-column-resizing/reducers.js","../src/plugins/table-edit-column/constants.js","../src/plugins/table-edit-row/constants.js","../src/plugins/table-header-row/constants.js","../src/plugins/table-edit-column/helpers.js","../src/plugins/table-edit-column/computeds.js","../src/plugins/table-edit-row/helpers.js","../src/plugins/table-edit-row/computeds.js","../src/plugins/table-filter-row/constants.js","../src/plugins/table-filter-row/helpers.js","../src/plugins/table-filter-row/computeds.js","../src/plugins/table-group-row/constants.js","../src/plugins/table-group-row/helpers.js","../src/plugins/table-group-row/computeds.js","../src/plugins/table-header-row/helpers.js","../src/plugins/table-header-row/computeds.js","../src/plugins/table-row-detail/constants.js","../src/plugins/table-row-detail/helpers.js","../src/plugins/table-row-detail/reducers.js","../src/plugins/table-row-detail/computeds.js","../src/plugins/table-selection/constants.js","../src/plugins/table-selection/helpers.js","../src/plugins/table-selection/computeds.js","../src/plugins/table/helpers.js","../src/utils/column.js","../src/plugins/table/computeds.js","../src/plugins/table-column-visibility/computeds.js","../src/plugins/table-column-visibility/helpers.js","../src/plugins/column-chooser/computeds.js","../src/plugins/column-chooser/reducers.js","../src/utils/column-geometries.js","../src/utils/table.js","../src/utils/group-panel.js","../src/utils/messages-formatter.js"],"sourcesContent":["export const rowIdGetter = (getRowId, rows) => {\n if (!getRowId) {\n const map = new Map(rows.map((row, rowIndex) => [row, rowIndex]));\n return row => map.get(row);\n }\n return getRowId;\n};\n\nconst defaultGetCellValue = (row, columnName) => row[columnName];\nexport const cellValueGetter = (getCellValue = defaultGetCellValue, columns) => {\n let useFastAccessor = true;\n const map = columns.reduce((acc, column) => {\n if (column.getCellValue) {\n useFastAccessor = false;\n acc[column.name] = column.getCellValue;\n }\n return acc;\n }, {});\n\n if (useFastAccessor) {\n return getCellValue;\n }\n\n return (row, columnName) => (map[columnName]\n ? map[columnName](row, columnName)\n : getCellValue(row, columnName));\n};\n","export const changeColumnSorting = (state, {\n columnName, direction, keepOther, sortIndex,\n}) => {\n const { sorting } = state;\n\n let nextSorting = [];\n if (keepOther === true) {\n nextSorting = sorting.slice();\n }\n if (Array.isArray(keepOther)) {\n nextSorting = sorting.slice()\n .filter(columnSorting => keepOther.indexOf(columnSorting.columnName) > -1);\n }\n\n const columnSortingIndex = sorting\n .findIndex(columnSorting => columnSorting.columnName === columnName);\n const columnSorting = sorting[columnSortingIndex];\n const newColumnSorting = {\n columnName,\n direction: direction ||\n (!columnSorting || columnSorting.direction === 'desc' ? 'asc' : 'desc'),\n };\n\n if (columnSortingIndex > -1) {\n nextSorting.splice(columnSortingIndex, 1);\n }\n\n if (direction !== null) {\n const newIndexFallback = columnSortingIndex > -1 ? columnSortingIndex : nextSorting.length;\n const newIndex = sortIndex !== undefined ? sortIndex : newIndexFallback;\n nextSorting.splice(newIndex, 0, newColumnSorting);\n }\n\n return {\n sorting: nextSorting,\n };\n};\n","export const getColumnSortingDirection = (sorting, columnName) => {\n const columnSorting = sorting.filter(s => s.columnName === columnName)[0];\n return columnSorting ? columnSorting.direction : null;\n};\n","/* eslint-disable no-plusplus, no-param-reassign, no-use-before-definLine truncated
|
||||
+319
-237
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Bundle of @devexpress/dx-grid-core
|
||||
* Generated: 2017-11-10
|
||||
* Version: 1.0.0-beta.1
|
||||
* Generated: 2018-03-02
|
||||
* Version: 1.0.3
|
||||
* License: https://js.devexpress.com/Licensing
|
||||
*/
|
||||
|
||||
@@ -23,10 +23,12 @@ var rowIdGetter = function rowIdGetter(getRowId, rows) {
|
||||
return getRowId;
|
||||
};
|
||||
|
||||
var cellValueGetter = function cellValueGetter(getCellValue, columns) {
|
||||
if (getCellValue) {
|
||||
return getCellValue;
|
||||
}
|
||||
var defaultGetCellValue = function defaultGetCellValue(row, columnName) {
|
||||
return row[columnName];
|
||||
};
|
||||
var cellValueGetter = function cellValueGetter() {
|
||||
var getCellValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultGetCellValue;
|
||||
var columns = arguments[1];
|
||||
|
||||
var useFastAccessor = true;
|
||||
var map = columns.reduce(function (acc, column) {
|
||||
@@ -37,28 +39,29 @@ var cellValueGetter = function cellValueGetter(getCellValue, columns) {
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
return useFastAccessor ? function (row, columnName) {
|
||||
return row[columnName];
|
||||
} : function (row, columnName) {
|
||||
return map[columnName] ? map[columnName](row, columnName) : row[columnName];
|
||||
if (useFastAccessor) {
|
||||
return getCellValue;
|
||||
}
|
||||
|
||||
return function (row, columnName) {
|
||||
return map[columnName] ? map[columnName](row, columnName) : getCellValue(row, columnName);
|
||||
};
|
||||
};
|
||||
|
||||
var setColumnSorting = function setColumnSorting(state, _ref) {
|
||||
var changeColumnSorting = function changeColumnSorting(state, _ref) {
|
||||
var columnName = _ref.columnName,
|
||||
direction = _ref.direction,
|
||||
keepOther = _ref.keepOther,
|
||||
cancel = _ref.cancel,
|
||||
sortIndex = _ref.sortIndex;
|
||||
var sorting = state.sorting;
|
||||
|
||||
|
||||
var nextSorting = [];
|
||||
if (keepOther === true) {
|
||||
nextSorting = Array.from(sorting).slice();
|
||||
nextSorting = sorting.slice();
|
||||
}
|
||||
if (Array.isArray(keepOther)) {
|
||||
nextSorting = Array.from(sorting).filter(function (columnSorting) {
|
||||
nextSorting = sorting.slice().filter(function (columnSorting) {
|
||||
return keepOther.indexOf(columnSorting.columnName) > -1;
|
||||
});
|
||||
}
|
||||
@@ -76,7 +79,7 @@ var setColumnSorting = function setColumnSorting(state, _ref) {
|
||||
nextSorting.splice(columnSortingIndex, 1);
|
||||
}
|
||||
|
||||
if (!cancel) {
|
||||
if (direction !== null) {
|
||||
var newIndexFallback = columnSortingIndex > -1 ? columnSortingIndex : nextSorting.length;
|
||||
var newIndex = sortIndex !== undefined ? sortIndex : newIndexFallback;
|
||||
nextSorting.splice(newIndex, 0, newColumnSorting);
|
||||
@@ -450,7 +453,7 @@ var defaultCompare = function defaultCompare(a, b) {
|
||||
};
|
||||
|
||||
var createCompare = function createCompare(sorting, getColumnCompare, getComparableValue) {
|
||||
return Array.from(sorting).reverse().reduce(function (prevCompare, columnSorting) {
|
||||
return sorting.slice().reverse().reduce(function (prevCompare, columnSorting) {
|
||||
var columnName = columnSorting.columnName;
|
||||
|
||||
var inverse = columnSorting.direction === 'desc';
|
||||
@@ -499,7 +502,7 @@ var sortedRows = function sortedRows(rows, sorting, getCellValue, getColumnCompa
|
||||
|
||||
if (!getRowLevelKey) {
|
||||
var _compare = createCompare(sorting, getColumnCompare, getCellValue);
|
||||
return mergeSort(Array.from(rows), _compare);
|
||||
return mergeSort(rows.slice(), _compare);
|
||||
}
|
||||
|
||||
var compare = createCompare(sorting, getColumnCompare, function (row, columnName) {
|
||||
@@ -514,14 +517,14 @@ var sortedRows = function sortedRows(rows, sorting, getCellValue, getColumnCompa
|
||||
return sortHierarchicalRows(rows, compare, getRowLevelKey);
|
||||
};
|
||||
|
||||
var setColumnFilter = function setColumnFilter(filters, _ref) {
|
||||
var changeColumnFilter = function changeColumnFilter(filters, _ref) {
|
||||
var columnName = _ref.columnName,
|
||||
config = _ref.config;
|
||||
|
||||
var filterIndex = filters.findIndex(function (f) {
|
||||
return f.columnName === columnName;
|
||||
});
|
||||
var nextState = Array.from(filters);
|
||||
var nextState = filters.slice();
|
||||
|
||||
if (config) {
|
||||
var filter = _extends({ columnName: columnName }, config);
|
||||
@@ -628,56 +631,67 @@ var filteredRows = function filteredRows(rows, filters, getCellValue, getColumnP
|
||||
|
||||
var GROUP_KEY_SEPARATOR = '|';
|
||||
|
||||
var groupByColumn = function groupByColumn(state, _ref) {
|
||||
var applyColumnGrouping = function applyColumnGrouping(grouping, _ref) {
|
||||
var columnName = _ref.columnName,
|
||||
groupIndex = _ref.groupIndex;
|
||||
|
||||
var grouping = Array.from(state.grouping);
|
||||
var groupingIndex = grouping.findIndex(function (g) {
|
||||
var nextGrouping = grouping.slice();
|
||||
var groupingIndex = nextGrouping.findIndex(function (g) {
|
||||
return g.columnName === columnName;
|
||||
});
|
||||
var targetIndex = groupIndex;
|
||||
|
||||
if (groupingIndex > -1) {
|
||||
grouping.splice(groupingIndex, 1);
|
||||
nextGrouping.splice(groupingIndex, 1);
|
||||
} else if (groupIndex === undefined) {
|
||||
targetIndex = grouping.length;
|
||||
targetIndex = nextGrouping.length;
|
||||
}
|
||||
|
||||
if (targetIndex > -1) {
|
||||
grouping.splice(targetIndex, 0, {
|
||||
nextGrouping.splice(targetIndex, 0, {
|
||||
columnName: columnName
|
||||
});
|
||||
}
|
||||
|
||||
var ungroupedColumnIndex = state.grouping.findIndex(function (group, index) {
|
||||
return !grouping[index] || group.columnName !== grouping[index].columnName;
|
||||
return nextGrouping;
|
||||
};
|
||||
|
||||
var changeColumnGrouping = function changeColumnGrouping(_ref2, _ref3) {
|
||||
var grouping = _ref2.grouping,
|
||||
expandedGroups = _ref2.expandedGroups;
|
||||
var columnName = _ref3.columnName,
|
||||
groupIndex = _ref3.groupIndex;
|
||||
|
||||
var nextGrouping = applyColumnGrouping(grouping, { columnName: columnName, groupIndex: groupIndex });
|
||||
|
||||
var ungroupedColumnIndex = grouping.findIndex(function (group, index) {
|
||||
return !nextGrouping[index] || group.columnName !== nextGrouping[index].columnName;
|
||||
});
|
||||
if (ungroupedColumnIndex === -1) {
|
||||
return {
|
||||
grouping: grouping
|
||||
grouping: nextGrouping
|
||||
};
|
||||
}
|
||||
|
||||
var filteredExpandedGroups = state.expandedGroups.filter(function (group) {
|
||||
var filteredExpandedGroups = expandedGroups.filter(function (group) {
|
||||
return group.split(GROUP_KEY_SEPARATOR).length <= ungroupedColumnIndex;
|
||||
});
|
||||
if (filteredExpandedGroups.length === state.expandedGroups.length) {
|
||||
if (filteredExpandedGroups.length === expandedGroups.length) {
|
||||
return {
|
||||
grouping: grouping
|
||||
grouping: nextGrouping
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
grouping: grouping,
|
||||
grouping: nextGrouping,
|
||||
expandedGroups: filteredExpandedGroups
|
||||
};
|
||||
};
|
||||
|
||||
var toggleExpandedGroups = function toggleExpandedGroups(state, _ref2) {
|
||||
var groupKey = _ref2.groupKey;
|
||||
var toggleExpandedGroups = function toggleExpandedGroups(state, _ref4) {
|
||||
var groupKey = _ref4.groupKey;
|
||||
|
||||
var expandedGroups = Array.from(state.expandedGroups);
|
||||
var expandedGroups = state.expandedGroups.slice();
|
||||
var groupKeyIndex = expandedGroups.indexOf(groupKey);
|
||||
|
||||
if (groupKeyIndex > -1) {
|
||||
@@ -691,40 +705,20 @@ var toggleExpandedGroups = function toggleExpandedGroups(state, _ref2) {
|
||||
};
|
||||
};
|
||||
|
||||
var draftGroupingChange = function draftGroupingChange(state, _ref3) {
|
||||
var columnName = _ref3.columnName,
|
||||
groupIndex = _ref3.groupIndex;
|
||||
return { groupingChange: { columnName: columnName, groupIndex: groupIndex } };
|
||||
var draftColumnGrouping = function draftColumnGrouping(_ref5, _ref6) {
|
||||
var grouping = _ref5.grouping,
|
||||
draftGrouping = _ref5.draftGrouping;
|
||||
var columnName = _ref6.columnName,
|
||||
groupIndex = _ref6.groupIndex;
|
||||
return {
|
||||
draftGrouping: applyColumnGrouping(draftGrouping || grouping, { columnName: columnName, groupIndex: groupIndex })
|
||||
};
|
||||
};
|
||||
|
||||
var cancelGroupingChange = function cancelGroupingChange() {
|
||||
return { groupingChange: null };
|
||||
};
|
||||
|
||||
var draftGrouping = function draftGrouping(grouping, groupingChange) {
|
||||
if (!groupingChange) return grouping;
|
||||
|
||||
var columnName = groupingChange.columnName,
|
||||
groupIndex = groupingChange.groupIndex;
|
||||
|
||||
var result = Array.from(grouping);
|
||||
|
||||
if (groupIndex !== -1) {
|
||||
result = result.filter(function (g) {
|
||||
return g.columnName !== columnName;
|
||||
});
|
||||
result.splice(groupIndex, 0, {
|
||||
columnName: columnName,
|
||||
draft: true,
|
||||
mode: grouping.length > result.length ? 'reorder' : 'add'
|
||||
});
|
||||
} else {
|
||||
result = result.map(function (g) {
|
||||
return g.columnName === columnName ? { columnName: columnName, draft: true, mode: 'remove' } : g;
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
var cancelColumnGroupingDraft = function cancelColumnGroupingDraft() {
|
||||
return {
|
||||
draftGrouping: null
|
||||
};
|
||||
};
|
||||
|
||||
var GRID_GROUP_TYPE = 'group';
|
||||
@@ -739,26 +733,26 @@ var groupRowLevelKeyGetter = function groupRowLevelKeyGetter(row) {
|
||||
return row[GRID_GROUP_LEVEL_KEY];
|
||||
};
|
||||
|
||||
var defaultColumnIdentity = function defaultColumnIdentity(value) {
|
||||
var defaultColumnCriteria = function defaultColumnCriteria(value) {
|
||||
return {
|
||||
key: String(value),
|
||||
value: value
|
||||
};
|
||||
};
|
||||
|
||||
var groupedRows = function groupedRows(rows, grouping, getCellValue, getColumnIdentity) {
|
||||
var groupedRows = function groupedRows(rows, grouping, getCellValue, getColumnCriteria) {
|
||||
var keyPrefix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
|
||||
|
||||
if (!grouping.length) return rows;
|
||||
|
||||
var columnName = grouping[0].columnName;
|
||||
|
||||
var groupIdentity = getColumnIdentity && getColumnIdentity(columnName) || defaultColumnIdentity;
|
||||
var groupCriteria = getColumnCriteria && getColumnCriteria(columnName) || defaultColumnCriteria;
|
||||
var groups = rows.reduce(function (acc, row) {
|
||||
var _groupIdentity = groupIdentity(getCellValue(row, columnName), row),
|
||||
key = _groupIdentity.key,
|
||||
_groupIdentity$value = _groupIdentity.value,
|
||||
value = _groupIdentity$value === undefined ? key : _groupIdentity$value;
|
||||
var _groupCriteria = groupCriteria(getCellValue(row, columnName), row),
|
||||
key = _groupCriteria.key,
|
||||
_groupCriteria$value = _groupCriteria.value,
|
||||
value = _groupCriteria$value === undefined ? key : _groupCriteria$value;
|
||||
|
||||
var sameKeyItems = acc.get(key);
|
||||
|
||||
@@ -782,7 +776,7 @@ var groupedRows = function groupedRows(rows, grouping, getCellValue, getColumnId
|
||||
|
||||
var compoundKey = '' + keyPrefix + key;
|
||||
acc.push((_acc$push = {}, defineProperty(_acc$push, GRID_GROUP_CHECK, true), defineProperty(_acc$push, GRID_GROUP_LEVEL_KEY, GRID_GROUP_TYPE + '_' + groupedBy), defineProperty(_acc$push, 'groupedBy', groupedBy), defineProperty(_acc$push, 'compoundKey', compoundKey), defineProperty(_acc$push, 'key', key), defineProperty(_acc$push, 'value', value), _acc$push));
|
||||
acc.push.apply(acc, toConsumableArray(groupedRows(items, nestedGrouping, getCellValue, getColumnIdentity, '' + compoundKey + GROUP_KEY_SEPARATOR)));
|
||||
acc.push.apply(acc, toConsumableArray(groupedRows(items, nestedGrouping, getCellValue, getColumnCriteria, '' + compoundKey + GROUP_KEY_SEPARATOR)));
|
||||
return acc;
|
||||
}, []);
|
||||
};
|
||||
@@ -793,6 +787,7 @@ var expandedGroupRows = function expandedGroupRows(rows, grouping, expandedGroup
|
||||
var groupingColumnNames = grouping.map(function (columnGrouping) {
|
||||
return columnGrouping.columnName;
|
||||
});
|
||||
var expandedGroupsSet = new Set(expandedGroups);
|
||||
var currentGroupExpanded = true;
|
||||
var currentGroupLevel = 0;
|
||||
|
||||
@@ -811,7 +806,7 @@ var expandedGroupRows = function expandedGroupRows(rows, grouping, expandedGroup
|
||||
return acc;
|
||||
}
|
||||
|
||||
currentGroupExpanded = expandedGroups.has(row.compoundKey);
|
||||
currentGroupExpanded = expandedGroupsSet.has(row.compoundKey);
|
||||
currentGroupLevel = groupLevel;
|
||||
|
||||
if (currentGroupExpanded) {
|
||||
@@ -868,19 +863,34 @@ var customGroupingRowIdGetter = function customGroupingRowIdGetter(getRowId, row
|
||||
};
|
||||
};
|
||||
|
||||
var groupingPanelItems = function groupingPanelItems(columns, grouping) {
|
||||
return grouping.map(function (_ref) {
|
||||
var columnName = _ref.columnName,
|
||||
draft = _ref.draft;
|
||||
|
||||
var column = columns.find(function (c) {
|
||||
return c.name === columnName;
|
||||
});
|
||||
var groupingPanelItems = function groupingPanelItems(columns, grouping, draftGrouping) {
|
||||
var items = draftGrouping.map(function (_ref) {
|
||||
var columnName = _ref.columnName;
|
||||
return {
|
||||
column: column,
|
||||
draft: draft
|
||||
column: columns.find(function (c) {
|
||||
return c.name === columnName;
|
||||
}),
|
||||
draft: !grouping.some(function (columnGrouping) {
|
||||
return columnGrouping.columnName === columnName;
|
||||
})
|
||||
};
|
||||
});
|
||||
|
||||
grouping.forEach(function (_ref2, index) {
|
||||
var columnName = _ref2.columnName;
|
||||
|
||||
if (draftGrouping.some(function (columnGrouping) {
|
||||
return columnGrouping.columnName === columnName;
|
||||
})) return;
|
||||
items.splice(index, 0, {
|
||||
column: columns.find(function (c) {
|
||||
return c.name === columnName;
|
||||
}),
|
||||
draft: true
|
||||
});
|
||||
});
|
||||
|
||||
return items;
|
||||
};
|
||||
|
||||
var setCurrentPage = function setCurrentPage(prevPage, page) {
|
||||
@@ -959,47 +969,21 @@ var lastRowOnPage = function lastRowOnPage(currentPage, pageSize, totalRowCount)
|
||||
return result;
|
||||
};
|
||||
|
||||
var setRowSelection = function setRowSelection(selection, _ref) {
|
||||
var rowId = _ref.rowId,
|
||||
selected = _ref.selected;
|
||||
|
||||
var selectedRows = Array.from(selection);
|
||||
var selectedIndex = selectedRows.indexOf(rowId);
|
||||
|
||||
var isRowSelected = selected;
|
||||
|
||||
if (isRowSelected === undefined) {
|
||||
isRowSelected = selectedIndex === -1;
|
||||
}
|
||||
|
||||
if (selectedIndex > -1 && !isRowSelected) {
|
||||
selectedRows.splice(selectedIndex, 1);
|
||||
} else if (selectedIndex === -1 && isRowSelected) {
|
||||
selectedRows.push(rowId);
|
||||
}
|
||||
|
||||
return selectedRows;
|
||||
};
|
||||
|
||||
var setRowsSelection = function setRowsSelection(selection, _ref2) {
|
||||
var rowIds = _ref2.rowIds,
|
||||
selected = _ref2.selected;
|
||||
|
||||
if (rowIds.length === 1) {
|
||||
return setRowSelection(selection, { rowId: rowIds[0], selected: selected });
|
||||
}
|
||||
var toggleSelection = function toggleSelection(selection, _ref) {
|
||||
var rowIds = _ref.rowIds,
|
||||
state = _ref.state;
|
||||
|
||||
var rowIdsSet = new Set(rowIds);
|
||||
|
||||
var isRowsSelected = selected;
|
||||
if (isRowsSelected === undefined) {
|
||||
var rowsState = state;
|
||||
if (rowsState === undefined) {
|
||||
var availableSelection = selection.filter(function (rowId) {
|
||||
return rowIdsSet.has(rowId);
|
||||
});
|
||||
isRowsSelected = availableSelection.length !== rowIdsSet.size;
|
||||
rowsState = availableSelection.length !== rowIdsSet.size;
|
||||
}
|
||||
|
||||
if (isRowsSelected) {
|
||||
if (rowsState) {
|
||||
var selectionSet = new Set(selection);
|
||||
return [].concat(toConsumableArray(selection), toConsumableArray(rowIds.filter(function (rowId) {
|
||||
return !selectionSet.has(rowId);
|
||||
@@ -1011,41 +995,63 @@ var setRowsSelection = function setRowsSelection(selection, _ref2) {
|
||||
});
|
||||
};
|
||||
|
||||
var getAvailableToSelect = function getAvailableToSelect(rows, getRowId, isGroupRow) {
|
||||
var rowsWithAvailableToSelect = function rowsWithAvailableToSelect(rows, getRowId, isGroupRow) {
|
||||
var dataRows = rows;
|
||||
if (isGroupRow) {
|
||||
dataRows = dataRows.filter(function (row) {
|
||||
return !isGroupRow(row);
|
||||
});
|
||||
}
|
||||
return dataRows.map(function (row) {
|
||||
return getRowId(row);
|
||||
return { rows: rows, availableToSelect: dataRows.map(function (row) {
|
||||
return getRowId(row);
|
||||
}) };
|
||||
};
|
||||
|
||||
var someSelected = function someSelected(_ref, selection) {
|
||||
var availableToSelect = _ref.availableToSelect;
|
||||
|
||||
var selectionSet = new Set(selection);
|
||||
|
||||
return availableToSelect.length !== 0 && selectionSet.size !== 0 && availableToSelect.some(function (elem) {
|
||||
return selectionSet.has(elem);
|
||||
}) && availableToSelect.some(function (elem) {
|
||||
return !selectionSet.has(elem);
|
||||
});
|
||||
};
|
||||
|
||||
var getAvailableSelection = function getAvailableSelection(selection, availableToSelect) {
|
||||
var availableToSelectSet = new Set(availableToSelect);
|
||||
return selection.filter(function (selected) {
|
||||
return availableToSelectSet.has(selected);
|
||||
var allSelected = function allSelected(_ref2, selection) {
|
||||
var availableToSelect = _ref2.availableToSelect;
|
||||
|
||||
var selectionSet = new Set(selection);
|
||||
|
||||
return selectionSet.size !== 0 && availableToSelect.length !== 0 && !availableToSelect.some(function (elem) {
|
||||
return !selectionSet.has(elem);
|
||||
});
|
||||
};
|
||||
|
||||
var startEditRows = function startEditRows(prevEditingRows, _ref) {
|
||||
var unwrapSelectedRows = function unwrapSelectedRows(_ref3) {
|
||||
var rows = _ref3.rows;
|
||||
return rows;
|
||||
};
|
||||
|
||||
var startEditRows = function startEditRows(prevEditingRowIds, _ref) {
|
||||
var rowIds = _ref.rowIds;
|
||||
return [].concat(toConsumableArray(prevEditingRows), toConsumableArray(rowIds));
|
||||
return [].concat(toConsumableArray(prevEditingRowIds), toConsumableArray(rowIds));
|
||||
};
|
||||
|
||||
var stopEditRows = function stopEditRows(prevEditingRows, _ref2) {
|
||||
var stopEditRows = function stopEditRows(prevEditingRowIds, _ref2) {
|
||||
var rowIds = _ref2.rowIds;
|
||||
|
||||
var rowIdSet = new Set(rowIds);
|
||||
return prevEditingRows.filter(function (id) {
|
||||
return prevEditingRowIds.filter(function (id) {
|
||||
return !rowIdSet.has(id);
|
||||
});
|
||||
};
|
||||
|
||||
var addRow = function addRow(addedRows, _ref3) {
|
||||
var row = _ref3.row;
|
||||
var addRow = function addRow(addedRows) {
|
||||
var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { row: {} },
|
||||
row = _ref3.row;
|
||||
|
||||
return [].concat(toConsumableArray(addedRows), [row]);
|
||||
};
|
||||
|
||||
@@ -1053,7 +1059,7 @@ var changeAddedRow = function changeAddedRow(addedRows, _ref4) {
|
||||
var rowId = _ref4.rowId,
|
||||
change = _ref4.change;
|
||||
|
||||
var result = Array.from(addedRows);
|
||||
var result = addedRows.slice();
|
||||
result[rowId] = _extends({}, result[rowId], change);
|
||||
return result;
|
||||
};
|
||||
@@ -1071,34 +1077,34 @@ var cancelAddedRows = function cancelAddedRows(addedRows, _ref5) {
|
||||
return result;
|
||||
};
|
||||
|
||||
var changeRow = function changeRow(prevChangedRows, _ref6) {
|
||||
var changeRow = function changeRow(prevRowChanges, _ref6) {
|
||||
var rowId = _ref6.rowId,
|
||||
change = _ref6.change;
|
||||
|
||||
var prevChange = prevChangedRows[rowId] || {};
|
||||
return _extends({}, prevChangedRows, defineProperty({}, rowId, _extends({}, prevChange, change)));
|
||||
var prevChange = prevRowChanges[rowId] || {};
|
||||
return _extends({}, prevRowChanges, defineProperty({}, rowId, _extends({}, prevChange, change)));
|
||||
};
|
||||
|
||||
var cancelChanges = function cancelChanges(prevChangedRows, _ref7) {
|
||||
var cancelChanges = function cancelChanges(prevRowChanges, _ref7) {
|
||||
var rowIds = _ref7.rowIds;
|
||||
|
||||
var result = _extends({}, prevChangedRows);
|
||||
var result = _extends({}, prevRowChanges);
|
||||
rowIds.forEach(function (rowId) {
|
||||
delete result[rowId];
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
var deleteRows = function deleteRows(deletedRows, _ref8) {
|
||||
var deleteRows = function deleteRows(deletedRowIds, _ref8) {
|
||||
var rowIds = _ref8.rowIds;
|
||||
return [].concat(toConsumableArray(deletedRows), toConsumableArray(rowIds));
|
||||
return [].concat(toConsumableArray(deletedRowIds), toConsumableArray(rowIds));
|
||||
};
|
||||
|
||||
var cancelDeletedRows = function cancelDeletedRows(deletedRows, _ref9) {
|
||||
var cancelDeletedRows = function cancelDeletedRows(deletedRowIds, _ref9) {
|
||||
var rowIds = _ref9.rowIds;
|
||||
|
||||
var rowIdSet = new Set(rowIds);
|
||||
return deletedRows.filter(function (rowId) {
|
||||
return deletedRowIds.filter(function (rowId) {
|
||||
return !rowIdSet.has(rowId);
|
||||
});
|
||||
};
|
||||
@@ -1122,21 +1128,30 @@ var addedRowsByIds = function addedRowsByIds(addedRows, rowIds) {
|
||||
return result;
|
||||
};
|
||||
|
||||
var computedCreateRowChange = function computedCreateRowChange(columns) {
|
||||
var map = columns.reduce(function (acc, column) {
|
||||
if (column.createRowChange) {
|
||||
acc[column.name] = column.createRowChange;
|
||||
var defaultCreateRowChange = function defaultCreateRowChange(row, value, columnName) {
|
||||
return defineProperty({}, columnName, value);
|
||||
};
|
||||
var createRowChangeGetter = function createRowChangeGetter() {
|
||||
var createRowChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultCreateRowChange;
|
||||
var columnExtensions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
||||
|
||||
var map = columnExtensions.reduce(function (acc, columnExtension) {
|
||||
if (columnExtension.createRowChange) {
|
||||
acc[columnExtension.columnName] = columnExtension.createRowChange;
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
return function (row, columnName, value) {
|
||||
return map[columnName] ? map[columnName](row, value, columnName) : defineProperty({}, columnName, value);
|
||||
return function (row, value, columnName) {
|
||||
if (map[columnName]) {
|
||||
return map[columnName](row, value, columnName);
|
||||
}
|
||||
return createRowChange(row, value, columnName);
|
||||
};
|
||||
};
|
||||
|
||||
var getRowChange = function getRowChange(changedRows, rowId) {
|
||||
return changedRows[rowId] || {};
|
||||
var getRowChange = function getRowChange(rowChanges, rowId) {
|
||||
return rowChanges[rowId] || {};
|
||||
};
|
||||
|
||||
var TABLE_REORDERING_TYPE = 'reordering';
|
||||
@@ -1147,7 +1162,7 @@ var changeColumnOrder = function changeColumnOrder(order, _ref) {
|
||||
|
||||
var sourceColumnIndex = order.indexOf(sourceColumnName);
|
||||
var targetColumnIndex = order.indexOf(targetColumnName);
|
||||
var newOrder = Array.from(order);
|
||||
var newOrder = order.slice();
|
||||
|
||||
newOrder.splice(sourceColumnIndex, 1);
|
||||
newOrder.splice(targetColumnIndex, 0, sourceColumnName);
|
||||
@@ -1158,7 +1173,7 @@ var TABLE_DATA_TYPE = 'data';
|
||||
var TABLE_NODATA_TYPE = 'nodata';
|
||||
|
||||
var orderedColumns = function orderedColumns(tableColumns, order) {
|
||||
var result = Array.from(tableColumns);
|
||||
var result = tableColumns.slice();
|
||||
|
||||
result.sort(function (a, b) {
|
||||
if (a.type !== TABLE_DATA_TYPE || b.type !== TABLE_DATA_TYPE) return 0;
|
||||
@@ -1198,7 +1213,11 @@ var tableColumnsWithWidths = function tableColumnsWithWidths(tableColumns, colum
|
||||
return tableColumns.reduce(function (acc, tableColumn) {
|
||||
if (tableColumn.type === 'data') {
|
||||
var columnName = tableColumn.column.name;
|
||||
var width = draftColumnWidths[columnName] || columnWidths[columnName];
|
||||
var isCurrentColumn = function isCurrentColumn(elem) {
|
||||
return elem.columnName === columnName;
|
||||
};
|
||||
var column = draftColumnWidths.find(isCurrentColumn) || columnWidths.find(isCurrentColumn);
|
||||
var width = column && column.width;
|
||||
if (width === undefined) {
|
||||
throw new Error(UNSET_COLUMN_WIDTH_ERROR.replace('$1', columnName));
|
||||
}
|
||||
@@ -1212,36 +1231,43 @@ var tableColumnsWithWidths = function tableColumnsWithWidths(tableColumns, colum
|
||||
|
||||
var MIN_SIZE = 40;
|
||||
|
||||
var changeTableColumnWidths = function changeTableColumnWidths(state, _ref) {
|
||||
var shifts = _ref.shifts;
|
||||
var changeTableColumnWidth = function changeTableColumnWidth(state, _ref) {
|
||||
var columnName = _ref.columnName,
|
||||
shift = _ref.shift;
|
||||
var columnWidths = state.columnWidths;
|
||||
|
||||
var updatedColumnWidths = Object.keys(shifts).reduce(function (acc, columnName) {
|
||||
var size = Math.max(MIN_SIZE, columnWidths[columnName] + shifts[columnName]);
|
||||
return Object.assign(acc, defineProperty({}, columnName, size));
|
||||
}, {});
|
||||
return _extends({}, state, {
|
||||
columnWidths: _extends({}, columnWidths, updatedColumnWidths),
|
||||
draftColumnWidths: {}
|
||||
var nextColumnWidth = columnWidths.slice();
|
||||
var index = nextColumnWidth.findIndex(function (elem) {
|
||||
return elem.columnName === columnName;
|
||||
});
|
||||
var updatedColumn = nextColumnWidth[index];
|
||||
var size = Math.max(MIN_SIZE, updatedColumn.width + shift);
|
||||
nextColumnWidth.splice(index, 1, { columnName: columnName, width: size });
|
||||
|
||||
return {
|
||||
columnWidths: nextColumnWidth
|
||||
};
|
||||
};
|
||||
|
||||
var changeDraftTableColumnWidths = function changeDraftTableColumnWidths(state, _ref2) {
|
||||
var shifts = _ref2.shifts;
|
||||
var columnWidths = state.columnWidths,
|
||||
draftColumnWidths = state.draftColumnWidths;
|
||||
var draftTableColumnWidth = function draftTableColumnWidth(state, _ref2) {
|
||||
var columnName = _ref2.columnName,
|
||||
shift = _ref2.shift;
|
||||
var columnWidths = state.columnWidths;
|
||||
|
||||
var updatedDraftColumnWidths = Object.keys(shifts).reduce(function (acc, columnName) {
|
||||
if (shifts[columnName] === null) {
|
||||
delete acc[columnName];
|
||||
return acc;
|
||||
}
|
||||
var size = Math.max(MIN_SIZE, columnWidths[columnName] + shifts[columnName]);
|
||||
return Object.assign(acc, defineProperty({}, columnName, size));
|
||||
}, Object.assign({}, draftColumnWidths));
|
||||
return _extends({}, state, {
|
||||
draftColumnWidths: updatedDraftColumnWidths
|
||||
var updatedColumn = columnWidths.find(function (elem) {
|
||||
return elem.columnName === columnName;
|
||||
});
|
||||
var size = Math.max(MIN_SIZE, updatedColumn.width + shift);
|
||||
|
||||
return {
|
||||
draftColumnWidths: [{ columnName: updatedColumn.columnName, width: size }]
|
||||
};
|
||||
};
|
||||
|
||||
var cancelTableColumnWidthDraft = function cancelTableColumnWidthDraft() {
|
||||
return {
|
||||
draftColumnWidths: []
|
||||
};
|
||||
};
|
||||
|
||||
var TABLE_EDIT_COMMAND_TYPE = 'editCommand';
|
||||
@@ -1272,8 +1298,8 @@ var isEditTableRow = function isEditTableRow(tableRow) {
|
||||
return tableRow.type === TABLE_EDIT_TYPE;
|
||||
};
|
||||
|
||||
var tableRowsWithEditing = function tableRowsWithEditing(tableRows, editingRows, addedRows, rowHeight) {
|
||||
var rowIds = new Set(editingRows);
|
||||
var tableRowsWithEditing = function tableRowsWithEditing(tableRows, editingRowIds, addedRows, rowHeight) {
|
||||
var rowIds = new Set(editingRowIds);
|
||||
var editedTableRows = tableRows.map(function (tableRow) {
|
||||
return tableRow.type === TABLE_DATA_TYPE && rowIds.has(tableRow.rowId) ? _extends({}, tableRow, {
|
||||
type: TABLE_EDIT_TYPE,
|
||||
@@ -1319,37 +1345,44 @@ var isGroupTableRow = function isGroupTableRow(tableRow) {
|
||||
return tableRow.type === TABLE_GROUP_TYPE;
|
||||
};
|
||||
|
||||
var tableColumnsWithDraftGrouping = function tableColumnsWithDraftGrouping(tableColumns, draftGrouping, showColumnWhenGrouped) {
|
||||
var tableColumnsWithDraftGrouping = function tableColumnsWithDraftGrouping(tableColumns, grouping, draftGrouping, showColumnWhenGrouped) {
|
||||
return tableColumns.reduce(function (acc, tableColumn) {
|
||||
var isDataColumn = tableColumn.type === TABLE_DATA_TYPE;
|
||||
var tableColumnName = isDataColumn ? tableColumn.column.name : '';
|
||||
var columnDraftGrouping = draftGrouping.find(function (grouping) {
|
||||
return grouping.columnName === tableColumnName;
|
||||
if (tableColumn.type !== TABLE_DATA_TYPE) {
|
||||
acc.push(tableColumn);
|
||||
return acc;
|
||||
}
|
||||
|
||||
var columnName = tableColumn.column.name;
|
||||
var columnGroupingExists = grouping.some(function (columnGrouping) {
|
||||
return columnGrouping.columnName === columnName;
|
||||
});
|
||||
var columnDraftGroupingExists = draftGrouping.some(function (columnGrouping) {
|
||||
return columnGrouping.columnName === columnName;
|
||||
});
|
||||
|
||||
if (!columnDraftGrouping || showColumnWhenGrouped(tableColumnName)) {
|
||||
return [].concat(toConsumableArray(acc), [tableColumn]);
|
||||
} else if (columnDraftGrouping.mode === 'remove' || columnDraftGrouping.mode === 'add') {
|
||||
return [].concat(toConsumableArray(acc), [_extends({}, tableColumn, {
|
||||
if (!columnGroupingExists && !columnDraftGroupingExists || showColumnWhenGrouped(columnName)) {
|
||||
acc.push(tableColumn);
|
||||
} else if (!columnGroupingExists && columnDraftGroupingExists || columnGroupingExists && !columnDraftGroupingExists) {
|
||||
acc.push(_extends({}, tableColumn, {
|
||||
draft: true
|
||||
})]);
|
||||
}));
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
};
|
||||
|
||||
var tableColumnsWithGrouping = function tableColumnsWithGrouping(tableColumns, grouping, draftGrouping, groupIndentColumnWidth, showColumnWhenGrouped) {
|
||||
var tableColumnsWithGrouping = function tableColumnsWithGrouping(columns, tableColumns, grouping, draftGrouping, indentColumnWidth, showColumnWhenGrouped) {
|
||||
return [].concat(toConsumableArray(grouping.map(function (columnGrouping) {
|
||||
var groupedColumn = tableColumns.find(function (tableColumn) {
|
||||
return tableColumn.type === TABLE_DATA_TYPE && tableColumn.column.name === columnGrouping.columnName;
|
||||
}).column;
|
||||
var groupedColumn = columns.find(function (column) {
|
||||
return column.name === columnGrouping.columnName;
|
||||
});
|
||||
return {
|
||||
key: TABLE_GROUP_TYPE + '_' + groupedColumn.name,
|
||||
type: TABLE_GROUP_TYPE,
|
||||
column: groupedColumn,
|
||||
width: groupIndentColumnWidth
|
||||
width: indentColumnWidth
|
||||
};
|
||||
})), toConsumableArray(tableColumnsWithDraftGrouping(tableColumns, draftGrouping, showColumnWhenGrouped)));
|
||||
})), toConsumableArray(tableColumnsWithDraftGrouping(tableColumns, grouping, draftGrouping, showColumnWhenGrouped)));
|
||||
};
|
||||
|
||||
var tableRowsWithGrouping = function tableRowsWithGrouping(tableRows, isGroupRow) {
|
||||
@@ -1379,8 +1412,8 @@ var tableRowsWithHeading = function tableRowsWithHeading(headerRows) {
|
||||
|
||||
var TABLE_DETAIL_TYPE = 'detail';
|
||||
|
||||
var isDetailRowExpanded = function isDetailRowExpanded(expandedRows, rowId) {
|
||||
return expandedRows.indexOf(rowId) > -1;
|
||||
var isDetailRowExpanded = function isDetailRowExpanded(expandedDetailRowIds, rowId) {
|
||||
return expandedDetailRowIds.indexOf(rowId) > -1;
|
||||
};
|
||||
var isDetailToggleTableCell = function isDetailToggleTableCell(tableRow, tableColumn) {
|
||||
return tableColumn.type === TABLE_DETAIL_TYPE && tableRow.type === TABLE_DATA_TYPE;
|
||||
@@ -1389,26 +1422,26 @@ var isDetailTableRow = function isDetailTableRow(tableRow) {
|
||||
return tableRow.type === TABLE_DETAIL_TYPE;
|
||||
};
|
||||
|
||||
var setDetailRowExpanded = function setDetailRowExpanded(prevExpanded, _ref) {
|
||||
var toggleDetailRowExpanded = function toggleDetailRowExpanded(prevExpanded, _ref) {
|
||||
var rowId = _ref.rowId,
|
||||
isExpanded = _ref.isExpanded;
|
||||
state = _ref.state;
|
||||
|
||||
var expandedRows = Array.from(prevExpanded);
|
||||
var expandedIndex = expandedRows.indexOf(rowId);
|
||||
var isRowExpanded = isExpanded !== undefined ? isExpanded : expandedIndex === -1;
|
||||
var expandedDetailRowIds = prevExpanded.slice();
|
||||
var expandedIndex = expandedDetailRowIds.indexOf(rowId);
|
||||
var rowState = state !== undefined ? state : expandedIndex === -1;
|
||||
|
||||
if (expandedIndex > -1 && !isRowExpanded) {
|
||||
expandedRows.splice(expandedIndex, 1);
|
||||
} else if (expandedIndex === -1 && isRowExpanded) {
|
||||
expandedRows.push(rowId);
|
||||
if (expandedIndex > -1 && !rowState) {
|
||||
expandedDetailRowIds.splice(expandedIndex, 1);
|
||||
} else if (expandedIndex === -1 && rowState) {
|
||||
expandedDetailRowIds.push(rowId);
|
||||
}
|
||||
|
||||
return expandedRows;
|
||||
return expandedDetailRowIds;
|
||||
};
|
||||
|
||||
var tableRowsWithExpandedDetail = function tableRowsWithExpandedDetail(tableRows, expandedRows, rowHeight) {
|
||||
var tableRowsWithExpandedDetail = function tableRowsWithExpandedDetail(tableRows, expandedDetailRowIds, rowHeight) {
|
||||
var result = tableRows;
|
||||
expandedRows.forEach(function (expandedRowId) {
|
||||
expandedDetailRowIds.forEach(function (expandedRowId) {
|
||||
var rowIndex = result.findIndex(function (tableRow) {
|
||||
return tableRow.type === TABLE_DATA_TYPE && tableRow.rowId === expandedRowId;
|
||||
});
|
||||
@@ -1430,8 +1463,8 @@ var tableRowsWithExpandedDetail = function tableRowsWithExpandedDetail(tableRows
|
||||
return result;
|
||||
};
|
||||
|
||||
var tableColumnsWithDetail = function tableColumnsWithDetail(tableColumns, detailToggleCellWidth) {
|
||||
return [{ key: TABLE_DETAIL_TYPE, type: TABLE_DETAIL_TYPE, width: detailToggleCellWidth }].concat(toConsumableArray(tableColumns));
|
||||
var tableColumnsWithDetail = function tableColumnsWithDetail(tableColumns, toggleColumnWidth) {
|
||||
return [{ key: TABLE_DETAIL_TYPE, type: TABLE_DETAIL_TYPE, width: toggleColumnWidth }].concat(toConsumableArray(tableColumns));
|
||||
};
|
||||
|
||||
var TABLE_SELECT_TYPE = 'select';
|
||||
@@ -1460,12 +1493,29 @@ var isDataTableRow = function isDataTableRow(tableRow) {
|
||||
return tableRow.type === TABLE_DATA_TYPE;
|
||||
};
|
||||
|
||||
var tableColumnsWithDataRows = function tableColumnsWithDataRows(columns) {
|
||||
var getColumnExtension = function getColumnExtension(columnExtensions, columnName) {
|
||||
if (!columnExtensions) {
|
||||
return {};
|
||||
}
|
||||
var columnExtension = columnExtensions.find(function (extension) {
|
||||
return extension.columnName === columnName;
|
||||
});
|
||||
if (!columnExtension) {
|
||||
return {};
|
||||
}
|
||||
return columnExtension;
|
||||
};
|
||||
|
||||
var tableColumnsWithDataRows = function tableColumnsWithDataRows(columns, columnExtensions) {
|
||||
return columns.map(function (column) {
|
||||
var name = column.name;
|
||||
|
||||
var columnExtension = getColumnExtension(columnExtensions, name);
|
||||
return {
|
||||
key: TABLE_DATA_TYPE + '_' + column.name,
|
||||
key: TABLE_DATA_TYPE + '_' + name,
|
||||
type: TABLE_DATA_TYPE,
|
||||
width: column.width,
|
||||
width: columnExtension.width,
|
||||
align: columnExtension.align,
|
||||
column: column
|
||||
};
|
||||
});
|
||||
@@ -1483,20 +1533,26 @@ var tableRowsWithDataRows = function tableRowsWithDataRows(rows, getRowId) {
|
||||
});
|
||||
};
|
||||
|
||||
var visibleTableColumns = function visibleTableColumns(tableColumns, hiddenColumns) {
|
||||
var visibleTableColumns = function visibleTableColumns(tableColumns, hiddenColumnNames) {
|
||||
return tableColumns.filter(function (tableColumn) {
|
||||
return hiddenColumns.indexOf(tableColumn.column.name) === -1;
|
||||
return tableColumn.type !== TABLE_DATA_TYPE || hiddenColumnNames.indexOf(tableColumn.column.name) === -1;
|
||||
});
|
||||
};
|
||||
|
||||
var columnChooserItems = function columnChooserItems(columns, hiddenColumns) {
|
||||
var tableDataColumnsExist = function tableDataColumnsExist(tableColumns) {
|
||||
return tableColumns.some(function (column) {
|
||||
return column.type === TABLE_DATA_TYPE;
|
||||
});
|
||||
};
|
||||
|
||||
var columnChooserItems = function columnChooserItems(columns, hiddenColumnNames) {
|
||||
return columns.map(function (column) {
|
||||
return { column: column, hidden: hiddenColumns.indexOf(column.name) !== -1 };
|
||||
return { column: column, hidden: hiddenColumnNames.indexOf(column.name) !== -1 };
|
||||
});
|
||||
};
|
||||
|
||||
var toggleColumn = function toggleColumn(hiddenColumns, columnName) {
|
||||
return hiddenColumns.indexOf(columnName) === -1 ? [].concat(toConsumableArray(hiddenColumns), [columnName]) : hiddenColumns.filter(function (hiddenColumn) {
|
||||
var toggleColumn = function toggleColumn(hiddenColumnNames, columnName) {
|
||||
return hiddenColumnNames.indexOf(columnName) === -1 ? [].concat(toConsumableArray(hiddenColumnNames), [columnName]) : hiddenColumnNames.filter(function (hiddenColumn) {
|
||||
return hiddenColumn !== columnName;
|
||||
});
|
||||
};
|
||||
@@ -1656,15 +1712,36 @@ var isOnTheSameLine = function isOnTheSameLine(geometry, y) {
|
||||
return y >= geometry.top && y <= geometry.bottom;
|
||||
};
|
||||
|
||||
var getGroupCellTargetIndex = function getGroupCellTargetIndex(geometries, sourceIndex, _ref) {
|
||||
var x = _ref.x,
|
||||
y = _ref.y;
|
||||
var rectToObject = function rectToObject(_ref) {
|
||||
var top = _ref.top,
|
||||
right = _ref.right,
|
||||
bottom = _ref.bottom,
|
||||
left = _ref.left;
|
||||
return {
|
||||
top: top, right: right, bottom: bottom, left: left
|
||||
};
|
||||
};
|
||||
|
||||
var collapseGapsBetweenItems = function collapseGapsBetweenItems(geometries) {
|
||||
return geometries.map(function (geometry, index) {
|
||||
if (index !== geometries.length - 1 && geometry.top === geometries[index + 1].top) {
|
||||
return _extends({}, geometry, {
|
||||
right: geometries[index + 1].left
|
||||
});
|
||||
}
|
||||
return geometry;
|
||||
});
|
||||
};
|
||||
|
||||
var getGroupCellTargetIndex = function getGroupCellTargetIndex(geometries, sourceIndex, _ref2) {
|
||||
var x = _ref2.x,
|
||||
y = _ref2.y;
|
||||
|
||||
if (geometries.length === 0) return 0;
|
||||
|
||||
var targetGeometries = sourceIndex !== -1 ? getTargetColumnGeometries(geometries, sourceIndex) : geometries;
|
||||
var targetGeometries = sourceIndex !== -1 ? getTargetColumnGeometries(geometries, sourceIndex) : geometries.map(rectToObject);
|
||||
|
||||
var targetIndex = targetGeometries.findIndex(function (geometry, index) {
|
||||
var targetIndex = collapseGapsBetweenItems(targetGeometries).findIndex(function (geometry, index) {
|
||||
var inVerticalBounds = isOnTheSameLine(geometry, y);
|
||||
var inHorizontalBounds = x >= geometry.left && x <= geometry.right;
|
||||
var shouldGoFirst = index === 0 && x < geometry.left;
|
||||
@@ -1696,6 +1773,7 @@ var getMessagesFormatter = function getMessagesFormatter(messages) {
|
||||
};
|
||||
};
|
||||
|
||||
exports.getColumnExtension = getColumnExtension;
|
||||
exports.getTableRowColumnsWithColSpan = getTableRowColumnsWithColSpan;
|
||||
exports.getTableColumnGeometries = getTableColumnGeometries;
|
||||
exports.getTableTargetColumnIndex = getTableTargetColumnIndex;
|
||||
@@ -1706,17 +1784,17 @@ exports.getGroupCellTargetIndex = getGroupCellTargetIndex;
|
||||
exports.getMessagesFormatter = getMessagesFormatter;
|
||||
exports.rowIdGetter = rowIdGetter;
|
||||
exports.cellValueGetter = cellValueGetter;
|
||||
exports.setColumnSorting = setColumnSorting;
|
||||
exports.changeColumnSorting = changeColumnSorting;
|
||||
exports.getColumnSortingDirection = getColumnSortingDirection;
|
||||
exports.sortedRows = sortedRows;
|
||||
exports.setColumnFilter = setColumnFilter;
|
||||
exports.changeColumnFilter = changeColumnFilter;
|
||||
exports.getColumnFilterConfig = getColumnFilterConfig;
|
||||
exports.filteredRows = filteredRows;
|
||||
exports.groupByColumn = groupByColumn;
|
||||
exports.GROUP_KEY_SEPARATOR = GROUP_KEY_SEPARATOR;
|
||||
exports.changeColumnGrouping = changeColumnGrouping;
|
||||
exports.toggleExpandedGroups = toggleExpandedGroups;
|
||||
exports.draftGroupingChange = draftGroupingChange;
|
||||
exports.cancelGroupingChange = cancelGroupingChange;
|
||||
exports.draftGrouping = draftGrouping;
|
||||
exports.draftColumnGrouping = draftColumnGrouping;
|
||||
exports.cancelColumnGroupingDraft = cancelColumnGroupingDraft;
|
||||
exports.groupRowChecker = groupRowChecker;
|
||||
exports.groupRowLevelKeyGetter = groupRowLevelKeyGetter;
|
||||
exports.groupedRows = groupedRows;
|
||||
@@ -1732,9 +1810,11 @@ exports.pageCount = pageCount;
|
||||
exports.rowCount = rowCount;
|
||||
exports.firstRowOnPage = firstRowOnPage;
|
||||
exports.lastRowOnPage = lastRowOnPage;
|
||||
exports.setRowsSelection = setRowsSelection;
|
||||
exports.getAvailableToSelect = getAvailableToSelect;
|
||||
exports.getAvailableSelection = getAvailableSelection;
|
||||
exports.toggleSelection = toggleSelection;
|
||||
exports.rowsWithAvailableToSelect = rowsWithAvailableToSelect;
|
||||
exports.someSelected = someSelected;
|
||||
exports.allSelected = allSelected;
|
||||
exports.unwrapSelectedRows = unwrapSelectedRows;
|
||||
exports.startEditRows = startEditRows;
|
||||
exports.stopEditRows = stopEditRows;
|
||||
exports.addRow = addRow;
|
||||
@@ -1746,7 +1826,7 @@ exports.deleteRows = deleteRows;
|
||||
exports.cancelDeletedRows = cancelDeletedRows;
|
||||
exports.changedRowsByIds = changedRowsByIds;
|
||||
exports.addedRowsByIds = addedRowsByIds;
|
||||
exports.computedCreateRowChange = computedCreateRowChange;
|
||||
exports.createRowChangeGetter = createRowChangeGetter;
|
||||
exports.getRowChange = getRowChange;
|
||||
exports.TABLE_REORDERING_TYPE = TABLE_REORDERING_TYPE;
|
||||
exports.changeColumnOrder = changeColumnOrder;
|
||||
@@ -1754,8 +1834,9 @@ exports.orderedColumns = orderedColumns;
|
||||
exports.tableHeaderRowsWithReordering = tableHeaderRowsWithReordering;
|
||||
exports.draftOrder = draftOrder;
|
||||
exports.tableColumnsWithWidths = tableColumnsWithWidths;
|
||||
exports.changeTableColumnWidths = changeTableColumnWidths;
|
||||
exports.changeDraftTableColumnWidths = changeDraftTableColumnWidths;
|
||||
exports.changeTableColumnWidth = changeTableColumnWidth;
|
||||
exports.draftTableColumnWidth = draftTableColumnWidth;
|
||||
exports.cancelTableColumnWidthDraft = cancelTableColumnWidthDraft;
|
||||
exports.TABLE_EDIT_COMMAND_TYPE = TABLE_EDIT_COMMAND_TYPE;
|
||||
exports.isHeadingEditCommandsTableCell = isHeadingEditCommandsTableCell;
|
||||
exports.isEditCommandsTableCell = isEditCommandsTableCell;
|
||||
@@ -1784,7 +1865,7 @@ exports.TABLE_DETAIL_TYPE = TABLE_DETAIL_TYPE;
|
||||
exports.isDetailRowExpanded = isDetailRowExpanded;
|
||||
exports.isDetailToggleTableCell = isDetailToggleTableCell;
|
||||
exports.isDetailTableRow = isDetailTableRow;
|
||||
exports.setDetailRowExpanded = setDetailRowExpanded;
|
||||
exports.toggleDetailRowExpanded = toggleDetailRowExpanded;
|
||||
exports.tableRowsWithExpandedDetail = tableRowsWithExpandedDetail;
|
||||
exports.tableColumnsWithDetail = tableColumnsWithDetail;
|
||||
exports.TABLE_SELECT_TYPE = TABLE_SELECT_TYPE;
|
||||
@@ -1800,6 +1881,7 @@ exports.isDataTableRow = isDataTableRow;
|
||||
exports.tableColumnsWithDataRows = tableColumnsWithDataRows;
|
||||
exports.tableRowsWithDataRows = tableRowsWithDataRows;
|
||||
exports.visibleTableColumns = visibleTableColumns;
|
||||
exports.tableDataColumnsExist = tableDataColumnsExist;
|
||||
exports.columnChooserItems = columnChooserItems;
|
||||
exports.toggleColumn = toggleColumn;
|
||||
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"dx-grid-core.umd.js","sources":["../src/plugins/grid-core/computeds.js","../src/plugins/sorting-state/reducers.js","../src/plugins/sorting-state/helpers.js","../src/utils/merge-sort.js","../src/utils/hierarchical-data.js","../src/plugins/local-sorting/computeds.js","../src/plugins/filtering-state/reducers.js","../src/plugins/filtering-state/helpers.js","../src/plugins/local-filtering/computeds.js","../src/plugins/grouping-state/constants.js","../src/plugins/grouping-state/reducers.js","../src/plugins/grouping-state/computeds.js","../src/plugins/local-grouping/constants.js","../src/plugins/local-grouping/computeds.js","../src/plugins/custom-grouping/computeds.js","../src/plugins/grouping-panel/helpers.js","../src/plugins/paging-state/reducers.js","../src/plugins/local-paging/computeds.js","../src/plugins/paging-panel/helpers.js","../src/plugins/selection-state/reducers.js","../src/plugins/selection-state/computeds.js","../src/plugins/editing-state/reducers.js","../src/plugins/editing-state/computeds.js","../src/plugins/editing-state/helpers.js","../src/plugins/table-column-reordering/constants.js","../src/plugins/table-column-reordering/reducers.js","../src/plugins/table-view/constants.js","../src/plugins/table-column-reordering/computeds.js","../src/plugins/table-column-resizing/computeds.js","../src/plugins/table-column-resizing/reducers.js","../src/plugins/table-edit-column/constants.js","../src/plugins/table-edit-row/constants.js","../src/plugins/table-header-row/constants.js","../src/plugins/table-edit-column/helpers.js","../src/plugins/table-edit-column/computeds.js","../src/plugins/table-edit-row/helpers.js","../src/plugins/table-edit-row/computeds.js","../src/plugins/table-filter-row/constants.js","../src/plugins/table-filter-row/helpers.js","../src/plugins/table-filter-row/computeds.js","../src/plugins/table-group-row/constants.js","../src/plugins/table-group-row/helpers.js","../src/plugins/table-group-row/computeds.js","../src/plugins/table-header-row/helpers.js","../src/plugins/table-header-row/computeds.js","../src/plugins/table-row-detail/constants.js","../src/plugins/table-row-detail/helpers.js","../src/plugins/table-row-detail/reducers.js","../src/plugins/table-row-detail/computeds.js","../src/plugins/table-selection/constants.js","../src/plugins/table-selection/helpers.js","../src/plugins/table-selection/computeds.js","../src/plugins/table-view/helpers.js","../src/plugins/table-view/computeds.js","../src/plugins/table-column-visibility/computeds.js","../src/column-chooser/computeds.js","../src/column-chooser/reducers.js","../src/utils/column-geometries.js","../src/utils/table.js","../src/utils/group-panel.js","../src/utils/messages-formatter.js"],"sourcesContent":["export const rowIdGetter = (getRowId, rows) => {\n if (!getRowId) {\n const map = new Map(rows.map((row, rowIndex) => [row, rowIndex]));\n return row => map.get(row);\n }\n return getRowId;\n};\n\nexport const cellValueGetter = (getCellValue, columns) => {\n if (getCellValue) {\n return getCellValue;\n }\n\n let useFastAccessor = true;\n const map = columns.reduce((acc, column) => {\n if (column.getCellValue) {\n useFastAccessor = false;\n acc[column.name] = column.getCellValue;\n }\n return acc;\n }, {});\n\n return useFastAccessor ?\n (row, columnName) => row[columnName] :\n (row, columnName) => (map[columnName] ? map[columnName](row, columnName) : row[columnName]);\n};\n","export const setColumnSorting = (state, {\n columnName, direction, keepOther, cancel, sortIndex,\n}) => {\n const { sorting } = state;\n\n let nextSorting = [];\n if (keepOther === true) {\n nextSorting = Array.from(sorting).slice();\n }\n if (Array.isArray(keepOther)) {\n nextSorting = Array.from(sorting)\n .filter(columnSorting => keepOther.indexOf(columnSorting.columnName) > -1);\n }\n\n const columnSortingIndex = sorting\n .findIndex(columnSorting => columnSorting.columnName === columnName);\n const columnSorting = sorting[columnSortingIndex];\n const newColumnSorting = {\n columnName,\n direction: direction ||\n (!columnSorting || columnSorting.direction === 'desc' ? 'asc' : 'desc'),\n };\n\n if (columnSortingIndex > -1) {\n nextSorting.splice(columnSortingIndex, 1);\n }\n\n if (!cancel) {\n const newIndexFallback = columnSortingIndex > -1 ? columnSortingIndex : nextSorting.length;\n const newIndex = sortIndex !== undefined ? sortIndex : newIndexFallback;\n nextSorting.splice(newIndex, 0, newColumnSorting);\n }\n\n return {\n sorting: nextSorting,\n };\n};\n","export const getColumnSortingDirection = (sorting, columnName) => {\n const columnSorting = sorting.filter(s => s.columnName === columnName)[0];\n return columnSorting ? columnSorting.direction : null;\n};\n","/* eslint-disable no-plusplus, no-param-reassign, no-use-before-define, no-constant-condition */\n\nconst merge = (array, auxiliary, lo, mid, hi, compare) => {\n let i =Line truncated
|
||||
{"version":3,"file":"dx-grid-core.umd.js","sources":["../src/plugins/grid-core/computeds.js","../src/plugins/sorting-state/reducers.js","../src/plugins/sorting-state/helpers.js","../src/utils/merge-sort.js","../src/utils/hierarchical-data.js","../src/plugins/integrated-sorting/computeds.js","../src/plugins/filtering-state/reducers.js","../src/plugins/filtering-state/helpers.js","../src/plugins/integrated-filtering/computeds.js","../src/plugins/grouping-state/constants.js","../src/plugins/grouping-state/reducers.js","../src/plugins/integrated-grouping/constants.js","../src/plugins/integrated-grouping/computeds.js","../src/plugins/custom-grouping/computeds.js","../src/plugins/grouping-panel/helpers.js","../src/plugins/paging-state/reducers.js","../src/plugins/integrated-paging/computeds.js","../src/plugins/paging-panel/helpers.js","../src/plugins/selection-state/reducers.js","../src/plugins/integrated-selection/computeds.js","../src/plugins/editing-state/reducers.js","../src/plugins/editing-state/computeds.js","../src/plugins/editing-state/helpers.js","../src/plugins/table-column-reordering/constants.js","../src/plugins/table-column-reordering/reducers.js","../src/plugins/table/constants.js","../src/plugins/table-column-reordering/computeds.js","../src/plugins/table-column-resizing/computeds.js","../src/plugins/table-column-resizing/reducers.js","../src/plugins/table-edit-column/constants.js","../src/plugins/table-edit-row/constants.js","../src/plugins/table-header-row/constants.js","../src/plugins/table-edit-column/helpers.js","../src/plugins/table-edit-column/computeds.js","../src/plugins/table-edit-row/helpers.js","../src/plugins/table-edit-row/computeds.js","../src/plugins/table-filter-row/constants.js","../src/plugins/table-filter-row/helpers.js","../src/plugins/table-filter-row/computeds.js","../src/plugins/table-group-row/constants.js","../src/plugins/table-group-row/helpers.js","../src/plugins/table-group-row/computeds.js","../src/plugins/table-header-row/helpers.js","../src/plugins/table-header-row/computeds.js","../src/plugins/table-row-detail/constants.js","../src/plugins/table-row-detail/helpers.js","../src/plugins/table-row-detail/reducers.js","../src/plugins/table-row-detail/computeds.js","../src/plugins/table-selection/constants.js","../src/plugins/table-selection/helpers.js","../src/plugins/table-selection/computeds.js","../src/plugins/table/helpers.js","../src/utils/column.js","../src/plugins/table/computeds.js","../src/plugins/table-column-visibility/computeds.js","../src/plugins/table-column-visibility/helpers.js","../src/plugins/column-chooser/computeds.js","../src/plugins/column-chooser/reducers.js","../src/utils/column-geometries.js","../src/utils/table.js","../src/utils/group-panel.js","../src/utils/messages-formatter.js"],"sourcesContent":["export const rowIdGetter = (getRowId, rows) => {\n if (!getRowId) {\n const map = new Map(rows.map((row, rowIndex) => [row, rowIndex]));\n return row => map.get(row);\n }\n return getRowId;\n};\n\nconst defaultGetCellValue = (row, columnName) => row[columnName];\nexport const cellValueGetter = (getCellValue = defaultGetCellValue, columns) => {\n let useFastAccessor = true;\n const map = columns.reduce((acc, column) => {\n if (column.getCellValue) {\n useFastAccessor = false;\n acc[column.name] = column.getCellValue;\n }\n return acc;\n }, {});\n\n if (useFastAccessor) {\n return getCellValue;\n }\n\n return (row, columnName) => (map[columnName]\n ? map[columnName](row, columnName)\n : getCellValue(row, columnName));\n};\n","export const changeColumnSorting = (state, {\n columnName, direction, keepOther, sortIndex,\n}) => {\n const { sorting } = state;\n\n let nextSorting = [];\n if (keepOther === true) {\n nextSorting = sorting.slice();\n }\n if (Array.isArray(keepOther)) {\n nextSorting = sorting.slice()\n .filter(columnSorting => keepOther.indexOf(columnSorting.columnName) > -1);\n }\n\n const columnSortingIndex = sorting\n .findIndex(columnSorting => columnSorting.columnName === columnName);\n const columnSorting = sorting[columnSortingIndex];\n const newColumnSorting = {\n columnName,\n direction: direction ||\n (!columnSorting || columnSorting.direction === 'desc' ? 'asc' : 'desc'),\n };\n\n if (columnSortingIndex > -1) {\n nextSorting.splice(columnSortingIndex, 1);\n }\n\n if (direction !== null) {\n const newIndexFallback = columnSortingIndex > -1 ? columnSortingIndex : nextSorting.length;\n const newIndex = sortIndex !== undefined ? sortIndex : newIndexFallback;\n nextSorting.splice(newIndex, 0, newColumnSorting);\n }\n\n return {\n sorting: nextSorting,\n };\n};\n","export const getColumnSortingDirection = (sorting, columnName) => {\n const columnSorting = sorting.filter(s => s.columnName === columnName)[0];\n return columnSorting ? columnSorting.direction : null;\n};\n","/* eslint-disable no-plusplus, no-param-reassign, no-use-before-defiLine truncated
|
||||
+17
-17
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"_from": "@devexpress/dx-grid-core",
|
||||
"_id": "@devexpress/dx-grid-core@1.0.0-beta.1",
|
||||
"_id": "@devexpress/dx-grid-core@1.0.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-3hKM7JUKKHJGJ8C/B20SDfCbkxr7R6ADhKb/IfkWrepJQ78uPDce9wWxwkjl8EqSd8r1jKMWbg5dgXMU6zQwWw==",
|
||||
"_integrity": "sha512-k+mzGd1Gjqbq92BwZdr+UMQcTFfezk2usEaSRqBO30b6+THYYAIx5kFzCbkcv1H37CtFNju29t52ZTNDJZixVQ==",
|
||||
"_location": "/@devexpress/dx-grid-core",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
@@ -17,12 +17,13 @@
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER"
|
||||
"#USER",
|
||||
"/@devexpress/dx-react-grid"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@devexpress/dx-grid-core/-/dx-grid-core-1.0.0-beta.1.tgz",
|
||||
"_shasum": "48f76255c7192e7727f2c9b97efb2bf70774471d",
|
||||
"_resolved": "https://registry.npmjs.org/@devexpress/dx-grid-core/-/dx-grid-core-1.0.3.tgz",
|
||||
"_shasum": "e6b2708593c10c6dfab2cbc4c2c3f82b5ab910c2",
|
||||
"_spec": "@devexpress/dx-grid-core",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI",
|
||||
"author": {
|
||||
"name": "Developer Express Inc.",
|
||||
"url": "https://www.devexpress.com/"
|
||||
@@ -34,24 +35,23 @@
|
||||
"deprecated": false,
|
||||
"description": "Core library for the DevExtreme Reactive Grid component",
|
||||
"devDependencies": {
|
||||
"@devexpress/dx-core": "1.0.0-beta.1",
|
||||
"@devexpress/dx-core": "1.0.3",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-jest": "^21.2.0",
|
||||
"babel-jest": "^22.1.0",
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"core-js": "^2.5.1",
|
||||
"eslint": "^4.10.0",
|
||||
"core-js": "^2.5.3",
|
||||
"eslint": "^4.16.0",
|
||||
"eslint-config-airbnb-base": "^12.1.0",
|
||||
"eslint-plugin-filenames": "^1.2.0",
|
||||
"eslint-plugin-import": "^2.8.0",
|
||||
"eslint-plugin-jest": "^21.3.0",
|
||||
"jest": "^21.2.1",
|
||||
"eslint-plugin-jest": "^21.7.0",
|
||||
"jest": "^22.1.4",
|
||||
"rollup": "0.50.0",
|
||||
"rollup-plugin-babel": "^3.0.2",
|
||||
"rollup-plugin-license": "^0.5.0",
|
||||
"seamless-immutable": "^7.1.2"
|
||||
"rollup-plugin-babel": "^3.0.3",
|
||||
"rollup-plugin-license": "^0.5.0"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
@@ -68,7 +68,7 @@
|
||||
"module": "dist/dx-grid-core.es.js",
|
||||
"name": "@devexpress/dx-grid-core",
|
||||
"peerDependencies": {
|
||||
"@devexpress/dx-core": "1.0.0-beta.1"
|
||||
"@devexpress/dx-core": "1.0.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@@ -86,5 +86,5 @@
|
||||
"test:coverage": "jest --coverage",
|
||||
"test:watch": "jest --watch"
|
||||
},
|
||||
"version": "1.0.0-beta.1"
|
||||
"version": "1.0.3"
|
||||
}
|
||||
+422
-434
File diff suppressed because it is too large.
Load diff
Generated
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"dx-react-core.es.js","sources":["../src/utils/plugin-helpers.js","../src/plugged/getter.jsx","../src/plugged/action.jsx","../src/plugged/template.jsx","../src/plugged/plugin-indexer.jsx","../src/plugged/template-placeholder.jsx","../src/plugged/plugin-host.jsx","../src/plugged/plugin-container.jsx","../src/plugged/watcher.jsx","../src/plugged/template-connector.jsx","../src/draggable/touch-strategy.js","../src/draggable/gesture-cover.js","../src/draggable/mouse-strategy.js","../src/draggable/shared-events.js","../src/draggable.jsx","../src/drag-drop/context.jsx","../src/drag-drop/source.jsx","../src/drag-drop/target.jsx","../src/template-renderer.jsx","../src/utils/template-helpers.js"],"sourcesContent":["import { shallowEqual } from '@devexpress/dx-core';\n\nexport const getActionExecutor = (pluginHost, actionToExecuteName) => {\n const actionsToExecute = pluginHost.collect(`${actionToExecuteName}Action`).slice().reverse();\n return (startingPayload) => {\n let payload = startingPayload;\n // eslint-disable-next-line no-use-before-define\n const { getters } = getAvaliableGetters(pluginHost);\n // eslint-disable-next-line no-use-before-define\n const actions = getAvaliableActions(\n pluginHost,\n actionName => (actionName === actionToExecuteName\n ? (newPayload) => { payload = newPayload; }\n : getActionExecutor(pluginHost, actionName)\n ),\n );\n for (let i = 0; i < actionsToExecute.length; i += 1) {\n const result = actionsToExecute[i](payload, getters, actions);\n if (result === false) {\n break;\n }\n }\n };\n};\n\nexport const getAvaliableGetters = (\n pluginHost,\n getGetterValue = getterName => pluginHost.get(`${getterName}Getter`),\n) => {\n const trackedDependencies = {};\n const getters = pluginHost.knownKeys('Getter')\n .reduce((acc, getterName) => {\n Object.defineProperty(acc, getterName, {\n get: () => {\n const result = getGetterValue(getterName);\n trackedDependencies[getterName] = result;\n return result;\n },\n });\n return acc;\n }, {});\n\n return { getters, trackedDependencies };\n};\n\nexport const isTrackedDependenciesChanged = (\n pluginHost,\n prevTrackedDependencies,\n getGetterValue = getterName => pluginHost.get(`${getterName}Getter`),\n) => {\n const trackedDependencies = Object.keys(prevTrackedDependencies)\n .reduce((acc, getterName) => Object.assign(acc, {\n [getterName]: getGetterValue(getterName),\n }), {});\n\n return !shallowEqual(prevTrackedDependencies, trackedDependencies);\n};\n\nexport const getAvaliableActions = (\n pluginHost,\n getAction = actionName => getActionExecutor(pluginHost, actionName),\n) =>\n pluginHost.knownKeys('Action')\n .reduce((acc, actionName) => {\n Object.defineProperty(acc, actionName, {\n get: () => getAction(actionName),\n });\n return acc;\n }, {});\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n isTrackedDependenciesChanged,\n getAvaliableGetters,\n getAvaliableActions,\n} from '../utils/plugin-helpers';\n\nexport const UPDATE_CONNECTION = 'updateConnection';\n\nexport class Getter extends React.PureComponent {\n componentWillMount() {\n const { pluginHost } = this.context;\n const { name } = this.props;\n\n let lastComputed;\n let lastTrackedDependencies = {};\n let lastResult;\n\n this.plugin = {\n position: () => this.props.position(),\n [`${name}Getter`]: (original) => {\n const { value, computed } = this.props;\n if (value !== undefined) return value;\n\n const getGetterValue = getterName => ((getterName === name)\n ? original\n : pluginHost.get(`${getterName}Getter`, this.plugin));\n\n if (computed === lastComputed &&\n !isTrackedDependenciesChanged(pluginHost, lastTrackedDependencies, getGetterValue)) {\n return lastResult;\n }\n\n const { getters, trackedDependencies } = getAvaliableGetters(pluginHost, getGetterValue);\n const actions = getAvaliableActions(pluginHost);\n\n lastComputed = computed;\n lastTrackedDependencies = trackedDependencies;\n lastResult = computed(getters, actions);\n return lastResult;\n },\n };\n\n pluginHost.registerPlugin(this.plugin);\n }\n componentDidUpdate() {\n const { pluginHost } = this.context;\n\n pluginHost.broadcast(UPDATE_CONNECTION);\n }\n componentWillUnmount() {\n const { pluginHost } = this.context;\n\n pluginHost.unregisterPlugin(this.plugin);\n }\n render() {\n return null;\n }\n}\n\nGetter.propTypes = {\n position: PropTypes.func,\n name: PropTypes.string.isRequired,\n value: PropTypes.any,\n computed: PropTypes.func,\n};\n\nGetter.defaultProps = {\n value: undefined,\n computed: null,\n position: null,\n};\n\nGetter.contextTypes = {\n pluginHost: PropTypes.objectLine truncated
|
||||
{"version":3,"file":"dx-react-core.es.js","sources":["../src/plugged/plugin-indexer.jsx","../src/plugged/template.jsx","../src/plugged/template-placeholder.jsx","../src/plugged/plugin-host.jsx","../src/plugged/plugin.jsx","../src/utils/plugin-helpers.js","../src/plugged/action.jsx","../src/plugged/getter.jsx","../src/plugged/template-connector.jsx","../src/draggable/touch-strategy.js","../src/draggable/gesture-cover.js","../src/draggable/mouse-strategy.js","../src/draggable/shared-events.js","../src/draggable/selection-utils.js","../src/draggable.jsx","../src/drag-drop/provider.jsx","../src/drag-drop/source.jsx","../src/drag-drop/target.jsx","../src/utils/render-component.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport const INDEXABLE_COMPONENT = Symbol('indexableComponent');\n\nexport const PluginIndexer = (\n { children },\n { positionContext },\n) => (\n <React.Fragment>\n {\n React.Children.map(children, (child, index) => {\n if (!child || !child.type) return child;\n\n const childPosition = () => {\n const calculatedPosition =\n (positionContext && positionContext()) || [];\n return [...calculatedPosition, index];\n };\n\n if (child.type[INDEXABLE_COMPONENT] === true) {\n return React.cloneElement(child, { position: childPosition });\n }\n\n return (\n <PluginIndexerContext position={childPosition}>\n {child}\n </PluginIndexerContext>\n );\n })\n }\n </React.Fragment>\n);\n\nPluginIndexer.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]),\n};\n\nPluginIndexer.defaultProps = {\n children: null,\n};\n\nPluginIndexer.contextTypes = {\n positionContext: PropTypes.func,\n};\n\nclass PluginIndexerContext extends React.Component {\n getChildContext() {\n return {\n positionContext: this.props.position,\n };\n }\n render() {\n return this.props.children;\n }\n}\n\nPluginIndexerContext.propTypes = {\n position: PropTypes.func.isRequired,\n children: PropTypes.node.isRequired,\n};\n\nPluginIndexerContext.childContextTypes = {\n positionContext: PropTypes.func,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { INDEXABLE_COMPONENT } from './plugin-indexer';\n\nexport const RERENDER_TEMPLATE = 'rerenderTemplate';\nlet globalTemplateId = 0;\nexport class Template extends React.PureComponent {\n constructor(props, context) {\n super(props, context);\n\n globalTemplateId += 1;\n this.id = globalTemplateId;\n }\n componentWillMount() {\n const { pluginHost } = this.context;\n const { name } = this.props;\n\n this.plugin = {\n position: () => this.props.position(),\n [`${name}Template`]: {\n id: this.id,\n predicate: params => (this.props.predicate ? this.props.predicate(params) : true),\n children: () => this.props.children,\n },\n };\n pluginHost.registerPlugin(this.plugin);\n }\n componentDidUpdate() {\n const { pluginHost } = this.context;\n pluginHost.broadcast(RERENDER_TEMPLATE, this.id);\n }\n componentWillUnmount() {\n const { pluginHost } = this.context;\n pluginHost.unregisterPlugin(this.plugin);\n }\n render() {\n return null;\n }\n}\n\nTemplate[INDEXABLE_COMPONENT] = true;\n\nTemplate.propTypes = {\n position: PropTypes.func,\n name: PropTypes.string.isRequired,\n predicate: PropTypes.func,\n children: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.node,\n ]),\n};\n\nTemplate.defaultProps = {\n predicate: null,\n children: null,\n position: null,\n};\n\nTemplate.contextTypes = {\n pluginHost: PropTypes.object.isRequired,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { shallowEqual } from '@devexpress/dx-core';\nimport { RERENDER_TEMPLATE } from './template';\n\nexport class TemplatePlaceholder extends React.Component {\n constructor(props, context) {\n super(props, context);\n\n this.subscription = {\n [RERENDER_TEMPLATE]: (id) => {\n if (this.template && this.template.id === id) {\n this.forceUpdate();\n }\n },\n };\n }\n getChildContext() {\n return {\n templateHost: {\n templates: () => this.restTemplates,\n params: () => this.params,\n },\n };\n }\n componentWillMount() {\n const { pluginHost } = this.context;\n pluginHost.registerSubscription(this.subscription);\n }\n shouldComponentUpdate(nextProps) {\n const { params } = this.getRenderingData(nextProps);\n return !shallowEqual(params, this.params) || this.props.children !== nextProps.children;\n }\n componentWillUnmount() {\n const { pluginHost } = this.context;\n pluginHost.unregisterSubscription(this.subscription);\n }\n getRenderingData(props) {\n const { name, params } = props;\n if (name) {\n consLine truncated
|
||||
+423
-437
File diff suppressed because it is too large.
Load diff
Generated
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"dx-react-core.umd.js","sources":["../src/utils/plugin-helpers.js","../src/plugged/getter.jsx","../src/plugged/action.jsx","../src/plugged/template.jsx","../src/plugged/plugin-indexer.jsx","../src/plugged/template-placeholder.jsx","../src/plugged/plugin-host.jsx","../src/plugged/plugin-container.jsx","../src/plugged/watcher.jsx","../src/plugged/template-connector.jsx","../src/draggable/touch-strategy.js","../src/draggable/gesture-cover.js","../src/draggable/mouse-strategy.js","../src/draggable/shared-events.js","../src/draggable.jsx","../src/drag-drop/context.jsx","../src/drag-drop/source.jsx","../src/drag-drop/target.jsx","../src/template-renderer.jsx","../src/utils/template-helpers.js"],"sourcesContent":["import { shallowEqual } from '@devexpress/dx-core';\n\nexport const getActionExecutor = (pluginHost, actionToExecuteName) => {\n const actionsToExecute = pluginHost.collect(`${actionToExecuteName}Action`).slice().reverse();\n return (startingPayload) => {\n let payload = startingPayload;\n // eslint-disable-next-line no-use-before-define\n const { getters } = getAvaliableGetters(pluginHost);\n // eslint-disable-next-line no-use-before-define\n const actions = getAvaliableActions(\n pluginHost,\n actionName => (actionName === actionToExecuteName\n ? (newPayload) => { payload = newPayload; }\n : getActionExecutor(pluginHost, actionName)\n ),\n );\n for (let i = 0; i < actionsToExecute.length; i += 1) {\n const result = actionsToExecute[i](payload, getters, actions);\n if (result === false) {\n break;\n }\n }\n };\n};\n\nexport const getAvaliableGetters = (\n pluginHost,\n getGetterValue = getterName => pluginHost.get(`${getterName}Getter`),\n) => {\n const trackedDependencies = {};\n const getters = pluginHost.knownKeys('Getter')\n .reduce((acc, getterName) => {\n Object.defineProperty(acc, getterName, {\n get: () => {\n const result = getGetterValue(getterName);\n trackedDependencies[getterName] = result;\n return result;\n },\n });\n return acc;\n }, {});\n\n return { getters, trackedDependencies };\n};\n\nexport const isTrackedDependenciesChanged = (\n pluginHost,\n prevTrackedDependencies,\n getGetterValue = getterName => pluginHost.get(`${getterName}Getter`),\n) => {\n const trackedDependencies = Object.keys(prevTrackedDependencies)\n .reduce((acc, getterName) => Object.assign(acc, {\n [getterName]: getGetterValue(getterName),\n }), {});\n\n return !shallowEqual(prevTrackedDependencies, trackedDependencies);\n};\n\nexport const getAvaliableActions = (\n pluginHost,\n getAction = actionName => getActionExecutor(pluginHost, actionName),\n) =>\n pluginHost.knownKeys('Action')\n .reduce((acc, actionName) => {\n Object.defineProperty(acc, actionName, {\n get: () => getAction(actionName),\n });\n return acc;\n }, {});\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n isTrackedDependenciesChanged,\n getAvaliableGetters,\n getAvaliableActions,\n} from '../utils/plugin-helpers';\n\nexport const UPDATE_CONNECTION = 'updateConnection';\n\nexport class Getter extends React.PureComponent {\n componentWillMount() {\n const { pluginHost } = this.context;\n const { name } = this.props;\n\n let lastComputed;\n let lastTrackedDependencies = {};\n let lastResult;\n\n this.plugin = {\n position: () => this.props.position(),\n [`${name}Getter`]: (original) => {\n const { value, computed } = this.props;\n if (value !== undefined) return value;\n\n const getGetterValue = getterName => ((getterName === name)\n ? original\n : pluginHost.get(`${getterName}Getter`, this.plugin));\n\n if (computed === lastComputed &&\n !isTrackedDependenciesChanged(pluginHost, lastTrackedDependencies, getGetterValue)) {\n return lastResult;\n }\n\n const { getters, trackedDependencies } = getAvaliableGetters(pluginHost, getGetterValue);\n const actions = getAvaliableActions(pluginHost);\n\n lastComputed = computed;\n lastTrackedDependencies = trackedDependencies;\n lastResult = computed(getters, actions);\n return lastResult;\n },\n };\n\n pluginHost.registerPlugin(this.plugin);\n }\n componentDidUpdate() {\n const { pluginHost } = this.context;\n\n pluginHost.broadcast(UPDATE_CONNECTION);\n }\n componentWillUnmount() {\n const { pluginHost } = this.context;\n\n pluginHost.unregisterPlugin(this.plugin);\n }\n render() {\n return null;\n }\n}\n\nGetter.propTypes = {\n position: PropTypes.func,\n name: PropTypes.string.isRequired,\n value: PropTypes.any,\n computed: PropTypes.func,\n};\n\nGetter.defaultProps = {\n value: undefined,\n computed: null,\n position: null,\n};\n\nGetter.contextTypes = {\n pluginHost: PropTypes.objecLine truncated
|
||||
{"version":3,"file":"dx-react-core.umd.js","sources":["../src/plugged/plugin-indexer.jsx","../src/plugged/template.jsx","../src/plugged/template-placeholder.jsx","../src/plugged/plugin-host.jsx","../src/plugged/plugin.jsx","../src/utils/plugin-helpers.js","../src/plugged/action.jsx","../src/plugged/getter.jsx","../src/plugged/template-connector.jsx","../src/draggable/touch-strategy.js","../src/draggable/gesture-cover.js","../src/draggable/mouse-strategy.js","../src/draggable/shared-events.js","../src/draggable/selection-utils.js","../src/draggable.jsx","../src/drag-drop/provider.jsx","../src/drag-drop/source.jsx","../src/drag-drop/target.jsx","../src/utils/render-component.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport const INDEXABLE_COMPONENT = Symbol('indexableComponent');\n\nexport const PluginIndexer = (\n { children },\n { positionContext },\n) => (\n <React.Fragment>\n {\n React.Children.map(children, (child, index) => {\n if (!child || !child.type) return child;\n\n const childPosition = () => {\n const calculatedPosition =\n (positionContext && positionContext()) || [];\n return [...calculatedPosition, index];\n };\n\n if (child.type[INDEXABLE_COMPONENT] === true) {\n return React.cloneElement(child, { position: childPosition });\n }\n\n return (\n <PluginIndexerContext position={childPosition}>\n {child}\n </PluginIndexerContext>\n );\n })\n }\n </React.Fragment>\n);\n\nPluginIndexer.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]),\n};\n\nPluginIndexer.defaultProps = {\n children: null,\n};\n\nPluginIndexer.contextTypes = {\n positionContext: PropTypes.func,\n};\n\nclass PluginIndexerContext extends React.Component {\n getChildContext() {\n return {\n positionContext: this.props.position,\n };\n }\n render() {\n return this.props.children;\n }\n}\n\nPluginIndexerContext.propTypes = {\n position: PropTypes.func.isRequired,\n children: PropTypes.node.isRequired,\n};\n\nPluginIndexerContext.childContextTypes = {\n positionContext: PropTypes.func,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { INDEXABLE_COMPONENT } from './plugin-indexer';\n\nexport const RERENDER_TEMPLATE = 'rerenderTemplate';\nlet globalTemplateId = 0;\nexport class Template extends React.PureComponent {\n constructor(props, context) {\n super(props, context);\n\n globalTemplateId += 1;\n this.id = globalTemplateId;\n }\n componentWillMount() {\n const { pluginHost } = this.context;\n const { name } = this.props;\n\n this.plugin = {\n position: () => this.props.position(),\n [`${name}Template`]: {\n id: this.id,\n predicate: params => (this.props.predicate ? this.props.predicate(params) : true),\n children: () => this.props.children,\n },\n };\n pluginHost.registerPlugin(this.plugin);\n }\n componentDidUpdate() {\n const { pluginHost } = this.context;\n pluginHost.broadcast(RERENDER_TEMPLATE, this.id);\n }\n componentWillUnmount() {\n const { pluginHost } = this.context;\n pluginHost.unregisterPlugin(this.plugin);\n }\n render() {\n return null;\n }\n}\n\nTemplate[INDEXABLE_COMPONENT] = true;\n\nTemplate.propTypes = {\n position: PropTypes.func,\n name: PropTypes.string.isRequired,\n predicate: PropTypes.func,\n children: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.node,\n ]),\n};\n\nTemplate.defaultProps = {\n predicate: null,\n children: null,\n position: null,\n};\n\nTemplate.contextTypes = {\n pluginHost: PropTypes.object.isRequired,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { shallowEqual } from '@devexpress/dx-core';\nimport { RERENDER_TEMPLATE } from './template';\n\nexport class TemplatePlaceholder extends React.Component {\n constructor(props, context) {\n super(props, context);\n\n this.subscription = {\n [RERENDER_TEMPLATE]: (id) => {\n if (this.template && this.template.id === id) {\n this.forceUpdate();\n }\n },\n };\n }\n getChildContext() {\n return {\n templateHost: {\n templates: () => this.restTemplates,\n params: () => this.params,\n },\n };\n }\n componentWillMount() {\n const { pluginHost } = this.context;\n pluginHost.registerSubscription(this.subscription);\n }\n shouldComponentUpdate(nextProps) {\n const { params } = this.getRenderingData(nextProps);\n return !shallowEqual(params, this.params) || this.props.children !== nextProps.children;\n }\n componentWillUnmount() {\n const { pluginHost } = this.context;\n pluginHost.unregisterSubscription(this.subscription);\n }\n getRenderingData(props) {\n const { name, params } = props;\n if (name) {\n conLine truncated
|
||||
Generated
Vendored
+9
-9
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Bundle of @devexpress/dx-core
|
||||
* Generated: 2017-11-10
|
||||
* Version: 1.0.0-beta.1
|
||||
* Generated: 2018-03-02
|
||||
* Version: 1.0.3
|
||||
* License: https://js.devexpress.com/Licensing
|
||||
*/
|
||||
|
||||
@@ -186,22 +186,22 @@ var PluginHost = function () {
|
||||
this.plugins.filter(function (plugin) {
|
||||
return plugin.container;
|
||||
}).forEach(function (plugin) {
|
||||
if (knownOptionals.has(plugin.pluginName)) {
|
||||
throw getDependencyError(knownOptionals.get(plugin.pluginName), plugin.pluginName);
|
||||
if (knownOptionals.has(plugin.name)) {
|
||||
throw getDependencyError(knownOptionals.get(plugin.name), plugin.name);
|
||||
}
|
||||
|
||||
plugin.dependencies.forEach(function (dependency) {
|
||||
if (defined.has(dependency.pluginName)) return;
|
||||
if (defined.has(dependency.name)) return;
|
||||
if (dependency.optional) {
|
||||
if (!knownOptionals.has(dependency.pluginName)) {
|
||||
knownOptionals.set(dependency.pluginName, plugin.pluginName);
|
||||
if (!knownOptionals.has(dependency.name)) {
|
||||
knownOptionals.set(dependency.name, plugin.name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
throw getDependencyError(plugin.pluginName, dependency.pluginName);
|
||||
throw getDependencyError(plugin.name, dependency.name);
|
||||
});
|
||||
|
||||
defined.add(plugin.pluginName);
|
||||
defined.add(plugin.name);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"dx-core.es.js","sources":["../src/utils.js","../src/plugin-host.js","../src/event-emitter.js","../src/shallow-equal.js","../src/memoize.js","../src/easings.js"],"sourcesContent":["const compare = (a, b) => {\n const aPosition = a.position();\n const bPosition = b.position();\n for (let i = 0; i < Math.min(aPosition.length, bPosition.length); i += 1) {\n if (aPosition[i] < bPosition[i]) return -1;\n if (aPosition[i] > bPosition[i]) return 1;\n }\n return aPosition.length - bPosition.length;\n};\n\nexport const insertPlugin = (array, newItem) => {\n const result = array.slice();\n const targetIndex = array.findIndex(item => compare(newItem, item) < 0);\n result.splice(targetIndex < 0 ? array.length : targetIndex, 0, newItem);\n return result;\n};\n","import { insertPlugin } from './utils';\n\nconst getDependencyError = (pluginName, dependencyName) =>\n new Error(`The '${pluginName}' plugin requires '${dependencyName}' to be defined before it.`);\n\nexport class PluginHost {\n constructor() {\n this.plugins = [];\n this.subscriptions = [];\n this.gettersCache = {};\n }\n ensureDependencies() {\n const defined = new Set();\n const knownOptionals = new Map();\n this.plugins\n .filter(plugin => plugin.container)\n .forEach((plugin) => {\n if (knownOptionals.has(plugin.pluginName)) {\n throw (getDependencyError(knownOptionals.get(plugin.pluginName), plugin.pluginName));\n }\n\n plugin.dependencies\n .forEach((dependency) => {\n if (defined.has(dependency.pluginName)) return;\n if (dependency.optional) {\n if (!knownOptionals.has(dependency.pluginName)) {\n knownOptionals.set(dependency.pluginName, plugin.pluginName);\n }\n return;\n }\n throw (getDependencyError(plugin.pluginName, dependency.pluginName));\n });\n\n defined.add(plugin.pluginName);\n });\n }\n registerPlugin(plugin) {\n this.plugins = insertPlugin(this.plugins, plugin);\n this.cleanPluginsCache();\n }\n unregisterPlugin(plugin) {\n this.plugins.splice(this.plugins.indexOf(plugin), 1);\n this.cleanPluginsCache();\n }\n cleanPluginsCache() {\n this.validationRequired = true;\n this.gettersCache = {};\n this.knownKeysCache = {};\n }\n knownKeys(postfix) {\n if (!this.knownKeysCache[postfix]) {\n this.knownKeysCache[postfix] = Array.from(this.plugins\n .map(plugin => Object.keys(plugin))\n .map(keys => keys.filter(key => key.endsWith(postfix))[0])\n .filter(key => !!key)\n .reduce((acc, key) => acc.add(key), new Set()))\n .map(key => key.replace(postfix, ''));\n }\n return this.knownKeysCache[postfix];\n }\n collect(key, upTo) {\n if (this.validationRequired) {\n this.ensureDependencies();\n this.validationRequired = false;\n }\n\n if (!this.gettersCache[key]) {\n this.gettersCache[key] = this.plugins.map(plugin => plugin[key]).filter(plugin => !!plugin);\n }\n if (!upTo) return this.gettersCache[key];\n\n const upToIndex = this.plugins.indexOf(upTo);\n return this.gettersCache[key].filter((getter) => {\n const pluginIndex = this.plugins.findIndex(plugin => plugin[key] === getter);\n return pluginIndex < upToIndex;\n });\n }\n get(key, upTo) {\n const plugins = this.collect(key, upTo);\n\n if (!plugins.length) return undefined;\n\n let result = plugins[0]();\n plugins.slice(1).forEach((plugin) => {\n result = plugin(result);\n });\n return result;\n }\n registerSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index === -1) { this.subscriptions.push(subscription); }\n }\n unregisterSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index !== -1) { this.subscriptions.splice(this.subscriptions.indexOf(subscription), 1); }\n }\n broadcast(event, message) {\n this.subscriptions.forEach(subscription => subscription[event] && subscription[event](message));\n }\n}\n","export class EventEmitter {\n constructor() {\n this.handlers = [];\n }\n emit(e) {\n this.handlers.forEach(handler => handler(e));\n }\n subscribe(handler) {\n this.handlers.push(handler);\n }\n unsubscribe(handler) {\n this.handlers.splice(this.handlers.indexOf(handler), 1);\n }\n}\n","export function shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n const hasOwn = Object.prototype.hasOwnProperty;\n for (let i = 0; i < keysA.length; i += 1) {\n if (!hasOwn.call(objB, keysA[i]) ||\n objA[keysA[i]] !== objB[keysA[i]]) {\n return false;\n }\n\n const valA = objA[keysA[i]Line truncated
|
||||
{"version":3,"file":"dx-core.es.js","sources":["../src/utils.js","../src/plugin-host.js","../src/event-emitter.js","../src/shallow-equal.js","../src/memoize.js","../src/easings.js"],"sourcesContent":["const compare = (a, b) => {\n const aPosition = a.position();\n const bPosition = b.position();\n for (let i = 0; i < Math.min(aPosition.length, bPosition.length); i += 1) {\n if (aPosition[i] < bPosition[i]) return -1;\n if (aPosition[i] > bPosition[i]) return 1;\n }\n return aPosition.length - bPosition.length;\n};\n\nexport const insertPlugin = (array, newItem) => {\n const result = array.slice();\n const targetIndex = array.findIndex(item => compare(newItem, item) < 0);\n result.splice(targetIndex < 0 ? array.length : targetIndex, 0, newItem);\n return result;\n};\n","import { insertPlugin } from './utils';\n\nconst getDependencyError = (pluginName, dependencyName) =>\n new Error(`The '${pluginName}' plugin requires '${dependencyName}' to be defined before it.`);\n\nexport class PluginHost {\n constructor() {\n this.plugins = [];\n this.subscriptions = [];\n this.gettersCache = {};\n }\n ensureDependencies() {\n const defined = new Set();\n const knownOptionals = new Map();\n this.plugins\n .filter(plugin => plugin.container)\n .forEach((plugin) => {\n if (knownOptionals.has(plugin.name)) {\n throw (getDependencyError(knownOptionals.get(plugin.name), plugin.name));\n }\n\n plugin.dependencies\n .forEach((dependency) => {\n if (defined.has(dependency.name)) return;\n if (dependency.optional) {\n if (!knownOptionals.has(dependency.name)) {\n knownOptionals.set(dependency.name, plugin.name);\n }\n return;\n }\n throw (getDependencyError(plugin.name, dependency.name));\n });\n\n defined.add(plugin.name);\n });\n }\n registerPlugin(plugin) {\n this.plugins = insertPlugin(this.plugins, plugin);\n this.cleanPluginsCache();\n }\n unregisterPlugin(plugin) {\n this.plugins.splice(this.plugins.indexOf(plugin), 1);\n this.cleanPluginsCache();\n }\n cleanPluginsCache() {\n this.validationRequired = true;\n this.gettersCache = {};\n this.knownKeysCache = {};\n }\n knownKeys(postfix) {\n if (!this.knownKeysCache[postfix]) {\n this.knownKeysCache[postfix] = Array.from(this.plugins\n .map(plugin => Object.keys(plugin))\n .map(keys => keys.filter(key => key.endsWith(postfix))[0])\n .filter(key => !!key)\n .reduce((acc, key) => acc.add(key), new Set()))\n .map(key => key.replace(postfix, ''));\n }\n return this.knownKeysCache[postfix];\n }\n collect(key, upTo) {\n if (this.validationRequired) {\n this.ensureDependencies();\n this.validationRequired = false;\n }\n\n if (!this.gettersCache[key]) {\n this.gettersCache[key] = this.plugins.map(plugin => plugin[key]).filter(plugin => !!plugin);\n }\n if (!upTo) return this.gettersCache[key];\n\n const upToIndex = this.plugins.indexOf(upTo);\n return this.gettersCache[key].filter((getter) => {\n const pluginIndex = this.plugins.findIndex(plugin => plugin[key] === getter);\n return pluginIndex < upToIndex;\n });\n }\n get(key, upTo) {\n const plugins = this.collect(key, upTo);\n\n if (!plugins.length) return undefined;\n\n let result = plugins[0]();\n plugins.slice(1).forEach((plugin) => {\n result = plugin(result);\n });\n return result;\n }\n registerSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index === -1) { this.subscriptions.push(subscription); }\n }\n unregisterSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index !== -1) { this.subscriptions.splice(this.subscriptions.indexOf(subscription), 1); }\n }\n broadcast(event, message) {\n this.subscriptions.forEach(subscription => subscription[event] && subscription[event](message));\n }\n}\n","export class EventEmitter {\n constructor() {\n this.handlers = [];\n }\n emit(e) {\n this.handlers.forEach(handler => handler(e));\n }\n subscribe(handler) {\n this.handlers.push(handler);\n }\n unsubscribe(handler) {\n this.handlers.splice(this.handlers.indexOf(handler), 1);\n }\n}\n","export function shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n const hasOwn = Object.prototype.hasOwnProperty;\n for (let i = 0; i < keysA.length; i += 1) {\n if (!hasOwn.call(objB, keysA[i]) ||\n objA[keysA[i]] !== objB[keysA[i]]) {\n return false;\n }\n\n const valA = objA[keysA[i]];\n const valB = objB[keysA[i]];\n\n if (valA !== valLine truncated
|
||||
Generated
Vendored
+9
-9
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Bundle of @devexpress/dx-core
|
||||
* Generated: 2017-11-10
|
||||
* Version: 1.0.0-beta.1
|
||||
* Generated: 2018-03-02
|
||||
* Version: 1.0.3
|
||||
* License: https://js.devexpress.com/Licensing
|
||||
*/
|
||||
|
||||
@@ -192,22 +192,22 @@ var PluginHost = function () {
|
||||
this.plugins.filter(function (plugin) {
|
||||
return plugin.container;
|
||||
}).forEach(function (plugin) {
|
||||
if (knownOptionals.has(plugin.pluginName)) {
|
||||
throw getDependencyError(knownOptionals.get(plugin.pluginName), plugin.pluginName);
|
||||
if (knownOptionals.has(plugin.name)) {
|
||||
throw getDependencyError(knownOptionals.get(plugin.name), plugin.name);
|
||||
}
|
||||
|
||||
plugin.dependencies.forEach(function (dependency) {
|
||||
if (defined.has(dependency.pluginName)) return;
|
||||
if (defined.has(dependency.name)) return;
|
||||
if (dependency.optional) {
|
||||
if (!knownOptionals.has(dependency.pluginName)) {
|
||||
knownOptionals.set(dependency.pluginName, plugin.pluginName);
|
||||
if (!knownOptionals.has(dependency.name)) {
|
||||
knownOptionals.set(dependency.name, plugin.name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
throw getDependencyError(plugin.pluginName, dependency.pluginName);
|
||||
throw getDependencyError(plugin.name, dependency.name);
|
||||
});
|
||||
|
||||
defined.add(plugin.pluginName);
|
||||
defined.add(plugin.name);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"dx-core.umd.js","sources":["../src/utils.js","../src/plugin-host.js","../src/event-emitter.js","../src/shallow-equal.js","../src/memoize.js","../src/easings.js"],"sourcesContent":["const compare = (a, b) => {\n const aPosition = a.position();\n const bPosition = b.position();\n for (let i = 0; i < Math.min(aPosition.length, bPosition.length); i += 1) {\n if (aPosition[i] < bPosition[i]) return -1;\n if (aPosition[i] > bPosition[i]) return 1;\n }\n return aPosition.length - bPosition.length;\n};\n\nexport const insertPlugin = (array, newItem) => {\n const result = array.slice();\n const targetIndex = array.findIndex(item => compare(newItem, item) < 0);\n result.splice(targetIndex < 0 ? array.length : targetIndex, 0, newItem);\n return result;\n};\n","import { insertPlugin } from './utils';\n\nconst getDependencyError = (pluginName, dependencyName) =>\n new Error(`The '${pluginName}' plugin requires '${dependencyName}' to be defined before it.`);\n\nexport class PluginHost {\n constructor() {\n this.plugins = [];\n this.subscriptions = [];\n this.gettersCache = {};\n }\n ensureDependencies() {\n const defined = new Set();\n const knownOptionals = new Map();\n this.plugins\n .filter(plugin => plugin.container)\n .forEach((plugin) => {\n if (knownOptionals.has(plugin.pluginName)) {\n throw (getDependencyError(knownOptionals.get(plugin.pluginName), plugin.pluginName));\n }\n\n plugin.dependencies\n .forEach((dependency) => {\n if (defined.has(dependency.pluginName)) return;\n if (dependency.optional) {\n if (!knownOptionals.has(dependency.pluginName)) {\n knownOptionals.set(dependency.pluginName, plugin.pluginName);\n }\n return;\n }\n throw (getDependencyError(plugin.pluginName, dependency.pluginName));\n });\n\n defined.add(plugin.pluginName);\n });\n }\n registerPlugin(plugin) {\n this.plugins = insertPlugin(this.plugins, plugin);\n this.cleanPluginsCache();\n }\n unregisterPlugin(plugin) {\n this.plugins.splice(this.plugins.indexOf(plugin), 1);\n this.cleanPluginsCache();\n }\n cleanPluginsCache() {\n this.validationRequired = true;\n this.gettersCache = {};\n this.knownKeysCache = {};\n }\n knownKeys(postfix) {\n if (!this.knownKeysCache[postfix]) {\n this.knownKeysCache[postfix] = Array.from(this.plugins\n .map(plugin => Object.keys(plugin))\n .map(keys => keys.filter(key => key.endsWith(postfix))[0])\n .filter(key => !!key)\n .reduce((acc, key) => acc.add(key), new Set()))\n .map(key => key.replace(postfix, ''));\n }\n return this.knownKeysCache[postfix];\n }\n collect(key, upTo) {\n if (this.validationRequired) {\n this.ensureDependencies();\n this.validationRequired = false;\n }\n\n if (!this.gettersCache[key]) {\n this.gettersCache[key] = this.plugins.map(plugin => plugin[key]).filter(plugin => !!plugin);\n }\n if (!upTo) return this.gettersCache[key];\n\n const upToIndex = this.plugins.indexOf(upTo);\n return this.gettersCache[key].filter((getter) => {\n const pluginIndex = this.plugins.findIndex(plugin => plugin[key] === getter);\n return pluginIndex < upToIndex;\n });\n }\n get(key, upTo) {\n const plugins = this.collect(key, upTo);\n\n if (!plugins.length) return undefined;\n\n let result = plugins[0]();\n plugins.slice(1).forEach((plugin) => {\n result = plugin(result);\n });\n return result;\n }\n registerSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index === -1) { this.subscriptions.push(subscription); }\n }\n unregisterSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index !== -1) { this.subscriptions.splice(this.subscriptions.indexOf(subscription), 1); }\n }\n broadcast(event, message) {\n this.subscriptions.forEach(subscription => subscription[event] && subscription[event](message));\n }\n}\n","export class EventEmitter {\n constructor() {\n this.handlers = [];\n }\n emit(e) {\n this.handlers.forEach(handler => handler(e));\n }\n subscribe(handler) {\n this.handlers.push(handler);\n }\n unsubscribe(handler) {\n this.handlers.splice(this.handlers.indexOf(handler), 1);\n }\n}\n","export function shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n const hasOwn = Object.prototype.hasOwnProperty;\n for (let i = 0; i < keysA.length; i += 1) {\n if (!hasOwn.call(objB, keysA[i]) ||\n objA[keysA[i]] !== objB[keysA[i]]) {\n return false;\n }\n\n const valA = objA[keysA[iLine truncated
|
||||
{"version":3,"file":"dx-core.umd.js","sources":["../src/utils.js","../src/plugin-host.js","../src/event-emitter.js","../src/shallow-equal.js","../src/memoize.js","../src/easings.js"],"sourcesContent":["const compare = (a, b) => {\n const aPosition = a.position();\n const bPosition = b.position();\n for (let i = 0; i < Math.min(aPosition.length, bPosition.length); i += 1) {\n if (aPosition[i] < bPosition[i]) return -1;\n if (aPosition[i] > bPosition[i]) return 1;\n }\n return aPosition.length - bPosition.length;\n};\n\nexport const insertPlugin = (array, newItem) => {\n const result = array.slice();\n const targetIndex = array.findIndex(item => compare(newItem, item) < 0);\n result.splice(targetIndex < 0 ? array.length : targetIndex, 0, newItem);\n return result;\n};\n","import { insertPlugin } from './utils';\n\nconst getDependencyError = (pluginName, dependencyName) =>\n new Error(`The '${pluginName}' plugin requires '${dependencyName}' to be defined before it.`);\n\nexport class PluginHost {\n constructor() {\n this.plugins = [];\n this.subscriptions = [];\n this.gettersCache = {};\n }\n ensureDependencies() {\n const defined = new Set();\n const knownOptionals = new Map();\n this.plugins\n .filter(plugin => plugin.container)\n .forEach((plugin) => {\n if (knownOptionals.has(plugin.name)) {\n throw (getDependencyError(knownOptionals.get(plugin.name), plugin.name));\n }\n\n plugin.dependencies\n .forEach((dependency) => {\n if (defined.has(dependency.name)) return;\n if (dependency.optional) {\n if (!knownOptionals.has(dependency.name)) {\n knownOptionals.set(dependency.name, plugin.name);\n }\n return;\n }\n throw (getDependencyError(plugin.name, dependency.name));\n });\n\n defined.add(plugin.name);\n });\n }\n registerPlugin(plugin) {\n this.plugins = insertPlugin(this.plugins, plugin);\n this.cleanPluginsCache();\n }\n unregisterPlugin(plugin) {\n this.plugins.splice(this.plugins.indexOf(plugin), 1);\n this.cleanPluginsCache();\n }\n cleanPluginsCache() {\n this.validationRequired = true;\n this.gettersCache = {};\n this.knownKeysCache = {};\n }\n knownKeys(postfix) {\n if (!this.knownKeysCache[postfix]) {\n this.knownKeysCache[postfix] = Array.from(this.plugins\n .map(plugin => Object.keys(plugin))\n .map(keys => keys.filter(key => key.endsWith(postfix))[0])\n .filter(key => !!key)\n .reduce((acc, key) => acc.add(key), new Set()))\n .map(key => key.replace(postfix, ''));\n }\n return this.knownKeysCache[postfix];\n }\n collect(key, upTo) {\n if (this.validationRequired) {\n this.ensureDependencies();\n this.validationRequired = false;\n }\n\n if (!this.gettersCache[key]) {\n this.gettersCache[key] = this.plugins.map(plugin => plugin[key]).filter(plugin => !!plugin);\n }\n if (!upTo) return this.gettersCache[key];\n\n const upToIndex = this.plugins.indexOf(upTo);\n return this.gettersCache[key].filter((getter) => {\n const pluginIndex = this.plugins.findIndex(plugin => plugin[key] === getter);\n return pluginIndex < upToIndex;\n });\n }\n get(key, upTo) {\n const plugins = this.collect(key, upTo);\n\n if (!plugins.length) return undefined;\n\n let result = plugins[0]();\n plugins.slice(1).forEach((plugin) => {\n result = plugin(result);\n });\n return result;\n }\n registerSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index === -1) { this.subscriptions.push(subscription); }\n }\n unregisterSubscription(subscription) {\n const index = this.subscriptions.indexOf(subscription);\n if (index !== -1) { this.subscriptions.splice(this.subscriptions.indexOf(subscription), 1); }\n }\n broadcast(event, message) {\n this.subscriptions.forEach(subscription => subscription[event] && subscription[event](message));\n }\n}\n","export class EventEmitter {\n constructor() {\n this.handlers = [];\n }\n emit(e) {\n this.handlers.forEach(handler => handler(e));\n }\n subscribe(handler) {\n this.handlers.push(handler);\n }\n unsubscribe(handler) {\n this.handlers.splice(this.handlers.indexOf(handler), 1);\n }\n}\n","export function shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n const hasOwn = Object.prototype.hasOwnProperty;\n for (let i = 0; i < keysA.length; i += 1) {\n if (!hasOwn.call(objB, keysA[i]) ||\n objA[keysA[i]] !== objB[keysA[i]]) {\n return false;\n }\n\n const valA = objA[keysA[i]];\n const valB = objB[keysA[i]];\n\n if (valA !== vaLine truncated
|
||||
Generated
Vendored
+17
-17
@@ -1,28 +1,28 @@
|
||||
{
|
||||
"_from": "@devexpress/dx-core@1.0.0-beta.1",
|
||||
"_id": "@devexpress/dx-core@1.0.0-beta.1",
|
||||
"_from": "@devexpress/dx-core@1.0.3",
|
||||
"_id": "@devexpress/dx-core@1.0.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-4Kv5RTlmlK7o2DF5BB5r2yWgshvFrUSHWzJzdSyBtFxsQzvI3vJqS0Z0mAplZCyYfRk4xh9SRp6I9DML66v0EQ==",
|
||||
"_integrity": "sha512-M1Kjju074ddAQmaFuKypM/LdhCZsDISqhGj4LST2ZGQPlGpH89BMBEV8p+8MedFQQCG/svuS25AKip1Gs9KJgA==",
|
||||
"_location": "/@devexpress/dx-react-core/@devexpress/dx-core",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@devexpress/dx-core@1.0.0-beta.1",
|
||||
"raw": "@devexpress/dx-core@1.0.3",
|
||||
"name": "@devexpress/dx-core",
|
||||
"escapedName": "@devexpress%2fdx-core",
|
||||
"scope": "@devexpress",
|
||||
"rawSpec": "1.0.0-beta.1",
|
||||
"rawSpec": "1.0.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.0-beta.1"
|
||||
"fetchSpec": "1.0.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@devexpress/dx-react-core"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@devexpress/dx-core/-/dx-core-1.0.0-beta.1.tgz",
|
||||
"_shasum": "63383ec2bd3903d9a163c1316706cde32227d6b4",
|
||||
"_spec": "@devexpress/dx-core@1.0.0-beta.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core",
|
||||
"_resolved": "https://registry.npmjs.org/@devexpress/dx-core/-/dx-core-1.0.3.tgz",
|
||||
"_shasum": "c310b540229f83d6be5797fb2a5da5491757d21b",
|
||||
"_spec": "@devexpress/dx-core@1.0.3",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core",
|
||||
"author": {
|
||||
"name": "Developer Express Inc.",
|
||||
"url": "https://www.devexpress.com/"
|
||||
@@ -35,20 +35,20 @@
|
||||
"description": "Core library for DevExtreme Reactive Components",
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-jest": "^21.2.0",
|
||||
"babel-jest": "^22.1.0",
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"core-js": "^2.5.1",
|
||||
"eslint": "^4.10.0",
|
||||
"core-js": "^2.5.3",
|
||||
"eslint": "^4.16.0",
|
||||
"eslint-config-airbnb-base": "^12.1.0",
|
||||
"eslint-plugin-filenames": "^1.2.0",
|
||||
"eslint-plugin-import": "^2.8.0",
|
||||
"eslint-plugin-jest": "^21.3.0",
|
||||
"jest": "^21.2.1",
|
||||
"eslint-plugin-jest": "^21.7.0",
|
||||
"jest": "^22.1.4",
|
||||
"rollup": "0.50.0",
|
||||
"rollup-plugin-babel": "^3.0.2",
|
||||
"rollup-plugin-babel": "^3.0.3",
|
||||
"rollup-plugin-license": "^0.5.0"
|
||||
},
|
||||
"files": [
|
||||
@@ -81,5 +81,5 @@
|
||||
"test:coverage": "jest --coverage",
|
||||
"test:watch": "jest --watch"
|
||||
},
|
||||
"version": "1.0.0-beta.1"
|
||||
"version": "1.0.3"
|
||||
}
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
|
||||
"_shasum": "e50347611d7e690943208bbdafebcbc2fb866d46",
|
||||
"_spec": "asap@~2.0.3",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\promise",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\promise",
|
||||
"browser": {
|
||||
"./asap": "./browser-asap.js",
|
||||
"./asap.js": "./browser-asap.js",
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
|
||||
"_shasum": "652294c14651db28fa93bd2d5ff2983a4f08c636",
|
||||
"_spec": "core-js@^1.0.0",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\fbjs",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zloirock/core-js/issues"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
|
||||
"_shasum": "538b66f3ee62cd1ab51ec323829d1f9480c74beb",
|
||||
"_spec": "encoding@^0.1.11",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\node-fetch",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\node-fetch",
|
||||
"author": {
|
||||
"name": "Andris Reinman"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.16.tgz",
|
||||
"_shasum": "5e67432f550dc41b572bf55847b8aca64e5337db",
|
||||
"_spec": "fbjs@^0.8.16",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\prop-types",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\prop-types",
|
||||
"browserify": {
|
||||
"transform": [
|
||||
"loose-envify"
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
|
||||
"_shasum": "f7468f60135f5e5dad3399c0a81be9a1603a082b",
|
||||
"_spec": "iconv-lite@~0.4.13",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\encoding",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\encoding",
|
||||
"author": {
|
||||
"name": "Alexander Shtuchkin",
|
||||
"email": "ashtuchkin@gmail.com"
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
||||
"_shasum": "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44",
|
||||
"_spec": "is-stream@^1.0.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\node-fetch",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\node-fetch",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz",
|
||||
"_shasum": "611ae1acf14f5e81f729507472819fe9733558a9",
|
||||
"_spec": "isomorphic-fetch@^2.1.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\fbjs",
|
||||
"author": {
|
||||
"name": "Matt Andrews",
|
||||
"email": "matt@mattandre.ws"
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||
"_shasum": "9866df395102130e38f7f996bceb65443209c25b",
|
||||
"_spec": "js-tokens@^3.0.0",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\loose-envify",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\loose-envify",
|
||||
"author": {
|
||||
"name": "Simon Lydell"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -22,7 +22,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
|
||||
"_shasum": "d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848",
|
||||
"_spec": "loose-envify@^1.3.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\prop-types",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\prop-types",
|
||||
"author": {
|
||||
"name": "Andres Suarez",
|
||||
"email": "zertosh@gmail.com"
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
|
||||
"_shasum": "980f6f72d85211a5347c6b2bc18c5b84c3eb47ef",
|
||||
"_spec": "node-fetch@^1.0.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\isomorphic-fetch",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\isomorphic-fetch",
|
||||
"author": {
|
||||
"name": "David Frank"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -22,7 +22,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"_shasum": "2109adc7965887cfc05cbbd442cac8bfbb360863",
|
||||
"_spec": "object-assign@^4.1.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\prop-types",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\prop-types",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
|
||||
"_shasum": "064b72602b18f90f29192b8b1bc418ffd1ebd3bf",
|
||||
"_spec": "promise@^7.1.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\fbjs",
|
||||
"author": {
|
||||
"name": "ForbesLindesay"
|
||||
},
|
||||
|
||||
Generated
Vendored
+20
-4
@@ -20,16 +20,32 @@ import PropTypes from 'prop-types'; // ES6
|
||||
var PropTypes = require('prop-types'); // ES5 with npm
|
||||
```
|
||||
|
||||
If you prefer a `<script>` tag, you can get it from `window.PropTypes` global:
|
||||
### CDN
|
||||
|
||||
If you prefer to exclude `prop-types` from your application and use it
|
||||
globally via `window.PropTypes`, the `prop-types` package provides
|
||||
single-file distributions, which are hosted on the following CDNs:
|
||||
|
||||
* [**unpkg**](https://unpkg.com/prop-types/)
|
||||
```html
|
||||
<!-- development version -->
|
||||
<script src="https://unpkg.com/prop-types/prop-types.js"></script>
|
||||
<script src="https://unpkg.com/prop-types@15.6/prop-types.js"></script>
|
||||
|
||||
<!-- production version -->
|
||||
<script src="https://unpkg.com/prop-types/prop-types.min.js"></script>
|
||||
<script src="https://unpkg.com/prop-types@15.6/prop-types.min.js"></script>
|
||||
```
|
||||
|
||||
* [**cdnjs**](https://cdnjs.com/libraries/prop-types)
|
||||
```html
|
||||
<!-- development version -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.0/prop-types.js"></script>
|
||||
|
||||
<!-- production version -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.0/prop-types.min.js"></script>
|
||||
```
|
||||
|
||||
To load a specific version of `prop-types` replace `15.6.0` with the version number.
|
||||
|
||||
## Usage
|
||||
|
||||
PropTypes was originally exposed as part of the React core module, and is
|
||||
@@ -232,7 +248,7 @@ See below for more info.
|
||||
|
||||
**You might also see this error** if you’re calling a `PropTypes` validator from your own custom `PropTypes` validator. In this case, the fix is to make sure that you are passing *all* of the arguments to the inner function. There is a more in-depth explanation of how to fix it [on this page](https://facebook.github.io/react/warnings/dont-call-proptypes.html#fixing-the-false-positive-in-third-party-proptypes). Alternatively, you can temporarily keep using `React.PropTypes` until React 16, as it would still only warn in this case.
|
||||
|
||||
If you use a bundler like Browserify or Webpack, don’t forget to [follow these instructions](https://facebook.github.io/react/docs/installation.html#development-and-production-versions) to correctly bundle your application in development or production mode. Otherwise you’ll ship unnecessary code to your users.
|
||||
If you use a bundler like Browserify or Webpack, don’t forget to [follow these instructions](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build) to correctly bundle your application in development or production mode. Otherwise you’ll ship unnecessary code to your users.
|
||||
|
||||
## PropTypes.checkPropTypes
|
||||
|
||||
|
||||
Generated
Vendored
+8
-8
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"_from": "prop-types@^15.6.0",
|
||||
"_id": "prop-types@15.6.0",
|
||||
"_id": "prop-types@15.6.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=",
|
||||
"_integrity": "sha512-4ec7bY1Y66LymSUOH/zARVYObB23AT2h8cf6e/O6ZALB/N0sqZFEx7rq6EYPX2MkOdKORuooI/H5k9TlR4q7kQ==",
|
||||
"_location": "/@devexpress/dx-react-core/prop-types",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
@@ -18,17 +18,17 @@
|
||||
"_requiredBy": [
|
||||
"/@devexpress/dx-react-core"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz",
|
||||
"_shasum": "ceaf083022fc46b4a35f69e13ef75aed0d639856",
|
||||
"_resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.1.tgz",
|
||||
"_shasum": "36644453564255ddda391191fb3a125cbdf654ca",
|
||||
"_spec": "prop-types@^15.6.0",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core",
|
||||
"browserify": {
|
||||
"transform": [
|
||||
"loose-envify"
|
||||
]
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/reactjs/prop-types/issues"
|
||||
"url": "https://github.com/facebook/prop-types/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
@@ -70,7 +70,7 @@
|
||||
"name": "prop-types",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/reactjs/prop-types.git"
|
||||
"url": "git+https://github.com/facebook/prop-types.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn umd && yarn umd-min",
|
||||
@@ -79,5 +79,5 @@
|
||||
"umd": "NODE_ENV=development browserify index.js -t envify --standalone PropTypes -o prop-types.js",
|
||||
"umd-min": "NODE_ENV=production browserify index.js -t envify -t uglifyify --standalone PropTypes -p bundle-collapser/plugin -o | uglifyjs --compress unused,dead_code -o prop-types.min.js"
|
||||
},
|
||||
"version": "15.6.0"
|
||||
"version": "15.6.1"
|
||||
}
|
||||
Generated
Vendored
+42
-50
@@ -712,11 +712,9 @@ module.exports = ReactPropTypesSecret;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
*
|
||||
*/
|
||||
@@ -749,11 +747,9 @@ module.exports = emptyFunction;
|
||||
},{}],7:[function(require,module,exports){
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -804,12 +800,10 @@ function invariant(condition, format, a, b, c, d, e, f) {
|
||||
module.exports = invariant;
|
||||
},{}],8:[function(require,module,exports){
|
||||
/**
|
||||
* Copyright 2014-2015, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -827,45 +821,43 @@ var emptyFunction = require('./emptyFunction');
|
||||
var warning = emptyFunction;
|
||||
|
||||
if ("development" !== 'production') {
|
||||
(function () {
|
||||
var printWarning = function printWarning(format) {
|
||||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
var printWarning = function printWarning(format) {
|
||||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
}
|
||||
|
||||
var argIndex = 0;
|
||||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||||
return args[argIndex++];
|
||||
});
|
||||
if (typeof console !== 'undefined') {
|
||||
console.error(message);
|
||||
}
|
||||
try {
|
||||
// --- Welcome to debugging React ---
|
||||
// This error was thrown as a convenience so that you can use this stack
|
||||
// to find the callsite that caused this warning to fire.
|
||||
throw new Error(message);
|
||||
} catch (x) {}
|
||||
};
|
||||
|
||||
warning = function warning(condition, format) {
|
||||
if (format === undefined) {
|
||||
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
||||
}
|
||||
|
||||
if (format.indexOf('Failed Composite propType: ') === 0) {
|
||||
return; // Ignore CompositeComponent proptype check.
|
||||
}
|
||||
|
||||
if (!condition) {
|
||||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 2] = arguments[_key2];
|
||||
}
|
||||
|
||||
var argIndex = 0;
|
||||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||||
return args[argIndex++];
|
||||
});
|
||||
if (typeof console !== 'undefined') {
|
||||
console.error(message);
|
||||
}
|
||||
try {
|
||||
// --- Welcome to debugging React ---
|
||||
// This error was thrown as a convenience so that you can use this stack
|
||||
// to find the callsite that caused this warning to fire.
|
||||
throw new Error(message);
|
||||
} catch (x) {}
|
||||
};
|
||||
|
||||
warning = function warning(condition, format) {
|
||||
if (format === undefined) {
|
||||
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
||||
}
|
||||
|
||||
if (format.indexOf('Failed Composite propType: ') === 0) {
|
||||
return; // Ignore CompositeComponent proptype check.
|
||||
}
|
||||
|
||||
if (!condition) {
|
||||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 2] = arguments[_key2];
|
||||
}
|
||||
|
||||
printWarning.apply(undefined, [format].concat(args));
|
||||
}
|
||||
};
|
||||
})();
|
||||
printWarning.apply(undefined, [format].concat(args));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = warning;
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
|
||||
"_shasum": "290cbb232e306942d7d7ea9b83732ab7856f8285",
|
||||
"_spec": "setimmediate@^1.0.5",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\fbjs",
|
||||
"author": {
|
||||
"name": "YuzuJS"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz",
|
||||
"_shasum": "e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac",
|
||||
"_spec": "ua-parser-js@^0.7.9",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\fbjs",
|
||||
"author": {
|
||||
"name": "Faisal Salman",
|
||||
"email": "f@faisalman.com",
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz",
|
||||
"_shasum": "9c84ec2dcf68187ff00bc64e1274b442176e1c84",
|
||||
"_spec": "whatwg-fetch@>=0.10.0",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-core\\node_modules\\isomorphic-fetch",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-core\\node_modules\\isomorphic-fetch",
|
||||
"bugs": {
|
||||
"url": "https://github.com/github/fetch/issues"
|
||||
},
|
||||
|
||||
+29
-23
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"_from": "@devexpress/dx-react-core",
|
||||
"_id": "@devexpress/dx-react-core@1.0.0-beta.1",
|
||||
"_id": "@devexpress/dx-react-core@1.0.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-GIJ3ztuR7ldJtxX7RbMqjFXYrMvPLpQn39Zepa6RMv8lWBwDW58dTGPVYsnL2iABu8YALyEPIg/UW3aakz6tEA==",
|
||||
"_integrity": "sha512-3cHeltRoFIwP/4Bu1cF3r+jSfRgYWwSFPJ+qy0U5sYSm4GhC1Ij/1dBM7GDYKI8OowSGIEoWYni4Ktmb1C4iTA==",
|
||||
"_location": "/@devexpress/dx-react-core",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
@@ -19,10 +19,10 @@
|
||||
"_requiredBy": [
|
||||
"#USER"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@devexpress/dx-react-core/-/dx-react-core-1.0.0-beta.1.tgz",
|
||||
"_shasum": "7f44d4162d429aa55fca9c18407561841dac92a4",
|
||||
"_resolved": "https://registry.npmjs.org/@devexpress/dx-react-core/-/dx-react-core-1.0.3.tgz",
|
||||
"_shasum": "362194fe6a86dd2addf493894df9dbf17a466ee5",
|
||||
"_spec": "@devexpress/dx-react-core",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI",
|
||||
"author": {
|
||||
"name": "Developer Express Inc.",
|
||||
"url": "https://www.devexpress.com/"
|
||||
@@ -32,43 +32,49 @@
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"@devexpress/dx-core": "1.0.0-beta.1",
|
||||
"@devexpress/dx-core": "1.0.3",
|
||||
"prop-types": "^15.6.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Core library for DevExtreme React Components",
|
||||
"devDependencies": {
|
||||
"@devexpress/dx-testing": "1.0.0-beta.1",
|
||||
"@devexpress/dx-testing": "1.0.3",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-jest": "^21.2.0",
|
||||
"babel-jest": "^22.1.0",
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"core-js": "^2.5.1",
|
||||
"enzyme": "^2.9.1",
|
||||
"eslint": "^4.10.0",
|
||||
"core-js": "^2.5.3",
|
||||
"enzyme": "^3.3.0",
|
||||
"enzyme-adapter-react-16": "^1.1.1",
|
||||
"eslint": "^4.16.0",
|
||||
"eslint-config-airbnb": "^16.1.0",
|
||||
"eslint-plugin-filenames": "^1.2.0",
|
||||
"eslint-plugin-import": "^2.8.0",
|
||||
"eslint-plugin-jest": "^21.3.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.0.2",
|
||||
"eslint-plugin-react": "^7.4.0",
|
||||
"jest": "^21.2.1",
|
||||
"react": "^15.6.1",
|
||||
"react-dom": "^15.6.1",
|
||||
"react-test-renderer": "^15.6.1",
|
||||
"eslint-plugin-jest": "^21.7.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.0.3",
|
||||
"eslint-plugin-react": "^7.6.1",
|
||||
"jest": "^22.1.4",
|
||||
"react": "^16.2.0",
|
||||
"react-dom": "^16.2.0",
|
||||
"react-test-renderer": "^16.2.0",
|
||||
"rollup": "0.50.0",
|
||||
"rollup-plugin-babel": "^3.0.2",
|
||||
"rollup-plugin-babel": "^3.0.3",
|
||||
"rollup-plugin-license": "^0.5.0",
|
||||
"rollup-plugin-node-resolve": "^3.0.0"
|
||||
"rollup-plugin-node-resolve": "^3.0.2"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"globalName": "DevExpress.DXReactCore",
|
||||
"homepage": "https://devexpress.github.io/devextreme-reactive/",
|
||||
"jest": {
|
||||
"setupFiles": [
|
||||
"<rootDir>/setup-enzyme.js"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"react",
|
||||
"component",
|
||||
@@ -79,8 +85,8 @@
|
||||
"module": "dist/dx-react-core.es.js",
|
||||
"name": "@devexpress/dx-react-core",
|
||||
"peerDependencies": {
|
||||
"react": "^15.6.1 || ^16.0.0",
|
||||
"react-dom": "^15.6.1 || ^16.0.0"
|
||||
"react": "^16.2.0",
|
||||
"react-dom": "^16.2.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@@ -98,5 +104,5 @@
|
||||
"test:coverage": "jest --coverage",
|
||||
"test:watch": "jest --watch"
|
||||
},
|
||||
"version": "1.0.0-beta.1"
|
||||
"version": "1.0.3"
|
||||
}
|
||||
+19
-16
@@ -12,9 +12,9 @@ npm i --save @devexpress/dx-react-core @devexpress/dx-react-grid @devexpress/dx-
|
||||
|
||||
Add the required modules to your project:
|
||||
|
||||
```js
|
||||
```jsx
|
||||
import {
|
||||
Grid, TableView, TableHeaderRow
|
||||
Grid, Table, TableHeaderRow
|
||||
} from '@devexpress/dx-react-grid-material-ui';
|
||||
|
||||
const App = () => (
|
||||
@@ -28,7 +28,7 @@ const App = () => (
|
||||
{ name: 'product', title: 'Product' },
|
||||
{ name: 'owner', title: 'Owner' },
|
||||
]}>
|
||||
<TableView />
|
||||
<Table />
|
||||
<TableHeaderRow />
|
||||
</Grid>
|
||||
);
|
||||
@@ -44,28 +44,31 @@ See [demos](https://devexpress.github.io/devextreme-reactive/react/grid/demos/)
|
||||
|
||||
## Reference
|
||||
|
||||
The package exposes components and plugins with injected templates.
|
||||
The package exposes components and plugins with injected template components.
|
||||
|
||||
Components:
|
||||
|
||||
- [Grid](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/grid/)
|
||||
- [ColumnChooser](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/column-chooser/)
|
||||
|
||||
Plugins:
|
||||
|
||||
- [TableView](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-view/)
|
||||
- [TableHeaderRow](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-header-row/)
|
||||
- [TableSelection](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-selection/)
|
||||
- [TableFilterRow](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-filter-row/)
|
||||
- [TableRowDetail](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-row-detail/)
|
||||
- [TableGroupRow](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-group-row/)
|
||||
- [TableColumnVisibility](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-column-visibility/)
|
||||
- [TableColumnReordering](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-column-reordering/)
|
||||
- [DragDropProvider](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/drag-drop-provider/)
|
||||
- [GroupingPanel](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/grouping-panel/)
|
||||
- [ColumnChooser](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/column-chooser/)
|
||||
- [PagingPanel](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/paging-panel/)
|
||||
- [DragDropContext](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/drag-drop-context/)
|
||||
|
||||
The templates are defined via properties that end with the 'Template' postfix which accept a rendering function. Assign a custom function to the required property to override the default rendering function. The custom function should return `undefined` if you need to invoke the default behavior under certain conditions.
|
||||
- [Table](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table/)
|
||||
- [TableColumnResizing](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-column-resizing/)
|
||||
- [TableColumnReordering](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-column-reordering/)
|
||||
- [TableColumnVisibility](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-column-visibility/)
|
||||
- [TableEditColumn](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-edit-column/)
|
||||
- [TableEditRow](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-edit-row/)
|
||||
- [TableFilterRow](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-filter-row/)
|
||||
- [TableGroupRow](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-group-row/)
|
||||
- [TableHeaderRow](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-header-row/)
|
||||
- [TableRowDetail](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-row-detail/)
|
||||
- [TableSelection](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/table-selection/)
|
||||
- [Toolbar](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/toolbar/)
|
||||
- [VirtualTable](https://devexpress.github.io/devextreme-reactive/react/grid/docs/reference/virtual-table/)
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Generated
Vendored
+1024
-1056
File diff suppressed because it is too large.
Load diff
Generated
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"dx-react-grid-material-ui.cjs.js","sources":["../src/templates/layout.jsx","../src/grid.jsx","../src/templates/column-chooser-container.jsx","../src/templates/column-chooser-item.jsx","../src/column-chooser.jsx","../src/templates/drag-drop.jsx","../src/plugins/drag-drop-context.jsx","../src/templates/page-size-selector.jsx","../src/templates/pagination.jsx","../src/templates/pager.jsx","../src/plugins/paging-panel.jsx","../src/templates/group-panel.jsx","../src/templates/group-panel-item.jsx","../src/plugins/grouping-panel.jsx","../src/templates/table-detail-toggle-cell.jsx","../src/templates/table-detail-cell.jsx","../src/templates/table-row.jsx","../src/plugins/table-row-detail.jsx","../src/templates/table-group-row-cell.jsx","../src/plugins/table-group-row.jsx","../src/templates/table-select-all-cell.jsx","../src/templates/table-select-cell.jsx","../src/templates/table-select-row.jsx","../src/plugins/table-selection.jsx","../src/templates/table-container.jsx","../src/templates/table.jsx","../src/templates/table-layout.jsx","../src/templates/table-cell.jsx","../src/templates/table-stub-cell.jsx","../src/templates/table-no-data-cell.jsx","../src/plugins/table-view.jsx","../src/templates/virtual-table-layout.jsx","../src/plugins/virtual-table-view.jsx","../src/templates/table-filter-cell.jsx","../src/plugins/table-filter-row.jsx","../src/templates/table-header-cell/grouping-control.jsx","../src/templates/table-header-cell/resizing-control.jsx","../src/templates/table-header-cell/sorting-control.jsx","../src/templates/table-header-cell.jsx","../src/plugins/table-header-row.jsx","../src/templates/table-edit-command-cell.jsx","../src/plugins/table-edit-column.jsx","../src/templates/table-edit-cell.jsx","../src/plugins/table-edit-row.jsx","../src/templates/empty-message.jsx","../src/plugins/table-column-visibility.jsx","../src/templates/table-reordering-cell.jsx","../src/plugins/table-column-reordering.jsx","../src/plugins/table-column-resizing.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from 'material-ui/styles';\nimport { Paper } from 'material-ui';\n\nconst styles = theme => ({\n headingPanel: {\n paddingLeft: '12px',\n paddingRight: '12px',\n paddingTop: '12px',\n borderBottom: `1px solid ${theme.palette.text.lightDivider}`,\n },\n footerPanel: {\n padding: '12px',\n },\n});\n\nexport const Root = ({\n headerTemplate,\n bodyTemplate,\n footerTemplate,\n}) => (\n <Paper>\n {headerTemplate()}\n {bodyTemplate()}\n {footerTemplate()}\n </Paper>\n);\n\nRoot.propTypes = {\n headerTemplate: PropTypes.func.isRequired,\n bodyTemplate: PropTypes.func.isRequired,\n footerTemplate: PropTypes.func.isRequired,\n};\n\nconst HeaderBase = ({ children, classes }) =>\n children && <div className={classes.headingPanel}>{children}</div>;\n\nHeaderBase.propTypes = {\n children: PropTypes.node,\n classes: PropTypes.object.isRequired,\n};\n\nHeaderBase.defaultProps = {\n children: null,\n};\n\nexport const Header = withStyles(styles, { name: 'GridLayout' })(HeaderBase);\n\nconst FooterBase = ({ children, classes }) =>\n children && <div className={classes.footerPanel}>{children}</div>;\n\nFooterBase.propTypes = {\n children: PropTypes.node,\n classes: PropTypes.object.isRequired,\n};\n\nFooterBase.defaultProps = {\n children: null,\n};\n\nexport const Footer = withStyles(styles, { name: 'GridLayout' })(FooterBase);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Grid as GridBase } from '@devexpress/dx-react-grid';\nimport { Root, Header, Footer } from './templates/layout';\n\nconst rootTemplate = props => <Root {...props} />;\nconst headerPlaceholderTemplate = props => <Header {...props} />;\nconst footerPlaceholderTemplate = props => <Footer {...props} />;\n\nexport const Grid = ({ children, ...props }) => (\n <GridBase\n rootTemplate={rootTemplate}\n headerPlaceholderTemplate={headerPlaceholderTemplate}\n footerPlaceholderTemplate={footerPlaceholderTemplate}\n {...props}\n >\n {children}\n </GridBase>\n);\n\nGrid.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]).isRequired,\n};\n\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport List from 'material-ui/List';\n\nexport const ColumnChooserContainer = ({ children }) => (\n <List dense>\n {children}\n </List>\n);\n\nColumnChooserContainer.propTypes = {\n children: PropTypes.arrayOf(PropTypes.node).isRequired,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { ListItem, ListItemText } from 'material-ui/List';\nimport Checkbox from 'material-ui/Checkbox';\n\nexport const ColumnChooserItem = ({ item: { column, hidden }, onToggle }) => {\n const handleClick = () => onToggle();\n return (\n <ListItem\n key={column.name}\n button\n onClick={handleClick}\n >\n Line truncated
|
||||
{"version":3,"file":"dx-react-grid-material-ui.cjs.js","sources":["../src/templates/layout.jsx","../src/grid.jsx","../src/templates/column-chooser/overlay.jsx","../src/templates/column-chooser/container.jsx","../src/templates/column-chooser/toggle-button.jsx","../src/templates/column-chooser/item.jsx","../src/plugins/column-chooser.jsx","../src/templates/drag-drop.jsx","../src/plugins/drag-drop-provider.jsx","../src/templates/paging-panel/page-size-selector.jsx","../src/templates/paging-panel/pagination.jsx","../src/templates/utils.jsx","../src/templates/paging-panel/pager.jsx","../src/plugins/paging-panel.jsx","../src/templates/group-panel-container.jsx","../src/templates/group-panel-item.jsx","../src/templates/group-panel-empty-message.jsx","../src/plugins/grouping-panel.jsx","../src/templates/table-detail-toggle-cell.jsx","../src/templates/table-detail-cell.jsx","../src/templates/table-row.jsx","../src/plugins/table-row-detail.jsx","../src/templates/table-group-row-cell.jsx","../src/plugins/table-group-row.jsx","../src/templates/table-select-all-cell.jsx","../src/templates/table-select-cell.jsx","../src/templates/table-select-row.jsx","../src/plugins/table-selection.jsx","../src/templates/table-container.jsx","../src/templates/table.jsx","../src/templates/table-layout.jsx","../src/templates/table-cell.jsx","../src/templates/table-stub-cell.jsx","../src/templates/table-no-data-cell.jsx","../src/plugins/table.jsx","../src/templates/virtual-table-layout.jsx","../src/plugins/virtual-table.jsx","../src/templates/table-filter-cell.jsx","../src/plugins/table-filter-row.jsx","../src/templates/table-header-cell/grouping-control.jsx","../src/templates/table-header-cell/resizing-control.jsx","../src/templates/table-header-cell/sorting-control.jsx","../src/templates/table-header-cell.jsx","../src/plugins/table-header-row.jsx","../src/templates/table-edit-command-cell.jsx","../src/plugins/table-edit-column.jsx","../src/templates/table-edit-cell.jsx","../src/plugins/table-edit-row.jsx","../src/templates/empty-message.jsx","../src/plugins/table-column-visibility.jsx","../src/templates/table-reordering-cell.jsx","../src/plugins/table-column-reordering.jsx","../src/plugins/table-column-resizing.jsx","../src/templates/toolbar/toolbar.jsx","../src/templates/toolbar/flexible-space.jsx","../src/plugins/toolbar.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport const Root = ({ children, ...restProps }) => (\n <div {...restProps}>{children}</div>\n);\n\nRoot.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.node,\n PropTypes.arrayOf(PropTypes.node),\n ]),\n};\n\nRoot.defaultProps = {\n children: undefined,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Grid as GridBase } from '@devexpress/dx-react-grid';\nimport { Root } from './templates/layout';\n\nexport const Grid = ({ children, ...props }) => (\n <GridBase\n rootComponent={Root}\n {...props}\n >\n {children}\n </GridBase>\n);\n\nGrid.Root = Root;\n\nGrid.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]).isRequired,\n};\n\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Popover from 'material-ui/Popover';\n\nexport const Overlay = ({\n visible, onHide,\n children, target,\n ...restProps\n}) => (\n <Popover\n open={visible}\n anchorEl={target}\n onClose={onHide}\n anchorOrigin={{ vertical: 'top', horizontal: 'right' }}\n transformOrigin={{ vertical: 'top', horizontal: 'right' }}\n {...restProps}\n >\n {children}\n </Popover>\n);\n\nOverlay.propTypes = {\n onHide: PropTypes.func.isRequired,\n children: PropTypes.node.isRequired,\n visible: PropTypes.bool,\n target: PropTypes.object,\n};\n\nOverlay.defaultProps = {\n visible: false,\n target: null,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport List from 'material-ui/List';\n\nexport const Container = ({ children, ...restProps }) => (\n <List\n dense\n {...restProps}\n >\n {children}\n </List>\n);\n\nContainer.propTypes = {\n children: PropTypes.array.isRequired,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport IconButton from 'material-ui/IconButton';\nimport Tooltip from 'material-ui/Tooltip';\nimport VisibilityOff from 'material-ui-icons/VisibilityOff';\n\nexport const ToggleButton = ({\n onToggle,\n getMessage,\n buttonRef,\n ...restProps\n}) => (\n <Tooltip\n title={getMessage('showColumnChooser')}\n placement=\"bottom\"\n enterDelay={300}\n {...restProps}\n >\n <IconButton\n onClick={onToggle}\n buttonRef={buttonRef}\n >\n <VisibilityOff />\n </IconButton>\n </Tooltip>\n);\n\nToggleButton.propTypes = {\n onToggle: PropTypes.func.isRequired,\n getMessage: PropTypes.func.isRequired,\n buttonRef: PropTypes.func.isRequired,\n};\n","import React from 'react';\nimportLine truncated
|
||||
Generated
Vendored
+997
-1031
File diff suppressed because it is too large.
Load diff
Generated
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"dx-react-grid-material-ui.es.js","sources":["../src/templates/layout.jsx","../src/grid.jsx","../src/templates/column-chooser-container.jsx","../src/templates/column-chooser-item.jsx","../src/column-chooser.jsx","../src/templates/drag-drop.jsx","../src/plugins/drag-drop-context.jsx","../src/templates/page-size-selector.jsx","../src/templates/pagination.jsx","../src/templates/pager.jsx","../src/plugins/paging-panel.jsx","../src/templates/group-panel.jsx","../src/templates/group-panel-item.jsx","../src/plugins/grouping-panel.jsx","../src/templates/table-detail-toggle-cell.jsx","../src/templates/table-detail-cell.jsx","../src/templates/table-row.jsx","../src/plugins/table-row-detail.jsx","../src/templates/table-group-row-cell.jsx","../src/plugins/table-group-row.jsx","../src/templates/table-select-all-cell.jsx","../src/templates/table-select-cell.jsx","../src/templates/table-select-row.jsx","../src/plugins/table-selection.jsx","../src/templates/table-container.jsx","../src/templates/table.jsx","../src/templates/table-layout.jsx","../src/templates/table-cell.jsx","../src/templates/table-stub-cell.jsx","../src/templates/table-no-data-cell.jsx","../src/plugins/table-view.jsx","../src/templates/virtual-table-layout.jsx","../src/plugins/virtual-table-view.jsx","../src/templates/table-filter-cell.jsx","../src/plugins/table-filter-row.jsx","../src/templates/table-header-cell/grouping-control.jsx","../src/templates/table-header-cell/resizing-control.jsx","../src/templates/table-header-cell/sorting-control.jsx","../src/templates/table-header-cell.jsx","../src/plugins/table-header-row.jsx","../src/templates/table-edit-command-cell.jsx","../src/plugins/table-edit-column.jsx","../src/templates/table-edit-cell.jsx","../src/plugins/table-edit-row.jsx","../src/templates/empty-message.jsx","../src/plugins/table-column-visibility.jsx","../src/templates/table-reordering-cell.jsx","../src/plugins/table-column-reordering.jsx","../src/plugins/table-column-resizing.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from 'material-ui/styles';\nimport { Paper } from 'material-ui';\n\nconst styles = theme => ({\n headingPanel: {\n paddingLeft: '12px',\n paddingRight: '12px',\n paddingTop: '12px',\n borderBottom: `1px solid ${theme.palette.text.lightDivider}`,\n },\n footerPanel: {\n padding: '12px',\n },\n});\n\nexport const Root = ({\n headerTemplate,\n bodyTemplate,\n footerTemplate,\n}) => (\n <Paper>\n {headerTemplate()}\n {bodyTemplate()}\n {footerTemplate()}\n </Paper>\n);\n\nRoot.propTypes = {\n headerTemplate: PropTypes.func.isRequired,\n bodyTemplate: PropTypes.func.isRequired,\n footerTemplate: PropTypes.func.isRequired,\n};\n\nconst HeaderBase = ({ children, classes }) =>\n children && <div className={classes.headingPanel}>{children}</div>;\n\nHeaderBase.propTypes = {\n children: PropTypes.node,\n classes: PropTypes.object.isRequired,\n};\n\nHeaderBase.defaultProps = {\n children: null,\n};\n\nexport const Header = withStyles(styles, { name: 'GridLayout' })(HeaderBase);\n\nconst FooterBase = ({ children, classes }) =>\n children && <div className={classes.footerPanel}>{children}</div>;\n\nFooterBase.propTypes = {\n children: PropTypes.node,\n classes: PropTypes.object.isRequired,\n};\n\nFooterBase.defaultProps = {\n children: null,\n};\n\nexport const Footer = withStyles(styles, { name: 'GridLayout' })(FooterBase);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Grid as GridBase } from '@devexpress/dx-react-grid';\nimport { Root, Header, Footer } from './templates/layout';\n\nconst rootTemplate = props => <Root {...props} />;\nconst headerPlaceholderTemplate = props => <Header {...props} />;\nconst footerPlaceholderTemplate = props => <Footer {...props} />;\n\nexport const Grid = ({ children, ...props }) => (\n <GridBase\n rootTemplate={rootTemplate}\n headerPlaceholderTemplate={headerPlaceholderTemplate}\n footerPlaceholderTemplate={footerPlaceholderTemplate}\n {...props}\n >\n {children}\n </GridBase>\n);\n\nGrid.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]).isRequired,\n};\n\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport List from 'material-ui/List';\n\nexport const ColumnChooserContainer = ({ children }) => (\n <List dense>\n {children}\n </List>\n);\n\nColumnChooserContainer.propTypes = {\n children: PropTypes.arrayOf(PropTypes.node).isRequired,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { ListItem, ListItemText } from 'material-ui/List';\nimport Checkbox from 'material-ui/Checkbox';\n\nexport const ColumnChooserItem = ({ item: { column, hidden }, onToggle }) => {\n const handleClick = () => onToggle();\n return (\n <ListItem\n key={column.name}\n button\n onClick={handleClick}\n >\n Line truncated
|
||||
{"version":3,"file":"dx-react-grid-material-ui.es.js","sources":["../src/templates/layout.jsx","../src/grid.jsx","../src/templates/column-chooser/overlay.jsx","../src/templates/column-chooser/container.jsx","../src/templates/column-chooser/toggle-button.jsx","../src/templates/column-chooser/item.jsx","../src/plugins/column-chooser.jsx","../src/templates/drag-drop.jsx","../src/plugins/drag-drop-provider.jsx","../src/templates/paging-panel/page-size-selector.jsx","../src/templates/paging-panel/pagination.jsx","../src/templates/utils.jsx","../src/templates/paging-panel/pager.jsx","../src/plugins/paging-panel.jsx","../src/templates/group-panel-container.jsx","../src/templates/group-panel-item.jsx","../src/templates/group-panel-empty-message.jsx","../src/plugins/grouping-panel.jsx","../src/templates/table-detail-toggle-cell.jsx","../src/templates/table-detail-cell.jsx","../src/templates/table-row.jsx","../src/plugins/table-row-detail.jsx","../src/templates/table-group-row-cell.jsx","../src/plugins/table-group-row.jsx","../src/templates/table-select-all-cell.jsx","../src/templates/table-select-cell.jsx","../src/templates/table-select-row.jsx","../src/plugins/table-selection.jsx","../src/templates/table-container.jsx","../src/templates/table.jsx","../src/templates/table-layout.jsx","../src/templates/table-cell.jsx","../src/templates/table-stub-cell.jsx","../src/templates/table-no-data-cell.jsx","../src/plugins/table.jsx","../src/templates/virtual-table-layout.jsx","../src/plugins/virtual-table.jsx","../src/templates/table-filter-cell.jsx","../src/plugins/table-filter-row.jsx","../src/templates/table-header-cell/grouping-control.jsx","../src/templates/table-header-cell/resizing-control.jsx","../src/templates/table-header-cell/sorting-control.jsx","../src/templates/table-header-cell.jsx","../src/plugins/table-header-row.jsx","../src/templates/table-edit-command-cell.jsx","../src/plugins/table-edit-column.jsx","../src/templates/table-edit-cell.jsx","../src/plugins/table-edit-row.jsx","../src/templates/empty-message.jsx","../src/plugins/table-column-visibility.jsx","../src/templates/table-reordering-cell.jsx","../src/plugins/table-column-reordering.jsx","../src/plugins/table-column-resizing.jsx","../src/templates/toolbar/toolbar.jsx","../src/templates/toolbar/flexible-space.jsx","../src/plugins/toolbar.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport const Root = ({ children, ...restProps }) => (\n <div {...restProps}>{children}</div>\n);\n\nRoot.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.node,\n PropTypes.arrayOf(PropTypes.node),\n ]),\n};\n\nRoot.defaultProps = {\n children: undefined,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Grid as GridBase } from '@devexpress/dx-react-grid';\nimport { Root } from './templates/layout';\n\nexport const Grid = ({ children, ...props }) => (\n <GridBase\n rootComponent={Root}\n {...props}\n >\n {children}\n </GridBase>\n);\n\nGrid.Root = Root;\n\nGrid.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]).isRequired,\n};\n\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Popover from 'material-ui/Popover';\n\nexport const Overlay = ({\n visible, onHide,\n children, target,\n ...restProps\n}) => (\n <Popover\n open={visible}\n anchorEl={target}\n onClose={onHide}\n anchorOrigin={{ vertical: 'top', horizontal: 'right' }}\n transformOrigin={{ vertical: 'top', horizontal: 'right' }}\n {...restProps}\n >\n {children}\n </Popover>\n);\n\nOverlay.propTypes = {\n onHide: PropTypes.func.isRequired,\n children: PropTypes.node.isRequired,\n visible: PropTypes.bool,\n target: PropTypes.object,\n};\n\nOverlay.defaultProps = {\n visible: false,\n target: null,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport List from 'material-ui/List';\n\nexport const Container = ({ children, ...restProps }) => (\n <List\n dense\n {...restProps}\n >\n {children}\n </List>\n);\n\nContainer.propTypes = {\n children: PropTypes.array.isRequired,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport IconButton from 'material-ui/IconButton';\nimport Tooltip from 'material-ui/Tooltip';\nimport VisibilityOff from 'material-ui-icons/VisibilityOff';\n\nexport const ToggleButton = ({\n onToggle,\n getMessage,\n buttonRef,\n ...restProps\n}) => (\n <Tooltip\n title={getMessage('showColumnChooser')}\n placement=\"bottom\"\n enterDelay={300}\n {...restProps}\n >\n <IconButton\n onClick={onToggle}\n buttonRef={buttonRef}\n >\n <VisibilityOff />\n </IconButton>\n </Tooltip>\n);\n\nToggleButton.propTypes = {\n onToggle: PropTypes.func.isRequired,\n getMessage: PropTypes.func.isRequired,\n buttonRef: PropTypes.func.isRequired,\n};\n","import React from 'react';\nimport Line truncated
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
|
||||
"_shasum": "e50347611d7e690943208bbdafebcbc2fb866d46",
|
||||
"_spec": "asap@~2.0.3",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\promise",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\promise",
|
||||
"browser": {
|
||||
"./asap": "./browser-asap.js",
|
||||
"./asap.js": "./browser-asap.js",
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.5.tgz",
|
||||
"_shasum": "fb3801d453467649ef3603c7d61a02bd129bde6d",
|
||||
"_spec": "classnames@^2.2.5",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui",
|
||||
"author": {
|
||||
"name": "Jed Watson"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
|
||||
"_shasum": "652294c14651db28fa93bd2d5ff2983a4f08c636",
|
||||
"_spec": "core-js@^1.0.0",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\fbjs",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zloirock/core-js/issues"
|
||||
},
|
||||
|
||||
goTorrentWebUI/node_modules/@devexpress/dx-react-grid-material-ui/node_modules/encoding/package.json
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
|
||||
"_shasum": "538b66f3ee62cd1ab51ec323829d1f9480c74beb",
|
||||
"_spec": "encoding@^0.1.11",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\node-fetch",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\node-fetch",
|
||||
"author": {
|
||||
"name": "Andris Reinman"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.16.tgz",
|
||||
"_shasum": "5e67432f550dc41b572bf55847b8aca64e5337db",
|
||||
"_spec": "fbjs@^0.8.16",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\prop-types",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\prop-types",
|
||||
"browserify": {
|
||||
"transform": [
|
||||
"loose-envify"
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
|
||||
"_shasum": "f7468f60135f5e5dad3399c0a81be9a1603a082b",
|
||||
"_spec": "iconv-lite@~0.4.13",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\encoding",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\encoding",
|
||||
"author": {
|
||||
"name": "Alexander Shtuchkin",
|
||||
"email": "ashtuchkin@gmail.com"
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
||||
"_shasum": "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44",
|
||||
"_spec": "is-stream@^1.0.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\node-fetch",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\node-fetch",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz",
|
||||
"_shasum": "611ae1acf14f5e81f729507472819fe9733558a9",
|
||||
"_spec": "isomorphic-fetch@^2.1.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\fbjs",
|
||||
"author": {
|
||||
"name": "Matt Andrews",
|
||||
"email": "matt@mattandre.ws"
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||
"_shasum": "9866df395102130e38f7f996bceb65443209c25b",
|
||||
"_spec": "js-tokens@^3.0.0",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\loose-envify",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\loose-envify",
|
||||
"author": {
|
||||
"name": "Simon Lydell"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -22,7 +22,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
|
||||
"_shasum": "d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848",
|
||||
"_spec": "loose-envify@^1.3.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\prop-types",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\prop-types",
|
||||
"author": {
|
||||
"name": "Andres Suarez",
|
||||
"email": "zertosh@gmail.com"
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
|
||||
"_shasum": "980f6f72d85211a5347c6b2bc18c5b84c3eb47ef",
|
||||
"_spec": "node-fetch@^1.0.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\isomorphic-fetch",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\isomorphic-fetch",
|
||||
"author": {
|
||||
"name": "David Frank"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -22,7 +22,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"_shasum": "2109adc7965887cfc05cbbd442cac8bfbb360863",
|
||||
"_spec": "object-assign@^4.1.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\prop-types",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\prop-types",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
|
||||
"_shasum": "064b72602b18f90f29192b8b1bc418ffd1ebd3bf",
|
||||
"_spec": "promise@^7.1.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\fbjs",
|
||||
"author": {
|
||||
"name": "ForbesLindesay"
|
||||
},
|
||||
|
||||
Generated
Vendored
+20
-4
@@ -20,16 +20,32 @@ import PropTypes from 'prop-types'; // ES6
|
||||
var PropTypes = require('prop-types'); // ES5 with npm
|
||||
```
|
||||
|
||||
If you prefer a `<script>` tag, you can get it from `window.PropTypes` global:
|
||||
### CDN
|
||||
|
||||
If you prefer to exclude `prop-types` from your application and use it
|
||||
globally via `window.PropTypes`, the `prop-types` package provides
|
||||
single-file distributions, which are hosted on the following CDNs:
|
||||
|
||||
* [**unpkg**](https://unpkg.com/prop-types/)
|
||||
```html
|
||||
<!-- development version -->
|
||||
<script src="https://unpkg.com/prop-types/prop-types.js"></script>
|
||||
<script src="https://unpkg.com/prop-types@15.6/prop-types.js"></script>
|
||||
|
||||
<!-- production version -->
|
||||
<script src="https://unpkg.com/prop-types/prop-types.min.js"></script>
|
||||
<script src="https://unpkg.com/prop-types@15.6/prop-types.min.js"></script>
|
||||
```
|
||||
|
||||
* [**cdnjs**](https://cdnjs.com/libraries/prop-types)
|
||||
```html
|
||||
<!-- development version -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.0/prop-types.js"></script>
|
||||
|
||||
<!-- production version -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.0/prop-types.min.js"></script>
|
||||
```
|
||||
|
||||
To load a specific version of `prop-types` replace `15.6.0` with the version number.
|
||||
|
||||
## Usage
|
||||
|
||||
PropTypes was originally exposed as part of the React core module, and is
|
||||
@@ -232,7 +248,7 @@ See below for more info.
|
||||
|
||||
**You might also see this error** if you’re calling a `PropTypes` validator from your own custom `PropTypes` validator. In this case, the fix is to make sure that you are passing *all* of the arguments to the inner function. There is a more in-depth explanation of how to fix it [on this page](https://facebook.github.io/react/warnings/dont-call-proptypes.html#fixing-the-false-positive-in-third-party-proptypes). Alternatively, you can temporarily keep using `React.PropTypes` until React 16, as it would still only warn in this case.
|
||||
|
||||
If you use a bundler like Browserify or Webpack, don’t forget to [follow these instructions](https://facebook.github.io/react/docs/installation.html#development-and-production-versions) to correctly bundle your application in development or production mode. Otherwise you’ll ship unnecessary code to your users.
|
||||
If you use a bundler like Browserify or Webpack, don’t forget to [follow these instructions](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build) to correctly bundle your application in development or production mode. Otherwise you’ll ship unnecessary code to your users.
|
||||
|
||||
## PropTypes.checkPropTypes
|
||||
|
||||
|
||||
Generated
Vendored
+8
-8
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"_from": "prop-types@^15.6.0",
|
||||
"_id": "prop-types@15.6.0",
|
||||
"_id": "prop-types@15.6.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=",
|
||||
"_integrity": "sha512-4ec7bY1Y66LymSUOH/zARVYObB23AT2h8cf6e/O6ZALB/N0sqZFEx7rq6EYPX2MkOdKORuooI/H5k9TlR4q7kQ==",
|
||||
"_location": "/@devexpress/dx-react-grid-material-ui/prop-types",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
@@ -18,17 +18,17 @@
|
||||
"_requiredBy": [
|
||||
"/@devexpress/dx-react-grid-material-ui"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz",
|
||||
"_shasum": "ceaf083022fc46b4a35f69e13ef75aed0d639856",
|
||||
"_resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.1.tgz",
|
||||
"_shasum": "36644453564255ddda391191fb3a125cbdf654ca",
|
||||
"_spec": "prop-types@^15.6.0",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui",
|
||||
"browserify": {
|
||||
"transform": [
|
||||
"loose-envify"
|
||||
]
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/reactjs/prop-types/issues"
|
||||
"url": "https://github.com/facebook/prop-types/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
@@ -70,7 +70,7 @@
|
||||
"name": "prop-types",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/reactjs/prop-types.git"
|
||||
"url": "git+https://github.com/facebook/prop-types.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn umd && yarn umd-min",
|
||||
@@ -79,5 +79,5 @@
|
||||
"umd": "NODE_ENV=development browserify index.js -t envify --standalone PropTypes -o prop-types.js",
|
||||
"umd-min": "NODE_ENV=production browserify index.js -t envify -t uglifyify --standalone PropTypes -p bundle-collapser/plugin -o | uglifyjs --compress unused,dead_code -o prop-types.min.js"
|
||||
},
|
||||
"version": "15.6.0"
|
||||
"version": "15.6.1"
|
||||
}
|
||||
Generated
Vendored
+42
-50
@@ -712,11 +712,9 @@ module.exports = ReactPropTypesSecret;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
*
|
||||
*/
|
||||
@@ -749,11 +747,9 @@ module.exports = emptyFunction;
|
||||
},{}],7:[function(require,module,exports){
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -804,12 +800,10 @@ function invariant(condition, format, a, b, c, d, e, f) {
|
||||
module.exports = invariant;
|
||||
},{}],8:[function(require,module,exports){
|
||||
/**
|
||||
* Copyright 2014-2015, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -827,45 +821,43 @@ var emptyFunction = require('./emptyFunction');
|
||||
var warning = emptyFunction;
|
||||
|
||||
if ("development" !== 'production') {
|
||||
(function () {
|
||||
var printWarning = function printWarning(format) {
|
||||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
var printWarning = function printWarning(format) {
|
||||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
}
|
||||
|
||||
var argIndex = 0;
|
||||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||||
return args[argIndex++];
|
||||
});
|
||||
if (typeof console !== 'undefined') {
|
||||
console.error(message);
|
||||
}
|
||||
try {
|
||||
// --- Welcome to debugging React ---
|
||||
// This error was thrown as a convenience so that you can use this stack
|
||||
// to find the callsite that caused this warning to fire.
|
||||
throw new Error(message);
|
||||
} catch (x) {}
|
||||
};
|
||||
|
||||
warning = function warning(condition, format) {
|
||||
if (format === undefined) {
|
||||
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
||||
}
|
||||
|
||||
if (format.indexOf('Failed Composite propType: ') === 0) {
|
||||
return; // Ignore CompositeComponent proptype check.
|
||||
}
|
||||
|
||||
if (!condition) {
|
||||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 2] = arguments[_key2];
|
||||
}
|
||||
|
||||
var argIndex = 0;
|
||||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||||
return args[argIndex++];
|
||||
});
|
||||
if (typeof console !== 'undefined') {
|
||||
console.error(message);
|
||||
}
|
||||
try {
|
||||
// --- Welcome to debugging React ---
|
||||
// This error was thrown as a convenience so that you can use this stack
|
||||
// to find the callsite that caused this warning to fire.
|
||||
throw new Error(message);
|
||||
} catch (x) {}
|
||||
};
|
||||
|
||||
warning = function warning(condition, format) {
|
||||
if (format === undefined) {
|
||||
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
||||
}
|
||||
|
||||
if (format.indexOf('Failed Composite propType: ') === 0) {
|
||||
return; // Ignore CompositeComponent proptype check.
|
||||
}
|
||||
|
||||
if (!condition) {
|
||||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 2] = arguments[_key2];
|
||||
}
|
||||
|
||||
printWarning.apply(undefined, [format].concat(args));
|
||||
}
|
||||
};
|
||||
})();
|
||||
printWarning.apply(undefined, [format].concat(args));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = warning;
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
|
||||
"_shasum": "290cbb232e306942d7d7ea9b83732ab7856f8285",
|
||||
"_spec": "setimmediate@^1.0.5",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\fbjs",
|
||||
"author": {
|
||||
"name": "YuzuJS"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz",
|
||||
"_shasum": "e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac",
|
||||
"_spec": "ua-parser-js@^0.7.9",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\fbjs",
|
||||
"author": {
|
||||
"name": "Faisal Salman",
|
||||
"email": "f@faisalman.com",
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz",
|
||||
"_shasum": "9c84ec2dcf68187ff00bc64e1274b442176e1c84",
|
||||
"_spec": "whatwg-fetch@>=0.10.0",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\isomorphic-fetch",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid-material-ui\\node_modules\\isomorphic-fetch",
|
||||
"bugs": {
|
||||
"url": "https://github.com/github/fetch/issues"
|
||||
},
|
||||
|
||||
+35
-34
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"_from": "@devexpress/dx-react-grid-material-ui",
|
||||
"_id": "@devexpress/dx-react-grid-material-ui@1.0.0-beta.1",
|
||||
"_id": "@devexpress/dx-react-grid-material-ui@1.0.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-6KIBi2FYGsmBjTcRFi03C8U1ijCivIBUoVrM2MwsjRXD2tedUZ3DsHtpb5KZK4s2eOBYt9I8ZEAVnrvieWjDyQ==",
|
||||
"_integrity": "sha512-na/nxtsWLEpIWuPagCl78uxq7LGZzokl/XqXFOfMBogFvbuuzkaJ5Z3cfMTwKnCUqBFmgRnaAdTPMnmYoH0tOw==",
|
||||
"_location": "/@devexpress/dx-react-grid-material-ui",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
@@ -19,10 +19,10 @@
|
||||
"_requiredBy": [
|
||||
"#USER"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@devexpress/dx-react-grid-material-ui/-/dx-react-grid-material-ui-1.0.0-beta.1.tgz",
|
||||
"_shasum": "437b63a3ccd1ab5cb3f4fa82d0608d754afbef8a",
|
||||
"_resolved": "https://registry.npmjs.org/@devexpress/dx-react-grid-material-ui/-/dx-react-grid-material-ui-1.0.3.tgz",
|
||||
"_shasum": "c0844349c6b2ad5d2fdca7faf87f3cc56ad61121",
|
||||
"_spec": "@devexpress/dx-react-grid-material-ui",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI",
|
||||
"author": {
|
||||
"name": "Developer Express Inc.",
|
||||
"url": "https://www.devexpress.com/"
|
||||
@@ -38,40 +38,41 @@
|
||||
"deprecated": false,
|
||||
"description": "Material UI templates for DevExtreme React Grid component",
|
||||
"devDependencies": {
|
||||
"@devexpress/dx-grid-core": "1.0.0-beta.1",
|
||||
"@devexpress/dx-react-core": "1.0.0-beta.1",
|
||||
"@devexpress/dx-react-grid": "1.0.0-beta.1",
|
||||
"@devexpress/dx-testing": "1.0.0-beta.1",
|
||||
"@devexpress/dx-grid-core": "1.0.3",
|
||||
"@devexpress/dx-react-core": "1.0.3",
|
||||
"@devexpress/dx-react-grid": "1.0.3",
|
||||
"@devexpress/dx-testing": "1.0.3",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-jest": "^21.2.0",
|
||||
"babel-jest": "^22.1.0",
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"core-js": "^2.5.1",
|
||||
"enzyme": "^2.9.1",
|
||||
"eslint": "^4.10.0",
|
||||
"core-js": "^2.5.3",
|
||||
"enzyme": "^3.3.0",
|
||||
"enzyme-adapter-react-16": "^1.1.1",
|
||||
"eslint": "^4.16.0",
|
||||
"eslint-config-airbnb": "^16.1.0",
|
||||
"eslint-config-airbnb-base": "^12.1.0",
|
||||
"eslint-plugin-filenames": "^1.2.0",
|
||||
"eslint-plugin-import": "^2.8.0",
|
||||
"eslint-plugin-jest": "^21.3.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.0.2",
|
||||
"eslint-plugin-react": "^7.4.0",
|
||||
"jest": "^21.2.1",
|
||||
"jss": "^9.2.0",
|
||||
"jss-preset-default": "^4.0.1",
|
||||
"eslint-plugin-jest": "^21.7.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.0.3",
|
||||
"eslint-plugin-react": "^7.6.1",
|
||||
"jest": "^22.1.4",
|
||||
"jss": "^9.6.0",
|
||||
"jss-preset-default": "^4.1.0",
|
||||
"jss-theme-reactor": "^0.11.1",
|
||||
"material-ui": "1.0.0-beta.20",
|
||||
"material-ui-icons": "1.0.0-beta.17",
|
||||
"react": "^15.6.1",
|
||||
"react-dom": "^15.6.1",
|
||||
"react-test-renderer": "^15.6.1",
|
||||
"material-ui": "1.0.0-beta.35",
|
||||
"material-ui-icons": "1.0.0-beta.35",
|
||||
"react": "^16.2.0",
|
||||
"react-dom": "^16.2.0",
|
||||
"react-test-renderer": "^16.2.0",
|
||||
"rollup": "0.50.0",
|
||||
"rollup-plugin-babel": "^3.0.2",
|
||||
"rollup-plugin-babel": "^3.0.3",
|
||||
"rollup-plugin-license": "^0.5.0",
|
||||
"rollup-plugin-node-resolve": "^3.0.0"
|
||||
"rollup-plugin-node-resolve": "^3.0.2"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
@@ -80,7 +81,7 @@
|
||||
"homepage": "https://devexpress.github.io/devextreme-reactive/",
|
||||
"jest": {
|
||||
"setupFiles": [
|
||||
"<rootDir>/setup.js"
|
||||
"<rootDir>/setup-enzyme.js"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
@@ -96,12 +97,12 @@
|
||||
"module": "dist/dx-react-grid-material-ui.es.js",
|
||||
"name": "@devexpress/dx-react-grid-material-ui",
|
||||
"peerDependencies": {
|
||||
"@devexpress/dx-grid-core": "1.0.0-beta.1",
|
||||
"@devexpress/dx-react-core": "1.0.0-beta.1",
|
||||
"@devexpress/dx-react-grid": "1.0.0-beta.1",
|
||||
"material-ui": "1.0.0-beta.20",
|
||||
"material-ui-icons": "1.0.0-beta.17",
|
||||
"react": "^15.6.1 || ^16.0.0"
|
||||
"@devexpress/dx-grid-core": "1.0.3",
|
||||
"@devexpress/dx-react-core": "1.0.3",
|
||||
"@devexpress/dx-react-grid": "1.0.3",
|
||||
"material-ui": "1.0.0-beta.35",
|
||||
"material-ui-icons": "1.0.0-beta.35",
|
||||
"react": "^16.2.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@@ -119,5 +120,5 @@
|
||||
"test:coverage": "jest --coverage",
|
||||
"test:watch": "jest --watch"
|
||||
},
|
||||
"version": "1.0.0-beta.1"
|
||||
"version": "1.0.3"
|
||||
}
|
||||
+6
-6
@@ -40,11 +40,11 @@ React Grid uses the latest web platform standards. Thus, it cannot support older
|
||||
|
||||
The Grid renders nothing by default. The root Grid component's nested plugin components implement its functionality, and it is necessary to specify at least one plugin that visualizes the grid data.
|
||||
|
||||
Use the TableView plugin to display the data as a simple table:
|
||||
Use the Table plugin to display the data as a simple table:
|
||||
|
||||
```js
|
||||
```jsx
|
||||
import {
|
||||
Grid, TableView, TableHeaderRow
|
||||
Grid, Table, TableHeaderRow
|
||||
} from '@devexpress/dx-react-grid-bootstrap3'/* or '@devexpress/dx-react-grid-material-ui' */;
|
||||
|
||||
const App = () => (
|
||||
@@ -58,7 +58,7 @@ const App = () => (
|
||||
{ name: 'product', title: 'Product' },
|
||||
{ name: 'owner', title: 'Owner' },
|
||||
]}>
|
||||
<TableView />
|
||||
<Table />
|
||||
<TableHeaderRow />
|
||||
</Grid>
|
||||
);
|
||||
@@ -68,8 +68,8 @@ const App = () => (
|
||||
|
||||
Follow the links below to try out the React Grid:
|
||||
|
||||
- [WebpackBin for Bootstrap3](https://www.webpackbin.com/bins/-KoCcFwPPtps5fEN0PkI)
|
||||
- [WebpackBin for Material UI](https://www.webpackbin.com/bins/-KoCeS-_jZrZuTecv-wd)
|
||||
- [CodeSandbox for Bootstrap3](https://codesandbox.io/s/7o46mkowx)
|
||||
- [CodeSandbox for Material UI](https://codesandbox.io/s/13qvz1qqzl)
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
+1772
-1895
File diff suppressed because it is too large.
Load diff
Generated
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"dx-react-grid.es.js","sources":["../src/plugins/grid-core.jsx","../src/grid.jsx","../src/column-chooser.jsx","../src/plugins/filtering-state.jsx","../src/plugins/local-filtering.jsx","../src/plugins/editing-state.jsx","../src/plugins/paging-state.jsx","../src/plugins/local-paging.jsx","../src/plugins/grouping-state.jsx","../src/plugins/local-grouping.jsx","../src/plugins/custom-grouping.jsx","../src/plugins/selection-state.jsx","../src/plugins/sorting-state.jsx","../src/plugins/local-sorting.jsx","../src/plugins/drag-drop-context.jsx","../src/plugins/table-column-reordering.jsx","../src/plugins/table-view.jsx","../src/plugins/table-selection.jsx","../src/plugins/row-detail-state.jsx","../src/plugins/table-row-detail.jsx","../src/plugins/table-group-row.jsx","../src/plugins/table-header-row.jsx","../src/plugins/table-filter-row.jsx","../src/plugins/table-edit-row.jsx","../src/plugins/table-edit-column.jsx","../src/plugins/table-column-resizing.jsx","../src/plugins/paging-panel.jsx","../src/plugins/grouping-panel.jsx","../src/plugins/data-type-provider.jsx","../src/plugins/table-column-visibility.jsx","../src/components/table-layout.jsx","../src/components/table-layout/column-group.jsx","../src/components/table-layout/row-layout.jsx","../src/components/table-layout/virtual-table-utils.js","../src/components/table-layout/virtual-table-layout.jsx","../src/components/table-layout/rows-block-layout.jsx","../src/components/table-layout/static-table-layout.jsx","../src/components/group-panel-layout.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { PluginContainer, Getter, Template, TemplatePlaceholder } from '@devexpress/dx-react-core';\nimport { rowIdGetter, cellValueGetter } from '@devexpress/dx-grid-core';\n\nexport class GridCore extends React.PureComponent {\n render() {\n const {\n rows,\n columns,\n getRowId,\n getCellValue,\n rootTemplate,\n headerPlaceholderTemplate,\n footerPlaceholderTemplate,\n } = this.props;\n\n return (\n <PluginContainer>\n <Getter name=\"rows\" value={rows} />\n <Getter name=\"getRowId\" value={rowIdGetter(getRowId, rows)} />\n <Getter name=\"columns\" value={columns} />\n <Getter name=\"getCellValue\" value={cellValueGetter(getCellValue, columns)} />\n <Template name=\"header\" />\n <Template name=\"body\" />\n <Template name=\"footer\" />\n <Template name=\"root\">\n {() => rootTemplate({\n headerTemplate: () => (\n <TemplatePlaceholder name=\"header\">\n {content => (headerPlaceholderTemplate\n ? headerPlaceholderTemplate({ children: content })\n : content)}\n </TemplatePlaceholder>\n ),\n bodyTemplate: () => <TemplatePlaceholder name=\"body\" />,\n footerTemplate: () => (\n <TemplatePlaceholder name=\"footer\">\n {content => (footerPlaceholderTemplate\n ? footerPlaceholderTemplate({ children: content })\n : content)}\n </TemplatePlaceholder>\n ),\n })}\n </Template>\n </PluginContainer>\n );\n }\n}\n\nGridCore.propTypes = {\n rows: PropTypes.array.isRequired,\n getRowId: PropTypes.func,\n getCellValue: PropTypes.func,\n columns: PropTypes.array.isRequired,\n rootTemplate: PropTypes.func.isRequired,\n headerPlaceholderTemplate: PropTypes.func,\n footerPlaceholderTemplate: PropTypes.func,\n};\n\nGridCore.defaultProps = {\n getRowId: null,\n getCellValue: null,\n headerPlaceholderTemplate: null,\n footerPlaceholderTemplate: null,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { PluginHost } from '@devexpress/dx-react-core';\nimport { GridCore } from './plugins/grid-core';\n\nexport const Grid = ({\n rows,\n columns,\n getRowId,\n getCellValue,\n rootTemplate,\n headerPlaceholderTemplate,\n footerPlaceholderTemplate,\n children,\n}) => (\n <PluginHost>\n <GridCore\n rows={rows}\n columns={columns}\n getRowId={getRowId}\n getCellValue={getCellValue}\n rootTemplate={rootTemplate}\n headerPlaceholderTemplate={headerPlaceholderTemplate}\n footerPlaceholderTemplate={footerPlaceholderTemplate}\n />\n {children}\n </PluginHost>\n);\n\nGrid.propTypes = {\n rows: PropTypes.array.isRequired,\n getRowId: PropTypes.func,\n getCellValue: PropTypes.func,\n columns: PropTypes.array.isRequired,\n rootTemplate: PropTypes.func.isRequired,\n headerPlaceholderTemplate: PropTypes.func,\n footerPlaceholderTemplate: PropTypes.func,\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]),\n};\n\nGrid.defaultProps = {\n getRowId: null,\n getCellValue: null,\n headerPlaceholderTemplate: null,\n footerPlaceholderTemplate: null,\n children: null,\nLine truncated
|
||||
{"version":3,"file":"dx-react-grid.es.js","sources":["../src/plugins/grid-core.jsx","../src/grid.jsx","../src/plugins/column-chooser.jsx","../src/utils/state-helper.js","../src/plugins/filtering-state.jsx","../src/plugins/integrated-filtering.jsx","../src/plugins/editing-state.jsx","../src/plugins/paging-state.jsx","../src/plugins/integrated-paging.jsx","../src/plugins/custom-paging.jsx","../src/plugins/grouping-state.jsx","../src/plugins/integrated-grouping.jsx","../src/plugins/custom-grouping.jsx","../src/plugins/selection-state.jsx","../src/plugins/integrated-selection.jsx","../src/plugins/sorting-state.jsx","../src/plugins/integrated-sorting.jsx","../src/plugins/drag-drop-provider.jsx","../src/plugins/table-column-reordering.jsx","../src/plugins/table.jsx","../src/plugins/table-selection.jsx","../src/plugins/row-detail-state.jsx","../src/plugins/table-row-detail.jsx","../src/plugins/table-group-row.jsx","../src/plugins/table-header-row.jsx","../src/plugins/table-filter-row.jsx","../src/plugins/table-edit-row.jsx","../src/plugins/table-edit-column.jsx","../src/plugins/table-column-resizing.jsx","../src/plugins/paging-panel.jsx","../src/plugins/grouping-panel.jsx","../src/plugins/data-type-provider.jsx","../src/plugins/table-column-visibility.jsx","../src/components/table-layout.jsx","../src/components/table-layout/column-group.jsx","../src/components/table-layout/row-layout.jsx","../src/components/table-layout/virtual-table-utils.js","../src/components/table-layout/virtual-table-layout.jsx","../src/components/table-layout/rows-block-layout.jsx","../src/components/table-layout/static-table-layout.jsx","../src/components/group-panel-layout/item-layout.jsx","../src/components/group-panel-layout.jsx","../src/plugins/toolbar.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Plugin, Getter, Template, TemplatePlaceholder } from '@devexpress/dx-react-core';\nimport { rowIdGetter, cellValueGetter } from '@devexpress/dx-grid-core';\n\nexport class GridCore extends React.PureComponent {\n render() {\n const {\n rows,\n columns,\n getRowId,\n getCellValue,\n rootComponent: Root,\n } = this.props;\n\n return (\n <Plugin>\n <Getter name=\"rows\" value={rows} />\n <Getter name=\"getRowId\" value={rowIdGetter(getRowId, rows)} />\n <Getter name=\"columns\" value={columns} />\n <Getter name=\"getCellValue\" value={cellValueGetter(getCellValue, columns)} />\n <Template name=\"header\" />\n <Template name=\"body\" />\n <Template name=\"footer\" />\n <Template name=\"root\">\n <Root>\n <TemplatePlaceholder name=\"header\" />\n <TemplatePlaceholder name=\"body\" />\n <TemplatePlaceholder name=\"footer\" />\n </Root>\n </Template>\n </Plugin>\n );\n }\n}\n\nGridCore.propTypes = {\n rows: PropTypes.array.isRequired,\n getRowId: PropTypes.func,\n getCellValue: PropTypes.func,\n columns: PropTypes.array.isRequired,\n rootComponent: PropTypes.func.isRequired,\n};\n\nGridCore.defaultProps = {\n getRowId: undefined,\n getCellValue: undefined,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { PluginHost } from '@devexpress/dx-react-core';\nimport { GridCore } from './plugins/grid-core';\n\nexport const Grid = ({\n rows,\n columns,\n getRowId,\n getCellValue,\n rootComponent,\n children,\n}) => (\n <PluginHost>\n <GridCore\n rows={rows}\n columns={columns}\n getRowId={getRowId}\n getCellValue={getCellValue}\n rootComponent={rootComponent}\n />\n {children}\n </PluginHost>\n);\n\nGrid.propTypes = {\n rows: PropTypes.array.isRequired,\n getRowId: PropTypes.func,\n getCellValue: PropTypes.func,\n columns: PropTypes.array.isRequired,\n rootComponent: PropTypes.func.isRequired,\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]),\n};\n\nGrid.defaultProps = {\n getRowId: undefined,\n getCellValue: undefined,\n children: undefined,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n Template, TemplatePlaceholder, Plugin, TemplateConnector,\n} from '@devexpress/dx-react-core';\n\nimport { getMessagesFormatter, columnChooserItems } from '@devexpress/dx-grid-core';\n\nconst pluginDependencies = [\n { name: 'TableColumnVisibility' },\n { name: 'Toolbar' },\n];\nexport class ColumnChooser extends React.PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n visible: false,\n };\n\n this.handleToggle = this.handleToggle.bind(this);\n this.handleHide = this.handleHide.bind(this);\n this.buttonRef = this.buttonRef.bind(this);\n }\n buttonRef(button) {\n this.button = button;\n }\n handleToggle() {\n this.setState({ visible: !this.state.visible });\n }\n handleHide() {\n this.setState({ visible: false });\n }\n Line truncated
|
||||
+1778
-1898
File diff suppressed because it is too large.
Load diff
Generated
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"dx-react-grid.umd.js","sources":["../src/plugins/grid-core.jsx","../src/grid.jsx","../src/column-chooser.jsx","../src/plugins/filtering-state.jsx","../src/plugins/local-filtering.jsx","../src/plugins/editing-state.jsx","../src/plugins/paging-state.jsx","../src/plugins/local-paging.jsx","../src/plugins/grouping-state.jsx","../src/plugins/local-grouping.jsx","../src/plugins/custom-grouping.jsx","../src/plugins/selection-state.jsx","../src/plugins/sorting-state.jsx","../src/plugins/local-sorting.jsx","../src/plugins/drag-drop-context.jsx","../src/plugins/table-column-reordering.jsx","../src/plugins/table-view.jsx","../src/plugins/table-selection.jsx","../src/plugins/row-detail-state.jsx","../src/plugins/table-row-detail.jsx","../src/plugins/table-group-row.jsx","../src/plugins/table-header-row.jsx","../src/plugins/table-filter-row.jsx","../src/plugins/table-edit-row.jsx","../src/plugins/table-edit-column.jsx","../src/plugins/table-column-resizing.jsx","../src/plugins/paging-panel.jsx","../src/plugins/grouping-panel.jsx","../src/plugins/data-type-provider.jsx","../src/plugins/table-column-visibility.jsx","../src/components/table-layout.jsx","../src/components/table-layout/column-group.jsx","../src/components/table-layout/row-layout.jsx","../src/components/table-layout/virtual-table-utils.js","../src/components/table-layout/virtual-table-layout.jsx","../src/components/table-layout/rows-block-layout.jsx","../src/components/table-layout/static-table-layout.jsx","../src/components/group-panel-layout.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { PluginContainer, Getter, Template, TemplatePlaceholder } from '@devexpress/dx-react-core';\nimport { rowIdGetter, cellValueGetter } from '@devexpress/dx-grid-core';\n\nexport class GridCore extends React.PureComponent {\n render() {\n const {\n rows,\n columns,\n getRowId,\n getCellValue,\n rootTemplate,\n headerPlaceholderTemplate,\n footerPlaceholderTemplate,\n } = this.props;\n\n return (\n <PluginContainer>\n <Getter name=\"rows\" value={rows} />\n <Getter name=\"getRowId\" value={rowIdGetter(getRowId, rows)} />\n <Getter name=\"columns\" value={columns} />\n <Getter name=\"getCellValue\" value={cellValueGetter(getCellValue, columns)} />\n <Template name=\"header\" />\n <Template name=\"body\" />\n <Template name=\"footer\" />\n <Template name=\"root\">\n {() => rootTemplate({\n headerTemplate: () => (\n <TemplatePlaceholder name=\"header\">\n {content => (headerPlaceholderTemplate\n ? headerPlaceholderTemplate({ children: content })\n : content)}\n </TemplatePlaceholder>\n ),\n bodyTemplate: () => <TemplatePlaceholder name=\"body\" />,\n footerTemplate: () => (\n <TemplatePlaceholder name=\"footer\">\n {content => (footerPlaceholderTemplate\n ? footerPlaceholderTemplate({ children: content })\n : content)}\n </TemplatePlaceholder>\n ),\n })}\n </Template>\n </PluginContainer>\n );\n }\n}\n\nGridCore.propTypes = {\n rows: PropTypes.array.isRequired,\n getRowId: PropTypes.func,\n getCellValue: PropTypes.func,\n columns: PropTypes.array.isRequired,\n rootTemplate: PropTypes.func.isRequired,\n headerPlaceholderTemplate: PropTypes.func,\n footerPlaceholderTemplate: PropTypes.func,\n};\n\nGridCore.defaultProps = {\n getRowId: null,\n getCellValue: null,\n headerPlaceholderTemplate: null,\n footerPlaceholderTemplate: null,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { PluginHost } from '@devexpress/dx-react-core';\nimport { GridCore } from './plugins/grid-core';\n\nexport const Grid = ({\n rows,\n columns,\n getRowId,\n getCellValue,\n rootTemplate,\n headerPlaceholderTemplate,\n footerPlaceholderTemplate,\n children,\n}) => (\n <PluginHost>\n <GridCore\n rows={rows}\n columns={columns}\n getRowId={getRowId}\n getCellValue={getCellValue}\n rootTemplate={rootTemplate}\n headerPlaceholderTemplate={headerPlaceholderTemplate}\n footerPlaceholderTemplate={footerPlaceholderTemplate}\n />\n {children}\n </PluginHost>\n);\n\nGrid.propTypes = {\n rows: PropTypes.array.isRequired,\n getRowId: PropTypes.func,\n getCellValue: PropTypes.func,\n columns: PropTypes.array.isRequired,\n rootTemplate: PropTypes.func.isRequired,\n headerPlaceholderTemplate: PropTypes.func,\n footerPlaceholderTemplate: PropTypes.func,\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]),\n};\n\nGrid.defaultProps = {\n getRowId: null,\n getCellValue: null,\n headerPlaceholderTemplate: null,\n footerPlaceholderTemplate: null,\n children: null,\Line truncated
|
||||
{"version":3,"file":"dx-react-grid.umd.js","sources":["../src/plugins/grid-core.jsx","../src/grid.jsx","../src/plugins/column-chooser.jsx","../src/utils/state-helper.js","../src/plugins/filtering-state.jsx","../src/plugins/integrated-filtering.jsx","../src/plugins/editing-state.jsx","../src/plugins/paging-state.jsx","../src/plugins/integrated-paging.jsx","../src/plugins/custom-paging.jsx","../src/plugins/grouping-state.jsx","../src/plugins/integrated-grouping.jsx","../src/plugins/custom-grouping.jsx","../src/plugins/selection-state.jsx","../src/plugins/integrated-selection.jsx","../src/plugins/sorting-state.jsx","../src/plugins/integrated-sorting.jsx","../src/plugins/drag-drop-provider.jsx","../src/plugins/table-column-reordering.jsx","../src/plugins/table.jsx","../src/plugins/table-selection.jsx","../src/plugins/row-detail-state.jsx","../src/plugins/table-row-detail.jsx","../src/plugins/table-group-row.jsx","../src/plugins/table-header-row.jsx","../src/plugins/table-filter-row.jsx","../src/plugins/table-edit-row.jsx","../src/plugins/table-edit-column.jsx","../src/plugins/table-column-resizing.jsx","../src/plugins/paging-panel.jsx","../src/plugins/grouping-panel.jsx","../src/plugins/data-type-provider.jsx","../src/plugins/table-column-visibility.jsx","../src/components/table-layout.jsx","../src/components/table-layout/column-group.jsx","../src/components/table-layout/row-layout.jsx","../src/components/table-layout/virtual-table-utils.js","../src/components/table-layout/virtual-table-layout.jsx","../src/components/table-layout/rows-block-layout.jsx","../src/components/table-layout/static-table-layout.jsx","../src/components/group-panel-layout/item-layout.jsx","../src/components/group-panel-layout.jsx","../src/plugins/toolbar.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Plugin, Getter, Template, TemplatePlaceholder } from '@devexpress/dx-react-core';\nimport { rowIdGetter, cellValueGetter } from '@devexpress/dx-grid-core';\n\nexport class GridCore extends React.PureComponent {\n render() {\n const {\n rows,\n columns,\n getRowId,\n getCellValue,\n rootComponent: Root,\n } = this.props;\n\n return (\n <Plugin>\n <Getter name=\"rows\" value={rows} />\n <Getter name=\"getRowId\" value={rowIdGetter(getRowId, rows)} />\n <Getter name=\"columns\" value={columns} />\n <Getter name=\"getCellValue\" value={cellValueGetter(getCellValue, columns)} />\n <Template name=\"header\" />\n <Template name=\"body\" />\n <Template name=\"footer\" />\n <Template name=\"root\">\n <Root>\n <TemplatePlaceholder name=\"header\" />\n <TemplatePlaceholder name=\"body\" />\n <TemplatePlaceholder name=\"footer\" />\n </Root>\n </Template>\n </Plugin>\n );\n }\n}\n\nGridCore.propTypes = {\n rows: PropTypes.array.isRequired,\n getRowId: PropTypes.func,\n getCellValue: PropTypes.func,\n columns: PropTypes.array.isRequired,\n rootComponent: PropTypes.func.isRequired,\n};\n\nGridCore.defaultProps = {\n getRowId: undefined,\n getCellValue: undefined,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { PluginHost } from '@devexpress/dx-react-core';\nimport { GridCore } from './plugins/grid-core';\n\nexport const Grid = ({\n rows,\n columns,\n getRowId,\n getCellValue,\n rootComponent,\n children,\n}) => (\n <PluginHost>\n <GridCore\n rows={rows}\n columns={columns}\n getRowId={getRowId}\n getCellValue={getCellValue}\n rootComponent={rootComponent}\n />\n {children}\n </PluginHost>\n);\n\nGrid.propTypes = {\n rows: PropTypes.array.isRequired,\n getRowId: PropTypes.func,\n getCellValue: PropTypes.func,\n columns: PropTypes.array.isRequired,\n rootComponent: PropTypes.func.isRequired,\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]),\n};\n\nGrid.defaultProps = {\n getRowId: undefined,\n getCellValue: undefined,\n children: undefined,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n Template, TemplatePlaceholder, Plugin, TemplateConnector,\n} from '@devexpress/dx-react-core';\n\nimport { getMessagesFormatter, columnChooserItems } from '@devexpress/dx-grid-core';\n\nconst pluginDependencies = [\n { name: 'TableColumnVisibility' },\n { name: 'Toolbar' },\n];\nexport class ColumnChooser extends React.PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n visible: false,\n };\n\n this.handleToggle = this.handleToggle.bind(this);\n this.handleHide = this.handleHide.bind(this);\n this.buttonRef = this.buttonRef.bind(this);\n }\n buttonRef(button) {\n this.button = button;\n }\n handleToggle() {\n this.setState({ visible: !this.state.visible });\n }\n handleHide() {\n this.setState({ visible: false });\n }\nLine truncated
|
||||
Generated
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
# DevExtreme Grid Core
|
||||
|
||||
Core library for the DevExtreme Reactive Grid component.
|
||||
|
||||
## License
|
||||
|
||||
[DevExtreme licensing](https://js.devexpress.com/licensing/).
|
||||
Generated
Vendored
-1696
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"dx-grid-core.es.js","sources":["../src/plugins/grid-core/computeds.js","../src/plugins/sorting-state/reducers.js","../src/plugins/sorting-state/helpers.js","../src/utils/merge-sort.js","../src/utils/hierarchical-data.js","../src/plugins/local-sorting/computeds.js","../src/plugins/filtering-state/reducers.js","../src/plugins/filtering-state/helpers.js","../src/plugins/local-filtering/computeds.js","../src/plugins/grouping-state/constants.js","../src/plugins/grouping-state/reducers.js","../src/plugins/grouping-state/computeds.js","../src/plugins/local-grouping/constants.js","../src/plugins/local-grouping/computeds.js","../src/plugins/custom-grouping/computeds.js","../src/plugins/grouping-panel/helpers.js","../src/plugins/paging-state/reducers.js","../src/plugins/local-paging/computeds.js","../src/plugins/paging-panel/helpers.js","../src/plugins/selection-state/reducers.js","../src/plugins/selection-state/computeds.js","../src/plugins/editing-state/reducers.js","../src/plugins/editing-state/computeds.js","../src/plugins/editing-state/helpers.js","../src/plugins/table-column-reordering/constants.js","../src/plugins/table-column-reordering/reducers.js","../src/plugins/table-view/constants.js","../src/plugins/table-column-reordering/computeds.js","../src/plugins/table-column-resizing/computeds.js","../src/plugins/table-column-resizing/reducers.js","../src/plugins/table-edit-column/constants.js","../src/plugins/table-edit-row/constants.js","../src/plugins/table-header-row/constants.js","../src/plugins/table-edit-column/helpers.js","../src/plugins/table-edit-column/computeds.js","../src/plugins/table-edit-row/helpers.js","../src/plugins/table-edit-row/computeds.js","../src/plugins/table-filter-row/constants.js","../src/plugins/table-filter-row/helpers.js","../src/plugins/table-filter-row/computeds.js","../src/plugins/table-group-row/constants.js","../src/plugins/table-group-row/helpers.js","../src/plugins/table-group-row/computeds.js","../src/plugins/table-header-row/helpers.js","../src/plugins/table-header-row/computeds.js","../src/plugins/table-row-detail/constants.js","../src/plugins/table-row-detail/helpers.js","../src/plugins/table-row-detail/reducers.js","../src/plugins/table-row-detail/computeds.js","../src/plugins/table-selection/constants.js","../src/plugins/table-selection/helpers.js","../src/plugins/table-selection/computeds.js","../src/plugins/table-view/helpers.js","../src/plugins/table-view/computeds.js","../src/plugins/table-column-visibility/computeds.js","../src/column-chooser/computeds.js","../src/column-chooser/reducers.js","../src/utils/column-geometries.js","../src/utils/table.js","../src/utils/group-panel.js","../src/utils/messages-formatter.js"],"sourcesContent":["export const rowIdGetter = (getRowId, rows) => {\n if (!getRowId) {\n const map = new Map(rows.map((row, rowIndex) => [row, rowIndex]));\n return row => map.get(row);\n }\n return getRowId;\n};\n\nexport const cellValueGetter = (getCellValue, columns) => {\n if (getCellValue) {\n return getCellValue;\n }\n\n let useFastAccessor = true;\n const map = columns.reduce((acc, column) => {\n if (column.getCellValue) {\n useFastAccessor = false;\n acc[column.name] = column.getCellValue;\n }\n return acc;\n }, {});\n\n return useFastAccessor ?\n (row, columnName) => row[columnName] :\n (row, columnName) => (map[columnName] ? map[columnName](row, columnName) : row[columnName]);\n};\n","export const setColumnSorting = (state, {\n columnName, direction, keepOther, cancel, sortIndex,\n}) => {\n const { sorting } = state;\n\n let nextSorting = [];\n if (keepOther === true) {\n nextSorting = Array.from(sorting).slice();\n }\n if (Array.isArray(keepOther)) {\n nextSorting = Array.from(sorting)\n .filter(columnSorting => keepOther.indexOf(columnSorting.columnName) > -1);\n }\n\n const columnSortingIndex = sorting\n .findIndex(columnSorting => columnSorting.columnName === columnName);\n const columnSorting = sorting[columnSortingIndex];\n const newColumnSorting = {\n columnName,\n direction: direction ||\n (!columnSorting || columnSorting.direction === 'desc' ? 'asc' : 'desc'),\n };\n\n if (columnSortingIndex > -1) {\n nextSorting.splice(columnSortingIndex, 1);\n }\n\n if (!cancel) {\n const newIndexFallback = columnSortingIndex > -1 ? columnSortingIndex : nextSorting.length;\n const newIndex = sortIndex !== undefined ? sortIndex : newIndexFallback;\n nextSorting.splice(newIndex, 0, newColumnSorting);\n }\n\n return {\n sorting: nextSorting,\n };\n};\n","export const getColumnSortingDirection = (sorting, columnName) => {\n const columnSorting = sorting.filter(s => s.columnName === columnName)[0];\n return columnSorting ? columnSorting.direction : null;\n};\n","/* eslint-disable no-plusplus, no-param-reassign, no-use-before-define, no-constant-condition */\n\nconst merge = (array, auxiliary, lo, mid, hi, compare) => {\n let i = Line truncated
|
||||
Generated
Vendored
-1809
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"dx-grid-core.umd.js","sources":["../src/plugins/grid-core/computeds.js","../src/plugins/sorting-state/reducers.js","../src/plugins/sorting-state/helpers.js","../src/utils/merge-sort.js","../src/utils/hierarchical-data.js","../src/plugins/local-sorting/computeds.js","../src/plugins/filtering-state/reducers.js","../src/plugins/filtering-state/helpers.js","../src/plugins/local-filtering/computeds.js","../src/plugins/grouping-state/constants.js","../src/plugins/grouping-state/reducers.js","../src/plugins/grouping-state/computeds.js","../src/plugins/local-grouping/constants.js","../src/plugins/local-grouping/computeds.js","../src/plugins/custom-grouping/computeds.js","../src/plugins/grouping-panel/helpers.js","../src/plugins/paging-state/reducers.js","../src/plugins/local-paging/computeds.js","../src/plugins/paging-panel/helpers.js","../src/plugins/selection-state/reducers.js","../src/plugins/selection-state/computeds.js","../src/plugins/editing-state/reducers.js","../src/plugins/editing-state/computeds.js","../src/plugins/editing-state/helpers.js","../src/plugins/table-column-reordering/constants.js","../src/plugins/table-column-reordering/reducers.js","../src/plugins/table-view/constants.js","../src/plugins/table-column-reordering/computeds.js","../src/plugins/table-column-resizing/computeds.js","../src/plugins/table-column-resizing/reducers.js","../src/plugins/table-edit-column/constants.js","../src/plugins/table-edit-row/constants.js","../src/plugins/table-header-row/constants.js","../src/plugins/table-edit-column/helpers.js","../src/plugins/table-edit-column/computeds.js","../src/plugins/table-edit-row/helpers.js","../src/plugins/table-edit-row/computeds.js","../src/plugins/table-filter-row/constants.js","../src/plugins/table-filter-row/helpers.js","../src/plugins/table-filter-row/computeds.js","../src/plugins/table-group-row/constants.js","../src/plugins/table-group-row/helpers.js","../src/plugins/table-group-row/computeds.js","../src/plugins/table-header-row/helpers.js","../src/plugins/table-header-row/computeds.js","../src/plugins/table-row-detail/constants.js","../src/plugins/table-row-detail/helpers.js","../src/plugins/table-row-detail/reducers.js","../src/plugins/table-row-detail/computeds.js","../src/plugins/table-selection/constants.js","../src/plugins/table-selection/helpers.js","../src/plugins/table-selection/computeds.js","../src/plugins/table-view/helpers.js","../src/plugins/table-view/computeds.js","../src/plugins/table-column-visibility/computeds.js","../src/column-chooser/computeds.js","../src/column-chooser/reducers.js","../src/utils/column-geometries.js","../src/utils/table.js","../src/utils/group-panel.js","../src/utils/messages-formatter.js"],"sourcesContent":["export const rowIdGetter = (getRowId, rows) => {\n if (!getRowId) {\n const map = new Map(rows.map((row, rowIndex) => [row, rowIndex]));\n return row => map.get(row);\n }\n return getRowId;\n};\n\nexport const cellValueGetter = (getCellValue, columns) => {\n if (getCellValue) {\n return getCellValue;\n }\n\n let useFastAccessor = true;\n const map = columns.reduce((acc, column) => {\n if (column.getCellValue) {\n useFastAccessor = false;\n acc[column.name] = column.getCellValue;\n }\n return acc;\n }, {});\n\n return useFastAccessor ?\n (row, columnName) => row[columnName] :\n (row, columnName) => (map[columnName] ? map[columnName](row, columnName) : row[columnName]);\n};\n","export const setColumnSorting = (state, {\n columnName, direction, keepOther, cancel, sortIndex,\n}) => {\n const { sorting } = state;\n\n let nextSorting = [];\n if (keepOther === true) {\n nextSorting = Array.from(sorting).slice();\n }\n if (Array.isArray(keepOther)) {\n nextSorting = Array.from(sorting)\n .filter(columnSorting => keepOther.indexOf(columnSorting.columnName) > -1);\n }\n\n const columnSortingIndex = sorting\n .findIndex(columnSorting => columnSorting.columnName === columnName);\n const columnSorting = sorting[columnSortingIndex];\n const newColumnSorting = {\n columnName,\n direction: direction ||\n (!columnSorting || columnSorting.direction === 'desc' ? 'asc' : 'desc'),\n };\n\n if (columnSortingIndex > -1) {\n nextSorting.splice(columnSortingIndex, 1);\n }\n\n if (!cancel) {\n const newIndexFallback = columnSortingIndex > -1 ? columnSortingIndex : nextSorting.length;\n const newIndex = sortIndex !== undefined ? sortIndex : newIndexFallback;\n nextSorting.splice(newIndex, 0, newColumnSorting);\n }\n\n return {\n sorting: nextSorting,\n };\n};\n","export const getColumnSortingDirection = (sorting, columnName) => {\n const columnSorting = sorting.filter(s => s.columnName === columnName)[0];\n return columnSorting ? columnSorting.direction : null;\n};\n","/* eslint-disable no-plusplus, no-param-reassign, no-use-before-define, no-constant-condition */\n\nconst merge = (array, auxiliary, lo, mid, hi, compare) => {\n let i =Line truncated
|
||||
Generated
Vendored
-90
@@ -1,90 +0,0 @@
|
||||
{
|
||||
"_from": "@devexpress/dx-grid-core@1.0.0-beta.1",
|
||||
"_id": "@devexpress/dx-grid-core@1.0.0-beta.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-3hKM7JUKKHJGJ8C/B20SDfCbkxr7R6ADhKb/IfkWrepJQ78uPDce9wWxwkjl8EqSd8r1jKMWbg5dgXMU6zQwWw==",
|
||||
"_location": "/@devexpress/dx-react-grid/@devexpress/dx-grid-core",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@devexpress/dx-grid-core@1.0.0-beta.1",
|
||||
"name": "@devexpress/dx-grid-core",
|
||||
"escapedName": "@devexpress%2fdx-grid-core",
|
||||
"scope": "@devexpress",
|
||||
"rawSpec": "1.0.0-beta.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.0-beta.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@devexpress/dx-react-grid"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@devexpress/dx-grid-core/-/dx-grid-core-1.0.0-beta.1.tgz",
|
||||
"_shasum": "48f76255c7192e7727f2c9b97efb2bf70774471d",
|
||||
"_spec": "@devexpress/dx-grid-core@1.0.0-beta.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid",
|
||||
"author": {
|
||||
"name": "Developer Express Inc.",
|
||||
"url": "https://www.devexpress.com/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/DevExpress/devextreme-reactive/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Core library for the DevExtreme Reactive Grid component",
|
||||
"devDependencies": {
|
||||
"@devexpress/dx-core": "1.0.0-beta.1",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-jest": "^21.2.0",
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"core-js": "^2.5.1",
|
||||
"eslint": "^4.10.0",
|
||||
"eslint-config-airbnb-base": "^12.1.0",
|
||||
"eslint-plugin-filenames": "^1.2.0",
|
||||
"eslint-plugin-import": "^2.8.0",
|
||||
"eslint-plugin-jest": "^21.3.0",
|
||||
"jest": "^21.2.1",
|
||||
"rollup": "0.50.0",
|
||||
"rollup-plugin-babel": "^3.0.2",
|
||||
"rollup-plugin-license": "^0.5.0",
|
||||
"seamless-immutable": "^7.1.2"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"globalName": "DevExpress.DXGridCore",
|
||||
"homepage": "https://devexpress.github.io/devextreme-reactive/",
|
||||
"keywords": [
|
||||
"data",
|
||||
"grid",
|
||||
"table"
|
||||
],
|
||||
"license": "SEE LICENSE IN README.md",
|
||||
"main": "dist/dx-grid-core.umd.js",
|
||||
"module": "dist/dx-grid-core.es.js",
|
||||
"name": "@devexpress/dx-grid-core",
|
||||
"peerDependencies": {
|
||||
"@devexpress/dx-core": "1.0.0-beta.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/DevExpress/devextreme-reactive.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c rollup.config.js",
|
||||
"build:watch": "rollup -c rollup.config.js -w",
|
||||
"lint": "eslint \"src/**\"",
|
||||
"lint:fix": "yarn run lint -- --fix",
|
||||
"test": "jest",
|
||||
"test:coverage": "jest --coverage",
|
||||
"test:watch": "jest --watch"
|
||||
},
|
||||
"version": "1.0.0-beta.1"
|
||||
}
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
|
||||
"_shasum": "e50347611d7e690943208bbdafebcbc2fb866d46",
|
||||
"_spec": "asap@~2.0.3",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\promise",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\promise",
|
||||
"browser": {
|
||||
"./asap": "./browser-asap.js",
|
||||
"./asap.js": "./browser-asap.js",
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
|
||||
"_shasum": "652294c14651db28fa93bd2d5ff2983a4f08c636",
|
||||
"_spec": "core-js@^1.0.0",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\fbjs",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zloirock/core-js/issues"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
|
||||
"_shasum": "538b66f3ee62cd1ab51ec323829d1f9480c74beb",
|
||||
"_spec": "encoding@^0.1.11",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\node-fetch",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\node-fetch",
|
||||
"author": {
|
||||
"name": "Andris Reinman"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.16.tgz",
|
||||
"_shasum": "5e67432f550dc41b572bf55847b8aca64e5337db",
|
||||
"_spec": "fbjs@^0.8.16",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\prop-types",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\prop-types",
|
||||
"browserify": {
|
||||
"transform": [
|
||||
"loose-envify"
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
|
||||
"_shasum": "f7468f60135f5e5dad3399c0a81be9a1603a082b",
|
||||
"_spec": "iconv-lite@~0.4.13",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\encoding",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\encoding",
|
||||
"author": {
|
||||
"name": "Alexander Shtuchkin",
|
||||
"email": "ashtuchkin@gmail.com"
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
||||
"_shasum": "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44",
|
||||
"_spec": "is-stream@^1.0.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\node-fetch",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\node-fetch",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz",
|
||||
"_shasum": "611ae1acf14f5e81f729507472819fe9733558a9",
|
||||
"_spec": "isomorphic-fetch@^2.1.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\fbjs",
|
||||
"author": {
|
||||
"name": "Matt Andrews",
|
||||
"email": "matt@mattandre.ws"
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||
"_shasum": "9866df395102130e38f7f996bceb65443209c25b",
|
||||
"_spec": "js-tokens@^3.0.0",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\loose-envify",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\loose-envify",
|
||||
"author": {
|
||||
"name": "Simon Lydell"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -22,7 +22,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
|
||||
"_shasum": "d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848",
|
||||
"_spec": "loose-envify@^1.3.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\prop-types",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\prop-types",
|
||||
"author": {
|
||||
"name": "Andres Suarez",
|
||||
"email": "zertosh@gmail.com"
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
|
||||
"_shasum": "980f6f72d85211a5347c6b2bc18c5b84c3eb47ef",
|
||||
"_spec": "node-fetch@^1.0.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\isomorphic-fetch",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\isomorphic-fetch",
|
||||
"author": {
|
||||
"name": "David Frank"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -22,7 +22,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"_shasum": "2109adc7965887cfc05cbbd442cac8bfbb360863",
|
||||
"_spec": "object-assign@^4.1.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\prop-types",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\prop-types",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
|
||||
"_shasum": "064b72602b18f90f29192b8b1bc418ffd1ebd3bf",
|
||||
"_spec": "promise@^7.1.1",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\fbjs",
|
||||
"author": {
|
||||
"name": "ForbesLindesay"
|
||||
},
|
||||
|
||||
Generated
Vendored
+20
-4
@@ -20,16 +20,32 @@ import PropTypes from 'prop-types'; // ES6
|
||||
var PropTypes = require('prop-types'); // ES5 with npm
|
||||
```
|
||||
|
||||
If you prefer a `<script>` tag, you can get it from `window.PropTypes` global:
|
||||
### CDN
|
||||
|
||||
If you prefer to exclude `prop-types` from your application and use it
|
||||
globally via `window.PropTypes`, the `prop-types` package provides
|
||||
single-file distributions, which are hosted on the following CDNs:
|
||||
|
||||
* [**unpkg**](https://unpkg.com/prop-types/)
|
||||
```html
|
||||
<!-- development version -->
|
||||
<script src="https://unpkg.com/prop-types/prop-types.js"></script>
|
||||
<script src="https://unpkg.com/prop-types@15.6/prop-types.js"></script>
|
||||
|
||||
<!-- production version -->
|
||||
<script src="https://unpkg.com/prop-types/prop-types.min.js"></script>
|
||||
<script src="https://unpkg.com/prop-types@15.6/prop-types.min.js"></script>
|
||||
```
|
||||
|
||||
* [**cdnjs**](https://cdnjs.com/libraries/prop-types)
|
||||
```html
|
||||
<!-- development version -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.0/prop-types.js"></script>
|
||||
|
||||
<!-- production version -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.0/prop-types.min.js"></script>
|
||||
```
|
||||
|
||||
To load a specific version of `prop-types` replace `15.6.0` with the version number.
|
||||
|
||||
## Usage
|
||||
|
||||
PropTypes was originally exposed as part of the React core module, and is
|
||||
@@ -232,7 +248,7 @@ See below for more info.
|
||||
|
||||
**You might also see this error** if you’re calling a `PropTypes` validator from your own custom `PropTypes` validator. In this case, the fix is to make sure that you are passing *all* of the arguments to the inner function. There is a more in-depth explanation of how to fix it [on this page](https://facebook.github.io/react/warnings/dont-call-proptypes.html#fixing-the-false-positive-in-third-party-proptypes). Alternatively, you can temporarily keep using `React.PropTypes` until React 16, as it would still only warn in this case.
|
||||
|
||||
If you use a bundler like Browserify or Webpack, don’t forget to [follow these instructions](https://facebook.github.io/react/docs/installation.html#development-and-production-versions) to correctly bundle your application in development or production mode. Otherwise you’ll ship unnecessary code to your users.
|
||||
If you use a bundler like Browserify or Webpack, don’t forget to [follow these instructions](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build) to correctly bundle your application in development or production mode. Otherwise you’ll ship unnecessary code to your users.
|
||||
|
||||
## PropTypes.checkPropTypes
|
||||
|
||||
|
||||
Generated
Vendored
+8
-8
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"_from": "prop-types@^15.6.0",
|
||||
"_id": "prop-types@15.6.0",
|
||||
"_id": "prop-types@15.6.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=",
|
||||
"_integrity": "sha512-4ec7bY1Y66LymSUOH/zARVYObB23AT2h8cf6e/O6ZALB/N0sqZFEx7rq6EYPX2MkOdKORuooI/H5k9TlR4q7kQ==",
|
||||
"_location": "/@devexpress/dx-react-grid/prop-types",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
@@ -18,17 +18,17 @@
|
||||
"_requiredBy": [
|
||||
"/@devexpress/dx-react-grid"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz",
|
||||
"_shasum": "ceaf083022fc46b4a35f69e13ef75aed0d639856",
|
||||
"_resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.1.tgz",
|
||||
"_shasum": "36644453564255ddda391191fb3a125cbdf654ca",
|
||||
"_spec": "prop-types@^15.6.0",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid",
|
||||
"browserify": {
|
||||
"transform": [
|
||||
"loose-envify"
|
||||
]
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/reactjs/prop-types/issues"
|
||||
"url": "https://github.com/facebook/prop-types/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
@@ -70,7 +70,7 @@
|
||||
"name": "prop-types",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/reactjs/prop-types.git"
|
||||
"url": "git+https://github.com/facebook/prop-types.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn umd && yarn umd-min",
|
||||
@@ -79,5 +79,5 @@
|
||||
"umd": "NODE_ENV=development browserify index.js -t envify --standalone PropTypes -o prop-types.js",
|
||||
"umd-min": "NODE_ENV=production browserify index.js -t envify -t uglifyify --standalone PropTypes -p bundle-collapser/plugin -o | uglifyjs --compress unused,dead_code -o prop-types.min.js"
|
||||
},
|
||||
"version": "15.6.0"
|
||||
"version": "15.6.1"
|
||||
}
|
||||
Generated
Vendored
+42
-50
@@ -712,11 +712,9 @@ module.exports = ReactPropTypesSecret;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
*
|
||||
*/
|
||||
@@ -749,11 +747,9 @@ module.exports = emptyFunction;
|
||||
},{}],7:[function(require,module,exports){
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -804,12 +800,10 @@ function invariant(condition, format, a, b, c, d, e, f) {
|
||||
module.exports = invariant;
|
||||
},{}],8:[function(require,module,exports){
|
||||
/**
|
||||
* Copyright 2014-2015, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -827,45 +821,43 @@ var emptyFunction = require('./emptyFunction');
|
||||
var warning = emptyFunction;
|
||||
|
||||
if ("development" !== 'production') {
|
||||
(function () {
|
||||
var printWarning = function printWarning(format) {
|
||||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
var printWarning = function printWarning(format) {
|
||||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
}
|
||||
|
||||
var argIndex = 0;
|
||||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||||
return args[argIndex++];
|
||||
});
|
||||
if (typeof console !== 'undefined') {
|
||||
console.error(message);
|
||||
}
|
||||
try {
|
||||
// --- Welcome to debugging React ---
|
||||
// This error was thrown as a convenience so that you can use this stack
|
||||
// to find the callsite that caused this warning to fire.
|
||||
throw new Error(message);
|
||||
} catch (x) {}
|
||||
};
|
||||
|
||||
warning = function warning(condition, format) {
|
||||
if (format === undefined) {
|
||||
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
||||
}
|
||||
|
||||
if (format.indexOf('Failed Composite propType: ') === 0) {
|
||||
return; // Ignore CompositeComponent proptype check.
|
||||
}
|
||||
|
||||
if (!condition) {
|
||||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 2] = arguments[_key2];
|
||||
}
|
||||
|
||||
var argIndex = 0;
|
||||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||||
return args[argIndex++];
|
||||
});
|
||||
if (typeof console !== 'undefined') {
|
||||
console.error(message);
|
||||
}
|
||||
try {
|
||||
// --- Welcome to debugging React ---
|
||||
// This error was thrown as a convenience so that you can use this stack
|
||||
// to find the callsite that caused this warning to fire.
|
||||
throw new Error(message);
|
||||
} catch (x) {}
|
||||
};
|
||||
|
||||
warning = function warning(condition, format) {
|
||||
if (format === undefined) {
|
||||
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
||||
}
|
||||
|
||||
if (format.indexOf('Failed Composite propType: ') === 0) {
|
||||
return; // Ignore CompositeComponent proptype check.
|
||||
}
|
||||
|
||||
if (!condition) {
|
||||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 2] = arguments[_key2];
|
||||
}
|
||||
|
||||
printWarning.apply(undefined, [format].concat(args));
|
||||
}
|
||||
};
|
||||
})();
|
||||
printWarning.apply(undefined, [format].concat(args));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = warning;
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
|
||||
"_shasum": "290cbb232e306942d7d7ea9b83732ab7856f8285",
|
||||
"_spec": "setimmediate@^1.0.5",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\fbjs",
|
||||
"author": {
|
||||
"name": "YuzuJS"
|
||||
},
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz",
|
||||
"_shasum": "e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac",
|
||||
"_spec": "ua-parser-js@^0.7.9",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\fbjs",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\fbjs",
|
||||
"author": {
|
||||
"name": "Faisal Salman",
|
||||
"email": "f@faisalman.com",
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
"_resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz",
|
||||
"_shasum": "9c84ec2dcf68187ff00bc64e1274b442176e1c84",
|
||||
"_spec": "whatwg-fetch@>=0.10.0",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\isomorphic-fetch",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\@devexpress\\dx-react-grid\\node_modules\\isomorphic-fetch",
|
||||
"bugs": {
|
||||
"url": "https://github.com/github/fetch/issues"
|
||||
},
|
||||
|
||||
+33
-27
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"_from": "@devexpress/dx-react-grid",
|
||||
"_id": "@devexpress/dx-react-grid@1.0.0-beta.1",
|
||||
"_id": "@devexpress/dx-react-grid@1.0.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-Oq/9De2F5eMKY2Q7aA3YP/q72nnbZsmWeBkM4qj0GkBe0sNStTt6uyxVIOQnUzlilsM+dyc/C7+3YOUtjmlPKw==",
|
||||
"_integrity": "sha512-+MQPn3tIbhpY3lIjvWBSzbYp8oEz+cUPWjRURGm4wxkv5nmXgp5AP2Ss0ROWWDwKN2NgXg51CQ6eN76KIgr3aQ==",
|
||||
"_location": "/@devexpress/dx-react-grid",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
@@ -19,10 +19,10 @@
|
||||
"_requiredBy": [
|
||||
"#USER"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@devexpress/dx-react-grid/-/dx-react-grid-1.0.0-beta.1.tgz",
|
||||
"_shasum": "8e249e5cd7ad2c0ed9a2d0782c70f9d26e1ca44f",
|
||||
"_resolved": "https://registry.npmjs.org/@devexpress/dx-react-grid/-/dx-react-grid-1.0.3.tgz",
|
||||
"_shasum": "82d142d0ae66b4c28ce15bd19dac39f2191108f1",
|
||||
"_spec": "@devexpress/dx-react-grid",
|
||||
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI",
|
||||
"author": {
|
||||
"name": "Developer Express Inc.",
|
||||
"url": "https://www.devexpress.com/"
|
||||
@@ -32,46 +32,52 @@
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"@devexpress/dx-grid-core": "1.0.0-beta.1",
|
||||
"@devexpress/dx-grid-core": "1.0.3",
|
||||
"prop-types": "^15.6.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Composable plugin-based data grid component for React",
|
||||
"devDependencies": {
|
||||
"@devexpress/dx-core": "1.0.0-beta.1",
|
||||
"@devexpress/dx-react-core": "1.0.0-beta.1",
|
||||
"@devexpress/dx-testing": "1.0.0-beta.1",
|
||||
"@devexpress/dx-core": "1.0.3",
|
||||
"@devexpress/dx-react-core": "1.0.3",
|
||||
"@devexpress/dx-testing": "1.0.3",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-jest": "^21.2.0",
|
||||
"babel-jest": "^22.1.0",
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"core-js": "^2.5.1",
|
||||
"enzyme": "^2.9.1",
|
||||
"eslint": "^4.10.0",
|
||||
"core-js": "^2.5.3",
|
||||
"enzyme": "^3.3.0",
|
||||
"enzyme-adapter-react-16": "^1.1.1",
|
||||
"eslint": "^4.16.0",
|
||||
"eslint-config-airbnb": "^16.1.0",
|
||||
"eslint-config-airbnb-base": "^12.1.0",
|
||||
"eslint-plugin-filenames": "^1.2.0",
|
||||
"eslint-plugin-import": "^2.8.0",
|
||||
"eslint-plugin-jest": "^21.3.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.0.2",
|
||||
"eslint-plugin-react": "^7.4.0",
|
||||
"jest": "^21.2.1",
|
||||
"react": "^15.6.1",
|
||||
"react-dom": "^15.6.1",
|
||||
"react-test-renderer": "^15.6.1",
|
||||
"eslint-plugin-jest": "^21.7.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.0.3",
|
||||
"eslint-plugin-react": "^7.6.1",
|
||||
"jest": "^22.1.4",
|
||||
"react": "^16.2.0",
|
||||
"react-dom": "^16.2.0",
|
||||
"react-test-renderer": "^16.2.0",
|
||||
"rollup": "0.50.0",
|
||||
"rollup-plugin-babel": "^3.0.2",
|
||||
"rollup-plugin-babel": "^3.0.3",
|
||||
"rollup-plugin-license": "^0.5.0",
|
||||
"rollup-plugin-node-resolve": "^3.0.0"
|
||||
"rollup-plugin-node-resolve": "^3.0.2"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"globalName": "DevExpress.DXReactGrid",
|
||||
"homepage": "https://devexpress.github.io/devextreme-reactive/",
|
||||
"jest": {
|
||||
"setupFiles": [
|
||||
"<rootDir>/setup-enzyme.js"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"react",
|
||||
"data",
|
||||
@@ -84,10 +90,10 @@
|
||||
"module": "dist/dx-react-grid.es.js",
|
||||
"name": "@devexpress/dx-react-grid",
|
||||
"peerDependencies": {
|
||||
"@devexpress/dx-core": "1.0.0-beta.1",
|
||||
"@devexpress/dx-react-core": "1.0.0-beta.1",
|
||||
"react": "^15.6.1 || ^16.0.0",
|
||||
"react-dom": "^15.6.1 || ^16.0.0"
|
||||
"@devexpress/dx-core": "1.0.3",
|
||||
"@devexpress/dx-react-core": "1.0.3",
|
||||
"react": "^16.2.0",
|
||||
"react-dom": "^16.2.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@@ -105,5 +111,5 @@
|
||||
"test:coverage": "jest --coverage",
|
||||
"test:watch": "jest --watch"
|
||||
},
|
||||
"version": "1.0.0-beta.1"
|
||||
"version": "1.0.3"
|
||||
}
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"stage": 0,
|
||||
"loose": "all"
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@ root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
+2
-7
@@ -1,12 +1,7 @@
|
||||
{
|
||||
"extends": "airbnb",
|
||||
"extends": "okonet",
|
||||
"env": {
|
||||
"browser": true,
|
||||
"mocha": true,
|
||||
"node": true
|
||||
},
|
||||
"rules": {
|
||||
"indent": [2, 4],
|
||||
"comma-dangle": [2, "never"]
|
||||
"mocha": true
|
||||
}
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
javascript:
|
||||
enabled: false
|
||||
eslint:
|
||||
enabled: true
|
||||
config_file: .eslintrc
|
||||
+3
-14
@@ -1,4 +1,3 @@
|
||||
sudo: false
|
||||
language: node_js
|
||||
cache:
|
||||
directories:
|
||||
@@ -6,23 +5,13 @@ cache:
|
||||
notifications:
|
||||
email: false
|
||||
node_js:
|
||||
- 'stable'
|
||||
- '8'
|
||||
- '6'
|
||||
- '4'
|
||||
- iojs-v3
|
||||
- iojs-v2
|
||||
- iojs-v1
|
||||
- '0.12'
|
||||
before_install:
|
||||
- npm i -g npm@^2.0.0
|
||||
before_script:
|
||||
- npm prune
|
||||
- npm i -g npm@^5.0.0
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
- 'curl -Lo travis_after_all.py https://git.io/travis_after_all'
|
||||
- python travis_after_all.py
|
||||
- export $(cat .to_export_back) &> /dev/null
|
||||
- npm run semantic-release
|
||||
- travis-deploy-once "npm install -g semantic-release@13 && semantic-release"
|
||||
branches:
|
||||
except:
|
||||
- /^v\d+\.\d+\.\d+$/
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
JavaScript implementation of the "accept" attribute for HTML5 `<input type="file">`
|
||||
|
||||
[](https://travis-ci.org/okonet/attr-accept)
|
||||
[](https://badge.fury.io/js/attr-accept)
|
||||
|
||||
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input#Attributes for more information.
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
module.exports=function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={exports:{},id:e,loaded:!1};return t[e].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=t,n.c=r,n.p="",n(0)}([function(t,n,r){"use strict";n.__esModule=!0,r(8),r(9),n["default"]=function(t,n){if(t&&n){var r=function(){var r=Array.isArray(n)?n:n.split(","),e=t.name||"",o=t.type||"",i=o.replace(/\/.*$/,"");return{v:r.some(function(t){var n=t.trim();return"."===n.charAt(0)?e.toLowerCase().endsWith(n.toLowerCase()):/\/\*$/.test(n)?i===n.replace(/\/.*$/,""):o===n})}}();if("object"==typeof r)return r.v}return!0},t.exports=n["default"]},function(t,n){var r=t.exports={version:"1.2.2"};"number"==typeof __e&&(__e=r)},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n,r){var e=r(2),o=r(1),i=r(4),u=r(19),c="prototype",f=function(t,n){return function(){return t.apply(n,arguments)}},s=function(t,n,r){var a,p,l,y,d=t&s.G,h=t&s.P,v=d?e:t&s.S?e[n]||(e[n]={}):(e[n]||{})[c],x=d?o:o[n]||(o[n]={});d&&(r=n);for(a in r)p=!(t&s.F)&&v&&a in v,l=(p?v:r)[a],y=t&s.B&&p?f(l,e):h&&"function"==typeof l?f(Function.call,l):l,v&&!p&&u(v,a,l),x[a]!=l&&i(x,a,y),h&&((x[c]||(x[c]={}))[a]=l)};e.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,t.exports=s},function(t,n,r){var e=r(5),o=r(18);t.exports=r(22)?function(t,n,r){return e.setDesc(t,n,o(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n){var r=Object;t.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n,r){var e=r(20)("wks"),o=r(2).Symbol;t.exports=function(t){return e[t]||(e[t]=o&&o[t]||(o||r(6))("Symbol."+t))}},function(t,n,r){r(26),t.exports=r(1).Array.some},function(t,n,r){r(25),t.exports=r(1).String.endsWith},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,r){var e=r(10);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,r){t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r(7)("match")]=!1,!"/./"[t](n)}catch(o){}}return!0}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){var e=r(16),o=r(11),i=r(7)("match");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[i])?!!n:"RegExp"==o(t))}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(2),o=r(4),i=r(6)("src"),u="toString",c=Function[u],f=(""+c).split(u);r(1).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,r,u){"function"==typeof r&&(o(r,i,t[n]?""+t[n]:f.join(String(n))),"name"in r||(r.name=n)),t===e?t[n]=r:(u||delete t[n],o(t,n,r))})(Function.prototype,u,function(){return"function"==typeof this&&this[i]||c.call(this)})},function(t,n,r){var e=r(2),o="__core-js_shared__",i=e[o]||(e[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n,r){var e=r(17),o=r(13);t.exports=function(t,n,r){if(e(n))throw TypeError("String#"+r+" doesn't accept regex!");return String(o(t))}},function(t,n,r){t.exports=!r(15)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(23),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n,r){"use strict";var e=r(3),o=r(24),i=r(21),u="endsWith",c=""[u];e(e.P+e.F*r(14)(u),"String",{endsWith:function(t){var n=i(this,t,u),r=arguments,e=r.length>1?r[1]:void 0,f=o(n.length),s=void 0===e?f:Math.min(o(e),f),a=String(t);return c?c.call(n,a,s):n.slice(s-a.length,s)===a}})},function(t,n,r){var e=r(5),o=r(3),i=r(1).Array||Array,u={},c=function(t,n){e.each.call(t.split(","),function(t){void 0==n&&t in i?u[t]=i[t]:t in[]&&(u[t]=r(12)(Function.call,[][t],n))})};c("pop,reverse,shift,keys,values,entries",1),c("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),c("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),o(o.S,"Array",u)}]);
|
||||
module.exports=function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};return n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=13)}([function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){var r=t.exports={version:"2.5.0"};"number"==typeof __e&&(__e=r)},function(t,n,r){t.exports=!r(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,r){var e=r(32)("wks"),o=r(9),i=r(0).Symbol,u="function"==typeof i;(t.exports=function(t){return e[t]||(e[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=e},function(t,n,r){var e=r(0),o=r(2),i=r(8),u=r(22),c=r(10),f=function(t,n,r){var a,s,p,l,v=t&f.F,y=t&f.G,h=t&f.S,d=t&f.P,x=t&f.B,g=y?e:h?e[n]||(e[n]={}):(e[n]||{}).prototype,m=y?o:o[n]||(o[n]={}),b=m.prototype||(m.prototype={});y&&(r=n);for(a in r)s=!v&&g&&void 0!==g[a],p=(s?g:r)[a],l=x&&s?c(p,e):d&&"function"==typeof p?c(Function.call,p):p,g&&u(g,a,p,t&f.U),m[a]!=p&&i(m,a,l),d&&b[a]!=p&&(b[a]=p)};e.core=o,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,n,r){var e=r(16),o=r(21);t.exports=r(3)?function(t,n,r){return e.f(t,n,o(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n,r){var e=r(24);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,r){var e=r(28),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n,r){"use strict";n.__esModule=!0,n.default=function(t,n){if(t&&n){var r=Array.isArray(n)?n:n.split(","),e=t.name||"",o=t.type||"",i=o.replace(/\/.*$/,"");return r.some(function(t){var n=t.trim();return"."===n.charAt(0)?e.toLowerCase().endsWith(n.toLowerCase()):/\/\*$/.test(n)?i===n.replace(/\/.*$/,""):o===n})}return!0},r(14),r(34)},function(t,n,r){r(15),t.exports=r(2).Array.some},function(t,n,r){"use strict";var e=r(7),o=r(25)(3);e(e.P+e.F*!r(33)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},function(t,n,r){var e=r(17),o=r(18),i=r(20),u=Object.defineProperty;n.f=r(3)?Object.defineProperty:function(t,n,r){if(e(t),n=i(n,!0),e(r),o)try{return u(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(1);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n,r){t.exports=!r(3)&&!r(4)(function(){return 7!=Object.defineProperty(r(19)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(1),o=r(0).document,i=e(o)&&e(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,r){var e=r(1);t.exports=function(t,n){if(!e(t))return t;var r,o;if(n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!e(o=r.call(t)))return o;if(!n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(0),o=r(8),i=r(23),u=r(9)("src"),c=Function.toString,f=(""+c).split("toString");r(2).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,r,c){var a="function"==typeof r;a&&(i(r,"name")||o(r,"name",n)),t[n]!==r&&(a&&(i(r,u)||o(r,u,t[n]?""+t[n]:f.join(String(n)))),t===e?t[n]=r:c?t[n]?t[n]=r:o(t,n,r):(delete t[n],o(t,n,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[u]||c.call(this)})},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,r){var e=r(10),o=r(26),i=r(27),u=r(12),c=r(29);t.exports=function(t,n){var r=1==t,f=2==t,a=3==t,s=4==t,p=6==t,l=5==t||p,v=n||c;return function(n,c,y){for(var h,d,x=i(n),g=o(x),m=e(c,y,3),b=u(g.length),_=0,w=r?v(nLine truncated
|
||||
Loaded 100 of 13674 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user