@saasquatch/vanilla-components 1.2.6 → 1.2.8-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/LICENSE +21 -21
- package/dist/cjs/{WidgetHost-fce29ef5.js → WidgetHost-71b013eb.js} +195 -195
- package/dist/cjs/sqh-close-button.cjs.entry.js +1 -1
- package/dist/cjs/sqh-copy-button_12.cjs.entry.js +154 -154
- package/dist/cjs/sqh-referral-code.cjs.entry.js +1 -1
- package/dist/collection/components/copy-button/copy-button.js +22 -22
- package/dist/collection/components/copy-link-button/copy-link-button.js +15 -15
- package/dist/collection/components/global-container/global-container.js +8 -8
- package/dist/collection/components/image-component/image-component.js +10 -10
- package/dist/collection/components/partner-stat-component/partner-stat-component.js +2 -2
- package/dist/collection/components/referral-list/referral-list.js +51 -51
- package/dist/collection/components/share-button/share-button.js +19 -19
- package/dist/collection/components/share-button-container/share-button-container.js +31 -31
- package/dist/collection/components/stat-component/stat-component.js +2 -2
- package/dist/collection/components/stats-container/stats-container.js +4 -4
- package/dist/collection/components/text-component/text-component.js +13 -13
- package/dist/collection/entrypoint.js +34 -34
- package/dist/collection/services/WidgetHost.js +195 -195
- package/dist/esm/{WidgetHost-903fb7cc.js → WidgetHost-9c337319.js} +195 -195
- package/dist/esm/sqh-close-button.entry.js +1 -1
- package/dist/esm/sqh-copy-button_12.entry.js +154 -154
- package/dist/esm/sqh-referral-code.entry.js +1 -1
- package/dist/esm-es5/sqh-close-button.entry.js +1 -1
- package/dist/esm-es5/sqh-copy-button_12.entry.js +9 -9
- package/dist/esm-es5/sqh-referral-code.entry.js +1 -1
- package/dist/types/components/share-button-container/share-button-container.d.ts +24 -24
- package/dist/types/components.d.ts +46 -46
- package/dist/types/saasquatch.d.ts +105 -105
- package/dist/widget-components/entrypoint.js +34 -34
- package/dist/widget-components/{p-50ae8f2b.entry.js → p-366f1663.entry.js} +1 -1
- package/dist/widget-components/{p-131a5c4a.entry.js → p-54ea7a00.entry.js} +1 -1
- package/dist/widget-components/p-58be1132.system.js +1 -1
- package/dist/widget-components/{p-8baa34a0.entry.js → p-71e912a2.entry.js} +6 -6
- package/dist/widget-components/{p-b9fcb846.system.entry.js → p-b17efca4.system.entry.js} +1 -1
- package/dist/widget-components/p-c5f70ddc.system.entry.js +8 -0
- package/dist/widget-components/{p-da180bcd.system.entry.js → p-c8bc8c77.system.entry.js} +1 -1
- package/dist/widget-components/widget-components.esm.js +1 -1
- package/docs/raisins.json +1 -1
- package/package.json +97 -97
- package/readme.md +52 -52
- package/dist/widget-components/p-1b8f2cfc.system.entry.js +0 -8
- /package/dist/esm-es5/{WidgetHost-903fb7cc.js → WidgetHost-9c337319.js} +0 -0
- /package/dist/widget-components/{p-e692beaf.system.js → p-8e232564.system.js} +0 -0
- /package/dist/widget-components/{p-ffeb02d1.js → p-edd43dbc.js} +0 -0
|
@@ -83,53 +83,53 @@ export class ReferralList {
|
|
|
83
83
|
if (this.referrals.length < 3 && this.referredBy && this.showreferrer) {
|
|
84
84
|
referredByRow = (h("sqh-referral-component", { id: uuid(), referral: this.referredBy, referralvariables: referralvariables, referraltype: "referrer", unknownuser: this.unknownuser, locale: this.internationalization ? this.locale : "en-US" }));
|
|
85
85
|
}
|
|
86
|
-
const clz = css `
|
|
87
|
-
.squatch-referrals-icon.icon-ok-circled {
|
|
88
|
-
color: ${this.rewardcolor};
|
|
89
|
-
}
|
|
90
|
-
.squatch-referrals-icon.icon-attention {
|
|
91
|
-
color: ${this.pendingcolor};
|
|
92
|
-
}
|
|
93
|
-
.squatch-referrals-value {
|
|
94
|
-
color: ${this.rewardcolor};
|
|
95
|
-
}
|
|
96
|
-
.squatch-referrals-value.pending {
|
|
97
|
-
color: ${this.pendingcolor};
|
|
98
|
-
}
|
|
99
|
-
.squatch-referrals-value.referrer {
|
|
100
|
-
color: ${this.rewardcolor};
|
|
101
|
-
}
|
|
102
|
-
.squatch-referrals-value.expired {
|
|
103
|
-
color: ${this.expiredcolor};
|
|
104
|
-
}
|
|
105
|
-
.squatch-value-contents.expired {
|
|
106
|
-
color: ${this.expiredcolor};
|
|
107
|
-
}
|
|
108
|
-
.squatch-referrals-icon.icon-attention.expired {
|
|
109
|
-
color: ${this.expiredcolor};
|
|
110
|
-
}
|
|
111
|
-
.squatch-referrals-value.cancelled {
|
|
112
|
-
color: ${this.cancelledcolor};
|
|
113
|
-
}
|
|
114
|
-
.squatch-value-contents.cancelled {
|
|
115
|
-
color: ${this.cancelledcolor};
|
|
116
|
-
}
|
|
117
|
-
.squatch-referrals-icon.icon-attention.cancelled {
|
|
118
|
-
color: ${this.cancelledcolor};
|
|
119
|
-
}
|
|
120
|
-
.squatch-referrals-heading {
|
|
121
|
-
color: ${this.referralnamecolor};
|
|
122
|
-
}
|
|
123
|
-
.squatch-referrals-description,
|
|
124
|
-
.squatch-referrals-value-content {
|
|
125
|
-
color: ${this.referraltextcolor};
|
|
126
|
-
}
|
|
127
|
-
.squatch-customer-note {
|
|
128
|
-
color: ${this.customernotecolor || "darkslategray"};
|
|
129
|
-
}
|
|
130
|
-
.squatch-referrals-scroll-action {
|
|
131
|
-
font-family: ${"inherit"};
|
|
132
|
-
}
|
|
86
|
+
const clz = css `
|
|
87
|
+
.squatch-referrals-icon.icon-ok-circled {
|
|
88
|
+
color: ${this.rewardcolor};
|
|
89
|
+
}
|
|
90
|
+
.squatch-referrals-icon.icon-attention {
|
|
91
|
+
color: ${this.pendingcolor};
|
|
92
|
+
}
|
|
93
|
+
.squatch-referrals-value {
|
|
94
|
+
color: ${this.rewardcolor};
|
|
95
|
+
}
|
|
96
|
+
.squatch-referrals-value.pending {
|
|
97
|
+
color: ${this.pendingcolor};
|
|
98
|
+
}
|
|
99
|
+
.squatch-referrals-value.referrer {
|
|
100
|
+
color: ${this.rewardcolor};
|
|
101
|
+
}
|
|
102
|
+
.squatch-referrals-value.expired {
|
|
103
|
+
color: ${this.expiredcolor};
|
|
104
|
+
}
|
|
105
|
+
.squatch-value-contents.expired {
|
|
106
|
+
color: ${this.expiredcolor};
|
|
107
|
+
}
|
|
108
|
+
.squatch-referrals-icon.icon-attention.expired {
|
|
109
|
+
color: ${this.expiredcolor};
|
|
110
|
+
}
|
|
111
|
+
.squatch-referrals-value.cancelled {
|
|
112
|
+
color: ${this.cancelledcolor};
|
|
113
|
+
}
|
|
114
|
+
.squatch-value-contents.cancelled {
|
|
115
|
+
color: ${this.cancelledcolor};
|
|
116
|
+
}
|
|
117
|
+
.squatch-referrals-icon.icon-attention.cancelled {
|
|
118
|
+
color: ${this.cancelledcolor};
|
|
119
|
+
}
|
|
120
|
+
.squatch-referrals-heading {
|
|
121
|
+
color: ${this.referralnamecolor};
|
|
122
|
+
}
|
|
123
|
+
.squatch-referrals-description,
|
|
124
|
+
.squatch-referrals-value-content {
|
|
125
|
+
color: ${this.referraltextcolor};
|
|
126
|
+
}
|
|
127
|
+
.squatch-customer-note {
|
|
128
|
+
color: ${this.customernotecolor || "darkslategray"};
|
|
129
|
+
}
|
|
130
|
+
.squatch-referrals-scroll-action {
|
|
131
|
+
font-family: ${"inherit"};
|
|
132
|
+
}
|
|
133
133
|
`;
|
|
134
134
|
const totalReferralsCount = this.showreferrer && this.referredBy
|
|
135
135
|
? this.referralsCount + 1
|
|
@@ -141,14 +141,14 @@ export class ReferralList {
|
|
|
141
141
|
referralsRow,
|
|
142
142
|
referredByRow),
|
|
143
143
|
h("div", { class: "squatch-referrals-scroll-action-container" },
|
|
144
|
-
h("button", { class: `
|
|
144
|
+
h("button", { class: `
|
|
145
145
|
squatch-referrals-scroll-action previous ${this.loading
|
|
146
146
|
? "disabled"
|
|
147
147
|
: this.offset === 0
|
|
148
148
|
? "disabled"
|
|
149
|
-
: ""}
|
|
149
|
+
: ""}
|
|
150
150
|
`, onClick: (event) => this.paginate(this.offset - 3, event) }, this.paginateless),
|
|
151
|
-
h("button", { class: `
|
|
151
|
+
h("button", { class: `
|
|
152
152
|
squatch-referrals-scroll-action view-more ${this.loading
|
|
153
153
|
? "disabled"
|
|
154
154
|
: this.showreferrer && this.referredBy
|
|
@@ -157,7 +157,7 @@ export class ReferralList {
|
|
|
157
157
|
: ""
|
|
158
158
|
: this.offset >= this.referralsCount - 3
|
|
159
159
|
? "disabled"
|
|
160
|
-
: ""}
|
|
160
|
+
: ""}
|
|
161
161
|
`, "view-more": true, onClick: (event) => this.paginate(this.offset + 3, event) }, this.paginatemore)))) : (
|
|
162
162
|
// 'No Referrals Yet' button if this.referralCount < 1
|
|
163
163
|
h("div", { class: "squatch-referrals-scroll-action-container" },
|
|
@@ -29,25 +29,25 @@ export class ShareButton {
|
|
|
29
29
|
const isMobileiOS = detectMobileSafari() || detectMobileChrome();
|
|
30
30
|
const target = isMobileiOS ? "_parent" : "_blank";
|
|
31
31
|
const iconClass = `icon icon-${this.icon}`;
|
|
32
|
-
const style = css `
|
|
33
|
-
background-color: ${this.backgroundcolor};
|
|
34
|
-
border: 1px solid ${this.backgroundcolor};
|
|
35
|
-
color: ${this.textcolor};
|
|
36
|
-
|
|
37
|
-
&:hover {
|
|
38
|
-
background: ${shadeColor(this.backgroundcolor, 10)};
|
|
39
|
-
border-color: ${shadeColor(this.backgroundcolor, 12)};
|
|
40
|
-
color: ${this.textcolor};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&:focus {
|
|
44
|
-
color: ${this.textcolor};
|
|
45
|
-
}
|
|
46
|
-
.icon-${this.icon} {
|
|
47
|
-
left: ${this.iconhorizontal}px;
|
|
48
|
-
top: ${this.iconvertical}px;
|
|
49
|
-
font-size: ${this.iconsize}em;
|
|
50
|
-
}
|
|
32
|
+
const style = css `
|
|
33
|
+
background-color: ${this.backgroundcolor};
|
|
34
|
+
border: 1px solid ${this.backgroundcolor};
|
|
35
|
+
color: ${this.textcolor};
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
background: ${shadeColor(this.backgroundcolor, 10)};
|
|
39
|
+
border-color: ${shadeColor(this.backgroundcolor, 12)};
|
|
40
|
+
color: ${this.textcolor};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:focus {
|
|
44
|
+
color: ${this.textcolor};
|
|
45
|
+
}
|
|
46
|
+
.icon-${this.icon} {
|
|
47
|
+
left: ${this.iconhorizontal}px;
|
|
48
|
+
top: ${this.iconvertical}px;
|
|
49
|
+
font-size: ${this.iconsize}em;
|
|
50
|
+
}
|
|
51
51
|
`;
|
|
52
52
|
const classes = [
|
|
53
53
|
`squatch-share-btn`,
|
|
@@ -4,7 +4,7 @@ import { API } from "../../services/WidgetHost";
|
|
|
4
4
|
* @uiName Share Button Container
|
|
5
5
|
* @canvasRenderer always-replace
|
|
6
6
|
* @exampleGroup Sharing
|
|
7
|
-
* @example Share Button Group - <sqh-share-button-container ishidden="false" emaildisplayrule="mobile-and-desktop" emailtext="Email" emailtextcolor="#ffffff" emailbackgroundcolor="#4b4d50" facebookdisplayrule="mobile-and-desktop" facebooktext="Facebook" facebooktextcolor="#ffffff" facebookbackgroundcolor="#234079" twitterdisplayrule="mobile-and-desktop" twittertext="
|
|
7
|
+
* @example Share Button Group - <sqh-share-button-container ishidden="false" emaildisplayrule="mobile-and-desktop" emailtext="Email" emailtextcolor="#ffffff" emailbackgroundcolor="#4b4d50" facebookdisplayrule="mobile-and-desktop" facebooktext="Facebook" facebooktextcolor="#ffffff" facebookbackgroundcolor="#234079" twitterdisplayrule="mobile-and-desktop" twittertext="X" twittertextcolor="#ffffff" twitterbackgroundcolor="#000000" smsdisplayrule="mobile-only" smstext="SMS" smstextcolor="#ffffff" smsbackgroundcolor="#7bbf38" whatsappdisplayrule="mobile-only" whatsapptext="WhatsApp" whatsapptextcolor="#ffffff" whatsappbackgroundcolor="#25D366" linkedindisplayrule="hidden" linkedintext="LinkedIn" linkedintextcolor="#ffffff" linkedinbackgroundcolor="#0084b9" pinterestdisplayrule="hidden" pinteresttext="Pinterest" pinteresttextcolor="#ffffff" pinterestbackgroundcolor="#cb2027" messengerdisplayrule="hidden" messengertext="Messenger" messengertextcolor="#ffffff" messengerbackgroundcolor="#0084ff" linedisplayrule="mobile-only" linetext="Line Messenger" linetextcolor="#ffffff" linebackgroundcolor="#00c300"></sqh-share-button-container>
|
|
8
8
|
*/
|
|
9
9
|
export class ShareButtonContainer {
|
|
10
10
|
constructor() {
|
|
@@ -38,20 +38,20 @@ export class ShareButtonContainer {
|
|
|
38
38
|
*/
|
|
39
39
|
this.facebookiconsize = 1.2;
|
|
40
40
|
/**
|
|
41
|
-
* @uiName
|
|
42
|
-
* @uiGroup
|
|
41
|
+
* @uiName X Icon
|
|
42
|
+
* @uiGroup X
|
|
43
43
|
*/
|
|
44
44
|
this.twittericon = "twitter";
|
|
45
45
|
/**
|
|
46
|
-
* Number to horizontally align the
|
|
46
|
+
* Number to horizontally align the X button icon
|
|
47
47
|
*
|
|
48
|
-
* @uiName
|
|
49
|
-
* @uiGroup
|
|
48
|
+
* @uiName X Icon Horizontal
|
|
49
|
+
* @uiGroup X
|
|
50
50
|
*/
|
|
51
51
|
this.twittericonhorizontal = 9;
|
|
52
52
|
/**
|
|
53
|
-
* @uiName
|
|
54
|
-
* @uiGroup
|
|
53
|
+
* @uiName X Icon Size
|
|
54
|
+
* @uiGroup X
|
|
55
55
|
*/
|
|
56
56
|
this.twittericonsize = 1.2;
|
|
57
57
|
/**
|
|
@@ -741,10 +741,10 @@ export class ShareButtonContainer {
|
|
|
741
741
|
"optional": false,
|
|
742
742
|
"docs": {
|
|
743
743
|
"tags": [{
|
|
744
|
-
"text": "
|
|
744
|
+
"text": "X Display Rule",
|
|
745
745
|
"name": "uiName"
|
|
746
746
|
}, {
|
|
747
|
-
"text": "
|
|
747
|
+
"text": "X",
|
|
748
748
|
"name": "uiGroup"
|
|
749
749
|
}, {
|
|
750
750
|
"text": "[\"mobile-and-desktop\",\"mobile-only\",\"desktop-only\",\"hidden\"]",
|
|
@@ -773,13 +773,13 @@ export class ShareButtonContainer {
|
|
|
773
773
|
"optional": false,
|
|
774
774
|
"docs": {
|
|
775
775
|
"tags": [{
|
|
776
|
-
"text": "
|
|
776
|
+
"text": "X Text",
|
|
777
777
|
"name": "uiName"
|
|
778
778
|
}, {
|
|
779
|
-
"text": "
|
|
779
|
+
"text": "X",
|
|
780
780
|
"name": "uiGroup"
|
|
781
781
|
}, {
|
|
782
|
-
"text": "
|
|
782
|
+
"text": "X",
|
|
783
783
|
"name": "default"
|
|
784
784
|
}],
|
|
785
785
|
"text": ""
|
|
@@ -799,19 +799,19 @@ export class ShareButtonContainer {
|
|
|
799
799
|
"optional": false,
|
|
800
800
|
"docs": {
|
|
801
801
|
"tags": [{
|
|
802
|
-
"text": "
|
|
802
|
+
"text": "X Background Color",
|
|
803
803
|
"name": "uiName"
|
|
804
804
|
}, {
|
|
805
|
-
"text": "
|
|
805
|
+
"text": "X",
|
|
806
806
|
"name": "uiGroup"
|
|
807
807
|
}, {
|
|
808
808
|
"text": "color",
|
|
809
809
|
"name": "uiWidget"
|
|
810
810
|
}, {
|
|
811
|
-
"text": "#
|
|
811
|
+
"text": "#000000",
|
|
812
812
|
"name": "default"
|
|
813
813
|
}],
|
|
814
|
-
"text": "Background color of the
|
|
814
|
+
"text": "Background color of the X button"
|
|
815
815
|
},
|
|
816
816
|
"attribute": "twitterbackgroundcolor",
|
|
817
817
|
"reflect": false
|
|
@@ -828,10 +828,10 @@ export class ShareButtonContainer {
|
|
|
828
828
|
"optional": false,
|
|
829
829
|
"docs": {
|
|
830
830
|
"tags": [{
|
|
831
|
-
"text": "
|
|
831
|
+
"text": "X Text Color",
|
|
832
832
|
"name": "uiName"
|
|
833
833
|
}, {
|
|
834
|
-
"text": "
|
|
834
|
+
"text": "X",
|
|
835
835
|
"name": "uiGroup"
|
|
836
836
|
}, {
|
|
837
837
|
"text": "color",
|
|
@@ -857,10 +857,10 @@ export class ShareButtonContainer {
|
|
|
857
857
|
"optional": false,
|
|
858
858
|
"docs": {
|
|
859
859
|
"tags": [{
|
|
860
|
-
"text": "
|
|
860
|
+
"text": "X Icon",
|
|
861
861
|
"name": "uiName"
|
|
862
862
|
}, {
|
|
863
|
-
"text": "
|
|
863
|
+
"text": "X",
|
|
864
864
|
"name": "uiGroup"
|
|
865
865
|
}],
|
|
866
866
|
"text": ""
|
|
@@ -881,10 +881,10 @@ export class ShareButtonContainer {
|
|
|
881
881
|
"optional": false,
|
|
882
882
|
"docs": {
|
|
883
883
|
"tags": [{
|
|
884
|
-
"text": "
|
|
884
|
+
"text": "X Class Name",
|
|
885
885
|
"name": "uiName"
|
|
886
886
|
}, {
|
|
887
|
-
"text": "
|
|
887
|
+
"text": "X",
|
|
888
888
|
"name": "uiGroup"
|
|
889
889
|
}],
|
|
890
890
|
"text": "CSS class name for additional styling."
|
|
@@ -904,13 +904,13 @@ export class ShareButtonContainer {
|
|
|
904
904
|
"optional": false,
|
|
905
905
|
"docs": {
|
|
906
906
|
"tags": [{
|
|
907
|
-
"text": "
|
|
907
|
+
"text": "X Icon Horizontal",
|
|
908
908
|
"name": "uiName"
|
|
909
909
|
}, {
|
|
910
|
-
"text": "
|
|
910
|
+
"text": "X",
|
|
911
911
|
"name": "uiGroup"
|
|
912
912
|
}],
|
|
913
|
-
"text": "Number to horizontally align the
|
|
913
|
+
"text": "Number to horizontally align the X button icon"
|
|
914
914
|
},
|
|
915
915
|
"attribute": "twittericonhorizontal",
|
|
916
916
|
"reflect": false,
|
|
@@ -928,13 +928,13 @@ export class ShareButtonContainer {
|
|
|
928
928
|
"optional": false,
|
|
929
929
|
"docs": {
|
|
930
930
|
"tags": [{
|
|
931
|
-
"text": "
|
|
931
|
+
"text": "X Icon Vertical",
|
|
932
932
|
"name": "uiName"
|
|
933
933
|
}, {
|
|
934
|
-
"text": "
|
|
934
|
+
"text": "X",
|
|
935
935
|
"name": "uiGroup"
|
|
936
936
|
}],
|
|
937
|
-
"text": "Number to vertically align the
|
|
937
|
+
"text": "Number to vertically align the X button icon"
|
|
938
938
|
},
|
|
939
939
|
"attribute": "twittericonvertical",
|
|
940
940
|
"reflect": false
|
|
@@ -951,10 +951,10 @@ export class ShareButtonContainer {
|
|
|
951
951
|
"optional": false,
|
|
952
952
|
"docs": {
|
|
953
953
|
"tags": [{
|
|
954
|
-
"text": "
|
|
954
|
+
"text": "X Icon Size",
|
|
955
955
|
"name": "uiName"
|
|
956
956
|
}, {
|
|
957
|
-
"text": "
|
|
957
|
+
"text": "X",
|
|
958
958
|
"name": "uiGroup"
|
|
959
959
|
}],
|
|
960
960
|
"text": ""
|
|
@@ -23,8 +23,8 @@ export class StatComponent {
|
|
|
23
23
|
this.statTypeUpdated.emit(stat);
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
|
-
const clz = css `
|
|
27
|
-
color: ${this.statcolor};
|
|
26
|
+
const clz = css `
|
|
27
|
+
color: ${this.statcolor};
|
|
28
28
|
`;
|
|
29
29
|
return (!this.ishidden && (h("div", { class: clz },
|
|
30
30
|
h("div", { class: "stat-value" }, this.statvalue),
|
|
@@ -102,10 +102,10 @@ export class StatsContainer {
|
|
|
102
102
|
this.loading = false;
|
|
103
103
|
}
|
|
104
104
|
render() {
|
|
105
|
-
const containerStyle = css `
|
|
106
|
-
display: ${this.ishidden ? "none" : "inherit"};
|
|
107
|
-
padding-top: ${this.paddingtop}px;
|
|
108
|
-
padding-bottom: ${this.paddingbottom}px;
|
|
105
|
+
const containerStyle = css `
|
|
106
|
+
display: ${this.ishidden ? "none" : "inherit"};
|
|
107
|
+
padding-top: ${this.paddingtop}px;
|
|
108
|
+
padding-bottom: ${this.paddingbottom}px;
|
|
109
109
|
`;
|
|
110
110
|
return (h("div", { class: containerStyle },
|
|
111
111
|
h("slot", null)));
|
|
@@ -11,26 +11,26 @@ import marked from "marked";
|
|
|
11
11
|
export class TextComponent {
|
|
12
12
|
render() {
|
|
13
13
|
const regex = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i;
|
|
14
|
-
const textStyle = css `
|
|
15
|
-
font-family: ${this.fontfamily || "inherit"};
|
|
16
|
-
font-size: ${this.fontsize ? this.fontsize + "px" : "inherit"};
|
|
17
|
-
font-weight: ${this.fontweight ? this.fontweight : "inherit"};
|
|
18
|
-
text-align: ${this.textalign};
|
|
19
|
-
color: ${this.color || "inherit"};
|
|
20
|
-
padding-top: ${this.paddingtop ? this.paddingtop + "px" : "inherit"};
|
|
14
|
+
const textStyle = css `
|
|
15
|
+
font-family: ${this.fontfamily || "inherit"};
|
|
16
|
+
font-size: ${this.fontsize ? this.fontsize + "px" : "inherit"};
|
|
17
|
+
font-weight: ${this.fontweight ? this.fontweight : "inherit"};
|
|
18
|
+
text-align: ${this.textalign};
|
|
19
|
+
color: ${this.color || "inherit"};
|
|
20
|
+
padding-top: ${this.paddingtop ? this.paddingtop + "px" : "inherit"};
|
|
21
21
|
padding-bottom: ${this.paddingbottom
|
|
22
22
|
? this.paddingbottom + "px"
|
|
23
|
-
: "inherit"};
|
|
24
|
-
overflow-wrap: break-word;
|
|
23
|
+
: "inherit"};
|
|
24
|
+
overflow-wrap: break-word;
|
|
25
25
|
`;
|
|
26
|
-
const divStyle = css `
|
|
26
|
+
const divStyle = css `
|
|
27
27
|
background: ${this.background
|
|
28
28
|
? this.background.match(regex)
|
|
29
29
|
? `url(${this.background}) no-repeat center center;`
|
|
30
30
|
: this.background
|
|
31
|
-
: "inherit"};
|
|
32
|
-
height: ${this.height || "inherit"};
|
|
33
|
-
background-size: contain;
|
|
31
|
+
: "inherit"};
|
|
32
|
+
height: ${this.height || "inherit"};
|
|
33
|
+
background-size: contain;
|
|
34
34
|
`;
|
|
35
35
|
const content = this.ismarkdown ? (h("div", { innerHTML: marked(this.text) })) : (this.text);
|
|
36
36
|
return (!this.ishidden && (h("div", { class: divStyle },
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
// NOTE(johan): This is a custom loader which will inject script tags for both the ES Modules and non-ES Modules
|
|
2
|
-
// builds. We use this instead of dist/widget-components.js as that is deprecated and actually doesn't work because of
|
|
3
|
-
// its name causing lazy loaded scripts to be loaded from the wrong path in /dist
|
|
4
|
-
(function (doc) {
|
|
5
|
-
var isSafari10 =
|
|
6
|
-
window.navigator.userAgent.indexOf("Safari") > 0 &&
|
|
7
|
-
window.navigator.userAgent.indexOf("Version/10") > 0;
|
|
8
|
-
var scriptElm = Array.from(doc.scripts).find((script) =>
|
|
9
|
-
script.src.includes("widget-components")
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
var parts = scriptElm.src.split("/");
|
|
13
|
-
parts.pop();
|
|
14
|
-
var url = parts.join("/");
|
|
15
|
-
|
|
16
|
-
// NOTE(johan): Safari 10 supports type="module" but the build is too new for it, so we only want the ES5 build but
|
|
17
|
-
// without the "nomodule" attribute
|
|
18
|
-
// This may not be necessary in Stencil 1.8.x - https://github.com/ionic-team/stencil/issues/1900
|
|
19
|
-
if (!isSafari10) {
|
|
20
|
-
var scriptElm = doc.createElement("script");
|
|
21
|
-
scriptElm.setAttribute("type", "module");
|
|
22
|
-
scriptElm.src = url + "/widget-components.esm.js";
|
|
23
|
-
scriptElm.setAttribute("data-stencil-namespace", "widget-components");
|
|
24
|
-
doc.head.appendChild(scriptElm);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var scriptElm = doc.createElement("script");
|
|
28
|
-
if (!isSafari10) {
|
|
29
|
-
scriptElm.setAttribute("nomodule", "");
|
|
30
|
-
}
|
|
31
|
-
scriptElm.src = url + "/widget-components.js";
|
|
32
|
-
scriptElm.setAttribute("data-stencil-namespace", "widget-components");
|
|
33
|
-
doc.head.appendChild(scriptElm);
|
|
34
|
-
})(document);
|
|
1
|
+
// NOTE(johan): This is a custom loader which will inject script tags for both the ES Modules and non-ES Modules
|
|
2
|
+
// builds. We use this instead of dist/widget-components.js as that is deprecated and actually doesn't work because of
|
|
3
|
+
// its name causing lazy loaded scripts to be loaded from the wrong path in /dist
|
|
4
|
+
(function (doc) {
|
|
5
|
+
var isSafari10 =
|
|
6
|
+
window.navigator.userAgent.indexOf("Safari") > 0 &&
|
|
7
|
+
window.navigator.userAgent.indexOf("Version/10") > 0;
|
|
8
|
+
var scriptElm = Array.from(doc.scripts).find((script) =>
|
|
9
|
+
script.src.includes("widget-components")
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
var parts = scriptElm.src.split("/");
|
|
13
|
+
parts.pop();
|
|
14
|
+
var url = parts.join("/");
|
|
15
|
+
|
|
16
|
+
// NOTE(johan): Safari 10 supports type="module" but the build is too new for it, so we only want the ES5 build but
|
|
17
|
+
// without the "nomodule" attribute
|
|
18
|
+
// This may not be necessary in Stencil 1.8.x - https://github.com/ionic-team/stencil/issues/1900
|
|
19
|
+
if (!isSafari10) {
|
|
20
|
+
var scriptElm = doc.createElement("script");
|
|
21
|
+
scriptElm.setAttribute("type", "module");
|
|
22
|
+
scriptElm.src = url + "/widget-components.esm.js";
|
|
23
|
+
scriptElm.setAttribute("data-stencil-namespace", "widget-components");
|
|
24
|
+
doc.head.appendChild(scriptElm);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var scriptElm = doc.createElement("script");
|
|
28
|
+
if (!isSafari10) {
|
|
29
|
+
scriptElm.setAttribute("nomodule", "");
|
|
30
|
+
}
|
|
31
|
+
scriptElm.src = url + "/widget-components.js";
|
|
32
|
+
scriptElm.setAttribute("data-stencil-namespace", "widget-components");
|
|
33
|
+
doc.head.appendChild(scriptElm);
|
|
34
|
+
})(document);
|