@letscooee/web-sdk 8.10.0 → 9.0.1
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/.eslintrc.json +112 -0
- package/.postcssrc.json +5 -0
- package/CHANGELOG.md +31 -0
- package/angular.json +265 -0
- package/dist/shopify-sdk.min.js +1 -1
- package/dist/shopify-sdk.min.js.LICENSE.txt +5 -0
- package/dist/widget-sdk.min.css +1 -0
- package/dist/widget-sdk.min.js +8 -0
- package/package.json +21 -13
- package/projects/analytics-sdk/.eslintrc.json +37 -0
- package/projects/analytics-sdk/public/favicon.ico +0 -0
- package/projects/analytics-sdk/tsconfig.app.json +15 -0
- package/projects/analytics-sdk/tsconfig.spec.json +15 -0
- package/projects/core-lib/.eslintrc.json +37 -0
- package/projects/core-lib/README.md +5 -0
- package/projects/core-lib/ng-package.json +7 -0
- package/projects/core-lib/package.json +12 -0
- package/projects/core-lib/tsconfig.lib.json +15 -0
- package/projects/core-lib/tsconfig.lib.prod.json +11 -0
- package/projects/core-lib/tsconfig.spec.json +15 -0
- package/projects/widget-sdk/.eslintrc.json +37 -0
- package/projects/widget-sdk/public/favicon.ico +0 -0
- package/projects/widget-sdk/tsconfig.app.json +15 -0
- package/projects/widget-sdk/tsconfig.spec.json +15 -0
- package/dist/sdk.min.js +0 -2
- package/dist/sdk.min.js.LICENSE.txt +0 -61
- package/tsconfig-ng.json +0 -25
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"ignorePatterns": [
|
|
4
|
+
"projects/**/*"
|
|
5
|
+
],
|
|
6
|
+
"overrides": [
|
|
7
|
+
{
|
|
8
|
+
"files": [
|
|
9
|
+
"*.ts"
|
|
10
|
+
],
|
|
11
|
+
"extends": [
|
|
12
|
+
"eslint:recommended",
|
|
13
|
+
"plugin:@typescript-eslint/recommended",
|
|
14
|
+
"plugin:@angular-eslint/recommended",
|
|
15
|
+
"plugin:@angular-eslint/template/process-inline-templates"
|
|
16
|
+
],
|
|
17
|
+
"rules": {
|
|
18
|
+
"@angular-eslint/directive-selector": [
|
|
19
|
+
"error",
|
|
20
|
+
{
|
|
21
|
+
"type": "attribute",
|
|
22
|
+
"prefix": "cooee",
|
|
23
|
+
"style": "camelCase"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"@angular-eslint/component-selector": [
|
|
27
|
+
"error",
|
|
28
|
+
{
|
|
29
|
+
"type": "element",
|
|
30
|
+
"prefix": "cooee",
|
|
31
|
+
"style": "kebab-case"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
35
|
+
"@typescript-eslint/member-ordering": "error",
|
|
36
|
+
"@typescript-eslint/no-unused-vars": "error",
|
|
37
|
+
"@typescript-eslint/explicit-function-return-type": [
|
|
38
|
+
"error",
|
|
39
|
+
{
|
|
40
|
+
"allowExpressions": true,
|
|
41
|
+
"allowTypedFunctionExpressions": true,
|
|
42
|
+
"allowHigherOrderFunctions": true,
|
|
43
|
+
"allowDirectConstAssertionInArrowFunctions": true,
|
|
44
|
+
"allowConciseArrowFunctionExpressionsStartingWithVoid": false
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"@typescript-eslint/indent": [
|
|
48
|
+
"error",
|
|
49
|
+
4,
|
|
50
|
+
{
|
|
51
|
+
"FunctionDeclaration": {
|
|
52
|
+
"body": 1,
|
|
53
|
+
"parameters": "first"
|
|
54
|
+
},
|
|
55
|
+
"FunctionExpression": {
|
|
56
|
+
"body": 1,
|
|
57
|
+
"parameters": "first"
|
|
58
|
+
},
|
|
59
|
+
"ignoredNodes": [
|
|
60
|
+
"Decorator"
|
|
61
|
+
],
|
|
62
|
+
"SwitchCase": 1
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"max-len": [
|
|
66
|
+
"error",
|
|
67
|
+
{
|
|
68
|
+
"code": 120
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"no-multiple-empty-lines": [
|
|
72
|
+
"error",
|
|
73
|
+
{
|
|
74
|
+
"max": 1,
|
|
75
|
+
"maxEOF": 0
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"padded-blocks": [
|
|
79
|
+
"error",
|
|
80
|
+
{
|
|
81
|
+
"classes": "always",
|
|
82
|
+
"blocks": "never"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"prefer-promise-reject-errors": [
|
|
86
|
+
"error",
|
|
87
|
+
{
|
|
88
|
+
"allowEmptyReject": true
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"space-before-function-paren": [
|
|
92
|
+
"error",
|
|
93
|
+
{
|
|
94
|
+
"anonymous": "always",
|
|
95
|
+
"named": "never",
|
|
96
|
+
"asyncArrow": "always"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"files": [
|
|
103
|
+
"*.html"
|
|
104
|
+
],
|
|
105
|
+
"extends": [
|
|
106
|
+
"plugin:@angular-eslint/template/recommended",
|
|
107
|
+
"plugin:@angular-eslint/template/accessibility"
|
|
108
|
+
],
|
|
109
|
+
"rules": {}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
package/.postcssrc.json
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 9.0.1 (3/5/2025)
|
|
4
|
+
|
|
5
|
+
1. chore: Store commit messages in changelog file with update-changelog.js.
|
|
6
|
+
2. feat: Minimum product config for bundle.
|
|
7
|
+
3. chore: Add file size comparison in CHANGELOG.md.
|
|
8
|
+
|
|
9
|
+
| File | Now |
|
|
10
|
+
|----------------------|--------|
|
|
11
|
+
| `shopify-sdk.min.js` | 402 KB |
|
|
12
|
+
| `widget-sdk.min.js` | 105 KB |
|
|
13
|
+
| `widget-sdk.min.css` | 6 KB |
|
|
14
|
+
|
|
15
|
+
## 9.0.0 (3/5/2025)
|
|
16
|
+
|
|
17
|
+
1. Breaking: Update target & module of compiler to ES2022.
|
|
18
|
+
2. Breaking: Angular mono repo structure.
|
|
19
|
+
3. Breaking: No longer dumping `sdk.min.js`.
|
|
20
|
+
4. Breaking: The CSS is compiled as a separate file.
|
|
21
|
+
5. Breaking: Existing code moved to inner directories to follow monorepo.
|
|
22
|
+
6. Breaking: Support passing page name via page instead of screen.
|
|
23
|
+
7. Breaking: Upgrade ts-common with ESM module.
|
|
24
|
+
8. Feature: Product image change on hover.
|
|
25
|
+
9. Feature: Dummy progressbar.
|
|
26
|
+
10. Performance: Lazy initialisation of singleton services for better performance.
|
|
27
|
+
|
|
28
|
+
| File | Now |
|
|
29
|
+
|----------------------|--------|
|
|
30
|
+
| `shopify-sdk.min.js` | 402 KB |
|
|
31
|
+
| `widget-sdk.min.js` | 105 KB |
|
|
32
|
+
| `widget-sdk.min.css` | 5.9 KB |
|
|
33
|
+
|
|
3
34
|
## 8.10.0 (2/24/2025)
|
|
4
35
|
|
|
5
36
|
1. fix: Send device id with validate-session.
|
package/angular.json
CHANGED
|
@@ -3,5 +3,270 @@
|
|
|
3
3
|
"version": 1,
|
|
4
4
|
"newProjectRoot": "projects",
|
|
5
5
|
"projects": {
|
|
6
|
+
"widget-sdk": {
|
|
7
|
+
"projectType": "application",
|
|
8
|
+
"schematics": {
|
|
9
|
+
"@schematics/angular:component": {
|
|
10
|
+
"style": "scss"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"root": "projects/widget-sdk",
|
|
14
|
+
"sourceRoot": "projects/widget-sdk/src",
|
|
15
|
+
"prefix": "cooee",
|
|
16
|
+
"architect": {
|
|
17
|
+
"build": {
|
|
18
|
+
"builder": "@angular-devkit/build-angular:application",
|
|
19
|
+
"options": {
|
|
20
|
+
"outputPath": "dist/widget-sdk",
|
|
21
|
+
"index": "projects/widget-sdk/src/index.html",
|
|
22
|
+
"browser": "projects/widget-sdk/src/main.ts",
|
|
23
|
+
"polyfills": [],
|
|
24
|
+
"tsConfig": "projects/widget-sdk/tsconfig.app.json",
|
|
25
|
+
"inlineStyleLanguage": "scss",
|
|
26
|
+
"assets": [
|
|
27
|
+
{
|
|
28
|
+
"glob": "**/*",
|
|
29
|
+
"input": "projects/widget-sdk/public"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"styles": [
|
|
33
|
+
"projects/widget-sdk/src/styles.scss"
|
|
34
|
+
],
|
|
35
|
+
"scripts": []
|
|
36
|
+
},
|
|
37
|
+
"configurations": {
|
|
38
|
+
"production": {
|
|
39
|
+
"budgets": [
|
|
40
|
+
{
|
|
41
|
+
"type": "initial",
|
|
42
|
+
"maximumWarning": "500kB",
|
|
43
|
+
"maximumError": "1MB"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "anyComponentStyle",
|
|
47
|
+
"maximumWarning": "4kB",
|
|
48
|
+
"maximumError": "8kB"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"outputHashing": "none"
|
|
52
|
+
},
|
|
53
|
+
"development": {
|
|
54
|
+
"optimization": false,
|
|
55
|
+
"extractLicenses": false,
|
|
56
|
+
"sourceMap": true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"defaultConfiguration": "production"
|
|
60
|
+
},
|
|
61
|
+
"serve": {
|
|
62
|
+
"builder": "@angular-devkit/build-angular:dev-server",
|
|
63
|
+
"configurations": {
|
|
64
|
+
"production": {
|
|
65
|
+
"buildTarget": "widget-sdk:build:production"
|
|
66
|
+
},
|
|
67
|
+
"development": {
|
|
68
|
+
"buildTarget": "widget-sdk:build:development"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"options": {
|
|
72
|
+
"port": 8001
|
|
73
|
+
},
|
|
74
|
+
"defaultConfiguration": "development"
|
|
75
|
+
},
|
|
76
|
+
"extract-i18n": {
|
|
77
|
+
"builder": "@angular-devkit/build-angular:extract-i18n"
|
|
78
|
+
},
|
|
79
|
+
"test": {
|
|
80
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
81
|
+
"options": {
|
|
82
|
+
"polyfills": [],
|
|
83
|
+
"tsConfig": "projects/widget-sdk/tsconfig.spec.json",
|
|
84
|
+
"inlineStyleLanguage": "scss",
|
|
85
|
+
"assets": [
|
|
86
|
+
{
|
|
87
|
+
"glob": "**/*",
|
|
88
|
+
"input": "projects/widget-sdk/public"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"styles": [
|
|
92
|
+
"projects/widget-sdk/src/styles.scss"
|
|
93
|
+
],
|
|
94
|
+
"scripts": []
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"lint": {
|
|
98
|
+
"builder": "@angular-eslint/builder:lint",
|
|
99
|
+
"options": {
|
|
100
|
+
"lintFilePatterns": [
|
|
101
|
+
"projects/widget-sdk/**/*.ts",
|
|
102
|
+
"projects/widget-sdk/**/*.html"
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"analytics-sdk": {
|
|
109
|
+
"projectType": "application",
|
|
110
|
+
"schematics": {
|
|
111
|
+
"@schematics/angular:component": {
|
|
112
|
+
"style": "scss"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"root": "projects/analytics-sdk",
|
|
116
|
+
"sourceRoot": "projects/analytics-sdk/src",
|
|
117
|
+
"prefix": "cooee",
|
|
118
|
+
"architect": {
|
|
119
|
+
"build": {
|
|
120
|
+
"builder": "@angular-devkit/build-angular:application",
|
|
121
|
+
"options": {
|
|
122
|
+
"outputPath": "dist/analytics-sdk",
|
|
123
|
+
"index": "projects/analytics-sdk/src/index.html",
|
|
124
|
+
"browser": "projects/analytics-sdk/src/main.ts",
|
|
125
|
+
"polyfills": [],
|
|
126
|
+
"tsConfig": "projects/analytics-sdk/tsconfig.app.json",
|
|
127
|
+
"inlineStyleLanguage": "scss",
|
|
128
|
+
"assets": [
|
|
129
|
+
{
|
|
130
|
+
"glob": "**/*",
|
|
131
|
+
"input": "projects/analytics-sdk/public"
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"styles": [
|
|
135
|
+
"projects/analytics-sdk/src/styles.scss"
|
|
136
|
+
],
|
|
137
|
+
"allowedCommonJsDependencies": [
|
|
138
|
+
"js-logger",
|
|
139
|
+
"@letscooee/ts-common",
|
|
140
|
+
"@letscooee/url-builder",
|
|
141
|
+
"ua-parser-js",
|
|
142
|
+
"fetch-retry",
|
|
143
|
+
"localforage"
|
|
144
|
+
],
|
|
145
|
+
"scripts": []
|
|
146
|
+
},
|
|
147
|
+
"configurations": {
|
|
148
|
+
"production": {
|
|
149
|
+
"budgets": [
|
|
150
|
+
{
|
|
151
|
+
"type": "initial",
|
|
152
|
+
"maximumWarning": "500kB",
|
|
153
|
+
"maximumError": "1MB"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "anyComponentStyle",
|
|
157
|
+
"maximumWarning": "4kB",
|
|
158
|
+
"maximumError": "8kB"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"outputHashing": "none",
|
|
162
|
+
"fileReplacements": [
|
|
163
|
+
{
|
|
164
|
+
"replace": "projects/core-lib/src/lib/environments/environment.local.ts",
|
|
165
|
+
"with": "projects/core-lib/src/lib/environments/environment.production.ts"
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"development": {
|
|
170
|
+
"optimization": false,
|
|
171
|
+
"extractLicenses": false,
|
|
172
|
+
"sourceMap": true
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"defaultConfiguration": "development"
|
|
176
|
+
},
|
|
177
|
+
"serve": {
|
|
178
|
+
"builder": "@angular-devkit/build-angular:dev-server",
|
|
179
|
+
"configurations": {
|
|
180
|
+
"production": {
|
|
181
|
+
"buildTarget": "analytics-sdk:build:production"
|
|
182
|
+
},
|
|
183
|
+
"development": {
|
|
184
|
+
"buildTarget": "analytics-sdk:build:development"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"options": {
|
|
188
|
+
"port": 8002
|
|
189
|
+
},
|
|
190
|
+
"defaultConfiguration": "development"
|
|
191
|
+
},
|
|
192
|
+
"extract-i18n": {
|
|
193
|
+
"builder": "@angular-devkit/build-angular:extract-i18n"
|
|
194
|
+
},
|
|
195
|
+
"test": {
|
|
196
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
197
|
+
"options": {
|
|
198
|
+
"polyfills": [],
|
|
199
|
+
"tsConfig": "projects/analytics-sdk/tsconfig.spec.json",
|
|
200
|
+
"inlineStyleLanguage": "scss",
|
|
201
|
+
"assets": [
|
|
202
|
+
{
|
|
203
|
+
"glob": "**/*",
|
|
204
|
+
"input": "projects/analytics-sdk/public"
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"styles": [
|
|
208
|
+
"projects/analytics-sdk/src/styles.scss"
|
|
209
|
+
],
|
|
210
|
+
"scripts": []
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"lint": {
|
|
214
|
+
"builder": "@angular-eslint/builder:lint",
|
|
215
|
+
"options": {
|
|
216
|
+
"lintFilePatterns": [
|
|
217
|
+
"projects/analytics-sdk/**/*.ts",
|
|
218
|
+
"projects/analytics-sdk/**/*.html"
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"core-lib": {
|
|
225
|
+
"projectType": "library",
|
|
226
|
+
"root": "projects/core-lib",
|
|
227
|
+
"sourceRoot": "projects/core-lib/src",
|
|
228
|
+
"prefix": "lib",
|
|
229
|
+
"architect": {
|
|
230
|
+
"build": {
|
|
231
|
+
"builder": "@angular-devkit/build-angular:ng-packagr",
|
|
232
|
+
"options": {
|
|
233
|
+
"project": "projects/core-lib/ng-package.json"
|
|
234
|
+
},
|
|
235
|
+
"configurations": {
|
|
236
|
+
"production": {
|
|
237
|
+
"tsConfig": "projects/core-lib/tsconfig.lib.prod.json"
|
|
238
|
+
},
|
|
239
|
+
"development": {
|
|
240
|
+
"tsConfig": "projects/core-lib/tsconfig.lib.json"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"defaultConfiguration": "production"
|
|
244
|
+
},
|
|
245
|
+
"test": {
|
|
246
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
247
|
+
"options": {
|
|
248
|
+
"tsConfig": "projects/core-lib/tsconfig.spec.json",
|
|
249
|
+
"polyfills": [
|
|
250
|
+
"zone.js",
|
|
251
|
+
"zone.js/testing"
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"lint": {
|
|
256
|
+
"builder": "@angular-eslint/builder:lint",
|
|
257
|
+
"options": {
|
|
258
|
+
"lintFilePatterns": [
|
|
259
|
+
"projects/core-lib/**/*.ts",
|
|
260
|
+
"projects/core-lib/**/*.html"
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"cli": {
|
|
268
|
+
"schematicCollections": [
|
|
269
|
+
"@angular-eslint/schematics"
|
|
270
|
+
]
|
|
6
271
|
}
|
|
7
272
|
}
|