@atlaskit/modal-dialog 14.10.5 → 14.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/modal-dialog
2
2
 
3
+ ## 14.11.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 14.11.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`ef58c5c05a8fe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef58c5c05a8fe) -
14
+ Clean up flag to ensure `autoFocus` is never off in preparation for removing the boolean
15
+ `autoFocus` option.
16
+
3
17
  ## 14.10.5
4
18
 
5
19
  ### Patch Changes
@@ -61,7 +61,11 @@ export function getJSXAttributesByName(
61
61
  });
62
62
  }
63
63
 
64
- export function hasImportDeclaration(j: core.JSCodeshift, source: any, importPath: string): boolean {
64
+ export function hasImportDeclaration(
65
+ j: core.JSCodeshift,
66
+ source: any,
67
+ importPath: string,
68
+ ): boolean {
65
69
  const imports = source
66
70
  .find(j.ImportDeclaration)
67
71
  .filter(
@@ -223,7 +227,12 @@ export function addToImport({
223
227
  });
224
228
  }
225
229
 
226
- export const createRenameFuncFor: (component: string, importName: string, from: string, to: string) => (j: core.JSCodeshift, source: Collection<Node>) => void =
230
+ export const createRenameFuncFor: (
231
+ component: string,
232
+ importName: string,
233
+ from: string,
234
+ to: string,
235
+ ) => (j: core.JSCodeshift, source: Collection<Node>) => void =
227
236
  (component: string, importName: string, from: string, to: string) =>
228
237
  (j: core.JSCodeshift, source: Collection<Node>) => {
229
238
  const specifier = getNamedSpecifier(j, source, component, importName);
@@ -253,7 +262,12 @@ export const createRenameFuncFor: (component: string, importName: string, from:
253
262
  }
254
263
  };
255
264
 
256
- export const createRemoveFuncIfBooleanFor: (component: string, importName: string, prop: string, comment?: string) => (j: core.JSCodeshift, source: Collection<Node>) => void =
265
+ export const createRemoveFuncIfBooleanFor: (
266
+ component: string,
267
+ importName: string,
268
+ prop: string,
269
+ comment?: string,
270
+ ) => (j: core.JSCodeshift, source: Collection<Node>) => void =
257
271
  (component: string, importName: string, prop: string, comment?: string) =>
258
272
  (j: core.JSCodeshift, source: Collection<Node>) => {
259
273
  const specifier =
@@ -280,11 +294,16 @@ export const createRemoveFuncIfBooleanFor: (component: string, importName: strin
280
294
  });
281
295
  };
282
296
 
283
- export const createRenameImportFor: ({ componentName, newComponentName, oldPackagePath, newPackagePath, }: {
284
- componentName: string;
285
- newComponentName?: string;
286
- oldPackagePath: string;
287
- newPackagePath: string;
297
+ export const createRenameImportFor: ({
298
+ componentName,
299
+ newComponentName,
300
+ oldPackagePath,
301
+ newPackagePath,
302
+ }: {
303
+ componentName: string;
304
+ newComponentName?: string;
305
+ oldPackagePath: string;
306
+ newPackagePath: string;
288
307
  }) => (j: core.JSCodeshift, source: Collection<Node>) => void =
289
308
  ({
290
309
  componentName,
@@ -366,10 +385,14 @@ export const createRenameImportFor: ({ componentName, newComponentName, oldPacka
366
385
  .remove();
367
386
  };
368
387
 
369
- export const createRemoveImportsFor: ({ importsToRemove, packagePath, comment, }: {
370
- importsToRemove: string[];
371
- packagePath: string;
372
- comment: string;
388
+ export const createRemoveImportsFor: ({
389
+ importsToRemove,
390
+ packagePath,
391
+ comment,
392
+ }: {
393
+ importsToRemove: string[];
394
+ packagePath: string;
395
+ comment: string;
373
396
  }) => (j: core.JSCodeshift, source: Collection<Node>) => void =
374
397
  ({
375
398
  importsToRemove,
@@ -440,9 +463,12 @@ export const createRemoveImportsFor: ({ importsToRemove, packagePath, comment, }
440
463
  }
441
464
  };
442
465
 
443
- export const createTransformer: (component: string, migrates: {
444
- (j: core.JSCodeshift, source: Collection<Node>): void;
445
- }[]) => (fileInfo: FileInfo, api: API, options: Options) => string =
466
+ export const createTransformer: (
467
+ component: string,
468
+ migrates: {
469
+ (j: core.JSCodeshift, source: Collection<Node>): void;
470
+ }[],
471
+ ) => (fileInfo: FileInfo, api: API, options: Options) => string =
446
472
  (component: string, migrates: { (j: core.JSCodeshift, source: Collection<Node>): void }[]) =>
447
473
  (fileInfo: FileInfo, { jscodeshift: j }: API, options: Options) => {
448
474
  const source: Collection<Node> = j(fileInfo.source);
@@ -60,7 +60,8 @@ var ModalDialog = function ModalDialog(props) {
60
60
  var defaultTestId = testId || 'modal-dialog';
61
61
  // https://product-fabric.atlassian.net/browse/DSP-24307
62
62
  // If flag and falsy, use true instead.
63
- var autoFocus = !providedAutoFocus && (0, _platformFeatureFlags.fg)('platform_dst_autofocus-never-false') ? true : providedAutoFocus;
63
+ // When we remove boolean `autoFocus`, we won't have to worry about this
64
+ var autoFocus = !providedAutoFocus ? true : providedAutoFocus;
64
65
  (0, _react.useEffect)(function () {
65
66
  // Modal dialogs can appear on top of iframe elements that are on another domain.
66
67
  // There is a Chrome bug where drag and drop in an element on top of a cross domain
@@ -88,7 +88,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
88
88
  action: 'closed',
89
89
  componentName: 'modalDialog',
90
90
  packageName: "@atlaskit/modal-dialog",
91
- packageVersion: "14.10.4"
91
+ packageVersion: "14.11.0"
92
92
  });
93
93
  var onBlanketClicked = (0, _react.useCallback)(function (e) {
94
94
  if (shouldCloseOnOverlayClick) {
@@ -48,7 +48,8 @@ const ModalDialog = props => {
48
48
  const defaultTestId = testId || 'modal-dialog';
49
49
  // https://product-fabric.atlassian.net/browse/DSP-24307
50
50
  // If flag and falsy, use true instead.
51
- const autoFocus = !providedAutoFocus && fg('platform_dst_autofocus-never-false') ? true : providedAutoFocus;
51
+ // When we remove boolean `autoFocus`, we won't have to worry about this
52
+ const autoFocus = !providedAutoFocus ? true : providedAutoFocus;
52
53
  useEffect(() => {
53
54
  // Modal dialogs can appear on top of iframe elements that are on another domain.
54
55
  // There is a Chrome bug where drag and drop in an element on top of a cross domain
@@ -75,7 +75,7 @@ const InternalModalWrapper = props => {
75
75
  action: 'closed',
76
76
  componentName: 'modalDialog',
77
77
  packageName: "@atlaskit/modal-dialog",
78
- packageVersion: "14.10.4"
78
+ packageVersion: "14.11.0"
79
79
  });
80
80
  const onBlanketClicked = useCallback(e => {
81
81
  if (shouldCloseOnOverlayClick) {
@@ -51,7 +51,8 @@ var ModalDialog = function ModalDialog(props) {
51
51
  var defaultTestId = testId || 'modal-dialog';
52
52
  // https://product-fabric.atlassian.net/browse/DSP-24307
53
53
  // If flag and falsy, use true instead.
54
- var autoFocus = !providedAutoFocus && fg('platform_dst_autofocus-never-false') ? true : providedAutoFocus;
54
+ // When we remove boolean `autoFocus`, we won't have to worry about this
55
+ var autoFocus = !providedAutoFocus ? true : providedAutoFocus;
55
56
  useEffect(function () {
56
57
  // Modal dialogs can appear on top of iframe elements that are on another domain.
57
58
  // There is a Chrome bug where drag and drop in an element on top of a cross domain
@@ -79,7 +79,7 @@ var InternalModalWrapper = function InternalModalWrapper(props) {
79
79
  action: 'closed',
80
80
  componentName: 'modalDialog',
81
81
  packageName: "@atlaskit/modal-dialog",
82
- packageVersion: "14.10.4"
82
+ packageVersion: "14.11.0"
83
83
  });
84
84
  var onBlanketClicked = useCallback(function (e) {
85
85
  if (shouldCloseOnOverlayClick) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "14.10.5",
3
+ "version": "14.11.1",
4
4
  "description": "A modal dialog displays content that requires user interaction, in a layer above the page.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/button": "^23.9.0",
33
33
  "@atlaskit/css": "^0.19.0",
34
34
  "@atlaskit/ds-lib": "^5.3.0",
35
- "@atlaskit/icon": "^31.0.0",
35
+ "@atlaskit/icon": "^32.0.0",
36
36
  "@atlaskit/layering": "^3.6.0",
37
37
  "@atlaskit/motion": "^5.3.0",
38
38
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -55,14 +55,14 @@
55
55
  "@af/accessibility-testing": "workspace:^",
56
56
  "@af/integration-testing": "workspace:^",
57
57
  "@af/visual-regression": "workspace:^",
58
- "@atlaskit/avatar": "^25.7.0",
58
+ "@atlaskit/avatar": "^25.8.0",
59
59
  "@atlaskit/avatar-group": "^12.4.0",
60
60
  "@atlaskit/banner": "^14.0.0",
61
61
  "@atlaskit/breadcrumbs": "^15.3.0",
62
62
  "@atlaskit/checkbox": "^17.3.0",
63
63
  "@atlaskit/code": "^17.4.0",
64
64
  "@atlaskit/datetime-picker": "^17.5.0",
65
- "@atlaskit/docs": "^11.3.0",
65
+ "@atlaskit/docs": "^11.4.0",
66
66
  "@atlaskit/dropdown-menu": "^16.4.0",
67
67
  "@atlaskit/flag": "^17.8.0",
68
68
  "@atlaskit/form": "^15.3.0",
@@ -124,9 +124,6 @@
124
124
  "platform_modal-dialog-heading-icon-a11y-fix": {
125
125
  "type": "boolean"
126
126
  },
127
- "platform_dst_autofocus-never-false": {
128
- "type": "boolean"
129
- },
130
127
  "platform-dst-shape-theme-default": {
131
128
  "type": "boolean"
132
129
  }