@mapomodule/core 1.0.0-alpha.13 → 1.0.0-alpha.15
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.
- package/CHANGELOG.md +11 -0
- package/api/crud.js +16 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.0.0-alpha.15](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.14...v1.0.0-alpha.15) (2022-03-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **ordering:** added sortablejs to drag and reorder list ([eb8bf21](https://github.com/lotrekagency/mapo/commit/eb8bf21c3178c3ad62db5aa7c06c0562e944dea6))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [1.0.0-alpha.13](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2022-03-01)
|
|
7
18
|
|
|
8
19
|
|
package/api/crud.js
CHANGED
|
@@ -105,7 +105,22 @@ const createRepository = ($axios) => (endpoint, higherConf = {}) => ({
|
|
|
105
105
|
delete(id, config) {
|
|
106
106
|
const func = $axios.$delete(`/${trimslashes(endpoint)}/${id}/`, { ...higherConf, ...config })
|
|
107
107
|
return endpoint !== null ? func : Promise.reject(endpointError)
|
|
108
|
-
}
|
|
108
|
+
},
|
|
109
|
+
/**
|
|
110
|
+
* This makes a POST http call to the crud endpoint slash update_order. Returns as a promise the server response.
|
|
111
|
+
* Use this endpoint to change the order of the items in the list.
|
|
112
|
+
* @alias $api.crud.update_order
|
|
113
|
+
* @param {String} startId The id of the item we want to move in the list.
|
|
114
|
+
* @param {String} endId The id of the item in the position where we want to move.
|
|
115
|
+
* @param {external:AxiosRequestConfig} [config] This is a further axios configuration object that allows you to override the options previously setted.
|
|
116
|
+
* @returns {Promise<external:AxiosResponse>}
|
|
117
|
+
*/
|
|
118
|
+
update_order(startId, endId, config) {
|
|
119
|
+
const func = $axios.$post(`/${trimslashes(endpoint)}/update_order/`, { startId, endId }, { ...higherConf, ...config })
|
|
120
|
+
return endpoint !== null ? func : Promise.reject(endpointError)
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
|
|
109
124
|
})
|
|
110
125
|
/**
|
|
111
126
|
* @external AxiosResponse
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapomodule/core",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.15",
|
|
4
4
|
"description": "This is part of Mapo nuxt module. Injects the core mapo plugin helpers.",
|
|
5
5
|
"author": "bnznamco <gabriele.baldi.01@gmail.com>",
|
|
6
6
|
"keywords": [
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"repository": "https://github.com/lotrekagency/mapo",
|
|
14
14
|
"main": "./module.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@mapomodule/utils": "^1.0.0-alpha.
|
|
16
|
+
"@mapomodule/utils": "^1.0.0-alpha.15"
|
|
17
17
|
},
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "cd42b3dd094ef3bf743c67819e6059bf9ccac491"
|
|
22
22
|
}
|