@axelor/aos-mobile-ui 0.0.1
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 +234 -0
- package/lib/components/atoms/BlockInteractionScreen/BlockInteractionScreen.d.ts +7 -0
- package/lib/components/atoms/BlockInteractionScreen/BlockInteractionScreen.js +50 -0
- package/lib/components/atoms/BlockInteractionScreen/BlockInteractionScreen.js.map +1 -0
- package/lib/components/atoms/Card/Card.d.ts +6 -0
- package/lib/components/atoms/Card/Card.js +37 -0
- package/lib/components/atoms/Card/Card.js.map +1 -0
- package/lib/components/atoms/DottedLine/DottedLine.d.ts +5 -0
- package/lib/components/atoms/DottedLine/DottedLine.js +38 -0
- package/lib/components/atoms/DottedLine/DottedLine.js.map +1 -0
- package/lib/components/atoms/HorizontalRule/HorizontalRule.d.ts +5 -0
- package/lib/components/atoms/HorizontalRule/HorizontalRule.js +35 -0
- package/lib/components/atoms/HorizontalRule/HorizontalRule.js.map +1 -0
- package/lib/components/atoms/HtmlInput/HtmlInput.d.ts +9 -0
- package/lib/components/atoms/HtmlInput/HtmlInput.js +50 -0
- package/lib/components/atoms/HtmlInput/HtmlInput.js.map +1 -0
- package/lib/components/atoms/Icon/Icon.d.ts +13 -0
- package/lib/components/atoms/Icon/Icon.js +49 -0
- package/lib/components/atoms/Icon/Icon.js.map +1 -0
- package/lib/components/atoms/Input/Input.d.ts +18 -0
- package/lib/components/atoms/Input/Input.js +37 -0
- package/lib/components/atoms/Input/Input.js.map +1 -0
- package/lib/components/atoms/RenderHtml/RenderHtml.d.ts +6 -0
- package/lib/components/atoms/RenderHtml/RenderHtml.js +50 -0
- package/lib/components/atoms/RenderHtml/RenderHtml.js.map +1 -0
- package/lib/components/atoms/Screen/Screen.d.ts +9 -0
- package/lib/components/atoms/Screen/Screen.js +74 -0
- package/lib/components/atoms/Screen/Screen.js.map +1 -0
- package/lib/components/atoms/ScrollView/ScrollView.d.ts +6 -0
- package/lib/components/atoms/ScrollView/ScrollView.js +33 -0
- package/lib/components/atoms/ScrollView/ScrollView.js.map +1 -0
- package/lib/components/atoms/Switch/Switch.d.ts +6 -0
- package/lib/components/atoms/Switch/Switch.js +34 -0
- package/lib/components/atoms/Switch/Switch.js.map +1 -0
- package/lib/components/atoms/Text/Text.d.ts +12 -0
- package/lib/components/atoms/Text/Text.js +37 -0
- package/lib/components/atoms/Text/Text.js.map +1 -0
- package/lib/components/atoms/index.d.ts +12 -0
- package/lib/components/atoms/index.js +30 -0
- package/lib/components/atoms/index.js.map +1 -0
- package/lib/components/index.d.ts +3 -0
- package/lib/components/index.js +21 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/molecules/AttachmentCard/AttachmentCard.d.ts +8 -0
- package/lib/components/molecules/AttachmentCard/AttachmentCard.js +61 -0
- package/lib/components/molecules/AttachmentCard/AttachmentCard.js.map +1 -0
- package/lib/components/molecules/Badge/Badge.d.ts +10 -0
- package/lib/components/molecules/Badge/Badge.js +43 -0
- package/lib/components/molecules/Badge/Badge.js.map +1 -0
- package/lib/components/molecules/Button/Button.d.ts +10 -0
- package/lib/components/molecules/Button/Button.js +48 -0
- package/lib/components/molecules/Button/Button.js.map +1 -0
- package/lib/components/molecules/CardIconButton/CardIconButton.d.ts +8 -0
- package/lib/components/molecules/CardIconButton/CardIconButton.js +42 -0
- package/lib/components/molecules/CardIconButton/CardIconButton.js.map +1 -0
- package/lib/components/molecules/Chip/Chip.d.ts +11 -0
- package/lib/components/molecules/Chip/Chip.js +69 -0
- package/lib/components/molecules/Chip/Chip.js.map +1 -0
- package/lib/components/molecules/ClearableCard/ClearableCard.d.ts +8 -0
- package/lib/components/molecules/ClearableCard/ClearableCard.js +43 -0
- package/lib/components/molecules/ClearableCard/ClearableCard.js.map +1 -0
- package/lib/components/molecules/DropdownCard/DropdownCard.d.ts +10 -0
- package/lib/components/molecules/DropdownCard/DropdownCard.js +84 -0
- package/lib/components/molecules/DropdownCard/DropdownCard.js.map +1 -0
- package/lib/components/molecules/DropdownMenu/DropdownMenu.d.ts +5 -0
- package/lib/components/molecules/DropdownMenu/DropdownMenu.js +57 -0
- package/lib/components/molecules/DropdownMenu/DropdownMenu.js.map +1 -0
- package/lib/components/molecules/DropdownMenuItem/DropdownMenuItem.d.ts +7 -0
- package/lib/components/molecules/DropdownMenuItem/DropdownMenuItem.js +42 -0
- package/lib/components/molecules/DropdownMenuItem/DropdownMenuItem.js.map +1 -0
- package/lib/components/molecules/EditableInput/EditableInput.d.ts +9 -0
- package/lib/components/molecules/EditableInput/EditableInput.js +65 -0
- package/lib/components/molecules/EditableInput/EditableInput.js.map +1 -0
- package/lib/components/molecules/FromTo/FromTo.d.ts +8 -0
- package/lib/components/molecules/FromTo/FromTo.js +44 -0
- package/lib/components/molecules/FromTo/FromTo.js.map +1 -0
- package/lib/components/molecules/HalfLabelCard/HalfLabelCard.d.ts +8 -0
- package/lib/components/molecules/HalfLabelCard/HalfLabelCard.js +51 -0
- package/lib/components/molecules/HalfLabelCard/HalfLabelCard.js.map +1 -0
- package/lib/components/molecules/HeaderIndicator/HeaderIndicator.d.ts +2 -0
- package/lib/components/molecules/HeaderIndicator/HeaderIndicator.js +65 -0
- package/lib/components/molecules/HeaderIndicator/HeaderIndicator.js.map +1 -0
- package/lib/components/molecules/IconButton/IconButton.d.ts +11 -0
- package/lib/components/molecules/IconButton/IconButton.js +48 -0
- package/lib/components/molecules/IconButton/IconButton.js.map +1 -0
- package/lib/components/molecules/IconInput/IconInput.d.ts +19 -0
- package/lib/components/molecules/IconInput/IconInput.js +50 -0
- package/lib/components/molecules/IconInput/IconInput.js.map +1 -0
- package/lib/components/molecules/Image/Image.d.ts +10 -0
- package/lib/components/molecules/Image/Image.js +36 -0
- package/lib/components/molecules/Image/Image.js.map +1 -0
- package/lib/components/molecules/Increment/Increment.d.ts +8 -0
- package/lib/components/molecules/Increment/Increment.js +97 -0
- package/lib/components/molecules/Increment/Increment.js.map +1 -0
- package/lib/components/molecules/InfoBubble/InfoBubble.d.ts +9 -0
- package/lib/components/molecules/InfoBubble/InfoBubble.js +73 -0
- package/lib/components/molecules/InfoBubble/InfoBubble.js.map +1 -0
- package/lib/components/molecules/LabelText/LabelText.d.ts +14 -0
- package/lib/components/molecules/LabelText/LabelText.js +45 -0
- package/lib/components/molecules/LabelText/LabelText.js.map +1 -0
- package/lib/components/molecules/LoadingIndicator/LoadingIndicator.d.ts +6 -0
- package/lib/components/molecules/LoadingIndicator/LoadingIndicator.js +49 -0
- package/lib/components/molecules/LoadingIndicator/LoadingIndicator.js.map +1 -0
- package/lib/components/molecules/MessageBox/MessageBox.d.ts +9 -0
- package/lib/components/molecules/MessageBox/MessageBox.js +60 -0
- package/lib/components/molecules/MessageBox/MessageBox.js.map +1 -0
- package/lib/components/molecules/MovementIndicationCard/MovementIndicationCard.d.ts +14 -0
- package/lib/components/molecules/MovementIndicationCard/MovementIndicationCard.js +66 -0
- package/lib/components/molecules/MovementIndicationCard/MovementIndicationCard.js.map +1 -0
- package/lib/components/molecules/MultiValuePickerButton/MultiValuePickerButton.d.ts +11 -0
- package/lib/components/molecules/MultiValuePickerButton/MultiValuePickerButton.js +80 -0
- package/lib/components/molecules/MultiValuePickerButton/MultiValuePickerButton.js.map +1 -0
- package/lib/components/molecules/NotesCard/NotesCard.d.ts +6 -0
- package/lib/components/molecules/NotesCard/NotesCard.js +55 -0
- package/lib/components/molecules/NotesCard/NotesCard.js.map +1 -0
- package/lib/components/molecules/PopUp/PopUp.d.ts +9 -0
- package/lib/components/molecules/PopUp/PopUp.js +74 -0
- package/lib/components/molecules/PopUp/PopUp.js.map +1 -0
- package/lib/components/molecules/RightIconButton/RightIconButton.d.ts +10 -0
- package/lib/components/molecules/RightIconButton/RightIconButton.js +49 -0
- package/lib/components/molecules/RightIconButton/RightIconButton.js.map +1 -0
- package/lib/components/molecules/SelectionContainer/SelectionContainer.d.ts +11 -0
- package/lib/components/molecules/SelectionContainer/SelectionContainer.js +111 -0
- package/lib/components/molecules/SelectionContainer/SelectionContainer.js.map +1 -0
- package/lib/components/molecules/StarScore/StarScore.d.ts +11 -0
- package/lib/components/molecules/StarScore/StarScore.js +58 -0
- package/lib/components/molecules/StarScore/StarScore.js.map +1 -0
- package/lib/components/molecules/SwitchCard/SwitchCard.d.ts +8 -0
- package/lib/components/molecules/SwitchCard/SwitchCard.js +31 -0
- package/lib/components/molecules/SwitchCard/SwitchCard.js.map +1 -0
- package/lib/components/molecules/TitledValue/TitledValue.d.ts +7 -0
- package/lib/components/molecules/TitledValue/TitledValue.js +40 -0
- package/lib/components/molecules/TitledValue/TitledValue.js.map +1 -0
- package/lib/components/molecules/ToggleSwitch/ToggleSwitch.d.ts +8 -0
- package/lib/components/molecules/ToggleSwitch/ToggleSwitch.js +66 -0
- package/lib/components/molecules/ToggleSwitch/ToggleSwitch.js.map +1 -0
- package/lib/components/molecules/UnorderedList/UnorderedList.d.ts +8 -0
- package/lib/components/molecules/UnorderedList/UnorderedList.js +51 -0
- package/lib/components/molecules/UnorderedList/UnorderedList.js.map +1 -0
- package/lib/components/molecules/ViewAllContainer/ViewAllContainer.d.ts +14 -0
- package/lib/components/molecules/ViewAllContainer/ViewAllContainer.js +91 -0
- package/lib/components/molecules/ViewAllContainer/ViewAllContainer.js.map +1 -0
- package/lib/components/molecules/index.d.ts +33 -0
- package/lib/components/molecules/index.js +51 -0
- package/lib/components/molecules/index.js.map +1 -0
- package/lib/components/organisms/AutoCompleteSearch/AutoCompleteSearch.d.ts +19 -0
- package/lib/components/organisms/AutoCompleteSearch/AutoCompleteSearch.js +148 -0
- package/lib/components/organisms/AutoCompleteSearch/AutoCompleteSearch.js.map +1 -0
- package/lib/components/organisms/ChipSelect/ChipSelect.d.ts +6 -0
- package/lib/components/organisms/ChipSelect/ChipSelect.js +39 -0
- package/lib/components/organisms/ChipSelect/ChipSelect.js.map +1 -0
- package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.d.ts +12 -0
- package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.js +40 -0
- package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.js.map +1 -0
- package/lib/components/organisms/HeaderContainer/HeaderContainer.d.ts +9 -0
- package/lib/components/organisms/HeaderContainer/HeaderContainer.js +65 -0
- package/lib/components/organisms/HeaderContainer/HeaderContainer.js.map +1 -0
- package/lib/components/organisms/ImageBubble/ImageBubble.d.ts +10 -0
- package/lib/components/organisms/ImageBubble/ImageBubble.js +105 -0
- package/lib/components/organisms/ImageBubble/ImageBubble.js.map +1 -0
- package/lib/components/organisms/MultiValuePicker/MultiValuePicker.d.ts +16 -0
- package/lib/components/organisms/MultiValuePicker/MultiValuePicker.js +103 -0
- package/lib/components/organisms/MultiValuePicker/MultiValuePicker.js.map +1 -0
- package/lib/components/organisms/Picker/Picker.d.ts +18 -0
- package/lib/components/organisms/Picker/Picker.js +101 -0
- package/lib/components/organisms/Picker/Picker.js.map +1 -0
- package/lib/components/organisms/PopUpOneButton/PopUpOneButton.d.ts +9 -0
- package/lib/components/organisms/PopUpOneButton/PopUpOneButton.js +35 -0
- package/lib/components/organisms/PopUpOneButton/PopUpOneButton.js.map +1 -0
- package/lib/components/organisms/PopUpTwoButton/PopUpTwoButton.d.ts +11 -0
- package/lib/components/organisms/PopUpTwoButton/PopUpTwoButton.js +38 -0
- package/lib/components/organisms/PopUpTwoButton/PopUpTwoButton.js.map +1 -0
- package/lib/components/organisms/ScrollList/ScrollList.d.ts +13 -0
- package/lib/components/organisms/ScrollList/ScrollList.js +70 -0
- package/lib/components/organisms/ScrollList/ScrollList.js.map +1 -0
- package/lib/components/organisms/SearchBar/SearchBar.d.ts +14 -0
- package/lib/components/organisms/SearchBar/SearchBar.js +44 -0
- package/lib/components/organisms/SearchBar/SearchBar.js.map +1 -0
- package/lib/components/organisms/index.d.ts +11 -0
- package/lib/components/organisms/index.js +29 -0
- package/lib/components/organisms/index.js.map +1 -0
- package/lib/config/ConfigContext.d.ts +26 -0
- package/lib/config/ConfigContext.js +184 -0
- package/lib/config/ConfigContext.js.map +1 -0
- package/lib/hooks/use-click-outside.d.ts +6 -0
- package/lib/hooks/use-click-outside.helper.d.ts +10 -0
- package/lib/hooks/use-click-outside.helper.js +35 -0
- package/lib/hooks/use-click-outside.helper.js.map +1 -0
- package/lib/hooks/use-click-outside.js +123 -0
- package/lib/hooks/use-click-outside.js.map +1 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +26 -0
- package/lib/index.js.map +1 -0
- package/lib/theme/ThemeContext.d.ts +19 -0
- package/lib/theme/ThemeContext.js +110 -0
- package/lib/theme/ThemeContext.js.map +1 -0
- package/lib/theme/WritingThemeContext.d.ts +10 -0
- package/lib/theme/WritingThemeContext.js +77 -0
- package/lib/theme/WritingThemeContext.js.map +1 -0
- package/lib/theme/index.d.ts +4 -0
- package/lib/theme/index.js +22 -0
- package/lib/theme/index.js.map +1 -0
- package/lib/theme/themes.d.ts +32 -0
- package/lib/theme/themes.js +178 -0
- package/lib/theme/themes.js.map +1 -0
- package/lib/theme/writingTheme.d.ts +19 -0
- package/lib/theme/writingTheme.js +45 -0
- package/lib/theme/writingTheme.js.map +1 -0
- package/lib/tools/AnimationUtil.d.ts +12 -0
- package/lib/tools/AnimationUtil.js +40 -0
- package/lib/tools/AnimationUtil.js.map +1 -0
- package/lib/types/file.d.ts +5 -0
- package/lib/types/file.js +62 -0
- package/lib/types/file.js.map +1 -0
- package/lib/utils/arrays.d.ts +2 -0
- package/lib/utils/arrays.js +31 -0
- package/lib/utils/arrays.js.map +1 -0
- package/lib/utils/commons-styles.d.ts +34 -0
- package/lib/utils/commons-styles.js +53 -0
- package/lib/utils/commons-styles.js.map +1 -0
- package/lib/utils/formatters.d.ts +2 -0
- package/lib/utils/formatters.js +48 -0
- package/lib/utils/formatters.js.map +1 -0
- package/lib/utils/headerStyle.d.ts +12 -0
- package/lib/utils/headerStyle.js +31 -0
- package/lib/utils/headerStyle.js.map +1 -0
- package/lib/utils/list.d.ts +2 -0
- package/lib/utils/list.js +47 -0
- package/lib/utils/list.js.map +1 -0
- package/lib/utils/number.d.ts +4 -0
- package/lib/utils/number.js +34 -0
- package/lib/utils/number.js.map +1 -0
- package/lib/utils/strings.d.ts +2 -0
- package/lib/utils/strings.js +33 -0
- package/lib/utils/strings.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export const lightTheme = {
|
|
19
|
+
key: 'light',
|
|
20
|
+
name: 'Light',
|
|
21
|
+
colors: {
|
|
22
|
+
screenBackgroundColor: '#F2F2F2',
|
|
23
|
+
backgroundColor: '#FAFBFC',
|
|
24
|
+
primaryColor: {
|
|
25
|
+
background_light: '#84DCB7',
|
|
26
|
+
foreground: '#000000',
|
|
27
|
+
background: '#3ECF8E',
|
|
28
|
+
},
|
|
29
|
+
secondaryColor: {
|
|
30
|
+
background_light: '#DDDDDD',
|
|
31
|
+
foreground: '#000000',
|
|
32
|
+
background: '#CECECE',
|
|
33
|
+
},
|
|
34
|
+
secondaryColor_dark: {
|
|
35
|
+
background_light: '#606060',
|
|
36
|
+
foreground: '#FFFFFF',
|
|
37
|
+
background: '#424242',
|
|
38
|
+
},
|
|
39
|
+
errorColor: {
|
|
40
|
+
background_light: '#EE6666',
|
|
41
|
+
foreground: '#000000',
|
|
42
|
+
background: '#F12F2F',
|
|
43
|
+
},
|
|
44
|
+
cautionColor: {
|
|
45
|
+
background_light: '#EE9B67',
|
|
46
|
+
foreground: '#000000',
|
|
47
|
+
background: '#F27B30',
|
|
48
|
+
},
|
|
49
|
+
plannedColor: {
|
|
50
|
+
background_light: '#D3C7EC',
|
|
51
|
+
foreground: '#000000',
|
|
52
|
+
background: '#B5A1DF',
|
|
53
|
+
},
|
|
54
|
+
progressColor: {
|
|
55
|
+
background_light: '#FCE064',
|
|
56
|
+
foreground: '#000000',
|
|
57
|
+
background: '#FFD101',
|
|
58
|
+
},
|
|
59
|
+
priorityColor: {
|
|
60
|
+
background_light: '#81C9E8',
|
|
61
|
+
foreground: '#000000',
|
|
62
|
+
background: '#36AEE1',
|
|
63
|
+
},
|
|
64
|
+
defaultColor: {
|
|
65
|
+
background_light: '#DDDDDD',
|
|
66
|
+
foreground: '#000000',
|
|
67
|
+
background: '#CECECE',
|
|
68
|
+
},
|
|
69
|
+
importantColor: {
|
|
70
|
+
background_light: '#EE6666',
|
|
71
|
+
foreground: '#000000',
|
|
72
|
+
background: '#F12F2F',
|
|
73
|
+
},
|
|
74
|
+
successColor: {
|
|
75
|
+
background_light: '#84DCB7',
|
|
76
|
+
foreground: '#000000',
|
|
77
|
+
background: '#3ECF8E',
|
|
78
|
+
},
|
|
79
|
+
warningColor: {
|
|
80
|
+
background_light: '#EE9B67',
|
|
81
|
+
foreground: '#000000',
|
|
82
|
+
background: '#F27B30',
|
|
83
|
+
},
|
|
84
|
+
inverseColor: {
|
|
85
|
+
background_light: '#9E9E9F',
|
|
86
|
+
foreground: '#FFFFFF',
|
|
87
|
+
background: '#606060',
|
|
88
|
+
},
|
|
89
|
+
infoColor: {
|
|
90
|
+
background_light: '#81C9E8',
|
|
91
|
+
foreground: '#000000',
|
|
92
|
+
background: '#36AEE1',
|
|
93
|
+
},
|
|
94
|
+
text: '#000000',
|
|
95
|
+
placeholderTextColor: '#C0C0C0',
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
export const colorBlindTheme = {
|
|
99
|
+
key: 'colorBlind',
|
|
100
|
+
name: 'Color blind',
|
|
101
|
+
colors: {
|
|
102
|
+
screenBackgroundColor: '#F2F2F2',
|
|
103
|
+
backgroundColor: '#FAFBFC',
|
|
104
|
+
primaryColor: {
|
|
105
|
+
background_light: '#BF9263',
|
|
106
|
+
foreground: '#000000',
|
|
107
|
+
background: '#994F00',
|
|
108
|
+
},
|
|
109
|
+
secondaryColor: {
|
|
110
|
+
background_light: '#63A4E0',
|
|
111
|
+
foreground: '#000000',
|
|
112
|
+
background: '#3288D9',
|
|
113
|
+
},
|
|
114
|
+
secondaryColor_dark: {
|
|
115
|
+
background_light: '#006CD1',
|
|
116
|
+
foreground: '#FFFFFF',
|
|
117
|
+
background: '#154470',
|
|
118
|
+
},
|
|
119
|
+
errorColor: {
|
|
120
|
+
background_light: '#EF9477',
|
|
121
|
+
foreground: '#000000',
|
|
122
|
+
background: '#E54D1D',
|
|
123
|
+
},
|
|
124
|
+
cautionColor: {
|
|
125
|
+
background_light: '#F5C0AA',
|
|
126
|
+
foreground: '#000000',
|
|
127
|
+
background: '#F49B76',
|
|
128
|
+
},
|
|
129
|
+
plannedColor: {
|
|
130
|
+
background_light: '#D3C7EC',
|
|
131
|
+
foreground: '#000000',
|
|
132
|
+
background: '#B5A1DF',
|
|
133
|
+
},
|
|
134
|
+
progressColor: {
|
|
135
|
+
background_light: '#FCE064',
|
|
136
|
+
foreground: '#000000',
|
|
137
|
+
background: '#FFD101',
|
|
138
|
+
},
|
|
139
|
+
priorityColor: {
|
|
140
|
+
background_light: '#81C9E8',
|
|
141
|
+
foreground: '#000000',
|
|
142
|
+
background: '#36AEE1',
|
|
143
|
+
},
|
|
144
|
+
defaultColor: {
|
|
145
|
+
background_light: '#63A4E0',
|
|
146
|
+
foreground: '#000000',
|
|
147
|
+
background: '#3288D9',
|
|
148
|
+
},
|
|
149
|
+
importantColor: {
|
|
150
|
+
background_light: '#EE6666',
|
|
151
|
+
foreground: '#000000',
|
|
152
|
+
background: '#F12F2F',
|
|
153
|
+
},
|
|
154
|
+
successColor: {
|
|
155
|
+
background_light: '#BF9263',
|
|
156
|
+
foreground: '#000000',
|
|
157
|
+
background: '#994F00',
|
|
158
|
+
},
|
|
159
|
+
warningColor: {
|
|
160
|
+
background_light: '#EE9B67',
|
|
161
|
+
foreground: '#000000',
|
|
162
|
+
background: '#F27B30',
|
|
163
|
+
},
|
|
164
|
+
inverseColor: {
|
|
165
|
+
background_light: '#9E9E9F',
|
|
166
|
+
foreground: '#FFFFFF',
|
|
167
|
+
background: '#606060',
|
|
168
|
+
},
|
|
169
|
+
infoColor: {
|
|
170
|
+
background_light: '#81C9E8',
|
|
171
|
+
foreground: '#000000',
|
|
172
|
+
background: '#36AEE1',
|
|
173
|
+
},
|
|
174
|
+
text: '#000000',
|
|
175
|
+
placeholderTextColor: '#C0C0C0',
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
//# sourceMappingURL=themes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../src/theme/themes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAmCH,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,GAAG,EAAE,OAAO;IACZ,IAAI,EAAE,OAAO;IACb,MAAM,EAAE;QACN,qBAAqB,EAAE,SAAS;QAChC,eAAe,EAAE,SAAS;QAC1B,YAAY,EAAE;YACZ,gBAAgB,EAAE,SAAS;YAC3B,UAAU,EAAE,SAAS;YACrB,UAAU,EAAE,SAAS;SACtB;QACD,cAAc,EAAE;YACd,gBAAgB,EAAE,SAAS;YAC3B,UAAU,EAAE,SAAS;YACrB,UAAU,EAAE,SAAS;SACtB;QACD,mBAAmB,EAAE;YACnB,gBAAgB,EAAE,SAAS;YAC3B,UAAU,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;YAC3B,UAAU,EAAE,SAAS;YACrB,UAAU,EAAE,SAAS;SACtB;QACD,YAAY,EAAE;YACZ,gBAAgB,EAAE,SAAS;YAC3B,UAAU,EAAE,SAAS;YACrB,UAAU,EAAE,SAAS;SACtB;QACD,SAAS,EAAE;YACT,gBAAgB,EAAE,SAAS;YAC3B,UAAU,EAAE,SAAS;YACrB,UAAU,EAAE,SAAS;SACtB;QACD,IAAI,EAAE,SAAS;QACf,oBAAoB,EAAE,SAAS;KAChC;CACF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface Writing {
|
|
2
|
+
key: string;
|
|
3
|
+
name: string;
|
|
4
|
+
style: WritingStyles;
|
|
5
|
+
}
|
|
6
|
+
export interface WritingStyles {
|
|
7
|
+
defaultSize: number;
|
|
8
|
+
title: TextStyle;
|
|
9
|
+
subTitle: TextStyle;
|
|
10
|
+
textImportant: TextStyle;
|
|
11
|
+
textDetails: TextStyle;
|
|
12
|
+
}
|
|
13
|
+
export interface TextStyle {
|
|
14
|
+
fontSize?: number;
|
|
15
|
+
fontWeight?: 'normal' | 'bold';
|
|
16
|
+
fontStyle?: 'normal' | 'italic';
|
|
17
|
+
}
|
|
18
|
+
export declare const writingDefaultTheme: Writing;
|
|
19
|
+
export declare const useWritingType: (type: 'title' | 'subtitle' | 'important' | 'details' | undefined) => TextStyle;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { useWritingStyle } from './WritingThemeContext';
|
|
19
|
+
export const writingDefaultTheme = {
|
|
20
|
+
key: 'default',
|
|
21
|
+
name: 'Default',
|
|
22
|
+
style: {
|
|
23
|
+
defaultSize: 14,
|
|
24
|
+
title: { fontSize: 16, fontWeight: 'bold', fontStyle: 'normal' },
|
|
25
|
+
subTitle: { fontSize: 16, fontWeight: 'normal', fontStyle: 'normal' },
|
|
26
|
+
textImportant: { fontSize: 14, fontWeight: 'bold', fontStyle: 'normal' },
|
|
27
|
+
textDetails: { fontSize: 14, fontWeight: 'normal', fontStyle: 'italic' },
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
export const useWritingType = (type) => {
|
|
31
|
+
const Writing = useWritingStyle();
|
|
32
|
+
switch (type) {
|
|
33
|
+
case 'title':
|
|
34
|
+
return Writing.title;
|
|
35
|
+
case 'subtitle':
|
|
36
|
+
return Writing.subTitle;
|
|
37
|
+
case 'important':
|
|
38
|
+
return Writing.textImportant;
|
|
39
|
+
case 'details':
|
|
40
|
+
return Writing.textDetails;
|
|
41
|
+
default:
|
|
42
|
+
return { fontSize: Writing.defaultSize };
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=writingTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writingTheme.js","sourceRoot":"","sources":["../../src/theme/writingTheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAsBtD,MAAM,CAAC,MAAM,mBAAmB,GAAY;IAC1C,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE;QACL,WAAW,EAAE,EAAE;QACf,KAAK,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAC;QAC9D,QAAQ,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAC;QACnE,aAAa,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAC;QACtE,WAAW,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAC;KACvE;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,IAAgE,EACrD,EAAE;IACb,MAAM,OAAO,GAAG,eAAe,EAAE,CAAC;IAElC,QAAQ,IAAI,EAAE;QACZ,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,KAAK,CAAC;QACvB,KAAK,UAAU;YACb,OAAO,OAAO,CAAC,QAAQ,CAAC;QAC1B,KAAK,WAAW;YACd,OAAO,OAAO,CAAC,aAAa,CAAC;QAC/B,KAAK,SAAS;YACZ,OAAO,OAAO,CAAC,WAAW,CAAC;QAC7B;YACE,OAAO,EAAC,QAAQ,EAAE,OAAO,CAAC,WAAW,EAAC,CAAC;KAC1C;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare class Animation {
|
|
2
|
+
config: {
|
|
3
|
+
easeInEaseOut: import("react-native").LayoutAnimationConfig;
|
|
4
|
+
linear: import("react-native").LayoutAnimationConfig;
|
|
5
|
+
spring: import("react-native").LayoutAnimationConfig;
|
|
6
|
+
};
|
|
7
|
+
constructor();
|
|
8
|
+
beforeAnimation(): void;
|
|
9
|
+
animateNext(config?: any): void;
|
|
10
|
+
}
|
|
11
|
+
export declare const animationUtil: Animation;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { LayoutAnimation, Platform, UIManager } from 'react-native';
|
|
19
|
+
class Animation {
|
|
20
|
+
config = {
|
|
21
|
+
easeInEaseOut: LayoutAnimation.Presets.easeInEaseOut,
|
|
22
|
+
linear: LayoutAnimation.Presets.linear,
|
|
23
|
+
spring: LayoutAnimation.Presets.spring,
|
|
24
|
+
};
|
|
25
|
+
constructor() {
|
|
26
|
+
this.beforeAnimation();
|
|
27
|
+
}
|
|
28
|
+
beforeAnimation() {
|
|
29
|
+
if (Platform.OS === 'android') {
|
|
30
|
+
if (UIManager.setLayoutAnimationEnabledExperimental) {
|
|
31
|
+
UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
animateNext(config = this.config.easeInEaseOut) {
|
|
36
|
+
LayoutAnimation.configureNext(config);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export const animationUtil = new Animation();
|
|
40
|
+
//# sourceMappingURL=AnimationUtil.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimationUtil.js","sourceRoot":"","sources":["../../src/tools/AnimationUtil.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAElE,MAAM,SAAS;IACb,MAAM,GAAG;QACP,aAAa,EAAE,eAAe,CAAC,OAAO,CAAC,aAAa;QACpD,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,MAAM;QACtC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,MAAM;KACvC,CAAC;IAEF;QACE,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAED,eAAe;QACb,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,EAAE;YAC7B,IAAI,SAAS,CAAC,qCAAqC,EAAE;gBACnD,SAAS,CAAC,qCAAqC,CAAC,IAAI,CAAC,CAAC;aACvD;SACF;IACH,CAAC;IAED,WAAW,CAAC,SAAc,IAAI,CAAC,MAAM,CAAC,aAAa;QACjD,eAAe,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
class File {
|
|
19
|
+
static getFileExtension = filename => {
|
|
20
|
+
if (filename == null) {
|
|
21
|
+
return filename;
|
|
22
|
+
}
|
|
23
|
+
return filename.split('.').pop();
|
|
24
|
+
};
|
|
25
|
+
static getFileIcon = filename => {
|
|
26
|
+
switch (this.getFileExtension(filename)) {
|
|
27
|
+
case 'pdf':
|
|
28
|
+
return 'file-pdf';
|
|
29
|
+
case 'jpeg':
|
|
30
|
+
case 'jpg':
|
|
31
|
+
case 'svg':
|
|
32
|
+
case 'png':
|
|
33
|
+
return 'file-image';
|
|
34
|
+
case 'csv':
|
|
35
|
+
return 'file-csv';
|
|
36
|
+
case 'zip':
|
|
37
|
+
return 'file-archive';
|
|
38
|
+
case 'docx':
|
|
39
|
+
case 'doc':
|
|
40
|
+
case 'odt':
|
|
41
|
+
case 'txt':
|
|
42
|
+
return 'file-word';
|
|
43
|
+
case 'potx':
|
|
44
|
+
case 'pptx':
|
|
45
|
+
case 'ppt':
|
|
46
|
+
case 'odp':
|
|
47
|
+
return 'file-powerpoint';
|
|
48
|
+
case 'ods':
|
|
49
|
+
case 'xls':
|
|
50
|
+
case 'xlsx':
|
|
51
|
+
case 'xltm':
|
|
52
|
+
return 'file-excel';
|
|
53
|
+
case 'mp4':
|
|
54
|
+
case 'mp3':
|
|
55
|
+
return 'file-audio';
|
|
56
|
+
default:
|
|
57
|
+
return 'file';
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export default File;
|
|
62
|
+
//# sourceMappingURL=file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/types/file.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,IAAI;IACR,MAAM,CAAC,gBAAgB,GAAG,QAAQ,CAAC,EAAE;QACnC,IAAI,QAAQ,IAAI,IAAI,EAAE;YACpB,OAAO,QAAQ,CAAC;SACjB;QACD,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IACnC,CAAC,CAAC;IAEF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC,EAAE;QAC9B,QAAQ,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE;YACvC,KAAK,KAAK;gBACR,OAAO,UAAU,CAAC;YACpB,KAAK,MAAM,CAAC;YACZ,KAAK,KAAK,CAAC;YACX,KAAK,KAAK,CAAC;YACX,KAAK,KAAK;gBACR,OAAO,YAAY,CAAC;YACtB,KAAK,KAAK;gBACR,OAAO,UAAU,CAAC;YACpB,KAAK,KAAK;gBACR,OAAO,cAAc,CAAC;YACxB,KAAK,MAAM,CAAC;YACZ,KAAK,KAAK,CAAC;YACX,KAAK,KAAK,CAAC;YACX,KAAK,KAAK;gBACR,OAAO,WAAW,CAAC;YACrB,KAAK,MAAM,CAAC;YACZ,KAAK,MAAM,CAAC;YACZ,KAAK,KAAK,CAAC;YACX,KAAK,KAAK;gBACR,OAAO,iBAAiB,CAAC;YAC3B,KAAK,KAAK,CAAC;YACX,KAAK,KAAK,CAAC;YACX,KAAK,MAAM,CAAC;YACZ,KAAK,MAAM;gBACT,OAAO,YAAY,CAAC;YACtB,KAAK,KAAK,CAAC;YACX,KAAK,KAAK;gBACR,OAAO,YAAY,CAAC;YACtB;gBACE,OAAO,MAAM,CAAC;SACjB;IACH,CAAC,CAAC;;AAGJ,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export const replace = (arr, oldValue, newValue, key) => {
|
|
19
|
+
const idx = indexOfElement(arr, oldValue, key);
|
|
20
|
+
if (idx >= 0) {
|
|
21
|
+
arr.splice(idx, 1, newValue);
|
|
22
|
+
}
|
|
23
|
+
return arr;
|
|
24
|
+
};
|
|
25
|
+
export const indexOfElement = (arr, element, key) => {
|
|
26
|
+
if (arr == null) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return arr.findIndex(item => item?.[key] === element?.[key]);
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=arrays.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrays.js","sourceRoot":"","sources":["../../src/utils/arrays.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,GAAU,EACV,QAAa,EACb,QAAa,EACb,GAAW,EACJ,EAAE;IACT,MAAM,GAAG,GAAG,cAAc,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC/C,IAAI,GAAG,IAAI,CAAC,EAAE;QACZ,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;KAC9B;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,GAAU,EACV,OAAY,EACZ,GAAW,EACH,EAAE;IACV,IAAI,GAAG,IAAI,IAAI,EAAE;QACf,OAAO,IAAI,CAAC;KACb;IACD,OAAO,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export function getCommonStyles(Colors: any): {
|
|
2
|
+
filter: {
|
|
3
|
+
backgroundColor: any;
|
|
4
|
+
borderRadius: number;
|
|
5
|
+
elevation: number;
|
|
6
|
+
paddingHorizontal: number;
|
|
7
|
+
paddingVertical: number;
|
|
8
|
+
marginVertical: number;
|
|
9
|
+
};
|
|
10
|
+
filterAlign: {
|
|
11
|
+
marginHorizontal: number;
|
|
12
|
+
flexDirection: "row";
|
|
13
|
+
justifyContent: "space-between";
|
|
14
|
+
alignItems: "center";
|
|
15
|
+
};
|
|
16
|
+
filterSize: {
|
|
17
|
+
width: string;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
20
|
+
button: {
|
|
21
|
+
flexDirection: "row";
|
|
22
|
+
alignSelf: "center";
|
|
23
|
+
justifyContent: "center";
|
|
24
|
+
alignItems: "center";
|
|
25
|
+
alignContent: "center";
|
|
26
|
+
paddingVertical: number;
|
|
27
|
+
marginVertical: number;
|
|
28
|
+
borderRadius: number;
|
|
29
|
+
width: string;
|
|
30
|
+
height: number;
|
|
31
|
+
minHeight: number;
|
|
32
|
+
maxHeight: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { Dimensions, StyleSheet } from 'react-native';
|
|
19
|
+
export const getCommonStyles = Colors => StyleSheet.create({
|
|
20
|
+
filter: {
|
|
21
|
+
backgroundColor: Colors.backgroundColor,
|
|
22
|
+
borderRadius: 13,
|
|
23
|
+
elevation: 2,
|
|
24
|
+
paddingHorizontal: 12,
|
|
25
|
+
paddingVertical: 0,
|
|
26
|
+
marginVertical: 3,
|
|
27
|
+
},
|
|
28
|
+
filterAlign: {
|
|
29
|
+
marginHorizontal: 18,
|
|
30
|
+
flexDirection: 'row',
|
|
31
|
+
justifyContent: 'space-between',
|
|
32
|
+
alignItems: 'center',
|
|
33
|
+
},
|
|
34
|
+
filterSize: {
|
|
35
|
+
width: '90%',
|
|
36
|
+
height: 40,
|
|
37
|
+
},
|
|
38
|
+
button: {
|
|
39
|
+
flexDirection: 'row',
|
|
40
|
+
alignSelf: 'center',
|
|
41
|
+
justifyContent: 'center',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
alignContent: 'center',
|
|
44
|
+
paddingVertical: 5,
|
|
45
|
+
marginVertical: 5,
|
|
46
|
+
borderRadius: 35,
|
|
47
|
+
width: '90%',
|
|
48
|
+
height: Dimensions.get('window').height * 0.07,
|
|
49
|
+
minHeight: 30,
|
|
50
|
+
maxHeight: 40,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=commons-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commons-styles.js","sourceRoot":"","sources":["../../src/utils/commons-styles.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAEpD,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,EAAE,CACtC,UAAU,CAAC,MAAM,CAAC;IAChB,MAAM,EAAE;QACN,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,CAAC;QACZ,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,CAAC;QAClB,cAAc,EAAE,CAAC;KAClB;IACD,WAAW,EAAE;QACX,gBAAgB,EAAE,EAAE;QACpB,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,eAAe;QAC/B,UAAU,EAAE,QAAQ;KACrB;IACD,UAAU,EAAE;QACV,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,EAAE;KACX;IACD,MAAM,EAAE;QACN,aAAa,EAAE,KAAK;QACpB,SAAS,EAAE,QAAQ;QACnB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,QAAQ;QACtB,eAAe,EAAE,CAAC;QAClB,cAAc,EAAE,CAAC;QACjB,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,IAAI;QAC9C,SAAS,EAAE,EAAE;QACb,SAAS,EAAE,EAAE;KACd;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { checkNullString, splitInTwo } from './strings';
|
|
19
|
+
export function formatDate(inputDate, format) {
|
|
20
|
+
// Format must contains three parts : MM for the month, DD for the day and YYYY for the year
|
|
21
|
+
const date = new Date(inputDate);
|
|
22
|
+
const day = date.getDate();
|
|
23
|
+
const month = date.getMonth() + 1;
|
|
24
|
+
const year = date.getFullYear();
|
|
25
|
+
format = format.replace('MM', month.toString().padStart(2, '0'));
|
|
26
|
+
format = format.replace('YYYY', year.toString());
|
|
27
|
+
format = format.replace('DD', day.toString().padStart(2, '0'));
|
|
28
|
+
return format;
|
|
29
|
+
}
|
|
30
|
+
export function formatNumber(number, decimalSpacer = '.', thousandSpacer = ' ') {
|
|
31
|
+
if (checkNullString(number)) {
|
|
32
|
+
return `0${decimalSpacer}00`;
|
|
33
|
+
}
|
|
34
|
+
number = parseFloat(number).toFixed(2);
|
|
35
|
+
const decimalPart = splitInTwo(number)[1];
|
|
36
|
+
const integerPart = splitInTwo(number)[0];
|
|
37
|
+
let result = '';
|
|
38
|
+
let counter = 0;
|
|
39
|
+
for (var i = integerPart.length - 1; i >= 0; i--) {
|
|
40
|
+
result =
|
|
41
|
+
counter !== 0 && counter % 3 === 0
|
|
42
|
+
? integerPart[i] + thousandSpacer + result
|
|
43
|
+
: integerPart[i] + result;
|
|
44
|
+
counter++;
|
|
45
|
+
}
|
|
46
|
+
return `${result}${decimalSpacer}${decimalPart ? decimalPart : '00'}`;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=formatters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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CAAC,CAAC;IAE1C,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,KAAK,IAAI,CAAC,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QAChD,MAAM;YACJ,OAAO,KAAK,CAAC,IAAI,OAAO,GAAG,CAAC,KAAK,CAAC;gBAChC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,cAAc,GAAG,MAAM;gBAC1C,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;QAC9B,OAAO,EAAE,CAAC;KACX;IAED,OAAO,GAAG,MAAM,GAAG,aAAa,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { StyleSheet } from 'react-native';
|
|
19
|
+
export const getHeaderStyles = Colors => StyleSheet.create({
|
|
20
|
+
headerTitle: {
|
|
21
|
+
color: Colors.text,
|
|
22
|
+
},
|
|
23
|
+
headerColor: {
|
|
24
|
+
backgroundColor: Colors.backgroundColor,
|
|
25
|
+
},
|
|
26
|
+
listScreenHeaderStyle: {
|
|
27
|
+
backgroundColor: Colors.backgroundColor,
|
|
28
|
+
elevation: 0,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=headerStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headerStyle.js","sourceRoot":"","sources":["../../src/utils/headerStyle.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,EAAE,CACtC,UAAU,CAAC,MAAM,CAAC;IAChB,WAAW,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,IAAI;KACnB;IACD,WAAW,EAAE;QACX,eAAe,EAAE,MAAM,CAAC,eAAe;KACxC;IACD,qBAAqB,EAAE;QACrB,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAC"}
|