website-utilities 1.0.374 → 1.0.376

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/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "website-utilities",
3
- "version": "1.0.374",
3
+ "version": "1.0.376",
4
4
  "description": "extend your web app",
5
5
  "keywords": [
6
- "jquery",
7
6
  "website",
8
7
  "utilities"
9
8
  ],
@@ -61,71 +60,61 @@
61
60
  "watch": "weboptimizer build --watch"
62
61
  },
63
62
  "devDependencies": {
64
- "@babel/eslint-parser": "^7.28.5",
63
+ "@babel/eslint-parser": "^7.28.6",
65
64
  "@babel/plugin-transform-proto-to-assign": "^7.27.1",
66
- "@babel/runtime": "^7.28.4",
67
- "@stylistic/eslint-plugin": "^5.6.1",
65
+ "@babel/runtime": "^7.29.2",
66
+ "@eslint/js": "^10.0.1",
67
+ "@stylistic/eslint-plugin": "^5.10.0",
68
68
  "@types/ejs": "^3.1.5",
69
69
  "@types/html-minifier": "^4.0.6",
70
- "@types/jquery": "^3.5.33",
71
- "@types/jsdom": "^27.0.0",
72
- "@types/node": "^25.0.3",
73
- "@typescript-eslint/eslint-plugin": "^8.51.0",
74
- "@typescript-eslint/parser": "^8.51.0",
75
- "clientnode": "^3.0.1340",
76
- "css-loader": "^7.1.2",
77
- "cssnano": "^7.1.2",
78
- "documentation-website": "^1.0.397",
79
- "eslint": "^9.39.2",
70
+ "@types/jsdom": "^28.0.1",
71
+ "@types/node": "^25.6.0",
72
+ "@types/webpack-env": "^1.18.8",
73
+ "@typescript-eslint/eslint-plugin": "^8.58.2",
74
+ "@typescript-eslint/parser": "^8.58.2",
75
+ "@webcomponents/webcomponentsjs": "^2.8.0",
76
+ "clientnode": "^4.0.1386",
77
+ "css-loader": "^7.1.4",
78
+ "cssnano": "^7.1.5",
79
+ "documentation-website": "^1.0.401",
80
+ "eslint": "^10.2.0",
80
81
  "eslint-config-google": "^0.14.0",
81
- "eslint-plugin-jsdoc": "^61.5.0",
82
- "internationalisation": "^1.0.346",
83
- "jest": "^30.2.0",
84
- "jquery": "^3.7.1",
82
+ "eslint-plugin-jsdoc": "^62.9.0",
83
+ "jest": "^30.3.0",
85
84
  "jsdoc": "^4.0.5",
86
- "mini-css-extract-plugin": "^2.9.4",
87
- "postcss": "^8.5.6",
85
+ "mini-css-extract-plugin": "^2.10.2",
86
+ "postcss": "^8.5.10",
88
87
  "postcss-fontpath": "^1.0.0",
89
88
  "postcss-import": "^16.1.1",
90
- "postcss-loader": "^8.2.0",
91
- "postcss-preset-env": "^10.6.0",
89
+ "postcss-loader": "^8.2.1",
90
+ "postcss-preset-env": "^11.2.1",
92
91
  "postcss-scss": "^4.0.9",
93
92
  "postcss-sprites": "^4.2.1",
94
93
  "postcss-url": "^10.1.3",
95
- "sass": "^1.97.1",
96
- "sass-loader": "^16.0.6",
97
- "spin.js": "^4.1.2",
94
+ "prop-types": "^15.8.1",
95
+ "sass": "^1.99.0",
96
+ "sass-loader": "^16.0.7",
98
97
  "style-loader": "^4.0.0",
99
- "stylelint": "^16.26.1",
100
- "stylelint-config-standard-scss": "^16.0.0",
101
- "typescript-eslint": "^8.51.0",
102
- "weboptimizer": "^2.0.1637",
103
- "webpack-dev-server": "^5.2.2"
98
+ "stylelint": "^17.8.0",
99
+ "stylelint-config-standard-scss": "^17.0.0",
100
+ "typescript-eslint": "^8.58.2",
101
+ "web-component-wrapper": "^0.0.558",
102
+ "weboptimizer": "^3.0.21",
103
+ "webpack-dev-server": "^5.2.3"
104
104
  },
105
105
  "peerDependencies": {
106
106
  "@babel/runtime": "*",
107
107
  "clientnode": "*",
108
- "internationalisation": "*",
109
- "jquery": "*",
110
- "spin.js": "*"
108
+ "web-component-wrapper": "*"
111
109
  },
112
110
  "peerDependenciesMeta": {
113
111
  "@babel/runtime": {
114
112
  "optional": true
115
- },
116
- "internationalisation": {
117
- "optional": true
118
- },
119
- "jquery": {
120
- "optional": true
121
- },
122
- "spin.js": {
123
- "optional": true
124
113
  }
125
114
  },
