ish-ui 1.0.0-alpha.12
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/README.md +80 -0
- package/assets/fonts/inter/Inter-Italic.var.woff2 +0 -0
- package/assets/fonts/inter/Inter-Roman.var.woff2 +0 -0
- package/assets/fonts/inter/LICENSE.txt +92 -0
- package/assets/fonts/inter/index.d.ts +10 -0
- package/assets/fonts/inter/inter.scss +17 -0
- package/dist/actions/FieldProcessing.d.ts +10 -0
- package/dist/actions/FieldProcessing.js +17 -0
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.js +8 -0
- package/dist/appBar/AppBarHelpMenu.d.ts +3 -0
- package/dist/appBar/AppBarHelpMenu.js +77 -0
- package/dist/appBar/index.d.ts +2 -0
- package/dist/appBar/index.js +9 -0
- package/dist/buttons/AddButton.d.ts +14 -0
- package/dist/buttons/AddButton.js +9 -0
- package/dist/buttons/TimetableButton.d.ts +3 -0
- package/dist/buttons/TimetableButton.js +12 -0
- package/dist/buttons/index.d.ts +4 -0
- package/dist/buttons/index.js +11 -0
- package/dist/colorPicker/ColorPicker.d.ts +11 -0
- package/dist/colorPicker/ColorPicker.js +132 -0
- package/dist/colorPicker/index.d.ts +2 -0
- package/dist/colorPicker/index.js +9 -0
- package/dist/dialog/BrowserWarning.d.ts +3 -0
- package/dist/dialog/BrowserWarning.js +16 -0
- package/dist/dialog/confirm/ConfirmBase.d.ts +7 -0
- package/dist/dialog/confirm/ConfirmBase.js +29 -0
- package/dist/dialog/index.d.ts +5 -0
- package/dist/dialog/index.js +12 -0
- package/dist/dialog/message/Message.d.ts +3 -0
- package/dist/dialog/message/Message.js +91 -0
- package/dist/documents/DocumentIconsChooser.d.ts +3 -0
- package/dist/documents/DocumentIconsChooser.js +51 -0
- package/dist/documents/index.d.ts +3 -0
- package/dist/documents/index.js +10 -0
- package/dist/documents/utils/index.d.ts +7 -0
- package/dist/documents/utils/index.js +61 -0
- package/dist/dynamicSizeList/DynamicSizeList.d.ts +21 -0
- package/dist/dynamicSizeList/DynamicSizeList.js +169 -0
- package/dist/dynamicSizeList/index.d.ts +2 -0
- package/dist/dynamicSizeList/index.js +9 -0
- package/dist/fieldMessage/ErrorMessage.d.ts +8 -0
- package/dist/fieldMessage/ErrorMessage.js +14 -0
- package/dist/fieldMessage/WarningMessage.d.ts +8 -0
- package/dist/fieldMessage/WarningMessage.js +14 -0
- package/dist/fieldMessage/index.d.ts +6 -0
- package/dist/fieldMessage/index.js +13 -0
- package/dist/fieldMessage/styles.d.ts +3 -0
- package/dist/fieldMessage/styles.js +18 -0
- package/dist/fileUploader/FileUploaderDialog.d.ts +15 -0
- package/dist/fileUploader/FileUploaderDialog.js +99 -0
- package/dist/fileUploader/index.d.ts +2 -0
- package/dist/fileUploader/index.js +9 -0
- package/dist/formFields/CheckboxField.d.ts +7 -0
- package/dist/formFields/CheckboxField.js +67 -0
- package/dist/formFields/CodeEditorField.d.ts +6 -0
- package/dist/formFields/CodeEditorField.js +69 -0
- package/dist/formFields/ColoredCheckBox.d.ts +3 -0
- package/dist/formFields/ColoredCheckBox.js +41 -0
- package/dist/formFields/DateTimeField.d.ts +2 -0
- package/dist/formFields/DateTimeField.js +27 -0
- package/dist/formFields/EditInPlaceDateTimeField.d.ts +10 -0
- package/dist/formFields/EditInPlaceDateTimeField.js +188 -0
- package/dist/formFields/EditInPlaceDurationField.d.ts +4 -0
- package/dist/formFields/EditInPlaceDurationField.js +63 -0
- package/dist/formFields/EditInPlaceField.d.ts +10 -0
- package/dist/formFields/EditInPlaceField.js +58 -0
- package/dist/formFields/EditInPlaceFieldBase.d.ts +28 -0
- package/dist/formFields/EditInPlaceFieldBase.js +123 -0
- package/dist/formFields/EditInPlaceFileField.d.ts +7 -0
- package/dist/formFields/EditInPlaceFileField.js +60 -0
- package/dist/formFields/EditInPlaceMoneyField.d.ts +9 -0
- package/dist/formFields/EditInPlaceMoneyField.js +37 -0
- package/dist/formFields/EditInPlacePhoneField.d.ts +4 -0
- package/dist/formFields/EditInPlacePhoneField.js +69 -0
- package/dist/formFields/EditInPlaceSearchSelect.d.ts +4 -0
- package/dist/formFields/EditInPlaceSearchSelect.js +321 -0
- package/dist/formFields/FieldAdornments.d.ts +13 -0
- package/dist/formFields/FieldAdornments.js +27 -0
- package/dist/formFields/FilePreview.d.ts +17 -0
- package/dist/formFields/FilePreview.js +77 -0
- package/dist/formFields/FormRadioButtons.d.ts +3 -0
- package/dist/formFields/FormRadioButtons.js +27 -0
- package/dist/formFields/SelectCustomComponents.d.ts +5 -0
- package/dist/formFields/SelectCustomComponents.js +182 -0
- package/dist/formFields/Switch.d.ts +7 -0
- package/dist/formFields/Switch.js +116 -0
- package/dist/formFields/TextField.d.ts +6 -0
- package/dist/formFields/TextField.js +42 -0
- package/dist/formFields/UneditableBase.d.ts +17 -0
- package/dist/formFields/UneditableBase.js +48 -0
- package/dist/formFields/index.d.ts +31 -0
- package/dist/formFields/index.js +38 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +25 -0
- package/dist/layout/InfoPill.d.ts +7 -0
- package/dist/layout/InfoPill.js +26 -0
- package/dist/layout/index.d.ts +4 -0
- package/dist/layout/index.js +11 -0
- package/dist/layout/resizable/ResizableWrapper.d.ts +14 -0
- package/dist/layout/resizable/ResizableWrapper.js +42 -0
- package/dist/markdownEditor/HtmlEditor.d.ts +15 -0
- package/dist/markdownEditor/HtmlEditor.js +18 -0
- package/dist/markdownEditor/WysiwygEditor.d.ts +8 -0
- package/dist/markdownEditor/WysiwygEditor.js +100 -0
- package/dist/markdownEditor/index.d.ts +5 -0
- package/dist/markdownEditor/index.js +12 -0
- package/dist/markdownEditor/utils/index.d.ts +9 -0
- package/dist/markdownEditor/utils/index.js +38 -0
- package/dist/model/AppBar.d.ts +11 -0
- package/dist/model/AppBar.js +8 -0
- package/dist/model/CommomObjects.d.ts +5 -0
- package/dist/model/CommomObjects.js +1 -0
- package/dist/model/CommonFunctions.d.ts +8 -0
- package/dist/model/CommonFunctions.js +5 -0
- package/dist/model/Confirm.d.ts +16 -0
- package/dist/model/Confirm.js +8 -0
- package/dist/model/Fields.d.ts +250 -0
- package/dist/model/Fields.js +8 -0
- package/dist/model/NestedEntity.d.ts +9 -0
- package/dist/model/NestedEntity.js +5 -0
- package/dist/model/Theme.d.ts +34 -0
- package/dist/model/Theme.js +18 -0
- package/dist/model/index.d.ts +7 -0
- package/dist/model/index.js +14 -0
- package/dist/styles/GlobalStylesProvider.d.ts +3 -0
- package/dist/styles/GlobalStylesProvider.js +417 -0
- package/dist/styles/StylesProviderCustom.d.ts +3 -0
- package/dist/styles/StylesProviderCustom.js +6 -0
- package/dist/styles/animateStyles.d.ts +3 -0
- package/dist/styles/animateStyles.js +33 -0
- package/dist/styles/bootstrap.d.ts +491 -0
- package/dist/styles/bootstrap.js +496 -0
- package/dist/styles/hooks.d.ts +6 -0
- package/dist/styles/hooks.js +38 -0
- package/dist/styles/index.d.ts +11 -0
- package/dist/styles/index.js +18 -0
- package/dist/styles/makeStyles.d.ts +3 -0
- package/dist/styles/makeStyles.js +9 -0
- package/dist/styles/mixins/common.d.ts +8 -0
- package/dist/styles/mixins/common.js +32 -0
- package/dist/styles/mixins/keyframes.d.ts +3 -0
- package/dist/styles/mixins/keyframes.js +9 -0
- package/dist/styles/mixins/prefixer.d.ts +1 -0
- package/dist/styles/mixins/prefixer.js +23 -0
- package/dist/tagsInput/AddTagMenu.d.ts +11 -0
- package/dist/tagsInput/AddTagMenu.js +36 -0
- package/dist/tagsInput/AddTagMenuItem.d.ts +10 -0
- package/dist/tagsInput/AddTagMenuItem.js +26 -0
- package/dist/tagsInput/TagInputList.d.ts +2 -0
- package/dist/tagsInput/TagInputList.js +278 -0
- package/dist/tagsInput/index.d.ts +6 -0
- package/dist/tagsInput/index.js +6 -0
- package/dist/themes/appTheme.d.ts +4 -0
- package/dist/themes/appTheme.js +322 -0
- package/dist/themes/index.d.ts +2 -0
- package/dist/themes/index.js +9 -0
- package/dist/themes/ishTheme.d.ts +8 -0
- package/dist/themes/ishTheme.js +351 -0
- package/dist/timetable/datePeriodFilter/DayPeriodIcons.d.ts +8 -0
- package/dist/timetable/datePeriodFilter/DayPeriodIcons.js +27 -0
- package/dist/timetable/datePeriodFilter/index.d.ts +1 -0
- package/dist/timetable/datePeriodFilter/index.js +8 -0
- package/dist/timetable/index.d.ts +2 -0
- package/dist/timetable/index.js +9 -0
- package/dist/timetable/miniCalendar/CalendarDay.d.ts +15 -0
- package/dist/timetable/miniCalendar/CalendarDay.js +64 -0
- package/dist/timetable/miniCalendar/CalendarHeader.d.ts +10 -0
- package/dist/timetable/miniCalendar/CalendarHeader.js +22 -0
- package/dist/timetable/miniCalendar/CalendarWeekPanel.d.ts +8 -0
- package/dist/timetable/miniCalendar/CalendarWeekPanel.js +18 -0
- package/dist/timetable/miniCalendar/WeekDay.d.ts +10 -0
- package/dist/timetable/miniCalendar/WeekDay.js +25 -0
- package/dist/timetable/miniCalendar/index.d.ts +8 -0
- package/dist/timetable/miniCalendar/index.js +15 -0
- package/dist/utils/DOM/Links.d.ts +1 -0
- package/dist/utils/DOM/Links.js +12 -0
- package/dist/utils/DOM/getCaretCoordinates.d.ts +6 -0
- package/dist/utils/DOM/getCaretCoordinates.js +109 -0
- package/dist/utils/DOM/getOS.d.ts +2 -0
- package/dist/utils/DOM/getOS.js +32 -0
- package/dist/utils/DOM/index.d.ts +5 -0
- package/dist/utils/DOM/index.js +32 -0
- package/dist/utils/dates/datesNormalizing.d.ts +1 -0
- package/dist/utils/dates/datesNormalizing.js +3 -0
- package/dist/utils/dates/format.d.ts +24 -0
- package/dist/utils/dates/format.js +28 -0
- package/dist/utils/dates/formatRelative.d.ts +1 -0
- package/dist/utils/dates/formatRelative.js +14 -0
- package/dist/utils/dates/formatString.d.ts +2 -0
- package/dist/utils/dates/formatString.js +195 -0
- package/dist/utils/dates/formatTimezone.d.ts +2 -0
- package/dist/utils/dates/formatTimezone.js +35 -0
- package/dist/utils/dates/index.d.ts +6 -0
- package/dist/utils/dates/index.js +13 -0
- package/dist/utils/dates/timetable.d.ts +5 -0
- package/dist/utils/dates/timetable.js +38 -0
- package/dist/utils/events/index.d.ts +2 -0
- package/dist/utils/events/index.js +6 -0
- package/dist/utils/fields/index.d.ts +1 -0
- package/dist/utils/fields/index.js +20 -0
- package/dist/utils/formatting/PhoneMasks.d.ts +304 -0
- package/dist/utils/formatting/PhoneMasks.js +318 -0
- package/dist/utils/formatting/index.d.ts +2 -0
- package/dist/utils/formatting/index.js +10 -0
- package/dist/utils/hooks/index.d.ts +1 -0
- package/dist/utils/hooks/index.js +15 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +14 -0
- package/dist/utils/numbers/decimalCalculation.d.ts +4 -0
- package/dist/utils/numbers/decimalCalculation.js +21 -0
- package/dist/utils/numbers/index.d.ts +2 -0
- package/dist/utils/numbers/index.js +9 -0
- package/dist/utils/numbers/numbersNormalizing.d.ts +10 -0
- package/dist/utils/numbers/numbersNormalizing.js +44 -0
- package/dist/utils/stubs/index.d.ts +3 -0
- package/dist/utils/stubs/index.js +10 -0
- package/dist/utils/tags/index.d.ts +3 -0
- package/dist/utils/tags/index.js +42 -0
- package/index.ts +10 -0
- package/package.json +108 -0
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Ish UI
|
|
2
|
+
|
|
3
|
+
UI elements for onCourse and other ish apps
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
#### To install you need to run following commands
|
|
9
|
+
|
|
10
|
+
<br>
|
|
11
|
+
|
|
12
|
+
Clone the repository :
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git clone https://github.com/ishgroup/ish-ui.git
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
<br>
|
|
19
|
+
|
|
20
|
+
Install dependencies using Yarn:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
yarn install
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
<br />
|
|
27
|
+
|
|
28
|
+
## Start : Development
|
|
29
|
+
|
|
30
|
+
To develop and run your web application, you need to run following command :
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
yarn start
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
<br />
|
|
37
|
+
|
|
38
|
+
## Lint : Development
|
|
39
|
+
|
|
40
|
+
To lint application source code using ESLint via this command :
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
yarn lint
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
<br />
|
|
47
|
+
|
|
48
|
+
## Build : Production
|
|
49
|
+
|
|
50
|
+
Distribution files output will be generated in `dist/` directory by default.
|
|
51
|
+
|
|
52
|
+
To build the production ready files for distribution, use the following command :
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
yarn build
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
<br />
|
|
59
|
+
|
|
60
|
+
## Serve : Production
|
|
61
|
+
|
|
62
|
+
Serve helps you serve a static site, single page application or just a static file. It also provides a neat interface for listing the directory's contents. This command serves build files from `dist/` directory.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
yarn serve
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
<br />
|
|
69
|
+
|
|
70
|
+
## Webpack Configurations
|
|
71
|
+
|
|
72
|
+
To make it easier for managing environment based webpack configurations, we using separated `development` and `production` configuration files, they are available in :
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Development webpack config
|
|
76
|
+
tools/webpack/webpack.config.dev.js
|
|
77
|
+
|
|
78
|
+
# Production webpack config
|
|
79
|
+
tools/webpack/webpack.config.prod.js
|
|
80
|
+
```
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Copyright (c) 2016-2019 The Inter Project Authors (me@rsms.me)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
-----------------------------------------------------------
|
|
8
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
9
|
+
-----------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
PREAMBLE
|
|
12
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
13
|
+
development of collaborative font projects, to support the font creation
|
|
14
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
15
|
+
open framework in which fonts may be shared and improved in partnership
|
|
16
|
+
with others.
|
|
17
|
+
|
|
18
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
19
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
20
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
21
|
+
redistributed and/or sold with any software provided that any reserved
|
|
22
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
23
|
+
however, cannot be released under any other type of license. The
|
|
24
|
+
requirement for fonts to remain under this license does not apply
|
|
25
|
+
to any document created using the fonts or their derivatives.
|
|
26
|
+
|
|
27
|
+
DEFINITIONS
|
|
28
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
29
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
30
|
+
include source files, build scripts and documentation.
|
|
31
|
+
|
|
32
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
33
|
+
copyright statement(s).
|
|
34
|
+
|
|
35
|
+
"Original Version" refers to the collection of Font Software components as
|
|
36
|
+
distributed by the Copyright Holder(s).
|
|
37
|
+
|
|
38
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
39
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
40
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
41
|
+
new environment.
|
|
42
|
+
|
|
43
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
44
|
+
writer or other person who contributed to the Font Software.
|
|
45
|
+
|
|
46
|
+
PERMISSION AND CONDITIONS
|
|
47
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
48
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
49
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
50
|
+
Software, subject to the following conditions:
|
|
51
|
+
|
|
52
|
+
1) Neither the Font Software nor any of its individual components,
|
|
53
|
+
in Original or Modified Versions, may be sold by itself.
|
|
54
|
+
|
|
55
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
56
|
+
redistributed and/or sold with any software, provided that each copy
|
|
57
|
+
contains the above copyright notice and this license. These can be
|
|
58
|
+
included either as stand-alone text files, human-readable headers or
|
|
59
|
+
in the appropriate machine-readable metadata fields within text or
|
|
60
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
61
|
+
|
|
62
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
63
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
64
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
65
|
+
presented to the users.
|
|
66
|
+
|
|
67
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
68
|
+
Software shall not be used to promote, endorse or advertise any
|
|
69
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
70
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
71
|
+
permission.
|
|
72
|
+
|
|
73
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
74
|
+
must be distributed entirely under this license, and must not be
|
|
75
|
+
distributed under any other license. The requirement for fonts to
|
|
76
|
+
remain under this license does not apply to any document created
|
|
77
|
+
using the Font Software.
|
|
78
|
+
|
|
79
|
+
TERMINATION
|
|
80
|
+
This license becomes null and void if any of the above conditions are
|
|
81
|
+
not met.
|
|
82
|
+
|
|
83
|
+
DISCLAIMER
|
|
84
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
85
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
86
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
87
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
88
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
89
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
90
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
91
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
92
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright ish group pty ltd 2023.
|
|
3
|
+
*
|
|
4
|
+
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation.
|
|
5
|
+
*
|
|
6
|
+
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
declare module '*.var.woff2'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'Inter';
|
|
3
|
+
font-weight: 100 900;
|
|
4
|
+
font-display: swap;
|
|
5
|
+
font-style: normal;
|
|
6
|
+
font-named-instance: 'Regular';
|
|
7
|
+
src: local('Inter'), url("Inter-Roman.var.woff2") format("woff2");
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@font-face {
|
|
11
|
+
font-family: 'Inter';
|
|
12
|
+
font-weight: 100 900;
|
|
13
|
+
font-display: swap;
|
|
14
|
+
font-style: italic;
|
|
15
|
+
font-named-instance: 'Italic';
|
|
16
|
+
src: local('Inter'), url("Inter-Italic.var.woff2") format("woff2");
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const START_FIELD_PROCESSING_ACTION = "add/field/processing/action";
|
|
2
|
+
export declare const END_FIELD_PROCESSING_ACTION = "remove/field/processing/action";
|
|
3
|
+
export declare const startFieldProcessingAction: (id: string) => {
|
|
4
|
+
type: string;
|
|
5
|
+
payload: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const endFieldProcessingAction: (id: string) => {
|
|
8
|
+
type: string;
|
|
9
|
+
payload: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright ish group pty ltd 2023.
|
|
3
|
+
*
|
|
4
|
+
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation.
|
|
5
|
+
*
|
|
6
|
+
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
|
7
|
+
*/
|
|
8
|
+
export const START_FIELD_PROCESSING_ACTION = 'add/field/processing/action';
|
|
9
|
+
export const END_FIELD_PROCESSING_ACTION = 'remove/field/processing/action';
|
|
10
|
+
export const startFieldProcessingAction = (id) => ({
|
|
11
|
+
type: START_FIELD_PROCESSING_ACTION,
|
|
12
|
+
payload: id
|
|
13
|
+
});
|
|
14
|
+
export const endFieldProcessingAction = (id) => ({
|
|
15
|
+
type: END_FIELD_PROCESSING_ACTION,
|
|
16
|
+
payload: id
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FieldProcessing';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright ish group pty ltd 2023.
|
|
3
|
+
*
|
|
4
|
+
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation.
|
|
5
|
+
*
|
|
6
|
+
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
|
7
|
+
*/
|
|
8
|
+
export * from './FieldProcessing';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { withStyles, createStyles } from '@mui/styles';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import HelpOutline from '@mui/icons-material/HelpOutline';
|
|
5
|
+
import IconButton from '@mui/material/IconButton';
|
|
6
|
+
import Typography from '@mui/material/Typography';
|
|
7
|
+
import Menu from '@mui/material/Menu';
|
|
8
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
9
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
10
|
+
import { format as formatDate } from 'date-fns';
|
|
11
|
+
import { III_DD_MMM_YYYY_HH_MM_SPECIAL, openInternalLink } from '../utils';
|
|
12
|
+
const styles = theme => createStyles({
|
|
13
|
+
button: {
|
|
14
|
+
color: theme.appBarButton.helpMenu.color,
|
|
15
|
+
},
|
|
16
|
+
info: {
|
|
17
|
+
display: 'flex',
|
|
18
|
+
flexDirection: 'column',
|
|
19
|
+
alignItems: 'baseline',
|
|
20
|
+
padding: theme.spacing(1, 2, 0, 2)
|
|
21
|
+
},
|
|
22
|
+
divider: {
|
|
23
|
+
marginTop: theme.spacing(2),
|
|
24
|
+
borderTop: `1px solid ${theme.palette.divider}`
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
class AppBarHelpMenu extends React.Component {
|
|
28
|
+
constructor(props) {
|
|
29
|
+
super(props);
|
|
30
|
+
this.handleAddFieldClick = e => {
|
|
31
|
+
this.setState({ anchorEl: e.currentTarget });
|
|
32
|
+
};
|
|
33
|
+
this.handleClose = () => {
|
|
34
|
+
this.setState({ anchorEl: null });
|
|
35
|
+
};
|
|
36
|
+
this.openManual = () => {
|
|
37
|
+
window.open(this.props.manualUrl);
|
|
38
|
+
this.handleClose();
|
|
39
|
+
};
|
|
40
|
+
this.openAudits = () => {
|
|
41
|
+
openInternalLink('/' + this.props.auditsUrl);
|
|
42
|
+
this.handleClose();
|
|
43
|
+
};
|
|
44
|
+
this.state = {
|
|
45
|
+
anchorEl: null
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
const { anchorEl } = this.state;
|
|
50
|
+
const { classes, created, modified, iconClasses, auditsUrl } = this.props;
|
|
51
|
+
return (React.createElement(React.Fragment, null,
|
|
52
|
+
React.createElement(Menu, { id: "form-help-menu", anchorEl: anchorEl, open: Boolean(anchorEl), onClose: this.handleClose, marginThreshold: 16, transformOrigin: {
|
|
53
|
+
vertical: 'center',
|
|
54
|
+
horizontal: 'right'
|
|
55
|
+
} },
|
|
56
|
+
created && (React.createElement(MenuItem, { disabled: true, className: classes.info },
|
|
57
|
+
React.createElement(Typography, { variant: "caption" }, "Created"),
|
|
58
|
+
React.createElement(Typography, { variant: "subtitle1" }, typeof created === 'object' && isFinite(created)
|
|
59
|
+
? formatDate(created, III_DD_MMM_YYYY_HH_MM_SPECIAL)
|
|
60
|
+
: '---- ---- ---- ---- ----'))),
|
|
61
|
+
modified && (React.createElement(MenuItem, { disabled: true, className: classes.info },
|
|
62
|
+
React.createElement(Typography, { variant: "caption" }, "Modified"),
|
|
63
|
+
React.createElement(Typography, { variant: "subtitle1" }, typeof modified === 'object' && isFinite(modified)
|
|
64
|
+
? formatDate(modified, III_DD_MMM_YYYY_HH_MM_SPECIAL)
|
|
65
|
+
: '---- ---- ---- ---- ----'))),
|
|
66
|
+
React.createElement(MenuItem, { className: created || modified ? classes.divider : undefined, onClick: this.openManual }, "Open manual"),
|
|
67
|
+
auditsUrl && (React.createElement(MenuItem, { onClick: this.openAudits }, "View audit trail"))),
|
|
68
|
+
React.createElement(Tooltip, { title: "Additional information" },
|
|
69
|
+
React.createElement("div", null,
|
|
70
|
+
React.createElement(IconButton, { type: "button", "aria-owns": anchorEl ? 'form-help-menu' : null, "aria-haspopup": "true", onClick: this.handleAddFieldClick, size: "large", className: clsx({
|
|
71
|
+
[classes.button]: !iconClasses,
|
|
72
|
+
[iconClasses]: !!iconClasses
|
|
73
|
+
}) },
|
|
74
|
+
React.createElement(HelpOutline, null))))));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export default withStyles(styles)(AppBarHelpMenu);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright ish group pty ltd 2023.
|
|
3
|
+
*
|
|
4
|
+
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation.
|
|
5
|
+
*
|
|
6
|
+
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
|
7
|
+
*/
|
|
8
|
+
export * from './AppBarHelpMenu';
|
|
9
|
+
export { default as AppBarHelpMenu } from './AppBarHelpMenu';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconButtonProps, IconButtonPropsColorOverrides, IconButtonPropsSizeOverrides } from '@mui/material/IconButton';
|
|
3
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
4
|
+
interface Props extends Partial<IconButtonProps> {
|
|
5
|
+
onClick?: any;
|
|
6
|
+
className?: any;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
iconClassName?: any;
|
|
9
|
+
iconFontSize?: 'inherit' | 'large' | 'medium' | 'small';
|
|
10
|
+
color?: OverridableStringUnion<'inherit' | 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning', IconButtonPropsColorOverrides>;
|
|
11
|
+
size?: OverridableStringUnion<'small' | 'medium' | 'large', IconButtonPropsSizeOverrides>;
|
|
12
|
+
}
|
|
13
|
+
declare const AddButton: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<any>>;
|
|
14
|
+
export default AddButton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import AddCircleOutlineOutlinedIcon from '@mui/icons-material/AddCircleOutlineOutlined';
|
|
3
|
+
import IconButton from '@mui/material/IconButton';
|
|
4
|
+
const AddButton = React.forwardRef((props, ref) => {
|
|
5
|
+
const { onClick, className, disabled, iconClassName, iconFontSize, color, size } = props;
|
|
6
|
+
return (React.createElement(IconButton, { color: color, size: size, onClick: onClick, className: className, disabled: disabled, ref: ref },
|
|
7
|
+
React.createElement(AddCircleOutlineOutlinedIcon, { className: iconClassName || 'addButtonColor', fontSize: iconFontSize || 'small' })));
|
|
8
|
+
});
|
|
9
|
+
export default AddButton;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright ish group pty ltd. All rights reserved. https://www.ish.com.au
|
|
3
|
+
* No copying or use of this code is allowed without permission in writing from ish.
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import OpenInNew from '@mui/icons-material/OpenInNew';
|
|
7
|
+
import IconButton from '@mui/material/IconButton';
|
|
8
|
+
const TimetableButton = ({ title = 'Timetable', onClick }) => (React.createElement("div", { className: "centeredFlex" },
|
|
9
|
+
React.createElement("div", { className: "heading" }, title),
|
|
10
|
+
React.createElement(IconButton, { size: "small", color: "primary", onClick: onClick },
|
|
11
|
+
React.createElement(OpenInNew, { fontSize: "inherit" }))));
|
|
12
|
+
export default TimetableButton;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright ish group pty ltd 2023.
|
|
3
|
+
*
|
|
4
|
+
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation.
|
|
5
|
+
*
|
|
6
|
+
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
|
7
|
+
*/
|
|
8
|
+
export * from './AddButton';
|
|
9
|
+
export * from './TimetableButton';
|
|
10
|
+
export { default as AddButton } from './AddButton';
|
|
11
|
+
export { default as TimetableButton } from './TimetableButton';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopperPlacementType, Theme } from '@mui/material';
|
|
3
|
+
import { FieldInputProps } from '../model';
|
|
4
|
+
interface ColorPickerWrapperProps {
|
|
5
|
+
input?: FieldInputProps;
|
|
6
|
+
classes?: any;
|
|
7
|
+
theme?: Theme;
|
|
8
|
+
placement?: PopperPlacementType;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: React.JSXElementConstructor<Omit<ColorPickerWrapperProps, "classes" | "theme"> & import("@mui/styles").StyledComponentProps<never>>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright ish group pty ltd 2022.
|
|
3
|
+
*
|
|
4
|
+
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation.
|
|
5
|
+
*
|
|
6
|
+
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
|
7
|
+
*/
|
|
8
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
|
+
import ButtonBase from '@mui/material/ButtonBase';
|
|
10
|
+
import Popper from '@mui/material/Popper';
|
|
11
|
+
import { AlphaPicker, HuePicker } from 'react-color';
|
|
12
|
+
import { ClickAwayListener } from '@mui/material';
|
|
13
|
+
import { createStyles, withStyles } from '@mui/styles';
|
|
14
|
+
import Paper from '@mui/material/Paper';
|
|
15
|
+
import Grow from '@mui/material/Grow';
|
|
16
|
+
import clsx from 'clsx';
|
|
17
|
+
import { stopEventPropagation } from '../utils/events';
|
|
18
|
+
const styles = createStyles(({ spacing, transitions, palette, zIndex }) => ({
|
|
19
|
+
paper: {
|
|
20
|
+
width: 200,
|
|
21
|
+
padding: spacing(2),
|
|
22
|
+
position: 'relative',
|
|
23
|
+
bottom: '12px',
|
|
24
|
+
background: palette.background.paper,
|
|
25
|
+
'&:after': {
|
|
26
|
+
bottom: '0px',
|
|
27
|
+
left: '50%',
|
|
28
|
+
width: '22px',
|
|
29
|
+
height: '10px',
|
|
30
|
+
position: 'absolute',
|
|
31
|
+
transform: 'translateX(-50%)',
|
|
32
|
+
background: palette.background.paper,
|
|
33
|
+
content: '\'\'',
|
|
34
|
+
zIndex: 1
|
|
35
|
+
},
|
|
36
|
+
'&:before': {
|
|
37
|
+
content: '\'\'',
|
|
38
|
+
bottom: '-6px',
|
|
39
|
+
left: '50%',
|
|
40
|
+
width: '12px',
|
|
41
|
+
height: '12px',
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
transform: 'translateX(-50%) rotate(45deg)',
|
|
44
|
+
background: palette.background.paper,
|
|
45
|
+
boxShadow: '1px 1px 2px 0px rgba(0,0,0,0.2), 2px 1px 2px -1px rgba(0,0,0,0.12), 1px 1px 1px 0px rgba(0,0,0,0.12);'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
paperPlaceBottom: {
|
|
49
|
+
marginTop: spacing(3),
|
|
50
|
+
'&:after': {
|
|
51
|
+
bottom: 'unset',
|
|
52
|
+
top: '0px'
|
|
53
|
+
},
|
|
54
|
+
'&:before': {
|
|
55
|
+
bottom: 'unset',
|
|
56
|
+
top: '-6px',
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
colorPickerButton: {
|
|
60
|
+
width: '14px',
|
|
61
|
+
height: '14px',
|
|
62
|
+
borderRadius: '100%',
|
|
63
|
+
transition: transitions.create('transform', {
|
|
64
|
+
duration: transitions.duration.shorter,
|
|
65
|
+
easing: transitions.easing.easeInOut
|
|
66
|
+
}),
|
|
67
|
+
'&:hover,&$opened': {
|
|
68
|
+
transform: 'scale(2)'
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
popper: {
|
|
72
|
+
zIndex: zIndex.tooltip
|
|
73
|
+
},
|
|
74
|
+
bottomOffset: {
|
|
75
|
+
marginBottom: spacing(1.25)
|
|
76
|
+
},
|
|
77
|
+
customAlfa: {
|
|
78
|
+
'& > div > div:first-child > div': {
|
|
79
|
+
background: 'none !important'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
opened: {}
|
|
83
|
+
}));
|
|
84
|
+
const ColorPickerBase = React.memo(({ classes, color, input: { value, onChange }, TransitionProps, setAnchorEl, placement }) => {
|
|
85
|
+
const [hueColor, setHueColor] = useState(color);
|
|
86
|
+
const [alfaColor, setAlfaColor] = useState(color);
|
|
87
|
+
const hueRef = useRef();
|
|
88
|
+
const onHueChange = useCallback(color => {
|
|
89
|
+
setHueColor(color.hsv);
|
|
90
|
+
setAlfaColor(color.hsv);
|
|
91
|
+
}, []);
|
|
92
|
+
const onAlfaChange = useCallback(color => {
|
|
93
|
+
setHueColor({
|
|
94
|
+
h: color.hsv.h, s: color.hsv.a, v: color.hsv.v, a: 1
|
|
95
|
+
});
|
|
96
|
+
setAlfaColor(color.hsv);
|
|
97
|
+
}, []);
|
|
98
|
+
const handleClickAway = useCallback(() => {
|
|
99
|
+
setAnchorEl(null);
|
|
100
|
+
}, []);
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
if (!hueColor && value) {
|
|
103
|
+
setHueColor('#' + value);
|
|
104
|
+
}
|
|
105
|
+
}, [value, hueColor]);
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
const hueHsv = hueRef.current.state.hsv;
|
|
108
|
+
setAlfaColor({
|
|
109
|
+
h: hueHsv.h, s: 1, v: hueHsv.v, a: hueHsv.s
|
|
110
|
+
});
|
|
111
|
+
}, [hueRef.current]);
|
|
112
|
+
const onChangeComplete = () => {
|
|
113
|
+
onChange(hueRef.current.state.hex.replace('#', ''));
|
|
114
|
+
};
|
|
115
|
+
return (React.createElement(ClickAwayListener, { onClickAway: handleClickAway },
|
|
116
|
+
React.createElement(Grow, Object.assign({}, TransitionProps, { timeout: 200 }),
|
|
117
|
+
React.createElement("div", null,
|
|
118
|
+
React.createElement(Paper, { className: clsx(classes.paper, placement === 'bottom' && classes.paperPlaceBottom) },
|
|
119
|
+
React.createElement(HuePicker, { ref: hueRef, color: hueColor, onChange: onHueChange, onChangeComplete: onChangeComplete, width: "168", className: classes.bottomOffset }),
|
|
120
|
+
React.createElement(AlphaPicker, { className: classes.customAlfa, color: alfaColor, width: "168", onChange: onAlfaChange, onChangeComplete: onChangeComplete }))))));
|
|
121
|
+
});
|
|
122
|
+
const ColorPickerWrapper = React.memo(({ classes, theme, input, placement = 'top' }) => {
|
|
123
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
124
|
+
const handleClick = useCallback((event) => {
|
|
125
|
+
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
126
|
+
}, [anchorEl]);
|
|
127
|
+
const color = useMemo(() => (input.value ? '#' + input.value : theme.palette.primary.main), [theme, input.value]);
|
|
128
|
+
return (React.createElement("div", { className: "d-flex", onClick: stopEventPropagation },
|
|
129
|
+
React.createElement(ButtonBase, { onClick: handleClick, className: clsx(classes.colorPickerButton, anchorEl && classes.opened), style: { backgroundColor: color } }),
|
|
130
|
+
React.createElement(Popper, { open: Boolean(anchorEl), anchorEl: anchorEl, placement: placement, className: classes.popper, transition: true }, ({ TransitionProps }) => (React.createElement(ColorPickerBase, { classes: classes, color: color, input: input, TransitionProps: TransitionProps, setAnchorEl: setAnchorEl, placement: placement })))));
|
|
131
|
+
});
|
|
132
|
+
export default withStyles(styles, { withTheme: true })(ColorPickerWrapper);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright ish group pty ltd 2023.
|
|
3
|
+
*
|
|
4
|
+
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation.
|
|
5
|
+
*
|
|
6
|
+
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
|
7
|
+
*/
|
|
8
|
+
export * from './ColorPicker';
|
|
9
|
+
export { default as ColorPicker } from './ColorPicker';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Alert } from '@mui/lab';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
const BROWSER_WARNING_TEXT = 'Your current browser is not supported. Please ensure you are using an up to date version of Chrome, Firefox or Edge.';
|
|
4
|
+
export const isOldIE = () => {
|
|
5
|
+
const ua = window.navigator.userAgent;
|
|
6
|
+
const msie = ua.indexOf('MSIE ');
|
|
7
|
+
return msie !== -1;
|
|
8
|
+
};
|
|
9
|
+
export const BrowserWarning = () => isOldIE() && (React.createElement("div", { style: {
|
|
10
|
+
position: 'fixed',
|
|
11
|
+
bottom: '50vh',
|
|
12
|
+
left: '35vw',
|
|
13
|
+
right: '35vw',
|
|
14
|
+
zIndex: 10000
|
|
15
|
+
} },
|
|
16
|
+
React.createElement(Alert, { variant: "filled", severity: "error" }, BROWSER_WARNING_TEXT)));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright ish group pty ltd 2023.
|
|
3
|
+
*
|
|
4
|
+
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation.
|
|
5
|
+
*
|
|
6
|
+
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Common confirm dialog
|
|
10
|
+
* */
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import Button from '@mui/material/Button';
|
|
13
|
+
import Dialog from '@mui/material/Dialog';
|
|
14
|
+
import DialogActions from '@mui/material/DialogActions';
|
|
15
|
+
import DialogContent from '@mui/material/DialogContent';
|
|
16
|
+
import DialogContentText from '@mui/material/DialogContentText';
|
|
17
|
+
import DialogTitle from '@mui/material/DialogTitle';
|
|
18
|
+
const ConfirmBase = props => {
|
|
19
|
+
const { open, onCancel, title, confirmMessage, onConfirm, cancelButtonText, confirmButtonText, onCancelCustom, confirmCustomComponent } = props;
|
|
20
|
+
return (React.createElement(Dialog, { open: open, onClose: onCancel },
|
|
21
|
+
title && React.createElement(DialogTitle, { id: "alert-dialog-title" }, title),
|
|
22
|
+
confirmMessage && (React.createElement(DialogContent, null,
|
|
23
|
+
React.createElement(DialogContentText, { id: "alert-dialog-description" }, confirmMessage))),
|
|
24
|
+
React.createElement(DialogActions, null,
|
|
25
|
+
React.createElement(Button, { onClick: onCancelCustom || onCancel, color: "primary" }, cancelButtonText),
|
|
26
|
+
onConfirm && !confirmCustomComponent && (React.createElement(Button, { onClick: () => onConfirm(), variant: "contained", color: "primary" }, confirmButtonText)),
|
|
27
|
+
confirmCustomComponent && confirmCustomComponent)));
|
|
28
|
+
};
|
|
29
|
+
export default ConfirmBase;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright ish group pty ltd 2023.
|
|
3
|
+
*
|
|
4
|
+
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation.
|
|
5
|
+
*
|
|
6
|
+
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
|
7
|
+
*/
|
|
8
|
+
export * from './message/Message';
|
|
9
|
+
export * from './confirm/ConfirmBase';
|
|
10
|
+
export * from './BrowserWarning';
|
|
11
|
+
export { default as Message } from './message/Message';
|
|
12
|
+
export { default as ConfirmBase } from './confirm/ConfirmBase';
|