Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sortablejs-vue3

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sortablejs-vue3 - npm Package Compare versions

Comparing version 1.2.10 to 1.2.11

15

dist/sortablejs-vue3.es.js

@@ -1,3 +0,4 @@

import { defineComponent, useAttrs, ref, computed, watch, onUnmounted, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot, createElementBlock, Fragment, renderList } from "vue";
import Sortable from "sortablejs";
import { defineComponent, useAttrs, ref, computed, watch, onUnmounted, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot, createElementBlock, Fragment, renderList } from 'vue';
import Sortable from 'sortablejs';
const _sfc_main = /* @__PURE__ */ defineComponent({

@@ -71,3 +72,6 @@ __name: "Sortable",

// See https://github.com/MaxLeiter/sortablejs-vue3/pull/56 for context on `attrs`.
onMove: (event, originalEvent) => "onMoveCapture" in attrs ? attrs.onMoveCapture(event, originalEvent) : emit("move", event, originalEvent),
onMove: (event, originalEvent) => "onMoveCapture" in attrs ? (
/** eslint-disable-next-line */
attrs.onMoveCapture(event, originalEvent)
) : emit("move", event, originalEvent),
onClone: (event) => emit("clone", event),

@@ -120,4 +124,3 @@ onChange: (event) => emit("change", event)

});
export {
_sfc_main as Sortable
};
export { _sfc_main as Sortable };

28