126
115
  "engines": {
127
- "node": ">=20",
128
- "npm": ">=10",
116
+ "node": ">=24",
117
+ "npm": ">=11",
129
118
  "yarn": ">=4"
130
119
  },
131
120
  "resolutions": {
@@ -168,6 +157,11 @@
168
157
  ]
169
158
  }
170
159
  },
160
+ "generic": {
161
+ "supportedBrowsers": [
162
+ "browserslist config and supports es6-class"
163
+ ]
164
+ },
171
165
  "injection": {
172
166
  "autoExclude": {
173
167
  "paths": {
@@ -184,7 +178,7 @@
184
178
  "exclude": {
185
179
  "__append__": [
186
180
  {
187
- "__evaluate__": "/^spin\\.js$/"
181
+ "__evaluate__": "/(?:^|\\/)web-component-wrapper(?:$|\\/)/"
188
182
  }
189
183
  ]
190
184
  }
@@ -192,24 +186,31 @@
192
186
  }
193
187
  }
194
188
  },
195
- "path": {
196
- "source": {
197
- "asset": {
198
- "font": "fonts/"
199
- }
200
- },
201
- "target": {
202
- "asset": {
203
- "font": "fonts.compiled/"
204
- }
205
- }
206
- },
207
189
  "module": {
208
190
  "enforceDeduplication": true,
191
+ "html": {
192
+ "options": {
193
+ "sources": {
194
+ "urlFilter": {
195
+ "__evaluate__": "() => false"
196
+ }
197
+ }
198
+ }
199
+ },
209
200
  "optimizer": {
210
201
  "babelMinify": {
211
202
  "#": "Avoids wrong this binding in some callbacks with class bound closure (e.g. in \"performStartUpEffects -> animate -> always\".",
212
203
  "module": null
204
+ },
205
+ "htmlMinifier": {
206
+ "ignoreCustomComments": [
207
+ {
208
+ "__evaluate__": "/^\\|?[a-z]{2}[A-Z]{2}:/"
209
+ },
210
+ {
211
+ "__evaluate__": "/^[a-z]{2}[A-Z]{2}$/"
212
+ }
213
+ ]
213
214
  }
214
215
  },
215
216
  "preprocessor": {
@@ -219,10 +220,18 @@
219
220
  "{loader: 'sass-loader'}"
220
221
  ]
221
222
  }
222
- },
223
- "javaScript": {
224
- "#": "We have to pre-process \"spin.js\" since it isn't a compatible ECMAScript.",
225
- "exclude": "!filePath.endsWith('/spin.js') && isFilePathInDependencies(filePath)"
223
+ }
224
+ }
225
+ },
226
+ "path": {
227
+ "source": {
228
+ "asset": {
229
+ "font": "fonts/"
230
+ }
231
+ },
232
+ "target": {
233
+ "asset": {
234
+ "font": "fonts.compiled/"
226
235
  }
227
236
  }
228
237
  },
@@ -284,6 +293,23 @@
284
293
  }
285
294
  }
286
295
  }
296
+ },
297
+ "webpack": {
298
+ "snapshot": {
299
+ "unmanagedPaths": [
300
+ {
301
+ "__evaluate__": "/^.+?[\\/]node_modules[\\/]clientnode[\\/]/"
302
+ },
303
+ {
304
+ "__evaluate__": "/^.+?[\\/]node_modules[\\/]web-component-wrapper[\\/]/"
305
+ }
306
+ ]
307
+ },
308
+ "watchOptions": {
309
+ "ignored": {
310
+ "__remove__": "**/node_modules"
311
+ }
312
+ }
287
313
  }
288
314
  },
289
315
  "packageManager": "yarn@4.12.0+sha512.f45ab632439a67f8bc759bf32ead036a1f413287b9042726b7cc4818b7b49e14e9423ba49b18f9e06ea4941c1ad062385b1d8760a8d5091a1a31e5f6219afca8"
package/readme.md CHANGED
@@ -91,25 +91,6 @@ after needed dependencies:
91
91
  -->
92
92
 
93
93
  ```HTML
94
- <script
95
- src="https://code.jquery.com/jquery-3.6.0.min.js"
96
- integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
97
- crossorigin="anonymous"
98
- ></script>
99
- <script
100
- src="https://torben.website/clientnode/data/distributionBundle/index.js"
101
- ></script>
102
- <script
103
- src="https://torben.website/internationalisation/data/distributionBundle/index.js"
104
- ></script>
105
- <!--Inject downloaded file:
106
- <script src="index.js"></script>
107
- -->
108
- <!--Or integrate via cdn:-->
109
- <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
110
- <!--Inject downloaded file:-->
111
- <script src="index.compiled.js"></script>
112
- <!--Or integrate via cdn:
113
94
  <script
114
95
  src="https://torben.website/website-utilities/data/distributionBundle/index.js"
115
96
  ></script>
@@ -189,25 +170,6 @@ Here you can see the initialisation with all available plugin options:
189
170
  -->
190
171
 
191
172
  ```HTML
