@okta/odyssey-react-mui 1.14.5 → 1.14.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/Badge.js +1 -1
  3. package/dist/Badge.js.map +1 -1
  4. package/dist/Callout.js +27 -10
  5. package/dist/Callout.js.map +1 -1
  6. package/dist/Field.js.map +1 -1
  7. package/dist/Fieldset.js +17 -14
  8. package/dist/Fieldset.js.map +1 -1
  9. package/dist/Form.js +33 -23
  10. package/dist/Form.js.map +1 -1
  11. package/dist/MenuButton.js +1 -1
  12. package/dist/MenuButton.js.map +1 -1
  13. package/dist/SearchField.js +2 -2
  14. package/dist/SearchField.js.map +1 -1
  15. package/dist/labs/FileUpload.js +195 -0
  16. package/dist/labs/FileUpload.js.map +1 -0
  17. package/dist/labs/FileUploadIllustration.js +54 -0
  18. package/dist/labs/FileUploadIllustration.js.map +1 -0
  19. package/dist/labs/FileUploadPreview.js +109 -0
  20. package/dist/labs/FileUploadPreview.js.map +1 -0
  21. package/dist/labs/index.js +1 -0
  22. package/dist/labs/index.js.map +1 -1
  23. package/dist/properties/ts/odyssey-react-mui.js +3 -0
  24. package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
  25. package/dist/properties/ts/odyssey-react-mui_cs.js +2 -1
  26. package/dist/properties/ts/odyssey-react-mui_cs.js.map +1 -1
  27. package/dist/properties/ts/odyssey-react-mui_da.js +2 -1
  28. package/dist/properties/ts/odyssey-react-mui_da.js.map +1 -1
  29. package/dist/properties/ts/odyssey-react-mui_de.js +2 -1
  30. package/dist/properties/ts/odyssey-react-mui_de.js.map +1 -1
  31. package/dist/properties/ts/odyssey-react-mui_el.js +2 -1
  32. package/dist/properties/ts/odyssey-react-mui_el.js.map +1 -1
  33. package/dist/properties/ts/odyssey-react-mui_es.js +2 -1
  34. package/dist/properties/ts/odyssey-react-mui_es.js.map +1 -1
  35. package/dist/properties/ts/odyssey-react-mui_fi.js +2 -1
  36. package/dist/properties/ts/odyssey-react-mui_fi.js.map +1 -1
  37. package/dist/properties/ts/odyssey-react-mui_fr.js +2 -1
  38. package/dist/properties/ts/odyssey-react-mui_fr.js.map +1 -1
  39. package/dist/properties/ts/odyssey-react-mui_hu.js +2 -1
  40. package/dist/properties/ts/odyssey-react-mui_hu.js.map +1 -1
  41. package/dist/properties/ts/odyssey-react-mui_id.js +2 -1
  42. package/dist/properties/ts/odyssey-react-mui_id.js.map +1 -1
  43. package/dist/properties/ts/odyssey-react-mui_it.js +2 -1
  44. package/dist/properties/ts/odyssey-react-mui_it.js.map +1 -1
  45. package/dist/properties/ts/odyssey-react-mui_ja.js +2 -1
  46. package/dist/properties/ts/odyssey-react-mui_ja.js.map +1 -1
  47. package/dist/properties/ts/odyssey-react-mui_ko.js +2 -1
  48. package/dist/properties/ts/odyssey-react-mui_ko.js.map +1 -1
  49. package/dist/properties/ts/odyssey-react-mui_ms.js +2 -1
  50. package/dist/properties/ts/odyssey-react-mui_ms.js.map +1 -1
  51. package/dist/properties/ts/odyssey-react-mui_nb.js +2 -1
  52. package/dist/properties/ts/odyssey-react-mui_nb.js.map +1 -1
  53. package/dist/properties/ts/odyssey-react-mui_nl_NL.js +2 -1
  54. package/dist/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
  55. package/dist/properties/ts/odyssey-react-mui_pl.js +2 -1
  56. package/dist/properties/ts/odyssey-react-mui_pl.js.map +1 -1
  57. package/dist/properties/ts/odyssey-react-mui_pt_BR.js +2 -1
  58. package/dist/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
  59. package/dist/properties/ts/odyssey-react-mui_ro.js +2 -1
  60. package/dist/properties/ts/odyssey-react-mui_ro.js.map +1 -1
  61. package/dist/properties/ts/odyssey-react-mui_ru.js +2 -1
  62. package/dist/properties/ts/odyssey-react-mui_ru.js.map +1 -1
  63. package/dist/properties/ts/odyssey-react-mui_sv.js +2 -1
  64. package/dist/properties/ts/odyssey-react-mui_sv.js.map +1 -1
  65. package/dist/properties/ts/odyssey-react-mui_th.js +2 -1
  66. package/dist/properties/ts/odyssey-react-mui_th.js.map +1 -1
  67. package/dist/properties/ts/odyssey-react-mui_tr.js +2 -1
  68. package/dist/properties/ts/odyssey-react-mui_tr.js.map +1 -1
  69. package/dist/properties/ts/odyssey-react-mui_uk.js +2 -1
  70. package/dist/properties/ts/odyssey-react-mui_uk.js.map +1 -1
  71. package/dist/properties/ts/odyssey-react-mui_vi.js +2 -1
  72. package/dist/properties/ts/odyssey-react-mui_vi.js.map +1 -1
  73. package/dist/properties/ts/odyssey-react-mui_zh_CN.js +2 -1
  74. package/dist/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
  75. package/dist/properties/ts/odyssey-react-mui_zh_TW.js +2 -1
  76. package/dist/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
  77. package/dist/src/Callout.d.ts +1 -1
  78. package/dist/src/Callout.d.ts.map +1 -1
  79. package/dist/src/Field.d.ts +8 -7
  80. package/dist/src/Field.d.ts.map +1 -1
  81. package/dist/src/Fieldset.d.ts.map +1 -1
  82. package/dist/src/Form.d.ts.map +1 -1
  83. package/dist/src/OdysseyTranslationProvider.d.ts +1 -1
  84. package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -1
  85. package/dist/src/SearchField.d.ts.map +1 -1
  86. package/dist/src/labs/FileUpload.d.ts +40 -0
  87. package/dist/src/labs/FileUpload.d.ts.map +1 -0
  88. package/dist/src/labs/FileUploadIllustration.d.ts +15 -0
  89. package/dist/src/labs/FileUploadIllustration.d.ts.map +1 -0
  90. package/dist/src/labs/FileUploadPreview.d.ts +21 -0
  91. package/dist/src/labs/FileUploadPreview.d.ts.map +1 -0
  92. package/dist/src/labs/index.d.ts +1 -0
  93. package/dist/src/labs/index.d.ts.map +1 -1
  94. package/dist/src/properties/ts/odyssey-react-mui.d.ts +3 -0
  95. package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -1
  96. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts +1 -0
  97. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
  98. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts +1 -0
  99. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
  100. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts +1 -0
  101. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
  102. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts +1 -0
  103. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
  104. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts +1 -0
  105. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
  106. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts +1 -0
  107. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
  108. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts +1 -0
  109. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
  110. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts +1 -0
  111. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
  112. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts +1 -0
  113. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
  114. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts +1 -0
  115. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
  116. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts +1 -0
  117. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
  118. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts +1 -0
  119. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
  120. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts +1 -0
  121. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
  122. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts +1 -0
  123. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
  124. package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts +1 -0
  125. package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
  126. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts +1 -0
  127. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
  128. package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts +1 -0
  129. package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
  130. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts +1 -0
  131. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
  132. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts +1 -0
  133. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
  134. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts +1 -0
  135. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
  136. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts +1 -0
  137. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
  138. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts +1 -0
  139. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
  140. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts +1 -0
  141. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
  142. package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts +1 -0
  143. package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
  144. package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts +1 -0
  145. package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
  146. package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts +1 -0
  147. package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
  148. package/dist/src/theme/components.d.ts.map +1 -1
  149. package/dist/theme/components.js +11 -7
  150. package/dist/theme/components.js.map +1 -1
  151. package/dist/tsconfig.production.tsbuildinfo +1 -1
  152. package/package.json +3 -3
  153. package/src/Badge.tsx +1 -1
  154. package/src/Callout.tsx +28 -10
  155. package/src/Field.tsx +9 -7
  156. package/src/Fieldset.tsx +24 -18
  157. package/src/Form.tsx +43 -27
  158. package/src/MenuButton.tsx +1 -1
  159. package/src/SearchField.tsx +1 -2
  160. package/src/labs/FileUpload.tsx +301 -0
  161. package/src/labs/FileUploadIllustration.tsx +66 -0
  162. package/src/labs/FileUploadPreview.tsx +150 -0
  163. package/src/labs/index.ts +1 -2
  164. package/src/properties/odyssey-react-mui.properties +3 -7
  165. package/src/properties/translations/odyssey-react-mui_cs.properties +1 -0
  166. package/src/properties/translations/odyssey-react-mui_da.properties +1 -0
  167. package/src/properties/translations/odyssey-react-mui_de.properties +1 -0
  168. package/src/properties/translations/odyssey-react-mui_el.properties +1 -0
  169. package/src/properties/translations/odyssey-react-mui_es.properties +1 -0
  170. package/src/properties/translations/odyssey-react-mui_fi.properties +1 -0
  171. package/src/properties/translations/odyssey-react-mui_fr.properties +1 -0
  172. package/src/properties/translations/odyssey-react-mui_hu.properties +1 -0
  173. package/src/properties/translations/odyssey-react-mui_id.properties +1 -0
  174. package/src/properties/translations/odyssey-react-mui_it.properties +1 -0
  175. package/src/properties/translations/odyssey-react-mui_ja.properties +1 -0
  176. package/src/properties/translations/odyssey-react-mui_ko.properties +1 -0
  177. package/src/properties/translations/odyssey-react-mui_ms.properties +1 -0
  178. package/src/properties/translations/odyssey-react-mui_nb.properties +1 -0
  179. package/src/properties/translations/odyssey-react-mui_nl_NL.properties +1 -0
  180. package/src/properties/translations/odyssey-react-mui_pl.properties +1 -0
  181. package/src/properties/translations/odyssey-react-mui_pt_BR.properties +1 -0
  182. package/src/properties/translations/odyssey-react-mui_ro.properties +1 -0
  183. package/src/properties/translations/odyssey-react-mui_ru.properties +1 -0
  184. package/src/properties/translations/odyssey-react-mui_sv.properties +1 -0
  185. package/src/properties/translations/odyssey-react-mui_th.properties +1 -0
  186. package/src/properties/translations/odyssey-react-mui_tr.properties +1 -0
  187. package/src/properties/translations/odyssey-react-mui_uk.properties +1 -0
  188. package/src/properties/translations/odyssey-react-mui_vi.properties +1 -0
  189. package/src/properties/translations/odyssey-react-mui_zh_CN.properties +1 -0
  190. package/src/properties/translations/odyssey-react-mui_zh_TW.properties +1 -0
  191. package/src/properties/ts/odyssey-react-mui.ts +1 -1
  192. package/src/properties/ts/odyssey-react-mui_cs.ts +1 -1
  193. package/src/properties/ts/odyssey-react-mui_da.ts +1 -1
  194. package/src/properties/ts/odyssey-react-mui_de.ts +1 -1
  195. package/src/properties/ts/odyssey-react-mui_el.ts +1 -1
  196. package/src/properties/ts/odyssey-react-mui_es.ts +1 -1
  197. package/src/properties/ts/odyssey-react-mui_fi.ts +1 -1
  198. package/src/properties/ts/odyssey-react-mui_fr.ts +1 -1
  199. package/src/properties/ts/odyssey-react-mui_hu.ts +1 -1
  200. package/src/properties/ts/odyssey-react-mui_id.ts +1 -1
  201. package/src/properties/ts/odyssey-react-mui_it.ts +1 -1
  202. package/src/properties/ts/odyssey-react-mui_ja.ts +1 -1
  203. package/src/properties/ts/odyssey-react-mui_ko.ts +1 -1
  204. package/src/properties/ts/odyssey-react-mui_ms.ts +1 -1
  205. package/src/properties/ts/odyssey-react-mui_nb.ts +1 -1
  206. package/src/properties/ts/odyssey-react-mui_nl_NL.ts +1 -1
  207. package/src/properties/ts/odyssey-react-mui_pl.ts +1 -1
  208. package/src/properties/ts/odyssey-react-mui_pt_BR.ts +1 -1
  209. package/src/properties/ts/odyssey-react-mui_ro.ts +1 -1
  210. package/src/properties/ts/odyssey-react-mui_ru.ts +1 -1
  211. package/src/properties/ts/odyssey-react-mui_sv.ts +1 -1
  212. package/src/properties/ts/odyssey-react-mui_th.ts +1 -1
  213. package/src/properties/ts/odyssey-react-mui_tr.ts +1 -1
  214. package/src/properties/ts/odyssey-react-mui_uk.ts +1 -1
  215. package/src/properties/ts/odyssey-react-mui_vi.ts +1 -1
  216. package/src/properties/ts/odyssey-react-mui_zh_CN.ts +1 -1
  217. package/src/properties/ts/odyssey-react-mui_zh_TW.ts +1 -1
  218. package/src/theme/components.tsx +9 -5