dist/src/components/Sortable.vue.d.ts
import { PropType, Ref } from "vue";
import Sortable from "sortablejs";
import Sortable, { SortableOptions } from "sortablejs";
import type { AutoScrollOptions } from "sortablejs/plugins";
type SortableOptionsProp = Omit<SortableOptions | AutoScrollOptions, "onUnchoose" | "onChoose" | "onStart" | "onEnd" | "onAdd" | "onUpdate" | "onSort" | "onRemove" | "onFilter" | "onMove" | "onClone" | "onChange">;
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
/** All SortableJS options are supported; events are handled by the `defineEmits` below and should be used with v-on */
options: {
type: PropType<Omit<Sortable.SortableOptions | AutoScrollOptions, "onUnchoose" | "onChoose" | "onStart" | "onEnd" | "onAdd" | "onUpdate" | "onSort" | "onRemove" | "onFilter" | "onMove" | "onClone" | "onChange">>;
type: PropType<SortableOptionsProp>;
default: null;

@@ -35,23 +36,12 @@ required: false;

choose: (evt: Sortable.SortableEvent) => void;
} & {
unchoose: (evt: Sortable.SortableEvent) => void;
} & {
start: (evt: Sortable.SortableEvent) => void;
} & {
end: (evt: Sortable.SortableEvent) => void;
} & {
add: (evt: Sortable.SortableEvent) => void;
} & {
update: (evt: Sortable.SortableEvent) => void;
} & {
sort: (evt: Sortable.SortableEvent) => void;
} & {
remove: (evt: Sortable.SortableEvent) => void;
} & {
filter: (evt: Sortable.SortableEvent) => void;
} & {
move: (evt: Sortable.MoveEvent, originalEvent: Event) => void;
} & {
clone: (evt: Sortable.SortableEvent) => void;
} & {
change: (evt: Sortable.SortableEvent) => void;

@@ -61,3 +51,3 @@ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{

options: {
type: PropType<Omit<Sortable.SortableOptions | AutoScrollOptions, "onUnchoose" | "onChoose" | "onStart" | "onEnd" | "onAdd" | "onUpdate" | "onSort" | "onRemove" | "onFilter" | "onMove" | "onClone" | "onChange">>;
type: PropType<SortableOptionsProp>;
default: null;

@@ -98,3 +88,3 @@ required: false;

}, {
options: Omit<Sortable.SortableOptions | AutoScrollOptions, "onUnchoose" | "onChoose" | "onStart" | "onEnd" | "onAdd" | "onUpdate" | "onSort" | "onRemove" | "onFilter" | "onMove" | "onClone" | "onChange">;
options: SortableOptionsProp;
list: any[];

@@ -104,9 +94,9 @@ itemKey: string | ((item: any) => string | number | Symbol);

}, {}>, {
header: (_: {}) => any;
item: (_: {
header?(_: {}): any;
item?(_: {
key: any;
element: any;
index: number;
}) => any;
footer: (_: {}) => any;
}): any;
footer?(_: {}): any;
}>;

@@ -113,0 +103,0 @@ export default _default;

{
"name": "sortablejs-vue3",
"version": "1.2.10",
"version": "1.2.11",
"author": {

@@ -18,10 +18,2 @@ "email": "maxwell.leiter@gmail.com",

},
"scripts": {
"dev": "vite",
"build": "vite build && vue-tsc --emitDeclarationOnly --project tsconfig.dist.json && mv dist/lib dist/types && rm -rf dist/favicon.ico",
"build:site": "vue-tsc --noEmit --project tsconfig.site.json && vite --config vite.site.config.ts build",
"preview": "vite preview",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src",
"format": "yarn prettier --write '**/*.{ts,vue,json}'"
},
"types": "./dist/types/main.d.ts",

@@ -41,27 +33,27 @@ "files": [

"dependencies": {
"pinia": "^2.1.3",
"sortablejs": "github:roy-mdr/Sortable#cee2ee7bccf83a7776c85588759aa0b8",
"vue": "^3.2.37",
"vue-eslint-parser": "^9.3.0"
"sortablejs": "^1.15.0",
"vue": "^3.3.7"
},
"peerDependencies": {
"sortablejs": "github:roy-mdr/Sortable#cee2ee7bccf83a7776c85588759aa0b8",
"sortablejs": "^1.15.0",
"vue": "^3.2.25"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.3.0",
"@types/node": "18.14.2",
"@types/sortablejs": "1.15.0",
"@typescript-eslint/parser": "^5.59.8",
"@vitejs/plugin-vue": "4.0.0",
"@vue/eslint-config-typescript": "^11.0.3",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-vue": "^9.14.1",
"prettier": "2.8.4",
"terser": "5.16.5",
"typescript": "4.9.5",
"vite": "4.1.4",
"vue-tsc": "1.2.0"
"@types/sortablejs": "1.15.4",
"@vitejs/plugin-vue": "4.4.0",
"eslint-config-prettier": "^9.0.0",
"prettier": "3.0.3",
"terser": "5.22.0",
"typescript": "5.2.2",
"vite": "4.5.0",
"vue-tsc": "1.8.22"
},
"scripts": {
"dev": "vite",
"build": "vite build && vue-tsc --emitDeclarationOnly --project tsconfig.dist.json && mv dist/lib dist/types && rm -rf dist/favicon.ico",
"build:site": "vue-tsc --noEmit --project tsconfig.site.json && vite --config vite.site.config.ts build",
"preview": "vite preview",
"lint": "pnpm prettier --write '**/*.{ts,vue,json}'"
}
}
}

@@ -22,3 +22,3 @@ # SortableJS-vue3

```bash
yarn add sortablejs-vue3 sortablejs
pnpm add sortablejs-vue3 sortablejs
```

@@ -68,3 +68,3 @@

4. The `list` and `item-key` props are necessary. The `options` prop is an object that can contain any SortableJS option. You can find a full list of them here: https://github.com/SortableJS/Sortable#options
- The `tag` prop is optional and defaults to `div`. It's the HTML node type for the outer element of the included template/slot.
- The `tag` prop is optional and defaults to `div`. It's the HTML node type for the outer element of the included template/slot.

@@ -107,4 +107,4 @@ ### Props

```typescript
import SortableJs from 'sortablejs';
import { Swap } from 'sortablejs/modular/sortable.core.esm';
import SortableJs from "sortablejs";
import { Swap } from "sortablejs/modular/sortable.core.esm";
SortableJs.mount(new Swap());

@@ -122,3 +122,3 @@

const item = array.splice(from, 1)[0];
array.splice(to, 0, item);
nextTick(() => array.splice(to, 0, item));
};

@@ -131,8 +131,12 @@

### Examples
- [./src/examples/WithStore.vue](./src/examples/WithStore.vue) - A simple example with a store
## Development
1. Run `yarn` to install dependencies
2. `yarn dev` will start a web server with live reloading
3. `yarn build` will build the production library files
4. `yarn build:site` will build the demo website
1. Run `pnpm` to install dependencies
2. `pnpm dev` will start a web server with live reloading
3. `pnpm build` will build the production library files
4. `pnpm build:site` will build the demo website

@@ -139,0 +143,0 @@ ### Recommended IDE Setup

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc