@elice/material-shared-utils 1.260128.0-rc.0 → 1.260129.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.
Files changed (46) hide show
  1. package/cjs/hooks/useHelpyLogo.js +2 -2
  2. package/es/hooks/useCallbackProp.js +3 -3
  3. package/es/hooks/useDeepClonedCompareEffect.js +2 -2
  4. package/es/hooks/useHelpyLogo.js +1 -1
  5. package/es/material-config/MaterialConfigProvider.js +5 -5
  6. package/package.json +5 -3
  7. package/cjs/_virtual/index.js +0 -5
  8. package/cjs/_virtual/use-sync-external-store-shim.production.js +0 -5
  9. package/cjs/node_modules/@tanstack/query-core/build/lib/focusManager.js +0 -93
  10. package/cjs/node_modules/@tanstack/query-core/build/lib/notifyManager.js +0 -101
  11. package/cjs/node_modules/@tanstack/query-core/build/lib/onlineManager.js +0 -95
  12. package/cjs/node_modules/@tanstack/query-core/build/lib/queryObserver.js +0 -571
  13. package/cjs/node_modules/@tanstack/query-core/build/lib/retryer.js +0 -21
  14. package/cjs/node_modules/@tanstack/query-core/build/lib/subscribable.js +0 -33
  15. package/cjs/node_modules/@tanstack/query-core/build/lib/utils.js +0 -154
  16. package/cjs/node_modules/@tanstack/react-query/build/lib/QueryClientProvider.js +0 -65
  17. package/cjs/node_modules/@tanstack/react-query/build/lib/QueryErrorResetBoundary.js +0 -46
  18. package/cjs/node_modules/@tanstack/react-query/build/lib/errorBoundaryUtils.js +0 -52
  19. package/cjs/node_modules/@tanstack/react-query/build/lib/isRestoring.js +0 -31
  20. package/cjs/node_modules/@tanstack/react-query/build/lib/suspense.js +0 -39
  21. package/cjs/node_modules/@tanstack/react-query/build/lib/useBaseQuery.js +0 -94
  22. package/cjs/node_modules/@tanstack/react-query/build/lib/useQuery.js +0 -14
  23. package/cjs/node_modules/@tanstack/react-query/build/lib/useSyncExternalStore.js +0 -9
  24. package/cjs/node_modules/@tanstack/react-query/build/lib/utils.js +0 -12
  25. package/cjs/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -77
  26. package/cjs/node_modules/use-sync-external-store/shim/index.js +0 -13
  27. package/es/_virtual/index.js +0 -3
  28. package/es/_virtual/use-sync-external-store-shim.production.js +0 -3
  29. package/es/node_modules/@tanstack/query-core/build/lib/focusManager.js +0 -90
  30. package/es/node_modules/@tanstack/query-core/build/lib/notifyManager.js +0 -98
  31. package/es/node_modules/@tanstack/query-core/build/lib/onlineManager.js +0 -92
  32. package/es/node_modules/@tanstack/query-core/build/lib/queryObserver.js +0 -569
  33. package/es/node_modules/@tanstack/query-core/build/lib/retryer.js +0 -17
  34. package/es/node_modules/@tanstack/query-core/build/lib/subscribable.js +0 -31
  35. package/es/node_modules/@tanstack/query-core/build/lib/utils.js +0 -140
  36. package/es/node_modules/@tanstack/react-query/build/lib/QueryClientProvider.js +0 -42
  37. package/es/node_modules/@tanstack/react-query/build/lib/QueryErrorResetBoundary.js +0 -24
  38. package/es/node_modules/@tanstack/react-query/build/lib/errorBoundaryUtils.js +0 -28
  39. package/es/node_modules/@tanstack/react-query/build/lib/isRestoring.js +0 -9
  40. package/es/node_modules/@tanstack/react-query/build/lib/suspense.js +0 -34
  41. package/es/node_modules/@tanstack/react-query/build/lib/useBaseQuery.js +0 -72
  42. package/es/node_modules/@tanstack/react-query/build/lib/useQuery.js +0 -12
  43. package/es/node_modules/@tanstack/react-query/build/lib/useSyncExternalStore.js +0 -7
  44. package/es/node_modules/@tanstack/react-query/build/lib/utils.js +0 -10
  45. package/es/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -69
  46. package/es/node_modules/use-sync-external-store/shim/index.js +0 -11