@@ -0,0 +1,195 @@
1
+ /*!
2
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+
13
+ import { memo, useCallback, useEffect, useRef, useState } from "react";
14
+ import styled from "@emotion/styled";
15
+ import { useTranslation } from "react-i18next";
16
+ import { Button } from "../Button.js";
17
+ import { UploadIcon } from "../icons.generated/index.js";
18
+ import { Field } from "../Field.js";
19
+ import { FileUploadPreview } from "./FileUploadPreview.js";
20
+ import { FileUploadIllustration } from "./FileUploadIllustration.js";
21
+ import { useOdysseyDesignTokens } from "../OdysseyDesignTokensContext.js";
22
+ import { Support } from "../Typography.js";
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { jsxs as _jsxs } from "react/jsx-runtime";
25
+ import { Fragment as _Fragment } from "react/jsx-runtime";
26
+ export const fileUploadTypes = ["single", "multiple"];
27
+ export const fileUploadVariants = ["button", "dragAndDrop", "dragAndDropWithIcon"];
28
+ const BaseInputWrapper = styled.div({
29
+ position: "relative",
30
+ alignSelf: "flex-start",
31
+ input: {
32
+ position: "absolute",
33
+ width: "100%",
34
+ height: "100%",
35
+ opacity: 0
36
+ }
37
+ });
38
+ const InputContainer = styled(BaseInputWrapper)({
39
+ display: "flex",
40
+ alignSelf: "unset",
41
+ alignItems: "center",
42
+ justifyContent: "center",
43
+ "&:has(input:focus)": {
44
+ borderStyle: "solid"
45
+ }
46
+ }, ({
47
+ odysseyDesignTokens
48
+ }) => ({
49
+ padding: `${odysseyDesignTokens.Spacing6} ${odysseyDesignTokens.Spacing3}`,
50
+ border: `1px dashed ${odysseyDesignTokens.HueNeutral300}`,
51
+ borderRadius: odysseyDesignTokens.BorderRadiusMain,
52
+ transition: `border-color ${odysseyDesignTokens.TransitionTimingMain}, box-shadow ${odysseyDesignTokens.TransitionTimingMain}`,
53
+ "&:hover": {
54
+ borderColor: odysseyDesignTokens.HueNeutral700
55
+ },
56
+ "&:has(input:focus)": {
57
+ borderColor: odysseyDesignTokens.FocusOutlineColorPrimary,
58
+ boxShadow: `0 0 0 1px ${odysseyDesignTokens.FocusOutlineColorPrimary}`,
59
+ outline: `${odysseyDesignTokens.FocusOutlineWidthMain} ${odysseyDesignTokens.FocusOutlineStyle} transparent`,
60
+ outlineOffset: odysseyDesignTokens.FocusOutlineOffsetTight
61
+ },
62
+ "&:has(input:disabled)": {
63
+ backgroundColor: odysseyDesignTokens.HueNeutral50,
64
+ border: `1px solid ${odysseyDesignTokens.BorderColorDisabled}`,
65
+ color: odysseyDesignTokens.TypographyColorDisabled,
66
+ "&:hover": {
67
+ borderColor: odysseyDesignTokens.BorderColorDisabled
68
+ }
69
+ }
70
+ }));
71
+ const ButtonAndInfoContainer = styled.div({
72
+ display: "flex",
73
+ flexDirection: "column",
74
+ alignItems: "center",
75
+ justifyContent: "center"
76
+ });
77
+ const FileUpload = ({
78
+ acceptedFileTypes,
79
+ errorMessage,
80
+ id,
81
+ isDisabled = false,
82
+ isOptional,
83
+ hint,
84
+ HintLinkComponent,
85
+ label,
86
+ onChange,
87
+ type,
88
+ variant
89
+ }) => {
90
+ const odysseyDesignTokens = useOdysseyDesignTokens();
91
+ const {
92
+ t
93
+ } = useTranslation();
94
+ const inputRef = useRef(null);
95
+ const [filesToUpload, setFilesToUpload] = useState([]);
96
+ useEffect(() => {
97
+ onChange(filesToUpload);
98
+ }, [filesToUpload, onChange]);
99
+ const updateFilesToUpload = useCallback(event => {
100
+ const {
101
+ files
102
+ } = event.target;
103
+ if (files && files.length > 0) {
104
+ const mergedFiles = type === "multiple" ? [...filesToUpload, ...files] : [...files];
105
+ setFilesToUpload(mergedFiles);
106
+ }
107
+ event.target.value = "";
108
+ }, [type, filesToUpload]);
109
+ const triggerFileInputClick = useCallback(() => {
110
+ inputRef.current?.focus();
111
+ }, [inputRef]);
112
+ const removeFileFromFilesToUploadList = useCallback(name => {
113
+ const deletedFileFilteredOut = filesToUpload.filter(file => file.name !== name);
114
+ setFilesToUpload(deletedFileFilteredOut);
115
+ }, [filesToUpload]);
116
+ const renderFileInput = useCallback(({
117
+ ariaDescribedBy,
118
+ errorMessageElementId,
119
+ id,
120
+ labelElementId
121
+ }) => {
122
+ const fileNames = filesToUpload.map(file => file.name);
123
+ const acceptedFileTypesAsString = acceptedFileTypes?.join(",");
124
+ const Input = () => _jsx("input", {
125
+ accept: acceptedFileTypesAsString,
126
+ "aria-describedby": ariaDescribedBy,
127
+ "aria-errormessage": errorMessageElementId,
128
+ "aria-labelledby": labelElementId,
129
+ disabled: isDisabled,
130
+ id: id,
131
+ multiple: type === "multiple",
132
+ onChange: updateFilesToUpload,
133
+ ref: inputRef,
134
+ title: "",
135
+ type: "file"
136
+ });
137
+ if (variant === "button") {
138
+ return _jsxs(_Fragment, {
139
+ children: [_jsxs(BaseInputWrapper, {
140
+ children: [_jsx(Input, {}), _jsx(Button, {
141
+ isDisabled: isDisabled,
142
+ label: t("fileupload.button.text"),
143
+ onClick: triggerFileInputClick,
144
+ startIcon: _jsx(UploadIcon, {}),
145
+ variant: "secondary"
146
+ })]
147
+ }), _jsx(FileUploadPreview, {
148
+ fileNames: fileNames,
149
+ onFileRemove: removeFileFromFilesToUploadList,
150
+ isDisabled: isDisabled
151
+ })]
152
+ });
153
+ }
154
+ return _jsxs(_Fragment, {
155
+ children: [_jsxs(InputContainer, {
156
+ odysseyDesignTokens: odysseyDesignTokens,
157
+ children: [_jsx(Input, {}), _jsxs(ButtonAndInfoContainer, {
158
+ children: [variant === "dragAndDropWithIcon" && _jsx(FileUploadIllustration, {}), _jsx(Support, {
159
+ color: "textSecondary",
160
+ children: t("fileupload.prompt.text")
161
+ }), _jsx(Button, {
162
+ isDisabled: isDisabled,
163
+ label: t("fileupload.button.text"),
164
+ onClick: triggerFileInputClick,
165
+ startIcon: _jsx(UploadIcon, {}),
166
+ variant: "secondary"
167
+ })]
168
+ })]
169
+ }), _jsx(FileUploadPreview, {
170
+ fileNames: fileNames,
171
+ onFileRemove: removeFileFromFilesToUploadList,
172
+ isDisabled: isDisabled
173
+ })]
174
+ });
175
+ }, [acceptedFileTypes, filesToUpload, isDisabled, inputRef, odysseyDesignTokens, removeFileFromFilesToUploadList, triggerFileInputClick, t, type, updateFilesToUpload, variant]);
176
+ return _jsx(_Fragment, {
177
+ children: _jsx(Field, {
178
+ errorMessage: errorMessage,
179
+ fieldType: "single",
180
+ hasVisibleLabel: true,
181
+ hint: hint,
182
+ HintLinkComponent: HintLinkComponent,
183
+ id: id,
184
+ isDisabled: isDisabled,
185
+ isFullWidth: true,
186
+ isOptional: isOptional,
187
+ label: label,
188
+ renderFieldComponent: renderFileInput
189
+ })
190
+ });
191
+ };
192
+ const MemoizedFileUpload = memo(FileUpload);
193
+ MemoizedFileUpload.displayName = "FileUpload";
194
+ export { MemoizedFileUpload as FileUpload };
195
+ //# sourceMappingURL=FileUpload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileUpload.js","names":["memo","useCallback","useEffect","useRef","useState","styled","useTranslation","Button","UploadIcon","Field","FileUploadPreview","FileUploadIllustration","useOdysseyDesignTokens","Support","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","fileUploadTypes","fileUploadVariants","BaseInputWrapper","div","position","alignSelf","input","width","height","opacity","InputContainer","display","alignItems","justifyContent","borderStyle","odysseyDesignTokens","padding","Spacing6","Spacing3","border","HueNeutral300","borderRadius","BorderRadiusMain","transition","TransitionTimingMain","borderColor","HueNeutral700","FocusOutlineColorPrimary","boxShadow","outline","FocusOutlineWidthMain","FocusOutlineStyle","outlineOffset","FocusOutlineOffsetTight","backgroundColor","HueNeutral50","BorderColorDisabled","color","TypographyColorDisabled","ButtonAndInfoContainer","flexDirection","FileUpload","acceptedFileTypes","errorMessage","id","isDisabled","isOptional","hint","HintLinkComponent","label","onChange","type","variant","t","inputRef","filesToUpload","setFilesToUpload","updateFilesToUpload","event","files","target","length","mergedFiles","value","triggerFileInputClick","current","focus","removeFileFromFilesToUploadList","name","deletedFileFilteredOut","filter","file","renderFileInput","ariaDescribedBy","errorMessageElementId","labelElementId","fileNames","map","acceptedFileTypesAsString","join","Input","accept","disabled","multiple","ref","title","children","onClick","startIcon","onFileRemove","fieldType","hasVisibleLabel","isFullWidth","renderFieldComponent","MemoizedFileUpload","displayName"],"sources":["../../src/labs/FileUpload.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n memo,\n ChangeEvent,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport styled from \"@emotion/styled\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { Button } from \"../Button\";\nimport { UploadIcon } from \"../icons.generated\";\nimport { Field, RenderFieldComponentProps } from \"../Field\";\nimport { FieldComponentProps } from \"../FieldComponentProps\";\nimport { FileUploadPreview } from \"./FileUploadPreview\";\nimport { FileUploadIllustration } from \"./FileUploadIllustration\";\nimport {\n useOdysseyDesignTokens,\n DesignTokens,\n} from \"../OdysseyDesignTokensContext\";\nimport { Support } from \"../Typography\";\n\nexport const fileUploadTypes = [\"single\", \"multiple\"] as const;\nexport const fileUploadVariants = [\n \"button\",\n \"dragAndDrop\",\n \"dragAndDropWithIcon\",\n] as const;\n\nconst BaseInputWrapper = styled.div({\n position: \"relative\",\n alignSelf: \"flex-start\",\n\n input: {\n position: \"absolute\",\n width: \"100%\",\n height: \"100%\",\n opacity: 0,\n },\n});\n\nconst InputContainer = styled(BaseInputWrapper)<{\n odysseyDesignTokens: DesignTokens;\n}>(\n {\n display: \"flex\",\n alignSelf: \"unset\",\n alignItems: \"center\",\n justifyContent: \"center\",\n\n \"&:has(input:focus)\": {\n borderStyle: \"solid\",\n },\n },\n ({ odysseyDesignTokens }) => ({\n padding: `${odysseyDesignTokens.Spacing6} ${odysseyDesignTokens.Spacing3}`,\n border: `1px dashed ${odysseyDesignTokens.HueNeutral300}`,\n borderRadius: odysseyDesignTokens.BorderRadiusMain,\n transition: `border-color ${odysseyDesignTokens.TransitionTimingMain}, box-shadow ${odysseyDesignTokens.TransitionTimingMain}`,\n\n \"&:hover\": {\n borderColor: odysseyDesignTokens.HueNeutral700,\n },\n\n \"&:has(input:focus)\": {\n borderColor: odysseyDesignTokens.FocusOutlineColorPrimary,\n boxShadow: `0 0 0 1px ${odysseyDesignTokens.FocusOutlineColorPrimary}`,\n outline: `${odysseyDesignTokens.FocusOutlineWidthMain} ${odysseyDesignTokens.FocusOutlineStyle} transparent`,\n outlineOffset: odysseyDesignTokens.FocusOutlineOffsetTight,\n },\n\n \"&:has(input:disabled)\": {\n backgroundColor: odysseyDesignTokens.HueNeutral50,\n border: `1px solid ${odysseyDesignTokens.BorderColorDisabled}`,\n color: odysseyDesignTokens.TypographyColorDisabled,\n\n \"&:hover\": {\n borderColor: odysseyDesignTokens.BorderColorDisabled,\n },\n },\n }),\n);\n\nconst ButtonAndInfoContainer = styled.div({\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n});\n\nexport type FileUploadProps = {\n /**\n * an array of file types the user is able to upload. @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept#unique_file_type_specifiers for examples\n */\n acceptedFileTypes?: string[];\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * Function that is called when the list of ifles to upload is changed\n */\n onChange: (files: File[]) => void;\n /**\n * Either `single` or `multiple`. If `multiple`, multiple files can be uploaded\n */\n type?: (typeof fileUploadTypes)[number];\n /**\n * Either `button`, `dragAndDrop` or `dragAndDropWithIcon`. Will determine how component appears visually\n */\n variant: (typeof fileUploadVariants)[number];\n} & Pick<\n FieldComponentProps,\n | \"errorMessage\"\n | \"hint\"\n | \"HintLinkComponent\"\n | \"id\"\n | \"isDisabled\"\n | \"isOptional\"\n>;\n\nconst FileUpload = ({\n acceptedFileTypes,\n errorMessage,\n id,\n isDisabled = false,\n isOptional,\n hint,\n HintLinkComponent,\n label,\n onChange,\n type,\n variant,\n}: FileUploadProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n const inputRef = useRef<HTMLInputElement>(null);\n const [filesToUpload, setFilesToUpload] = useState<File[]>([]);\n\n useEffect(() => {\n onChange(filesToUpload);\n }, [filesToUpload, onChange]);\n\n const updateFilesToUpload = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const { files } = event.target;\n\n if (files && files.length > 0) {\n const mergedFiles =\n type === \"multiple\"\n ? [...filesToUpload, ...files]\n : ([...files] satisfies File[] as File[]);\n\n setFilesToUpload(mergedFiles);\n }\n\n // reset input value to allow re-upload of a file with the same name\n event.target.value = \"\";\n },\n [type, filesToUpload],\n );\n\n const triggerFileInputClick = useCallback(() => {\n inputRef.current?.focus();\n }, [inputRef]);\n\n const removeFileFromFilesToUploadList = useCallback<(name: string) => void>(\n (name) => {\n const deletedFileFilteredOut = filesToUpload.filter(\n (file) => file.name !== name,\n );\n setFilesToUpload(deletedFileFilteredOut);\n },\n [filesToUpload],\n );\n\n const renderFileInput = useCallback(\n ({\n ariaDescribedBy,\n errorMessageElementId,\n id,\n labelElementId,\n }: RenderFieldComponentProps) => {\n const fileNames = filesToUpload.map((file) => file.name);\n const acceptedFileTypesAsString = acceptedFileTypes?.join(\",\");\n\n const Input = () => (\n <input\n accept={acceptedFileTypesAsString}\n aria-describedby={ariaDescribedBy}\n aria-errormessage={errorMessageElementId}\n aria-labelledby={labelElementId}\n disabled={isDisabled}\n id={id}\n multiple={type === \"multiple\"}\n onChange={updateFilesToUpload}\n ref={inputRef}\n title=\"\"\n type=\"file\"\n />\n );\n\n if (variant === \"button\") {\n return (\n <>\n <BaseInputWrapper>\n <Input />\n <Button\n isDisabled={isDisabled}\n label={t(\"fileupload.button.text\")}\n onClick={triggerFileInputClick}\n startIcon={<UploadIcon />}\n variant=\"secondary\"\n />\n </BaseInputWrapper>\n <FileUploadPreview\n fileNames={fileNames}\n onFileRemove={removeFileFromFilesToUploadList}\n isDisabled={isDisabled}\n />\n </>\n );\n }\n\n return (\n <>\n <InputContainer odysseyDesignTokens={odysseyDesignTokens}>\n <Input />\n <ButtonAndInfoContainer>\n {variant === \"dragAndDropWithIcon\" && <FileUploadIllustration />}\n <Support color=\"textSecondary\">\n {t(\"fileupload.prompt.text\")}\n </Support>\n <Button\n isDisabled={isDisabled}\n label={t(\"fileupload.button.text\")}\n onClick={triggerFileInputClick}\n startIcon={<UploadIcon />}\n variant=\"secondary\"\n />\n </ButtonAndInfoContainer>\n </InputContainer>\n <FileUploadPreview\n fileNames={fileNames}\n onFileRemove={removeFileFromFilesToUploadList}\n isDisabled={isDisabled}\n />\n </>\n );\n },\n [\n acceptedFileTypes,\n filesToUpload,\n isDisabled,\n inputRef,\n odysseyDesignTokens,\n removeFileFromFilesToUploadList,\n triggerFileInputClick,\n t,\n type,\n updateFilesToUpload,\n variant,\n ],\n );\n\n return (\n <>\n <Field\n errorMessage={errorMessage}\n fieldType=\"single\"\n hasVisibleLabel\n hint={hint}\n HintLinkComponent={HintLinkComponent}\n id={id}\n isDisabled={isDisabled}\n isFullWidth\n isOptional={isOptional}\n label={label}\n renderFieldComponent={renderFileInput}\n />\n </>\n );\n};\n\nconst MemoizedFileUpload = memo(FileUpload);\nMemoizedFileUpload.displayName = \"FileUpload\";\n\nexport { MemoizedFileUpload as FileUpload };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,IAAI,EAEJC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,cAAc,QAAQ,eAAe;AAAC,SAEtCC,MAAM;AAAA,SACNC,UAAU;AAAA,SACVC,KAAK;AAAA,SAELC,iBAAiB;AAAA,SACjBC,sBAAsB;AAAA,SAE7BC,sBAAsB;AAAA,SAGfC,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAEhB,OAAO,MAAMC,eAAe,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAU;AAC9D,OAAO,MAAMC,kBAAkB,GAAG,CAChC,QAAQ,EACR,aAAa,EACb,qBAAqB,CACb;AAEV,MAAMC,gBAAgB,GAAGjB,MAAM,CAACkB,GAAG,CAAC;EAClCC,QAAQ,EAAE,UAAU;EACpBC,SAAS,EAAE,YAAY;EAEvBC,KAAK,EAAE;IACLF,QAAQ,EAAE,UAAU;IACpBG,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,OAAO,EAAE;EACX;AACF,CAAC,CAAC;AAEF,MAAMC,cAAc,GAAGzB,MAAM,CAACiB,gBAAgB,CAAC,CAG7C;EACES,OAAO,EAAE,MAAM;EACfN,SAAS,EAAE,OAAO;EAClBO,UAAU,EAAE,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A,EAAG;MACPC,UAAU,EAAEA,UAAW;MACvB+C,WAAW;MACX9C,UAAU,EAAEA,UAAW;MACvBG,KAAK,EAAEA,KAAM;MACb4C,oBAAoB,EAAErB;IAAgB,CACvC;EAAC,CACF,CAAC;AAEP,CAAC;AAED,MAAMsB,kBAAkB,GAAGlH,IAAI,CAAC6D,UAAU,CAAC;AAC3CqD,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIrD,UAAU"}
@@ -0,0 +1,54 @@
1
+ /*!
2
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+
13
+ import { memo } from "react";
14
+ import styled from "@emotion/styled";
15
+ import { useOdysseyDesignTokens } from "../OdysseyDesignTokensContext.js";
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ import { jsxs as _jsxs } from "react/jsx-runtime";
18
+ const UploadIllustrationContainer = styled.div(({
19
+ odysseyDesignTokens
20
+ }) => ({
21
+ marginBlockEnd: odysseyDesignTokens.Spacing2,
22
+ padding: odysseyDesignTokens.Spacing3,
23
+ backgroundColor: odysseyDesignTokens.HueNeutral50,
24
+ borderRadius: "50%",
25
+ svg: {
26
+ display: "flex",
27
+ width: odysseyDesignTokens.Spacing8,
28
+ height: odysseyDesignTokens.Spacing8
29
+ }
30
+ }));
31
+ const FileUploadIllustration = () => {
32
+ const odysseyDesignTokens = useOdysseyDesignTokens();
33
+ return _jsx(UploadIllustrationContainer, {
34
+ "aria-hidden": "true",
35
+ odysseyDesignTokens: odysseyDesignTokens,
36
+ children: _jsxs("svg", {
37
+ "aria-hidden": "true",
38
+ viewBox: "0 0 44 45",
39
+ fill: "none",
40
+ xmlns: "http://www.w3.org/2000/svg",
41
+ children: [_jsx("path", {
42
+ d: "M32.0763 11.001C29.3564 3.7855 21.6595 -0.565827 13.7765 0.726748C5.35441 2.10773 -0.676662 9.50714 0.0603005 17.8612C0.441865 22.1865 2.56458 25.9787 5.71703 28.614L8.28246 25.545C5.90122 23.5544 4.32811 20.7209 4.04483 17.5097C3.50262 11.3633 7.94433 5.73648 14.4238 4.67404C20.9164 3.60944 27.0806 7.52016 28.6895 13.5191C28.9239 14.3932 29.7162 15.001 30.6212 15.001H32.9114C36.8985 15.001 39.9997 18.0938 39.9997 21.7505C39.9997 24.3423 38.4576 26.6352 36.1259 27.7678L37.8736 31.3658C41.4737 29.6171 43.9997 25.9917 43.9997 21.7505C43.9997 15.7428 38.963 11.001 32.9114 11.001H32.0763Z",
43
+ fill: odysseyDesignTokens.HueNeutral200
44
+ }), _jsx("path", {
45
+ d: "M23.9994 29.3277V44.5H19.9994V29.3289L14.4142 34.9141L11.5858 32.0857L19.7373 23.9342C20.9869 22.6845 23.0131 22.6845 24.2627 23.9342L32.4142 32.0857L29.5858 34.9141L23.9994 29.3277Z",
46
+ fill: odysseyDesignTokens.HueNeutral200
47
+ })]
48
+ })
49
+ });
50
+ };
51
+ const MemoizedFileUploadIllustration = memo(FileUploadIllustration);
52
+ MemoizedFileUploadIllustration.displayName = "FileUploadIllustration";
53
+ export { MemoizedFileUploadIllustration as FileUploadIllustration };
54
+ //# sourceMappingURL=FileUploadIllustration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileUploadIllustration.js","names":["memo","styled","useOdysseyDesignTokens","jsx","_jsx","jsxs","_jsxs","UploadIllustrationContainer","div","odysseyDesignTokens","marginBlockEnd","Spacing2","padding","Spacing3","backgroundColor","HueNeutral50","borderRadius","svg","display","width","Spacing8","height","FileUploadIllustration","children","viewBox","fill","xmlns","d","HueNeutral200","MemoizedFileUploadIllustration","displayName"],"sources":["../../src/labs/FileUploadIllustration.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo } from \"react\";\nimport styled from \"@emotion/styled\";\n\nimport {\n useOdysseyDesignTokens,\n DesignTokens,\n} from \"../OdysseyDesignTokensContext\";\n\nconst UploadIllustrationContainer = styled.div<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n marginBlockEnd: odysseyDesignTokens.Spacing2,\n padding: odysseyDesignTokens.Spacing3,\n backgroundColor: odysseyDesignTokens.HueNeutral50,\n borderRadius: \"50%\",\n\n svg: {\n display: \"flex\",\n width: odysseyDesignTokens.Spacing8,\n height: odysseyDesignTokens.Spacing8,\n },\n}));\n\nconst FileUploadIllustration = () => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n return (\n <UploadIllustrationContainer\n aria-hidden=\"true\"\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 44 45\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M32.0763 11.001C29.3564 3.7855 21.6595 -0.565827 13.7765 0.726748C5.35441 2.10773 -0.676662 9.50714 0.0603005 17.8612C0.441865 22.1865 2.56458 25.9787 5.71703 28.614L8.28246 25.545C5.90122 23.5544 4.32811 20.7209 4.04483 17.5097C3.50262 11.3633 7.94433 5.73648 14.4238 4.67404C20.9164 3.60944 27.0806 7.52016 28.6895 13.5191C28.9239 14.3932 29.7162 15.001 30.6212 15.001H32.9114C36.8985 15.001 39.9997 18.0938 39.9997 21.7505C39.9997 24.3423 38.4576 26.6352 36.1259 27.7678L37.8736 31.3658C41.4737 29.6171 43.9997 25.9917 43.9997 21.7505C43.9997 15.7428 38.963 11.001 32.9114 11.001H32.0763Z\"\n fill={odysseyDesignTokens.HueNeutral200}\n />\n <path\n d=\"M23.9994 29.3277V44.5H19.9994V29.3289L14.4142 34.9141L11.5858 32.0857L19.7373 23.9342C20.9869 22.6845 23.0131 22.6845 24.2627 23.9342L32.4142 32.0857L29.5858 34.9141L23.9994 29.3277Z\"\n fill={odysseyDesignTokens.HueNeutral200}\n />\n </svg>\n </UploadIllustrationContainer>\n );\n};\n\nconst MemoizedFileUploadIllustration = memo(FileUploadIllustration);\nMemoizedFileUploadIllustration.displayName = \"FileUploadIllustration\";\n\nexport { MemoizedFileUploadIllustration as FileUploadIllustration };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAC5B,OAAOC,MAAM,MAAM,iBAAiB;AAAC,SAGnCC,sBAAsB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAIxB,MAAMC,2BAA2B,GAAGN,MAAM,CAACO,GAAG,CAE3C,CAAC;EAAEC;AAAoB,CAAC,MAAM;EAC/BC,cAAc,EAAED,mBAAmB,CAACE,QAAQ;EAC5CC,OAAO,EAAEH,mBAAmB,CAACI,QAAQ;EACrCC,eAAe,EAAEL,mBAAmB,CAACM,YAAY;EACjDC,YAAY,EAAE,KAAK;EAEnBC,GAAG,EAAE;IACHC,OAAO,EAAE,MAAM;IACfC,KAAK,EAAEV,mBAAmB,CAACW,QAAQ;IACnCC,MAAM,EAAEZ,mBAAmB,CAACW;EAC9B;AACF,CAAC,CAAC,CAAC;AAEH,MAAME,sBAAsB,GAAGA,CAAA,KAAM;EACnC,MAAMb,mBAAmB,GAAGP,sBAAsB,CAAC,CAAC;EAEpD,OACEE,IAAA,CAACG,2BAA2B;IAC1B,eAAY,MAAM;IAClBE,mBAAmB,EAAEA,mBAAoB;IAAAc,QAAA,EAEzCjB,KAAA;MACE,eAAY,MAAM;MAClBkB,OAAO,EAAC,WAAW;MACnBC,IAAI,EAAC,MAAM;MACXC,KAAK,EAAC,4BAA4B;MAAAH,QAAA,GAElCnB,IAAA;QACEuB,CAAC,EAAC,ilBAAilB;QACnlBF,IAAI,EAAEhB,mBAAmB,CAACmB;MAAc,CACzC,CAAC,EACFxB,IAAA;QACEuB,CAAC,EAAC,wLAAwL;QAC1LF,IAAI,EAAEhB,mBAAmB,CAACmB;MAAc,CACzC,CAAC;IAAA,CACC;EAAC,CACqB,CAAC;AAElC,CAAC;AAED,MAAMC,8BAA8B,GAAG7B,IAAI,CAACsB,sBAAsB,CAAC;AACnEO,8BAA8B,CAACC,WAAW,GAAG,wBAAwB;AAErE,SAASD,8BAA8B,IAAIP,sBAAsB"}
@@ -0,0 +1,109 @@
1
+ import _IconButton from "@mui/material/IconButton";
2
+ /*!
3
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
4
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
5
+ *
6
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
7
+ * Unless required by applicable law or agreed to in writing, software
8
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ *
11
+ * See the License for the specific language governing permissions and limitations under the License.
12
+ */
13
+
14
+ import { memo, useCallback } from "react";
15
+ import styled from "@emotion/styled";
16
+ import { useTranslation } from "react-i18next";
17
+ import { useOdysseyDesignTokens } from "../OdysseyDesignTokensContext.js";
18
+ import { DeleteIcon } from "../icons.generated/index.js";
19
+ import { MuiPropsContext } from "../MuiPropsContext.js";
20
+ import { Tooltip } from "../Tooltip.js";
21
+ import { jsx as _jsx } from "react/jsx-runtime";
22
+ import { jsxs as _jsxs } from "react/jsx-runtime";
23
+ const PreviewContainer = styled.div(({
24
+ isDisabled,
25
+ odysseyDesignTokens
26
+ }) => ({
27
+ color: isDisabled ? odysseyDesignTokens.TypographyColorDisabled : "inherit",
28
+ marginBlockStart: odysseyDesignTokens.Spacing2,
29
+ pointerEvents: isDisabled ? "none" : "auto"
30
+ }));
31
+ const UploadedFileContainer = styled.div({
32
+ display: "flex",
33
+ justifyContent: "space-between",
34
+ alignItems: "center",
35
+ button: {
36
+ transform: "scale(0)"
37
+ },
38
+ "&:hover, &:focus-within, &:focus": {
39
+ button: {
40
+ transform: "scale(1)"
41
+ }
42
+ }
43
+ }, ({
44
+ odysseyDesignTokens
45
+ }) => ({
46
+ padding: `${odysseyDesignTokens.Spacing1} ${odysseyDesignTokens.Spacing2}`,
47
+ borderRadius: odysseyDesignTokens.BorderRadiusMain,
48
+ transition: `background-color ${odysseyDesignTokens.TransitionTimingMain}`,
49
+ "&:hover, &:focus-within": {
50
+ backgroundColor: odysseyDesignTokens.HueNeutral100
51
+ },
52
+ "&:focus": {
53
+ borderColor: odysseyDesignTokens.FocusOutlineColorPrimary,
54
+ boxShadow: `0 0 0 2px ${odysseyDesignTokens.FocusOutlineColorPrimary}`,
55
+ outline: `${odysseyDesignTokens.FocusOutlineWidthMain} ${odysseyDesignTokens.FocusOutlineStyle} transparent`
56
+ }
57
+ }));
58
+ const UploadedFile = ({
59
+ name,
60
+ onFileRemove
61
+ }) => {
62
+ const {
63
+ t
64
+ } = useTranslation();
65
+ const odysseyDesignTokens = useOdysseyDesignTokens();
66
+ const deleteHandler = useCallback(() => {
67
+ onFileRemove?.(name);
68
+ }, [onFileRemove, name]);
69
+ const renderDeleteButton = useCallback(muiProps => {
70
+ return _jsx(_IconButton, {
71
+ ...muiProps,
72
+ "aria-label": t("fileupload.removefile.text"),
73
+ onClick: deleteHandler,
74
+ size: "small",
75
+ children: _jsx(DeleteIcon, {})
76
+ });
77
+ }, [deleteHandler, t]);
78
+ return _jsxs(UploadedFileContainer, {
79
+ tabIndex: 0,
80
+ odysseyDesignTokens: odysseyDesignTokens,
81
+ children: [name, _jsx(Tooltip, {
82
+ ariaType: "description",
83
+ placement: "top",
84
+ text: t("fileupload.removefile.text"),
85
+ children: _jsx(MuiPropsContext.Consumer, {
86
+ children: renderDeleteButton
87
+ })
88
+ })]
89
+ });
90
+ };
91
+ const FileUploadPreview = ({
92
+ fileNames,
93
+ isDisabled,
94
+ onFileRemove
95
+ }) => {
96
+ const odysseyDesignTokens = useOdysseyDesignTokens();
97
+ return _jsx(PreviewContainer, {
98
+ isDisabled: isDisabled,
99
+ odysseyDesignTokens: odysseyDesignTokens,
100
+ children: fileNames?.map((name, index) => _jsx(UploadedFile, {
101
+ onFileRemove: onFileRemove,
102
+ name: name
103
+ }, `${index}-${name}`))
104
+ });
105
+ };
106
+ const MemoizedFileUploadPreview = memo(FileUploadPreview);
107
+ MemoizedFileUploadPreview.displayName = "FileUploadPreview";
108
+ export { MemoizedFileUploadPreview as FileUploadPreview };
109
+ //# sourceMappingURL=FileUploadPreview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileUploadPreview.js","names":["memo","useCallback","styled","useTranslation","useOdysseyDesignTokens","DeleteIcon","MuiPropsContext","Tooltip","jsx","_jsx","jsxs","_jsxs","PreviewContainer","div","isDisabled","odysseyDesignTokens","color","TypographyColorDisabled","marginBlockStart","Spacing2","pointerEvents","UploadedFileContainer","display","justifyContent","alignItems","button","transform","padding","Spacing1","borderRadius","BorderRadiusMain","transition","TransitionTimingMain","backgroundColor","HueNeutral100","borderColor","FocusOutlineColorPrimary","boxShadow","outline","FocusOutlineWidthMain","FocusOutlineStyle","UploadedFile","name","onFileRemove","t","deleteHandler","renderDeleteButton","muiProps","_IconButton","onClick","size","children","tabIndex","ariaType","placement","text","Consumer","FileUploadPreview","fileNames","map","index","MemoizedFileUploadPreview","displayName"],"sources":["../../src/labs/FileUploadPreview.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, useCallback } from \"react\";\nimport styled from \"@emotion/styled\";\nimport { IconButton } from \"@mui/material\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { FileUploadProps } from \"./FileUpload\";\nimport {\n useOdysseyDesignTokens,\n DesignTokens,\n} from \"../OdysseyDesignTokensContext\";\nimport { DeleteIcon } from \"../icons.generated\";\nimport { MuiPropsContext, MuiPropsContextType } from \"../MuiPropsContext\";\nimport { Tooltip } from \"../Tooltip\";\n\nconst PreviewContainer = styled.div<{\n isDisabled: FileUploadProps[\"isDisabled\"];\n odysseyDesignTokens: DesignTokens;\n}>(({ isDisabled, odysseyDesignTokens }) => ({\n color: isDisabled ? odysseyDesignTokens.TypographyColorDisabled : \"inherit\",\n marginBlockStart: odysseyDesignTokens.Spacing2,\n pointerEvents: isDisabled ? \"none\" : \"auto\",\n}));\n\nconst UploadedFileContainer = styled.div<{ odysseyDesignTokens: DesignTokens }>(\n {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n\n button: {\n transform: \"scale(0)\",\n },\n\n \"&:hover, &:focus-within, &:focus\": {\n button: {\n transform: \"scale(1)\",\n },\n },\n },\n ({ odysseyDesignTokens }) => ({\n padding: `${odysseyDesignTokens.Spacing1} ${odysseyDesignTokens.Spacing2}`,\n borderRadius: odysseyDesignTokens.BorderRadiusMain,\n transition: `background-color ${odysseyDesignTokens.TransitionTimingMain}`,\n\n \"&:hover, &:focus-within\": {\n backgroundColor: odysseyDesignTokens.HueNeutral100,\n },\n\n \"&:focus\": {\n borderColor: odysseyDesignTokens.FocusOutlineColorPrimary,\n boxShadow: `0 0 0 2px ${odysseyDesignTokens.FocusOutlineColorPrimary}`,\n outline: `${odysseyDesignTokens.FocusOutlineWidthMain} ${odysseyDesignTokens.FocusOutlineStyle} transparent`,\n },\n }),\n);\n\ntype UploadedFileProps = {\n name: string;\n onFileRemove?: (name: string) => void;\n};\n\nconst UploadedFile = ({ name, onFileRemove }: UploadedFileProps) => {\n const { t } = useTranslation();\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const deleteHandler = useCallback(() => {\n onFileRemove?.(name);\n }, [onFileRemove, name]);\n\n const renderDeleteButton = useCallback(\n (muiProps: MuiPropsContextType) => {\n return (\n <IconButton\n {...muiProps}\n aria-label={t(\"fileupload.removefile.text\")}\n onClick={deleteHandler}\n size=\"small\"\n >\n <DeleteIcon />\n </IconButton>\n );\n },\n [deleteHandler, t],\n );\n\n return (\n <UploadedFileContainer\n // tabindex added to make this element focusable\n tabIndex={0}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {name}\n <Tooltip\n ariaType=\"description\"\n placement=\"top\"\n text={t(\"fileupload.removefile.text\")}\n >\n <MuiPropsContext.Consumer>\n {renderDeleteButton}\n </MuiPropsContext.Consumer>\n </Tooltip>\n </UploadedFileContainer>\n );\n};\n\ntype FileUploadPreviewProps = {\n fileNames: string[];\n isDisabled: FileUploadProps[\"isDisabled\"];\n onFileRemove?: (name: string) => void;\n};\n\nconst FileUploadPreview = ({\n fileNames,\n isDisabled,\n onFileRemove,\n}: FileUploadPreviewProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n return (\n <PreviewContainer\n isDisabled={isDisabled}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {fileNames?.map((name, index) => (\n <UploadedFile\n key={`${index}-${name}`}\n onFileRemove={onFileRemove}\n name={name}\n />\n ))}\n </PreviewContainer>\n );\n};\n\nconst MemoizedFileUploadPreview = memo(FileUploadPreview);\nMemoizedFileUploadPreview.displayName = \"FileUploadPreview\";\n\nexport { MemoizedFileUploadPreview as FileUploadPreview };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,WAAW,QAAQ,OAAO;AACzC,OAAOC,MAAM,MAAM,iBAAiB;AAEpC,SAASC,cAAc,QAAQ,eAAe;AAAC,SAI7CC,sBAAsB;AAAA,SAGfC,UAAU;AAAA,SACVC,eAAe;AAAA,SACfC,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEhB,MAAMC,gBAAgB,GAAGV,MAAM,CAACW,GAAG,CAGhC,CAAC;EAAEC,UAAU;EAAEC;AAAoB,CAAC,MAAM;EAC3CC,KAAK,EAAEF,UAAU,GAAGC,mBAAmB,CAACE,uBAAuB,GAAG,SAAS;EAC3EC,gBAAgB,EAAEH,mBAAmB,CAACI,QAAQ;EAC9CC,aAAa,EAAEN,UAAU,GAAG,MAAM,GAAG;AACvC,CAAC,CAAC,CAAC;AAEH,MAAMO,qBAAqB,GAAGnB,MAAM,CAACW,GAAG,CACtC;EACES,OAAO,EAAE,MAAM;EACfC,cAAc,EAAE,eAAe;EAC/BC,UAAU,EAAE,QAAQ;EAEpBC,MAAM,EAAE;IACNC,SAAS,EAAE;EACb,CAAC;EAED,kCAAkC,EAAE;IAClCD,MAAM,EAAE;MACNC,SAAS,EAAE;IACb;EACF;AACF,CAAC,EACD,CAAC;EAAEX;AAAoB,CAAC,MAAM;EAC5BY,OAAO,EAAG,GAAEZ,mBAAmB,CAACa,QAAS,IAAGb,mBAAmB,CAACI,QAAS,EAAC;EAC1EU,YAAY,EAAEd,mBAAmB,CAACe,gBAAgB;EAClDC,UAAU,EAAG,oBAAmBhB,mBAAmB,CAACiB,oBAAqB,EAAC;EAE1E,yBAAyB,EAAE;IACzBC,eAAe,EAAElB,mBAAmB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ACpB,CAAC;EAAA,CACW,CAAC;AAE5B,CAAC;AAQD,MAAMW,iBAAiB,GAAGA,CAAC;EACzBC,SAAS;EACT5C,UAAU;EACV6B;AACsB,CAAC,KAAK;EAC5B,MAAM5B,mBAAmB,GAAGX,sBAAsB,CAAC,CAAC;EAEpD,OACEK,IAAA,CAACG,gBAAgB;IACfE,UAAU,EAAEA,UAAW;IACvBC,mBAAmB,EAAEA,mBAAoB;IAAAoC,QAAA,EAExCO,SAAS,EAAEC,GAAG,CAAC,CAACjB,IAAI,EAAEkB,KAAK,KAC1BnD,IAAA,CAACgC,YAAY;MAEXE,YAAY,EAAEA,YAAa;MAC3BD,IAAI,EAAEA;IAAK,GAFL,GAAEkB,KAAM,IAAGlB,IAAK,EAGvB,CACF;EAAC,CACc,CAAC;AAEvB,CAAC;AAED,MAAMmB,yBAAyB,GAAG7D,IAAI,CAACyD,iBAAiB,CAAC;AACzDI,yBAAyB,CAACC,WAAW,GAAG,mBAAmB;AAE3D,SAASD,yBAAyB,IAAIJ,iBAAiB"}
@@ -17,6 +17,7 @@ export * from "./datePickerTheme.js";
17
17
  export * from "./DataTablePagination.js";
