@websolutespa/bom-mixer-hooks 1.9.3 → 2.0.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/CHANGELOG.md CHANGED
@@ -1,252 +1,268 @@
1
- # @websolutespa/bom-mixer-hooks
2
-
3
- ## 1.9.3
4
-
5
- ### Patch Changes
6
-
7
- - 0c7f05f: Modified: useMetaData canonical
8
- - Updated dependencies [0c7f05f]
9
- - Updated dependencies [0c7f05f]
10
- - @websolutespa/bom-mixer-models@1.10.1
11
- - @websolutespa/bom-core@1.8.23
12
-
13
- ## 1.9.2
14
-
15
- ### Patch Changes
16
-
17
- - 4c2d7a6: Added: useScrollDirection
18
-
19
- ## 1.9.1
20
-
21
- ### Patch Changes
22
-
23
- - Modified: MetaData Meta added xDefault
24
- - Updated dependencies
25
- - @websolutespa/bom-mixer-models@1.9.5
26
-
27
- ## 1.9.0
28
-
29
- ### Minor Changes
30
-
31
- - Modified: usePagination
32
- - Added: useMetaData
33
-
34
- ## 1.8.11
35
-
36
- ### Patch Changes
37
-
38
- - Modified: usePage typings
39
- - Updated dependencies
40
- - Updated dependencies
41
- - @websolutespa/bom-mixer-store@1.8.11
42
- - @websolutespa/bom-mixer-models@1.8.18
43
-
44
- ## 1.8.10
45
-
46
- ### Patch Changes
47
-
48
- - 88267c3: Modified: useAutosizeTextArea
49
-
50
- ## 1.8.9
51
-
52
- ### Patch Changes
53
-
54
- - 3a7fc91: Added: useAutosizeTextArea, useColorScheme, useFocusTrap, useReducedMotion
55
-
56
- ## 1.8.8
57
-
58
- ### Patch Changes
59
-
60
- - Modified: useGenericContext returning context
61
-
62
- ## 1.8.7
63
-
64
- ### Patch Changes
65
-
66
- - b43eb2e: Modified: useSearchParams shallow routing
67
-
68
- ## 1.8.6
69
-
70
- ### Patch Changes
71
-
72
- - Modified: SearchParamsEncoded
73
-
74
- ## 1.8.5
75
-
76
- ### Patch Changes
77
-
78
- - Modified: useSearchParams, useSearchParamsEncoded, useSearchParamsQs scroll false
79
-
80
- ## 1.8.4
81
-
82
- ### Patch Changes
83
-
84
- - Modified: usePageLoading, shallow routes do not fire loading state
85
-
86
- ## 1.8.3
87
-
88
- ### Patch Changes
89
-
90
- - Added: usePageLoading
91
- - Modified: useSearchParams, useSearchParamsEncoded, useSearchParamsQs
92
-
93
- ## 1.8.2
94
-
95
- ### Patch Changes
96
-
97
- - Modified: useSearchParams, useSearchParamsEncoded, useSearchParamsQs added pushParams
98
-
99
- ## 1.8.1
100
-
101
- ### Patch Changes
102
-
103
- - Updated dependencies
104
- - @websolutespa/bom-core@1.8.5
105
-
106
- ## 1.8.0
107
-
108
- ### Minor Changes
109
-
110
- - f8a1d97: Modified: removed sample hooks
111
- - Updated dependencies [f8a1d97]
112
- - @websolutespa/bom-mixer-models@1.8.0
113
- - @websolutespa/bom-mixer-store@1.8.0
114
- - @websolutespa/bom-core@1.8.0
115
-
116
- ## 1.7.5
117
-
118
- ### Patch Changes
119
-
120
- - Added: getRemoteApiRequestOptions, getLocalApiRequestOptions
121
- - Updated dependencies
122
- - @websolutespa/bom-mixer-store@1.7.7
123
-
124
- ## 1.7.4
125
-
126
- ### Patch Changes
127
-
128
- - Fixing: downgrading eslint to v8.56.0
129
- - Updated dependencies
130
- - @websolutespa/bom-mixer-models@1.7.6
131
- - @websolutespa/bom-mixer-store@1.7.5
132
- - @websolutespa/bom-core@1.7.8
133
-
134
- ## 1.7.3
135
-
136
- ### Patch Changes
137
-
138
- - Modified: useIntersectionObserver
139
-
140
- ## 1.7.2
141
-
142
- ### Patch Changes
143
-
144
- - Updating: dependencies
145
- - Updated dependencies
146
- - @websolutespa/bom-mixer-models@1.7.2
147
- - @websolutespa/bom-mixer-store@1.7.3
148
- - @websolutespa/bom-core@1.7.3
149
-
150
- ## 1.7.1
151
-
152
- ### Patch Changes
153
-
154
- - aa41666: Added: useIntersectionObserver
155
-
156
- ## 1.7.0
157
-
158
- ### Minor Changes
159
-
160
- - 28e86bd: Modified: IPage, Store services & decorators
161
- - Updated dependencies [28e86bd]
162
- - @websolutespa/bom-mixer-models@1.7.0
163
- - @websolutespa/bom-mixer-store@1.7.0
164
- - @websolutespa/bom-core@1.7.0
165
-
166
- ## 1.4.2
167
-
168
- ### Patch Changes
169
-
170
- - Modified: IFeatureType
171
- - Updated dependencies
172
- - @websolutespa/bom-mixer-models@1.5.4
173
- - @websolutespa/bom-mixer-store@1.4.3
174
- - @websolutespa/bom-core@0.6.5
175
-
176
- ## 1.4.1
177
-
178
- ### Patch Changes
179
-
180
- - Added: useCollectionApi, useExtra
181
- - Modified: usePagination, useSearchParamsQs
182
- - Updated dependencies
183
- - @websolutespa/bom-mixer-models@1.5.2
184
- - @websolutespa/bom-core@0.6.2
185
-
186
- ## 1.4.0
187
-
188
- ### Minor Changes
189
-
190
- - Added useLazyModules
191
-
192
- ## 1.3.0
193
-
194
- ### Minor Changes
195
-
196
- - Added: useSearchParamsQs
197
- - Modified: useSearchParamsEncoded, useSearchParams, useScrollTo
198
-
199
- ## 1.2.1
200
-
201
- ### Patch Changes
202
-
203
- - Added: LabelService
204
- - Modified: useLabels, useScrollTo
205
-
206
- ## 1.2.0
207
-
208
- ### Minor Changes
209
-
210
- - Updating: next 13
211
-
212
- ## 1.1.0
213
-
214
- ### Minor Changes
215
-
216
- - Modified: useHttp, useApi
217
-
218
- ## 1.0.0
219
-
220
- ### Minor Changes
221
-
222
- - Added: useScrolled
223
-
224
- ## 0.2.2
225
-
226
- ### Patch Changes
227
-
228
- - Modified: useBreakpoint theme mediaQuery
229
-
230
- ## 0.2.1
231
-
232
- ### Patch Changes
233
-
234
- - Added: source files
235
-
236
- ## 0.2.0
237
-
238
- ### Minor Changes
239
-
240
- - Added: splat routes
241
-
242
- ## 0.1.0
243
-
244
- ### Minor Changes
245
-
246
- - Added: @websolutespa/bom-core
247
-
248
- ## 0.0.2
249
-
250
- ### Patch Changes
251
-
252
- - Added: first release
1
+ # @websolutespa/bom-mixer-hooks
2
+
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - Release: Bom 2.0
8
+
9
+ ## 1.9.4
10
+
11
+ ### Patch Changes
12
+
13
+ - Added: IApp global
14
+ - Updated dependencies
15
+ - @websolutespa/bom-mixer-models@1.10.3
16
+ - @websolutespa/bom-mixer-store@1.10.1
17
+ - @websolutespa/bom-core@1.8.24
18
+
19
+ ## 1.9.3
20
+
21
+ ### Patch Changes
22
+
23
+ - 0c7f05f: Modified: useMetaData canonical
24
+ - Updated dependencies [0c7f05f]
25
+ - Updated dependencies [0c7f05f]
26
+ - @websolutespa/bom-mixer-models@1.10.1
27
+ - @websolutespa/bom-core@1.8.23
28
+
29
+ ## 1.9.2
30
+
31
+ ### Patch Changes
32
+
33
+ - 4c2d7a6: Added: useScrollDirection
34
+
35
+ ## 1.9.1
36
+
37
+ ### Patch Changes
38
+
39
+ - Modified: MetaData Meta added xDefault
40
+ - Updated dependencies
41
+ - @websolutespa/bom-mixer-models@1.9.5
42
+
43
+ ## 1.9.0
44
+
45
+ ### Minor Changes
46
+
47
+ - Modified: usePagination
48
+ - Added: useMetaData
49
+
50
+ ## 1.8.11
51
+
52
+ ### Patch Changes
53
+
54
+ - Modified: usePage typings
55
+ - Updated dependencies
56
+ - Updated dependencies
57
+ - @websolutespa/bom-mixer-store@1.8.11
58
+ - @websolutespa/bom-mixer-models@1.8.18
59
+
60
+ ## 1.8.10
61
+
62
+ ### Patch Changes
63
+
64
+ - 88267c3: Modified: useAutosizeTextArea
65
+
66
+ ## 1.8.9
67
+
68
+ ### Patch Changes
69
+
70
+ - 3a7fc91: Added: useAutosizeTextArea, useColorScheme, useFocusTrap, useReducedMotion
71
+
72
+ ## 1.8.8
73
+
74
+ ### Patch Changes
75
+
76
+ - Modified: useGenericContext returning context
77
+
78
+ ## 1.8.7
79
+
80
+ ### Patch Changes
81
+
82
+ - b43eb2e: Modified: useSearchParams shallow routing
83
+
84
+ ## 1.8.6
85
+
86
+ ### Patch Changes
87
+
88
+ - Modified: SearchParamsEncoded
89
+
90
+ ## 1.8.5
91
+
92
+ ### Patch Changes
93
+
94
+ - Modified: useSearchParams, useSearchParamsEncoded, useSearchParamsQs scroll false
95
+
96
+ ## 1.8.4
97
+
98
+ ### Patch Changes
99
+
100
+ - Modified: usePageLoading, shallow routes do not fire loading state
101
+
102
+ ## 1.8.3
103
+
104
+ ### Patch Changes
105
+
106
+ - Added: usePageLoading
107
+ - Modified: useSearchParams, useSearchParamsEncoded, useSearchParamsQs
108
+
109
+ ## 1.8.2
110
+
111
+ ### Patch Changes
112
+
113
+ - Modified: useSearchParams, useSearchParamsEncoded, useSearchParamsQs added pushParams
114
+
115
+ ## 1.8.1
116
+
117
+ ### Patch Changes
118
+
119
+ - Updated dependencies
120
+ - @websolutespa/bom-core@1.8.5
121
+
122
+ ## 1.8.0
123
+
124
+ ### Minor Changes
125
+
126
+ - f8a1d97: Modified: removed sample hooks
127
+ - Updated dependencies [f8a1d97]
128
+ - @websolutespa/bom-mixer-models@1.8.0
129
+ - @websolutespa/bom-mixer-store@1.8.0
130
+ - @websolutespa/bom-core@1.8.0
131
+
132
+ ## 1.7.5
133
+
134
+ ### Patch Changes
135
+
136
+ - Added: getRemoteApiRequestOptions, getLocalApiRequestOptions
137
+ - Updated dependencies
138
+ - @websolutespa/bom-mixer-store@1.7.7
139
+
140
+ ## 1.7.4
141
+
142
+ ### Patch Changes
143
+
144
+ - Fixing: downgrading eslint to v8.56.0
145
+ - Updated dependencies
146
+ - @websolutespa/bom-mixer-models@1.7.6
147
+ - @websolutespa/bom-mixer-store@1.7.5
148
+ - @websolutespa/bom-core@1.7.8
149
+
150
+ ## 1.7.3
151
+
152
+ ### Patch Changes
153
+
154
+ - Modified: useIntersectionObserver
155
+
156
+ ## 1.7.2
157
+
158
+ ### Patch Changes
159
+
160
+ - Updating: dependencies
161
+ - Updated dependencies
162
+ - @websolutespa/bom-mixer-models@1.7.2
163
+ - @websolutespa/bom-mixer-store@1.7.3
164
+ - @websolutespa/bom-core@1.7.3
165
+
166
+ ## 1.7.1
167
+
168
+ ### Patch Changes
169
+
170
+ - aa41666: Added: useIntersectionObserver
171
+
172
+ ## 1.7.0
173
+
174
+ ### Minor Changes
175
+
176
+ - 28e86bd: Modified: IPage, Store services & decorators
177
+ - Updated dependencies [28e86bd]
178
+ - @websolutespa/bom-mixer-models@1.7.0
179
+ - @websolutespa/bom-mixer-store@1.7.0
180
+ - @websolutespa/bom-core@1.7.0
181
+
182
+ ## 1.4.2
183
+
184
+ ### Patch Changes
185
+
186
+ - Modified: IFeatureType
187
+ - Updated dependencies
188
+ - @websolutespa/bom-mixer-models@1.5.4
189
+ - @websolutespa/bom-mixer-store@1.4.3
190
+ - @websolutespa/bom-core@0.6.5
191
+
192
+ ## 1.4.1
193
+
194
+ ### Patch Changes
195
+
196
+ - Added: useCollectionApi, useExtra
197
+ - Modified: usePagination, useSearchParamsQs
198
+ - Updated dependencies
199
+ - @websolutespa/bom-mixer-models@1.5.2
200
+ - @websolutespa/bom-core@0.6.2
201
+
202
+ ## 1.4.0
203
+
204
+ ### Minor Changes
205
+
206
+ - Added useLazyModules
207
+
208
+ ## 1.3.0
209
+
210
+ ### Minor Changes
211
+
212
+ - Added: useSearchParamsQs
213
+ - Modified: useSearchParamsEncoded, useSearchParams, useScrollTo
214
+
215
+ ## 1.2.1
216
+
217
+ ### Patch Changes
218
+
219
+ - Added: LabelService
220
+ - Modified: useLabels, useScrollTo
221
+
222
+ ## 1.2.0
223
+
224
+ ### Minor Changes
225
+
226
+ - Updating: next 13
227
+
228
+ ## 1.1.0
229
+
230
+ ### Minor Changes
231
+
232
+ - Modified: useHttp, useApi
233
+
234
+ ## 1.0.0
235
+
236
+ ### Minor Changes
237
+
238
+ - Added: useScrolled
239
+
240
+ ## 0.2.2
241
+
242
+ ### Patch Changes
243
+
244
+ - Modified: useBreakpoint theme mediaQuery
245
+
246
+ ## 0.2.1
247
+
248
+ ### Patch Changes
249
+
250
+ - Added: source files
251
+
252
+ ## 0.2.0
253
+
254
+ ### Minor Changes
255
+
256
+ - Added: splat routes
257
+
258
+ ## 0.1.0
259
+
260
+ ### Minor Changes
261
+
262
+ - Added: @websolutespa/bom-core
263
+
264
+ ## 0.0.2
265
+
266
+ ### Patch Changes
267
+
268
+ - Added: first release
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as react from 'react';
2
2
  import react__default, { RefObject, Dispatch, SetStateAction, CSSProperties, MutableRefObject, ComponentProps, useEffect } from 'react';
