@comet/admin 9.0.0-beta.5 → 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.
Files changed (118) hide show
  1. package/lib/common/ClearInputAdornment.d.ts.map +1 -1
  2. package/lib/common/ClearInputAdornment.js +6 -2
  3. package/lib/dataGrid/excelExport/generateExcelFile.d.ts.map +1 -1
  4. package/lib/dataGrid/excelExport/generateExcelFile.js +23 -1
  5. package/lib/dateTime/timePicker/TimePicker.d.ts.map +1 -1
  6. package/lib/dateTime/timePicker/TimePicker.js +2 -17
  7. package/lib/dateTime/timeRangePicker/TimeRangePicker.d.ts +71 -0
  8. package/lib/dateTime/timeRangePicker/TimeRangePicker.d.ts.map +1 -0
  9. package/lib/dateTime/timeRangePicker/TimeRangePicker.js +191 -0
  10. package/lib/dateTime/timeRangePickerField/TimeRangePickerField.d.ts +13 -0
  11. package/lib/dateTime/timeRangePickerField/TimeRangePickerField.d.ts.map +1 -0
  12. package/lib/dateTime/timeRangePickerField/TimeRangePickerField.js +31 -0
  13. package/lib/dateTime/utils.d.ts +6 -0
  14. package/lib/dateTime/utils.d.ts.map +1 -1
  15. package/lib/dateTime/utils.js +19 -1
  16. package/lib/{EditDialog.d.ts → editDialog/EditDialog.d.ts} +1 -1
  17. package/lib/editDialog/EditDialog.d.ts.map +1 -0
  18. package/lib/{EditDialog.js → editDialog/EditDialog.js} +5 -5
  19. package/lib/editDialog/EditDialogApiContext.d.ts.map +1 -0
  20. package/lib/form/FinalFormNumberInput.d.ts.map +1 -1
  21. package/lib/form/FinalFormNumberInput.js +2 -3
  22. package/lib/index.d.ts +4 -2
  23. package/lib/index.d.ts.map +1 -1
  24. package/lib/index.js +4 -2
  25. package/package.json +19 -12
  26. package/lib/EditDialog.d.ts.map +0 -1
  27. package/lib/EditDialogApiContext.d.ts.map +0 -1
  28. package/lib/alert/__stories__/Alert.stories.js +0 -152
  29. package/lib/common/__stories__/Tooltip.stories.js +0 -404
  30. package/lib/common/buttons/__stories__/Button.stories.js +0 -445
  31. package/lib/common/buttons/delete/__stories__/DeleteButton.stories.js +0 -8
  32. package/lib/common/toolbar/__stories__/DataGridToolbar.stories.js +0 -76
  33. package/lib/common/toolbar/__stories__/Toolbar.stories.js +0 -82
  34. package/lib/dataGrid/__stories__/ClickableRows.stories.js +0 -109
  35. package/lib/dataGrid/__stories__/CrudMoreActionsMenu.stories.js +0 -50
  36. package/lib/dataGrid/__stories__/DataGrid.stories.js +0 -94
  37. package/lib/dataGrid/__stories__/DataGridSingleSelectFilter.stories.js +0 -492
  38. package/lib/dateTime/datePicker/__stories__/DatePicker.stories.js +0 -214
  39. package/lib/dateTime/datePickerField/__stories__/DatePickerField.stories.js +0 -220
  40. package/lib/dateTime/dateRangePicker/__stories__/DateRangePicker.stories.js +0 -238
  41. package/lib/dateTime/dateRangePickerField/__stories__/DateRangePickerField.stories.js +0 -224
  42. package/lib/dateTime/dateTimePicker/__stories__/DateTimePicker.stories.js +0 -214
  43. package/lib/dateTime/dateTimePickerField/__stories__/DateTimePickerField.stories.js +0 -220
  44. package/lib/dateTime/dateTimeRangePicker/__stories__/DateTimeRangePicker.stories.js +0 -238
  45. package/lib/dateTime/dateTimeRangePickerField/__stories__/DateTimeRangePickerField.stories.js +0 -223
  46. package/lib/dateTime/timePicker/__stories__/TimePicker.stories.js +0 -219
  47. package/lib/dateTime/timePickerField/__stories__/TimePickerField.stories.js +0 -229
  48. package/lib/form/__stories__/AsyncAutocompleteField.stories.js +0 -660
  49. package/lib/form/__stories__/AsyncSelectField.stories.js +0 -513
  50. package/lib/form/__stories__/Autocomplete.stories.js +0 -188
  51. package/lib/form/__stories__/AutocompleteField.stories.js +0 -48
  52. package/lib/form/__stories__/Checkbox.stories.js +0 -70
  53. package/lib/form/__stories__/CheckboxField.stories.js +0 -87
  54. package/lib/form/__stories__/CheckboxListField.stories.js +0 -172
  55. package/lib/form/__stories__/CustomButtons.stories.js +0 -78
  56. package/lib/form/__stories__/DependentAsyncSelects.stories.js +0 -91
  57. package/lib/form/__stories__/DisableAutoNavigation.stories.js +0 -132
  58. package/lib/form/__stories__/DisabledSubmitIfNotDirty.stories.js +0 -54
  59. package/lib/form/__stories__/FieldContainer.stories.js +0 -87
  60. package/lib/form/__stories__/FinalFormFileSelect.stories.js +0 -155
  61. package/lib/form/__stories__/FormInStack.stories.js +0 -133
  62. package/lib/form/__stories__/FormLayouts.stories.js +0 -174
  63. package/lib/form/__stories__/FormValidation.stories.js +0 -82
  64. package/lib/form/__stories__/Input.stories.js +0 -37
  65. package/lib/form/__stories__/NumberField.stories.js +0 -38
  66. package/lib/form/__stories__/Radio.stories.js +0 -101
  67. package/lib/form/__stories__/RadioGroupField.stories.js +0 -172
  68. package/lib/form/__stories__/RangeInput.stories.js +0 -239
  69. package/lib/form/__stories__/RouterTabs.stories.js +0 -96
  70. package/lib/form/__stories__/RouterTabsInForm.stories.js +0 -73
  71. package/lib/form/__stories__/RouterTabsInFormWithSubroutes.stories.js +0 -96
  72. package/lib/form/__stories__/ScrollToErrorField.stories.js +0 -82
  73. package/lib/form/__stories__/SearchField.stories.js +0 -38
  74. package/lib/form/__stories__/Select.stories.js +0 -187
  75. package/lib/form/__stories__/SelectField.stories.js +0 -100
  76. package/lib/form/__stories__/ShowErrorStrategies.stories.js +0 -107
  77. package/lib/form/__stories__/SingleTextField.stories.js +0 -108
  78. package/lib/form/__stories__/StackInForm.stories.js +0 -53
  79. package/lib/form/__stories__/SubmitErrors.stories.js +0 -90
  80. package/lib/form/__stories__/Switch.stories.js +0 -49
  81. package/lib/form/__stories__/SwitchField.stories.js +0 -87
  82. package/lib/form/__stories__/Tabs.stories.js +0 -78
  83. package/lib/form/__stories__/TextAreaField.stories.js +0 -38
  84. package/lib/form/__stories__/TextField.stories.js +0 -67
  85. package/lib/form/__stories__/ToggleButtonGroupField.stories.js +0 -312
  86. package/lib/form/__stories__/TwoLevelValidation.stories.js +0 -168
  87. package/lib/form/__stories__/Typography.stories.js +0 -71
  88. package/lib/form/file/__stories__/FileDropzone.stories.js +0 -81
  89. package/lib/form/file/__stories__/FileSelect.stories.js +0 -139
  90. package/lib/form/file/__stories__/FileSelectListItem.stories.js +0 -108
  91. package/lib/form/file/__stories__/FileSelectMultipleExamples.stories.js +0 -187
  92. package/lib/section/__stories__/SectionHeadline.stories.js +0 -71
  93. package/lib/stack/__stories__/RouterTabsNestedStack.stories.js +0 -51
  94. package/lib/stack/__stories__/Stack.stories.js +0 -14
  95. package/lib/stack/__stories__/StackBackButton.stories.js +0 -50
  96. package/lib/stack/__stories__/StackBreadcrumbs.stories.js +0 -139
  97. package/lib/stack/__stories__/StackBreadcrumbsTabs.stories.js +0 -47
  98. package/lib/stack/__stories__/StackCustomSeparator.stories.js +0 -47
  99. package/lib/stack/__stories__/StackLink.stories.js +0 -41
  100. package/lib/stack/__stories__/StackNested.stories.js +0 -58
  101. package/lib/stack/__stories__/StackNestedOnInitialPage.stories.js +0 -78
  102. package/lib/stack/__stories__/StackNestedOneStack.stories.js +0 -90
  103. package/lib/stack/__stories__/StackPageTitle.stories.js +0 -121
  104. package/lib/stack/__stories__/StackReactNodeTitle.stories.js +0 -54
  105. package/lib/stack/__stories__/StackRefApi.stories.js +0 -56
  106. package/lib/stack/__stories__/StackTableFormQueryAtStack.stories.js +0 -155
  107. package/lib/stack/__stories__/StackTableFormQueryInTable.stories.js +0 -160
  108. package/lib/stack/__stories__/StackUrl.stories.js +0 -66
  109. package/lib/tabs/__stories__/DynamicTabs.stories.js +0 -84
  110. package/lib/tabs/__stories__/NestedStackSwitchWithRouterTabs.stories.js +0 -84
  111. package/lib/tabs/__stories__/OverflowIssues.stories.js +0 -224
  112. package/lib/tabs/__stories__/RouterTabs.stories.js +0 -31
  113. package/lib/tabs/__stories__/RouterTabsInStack.stories.js +0 -74
  114. package/lib/tabs/__stories__/RouterTabsInSubroute.stories.js +0 -68
  115. package/lib/tabs/__stories__/Tabs.stories.js +0 -219
  116. package/lib/translator/__stories__/ContentTranslation.stories.js +0 -104
  117. /package/lib/{EditDialogApiContext.d.ts → editDialog/EditDialogApiContext.d.ts} +0 -0
  118. /package/lib/{EditDialogApiContext.js → editDialog/EditDialogApiContext.js} +0 -0
