@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.
- package/dist/components/ErrorBoundries/OfflineNotice.d.ts +2 -0
- package/dist/components/ErrorBoundries/OfflineNotice.d.ts.map +1 -0
- package/dist/components/ErrorBoundries/OfflineNotice.js +34 -0
- package/dist/components/ErrorBoundries/OfflineNotice.js.map +1 -0
- package/dist/components/ErrorBoundries/OnlineStatusWrapper.d.ts +2 -0
- package/dist/components/ErrorBoundries/OnlineStatusWrapper.d.ts.map +1 -0
- package/dist/components/ErrorBoundries/OnlineStatusWrapper.js +10 -0
- package/dist/components/ErrorBoundries/OnlineStatusWrapper.js.map +1 -0
- package/dist/components/ErrorBoundries/ServerError.d.ts +2 -0
- package/dist/components/ErrorBoundries/ServerError.d.ts.map +1 -0
- package/dist/components/ErrorBoundries/ServerError.js +9 -0
- package/dist/components/ErrorBoundries/ServerError.js.map +1 -0
- package/dist/components/ErrorBoundries/ServerErrorPage.d.ts +2 -0
- package/dist/components/ErrorBoundries/ServerErrorPage.d.ts.map +1 -0
- package/dist/components/ErrorBoundries/ServerErrorPage.js +11 -0
- package/dist/components/ErrorBoundries/ServerErrorPage.js.map +1 -0
- package/dist/components/ErrorBoundries/ServerMaintainanceSvg.d.ts +2 -0
- package/dist/components/ErrorBoundries/ServerMaintainanceSvg.d.ts.map +1 -0
- package/dist/components/ErrorBoundries/ServerMaintainanceSvg.js +5 -0
- package/dist/components/ErrorBoundries/ServerMaintainanceSvg.js.map +1 -0
- package/dist/components/ErrorBoundries/ServerUnreachableError.d.ts +2 -0
- package/dist/components/ErrorBoundries/ServerUnreachableError.d.ts.map +1 -0
- package/dist/components/ErrorBoundries/ServerUnreachableError.js +9 -0
- package/dist/components/ErrorBoundries/ServerUnreachableError.js.map +1 -0
- package/dist/components/ErrorBoundries/SolidGenericErrorComponent.d.ts +2 -0
- package/dist/components/ErrorBoundries/SolidGenericErrorComponent.d.ts.map +1 -0
- package/dist/components/ErrorBoundries/SolidGenericErrorComponent.js +24 -0
- package/dist/components/ErrorBoundries/SolidGenericErrorComponent.js.map +1 -0
- package/dist/components/Svg/ListViewPlaceholderSvg.d.ts +2 -0
- package/dist/components/Svg/ListViewPlaceholderSvg.d.ts.map +1 -0
- package/dist/components/Svg/ListViewPlaceholderSvg.js +5 -0
- package/dist/components/Svg/ListViewPlaceholderSvg.js.map +1 -0
- package/dist/components/core/chatter/SolidChatterMessageBox.js +1 -1
- package/dist/components/core/chatter/SolidChatterMessageBox.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/AccountSettings.d.ts +2 -0
- package/dist/components/core/common/SolidAccountSettings/AccountSettings.d.ts.map +1 -0
- package/dist/components/core/common/SolidAccountSettings/AccountSettings.js +58 -0
- package/dist/components/core/common/SolidAccountSettings/AccountSettings.js.map +1 -0
- package/dist/components/core/common/SolidAccountSettings/SolidPersnoalInfo.d.ts +2 -0
- package/dist/components/core/common/SolidAccountSettings/SolidPersnoalInfo.d.ts.map +1 -0
- package/dist/components/core/common/SolidAccountSettings/SolidPersnoalInfo.js +240 -0
- package/dist/components/core/common/SolidAccountSettings/SolidPersnoalInfo.js.map +1 -0
- package/dist/components/core/common/SolidConfigureLayoutElement.d.ts +2 -0
- package/dist/components/core/common/SolidConfigureLayoutElement.d.ts.map +1 -0
- package/dist/components/core/common/SolidConfigureLayoutElement.js +77 -0
- package/dist/components/core/common/SolidConfigureLayoutElement.js.map +1 -0
- package/dist/components/core/common/SolidGenericImport/ImportWrapper.d.ts +2 -0
- package/dist/components/core/common/SolidGenericImport/ImportWrapper.d.ts.map +1 -0
- package/dist/components/core/common/SolidGenericImport/ImportWrapper.js +17 -0
- package/dist/components/core/common/SolidGenericImport/ImportWrapper.js.map +1 -0
- package/dist/components/core/common/SolidGenericImport/temp.css +32 -0
- package/dist/components/core/dashboard/SolidQuestionWrapper.d.ts +2 -0
- package/dist/components/core/dashboard/SolidQuestionWrapper.d.ts.map +1 -0
- package/dist/components/core/dashboard/SolidQuestionWrapper.js +5 -0
- package/dist/components/core/dashboard/SolidQuestionWrapper.js.map +1 -0
- package/dist/components/core/dashboard/chart-renderers/BarChartRenderer.js +1 -1
- package/dist/components/core/dashboard/chart-renderers/BarChartRenderer.js.map +1 -1
- package/dist/components/core/dashboard/chart-renderers/LineChartRenderer.js +1 -1
- package/dist/components/core/dashboard/chart-renderers/LineChartRenderer.js.map +1 -1
- package/dist/components/core/dashboard/chart-renderers/PieChartRenderer.js +1 -1
- package/dist/components/core/dashboard/chart-renderers/PieChartRenderer.js.map +1 -1
- package/dist/components/core/dashboard/chart-renderers/PrimeReactMeterGroupRenderer.d.ts.map +1 -1
- package/dist/components/core/dashboard/chart-renderers/PrimeReactMeterGroupRenderer.js +2 -1
- package/dist/components/core/dashboard/chart-renderers/PrimeReactMeterGroupRenderer.js.map +1 -1
- package/dist/components/core/extension/solid-core/modelMetadata/list/deleteModelRowAction.module.css +25 -0
- package/dist/components/core/form/SolidFormViewShimmerLoading.module.css +4 -0
- package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyAutocompleteWidget.d.ts +3 -0
- package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyAutocompleteWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyAutocompleteWidget.js +38 -0
- package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyAutocompleteWidget.js.map +1 -0
- package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyCheckboxWidget.d.ts +3 -0
- package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyCheckboxWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyCheckboxWidget.js +48 -0
- package/dist/components/core/form/fields/relations/widgets/SolidRelationManyToManyCheckboxWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidBooleanCheckboxFieldWidget.d.ts +3 -0
- package/dist/components/core/form/fields/widgets/SolidBooleanCheckboxFieldWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidBooleanCheckboxFieldWidget.js +57 -0
- package/dist/components/core/form/fields/widgets/SolidBooleanCheckboxFieldWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidBooleanSelectFieldWidget.d.ts +3 -0
- package/dist/components/core/form/fields/widgets/SolidBooleanSelectFieldWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidBooleanSelectFieldWidget.js +30 -0
- package/dist/components/core/form/fields/widgets/SolidBooleanSelectFieldWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldJsonViewModeWidget.d.ts +2 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldJsonViewModeWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldJsonViewModeWidget.js +9 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldJsonViewModeWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldMediaViewModeWidget.d.ts +2 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldMediaViewModeWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldMediaViewModeWidget.js +8 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldMediaViewModeWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldPasswordViewModeWidget.d.ts +2 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldPasswordViewModeWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldPasswordViewModeWidget.js +9 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldPasswordViewModeWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldRelationViewModeWidget.d.ts +2 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldRelationViewModeWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldRelationViewModeWidget.js +20 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldRelationViewModeWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldRichTextViewModeWidget.d.ts +2 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldRichTextViewModeWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldRichTextViewModeWidget.js +7 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldRichTextViewModeWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultiple.d.ts +3 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultiple.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultiple.js +74 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultiple.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultipleWidget.d.ts +3 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultipleWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultipleWidget.js +90 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaMultipleWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaSingleWidget.d.ts +3 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaSingleWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaSingleWidget.js +74 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewMediaSingleWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewModeWidget.d.ts +2 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewModeWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewModeWidget.js +6 -0
- package/dist/components/core/form/fields/widgets/SolidFormFieldViewModeWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidIconWidget.d.ts +3 -0
- package/dist/components/core/form/fields/widgets/SolidIconWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidIconWidget.js +93 -0
- package/dist/components/core/form/fields/widgets/SolidIconWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidSelectionStaticAutocompleteFieldWidget.d.ts +3 -0
- package/dist/components/core/form/fields/widgets/SolidSelectionStaticAutocompleteFieldWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidSelectionStaticAutocompleteFieldWidget.js +50 -0
- package/dist/components/core/form/fields/widgets/SolidSelectionStaticAutocompleteFieldWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidSelectionStaticRadioFieldWidget.d.ts +3 -0
- package/dist/components/core/form/fields/widgets/SolidSelectionStaticRadioFieldWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidSelectionStaticRadioFieldWidget.js +34 -0
- package/dist/components/core/form/fields/widgets/SolidSelectionStaticRadioFieldWidget.js.map +1 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.d.ts +2 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.js +7 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.js.map +1 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.d.ts +2 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.js +7 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.js.map +1 -0
- package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.d.ts +2 -0
- package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.js +35 -0
- package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.js.map +1 -0
- package/dist/helpers/useOfflineStatus.d.ts +2 -0
- package/dist/helpers/useOfflineStatus.d.ts.map +1 -0
- package/dist/helpers/useOfflineStatus.js +17 -0
- package/dist/helpers/useOfflineStatus.js.map +1 -0
- package/dist/resources/images/Navigation/SolidSettingsIcon.png +0 -0
- package/dist/resources/images/SS-Logo-1 1.png +0 -0
- package/dist/resources/solid.css +2983 -0
- package/dist/resources/themes/solid-light-purple/theme copy.css +6129 -0
- package/next-env.d.ts +5 -0
- package/package.json +1 -1
- package/dist/components/core/dashboard/SolidDashboardVariableFilterDialog.d.ts +0 -10
- package/dist/components/core/dashboard/SolidDashboardVariableFilterDialog.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardVariableFilterDialog.js +0 -14
- package/dist/components/core/dashboard/SolidDashboardVariableFilterDialog.js.map +0 -1
- package/dist/components/core/extension/solid-core/question/BarChartWidget.d.ts +0 -4
- package/dist/components/core/extension/solid-core/question/BarChartWidget.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/question/BarChartWidget.js +0 -19
- package/dist/components/core/extension/solid-core/question/BarChartWidget.js.map +0 -1
- package/dist/components/core/extension/solid-core/question/ChartWidget.d.ts +0 -4
- package/dist/components/core/extension/solid-core/question/ChartWidget.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/question/ChartWidget.js +0 -25
- package/dist/components/core/extension/solid-core/question/ChartWidget.js.map +0 -1
package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.d.ts.map
ADDED
|
@@ -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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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"}
|
|
Binary file
|
|
Binary file
|