@atlaskit/dropdown-menu 12.26.1 → 12.26.3
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 +14 -0
- package/dist/types/checkbox/dropdown-item-checkbox-group.d.ts +2 -2
- package/dist/types/checkbox/dropdown-item-checkbox.d.ts +2 -2
- package/dist/types/dropdown-menu.d.ts +2 -2
- package/dist/types/internal/components/checkbox-icon.d.ts +2 -2
- package/dist/types/internal/components/group-title.d.ts +2 -2
- package/dist/types/internal/components/radio-icon.d.ts +2 -2
- package/dist/types/internal/context/selection-store.d.ts +1 -1
- package/dist/types/radio/dropdown-item-radio-group.d.ts +1 -1
- package/dist/types/radio/dropdown-item-radio.d.ts +2 -2
- package/dist/types-ts4.5/checkbox/dropdown-item-checkbox-group.d.ts +2 -2
- package/dist/types-ts4.5/checkbox/dropdown-item-checkbox.d.ts +2 -2
- package/dist/types-ts4.5/dropdown-menu.d.ts +2 -2
- package/dist/types-ts4.5/internal/components/checkbox-icon.d.ts +2 -2
- package/dist/types-ts4.5/internal/components/group-title.d.ts +2 -2
- package/dist/types-ts4.5/internal/components/radio-icon.d.ts +2 -2
- package/dist/types-ts4.5/internal/context/selection-store.d.ts +1 -1
- package/dist/types-ts4.5/radio/dropdown-item-radio-group.d.ts +1 -1
- package/dist/types-ts4.5/radio/dropdown-item-radio.d.ts +2 -2
- package/package.json +5 -6
- package/codemods/11.0.0-lite-mode.tsx +0 -51
- package/codemods/__tests__/11.0.0-lite-mode.test.tsx +0 -68
- package/codemods/__tests__/convert-position.test.tsx +0 -88
- package/codemods/__tests__/convert-triggerType.test.tsx +0 -183
- package/codemods/__tests__/deprecate-items.test.tsx +0 -108
- package/codemods/__tests__/deprecate-onItemActivated.test.tsx +0 -108
- package/codemods/__tests__/deprecate-onPositioned.test.tsx +0 -108
- package/codemods/__tests__/deprecate-shouldFitContainer.tsx +0 -108
- package/codemods/__tests__/rename-imports.tsx +0 -130
- package/codemods/__tests__/replace-position-to-placement.test.tsx +0 -84
- package/codemods/__tests__/replace-shouldAllowMultipleLine.test.tsx +0 -122
- package/codemods/__tests__/update-component-callsites.tsx +0 -64
- package/codemods/migrates/convert-trigger-type.tsx +0 -52
- package/codemods/migrates/deprecate-autoFocus.tsx +0 -10
- package/codemods/migrates/deprecate-boundariesElement.tsx +0 -9
- package/codemods/migrates/deprecate-isCompact.tsx +0 -10
- package/codemods/migrates/deprecate-isHidden.tsx +0 -10
- package/codemods/migrates/deprecate-isMenuFixed.tsx +0 -6
- package/codemods/migrates/deprecate-items.tsx +0 -6
- package/codemods/migrates/deprecate-onItemActivated.tsx +0 -9
- package/codemods/migrates/deprecate-onPositioned.tsx +0 -9
- package/codemods/migrates/deprecate-shouldFitContainer.tsx +0 -9
- package/codemods/migrates/rename-imports.tsx +0 -22
- package/codemods/migrates/replace-position-to-placement.tsx +0 -27
- package/codemods/migrates/replace-shouldAllowMultiline.tsx +0 -33
- package/codemods/migrates/update-component-callsites.tsx +0 -13
- package/codemods/utils/convert-position.tsx +0 -24
- package/codemods/utils/create-rename-import.tsx +0 -39
- package/codemods/utils/create-update-callsite.tsx +0 -31
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type core from 'jscodeshift';
|
|
2
|
-
import { type Collection } from 'jscodeshift/src/Collection';
|
|
3
|
-
|
|
4
|
-
export const createRenameImportFor =
|
|
5
|
-
({
|
|
6
|
-
componentName,
|
|
7
|
-
newComponentName,
|
|
8
|
-
packagePath,
|
|
9
|
-
isDefaultImport,
|
|
10
|
-
}: {
|
|
11
|
-
componentName: string;
|
|
12
|
-
newComponentName: string;
|
|
13
|
-
packagePath: string;
|
|
14
|
-
isDefaultImport: boolean;
|
|
15
|
-
}) =>
|
|
16
|
-
(j: core.JSCodeshift, source: Collection<Node>) => {
|
|
17
|
-
source
|
|
18
|
-
.find(j.ImportDeclaration)
|
|
19
|
-
.filter((path) => path.node.source.value === packagePath)
|
|
20
|
-
.find(j.ImportSpecifier)
|
|
21
|
-
.filter((path) => path.node.imported.name === componentName)
|
|
22
|
-
.replaceWith((importSpecifier) => {
|
|
23
|
-
const specifier = j.identifier(newComponentName);
|
|
24
|
-
|
|
25
|
-
let importAlias;
|
|
26
|
-
if (importSpecifier && importSpecifier.node && importSpecifier.node.local) {
|
|
27
|
-
importAlias =
|
|
28
|
-
importSpecifier.node.local.name !== importSpecifier.node.imported.name
|
|
29
|
-
? j.identifier(importSpecifier.node.local.name)
|
|
30
|
-
: null;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return isDefaultImport
|
|
34
|
-
? j.importDefaultSpecifier(importAlias || specifier)
|
|
35
|
-
: j.importSpecifier(specifier, importAlias);
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
return source.toSource();
|
|
39
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type core from 'jscodeshift';
|
|
2
|
-
import { type Collection } from 'jscodeshift/src/Collection';
|
|
3
|
-
|
|
4
|
-
export const createUpdateCallsite =
|
|
5
|
-
({
|
|
6
|
-
componentName,
|
|
7
|
-
newComponentName,
|
|
8
|
-
packagePath,
|
|
9
|
-
}: {
|
|
10
|
-
componentName: string;
|
|
11
|
-
newComponentName: string;
|
|
12
|
-
packagePath: string;
|
|
13
|
-
}) =>
|
|
14
|
-
(j: core.JSCodeshift, source: Collection<Node>) => {
|
|
15
|
-
source
|
|
16
|
-
.find(j.JSXElement)
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
.filter((path) => path.node.openingElement.name.name === componentName)
|
|
19
|
-
.replaceWith((element) => {
|
|
20
|
-
const elementName = j.jsxIdentifier(newComponentName);
|
|
21
|
-
const newComponent = j.jsxElement(
|
|
22
|
-
j.jsxOpeningElement(elementName, element.node.openingElement.attributes),
|
|
23
|
-
j.jsxClosingElement(elementName),
|
|
24
|
-
element.node.children,
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
return newComponent;
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
return source.toSource();
|
|
31
|
-
};
|