ember-gridstack
Advanced tools
Comparing version 1.2.0 to 1.3.0
/** | ||
* Copyright 2017, Yahoo Inc. | ||
* Copyright 2018, Yahoo Inc. | ||
* Copyrights licensed under the BSD License. See the accompanying LICENSE file for terms. | ||
@@ -19,11 +19,11 @@ * | ||
*/ | ||
import Ember from 'ember'; | ||
import { dasherize } from '@ember/string'; | ||
import Component from '@ember/component'; | ||
import { get, computed } from '@ember/object'; | ||
import layout from '../templates/components/grid-stack-item'; | ||
const { computed, get } = Ember; | ||
// Common prefix shared by gridstack data attributes | ||
const GS_PREFIX = 'data-gs-'; | ||
export default Ember.Component.extend({ | ||
export default Component.extend({ | ||
layout, | ||
@@ -59,3 +59,3 @@ | ||
Object.keys(options).map(key => { | ||
let dataKey = GS_PREFIX + Ember.String.dasherize(key); | ||
let dataKey = GS_PREFIX + dasherize(key); | ||
@@ -62,0 +62,0 @@ return `options.${key}:${dataKey}`; |
/** | ||
* Copyright 2017, Yahoo Inc. | ||
* Copyright 2018, Yahoo Inc. | ||
* Copyrights licensed under the BSD License. See the accompanying LICENSE file for terms. | ||
@@ -24,8 +24,14 @@ * | ||
*/ | ||
import Ember from 'ember'; | ||
import { assign } from '@ember/polyfills'; | ||
import Component from '@ember/component'; | ||
import { get, computed } from '@ember/object'; | ||
import { run } from '@ember/runloop'; | ||
import { capitalize } from '@ember/string'; | ||
import layout from '../templates/components/grid-stack'; | ||
const { get, run, String: {capitalize} } = Ember; | ||
const GRID_STACK_EVENTS = [ | ||
'dragstart', 'dragstop', 'resizestart', 'resizestop', 'added', 'change', 'enable', 'removed' | ||
]; | ||
export default Ember.Component.extend({ | ||
export default Component.extend({ | ||
layout, | ||
@@ -47,3 +53,3 @@ | ||
*/ | ||
gridStack: Ember.computed(function() { | ||
gridStack: computed(function() { | ||
if(this.$()) { | ||
@@ -58,5 +64,3 @@ return this.$().data('gridstack'); | ||
*/ | ||
gridStackEvents: [ | ||
'dragstart', 'dragstop', 'resizestart', 'resizestop', 'added', 'change', 'enable', 'removed' | ||
], | ||
gridStackEvents: undefined, | ||
@@ -68,2 +72,3 @@ /** | ||
this._super(...arguments); | ||
this.set('gridStackEvents', GRID_STACK_EVENTS); | ||
this._createGridStack(); | ||
@@ -118,3 +123,3 @@ }, | ||
_createGridStack() { | ||
let options = Ember.assign({}, get(this, 'options')); | ||
let options = assign({}, get(this, 'options')); | ||
this.$().gridstack(options); | ||
@@ -121,0 +126,0 @@ |
@@ -1,2 +0,1 @@ | ||
/*jshint node:true*/ | ||
'use strict'; | ||
@@ -3,0 +2,0 @@ |
25
index.js
@@ -12,4 +12,4 @@ /* jshint node: true */ | ||
app.import({ | ||
development: app.bowerDirectory + '/lodash/lodash.js', | ||
production: app.bowerDirectory + '/lodash/dist/lodash.min.js' | ||
development: 'node_modules/lodash/lodash.js', | ||
production: 'node_modules/lodash/dist/lodash.min.js' | ||
}); | ||
@@ -24,4 +24,4 @@ | ||
app.import({ | ||
development: app.bowerDirectory + '/jquery-ui/ui/' + module + '.js', | ||
production: app.bowerDirectory + '/jquery-ui/ui/minified/' + module + '.min.js' | ||
development: 'node_modules/jquery-ui/ui/' + module + '.js', | ||
production: 'node_modules/jquery-ui/ui/minified/' + module + '.min.js' | ||
}); | ||
@@ -32,4 +32,4 @@ }); | ||
app.import({ | ||
development: app.bowerDirectory + '/jquery-ui/ui/widgets/' + module + '.js', | ||
production: app.bowerDirectory + '/jquery-ui/ui/widgets/minified/' + module + '.min.js' | ||
development: 'node_modules/jquery-ui/ui/widgets/' + module + '.js', | ||
production: 'node_modules/jquery-ui/ui/widgets/minified/' + module + '.min.js' | ||
}); | ||
@@ -46,9 +46,10 @@ }); | ||
// Gridstack | ||
app.import({ | ||
development: app.bowerDirectory + '/gridstack/dist/gridstack.js', | ||
production: app.bowerDirectory + '/gridstack/dist/gridstack.min.js' | ||
}); | ||
app.import(app.bowerDirectory + '/gridstack/dist/gridstack.css'); | ||
[ 'gridstack', 'gridstack.jQueryUI' ].forEach(function(module) { | ||
app.import({ | ||
development: 'node_modules/gridstack/dist/'+ module +'.js', | ||
production: 'node_modules/gridstack/dist/'+ module +'.min.js' | ||
}); | ||
}) | ||
app.import('node_modules/gridstack/dist/gridstack.css'); | ||
@@ -55,0 +56,0 @@ }, |
{ | ||
"name": "ember-gridstack", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Ember Gridstack", | ||
@@ -21,32 +21,37 @@ "keywords": [ | ||
"build": "ember build", | ||
"start": "ember server", | ||
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests", | ||
"start": "ember serve", | ||
"test": "ember try:each" | ||
}, | ||
"dependencies": { | ||
"ember-cli-babel": "^5.1.7", | ||
"ember-cli-htmlbars": "^1.0.10" | ||
"ember-cli-babel": "^6.6.0", | ||
"ember-cli-htmlbars": "^2.0.1", | ||
"lodash": "^4.17.10", | ||
"gridstack": "^0.4.0", | ||
"jquery": "^3.1.0", | ||
"jquery-ui": "1.12.1" | ||
}, | ||
"devDependencies": { | ||
"broccoli-asset-rev": "^2.4.5", | ||
"ember-ajax": "^2.4.1", | ||
"ember-assign-polyfill": "2.0.1", | ||
"ember-cli": "2.10.0", | ||
"ember-cli-app-version": "^2.0.0", | ||
"ember-cli-dependency-checker": "^1.3.0", | ||
"ember-cli-htmlbars-inline-precompile": "^0.3.3", | ||
"ember-ajax": "^3.0.0", | ||
"ember-cli": "~2.18.2", | ||
"ember-cli-dependency-checker": "^2.0.0", | ||
"ember-cli-eslint": "^4.2.1", | ||
"ember-cli-htmlbars-inline-precompile": "^1.0.0", | ||
"ember-cli-inject-live-reload": "^1.4.1", | ||
"ember-cli-jshint": "^2.0.1", | ||
"ember-cli-qunit": "^3.0.1", | ||
"ember-cli-release": "^0.2.9", | ||
"ember-cli-qunit": "^4.1.1", | ||
"ember-cli-shims": "^1.2.0", | ||
"ember-cli-sri": "^2.1.0", | ||
"ember-cli-test-loader": "^1.1.0", | ||
"ember-cli-uglify": "^1.2.0", | ||
"ember-disable-prototype-extensions": "^1.1.0", | ||
"ember-export-application-global": "^1.0.5", | ||
"ember-load-initializers": "^0.5.1", | ||
"ember-resolver": "^2.0.3", | ||
"loader.js": "^4.0.10" | ||
"ember-cli-uglify": "^2.0.0", | ||
"ember-disable-prototype-extensions": "^1.1.2", | ||
"ember-export-application-global": "^2.0.0", | ||
"ember-load-initializers": "^1.0.0", | ||
"ember-resolver": "^4.0.0", | ||
"ember-source": "~2.18.0", | ||
"eslint-plugin-ember": "^5.0.0", | ||
"eslint-plugin-node": "^5.2.1", | ||
"loader.js": "^4.2.3" | ||
}, | ||
"engines": { | ||
"node": ">= 0.12.0" | ||
"node": "^4.5 || 6.* || >= 7.*" | ||
}, | ||
@@ -53,0 +58,0 @@ "ember-addon": { |
@@ -47,5 +47,5 @@ # ember-gridstack | ||
**Example:** | ||
```hbs | ||
```hbs | ||
{{#grid-stack | ||
options=(hash | ||
options=(hash | ||
animate=true | ||
@@ -67,3 +67,3 @@ width=12 | ||
**Example:** | ||
```hbs | ||
```hbs | ||
{{#grid-stack | ||
@@ -88,3 +88,3 @@ onDragstart=(action 'dragStart') | ||
**Example:** | ||
```hbs | ||
```hbs | ||
{{#grid-stack as |grid|}} | ||
@@ -108,5 +108,5 @@ {{#grid-stack-item | ||
**Example:** | ||
```hbs | ||
```hbs | ||
{{#grid-stack-item | ||
options=(hash | ||
options=(hash | ||
width=4 | ||
@@ -127,6 +127,6 @@ height=4 | ||
The `{{grid-stack-item}}` component uses the block form to yield the content of the item. In addition, `{{grid-stack-item}}` yields a reference to itself in the case inner components need the reference or would like to listen to events triggered on the grid. | ||
The `{{grid-stack-item}}` component uses the block form to yield the content of the item. In addition, `{{grid-stack-item}}` yields a reference to itself in the case inner components need the reference or would like to listen to events triggered on the grid. | ||
**Example:** | ||
```hbs | ||
```hbs | ||
{{#grid-stack-item | ||
@@ -133,0 +133,0 @@ options=(hash x=0 y=0 width=6 height=2) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
16194
6
12
279
+ Addedgridstack@^0.4.0
+ Addedjquery@^3.1.0
+ Addedjquery-ui@1.12.1
+ Addedlodash@^4.17.10
+ Added@ampproject/remapping@2.3.0(transitive)
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/compat-data@7.26.3(transitive)
+ Added@babel/core@7.26.0(transitive)
+ Added@babel/generator@7.26.3(transitive)
+ Added@babel/helper-compilation-targets@7.25.9(transitive)
+ Added@babel/helper-module-imports@7.25.9(transitive)
+ Added@babel/helper-module-transforms@7.26.0(transitive)
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/helper-validator-option@7.25.9(transitive)
+ Added@babel/helpers@7.26.0(transitive)
+ Added@babel/parser@7.26.3(transitive)
+ Added@babel/template@7.25.9(transitive)
+ Added@babel/traverse@7.26.4(transitive)
+ Added@babel/types@7.26.3(transitive)
+ Added@jridgewell/gen-mapping@0.3.8(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Addedamd-name-resolver@1.2.0(transitive)
+ Addedbabel-code-frame@6.26.0(transitive)
+ Addedbabel-core@6.26.3(transitive)
+ Addedbabel-generator@6.26.1(transitive)
+ Addedbabel-helper-builder-binary-assignment-operator-visitor@6.24.1(transitive)
+ Addedbabel-helper-call-delegate@6.24.1(transitive)
+ Addedbabel-helper-define-map@6.26.0(transitive)
+ Addedbabel-helper-explode-assignable-expression@6.24.1(transitive)
+ Addedbabel-helper-function-name@6.24.1(transitive)
+ Addedbabel-helper-get-function-arity@6.24.1(transitive)
+ Addedbabel-helper-hoist-variables@6.24.1(transitive)
+ Addedbabel-helper-optimise-call-expression@6.24.1(transitive)
+ Addedbabel-helper-regex@6.26.0(transitive)
+ Addedbabel-helper-remap-async-to-generator@6.24.1(transitive)
+ Addedbabel-helper-replace-supers@6.24.1(transitive)
+ Addedbabel-helpers@6.24.1(transitive)
+ Addedbabel-messages@6.23.0(transitive)
+ Addedbabel-plugin-check-es2015-constants@6.22.0(transitive)
+ Addedbabel-plugin-debug-macros@0.2.0(transitive)
+ Addedbabel-plugin-ember-modules-api-polyfill@2.13.4(transitive)
+ Addedbabel-plugin-syntax-async-functions@6.13.0(transitive)
+ Addedbabel-plugin-syntax-exponentiation-operator@6.13.0(transitive)
+ Addedbabel-plugin-syntax-trailing-function-commas@6.22.0(transitive)
+ Addedbabel-plugin-transform-async-to-generator@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-arrow-functions@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-block-scoped-functions@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-block-scoping@6.26.0(transitive)
+ Addedbabel-plugin-transform-es2015-classes@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-computed-properties@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-destructuring@6.23.0(transitive)
+ Addedbabel-plugin-transform-es2015-duplicate-keys@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-for-of@6.23.0(transitive)
+ Addedbabel-plugin-transform-es2015-function-name@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-literals@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-modules-amd@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-modules-commonjs@6.26.2(transitive)
+ Addedbabel-plugin-transform-es2015-modules-systemjs@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-modules-umd@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-object-super@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-parameters@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-shorthand-properties@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-spread@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-sticky-regex@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-template-literals@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-typeof-symbol@6.23.0(transitive)
+ Addedbabel-plugin-transform-es2015-unicode-regex@6.24.1(transitive)
+ Addedbabel-plugin-transform-exponentiation-operator@6.24.1(transitive)
+ Addedbabel-plugin-transform-regenerator@6.26.0(transitive)
+ Addedbabel-plugin-transform-strict-mode@6.24.1(transitive)
+ Addedbabel-polyfill@6.26.0(transitive)
+ Addedbabel-preset-env@1.7.0(transitive)
+ Addedbabel-register@6.26.0(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedbabel-template@6.26.0(transitive)
+ Addedbabel-traverse@6.26.0(transitive)
+ Addedbabel-types@6.26.0(transitive)
+ Addedbabylon@6.18.0(transitive)
+ Addedbroccoli-babel-transpiler@6.5.1(transitive)
+ Addedbroccoli-debug@0.6.5(transitive)
+ Addedbroccoli-funnel@2.0.2(transitive)
+ Addedbroccoli-merge-trees@2.0.1(transitive)
+ Addedbroccoli-source@1.1.0(transitive)
+ Addedbrowserslist@3.2.84.24.3(transitive)
+ Addedcaniuse-lite@1.0.30001689(transitive)
+ Addedconvert-source-map@2.0.0(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addeddetect-indent@4.0.0(transitive)
+ Addedelectron-to-chromium@1.5.74(transitive)
+ Addedember-cli-babel@6.18.0(transitive)
+ Addedember-cli-htmlbars@2.0.5(transitive)
+ Addedember-cli-version-checker@2.2.0(transitive)
+ Addedember-rfc176-data@0.3.18(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedgensync@1.0.0-beta.2(transitive)
+ Addedglobals@11.12.09.18.0(transitive)
+ Addedgridstack@0.4.0(transitive)
+ Addedhome-or-tmp@2.0.0(transitive)
+ Addedinvariant@2.2.4(transitive)
+ Addedjquery@3.7.1(transitive)
+ Addedjquery-ui@1.12.1(transitive)
+ Addedjs-tokens@3.0.24.0.0(transitive)
+ Addedjsesc@1.3.03.1.0(transitive)
+ Addedjson5@0.5.12.2.3(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedlru-cache@5.1.1(transitive)
+ Addedmerge-trees@1.0.1(transitive)
+ Addedms@2.1.3(transitive)
+ Addednode-releases@2.0.19(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedregenerator-runtime@0.10.50.11.1(transitive)
+ Addedregenerator-transform@0.10.1(transitive)
+ Addedregexpu-core@2.0.0(transitive)
+ Addedrepeating@2.0.1(transitive)
+ Addedrsvp@4.8.5(transitive)
+ Addedsemver@6.3.1(transitive)
+ Addedsource-map-support@0.4.18(transitive)
+ Addedstrip-bom@3.0.0(transitive)
+ Addedtree-sync@1.4.0(transitive)
+ Addedupdate-browserslist-db@1.1.1(transitive)
+ Addedyallist@3.1.1(transitive)
- Removedacorn@5.7.4(transitive)
- Removedalign-text@0.1.4(transitive)
- Removedalter@0.2.0(transitive)
- Removedamdefine@1.0.1(transitive)
- Removedast-traverse@0.1.1(transitive)
- Removedast-types@0.8.120.9.6(transitive)
- Removedbabel-core@5.8.38(transitive)
- Removedbabel-plugin-constant-folding@1.0.1(transitive)
- Removedbabel-plugin-dead-code-elimination@1.0.2(transitive)
- Removedbabel-plugin-eval@1.0.1(transitive)
- Removedbabel-plugin-inline-environment-variables@1.0.1(transitive)
- Removedbabel-plugin-jscript@1.0.4(transitive)
- Removedbabel-plugin-member-expression-literals@1.0.1(transitive)
- Removedbabel-plugin-property-literals@1.0.1(transitive)
- Removedbabel-plugin-proto-to-assign@1.0.4(transitive)
- Removedbabel-plugin-react-constant-elements@1.0.3(transitive)
- Removedbabel-plugin-react-display-name@1.0.3(transitive)
- Removedbabel-plugin-remove-console@1.0.1(transitive)
- Removedbabel-plugin-remove-debugger@1.0.1(transitive)
- Removedbabel-plugin-runtime@1.0.7(transitive)
- Removedbabel-plugin-undeclared-variables-check@1.0.2(transitive)
- Removedbabel-plugin-undefined-to-void@1.1.6(transitive)
- Removedbabylon@5.8.38(transitive)
- Removedbluebird@2.11.0(transitive)
- Removedbreakable@1.0.0(transitive)
- Removedbroccoli-babel-transpiler@5.7.4(transitive)
- Removedbroccoli-funnel@1.2.0(transitive)
- Removedbroccoli-merge-trees@1.2.4(transitive)
- Removedcamelcase@1.2.1(transitive)
- Removedcenter-align@0.1.3(transitive)
- Removedcliui@2.1.0(transitive)
- Removedclone@0.2.0(transitive)
- Removedcommander@2.20.3(transitive)
- Removedcommoner@0.10.8(transitive)
- Removedcore-js@1.2.7(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removeddefined@1.0.1(transitive)
- Removeddefs@1.1.1(transitive)
- Removeddetect-indent@3.0.1(transitive)
- Removeddetective@4.7.1(transitive)
- Removedember-cli-babel@5.2.8(transitive)
- Removedember-cli-htmlbars@1.3.5(transitive)
- Removedember-cli-version-checker@1.3.1(transitive)
- Removedesprima@2.7.33.1.3(transitive)
- Removedesprima-fb@15001.1001.0-dev-harmony-fb(transitive)
- Removedexists-sync@0.0.4(transitive)
- Removedfs-readdir-recursive@0.1.2(transitive)
- Removedget-stdin@4.0.1(transitive)
- Removedglobals@6.4.1(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhome-or-tmp@1.0.0(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedinvert-kv@1.0.0(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-integer@1.0.7(transitive)
- Removedis-utf8@0.2.1(transitive)
- Removedjs-tokens@1.0.1(transitive)
- Removedjson5@0.4.0(transitive)
- Removedkind-of@3.2.2(transitive)
- Removedlazy-cache@1.0.4(transitive)
- Removedlcid@1.0.0(transitive)
- Removedleven@1.0.2(transitive)
- Removedlodash@3.10.1(transitive)
- Removedlongest@1.0.1(transitive)
- Removedminimatch@2.0.10(transitive)
- Removedos-locale@1.4.0(transitive)
- Removedoutput-file-sync@1.1.2(transitive)
- Removedpath-exists@1.0.0(transitive)
- Removedq@1.5.1(transitive)
- Removedrecast@0.10.330.11.23(transitive)
- Removedregenerator@0.8.40(transitive)
- Removedregexpu@1.3.0(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedrepeating@1.1.3(transitive)
- Removedright-align@0.1.3(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedshebang-regex@1.0.0(transitive)
- Removedsimple-fmt@0.1.0(transitive)
- Removedsimple-is@0.2.0(transitive)
- Removedsource-map@0.1.32(transitive)
- Removedsource-map-support@0.2.10(transitive)
- Removedstable@0.1.8(transitive)
- Removedstringmap@0.2.2(transitive)
- Removedstringset@0.2.1(transitive)
- Removedstrip-bom@2.0.0(transitive)
- Removedthrough@2.3.8(transitive)
- Removedtry-resolve@1.0.1(transitive)
- Removedtryor@0.1.2(transitive)
- Removeduser-home@1.1.1(transitive)
- Removedwindow-size@0.1.4(transitive)
- Removedwordwrap@0.0.2(transitive)
- Removedy18n@3.2.2(transitive)
- Removedyargs@3.27.0(transitive)
Updatedember-cli-babel@^6.6.0
Updatedember-cli-htmlbars@^2.0.1