@websy/websy-designs 1.3.5 → 1.3.6
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 +2 -2
- package/dist/websy-designs-es6.debug.js +164 -25
- package/dist/websy-designs-es6.js +71 -22
- package/dist/websy-designs-es6.min.js +1 -1
- package/dist/websy-designs.debug.js +164 -25
- package/dist/websy-designs.js +71 -22
- package/dist/websy-designs.min.css +1 -1
- package/dist/websy-designs.min.js +1 -1
- package/package.json +1 -1
|
@@ -1321,9 +1321,9 @@ class WebsyDropdown {
|
|
|
1321
1321
|
showCompleteSelectedList: false,
|
|
1322
1322
|
closeAfterSelection: true,
|
|
1323
1323
|
customActions: [],
|
|
1324
|
-
searchIcon: `<svg
|
|
1325
|
-
clearIcon: `<svg
|
|
1326
|
-
arrowIcon: `<svg
|
|
1324
|
+
searchIcon: `<svg width="20" height="20" viewBox="0 0 512 512"><path d="M221.09,64A157.09,157.09,0,1,0,378.18,221.09,157.1,157.1,0,0,0,221.09,64Z" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><line x1="338.29" y1="338.29" x2="448" y2="448" style="fill:none;stroke:#000;stroke-linecap:round;stroke-miterlimit:10;stroke-width:32px"/></svg>`,
|
|
1325
|
+
clearIcon: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 512 512"><title>ionicons-v5-l</title><line x1="368" y1="368" x2="144" y2="144" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="368" y1="144" x2="144" y2="368" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>`,
|
|
1326
|
+
arrowIcon: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z"/></svg>`,
|
|
1327
1327
|
actionsIcon: `<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 512 512">><circle cx="256" cy="256" r="32" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><circle cx="416" cy="256" r="32" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><circle cx="96" cy="256" r="32" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/></svg>`
|
|
1328
1328
|
}
|
|
1329
1329
|
this.options = Object.assign({}, DEFAULTS, options)
|
|
@@ -1352,16 +1352,20 @@ class WebsyDropdown {
|
|
|
1352
1352
|
let html = `
|
|
1353
1353
|
<div id='${this.elementId}_container' class='websy-dropdown-container ${this.options.disabled ? 'disabled' : ''} ${this.options.disableSearch !== true ? 'with-search' : ''} ${this.options.style} ${this.options.customActions.length > 0 ? 'with-actions' : ''}'>
|
|
1354
1354
|
<div id='${this.elementId}_header' class='websy-dropdown-header ${this.selectedItems.length === 1 ? 'one-selected' : ''} ${this.options.allowClear === true ? 'allow-clear' : ''}'>
|
|
1355
|
-
|
|
1356
|
-
|
|
1355
|
+
`
|
|
1356
|
+
if (this.options.disableSearch !== true) {
|
|
1357
|
+
html += `<div class='search'>${this.options.searchIcon}</div>`
|
|
1358
|
+
}
|
|
1359
|
+
html += `
|
|
1360
|
+
<div class='header-label'>
|
|
1357
1361
|
<span class='websy-dropdown-header-value' data-info='${headerLabel}' id='${this.elementId}_selectedItems'>${headerLabel}</span>
|
|
1358
1362
|
<span class='websy-dropdown-header-label' id='${this.elementId}_headerLabel'>${this.options.label}</span>
|
|
1359
|
-
</
|
|
1363
|
+
</div>
|
|
1360
1364
|
<input class='dropdown-input' id='${this.elementId}_input' name='${this.options.field || this.options.label}' value='${headerValue}'>
|
|
1361
|
-
|
|
1365
|
+
<div class='arrow'>${this.options.arrowIcon}</div>
|
|
1362
1366
|
`
|
|
1363
1367
|
if (this.options.allowClear === true) {
|
|
1364
|
-
html += this.options.clearIcon
|
|
1368
|
+
html += `<div class='clear'>${this.options.clearIcon}</div>`
|
|
1365
1369
|
}
|
|
1366
1370
|
html += `
|
|
1367
1371
|
</div>
|
|
@@ -2326,7 +2330,7 @@ const WebsyIcons = {
|
|
|
2326
2330
|
`,
|
|
2327
2331
|
'bag-icon': `
|
|
2328
2332
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
2329
|
-
viewBox="0 0 500 500"
|
|
2333
|
+
viewBox="0 0 500 500">
|
|
2330
2334
|
<path d="M456.6,472.3H43.4c-5.3,0-10.2-2.1-13.7-6c-3.6-3.9-5.2-9.2-4.5-14.4l37-285.4c1.2-9,9-15.9,18.2-15.9h339.2
|
|
2331
2335
|
c9.2,0,17,6.8,18.2,15.8l37,285.4c0.7,5.2-1,10.5-4.5,14.4l0,0C466.8,470.1,461.9,472.3,456.6,472.3z M46.5,451.2h407l-36.3-279.6
|
|
2332
2336
|
H82.8L46.5,451.2z"/>
|
|
@@ -2349,6 +2353,104 @@ const WebsyIcons = {
|
|
|
2349
2353
|
c0-62.9-23.4-122-65.9-166.5c-42.5-44.5-99-69-159.1-69s-116.6,24.5-159.1,69C48.4,353,25,412.1,25,475c0,0,0,0,0,0H45z"/>
|
|
2350
2354
|
</svg>
|
|
2351
2355
|
|
|
2356
|
+
`,
|
|
2357
|
+
'Search': `
|
|
2358
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
2359
|
+
viewBox="0 0 500 500" xml:space="preserve">
|
|
2360
|
+
<path d="M481.4,468.6c-17.2-17.2-34.4-34.4-51.6-51.6c-27.4-27.4-54.8-54.8-82.2-82.2c-4.8-4.8-9.5-9.5-14.3-14.3
|
|
2361
|
+
c29.4-32.5,47.4-75.5,47.4-122.7C380.7,97,298.7,15,197.9,15S15,97,15,197.9s82,182.9,182.9,182.9c47.2,0,90.3-18,122.7-47.4
|
|
2362
|
+
c15.7,15.7,31.4,31.4,47.1,47.1c27.4,27.4,54.8,54.8,82.2,82.2c6.3,6.3,12.5,12.5,18.8,18.8C476.8,489.6,489.6,476.8,481.4,468.6z
|
|
2363
|
+
M35,197.9C35,108.1,108.1,35,197.9,35s162.9,73.1,162.9,162.9s-73.1,162.9-162.9,162.9S35,287.7,35,197.9z"/>
|
|
2364
|
+
</svg>
|
|
2365
|
+
|
|
2366
|
+
`,
|
|
2367
|
+
'Bag': `
|
|
2368
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
2369
|
+
viewBox="0 0 500 500">
|
|
2370
|
+
<path d="M456.6,472.3H43.4c-5.3,0-10.2-2.1-13.7-6c-3.6-3.9-5.2-9.2-4.5-14.4l37-285.4c1.2-9,9-15.9,18.2-15.9h339.2
|
|
2371
|
+
c9.2,0,17,6.8,18.2,15.8l37,285.4c0.7,5.2-1,10.5-4.5,14.4l0,0C466.8,470.1,461.9,472.3,456.6,472.3z M46.5,451.2h407l-36.3-279.6
|
|
2372
|
+
H82.8L46.5,451.2z"/>
|
|
2373
|
+
<g>
|
|
2374
|
+
<path d="M361.3,157.1C357.3,94.8,308.4,46,249.9,46c-28,0-54.8,11.1-75.4,31.4c-20.7,20.3-33.5,47.9-35.9,77.8l-21.5-1.6
|
|
2375
|
+
c2.8-34.8,17.7-67.1,42.1-91C183.9,38.3,216.1,25,249.9,25c34.2,0,66.6,13.6,91.5,38.3c24.5,24.3,39.2,57.2,41.5,92.5L361.3,157.1z
|
|
2376
|
+
"/>
|
|
2377
|
+
</g>
|
|
2378
|
+
</svg>
|
|
2379
|
+
|
|
2380
|
+
`,
|
|
2381
|
+
'User': `
|
|
2382
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
2383
|
+
viewBox="0 0 500 500" style="enable-background:new 0 0 500 500;" xml:space="preserve">
|
|
2384
|
+
<g>
|
|
2385
|
+
<path d="M248,260.5c-62,0-112.5-52.8-112.5-117.7S186,25,248,25s112.5,52.8,112.5,117.7S310,260.5,248,260.5z M248,45.9
|
|
2386
|
+
c-51,0-92.5,43.4-92.5,96.8s41.5,96.8,92.5,96.8c51,0,92.5-43.4,92.5-96.8S299,45.9,248,45.9z"/>
|
|
2387
|
+
</g>
|
|
2388
|
+
<path d="M45,475C45,475,45,475,45,475c0-118.3,92-214.5,205-214.5c113,0,205,96.2,205,214.5c0,0,0,0,0,0h20c0,0,0,0,0,0
|
|
2389
|
+
c0-62.9-23.4-122-65.9-166.5c-42.5-44.5-99-69-159.1-69s-116.6,24.5-159.1,69C48.4,353,25,412.1,25,475c0,0,0,0,0,0H45z"/>
|
|
2390
|
+
</svg>
|
|
2391
|
+
|
|
2392
|
+
`,
|
|
2393
|
+
'DockLeft': `
|
|
2394
|
+
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
|
|
2395
|
+
viewBox="0 0 500 500" style="enable-background:new 0 0 500 500;" xml:space="preserve">
|
|
2396
|
+
<g>
|
|
2397
|
+
<path d="M419.7,425H80.3C49.8,425,25,400.2,25,369.7V130.3C25,99.8,49.8,75,80.3,75h339.4c30.5,0,55.3,24.8,55.3,55.3v239.4
|
|
2398
|
+
C475,400.2,450.2,425,419.7,425z M80.3,95C60.8,95,45,110.8,45,130.3v239.4c0,19.5,15.8,35.3,35.3,35.3h339.4
|
|
2399
|
+
c19.5,0,35.3-15.8,35.3-35.3V130.3c0-19.5-15.8-35.3-35.3-35.3H80.3z"/>
|
|
2400
|
+
</g>
|
|
2401
|
+
<path d="M92.8,90.1H92h-4.2c-24.8,0-45,20.2-45,45v229.8c0,24.8,20.2,45,45,45H92h0.8h105.4V90.1H92.8z"/>
|
|
2402
|
+
</svg>
|
|
2403
|
+
|
|
2404
|
+
`,
|
|
2405
|
+
'DockRight': `
|
|
2406
|
+
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
|
|
2407
|
+
viewBox="0 0 500 500" style="enable-background:new 0 0 500 500;" xml:space="preserve">
|
|
2408
|
+
<g>
|
|
2409
|
+
<path d="M25,369.7V130.3C25,99.8,49.8,75,80.3,75h339.4c30.5,0,55.3,24.8,55.3,55.3v239.4c0,30.5-24.8,55.3-55.3,55.3H80.3
|
|
2410
|
+
C49.8,425,25,400.2,25,369.7z M80.3,95C60.8,95,45,110.8,45,130.3v239.4c0,19.5,15.8,35.3,35.3,35.3h339.4
|
|
2411
|
+
c19.5,0,35.3-15.8,35.3-35.3V130.3c0-19.5-15.8-35.3-35.3-35.3H80.3z"/>
|
|
2412
|
+
</g>
|
|
2413
|
+
<path d="M407.2,90.1h0.8h4.2c24.8,0,45,20.2,45,45v229.8c0,24.8-20.2,45-45,45H408h-0.8H301.8V90.1H407.2z"/>
|
|
2414
|
+
</svg>
|
|
2415
|
+
|
|
2416
|
+
`,
|
|
2417
|
+
'Pin': `
|
|
2418
|
+
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
|
|
2419
|
+
viewBox="0 0 500 500" style="enable-background:new 0 0 500 500;" xml:space="preserve">
|
|
2420
|
+
<g>
|
|
2421
|
+
<path d="M368,312.1H132l-0.6-9.4c-0.1-2.4-0.2-4.8-0.2-7.1c0-40.3,20.7-78.1,54.4-99.9V73.2h-9c-13,0-23.6-10.6-23.6-23.6
|
|
2422
|
+
S163.5,26,176.6,26h146.9c13,0,23.6,10.6,23.6,23.6s-10.6,23.6-23.6,23.6h-9v122.5c33.7,21.8,54.4,59.5,54.4,99.9
|
|
2423
|
+
c0,2.3-0.1,4.7-0.2,7.1L368,312.1z M151.2,292.1h197.5c-1.2-33.8-19.9-65.1-49.4-82.1l-5-2.9V53.2h29c2,0,3.6-1.6,3.6-3.6
|
|
2424
|
+
c0-2-1.6-3.6-3.6-3.6H176.6c-2,0-3.6,1.6-3.6,3.6c0,2,1.6,3.6,3.6,3.6h29v153.9l-5,2.9C171.1,227,152.4,258.3,151.2,292.1z"/>
|
|
2425
|
+
</g>
|
|
2426
|
+
<path d="M260.9,403.8V299.9h-21.8v108.8h0c0.1,36.1,4.9,65.3,10.9,65.3c6,0,10.9-29.7,10.9-66.4
|
|
2427
|
+
C260.9,406.4,260.9,405.1,260.9,403.8z"/>
|
|
2428
|
+
</svg>
|
|
2429
|
+
|
|
2430
|
+
`,
|
|
2431
|
+
'WindowPopout': `
|
|
2432
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
2433
|
+
viewBox="0 0 500 500" style="enable-background:new 0 0 500 500;" xml:space="preserve">
|
|
2434
|
+
<style type="text/css">
|
|
2435
|
+
.st0{fill:none;stroke:#000000;stroke-width:20;stroke-miterlimit:10;}
|
|
2436
|
+
</style>
|
|
2437
|
+
<path class="st0" d="M420.1,359.6h-285c-24.7,0-45-20.2-45-45V124.9c0-24.7,20.2-45,45-45h285c24.7,0,45,20.2,45,45v189.7
|
|
2438
|
+
C465.1,339.3,444.9,359.6,420.1,359.6z"/>
|
|
2439
|
+
<path class="st0" d="M407.3,389.8c-6.3,17.3-22.9,29.7-42.3,29.7H80c-24.7,0-45-20.2-45-45V184.9c0-18.2,10.9-33.9,26.5-41"/>
|
|
2440
|
+
</svg>
|
|
2441
|
+
|
|
2442
|
+
`,
|
|
2443
|
+
'Plus': `
|
|
2444
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500">
|
|
2445
|
+
<path d="M254.7,486h-10.3c-5.5,0-10-4.5-10-10V26c0-5.5,4.5-10,10-10h10.3c5.5,0,10,4.5,10,10v450C264.6,481.5,260.2,486,254.7,486z"/>
|
|
2446
|
+
<path d="M15,255.1v-10.3c0-5.5,4.5-10,10-10h450c5.5,0,10,4.5,10,10v10.3c0,5.5-4.5,10-10,10H25C19.5,265.1,15,260.7,15,255.1z"/>
|
|
2447
|
+
</svg>
|
|
2448
|
+
|
|
2449
|
+
`,
|
|
2450
|
+
'Minus': `
|
|
2451
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500">
|
|
2452
|
+
<path d="M15,255.1v-10.3c0-5.5,4.5-10,10-10h450c5.5,0,10,4.5,10,10v10.3c0,5.5-4.5,10-10,10H25C19.5,265.1,15,260.7,15,255.1z"/>
|
|
2453
|
+
</svg>
|
|
2352
2454
|
`
|
|
2353
2455
|
}
|
|
2354
2456
|
|
|
@@ -3964,7 +4066,7 @@ class WebsyRouter {
|
|
|
3964
4066
|
this.showComponents(view)
|
|
3965
4067
|
this.publish('show', [view, params, group])
|
|
3966
4068
|
}
|
|
3967
|
-
if (this.previousView === this.currentView && this.previousParams.path !== this.currentParams.path) {
|
|
4069
|
+
else if (this.previousView === this.currentView && this.previousParams.path !== this.currentParams.path) {
|
|
3968
4070
|
this.showComponents(view)
|
|
3969
4071
|
this.publish('show', [view, params, group])
|
|
3970
4072
|
}
|
|
@@ -4066,13 +4168,7 @@ class WebsyRouter {
|
|
|
4066
4168
|
}
|
|
4067
4169
|
if (toggle === true && newPath === groupActiveView) {
|
|
4068
4170
|
return
|
|
4069
|
-
}
|
|
4070
|
-
if (toggle === false) {
|
|
4071
|
-
this.showView(this.currentView, this.currentParams, group)
|
|
4072
|
-
}
|
|
4073
|
-
else if (newPath && newPath !== '') {
|
|
4074
|
-
this.showView(newPath, null, group)
|
|
4075
|
-
}
|
|
4171
|
+
}
|
|
4076
4172
|
if (this.usesHTMLSuffix === true) {
|
|
4077
4173
|
inputPath = window.location.pathname.split('/').pop() + inputPath
|
|
4078
4174
|
}
|
|
@@ -4099,6 +4195,12 @@ class WebsyRouter {
|
|
|
4099
4195
|
//
|
|
4100
4196
|
}
|
|
4101
4197
|
}
|
|
4198
|
+
if (toggle === false) {
|
|
4199
|
+
this.showView(this.currentView, this.currentParams, group)
|
|
4200
|
+
}
|
|
4201
|
+
else if (newPath && newPath !== '') {
|
|
4202
|
+
this.showView(newPath, null, group)
|
|
4203
|
+
}
|
|
4102
4204
|
}
|
|
4103
4205
|
on (event, fn) {
|
|
4104
4206
|
this.options.subscribers[event].push(fn)
|
|
@@ -5781,7 +5883,7 @@ class WebsyTable3 {
|
|
|
5781
5883
|
`).join('')
|
|
5782
5884
|
bodyHtml += '</colgroup>'
|
|
5783
5885
|
}
|
|
5784
|
-
data.forEach(row => {
|
|
5886
|
+
data.forEach((row, rowIndex) => {
|
|
5785
5887
|
bodyHtml += `<tr class="websy-table-row">`
|
|
5786
5888
|
row.forEach((cell, cellIndex) => {
|
|
5787
5889
|
if (typeof sizingColumns[cellIndex] === 'undefined') {
|
|
@@ -5810,6 +5912,8 @@ class WebsyTable3 {
|
|
|
5810
5912
|
data-info='${cell.value}'
|
|
5811
5913
|
colspan='${cell.colspan || 1}'
|
|
5812
5914
|
rowspan='${cell.rowspan || 1}'
|
|
5915
|
+
data-row-index='${rowIndex}'
|
|
5916
|
+
data-col-index='${cellIndex}'
|
|
5813
5917
|
`
|
|
5814
5918
|
// if (useWidths === true) {
|
|
5815
5919
|
// bodyHtml += `
|
|
@@ -5818,7 +5922,22 @@ class WebsyTable3 {
|
|
|
5818
5922
|
// `
|
|
5819
5923
|
// }
|
|
5820
5924
|
bodyHtml += `
|
|
5821
|
-
|
|
5925
|
+
>`
|
|
5926
|
+
if (cell.expandable === true) {
|
|
5927
|
+
bodyHtml += `<i
|
|
5928
|
+
data-row-index='${rowIndex}'
|
|
5929
|
+
data-col-index='${cellIndex}'
|
|
5930
|
+
class='websy-table-cell-expand'
|
|
5931
|
+
>${WebsyDesigns.Icons.Plus}</i>`
|
|
5932
|
+
}
|
|
5933
|
+
if (cell.collapsable === true) {
|
|
5934
|
+
bodyHtml += `<i
|
|
5935
|
+
data-row-index='${rowIndex}'
|
|
5936
|
+
data-col-index='${cellIndex}'
|
|
5937
|
+
class='websy-table-cell-collapse'
|
|
5938
|
+
>${WebsyDesigns.Icons.Minus}</i>`
|
|
5939
|
+
}
|
|
5940
|
+
bodyHtml += `
|
|
5822
5941
|
${cell.value}
|
|
5823
5942
|
</td>`
|
|
5824
5943
|
})
|
|
@@ -6036,13 +6155,30 @@ class WebsyTable3 {
|
|
|
6036
6155
|
return output
|
|
6037
6156
|
}
|
|
6038
6157
|
handleClick (event) {
|
|
6158
|
+
const colIndex = +event.target.getAttribute('data-col-index')
|
|
6159
|
+
const rowIndex = +event.target.getAttribute('data-row-index')
|
|
6039
6160
|
if (event.target.classList.contains('websy-table-search-icon')) {
|
|
6040
|
-
console.log('clicked on search icon')
|
|
6041
|
-
const colIndex = +event.target.getAttribute('data-col-index')
|
|
6161
|
+
console.log('clicked on search icon')
|
|
6042
6162
|
if (this.options.columns[this.options.columns.length - 1][colIndex].onSearch) {
|
|
6043
6163
|
this.options.columns[this.options.columns.length - 1][colIndex].onSearch(event, this.options.columns[this.options.columns.length - 1][colIndex])
|
|
6044
6164
|
}
|
|
6045
6165
|
}
|
|
6166
|
+
if (event.target.classList.contains('websy-table-cell-collapse')) {
|
|
6167
|
+
if (this.options.onCollapseCell) {
|
|
6168
|
+
this.options.onCollapseCell(event, +rowIndex, +colIndex)
|
|
6169
|
+
}
|
|
6170
|
+
else {
|
|
6171
|
+
// out of box function
|
|
6172
|
+
}
|
|
6173
|
+
}
|
|
6174
|
+
if (event.target.classList.contains('websy-table-cell-expand')) {
|
|
6175
|
+
if (this.options.onExpandCell) {
|
|
6176
|
+
this.options.onExpandCell(event, +rowIndex, +colIndex)
|
|
6177
|
+
}
|
|
6178
|
+
else {
|
|
6179
|
+
// out of box function
|
|
6180
|
+
}
|
|
6181
|
+
}
|
|
6046
6182
|
}
|
|
6047
6183
|
handleMouseDown (event) {
|
|
6048
6184
|
if (event.target.classList.contains('websy-scroll-handle-y')) {
|
|
@@ -6747,6 +6883,9 @@ else {
|
|
|
6747
6883
|
this.longestBottom = this.options.data.bottom.max.toString()
|
|
6748
6884
|
if (this.options.data.bottom.formatter) {
|
|
6749
6885
|
this.longestBottom = this.options.data.bottom.formatter(this.options.data.bottom.max).toString()
|
|
6886
|
+
}
|
|
6887
|
+
else {
|
|
6888
|
+
this.longestBottom = '01/01/2000'
|
|
6750
6889
|
}
|
|
6751
6890
|
}
|
|
6752
6891
|
if (this.options.data.left && this.options.data.left.data && this.options.data.left.max === 'undefined') {
|
|
@@ -7262,8 +7401,8 @@ if (this.options.showLabels === true || series.showLabels === true) {
|
|
|
7262
7401
|
.style('stroke-opacity', 1e-6)
|
|
7263
7402
|
.remove()
|
|
7264
7403
|
labels
|
|
7265
|
-
.attr('x', getLabelX.
|
|
7266
|
-
.attr('y', getLabelY.
|
|
7404
|
+
.attr('x', d => getLabelX.call(this, d, series.labelPosition))
|
|
7405
|
+
.attr('y', d => getLabelY.call(this, d, series.labelPosition))
|
|
7267
7406
|
.attr('class', `label_${series.key}`)
|
|
7268
7407
|
.attr('fill', d => this.options.labelColor || WebsyDesigns.WebsyUtils.getLightDark(d.y.color || d.color || series.color))
|
|
7269
7408
|
.style('font-size', `${this.options.labelSize || this.options.fontSize}px`)
|
|
@@ -7299,8 +7438,8 @@ if (this.options.showLabels === true || series.showLabels === true) {
|
|
|
7299
7438
|
.enter()
|
|
7300
7439
|
.append('text')
|
|
7301
7440
|
.attr('class', `label_${series.key}`)
|
|
7302
|
-
.attr('x', getLabelX.
|
|
7303
|
-
.attr('y', getLabelY.
|
|
7441
|
+
.attr('x', d => getLabelX.call(this, d, series.labelPosition))
|
|
7442
|
+
.attr('y', d => getLabelY.call(this, d, series.labelPosition))
|
|
7304
7443
|
.attr('alignment-baseline', 'central')
|
|
7305
7444
|
.attr('text-anchor', this.options.orientation === 'horizontal' ? 'left' : 'middle')
|
|
7306
7445
|
.attr('fill', d => this.options.labelColor || WebsyDesigns.WebsyUtils.getLightDark(d.y.color || d.color || series.color))
|
package/dist/websy-designs.js
CHANGED
|
@@ -1484,9 +1484,9 @@ var WebsyDropdown = /*#__PURE__*/function () {
|
|
|
1484
1484
|
showCompleteSelectedList: false,
|
|
1485
1485
|
closeAfterSelection: true,
|
|
1486
1486
|
customActions: [],
|
|
1487
|
-
searchIcon: "<svg
|
|
1488
|
-
clearIcon: "<svg
|
|
1489
|
-
arrowIcon: "<svg
|
|
1487
|
+
searchIcon: "<svg width=\"20\" height=\"20\" viewBox=\"0 0 512 512\"><path d=\"M221.09,64A157.09,157.09,0,1,0,378.18,221.09,157.1,157.1,0,0,0,221.09,64Z\" style=\"fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px\"/><line x1=\"338.29\" y1=\"338.29\" x2=\"448\" y2=\"448\" style=\"fill:none;stroke:#000;stroke-linecap:round;stroke-miterlimit:10;stroke-width:32px\"/></svg>",
|
|
1488
|
+
clearIcon: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 512 512\"><title>ionicons-v5-l</title><line x1=\"368\" y1=\"368\" x2=\"144\" y2=\"144\" style=\"fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px\"/><line x1=\"368\" y1=\"144\" x2=\"144\" y2=\"368\" style=\"fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px\"/></svg>",
|
|
1489
|
+
arrowIcon: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z\"/></svg>",
|
|
1490
1490
|
actionsIcon: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" viewBox=\"0 0 512 512\">><circle cx=\"256\" cy=\"256\" r=\"32\" style=\"fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px\"/><circle cx=\"416\" cy=\"256\" r=\"32\" style=\"fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px\"/><circle cx=\"96\" cy=\"256\" r=\"32\" style=\"fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px\"/></svg>"
|
|
1491
1491
|
};
|
|
1492
1492
|
this.options = _extends({}, DEFAULTS, options);
|
|
@@ -1521,10 +1521,16 @@ var WebsyDropdown = /*#__PURE__*/function () {
|
|
|
1521
1521
|
var headerValue = this.selectedItems.map(function (s) {
|
|
1522
1522
|
return _this10.options.items[s].value || _this10.options.items[s].label;
|
|
1523
1523
|
}).join(this.options.multiValueDelimiter);
|
|
1524
|
-
var html = "\n <div id='".concat(this.elementId, "_container' class='websy-dropdown-container ").concat(this.options.disabled ? 'disabled' : '', " ").concat(this.options.disableSearch !== true ? 'with-search' : '', " ").concat(this.options.style, " ").concat(this.options.customActions.length > 0 ? 'with-actions' : '', "'>\n <div id='").concat(this.elementId, "_header' class='websy-dropdown-header ").concat(this.selectedItems.length === 1 ? 'one-selected' : '', " ").concat(this.options.allowClear === true ? 'allow-clear' : '', "'>\n
|
|
1524
|
+
var html = "\n <div id='".concat(this.elementId, "_container' class='websy-dropdown-container ").concat(this.options.disabled ? 'disabled' : '', " ").concat(this.options.disableSearch !== true ? 'with-search' : '', " ").concat(this.options.style, " ").concat(this.options.customActions.length > 0 ? 'with-actions' : '', "'>\n <div id='").concat(this.elementId, "_header' class='websy-dropdown-header ").concat(this.selectedItems.length === 1 ? 'one-selected' : '', " ").concat(this.options.allowClear === true ? 'allow-clear' : '', "'>\n ");
|
|
1525
|
+
|
|
1526
|
+
if (this.options.disableSearch !== true) {
|
|
1527
|
+
html += "<div class='search'>".concat(this.options.searchIcon, "</div>");
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
html += "\n <div class='header-label'>\n <span class='websy-dropdown-header-value' data-info='".concat(headerLabel, "' id='").concat(this.elementId, "_selectedItems'>").concat(headerLabel, "</span> \n <span class='websy-dropdown-header-label' id='").concat(this.elementId, "_headerLabel'>").concat(this.options.label, "</span>\n </div>\n <input class='dropdown-input' id='").concat(this.elementId, "_input' name='").concat(this.options.field || this.options.label, "' value='").concat(headerValue, "'>\n <div class='arrow'>").concat(this.options.arrowIcon, "</div>\n ");
|
|
1525
1531
|
|
|
1526
1532
|
if (this.options.allowClear === true) {
|
|
1527
|
-
html += this.options.clearIcon;
|
|
1533
|
+
html += "<div class='clear'>".concat(this.options.clearIcon, "</div>");
|
|
1528
1534
|
}
|
|
1529
1535
|
|
|
1530
1536
|
html += " \n </div>\n <div id='".concat(this.elementId, "_mask' class='websy-dropdown-mask'></div>\n <div id='").concat(this.elementId, "_content' class='websy-dropdown-content'>\n ");
|
|
@@ -2587,8 +2593,17 @@ var WebsyForm = /*#__PURE__*/function () {
|
|
|
2587
2593
|
|
|
2588
2594
|
var WebsyIcons = {
|
|
2589
2595
|
'search-icon': "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 500 500\" xml:space=\"preserve\">\n<path d=\"M481.4,468.6c-17.2-17.2-34.4-34.4-51.6-51.6c-27.4-27.4-54.8-54.8-82.2-82.2c-4.8-4.8-9.5-9.5-14.3-14.3\n\tc29.4-32.5,47.4-75.5,47.4-122.7C380.7,97,298.7,15,197.9,15S15,97,15,197.9s82,182.9,182.9,182.9c47.2,0,90.3-18,122.7-47.4\n\tc15.7,15.7,31.4,31.4,47.1,47.1c27.4,27.4,54.8,54.8,82.2,82.2c6.3,6.3,12.5,12.5,18.8,18.8C476.8,489.6,489.6,476.8,481.4,468.6z\n\t M35,197.9C35,108.1,108.1,35,197.9,35s162.9,73.1,162.9,162.9s-73.1,162.9-162.9,162.9S35,287.7,35,197.9z\"/>\n</svg>\n\n ",
|
|
2590
|
-
'bag-icon': "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 500 500\"
|
|
2591
|
-
'user-icon': "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 500 500\" style=\"enable-background:new 0 0 500 500;\" xml:space=\"preserve\">\n<g>\n\t<path d=\"M248,260.5c-62,0-112.5-52.8-112.5-117.7S186,25,248,25s112.5,52.8,112.5,117.7S310,260.5,248,260.5z M248,45.9\n\t\tc-51,0-92.5,43.4-92.5,96.8s41.5,96.8,92.5,96.8c51,0,92.5-43.4,92.5-96.8S299,45.9,248,45.9z\"/>\n</g>\n<path d=\"M45,475C45,475,45,475,45,475c0-118.3,92-214.5,205-214.5c113,0,205,96.2,205,214.5c0,0,0,0,0,0h20c0,0,0,0,0,0\n\tc0-62.9-23.4-122-65.9-166.5c-42.5-44.5-99-69-159.1-69s-116.6,24.5-159.1,69C48.4,353,25,412.1,25,475c0,0,0,0,0,0H45z\"/>\n</svg>\n\n "
|
|
2596
|
+
'bag-icon': "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 500 500\">\n<path d=\"M456.6,472.3H43.4c-5.3,0-10.2-2.1-13.7-6c-3.6-3.9-5.2-9.2-4.5-14.4l37-285.4c1.2-9,9-15.9,18.2-15.9h339.2\n\tc9.2,0,17,6.8,18.2,15.8l37,285.4c0.7,5.2-1,10.5-4.5,14.4l0,0C466.8,470.1,461.9,472.3,456.6,472.3z M46.5,451.2h407l-36.3-279.6\n\tH82.8L46.5,451.2z\"/>\n<g>\n\t<path d=\"M361.3,157.1C357.3,94.8,308.4,46,249.9,46c-28,0-54.8,11.1-75.4,31.4c-20.7,20.3-33.5,47.9-35.9,77.8l-21.5-1.6\n\t\tc2.8-34.8,17.7-67.1,42.1-91C183.9,38.3,216.1,25,249.9,25c34.2,0,66.6,13.6,91.5,38.3c24.5,24.3,39.2,57.2,41.5,92.5L361.3,157.1z\n\t\t\"/>\n</g>\n</svg>\n\n ",
|
|
2597
|
+
'user-icon': "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 500 500\" style=\"enable-background:new 0 0 500 500;\" xml:space=\"preserve\">\n<g>\n\t<path d=\"M248,260.5c-62,0-112.5-52.8-112.5-117.7S186,25,248,25s112.5,52.8,112.5,117.7S310,260.5,248,260.5z M248,45.9\n\t\tc-51,0-92.5,43.4-92.5,96.8s41.5,96.8,92.5,96.8c51,0,92.5-43.4,92.5-96.8S299,45.9,248,45.9z\"/>\n</g>\n<path d=\"M45,475C45,475,45,475,45,475c0-118.3,92-214.5,205-214.5c113,0,205,96.2,205,214.5c0,0,0,0,0,0h20c0,0,0,0,0,0\n\tc0-62.9-23.4-122-65.9-166.5c-42.5-44.5-99-69-159.1-69s-116.6,24.5-159.1,69C48.4,353,25,412.1,25,475c0,0,0,0,0,0H45z\"/>\n</svg>\n\n ",
|
|
2598
|
+
'Search': "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 500 500\" xml:space=\"preserve\">\n<path d=\"M481.4,468.6c-17.2-17.2-34.4-34.4-51.6-51.6c-27.4-27.4-54.8-54.8-82.2-82.2c-4.8-4.8-9.5-9.5-14.3-14.3\n\tc29.4-32.5,47.4-75.5,47.4-122.7C380.7,97,298.7,15,197.9,15S15,97,15,197.9s82,182.9,182.9,182.9c47.2,0,90.3-18,122.7-47.4\n\tc15.7,15.7,31.4,31.4,47.1,47.1c27.4,27.4,54.8,54.8,82.2,82.2c6.3,6.3,12.5,12.5,18.8,18.8C476.8,489.6,489.6,476.8,481.4,468.6z\n\t M35,197.9C35,108.1,108.1,35,197.9,35s162.9,73.1,162.9,162.9s-73.1,162.9-162.9,162.9S35,287.7,35,197.9z\"/>\n</svg>\n\n ",
|
|
2599
|
+
'Bag': "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 500 500\">\n<path d=\"M456.6,472.3H43.4c-5.3,0-10.2-2.1-13.7-6c-3.6-3.9-5.2-9.2-4.5-14.4l37-285.4c1.2-9,9-15.9,18.2-15.9h339.2\n\tc9.2,0,17,6.8,18.2,15.8l37,285.4c0.7,5.2-1,10.5-4.5,14.4l0,0C466.8,470.1,461.9,472.3,456.6,472.3z M46.5,451.2h407l-36.3-279.6\n\tH82.8L46.5,451.2z\"/>\n<g>\n\t<path d=\"M361.3,157.1C357.3,94.8,308.4,46,249.9,46c-28,0-54.8,11.1-75.4,31.4c-20.7,20.3-33.5,47.9-35.9,77.8l-21.5-1.6\n\t\tc2.8-34.8,17.7-67.1,42.1-91C183.9,38.3,216.1,25,249.9,25c34.2,0,66.6,13.6,91.5,38.3c24.5,24.3,39.2,57.2,41.5,92.5L361.3,157.1z\n\t\t\"/>\n</g>\n</svg>\n\n ",
|
|
2600
|
+
'User': "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 500 500\" style=\"enable-background:new 0 0 500 500;\" xml:space=\"preserve\">\n<g>\n\t<path d=\"M248,260.5c-62,0-112.5-52.8-112.5-117.7S186,25,248,25s112.5,52.8,112.5,117.7S310,260.5,248,260.5z M248,45.9\n\t\tc-51,0-92.5,43.4-92.5,96.8s41.5,96.8,92.5,96.8c51,0,92.5-43.4,92.5-96.8S299,45.9,248,45.9z\"/>\n</g>\n<path d=\"M45,475C45,475,45,475,45,475c0-118.3,92-214.5,205-214.5c113,0,205,96.2,205,214.5c0,0,0,0,0,0h20c0,0,0,0,0,0\n\tc0-62.9-23.4-122-65.9-166.5c-42.5-44.5-99-69-159.1-69s-116.6,24.5-159.1,69C48.4,353,25,412.1,25,475c0,0,0,0,0,0H45z\"/>\n</svg>\n\n ",
|
|
2601
|
+
'DockLeft': "\n <svg xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 500 500\" style=\"enable-background:new 0 0 500 500;\" xml:space=\"preserve\">\n\t<g>\n\t\t<path d=\"M419.7,425H80.3C49.8,425,25,400.2,25,369.7V130.3C25,99.8,49.8,75,80.3,75h339.4c30.5,0,55.3,24.8,55.3,55.3v239.4\n\t\t\tC475,400.2,450.2,425,419.7,425z M80.3,95C60.8,95,45,110.8,45,130.3v239.4c0,19.5,15.8,35.3,35.3,35.3h339.4\n\t\t\tc19.5,0,35.3-15.8,35.3-35.3V130.3c0-19.5-15.8-35.3-35.3-35.3H80.3z\"/>\n\t</g>\n\t<path d=\"M92.8,90.1H92h-4.2c-24.8,0-45,20.2-45,45v229.8c0,24.8,20.2,45,45,45H92h0.8h105.4V90.1H92.8z\"/>\n</svg>\n\n ",
|
|
2602
|
+
'DockRight': "\n <svg xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 500 500\" style=\"enable-background:new 0 0 500 500;\" xml:space=\"preserve\">\n\t<g>\n\t\t<path d=\"M25,369.7V130.3C25,99.8,49.8,75,80.3,75h339.4c30.5,0,55.3,24.8,55.3,55.3v239.4c0,30.5-24.8,55.3-55.3,55.3H80.3\n\t\t\tC49.8,425,25,400.2,25,369.7z M80.3,95C60.8,95,45,110.8,45,130.3v239.4c0,19.5,15.8,35.3,35.3,35.3h339.4\n\t\t\tc19.5,0,35.3-15.8,35.3-35.3V130.3c0-19.5-15.8-35.3-35.3-35.3H80.3z\"/>\n\t</g>\n\t<path d=\"M407.2,90.1h0.8h4.2c24.8,0,45,20.2,45,45v229.8c0,24.8-20.2,45-45,45H408h-0.8H301.8V90.1H407.2z\"/>\n</svg>\n\n ",
|
|
2603
|
+
'Pin': "\n <svg xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 500 500\" style=\"enable-background:new 0 0 500 500;\" xml:space=\"preserve\">\n\t<g>\n\t\t<path d=\"M368,312.1H132l-0.6-9.4c-0.1-2.4-0.2-4.8-0.2-7.1c0-40.3,20.7-78.1,54.4-99.9V73.2h-9c-13,0-23.6-10.6-23.6-23.6\n\t\t\tS163.5,26,176.6,26h146.9c13,0,23.6,10.6,23.6,23.6s-10.6,23.6-23.6,23.6h-9v122.5c33.7,21.8,54.4,59.5,54.4,99.9\n\t\t\tc0,2.3-0.1,4.7-0.2,7.1L368,312.1z M151.2,292.1h197.5c-1.2-33.8-19.9-65.1-49.4-82.1l-5-2.9V53.2h29c2,0,3.6-1.6,3.6-3.6\n\t\t\tc0-2-1.6-3.6-3.6-3.6H176.6c-2,0-3.6,1.6-3.6,3.6c0,2,1.6,3.6,3.6,3.6h29v153.9l-5,2.9C171.1,227,152.4,258.3,151.2,292.1z\"/>\n\t</g>\n\t<path d=\"M260.9,403.8V299.9h-21.8v108.8h0c0.1,36.1,4.9,65.3,10.9,65.3c6,0,10.9-29.7,10.9-66.4\n\t\tC260.9,406.4,260.9,405.1,260.9,403.8z\"/>\n</svg>\n\n ",
|
|
2604
|
+
'WindowPopout': "\n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 500 500\" style=\"enable-background:new 0 0 500 500;\" xml:space=\"preserve\">\n<style type=\"text/css\">\n\t.st0{fill:none;stroke:#000000;stroke-width:20;stroke-miterlimit:10;}\n</style>\n<path class=\"st0\" d=\"M420.1,359.6h-285c-24.7,0-45-20.2-45-45V124.9c0-24.7,20.2-45,45-45h285c24.7,0,45,20.2,45,45v189.7\n\tC465.1,339.3,444.9,359.6,420.1,359.6z\"/>\n<path class=\"st0\" d=\"M407.3,389.8c-6.3,17.3-22.9,29.7-42.3,29.7H80c-24.7,0-45-20.2-45-45V184.9c0-18.2,10.9-33.9,26.5-41\"/>\n</svg>\n\n ",
|
|
2605
|
+
'Plus': "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 500 500\">\n<path d=\"M254.7,486h-10.3c-5.5,0-10-4.5-10-10V26c0-5.5,4.5-10,10-10h10.3c5.5,0,10,4.5,10,10v450C264.6,481.5,260.2,486,254.7,486z\"/>\n<path d=\"M15,255.1v-10.3c0-5.5,4.5-10,10-10h450c5.5,0,10,4.5,10,10v10.3c0,5.5-4.5,10-10,10H25C19.5,265.1,15,260.7,15,255.1z\"/>\n</svg>\n\n ",
|
|
2606
|
+
'Minus': "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 500 500\">\n<path d=\"M15,255.1v-10.3c0-5.5,4.5-10,10-10h450c5.5,0,10,4.5,10,10v10.3c0,5.5-4.5,10-10,10H25C19.5,265.1,15,260.7,15,255.1z\"/>\n</svg>\n "
|
|
2592
2607
|
};
|
|
2593
2608
|
|
|
2594
2609
|
var WebsyLoadingDialog = /*#__PURE__*/function () {
|
|
@@ -4443,9 +4458,7 @@ var WebsyRouter = /*#__PURE__*/function () {
|
|
|
4443
4458
|
if (this.previousView !== this.currentView || group !== 'main') {
|
|
4444
4459
|
this.showComponents(view);
|
|
4445
4460
|
this.publish('show', [view, params, group]);
|
|
4446
|
-
}
|
|
4447
|
-
|
|
4448
|
-
if (this.previousView === this.currentView && this.previousParams.path !== this.currentParams.path) {
|
|
4461
|
+
} else if (this.previousView === this.currentView && this.previousParams.path !== this.currentParams.path) {
|
|
4449
4462
|
this.showComponents(view);
|
|
4450
4463
|
this.publish('show', [view, params, group]);
|
|
4451
4464
|
}
|
|
@@ -4574,12 +4587,6 @@ var WebsyRouter = /*#__PURE__*/function () {
|
|
|
4574
4587
|
return;
|
|
4575
4588
|
}
|
|
4576
4589
|
|
|
4577
|
-
if (toggle === false) {
|
|
4578
|
-
this.showView(this.currentView, this.currentParams, group);
|
|
4579
|
-
} else if (newPath && newPath !== '') {
|
|
4580
|
-
this.showView(newPath, null, group);
|
|
4581
|
-
}
|
|
4582
|
-
|
|
4583
4590
|
if (this.usesHTMLSuffix === true) {
|
|
4584
4591
|
inputPath = window.location.pathname.split('/').pop() + inputPath;
|
|
4585
4592
|
}
|
|
@@ -4607,6 +4614,12 @@ var WebsyRouter = /*#__PURE__*/function () {
|
|
|
4607
4614
|
} else {//
|
|
4608
4615
|
}
|
|
4609
4616
|
}
|
|
4617
|
+
|
|
4618
|
+
if (toggle === false) {
|
|
4619
|
+
this.showView(this.currentView, this.currentParams, group);
|
|
4620
|
+
} else if (newPath && newPath !== '') {
|
|
4621
|
+
this.showView(newPath, null, group);
|
|
4622
|
+
}
|
|
4610
4623
|
}
|
|
4611
4624
|
}, {
|
|
4612
4625
|
key: "on",
|
|
@@ -6403,7 +6416,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
6403
6416
|
bodyHtml += '</colgroup>';
|
|
6404
6417
|
}
|
|
6405
6418
|
|
|
6406
|
-
data.forEach(function (row) {
|
|
6419
|
+
data.forEach(function (row, rowIndex) {
|
|
6407
6420
|
bodyHtml += "<tr class=\"websy-table-row\">";
|
|
6408
6421
|
row.forEach(function (cell, cellIndex) {
|
|
6409
6422
|
if (typeof sizingColumns[cellIndex] === 'undefined') {
|
|
@@ -6433,14 +6446,24 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
6433
6446
|
}
|
|
6434
6447
|
|
|
6435
6448
|
console.log('rowspan', cell.rowspan);
|
|
6436
|
-
bodyHtml += "<td \n class='websy-table-cell ".concat((cell.classes || []).join(' '), "'\n style='").concat(style, "'\n data-info='").concat(cell.value, "'\n colspan='").concat(cell.colspan || 1, "'\n rowspan='").concat(cell.rowspan || 1, "'\n "); // if (useWidths === true) {
|
|
6449
|
+
bodyHtml += "<td \n class='websy-table-cell ".concat((cell.classes || []).join(' '), "'\n style='").concat(style, "'\n data-info='").concat(cell.value, "'\n colspan='").concat(cell.colspan || 1, "'\n rowspan='").concat(cell.rowspan || 1, "'\n data-row-index='").concat(rowIndex, "'\n data-col-index='").concat(cellIndex, "'\n "); // if (useWidths === true) {
|
|
6437
6450
|
// bodyHtml += `
|
|
6438
6451
|
// style='width: ${sizingColumns[cellIndex].width || sizingColumns[cellIndex].actualWidth}px!important'
|
|
6439
6452
|
// width='${sizingColumns[cellIndex].width || sizingColumns[cellIndex].actualWidth}'
|
|
6440
6453
|
// `
|
|
6441
6454
|
// }
|
|
6442
6455
|
|
|
6443
|
-
bodyHtml += "\n
|
|
6456
|
+
bodyHtml += "\n >";
|
|
6457
|
+
|
|
6458
|
+
if (cell.expandable === true) {
|
|
6459
|
+
bodyHtml += "<i \n data-row-index='".concat(rowIndex, "'\n data-col-index='").concat(cellIndex, "'\n class='websy-table-cell-expand'\n >").concat(WebsyDesigns.Icons.Plus, "</i>");
|
|
6460
|
+
}
|
|
6461
|
+
|
|
6462
|
+
if (cell.collapsable === true) {
|
|
6463
|
+
bodyHtml += "<i \n data-row-index='".concat(rowIndex, "'\n data-col-index='").concat(cellIndex, "'\n class='websy-table-cell-collapse'\n >").concat(WebsyDesigns.Icons.Minus, "</i>");
|
|
6464
|
+
}
|
|
6465
|
+
|
|
6466
|
+
bodyHtml += "\n ".concat(cell.value, "\n </td>");
|
|
6444
6467
|
});
|
|
6445
6468
|
bodyHtml += "</tr>";
|
|
6446
6469
|
}); // bodyHtml += `</div>`
|
|
@@ -6686,14 +6709,30 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
6686
6709
|
}, {
|
|
6687
6710
|
key: "handleClick",
|
|
6688
6711
|
value: function handleClick(event) {
|
|
6712
|
+
var colIndex = +event.target.getAttribute('data-col-index');
|
|
6713
|
+
var rowIndex = +event.target.getAttribute('data-row-index');
|
|
6714
|
+
|
|
6689
6715
|
if (event.target.classList.contains('websy-table-search-icon')) {
|
|
6690
6716
|
console.log('clicked on search icon');
|
|
6691
|
-
var colIndex = +event.target.getAttribute('data-col-index');
|
|
6692
6717
|
|
|
6693
6718
|
if (this.options.columns[this.options.columns.length - 1][colIndex].onSearch) {
|
|
6694
6719
|
this.options.columns[this.options.columns.length - 1][colIndex].onSearch(event, this.options.columns[this.options.columns.length - 1][colIndex]);
|
|
6695
6720
|
}
|
|
6696
6721
|
}
|
|
6722
|
+
|
|
6723
|
+
if (event.target.classList.contains('websy-table-cell-collapse')) {
|
|
6724
|
+
if (this.options.onCollapseCell) {
|
|
6725
|
+
this.options.onCollapseCell(event, +rowIndex, +colIndex);
|
|
6726
|
+
} else {// out of box function
|
|
6727
|
+
}
|
|
6728
|
+
}
|
|
6729
|
+
|
|
6730
|
+
if (event.target.classList.contains('websy-table-cell-expand')) {
|
|
6731
|
+
if (this.options.onExpandCell) {
|
|
6732
|
+
this.options.onExpandCell(event, +rowIndex, +colIndex);
|
|
6733
|
+
} else {// out of box function
|
|
6734
|
+
}
|
|
6735
|
+
}
|
|
6697
6736
|
}
|
|
6698
6737
|
}, {
|
|
6699
6738
|
key: "handleMouseDown",
|
|
@@ -7566,6 +7605,8 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
7566
7605
|
|
|
7567
7606
|
if (this.options.data.bottom.formatter) {
|
|
7568
7607
|
this.longestBottom = this.options.data.bottom.formatter(this.options.data.bottom.max).toString();
|
|
7608
|
+
} else {
|
|
7609
|
+
this.longestBottom = '01/01/2000';
|
|
7569
7610
|
}
|
|
7570
7611
|
}
|
|
7571
7612
|
|
|
@@ -8010,7 +8051,11 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
8010
8051
|
// We currently only support 'Auto'
|
|
8011
8052
|
var labels = this.labelLayer.selectAll(".label_".concat(series.key)).data(series.data);
|
|
8012
8053
|
labels.exit().transition(this.transition).style('stroke-opacity', 1e-6).remove();
|
|
8013
|
-
labels.attr('x',
|
|
8054
|
+
labels.attr('x', function (d) {
|
|
8055
|
+
return getLabelX.call(_this45, d, series.labelPosition);
|
|
8056
|
+
}).attr('y', function (d) {
|
|
8057
|
+
return getLabelY.call(_this45, d, series.labelPosition);
|
|
8058
|
+
}).attr('class', "label_".concat(series.key)).attr('fill', function (d) {
|
|
8014
8059
|
return _this45.options.labelColor || WebsyDesigns.WebsyUtils.getLightDark(d.y.color || d.color || series.color);
|
|
8015
8060
|
}).style('font-size', "".concat(this.options.labelSize || this.options.fontSize, "px")).transition(this.transition).text(function (d) {
|
|
8016
8061
|
return d.y.label || d.y.value;
|
|
@@ -8035,7 +8080,11 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
8035
8080
|
}
|
|
8036
8081
|
}
|
|
8037
8082
|
});
|
|
8038
|
-
labels.enter().append('text').attr('class', "label_".concat(series.key)).attr('x',
|
|
8083
|
+
labels.enter().append('text').attr('class', "label_".concat(series.key)).attr('x', function (d) {
|
|
8084
|
+
return getLabelX.call(_this45, d, series.labelPosition);
|
|
8085
|
+
}).attr('y', function (d) {
|
|
8086
|
+
return getLabelY.call(_this45, d, series.labelPosition);
|
|
8087
|
+
}).attr('alignment-baseline', 'central').attr('text-anchor', this.options.orientation === 'horizontal' ? 'left' : 'middle').attr('fill', function (d) {
|
|
8039
8088
|
return _this45.options.labelColor || WebsyDesigns.WebsyUtils.getLightDark(d.y.color || d.color || series.color);
|
|
8040
8089
|
}).style('font-size', "".concat(this.options.labelSize || this.options.fontSize, "px")).text(function (d) {
|
|
8041
8090
|
return d.y.label || d.y.value;
|