18
18
  export * from "./DataFilters.js";
19
19
  export * from "./Drawer.js";
20
+ export * from "./FileUpload.js";
20
21
  export * from "./materialReactTableTypes.js";
21
22
  export * from "./StaticTable.js";
22
23
  export * from "./PaginatedTable.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["AdapterDateFns","LocalizationProvider"],"sources":["../../src/labs/index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport { AdapterDateFns } from \"@mui/x-date-pickers/AdapterDateFns\";\nexport { LocalizationProvider } from \"@mui/x-date-pickers\";\nexport type { LocalizationProviderProps } from \"@mui/x-date-pickers\";\n\nexport * from \"./DatePicker\";\nexport * from \"./datePickerTheme\";\n\n/** @deprecated Will be removed in a future Odyssey version in lieu of the one shipping with DataTable */\nexport * from \"./DataTablePagination\";\nexport * from \"./DataFilters\";\n\nexport * from \"./Drawer\";\n\nexport * from \"./materialReactTableTypes\";\n/** @deprecated Will be removed in a future Odyssey version in lieu of DataTable */\nexport * from \"./StaticTable\";\n/** @deprecated Will be removed in a future Odyssey version in lieu of DataTable */\nexport * from \"./PaginatedTable\";\n\nexport * from \"./GroupPicker\";\nexport * from \"./VirtualizedAutocomplete\";\n\nexport * from \"./Switch\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,cAAc,QAAQ,oCAAoC;AACnE,SAASC,oBAAoB,QAAQ,qBAAqB;AAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["AdapterDateFns","LocalizationProvider"],"sources":["../../src/labs/index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport { AdapterDateFns } from \"@mui/x-date-pickers/AdapterDateFns\";\nexport { LocalizationProvider } from \"@mui/x-date-pickers\";\nexport type { LocalizationProviderProps } from \"@mui/x-date-pickers\";\n\nexport * from \"./DatePicker\";\nexport * from \"./datePickerTheme\";\n\n/** @deprecated Will be removed in a future Odyssey version in lieu of the one shipping with DataTable */\nexport * from \"./DataTablePagination\";\nexport * from \"./DataFilters\";\nexport * from \"./Drawer\";\nexport * from \"./FileUpload\";\nexport * from \"./materialReactTableTypes\";\n/** @deprecated Will be removed in a future Odyssey version in lieu of DataTable */\nexport * from \"./StaticTable\";\n/** @deprecated Will be removed in a future Odyssey version in lieu of DataTable */\nexport * from \"./PaginatedTable\";\n\nexport * from \"./GroupPicker\";\nexport * from \"./VirtualizedAutocomplete\";\n\nexport * from \"./Switch\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,cAAc,QAAQ,oCAAoC;AACnE,SAASC,oBAAoB,QAAQ,qBAAqB;AAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"}
