@comet/admin 9.0.0-beta.3 → 9.0.0-beta.5
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/lib/common/DeleteDialog.d.ts +1 -0
- package/lib/common/DeleteDialog.d.ts.map +1 -1
- package/lib/common/DeleteDialog.js +8 -1
- package/lib/common/__stories__/Tooltip.stories.js +404 -0
- package/lib/common/buttons/__stories__/Button.stories.js +445 -0
- package/lib/common/buttons/clearinput/ClearInputButton.js +1 -1
- package/lib/common/buttons/delete/__stories__/DeleteButton.stories.js +1 -1
- package/lib/common/toolbar/__stories__/DataGridToolbar.stories.js +76 -0
- package/lib/common/toolbar/__stories__/Toolbar.stories.js +82 -0
- package/lib/dataGrid/__stories__/ClickableRows.stories.js +109 -0
- package/lib/dataGrid/__stories__/CrudMoreActionsMenu.stories.js +50 -0
- package/lib/dataGrid/__stories__/DataGrid.stories.js +94 -0
- package/lib/dataGrid/__stories__/DataGridSingleSelectFilter.stories.js +492 -0
- package/lib/error/errorHandler/ErrorHandlerProvider.d.ts +8 -0
- package/lib/error/errorHandler/ErrorHandlerProvider.d.ts.map +1 -0
- package/lib/error/errorHandler/ErrorHandlerProvider.js +16 -0
- package/lib/error/errorboundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/error/errorboundary/ErrorBoundary.js +26 -18
- package/lib/form/FinalFormInput.d.ts.map +1 -1
- package/lib/form/FinalFormInput.js +3 -2
- package/lib/form/__stories__/AsyncAutocompleteField.stories.js +660 -0
- package/lib/form/__stories__/AsyncSelectField.stories.js +513 -0
- package/lib/form/__stories__/Autocomplete.stories.js +188 -0
- package/lib/form/__stories__/AutocompleteField.stories.js +48 -0
- package/lib/form/__stories__/Checkbox.stories.js +70 -0
- package/lib/form/__stories__/CheckboxField.stories.js +87 -0
- package/lib/form/__stories__/CheckboxListField.stories.js +172 -0
- package/lib/form/__stories__/CustomButtons.stories.js +78 -0
- package/lib/form/__stories__/DependentAsyncSelects.stories.js +91 -0
- package/lib/form/__stories__/DisableAutoNavigation.stories.js +132 -0
- package/lib/form/__stories__/DisabledSubmitIfNotDirty.stories.js +54 -0
- package/lib/form/__stories__/FieldContainer.stories.js +87 -0
- package/lib/form/__stories__/FinalFormFileSelect.stories.js +155 -0
- package/lib/form/__stories__/FormInStack.stories.js +133 -0
- package/lib/form/__stories__/FormLayouts.stories.js +174 -0
- package/lib/form/__stories__/FormValidation.stories.js +82 -0
- package/lib/form/__stories__/Input.stories.js +37 -0
- package/lib/form/__stories__/NumberField.stories.js +38 -0
- package/lib/form/__stories__/Radio.stories.js +101 -0
- package/lib/form/__stories__/RadioGroupField.stories.js +172 -0
- package/lib/form/__stories__/RangeInput.stories.js +239 -0
- package/lib/form/__stories__/RouterTabs.stories.js +96 -0
- package/lib/form/__stories__/RouterTabsInForm.stories.js +73 -0
- package/lib/form/__stories__/RouterTabsInFormWithSubroutes.stories.js +96 -0
- package/lib/form/__stories__/ScrollToErrorField.stories.js +82 -0
- package/lib/form/__stories__/SearchField.stories.js +38 -0
- package/lib/form/__stories__/Select.stories.js +187 -0
- package/lib/form/__stories__/SelectField.stories.js +100 -0
- package/lib/form/__stories__/ShowErrorStrategies.stories.js +107 -0
- package/lib/form/__stories__/SingleTextField.stories.js +108 -0
- package/lib/form/__stories__/StackInForm.stories.js +53 -0
- package/lib/form/__stories__/SubmitErrors.stories.js +90 -0
- package/lib/form/__stories__/Switch.stories.js +49 -0
- package/lib/form/__stories__/SwitchField.stories.js +87 -0
- package/lib/form/__stories__/Tabs.stories.js +78 -0
- package/lib/form/__stories__/TextAreaField.stories.js +38 -0
- package/lib/form/__stories__/TextField.stories.js +67 -0
- package/lib/form/__stories__/ToggleButtonGroupField.stories.js +312 -0
- package/lib/form/__stories__/TwoLevelValidation.stories.js +168 -0
- package/lib/form/__stories__/Typography.stories.js +71 -0
- package/lib/form/file/__stories__/FileDropzone.stories.js +81 -0
- package/lib/form/file/__stories__/FileSelect.stories.js +139 -0
- package/lib/form/file/__stories__/FileSelectListItem.stories.js +108 -0
- package/lib/form/file/__stories__/FileSelectMultipleExamples.stories.js +187 -0
- package/lib/helpers/useTopOffset.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/section/__stories__/SectionHeadline.stories.js +71 -0
- package/lib/stack/Stack.d.ts.map +1 -1
- package/lib/stack/Stack.js +3 -0
- package/lib/stack/__stories__/RouterTabsNestedStack.stories.js +51 -0
- package/lib/stack/__stories__/Stack.stories.js +14 -0
- package/lib/stack/__stories__/StackBackButton.stories.js +50 -0
- package/lib/stack/__stories__/StackBreadcrumbs.stories.js +139 -0
- package/lib/stack/__stories__/StackBreadcrumbsTabs.stories.js +47 -0
- package/lib/stack/__stories__/StackCustomSeparator.stories.js +47 -0
- package/lib/stack/__stories__/StackLink.stories.js +41 -0
- package/lib/stack/__stories__/StackNested.stories.js +58 -0
- package/lib/stack/__stories__/StackNestedOnInitialPage.stories.js +78 -0
- package/lib/stack/__stories__/StackNestedOneStack.stories.js +90 -0
- package/lib/stack/__stories__/StackPageTitle.stories.js +121 -0
- package/lib/stack/__stories__/StackReactNodeTitle.stories.js +54 -0
- package/lib/stack/__stories__/StackRefApi.stories.js +56 -0
- package/lib/stack/__stories__/StackTableFormQueryAtStack.stories.js +155 -0
- package/lib/stack/__stories__/StackTableFormQueryInTable.stories.js +160 -0
- package/lib/stack/__stories__/StackUrl.stories.js +66 -0
- package/lib/tabs/__stories__/DynamicTabs.stories.js +84 -0
- package/lib/tabs/__stories__/NestedStackSwitchWithRouterTabs.stories.js +84 -0
- package/lib/tabs/__stories__/OverflowIssues.stories.js +224 -0
- package/lib/tabs/__stories__/RouterTabs.stories.js +31 -0
- package/lib/tabs/__stories__/RouterTabsInStack.stories.js +74 -0
- package/lib/tabs/__stories__/RouterTabsInSubroute.stories.js +68 -0
- package/lib/tabs/__stories__/Tabs.stories.js +219 -0
- package/lib/theme/componentsTheme/MuiDataGrid.js +1 -1
- package/lib/translator/ContentTranslationServiceContext.d.ts +1 -0
- package/lib/translator/ContentTranslationServiceContext.d.ts.map +1 -1
- package/lib/translator/ContentTranslationServiceProvider.d.ts +1 -1
- package/lib/translator/ContentTranslationServiceProvider.d.ts.map +1 -1
- package/lib/translator/ContentTranslationServiceProvider.js +4 -2
- package/lib/translator/PlainTextTranslationDialog.d.ts +1 -0
- package/lib/translator/PlainTextTranslationDialog.d.ts.map +1 -1
- package/lib/translator/PlainTextTranslationDialog.js +8 -3
- package/lib/translator/__stories__/ContentTranslation.stories.js +104 -0
- package/package.json +23 -24
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
+
import { MainContent, RouterTab, RouterTabs, Toolbar, ToolbarAutomaticTitleItem } from "@comet/admin";
|
|
8
|
+
import { Box, Tab, Tabs, Typography } from "@mui/material";
|
|
9
|
+
import { useState } from "react";
|
|
10
|
+
import { MasterLayoutDecorator } from "../../../.storybook/decorators/MasterLayout.decorator";
|
|
11
|
+
|
|
12
|
+
// Make sure the story is not too tall and can be scrolled - setting the story-height in the config only affects the min-height and does not make the content scrollable
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
var MaxHeightDecorator = function MaxHeightDecorator(Story) {
|
|
15
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
16
|
+
maxHeight: "400px",
|
|
17
|
+
children: /*#__PURE__*/_jsx(Story, {})
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
var storyConfig = {
|
|
21
|
+
title: "components/tabs/Overflow Issues",
|
|
22
|
+
decorators: [MaxHeightDecorator],
|
|
23
|
+
parameters: {
|
|
24
|
+
docs: {
|
|
25
|
+
description: {
|
|
26
|
+
component: "This story is for debugging an issue where using certain content inside MasterLayout causes the content to overflow the page."
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export default storyConfig;
|
|
32
|
+
var numberOfTabs = 20;
|
|
33
|
+
var ExampleContentBlock = function ExampleContentBlock() {
|
|
34
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
35
|
+
sx: function sx(theme) {
|
|
36
|
+
return {
|
|
37
|
+
width: 200,
|
|
38
|
+
height: "150vh",
|
|
39
|
+
borderRadius: theme.shape.borderRadius,
|
|
40
|
+
backgroundColor: theme.palette.grey[100]
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
export var RouterTabsInMasterContent = {
|
|
46
|
+
decorators: [MasterLayoutDecorator],
|
|
47
|
+
parameters: {
|
|
48
|
+
layout: "none",
|
|
49
|
+
stack: {
|
|
50
|
+
topLevelTitle: "Example Page"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
render: function render() {
|
|
54
|
+
return /*#__PURE__*/_jsx(MainContent, {
|
|
55
|
+
children: /*#__PURE__*/_jsx(RouterTabs, {
|
|
56
|
+
children: Array.from({
|
|
57
|
+
length: numberOfTabs
|
|
58
|
+
}, function (_, index) {
|
|
59
|
+
return /*#__PURE__*/_jsxs(RouterTab, {
|
|
60
|
+
path: index === 0 ? "" : "/lorem-ipsum-".concat(index + 1),
|
|
61
|
+
label: "Lorem ipsum ".concat(index + 1),
|
|
62
|
+
children: [/*#__PURE__*/_jsxs(Typography, {
|
|
63
|
+
variant: "h2",
|
|
64
|
+
gutterBottom: true,
|
|
65
|
+
children: ["Lorem ipsum ", index + 1]
|
|
66
|
+
}), /*#__PURE__*/_jsx(ExampleContentBlock, {})]
|
|
67
|
+
}, index);
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
export var RouterTabsInMasterContentWithToolbar = {
|
|
74
|
+
decorators: [MasterLayoutDecorator],
|
|
75
|
+
parameters: {
|
|
76
|
+
layout: "none",
|
|
77
|
+
stack: {
|
|
78
|
+
topLevelTitle: "Example Page"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
render: function render() {
|
|
82
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
83
|
+
children: [/*#__PURE__*/_jsx(Toolbar, {
|
|
84
|
+
children: /*#__PURE__*/_jsx(ToolbarAutomaticTitleItem, {})
|
|
85
|
+
}), /*#__PURE__*/_jsx(MainContent, {
|
|
86
|
+
children: /*#__PURE__*/_jsx(RouterTabs, {
|
|
87
|
+
children: Array.from({
|
|
88
|
+
length: numberOfTabs
|
|
89
|
+
}, function (_, index) {
|
|
90
|
+
return /*#__PURE__*/_jsxs(RouterTab, {
|
|
91
|
+
path: index === 0 ? "" : "/lorem-ipsum-".concat(index + 1),
|
|
92
|
+
label: "Lorem ipsum ".concat(index + 1),
|
|
93
|
+
children: [/*#__PURE__*/_jsxs(Typography, {
|
|
94
|
+
variant: "h2",
|
|
95
|
+
gutterBottom: true,
|
|
96
|
+
children: ["Lorem ipsum ", index + 1]
|
|
97
|
+
}), /*#__PURE__*/_jsx(ExampleContentBlock, {})]
|
|
98
|
+
}, index);
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
})]
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
export var MuiTabsInMasterContent = {
|
|
106
|
+
decorators: [MasterLayoutDecorator],
|
|
107
|
+
parameters: {
|
|
108
|
+
layout: "none",
|
|
109
|
+
stack: {
|
|
110
|
+
topLevelTitle: "Example Page"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
render: function render() {
|
|
114
|
+
var _useState = useState(0),
|
|
115
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
116
|
+
activeTabIndex = _useState2[0],
|
|
117
|
+
setActiveTabIndex = _useState2[1];
|
|
118
|
+
return /*#__PURE__*/_jsxs(MainContent, {
|
|
119
|
+
children: [/*#__PURE__*/_jsx(Tabs, {
|
|
120
|
+
variant: "scrollable",
|
|
121
|
+
value: activeTabIndex,
|
|
122
|
+
onChange: function onChange(_, index) {
|
|
123
|
+
return setActiveTabIndex(index);
|
|
124
|
+
},
|
|
125
|
+
children: Array.from({
|
|
126
|
+
length: numberOfTabs
|
|
127
|
+
}, function (_, index) {
|
|
128
|
+
return /*#__PURE__*/_jsx(Tab, {
|
|
129
|
+
label: "Lorem ipsum ".concat(index + 1)
|
|
130
|
+
}, index);
|
|
131
|
+
})
|
|
132
|
+
}), /*#__PURE__*/_jsx(ExampleContentBlock, {})]
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
export var MuiTabsInMasterContentWithToolbar = {
|
|
137
|
+
decorators: [MasterLayoutDecorator],
|
|
138
|
+
parameters: {
|
|
139
|
+
layout: "none",
|
|
140
|
+
stack: {
|
|
141
|
+
topLevelTitle: "Example Page"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
render: function render() {
|
|
145
|
+
var _useState3 = useState(0),
|
|
146
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
147
|
+
activeTabIndex = _useState4[0],
|
|
148
|
+
setActiveTabIndex = _useState4[1];
|
|
149
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
150
|
+
children: [/*#__PURE__*/_jsx(Toolbar, {
|
|
151
|
+
children: /*#__PURE__*/_jsx(ToolbarAutomaticTitleItem, {})
|
|
152
|
+
}), /*#__PURE__*/_jsxs(MainContent, {
|
|
153
|
+
children: [/*#__PURE__*/_jsx(Tabs, {
|
|
154
|
+
variant: "scrollable",
|
|
155
|
+
value: activeTabIndex,
|
|
156
|
+
onChange: function onChange(_, index) {
|
|
157
|
+
return setActiveTabIndex(index);
|
|
158
|
+
},
|
|
159
|
+
children: Array.from({
|
|
160
|
+
length: numberOfTabs
|
|
161
|
+
}, function (_, index) {
|
|
162
|
+
return /*#__PURE__*/_jsx(Tab, {
|
|
163
|
+
label: "Lorem ipsum ".concat(index + 1)
|
|
164
|
+
}, index);
|
|
165
|
+
})
|
|
166
|
+
}), /*#__PURE__*/_jsx(ExampleContentBlock, {})]
|
|
167
|
+
})]
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
export var RouterTabsInMainContent = {
|
|
172
|
+
parameters: {
|
|
173
|
+
layout: "none",
|
|
174
|
+
stack: {
|
|
175
|
+
topLevelTitle: "Example Page"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
render: function render() {
|
|
179
|
+
return /*#__PURE__*/_jsx(MainContent, {
|
|
180
|
+
children: /*#__PURE__*/_jsx(RouterTabs, {
|
|
181
|
+
children: Array.from({
|
|
182
|
+
length: numberOfTabs
|
|
183
|
+
}, function (_, index) {
|
|
184
|
+
return /*#__PURE__*/_jsxs(RouterTab, {
|
|
185
|
+
path: index === 0 ? "" : "/lorem-ipsum-".concat(index + 1),
|
|
186
|
+
label: "Lorem ipsum ".concat(index + 1),
|
|
187
|
+
children: [/*#__PURE__*/_jsxs(Typography, {
|
|
188
|
+
variant: "h2",
|
|
189
|
+
gutterBottom: true,
|
|
190
|
+
children: ["Lorem ipsum ", index + 1]
|
|
191
|
+
}), /*#__PURE__*/_jsx(ExampleContentBlock, {})]
|
|
192
|
+
}, index);
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
export var MuiTabsInMainContent = {
|
|
199
|
+
parameters: {
|
|
200
|
+
layout: "none"
|
|
201
|
+
},
|
|
202
|
+
render: function render() {
|
|
203
|
+
var _useState5 = useState(0),
|
|
204
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
205
|
+
activeTabIndex = _useState6[0],
|
|
206
|
+
setActiveTabIndex = _useState6[1];
|
|
207
|
+
return /*#__PURE__*/_jsxs(MainContent, {
|
|
208
|
+
children: [/*#__PURE__*/_jsx(Tabs, {
|
|
209
|
+
variant: "scrollable",
|
|
210
|
+
value: activeTabIndex,
|
|
211
|
+
onChange: function onChange(_, index) {
|
|
212
|
+
return setActiveTabIndex(index);
|
|
213
|
+
},
|
|
214
|
+
children: Array.from({
|
|
215
|
+
length: numberOfTabs
|
|
216
|
+
}, function (_, index) {
|
|
217
|
+
return /*#__PURE__*/_jsx(Tab, {
|
|
218
|
+
label: "Lorem ipsum ".concat(index + 1)
|
|
219
|
+
}, index);
|
|
220
|
+
})
|
|
221
|
+
}), /*#__PURE__*/_jsx(ExampleContentBlock, {})]
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { RouterTab, RouterTabs } from "@comet/admin";
|
|
2
|
+
import { useLocation } from "react-router";
|
|
3
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
export default {
|
|
5
|
+
title: "components/tabs/RouterTabs"
|
|
6
|
+
};
|
|
7
|
+
export var Basic = {
|
|
8
|
+
render: function render() {
|
|
9
|
+
var location = useLocation();
|
|
10
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
11
|
+
children: [/*#__PURE__*/_jsxs("p", {
|
|
12
|
+
children: ["Location: ", location.pathname]
|
|
13
|
+
}), /*#__PURE__*/_jsxs(RouterTabs, {
|
|
14
|
+
children: [/*#__PURE__*/_jsx(RouterTab, {
|
|
15
|
+
path: "",
|
|
16
|
+
label: "Label One",
|
|
17
|
+
children: "Content One"
|
|
18
|
+
}), /*#__PURE__*/_jsx(RouterTab, {
|
|
19
|
+
path: "/tab2",
|
|
20
|
+
label: "Label Two",
|
|
21
|
+
children: "Content Two"
|
|
22
|
+
}), /*#__PURE__*/_jsx(RouterTab, {
|
|
23
|
+
path: "/tab3",
|
|
24
|
+
label: "Label Three",
|
|
25
|
+
children: "Content Three"
|
|
26
|
+
})]
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
name: "RouterTabs"
|
|
31
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
+
import { RouterTab, RouterTabs, Stack, StackPage, StackSwitch } from "@comet/admin";
|
|
8
|
+
import { useEffect, useRef, useState } from "react";
|
|
9
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
var mountCount = {};
|
|
11
|
+
function RenderCount(props) {
|
|
12
|
+
useEffect(function () {
|
|
13
|
+
mountCount[props.name] = (mountCount[props.name] || 0) + 1;
|
|
14
|
+
}, [props.name]);
|
|
15
|
+
var renderCount = useRef(0);
|
|
16
|
+
renderCount.current++;
|
|
17
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
18
|
+
children: ["Render count ", props.name, ": ", renderCount.current]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function PrintMountCount() {
|
|
22
|
+
var _useState = useState(0),
|
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
+
rerender = _useState2[1];
|
|
25
|
+
useEffect(function () {
|
|
26
|
+
var timer = setInterval(function () {
|
|
27
|
+
rerender(new Date().getTime());
|
|
28
|
+
}, 100);
|
|
29
|
+
return function () {
|
|
30
|
+
return clearInterval(timer);
|
|
31
|
+
};
|
|
32
|
+
}, []);
|
|
33
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
34
|
+
children: ["Mount count: ", JSON.stringify(mountCount)]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
export default {
|
|
38
|
+
title: "components/tabs/RouterTabs in Stack"
|
|
39
|
+
};
|
|
40
|
+
export var RouterTabsInStack = {
|
|
41
|
+
render: function render() {
|
|
42
|
+
return /*#__PURE__*/_jsxs(Stack, {
|
|
43
|
+
topLevelTitle: "Nested Stack",
|
|
44
|
+
children: [/*#__PURE__*/_jsx(PrintMountCount, {}), /*#__PURE__*/_jsxs(StackSwitch, {
|
|
45
|
+
children: [/*#__PURE__*/_jsxs(StackPage, {
|
|
46
|
+
name: "xxx",
|
|
47
|
+
children: [/*#__PURE__*/_jsx(RenderCount, {
|
|
48
|
+
name: "StackPage"
|
|
49
|
+
}), /*#__PURE__*/_jsxs(RouterTabs, {
|
|
50
|
+
children: [/*#__PURE__*/_jsxs(RouterTab, {
|
|
51
|
+
label: "Foo",
|
|
52
|
+
path: "",
|
|
53
|
+
forceRender: true,
|
|
54
|
+
children: ["Foo", /*#__PURE__*/_jsx(RenderCount, {
|
|
55
|
+
name: "Foo"
|
|
56
|
+
})]
|
|
57
|
+
}), /*#__PURE__*/_jsxs(RouterTab, {
|
|
58
|
+
label: "Bar",
|
|
59
|
+
path: "/bar",
|
|
60
|
+
forceRender: true,
|
|
61
|
+
children: ["Bar", /*#__PURE__*/_jsx(RenderCount, {
|
|
62
|
+
name: "Bar"
|
|
63
|
+
})]
|
|
64
|
+
})]
|
|
65
|
+
})]
|
|
66
|
+
}), /*#__PURE__*/_jsx(StackPage, {
|
|
67
|
+
name: "yyy",
|
|
68
|
+
children: "yyy"
|
|
69
|
+
})]
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
name: "RouterTabs in Stack"
|
|
74
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
+
import { RouterTab, RouterTabs, SubRoute } from "@comet/admin";
|
|
8
|
+
import { useEffect, useState } from "react";
|
|
9
|
+
import { Redirect, Route, Switch, useLocation, useRouteMatch } from "react-router";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
+
function Story() {
|
|
12
|
+
var match = useRouteMatch();
|
|
13
|
+
return /*#__PURE__*/_jsx("div", {
|
|
14
|
+
children: /*#__PURE__*/_jsx(SubRoute, {
|
|
15
|
+
path: "".concat(match.url, "/cmp1"),
|
|
16
|
+
children: /*#__PURE__*/_jsxs(RouterTabs, {
|
|
17
|
+
children: [/*#__PURE__*/_jsx(RouterTab, {
|
|
18
|
+
label: "Tab 1",
|
|
19
|
+
path: "",
|
|
20
|
+
children: "Tab 1 Content"
|
|
21
|
+
}), /*#__PURE__*/_jsx(RouterTab, {
|
|
22
|
+
label: "Tab 2",
|
|
23
|
+
path: "/form2",
|
|
24
|
+
children: "Tab 2 Content"
|
|
25
|
+
})]
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function Path() {
|
|
31
|
+
var location = useLocation();
|
|
32
|
+
var _useState = useState(0),
|
|
33
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34
|
+
rerender = _useState2[1];
|
|
35
|
+
useEffect(function () {
|
|
36
|
+
var timer = setTimeout(function () {
|
|
37
|
+
rerender(new Date().getTime());
|
|
38
|
+
}, 1000);
|
|
39
|
+
return function () {
|
|
40
|
+
return clearTimeout(timer);
|
|
41
|
+
};
|
|
42
|
+
}, []);
|
|
43
|
+
return /*#__PURE__*/_jsx("div", {
|
|
44
|
+
children: location.pathname
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export default {
|
|
48
|
+
title: "components/tabs/RouterTabs in SubRoute"
|
|
49
|
+
};
|
|
50
|
+
export var RouterTabsInSubRoute = {
|
|
51
|
+
render: function render() {
|
|
52
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
53
|
+
children: [/*#__PURE__*/_jsx(Path, {}), /*#__PURE__*/_jsxs(Switch, {
|
|
54
|
+
children: [/*#__PURE__*/_jsx(Route, {
|
|
55
|
+
exact: true,
|
|
56
|
+
path: "/",
|
|
57
|
+
children: /*#__PURE__*/_jsx(Redirect, {
|
|
58
|
+
to: "/foo"
|
|
59
|
+
})
|
|
60
|
+
}), /*#__PURE__*/_jsx(Route, {
|
|
61
|
+
path: "/foo",
|
|
62
|
+
children: /*#__PURE__*/_jsx(Story, {})
|
|
63
|
+
})]
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
name: "Router Tabs in SubRoute"
|
|
68
|
+
};
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
var _excluded = ["pristine", "dirty", "hasValidationErrors", "submitting", "hasSubmitErrors", "handleSubmit"],
|
|
2
|
+
_excluded2 = ["pristine", "dirty", "hasValidationErrors", "submitting", "hasSubmitErrors", "handleSubmit"];
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
|
+
import { Field, FillSpace, FinalForm, FinalFormInput, FinalFormSaveButton, Tab, Tabs, Toolbar, ToolbarActions, ToolbarBackButton } from "@comet/admin";
|
|
6
|
+
import { Card, CardContent } from "@mui/material";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
+
export default {
|
|
9
|
+
title: "components/tabs/Tabs"
|
|
10
|
+
};
|
|
11
|
+
export var Basic = function Basic() {
|
|
12
|
+
return /*#__PURE__*/_jsxs(Tabs, {
|
|
13
|
+
children: [/*#__PURE__*/_jsx(Tab, {
|
|
14
|
+
label: "Label One",
|
|
15
|
+
children: "Content One"
|
|
16
|
+
}), /*#__PURE__*/_jsx(Tab, {
|
|
17
|
+
label: "Label Two",
|
|
18
|
+
children: "Content Two"
|
|
19
|
+
}), /*#__PURE__*/_jsx(Tab, {
|
|
20
|
+
label: "Label Three",
|
|
21
|
+
children: "Content Three"
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
export var TabsInFormWithForceRender = {
|
|
26
|
+
render: function render() {
|
|
27
|
+
return /*#__PURE__*/_jsx("div", {
|
|
28
|
+
children: /*#__PURE__*/_jsx(FinalForm, {
|
|
29
|
+
mode: "edit",
|
|
30
|
+
onSubmit: function onSubmit(values) {
|
|
31
|
+
alert(JSON.stringify(values));
|
|
32
|
+
},
|
|
33
|
+
initialValues: {
|
|
34
|
+
foo: "foo",
|
|
35
|
+
bar: "bar"
|
|
36
|
+
},
|
|
37
|
+
children: function children(_ref) {
|
|
38
|
+
var pristine = _ref.pristine,
|
|
39
|
+
dirty = _ref.dirty,
|
|
40
|
+
hasValidationErrors = _ref.hasValidationErrors,
|
|
41
|
+
submitting = _ref.submitting,
|
|
42
|
+
hasSubmitErrors = _ref.hasSubmitErrors,
|
|
43
|
+
handleSubmit = _ref.handleSubmit,
|
|
44
|
+
formVars = _objectWithoutProperties(_ref, _excluded);
|
|
45
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
46
|
+
children: ["Pristine: ", String(pristine), " ", /*#__PURE__*/_jsx("br", {}), "Dirty: ", String(dirty), /*#__PURE__*/_jsxs(Toolbar, {
|
|
47
|
+
children: [/*#__PURE__*/_jsx(ToolbarBackButton, {}), /*#__PURE__*/_jsx(FillSpace, {}), /*#__PURE__*/_jsx(ToolbarActions, {
|
|
48
|
+
children: /*#__PURE__*/_jsx(FinalFormSaveButton, {})
|
|
49
|
+
})]
|
|
50
|
+
}), /*#__PURE__*/_jsxs(Tabs, {
|
|
51
|
+
children: [/*#__PURE__*/_jsx(Tab, {
|
|
52
|
+
label: "Tab 1",
|
|
53
|
+
forceRender: true,
|
|
54
|
+
children: /*#__PURE__*/_jsx(Card, {
|
|
55
|
+
variant: "outlined",
|
|
56
|
+
children: /*#__PURE__*/_jsx(CardContent, {
|
|
57
|
+
children: /*#__PURE__*/_jsx(Field, {
|
|
58
|
+
label: "Foo",
|
|
59
|
+
name: "foo",
|
|
60
|
+
component: FinalFormInput
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
}), /*#__PURE__*/_jsx(Tab, {
|
|
65
|
+
label: "Tab 2",
|
|
66
|
+
forceRender: true,
|
|
67
|
+
children: /*#__PURE__*/_jsx(Card, {
|
|
68
|
+
variant: "outlined",
|
|
69
|
+
children: /*#__PURE__*/_jsx(CardContent, {
|
|
70
|
+
children: /*#__PURE__*/_jsx(Field, {
|
|
71
|
+
label: "Bar",
|
|
72
|
+
name: "bar",
|
|
73
|
+
component: FinalFormInput
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
})]
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
name: "Tabs in Form with forceRender"
|
|
85
|
+
};
|
|
86
|
+
export var TabsInFormWithoutForceRender = {
|
|
87
|
+
render: function render() {
|
|
88
|
+
// !!!!!!!! Note: This example is how NOT to do it !!!!!!!!
|
|
89
|
+
return /*#__PURE__*/_jsx("div", {
|
|
90
|
+
children: /*#__PURE__*/_jsx(FinalForm, {
|
|
91
|
+
mode: "edit",
|
|
92
|
+
onSubmit: function onSubmit(values) {
|
|
93
|
+
alert(JSON.stringify(values));
|
|
94
|
+
},
|
|
95
|
+
initialValues: {
|
|
96
|
+
foo: "foo",
|
|
97
|
+
bar: "bar"
|
|
98
|
+
},
|
|
99
|
+
children: function children(_ref2) {
|
|
100
|
+
var pristine = _ref2.pristine,
|
|
101
|
+
dirty = _ref2.dirty,
|
|
102
|
+
hasValidationErrors = _ref2.hasValidationErrors,
|
|
103
|
+
submitting = _ref2.submitting,
|
|
104
|
+
hasSubmitErrors = _ref2.hasSubmitErrors,
|
|
105
|
+
handleSubmit = _ref2.handleSubmit,
|
|
106
|
+
formVars = _objectWithoutProperties(_ref2, _excluded2);
|
|
107
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
108
|
+
children: ["Pristine: ", String(pristine), " ", /*#__PURE__*/_jsx("br", {}), "Dirty: ", String(dirty), /*#__PURE__*/_jsxs(Toolbar, {
|
|
109
|
+
children: [/*#__PURE__*/_jsx(ToolbarBackButton, {}), /*#__PURE__*/_jsx(FillSpace, {}), /*#__PURE__*/_jsx(ToolbarActions, {
|
|
110
|
+
children: /*#__PURE__*/_jsx(FinalFormSaveButton, {})
|
|
111
|
+
})]
|
|
112
|
+
}), /*#__PURE__*/_jsxs(Tabs, {
|
|
113
|
+
children: [/*#__PURE__*/_jsx(Tab, {
|
|
114
|
+
label: "Tab 1",
|
|
115
|
+
children: /*#__PURE__*/_jsx(Card, {
|
|
116
|
+
variant: "outlined",
|
|
117
|
+
children: /*#__PURE__*/_jsx(CardContent, {
|
|
118
|
+
children: /*#__PURE__*/_jsx(Field, {
|
|
119
|
+
label: "Foo",
|
|
120
|
+
name: "foo",
|
|
121
|
+
component: FinalFormInput
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
})
|
|
125
|
+
}), /*#__PURE__*/_jsx(Tab, {
|
|
126
|
+
label: "Tab 2",
|
|
127
|
+
children: /*#__PURE__*/_jsx(Card, {
|
|
128
|
+
variant: "outlined",
|
|
129
|
+
children: /*#__PURE__*/_jsx(CardContent, {
|
|
130
|
+
children: /*#__PURE__*/_jsx(Field, {
|
|
131
|
+
label: "Bar",
|
|
132
|
+
name: "bar",
|
|
133
|
+
component: FinalFormInput
|
|
134
|
+
})
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
})]
|
|
138
|
+
})]
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
name: "Tabs in Form without forceRender"
|
|
145
|
+
};
|
|
146
|
+
export var FormInTabsWithForceRender = {
|
|
147
|
+
render: function render() {
|
|
148
|
+
return /*#__PURE__*/_jsx("div", {
|
|
149
|
+
children: /*#__PURE__*/_jsxs(Tabs, {
|
|
150
|
+
children: [/*#__PURE__*/_jsx(Tab, {
|
|
151
|
+
label: "Form",
|
|
152
|
+
forceRender: true,
|
|
153
|
+
children: /*#__PURE__*/_jsx(Card, {
|
|
154
|
+
variant: "outlined",
|
|
155
|
+
children: /*#__PURE__*/_jsx(CardContent, {
|
|
156
|
+
children: /*#__PURE__*/_jsx(FinalForm, {
|
|
157
|
+
mode: "add",
|
|
158
|
+
onSubmit: function onSubmit(values) {
|
|
159
|
+
alert(JSON.stringify(values));
|
|
160
|
+
},
|
|
161
|
+
children: /*#__PURE__*/_jsx(Field, {
|
|
162
|
+
label: "Name",
|
|
163
|
+
name: "name",
|
|
164
|
+
component: FinalFormInput
|
|
165
|
+
})
|
|
166
|
+
})
|
|
167
|
+
})
|
|
168
|
+
})
|
|
169
|
+
}), /*#__PURE__*/_jsx(Tab, {
|
|
170
|
+
label: "Tab 2",
|
|
171
|
+
children: /*#__PURE__*/_jsx(Card, {
|
|
172
|
+
variant: "outlined",
|
|
173
|
+
children: /*#__PURE__*/_jsx(CardContent, {
|
|
174
|
+
children: "Tab 2"
|
|
175
|
+
})
|
|
176
|
+
})
|
|
177
|
+
})]
|
|
178
|
+
})
|
|
179
|
+
});
|
|
180
|
+
},
|
|
181
|
+
name: "Form in Tabs with forceRender"
|
|
182
|
+
};
|
|
183
|
+
export var FormInTabsWithoutForceRender = {
|
|
184
|
+
render: function render() {
|
|
185
|
+
// !!!!!!!! Note: This example is how NOT to do it !!!!!!!!
|
|
186
|
+
return /*#__PURE__*/_jsx("div", {
|
|
187
|
+
children: /*#__PURE__*/_jsxs(Tabs, {
|
|
188
|
+
children: [/*#__PURE__*/_jsx(Tab, {
|
|
189
|
+
label: "Form",
|
|
190
|
+
children: /*#__PURE__*/_jsx(Card, {
|
|
191
|
+
variant: "outlined",
|
|
192
|
+
children: /*#__PURE__*/_jsx(CardContent, {
|
|
193
|
+
children: /*#__PURE__*/_jsx(FinalForm, {
|
|
194
|
+
mode: "add",
|
|
195
|
+
onSubmit: function onSubmit(values) {
|
|
196
|
+
alert(JSON.stringify(values));
|
|
197
|
+
},
|
|
198
|
+
children: /*#__PURE__*/_jsx(Field, {
|
|
199
|
+
label: "Name",
|
|
200
|
+
name: "name",
|
|
201
|
+
component: FinalFormInput
|
|
202
|
+
})
|
|
203
|
+
})
|
|
204
|
+
})
|
|
205
|
+
})
|
|
206
|
+
}), /*#__PURE__*/_jsx(Tab, {
|
|
207
|
+
label: "Tab 2",
|
|
208
|
+
children: /*#__PURE__*/_jsx(Card, {
|
|
209
|
+
variant: "outlined",
|
|
210
|
+
children: /*#__PURE__*/_jsx(CardContent, {
|
|
211
|
+
children: "Tab 2"
|
|
212
|
+
})
|
|
213
|
+
})
|
|
214
|
+
})]
|
|
215
|
+
})
|
|
216
|
+
});
|
|
217
|
+
},
|
|
218
|
+
name: "Form in Tabs without forceRender"
|
|
219
|
+
};
|
|
@@ -227,7 +227,7 @@ export var getMuiDataGrid = function getMuiDataGrid(component, _ref) {
|
|
|
227
227
|
paddingBottom: spacing(2),
|
|
228
228
|
marginBottom: spacing(2),
|
|
229
229
|
borderBottomColor: palette.grey[50]
|
|
230
|
-
})), "&:first-
|
|
230
|
+
})), "&:first-of-type .".concat(gridClasses.filterFormLogicOperatorInput), {
|
|
231
231
|
// The first "Operator"-select is fully hidden by default when there is only one filter.
|
|
232
232
|
// Setting `display: block` makes sure it takes up it's space as if it were visible to prevent the alignment from breaking.
|
|
233
233
|
// Even though `display: block` is set now, it's still not visible, due to it's default styling of `visibility: hidden`.
|
|
@@ -2,6 +2,7 @@ export interface ContentTranslationServiceContext {
|
|
|
2
2
|
enabled: boolean;
|
|
3
3
|
showApplyTranslationDialog?: boolean;
|
|
4
4
|
translate: (text: string) => Promise<string>;
|
|
5
|
+
batchTranslate?: (texts: string[]) => Promise<string[]>;
|
|
5
6
|
}
|
|
6
7
|
export declare const ContentTranslationServiceContext: import("react").Context<ContentTranslationServiceContext>;
|
|
7
8
|
//# sourceMappingURL=ContentTranslationServiceContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTranslationServiceContext.d.ts","sourceRoot":"","sources":["../../src/translator/ContentTranslationServiceContext.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,gCAAgC;IAC7C,OAAO,EAAE,OAAO,CAAC;IACjB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentTranslationServiceContext.d.ts","sourceRoot":"","sources":["../../src/translator/ContentTranslationServiceContext.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,gCAAgC;IAC7C,OAAO,EAAE,OAAO,CAAC;IACjB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAC3D;AAED,eAAO,MAAM,gCAAgC,2DAK3C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PropsWithChildren } from "react";
|
|
2
2
|
import { ContentTranslationServiceContext } from "./ContentTranslationServiceContext";
|
|
3
|
-
export declare const ContentTranslationServiceProvider: ({ children, enabled, showApplyTranslationDialog, translate, }: PropsWithChildren<ContentTranslationServiceContext>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const ContentTranslationServiceProvider: ({ children, enabled, showApplyTranslationDialog, translate, batchTranslate, }: PropsWithChildren<ContentTranslationServiceContext>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=ContentTranslationServiceProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTranslationServiceProvider.d.ts","sourceRoot":"","sources":["../../src/translator/ContentTranslationServiceProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAEtF,eAAO,MAAM,iCAAiC,GAAI,+
|
|
1
|
+
{"version":3,"file":"ContentTranslationServiceProvider.d.ts","sourceRoot":"","sources":["../../src/translator/ContentTranslationServiceProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAEtF,eAAO,MAAM,iCAAiC,GAAI,+EAM/C,iBAAiB,CAAC,gCAAgC,CAAC,4CAMrD,CAAC"}
|
|
@@ -4,12 +4,14 @@ export var ContentTranslationServiceProvider = function ContentTranslationServic
|
|
|
4
4
|
var children = _ref.children,
|
|
5
5
|
enabled = _ref.enabled,
|
|
6
6
|
showApplyTranslationDialog = _ref.showApplyTranslationDialog,
|
|
7
|
-
translate = _ref.translate
|
|
7
|
+
translate = _ref.translate,
|
|
8
|
+
batchTranslate = _ref.batchTranslate;
|
|
8
9
|
return /*#__PURE__*/_jsx(ContentTranslationServiceContext.Provider, {
|
|
9
10
|
value: {
|
|
10
11
|
enabled: enabled,
|
|
11
12
|
showApplyTranslationDialog: showApplyTranslationDialog,
|
|
12
|
-
translate: translate
|
|
13
|
+
translate: translate,
|
|
14
|
+
batchTranslate: batchTranslate
|
|
13
15
|
},
|
|
14
16
|
children: children
|
|
15
17
|
});
|