3
3
  import { ApiRequestOptions } from '@websolutespa/bom-mixer-store';
4
4
  import * as _websolutespa_bom_core from '@websolutespa/bom-core';
5
- import { QueryParams, IEquatable, IFeatureType, ILabel, ILocalizable, ILayout, ILocalized, IPage } from '@websolutespa/bom-core';
5
+ import { QueryParams, IEquatable, IFeatureType, ILabel, ILocalizable, ILayout, IAppExtended, ILocalized, IPage } from '@websolutespa/bom-core';
6
6
  import * as zustand from 'zustand';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
8
  import { ILazyModules, IMetaData, StructuredDataType, OpenGraphType, TwitterCardType } from '@websolutespa/bom-mixer-models';
@@ -392,11 +392,12 @@ declare function parseLabel(dictionary: Record<string, ILocalizable | undefined>
392
392
  declare function parseParams(label: string, params: Record<string, any>): string;
393
393
 
394
394
  type ILayoutContext = ILayout;
395
- declare const useLayout: () => ILayout;
396
395
  declare function LayoutProvider({ children, layout }: {
397
396
  children?: react__default.ReactNode;
398
397
  layout: ILayout;
399
398
  }): react_jsx_runtime.JSX.Element;
399
+ type UseLayout = <T extends IAppExtended = IAppExtended>() => ILayout<T>;
400
+ declare const useLayout: UseLayout;
400
401
 
401
402
  type ILazyModulesContext = ILazyModules;
402
403
  declare const useLazyModules: () => ILazyModules;
package/dist/index.js CHANGED
@@ -248,10 +248,11 @@ var createGenericContext = (defaultContext = null) => {
248
248
 
249
249
  // src/useLayout/useLayout.tsx
250
250
  var import_jsx_runtime = require("react/jsx-runtime");
251
- var [useLayout, LayoutContextProvider] = createGenericContext();
251
+ var [useLayout_, LayoutContextProvider] = createGenericContext();
252
252
  function LayoutProvider({ children, layout }) {
253
253
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LayoutContextProvider, { value: layout, children });
254
254
  }
255
+ var useLayout = useLayout_;
255
256
 
256
257
  // src/useApi/useApi.ts
257
258
  function useApiFetch(pathname, options = {}) {
package/dist/index.mjs CHANGED
@@ -93,10 +93,11 @@ var createGenericContext = (defaultContext = null) => {
93
93
 
94
94
  // src/useLayout/useLayout.tsx
95
95
  import { jsx } from "react/jsx-runtime";
96
- var [useLayout, LayoutContextProvider] = createGenericContext();
96
+ var [useLayout_, LayoutContextProvider] = createGenericContext();
97
97
  function LayoutProvider({ children, layout }) {
98
98
  return /* @__PURE__ */ jsx(LayoutContextProvider, { value: layout, children });
99
99
  }
100
+ var useLayout = useLayout_;
100
101
 
101
102
  // src/useApi/useApi.ts
102
103
  function useApiFetch(pathname, options = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@websolutespa/bom-mixer-hooks",
3
- "version": "1.9.3",
3
+ "version": "2.0.0",
4
4
  "description": "Mixer Hooks module of the BOM Repository",
5
5
  "keywords": [
6
6
  "bom",
@@ -24,9 +24,9 @@
24
24
  },
25
25
  "dependencies": {},
26
26
  "peerDependencies": {
27
- "@websolutespa/bom-core": "*",
28
- "@websolutespa/bom-mixer-models": "*",
29
- "@websolutespa/bom-mixer-store": "*",
27
+ "@websolutespa/bom-core": "^2.0.0",
28
+ "@websolutespa/bom-mixer-models": "^2.0.0",
29
+ "@websolutespa/bom-mixer-store": "^2.0.0",
30
30
  "framer-motion": ">= 7.2.1",
31
31
  "html-to-text": "^9.0.5",
32
32
  "iron-session": ">= 8.0.3",
@@ -41,11 +41,11 @@
41
41
  "@types/react": "^18.2.75",
42
42
  "@types/react-dom": "^18.2.24",
43
43
  "@types/styled-components": "^5.1.26",
44
- "@websolutespa/bom-cli": "*",
45
- "@websolutespa/test": "*",
46
- "@websolutespa/tsconfig": "*",
44
+ "@websolutespa/bom-cli": "^2.0.0",
45
+ "@websolutespa/test": "^2.0.0",
46
+ "@websolutespa/tsconfig": "^2.0.0",
47
47
  "eslint": "^8.56.0",
48
- "eslint-config-websolute": "*",
48
+ "eslint-config-websolute": "^2.0.0",
49
49
  "npm-run-all": "^4.1.5",
50
50
  "raw-loader": "^4.0.2",
51
51
  "react": "^18.2.0",
@@ -1,10 +1,10 @@
1
- import { ILayout } from '@websolutespa/bom-core';
1
+ import { IAppExtended, ILayout } from '@websolutespa/bom-core';
2
2
  import React from 'react';
3
3
  import { createGenericContext } from '../useGenericContext/useGenericContext';
4
4
 
5
5
  export type ILayoutContext = ILayout;
6
6
 
7
- const [useLayout, LayoutContextProvider] = createGenericContext<ILayoutContext>();
7
+ const [useLayout_, LayoutContextProvider] = createGenericContext<ILayoutContext>();
8
8
 
9
9
  function LayoutProvider({ children, layout }: { children?: React.ReactNode, layout: ILayout }) {
10
10
  // console.log('LayoutProvider.context', context);
@@ -15,5 +15,12 @@ function LayoutProvider({ children, layout }: { children?: React.ReactNode, layo
15
15
  );
16
16
  }
17
17
 
18
- export { LayoutProvider, useLayout };
18
+ type UseLayout = <T extends IAppExtended = IAppExtended>() => ILayout<T>;
19
+
20
+ const useLayout:UseLayout = useLayout_ as UseLayout;
21
+
22
+ export {
23
+ LayoutProvider,
24
+ useLayout
25
+ };
19
26