@@ -1,109 +0,0 @@
1
- import { Edit } from "@comet/admin-icons";
2
- import { IconButton } from "@mui/material";
3
- import { DataGrid } from "@mui/x-data-grid";
4
- import { ToolbarBackButton } from "../../common/toolbar/backbutton/ToolbarBackButton";
5
- import { ToolbarTitleItem } from "../../common/toolbar/titleitem/ToolbarTitleItem";
6
- import { Toolbar } from "../../common/toolbar/Toolbar";
7
- import { StackPage } from "../../stack/Page";
8
- import { StackLink } from "../../stack/StackLink";
9
- import { StackSwitch, useStackSwitchApi } from "../../stack/Switch";
10
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
- var exampleRows = [{
12
- id: 1,
13
- lastName: "Snow",
14
- firstName: "Jon"
15
- }, {
16
- id: 2,
17
- lastName: "Lannister",
18
- firstName: "Cersei"
19
- }, {
20
- id: 3,
21
- lastName: "Lannister",
22
- firstName: "Jaime"
23
- }, {
24
- id: 4,
25
- lastName: "Stark",
26
- firstName: "Arya"
27
- }, {
28
- id: 5,
29
- lastName: "Targaryen",
30
- firstName: "Daenerys"
31
- }, {
32
- id: 6,
33
- lastName: "Melisandre",
34
- firstName: null
35
- }, {
36
- id: 7,
37
- lastName: "Clifford",
38
- firstName: "Ferrara"
39
- }, {
40
- id: 8,
41
- lastName: "Frances",
42
- firstName: "Rossini"
43
- }, {
44
- id: 9,
45
- lastName: "Roxie",
46
- firstName: "Harvey"
47
- }];
48
- var exampleColumns = [{
49
- field: "firstName",
50
- headerName: "First name",
51
- flex: 1
52
- }, {
53
- field: "lastName",
54
- headerName: "Last name",
55
- flex: 1
56
- }];
57
- export default {
58
- title: "components/dataGrid/ClickableRows",
59
- parameters: {
60
- stack: {
61
- topLevelTitle: "Example Page"
62
- }
63
- }
64
- };
65
- export var ClickableRows = function ClickableRows() {
66
- // Grid must be a separate component to make sure the stackSwitchApi context is correct
67
- var Grid = function Grid() {
68
- var stackSwitchApi = useStackSwitchApi();
69
- var columns = [].concat(exampleColumns, [{
70
- field: "actions",
71
- type: "actions",
72
- headerName: "",
73
- width: 52,
74
- renderCell: function renderCell(params) {
75
- return /*#__PURE__*/_jsx(IconButton, {
76
- color: "primary",
77
- component: StackLink,
78
- pageName: "edit",
79
- payload: params.row.id,
80
- children: /*#__PURE__*/_jsx(Edit, {})
81
- });
82
- }
83
- }]);
84
- return /*#__PURE__*/_jsx(DataGrid, {
85
- rows: exampleRows,
86
- columns: columns,
87
- onRowClick: function onRowClick(params) {
88
- stackSwitchApi.activatePage("edit", params.row.id);
89
- }
90
- });
91
- };
92
- return /*#__PURE__*/_jsxs(StackSwitch, {
93
- children: [/*#__PURE__*/_jsx(StackPage, {
94
- name: "grid",
95
- children: /*#__PURE__*/_jsx(Grid, {})
96
- }), /*#__PURE__*/_jsx(StackPage, {
97
- name: "edit",
98
- children: function children(id) {
99
- return /*#__PURE__*/_jsxs(Toolbar, {
100
- children: [/*#__PURE__*/_jsx(ToolbarBackButton, {}), /*#__PURE__*/_jsxs(ToolbarTitleItem, {
101
- children: ["Editing item with id: ", /*#__PURE__*/_jsx("code", {
102
- children: id
103
- })]
104
- })]
105
- });
106
- }
107
- })]
108
- });
109
- };
@@ -1,50 +0,0 @@
1
- import { Delete, Download, Excel, Favorite, Move } from "@comet/admin-icons";
2
- import { ListItemIcon } from "@mui/material";
3
- import { CrudMoreActionsMenu, CrudMoreActionsMenuItem } from "../CrudMoreActionsMenu";
4
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
- export default {
6
- title: "components/dataGrid/CrudMoreActionsMenu"
7
- };
8
- export var Basic = function Basic() {
9
- return /*#__PURE__*/_jsx(CrudMoreActionsMenu, {
10
- selectionSize: 2,
11
- overallActions: [{
12
- label: "Export to Excel",
13
- onClick: function onClick() {},
14
- icon: /*#__PURE__*/_jsx(Excel, {})
15
- }],
16
- selectiveActions: [{
17
- label: "Move",
18
- onClick: function onClick() {},
19
- icon: /*#__PURE__*/_jsx(Move, {})
20
- }, {
21
- label: "Delete",
22
- onClick: function onClick() {},
23
- icon: /*#__PURE__*/_jsx(Delete, {}),
24
- divider: true
25
- }, {
26
- label: "Download",
27
- onClick: function onClick() {},
28
- icon: /*#__PURE__*/_jsx(Download, {})
29
- }]
30
- });
31
- };
32
- export var CustomComponent = function CustomComponent() {
33
- var CustomAction = function CustomAction() {
34
- return /*#__PURE__*/_jsxs(CrudMoreActionsMenuItem, {
35
- onClick: function onClick() {
36
- window.alert("Hello from custom action");
37
- },
38
- children: [/*#__PURE__*/_jsx(ListItemIcon, {
39
- children: /*#__PURE__*/_jsx(Favorite, {})
40
- }), "Custom Action"]
41
- });
42
- };
43
- return /*#__PURE__*/_jsx(CrudMoreActionsMenu, {
44
- overallActions: [{
45
- label: "Export to Excel",
46
- onClick: function onClick() {},
47
- icon: /*#__PURE__*/_jsx(Excel, {})
48
- }, /*#__PURE__*/_jsx(CustomAction, {}, "custom-action")]
49
- });
50
- };
@@ -1,94 +0,0 @@
1
- import { Add } from "@comet/admin-icons";
2
- import { Box } from "@mui/material";
3
- import { DataGrid } from "@mui/x-data-grid";
4
- import { Button } from "../../common/buttons/Button";
5
- import { FillSpace } from "../../common/FillSpace";
6
- import { DataGridToolbar } from "../../common/toolbar/DataGridToolbar";
7
- import { ToolbarTitleItem } from "../../common/toolbar/titleitem/ToolbarTitleItem";
8
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
- var exampleRows = [{
10
- id: 1,
11
- lastName: "Snow",
12
- firstName: "Jon"
13
- }, {
14
- id: 2,
15
- lastName: "Lannister",
16
- firstName: "Cersei"
17
- }, {
18
- id: 3,
19
- lastName: "Lannister",
20
- firstName: "Jaime"
21
- }, {
22
- id: 4,
23
- lastName: "Stark",
24
- firstName: "Arya"
25
- }, {
26
- id: 5,
27
- lastName: "Targaryen",
28
- firstName: "Daenerys"
29
- }, {
30
- id: 6,
31
- lastName: "Melisandre",
32
- firstName: null
33
- }, {
34
- id: 7,
35
- lastName: "Clifford",
36
- firstName: "Ferrara"
37
- }, {
38
- id: 8,
39
- lastName: "Frances",
40
- firstName: "Rossini"
41
- }, {
42
- id: 9,
43
- lastName: "Roxie",
44
- firstName: "Harvey"
45
- }];
46
- var exampleColumns = [{
47
- field: "firstName",
48
- headerName: "First name",
49
- flex: 1
50
- }, {
51
- field: "lastName",
52
- headerName: "Last name",
53
- flex: 1
54
- }];
55
- export default {
56
- title: "components/dataGrid/DataGrid"
57
- };
58
- export var Default = {
59
- args: {
60
- density: "standard"
61
- },
62
- argTypes: {
63
- density: {
64
- name: "Density",
65
- control: "select",
66
- options: ["standard", "comfortable", "compact"]
67
- }
68
- },
69
- render: function render(_ref) {
70
- var density = _ref.density;
71
- var ToolbarForGrid = function ToolbarForGrid() {
72
- return /*#__PURE__*/_jsxs(DataGridToolbar, {
73
- children: [/*#__PURE__*/_jsx(ToolbarTitleItem, {
74
- children: "DataGrid example"
75
- }), /*#__PURE__*/_jsx(FillSpace, {}), /*#__PURE__*/_jsx(Button, {
76
- startIcon: /*#__PURE__*/_jsx(Add, {}),
77
- children: "Add"
78
- })]
79
- });
80
- };
81
- return /*#__PURE__*/_jsx(Box, {
82
- height: 400,
83
- children: /*#__PURE__*/_jsx(DataGrid, {
84
- density: density,
85
- rows: exampleRows,
86
- columns: exampleColumns,
87
- slots: {
88
- toolbar: ToolbarForGrid
89
- },
90
- showToolbar: true
91
- })
92
- });
93
- }
94
- };