@solidstarters/solid-core-ui 1.1.155 → 1.1.156

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 (164) hide show
  1. package/dist/components/ErrorBoundries/OfflineNotice.d.ts +2 -0
  2. package/dist/components/ErrorBoundries/OfflineNotice.d.ts.map +1 -0
  3. package/dist/components/ErrorBoundries/OfflineNotice.js +34 -0
  4. package/dist/components/ErrorBoundries/OfflineNotice.js.map +1 -0
  5. package/dist/components/ErrorBoundries/OnlineStatusWrapper.d.ts +2 -0
  6. package/dist/components/ErrorBoundries/OnlineStatusWrapper.d.ts.map +1 -0
  7. package/dist/components/ErrorBoundries/OnlineStatusWrapper.js +10 -0
  8. package/dist/components/ErrorBoundries/OnlineStatusWrapper.js.map +1 -0
  9. package/dist/components/ErrorBoundries/ServerError.d.ts +2 -0
  10. package/dist/components/ErrorBoundries/ServerError.d.ts.map +1 -0
  11. package/dist/components/ErrorBoundries/ServerError.js +9 -0
  12. package/dist/components/ErrorBoundries/ServerError.js.map +1 -0
  13. package/dist/components/ErrorBoundries/ServerErrorPage.d.ts +2 -0
  14. package/dist/components/ErrorBoundries/ServerErrorPage.d.ts.map +1 -0
  15. package/dist/components/ErrorBoundries/ServerErrorPage.js +11 -0
  16. package/dist/components/ErrorBoundries/ServerErrorPage.js.map +1 -0
  17. package/dist/components/ErrorBoundries/ServerMaintainanceSvg.d.ts +2 -0
  18. package/dist/components/ErrorBoundries/ServerMaintainanceSvg.d.ts.map +1 -0
  19. package/dist/components/ErrorBoundries/ServerMaintainanceSvg.js +5 -0
  20. package/dist/components/ErrorBoundries/ServerMaintainanceSvg.js.map +1 -0
  21. package/dist/components/ErrorBoundries/ServerUnreachableError.d.ts +2 -0
  22. package/dist/components/ErrorBoundries/ServerUnreachableError.d.ts.map +1 -0
  23. package/dist/components/ErrorBoundries/ServerUnreachableError.js +9 -0
  24. package/dist/components/ErrorBoundries/ServerUnreachableError.js.map +1 -0
  25. package/dist/components/ErrorBoundries/SolidGenericErrorComponent.d.ts +2 -0
  26. package/dist/components/ErrorBoundries/SolidGenericErrorComponent.d.ts.map +1 -0
  27. package/dist/components/ErrorBoundries/SolidGenericErrorComponent.js +24 -0
  28. package/dist/components/ErrorBoundries/SolidGenericErrorComponent.js.map +1 -0
  29. package/dist/components/Svg/ListViewPlaceholderSvg.d.ts +2 -0
  30. package/dist/components/Svg/ListViewPlaceholderSvg.d.ts.map +1 -0
  31. package/dist/components/Svg/ListViewPlaceholderSvg.js +5 -0
  32. package/dist/components/Svg/ListViewPlaceholderSvg.js.map +1 -0
  33. package/dist/components/core/chatter/SolidChatterMessageBox.js +1 -1
  34. package/dist/components/core/chatter/SolidChatterMessageBox.js.map +1 -1
  35. package/dist/components/core/common/SolidAccountSettings/AccountSettings.d.ts +2 -0
  36. package/dist/components/core/common/SolidAccountSettings/AccountSettings.d.ts.map +1 -0
  37. package/dist/components/core/common/SolidAccountSettings/AccountSettings.js +58 -0
  38. package/dist/components/core/common/SolidAccountSettings/AccountSettings.js.map +1 -0
  39. package/dist/components/core/common/SolidAccountSettings/SolidPersnoalInfo.d.ts +2 -0
  40. package/dist/components/core/common/SolidAccountSettings/SolidPersnoalInfo.d.ts.map +1 -0
  41. package/dist/components/core/common/SolidAccountSettings/SolidPersnoalInfo.js +240 -0
  42. package/dist/components/core/common/SolidAccountSettings/SolidPersnoalInfo.js.map +1 -0
  43. package/dist/components/core/common/SolidConfigureLayoutElement.d.ts +2 -0
  44. package/dist/components/core/common/SolidConfigureLayoutElement.d.ts.map +1 -0
  45. package/dist/components/core/common/SolidConfigureLayoutElement.js +77 -0
  46. package/dist/components/core/common/SolidConfigureLayoutElement.js.map +1 -0
  47. package/dist/components/core/common/SolidGenericImport/ImportWrapper.d.ts +2 -0
  48. package/dist/components/core/common/SolidGenericImport/ImportWrapper.d.ts.map +1 -0
  49. package/dist/components/core/common/SolidGenericImport/ImportWrapper.js +17 -0
  50. package/dist/components/core/common/SolidGenericImport/ImportWrapper.js.map +1 -0
  51. package/dist/components/core/common/SolidGenericImport/temp.css +32 -0
  52. package/dist/components/core/dashboard/SolidQuestionWrapper.d.ts +2 -0
  53. package/dist/components/core/dashboard/SolidQuestionWrapper.d.ts.map +1 -0
  54. package/dist/components/core/dashboard/SolidQuestionWrapper.js +5 -0
  55. package/dist/components/core/dashboard/SolidQuestionWrapper.js.map +1 -0
  56. package/dist/components/core/dashboard/chart-renderers/BarChartRenderer.js +1 -1
  57. package/dist/components/core/dashboard/chart-renderers/BarChartRenderer.js.map +1 -1
  58. package/dist/components/core/dashboard/chart-renderers/LineChartRenderer.js +1 -1
  59. package/dist/components/core/dashboard/chart-renderers/LineChartRenderer.js.map +1 -1
  60. package/dist/components/core/dashboard/chart-renderers/PieChartRenderer.js +1 -1
  61. package/dist/components/core/dashboard/chart-renderers/PieChartRenderer.js.map +1 -1
  62. package/dist/components/core/dashboard/chart-renderers/PrimeReactMeterGroupRenderer.d.ts.map +1 -1
  63. package/dist/components/core/dashboard/chart-renderers/PrimeReactMeterGroupRenderer.js +2 -1
  64. package/dist/components/core/dashboard/chart-renderers/PrimeReactMeterGroupRenderer.js.map +1 -1
  65. package/dist/components/core/extension/solid-core/modelMetadata/list/deleteModelRowAction.module.css +25 -0
  66. package/dist/components/core/form/SolidFormViewShimmerLoading.module.css +4 -0
  67. package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyAutocompleteWidget.d.ts +3 -0
  68. package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyAutocompleteWidget.d.ts.map +1 -0
  69. package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyAutocompleteWidget.js +38 -0
  70. package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyAutocompleteWidget.js.map +1 -0
  71. package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyCheckboxWidget.d.ts +3 -0
  72. package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyCheckboxWidget.d.ts.map +1 -0
  73. package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyCheckboxWidget.js +48 -0
  74. package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyCheckboxWidget.js.map +1 -0
  75. package/dist/components/core/form/fields/widgets/SolidBooleanCheckboxFieldWidget.d.ts +3 -0
  76. package/dist/components/core/form/fields/widgets/SolidBooleanCheckboxFieldWidget.d.ts.map +1 -0
  77. package/dist/components/core/form/fields/widgets/SolidBooleanCheckboxFieldWidget.js +57 -0
  78. package/dist/components/core/form/fields/widgets/SolidBooleanCheckboxFieldWidget.js.map +1 -0
  79. package/dist/components/core/form/fields/widgets/SolidBooleanSelectFieldWidget.d.ts +3 -0
  80. package/dist/components/core/form/fields/widgets/SolidBooleanSelectFieldWidget.d.ts.map +1 -0
  81. package/dist/components/core/form/fields/widgets/SolidBooleanSelectFieldWidget.js +30 -0
  82. package/dist/components/core/form/fields/widgets/SolidBooleanSelectFieldWidget.js.map +1 -0
  83. package/dist/components/core/form/fields/widgets/SolidFormFieldJsonViewModeWidget.d.ts +2 -0
  84. package/dist/components/core/form/fields/widgets/SolidFormFieldJsonViewModeWidget.d.ts.map +1 -0
  85. package/dist/components/core/form/fields/widgets/SolidFormFieldJsonViewModeWidget.js +9 -0
  86. package/dist/components/core/form/fields/widgets/SolidFormFieldJsonViewModeWidget.js.map +1 -0
  87. package/dist/components/core/form/fields/widgets/SolidFormFieldMediaViewModeWidget.d.ts +2 -0
  88. package/dist/components/core/form/fields/widgets/SolidFormFieldMediaViewModeWidget.d.ts.map +1 -0
  89. package/dist/components/core/form/fields/widgets/SolidFormFieldMediaViewModeWidget.js +8 -0
  90. package/dist/components/core/form/fields/widgets/SolidFormFieldMediaViewModeWidget.js.map +1 -0
  91. package/dist/components/core/form/fields/widgets/SolidFormFieldPasswordViewModeWidget.d.ts +2 -0
  92. package/dist/components/core/form/fields/widgets/SolidFormFieldPasswordViewModeWidget.d.ts.map +1 -0
  93. package/dist/components/core/form/fields/widgets/SolidFormFieldPasswordViewModeWidget.js +9 -0
  94. package/dist/components/core/form/fields/widgets/SolidFormFieldPasswordViewModeWidget.js.map +1 -0
  95. package/dist/components/core/form/fields/widgets/SolidFormFieldRelationViewModeWidget.d.ts +2 -0
  96. package/dist/components/core/form/fields/widgets/SolidFormFieldRelationViewModeWidget.d.ts.map +1 -0
  97. package/dist/components/core/form/fields/widgets/SolidFormFieldRelationViewModeWidget.js +20 -0
  98. package/dist/components/core/form/fields/widgets/SolidFormFieldRelationViewModeWidget.js.map +1 -0
  99. package/dist/components/core/form/fields/widgets/SolidFormFieldRichTextViewModeWidget.d.ts +2 -0
  100. package/dist/components/core/form/fields/widgets/SolidFormFieldRichTextViewModeWidget.d.ts.map +1 -0
  101. package/dist/components/core/form/fields/widgets/SolidFormFieldRichTextViewModeWidget.js +7 -0
  102. package/dist/components/core/form/fields/widgets/SolidFormFieldRichTextViewModeWidget.js.map +1 -0
  103. package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultiple.d.ts +3 -0
  104. package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultiple.d.ts.map +1 -0
  105. package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultiple.js +74 -0
  106. package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultiple.js.map +1 -0
  107. package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultipleWidget.d.ts +3 -0
  108. package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultipleWidget.d.ts.map +1 -0
  109. package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultipleWidget.js +90 -0
  110. package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultipleWidget.js.map +1 -0
  111. package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaSingleWidget.d.ts +3 -0
  112. package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaSingleWidget.d.ts.map +1 -0
  113. package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaSingleWidget.js +74 -0
  114. package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaSingleWidget.js.map +1 -0
  115. package/dist/components/core/form/fields/widgets/SolidFormFieldViewModeWidget.d.ts +2 -0
  116. package/dist/components/core/form/fields/widgets/SolidFormFieldViewModeWidget.d.ts.map +1 -0
  117. package/dist/components/core/form/fields/widgets/SolidFormFieldViewModeWidget.js +6 -0
  118. package/dist/components/core/form/fields/widgets/SolidFormFieldViewModeWidget.js.map +1 -0
  119. package/dist/components/core/form/fields/widgets/SolidIconWidget.d.ts +3 -0
  120. package/dist/components/core/form/fields/widgets/SolidIconWidget.d.ts.map +1 -0
  121. package/dist/components/core/form/fields/widgets/SolidIconWidget.js +93 -0
  122. package/dist/components/core/form/fields/widgets/SolidIconWidget.js.map +1 -0
  123. package/dist/components/core/form/fields/widgets/SolidSelectionStaticAutocompleteFieldWidget.d.ts +3 -0
  124. package/dist/components/core/form/fields/widgets/SolidSelectionStaticAutocompleteFieldWidget.d.ts.map +1 -0
  125. package/dist/components/core/form/fields/widgets/SolidSelectionStaticAutocompleteFieldWidget.js +50 -0
  126. package/dist/components/core/form/fields/widgets/SolidSelectionStaticAutocompleteFieldWidget.js.map +1 -0
  127. package/dist/components/core/form/fields/widgets/SolidSelectionStaticRadioFieldWidget.d.ts +3 -0
  128. package/dist/components/core/form/fields/widgets/SolidSelectionStaticRadioFieldWidget.d.ts.map +1 -0
  129. package/dist/components/core/form/fields/widgets/SolidSelectionStaticRadioFieldWidget.js +34 -0
  130. package/dist/components/core/form/fields/widgets/SolidSelectionStaticRadioFieldWidget.js.map +1 -0
  131. package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.d.ts +2 -0
  132. package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.d.ts.map +1 -0
  133. package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.js +7 -0
  134. package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.js.map +1 -0
  135. package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.d.ts +2 -0
  136. package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.d.ts.map +1 -0
  137. package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.js +7 -0
  138. package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.js.map +1 -0
  139. package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.d.ts +2 -0
  140. package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.d.ts.map +1 -0
  141. package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.js +35 -0
  142. package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.js.map +1 -0
  143. package/dist/helpers/useOfflineStatus.d.ts +2 -0
  144. package/dist/helpers/useOfflineStatus.d.ts.map +1 -0
  145. package/dist/helpers/useOfflineStatus.js +17 -0
  146. package/dist/helpers/useOfflineStatus.js.map +1 -0
  147. package/dist/resources/images/Navigation/SolidSettingsIcon.png +0 -0
  148. package/dist/resources/images/SS-Logo-1 1.png +0 -0
  149. package/dist/resources/solid.css +2983 -0
  150. package/dist/resources/themes/solid-light-purple/theme copy.css +6129 -0
  151. package/next-env.d.ts +5 -0
  152. package/package.json +1 -1
  153. package/dist/components/core/dashboard/SolidDashboardVariableFilterDialog.d.ts +0 -10
  154. package/dist/components/core/dashboard/SolidDashboardVariableFilterDialog.d.ts.map +0 -1
  155. package/dist/components/core/dashboard/SolidDashboardVariableFilterDialog.js +0 -14
  156. package/dist/components/core/dashboard/SolidDashboardVariableFilterDialog.js.map +0 -1
  157. package/dist/components/core/extension/solid-core/question/BarChartWidget.d.ts +0 -4
  158. package/dist/components/core/extension/solid-core/question/BarChartWidget.d.ts.map +0 -1
  159. package/dist/components/core/extension/solid-core/question/BarChartWidget.js +0 -19
  160. package/dist/components/core/extension/solid-core/question/BarChartWidget.js.map +0 -1
  161. package/dist/components/core/extension/solid-core/question/ChartWidget.d.ts +0 -4
  162. package/dist/components/core/extension/solid-core/question/ChartWidget.d.ts.map +0 -1
  163. package/dist/components/core/extension/solid-core/question/ChartWidget.js +0 -25
  164. package/dist/components/core/extension/solid-core/question/ChartWidget.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SolidShortTextFieldTextRenderModeWidget copy.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,uCAAuC,6BAA8B,GAAG,4CAOpF,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import SolidTableRowCell from "../SolidTableRowCell";
