@procore/text-editor 1.0.0 → 1.1.0
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/.jest/ckeditorMock.js +2 -0
- package/.jest/ckeditorUtilsMock.js +14 -0
- package/CHANGELOG.md +30 -0
- package/dist/DebouncedTextEditor/DebouncedTextEditor.js +1 -1
- package/dist/DebouncedTextEditor/DebouncedTextEditor.js.map +1 -1
- package/dist/DebouncedTextEditor/index.js.map +1 -1
- package/dist/TextEditor/CKTextEditor.js +15 -9
- package/dist/TextEditor/CKTextEditor.js.map +1 -1
- package/dist/TextEditor/EditorError.js.map +1 -1
- package/dist/TextEditor/Providers/FeatureFlagProvider.js.map +1 -1
- package/dist/TextEditor/StickyToolbar/index.js.map +1 -1
- package/dist/TextEditor/StickyToolbar/useStickyToolbar.js.map +1 -1
- package/dist/TextEditor/StickyToolbar/useStickyToolbar.types.js.map +1 -1
- package/dist/TextEditor/TextEditor.js.map +1 -1
- package/dist/TextEditor/TextEditor.styles.d.ts +7 -8
- package/dist/TextEditor/TextEditor.styles.js +5 -5
- package/dist/TextEditor/TextEditor.styles.js.map +1 -1
- package/dist/TextEditor/TextEditor.types.d.ts +1 -1
- package/dist/TextEditor/TextEditor.types.js.map +1 -1
- package/dist/TextEditor/TextEditorI18nProvider.js.map +1 -1
- package/dist/TextEditor/TextEditorProvider.js.map +1 -1
- package/dist/TextEditor/TextEditorProvider.types.d.ts +1 -1
- package/dist/TextEditor/TextEditorProvider.types.js.map +1 -1
- package/dist/TextEditor/TinyMCETextEditor.js.map +1 -1
- package/dist/TextEditor/index.d.ts +1 -1
- package/dist/TextEditor/index.js +0 -1
- package/dist/TextEditor/index.js.map +1 -1
- package/dist/TextEditor/license_key.js.map +1 -1
- package/dist/TextEditor/plugins/CutPlugin/CutCommand.js +21 -29
- package/dist/TextEditor/plugins/CutPlugin/CutCommand.js.map +1 -1
- package/dist/TextEditor/plugins/CutPlugin/CutPlugin.js +2 -2
- package/dist/TextEditor/plugins/CutPlugin/CutPlugin.js.map +1 -1
- package/dist/TextEditor/plugins/CutPlugin/index.js.map +1 -1
- package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.js.map +1 -1
- package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/index.js.map +1 -1
- package/dist/TextEditor/plugins/NormalizeTableWidthPlugin/NormalizeTableWidthPlugin.js.map +1 -1
- package/dist/TextEditor/plugins/NormalizeTableWidthPlugin/index.js.map +1 -1
- package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js +20 -28
- package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js.map +1 -1
- package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js +2 -2
- package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js.map +1 -1
- package/dist/TextEditor/plugins/PasteAsTextPlugin/index.js.map +1 -1
- package/dist/TextEditor/plugins/PastePlugin/PasteCommand.js +54 -62
- package/dist/TextEditor/plugins/PastePlugin/PasteCommand.js.map +1 -1
- package/dist/TextEditor/plugins/PastePlugin/PastePlugin.js +2 -2
- package/dist/TextEditor/plugins/PastePlugin/PastePlugin.js.map +1 -1
- package/dist/TextEditor/plugins/PastePlugin/index.js.map +1 -1
- package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/ProcoreImageUploadPlugin.d.ts +1 -1
- package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/ProcoreImageUploadPlugin.js +50 -59
- package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/ProcoreImageUploadPlugin.js.map +1 -1
- package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/index.js.map +1 -1
- package/dist/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js.map +1 -1
- package/dist/TextEditor/plugins/TabSpacesPlugin/index.js.map +1 -1
- package/dist/TextEditor/textEditorTheming/icons.js.map +1 -1
- package/dist/TextEditor/textEditorTheming/index.js.map +1 -1
- package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.d.ts +0 -1
- package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.js.map +1 -1
- package/dist/TextEditor/useCKEditorCss.js.map +1 -1
- package/dist/TextEditor/useCKEditorFocusScope.js.map +1 -1
- package/dist/TextEditor/useTabAsNavigation.js.map +1 -1
- package/dist/TextEditor/utils/config.js +29 -4
- package/dist/TextEditor/utils/config.js.map +1 -1
- package/dist/TextEditor/utils/imageAttributes.js.map +1 -1
- package/dist/TextEditor/utils/imageUrls.js.map +1 -1
- package/dist/TextEditor/utils/index.js.map +1 -1
- package/dist/TextEditor/utils/locale.js +12 -1
- package/dist/TextEditor/utils/locale.js.map +1 -1
- package/dist/TextEditor/utils/richTextEditorHandlers.d.ts +2 -2
- package/dist/TextEditor/utils/richTextEditorHandlers.js +62 -81
- package/dist/TextEditor/utils/richTextEditorHandlers.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.d.ts +0 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +2 -2
- package/dist/TextEditorOutput/TextEditorOutput.styles.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.types.d.ts +0 -1
- package/dist/TextEditorOutput/TextEditorOutput.types.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.utils.js +12 -4
- package/dist/TextEditorOutput/TextEditorOutput.utils.js.map +1 -1
- package/dist/TextEditorOutput/index.js.map +1 -1
- package/dist/_storyHelpers/constants.js.map +1 -1
- package/dist/_typedoc/TextEditor/TextEditor.types.json +153 -153
- package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +4 -4
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +9 -9
- package/dist/_utils/propsTypedoc.d.ts +3 -3
- package/dist/_utils/propsTypedoc.js +1 -3
- package/dist/_utils/propsTypedoc.js.map +1 -1
- package/dist/ckeditor5-premium-features.d.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/locales/de-DE.json +17 -0
- package/dist/locales/en-AU.json +17 -0
- package/dist/locales/en-CA.json +17 -0
- package/dist/locales/en-GB.json +17 -0
- package/dist/locales/es-ES.json +17 -0
- package/dist/locales/es.json +17 -0
- package/dist/locales/fr-CA.json +17 -0
- package/dist/locales/fr-FR.json +17 -0
- package/dist/locales/is-IS.json +17 -0
- package/dist/locales/it-IT.json +17 -0
- package/dist/locales/ja-JP.json +17 -0
- package/dist/locales/nb-NO.json +17 -0
- package/dist/locales/pl-PL.json +17 -0
- package/dist/locales/pt-BR.json +17 -0
- package/dist/locales/pt-PT.json +17 -0
- package/dist/locales/th-TH.json +17 -0
- package/dist/locales/zh-SG.json +17 -0
- package/dist/locales/zh-TW.json +17 -0
- package/dist/stories/util.js.map +1 -1
- package/dist/utils/debounce.js +1 -1
- package/dist/utils/debounce.js.map +1 -1
- package/jestConfig.js +0 -2
- package/package.json +44 -42
- package/.jest/translationMock.js +0 -12
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"typeDetail": "<span class=\"tsd-signature-type\">ReactNode</span>",
|
|
10
10
|
"description": "",
|
|
11
11
|
"descriptionHtml": "",
|
|
12
|
-
"sourceFile": "TextEditor/TextEditorProvider.types.ts",
|
|
13
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
12
|
+
"sourceFile": "packages/text-editor/src/TextEditor/TextEditorProvider.types.ts",
|
|
13
|
+
"sourceUrl": "https://github.com/procore/core/blob/8b69fd24db849f5514b8a2a86f1bfc61cb1ead77/packages/text-editor/src/TextEditor/TextEditorProvider.types.ts#L9"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "features",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"typeDetail": "<span class=\"tsd-signature-type\">TextEditorFeatureToggle</span>",
|
|
20
20
|
"description": "- `stickyToolbar` - Have the editor toolbar stick to the top when content is longer than the page length.\n- `tabAsNavigation` - Have `Tab` key exit the editor. Support `Alt`/`Opt` + `Tab` as triple space indent.",
|
|
21
21
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<ul>\n<li><code>stickyToolbar</code> - Have the editor toolbar stick to the top when content is longer than the page length.</li>\n<li><code>tabAsNavigation</code> - Have <code>Tab</code> key exit the editor. Support <code>Alt</code>/<code>Opt</code> + <code>Tab</code> as triple space indent.</li>\n</ul>\n</div></div>",
|
|
22
|
-
"sourceFile": "TextEditor/TextEditorProvider.types.ts",
|
|
23
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
22
|
+
"sourceFile": "packages/text-editor/src/TextEditor/TextEditorProvider.types.ts",
|
|
23
|
+
"sourceUrl": "https://github.com/procore/core/blob/8b69fd24db849f5514b8a2a86f1bfc61cb1ead77/packages/text-editor/src/TextEditor/TextEditorProvider.types.ts#L14"
|
|
24
24
|
}
|
|
25
25
|
],
|
|
26
26
|
"description": ""
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"type": "<span class=\"tsd-signature-type\">string</span>",
|
|
9
9
|
"typeDetail": "<span class=\"tsd-signature-type\">string</span>",
|
|
10
10
|
"description": "Additional classNames",
|
|
11
|
-
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p
|
|
12
|
-
"sourceFile": "TextEditorOutput/TextEditorOutput.types.ts",
|
|
13
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
11
|
+
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p></dd></dl></div>",
|
|
12
|
+
"sourceFile": "packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts",
|
|
13
|
+
"sourceUrl": "https://github.com/procore/core/blob/8b69fd24db849f5514b8a2a86f1bfc61cb1ead77/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L14"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "style",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"type": "<span class=\"tsd-signature-type\">CSSProperties</span>",
|
|
19
19
|
"typeDetail": "<span class=\"tsd-signature-type\">CSSProperties</span>",
|
|
20
20
|
"description": "Additional CSS styles",
|
|
21
|
-
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p
|
|
22
|
-
"sourceFile": "TextEditorOutput/TextEditorOutput.types.ts",
|
|
23
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
21
|
+
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p></dd></dl></div>",
|
|
22
|
+
"sourceFile": "packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts",
|
|
23
|
+
"sourceUrl": "https://github.com/procore/core/blob/8b69fd24db849f5514b8a2a86f1bfc61cb1ead77/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L21"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "value",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"type": "<span class=\"tsd-signature-type\">string</span>",
|
|
29
29
|
"typeDetail": "<span class=\"tsd-signature-type\">string</span>",
|
|
30
30
|
"description": "Formatted text from `TextEditor`",
|
|
31
|
-
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Formatted text from <code>TextEditor</code></p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p
|
|
32
|
-
"sourceFile": "TextEditorOutput/TextEditorOutput.types.ts",
|
|
33
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
31
|
+
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Formatted text from <code>TextEditor</code></p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p></dd></dl></div>",
|
|
32
|
+
"sourceFile": "packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts",
|
|
33
|
+
"sourceUrl": "https://github.com/procore/core/blob/8b69fd24db849f5514b8a2a86f1bfc61cb1ead77/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L7"
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"description": ""
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from '../TextEditor/TextEditor.types';
|
|
2
|
-
export * from '../TextEditor/TextEditorProvider.types';
|
|
3
|
-
export * from '../TextEditorOutput/TextEditorOutput.types';
|
|
1
|
+
export type * from '../TextEditor/TextEditor.types';
|
|
2
|
+
export type * from '../TextEditor/TextEditorProvider.types';
|
|
3
|
+
export type * from '../TextEditorOutput/TextEditorOutput.types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propsTypedoc.js","names":[],"sources":["../../src/_utils/propsTypedoc.ts"],"sourcesContent":["export * from '../TextEditor/TextEditor.types'\nexport * from '../TextEditor/TextEditorProvider.types'\nexport * from '../TextEditorOutput/TextEditorOutput.types'\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"propsTypedoc.js","names":[],"sources":["../../src/_utils/propsTypedoc.ts"],"sourcesContent":["export type * from '../TextEditor/TextEditor.types'\nexport type * from '../TextEditor/TextEditorProvider.types'\nexport type * from '../TextEditorOutput/TextEditorOutput.types'\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ckeditor5-premium-features.d.js","names":[],"sources":["../src/ckeditor5-premium-features.d.ts"],"sourcesContent":["declare module 'ckeditor5-premium-features' {\n import type { Editor, PluginConstructor } from 'ckeditor5'\n\n export const MultiLevelList: PluginConstructor<Editor>\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ckeditor5-premium-features.d.js","names":[],"sources":["../src/ckeditor5-premium-features.d.ts"],"sourcesContent":["declare module 'ckeditor5-premium-features' {\n import type { Editor, PluginConstructor } from 'ckeditor5'\n\n export const MultiLevelList: PluginConstructor<Editor>\n}\n"],"mappings":"","ignoreList":[]}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './DebouncedTextEditor'\nexport * from './TextEditor'\nexport * from './TextEditorOutput'\n"],"mappings":"AAAA,cAAc,uBAAuB;AACrC,cAAc,cAAc;AAC5B,cAAc,oBAAoB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './DebouncedTextEditor'\nexport * from './TextEditor'\nexport * from './TextEditorOutput'\n"],"mappings":"AAAA,cAAc,uBAAuB;AACrC,cAAc,cAAc;AAC5B,cAAc,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "Wir konnten kein Bild zum Hochladen finden. Wählen Sie eine Datei aus und versuchen Sie es erneut.",
|
|
5
|
+
"aborted" : "Der Bild-Upload wurde vorzeitig abgebrochen. Laden Sie die Datei noch einmal hoch.",
|
|
6
|
+
"unsupportedType" : "%{type}-Dateien werden nicht unterstützt.",
|
|
7
|
+
"pdfUnsupportedType" : "%{type}Bilder werden in PDF-Exporten nicht angezeigt.",
|
|
8
|
+
"dismissWarning" : "Warnung schließen",
|
|
9
|
+
"fileTooLarge" : "Bilder dürfen maximal 10 MB groß sein.",
|
|
10
|
+
"imageLimit" : "Sie haben das Limit von %{count} Bildern erreicht. Entfernen Sie ein Bild, bevor Sie ein neues hinzufügen.",
|
|
11
|
+
"unreadable" : "Diese Datei konnte nicht als Bild gelesen werden. Wählen Sie ein anderes Bild aus und versuchen Sie es erneut.",
|
|
12
|
+
"failed" : "Dieses Bild konnte nicht hochgeladen werden. Überprüfen Sie Ihre Verbindung und versuchen Sie es erneut.",
|
|
13
|
+
"invalidProstoreFileId" : "Beim Hochladen dieses Bildes ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.",
|
|
14
|
+
"invalidImageUrl" : "Beim Hochladen dieses Bildes ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "We couldn't find an image to upload. Choose a file and try again.",
|
|
5
|
+
"aborted" : "Image upload was cancelled before it finished. Try uploading it again.",
|
|
6
|
+
"unsupportedType" : "%{type}files aren't supported.",
|
|
7
|
+
"pdfUnsupportedType" : "%{type}images won't appear in PDF exports.",
|
|
8
|
+
"dismissWarning" : "Dismiss warning",
|
|
9
|
+
"fileTooLarge" : "Images must be 10 MB or smaller.",
|
|
10
|
+
"imageLimit" : "You've reached the limit of %{count} images. Remove one before adding another.",
|
|
11
|
+
"unreadable" : "This file couldn't be read as an image. Choose a different image and try again.",
|
|
12
|
+
"failed" : "We couldn't upload this image. Check your connection and try again.",
|
|
13
|
+
"invalidProstoreFileId" : "Something went wrong uploading this image. Please try again.",
|
|
14
|
+
"invalidImageUrl" : "Something went wrong uploading this image. Please try again."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "We couldn't find an image to upload. Choose a file and try again.",
|
|
5
|
+
"aborted" : "Image upload was cancelled before it finished. Try uploading it again.",
|
|
6
|
+
"unsupportedType" : "%{type}files aren't supported.",
|
|
7
|
+
"pdfUnsupportedType" : "%{type}images won't appear in PDF exports.",
|
|
8
|
+
"dismissWarning" : "Dismiss warning",
|
|
9
|
+
"fileTooLarge" : "Images must be 10 MB or smaller.",
|
|
10
|
+
"imageLimit" : "You've reached the limit of %{count} images. Remove one before adding another.",
|
|
11
|
+
"unreadable" : "This file couldn't be read as an image. Choose a different image and try again.",
|
|
12
|
+
"failed" : "We couldn't upload this image. Check your connection and try again.",
|
|
13
|
+
"invalidProstoreFileId" : "Something went wrong uploading this image. Please try again.",
|
|
14
|
+
"invalidImageUrl" : "Something went wrong uploading this image. Please try again."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "We couldn't find an image to upload. Choose a file and try again.",
|
|
5
|
+
"aborted" : "Image upload was cancelled before it finished. Try uploading it again.",
|
|
6
|
+
"unsupportedType" : "%{type}files aren't supported.",
|
|
7
|
+
"pdfUnsupportedType" : "%{type}images won't appear in PDF exports.",
|
|
8
|
+
"dismissWarning" : "Dismiss warning",
|
|
9
|
+
"fileTooLarge" : "Images must be 10 MB or smaller.",
|
|
10
|
+
"imageLimit" : "You've reached the limit of %{count} images. Remove one before adding another.",
|
|
11
|
+
"unreadable" : "This file couldn't be read as an image. Choose a different image and try again.",
|
|
12
|
+
"failed" : "We couldn't upload this image. Check your connection and try again.",
|
|
13
|
+
"invalidProstoreFileId" : "Something went wrong uploading this image. Please try again.",
|
|
14
|
+
"invalidImageUrl" : "Something went wrong uploading this image. Please try again."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "No se ha encontrado una imagen que cargar. Elija un archivo e inténtelo de nuevo.",
|
|
5
|
+
"aborted" : "La carga de la imagen se ha cancelado antes de finalizar. Intente cargarla de nuevo.",
|
|
6
|
+
"unsupportedType" : "Los archivos %{type} no son compatibles.",
|
|
7
|
+
"pdfUnsupportedType" : "Las imágenes %{type} no aparecerán en las exportaciones en PDF.",
|
|
8
|
+
"dismissWarning" : "Ignorar advertencia",
|
|
9
|
+
"fileTooLarge" : "Las imágenes deben tener un tamaño máximo de 10 MB.",
|
|
10
|
+
"imageLimit" : "Ha alcanzado el límite de %{count} imágenes. Elimine una antes de añadir otra.",
|
|
11
|
+
"unreadable" : "Este archivo no se ha podido leer como una imagen. Elija otra imagen e inténtelo de nuevo.",
|
|
12
|
+
"failed" : "No se ha podido cargar esta imagen. Compruebe la conexión e inténtelo de nuevo.",
|
|
13
|
+
"invalidProstoreFileId" : "Se ha producido un error al cargar esta imagen. Inténtelo de nuevo.",
|
|
14
|
+
"invalidImageUrl" : "Se ha producido un error al cargar esta imagen. Inténtelo de nuevo."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "No encontramos ninguna imagen para cargar. Elija un archivo e inténtelo de nuevo.",
|
|
5
|
+
"aborted" : "La carga de la imagen se canceló antes de completarse. Intente volver a subir la imagen.",
|
|
6
|
+
"unsupportedType" : "Los archivos %{type} no son compatibles.",
|
|
7
|
+
"pdfUnsupportedType" : "Las imágenes %{type} no aparecerán en las exportaciones de PDF.",
|
|
8
|
+
"dismissWarning" : "Descartar la advertencia",
|
|
9
|
+
"fileTooLarge" : "Las imágenes deben tener un tamaño máximo de 10 MB.",
|
|
10
|
+
"imageLimit" : "Alcanzó el límite de %{count} imágenes. Elimine una antes de agregar otra.",
|
|
11
|
+
"unreadable" : "Este archivo no se pudo leer como una imagen. Elija otra imagen e inténtelo de nuevo.",
|
|
12
|
+
"failed" : "No se pudo cargar esta imagen. Verifique su conexión y vuelva a intentarlo.",
|
|
13
|
+
"invalidProstoreFileId" : "Se produjo un error al subir esta imagen. Inténtelo de nuevo.",
|
|
14
|
+
"invalidImageUrl" : "Se produjo un error al subir esta imagen. Inténtelo de nuevo."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "Nous n'avons pas trouvé d'image à téléverser. Choisissez un fichier et réessayez.",
|
|
5
|
+
"aborted" : "Le téléversement de l'image a été annulé avant d'être terminé. Essayez de la téléverser à nouveau.",
|
|
6
|
+
"unsupportedType" : "Les fichiers %{type} ne sont pas pris en charge.",
|
|
7
|
+
"pdfUnsupportedType" : "Les images %{type} n'apparaîtront pas dans les exportations PDF.",
|
|
8
|
+
"dismissWarning" : "Ignorer l'avertissement",
|
|
9
|
+
"fileTooLarge" : "Les images doivent avoir une taille inférieure ou égale à 10 Mo.",
|
|
10
|
+
"imageLimit" : "Vous avez atteint la limite de %{count} images. Enlevez-en une avant d'en ajouter une autre.",
|
|
11
|
+
"unreadable" : "Ce fichier n'a pas pu être lu comme une image. Choisissez une autre image et réessayez.",
|
|
12
|
+
"failed" : "Nous n'avons pas pu téléverser cette image. Vérifiez votre connexion et réessayez.",
|
|
13
|
+
"invalidProstoreFileId" : "Une erreur s'est produite lors du téléversement de cette image. Veuillez réessayer.",
|
|
14
|
+
"invalidImageUrl" : "Une erreur s'est produite lors du téléversement de cette image. Veuillez réessayer."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "Nous n'avons pas trouvé d'image à charger. Choisissez un fichier et réessayez.",
|
|
5
|
+
"aborted" : "Le chargement de l'image a été annulé avant d'être terminé. Essayez de la charger de nouveau.",
|
|
6
|
+
"unsupportedType" : "Les fichiers %{type} ne sont pas pris en charge.",
|
|
7
|
+
"pdfUnsupportedType" : "Les images %{type} n'apparaîtront pas dans les exportations PDF.",
|
|
8
|
+
"dismissWarning" : "Ignorer l'avertissement",
|
|
9
|
+
"fileTooLarge" : "La taille des images ne doit pas dépasser 10 Mo.",
|
|
10
|
+
"imageLimit" : "Vous avez atteint la limite de %{count} images. Retirez-en une avant d'en ajouter une autre.",
|
|
11
|
+
"unreadable" : "Impossible de lire ce fichier comme une image. Choisissez une autre image et réessayez.",
|
|
12
|
+
"failed" : "Nous n'avons pas pu charger cette image. Vérifiez votre connexion et réessayez.",
|
|
13
|
+
"invalidProstoreFileId" : "Une erreur s'est produite lors du chargement de cette image. Veuillez réessayer.",
|
|
14
|
+
"invalidImageUrl" : "Une erreur s'est produite lors du chargement de cette image. Veuillez réessayer."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "Við fundum enga mynd til að hlaða inn. Veldu skrá og reyndu aftur.",
|
|
5
|
+
"aborted" : "Hætt var við að hlaða myndinni áður en henni lauk. Reyndu að hlaða því upp aftur.",
|
|
6
|
+
"unsupportedType" : "%{type}skrár eru ekki studdar.",
|
|
7
|
+
"pdfUnsupportedType" : "%{type}myndir birtast ekki í PDF útflutningi.",
|
|
8
|
+
"dismissWarning" : "Hunsa viðvörun",
|
|
9
|
+
"fileTooLarge" : "Myndir verða að vera 10 MB eða minni.",
|
|
10
|
+
"imageLimit" : "Þú hefur náð hámarkinu %{count} myndir. Fjarlægðu eitt áður en þú bætir öðru við.",
|
|
11
|
+
"unreadable" : "Ekki var hægt að lesa þessa skrá sem mynd. Veldu aðra mynd og reyndu aftur.",
|
|
12
|
+
"failed" : "Við gátum ekki hlaðið þessari mynd inn. Athugaðu tenginguna þína og reyndu aftur.",
|
|
13
|
+
"invalidProstoreFileId" : "Eitthvað fór úrskeiðis við að hlaða þessari mynd inn. Vinsamlegast reynið aftur.",
|
|
14
|
+
"invalidImageUrl" : "Eitthvað fór úrskeiðis við að hlaða þessari mynd inn. Vinsamlegast reynið aftur."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "Impossibile trovare un'immagine da caricare. Scegliere un file e riprovare.",
|
|
5
|
+
"aborted" : "Il caricamento dell'immagine è stato annullato prima del completamento. Provare a caricarlo di nuovo.",
|
|
6
|
+
"unsupportedType" : "I file %{type} non sono supportati.",
|
|
7
|
+
"pdfUnsupportedType" : "Le immagini %{type} non verranno visualizzate nelle esportazioni PDF.",
|
|
8
|
+
"dismissWarning" : "Ignora avviso",
|
|
9
|
+
"fileTooLarge" : "Le immagini devono avere una dimensione massima di 10 MB.",
|
|
10
|
+
"imageLimit" : "È stato raggiunto il limite di %{count} immagini. Rimuoverne una prima di aggiungerne un'altra.",
|
|
11
|
+
"unreadable" : "Impossibile leggere questo file come immagine. Scegliere un'immagine diversa e riprovare.",
|
|
12
|
+
"failed" : "Impossibile caricare questa immagine. Verificare la connessione e riprovare.",
|
|
13
|
+
"invalidProstoreFileId" : "Si è verificato un errore durante il caricamento di questa immagine. Riprovare.",
|
|
14
|
+
"invalidImageUrl" : "Si è verificato un errore durante il caricamento di questa immagine. Riprovare."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "アップロードする画像が見つかりませんでした。ファイルを選択して、もう一度お試しください。",
|
|
5
|
+
"aborted" : "画像アップロードは完了する前にキャンセルされました。もう一度アップロードしてみてください。",
|
|
6
|
+
"unsupportedType" : "%{type}ファイルはサポートされていません。",
|
|
7
|
+
"pdfUnsupportedType" : "%{type}画像は PDF エクスポートに表示されません。",
|
|
8
|
+
"dismissWarning" : "警告を非表示にする",
|
|
9
|
+
"fileTooLarge" : "画像サイズは 10MB 以下でなければなりません。",
|
|
10
|
+
"imageLimit" : "画像数の上限である%{count}枚に達しました。新しいものを追加する前に、1 つ削除してください。",
|
|
11
|
+
"unreadable" : "このファイルは画像として読み込めませんでした。別の画像を選択して、もう一度お試しください。",
|
|
12
|
+
"failed" : "この画像をアップロードできませんでした。接続状況を確認して、もう一度お試しください。",
|
|
13
|
+
"invalidProstoreFileId" : "画像のアップロード中に問題が発生しました。もう一度お試しください。",
|
|
14
|
+
"invalidImageUrl" : "画像のアップロード中に問題が発生しました。もう一度お試しください。"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "Vi finner ingen blider å laste opp. Velg en fil og prøv igjen.",
|
|
5
|
+
"aborted" : "Opplasting av bilder ble avbrutt før den ble fullført. Prøv å laste opp igjen.",
|
|
6
|
+
"unsupportedType" : "%{type}filer støttes ikke.",
|
|
7
|
+
"pdfUnsupportedType" : "%{type}bilder vises ikke i PDF-eksport.",
|
|
8
|
+
"dismissWarning" : "Avvis advarsel",
|
|
9
|
+
"fileTooLarge" : "Bilder må være 10 MB eller mindre.",
|
|
10
|
+
"imageLimit" : "Du har nådd grensen på %{count} bilder. Fjern ett før du legger til et annet.",
|
|
11
|
+
"unreadable" : "Denne filen kan ikke leses som et bilde. Velg et annet bilde og prøv igjen.",
|
|
12
|
+
"failed" : "Vi kan ikke laste opp dette bildet. Sjekk tilkoblingen din og prøv igjen.",
|
|
13
|
+
"invalidProstoreFileId" : "Noe gikk galt under opplastingen av dette bildet. Prøv igjen.",
|
|
14
|
+
"invalidImageUrl" : "Noe gikk galt under opplastingen av dette bildet. Prøv igjen."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "Nie udało się znaleźć obrazu do przesłania. Wybierz plik i spróbuj ponownie.",
|
|
5
|
+
"aborted" : "Przesyłanie obrazu zostało anulowane przed jego zakończeniem. Spróbuj przesłać ponownie.",
|
|
6
|
+
"unsupportedType" : "Pliki %{type} nie są obsługiwane.",
|
|
7
|
+
"pdfUnsupportedType" : "Obrazy %{type} nie będą wyświetlane w plikach eksportowanych do formatu PDF.",
|
|
8
|
+
"dismissWarning" : "Odrzuć ostrzeżenie",
|
|
9
|
+
"fileTooLarge" : "Rozmiar obrazów nie może przekraczać 10 MB.",
|
|
10
|
+
"imageLimit" : "Osiągnięto limit %{count} obrazów. Usuń jeden przed dodaniem kolejnego.",
|
|
11
|
+
"unreadable" : "Tego pliku nie można odczytać jako obrazu. Wybierz inny obraz i spróbuj ponownie.",
|
|
12
|
+
"failed" : "Nie udało się przesłać tego obrazu. Sprawdź połączenie i spróbuj ponownie.",
|
|
13
|
+
"invalidProstoreFileId" : "Wystąpił błąd podczas przesyłania tego obrazu. Spróbuj ponownie.",
|
|
14
|
+
"invalidImageUrl" : "Wystąpił błąd podczas przesyłania tego obrazu. Spróbuj ponownie."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "Não foi possível encontrar uma imagem para upload. Selecione um arquivo e tente novamente.",
|
|
5
|
+
"aborted" : "O upload da imagem foi cancelado antes de ser concluído. Tente fazer o upload novamente.",
|
|
6
|
+
"unsupportedType" : "Arquivos %{type}não são compatíveis.",
|
|
7
|
+
"pdfUnsupportedType" : "As imagens %{type}não aparecerão nas exportações em PDF.",
|
|
8
|
+
"dismissWarning" : "Ignorar aviso",
|
|
9
|
+
"fileTooLarge" : "As imagens devem ter no máximo 10 MB.",
|
|
10
|
+
"imageLimit" : "Você atingiu o limite de %{count} imagens. Remova uma antes de adicionar outra.",
|
|
11
|
+
"unreadable" : "Este arquivo não pôde ser lido como uma imagem. Escolha uma imagem diferente e tente novamente.",
|
|
12
|
+
"failed" : "Não foi possível fazer upload desta imagem. Verifique a conexão e tente novamente.",
|
|
13
|
+
"invalidProstoreFileId" : "Ocorreu um erro ao fazer upload desta imagem. Tente novamente.",
|
|
14
|
+
"invalidImageUrl" : "Ocorreu um erro ao fazer upload desta imagem. Tente novamente."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "Não foi possível encontrar uma imagem para carregar. Selecione um ficheiro e tente novamente.",
|
|
5
|
+
"aborted" : "O carregamento da imagem foi cancelado antes de estar concluído. Tente carregar novamente.",
|
|
6
|
+
"unsupportedType" : "Os ficheiros%{type} não são suportados.",
|
|
7
|
+
"pdfUnsupportedType" : "As imagens%{type} não aparecerão nas exportações em PDF.",
|
|
8
|
+
"dismissWarning" : "Ignorar aviso",
|
|
9
|
+
"fileTooLarge" : "As imagens devem ter no máximo 10 MB.",
|
|
10
|
+
"imageLimit" : "Atingiu o limite de %{count} imagens. Remova uma antes de adicionar outra.",
|
|
11
|
+
"unreadable" : "Não foi possível ler este ficheiro como uma imagem. Escolha uma imagem diferente e tente novamente.",
|
|
12
|
+
"failed" : "Não foi possível carregar esta imagem. Verifique a sua ligação e tente novamente.",
|
|
13
|
+
"invalidProstoreFileId" : "Ocorreu um erro ao carregar esta imagem. Por favor, tente novamente.",
|
|
14
|
+
"invalidImageUrl" : "Ocorreu um erro ao carregar esta imagem. Por favor, tente novamente."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "เราไม่พบรูปภาพที่จะอัปโหลด เลือกไฟล์แล้วลองใหม่อีกครั้ง",
|
|
5
|
+
"aborted" : "การอัปโหลดรูปภาพถูกยกเลิกก่อนที่จะเสร็จสมบูรณ์ ลองอัปโหลดอีกครั้ง",
|
|
6
|
+
"unsupportedType" : "ไฟล์ %{type}ไม่ได้รับการสนับสนุน",
|
|
7
|
+
"pdfUnsupportedType" : "รูปภาพ %{type}รูปจะไม่ปรากฏในไฟล์ PDF ที่ส่งออก",
|
|
8
|
+
"dismissWarning" : "ยกเลิกคำเตือน",
|
|
9
|
+
"fileTooLarge" : "รูปภาพต้องมีขนาดไม่เกิน 10 MB",
|
|
10
|
+
"imageLimit" : "คุณใช้จำนวนภาพครบ %{count} ภาพแล้ว นำอันหนึ่งออกก่อนจึงจะสามารถเพิ่มอันใหม่ได้",
|
|
11
|
+
"unreadable" : "ไฟล์นี้ไม่สามารถอ่านเป็นรูปภาพได้ เลือกภาพอื่นแล้วลองใหม่อีกครั้ง",
|
|
12
|
+
"failed" : "เราไม่สามารถอัปโหลดรูปภาพนี้ได้ ตรวจสอบการเชื่อมต่อของคุณแล้วลองใหม่อีกครั้ง",
|
|
13
|
+
"invalidProstoreFileId" : "เกิดข้อผิดพลาดบางอย่างขณะอัปโหลดรูปภาพนี้ โปรดลองอีกครั้ง",
|
|
14
|
+
"invalidImageUrl" : "เกิดข้อผิดพลาดบางอย่างขณะอัปโหลดรูปภาพนี้ โปรดลองอีกครั้ง"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "我们找不到可以上传的图片。请选择一个文件,然后重试。",
|
|
5
|
+
"aborted" : "图片上传操作在完成前被取消。请尝试重新上传。",
|
|
6
|
+
"unsupportedType" : "不支持 %{type} 文件。",
|
|
7
|
+
"pdfUnsupportedType" : "%{type} 图片不会显示在 PDF 导出文件中。",
|
|
8
|
+
"dismissWarning" : "关闭警告",
|
|
9
|
+
"fileTooLarge" : "图片大小不得超过 10 MB。",
|
|
10
|
+
"imageLimit" : "你已达到 %{count} 张图片的上限。请先移除一张图片,再添加新图片。",
|
|
11
|
+
"unreadable" : "此文件无法作为图像读取。请选择其他图片,然后重试。",
|
|
12
|
+
"failed" : "无法上传此图片。请检查连接,然后重试。",
|
|
13
|
+
"invalidProstoreFileId" : "上传此图片时出错。请重试。",
|
|
14
|
+
"invalidImageUrl" : "上传此图片时出错。请重试。"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"textEditor" : {
|
|
3
|
+
"imageUpload" : {
|
|
4
|
+
"noFile" : "找不到可上傳的影像。請選擇檔案並再試一次。",
|
|
5
|
+
"aborted" : "影像上傳在完成前已取消。請嘗試重新上傳。",
|
|
6
|
+
"unsupportedType" : "不支援 %{type} 檔案。",
|
|
7
|
+
"pdfUnsupportedType" : "%{type} 影像不會在 PDF 匯出中顯示。",
|
|
8
|
+
"dismissWarning" : "關閉警告",
|
|
9
|
+
"fileTooLarge" : "影像必須為 10 MB 或更小。",
|
|
10
|
+
"imageLimit" : "您已達到 %{count} 張影像的上限。請先移除一張,再新增另一張。",
|
|
11
|
+
"unreadable" : "無法將此檔案讀取為影像。請選擇其他影像後再試一次。",
|
|
12
|
+
"failed" : "無法上傳此影像。請檢查您的網路連線並再試一次。",
|
|
13
|
+
"invalidProstoreFileId" : "上傳此影像時發生問題。請再試一次。",
|
|
14
|
+
"invalidImageUrl" : "上傳此影像時發生問題。請再試一次。"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/dist/stories/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","names":["Form","React","SingleForm","_ref","_ref$component","component","FieldComponent","Field","debug","initialValue","view","variant","props","_objectWithoutProperties","_excluded","columnOne","colStart","columnTwo","createElement","enableReinitialize","initialValues","value","onSubmit","values","alert","JSON","stringify","Row","_extends","name","label","description","disabled","error","BaseCRU"],"sources":["../../src/stories/util.tsx"],"sourcesContent":["import { Form } from '@procore/core-react'\nimport React from 'react'\n\ninterface SingleFormProps {\n component?: any\n debug?: boolean\n initialValue?: any\n variant?: React.ComponentProps<typeof Form>['variant']\n view?: React.ComponentProps<typeof Form>['view']\n // TODO: textEditorComponent: any\n}\n\n/**\n * Takes a Form Field component with TextEditor and creates\n * a full Form of one view and variant.\n */\nconst SingleForm = ({\n component: FieldComponent = Form.Field,\n debug,\n initialValue,\n view,\n variant,\n // TODO: textEditorComponent,\n ...props\n}: SingleFormProps) => {\n // removes colStart from DOM for traditional variant\n const columnOne = variant === 'traditional' ? {} : { colStart: 1 }\n const columnTwo = variant === 'traditional' ? {} : { colStart: 7 }\n\n return (\n <Form\n enableReinitialize\n initialValues={{\n value: initialValue,\n }}\n variant={variant}\n view={view}\n onSubmit={(values) => alert(JSON.stringify(values, null, 2))}\n >\n <Form.Form>\n <Form.Row>\n <FieldComponent\n name=\"empty\"\n label=\"Empty Text\"\n description=\"Empty Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnOne}\n {...props}\n />\n <FieldComponent\n name=\"value\"\n label=\"Initial Value Text\"\n description=\"Initial Value Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnTwo}\n {...props}\n />\n </Form.Row>\n <Form.Row>\n <FieldComponent\n name=\"disabled-empty\"\n disabled\n label=\"Disabled Empty Text\"\n description=\"Disabled Empty Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnOne}\n {...props}\n />\n <FieldComponent\n name=\"disabled-value\"\n disabled\n label=\"Disabled Initial Value Text\"\n description=\"Disabled Initial Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnTwo}\n {...props}\n />\n </Form.Row>\n <Form.Row>\n <FieldComponent\n name=\"error-empty\"\n error\n label=\"Error Boolean Empty Text\"\n description=\"Error Boolean Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnOne}\n {...props}\n />\n <FieldComponent\n name=\"error-value\"\n error=\"Some error message that should be read red\"\n label=\"Error Message Initial Value Text\"\n description=\"Error Message Initial Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnTwo}\n {...props}\n />\n </Form.Row>\n </Form.Form>\n </Form>\n )\n}\n\n/** All variations for a field with TextEditor.\n * @example\n * <BaseCRU\n component={Form.RichText}\n initialValue=\"<p>Hello</p>\"\n textEditorComponent={TextEditor}\n />\n */\nexport function BaseCRU<Element extends React.JSXElementConstructor<any>>(\n props: Omit<SingleFormProps, 'component'> & {\n component: Element\n // TODO: textEditorComponent: any\n } & Omit<React.ComponentProps<Element>, 'name'>\n) {\n return <SingleForm view=\"create\" {...props} />\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"util.js","names":["Form","React","SingleForm","_ref","_ref$component","component","FieldComponent","Field","debug","initialValue","view","variant","props","_objectWithoutProperties","_excluded","columnOne","colStart","columnTwo","createElement","enableReinitialize","initialValues","value","onSubmit","values","alert","JSON","stringify","Row","_extends","name","label","description","disabled","error","BaseCRU"],"sources":["../../src/stories/util.tsx"],"sourcesContent":["import { Form } from '@procore/core-react'\nimport React from 'react'\n\ninterface SingleFormProps {\n component?: any\n debug?: boolean\n initialValue?: any\n variant?: React.ComponentProps<typeof Form>['variant']\n view?: React.ComponentProps<typeof Form>['view']\n // TODO: textEditorComponent: any\n}\n\n/**\n * Takes a Form Field component with TextEditor and creates\n * a full Form of one view and variant.\n */\nconst SingleForm = ({\n component: FieldComponent = Form.Field,\n debug,\n initialValue,\n view,\n variant,\n // TODO: textEditorComponent,\n ...props\n}: SingleFormProps) => {\n // removes colStart from DOM for traditional variant\n const columnOne = variant === 'traditional' ? {} : { colStart: 1 }\n const columnTwo = variant === 'traditional' ? {} : { colStart: 7 }\n\n return (\n <Form\n enableReinitialize\n initialValues={{\n value: initialValue,\n }}\n variant={variant}\n view={view}\n onSubmit={(values) => alert(JSON.stringify(values, null, 2))}\n >\n <Form.Form>\n <Form.Row>\n <FieldComponent\n name=\"empty\"\n label=\"Empty Text\"\n description=\"Empty Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnOne}\n {...props}\n />\n <FieldComponent\n name=\"value\"\n label=\"Initial Value Text\"\n description=\"Initial Value Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnTwo}\n {...props}\n />\n </Form.Row>\n <Form.Row>\n <FieldComponent\n name=\"disabled-empty\"\n disabled\n label=\"Disabled Empty Text\"\n description=\"Disabled Empty Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnOne}\n {...props}\n />\n <FieldComponent\n name=\"disabled-value\"\n disabled\n label=\"Disabled Initial Value Text\"\n description=\"Disabled Initial Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnTwo}\n {...props}\n />\n </Form.Row>\n <Form.Row>\n <FieldComponent\n name=\"error-empty\"\n error\n label=\"Error Boolean Empty Text\"\n description=\"Error Boolean Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnOne}\n {...props}\n />\n <FieldComponent\n name=\"error-value\"\n error=\"Some error message that should be read red\"\n label=\"Error Message Initial Value Text\"\n description=\"Error Message Initial Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnTwo}\n {...props}\n />\n </Form.Row>\n </Form.Form>\n </Form>\n )\n}\n\n/** All variations for a field with TextEditor.\n * @example\n * <BaseCRU\n component={Form.RichText}\n initialValue=\"<p>Hello</p>\"\n textEditorComponent={TextEditor}\n />\n */\nexport function BaseCRU<Element extends React.JSXElementConstructor<any>>(\n props: Omit<SingleFormProps, 'component'> & {\n component: Element\n // TODO: textEditorComponent: any\n } & Omit<React.ComponentProps<Element>, 'name'>\n) {\n return <SingleForm view=\"create\" {...props} />\n}\n"],"mappings":"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","ignoreList":[]}
|
package/dist/utils/debounce.js
CHANGED
|
@@ -29,7 +29,7 @@ export function debounce(func, wait) {
|
|
|
29
29
|
var _pending;
|
|
30
30
|
clearTimeout(timeout);
|
|
31
31
|
timeout = null;
|
|
32
|
-
(_pending = pending) === null || _pending === void 0
|
|
32
|
+
(_pending = pending) === null || _pending === void 0 || _pending();
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
return debounced;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.js","names":["debounce","func","wait","immediate","arguments","length","undefined","timeout","pending","debounced","_this","_len","args","Array","_key","apply","callNow","clearTimeout","setTimeout","flush","_pending"],"sources":["../../src/utils/debounce.ts"],"sourcesContent":["export function debounce<T extends (...args: any[]) => void>(\n func: T,\n wait: number,\n immediate: boolean = false\n) {\n let timeout: ReturnType<typeof setTimeout> | null = null\n let pending: (() => void) | null = null\n\n const debounced = function (\n this: ThisParameterType<T>,\n ...args: Parameters<T>\n ): void {\n pending = () => func.apply(this, args)\n\n const callNow = immediate && timeout === null\n\n if (timeout !== null) {\n clearTimeout(timeout)\n }\n\n timeout = setTimeout(() => {\n timeout = null\n if (!immediate) {\n func.apply(this, args)\n }\n }, wait)\n\n if (callNow) {\n func.apply(this, args)\n }\n }\n\n debounced.flush = () => {\n if (timeout !== null) {\n clearTimeout(timeout)\n timeout = null\n pending?.()\n }\n }\n\n return debounced\n}\n"],"mappings":"AAAA,OAAO,SAASA,QAAQA,CACtBC,IAAO,EACPC,IAAY,EAEZ;EAAA,IADAC,SAAkB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAE1B,IAAIG,OAA6C,GAAG,IAAI;EACxD,IAAIC,OAA4B,GAAG,IAAI;EAEvC,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAA,EAGP;IAAA,IAAAC,KAAA;IAAA,SAAAC,IAAA,GAAAP,SAAA,CAAAC,MAAA,EADHO,IAAI,OAAAC,KAAA,CAAAF,IAAA,GAAAG,IAAA,MAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA;MAAJF,IAAI,CAAAE,IAAA,IAAAV,SAAA,CAAAU,IAAA;IAAA;IAEPN,OAAO,GAAG,SAAVA,OAAOA,CAAA;MAAA,OAASP,IAAI,CAACc,KAAK,CAACL,KAAI,EAAEE,IAAI,CAAC;IAAA;IAEtC,IAAMI,OAAO,GAAGb,SAAS,IAAII,OAAO,KAAK,IAAI;IAE7C,IAAIA,OAAO,KAAK,IAAI,EAAE;MACpBU,YAAY,CAACV,OAAO,CAAC;IACvB;IAEAA,OAAO,GAAGW,UAAU,CAAC,YAAM;MACzBX,OAAO,GAAG,IAAI;MACd,IAAI,CAACJ,SAAS,EAAE;QACdF,IAAI,CAACc,KAAK,CAACL,KAAI,EAAEE,IAAI,CAAC;MACxB;IACF,CAAC,EAAEV,IAAI,CAAC;IAER,IAAIc,OAAO,EAAE;MACXf,IAAI,CAACc,KAAK,CAAC,IAAI,EAAEH,IAAI,CAAC;IACxB;EACF,CAAC;EAEDH,SAAS,CAACU,KAAK,GAAG,YAAM;IACtB,IAAIZ,OAAO,KAAK,IAAI,EAAE;MAAA,IAAAa,QAAA;MACpBH,YAAY,CAACV,OAAO,CAAC;MACrBA,OAAO,GAAG,IAAI;MACd,CAAAa,QAAA,GAAAZ,OAAO,cAAAY,QAAA,
|
|
1
|
+
{"version":3,"file":"debounce.js","names":["debounce","func","wait","immediate","arguments","length","undefined","timeout","pending","debounced","_this","_len","args","Array","_key","apply","callNow","clearTimeout","setTimeout","flush","_pending"],"sources":["../../src/utils/debounce.ts"],"sourcesContent":["export function debounce<T extends (...args: any[]) => void>(\n func: T,\n wait: number,\n immediate: boolean = false\n) {\n let timeout: ReturnType<typeof setTimeout> | null = null\n let pending: (() => void) | null = null\n\n const debounced = function (\n this: ThisParameterType<T>,\n ...args: Parameters<T>\n ): void {\n pending = () => func.apply(this, args)\n\n const callNow = immediate && timeout === null\n\n if (timeout !== null) {\n clearTimeout(timeout)\n }\n\n timeout = setTimeout(() => {\n timeout = null\n if (!immediate) {\n func.apply(this, args)\n }\n }, wait)\n\n if (callNow) {\n func.apply(this, args)\n }\n }\n\n debounced.flush = () => {\n if (timeout !== null) {\n clearTimeout(timeout)\n timeout = null\n pending?.()\n }\n }\n\n return debounced\n}\n"],"mappings":"AAAA,OAAO,SAASA,QAAQA,CACtBC,IAAO,EACPC,IAAY,EAEZ;EAAA,IADAC,SAAkB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAE1B,IAAIG,OAA6C,GAAG,IAAI;EACxD,IAAIC,OAA4B,GAAG,IAAI;EAEvC,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAA,EAGP;IAAA,IAAAC,KAAA;IAAA,SAAAC,IAAA,GAAAP,SAAA,CAAAC,MAAA,EADHO,IAAI,OAAAC,KAAA,CAAAF,IAAA,GAAAG,IAAA,MAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA;MAAJF,IAAI,CAAAE,IAAA,IAAAV,SAAA,CAAAU,IAAA;IAAA;IAEPN,OAAO,GAAG,SAAVA,OAAOA,CAAA;MAAA,OAASP,IAAI,CAACc,KAAK,CAACL,KAAI,EAAEE,IAAI,CAAC;IAAA;IAEtC,IAAMI,OAAO,GAAGb,SAAS,IAAII,OAAO,KAAK,IAAI;IAE7C,IAAIA,OAAO,KAAK,IAAI,EAAE;MACpBU,YAAY,CAACV,OAAO,CAAC;IACvB;IAEAA,OAAO,GAAGW,UAAU,CAAC,YAAM;MACzBX,OAAO,GAAG,IAAI;MACd,IAAI,CAACJ,SAAS,EAAE;QACdF,IAAI,CAACc,KAAK,CAACL,KAAI,EAAEE,IAAI,CAAC;MACxB;IACF,CAAC,EAAEV,IAAI,CAAC;IAER,IAAIc,OAAO,EAAE;MACXf,IAAI,CAACc,KAAK,CAAC,IAAI,EAAEH,IAAI,CAAC;IACxB;EACF,CAAC;EAEDH,SAAS,CAACU,KAAK,GAAG,YAAM;IACtB,IAAIZ,OAAO,KAAK,IAAI,EAAE;MAAA,IAAAa,QAAA;MACpBH,YAAY,CAACV,OAAO,CAAC;MACrBA,OAAO,GAAG,IAAI;MACd,CAAAa,QAAA,GAAAZ,OAAO,cAAAY,QAAA,eAAPA,QAAA,CAAU,CAAC;IACb;EACF,CAAC;EAED,OAAOX,SAAS;AAClB","ignoreList":[]}
|
package/jestConfig.js
CHANGED
|
@@ -48,8 +48,6 @@ function textEditorJestConfig(config) {
|
|
|
48
48
|
'^ckeditor5$': resolveMockFile('ckeditorMock.js'),
|
|
49
49
|
'^ckeditor5-premium-features$': resolveMockFile('ckeditorMock.js'),
|
|
50
50
|
'^@ckeditor/ckeditor5-react$': resolveMockFile('ckeditorMock.js'),
|
|
51
|
-
'^@ckeditor/ckeditor5-utils/src/translation-service$':
|
|
52
|
-
resolveMockFile('translationMock.js'),
|
|
53
51
|
'^ckeditor5/translations/(.+)\\.js$': resolveMockFile(
|
|
54
52
|
'translationFileMock.js'
|
|
55
53
|
),
|