@saasquatch/vanilla-components 1.2.4-0 → 1.2.4-3

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.
Files changed (88) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/{WidgetHost-d7b870ce.js → WidgetHost-71b013eb.js} +615 -615
  3. package/dist/cjs/sqh-close-button.cjs.entry.js +25 -25
  4. package/dist/cjs/sqh-copy-button_12.cjs.entry.js +1050 -1151
  5. package/dist/cjs/sqh-referral-code.cjs.entry.js +22 -22
  6. package/dist/cjs/sqh-rewards-actions.cjs.entry.js +26 -26
  7. package/dist/collection/components/close-button/close-button.js +70 -67
  8. package/dist/collection/components/copy-button/copy-button.js +389 -386
  9. package/dist/collection/components/copy-link-button/copy-link-button.js +233 -230
  10. package/dist/collection/components/global-container/global-container.js +170 -169
  11. package/dist/collection/components/image-component/image-component.js +175 -174
  12. package/dist/collection/components/partner-stat-component/partner-stat-component.js +190 -185
  13. package/dist/collection/components/referral-code/referral-code.js +36 -33
  14. package/dist/collection/components/referral-component/referral-component.js +255 -254
  15. package/dist/collection/components/referral-list/referral-list.js +932 -932
  16. package/dist/collection/components/rewards-actions/rewards-actions.js +105 -104
  17. package/dist/collection/components/share-button/share-button.js +310 -309
  18. package/dist/collection/components/share-button-container/share-button-container.js +2470 -2467
  19. package/dist/collection/components/stat-component/stat-component.js +191 -185
  20. package/dist/collection/components/stats-container/stats-container.js +208 -204
  21. package/dist/collection/components/text-component/text-component.js +280 -276
  22. package/dist/collection/entrypoint.js +32 -32
  23. package/dist/collection/global/global.js +4 -4
  24. package/dist/collection/services/FormatJs.js +15 -15
  25. package/dist/collection/services/WidgetHost.js +621 -621
  26. package/dist/collection/utilities.js +81 -81
  27. package/dist/esm/{WidgetHost-a27e693d.js → WidgetHost-9c337319.js} +615 -615
  28. package/dist/esm/polyfills/core-js.js +0 -0
  29. package/dist/esm/polyfills/dom.js +0 -0
  30. package/dist/esm/polyfills/es5-html-element.js +0 -0
  31. package/dist/esm/polyfills/index.js +0 -0
  32. package/dist/esm/polyfills/system.js +0 -0
  33. package/dist/esm/sqh-close-button.entry.js +25 -25
  34. package/dist/esm/sqh-copy-button_12.entry.js +1050 -1151
  35. package/dist/esm/sqh-referral-code.entry.js +22 -22
  36. package/dist/esm/sqh-rewards-actions.entry.js +26 -26
  37. package/dist/esm-es5/{WidgetHost-a27e693d.js → WidgetHost-9c337319.js} +9432 -9432
  38. package/dist/esm-es5/_commonjsHelpers-1d681858.js +17 -17
  39. package/dist/esm-es5/css-shim-a659079f.js +122 -122
  40. package/dist/esm-es5/dom-4061ceba.js +468 -468
  41. package/dist/esm-es5/en-be593af0.js +1471 -1471
  42. package/dist/esm-es5/index-8ea8b6d8.js +1758 -1758
  43. package/dist/esm-es5/loader.mjs +11 -11
  44. package/dist/esm-es5/sqh-close-button.entry.js +35 -35
  45. package/dist/esm-es5/sqh-copy-button_12.entry.js +9571 -9660
  46. package/dist/esm-es5/sqh-referral-code.entry.js +29 -29
  47. package/dist/esm-es5/sqh-rewards-actions.entry.js +31 -31
  48. package/dist/esm-es5/widget-components.mjs +6 -6
  49. package/dist/types/components/close-button/close-button.d.ts +18 -15
  50. package/dist/types/components/copy-button/copy-button.d.ts +107 -104
  51. package/dist/types/components/copy-link-button/copy-link-button.d.ts +62 -59
  52. package/dist/types/components/global-container/global-container.d.ts +47 -46
  53. package/dist/types/components/image-component/image-component.d.ts +51 -50
  54. package/dist/types/components/partner-stat-component/partner-stat-component.d.ts +53 -48
  55. package/dist/types/components/referral-code/referral-code.d.ts +12 -9
  56. package/dist/types/components/referral-component/referral-component.d.ts +46 -45
  57. package/dist/types/components/referral-list/referral-list.d.ts +251 -249
  58. package/dist/types/components/rewards-actions/rewards-actions.d.ts +25 -24
  59. package/dist/types/components/share-button/share-button.d.ts +82 -81
  60. package/dist/types/components/share-button-container/share-button-container.d.ts +684 -681
  61. package/dist/types/components/stat-component/stat-component.d.ts +53 -47
  62. package/dist/types/components/stats-container/stats-container.d.ts +48 -44
  63. package/dist/types/components/text-component/text-component.d.ts +81 -77
  64. package/dist/types/components.d.ts +0 -2
  65. package/dist/types/global/global.d.ts +4 -4
  66. package/dist/types/saasquatch.d.ts +103 -103
  67. package/dist/types/services/FormatJs.d.ts +7 -7
  68. package/dist/types/services/WidgetHost.d.ts +45 -45
  69. package/dist/types/utilities.d.ts +7 -7
  70. package/dist/widget-components/entrypoint.js +32 -32
  71. package/dist/widget-components/p-24fc4ba9.js +1 -1
  72. package/dist/widget-components/{p-d4b27c72.entry.js → p-366f1663.entry.js} +1 -1
  73. package/dist/widget-components/p-46109683.js +3 -3
  74. package/dist/widget-components/{p-650d012d.entry.js → p-54ea7a00.entry.js} +1 -1
  75. package/dist/widget-components/p-58be1132.system.js +1 -1
  76. package/dist/widget-components/{p-9adc7c50.system.js → p-8e232564.system.js} +0 -0
  77. package/dist/widget-components/{p-c0cdba77.system.entry.js → p-b17efca4.system.entry.js} +1 -1
  78. package/dist/widget-components/p-c8bc8c77.system.entry.js +1 -0
  79. package/dist/widget-components/{p-d7059393.entry.js → p-d416634a.entry.js} +16 -16
  80. package/dist/widget-components/p-d97c955d.system.entry.js +8 -0
  81. package/dist/widget-components/{p-9525bf4a.js → p-edd43dbc.js} +0 -0
  82. package/dist/widget-components/widget-components.esm.js +1 -1
  83. package/dist/widget-components/widget-components.js +1 -1
  84. package/docs/raisins.json +1 -1
  85. package/package.json +96 -96
  86. package/readme.md +52 -52
  87. package/dist/widget-components/p-908068c2.system.entry.js +0 -1
  88. package/dist/widget-components/p-fba5ea7f.system.entry.js +0 -8