192
- <script
193
- src="https://code.jquery.com/jquery-3.6.0.min.js"
194
- integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
195
- crossorigin="anonymous"
196
- ></script>
197
- <script
198
- src="https://torben.website/clientnode/data/distributionBundle/index.js"
199
- ></script>
200
- <script
201
- src="https://torben.website/internationalisation/data/distributionBundle/index.js"
202
- ></script>
203
- <!--Inject downloaded file:
204
- <script src="index.js"></script>
205
- -->
206
- <!--Or integrate via cdn:-->
207
- <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
208
- <!--Inject downloaded file:-->
209
- <script src="index.compiled.js"></script>
210
- <!--Or integrate via cdn:
211
173
  <script
212
174
  src="https://torben.website/website-utilities/data/distributionBundle/index.js"
213
175
  ></script>
package/type.d.ts CHANGED
@@ -1,76 +1,28 @@
1
- import { DomNodes as BaseDomNodes, FirstParameter, Mapping, Options as BaseOptions, ProcedureFunction, $T } from 'clientnode';
2
- import { Options as InternationalisationOptions } from 'internationalisation/type';
3
- import { SpinnerOptions } from 'spin.js';
4
- import WebsiteUtilities from './index';
5
- export type WebsiteUtilitiesFunction = ((..._parameters: Array<unknown>) => unknown) & {
6
- class: typeof WebsiteUtilities;
7
- };
8
- declare global {
9
- interface JQueryStatic {
10
- WebsiteUtilities: WebsiteUtilitiesFunction;
11
- }
12
- const dataLayer: Array<unknown>;
13
- }
14
- export type DomNodes<Type = string> = BaseDomNodes<Type> & {
15
- mediaQueryIndicator: Type;
16
- scrollToTopButton: Type;
17
- startUpAnimationClassPrefix: Type;
18
- top: Type;
19
- windowLoadingCover: Type;
20
- windowLoadingSpinner: Type;
21
- };
22
1
  export interface DefaultOptions {
23
- activateLanguageSupport: boolean;
24
2
  additionalPageLoadingTimeInMilliseconds: number;
25
3
  domain: string;
26
- domNodes: DomNodes;
27
- domNodeSelectorInfix: null | string;
28
- domNodeSelectorPrefix: string;
29
4
  initialSectionName: string;
30
5
  knownScrollEventNames: Array<string>;
31
- language: Partial<InternationalisationOptions>;
32
6
  mediaQueryClassNameIndicator: Array<Array<string>>;
33
- name: string;
34
- onChangeMediaQueryMode: ProcedureFunction;
35
- onChangeToExtraSmallMode: ProcedureFunction;
36
- onChangeToLargeMode: ProcedureFunction;
37
- onChangeToMediumMode: ProcedureFunction;
38
- onChangeToSmallMode: ProcedureFunction;
39
- onStartUpAnimationComplete: ProcedureFunction;
40
- onSwitchSection: ProcedureFunction;
41
- onViewportMovesAwayFromTop: ProcedureFunction;
42
- onViewportMovesToTop: ProcedureFunction;
43
- scrollToTop: {
44
- button: {
45
- hideAnimationOptions: JQuery.EffectsOptions<HTMLElement>;
46
- showAnimationOptions: JQuery.EffectsOptions<HTMLElement>;
47
- slideDistanceInPixel: number;
48
- };
49
- options: JQuery.EffectsOptions<HTMLElement>;
7
+ selectors: {
8
+ top: string;
9
+ scrollToTopButtons: string;
10
+ startUpAnimationClassPrefix: string;
11
+ windowLoadingCover: string;
50
12
  };
51
13
  startUpAnimationElementDelayInMilliseconds: number;
52
- startUpHide: Mapping<number | string>;
53
- startUpShowAnimation: FirstParameter<$T['animate']>;
54
- switchToManualScrollingIndicator: (event: JQuery.Event) => boolean;
55
- tracking?: {
56
- buttonClick?: (this: WebsiteUtilities, $link: $T<HTMLButtonElement>, event: JQuery.Event) => void;
57
- linkClick?: (this: WebsiteUtilities, $link: $T<HTMLLinkElement>, event: JQuery.Event) => void;
58
- sectionSwitch?: (this: WebsiteUtilities, sectionName: string) => void;
59
- track: (item: TrackingItem) => void;
60
- };
61
- windowLoadingCoverHideAnimation: FirstParameter<$T['animate']>;
62
- windowLoadingSpinner: SpinnerOptions;
14
+ tracking: boolean;
63
15
  windowLoadedTimeoutAfterDocLoadedInMSec: number;
64
16
  }
65
- export type Options = BaseOptions & DefaultOptions;
17
+ export type Options = DefaultOptions;
66
18
  export interface TrackingItem {
67
- context: string;
19
+ context?: string;
68
20
  event: string;
69
21
  eventType: string;
70
22
  icon?: string;
71
23
  label: string;
72
24
  reference: string;
73
25
  subject: string;
74
- value: number;
26
+ value?: number;
75
27
  userInteraction: boolean;
76
28
  }