@@ -12,6 +12,9 @@ export const translation = {
12
12
  "filters.menuitem.any": "Any {{label}}",
13
13
  "filters.menuitem.selected": "{{selected}} selected",
14
14
  "filters.search.label": "Search",
15
+ "fileupload.button.text": "Add files",
16
+ "fileupload.prompt.text": "Drag and drop files here or click to add files",
17
+ "fileupload.removefile.text": "Remove file",
15
18
  "passwordfield.icon.label.hide": "Hide password",
16
19
  "passwordfield.icon.label.show": "Show password",
17
20
  "severity.error": "error",
@@ -1 +1 @@
1
- {"version":3,"file":"odyssey-react-mui.js","names":["translation"],"sources":["../../../src/properties/ts/odyssey-react-mui.ts"],"sourcesContent":["export const translation = {\"breadcrumbs.home.text\":\"Home\",\"breadcrumbs.label.text\":\"Breadcrumbs\",\"close.text\":\"close\",\"fielderror.screenreader.text\":\"Error\",\"fieldlabel.optional.text\":\"Optional\",\"fieldlabel.required.text\":\"Required\",\"filters.clear.label\":\"Clear filters\",\"filters.filter.any\":\"Any\",\"filters.filter.clear\":\"Clear filter\",\"filters.filters.arialabel\":\"Filters\",\"filters.menuitem.any\":\"Any {{label}}\",\"filters.menuitem.selected\":\"{{selected}} selected\",\"filters.search.label\":\"Search\",\"passwordfield.icon.label.hide\":\"Hide password\",\"passwordfield.icon.label.show\":\"Show password\",\"severity.error\":\"error\",\"severity.info\":\"info\",\"severity.success\":\"success\",\"severity.warning\":\"warning\",\"switch.active\":\"Active\",\"switch.inactive\":\"Inactive\",\"table.actions\":\"Actions\",\"table.columnvisibility.arialabel\":\"Show/hide columns\",\"table.density.arialabel\":\"Table density\",\"table.draghandle.arialabel\":\"Drag row to reorder. Or, press space or enter to start and stop reordering and esc to cancel.\",\"table.draghandle.tooltip\":\"Drag row or press space/enter key to start and stop reordering\",\"table.error\":\"Error loading data.\",\"table.fetchedrows.text\":\"Fetched {{totalRows}} row\",\"table.fetchedrows.text_plural\":\"Fetched {{totalRows}} total rows\",\"table.moreactions.arialabel\":\"More actions\",\"table.noresults.heading\":\"There are no results.\",\"table.noresults.text\":\"Try a different query.\",\"table.pagination.loadmore\":\"Show more\",\"table.pagination.next\":\"Next page\",\"table.pagination.previous\":\"Previous page\",\"table.pagination.page\":\"Page\",\"table.pagination.rowsperpage\":\"Rows per page\",\"table.pagination.rowswithtotal\":\"{{firstRow}}-{{lastRow}} of {{totalRows}} rows\",\"table.pagination.rowswithouttotal\":\"{{firstRow}}-{{lastRow}} rows\",\"table.reorder.backward\":\"Send backward\",\"table.reorder.forward\":\"Bring forward\",\"table.reorder.toback\":\"Send to back\",\"table.reorder.tofront\":\"Bring to front\",\"table.rows.text\":\"{{totalRows}} row\",\"table.rows.text_plural\":\"{{totalRows}} rows\"};"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GAAG;EAAC,uBAAuB,EAAC,MAAM;EAAC,wBAAwB,EAAC,aAAa;EAAC,YAAY,EAAC,OAAO;EAAC,8BAA8B,EAAC,OAAO;EAAC,0BAA0B,EAAC,UAAU;EAAC,0BAA0B,EAAC,UAAU;EAAC,qBAAqB,EAAC,eAAe;EAAC,oBAAoB,EAAC,KAAK;EAAC,sBAAsB,EAAC,cAAc;EAAC,2BAA2B,EAAC,SAAS;EAAC,sBAAsB,EAAC,eAAe;EAAC,2BAA2B,EAAC,uBAAuB;EAAC,sBAAsB,EAAC,QAAQ;EAAC,+BAA+B,EAAC,eAAe;EAAC,+BAA+B,EAAC,eAAe;EAAC,gBAAgB,EAAC,OAAO;EAAC,eAAe,EAAC,MAAM;EAAC,kBAAkB,EAAC,SAAS;EAAC,kBAAkB,EAAC,SAAS;EAAC,eAAe,EAAC,QAAQ;EAAC,iBAAiB,EAAC,UAAU;EAAC,eAAe,EAAC,SAAS;EAAC,kCAAkC,EAAC,mBAAmB;EAAC,yBAAyB,EAAC,eAAe;EAAC,4BAA4B,EAAC,+FAA+F;EAAC,0BAA0B,EAAC,gEAAgE;EAAC,aAAa,EAAC,qBAAqB;EAAC,wBAAwB,EAAC,2BAA2B;EAAC,+BAA+B,EAAC,kCAAkC;EAAC,6BAA6B,EAAC,cAAc;EAAC,yBAAyB,EAAC,uBAAuB;EAAC,sBAAsB,EAAC,wBAAwB;EAAC,2BAA2B,EAAC,WAAW;EAAC,uBAAuB,EAAC,WAAW;EAAC,2BAA2B,EAAC,eAAe;EAAC,uBAAuB,EAAC,MAAM;EAAC,8BAA8B,EAAC,eAAe;EAAC,gCAAgC,EAAC,gDAAgD;EAAC,mCAAmC,EAAC,+BAA+B;EAAC,wBAAwB,EAAC,eAAe;EAAC,uBAAuB,EAAC,eAAe;EAAC,sBAAsB,EAAC,cAAc;EAAC,uBAAuB,EAAC,gBAAgB;EAAC,iBAAiB,EAAC,mBAAmB;EAAC,wBAAwB,EAAC;AAAoB,CAAC"}
1
+ {"version":3,"file":"odyssey-react-mui.js","names":["translation"],"sources":["../../../src/properties/ts/odyssey-react-mui.ts"],"sourcesContent":["export const translation = {\"breadcrumbs.home.text\":\"Home\",\"breadcrumbs.label.text\":\"Breadcrumbs\",\"close.text\":\"close\",\"fielderror.screenreader.text\":\"Error\",\"fieldlabel.optional.text\":\"Optional\",\"fieldlabel.required.text\":\"Required\",\"filters.clear.label\":\"Clear filters\",\"filters.filter.any\":\"Any\",\"filters.filter.clear\":\"Clear filter\",\"filters.filters.arialabel\":\"Filters\",\"filters.menuitem.any\":\"Any {{label}}\",\"filters.menuitem.selected\":\"{{selected}} selected\",\"filters.search.label\":\"Search\",\"fileupload.button.text\":\"Add files\",\"fileupload.prompt.text\":\"Drag and drop files here or click to add files\",\"fileupload.removefile.text\":\"Remove file\",\"passwordfield.icon.label.hide\":\"Hide password\",\"passwordfield.icon.label.show\":\"Show password\",\"severity.error\":\"error\",\"severity.info\":\"info\",\"severity.success\":\"success\",\"severity.warning\":\"warning\",\"switch.active\":\"Active\",\"switch.inactive\":\"Inactive\",\"table.actions\":\"Actions\",\"table.columnvisibility.arialabel\":\"Show/hide columns\",\"table.density.arialabel\":\"Table density\",\"table.draghandle.arialabel\":\"Drag row to reorder. Or, press space or enter to start and stop reordering and esc to cancel.\",\"table.draghandle.tooltip\":\"Drag row or press space/enter key to start and stop reordering\",\"table.error\":\"Error loading data.\",\"table.fetchedrows.text\":\"Fetched {{totalRows}} row\",\"table.fetchedrows.text_plural\":\"Fetched {{totalRows}} total rows\",\"table.moreactions.arialabel\":\"More actions\",\"table.noresults.heading\":\"There are no results.\",\"table.noresults.text\":\"Try a different query.\",\"table.pagination.loadmore\":\"Show more\",\"table.pagination.next\":\"Next page\",\"table.pagination.previous\":\"Previous page\",\"table.pagination.page\":\"Page\",\"table.pagination.rowsperpage\":\"Rows per page\",\"table.pagination.rowswithtotal\":\"{{firstRow}}-{{lastRow}} of {{totalRows}} rows\",\"table.pagination.rowswithouttotal\":\"{{firstRow}}-{{lastRow}} rows\",\"table.reorder.backward\":\"Send backward\",\"table.reorder.forward\":\"Bring forward\",\"table.reorder.toback\":\"Send to back\",\"table.reorder.tofront\":\"Bring to front\",\"table.rows.text\":\"{{totalRows}} row\",\"table.rows.text_plural\":\"{{totalRows}} rows\"};"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GA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C,gBAAgB;EAAC,iBAAiB,EAAC,mBAAmB;EAAC,wBAAwB,EAAC;AAAoB,CAAC"}
@@ -17,6 +17,7 @@ export const translation = {
17
17
  "table.fetchedrows.text": "Byl načten {{totalRows}} řádek",
18
18
  "table.fetchedrows.text_plural": "Celkem načteno řádků: {{totalRows}}",
19
19
  "table.rows.text": "{{totalRows}} řádek",
20
- "table.rows.text_plural": "Počet řádků: {{totalRows}}"
20
+ "table.rows.text_plural": "Počet řádků: {{totalRows}}",
21
+ "toast.close.text": "zavřít"
21
22
  };
22
23
  //# sourceMappingURL=odyssey-react-mui_cs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"odyssey-react-mui_cs.js","names":["translation"],"sources":["../../../src/properties/ts/odyssey-react-mui_cs.ts"],"sourcesContent":["export const translation = {\"breadcrumbs.home.text\":\"Domovská stránka\",\"breadcrumbs.label.text\":\"Drobečková navigace\",\"close.text\":\"zavřít\",\"fielderror.screenreader.text\":\"Chyba\",\"fieldlabel.optional.text\":\"Volitelné\",\"fieldlabel.required.text\":\"Povinné\",\"passwordfield.icon.label.show\":\"Zobrazit heslo\",\"passwordfield.icon.label.hide\":\"Skrýt heslo\",\"severity.error\":\"chyba\",\"severity.info\":\"informace\",\"severity.success\":\"úspěch\",\"severity.warning\":\"upozornění\",\"switch.active\":\"Aktivní\",\"switch.inactive\":\"Neaktivní\",\"table.error\":\"Chyba při načítání dat\",\"table.fetchedrows.text\":\"Byl načten {{totalRows}} řádek\",\"table.fetchedrows.text_plural\":\"Celkem načteno řádků: {{totalRows}}\",\"table.rows.text\":\"{{totalRows}} řádek\",\"table.rows.text_plural\":\"Počet řádků: {{totalRows}}\"};"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GAAG;EAAC,uBAAuB,EAAC,kBAAkB;EAAC,wBAAwB,EAAC,qBAAqB;EAAC,YAAY,EAAC,QAAQ;EAAC,8BAA8B,EAAC,OAAO;EAAC,0BAA0B,EAAC,WAAW;EAAC,0BAA0B,EAAC,SAAS;EAAC,+BAA+B,EAAC,gBAAgB;EAAC,+BAA+B,EAAC,aAAa;EAAC,gBAAgB,EAAC,OAAO;EAAC,eAAe,EAAC,WAAW;EAAC,kBAAkB,EAAC,QAAQ;EAAC,kBAAkB,EAAC,YAAY;EAAC,eAAe,EAAC,SAAS;EAAC,iBAAiB,EAAC,WAAW;EAAC,aAAa,EAAC,wBAAwB;EAAC,wBAAwB,EAAC,gCAAgC;EAAC,+BAA+B,EAAC,qCAAqC;EAAC,iBAAiB,EAAC,qBAAqB;EAAC,wBAAwB,EAAC;AAA4B,CAAC"}
1
+ {"version":3,"file":"odyssey-react-mui_cs.js","names":["translation"],"sources":["../../../src/properties/ts/odyssey-react-mui_cs.ts"],"sourcesContent":["export const translation = {\"breadcrumbs.home.text\":\"Domovská stránka\",\"breadcrumbs.label.text\":\"Drobečková navigace\",\"close.text\":\"zavřít\",\"fielderror.screenreader.text\":\"Chyba\",\"fieldlabel.optional.text\":\"Volitelné\",\"fieldlabel.required.text\":\"Povinné\",\"passwordfield.icon.label.show\":\"Zobrazit heslo\",\"passwordfield.icon.label.hide\":\"Skrýt heslo\",\"severity.error\":\"chyba\",\"severity.info\":\"informace\",\"severity.success\":\"úspěch\",\"severity.warning\":\"upozornění\",\"switch.active\":\"Aktivní\",\"switch.inactive\":\"Neaktivní\",\"table.error\":\"Chyba při načítání dat\",\"table.fetchedrows.text\":\"Byl načten {{totalRows}} řádek\",\"table.fetchedrows.text_plural\":\"Celkem načteno řádků: {{totalRows}}\",\"table.rows.text\":\"{{totalRows}} řádek\",\"table.rows.text_plural\":\"Počet řádků: {{totalRows}}\",\"toast.close.text\":\"zavřít\"};"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GAAG;EAAC,uBAAuB,EAAC,kBAAkB;EAAC,wBAAwB,EAAC,qBAAqB;EAAC,YAAY,EAAC,QAAQ;EAAC,8BAA8B,EAAC,OAAO;EAAC,0BAA0B,EAAC,WAAW;EAAC,0BAA0B,EAAC,SAAS;EAAC,+BAA+B,EAAC,gBAAgB;EAAC,+BAA+B,EAAC,aAAa;EAAC,gBAAgB,EAAC,OAAO;EAAC,eAAe,EAAC,WAAW;EAAC,kBAAkB,EAAC,QAAQ;EAAC,kBAAkB,EAAC,YAAY;EAAC,eAAe,EAAC,SAAS;EAAC,iBAAiB,EAAC,WAAW;EAAC,aAAa,EAAC,wBAAwB;EAAC,wBAAwB,EAAC,gCAAgC;EAAC,+BAA+B,EAAC,qCAAqC;EAAC,iBAAiB,EAAC,qBAAqB;EAAC,wBAAwB,EAAC,4BAA4B;EAAC,kBAAkB,EAAC;AAAQ,CAAC"}
@@ -17,6 +17,7 @@ export const translation = {
17
17
  "table.fetchedrows.text": "Hentet {{totalRows}} række",
18
18
  "table.fetchedrows.text_plural": "Hentet {{totalRows}} total antal rækker",
19
19
  "table.rows.text": "{{totalRows}} række",
20
- "table.rows.text_plural": "{{totalRows}} rækker"
20
+ "table.rows.text_plural": "{{totalRows}} rækker",
21
+ "toast.close.text": "luk"
21
22
  };
22
23
  //# sourceMappingURL=odyssey-react-mui_da.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"odyssey-react-mui_da.js","names":["translation"],"sources":["../../../src/properties/ts/odyssey-react-mui_da.ts"],"sourcesContent":["export const translation = {\"breadcrumbs.home.text\":\"Start\",\"breadcrumbs.label.text\":\"Rasp\",\"close.text\":\"luk\",\"fielderror.screenreader.text\":\"Fejl\",\"fieldlabel.optional.text\":\"Valgfrit\",\"fieldlabel.required.text\":\"Påkrævet\",\"passwordfield.icon.label.show\":\"Vis adgangskode\",\"passwordfield.icon.label.hide\":\"Skjul adgangskode\",\"severity.error\":\"fejl\",\"severity.info\":\"oplysninger\",\"severity.success\":\"fuldført\",\"severity.warning\":\"advarsel\",\"switch.active\":\"Aktiv\",\"switch.inactive\":\"Inaktiv\",\"table.error\":\"Fejl ved indlæsning af data.\",\"table.fetchedrows.text\":\"Hentet {{totalRows}} række\",\"table.fetchedrows.text_plural\":\"Hentet {{totalRows}} total antal rækker\",\"table.rows.text\":\"{{totalRows}} række\",\"table.rows.text_plural\":\"{{totalRows}} rækker\"};"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GAAG;EAAC,uBAAuB,EAAC,OAAO;EAAC,wBAAwB,EAAC,MAAM;EAAC,YAAY,EAAC,KAAK;EAAC,8BAA8B,EAAC,MAAM;EAAC,0BAA0B,EAAC,UAAU;EAAC,0BAA0B,EAAC,UAAU;EAAC,+BAA+B,EAAC,iBAAiB;EAAC,+BAA+B,EAAC,mBAAmB;EAAC,gBAAgB,EAAC,MAAM;EAAC,eAAe,EAAC,aAAa;EAAC,kBAAkB,EAAC,UAAU;EAAC,kBAAkB,EAAC,UAAU;EAAC,eAAe,EAAC,OAAO;EAAC,iBAAiB,EAAC,SAAS;EAAC,aAAa,EAAC,8BAA8B;EAAC,wBAAwB,EAAC,4BAA4B;EAAC,+BAA+B,EAAC,yCAAyC;EAAC,iBAAiB,EAAC,qBAAqB;EAAC,wBAAwB,EAAC;AAAsB,CAAC"}
1
+ {"version":3,"file":"odyssey-react-mui_da.js","names":["translation"],"sources":["../../../src/properties/ts/odyssey-react-mui_da.ts"],"sourcesContent":["export const translation = {\"breadcrumbs.home.text\":\"Start\",\"breadcrumbs.label.text\":\"Rasp\",\"close.text\":\"luk\",\"fielderror.screenreader.text\":\"Fejl\",\"fieldlabel.optional.text\":\"Valgfrit\",\"fieldlabel.required.text\":\"Påkrævet\",\"passwordfield.icon.label.show\":\"Vis adgangskode\",\"passwordfield.icon.label.hide\":\"Skjul adgangskode\",\"severity.error\":\"fejl\",\"severity.info\":\"oplysninger\",\"severity.success\":\"fuldført\",\"severity.warning\":\"advarsel\",\"switch.active\":\"Aktiv\",\"switch.inactive\":\"Inaktiv\",\"table.error\":\"Fejl ved indlæsning af data.\",\"table.fetchedrows.text\":\"Hentet {{totalRows}} række\",\"table.fetchedrows.text_plural\":\"Hentet {{totalRows}} total antal rækker\",\"table.rows.text\":\"{{totalRows}} række\",\"table.rows.text_plural\":\"{{totalRows}} rækker\",\"toast.close.text\":\"luk\"};"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GAAG;EAAC,uBAAuB,EAAC,OAAO;EAAC,wBAAwB,EAAC,MAAM;EAAC,YAAY,EAAC,KAAK;EAAC,8BAA8B,EAAC,MAAM;EAAC,0BAA0B,EAAC,UAAU;EAAC,0BAA0B,EAAC,UAAU;EAAC,+BAA+B,EAAC,iBAAiB;EAAC,+BAA+B,EAAC,mBAAmB;EAAC,gBAAgB,EAAC,MAAM;EAAC,eAAe,EAAC,aAAa;EAAC,kBAAkB,EAAC,UAAU;EAAC,kBAAkB,EAAC,UAAU;EAAC,eAAe,EAAC,OAAO;EAAC,iBAAiB,EAAC,SAAS;EAAC,aAAa,EAAC,8BAA8B;EAAC,wBAAwB,EAAC,4BAA4B;EAAC,+BAA+B,EAAC,yCAAyC;EAAC,iBAAiB,EAAC,qBAAqB;EAAC,wBAAwB,EAAC,sBAAsB;EAAC,kBAAkB,EAAC;AAAK,CAAC"}
@@ -17,6 +17,7 @@ export const translation = {
17
17
  "table.fetchedrows.text": "{{totalRows}} Zeile abgerufen",
18
18
  "table.fetchedrows.text_plural": "{{totalRows}} Zeilen insgesamt abgerufen",
19
19
  "table.rows.text": "{{totalRows}} Zeile",
20
- "table.rows.text_plural": "{{totalRows}} Zeilen"
20
+ "table.rows.text_plural": "{{totalRows}} Zeilen",
21
+ "toast.close.text": "schließen"
21
22
  };
22
23
  //# sourceMappingURL=odyssey-react-mui_de.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"odyssey-react-mui_de.js","names":["translation"],"sources":["../../../src/properties/ts/odyssey-react-mui_de.ts"],"sourcesContent":["export const translation = {\"breadcrumbs.home.text\":\"Home\",\"breadcrumbs.label.text\":\"Breadcrumbs\",\"close.text\":\"Schließen\",\"fielderror.screenreader.text\":\"Fehler\",\"fieldlabel.optional.text\":\"Optional\",\"fieldlabel.required.text\":\"Erforderlich\",\"passwordfield.icon.label.show\":\"Passwort anzeigen\",\"passwordfield.icon.label.hide\":\"Passwort verbergen\",\"severity.error\":\"Fehler\",\"severity.info\":\"Infos\",\"severity.success\":\"Erfolg\",\"severity.warning\":\"Warnung\",\"switch.active\":\"Aktiv\",\"switch.inactive\":\"Inaktiv\",\"table.error\":\"Fehler beim Laden der Daten.\",\"table.fetchedrows.text\":\"{{totalRows}} Zeile abgerufen\",\"table.fetchedrows.text_plural\":\"{{totalRows}} Zeilen insgesamt abgerufen\",\"table.rows.text\":\"{{totalRows}} Zeile\",\"table.rows.text_plural\":\"{{totalRows}} Zeilen\"};"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GAAG;EAAC,uBAAuB,EAAC,MAAM;EAAC,wBAAwB,EAAC,aAAa;EAAC,YAAY,EAAC,WAAW;EAAC,8BAA8B,EAAC,QAAQ;EAAC,0BAA0B,EAAC,UAAU;EAAC,0BAA0B,EAAC,cAAc;EAAC,+BAA+B,EAAC,mBAAmB;EAAC,+BAA+B,EAAC,oBAAoB;EAAC,gBAAgB,EAAC,QAAQ;EAAC,eAAe,EAAC,OAAO;EAAC,kBAAkB,EAAC,QAAQ;EAAC,kBAAkB,EAAC,SAAS;EAAC,eAAe,EAAC,OAAO;EAAC,iBAAiB,EAAC,SAAS;EAAC,aAAa,EAAC,8BAA8B;EAAC,wBAAwB,EAAC,+BAA+B;EAAC,+BAA+B,EAAC,0CAA0C;EAAC,iBAAiB,EAAC,qBAAqB;EAAC,wBAAwB,EAAC;AAAsB,CAAC"}
1
+ {"version":3,"file":"odyssey-react-mui_de.js","names":["translation"],"sources":["../../../src/properties/ts/odyssey-react-mui_de.ts"],"sourcesContent":["export const translation = {\"breadcrumbs.home.text\":\"Home\",\"breadcrumbs.label.text\":\"Breadcrumbs\",\"close.text\":\"Schließen\",\"fielderror.screenreader.text\":\"Fehler\",\"fieldlabel.optional.text\":\"Optional\",\"fieldlabel.required.text\":\"Erforderlich\",\"passwordfield.icon.label.show\":\"Passwort anzeigen\",\"passwordfield.icon.label.hide\":\"Passwort verbergen\",\"severity.error\":\"Fehler\",\"severity.info\":\"Infos\",\"severity.success\":\"Erfolg\",\"severity.warning\":\"Warnung\",\"switch.active\":\"Aktiv\",\"switch.inactive\":\"Inaktiv\",\"table.error\":\"Fehler beim Laden der Daten.\",\"table.fetchedrows.text\":\"{{totalRows}} Zeile abgerufen\",\"table.fetchedrows.text_plural\":\"{{totalRows}} Zeilen insgesamt abgerufen\",\"table.rows.text\":\"{{totalRows}} Zeile\",\"table.rows.text_plural\":\"{{totalRows}} Zeilen\",\"toast.close.text\":\"schließen\"};"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GAAG;EAAC,uBAAuB,EAAC,MAAM;EAAC,wBAAwB,EAAC,aAAa;EAAC,YAAY,EAAC,WAAW;EAAC,8BAA8B,EAAC,QAAQ;EAAC,0BAA0B,EAAC,UAAU;EAAC,0BAA0B,EAAC,cAAc;EAAC,+BAA+B,EAAC,mBAAmB;EAAC,+BAA+B,EAAC,oBAAoB;EAAC,gBAAgB,EAAC,QAAQ;EAAC,eAAe,EAAC,OAAO;EAAC,kBAAkB,EAAC,QAAQ;EAAC,kBAAkB,EAAC,SAAS;EAAC,eAAe,EAAC,OAAO;EAAC,iBAAiB,EAAC,SAAS;EAAC,aAAa,EAAC,8BAA8B;EAAC,wBAAwB,EAAC,+BAA+B;EAAC,+BAA+B,EAAC,0CAA0C;EAAC,iBAAiB,EAAC,qBAAqB;EAAC,wBAAwB,EAAC,sBAAsB;EAAC,kBAAkB,EAAC;AAAW,CAAC"}
@@ -17,6 +17,7 @@ export const translation = {
17
17
  "table.fetchedrows.text": "Ανακτήθηκε {{totalRows}} σειρά",
18
18
  "table.fetchedrows.text_plural": "Ανακτήθηκαν συνολικά {{totalRows}} σειρές",
19
19
  "table.rows.text": "{{totalRows}} σειρά",
20
- "table.rows.text_plural": "{{totalRows}} σειρές"
20
+ "table.rows.text_plural": "{{totalRows}} σειρές",
21
+ "toast.close.text": "κλείσιμο"
21
22
  };
22
23
  //# sourceMappingURL=odyssey-react-mui_el.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"odyssey-react-mui_el.js","names":["translation"],"sources":["../../../src/properties/ts/odyssey-react-mui_el.ts"],"sourcesContent":["export const translation = {\"breadcrumbs.home.text\":\"Αρχική σελίδα\",\"breadcrumbs.label.text\":\"Τμήματα δυναμικής διαδρομής\",\"close.text\":\"κλείσιμο\",\"fielderror.screenreader.text\":\"Σφάλμα\",\"fieldlabel.optional.text\":\"Προαιρετικό\",\"fieldlabel.required.text\":\"Απαιτείται\",\"passwordfield.icon.label.show\":\"Εμφάνιση κωδικού πρόσβασης\",\"passwordfield.icon.label.hide\":\"Απόκρυψη κωδικού πρόσβασης\",\"severity.error\":\"σφάλμα\",\"severity.info\":\"πληροφορίες\",\"severity.success\":\"επιτυχία\",\"severity.warning\":\"προειδοποίηση\",\"switch.active\":\"Ενεργό\",\"switch.inactive\":\"Ανενεργό\",\"table.error\":\"Σφάλμα κατά τη φόρτωση δεδομένων.\",\"table.fetchedrows.text\":\"Ανακτήθηκε {{totalRows}} σειρά\",\"table.fetchedrows.text_plural\":\"Ανακτήθηκαν συνολικά {{totalRows}} σειρές\",\"table.rows.text\":\"{{totalRows}} σειρά\",\"table.rows.text_plural\":\"{{totalRows}} σειρές\"};"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GAAG;EAAC,uBAAuB,EAAC,eAAe;EAAC,wBAAwB,EAAC,6BAA6B;EAAC,YAAY,EAAC,UAAU;EAAC,8BAA8B,EAAC,QAAQ;EAAC,0BAA0B,EAAC,aAAa;EAAC,0BAA0B,EAAC,YAAY;EAAC,+BAA+B,EAAC,4BAA4B;EAAC,+BAA+B,EAAC,4BAA4B;EAAC,gBAAgB,EAAC,QAAQ;EAAC,eAAe,EAAC,aAAa;EAAC,kBAAkB,EAAC,UAAU;EAAC,kBAAkB,EAAC,eAAe;EAAC,eAAe,EAAC,QAAQ;EAAC,iBAAiB,EAAC,UAAU;EAAC,aAAa,EAAC,mCAAmC;EAAC,wBAAwB,EAAC,gCAAgC;EAAC,+BAA+B,EAAC,2CAA2C;EAAC,iBAAiB,EAAC,qBAAqB;EAAC,wBAAwB,EAAC;AAAsB,CAAC"}
1
+ {"version":3,"file":"odyssey-react-mui_el.js","names":["translation"],"sources":["../../../src/properties/ts/odyssey-react-mui_el.ts"],"sourcesContent":["export const translation = {\"breadcrumbs.home.text\":\"Αρχική σελίδα\",\"breadcrumbs.label.text\":\"Τμήματα δυναμικής διαδρομής\",\"close.text\":\"κλείσιμο\",\"fielderror.screenreader.text\":\"Σφάλμα\",\"fieldlabel.optional.text\":\"Προαιρετικό\",\"fieldlabel.required.text\":\"Απαιτείται\",\"passwordfield.icon.label.show\":\"Εμφάνιση κωδικού πρόσβασης\",\"passwordfield.icon.label.hide\":\"Απόκρυψη κωδικού πρόσβασης\",\"severity.error\":\"σφάλμα\",\"severity.info\":\"πληροφορίες\",\"severity.success\":\"επιτυχία\",\"severity.warning\":\"προειδοποίηση\",\"switch.active\":\"Ενεργό\",\"switch.inactive\":\"Ανενεργό\",\"table.error\":\"Σφάλμα κατά τη φόρτωση δεδομένων.\",\"table.fetchedrows.text\":\"Ανακτήθηκε {{totalRows}} σειρά\",\"table.fetchedrows.text_plural\":\"Ανακτήθηκαν συνολικά {{totalRows}} σειρές\",\"table.rows.text\":\"{{totalRows}} σειρά\",\"table.rows.text_plural\":\"{{totalRows}} σειρές\",\"toast.close.text\":\"κλείσιμο\"};"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GAAG;EAAC,uBAAuB,EAAC,eAAe;EAAC,wBAAwB,EAAC,6BAA6B;EAAC,YAAY,EAAC,UAAU;EAAC,8BAA8B,EAAC,QAAQ;EAAC,0BAA0B,EAAC,aAAa;EAAC,0BAA0B,EAAC,YAAY;EAAC,+BAA+B,EAAC,4BAA4B;EAAC,+BAA+B,EAAC,4BAA4B;EAAC,gBAAgB,EAAC,QAAQ;EAAC,eAAe,EAAC,aAAa;EAAC,kBAAkB,EAAC,UAAU;EAAC,kBAAkB,EAAC,eAAe;EAAC,eAAe,EAAC,QAAQ;EAAC,iBAAiB,EAAC,UAAU;EAAC,aAAa,EAAC,mCAAmC;EAAC,wBAAwB,EAAC,gCAAgC;EAAC,+BAA+B,EAAC,2CAA2C;EAAC,iBAAiB,EAAC,qBAAqB;EAAC,wBAAwB,EAAC,sBAAsB;EAAC,kBAAkB,EAAC;AAAU,CAAC"}
@@ -17,6 +17,7 @@ export const translation = {
17
17
  "table.fetchedrows.text": "Se ha recuperado {{totalRows}} fila",
18
18
  "table.fetchedrows.text_plural": "Se ha recuperado un total de {{totalRows}} filas",
19
19
  "table.rows.text": "{{totalRows}} fila",
20
- "table.rows.text_plural": "{{totalRows}} filas"
20
+ "table.rows.text_plural": "{{totalRows}} filas",
21
+ "toast.close.text": "cerrar"
21
22
  };
22
23
  //# sourceMappingURL=odyssey-react-mui_es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"odyssey-react-mui_es.js","names":["translation"],"sources":["../../../src/properties/ts/odyssey-react-mui_es.ts"],"sourcesContent":["export const translation = {\"breadcrumbs.home.text\":\"Inicio\",\"breadcrumbs.label.text\":\"Rutas de navegación\",\"close.text\":\"cerrar\",\"fielderror.screenreader.text\":\"Error\",\"fieldlabel.optional.text\":\"Opcional\",\"fieldlabel.required.text\":\"Obligatorio\",\"passwordfield.icon.label.show\":\"Mostrar contraseña\",\"passwordfield.icon.label.hide\":\"Ocultar contraseña\",\"severity.error\":\"error\",\"severity.info\":\"información\",\"severity.success\":\"correcto\",\"severity.warning\":\"advertencia\",\"switch.active\":\"Activo\",\"switch.inactive\":\"Inactivo\",\"table.error\":\"Error al cargar datos.\",\"table.fetchedrows.text\":\"Se ha recuperado {{totalRows}} fila\",\"table.fetchedrows.text_plural\":\"Se ha recuperado un total de {{totalRows}} filas\",\"table.rows.text\":\"{{totalRows}} fila\",\"table.rows.text_plural\":\"{{totalRows}} filas\"};"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GAAG;EAAC,uBAAuB,EAAC,QAAQ;EAAC,wBAAwB,EAAC,qBAAqB;EAAC,YAAY,EAAC,QAAQ;EAAC,8BAA8B,EAAC,OAAO;EAAC,0BAA0B,EAAC,UAAU;EAAC,0BAA0B,EAAC,aAAa;EAAC,+BAA+B,EAAC,oBAAoB;EAAC,+BAA+B,EAAC,oBAAoB;EAAC,gBAAgB,EAAC,OAAO;EAAC,eAAe,EAAC,aAAa;EAAC,kBAAkB,EAAC,UAAU;EAAC,kBAAkB,EAAC,aAAa;EAAC,eAAe,EAAC,QAAQ;EAAC,iBAAiB,EAAC,UAAU;EAAC,aAAa,EAAC,wBAAwB;EAAC,wBAAwB,EAAC,qCAAqC;EAAC,+BAA+B,EAAC,kDAAkD;EAAC,iBAAiB,EAAC,oBAAoB;EAAC,wBAAwB,EAAC;AAAqB,CAAC"}
1
+ {"version":3,"file":"odyssey-react-mui_es.js","names":["translation"],"sources":["../../../src/properties/ts/odyssey-react-mui_es.ts"],"sourcesContent":["export const translation = {\"breadcrumbs.home.text\":\"Inicio\",\"breadcrumbs.label.text\":\"Rutas de navegación\",\"close.text\":\"cerrar\",\"fielderror.screenreader.text\":\"Error\",\"fieldlabel.optional.text\":\"Opcional\",\"fieldlabel.required.text\":\"Obligatorio\",\"passwordfield.icon.label.show\":\"Mostrar contraseña\",\"passwordfield.icon.label.hide\":\"Ocultar contraseña\",\"severity.error\":\"error\",\"severity.info\":\"información\",\"severity.success\":\"correcto\",\"severity.warning\":\"advertencia\",\"switch.active\":\"Activo\",\"switch.inactive\":\"Inactivo\",\"table.error\":\"Error al cargar datos.\",\"table.fetchedrows.text\":\"Se ha recuperado {{totalRows}} fila\",\"table.fetchedrows.text_plural\":\"Se ha recuperado un total de {{totalRows}} filas\",\"table.rows.text\":\"{{totalRows}} fila\",\"table.rows.text_plural\":\"{{totalRows}} filas\",\"toast.close.text\":\"cerrar\"};"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GAAG;EAAC,uBAAuB,EAAC,QAAQ;EAAC,wBAAwB,EAAC,qBAAqB;EAAC,YAAY,EAAC,QAAQ;EAAC,8BAA8B,EAAC,OAAO;EAAC,0BAA0B,EAAC,UAAU;EAAC,0BAA0B,EAAC,aAAa;EAAC,+BAA+B,EAAC,oBAAoB;EAAC,+BAA+B,EAAC,oBAAoB;EAAC,gBAAgB,EAAC,OAAO;EAAC,eAAe,EAAC,aAAa;EAAC,kBAAkB,EAAC,UAAU;EAAC,kBAAkB,EAAC,aAAa;EAAC,eAAe,EAAC,QAAQ;EAAC,iBAAiB,EAAC,UAAU;EAAC,aAAa,EAAC,wBAAwB;EAAC,wBAAwB,EAAC,qCAAqC;EAAC,+BAA+B,EAAC,kDAAkD;EAAC,iBAAiB,EAAC,oBAAoB;EAAC,wBAAwB,EAAC,qBAAqB;EAAC,kBAAkB,EAAC;AAAQ,CAAC"}
@@ -17,6 +17,7 @@ export const translation = {
17
17
  "table.fetchedrows.text": "Haettu {{totalRows}} rivi",
18
18
  "table.fetchedrows.text_plural": "Haettu yhteensä {{totalRows}} riviä",
19
19
  "table.rows.text": "{{totalRows}} rivi",
20
- "table.rows.text_plural": "{{totalRows}} riviä"
20
+ "table.rows.text_plural": "{{totalRows}} riviä",
21
+ "toast.close.text": "sulje"
21
22
  };
22
23
  //# sourceMappingURL=odyssey-react-mui_fi.js.map