@zac-apps/commons 1.0.1 → 1.0.3

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/index.js ADDED
@@ -0,0 +1,656 @@
1
+ 'use strict';
2
+
3
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
+ var React = require('react');
5
+ var Snackbar = require('@mui/material/Snackbar');
6
+ var MuiAlert = require('@mui/material/Alert');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+ var Grid = require('@mui/material/Unstable_Grid2');
9
+ var Accordion = require('@mui/material/Accordion');
10
+ var AccordionSummary = require('@mui/material/AccordionSummary');
11
+ var AccordionDetails = require('@mui/material/AccordionDetails');
12
+ var Typography = require('@mui/material/Typography');
13
+ var ExpandMoreIcon = require('@mui/icons-material/ExpandMore');
14
+ var styles = require('@mui/material/styles');
15
+ var red = require('@mui/material/colors/red');
16
+ var pink = require('@mui/material/colors/pink');
17
+ var lightGreen = require('@mui/material/colors/lightGreen');
18
+ var green = require('@mui/material/colors/green');
19
+ var yellow = require('@mui/material/colors/yellow');
20
+ var Table = require('@mui/material/Table');
21
+ var TableContainer = require('@mui/material/TableContainer');
22
+ var Paper = require('@mui/material/Paper');
23
+ var Link = require('next/link');
24
+ var Link$1 = require('@mui/material/Link');
25
+ var CssBaseline = require('@mui/material/CssBaseline');
26
+ var react = require('@emotion/react');
27
+ var Box = require('@mui/material/Box');
28
+ var navigation = require('next/navigation');
29
+ var createCache = require('@emotion/cache');
30
+ var AppBar = require('@mui/material/AppBar');
31
+ var Toolbar = require('@mui/material/Toolbar');
32
+ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
33
+ var IconButton = require('@mui/material/IconButton');
34
+ var MenuItem = require('@mui/material/MenuItem');
35
+ var Menu = require('@mui/material/Menu');
36
+ var Divider = require('@mui/material/Divider');
37
+ var MenuIcon = require('@mui/icons-material/Menu');
38
+ var MenuOpenIcon = require('@mui/icons-material/MenuOpen');
39
+ var footer_content_js = require('../../../../conf/footer_content.js');
40
+ var CircularProgress = require('@mui/material/CircularProgress');
41
+ var ToggleButtonGroup = require('@mui/material/ToggleButtonGroup');
42
+ var ToggleButton = require('@mui/material/ToggleButton');
43
+ var Image = require('next/image');
44
+ var Button = require('@mui/material/Button');
45
+ var TableCell = require('@mui/material/TableCell');
46
+ var useMediaQuery = require('@mui/material/useMediaQuery');
47
+ var Drawer = require('@mui/material/Drawer');
48
+ var List = require('@mui/material/List');
49
+ var ListItem = require('@mui/material/ListItem');
50
+ var ManageSearchIcon = require('@mui/icons-material/ManageSearch');
51
+ var CloseIcon = require('@mui/icons-material/Close');
52
+
53
+ function _interopNamespaceDefault(e) {
54
+ var n = Object.create(null);
55
+ if (e) {
56
+ Object.keys(e).forEach(function (k) {
57
+ if (k !== 'default') {
58
+ var d = Object.getOwnPropertyDescriptor(e, k);
59
+ Object.defineProperty(n, k, d.get ? d : {
60
+ enumerable: true,
61
+ get: function () { return e[k]; }
62
+ });
63
+ }
64
+ });
65
+ }
66
+ n.default = e;
67
+ return Object.freeze(n);
68
+ }
69
+
70
+ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
71
+
72
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
73
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
74
+ var Alert = /*#__PURE__*/React.forwardRef(function Alert(props, ref) {
75
+ return /*#__PURE__*/jsxRuntime.jsx(MuiAlert, _objectSpread({
76
+ elevation: 6,
77
+ ref: ref,
78
+ variant: "filled"
79
+ }, props));
80
+ });
81
+ function ErrorAlert(_ref) {
82
+ var alert = _ref.alert,
83
+ SetAlert = _ref.SetAlert,
84
+ message = _ref.message;
85
+ var handleClose = function handleClose(event, reason) {
86
+ if (reason === "clickaway") {
87
+ return;
88
+ }
89
+ SetAlert(false);
90
+ };
91
+ return /*#__PURE__*/jsxRuntime.jsx(Snackbar, {
92
+ open: alert,
93
+ autoHideDuration: 3000,
94
+ onClose: handleClose,
95
+ children: /*#__PURE__*/jsxRuntime.jsx(Alert, {
96
+ severity: "error",
97
+ onClose: handleClose,
98
+ sx: {
99
+ width: "100%"
100
+ },
101
+ children: message
102
+ })
103
+ });
104
+ }
105
+
106
+ var AppTheme = styles.createTheme({
107
+ palette: {
108
+ primary: {
109
+ main: "#c1002a"
110
+ },
111
+ secondary: {
112
+ main: "#636363"
113
+ },
114
+ error: {
115
+ main: pink[900]
116
+ },
117
+ running: {
118
+ main: red[900],
119
+ contrastText: "#fff"
120
+ },
121
+ available: {
122
+ main: lightGreen[200],
123
+ contrastText: "#000"
124
+ },
125
+ info: {
126
+ main: pink[100]
127
+ },
128
+ success: {
129
+ main: yellow[500]
130
+ },
131
+ empty: {
132
+ main: green[500],
133
+ contrastText: "#000"
134
+ }
135
+ }
136
+ });
137
+
138
+ function AppCard(props) {
139
+ return /*#__PURE__*/jsxRuntime.jsx(Grid, {
140
+ xs: props.xs || props.size || 12,
141
+ lg: props.lg || props.size || 6,
142
+ md: props.md || 12,
143
+ children: /*#__PURE__*/jsxRuntime.jsxs(Accordion, {
144
+ defaultExpanded: !props.collapsed,
145
+ square: false,
146
+ elevation: 2,
147
+ children: [/*#__PURE__*/jsxRuntime.jsx(AccordionSummary, {
148
+ expandIcon: /*#__PURE__*/jsxRuntime.jsx(ExpandMoreIcon, {}),
149
+ sx: {
150
+ backgroundColor: AppTheme.palette.divider
151
+ },
152
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
153
+ variant: "h5",
154
+ children: props.title
155
+ })
156
+ }), /*#__PURE__*/jsxRuntime.jsx(AccordionDetails, {
157
+ children: props.children
158
+ })]
159
+ })
160
+ });
161
+ }
162
+
163
+ function AppGrid(_ref) {
164
+ var children = _ref.children,
165
+ reverse = _ref.reverse;
166
+ var wrapper = reverse ? "wrap-reverse" : "wrap";
167
+ return /*#__PURE__*/jsxRuntime.jsx(Grid, {
168
+ container: true,
169
+ spacing: 2,
170
+ sx: {
171
+ display: "flex",
172
+ flexGrow: 1,
173
+ justifyContent: "center",
174
+ flexWrap: wrapper
175
+ },
176
+ children: children
177
+ });
178
+ }
179
+
180
+ function AppTable(_ref) {
181
+ var children = _ref.children;
182
+ return /*#__PURE__*/jsxRuntime.jsx(TableContainer, {
183
+ component: Paper,
184
+ children: /*#__PURE__*/jsxRuntime.jsx(Table, {
185
+ size: "small",
186
+ "aria-label": "a dense table",
187
+ children: children
188
+ })
189
+ });
190
+ }
191
+
192
+ // prepend: true moves MUI styles to the top of the <head> so they're loaded first.
193
+ // It allows developers to easily override MUI styles with other styling solutions, like CSS modules.
194
+ function createEmotionCache() {
195
+ return createCache({
196
+ key: "css",
197
+ prepend: true
198
+ });
199
+ }
200
+
201
+ function AppMenu(_ref) {
202
+ var title = _ref.title,
203
+ children = _ref.children;
204
+ if (!title) {
205
+ title = "JGU-ZAC Apps";
206
+ }
207
+ return /*#__PURE__*/jsxRuntime.jsx(AppBar, {
208
+ position: "sticky",
209
+ children: /*#__PURE__*/jsxRuntime.jsxs(Toolbar, {
210
+ children: [children, "\u2003", /*#__PURE__*/jsxRuntime.jsx(Typography, {
211
+ variant: "h6",
212
+ component: "div",
213
+ sx: {
214
+ flexGrow: 1
215
+ },
216
+ children: title
217
+ }), /*#__PURE__*/jsxRuntime.jsx("img", {
218
+ src: "/zac_logo.png",
219
+ width: "48px",
220
+ alt: "zac-logo"
221
+ })]
222
+ })
223
+ });
224
+ }
225
+
226
+ function MenuButton(_ref) {
227
+ var anchorEl = _ref.anchorEl;
228
+ if (anchorEl) {
229
+ return /*#__PURE__*/jsxRuntime.jsx(MenuOpenIcon, {});
230
+ } else {
231
+ return /*#__PURE__*/jsxRuntime.jsx(MenuIcon, {});
232
+ }
233
+ }
234
+
235
+ function NextListMenu(_ref) {
236
+ var availApps = _ref.availApps,
237
+ start = _ref.start;
238
+ var _React$useState = React__namespace.useState(null),
239
+ _React$useState2 = _slicedToArray(_React$useState, 2),
240
+ anchorEl = _React$useState2[0],
241
+ setAnchorEl = _React$useState2[1];
242
+ var open = Boolean(anchorEl);
243
+ var handleClickListItem = function handleClickListItem(event) {
244
+ setAnchorEl(event.currentTarget);
245
+ };
246
+ var handleClose = function handleClose() {
247
+ setAnchorEl(null);
248
+ };
249
+ var pathname = navigation.usePathname();
250
+ var basePath = process.env.basePath;
251
+ function StartEntry() {
252
+ if (start) {
253
+ return /*#__PURE__*/jsxRuntime.jsxs(React__namespace.Fragment, {
254
+ children: [/*#__PURE__*/jsxRuntime.jsx(MenuItem, {
255
+ component: Link,
256
+ href: basePath,
257
+ selected: pathname === basePath,
258
+ onClick: handleClose,
259
+ children: "Start"
260
+ }), /*#__PURE__*/jsxRuntime.jsx(Divider, {})]
261
+ });
262
+ } else return null;
263
+ }
264
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
265
+ children: [/*#__PURE__*/jsxRuntime.jsx(IconButton, {
266
+ size: "large",
267
+ edge: "start",
268
+ color: "inherit",
269
+ "aria-label": "menu",
270
+ sx: {
271
+ mr: 2
272
+ },
273
+ onClick: handleClickListItem,
274
+ children: /*#__PURE__*/jsxRuntime.jsx(MenuButton, {
275
+ anchorEl: anchorEl
276
+ })
277
+ }), /*#__PURE__*/jsxRuntime.jsxs(Menu, {
278
+ id: "lock-menu",
279
+ anchorEl: anchorEl,
280
+ open: open,
281
+ onClose: handleClose,
282
+ MenuListProps: {
283
+ "aria-labelledby": "lock-button",
284
+ role: "listbox"
285
+ },
286
+ children: [/*#__PURE__*/jsxRuntime.jsx(StartEntry, {}), availApps.map(function (option, index) {
287
+ return /*#__PURE__*/jsxRuntime.jsx(MenuItem, {
288
+ component: Link,
289
+ href: option.path,
290
+ selected: pathname === option.path + "/",
291
+ onClick: handleClose,
292
+ children: option.name
293
+ }, option.name);
294
+ })]
295
+ })]
296
+ });
297
+ }
298
+
299
+ function Footer() {
300
+ return /*#__PURE__*/jsxRuntime.jsx(React.Fragment, {
301
+ children: /*#__PURE__*/jsxRuntime.jsx(Grid, {
302
+ sx: {
303
+ p: 1,
304
+ backgroundColor: AppTheme.palette.divider,
305
+ display: "flex",
306
+ flexDirection: "row",
307
+ justifyContent: "center",
308
+ alignItems: "center",
309
+ minHeight: 64
310
+ },
311
+ children: /*#__PURE__*/jsxRuntime.jsx(Grid, {
312
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
313
+ variant: "body2",
314
+ children: footer_content_js.footerContent
315
+ })
316
+ })
317
+ })
318
+ });
319
+ }
320
+
321
+ var clientSideEmotionCache = createEmotionCache();
322
+ function AppWrapper(_ref) {
323
+ var title = _ref.title,
324
+ availApps = _ref.availApps,
325
+ children = _ref.children;
326
+ var basePath = process.env.basePath;
327
+ return /*#__PURE__*/jsxRuntime.jsx(react.CacheProvider, {
328
+ value: clientSideEmotionCache,
329
+ children: /*#__PURE__*/jsxRuntime.jsxs(styles.ThemeProvider, {
330
+ theme: AppTheme,
331
+ children: [/*#__PURE__*/jsxRuntime.jsx(CssBaseline, {}), /*#__PURE__*/jsxRuntime.jsx(AppMenu, {
332
+ title: /*#__PURE__*/jsxRuntime.jsx(Link$1, {
333
+ sx: {
334
+ color: AppTheme.palette.primary.contrastText
335
+ },
336
+ href: basePath,
337
+ component: Link.Link,
338
+ children: title
339
+ }),
340
+ children: /*#__PURE__*/jsxRuntime.jsx(NextListMenu, {
341
+ availApps: availApps,
342
+ start: true
343
+ })
344
+ }), /*#__PURE__*/jsxRuntime.jsx(Box, {
345
+ sx: {
346
+ p: 3,
347
+ minHeight: "calc(100% - 128px)",
348
+ display: "flex",
349
+ justifyContent: "center"
350
+ },
351
+ children: children
352
+ }), /*#__PURE__*/jsxRuntime.jsx(Footer, {})]
353
+ })
354
+ });
355
+ }
356
+
357
+ function DivTitle(_ref) {
358
+ var children = _ref.children;
359
+ return /*#__PURE__*/jsxRuntime.jsx(Divider, {
360
+ textAlign: "left",
361
+ children: children
362
+ });
363
+ }
364
+
365
+ function Percentage(number) {
366
+ var resultStr = number.toString() + " %";
367
+ return resultStr;
368
+ }
369
+
370
+ var PreferenceContext = /*#__PURE__*/React.createContext(null);
371
+
372
+ function Progress() {
373
+ return /*#__PURE__*/jsxRuntime.jsx(Grid, {
374
+ container: true,
375
+ sx: {
376
+ display: "flex",
377
+ flexGrow: 1,
378
+ justifyContent: "center",
379
+ alignContent: "center"
380
+ },
381
+ children: /*#__PURE__*/jsxRuntime.jsx(CircularProgress, {})
382
+ });
383
+ }
384
+
385
+ function PublicFetch(_ref) {
386
+ var url = _ref.url,
387
+ SetState = _ref.SetState,
388
+ SetMetaData = _ref.SetMetaData,
389
+ reload = _ref.reload,
390
+ SetReload = _ref.SetReload;
391
+ var _useState = React.useState(),
392
+ _useState2 = _slicedToArray(_useState, 2),
393
+ internal = _useState2[0],
394
+ SetInternal = _useState2[1];
395
+ var state = null;
396
+ if (!SetState) {
397
+ SetState = SetInternal;
398
+ state = internal;
399
+ }
400
+ if (!reload) {
401
+ reload = false;
402
+ }
403
+ React.useEffect(function () {
404
+ fetch(url, {
405
+ headers: {
406
+ "Content-Type": "application/json",
407
+ Accept: "application/json"
408
+ }
409
+ }).then(function (response) {
410
+ if (SetMetaData) {
411
+ SetMetaData(response.headers);
412
+ }
413
+ console.log(response);
414
+ return response.json();
415
+ }).then(function (json) {
416
+ console.log(json);
417
+ SetState(json);
418
+ });
419
+ if (SetReload) {
420
+ SetReload(false);
421
+ }
422
+ }, [reload]);
423
+ return state;
424
+ }
425
+
426
+ function RespGrid(_ref) {
427
+ var children = _ref.children,
428
+ matches = _ref.matches,
429
+ justify = _ref.justify;
430
+ if (matches) {
431
+ return /*#__PURE__*/jsxRuntime.jsx(Grid, {
432
+ sx: {
433
+ display: "flex",
434
+ justifyContent: justify,
435
+ alignItems: "center"
436
+ },
437
+ children: children
438
+ });
439
+ } else {
440
+ return /*#__PURE__*/jsxRuntime.jsx(Grid, {
441
+ sx: {
442
+ display: "flex",
443
+ flexDirection: "column",
444
+ justifyContent: "center",
445
+ alignItems: "center"
446
+ },
447
+ children: children
448
+ });
449
+ }
450
+ }
451
+
452
+ function SpecSwitch(_ref) {
453
+ var listmode = _ref.listmode,
454
+ setup = _ref.setup,
455
+ spec = _ref.spec,
456
+ SetSpec = _ref.SetSpec,
457
+ SetFilter = _ref.SetFilter,
458
+ routerActive = _ref.routerActive;
459
+ var router = navigation.useRouter();
460
+ var pathname = navigation.usePathname();
461
+ return /*#__PURE__*/jsxRuntime.jsx(React.Fragment, {
462
+ children: /*#__PURE__*/jsxRuntime.jsx(Grid, {
463
+ children: /*#__PURE__*/jsxRuntime.jsx(ToggleButtonGroup, {
464
+ value: spec,
465
+ exclusive: true,
466
+ color: "primary",
467
+ onChange: function onChange(event, value) {
468
+ if (value !== null) {
469
+ SetSpec(value);
470
+ SetFilter ? SetFilter({}) : null;
471
+ routerActive ? router.push(pathname + "?spec=" + value + "&mode=" + listmode) : null;
472
+ }
473
+ },
474
+ size: "small",
475
+ children: Object.keys(setup).map(function (entry) {
476
+ return /*#__PURE__*/jsxRuntime.jsx(ToggleButton, {
477
+ value: entry,
478
+ children: entry
479
+ }, "spec_" + entry);
480
+ })
481
+ })
482
+ })
483
+ });
484
+ }
485
+
486
+ function Start(_ref) {
487
+ var availApps = _ref.availApps;
488
+ return /*#__PURE__*/jsxRuntime.jsx(Grid, {
489
+ children: /*#__PURE__*/jsxRuntime.jsxs(AppCard, {
490
+ title: "Welcome to ZAC Apps",
491
+ xs: 12,
492
+ lg: 8,
493
+ children: [/*#__PURE__*/jsxRuntime.jsx("p", {
494
+ children: "Select an app to get started."
495
+ }), /*#__PURE__*/jsxRuntime.jsx(Grid, {
496
+ container: true,
497
+ sx: {
498
+ display: "flex",
499
+ flexWrap: "wrap",
500
+ justifyContent: "center"
501
+ },
502
+ children: availApps.map(function (app) {
503
+ return /*#__PURE__*/jsxRuntime.jsxs(Button, {
504
+ sx: {
505
+ m: 5,
506
+ minWidth: 250,
507
+ display: "flex",
508
+ flexDirection: "column"
509
+ },
510
+ variant: "outlined",
511
+ component: Link,
512
+ href: app.path,
513
+ children: [/*#__PURE__*/jsxRuntime.jsx("p", {
514
+ children: /*#__PURE__*/jsxRuntime.jsx(Image, {
515
+ src: app.icon,
516
+ alt: app.name,
517
+ height: 100
518
+ })
519
+ }), /*#__PURE__*/jsxRuntime.jsx("p", {
520
+ children: app.name
521
+ })]
522
+ }, "button_" + app.path);
523
+ })
524
+ })]
525
+ })
526
+ });
527
+ }
528
+
529
+ var TableHeadCell = styles.styled(TableCell)(function (_ref) {
530
+ var theme = _ref.theme;
531
+ return _defineProperty(_defineProperty({}, "&.".concat(TableCell.tableCellClasses.head), {
532
+ backgroundColor: theme.palette.divider
533
+ }), "&.".concat(TableCell.tableCellClasses.body), {
534
+ fontSize: 14
535
+ });
536
+ });
537
+
538
+ function useFetch(_ref) {
539
+ var url = _ref.url,
540
+ reload = _ref.reload,
541
+ SetReload = _ref.SetReload;
542
+ // Define states for data and metadata
543
+
544
+ var _useState = React.useState(),
545
+ _useState2 = _slicedToArray(_useState, 2),
546
+ data = _useState2[0],
547
+ SetData = _useState2[1];
548
+ var _useState3 = React.useState(),
549
+ _useState4 = _slicedToArray(_useState3, 2),
550
+ metadata = _useState4[0],
551
+ SetMetadata = _useState4[1];
552
+
553
+ // Fetch data from url
554
+
555
+ React.useEffect(function () {
556
+ fetch(url, {
557
+ headers: {
558
+ "Content-Type": "application/json",
559
+ Accept: "application/json"
560
+ }
561
+ }).then(function (response) {
562
+ SetMetadata(response.headers);
563
+ console.log(response);
564
+ return response.json();
565
+ }).then(function (json) {
566
+ console.log(json);
567
+ SetData(json);
568
+ });
569
+ if (reload) {
570
+ SetReload(false); // Reset reload state
571
+ }
572
+ }, [reload]); // Fetch is triggered by reload state
573
+
574
+ // Return data and metadata as object
575
+
576
+ var internal = {
577
+ data: data,
578
+ metadata: metadata
579
+ };
580
+ return internal;
581
+ }
582
+
583
+ function AppDrawer(_ref) {
584
+ var children = _ref.children;
585
+ var matches = useMediaQuery(AppTheme.breakpoints.up("lg"));
586
+ var _useState = React.useState(false),
587
+ _useState2 = _slicedToArray(_useState, 2),
588
+ open = _useState2[0],
589
+ SetOpen = _useState2[1];
590
+ var toggleDrawer = function toggleDrawer(state) {
591
+ return function (event) {
592
+ if (event.type === "keydown" && (event.key === "Tab" || event.key === "Shift")) {
593
+ return;
594
+ }
595
+ SetOpen(state);
596
+ };
597
+ };
598
+ var list = function list() {
599
+ return /*#__PURE__*/jsxRuntime.jsx(Box, {
600
+ role: "presentation",
601
+ width: matches ? "420px" : "100%",
602
+ children: /*#__PURE__*/jsxRuntime.jsxs(List, {
603
+ children: [/*#__PURE__*/jsxRuntime.jsx(ListItem, {
604
+ sx: {
605
+ justifyContent: "right"
606
+ },
607
+ children: /*#__PURE__*/jsxRuntime.jsx(IconButton, {
608
+ onClick: toggleDrawer(false),
609
+ children: /*#__PURE__*/jsxRuntime.jsx(CloseIcon, {})
610
+ })
611
+ }), /*#__PURE__*/jsxRuntime.jsx(Divider, {}), children]
612
+ })
613
+ });
614
+ };
615
+ return /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
616
+ children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
617
+ variant: "outlined",
618
+ onClick: toggleDrawer(true),
619
+ startIcon: /*#__PURE__*/jsxRuntime.jsx(ManageSearchIcon, {
620
+ fontSize: "inherit"
621
+ }),
622
+ children: "Search/Filter"
623
+ }), /*#__PURE__*/jsxRuntime.jsx(Drawer, {
624
+ anchor: "left",
625
+ open: open,
626
+ onClose: toggleDrawer(false),
627
+ sx: {
628
+ maxWidth: "350px"
629
+ },
630
+ children: list()
631
+ })]
632
+ });
633
+ }
634
+
635
+ exports.Alert = ErrorAlert;
636
+ exports.AppCard = AppCard;
637
+ exports.AppDrawer = AppDrawer;
638
+ exports.AppGrid = AppGrid;
639
+ exports.AppMenu = AppMenu;
640
+ exports.AppTable = AppTable;
641
+ exports.AppTheme = AppTheme;
642
+ exports.AppWrapper = AppWrapper;
643
+ exports.DivTitle = DivTitle;
644
+ exports.Footer = Footer;
645
+ exports.MenuButton = MenuButton;
646
+ exports.NextListMenu = NextListMenu;
647
+ exports.Percentage = Percentage;
648
+ exports.PreferenceContext = PreferenceContext;
649
+ exports.Progress = Progress;
650
+ exports.PublicFetch = PublicFetch;
651
+ exports.RespGrid = RespGrid;
652
+ exports.SpecSwitch = SpecSwitch;
653
+ exports.Start = Start;
654
+ exports.TableHeadCell = TableHeadCell;
655
+ exports.createEmotionCache = createEmotionCache;
656
+ exports.useFetch = useFetch;
package/package.json CHANGED
@@ -1,67 +1,66 @@
1
1
  {
2
- "name": "@zac-apps/commons",
3
- "version": "1.0.1",
4
- "scripts": {
5
- "rollup": "node_modules/rollup/dist/rollup.js",
6
- "dev": "next dev",
7
- "build": "rollup -c",
8
- "start": "next start",
9
- "lint": "next lint",
10
- "storybook": "storybook dev -p 6006",
11
- "build-storybook": "storybook build",
12
- "semantic-release": "semantic-release"
13
- },
14
- "main": "dist/index.js",
15
- "publishConfig": {
16
- "access": "public"
17
- },
18
- "files": [
19
- "dist",
20
- "assets"
21
- ],
22
- "repository": {
23
- "type": "git",
24
- "url": "https://gitlab.rlp.net/liermann/zac-apps-commons.git"
25
- },
26
- "keywords": [
27
- "JGU"
28
- ],
29
- "author": "ZAC",
30
- "license": "CC-BY-SA-4.0",
31
- "dependencies": {
32
- "@emotion/styled": "^11.11.0",
33
- "@fontsource/roboto": "^5.0.8",
34
- "@mui/icons-material": "^5.14.16",
35
- "@mui/material": "^5.14.17",
36
- "@mui/x-date-pickers": "^6.18.1",
37
- "next": "14.0.3",
38
- "react": "^18",
39
- "react-dom": "^18"
40
- },
41
- "devDependencies": {
42
- "@babel/plugin-transform-runtime": "^7.23.4",
43
- "@rollup/plugin-babel": "^6.0.4",
44
- "@rollup/plugin-commonjs": "^25.0.7",
45
- "@rollup/plugin-json": "^6.0.1",
46
- "@rollup/plugin-node-resolve": "^15.2.3",
47
- "@semantic-release/git": "^10.0.1",
48
- "@semantic-release/gitlab": "^12.1.1",
49
- "@semantic-release/npm": "^11.0.1",
50
- "@storybook/addon-essentials": "^7.6.1",
51
- "@storybook/addon-interactions": "^7.6.1",
52
- "@storybook/addon-links": "^7.6.1",
53
- "@storybook/addon-onboarding": "^1.0.8",
54
- "@storybook/blocks": "^7.6.1",
55
- "@storybook/nextjs": "^7.6.1",
56
- "@storybook/react": "^7.6.1",
57
- "@storybook/test": "^7.6.1",
58
- "babel-loader": "^9.1.3",
59
- "eslint": "^8",
60
- "eslint-config-next": "14.0.3",
61
- "eslint-plugin-storybook": "^0.6.15",
62
- "rollup": "^4.6.0",
63
- "semantic-release": "^22.0.8",
64
- "storybook": "^7.6.1"
65
- },
66
- "description": "This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app)."
2
+ "name": "@zac-apps/commons",
3
+ "version": "1.0.3",
4
+ "scripts": {
5
+ "rollup": "node_modules/rollup/dist/rollup.js",
6
+ "dev": "next dev",
7
+ "build": "rollup -c",
8
+ "start": "next start",
9
+ "lint": "next lint",
10
+ "storybook": "storybook dev -p 6006",
11
+ "build-storybook": "storybook build",
12
+ "semantic-release": "semantic-release"
13
+ },
14
+ "main": "dist/index.js",
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://gitlab.rlp.net/liermann/zac-apps-commons.git"
24
+ },
25
+ "keywords": [
26
+ "JGU"
27
+ ],
28
+ "author": "ZAC",
29
+ "license": "CC-BY-SA-4.0",
30
+ "dependencies": {
31
+ "@emotion/styled": "^11.11.0",
32
+ "@fontsource/roboto": "^5.0.8",
33
+ "@mui/icons-material": "^5.14.16",
34
+ "@mui/material": "^5.14.17",
35
+ "@mui/x-date-pickers": "^6.18.1",
36
+ "next": "14.0.3",
37
+ "react": "^18",
38
+ "react-dom": "^18"
39
+ },
40
+ "devDependencies": {
41
+ "@babel/plugin-transform-runtime": "^7.23.4",
42
+ "@rollup/plugin-babel": "^6.0.4",
43
+ "@rollup/plugin-commonjs": "^25.0.7",
44
+ "@rollup/plugin-json": "^6.0.1",
45
+ "@rollup/plugin-node-resolve": "^15.2.3",
46
+ "@semantic-release/git": "^10.0.1",
47
+ "@semantic-release/gitlab": "^12.1.1",
48
+ "@semantic-release/npm": "^11.0.1",
49
+ "@storybook/addon-essentials": "^7.6.1",
50
+ "@storybook/addon-interactions": "^7.6.1",
51
+ "@storybook/addon-links": "^7.6.1",
52
+ "@storybook/addon-onboarding": "^1.0.8",
53
+ "@storybook/blocks": "^7.6.1",
54
+ "@storybook/nextjs": "^7.6.1",
55
+ "@storybook/react": "^7.6.1",
56
+ "@storybook/test": "^7.6.1",
57
+ "babel-loader": "^9.1.3",
58
+ "eslint": "^8",
59
+ "eslint-config-next": "14.0.3",
60
+ "eslint-plugin-storybook": "^0.6.15",
61
+ "rollup": "^4.6.0",
62
+ "semantic-release": "^22.0.8",
63
+ "storybook": "^7.6.1"
64
+ },
65
+ "description": "This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app)."
67
66
  }
