@iamproperty/components 5.6.1-beta16 → 5.6.1-beta18
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/carousel.css +1 -1
- package/assets/css/components/carousel.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.min.js +3 -3
- 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 +1 -1
- package/assets/js/components/card/card.component.min.js +1 -1
- package/assets/js/components/carousel/carousel.component.js +14 -1
- package/assets/js/components/carousel/carousel.component.min.js +5 -5
- package/assets/js/components/carousel/carousel.component.min.js.map +1 -1
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
- package/assets/js/components/fileupload/fileupload.component.min.js +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.min.js +1 -1
- package/assets/js/components/marketing/marketing.component.min.js +1 -1
- 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 +3 -3
- package/assets/js/components/search/search.component.min.js +1 -1
- package/assets/js/components/slider/slider.component.min.js +1 -1
- package/assets/js/components/table/table.component.js +16 -1
- 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 +5 -5
- package/assets/js/dynamic.min.js.map +1 -1
- package/assets/js/modules/dialogs.js +6 -0
- package/assets/js/modules/table.js +6 -1
- package/assets/js/scripts.bundle.js +11 -11
- 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.scss +4 -0
- package/assets/sass/components/carousel.scss +32 -7
- package/assets/sass/components/pagination.scss +11 -16
- package/assets/ts/components/carousel/carousel.component.ts +17 -1
- package/assets/ts/components/table/table.component.ts +24 -1
- package/assets/ts/modules/dialogs.ts +8 -0
- package/assets/ts/modules/table.ts +8 -2
- package/dist/components.es.js +197 -191
- package/dist/components.umd.js +35 -35
- package/package.json +1 -1
- package/src/components/Carousel/Carousel.vue +5 -1
|
@@ -130,18 +130,40 @@
|
|
|
130
130
|
|
|
131
131
|
// #region carousel controls/pips
|
|
132
132
|
.carousel .carousel__controls {
|
|
133
|
-
|
|
134
|
-
text-align: center;
|
|
135
|
-
width: 10rem;
|
|
136
|
-
max-height: 1rem;
|
|
137
133
|
overflow: hidden;
|
|
138
134
|
margin-inline: auto;
|
|
139
135
|
|
|
136
|
+
&:not(.thumbnails){
|
|
137
|
+
max-height: 1rem;
|
|
138
|
+
width: 10rem;
|
|
139
|
+
text-align: center;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&.thumbnails {
|
|
143
|
+
margin-block-start: 2rem;
|
|
144
|
+
}
|
|
145
|
+
|
|
140
146
|
@include media-breakpoint-up(sm) {
|
|
141
147
|
width: 100%;
|
|
142
148
|
}
|
|
143
149
|
|
|
144
150
|
button {
|
|
151
|
+
padding: 0;
|
|
152
|
+
margin: 0 0.2rem 0.2rem;
|
|
153
|
+
border: 3px solid var(--colour-canvas);
|
|
154
|
+
border-radius: 4px;
|
|
155
|
+
|
|
156
|
+
&.has-thumbnail {
|
|
157
|
+
height: 4.625rem;
|
|
158
|
+
|
|
159
|
+
img {
|
|
160
|
+
height: 100%;
|
|
161
|
+
width: auto;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
button:not(.has-thumbnail) {
|
|
145
167
|
width: 1rem;
|
|
146
168
|
height: 1rem;
|
|
147
169
|
min-height: 1rem;
|
|
@@ -149,10 +171,9 @@
|
|
|
149
171
|
text-indent: -50rem;
|
|
150
172
|
overflow: hidden;
|
|
151
173
|
background: var(--colour-primary-theme);
|
|
152
|
-
padding: 0;
|
|
153
174
|
margin: 0 0.5rem 0.5rem 0.5rem;
|
|
154
175
|
border: none;
|
|
155
|
-
|
|
176
|
+
|
|
156
177
|
&:before {
|
|
157
178
|
display: none;
|
|
158
179
|
}
|
|
@@ -164,8 +185,12 @@
|
|
|
164
185
|
}
|
|
165
186
|
|
|
166
187
|
.carousel__controls > button[aria-current] {
|
|
188
|
+
--colour-active-thumbnail: var(--colour-info);
|
|
189
|
+
border-color: var(--colour-active-thumbnail);
|
|
167
190
|
|
|
168
|
-
|
|
191
|
+
&:not(.has-thumbnail) {
|
|
192
|
+
background: var(--colour-success);
|
|
193
|
+
}
|
|
169
194
|
}
|
|
170
195
|
|
|
171
196
|
// #endregion
|
|
@@ -35,15 +35,18 @@
|
|
|
35
35
|
padding-inline: 1rem;
|
|
36
36
|
|
|
37
37
|
.select--minimal {
|
|
38
|
-
|
|
39
|
-
height:
|
|
40
|
-
line-height: rem(52);
|
|
38
|
+
height: calc(3.25rem - 1em);
|
|
39
|
+
line-height: calc(3.25rem - 1em);
|
|
41
40
|
margin-left: rem(-16);
|
|
42
41
|
font-weight: bold;
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
div:has(> select){
|
|
46
45
|
margin-bottom: 0;
|
|
46
|
+
|
|
47
|
+
&:after {
|
|
48
|
+
top: 50%;
|
|
49
|
+
}
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
|
|
@@ -118,7 +121,7 @@
|
|
|
118
121
|
display: none;
|
|
119
122
|
background: none;
|
|
120
123
|
padding-inline: 1rem;
|
|
121
|
-
|
|
124
|
+
color: var(--colour-body);
|
|
122
125
|
|
|
123
126
|
@include container-up(sm) {
|
|
124
127
|
|
|
@@ -134,21 +137,13 @@
|
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
&:is(:hover,:focus):not(:disabled){
|
|
137
|
-
background-color: var(--
|
|
140
|
+
background-color: var(--pagination-link-color);
|
|
141
|
+
color: var(--colour-hover);
|
|
138
142
|
}
|
|
139
143
|
|
|
140
144
|
&:is(:active):not(:disabled){
|
|
141
|
-
background-color:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
@include dark-mode(){
|
|
145
|
-
&:is(:hover,:focus):not(:disabled){
|
|
146
|
-
background-color: var(--colour-canvas);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
&:is(:active):not(:disabled){
|
|
150
|
-
background-color: var(--colour-canvas);
|
|
151
|
-
}
|
|
145
|
+
background-color: var(--pagination-link-color);
|
|
146
|
+
color: var(--colour-active);
|
|
152
147
|
}
|
|
153
148
|
|
|
154
149
|
&:disabled {
|
|
@@ -49,6 +49,8 @@ class iamCarousel extends HTMLElement {
|
|
|
49
49
|
|
|
50
50
|
const carouselElement = this.shadowRoot.querySelector('.carousel');
|
|
51
51
|
const row = this.querySelector('.row');
|
|
52
|
+
const thumbnailImages = JSON.parse(this.dataset.thumbnails);
|
|
53
|
+
|
|
52
54
|
const carouselControls = this.shadowRoot.querySelector('.carousel__controls');
|
|
53
55
|
|
|
54
56
|
let itemCount = this.querySelectorAll(':scope > .row > .col').length
|
|
@@ -61,10 +63,24 @@ class iamCarousel extends HTMLElement {
|
|
|
61
63
|
if(this.classList.contains('hide-controls'))
|
|
62
64
|
carouselElement.classList.add('hide-controls');
|
|
63
65
|
|
|
66
|
+
if (thumbnailImages?.length) {
|
|
67
|
+
carouselControls.classList.add('thumbnails');
|
|
68
|
+
}
|
|
69
|
+
|
|
64
70
|
// populate the pips
|
|
65
71
|
let pips = "";
|
|
66
72
|
for (let i = 1; i <= itemCount; i++) {
|
|
67
|
-
|
|
73
|
+
let pipContent = null;
|
|
74
|
+
let pipClass = '';
|
|
75
|
+
|
|
76
|
+
if (thumbnailImages.length) {
|
|
77
|
+
pipClass = 'has-thumbnail';
|
|
78
|
+
pipContent = `<img src="${thumbnailImages[i - 1].src}" alt="Slide ${i}" height="148"/>`;
|
|
79
|
+
} else {
|
|
80
|
+
pipContent = `Slide ${i}`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
pips += `<button class="control-${i} ${pipClass}" data-slide="${i}" ${i == 1 ? "aria-current":""}>${pipContent}</button>`;
|
|
68
84
|
}
|
|
69
85
|
carouselControls.innerHTML = pips;
|
|
70
86
|
|
|
@@ -242,7 +242,10 @@ class iamTable extends HTMLElement {
|
|
|
242
242
|
|
|
243
243
|
|
|
244
244
|
tableModule.makeTableFunctional(this.table, this.form, this.pagination, this);
|
|
245
|
-
|
|
245
|
+
|
|
246
|
+
if(!this.hasAttribute('data-no-submit'))
|
|
247
|
+
tableModule.filterTable(this.table, this.form,this);
|
|
248
|
+
|
|
246
249
|
tableModule.populateDataQueries(this.table, this.form);
|
|
247
250
|
}
|
|
248
251
|
|
|
@@ -256,6 +259,22 @@ class iamTable extends HTMLElement {
|
|
|
256
259
|
|
|
257
260
|
});
|
|
258
261
|
|
|
262
|
+
// Push up the pagination events
|
|
263
|
+
this.pagination.addEventListener('update-show', (event) => {
|
|
264
|
+
|
|
265
|
+
let show = event.detail.show;
|
|
266
|
+
|
|
267
|
+
const updateEvent = new CustomEvent("update-show", { detail: { show: show } });
|
|
268
|
+
this.dispatchEvent(updateEvent);
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
this.pagination.addEventListener('update-page', (event) => {
|
|
272
|
+
|
|
273
|
+
let page = event.detail.page;
|
|
274
|
+
|
|
275
|
+
const updateEvent = new CustomEvent("update-page", { detail: { page: page } });
|
|
276
|
+
this.dispatchEvent(updateEvent);
|
|
277
|
+
});
|
|
259
278
|
}
|
|
260
279
|
|
|
261
280
|
|
|
@@ -265,6 +284,10 @@ class iamTable extends HTMLElement {
|
|
|
265
284
|
|
|
266
285
|
attributeChangedCallback(attrName, oldVal, newVal) {
|
|
267
286
|
|
|
287
|
+
if(this.hasAttribute('data-no-submit')){
|
|
288
|
+
return false;
|
|
289
|
+
}
|
|
290
|
+
|
|
268
291
|
this.pagination = this.shadowRoot.querySelector('iam-pagination');
|
|
269
292
|
|
|
270
293
|
switch (attrName) {
|
|
@@ -72,6 +72,14 @@ const extendDialogs = (body) => {
|
|
|
72
72
|
btnElement.classList.remove('active');
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
+
let closeEvent = new CustomEvent('dialog-closed', {
|
|
76
|
+
bubbles: true,
|
|
77
|
+
cancelable: true,
|
|
78
|
+
detail: { modalId: dialog.id }
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
event.target.dispatchEvent(closeEvent);
|
|
82
|
+
|
|
75
83
|
window.dataLayer = window.dataLayer || [];
|
|
76
84
|
window.dataLayer.push({
|
|
77
85
|
"event": "closeModal",
|
|
@@ -149,7 +149,9 @@ export const addFilterEventListeners = (table, form, pagination, wrapper, savedT
|
|
|
149
149
|
// Check what conditions are set on the table to see what the form actions are
|
|
150
150
|
let formSubmit = function(event, paginate = false){
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
if(wrapper.hasAttribute('data-no-submit')){
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
153
155
|
|
|
154
156
|
if(form.classList.contains('processing'))
|
|
155
157
|
return false;
|
|
@@ -848,6 +850,10 @@ export const populateDataQueries = (table,form,wrapper) => {
|
|
|
848
850
|
// Pagination
|
|
849
851
|
export const addPaginationEventListeners = function(table, form, pagination, wrapper){
|
|
850
852
|
|
|
853
|
+
if(wrapper.hasAttribute('data-no-submit')){
|
|
854
|
+
return false;
|
|
855
|
+
}
|
|
856
|
+
|
|
851
857
|
pagination.addEventListener('update-page', (event) => {
|
|
852
858
|
|
|
853
859
|
let paginationInput = form.querySelector('[data-pagination]');
|
|
@@ -1007,7 +1013,7 @@ const filterFilters = function(form){
|
|
|
1007
1013
|
}
|
|
1008
1014
|
|
|
1009
1015
|
export const loadAjaxTable = async function (table, form, pagination, wrapper){
|
|
1010
|
-
|
|
1016
|
+
|
|
1011
1017
|
let formData = new FormData(form);
|
|
1012
1018
|
let queryString = new URLSearchParams(formData).toString();
|
|
1013
1019
|
let columns = table.querySelectorAll('thead tr th:not(.expand-button-heading)');
|