3
+ export var SolidShortTextFieldTextRenderModeWidget = function (_a) {
4
+ var value = _a.value, truncateAfter = _a.truncateAfter;
5
+ return (_jsx(SolidTableRowCell, { value: value, truncateAfter: truncateAfter }));
6
+ };
7
+ //# sourceMappingURL=SolidShortTextFieldTextRenderModeWidget%20copy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SolidShortTextFieldTextRenderModeWidget copy.js","sourceRoot":"","sources":["../../../../../src/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.tsx"],"names":[],"mappings":";AAAA,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAErD,MAAM,CAAC,IAAM,uCAAuC,GAAG,UAAC,EAA6B;QAA3B,KAAK,WAAA,EAAE,aAAa,mBAAA;IAC1E,OAAO,CACH,KAAC,iBAAiB,IACd,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,GACX,CACxB,CAAA;AACL,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const SolidShortTextFieldTextRenderModeWidget: ({ value, truncateAfter }: any) => import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=SolidShortTextFieldTextRenderModeWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SolidShortTextFieldTextRenderModeWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,uCAAuC,6BAA8B,GAAG,4CAOpF,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import SolidTableRowCell from "../SolidTableRowCell";
3
+ export var SolidShortTextFieldTextRenderModeWidget = function (_a) {
4
+ var value = _a.value, truncateAfter = _a.truncateAfter;
5
+ return (_jsx(SolidTableRowCell, { value: value, truncateAfter: truncateAfter }));
6
+ };
7
+ //# sourceMappingURL=SolidShortTextFieldTextRenderModeWidget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SolidShortTextFieldTextRenderModeWidget.js","sourceRoot":"","sources":["../../../../../src/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAErD,MAAM,CAAC,IAAM,uCAAuC,GAAG,UAAC,EAA6B;QAA3B,KAAK,WAAA,EAAE,aAAa,mBAAA;IAC1E,OAAO,CACH,KAAC,iBAAiB,IACd,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,GACX,CACxB,CAAA;AACL,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const SolidUserNameAvatarWidget: ({ value }: any) => import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=SolidUserNameAvatarWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SolidUserNameAvatarWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/list/widgets/SolidUserNameAvatarWidget.tsx"],"names":[],"mappings":"AACA,eAAO,MAAM,yBAAyB,cAAe,GAAG,4CAgDvD,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export var SolidUserNameAvatarWidget = function (_a) {
3
+ // use "widget": "SolidUserNameAvatarWidget" in the list view field
4
+ var value = _a.value;
5
+ var getInitials = function (fullName) {
6
+ var names = fullName.trim().split(' ');
7
+ var initials = names.length === 1
8
+ ? names[0][0]
9
+ : names[0][0] + names[names.length - 1][0];
10
+ return initials.toUpperCase();
11
+ };
12
+ var getColorFromInitials = function (initials) {
13
+ var hash = 0;
14
+ for (var i = 0; i < initials.length; i++) {
15
+ hash = initials.charCodeAt(i) + ((hash << 5) - hash);
16
+ }
17
+ var hue = Math.abs(hash) % 360;
18
+ return "hsl(".concat(hue, ", 60%, 60%)"); // nice pastel color
19
+ };
20
+ var initials = getInitials(value);
21
+ var bgColor = getColorFromInitials(initials);
22
+ return (_jsx("div", { className: "solid-table-row", children: _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '0.5rem' }, children: [_jsx("div", { style: {
23
+ width: 25,
24
+ height: 25,
25
+ borderRadius: '50%',
26
+ backgroundColor: bgColor,
27
+ color: 'white',
28
+ display: 'flex',
29
+ alignItems: 'center',
30
+ justifyContent: 'center',
31
+ fontWeight: 600,
32
+ fontSize: 25 * 0.4,
33
+ }, children: initials }), _jsx("span", { children: value })] }) }));
34
+ };
35
+ //# sourceMappingURL=SolidUserNameAvatarWidget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SolidUserNameAvatarWidget.js","sourceRoot":"","sources":["../../../../../src/components/core/list/widgets/SolidUserNameAvatarWidget.tsx"],"names":[],"mappings":";AACA,MAAM,CAAC,IAAM,yBAAyB,GAAG,UAAC,EAAc;IAEpD,oEAAoE;QAF5B,KAAK,WAAA;IAI7C,IAAM,WAAW,GAAG,UAAC,QAAgB;QACjC,IAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACzC,IAAM,QAAQ,GACV,KAAK,CAAC,MAAM,KAAK,CAAC;YACd,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACb,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACnD,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC,CAAC;IAEF,IAAM,oBAAoB,GAAG,UAAC,QAAgB;QAC1C,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACtC,IAAI,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;SACxD;QACD,IAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;QACjC,OAAO,cAAO,GAAG,gBAAa,CAAC,CAAC,oBAAoB;IACxD,CAAC,CAAC;IAEF,IAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IACpC,IAAM,OAAO,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAE/C,OAAO,CACH,cAAK,SAAS,EAAC,iBAAiB,YAC5B,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,aAChE,cACI,KAAK,EAAE;wBACH,KAAK,EAAE,EAAE;wBACT,MAAM,EAAE,EAAE;wBACV,YAAY,EAAE,KAAK;wBACnB,eAAe,EAAE,OAAO;wBACxB,KAAK,EAAE,OAAO;wBACd,OAAO,EAAE,MAAM;wBACf,UAAU,EAAE,QAAQ;wBACpB,cAAc,EAAE,QAAQ;wBACxB,UAAU,EAAE,GAAG;wBACf,QAAQ,EAAE,EAAE,GAAG,GAAG;qBACrB,YAEA,QAAQ,GACP,EACN,yBAAO,KAAK,GAAQ,IAClB,GACJ,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default function useOfflineStatus(): boolean;
2
+ //# sourceMappingURL=useOfflineStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOfflineStatus.d.ts","sourceRoot":"","sources":["../../src/helpers/useOfflineStatus.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,gBAAgB,YAmBvC"}
@@ -0,0 +1,17 @@
1
+ import { useEffect, useState } from 'react';
2
+ export default function useOfflineStatus() {
3
+ var _a = useState(false), isOffline = _a[0], setIsOffline = _a[1];
4
+ useEffect(function () {
5
+ var handleOnline = function () { return setIsOffline(false); };
6
+ var handleOffline = function () { return setIsOffline(true); };
7
+ setIsOffline(!navigator.onLine); // Initial check
8
+ window.addEventListener('online', handleOnline);
9
+ window.addEventListener('offline', handleOffline);
10
+ return function () {
11
+ window.removeEventListener('online', handleOnline);
12
+ window.removeEventListener('offline', handleOffline);
13
+ };
14
+ }, []);
15
+ return isOffline;
16
+ }
17
+ //# sourceMappingURL=useOfflineStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOfflineStatus.js","sourceRoot":"","sources":["../../src/helpers/useOfflineStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,CAAC,OAAO,UAAU,gBAAgB;IAChC,IAAA,KAA4B,QAAQ,CAAC,KAAK,CAAC,EAA1C,SAAS,QAAA,EAAE,YAAY,QAAmB,CAAC;IAElD,SAAS,CAAC;QACR,IAAM,YAAY,GAAG,cAAM,OAAA,YAAY,CAAC,KAAK,CAAC,EAAnB,CAAmB,CAAC;QAC/C,IAAM,aAAa,GAAG,cAAM,OAAA,YAAY,CAAC,IAAI,CAAC,EAAlB,CAAkB,CAAC;QAE/C,YAAY,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB;QAEjD,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAChD,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QAElD,OAAO;YACL,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;YACnD,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QACvD,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,SAAS,CAAC;AACnB,CAAC"}