@comet/admin 9.0.0-beta.4 → 9.0.0-beta.6
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/ClearInputAdornment.d.ts.map +1 -1
- package/lib/common/ClearInputAdornment.js +6 -2
- 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/buttons/clearinput/ClearInputButton.js +1 -1
- package/lib/dataGrid/excelExport/generateExcelFile.d.ts.map +1 -1
- package/lib/dataGrid/excelExport/generateExcelFile.js +23 -1
- package/lib/dateTime/timePicker/TimePicker.d.ts.map +1 -1
- package/lib/dateTime/timePicker/TimePicker.js +2 -17
- package/lib/dateTime/timeRangePicker/TimeRangePicker.d.ts +71 -0
- package/lib/dateTime/timeRangePicker/TimeRangePicker.d.ts.map +1 -0
- package/lib/dateTime/timeRangePicker/TimeRangePicker.js +191 -0
- package/lib/dateTime/timeRangePickerField/TimeRangePickerField.d.ts +13 -0
- package/lib/dateTime/timeRangePickerField/TimeRangePickerField.d.ts.map +1 -0
- package/lib/dateTime/timeRangePickerField/TimeRangePickerField.js +31 -0
- package/lib/dateTime/utils.d.ts +6 -0
- package/lib/dateTime/utils.d.ts.map +1 -1
- package/lib/dateTime/utils.js +19 -1
- package/lib/{EditDialog.d.ts → editDialog/EditDialog.d.ts} +1 -1
- package/lib/editDialog/EditDialog.d.ts.map +1 -0
- package/lib/{EditDialog.js → editDialog/EditDialog.js} +5 -5
- package/lib/editDialog/EditDialogApiContext.d.ts.map +1 -0
- package/lib/form/FinalFormNumberInput.d.ts.map +1 -1
- package/lib/form/FinalFormNumberInput.js +2 -3
- package/lib/helpers/useTopOffset.js +1 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -2
- package/lib/theme/componentsTheme/MuiDataGrid.js +1 -1
- package/package.json +26 -19
- package/lib/EditDialog.d.ts.map +0 -1
- package/lib/EditDialogApiContext.d.ts.map +0 -1
- package/lib/alert/__stories__/Alert.stories.js +0 -152
- package/lib/common/__stories__/Tooltip.stories.js +0 -404
- package/lib/common/buttons/__stories__/Button.stories.js +0 -445
- package/lib/common/buttons/delete/__stories__/DeleteButton.stories.js +0 -8
- package/lib/dateTime/datePicker/__stories__/DatePicker.stories.js +0 -214
- package/lib/dateTime/datePickerField/__stories__/DatePickerField.stories.js +0 -220
- package/lib/dateTime/dateRangePicker/__stories__/DateRangePicker.stories.js +0 -238
- package/lib/dateTime/dateRangePickerField/__stories__/DateRangePickerField.stories.js +0 -224
- package/lib/dateTime/dateTimePicker/__stories__/DateTimePicker.stories.js +0 -214
- package/lib/dateTime/dateTimePickerField/__stories__/DateTimePickerField.stories.js +0 -220
- package/lib/dateTime/dateTimeRangePicker/__stories__/DateTimeRangePicker.stories.js +0 -238
- package/lib/dateTime/dateTimeRangePickerField/__stories__/DateTimeRangePickerField.stories.js +0 -223
- package/lib/dateTime/timePicker/__stories__/TimePicker.stories.js +0 -219
- package/lib/dateTime/timePickerField/__stories__/TimePickerField.stories.js +0 -229
- package/lib/section/__stories__/SectionHeadline.stories.js +0 -71
- package/lib/stack/__stories__/RouterTabsNestedStack.stories.js +0 -51
- package/lib/stack/__stories__/Stack.stories.js +0 -14
- package/lib/stack/__stories__/StackBackButton.stories.js +0 -50
- package/lib/stack/__stories__/StackBreadcrumbs.stories.js +0 -139
- package/lib/stack/__stories__/StackBreadcrumbsTabs.stories.js +0 -47
- package/lib/stack/__stories__/StackCustomSeparator.stories.js +0 -47
- package/lib/stack/__stories__/StackLink.stories.js +0 -41
- package/lib/stack/__stories__/StackNested.stories.js +0 -58
- package/lib/stack/__stories__/StackNestedOnInitialPage.stories.js +0 -78
- package/lib/stack/__stories__/StackNestedOneStack.stories.js +0 -90
- package/lib/stack/__stories__/StackPageTitle.stories.js +0 -121
- package/lib/stack/__stories__/StackReactNodeTitle.stories.js +0 -54
- package/lib/stack/__stories__/StackRefApi.stories.js +0 -56
- package/lib/stack/__stories__/StackTableFormQueryAtStack.stories.js +0 -155
- package/lib/stack/__stories__/StackTableFormQueryInTable.stories.js +0 -160
- package/lib/stack/__stories__/StackUrl.stories.js +0 -66
- package/lib/translator/__stories__/ContentTranslation.stories.js +0 -104
- /package/lib/{EditDialogApiContext.d.ts → editDialog/EditDialogApiContext.d.ts} +0 -0
- /package/lib/{EditDialogApiContext.js → editDialog/EditDialogApiContext.js} +0 -0
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Stack, StackBreadcrumbs, StackLink, StackPage, StackSwitch } from "@comet/admin";
|
|
2
|
-
import { useLocation } from "react-router";
|
|
3
|
-
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
-
export default {
|
|
5
|
-
title: "components/stack/StackUrl"
|
|
6
|
-
};
|
|
7
|
-
export var StackUrl = {
|
|
8
|
-
render: function render() {
|
|
9
|
-
var location = useLocation();
|
|
10
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
11
|
-
children: [/*#__PURE__*/_jsxs("p", {
|
|
12
|
-
children: ["Pathname: ", location.pathname]
|
|
13
|
-
}), /*#__PURE__*/_jsxs(Stack, {
|
|
14
|
-
topLevelTitle: "Stack Url",
|
|
15
|
-
children: [/*#__PURE__*/_jsx(StackBreadcrumbs, {}), /*#__PURE__*/_jsxs(StackSwitch, {
|
|
16
|
-
children: [/*#__PURE__*/_jsxs(StackPage, {
|
|
17
|
-
name: "page1",
|
|
18
|
-
children: [/*#__PURE__*/_jsx("h3", {
|
|
19
|
-
children: "Page 1"
|
|
20
|
-
}), /*#__PURE__*/_jsx(StackLink, {
|
|
21
|
-
pageName: "page2",
|
|
22
|
-
payload: "test",
|
|
23
|
-
children: "go to page 2"
|
|
24
|
-
})]
|
|
25
|
-
}), /*#__PURE__*/_jsxs(StackPage, {
|
|
26
|
-
name: "page2",
|
|
27
|
-
children: [/*#__PURE__*/_jsx("h3", {
|
|
28
|
-
children: "Page 2"
|
|
29
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
30
|
-
children: /*#__PURE__*/_jsx(StackLink, {
|
|
31
|
-
pageName: "page1",
|
|
32
|
-
payload: "test",
|
|
33
|
-
children: "go to page 1"
|
|
34
|
-
})
|
|
35
|
-
}), /*#__PURE__*/_jsxs(StackSwitch, {
|
|
36
|
-
children: [/*#__PURE__*/_jsxs(StackPage, {
|
|
37
|
-
name: "page2-1",
|
|
38
|
-
children: [/*#__PURE__*/_jsx("h3", {
|
|
39
|
-
children: "Page 2-1"
|
|
40
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
41
|
-
children: /*#__PURE__*/_jsx(StackLink, {
|
|
42
|
-
pageName: "page2-2",
|
|
43
|
-
payload: "test",
|
|
44
|
-
children: "go to page 2-2"
|
|
45
|
-
})
|
|
46
|
-
})]
|
|
47
|
-
}), /*#__PURE__*/_jsxs(StackPage, {
|
|
48
|
-
name: "page2-2",
|
|
49
|
-
children: [/*#__PURE__*/_jsx("h3", {
|
|
50
|
-
children: "Page 2-2"
|
|
51
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
52
|
-
children: /*#__PURE__*/_jsx(StackLink, {
|
|
53
|
-
pageName: "page2-1",
|
|
54
|
-
payload: "test",
|
|
55
|
-
children: "go to page 2-1"
|
|
56
|
-
})
|
|
57
|
-
})]
|
|
58
|
-
})]
|
|
59
|
-
})]
|
|
60
|
-
})]
|
|
61
|
-
})]
|
|
62
|
-
})]
|
|
63
|
-
});
|
|
64
|
-
},
|
|
65
|
-
name: "StackUrl"
|
|
66
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
2
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
3
|
-
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
4
|
-
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
5
|
-
import { FinalForm } from "../../FinalForm";
|
|
6
|
-
import { TextAreaField } from "../../form/fields/TextAreaField";
|
|
7
|
-
import { TextField } from "../../form/fields/TextField";
|
|
8
|
-
import { FinalFormDebug } from "../../form/FinalFormDebug";
|
|
9
|
-
import { ContentTranslationServiceProvider } from "../ContentTranslationServiceProvider";
|
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
var reverseTranslate = /*#__PURE__*/function () {
|
|
12
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(text) {
|
|
13
|
-
return _regenerator().w(function (_context) {
|
|
14
|
-
while (1) switch (_context.n) {
|
|
15
|
-
case 0:
|
|
16
|
-
return _context.a(2, text.split("").reverse().join(""));
|
|
17
|
-
}
|
|
18
|
-
}, _callee);
|
|
19
|
-
}));
|
|
20
|
-
return function reverseTranslate(_x) {
|
|
21
|
-
return _ref.apply(this, arguments);
|
|
22
|
-
};
|
|
23
|
-
}();
|
|
24
|
-
var initialValues = {
|
|
25
|
-
title: "Hello World",
|
|
26
|
-
description: "The quick brown fox jumps over the lazy dog."
|
|
27
|
-
};
|
|
28
|
-
var TranslationProvider = function TranslationProvider(_ref2) {
|
|
29
|
-
var children = _ref2.children,
|
|
30
|
-
showApplyTranslationDialog = _ref2.showApplyTranslationDialog;
|
|
31
|
-
return /*#__PURE__*/_jsx(ContentTranslationServiceProvider, {
|
|
32
|
-
enabled: true,
|
|
33
|
-
translate: reverseTranslate,
|
|
34
|
-
showApplyTranslationDialog: showApplyTranslationDialog,
|
|
35
|
-
children: children
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
var config = {
|
|
39
|
-
component: ContentTranslationServiceProvider,
|
|
40
|
-
title: "components/translator/ContentTranslation"
|
|
41
|
-
};
|
|
42
|
-
export default config;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Translation is applied immediately when clicking the translate button on a `TextField` or `TextAreaField`.
|
|
46
|
-
*
|
|
47
|
-
* The fake `translate` function used here reverses the input text.
|
|
48
|
-
*/
|
|
49
|
-
export var Default = {
|
|
50
|
-
render: function render() {
|
|
51
|
-
return /*#__PURE__*/_jsx(TranslationProvider, {
|
|
52
|
-
children: /*#__PURE__*/_jsxs(FinalForm, {
|
|
53
|
-
mode: "edit",
|
|
54
|
-
onSubmit: function onSubmit() {
|
|
55
|
-
// not handled
|
|
56
|
-
},
|
|
57
|
-
initialValues: initialValues,
|
|
58
|
-
subscription: {
|
|
59
|
-
values: true
|
|
60
|
-
},
|
|
61
|
-
children: [/*#__PURE__*/_jsx(TextField, {
|
|
62
|
-
name: "title",
|
|
63
|
-
label: "Title",
|
|
64
|
-
fullWidth: true
|
|
65
|
-
}), /*#__PURE__*/_jsx(TextAreaField, {
|
|
66
|
-
name: "description",
|
|
67
|
-
label: "Description",
|
|
68
|
-
fullWidth: true
|
|
69
|
-
}), /*#__PURE__*/_jsx(FinalFormDebug, {})]
|
|
70
|
-
})
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* With `showApplyTranslationDialog` enabled, the translation is shown in a dialog where the user can review
|
|
77
|
-
* and edit it before applying. For `TextAreaField`, the dialog renders the input as a multiline textarea.
|
|
78
|
-
*/
|
|
79
|
-
export var WithApplyTranslationDialog = {
|
|
80
|
-
render: function render() {
|
|
81
|
-
return /*#__PURE__*/_jsx(TranslationProvider, {
|
|
82
|
-
showApplyTranslationDialog: true,
|
|
83
|
-
children: /*#__PURE__*/_jsxs(FinalForm, {
|
|
84
|
-
mode: "edit",
|
|
85
|
-
onSubmit: function onSubmit() {
|
|
86
|
-
// not handled
|
|
87
|
-
},
|
|
88
|
-
initialValues: initialValues,
|
|
89
|
-
subscription: {
|
|
90
|
-
values: true
|
|
91
|
-
},
|
|
92
|
-
children: [/*#__PURE__*/_jsx(TextField, {
|
|
93
|
-
name: "title",
|
|
94
|
-
label: "Title",
|
|
95
|
-
fullWidth: true
|
|
96
|
-
}), /*#__PURE__*/_jsx(TextAreaField, {
|
|
97
|
-
name: "description",
|
|
98
|
-
label: "Description",
|
|
99
|
-
fullWidth: true
|
|
100
|
-
}), /*#__PURE__*/_jsx(FinalFormDebug, {})]
|
|
101
|
-
})
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
};
|
|
File without changes
|
|
File without changes
|