@iamproperty/components 5.5.1-beta-4 → 5.6.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.
- package/assets/css/components/actionbar.css +1 -1
- package/assets/css/components/actionbar.css.map +1 -1
- package/assets/css/components/actionbar.global.css +1 -1
- package/assets/css/components/actionbar.global.css.map +1 -1
- package/assets/css/components/card.css +1 -1
- package/assets/css/components/card.css.map +1 -1
- package/assets/css/components/card.global.css +1 -1
- package/assets/css/components/card.global.css.map +1 -1
- package/assets/css/components/pagination.css +1 -1
- package/assets/css/components/pagination.css.map +1 -1
- package/assets/css/core.min.css +1 -1
- package/assets/css/core.min.css.map +1 -1
- package/assets/css/style.min.css +1 -1
- package/assets/css/style.min.css.map +1 -1
- package/assets/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/actionbar/actionbar.component.js +2 -0
- package/assets/js/components/actionbar/actionbar.component.min.js +7 -5
- package/assets/js/components/actionbar/actionbar.component.min.js.map +1 -1
- package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
- package/assets/js/components/applied-filters/applied-filters.component.min.js +2 -2
- package/assets/js/components/applied-filters/applied-filters.component.min.js.map +1 -1
- package/assets/js/components/card/card.component.js +8 -5
- package/assets/js/components/card/card.component.min.js +8 -6
- package/assets/js/components/card/card.component.min.js.map +1 -1
- package/assets/js/components/carousel/carousel.component.min.js +28 -0
- package/assets/js/components/carousel/carousel.component.min.js.map +1 -0
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
- package/assets/js/components/fileupload/fileupload.component.js +4 -3
- package/assets/js/components/fileupload/fileupload.component.min.js +5 -5
- package/assets/js/components/fileupload/fileupload.component.min.js.map +1 -1
- package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
- package/assets/js/components/header/header.component.min.js +1 -1
- package/assets/js/components/inline-edit/inline-edit.component.js +2 -4
- package/assets/js/components/inline-edit/inline-edit.component.min.js +2 -2
- package/assets/js/components/inline-edit/inline-edit.component.min.js.map +1 -1
- package/assets/js/components/marketing/marketing.component.min.js +17 -0
- package/assets/js/components/marketing/marketing.component.min.js.map +1 -0
- package/assets/js/components/multiselect/multiselect.component.min.js +1 -1
- package/assets/js/components/nav/nav.component.min.js +1 -1
- package/assets/js/components/notification/notification.component.min.js +1 -1
- package/assets/js/components/pagination/pagination.component.min.js +2 -2
- package/assets/js/components/search/search.component.min.js +1 -1
- package/assets/js/components/slider/slider.component.min.js +19 -0
- package/assets/js/components/slider/slider.component.min.js.map +1 -0
- package/assets/js/components/table/table.component.js +26 -14
- package/assets/js/components/table/table.component.min.js +4 -4
- package/assets/js/components/table/table.component.min.js.map +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +1 -1
- package/assets/js/dynamic.min.js +1 -1
- package/assets/js/modules/applied-filters.js +5 -1
- package/assets/js/modules/fileupload.js +9 -0
- package/assets/js/modules/table.js +42 -18
- package/assets/js/scripts.bundle.js +11 -9
- package/assets/js/scripts.bundle.js.map +1 -1
- package/assets/js/scripts.bundle.min.js +2 -2
- package/assets/js/scripts.bundle.min.js.map +1 -1
- package/assets/sass/components/actionbar.global.scss +10 -0
- package/assets/sass/components/actionbar.scss +21 -3
- package/assets/sass/components/card.global.scss +30 -1
- package/assets/sass/components/card.scss +80 -33
- package/assets/sass/components/pagination.scss +1 -1
- package/assets/sass/elements/badge-tag.scss +11 -4
- package/assets/sass/elements/forms.scss +5 -2
- package/assets/ts/components/actionbar/actionbar.component.ts +2 -0
- package/assets/ts/components/card/card.component.ts +8 -5
- package/assets/ts/components/fileupload/fileupload.component.ts +4 -3
- package/assets/ts/components/inline-edit/inline-edit.component.ts +2 -8
- package/assets/ts/components/table/table.component.ts +28 -21
- package/assets/ts/modules/applied-filters.ts +4 -1
- package/assets/ts/modules/fileupload.ts +15 -0
- package/assets/ts/modules/table.ts +50 -19
- package/dist/components.es.js +497 -591
- package/dist/components.umd.js +66 -119
- package/package.json +1 -1
- package/src/components/AddressLookup/AddressLookup.vue +1 -1
- package/src/components/AppliedFilters/AppliedFilters.vue +13 -7
- package/src/components/Card/Card.vue +2 -2
- package/src/components/Carousel/Carousel.vue +1 -1
- package/src/components/Marketing/Marketing.vue +1 -1
- package/src/components/Slider/Slider.vue +1 -1
- package/src/components/Table/Table.vue +2 -1
- package/src/components/Tabs/Tabs.vue +2 -2
- package/dist/README.md +0 -21
|
@@ -195,8 +195,9 @@ export const addFilterEventListeners = (table, form, pagination, wrapper, savedT
|
|
|
195
195
|
|
|
196
196
|
loadAjaxTable(table, form, pagination,wrapper);
|
|
197
197
|
}
|
|
198
|
-
else if(form.hasAttribute('data-submit'))
|
|
198
|
+
else if(form.hasAttribute('data-submit')){
|
|
199
199
|
form.submit();
|
|
200
|
+
}
|
|
200
201
|
else {
|
|
201
202
|
filterTable(table, form, wrapper);
|
|
202
203
|
populateDataQueries(table,form);
|
|
@@ -247,8 +248,9 @@ export const addFilterEventListeners = (table, form, pagination, wrapper, savedT
|
|
|
247
248
|
|
|
248
249
|
if (event && event.target instanceof HTMLElement && event.target.closest('[data-sort]')){
|
|
249
250
|
|
|
250
|
-
if(!form.hasAttribute('data-submit'))
|
|
251
|
+
if(!form.hasAttribute('data-submit')){
|
|
251
252
|
sortTable(table, form, savedTableBody);
|
|
253
|
+
}
|
|
252
254
|
|
|
253
255
|
formSubmit(event);
|
|
254
256
|
}
|
|
@@ -281,6 +283,16 @@ export const addFilterEventListeners = (table, form, pagination, wrapper, savedT
|
|
|
281
283
|
|
|
282
284
|
formSubmit(event);
|
|
283
285
|
}
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
if(event && event.target instanceof HTMLElement && event.target.hasAttribute('id')){
|
|
289
|
+
|
|
290
|
+
let id = event.target.getAttribute('id');
|
|
291
|
+
|
|
292
|
+
if(document.querySelector(`[data-duplicate="${id}"]`)){
|
|
293
|
+
document.querySelector(`[data-duplicate="${id}"]`).checked = event.target.checked;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
284
296
|
});
|
|
285
297
|
|
|
286
298
|
|
|
@@ -353,8 +365,9 @@ export const addFilterEventListeners = (table, form, pagination, wrapper, savedT
|
|
|
353
365
|
|
|
354
366
|
form.classList.remove('processing');
|
|
355
367
|
|
|
356
|
-
if(!form.hasAttribute('data-submit'))
|
|
368
|
+
if(!form.hasAttribute('data-submit')){
|
|
357
369
|
sortTable(table, form, savedTableBody);
|
|
370
|
+
}
|
|
358
371
|
|
|
359
372
|
formSubmit(event);
|
|
360
373
|
}
|
|
@@ -364,8 +377,9 @@ export const addFilterEventListeners = (table, form, pagination, wrapper, savedT
|
|
|
364
377
|
|
|
365
378
|
clearTimeout(timer);
|
|
366
379
|
|
|
367
|
-
if(!form.hasAttribute('data-submit'))
|
|
380
|
+
if(!form.hasAttribute('data-submit')){
|
|
368
381
|
event.preventDefault();
|
|
382
|
+
}
|
|
369
383
|
|
|
370
384
|
formSubmit(event);
|
|
371
385
|
});
|
|
@@ -396,11 +410,13 @@ export const addFilterEventListeners = (table, form, pagination, wrapper, savedT
|
|
|
396
410
|
|
|
397
411
|
let parentForm = mimicInput.closest('form');
|
|
398
412
|
|
|
399
|
-
if(!forms.includes(parentForm))
|
|
413
|
+
if(!forms.includes(parentForm)){
|
|
400
414
|
forms.push(parentForm);
|
|
415
|
+
}
|
|
401
416
|
|
|
402
|
-
if(!fields.includes(mimicField))
|
|
417
|
+
if(!fields.includes(mimicField)){
|
|
403
418
|
fields.push(mimicField);
|
|
419
|
+
}
|
|
404
420
|
|
|
405
421
|
});
|
|
406
422
|
});
|
|
@@ -495,20 +511,23 @@ export const sortTable = (table, form, savedTableBody) => {
|
|
|
495
511
|
|
|
496
512
|
let rowIndex = tableRow.querySelector('td[data-label="'+sortBy+'"], th[data-label="'+sortBy+'"]').textContent.trim();
|
|
497
513
|
|
|
498
|
-
if(tableRow.querySelector('[data-label="'+sortBy+'"] .td__content'))
|
|
514
|
+
if(tableRow.querySelector('[data-label="'+sortBy+'"] .td__content')){
|
|
499
515
|
rowIndex = tableRow.querySelector('[data-label="'+sortBy+'"] .td__content').textContent.trim();
|
|
516
|
+
}
|
|
500
517
|
|
|
501
518
|
// If a predefined order set replace the search term with an ordered numeric value so it can be sorted
|
|
502
519
|
if(orderArray.length && orderArray.includes(rowIndex)){
|
|
503
520
|
rowIndex = orderArray.indexOf(rowIndex);
|
|
504
521
|
}
|
|
505
522
|
|
|
506
|
-
if(isNumeric(rowIndex))
|
|
507
|
-
rowIndex = zeroPad(rowIndex,10)
|
|
523
|
+
if(isNumeric(rowIndex)){
|
|
524
|
+
rowIndex = zeroPad(rowIndex,10);
|
|
525
|
+
}
|
|
508
526
|
|
|
509
527
|
// If the sort format is date then lets transform the index to a sortable date (this is never displayed)
|
|
510
|
-
if(format && format == "date")
|
|
528
|
+
if(format && format == "date"){
|
|
511
529
|
rowIndex = new Date(rowIndex);
|
|
530
|
+
}
|
|
512
531
|
|
|
513
532
|
const dataRow = {
|
|
514
533
|
index: rowIndex,
|
|
@@ -521,8 +540,10 @@ export const sortTable = (table, form, savedTableBody) => {
|
|
|
521
540
|
tableArr.sort((a, b) => (a.index > b.index) ? 1 : -1)
|
|
522
541
|
|
|
523
542
|
// Reverse if descending
|
|
524
|
-
if(order == "descending" || order == "desc")
|
|
543
|
+
if(order == "descending" || order == "desc"){
|
|
525
544
|
tableArr = tableArr.reverse();
|
|
545
|
+
}
|
|
546
|
+
|
|
526
547
|
|
|
527
548
|
// Create a string to return and populate the tbody
|
|
528
549
|
let strTbody = '';
|
|
@@ -571,10 +592,13 @@ export const filterTable = (table, form, wrapper) => {
|
|
|
571
592
|
let filterCount = 0;
|
|
572
593
|
Object.values(filters).forEach((filter, index) => {
|
|
573
594
|
|
|
574
|
-
if(typeof filter == "object" && Object.values(filter).length)
|
|
595
|
+
if(typeof filter == "object" && Object.values(filter).length){
|
|
575
596
|
filterCount += Object.values(filter).length;
|
|
576
|
-
|
|
597
|
+
}
|
|
598
|
+
else {
|
|
577
599
|
filterCount++;
|
|
600
|
+
}
|
|
601
|
+
|
|
578
602
|
});
|
|
579
603
|
|
|
580
604
|
if(filterCount) {
|
|
@@ -634,8 +658,9 @@ export const filterTable = (table, form, wrapper) => {
|
|
|
634
658
|
}
|
|
635
659
|
|
|
636
660
|
// Dynamic values
|
|
637
|
-
if(filter && filter == "$today")
|
|
661
|
+
if(filter && filter == "$today"){
|
|
638
662
|
filter = formatCell('date', new Date());
|
|
663
|
+
}
|
|
639
664
|
else if(filter && filter == "$yesterday"){
|
|
640
665
|
|
|
641
666
|
let yesterday = new Date();
|
|
@@ -725,8 +750,9 @@ export const filterTable = (table, form, wrapper) => {
|
|
|
725
750
|
|
|
726
751
|
});
|
|
727
752
|
|
|
728
|
-
if(!isSearched)
|
|
753
|
+
if(!isSearched){
|
|
729
754
|
row.classList.add('filtered');
|
|
755
|
+
}
|
|
730
756
|
});
|
|
731
757
|
|
|
732
758
|
// Work out what to display after pagination
|
|
@@ -738,8 +764,9 @@ export const filterTable = (table, form, wrapper) => {
|
|
|
738
764
|
|
|
739
765
|
// pagination bit
|
|
740
766
|
let matchesPage = Math.ceil(matched/showRows);
|
|
741
|
-
if(matchesPage == parseInt(page))
|
|
767
|
+
if(matchesPage == parseInt(page)){
|
|
742
768
|
row.classList.add('filtered--show');
|
|
769
|
+
}
|
|
743
770
|
});
|
|
744
771
|
|
|
745
772
|
if(wrapper){
|
|
@@ -808,10 +835,13 @@ export const populateDataQueries = (table,form,wrapper) => {
|
|
|
808
835
|
}).length;
|
|
809
836
|
}
|
|
810
837
|
|
|
811
|
-
if(queryElement.hasAttribute('data-total'))
|
|
838
|
+
if(queryElement.hasAttribute('data-total')){
|
|
812
839
|
queryElement.setAttribute('data-total', numberOfMatchedRows);
|
|
813
|
-
|
|
840
|
+
}
|
|
841
|
+
else {
|
|
814
842
|
queryElement.innerHTML = numberOfMatchedRows;
|
|
843
|
+
}
|
|
844
|
+
|
|
815
845
|
});
|
|
816
846
|
}
|
|
817
847
|
|
|
@@ -858,8 +888,9 @@ export const addPaginationEventListeners = function(table, form, pagination, wra
|
|
|
858
888
|
// Export CSV Data
|
|
859
889
|
export const addExportEventListeners = (button, table) => {
|
|
860
890
|
|
|
861
|
-
if(!button)
|
|
891
|
+
if(!button){
|
|
862
892
|
return false;
|
|
893
|
+
}
|
|
863
894
|
|
|
864
895
|
button.addEventListener('click', (event) => {
|
|
865
896
|
exportAsCSV(table);
|