@atlaskit/media-test-helpers 28.8.1 → 29.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.
Files changed (103) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/dist/cjs/I18nWrapper.js +3 -17
  3. package/dist/cjs/MockGlobalImage.js +4 -2
  4. package/dist/cjs/clipboardEventMocks.js +2 -2
  5. package/dist/cjs/collectionNames.js +1 -1
  6. package/dist/cjs/example-mediaFeatureFlags.js +2 -2
  7. package/dist/cjs/exampleMediaItems.js +1 -1
  8. package/dist/cjs/fakeMediaClient.js +2 -1
  9. package/dist/cjs/featureFlagsWrapper/dropdown.js +5 -5
  10. package/dist/cjs/featureFlagsWrapper/helpers.js +3 -3
  11. package/dist/cjs/fileReader.js +6 -5
  12. package/dist/cjs/fileStateFactory/createFileState.js +93 -0
  13. package/dist/cjs/fileStateFactory/factory.js +174 -0
  14. package/dist/cjs/fileStateFactory/helpers.js +110 -0
  15. package/dist/cjs/fileStateFactory/index.js +41 -0
  16. package/dist/cjs/images.js +7 -7
  17. package/dist/cjs/index.js +309 -259
  18. package/dist/cjs/jestHelpers.js +1 -1
  19. package/dist/cjs/keyboardEventWithKeyCode.js +5 -3
  20. package/dist/cjs/mediaClientErrors.js +10 -4
  21. package/dist/cjs/mediaClientProvider.js +1 -1
  22. package/dist/cjs/mediaPickerAuthProvider.js +1 -1
  23. package/dist/cjs/mediaPickerMocks.js +3 -3
  24. package/dist/cjs/mockData/index.js +23 -22
  25. package/dist/cjs/mockData/matchers.js +1 -1
  26. package/dist/cjs/mockLoadImage.js +2 -2
  27. package/dist/cjs/mocks/database/collection-item.js +1 -1
  28. package/dist/cjs/mocks/database/index.js +2 -2
  29. package/dist/cjs/mocks/fileAndDirectoriesUtils.js +42 -36
  30. package/dist/cjs/mocks/media-mock.js +2 -1
  31. package/dist/cjs/mocks/routers/api-router.js +2 -2
  32. package/dist/cjs/mocks/websockets/messages.js +1 -1
  33. package/dist/cjs/mocks/websockets/remote-upload-server.js +4 -2
  34. package/dist/cjs/mountWithIntlContext.js +67 -17
  35. package/dist/cjs/renderWithIntl.js +22 -0
  36. package/dist/cjs/smart-card-state.js +108 -0
  37. package/dist/cjs/story-styles.js +2 -2
  38. package/dist/cjs/styled.js +2 -2
  39. package/dist/cjs/userAuthProvider.js +1 -1
  40. package/dist/cjs/utils/index.js +1 -1
  41. package/dist/cjs/utils/logging.js +1 -1
  42. package/dist/cjs/utils/mockData.js +1 -1
  43. package/dist/cjs/version.json +1 -1
  44. package/dist/cjs/waitUntil.js +1 -1
  45. package/dist/es2019/I18nWrapper.js +3 -16
  46. package/dist/es2019/fakeMediaClient.js +1 -0
  47. package/dist/es2019/featureFlagsWrapper/dropdown.js +2 -2
  48. package/dist/es2019/fileStateFactory/createFileState.js +78 -0
  49. package/dist/es2019/fileStateFactory/factory.js +87 -0
  50. package/dist/es2019/fileStateFactory/helpers.js +86 -0
  51. package/dist/es2019/fileStateFactory/index.js +3 -0
  52. package/dist/es2019/index.js +4 -3
  53. package/dist/es2019/mediaClientErrors.js +3 -2
  54. package/dist/es2019/mocks/fileAndDirectoriesUtils.js +6 -3
  55. package/dist/es2019/mountWithIntlContext.js +46 -13
  56. package/dist/es2019/renderWithIntl.js +8 -0
  57. package/dist/es2019/smart-card-state.js +100 -0
  58. package/dist/es2019/story-styles.js +1 -1
  59. package/dist/es2019/styled.js +1 -1
  60. package/dist/es2019/version.json +1 -1
  61. package/dist/esm/I18nWrapper.js +3 -18
  62. package/dist/esm/MockGlobalImage.js +2 -1
  63. package/dist/esm/clipboardEventMocks.js +1 -1
  64. package/dist/esm/example-mediaFeatureFlags.js +2 -2
  65. package/dist/esm/fakeMediaClient.js +1 -0
  66. package/dist/esm/featureFlagsWrapper/dropdown.js +2 -2
  67. package/dist/esm/featureFlagsWrapper/helpers.js +2 -2
  68. package/dist/esm/fileReader.js +4 -3
  69. package/dist/esm/fileStateFactory/createFileState.js +80 -0
  70. package/dist/esm/fileStateFactory/factory.js +161 -0
  71. package/dist/esm/fileStateFactory/helpers.js +96 -0
  72. package/dist/esm/fileStateFactory/index.js +3 -0
  73. package/dist/esm/index.js +4 -3
  74. package/dist/esm/keyboardEventWithKeyCode.js +4 -3
  75. package/dist/esm/mediaClientErrors.js +6 -3
  76. package/dist/esm/mediaPickerMocks.js +2 -2
  77. package/dist/esm/mockData/index.js +3 -2
  78. package/dist/esm/mockLoadImage.js +2 -2
  79. package/dist/esm/mocks/fileAndDirectoriesUtils.js +41 -35
  80. package/dist/esm/mocks/routers/api-router.js +2 -2
  81. package/dist/esm/mocks/websockets/remote-upload-server.js +4 -2
  82. package/dist/esm/mountWithIntlContext.js +58 -16
  83. package/dist/esm/renderWithIntl.js +8 -0
  84. package/dist/esm/smart-card-state.js +100 -0
  85. package/dist/esm/story-styles.js +1 -1
  86. package/dist/esm/styled.js +1 -1
  87. package/dist/esm/version.json +1 -1
  88. package/dist/types/featureFlagsWrapper/dropdown.d.ts +1 -0
  89. package/dist/types/featureFlagsWrapper/helpers.d.ts +1 -1
  90. package/dist/types/fileStateFactory/createFileState.d.ts +10 -0
  91. package/dist/types/fileStateFactory/factory.d.ts +42 -0
  92. package/dist/types/fileStateFactory/helpers.d.ts +7 -0
  93. package/dist/types/fileStateFactory/index.d.ts +4 -0
  94. package/dist/types/index.d.ts +4 -2
  95. package/dist/types/mediaClientErrors.d.ts +2 -1
  96. package/dist/types/mountWithIntlContext.d.ts +12 -3
  97. package/dist/types/renderWithIntl.d.ts +3 -0
  98. package/dist/types/smart-card-state.d.ts +2 -0
  99. package/dist/types/story-styles.d.ts +2 -2
  100. package/dist/types/styled.d.ts +1 -1
  101. package/package.json +13 -11
  102. package/renderWithIntl/package.json +7 -0
  103. package/smart-card-state/package.json +7 -0
