@websy/websy-designs 1.4.6 → 1.4.7
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/dist/server/helpers/v1/pgHelper.js +3 -0
- package/dist/websy-designs-es6.debug.js +27 -4
- package/dist/websy-designs-es6.js +253 -230
- package/dist/websy-designs-es6.min.js +1 -1
- package/dist/websy-designs.debug.js +27 -4
- package/dist/websy-designs.js +256 -233
- package/dist/websy-designs.min.js +1 -1
- package/package.json +1 -1
|
@@ -175,6 +175,9 @@ class PGHelper {
|
|
|
175
175
|
let updates = []
|
|
176
176
|
for (let key in data) {
|
|
177
177
|
if (this.updateIgnores.indexOf(key) === -1) {
|
|
178
|
+
if (typeof data[key] === 'string') {
|
|
179
|
+
data[key] = data[key].replace(/'/gm, '\'')
|
|
180
|
+
}
|
|
178
181
|
updates.push(`${key} = ${(data[key] === null ? data[key] : `'${data[key]}'`)}`)
|
|
179
182
|
}
|
|
180
183
|
}
|
|
@@ -32,7 +32,7 @@ import WebsyDesignsQlikPlugins from '@websy/websy-designs-qlik-plugin/dist/websy
|
|
|
32
32
|
/* global XMLHttpRequest fetch ENV */
|
|
33
33
|
class APIService {
|
|
34
34
|
constructor (baseUrl = '', options = {}) {
|
|
35
|
-
this.baseUrl = baseUrl
|
|
35
|
+
this.baseUrl = baseUrl
|
|
36
36
|
this.options = Object.assign({}, {
|
|
37
37
|
fieldValueSeparator: ':'
|
|
38
38
|
}, options)
|
|
@@ -54,8 +54,24 @@ class APIService {
|
|
|
54
54
|
const url = this.buildUrl(entity, id)
|
|
55
55
|
return this.run('DELETE', url)
|
|
56
56
|
}
|
|
57
|
-
get (entity, id, query) {
|
|
58
|
-
|
|
57
|
+
get (entity, id, query, offset, limit) {
|
|
58
|
+
let url = this.buildUrl(entity, id, query)
|
|
59
|
+
if (offset) {
|
|
60
|
+
if (url.indexOf('?') !== -1) {
|
|
61
|
+
url += `&offset=${offset}`
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
url += `?offset=${offset}`
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (limit) {
|
|
68
|
+
if (url.indexOf('?') !== -1) {
|
|
69
|
+
url += `&limit=${limit}`
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
url += `?limit=${limit}`
|
|
73
|
+
}
|
|
74
|
+
}
|
|
59
75
|
return this.run('GET', url)
|
|
60
76
|
}
|
|
61
77
|
update (entity, id, data) {
|
|
@@ -1000,7 +1016,14 @@ class WebsyDatePicker {
|
|
|
1000
1016
|
selectRange (index, confirm = true) {
|
|
1001
1017
|
if (this.options.ranges[this.options.mode][index]) {
|
|
1002
1018
|
this.selectedRangeDates = [...this.options.ranges[this.options.mode][index].range]
|
|
1003
|
-
this.currentselection = this.options.ranges[this.options.mode][index].range.map(d =>
|
|
1019
|
+
this.currentselection = this.options.ranges[this.options.mode][index].range.map(d => {
|
|
1020
|
+
if (this.options.mode === 'date' || this.options.mode === 'monthyear') {
|
|
1021
|
+
return d.getTime()
|
|
1022
|
+
}
|
|
1023
|
+
else {
|
|
1024
|
+
return d
|
|
1025
|
+
}
|
|
1026
|
+
})
|
|
1004
1027
|
this.selectedRange = +index
|
|
1005
1028
|
this.highlightRange()
|
|
1006
1029
|
this.updateRange()
|