nodeskini 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/README.md +31 -0
  2. package/client/archive/bundle.js +11528 -0
  3. package/client/archive/golem.html +60 -0
  4. package/client/archive/golemClient.js +595 -0
  5. package/client/archive/golembundle.js +11634 -0
  6. package/client/archive/sequencer.html +43 -0
  7. package/client/archive/sequenceurClient.js +815 -0
  8. package/client/archive/stylegolem.css +158 -0
  9. package/client/archive/stylesequenceur.css +204 -0
  10. package/client/clientListe/Sortable-master/.circleci/config.yml +33 -0
  11. package/client/clientListe/Sortable-master/.editorconfig +15 -0
  12. package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/bug-report.md +73 -0
  13. package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/custom-template.md +48 -0
  14. package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/feature-request.md +41 -0
  15. package/client/clientListe/Sortable-master/.jshintrc +25 -0
  16. package/client/clientListe/Sortable-master/.testcaferc.json +7 -0
  17. package/client/clientListe/Sortable-master/CONTRIBUTING.md +26 -0
  18. package/client/clientListe/Sortable-master/LICENSE +21 -0
  19. package/client/clientListe/Sortable-master/README.md +813 -0
  20. package/client/clientListe/Sortable-master/Sortable.js +3709 -0
  21. package/client/clientListe/Sortable-master/Sortable.min.js +2 -0
  22. package/client/clientListe/Sortable-master/Sortable.min.old.js +2 -0
  23. package/client/clientListe/Sortable-master/Sortable.min.old.old.js +2 -0
  24. package/client/clientListe/Sortable-master/babel.config.js +27 -0
  25. package/client/clientListe/Sortable-master/bower.json +30 -0
  26. package/client/clientListe/Sortable-master/entry/entry-complete.js +8 -0
  27. package/client/clientListe/Sortable-master/entry/entry-core.js +19 -0
  28. package/client/clientListe/Sortable-master/entry/entry-defaults.js +19 -0
  29. package/client/clientListe/Sortable-master/index.html +460 -0
  30. package/client/clientListe/Sortable-master/modular/sortable.complete.esm.js +3701 -0
  31. package/client/clientListe/Sortable-master/modular/sortable.core.esm.js +3698 -0
  32. package/client/clientListe/Sortable-master/modular/sortable.esm.js +3699 -0
  33. package/client/clientListe/Sortable-master/package-lock.json +5704 -0
  34. package/client/clientListe/Sortable-master/package.json +56 -0
  35. package/client/clientListe/Sortable-master/plugins/AutoScroll/AutoScroll.js +270 -0
  36. package/client/clientListe/Sortable-master/plugins/AutoScroll/README.md +80 -0
  37. package/client/clientListe/Sortable-master/plugins/AutoScroll/index.js +1 -0
  38. package/client/clientListe/Sortable-master/plugins/MultiDrag/MultiDrag.js +617 -0
  39. package/client/clientListe/Sortable-master/plugins/MultiDrag/README.md +96 -0
  40. package/client/clientListe/Sortable-master/plugins/MultiDrag/index.js +1 -0
  41. package/client/clientListe/Sortable-master/plugins/OnSpill/OnSpill.js +79 -0
  42. package/client/clientListe/Sortable-master/plugins/OnSpill/README.md +60 -0
  43. package/client/clientListe/Sortable-master/plugins/OnSpill/index.js +1 -0
  44. package/client/clientListe/Sortable-master/plugins/README.md +178 -0
  45. package/client/clientListe/Sortable-master/plugins/Swap/README.md +55 -0
  46. package/client/clientListe/Sortable-master/plugins/Swap/Swap.js +90 -0
  47. package/client/clientListe/Sortable-master/plugins/Swap/index.js +1 -0
  48. package/client/clientListe/Sortable-master/scripts/banner.js +8 -0
  49. package/client/clientListe/Sortable-master/scripts/build.js +17 -0
  50. package/client/clientListe/Sortable-master/scripts/esm-build.js +28 -0
  51. package/client/clientListe/Sortable-master/scripts/minify.js +11 -0
  52. package/client/clientListe/Sortable-master/scripts/test-compat.js +30 -0
  53. package/client/clientListe/Sortable-master/scripts/test.js +21 -0
  54. package/client/clientListe/Sortable-master/scripts/umd-build.js +15 -0
  55. package/client/clientListe/Sortable-master/src/Animation.js +175 -0
  56. package/client/clientListe/Sortable-master/src/BrowserInfo.js +12 -0
  57. package/client/clientListe/Sortable-master/src/EventDispatcher.js +57 -0
  58. package/client/clientListe/Sortable-master/src/PluginManager.js +87 -0
  59. package/client/clientListe/Sortable-master/src/Sortable.js +1971 -0
  60. package/client/clientListe/Sortable-master/src/utils.js +556 -0
  61. package/client/clientListe/Sortable-master/st/app.js +224 -0
  62. package/client/clientListe/Sortable-master/st/iframe/frame.html +32 -0
  63. package/client/clientListe/Sortable-master/st/iframe/index.html +49 -0
  64. package/client/clientListe/Sortable-master/st/logo.png +0 -0
  65. package/client/clientListe/Sortable-master/st/og-image.png +0 -0
  66. package/client/clientListe/Sortable-master/st/prettify/prettify.css +1 -0
  67. package/client/clientListe/Sortable-master/st/prettify/prettify.js +46 -0
  68. package/client/clientListe/Sortable-master/st/prettify/run_prettify.js +64 -0
  69. package/client/clientListe/Sortable-master/st/saucelabs.svg +1 -0
  70. package/client/clientListe/Sortable-master/st/theme.css +254 -0
  71. package/client/clientListe/Sortable-master/tests/Sortable.compat.test.js +39 -0
  72. package/client/clientListe/Sortable-master/tests/Sortable.test.js +386 -0
  73. package/client/clientListe/Sortable-master/tests/dual-list.html +34 -0
  74. package/client/clientListe/Sortable-master/tests/empty-list.html +30 -0
  75. package/client/clientListe/Sortable-master/tests/filter.html +27 -0
  76. package/client/clientListe/Sortable-master/tests/handles.html +27 -0
  77. package/client/clientListe/Sortable-master/tests/nested.html +67 -0
  78. package/client/clientListe/Sortable-master/tests/single-list.html +25 -0
  79. package/client/clientListe/Sortable-master/tests/style.css +18 -0
  80. package/client/clientListe/clientListe.html +148 -0
  81. package/client/clientListe/clientListe.js +1508 -0
  82. package/client/clientListe/clientListebundle.js +13164 -0
  83. package/client/clientListe/images/poubelle.png +0 -0
  84. package/client/clientListe/images/start.png +0 -0
  85. package/client/clientListe/images/stop.png +0 -0
  86. package/client/clientListe/images/submit.png +0 -0
  87. package/client/clientListe/sortable-theme-bootstrap.css +90 -0
  88. package/client/configurateur/configReact.js +273 -0
  89. package/client/configurateur/configReactbundle.js +295 -0
  90. package/client/configurateur/configurateur.css +95 -0
  91. package/client/configurateur/configurateur.html +48 -0
  92. package/client/configurateur/lib/jexcel.css +755 -0
  93. package/client/configurateur/lib/jexcel.js +14970 -0
  94. package/client/configurateur/lib/jsuites.css +2801 -0
  95. package/client/configurateur/lib/jsuites.js +11822 -0
  96. package/client/configurateur/lib/react-dom.production.min.js +239 -0
  97. package/client/configurateur/lib/react.production.min.js +32 -0
  98. package/client/configurateur/src/configReact.js +247 -0
  99. package/client/controleur/clientcontroleur.js +536 -0
  100. package/client/controleur/clientcontroleur.test.js +282 -0
  101. package/client/controleur/controleur.html +51 -0
  102. package/client/controleur/controleurbundle.js +565 -0
  103. package/client/controleur/stylecontroleur.css +236 -0
  104. package/client/controleurHH/controleurHH.html +71 -0
  105. package/client/controleurHH/controleurHH.js +252 -0
  106. package/client/controleurHH/styles/index.css +320 -0
  107. package/client/controleurHH/styles/material.css +11552 -0
  108. package/client/parametrage/paramReact.js +473 -0
  109. package/client/parametrage/paramReactbundle.js +500 -0
  110. package/client/parametrage/parametrage.css +111 -0
  111. package/client/parametrage/parametrage.html +163 -0
  112. package/client/parametrage/src/paramReact.js +459 -0
  113. package/client/score/hash.js +83 -0
  114. package/client/score/p5.min.js +3 -0
  115. package/client/score/parto1.js +1171 -0
  116. package/client/score/parto1bundle.js +1181 -0
  117. package/client/score/processing.min.js +431 -0
  118. package/client/score/score.html +15 -0
  119. package/client/score/score.js +34 -0
  120. package/client/simulateurListe/simulateurFork.js +750 -0
  121. package/client/simulateurListe/simulateurFork.mjs +681 -0
  122. package/client/simulateurListe/simulateurForkSansReorg.js +569 -0
  123. package/client/simulateurListe/simulateurListe.js +628 -0
  124. package/myReact/archive/Nodeemitvaluedlocal1.hh.js +52 -0
  125. package/myReact/archive/abort-parNode.js +79 -0
  126. package/myReact/archive/abroNode.js +169 -0
  127. package/myReact/archive/abroNode2.js +80 -0
  128. package/myReact/archive/atom.compile.hh.js +51 -0
  129. package/myReact/archive/await-countNode.js +67 -0
  130. package/myReact/archive/await-nowvalNode.js +44 -0
  131. package/myReact/archive/callHH.js +96 -0
  132. package/myReact/archive/emit-if2.hh.compiled.js +113 -0
  133. package/myReact/archive/every1Node.js +35 -0
  134. package/myReact/archive/if-runNode.js +74 -0
  135. package/myReact/archive/if1Node.js +43 -0
  136. package/myReact/archive/makeawait.js +0 -0
  137. package/myReact/archive/myReact.old.js +684 -0
  138. package/myReact/archive/orchestration.js +281 -0
  139. package/myReact/archive/orchestration1.js +132 -0
  140. package/myReact/archive/orchestration1.xml +465 -0
  141. package/myReact/archive/orchestration2.js +161 -0
  142. package/myReact/archive/orchestrationHH.mano.js +280 -0
  143. package/myReact/archive/orchestrationHHTest.js +428 -0
  144. package/myReact/archive/orchestrationHHTest.xml +234 -0
  145. package/myReact/archive/orchestrationHHTestRun.js +104 -0
  146. package/myReact/archive/orchestrationHHTestRun.xml +34 -0
  147. package/myReact/archive/orchestrationTest0.js +178 -0
  148. package/myReact/archive/orchestrationTest1.js +181 -0
  149. package/myReact/archive/orchestrationTest2.js +281 -0
  150. package/myReact/archive/run3pointsNode.js +59 -0
  151. package/myReact/archive/runNode.js +123 -0
  152. package/myReact/archive/runNode2.js +91 -0
  153. package/myReact/archive/testAwait1.js +141 -0
  154. package/myReact/archive/testAwait1.xml +86 -0
  155. package/myReact/archive/testEvery1.js +122 -0
  156. package/myReact/archive/testEvery1.xml +79 -0
  157. package/myReact/archive/testHH1.js +135 -0
  158. package/myReact/archive/testHH1.xml +86 -0
  159. package/myReact/archive/testHH1revu.js +104 -0
  160. package/myReact/archive/testHH2.js +122 -0
  161. package/myReact/archive/testHH2.xml +79 -0
  162. package/myReact/archive/testHH3.js +130 -0
  163. package/myReact/archive/testHH3.xml +86 -0
  164. package/myReact/archive/testHHabort.js +121 -0
  165. package/myReact/archive/testHHabort.xml +83 -0
  166. package/myReact/archive/testMakeawait.js +202 -0
  167. package/myReact/archive/testRun1.js +168 -0
  168. package/myReact/archive/testRun1.xml +142 -0
  169. package/myReact/archive/titi.js +28 -0
  170. package/myReact/archive/titi.xml +110 -0
  171. package/myReact/archive/toto.js +73 -0
  172. package/myReact/archive/toto.xml +198 -0
  173. package/myReact/archive/trap-await-parallelNode.js +123 -0
  174. package/myReact/inutiles/hiver2022.xml +804 -0
  175. package/myReact/inutiles/hopeNode.xml +459 -0
  176. package/myReact/inutiles/mars2022.xml +871 -0
  177. package/myReact/inutiles/mystique1.xml +318 -0
  178. package/myReact/inutiles/mystiqueOSC.xml +277 -0
  179. package/myReact/inutiles/opus5Node.xml +1271 -0
  180. package/myReact/inutiles/opus5NodeLinux.xml +1241 -0
  181. package/myReact/inutiles/orchestrationHH.xml +541 -0
  182. package/myReact/inutiles/orchestrationHH2.xml +547 -0
  183. package/myReact/inutiles/testHH.xml +95 -0
  184. package/myReact/inutiles/trouveLaPercuTenor.xml +349 -0
  185. package/myReact/myReact.js +744 -0
  186. package/myReact/myReact.min.js +1 -0
  187. package/myReact/orchestrationHH.js +311 -0
  188. package/myReact/orchestrationHH.mjs +436 -0
  189. package/myReact/orchestrationHH.mjs.map +1 -0
  190. package/package.json +46 -0
  191. package/serveur/OSCandMidi.mjs +361 -0
  192. package/serveur/computeScore.mjs +415 -0
  193. package/serveur/controleDAW.mjs +1149 -0
  194. package/serveur/defaultSession.csv +2 -0
  195. package/serveur/defaultSkiniParametres.js +119 -0
  196. package/serveur/gameOSC.mjs +96 -0
  197. package/serveur/groupeClientsSons.mjs +1014 -0
  198. package/serveur/ipConfig.json +24 -0
  199. package/serveur/ipConfig127.json +19 -0
  200. package/serveur/ipConfig75.json +17 -0
  201. package/serveur/ipConfigBH.json +19 -0
  202. package/serveur/ipConfigLocal.json +19 -0
  203. package/serveur/midiConfig.json +26 -0
  204. package/serveur/midiConfigBH.json +26 -0
  205. package/serveur/midiConfigVoid.json +3 -0
  206. package/serveur/midimix.mjs +570 -0
  207. package/serveur/saveParam.mjs +159 -0
  208. package/serveur/skiniParametres.good.js +132 -0
  209. package/serveur/skiniParametres.js +106 -0
  210. package/serveur/utilsHHSkini.hh.js +64 -0
  211. package/serveur/utilsSkini.mjs +137 -0
  212. package/serveur/websocketServer.mjs +2052 -0
  213. package/serveur/workerInterfaceZ.mjs +327 -0
  214. package/serveur/workerSynchro.mjs +49 -0
  215. package/skini.mjs +141 -0
