@os-design/drag-sort 1.0.15 → 1.0.16

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.
@@ -9,7 +9,8 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
9
9
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
10
10
  /**
11
11
  * Stores all the lists where the draggable items is located.
12
- */var ListStore = /*#__PURE__*/function () {
12
+ */
13
+ var ListStore = /*#__PURE__*/function () {
13
14
  function ListStore() {
14
15
  _classCallCheck(this, ListStore);
15
16
  this.lists = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"ListStore.js","names":["ListStore","lists","list","push","id","index","findIndex","item","splice","x","y","find","current","ref","rect","getBoundingClientRect","width","height"],"sources":["../../../src/utils/ListStore.ts"],"sourcesContent":["import NodeList from './NodeList';\n\n/**\n * Stores all the lists where the draggable items is located.\n */\nclass ListStore {\n private lists: NodeList[];\n\n public constructor() {\n this.lists = [];\n }\n\n /**\n * Adds a new list to the store.\n */\n public add(list: NodeList) {\n this.lists.push(list);\n }\n\n /**\n * Removes the list from the store.\n */\n public remove(id: string) {\n const index = this.lists.findIndex((item) => item.id === id);\n if (index === -1) return;\n this.lists.splice(index, 1);\n }\n\n /**\n * Returns the list in which the position is located.\n */\n public findByPosition(x: number, y: number) {\n return this.lists.find((list) => {\n const { current } = list.ref;\n if (!current) return false;\n const rect = current.getBoundingClientRect();\n return (\n x >= rect.x &&\n x <= rect.x + rect.width &&\n y >= rect.y &&\n y <= rect.y + rect.height\n );\n });\n }\n}\n\nexport default ListStore;\n"],"mappings":";;;;;;;;;AAEA;AACA;AACA,GAFA,IAGMA,SAAS;EAGb,qBAAqB;IAAA;IAAA,KAFbC,KAAK;IAGX,IAAI,CAACA,KAAK,GAAG,EAAE;EACjB;;EAEA;AACF;AACA;EAFE;IAAA;IAAA,OAGA,aAAWC,IAAc,EAAE;MACzB,IAAI,CAACD,KAAK,CAACE,IAAI,CAACD,IAAI,CAAC;IACvB;;IAEA;AACF;AACA;EAFE;IAAA;IAAA,OAGA,gBAAcE,EAAU,EAAE;MACxB,IAAMC,KAAK,GAAG,IAAI,CAACJ,KAAK,CAACK,SAAS,CAAC,UAACC,IAAI;QAAA,OAAKA,IAAI,CAACH,EAAE,KAAKA,EAAE;MAAA,EAAC;MAC5D,IAAIC,KAAK,KAAK,CAAC,CAAC,EAAE;MAClB,IAAI,CAACJ,KAAK,CAACO,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;IAC7B;;IAEA;AACF;AACA;EAFE;IAAA;IAAA,OAGA,wBAAsBI,CAAS,EAAEC,CAAS,EAAE;MAC1C,OAAO,IAAI,CAACT,KAAK,CAACU,IAAI,CAAC,UAACT,IAAI,EAAK;QAC/B,IAAQU,OAAO,GAAKV,IAAI,CAACW,GAAG,CAApBD,OAAO;QACf,IAAI,CAACA,OAAO,EAAE,OAAO,KAAK;QAC1B,IAAME,IAAI,GAAGF,OAAO,CAACG,qBAAqB,EAAE;QAC5C,OACEN,CAAC,IAAIK,IAAI,CAACL,CAAC,IACXA,CAAC,IAAIK,IAAI,CAACL,CAAC,GAAGK,IAAI,CAACE,KAAK,IACxBN,CAAC,IAAII,IAAI,CAACJ,CAAC,IACXA,CAAC,IAAII,IAAI,CAACJ,CAAC,GAAGI,IAAI,CAACG,MAAM;MAE7B,CAAC,CAAC;IACJ;EAAC;EAAA;AAAA;AAAA,eAGYjB,SAAS;AAAA"}
1
+ {"version":3,"file":"ListStore.js","names":["ListStore","lists","list","push","id","index","findIndex","item","splice","x","y","find","current","ref","rect","getBoundingClientRect","width","height"],"sources":["../../../src/utils/ListStore.ts"],"sourcesContent":["import NodeList from './NodeList';\n\n/**\n * Stores all the lists where the draggable items is located.\n */\nclass ListStore {\n private lists: NodeList[];\n\n public constructor() {\n this.lists = [];\n }\n\n /**\n * Adds a new list to the store.\n */\n public add(list: NodeList) {\n this.lists.push(list);\n }\n\n /**\n * Removes the list from the store.\n */\n public remove(id: string) {\n const index = this.lists.findIndex((item) => item.id === id);\n if (index === -1) return;\n this.lists.splice(index, 1);\n }\n\n /**\n * Returns the list in which the position is located.\n */\n public findByPosition(x: number, y: number) {\n return this.lists.find((list) => {\n const { current } = list.ref;\n if (!current) return false;\n const rect = current.getBoundingClientRect();\n return (\n x >= rect.x &&\n x <= rect.x + rect.width &&\n y >= rect.y &&\n y <= rect.y + rect.height\n );\n });\n }\n}\n\nexport default ListStore;\n"],"mappings":";;;;;;;;;AAEA;AACA;AACA;AAFA,IAGMA,SAAS;EAGb,qBAAqB;IAAA;IAAA,KAFbC,KAAK;IAGX,IAAI,CAACA,KAAK,GAAG,EAAE;EACjB;;EAEA;AACF;AACA;EAFE;IAAA;IAAA,OAGA,aAAWC,IAAc,EAAE;MACzB,IAAI,CAACD,KAAK,CAACE,IAAI,CAACD,IAAI,CAAC;IACvB;;IAEA;AACF;AACA;EAFE;IAAA;IAAA,OAGA,gBAAcE,EAAU,EAAE;MACxB,IAAMC,KAAK,GAAG,IAAI,CAACJ,KAAK,CAACK,SAAS,CAAC,UAACC,IAAI;QAAA,OAAKA,IAAI,CAACH,EAAE,KAAKA,EAAE;MAAA,EAAC;MAC5D,IAAIC,KAAK,KAAK,CAAC,CAAC,EAAE;MAClB,IAAI,CAACJ,KAAK,CAACO,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;IAC7B;;IAEA;AACF;AACA;EAFE;IAAA;IAAA,OAGA,wBAAsBI,CAAS,EAAEC,CAAS,EAAE;MAC1C,OAAO,IAAI,CAACT,KAAK,CAACU,IAAI,CAAC,UAACT,IAAI,EAAK;QAC/B,IAAQU,OAAO,GAAKV,IAAI,CAACW,GAAG,CAApBD,OAAO;QACf,IAAI,CAACA,OAAO,EAAE,OAAO,KAAK;QAC1B,IAAME,IAAI,GAAGF,OAAO,CAACG,qBAAqB,EAAE;QAC5C,OACEN,CAAC,IAAIK,IAAI,CAACL,CAAC,IACXA,CAAC,IAAIK,IAAI,CAACL,CAAC,GAAGK,IAAI,CAACE,KAAK,IACxBN,CAAC,IAAII,IAAI,CAACJ,CAAC,IACXA,CAAC,IAAII,IAAI,CAACJ,CAAC,GAAGI,IAAI,CAACG,MAAM;MAE7B,CAAC,CAAC;IACJ;EAAC;EAAA;AAAA;AAAA,eAGYjB,SAAS;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@os-design/drag-sort",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "license": "UNLICENSED",
5
5
  "repository": "git@gitlab.com:os-team/libs/os-design.git",
6
6
  "main": "dist/cjs/index.js",
@@ -40,11 +40,11 @@
40
40
  "devDependencies": {
41
41
  "@os-design/omit-emotion-props": "^1.0.8",
42
42
  "@os-design/use-size": "^1.0.11",
43
- "react-window": "^1.8.7"
43
+ "react-window": "^1.8.8"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": ">=18",
47
47
  "react-dom": ">=18"
48
48
  },
49
- "gitHead": "8cb28f6719d699c014fbce91d832a9ff06abe515"
49
+ "gitHead": "146a53568bed5d88a27183e889dde51a44681366"
50
50
  }