@@ -1,90 +0,0 @@
1
- import { Subscribable } from './subscribable.js';
2
- import { isServer } from './utils.js';
3
-
4
- class FocusManager extends Subscribable {
5
- constructor() {
6
- super();
7
-
8
- this.setup = onFocus => {
9
- // addEventListener does not exist in React Native, but window does
10
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
11
- if (!isServer && window.addEventListener) {
12
- const listener = () => onFocus(); // Listen to visibillitychange and focus
13
-
14
-
15
- window.addEventListener('visibilitychange', listener, false);
16
- window.addEventListener('focus', listener, false);
17
- return () => {
18
- // Be sure to unsubscribe if a new handler is set
19
- window.removeEventListener('visibilitychange', listener);
20
- window.removeEventListener('focus', listener);
21
- };
22
- }
23
-
24
- return;
25
- };
26
- }
27
-
28
- onSubscribe() {
29
- if (!this.cleanup) {
30
- this.setEventListener(this.setup);
31
- }
32
- }
33
-
34
- onUnsubscribe() {
35
- if (!this.hasListeners()) {
36
- var _this$cleanup;
37
-
38
- (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);
39
- this.cleanup = undefined;
40
- }
41
- }
42
-
43
- setEventListener(setup) {
44
- var _this$cleanup2;
45
-
46
- this.setup = setup;
47
- (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);
48
- this.cleanup = setup(focused => {
49
- if (typeof focused === 'boolean') {
50
- this.setFocused(focused);
51
- } else {
52
- this.onFocus();
53
- }
54
- });
55
- }
56
-
57
- setFocused(focused) {
58
- const changed = this.focused !== focused;
59
-
60
- if (changed) {
61
- this.focused = focused;
62
- this.onFocus();
63
- }
64
- }
65
-
66
- onFocus() {
67
- this.listeners.forEach(({
68
- listener
69
- }) => {
70
- listener();
71
- });
72
- }
73
-
74
- isFocused() {
75
- if (typeof this.focused === 'boolean') {
76
- return this.focused;
77
- } // document global can be unavailable in react native
78
-
79
-
80
- if (typeof document === 'undefined') {
81
- return true;
82
- }
83
-
84
- return [undefined, 'visible', 'prerender'].includes(document.visibilityState);
85
- }
86
-
87
- }
88
- const focusManager = new FocusManager();
89
-
90
- export { FocusManager, focusManager };
@@ -1,98 +0,0 @@
1
- import { scheduleMicrotask } from './utils.js';
2
-
3
- function createNotifyManager() {
4
- let queue = [];
5
- let transactions = 0;
6
-
7
- let notifyFn = callback => {
8
- callback();
9
- };
10
-
11
- let batchNotifyFn = callback => {
12
- callback();
13
- };
14
-
15
- const batch = callback => {
16
- let result;
17
- transactions++;
18
-
19
- try {
20
- result = callback();
21
- } finally {
22
- transactions--;
23
-
24
- if (!transactions) {
25
- flush();
26
- }
27
- }
28
-
29
- return result;
30
- };
31
-
32
- const schedule = callback => {
33
- if (transactions) {
34
- queue.push(callback);
35
- } else {
36
- scheduleMicrotask(() => {
37
- notifyFn(callback);
38
- });
39
- }
40
- };
41
- /**
42
- * All calls to the wrapped function will be batched.
43
- */
44
-
45
-
46
- const batchCalls = callback => {
47
- return (...args) => {
48
- schedule(() => {
49
- callback(...args);
50
- });
51
- };
52
- };
53
-
54
- const flush = () => {
55
- const originalQueue = queue;
56
- queue = [];
57
-
58
- if (originalQueue.length) {
59
- scheduleMicrotask(() => {
60
- batchNotifyFn(() => {
61
- originalQueue.forEach(callback => {
62
- notifyFn(callback);
63
- });
64
- });
65
- });
66
- }
67
- };
68
- /**
69
- * Use this method to set a custom notify function.
70
- * This can be used to for example wrap notifications with `React.act` while running tests.
71
- */
72
-
73
-
74
- const setNotifyFunction = fn => {
75
- notifyFn = fn;
76
- };
77
- /**
78
- * Use this method to set a custom function to batch notifications together into a single tick.
79
- * By default React Query will use the batch function provided by ReactDOM or React Native.
80
- */
81
-
82
-
83
- const setBatchNotifyFunction = fn => {
84
- batchNotifyFn = fn;
85
- };
86
-
87
- return {
88
- batch,
89
- batchCalls,
90
- schedule,
91
- setNotifyFunction,
92
- setBatchNotifyFunction
93
- };
94
- } // SINGLETON
95
-
96
- const notifyManager = createNotifyManager();
97
-
98
- export { createNotifyManager, notifyManager };
@@ -1,92 +0,0 @@
1
- import { Subscribable } from './subscribable.js';
2
- import { isServer } from './utils.js';
3
-
4
- const onlineEvents = ['online', 'offline'];
5
- class OnlineManager extends Subscribable {
6
- constructor() {
7
- super();
8
-
9
- this.setup = onOnline => {
10
- // addEventListener does not exist in React Native, but window does
11
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
12
- if (!isServer && window.addEventListener) {
13
- const listener = () => onOnline(); // Listen to online
14
-
15
-
16
- onlineEvents.forEach(event => {
17
- window.addEventListener(event, listener, false);
18
- });
19
- return () => {
20
- // Be sure to unsubscribe if a new handler is set
21
- onlineEvents.forEach(event => {
22
- window.removeEventListener(event, listener);
23
- });
24
- };
25
- }
26
-
27
- return;
28
- };
29
- }
30
-
31
- onSubscribe() {
32
- if (!this.cleanup) {
33
- this.setEventListener(this.setup);
34
- }
35
- }
36
-
37
- onUnsubscribe() {
38
- if (!this.hasListeners()) {
39
- var _this$cleanup;
40
-
41
- (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);
42
- this.cleanup = undefined;
43
- }
44
- }
45
-
46
- setEventListener(setup) {
47
- var _this$cleanup2;
48
-
49
- this.setup = setup;
50
- (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);
51
- this.cleanup = setup(online => {
52
- if (typeof online === 'boolean') {
53
- this.setOnline(online);
54
- } else {
55
- this.onOnline();
56
- }
57
- });
58
- }
59
-
60
- setOnline(online) {
61
- const changed = this.online !== online;
62
-
63
- if (changed) {
64
- this.online = online;
65
- this.onOnline();
66
- }
67
- }
68
-
69
- onOnline() {
70
- this.listeners.forEach(({
71
- listener
72
- }) => {
73
- listener();
74
- });
75
- }
76
-
77
- isOnline() {
78
- if (typeof this.online === 'boolean') {
79
- return this.online;
80
- }
81
-
82
- if (typeof navigator === 'undefined' || typeof navigator.onLine === 'undefined') {
83
- return true;
84
- }
85
-
86
- return navigator.onLine;
87
- }
88
-
89
- }
90
- const onlineManager = new OnlineManager();
91
-
92
- export { OnlineManager, onlineManager };