@@ -1,185 +1,191 @@
1
- import { h, Component, Prop, Event, Element, Watch, } from "@stencil/core";
2
- import { css } from "emotion";
3
- /**
4
- * @uiName Stat Component
5
- */
6
- export class StatComponent {
7
- componentWillLoad() {
8
- this.statAddedHandler(this.elem);
9
- }
10
- stattypeHandler(newValue, oldValue) {
11
- if (newValue !== oldValue)
12
- this.statTypeUpdatedHandler(this.elem);
13
- }
14
- statAddedHandler(stat) {
15
- this.statAdded.emit(stat);
16
- }
17
- statTypeUpdatedHandler(stat) {
18
- this.statTypeUpdated.emit(stat);
19
- }
20
- render() {
21
- const clz = css `
22
- color: ${this.statcolor};
23
- `;
24
- return (!this.ishidden && (h("div", { class: clz },
25
- h("div", { class: "stat-value" }, this.statvalue),
26
- h("div", { class: "stat-description" }, this.statdescription))));
27
- }
28
- static get is() { return "sqh-stat-component"; }
29
- static get originalStyleUrls() { return {
30
- "$": ["stat-component.scss"]
31
- }; }
32
- static get styleUrls() { return {
33
- "$": ["stat-component.css"]
34
- }; }
35
- static get properties() { return {
36
- "ishidden": {
37
- "type": "boolean",
38
- "mutable": false,
39
- "complexType": {
40
- "original": "boolean",
41
- "resolved": "boolean",
42
- "references": {}
43
- },
44
- "required": false,
45
- "optional": false,
46
- "docs": {
47
- "tags": [{
48
- "text": "Hide Stat",
49
- "name": "uiName"
50
- }],
51
- "text": "Hide or show the component"
52
- },
53
- "attribute": "ishidden",
54
- "reflect": false
55
- },
56
- "stattype": {
57
- "type": "string",
58
- "mutable": false,
59
- "complexType": {
60
- "original": "string",
61
- "resolved": "string",
62
- "references": {}
63
- },
64
- "required": false,
65
- "optional": false,
66
- "docs": {
67
- "tags": [{
68
- "text": "Stat Type",
69
- "name": "uiName"
70
- }, {
71
- "text": "statTypeSelector",
72
- "name": "uiWidget"
73
- }, {
74
- "text": undefined,
75
- "name": "required"
76
- }],
77
- "text": "Type of stat being displayed. e.g /rewardsCount"
78
- },
79
- "attribute": "stattype",
80
- "reflect": false
81
- },
82
- "statvalue": {
83
- "type": "string",
84
- "mutable": false,
85
- "complexType": {
86
- "original": "string",
87
- "resolved": "string",
88
- "references": {}
89
- },
90
- "required": false,
91
- "optional": false,
92
- "docs": {
93
- "tags": [{
94
- "text": "Stat Value",
95
- "name": "uiName"
96
- }],
97
- "text": "Value shown inside stat"
98
- },
99
- "attribute": "statvalue",
100
- "reflect": false
101
- },
102
- "statdescription": {
103
- "type": "string",
104
- "mutable": false,
105
- "complexType": {
106
- "original": "string",
107
- "resolved": "string",
108
- "references": {}
109
- },
110
- "required": false,
111
- "optional": false,
112
- "docs": {
113
- "tags": [{
114
- "text": "Stat Description",
115
- "name": "uiName"
116
- }],
117
- "text": "Description shown underneath stat value"
118
- },
119
- "attribute": "statdescription",
120
- "reflect": false
121
- },
122
- "statcolor": {
123
- "type": "string",
124
- "mutable": false,
125
- "complexType": {
126
- "original": "string",
127
- "resolved": "string",
128
- "references": {}
129
- },
130
- "required": false,
131
- "optional": false,
132
- "docs": {
133
- "tags": [{
134
- "text": "Stat Color",
135
- "name": "uiName"
136
- }, {
137
- "text": "color",
138
- "name": "uiWidget"
139
- }, {
140
- "text": "color",
141
- "name": "format"
142
- }],
143
- "text": "Text color of the stat"
144
- },
145
- "attribute": "statcolor",
146
- "reflect": false
147
- }
148
- }; }
149
- static get events() { return [{
150
- "method": "statTypeUpdated",
151
- "name": "statTypeUpdated",
152
- "bubbles": true,
153
- "cancelable": true,
154
- "composed": true,
155
- "docs": {
156
- "tags": [],
157
- "text": ""
158
- },
159
- "complexType": {
160
- "original": "any",
161
- "resolved": "any",
162
- "references": {}
163
- }
164
- }, {
165
- "method": "statAdded",
166
- "name": "statAdded",
167
- "bubbles": true,
168
- "cancelable": true,
169
- "composed": true,
170
- "docs": {
171
- "tags": [],
172
- "text": ""
173
- },
174
- "complexType": {
175
- "original": "any",
176
- "resolved": "any",
177
- "references": {}
178
- }
179
- }]; }
180
- static get elementRef() { return "elem"; }
181
- static get watchers() { return [{
182
- "propName": "stattype",
183
- "methodName": "stattypeHandler"
184
- }]; }
185
- }
1
+ import { h, Component, Prop, Event, Element, Watch, } from "@stencil/core";
2
+ import { css } from "emotion";
3
+ /**
4
+ * @uiName Stat Component
5
+ * @canvasRenderer always-replace
6
+ * @exampleGroup Statistics
7
+ * @example Referral Count - <sqh-stat-component ishidden="false" statcolor="#4caf50" stattype="/referralsCount" statdescription="Friends Referred" paddingtop="10" paddingbottom="10"></sqh-stat-component>
8
+ * @example Reward Count - <sqh-stat-component ishidden="false" stattype="/rewardsCount" statdescription="Total Rewards" paddingtop="10" paddingbottom="10" statcolor="#000000"></sqh-stat-component>
9
+ * @example Credit Earned - <sqh-stat-component ishidden="false" stattype="/rewardBalance/CREDIT/CENTS/prettyAssignedCredit" statdescription="Credit earned" paddingtop="10" paddingbottom="10" statcolor="#000000"></sqh-stat-component>
10
+ * @example Points Earned - <sqh-stat-component statcolor="#000000" stattype="/rewardBalance/CREDIT/POINT/totalAssignedCredit" statdescription="Points Earned" paddingtop="10" paddingbottom="10"></sqh-stat-component>
11
+ */
12
+ export class StatComponent {
13
+ componentWillLoad() {
14
+ this.statAddedHandler(this.elem);
15
+ }
16
+ stattypeHandler(newValue, oldValue) {
17
+ if (newValue !== oldValue)
18
+ this.statTypeUpdatedHandler(this.elem);
19
+ }
20
+ statAddedHandler(stat) {
21
+ this.statAdded.emit(stat);
22
+ }
23
+ statTypeUpdatedHandler(stat) {
24
+ this.statTypeUpdated.emit(stat);
25
+ }
26
+ render() {
27
+ const clz = css `
28
+ color: ${this.statcolor};
29
+ `;
30
+ return (!this.ishidden && (h("div", { class: clz },
31
+ h("div", { class: "stat-value" }, this.statvalue),
32
+ h("div", { class: "stat-description" }, this.statdescription))));
33
+ }
34
+ static get is() { return "sqh-stat-component"; }
35
+ static get originalStyleUrls() { return {
36
+ "$": ["stat-component.scss"]
37
+ }; }
38
+ static get styleUrls() { return {
39
+ "$": ["stat-component.css"]
40
+ }; }
41
+ static get properties() { return {
42
+ "ishidden": {
43
+ "type": "boolean",
44
+ "mutable": false,
45
+ "complexType": {
46
+ "original": "boolean",
47
+ "resolved": "boolean",
48
+ "references": {}
49
+ },
50
+ "required": false,
51
+ "optional": false,
52
+ "docs": {
53
+ "tags": [{
54
+ "text": "Hide Stat",
55
+ "name": "uiName"
56
+ }],
57
+ "text": "Hide or show the component"
58
+ },
59
+ "attribute": "ishidden",
60
+ "reflect": false
61
+ },
62
+ "stattype": {
63
+ "type": "string",
64
+ "mutable": false,
65
+ "complexType": {
66
+ "original": "string",
67
+ "resolved": "string",
68
+ "references": {}
69
+ },
70
+ "required": false,
71
+ "optional": false,
72
+ "docs": {
73
+ "tags": [{
74
+ "text": "Stat Type",
75
+ "name": "uiName"
76
+ }, {
77
+ "text": "statTypeSelector",
78
+ "name": "uiWidget"
79
+ }, {
80
+ "text": undefined,
81
+ "name": "required"
82
+ }],
83
+ "text": "Type of stat being displayed. e.g /rewardsCount"
84
+ },
85
+ "attribute": "stattype",
86
+ "reflect": false
87
+ },
88
+ "statvalue": {
89
+ "type": "string",
90
+ "mutable": false,
91
+ "complexType": {
92
+ "original": "string",
93
+ "resolved": "string",
94
+ "references": {}
95
+ },
96
+ "required": false,
97
+ "optional": false,
98
+ "docs": {
99
+ "tags": [{
100
+ "text": "Stat Value",
101
+ "name": "uiName"
102
+ }],
103
+ "text": "Value shown inside stat"
104
+ },
105
+ "attribute": "statvalue",
106
+ "reflect": false
107
+ },
108
+ "statdescription": {
109
+ "type": "string",
110
+ "mutable": false,
111
+ "complexType": {
112
+ "original": "string",
113
+ "resolved": "string",
114
+ "references": {}
115
+ },
116
+ "required": false,
117
+ "optional": false,
118
+ "docs": {
119
+ "tags": [{
120
+ "text": "Stat Description",
121
+ "name": "uiName"
122
+ }],
123
+ "text": "Description shown underneath stat value"
124
+ },
125
+ "attribute": "statdescription",
126
+ "reflect": false
127
+ },
128
+ "statcolor": {
129
+ "type": "string",
130
+ "mutable": false,
131
+ "complexType": {
132
+ "original": "string",
133
+ "resolved": "string",
134
+ "references": {}
135
+ },
136
+ "required": false,
137
+ "optional": false,
138
+ "docs": {
139
+ "tags": [{
140
+ "text": "Stat Color",
141
+ "name": "uiName"
142
+ }, {
143
+ "text": "color",
144
+ "name": "uiWidget"
145
+ }, {
146
+ "text": "color",
147
+ "name": "format"
148
+ }],
149
+ "text": "Text color of the stat"
150
+ },
151
+ "attribute": "statcolor",
152
+ "reflect": false
153
+ }
154
+ }; }
155
+ static get events() { return [{
156
+ "method": "statTypeUpdated",
157
+ "name": "statTypeUpdated",
158
+ "bubbles": true,
159
+ "cancelable": true,
160
+ "composed": true,
161
+ "docs": {
162
+ "tags": [],
163
+ "text": ""
164
+ },
165
+ "complexType": {
166
+ "original": "any",
167
+ "resolved": "any",
168
+ "references": {}
169
+ }
170
+ }, {
171
+ "method": "statAdded",
172
+ "name": "statAdded",
173
+ "bubbles": true,
174
+ "cancelable": true,
175
+ "composed": true,
176
+ "docs": {
177
+ "tags": [],
178
+ "text": ""
179
+ },
180
+ "complexType": {
181
+ "original": "any",
182
+ "resolved": "any",
183
+ "references": {}
184
+ }
185
+ }]; }
186
+ static get elementRef() { return "elem"; }
187
+ static get watchers() { return [{
188
+ "propName": "stattype",
189
+ "methodName": "stattypeHandler"
190
+ }]; }
191
+ }