@@ -1,26 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <svg version="1.1" id="Ebene_2_00000041285400425215995260000013550099538385769899_"
4
- xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 73.2 110.2"
5
- style="enable-background:new 0 0 73.2 110.2;" xml:space="preserve">
6
- <style type="text/css">
7
- .st0{fill:#636363;}
8
- </style>
9
- <g id="Ebene_1-2">
10
- <g>
11
- <path class="st0" d="M30.9,52.6v10.7c2.9-1.2,5.4-3.1,7.6-5.5v-0.7h0.6c1.4-1.7,2.6-3.6,3.4-5.8c0.3-0.6,0.6-1.2,0.8-1.8h-9.4
12
- C32.3,49.5,30.9,50.9,30.9,52.6L30.9,52.6z"/>
13
- <path class="st0" d="M28.4,52.6c0-3,2.5-5.5,5.5-5.5h10.1c1-4.6,0.5-10-2.2-13.5c1.4,5.5-4.3,11-9.9,8.7
14
- c-4.7-1.7-6.5-7.1-3.2-11.8c7.3-9.8,2-25.1-10.2-30.5c5.5,10.4-2.9,20.1-7.8,24.1c-4.8,4-8.1,8.2-9.1,10.6
15
- C-3.3,46.7,4,58.1,9,60.8c-2.3-5.2-4.4-15,4.5-24.2c0,0-2.6,9.8,3,16.7c5.6,6.8,5.5,11.9,5.5,11.9c2.1,0,4.3-0.3,6.3-0.9
16
- L28.4,52.6L28.4,52.6z"/>
17
- </g>
18
- <path class="st0" d="M65.7,69.3H38.4V57.1h27.2V69.3L65.7,69.3z M65.7,79.9h-4.5v-4.5h4.5V79.9L65.7,79.9z M65.7,87.4h-4.5v-4.5
19
- h4.5V87.4L65.7,87.4z M65.7,95h-4.5v-4.5h4.5V95L65.7,95z M65.7,102.6h-4.5V98h4.5V102.6L65.7,102.6z M58.1,79.9h-4.5v-4.5h4.5
20
- V79.9L58.1,79.9z M58.1,87.4h-4.5v-4.5h4.5V87.4L58.1,87.4z M58.1,95h-4.5v-4.5h4.5V95L58.1,95z M58.1,102.6h-4.5V98h4.5V102.6
21
- L58.1,102.6z M50.5,79.8H46v-4.5h4.5V79.8L50.5,79.8z M50.5,87.4H46v-4.5h4.5V87.4L50.5,87.4z M50.5,95H46v-4.5h4.5V95L50.5,95z
22
- M50.5,102.6H38.4V98h12.1V102.6L50.5,102.6z M38.4,90.4H43V95h-4.5V90.4L38.4,90.4z M38.4,82.9H43v4.5h-4.5V82.9L38.4,82.9z
23
- M38.4,75.3H43v4.5h-4.5V75.3L38.4,75.3z M70.2,49.5H33.9c-1.7,0-3,1.4-3,3v54.5c0,1.7,1.4,3,3,3h36.3c1.7,0,3-1.4,3-3V52.6
24
- C73.2,50.9,71.9,49.5,70.2,49.5L70.2,49.5z"/>
25
- </g>
26
- </svg>
@@ -1,36 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <svg version="1.1" id="Ebene_2_00000039106019328201254260000005025511527933610673_"
4
- xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 85.5 106.1"
5
- style="enable-background:new 0 0 85.5 106.1;" xml:space="preserve">
6
- <style type="text/css">
7
- .st0{fill:#636363;}
8
- </style>
9
- <g id="Ebene_1-2">
10
- <g>
11
- <path class="st0" d="M19.6,13.6c0,2.5-2,4.5-4.5,4.5s-4.5-2-4.5-4.5s2-4.5,4.5-4.5S19.6,11.1,19.6,13.6L19.6,13.6z"/>
12
- <path class="st0" d="M15.1,2.3c0,1.3-1,2.3-2.3,2.3s-2.3-1-2.3-2.3s1-2.3,2.3-2.3S15.1,1,15.1,2.3L15.1,2.3z"/>
13
- <path class="st0" d="M28,15.9c0,1.3-1,2.3-2.3,2.3s-2.3-1-2.3-2.3s1-2.3,2.3-2.3S28,14.7,28,15.9L28,15.9z"/>
14
- <path class="st0" d="M30.2,6.1c0,1.7-1.4,3-3,3s-3-1.4-3-3s1.4-3,3-3S30.2,4.4,30.2,6.1C30.2,6.1,30.2,6.1,30.2,6.1z"/>
15
- </g>
16
- <g>
17
- <polygon class="st0" points="49,106.1 41.8,98.8 48.2,92.4 55.5,99.6 49,106.1 "/>
18
- <g>
19
- <path class="st0" d="M46.1,90.3L35,79.2c-6.5-6.5-6.5-17,0-23.6c6.5-6.5,17-6.5,23.5,0l11.1,11.1l6.4-6.4L65,49.2
20
- c-10.1-10.1-26.3-10.1-36.4,0s-10.1,26.4,0,36.4l11,11.1L46.1,90.3L46.1,90.3L46.1,90.3z"/>
21
- <g>
22
- <path class="st0" d="M33.3,53.9c1.8-1.8,3.9-3.2,6.1-4.1v-4.4c-3.4,1.1-6.4,3-9,5.6c-0.2,0.2-0.3,0.4-0.5,0.5h1.9v3h-4.3
23
- c-0.6,1-1.2,2-1.7,3h4.6C31.2,56.2,32.1,55,33.3,53.9L33.3,53.9z"/>
24
- <path class="st0" d="M39.4,62.1v-6.8c-0.9,0.6-1.8,1.2-2.6,2c-2.6,2.6-3.9,5.9-4.1,9.2h2.2C37.4,66.6,39.4,64.6,39.4,62.1z"/>
25
- <path class="st0" d="M22.7,52.7v-1.2h0.8c0.7-1,1.5-2.1,2.4-3h-3.2v-3H29c3.1-2.5,6.6-4.3,10.4-5.3V27.3c0-2.7,2.1-3.9,2.2-3.9
26
- c0.5-0.4,0.9-1.1,0.7-1.7c-0.2-0.7-0.8-1.1-1.4-1.1H1.5c-0.7,0-1.3,0.5-1.4,1.1s0.2,1.4,0.8,1.7c0,0,2.3,1.3,2.3,4v34.8
27
- c0,2.5,2,4.5,4.5,4.5h11C18.7,61.8,20.1,57,22.7,52.7L22.7,52.7z M31.8,42.4h-9.1v-3h9.1V42.4z M31.8,36.3h-9.1v-3h9.1V36.3z
28
- M6,29.5v-2.3c0-1.5-0.4-2.8-1-3.8h32.2c-0.5,1-1,2.3-1,3.8v1.4c-2.3-0.9-6.1-2.2-9.8-2.2c-4.1,0-6.6,0.7-9.2,1.4
29
- C14.5,28.6,11.6,29.4,6,29.5z"/>
30
- <path class="st0" d="M28.9,60.6h-4.3c-0.6,2-0.9,4-1,6.1h4.1C27.8,64.6,28.2,62.5,28.9,60.6z"/>
31
- </g>
32
- </g>
33
- <polygon class="st0" points="71.8,68.9 78.3,62.5 85.5,69.7 79.1,76.1 71.8,68.9 "/>
34
- </g>
35
- </g>
36
- </svg>