@@ -1,2 +1,2 @@
1
1
  /// <reference types="react" />
2
- export declare const LocaleSelectorWrapper: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
2
+ export declare const LocaleSelectorWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "id" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css">, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-test-helpers",
3
- "version": "28.8.1",
3
+ "version": "29.1.0",
4
4
  "description": "Collection of test helpers used in media component stories and specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -21,32 +21,32 @@
21
21
  "dependencies": {
22
22
  "@atlaskit/button": "^16.0.0",
23
23
  "@atlaskit/checkbox": "^12.2.0",
24
- "@atlaskit/icon": "^21.9.0",
24
+ "@atlaskit/icon": "^21.10.0",
25
25
  "@atlaskit/locale": "^2.1.0",
26
26
  "@atlaskit/media-client": "^14.3.0",
27
- "@atlaskit/media-common": "^2.9.0",
27
+ "@atlaskit/media-common": "^2.10.0",
28
28
  "@atlaskit/media-core": "^32.2.0",
29
- "@atlaskit/media-picker": "^58.1.0",
30
- "@atlaskit/media-ui": "^17.1.0",
31
- "@atlaskit/popup": "^1.1.0",
29
+ "@atlaskit/media-picker": "^59.0.0",
30
+ "@atlaskit/media-ui": "^19.0.0",
31
+ "@atlaskit/popup": "^1.3.0",
32
32
  "@atlaskit/textfield": "^5.0.1",
33
33
  "@atlaskit/tooltip": "^17.5.0",
34
34
  "@babel/runtime": "^7.0.0",
35
+ "@emotion/styled": "^10.0.7",
36
+ "@testing-library/react": "^8.0.1",
35
37
  "enzyme": "^3.10.0",
36
38
  "exenv": "^1.2.2",
37
39
  "kakapo": "^4.0.6",
38
- "lodash": "^4.17.15",
40
+ "lodash": "^4.17.21",
39
41
  "mock-socket": "^9.0.3",
40
- "react-intl": "^2.6.0",
42
+ "react-intl-next": "npm:react-intl@^5.18.1",
41
43
  "react-redux": "^5.1.2",
42
- "styled-components": "^3.2.6",
43
44
  "uuid": "^3.1.0",
44
45
  "xhr-mock": "^2.4.0"
45
46
  },
46
47
  "peerDependencies": {
47
48
  "react": "^16.8.0",
48
- "rxjs": "^5.5.0",
49
- "styled-components": "^3.2.6"
49
+ "rxjs": "^5.5.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
@@ -55,6 +55,8 @@
55
55
  "typescript": "3.9.6"
56
56
  },
57
57
  "af:exports": {
58
+ "./renderWithIntl": "./src/renderWithIntl.tsx",
59
+ "./smart-card-state": "./src/smart-card-state.ts",
58
60
  "./fakeMediaClient": "./src/fakeMediaClient.ts",
59
61
  "./media-mock": "./src/mocks/media-mock.ts",
60
62
  "./images": "./src/images.tsx",
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@atlaskit/media-test-helpers/renderWithIntl",
3
+ "main": "../dist/cjs/renderWithIntl.js",
4
+ "module": "../dist/esm/renderWithIntl.js",
5
+ "module:es2019": "../dist/es2019/renderWithIntl.js",
6
+ "types": "../dist/types/renderWithIntl.d.ts"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@atlaskit/media-test-helpers/smart-card-state",
3
+ "main": "../dist/cjs/smart-card-state.js",
4
+ "module": "../dist/esm/smart-card-state.js",
5
+ "module:es2019": "../dist/es2019/smart-card-state.js",
6
+ "types": "../dist/types/smart-card-state.d.ts"
7
+ }