@@ -0,0 +1,813 @@
1
+ # Sortable   [![Financial Contributors on Open Collective](https://opencollective.com/Sortable/all/badge.svg?label=financial+contributors)](https://opencollective.com/Sortable) [![CircleCI](https://circleci.com/gh/SortableJS/Sortable.svg?style=svg)](https://circleci.com/gh/SortableJS/Sortable) [![DeepScan grade](https://deepscan.io/api/teams/3901/projects/5666/branches/43977/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=3901&pid=5666&bid=43977) [![](https://data.jsdelivr.com/v1/package/npm/sortablejs/badge)](https://www.jsdelivr.com/package/npm/sortablejs) [![npm](https://img.shields.io/npm/v/sortablejs.svg)](https://www.npmjs.com/package/sortablejs)
2
+
3
+ Sortable is a JavaScript library for reorderable drag-and-drop lists.
4
+
5
+ Demo: http://sortablejs.github.io/Sortable/
6
+
7
+ [<img width="250px" src="https://raw.githubusercontent.com/SortableJS/Sortable/HEAD/st/saucelabs.svg?sanitize=true">](https://saucelabs.com/)
8
+
9
+ ## Features
10
+
11
+ * Supports touch devices and [modern](http://caniuse.com/#search=drag) browsers (including IE9)
12
+ * Can drag from one list to another or within the same list
13
+ * CSS animation when moving items
14
+ * Supports drag handles *and selectable text* (better than voidberg's html5sortable)
15
+ * Smart auto-scrolling
16
+ * Advanced swap detection
17
+ * Smooth animations
18
+ * [Multi-drag](https://github.com/SortableJS/Sortable/tree/master/plugins/MultiDrag) support
19
+ * Support for CSS transforms
20
+ * Built using native HTML5 drag and drop API
21
+ * Supports
22
+ * [Meteor](https://github.com/SortableJS/meteor-sortablejs)
23
+ * Angular
24
+ * [2.0+](https://github.com/SortableJS/angular-sortablejs)
25
+ * [1.&ast;](https://github.com/SortableJS/angular-legacy-sortablejs)
26
+ * React
27
+ * [ES2015+](https://github.com/SortableJS/react-sortablejs)
28
+ * [Mixin](https://github.com/SortableJS/react-mixin-sortablejs)
29
+ * [Knockout](https://github.com/SortableJS/knockout-sortablejs)
30
+ * [Polymer](https://github.com/SortableJS/polymer-sortablejs)
31
+ * [Vue](https://github.com/SortableJS/Vue.Draggable)
32
+ * [Ember](https://github.com/SortableJS/ember-sortablejs)
33
+ * Supports any CSS library, e.g. [Bootstrap](#bs)
34
+ * Simple API
35
+ * Support for [plugins](#plugins)
36
+ * [CDN](#cdn)
37
+ * No jQuery required (but there is [support](https://github.com/SortableJS/jquery-sortablejs))
38
+ * Typescript definitions at `@types/sortablejs`
39
+
40
+
41
+ <br/>
42
+
43
+
44
+ ### Articles
45
+
46
+ * [Dragging Multiple Items in Sortable](https://github.com/SortableJS/Sortable/wiki/Dragging-Multiple-Items-in-Sortable) (April 26, 2019)
47
+ * [Swap Thresholds and Direction](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction) (December 2, 2018)
48
+ * [Sortable v1.0 — New capabilities](https://github.com/SortableJS/Sortable/wiki/Sortable-v1.0-—-New-capabilities/) (December 22, 2014)
49
+ * [Sorting with the help of HTML5 Drag'n'Drop API](https://github.com/SortableJS/Sortable/wiki/Sorting-with-the-help-of-HTML5-Drag'n'Drop-API/) (December 23, 2013)
50
+
51
+ <br/>
52
+
53
+ ### Getting Started
54
+
55
+ Install with NPM:
56
+ ```bash
57
+ $ npm install sortablejs --save
58
+ ```
59
+
60
+ Install with Bower:
61
+ ```bash
62
+ $ bower install --save sortablejs
63
+ ```
64
+
65
+ Import into your project:
66
+ ```js
67
+ // Default SortableJS
68
+ import Sortable from 'sortablejs';
69
+
70
+ // Core SortableJS (without default plugins)
71
+ import Sortable from 'sortablejs/modular/sortable.core.esm.js';
72
+
73
+ // Complete SortableJS (with all plugins)
74
+ import Sortable from 'sortablejs/modular/sortable.complete.esm.js';
75
+ ```
76
+
77
+ Cherrypick plugins:
78
+ ```js
79
+ // Cherrypick extra plugins
80
+ import Sortable, { MultiDrag, Swap } from 'sortablejs';
81
+
82
+ Sortable.mount(new MultiDrag(), new Swap());
83
+
84
+
85
+ // Cherrypick default plugins
86
+ import Sortable, { AutoScroll } from 'sortablejs/modular/sortable.core.esm.js';
87
+
88
+ Sortable.mount(new AutoScroll());
89
+ ```
90
+
91
+
92
+ ---
93
+
94
+
95
+ ### Usage
96
+ ```html
97
+ <ul id="items">
98
+ <li>item 1</li>
99
+ <li>item 2</li>
100
+ <li>item 3</li>
101
+ </ul>
102
+ ```
103
+
104
+ ```js
105
+ var el = document.getElementById('items');
106
+ var sortable = Sortable.create(el);
107
+ ```
108
+
109
+ You can use any element for the list and its elements, not just `ul`/`li`. Here is an [example with `div`s](https://jsbin.com/visimub/edit?html,js,output).
110
+
111
+
112
+ ---
113
+
114
+
115
+ ### Options
116
+ ```js
117
+ var sortable = new Sortable(el, {
118
+ group: "name", // or { name: "...", pull: [true, false, 'clone', array], put: [true, false, array] }
119
+ sort: true, // sorting inside list
120
+ delay: 0, // time in milliseconds to define when the sorting should start
121
+ delayOnTouchOnly: false, // only delay if user is using touch
122
+ touchStartThreshold: 0, // px, how many pixels the point should move before cancelling a delayed drag event
123
+ disabled: false, // Disables the sortable if set to true.
124
+ store: null, // @see Store
125
+ animation: 150, // ms, animation speed moving items when sorting, `0` — without animation
126
+ easing: "cubic-bezier(1, 0, 0, 1)", // Easing for animation. Defaults to null. See https://easings.net/ for examples.
127
+ handle: ".my-handle", // Drag handle selector within list items
128
+ filter: ".ignore-elements", // Selectors that do not lead to dragging (String or Function)
129
+ preventOnFilter: true, // Call `event.preventDefault()` when triggered `filter`
130
+ draggable: ".item", // Specifies which items inside the element should be draggable
131
+
132
+ dataIdAttr: 'data-id',
133
+
134
+ ghostClass: "sortable-ghost", // Class name for the drop placeholder
135
+ chosenClass: "sortable-chosen", // Class name for the chosen item
136
+ dragClass: "sortable-drag", // Class name for the dragging item
137
+
138
+ swapThreshold: 1, // Threshold of the swap zone
139
+ invertSwap: false, // Will always use inverted swap zone if set to true
140
+ invertedSwapThreshold: 1, // Threshold of the inverted swap zone (will be set to swapThreshold value by default)
141
+ direction: 'horizontal', // Direction of Sortable (will be detected automatically if not given)
142
+
143
+ forceFallback: false, // ignore the HTML5 DnD behaviour and force the fallback to kick in
144
+
145
+ fallbackClass: "sortable-fallback", // Class name for the cloned DOM Element when using forceFallback
146
+ fallbackOnBody: false, // Appends the cloned DOM Element into the Document's Body
147
+ fallbackTolerance: 0, // Specify in pixels how far the mouse should move before it's considered as a drag.
148
+
149
+ dragoverBubble: false,
150
+ removeCloneOnHide: true, // Remove the clone element when it is not showing, rather than just hiding it
151
+ emptyInsertThreshold: 5, // px, distance mouse must be from empty sortable to insert drag element into it
152
+
153
+
154
+ setData: function (/** DataTransfer */dataTransfer, /** HTMLElement*/dragEl) {
155
+ dataTransfer.setData('Text', dragEl.textContent); // `dataTransfer` object of HTML5 DragEvent
156
+ },
157
+
158
+ // Element is chosen
159
+ onChoose: function (/**Event*/evt) {
160
+ evt.oldIndex; // element index within parent
161
+ },
162
+
163
+ // Element is unchosen
164
+ onUnchoose: function(/**Event*/evt) {
165
+ // same properties as onEnd
166
+ },
167
+
168
+ // Element dragging started
169
+ onStart: function (/**Event*/evt) {
170
+ evt.oldIndex; // element index within parent
171
+ },
172
+
173
+ // Element dragging ended
174
+ onEnd: function (/**Event*/evt) {
175
+ var itemEl = evt.item; // dragged HTMLElement
176
+ evt.to; // target list
177
+ evt.from; // previous list
178
+ evt.oldIndex; // element's old index within old parent
179
+ evt.newIndex; // element's new index within new parent
180
+ evt.oldDraggableIndex; // element's old index within old parent, only counting draggable elements
181
+ evt.newDraggableIndex; // element's new index within new parent, only counting draggable elements
182
+ evt.clone // the clone element
183
+ evt.pullMode; // when item is in another sortable: `"clone"` if cloning, `true` if moving
184
+ },
185
+
186
+ // Element is dropped into the list from another list
187
+ onAdd: function (/**Event*/evt) {
188
+ // same properties as onEnd
189
+ },
190
+
191
+ // Changed sorting within list
192
+ onUpdate: function (/**Event*/evt) {
193
+ // same properties as onEnd
194
+ },
195
+
196
+ // Called by any change to the list (add / update / remove)
197
+ onSort: function (/**Event*/evt) {
198
+ // same properties as onEnd
199
+ },
200
+
201
+ // Element is removed from the list into another list
202
+ onRemove: function (/**Event*/evt) {
203
+ // same properties as onEnd
204
+ },
205
+
206
+ // Attempt to drag a filtered element
207
+ onFilter: function (/**Event*/evt) {
208
+ var itemEl = evt.item; // HTMLElement receiving the `mousedown|tapstart` event.
209
+ },
210
+
211
+ // Event when you move an item in the list or between lists
212
+ onMove: function (/**Event*/evt, /**Event*/originalEvent) {
213
+ // Example: https://jsbin.com/nawahef/edit?js,output
214
+ evt.dragged; // dragged HTMLElement
215
+ evt.draggedRect; // DOMRect {left, top, right, bottom}
216
+ evt.related; // HTMLElement on which have guided
217
+ evt.relatedRect; // DOMRect
218
+ evt.willInsertAfter; // Boolean that is true if Sortable will insert drag element after target by default
219
+ originalEvent.clientY; // mouse position
220
+ // return false; — for cancel
221
+ // return -1; — insert before target
222
+ // return 1; — insert after target
223
+ },
224
+
225
+ // Called when creating a clone of element
226
+ onClone: function (/**Event*/evt) {
227
+ var origEl = evt.item;
228
+ var cloneEl = evt.clone;
229
+ },
230
+
231
+ // Called when dragging element changes position
232
+ onChange: function(/**Event*/evt) {
233
+ evt.newIndex // most likely why this event is used is to get the dragging element's current index
234
+ // same properties as onEnd
235
+ }
236
+ });
237
+ ```
238
+
239
+
240
+ ---
241
+
242
+
243
+ #### `group` option
244
+ To drag elements from one list into another, both lists must have the same `group` value.
245
+ You can also define whether lists can give away, give and keep a copy (`clone`), and receive elements.
246
+
247
+ * name: `String` — group name
248
+ * pull: `true|false|["foo", "bar"]|'clone'|function` — ability to move from the list. `clone` — copy the item, rather than move. Or an array of group names which the elements may be put in. Defaults to `true`.
249
+ * put: `true|false|["baz", "qux"]|function` — whether elements can be added from other lists, or an array of group names from which elements can be added.
250
+ * revertClone: `boolean` — revert cloned element to initial position after moving to a another list.
251
+
252
+
253
+ Demo:
254
+ - https://jsbin.com/hijetos/edit?js,output
255
+ - https://jsbin.com/nacoyah/edit?js,output — use of complex logic in the `pull` and` put`
256
+ - https://jsbin.com/bifuyab/edit?js,output — use `revertClone: true`
257
+
258
+
259
+ ---
260
+
261
+
262
+ #### `sort` option
263
+ Allow sorting inside list.
264
+
265
+ Demo: https://jsbin.com/jayedig/edit?js,output
266
+
267
+
268
+ ---
269
+
270
+
271
+ #### `delay` option
272
+ Time in milliseconds to define when the sorting should start.
273
+ Unfortunately, due to browser restrictions, delaying is not possible on IE or Edge with native drag & drop.
274
+
275
+ Demo: https://jsbin.com/zosiwah/edit?js,output
276
+
277
+
278
+ ---
279
+
280
+
281
+ #### `delayOnTouchOnly` option
282
+ Whether or not the delay should be applied only if the user is using touch (eg. on a mobile device). No delay will be applied in any other case. Defaults to `false`.
283
+
284
+
285
+ ---
286
+
287
+
288
+ #### `swapThreshold` option
289
+ Percentage of the target that the swap zone will take up, as a float between `0` and `1`.
290
+
291
+ [Read more](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#swap-threshold)
292
+
293
+ Demo: http://sortablejs.github.io/Sortable#thresholds
294
+
295
+
296
+ ---
297
+
298
+
299
+ #### `invertSwap` option
300
+ Set to `true` to set the swap zone to the sides of the target, for the effect of sorting "in between" items.
301
+
302
+ [Read more](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#forcing-inverted-swap-zone)
303
+
304
+ Demo: http://sortablejs.github.io/Sortable#thresholds
305
+
306
+
307
+ ---
308
+
309
+
310
+ #### `invertedSwapThreshold` option
311
+ Percentage of the target that the inverted swap zone will take up, as a float between `0` and `1`. If not given, will default to `swapThreshold`.
312
+
313
+ [Read more](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#dealing-with-swap-glitching)
314
+
315
+
316
+ ---
317
+
318
+
319
+ #### `direction` option
320
+ Direction that the Sortable should sort in. Can be set to `'vertical'`, `'horizontal'`, or a function, which will be called whenever a target is dragged over. Must return `'vertical'` or `'horizontal'`.
321
+
322
+ [Read more](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#direction)
323
+
324
+
325
+ Example of direction detection for vertical list that includes full column and half column elements:
326
+
327
+ ```js
328
+ Sortable.create(el, {
329
+ direction: function(evt, target, dragEl) {
330
+ if (target !== null && target.className.includes('half-column') && dragEl.className.includes('half-column')) {
331
+ return 'horizontal';
332
+ }
333
+ return 'vertical';
334
+ }
335
+ });
336
+ ```
337
+
338
+
339
+ ---
340
+
341
+
342
+ #### `touchStartThreshold` option
343
+ This option is similar to `fallbackTolerance` option.
344
+
345
+ When the `delay` option is set, some phones with very sensitive touch displays like the Samsung Galaxy S8 will fire
346
+ unwanted touchmove events even when your finger is not moving, resulting in the sort not triggering.
347
+
348
+ This option sets the minimum pointer movement that must occur before the delayed sorting is cancelled.
349
+
350
+ Values between 3 to 5 are good.
351
+
352
+
353
+ ---
354
+
355
+
356
+ #### `disabled` options
357
+ Disables the sortable if set to `true`.
358
+
359
+ Demo: https://jsbin.com/sewokud/edit?js,output
360
+
361
+ ```js
362
+ var sortable = Sortable.create(list);
363
+
364
+ document.getElementById("switcher").onclick = function () {
365
+ var state = sortable.option("disabled"); // get
366
+
367
+ sortable.option("disabled", !state); // set
368
+ };
369
+ ```
370
+
371
+
372
+ ---
373
+
374
+
375
+ #### `handle` option
376
+ To make list items draggable, Sortable disables text selection by the user.
377
+ That's not always desirable. To allow text selection, define a drag handler,
378
+ which is an area of every list element that allows it to be dragged around.
379
+
380
+ Demo: https://jsbin.com/numakuh/edit?html,js,output
381
+
382
+ ```js
383
+ Sortable.create(el, {
384
+ handle: ".my-handle"
385
+ });
386
+ ```
387
+
388
+ ```html
389
+ <ul>
390
+ <li><span class="my-handle">::</span> list item text one
391
+ <li><span class="my-handle">::</span> list item text two
392
+ </ul>
393
+ ```
394
+
395
+ ```css
396
+ .my-handle {
397
+ cursor: move;
398
+ cursor: -webkit-grabbing;
399
+ }
400
+ ```
401
+
402
+
403
+ ---
404
+
405
+
406
+ #### `filter` option
407
+
408
+
409
+ ```js
410
+ Sortable.create(list, {
411
+ filter: ".js-remove, .js-edit",
412
+ onFilter: function (evt) {
413
+ var item = evt.item,
414
+ ctrl = evt.target;
415
+
416
+ if (Sortable.utils.is(ctrl, ".js-remove")) { // Click on remove button
417
+ item.parentNode.removeChild(item); // remove sortable item
418
+ }
419
+ else if (Sortable.utils.is(ctrl, ".js-edit")) { // Click on edit link
420
+ // ...
421
+ }
422
+ }
423
+ })
424
+ ```
425
+
426
+
427
+ ---
428
+
429
+
430
+ #### `ghostClass` option
431
+ Class name for the drop placeholder (default `sortable-ghost`).
432
+
433
+ Demo: https://jsbin.com/henuyiw/edit?css,js,output
434
+
435
+ ```css
436
+ .ghost {
437
+ opacity: 0.4;
438
+ }
439
+ ```
440
+
441
+ ```js
442
+ Sortable.create(list, {
443
+ ghostClass: "ghost"
444
+ });
445
+ ```
446
+
447
+
448
+ ---
449
+
450
+
451
+ #### `chosenClass` option
452
+ Class name for the chosen item (default `sortable-chosen`).
453
+
454
+ Demo: https://jsbin.com/hoqufox/edit?css,js,output
455
+
456
+ ```css
457
+ .chosen {
458
+ color: #fff;
459
+ background-color: #c00;
460
+ }
461
+ ```
462
+
463
+ ```js
464
+ Sortable.create(list, {
465
+ delay: 500,
466
+ chosenClass: "chosen"
467
+ });
468
+ ```
469
+
470
+
471
+ ---
472
+
473
+
474
+ #### `forceFallback` option
475
+ If set to `true`, the Fallback for non HTML5 Browser will be used, even if we are using an HTML5 Browser.
476
+ This gives us the possibility to test the behaviour for older Browsers even in newer Browser, or make the Drag 'n Drop feel more consistent between Desktop , Mobile and old Browsers.
477
+
478
+ On top of that, the Fallback always generates a copy of that DOM Element and appends the class `fallbackClass` defined in the options. This behaviour controls the look of this 'dragged' Element.
479
+
480
+ Demo: https://jsbin.com/sibiput/edit?html,css,js,output
481
+
482
+
483
+ ---
484
+
485
+
486
+ #### `fallbackTolerance` option
487
+ Emulates the native drag threshold. Specify in pixels how far the mouse should move before it's considered as a drag.
488
+ Useful if the items are also clickable like in a list of links.
489
+
490
+ When the user clicks inside a sortable element, it's not uncommon for your hand to move a little between the time you press and the time you release.
491
+ Dragging only starts if you move the pointer past a certain tolerance, so that you don't accidentally start dragging every time you click.
492
+
493
+ 3 to 5 are probably good values.
494
+
495
+
496
+ ---
497
+
498
+
499
+ #### `dragoverBubble` option
500
+ If set to `true`, the dragover event will bubble to parent sortables. Works on both fallback and native dragover event.
501
+ By default, it is false, but Sortable will only stop bubbling the event once the element has been inserted into a parent Sortable, or *can* be inserted into a parent Sortable, but isn't at that specific time (due to animation, etc).
502
+
503
+ Since 1.8.0, you will probably want to leave this option as false. Before 1.8.0, it may need to be `true` for nested sortables to work.
504
+
505
+
506
+ ---
507
+
508
+
509
+ #### `removeCloneOnHide` option
510
+ If set to `false`, the clone is hidden by having it's CSS `display` property set to `none`.
511
+ By default, this option is `true`, meaning Sortable will remove the cloned element from the DOM when it is supposed to be hidden.
512
+
513
+
514
+ ---
515
+
516
+
517
+ #### `emptyInsertThreshold` option
518
+ The distance (in pixels) the mouse must be from an empty sortable while dragging for the drag element to be inserted into that sortable. Defaults to `5`. Set to `0` to disable this feature.
519
+
520
+ Demo: https://jsbin.com/becavoj/edit?js,output
521
+
522
+
523
+ ---
524
+ ### Event object ([demo](https://jsbin.com/fogujiv/edit?js,output))
525
+
526
+ - to:`HTMLElement` — list, in which moved element
527
+ - from:`HTMLElement` — previous list
528
+ - item:`HTMLElement` — dragged element
529
+ - clone:`HTMLElement`
530
+ - oldIndex:`Number|undefined` — old index within parent
531
+ - newIndex:`Number|undefined` — new index within parent
532
+ - oldDraggableIndex: `Number|undefined` — old index within parent, only counting draggable elements
533
+ - newDraggableIndex: `Number|undefined` — new index within parent, only counting draggable elements
534
+ - pullMode:`String|Boolean|undefined` — Pull mode if dragging into another sortable (`"clone"`, `true`, or `false`), otherwise undefined
535
+
536
+
537
+ #### `move` event object
538
+ - to:`HTMLElement`
539
+ - from:`HTMLElement`
540
+ - dragged:`HTMLElement`
541
+ - draggedRect:`DOMRect`
542
+ - related:`HTMLElement` — element on which have guided
543
+ - relatedRect:`DOMRect`
544
+ - willInsertAfter:`Boolean` — `true` if will element be inserted after target (or `false` if before)
545
+
546
+
547
+ ---
548
+
549
+
550
+ ### Method
551
+
552
+
553
+ ##### option(name:`String`[, value:`*`]):`*`
554
+ Get or set the option.
555
+
556
+
557
+
558
+ ##### closest(el:`HTMLElement`[, selector:`String`]):`HTMLElement|null`
559
+ For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
560
+
561
+
562
+ ##### toArray():`String[]`
563
+ Serializes the sortable's item `data-id`'s (`dataIdAttr` option) into an array of string.
564
+
565
+
566
+ ##### sort(order:`String[]`)
567
+ Sorts the elements according to the array.
568
+
569
+ ```js
570
+ var order = sortable.toArray();
571
+ sortable.sort(order.reverse()); // apply
572
+ ```
573
+
574
+
575
+ ##### save()
576
+ Save the current sorting (see [store](#store))
577
+
578
+
579
+ ##### destroy()
580
+ Removes the sortable functionality completely.
581
+
582
+
583
+ ---
584
+
585
+
586
+ <a name="store"></a>
587
+ ### Store
588
+ Saving and restoring of the sort.
589
+
590
+ ```html
591
+ <ul>
592
+ <li data-id="1">order</li>
593
+ <li data-id="2">save</li>
594
+ <li data-id="3">restore</li>
595
+ </ul>
596
+ ```
597
+
598
+ ```js
599
+ Sortable.create(el, {
600
+ group: "localStorage-example",
601
+ store: {
602
+ /**
603
+ * Get the order of elements. Called once during initialization.
604
+ * @param {Sortable} sortable
605
+ * @returns {Array}
606
+ */
607
+ get: function (sortable) {
608
+ var order = localStorage.getItem(sortable.options.group.name);
609
+ return order ? order.split('|') : [];
610
+ },
611
+
612
+ /**
613
+ * Save the order of elements. Called onEnd (when the item is dropped).
614
+ * @param {Sortable} sortable
615
+ */
616
+ set: function (sortable) {
617
+ var order = sortable.toArray();
618
+ localStorage.setItem(sortable.options.group.name, order.join('|'));
619
+ }
620
+ }
621
+ })
622
+ ```
623
+
624
+
625
+ ---
626
+
627
+
628
+ <a name="bs"></a>
629
+ ### Bootstrap
630
+ Demo: https://jsbin.com/visimub/edit?html,js,output
631
+
632
+ ```html
633
+ <!-- Latest compiled and minified CSS -->
634
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
635
+
636
+
637
+ <!-- Latest Sortable -->
638
+ <script src="http://SortableJS.github.io/Sortable/Sortable.js"></script>
639
+
640
+
641
+ <!-- Simple List -->
642
+ <ul id="simpleList" class="list-group">
643
+ <li class="list-group-item">This is <a href="http://SortableJS.github.io/Sortable/">Sortable</a></li>
644
+ <li class="list-group-item">It works with Bootstrap...</li>
645
+ <li class="list-group-item">...out of the box.</li>
646
+ <li class="list-group-item">It has support for touch devices.</li>
647
+ <li class="list-group-item">Just drag some elements around.</li>
648
+ </ul>
649
+
650
+ <script>
651
+ // Simple list
652
+ Sortable.create(simpleList, { /* options */ });
653
+ </script>
654
+ ```
655
+
656
+
657
+ ---
658
+
659
+
660
+ ### Static methods & properties
661
+
662
+
663
+
664
+ ##### Sortable.create(el:`HTMLElement`[, options:`Object`]):`Sortable`
665
+ Create new instance.
666
+
667
+
668
+ ---
669
+
670
+
671
+ ##### Sortable.active:`Sortable`
672
+ The active Sortable instance.
673
+
674
+
675
+ ---
676
+
677
+
678
+ ##### Sortable.dragged:`HTMLElement`
679
+ The element being dragged.
680
+
681
+
682
+ ---
683
+
684
+
685
+ ##### Sortable.ghost:`HTMLElement`
686
+ The ghost element.
687
+
688
+
689
+ ---
690
+
691
+
692
+ ##### Sortable.clone:`HTMLElement`
693
+ The clone element.
694
+
695
+
696
+ ---
697
+
698
+
699
+ ##### Sortable.get(element:`HTMLElement`):`Sortable`
700
+ Get the Sortable instance on an element.
701
+
702
+
703
+ ---
704
+
705
+
706
+ ##### Sortable.mount(plugin:`...SortablePlugin|SortablePlugin[]`)
707
+ Mounts a plugin to Sortable.
708
+
709
+
710
+ ---
711
+
712
+
713
+ ##### Sortable.utils
714
+ * on(el`:HTMLElement`, event`:String`, fn`:Function`) — attach an event handler function
715
+ * off(el`:HTMLElement`, event`:String`, fn`:Function`) — remove an event handler
716
+ * css(el`:HTMLElement`)`:Object` — get the values of all the CSS properties
717
+ * css(el`:HTMLElement`, prop`:String`)`:Mixed` — get the value of style properties
718
+ * css(el`:HTMLElement`, prop`:String`, value`:String`) — set one CSS properties
719
+ * css(el`:HTMLElement`, props`:Object`) — set more CSS properties
720
+ * find(ctx`:HTMLElement`, tagName`:String`[, iterator`:Function`])`:Array` — get elements by tag name
721
+ * bind(ctx`:Mixed`, fn`:Function`)`:Function` — Takes a function and returns a new one that will always have a particular context
722
+ * is(el`:HTMLElement`, selector`:String`)`:Boolean` — check the current matched set of elements against a selector
723
+ * closest(el`:HTMLElement`, selector`:String`[, ctx`:HTMLElement`])`:HTMLElement|Null` — for each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree
724
+ * clone(el`:HTMLElement`)`:HTMLElement` — create a deep copy of the set of matched elements
725
+ * toggleClass(el`:HTMLElement`, name`:String`, state`:Boolean`) — add or remove one classes from each element
726
+ * detectDirection(el`:HTMLElement`)`:String` — automatically detect the [direction](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#direction) of the element as either `'vertical'` or `'horizontal'`
727
+
728
+
729
+ ---
730
+
731
+
732
+ ### Plugins
733
+ #### Extra Plugins (included in complete versions)
734
+ - [MultiDrag](https://github.com/SortableJS/Sortable/tree/master/plugins/MultiDrag)
735
+ - [Swap](https://github.com/SortableJS/Sortable/tree/master/plugins/Swap)
736
+
737
+ #### Default Plugins (included in default versions)
738
+ - [AutoScroll](https://github.com/SortableJS/Sortable/tree/master/plugins/AutoScroll)
739
+ - [OnSpill](https://github.com/SortableJS/Sortable/tree/master/plugins/OnSpill)
740
+
741
+
742
+ ---
743
+
744
+
745
+ <a name="cdn"></a>
746
+ ### CDN
747
+
748
+ ```html
749
+ <!-- jsDelivr :: Sortable :: Latest (https://www.jsdelivr.com/package/npm/sortablejs) -->
750
+ <script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
751
+ ```
752
+
753
+
754
+ ---
755
+
756
+
757
+ ### Contributing (Issue/PR)
758
+
759
+ Please, [read this](CONTRIBUTING.md).
760
+
761
+
762
+ ---
763
+
764
+
765
+ ## Contributors
766
+
767
+ ### Code Contributors
768
+
769
+ This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
770
+ <a href="https://github.com/SortableJS/Sortable/graphs/contributors"><img src="https://opencollective.com/Sortable/contributors.svg?width=890&button=false" /></a>
771
+
772
+ ### Financial Contributors
773
+
774
+ Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/Sortable/contribute)]
775
+
776
+ #### Individuals
777
+
778
+ <a href="https://opencollective.com/Sortable"><img src="https://opencollective.com/Sortable/individuals.svg?width=890"></a>
779
+
780
+ #### Organizations
781
+
782
+ Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/Sortable/contribute)]
783
+
784
+ <a href="https://opencollective.com/Sortable/organization/0/website"><img src="https://opencollective.com/Sortable/organization/0/avatar.svg"></a>
785
+ <a href="https://opencollective.com/Sortable/organization/1/website"><img src="https://opencollective.com/Sortable/organization/1/avatar.svg"></a>
786
+ <a href="https://opencollective.com/Sortable/organization/2/website"><img src="https://opencollective.com/Sortable/organization/2/avatar.svg"></a>
787
+ <a href="https://opencollective.com/Sortable/organization/3/website"><img src="https://opencollective.com/Sortable/organization/3/avatar.svg"></a>
788
+ <a href="https://opencollective.com/Sortable/organization/4/website"><img src="https://opencollective.com/Sortable/organization/4/avatar.svg"></a>
789
+ <a href="https://opencollective.com/Sortable/organization/5/website"><img src="https://opencollective.com/Sortable/organization/5/avatar.svg"></a>
790
+ <a href="https://opencollective.com/Sortable/organization/6/website"><img src="https://opencollective.com/Sortable/organization/6/avatar.svg"></a>
791
+ <a href="https://opencollective.com/Sortable/organization/7/website"><img src="https://opencollective.com/Sortable/organization/7/avatar.svg"></a>
792
+ <a href="https://opencollective.com/Sortable/organization/8/website"><img src="https://opencollective.com/Sortable/organization/8/avatar.svg"></a>
793
+ <a href="https://opencollective.com/Sortable/organization/9/website"><img src="https://opencollective.com/Sortable/organization/9/avatar.svg"></a>
794
+
795
+ ## MIT LICENSE
796
+ Permission is hereby granted, free of charge, to any person obtaining
797
+ a copy of this software and associated documentation files (the
798
+ "Software"), to deal in the Software without restriction, including
799
+ without limitation the rights to use, copy, modify, merge, publish,
800
+ distribute, sublicense, and/or sell copies of the Software, and to
801
+ permit persons to whom the Software is furnished to do so, subject to
802
+ the following conditions:
803
+
804
+ The above copyright notice and this permission notice shall be
805
+ included in all copies or substantial portions of the Software.
806
+
807
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
808
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
809
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
810
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
811
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
812
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
813
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.