@iamproperty/components 5.6.1-beta20 → 5.6.1-beta21
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/address-lookup.css +1 -1
- package/assets/css/components/address-lookup.css.map +1 -1
- package/assets/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
- package/assets/js/components/address-lookup/address-lookup.component.min.js +2 -2
- package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
- package/assets/js/components/card/card.component.js +32 -20
- package/assets/js/components/card/card.component.min.js +19 -19
- package/assets/js/components/card/card.component.min.js.map +1 -1
- package/assets/js/components/carousel/carousel.component.min.js +3 -3
- 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 +1 -1
- 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.min.js +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +1 -1
- package/assets/js/dynamic.min.js +4 -4
- package/assets/js/dynamic.min.js.map +1 -1
- package/assets/js/modules/carousel.js +11 -4
- package/assets/js/scripts.bundle.js +28 -28
- 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/address-lookup.scss +4 -0
- package/assets/ts/components/card/card.component.ts +40 -21
- package/assets/ts/modules/carousel.ts +12 -4
- package/dist/components.es.js +11 -11
- package/dist/components.umd.js +39 -39
- package/package.json +1 -1
|
@@ -7,6 +7,10 @@ input[name="postcode"] {
|
|
|
7
7
|
border-color: var(--error-border,var(--colour-primary))!important;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
:is([name="postcode"]):is(:focus,.focus):not(:disabled) {
|
|
11
|
+
border-color: var(--colour-info)!important;
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
div:has(input[name="postcode"]) .suffix {
|
|
11
15
|
|
|
12
16
|
border-color: var(--error-border,var(--colour-primary))!important;
|
|
@@ -33,21 +33,7 @@ class iamCard extends HTMLElement {
|
|
|
33
33
|
</style>
|
|
34
34
|
<link rel="stylesheet" href="https://kit.fontawesome.com/26fdbf0179.css" crossorigin="anonymous">
|
|
35
35
|
<div class="card ${classList}" tabindex="0" part="card">
|
|
36
|
-
|
|
37
|
-
<div class="card__body" part="body">
|
|
38
|
-
${!this.hasAttribute('data-image') && this.querySelector('[slot="badges"]') && this.querySelector('[slot="checkbox"]') ? `<div class="card__badges card__badges--inline"><slot name="badges"></slot></div>` : ''}
|
|
39
|
-
${!this.hasAttribute('data-image') && !this.hasAttribute('data-record') && this.querySelector('[slot="badges"]') ? `<div class="card__badges"><slot name="badges"></slot></div>` : ''}
|
|
40
|
-
${this.hasAttribute('data-illustration') ? `<div class="card__illustration"><img src="${this.getAttribute('data-illustration')}" alt="" loading="lazy" /></div>` : ''}
|
|
41
|
-
<slot></slot>
|
|
42
|
-
${this.hasAttribute('data-total') ? `<div class="card__total">${this.getAttribute('data-total')}</div>` : ''}
|
|
43
|
-
</div>
|
|
44
|
-
${this.hasAttribute('data-add-link') ? `<button class="btn btn-compact btn-secondary fa-plus">Add property</button>` : ''}
|
|
45
|
-
<slot name="checkbox"></slot>
|
|
46
|
-
<div class="card__footer" part="footer">
|
|
47
|
-
<slot name="footer"></slot>
|
|
48
|
-
<slot name="btns"></slot>
|
|
49
|
-
${this.hasAttribute('data-cta') ? `<span class="link d-inline-block pt-0 mb-0">${this.getAttribute('data-cta')}</span>` : ''}
|
|
50
|
-
</div>
|
|
36
|
+
${this.createCardConent()}
|
|
51
37
|
</div>
|
|
52
38
|
`;
|
|
53
39
|
this.shadowRoot.appendChild(template.content.cloneNode(true));
|
|
@@ -57,6 +43,25 @@ class iamCard extends HTMLElement {
|
|
|
57
43
|
document.head.insertAdjacentHTML('beforeend',`<style id="cardGlobal">${loadExtraCSS}</style>`);
|
|
58
44
|
}
|
|
59
45
|
|
|
46
|
+
const createCardConent () {
|
|
47
|
+
|
|
48
|
+
return `${this.hasAttribute('data-image') || this.hasAttribute('data-record') ? `<div class="card__head">${this.hasAttribute('data-image') ? `<img src="${this.getAttribute('data-image')}" alt="" loading="lazy" />` : ``} <div class="card__badges"><slot name="badges"></slot></div></div>` : ''}
|
|
49
|
+
<div class="card__body" part="body">
|
|
50
|
+
${!this.hasAttribute('data-image') && this.querySelector('[slot="badges"]') && this.querySelector('[slot="checkbox"]') ? `<div class="card__badges card__badges--inline"><slot name="badges"></slot></div>` : ''}
|
|
51
|
+
${!this.hasAttribute('data-image') && !this.hasAttribute('data-record') && this.querySelector('[slot="badges"]') ? `<div class="card__badges"><slot name="badges"></slot></div>` : ''}
|
|
52
|
+
${this.hasAttribute('data-illustration') ? `<div class="card__illustration"><img src="${this.getAttribute('data-illustration')}" alt="" loading="lazy" /></div>` : ''}
|
|
53
|
+
<slot></slot>
|
|
54
|
+
${this.hasAttribute('data-total') ? `<div class="card__total">${this.getAttribute('data-total')}</div>` : ''}
|
|
55
|
+
</div>
|
|
56
|
+
${this.hasAttribute('data-add-link') ? `<button class="btn btn-compact btn-secondary fa-plus">Add property</button>` : ''}
|
|
57
|
+
<slot name="checkbox"></slot>
|
|
58
|
+
<div class="card__footer" part="footer">
|
|
59
|
+
<slot name="footer"></slot>
|
|
60
|
+
<slot name="btns"></slot>
|
|
61
|
+
${this.hasAttribute('data-cta') ? `<span class="link d-inline-block pt-0 mb-0">${this.getAttribute('data-cta')}</span>` : ''}
|
|
62
|
+
</div>`;
|
|
63
|
+
}
|
|
64
|
+
|
|
60
65
|
connectedCallback() {
|
|
61
66
|
this.classList.add('loaded');
|
|
62
67
|
|
|
@@ -189,7 +194,7 @@ class iamCard extends HTMLElement {
|
|
|
189
194
|
}
|
|
190
195
|
|
|
191
196
|
static get observedAttributes() {
|
|
192
|
-
return ["data-total","class"];
|
|
197
|
+
return ["data-total","class","data-image"];
|
|
193
198
|
}
|
|
194
199
|
|
|
195
200
|
attributeChangedCallback(attrName, oldVal, newVal) {
|
|
@@ -200,12 +205,26 @@ class iamCard extends HTMLElement {
|
|
|
200
205
|
break;
|
|
201
206
|
}
|
|
202
207
|
case "class": {
|
|
203
|
-
let classList = this.classList.toString();
|
|
204
|
-
|
|
205
|
-
if(this.querySelector('*:not(.badge):not(small):not(.btn) > [class*="fa-"]:not(.btn)'))
|
|
206
|
-
classList += ' card--has-icon';
|
|
207
208
|
|
|
208
|
-
|
|
209
|
+
if(oldVal != newVal){
|
|
210
|
+
let classList = this.classList.toString();
|
|
211
|
+
|
|
212
|
+
if(this.querySelector('*:not(.badge):not(small):not(.btn) > [class*="fa-"]:not(.btn)'))
|
|
213
|
+
classList += ' card--has-icon';
|
|
214
|
+
|
|
215
|
+
this.shadowRoot.querySelector('.card').setAttribute('class',`card ${classList}`);
|
|
216
|
+
|
|
217
|
+
this.shadowRoot.querySelector('.card').innerHTML = this.createCardConent();
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
case "data-image": {
|
|
223
|
+
|
|
224
|
+
if(oldVal != newVal){
|
|
225
|
+
|
|
226
|
+
this.shadowRoot.querySelector('.card').innerHTML = this.createCardConent();
|
|
227
|
+
}
|
|
209
228
|
break;
|
|
210
229
|
}
|
|
211
230
|
}
|
|
@@ -19,7 +19,8 @@ function carousel(carouselElement, row) {
|
|
|
19
19
|
|
|
20
20
|
let itemWidth = row.querySelector(':scope > .col').scrollWidth;
|
|
21
21
|
let lastItemOffset = row.querySelector(':scope > .col:last-child').offsetLeft;
|
|
22
|
-
|
|
22
|
+
//+60px here is to account for when the next offscreen slide is visible beneath the next arrow
|
|
23
|
+
let lastItemInView = carouselInner.scrollLeft + scrollArea + carouselInner.getBoundingClientRect().left >= (lastItemOffset + 60);
|
|
23
24
|
|
|
24
25
|
let visibleItems = Math.round(scrollArea / itemWidth);
|
|
25
26
|
|
|
@@ -69,7 +70,7 @@ function carousel(carouselElement, row) {
|
|
|
69
70
|
|
|
70
71
|
carouselInner.scroll({
|
|
71
72
|
top: 0,
|
|
72
|
-
left: el.offsetLeft -
|
|
73
|
+
left: el.offsetLeft - carouselInner.getBoundingClientRect().left,
|
|
73
74
|
behavior: 'smooth'
|
|
74
75
|
});
|
|
75
76
|
|
|
@@ -87,12 +88,19 @@ function carousel(carouselElement, row) {
|
|
|
87
88
|
let visibleItems = Math.round(scrollArea / itemWidth);
|
|
88
89
|
|
|
89
90
|
let lastItemOffset = row.querySelector(':scope > .col:last-child').offsetLeft;
|
|
90
|
-
let lastItemInView = carouselInner.scrollLeft + scrollArea >= (lastItemOffset +
|
|
91
|
+
let lastItemInView = carouselInner.scrollLeft + scrollArea + carouselInner.getBoundingClientRect().left >= (lastItemOffset + 60);
|
|
91
92
|
|
|
92
93
|
//Check if theres room for more slides than we have
|
|
93
94
|
let leftOverSpace = (Math.ceil(itemCount / visibleItems) * visibleItems) - itemCount;
|
|
94
95
|
|
|
95
|
-
|
|
96
|
+
/*
|
|
97
|
+
When the last slide isn't filled with items, we only want to move back the number of items on the slide,
|
|
98
|
+
rather than the total number of possible visible items
|
|
99
|
+
*/
|
|
100
|
+
let spacesToMove = visibleItems - leftOverSpace;
|
|
101
|
+
|
|
102
|
+
//Only want to change the amount of movement if the last item is visible
|
|
103
|
+
let movement = lastItemInView && leftOverSpace > 0 ? spacesToMove * itemWidth : carouselInner.clientWidth;
|
|
96
104
|
|
|
97
105
|
for (var target = e.target; target && target != this; target = target.parentNode) {
|
|
98
106
|
if (typeof target.matches == "function" && target.matches('.btn-next, .btn-prev')) {
|
package/dist/components.es.js
CHANGED
|
@@ -453,7 +453,7 @@ const N = /* @__PURE__ */ m(ne, [["render", Se]]), xe = {
|
|
|
453
453
|
},
|
|
454
454
|
created() {
|
|
455
455
|
this.$nextTick(function() {
|
|
456
|
-
import("./fileupload.component.min-
|
|
456
|
+
import("./fileupload.component.min-2dd5ee41.mjs").then((t) => {
|
|
457
457
|
window.customElements.get("iam-fileupload") || window.customElements.define("iam-fileupload", t.default);
|
|
458
458
|
}).catch((t) => {
|
|
459
459
|
console.log(t.message);
|
|
@@ -483,7 +483,7 @@ const qe = {
|
|
|
483
483
|
props: {},
|
|
484
484
|
mounted() {
|
|
485
485
|
this.$nextTick(function() {
|
|
486
|
-
import("./accordion.component.min-
|
|
486
|
+
import("./accordion.component.min-d6a0f423.mjs").then((t) => {
|
|
487
487
|
window.customElements.get("iam-accordion") || window.customElements.define("iam-accordion", t.default);
|
|
488
488
|
}).catch((t) => {
|
|
489
489
|
console.log(t.message);
|
|
@@ -592,7 +592,7 @@ const Va = /* @__PURE__ */ m(Ne, [["render", Fe]]), ze = {
|
|
|
592
592
|
name: "Card",
|
|
593
593
|
created() {
|
|
594
594
|
this.$nextTick(function() {
|
|
595
|
-
import("./card.component-
|
|
595
|
+
import("./card.component-a11e9b92.mjs").then((t) => {
|
|
596
596
|
window.customElements.get("iam-card") || window.customElements.define("iam-card", t.default);
|
|
597
597
|
}).catch((t) => {
|
|
598
598
|
console.log(t.message);
|
|
@@ -623,7 +623,7 @@ const Fa = /* @__PURE__ */ m(ze, [["render", Be]]), Oe = {
|
|
|
623
623
|
},
|
|
624
624
|
mounted() {
|
|
625
625
|
this.$nextTick(function() {
|
|
626
|
-
import("./carousel.component.min-
|
|
626
|
+
import("./carousel.component.min-655528a6.mjs").then((t) => {
|
|
627
627
|
window.customElements.get("iam-carousel") || window.customElements.define("iam-carousel", t.default);
|
|
628
628
|
}).catch((t) => {
|
|
629
629
|
console.log(t.message);
|
|
@@ -652,7 +652,7 @@ const za = /* @__PURE__ */ m(Oe, [["render", We]]), Ke = {
|
|
|
652
652
|
},
|
|
653
653
|
mounted() {
|
|
654
654
|
this.$nextTick(function() {
|
|
655
|
-
import("./header.component.min-
|
|
655
|
+
import("./header.component.min-f9cf9d07.mjs").then((t) => {
|
|
656
656
|
window.customElements.get("iam-header") || window.customElements.define("iam-header", t.default);
|
|
657
657
|
}).catch((t) => {
|
|
658
658
|
console.log(t.message);
|
|
@@ -1048,7 +1048,7 @@ const Wa = /* @__PURE__ */ m(_t, [["render", Ht]]), Mt = {
|
|
|
1048
1048
|
name: "Nav",
|
|
1049
1049
|
mounted() {
|
|
1050
1050
|
this.$nextTick(function() {
|
|
1051
|
-
import("./nav.component.min-
|
|
1051
|
+
import("./nav.component.min-85240e2c.mjs").then((t) => {
|
|
1052
1052
|
window.customElements.get("iam-nav") || window.customElements.define("iam-nav", t.default);
|
|
1053
1053
|
}).catch((t) => {
|
|
1054
1054
|
console.log(t.message);
|
|
@@ -1168,7 +1168,7 @@ const Zt = {
|
|
|
1168
1168
|
name: "Tabs",
|
|
1169
1169
|
created() {
|
|
1170
1170
|
this.$nextTick(function() {
|
|
1171
|
-
import("./tabs.component.min-
|
|
1171
|
+
import("./tabs.component.min-9a9448c4.mjs").then((t) => {
|
|
1172
1172
|
window.customElements.get("iam-tabs") || window.customElements.define("iam-tabs", t.default);
|
|
1173
1173
|
}).catch((t) => {
|
|
1174
1174
|
console.log(t.message);
|
|
@@ -1315,7 +1315,7 @@ function ha(t, a, e, i, r, s) {
|
|
|
1315
1315
|
}
|
|
1316
1316
|
const es = /* @__PURE__ */ m(pa, [["render", ha]]);
|
|
1317
1317
|
/*!
|
|
1318
|
-
* iamKey v5.6.1-
|
|
1318
|
+
* iamKey v5.6.1-beta21
|
|
1319
1319
|
* Copyright 2022-2024 iamproperty
|
|
1320
1320
|
*/
|
|
1321
1321
|
function fa(t, a) {
|
|
@@ -1485,7 +1485,7 @@ const as = /* @__PURE__ */ m(ka, [["render", Aa]]), La = {
|
|
|
1485
1485
|
props: {},
|
|
1486
1486
|
mounted() {
|
|
1487
1487
|
this.$nextTick(function() {
|
|
1488
|
-
import("./actionbar.component.min-
|
|
1488
|
+
import("./actionbar.component.min-167ba759.mjs").then((t) => {
|
|
1489
1489
|
window.customElements.get("iam-actionbar") || window.customElements.define("iam-actionbar", t.default);
|
|
1490
1490
|
}).catch((t) => {
|
|
1491
1491
|
console.log(t.message);
|
|
@@ -1500,7 +1500,7 @@ function Sa(t, a, e, i, r, s) {
|
|
|
1500
1500
|
}
|
|
1501
1501
|
const ss = /* @__PURE__ */ m(La, [["render", Sa]]);
|
|
1502
1502
|
/*!
|
|
1503
|
-
* iamKey v5.6.1-
|
|
1503
|
+
* iamKey v5.6.1-beta21
|
|
1504
1504
|
* Copyright 2022-2024 iamproperty
|
|
1505
1505
|
*/
|
|
1506
1506
|
class R extends HTMLElement {
|
|
@@ -1625,7 +1625,7 @@ const is = /* @__PURE__ */ m(qa, [["render", Ta]]), Ea = {
|
|
|
1625
1625
|
name: "Address Lookup",
|
|
1626
1626
|
mounted() {
|
|
1627
1627
|
this.$nextTick(function() {
|
|
1628
|
-
import("./address-lookup.component.min-
|
|
1628
|
+
import("./address-lookup.component.min-16beabdf.mjs").then((t) => {
|
|
1629
1629
|
window.customElements.get("iam-address-lookup") || window.customElements.define("iam-address-lookup", t.default);
|
|
1630
1630
|
}).catch((t) => {
|
|
1631
1631
|
console.log(t.message);
|