@mui/codemod 5.10.12 → 5.10.16
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/node/util/getJSExports.js +0 -6
- package/node/util/memoize.js +0 -4
- package/node/util/propsToObject.js +0 -6
- package/node/util/readFile.js +0 -6
- package/node/util/renameClassKey.js +0 -2
- package/node/util/renameProps.js +0 -1
- package/node/v0.15.0/import-path.js +0 -6
- package/node/v0.15.0/import-path.test/actual.js +0 -5
- package/node/v0.15.0/import-path.test/expected.js +0 -5
- package/node/v1.0.0/color-imports.js +12 -17
- package/node/v1.0.0/color-imports.test/actual.js +0 -3
- package/node/v1.0.0/color-imports.test/expected.js +0 -9
- package/node/v1.0.0/import-path.js +4 -8
- package/node/v1.0.0/import-path.test/actual.js +0 -28
- package/node/v1.0.0/import-path.test/expected.js +0 -61
- package/node/v1.0.0/menu-item-primary-text.js +0 -2
- package/node/v1.0.0/menu-item-primary-text.test/actual.js +1 -3
- package/node/v1.0.0/menu-item-primary-text.test/expected.js +1 -3
- package/node/v1.0.0/svg-icon-imports.js +6 -7
- package/node/v1.0.0/svg-icon-imports.test/actual.js +0 -4
- package/node/v1.0.0/svg-icon-imports.test/expected.js +0 -4
- package/node/v4.0.0/optimal-imports.js +0 -26
- package/node/v4.0.0/optimal-imports.test/actual.js +0 -64
- package/node/v4.0.0/optimal-imports.test/expected.js +0 -62
- package/node/v4.0.0/theme-spacing-api.js +7 -19
- package/node/v4.0.0/theme-spacing-api.test/actual.js +0 -11
- package/node/v4.0.0/theme-spacing-api.test/actual_destructured.js +0 -9
- package/node/v4.0.0/theme-spacing-api.test/expected.js +0 -11
- package/node/v4.0.0/theme-spacing-api.test/expected_destructured.js +0 -9
- package/node/v4.0.0/top-level-imports.js +2 -22
- package/node/v4.0.0/top-level-imports.test/actual.js +0 -58
- package/node/v4.0.0/top-level-imports.test/expected.js +0 -3
- package/node/v5.0.0/adapter-v4.js +3 -11
- package/node/v5.0.0/adapter-v4.test/actual.js +0 -1
- package/node/v5.0.0/adapter-v4.test/core-import.actual.js +0 -2
- package/node/v5.0.0/adapter-v4.test/core-import.expected.js +0 -2
- package/node/v5.0.0/adapter-v4.test/expected.js +0 -1
- package/node/v5.0.0/adapter-v4.test/no-styles-import.actual.js +0 -2
- package/node/v5.0.0/adapter-v4.test/no-styles-import.expected.js +0 -3
- package/node/v5.0.0/autocomplete-rename-closeicon.js +0 -3
- package/node/v5.0.0/autocomplete-rename-closeicon.test/actual.js +1 -3
- package/node/v5.0.0/autocomplete-rename-closeicon.test/expected.js +1 -3
- package/node/v5.0.0/autocomplete-rename-option.js +0 -3
- package/node/v5.0.0/autocomplete-rename-option.test/actual.js +1 -3
- package/node/v5.0.0/autocomplete-rename-option.test/expected.js +1 -3
- package/node/v5.0.0/avatar-circle-circular.js +0 -4
- package/node/v5.0.0/avatar-circle-circular.test/actual.js +1 -3
- package/node/v5.0.0/avatar-circle-circular.test/expected.js +1 -3
- package/node/v5.0.0/badge-overlap-value.js +0 -6
- package/node/v5.0.0/badge-overlap-value.test/actual.js +1 -5
- package/node/v5.0.0/badge-overlap-value.test/expected.js +1 -5
- package/node/v5.0.0/base-rename-components-to-slots.js +1 -11
- package/node/v5.0.0/base-rename-components-to-slots.test/actual.js +3 -9
- package/node/v5.0.0/base-rename-components-to-slots.test/expected.js +3 -9
- package/node/v5.0.0/box-borderradius-values.js +2 -2
- package/node/v5.0.0/box-borderradius-values.test/actual.js +1 -3
- package/node/v5.0.0/box-borderradius-values.test/expected.js +1 -3
- package/node/v5.0.0/box-rename-css.js +0 -3
- package/node/v5.0.0/box-rename-css.test/actual.js +1 -3
- package/node/v5.0.0/box-rename-css.test/expected.js +1 -3
- package/node/v5.0.0/box-rename-gap.js +0 -3
- package/node/v5.0.0/box-rename-gap.test/actual.js +1 -3
- package/node/v5.0.0/box-rename-gap.test/expected.js +1 -3
- package/node/v5.0.0/box-sx-prop.js +1 -5
- package/node/v5.0.0/box-sx-prop.test/actual.js +0 -10
- package/node/v5.0.0/box-sx-prop.test/alias-actual.js +0 -5
- package/node/v5.0.0/box-sx-prop.test/alias-expected.js +0 -4
- package/node/v5.0.0/box-sx-prop.test/expected.js +0 -10
- package/node/v5.0.0/button-color-prop.js +0 -2
- package/node/v5.0.0/button-color-prop.test/actual.js +1 -3
- package/node/v5.0.0/button-color-prop.test/expected.js +1 -3
- package/node/v5.0.0/chip-variant-prop.js +0 -2
- package/node/v5.0.0/chip-variant-prop.test/actual.js +1 -3
- package/node/v5.0.0/chip-variant-prop.test/expected.js +1 -3
- package/node/v5.0.0/circularprogress-variant.js +0 -4
- package/node/v5.0.0/circularprogress-variant.test/actual.js +1 -3
- package/node/v5.0.0/circularprogress-variant.test/expected.js +1 -3
- package/node/v5.0.0/collapse-rename-collapsedheight.js +0 -4
- package/node/v5.0.0/collapse-rename-collapsedheight.test/actual.js +1 -3
- package/node/v5.0.0/collapse-rename-collapsedheight.test/expected.js +1 -3
- package/node/v5.0.0/component-rename-prop.js +0 -3
- package/node/v5.0.0/component-rename-prop.test/actual.js +1 -3
- package/node/v5.0.0/component-rename-prop.test/expected.js +1 -3
- package/node/v5.0.0/core-styles-import.js +0 -3
- package/node/v5.0.0/core-styles-import.test/actual.js +0 -4
- package/node/v5.0.0/create-theme.js +0 -5
- package/node/v5.0.0/create-theme.test/actual.js +0 -2
- package/node/v5.0.0/create-theme.test/core-import.actual.js +0 -1
- package/node/v5.0.0/create-theme.test/core-import.expected.js +0 -1
- package/node/v5.0.0/create-theme.test/custom-fn.actual.js +0 -6
- package/node/v5.0.0/create-theme.test/custom-fn.expected.js +0 -6
- package/node/v5.0.0/create-theme.test/expected.js +0 -2
- package/node/v5.0.0/date-pickers-moved-to-x.js +1 -10
- package/node/v5.0.0/date-pickers-moved-to-x.test/actual-sub-module.js +0 -31
- package/node/v5.0.0/date-pickers-moved-to-x.test/expected-root-community.js +0 -1
- package/node/v5.0.0/date-pickers-moved-to-x.test/expected-root-pro.js +0 -1
- package/node/v5.0.0/date-pickers-moved-to-x.test/expected-sub-module.js +0 -29
- package/node/v5.0.0/dialog-props.js +0 -1
- package/node/v5.0.0/dialog-props.test/actual.js +1 -3
- package/node/v5.0.0/dialog-props.test/expected.js +1 -3
- package/node/v5.0.0/dialog-title-props.js +0 -1
- package/node/v5.0.0/dialog-title-props.test/actual.js +1 -3
- package/node/v5.0.0/dialog-title-props.test/expected.js +1 -3
- package/node/v5.0.0/emotion-prepend-cache.js +0 -3
- package/node/v5.0.0/emotion-prepend-cache.test/custom-naming.actual.js +0 -2
- package/node/v5.0.0/emotion-prepend-cache.test/custom-naming.expected.js +0 -2
- package/node/v5.0.0/emotion-prepend-cache.test/default-naming.actual.js +0 -2
- package/node/v5.0.0/emotion-prepend-cache.test/default-naming.expected.js +0 -2
- package/node/v5.0.0/emotion-prepend-cache.test/replace-existing-prepend.actual.js +0 -2
- package/node/v5.0.0/emotion-prepend-cache.test/replace-existing-prepend.expected.js +0 -2
- package/node/v5.0.0/expansion-panel-component.js +0 -1
- package/node/v5.0.0/expansion-panel-component.test/actual.js +1 -8
- package/node/v5.0.0/expansion-panel-component.test/expected.js +1 -8
- package/node/v5.0.0/fab-variant.js +0 -4
- package/node/v5.0.0/fab-variant.test/actual.js +1 -3
- package/node/v5.0.0/fab-variant.test/expected.js +1 -3
- package/node/v5.0.0/fade-rename-alpha.js +0 -3
- package/node/v5.0.0/fade-rename-alpha.test/actual.js +0 -2
- package/node/v5.0.0/fade-rename-alpha.test/expected.js +0 -2
- package/node/v5.0.0/grid-justify-justifycontent.js +0 -3
- package/node/v5.0.0/grid-justify-justifycontent.test/actual.js +1 -3
- package/node/v5.0.0/grid-justify-justifycontent.test/expected.js +1 -3
- package/node/v5.0.0/grid-list-component.js +0 -1
- package/node/v5.0.0/grid-list-component.test/actual.js +1 -7
- package/node/v5.0.0/grid-list-component.test/expected.js +1 -7
- package/node/v5.0.0/hidden-down-props.js +0 -3
- package/node/v5.0.0/icon-button-size.js +0 -2
- package/node/v5.0.0/icon-button-size.test/actual.js +1 -3
- package/node/v5.0.0/icon-button-size.test/expected.js +1 -3
- package/node/v5.0.0/jss-to-styled.js +20 -102
- package/node/v5.0.0/jss-to-styled.test/Anonymous.actual.js +0 -9
- package/node/v5.0.0/jss-to-styled.test/Anonymous.expected.js +0 -8
- package/node/v5.0.0/jss-to-styled.test/eighth.actual.js +0 -30
- package/node/v5.0.0/jss-to-styled.test/eighth.expected.js +2 -31
- package/node/v5.0.0/jss-to-styled.test/eleventh.actual.js +0 -7
- package/node/v5.0.0/jss-to-styled.test/eleventh.expected.js +0 -7
- package/node/v5.0.0/jss-to-styled.test/exportClass.actual.js +0 -8
- package/node/v5.0.0/jss-to-styled.test/exportClass.expected.js +0 -10
- package/node/v5.0.0/jss-to-styled.test/exportFunction.actual.js +0 -8
- package/node/v5.0.0/jss-to-styled.test/exportFunction.expected.js +0 -9
- package/node/v5.0.0/jss-to-styled.test/fifth.actual.js +0 -12
- package/node/v5.0.0/jss-to-styled.test/fifth.expected.js +0 -12
- package/node/v5.0.0/jss-to-styled.test/first.actual.js +1 -32
- package/node/v5.0.0/jss-to-styled.test/first.expected.js +1 -32
- package/node/v5.0.0/jss-to-styled.test/fourth.actual.js +0 -11
- package/node/v5.0.0/jss-to-styled.test/fourth.expected.js +0 -12
- package/node/v5.0.0/jss-to-styled.test/multipleWithStyles.actual.js +0 -9
- package/node/v5.0.0/jss-to-styled.test/multipleWithStyles.expected.js +2 -9
- package/node/v5.0.0/jss-to-styled.test/nineth.actual.js +0 -8
- package/node/v5.0.0/jss-to-styled.test/nineth.expected.js +2 -8
- package/node/v5.0.0/jss-to-styled.test/second.actual.js +0 -13
- package/node/v5.0.0/jss-to-styled.test/second.expected.js +0 -13
- package/node/v5.0.0/jss-to-styled.test/seventh.actual.js +3 -27
- package/node/v5.0.0/jss-to-styled.test/seventh.expected.js +3 -26
- package/node/v5.0.0/jss-to-styled.test/sixth.actual.js +2 -23
- package/node/v5.0.0/jss-to-styled.test/sixth.expected.js +2 -22
- package/node/v5.0.0/jss-to-styled.test/tenth.actual.js +0 -6
- package/node/v5.0.0/jss-to-styled.test/tenth.expected.js +2 -7
- package/node/v5.0.0/jss-to-styled.test/third.actual.js +0 -11
- package/node/v5.0.0/jss-to-styled.test/third.expected.js +0 -12
- package/node/v5.0.0/jss-to-styled.test/twelfth.actual.js +0 -7
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.actual.js +0 -11
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.expected.js +0 -10
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.actual.js +0 -12
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.expected.js +0 -10
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.actual.js +0 -12
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.expected.js +0 -10
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.actual.js +0 -11
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.expected.js +0 -10
- package/node/v5.0.0/jss-to-tss-react.js +0 -70
- package/node/v5.0.0/jss-to-tss-react.test/actual-from-material-ui-core-styles.js +1 -8
- package/node/v5.0.0/jss-to-tss-react.test/actual-from-material-ui-core.js +0 -9
- package/node/v5.0.0/jss-to-tss-react.test/actual-from-mui-styles-makeStyles.js +0 -8
- package/node/v5.0.0/jss-to-tss-react.test/actual-from-mui-styles.js +0 -8
- package/node/v5.0.0/jss-to-tss-react.test/actual-mixins-pattern.js +1 -10
- package/node/v5.0.0/jss-to-tss-react.test/actual-todo-comments.js +0 -12
- package/node/v5.0.0/jss-to-tss-react.test/actual-typescript-docs-example-params.js +0 -7
- package/node/v5.0.0/jss-to-tss-react.test/actual-typescript-docs-example.js +0 -10
- package/node/v5.0.0/jss-to-tss-react.test/actual-typescript.js +1 -9
- package/node/v5.0.0/jss-to-tss-react.test/actual-withStyles.js +0 -16
- package/node/v5.0.0/jss-to-tss-react.test/expected-from-material-ui-core-styles.js +1 -8
- package/node/v5.0.0/jss-to-tss-react.test/expected-from-material-ui-core.js +0 -8
- package/node/v5.0.0/jss-to-tss-react.test/expected-from-mui-styles-makeStyles.js +0 -8
- package/node/v5.0.0/jss-to-tss-react.test/expected-from-mui-styles.js +0 -8
- package/node/v5.0.0/jss-to-tss-react.test/expected-mixins-pattern.js +1 -9
- package/node/v5.0.0/jss-to-tss-react.test/expected-todo-comments.js +13 -18
- package/node/v5.0.0/jss-to-tss-react.test/expected-typescript-docs-example-params.js +0 -5
- package/node/v5.0.0/jss-to-tss-react.test/expected-typescript-docs-example.js +0 -8
- package/node/v5.0.0/jss-to-tss-react.test/expected-typescript.js +1 -9
- package/node/v5.0.0/jss-to-tss-react.test/expected-withStyles.js +0 -17
- package/node/v5.0.0/link-underline-hover.js +1 -4
- package/node/v5.0.0/link-underline-hover.test/actual.js +1 -7
- package/node/v5.0.0/link-underline-hover.test/expected.js +1 -7
- package/node/v5.0.0/material-ui-styles.js +7 -11
- package/node/v5.0.0/material-ui-styles.test/core-import.actual.js +0 -1
- package/node/v5.0.0/material-ui-styles.test/core-import.expected.js +0 -12
- package/node/v5.0.0/material-ui-styles.test/expected.js +0 -12
- package/node/v5.0.0/material-ui-styles.test/single-import.expected.js +0 -1
- package/node/v5.0.0/material-ui-styles.test/types-import.actual.js +0 -1
- package/node/v5.0.0/material-ui-styles.test/types-import.expected.js +0 -2
- package/node/v5.0.0/material-ui-types.js +0 -5
- package/node/v5.0.0/modal-props.js +0 -7
- package/node/v5.0.0/modal-props.test/actual.js +1 -3
- package/node/v5.0.0/modal-props.test/expected.js +2 -3
- package/node/v5.0.0/moved-lab-modules.js +1 -4
- package/node/v5.0.0/moved-lab-modules.test/actual.js +0 -3
- package/node/v5.0.0/moved-lab-modules.test/expected.js +0 -3
- package/node/v5.0.0/mui-replace.js +0 -1
- package/node/v5.0.0/mui-replace.test/actual.js +12 -24
- package/node/v5.0.0/mui-replace.test/expected.js +12 -24
- package/node/v5.0.0/optimal-imports.js +0 -28
- package/node/v5.0.0/optimal-imports.test/actual.js +0 -11
- package/node/v5.0.0/optimal-imports.test/expected.js +0 -8
- package/node/v5.0.0/pagination-round-circular.js +0 -5
- package/node/v5.0.0/pagination-round-circular.test/actual.js +1 -3
- package/node/v5.0.0/pagination-round-circular.test/expected.js +1 -3
- package/node/v5.0.0/preset-safe.js +2 -53
- package/node/v5.0.0/preset-safe.test/actual.js +0 -41
- package/node/v5.0.0/preset-safe.test/expected.js +0 -43
- package/node/v5.0.0/root-ref.js +0 -1
- package/node/v5.0.0/root-ref.test/actual.js +1 -4
- package/node/v5.0.0/root-ref.test/expected.js +1 -2
- package/node/v5.0.0/skeleton-variant.js +0 -6
- package/node/v5.0.0/skeleton-variant.test/actual.js +1 -3
- package/node/v5.0.0/skeleton-variant.test/expected.js +1 -3
- package/node/v5.0.0/styled-engine-provider.js +1 -8
- package/node/v5.0.0/styled-engine-provider.test/mui-theme-provider.actual.js +0 -9
- package/node/v5.0.0/styled-engine-provider.test/mui-theme-provider.expected.js +0 -9
- package/node/v5.0.0/styled-engine-provider.test/theme-provider.actual.js +0 -9
- package/node/v5.0.0/styled-engine-provider.test/theme-provider.expected.js +0 -9
- package/node/v5.0.0/table-props.js +0 -6
- package/node/v5.0.0/table-props.test/actual.js +1 -5
- package/node/v5.0.0/table-props.test/expected.js +1 -5
- package/node/v5.0.0/tabs-scroll-buttons.js +0 -4
- package/node/v5.0.0/tabs-scroll-buttons.test/actual.js +1 -3
- package/node/v5.0.0/tabs-scroll-buttons.test/expected.js +1 -3
- package/node/v5.0.0/textarea-minmax-rows.js +0 -3
- package/node/v5.0.0/textarea-minmax-rows.test/actual.js +1 -3
- package/node/v5.0.0/textarea-minmax-rows.test/expected.js +1 -3
- package/node/v5.0.0/theme-augment.js +1 -8
- package/node/v5.0.0/theme-breakpoints-width.js +0 -1
- package/node/v5.0.0/theme-breakpoints.js +1 -3
- package/node/v5.0.0/theme-options.js +0 -1
- package/node/v5.0.0/theme-options.test/actual.js +0 -1
- package/node/v5.0.0/theme-options.test/expected.js +0 -1
- package/node/v5.0.0/theme-palette-mode.js +0 -1
- package/node/v5.0.0/theme-provider.js +0 -4
- package/node/v5.0.0/theme-provider.test/actual.js +0 -3
- package/node/v5.0.0/theme-provider.test/core-import.actual.js +0 -3
- package/node/v5.0.0/theme-provider.test/core-import.expected.js +0 -3
- package/node/v5.0.0/theme-provider.test/expected.js +0 -3
- package/node/v5.0.0/theme-spacing.js +12 -8
- package/node/v5.0.0/theme-spacing.test/actual.js +0 -1
- package/node/v5.0.0/theme-spacing.test/expected.js +0 -2
- package/node/v5.0.0/theme-spacing.test/large-actual.js +5 -56
- package/node/v5.0.0/theme-spacing.test/large-expected.js +5 -56
- package/node/v5.0.0/theme-typography-round.js +0 -1
- package/node/v5.0.0/top-level-imports.js +0 -22
- package/node/v5.0.0/top-level-imports.test/actual.js +0 -60
- package/node/v5.0.0/top-level-imports.test/expected.js +0 -4
- package/node/v5.0.0/transitions.js +0 -6
- package/node/v5.0.0/transitions.test/actual.js +1 -4
- package/node/v5.0.0/transitions.test/expected.js +2 -4
- package/node/v5.0.0/use-autocomplete.js +0 -3
- package/node/v5.0.0/use-autocomplete.test/actual.js +0 -1
- package/node/v5.0.0/use-autocomplete.test/expected.js +0 -3
- package/node/v5.0.0/use-transitionprops.js +1 -4
- package/node/v5.0.0/use-transitionprops.test/actual.js +1 -3
- package/node/v5.0.0/use-transitionprops.test/expected.js +1 -3
- package/node/v5.0.0/variant-prop.js +0 -4
- package/node/v5.0.0/variant-prop.test/actual.js +0 -15
- package/node/v5.0.0/variant-prop.test/expected.js +0 -15
- package/node/v5.0.0/with-mobile-dialog.js +0 -5
- package/node/v5.0.0/with-mobile-dialog.test/actual.js +0 -9
- package/node/v5.0.0/with-mobile-dialog.test/expected.js +2 -11
- package/node/v5.0.0/with-width.js +0 -4
- package/node/v5.0.0/with-width.test/actual.js +0 -9
- package/node/v5.0.0/with-width.test/expected.js +2 -11
- package/package.json +6 -6
|
@@ -1,40 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = TextFieldComponent;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var React = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _TextField4 = _interopRequireDefault(require("@material-ui/core/TextField"));
|
|
15
|
-
|
|
16
11
|
var _Select5 = _interopRequireDefault(require("@material-ui/core/Select"));
|
|
17
|
-
|
|
18
12
|
var _FormControl4 = _interopRequireDefault(require("@material-ui/core/FormControl"));
|
|
19
|
-
|
|
20
13
|
var _TextField5 = _interopRequireDefault(require("@mui/material/TextField"));
|
|
21
|
-
|
|
22
14
|
var _Select6 = _interopRequireDefault(require("@mui/material/Select"));
|
|
23
|
-
|
|
24
15
|
var _material = require("@mui/material");
|
|
25
|
-
|
|
26
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
-
|
|
28
17
|
var _MuiSelect, _TextField, _TextField2, _TextField3, _Select, _Select2, _Select3, _FormControl, _FormControl2, _FormControl3, _CustomSelect, _SelectedRoute, _FromToSelect, _FromToSelectDrawer, _MuiTextField, _Select4, _MuiFormControl;
|
|
29
|
-
|
|
30
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
-
|
|
32
19
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
-
|
|
34
20
|
const Select2 = () => _MuiSelect || (_MuiSelect = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select6.default, {
|
|
35
21
|
variant: "standard"
|
|
36
22
|
}));
|
|
37
|
-
|
|
38
23
|
function TextFieldComponent(props) {
|
|
39
24
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
40
25
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default, (0, _extends2.default)({
|
|
@@ -4,14 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = transformer;
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* @param {import('jscodeshift').FileInfo} file
|
|
10
9
|
* @param {import('jscodeshift').API} api
|
|
11
10
|
*/
|
|
12
11
|
const template = `// FIXME checkout https://mui.com/components/use-media-query/#using-material-uis-breakpoint-helpers
|
|
13
12
|
const withMobileDialog = () => (WrappedComponent) => (props) => <WrappedComponent {...props} width="lg" fullScreen={false} />;`;
|
|
14
|
-
|
|
15
13
|
function transformer(file, api, options) {
|
|
16
14
|
const j = api.jscodeshift;
|
|
17
15
|
const root = j(file.source);
|
|
@@ -31,15 +29,12 @@ function transformer(file, api, options) {
|
|
|
31
29
|
lastImport.insertAfter(template.replace(/withMobileDialog/g, s.local.name));
|
|
32
30
|
});
|
|
33
31
|
node.specifiers = node.specifiers.filter(s => s.imported.name !== 'withMobileDialog');
|
|
34
|
-
|
|
35
32
|
if (!node.specifiers.length) {
|
|
36
33
|
shouldRemoveImport = true;
|
|
37
34
|
}
|
|
38
35
|
});
|
|
39
|
-
|
|
40
36
|
if (shouldRemoveImport) {
|
|
41
37
|
collection.remove();
|
|
42
38
|
}
|
|
43
|
-
|
|
44
39
|
return root.toSource(printOptions);
|
|
45
40
|
}
|
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _withMobileDialog = _interopRequireDefault(require("@material-ui/core/withMobileDialog"));
|
|
11
|
-
|
|
12
9
|
var _core = require("@material-ui/core");
|
|
13
|
-
|
|
14
10
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
15
|
-
|
|
16
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
|
|
18
12
|
const A = (0, _withMobileDialog.default)()(props => {
|
|
19
13
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
20
14
|
children: props.width
|
|
21
15
|
});
|
|
22
16
|
});
|
|
23
|
-
|
|
24
17
|
function MobileDialogComponent(props) {
|
|
25
18
|
const {
|
|
26
19
|
width
|
|
@@ -32,7 +25,5 @@ function MobileDialogComponent(props) {
|
|
|
32
25
|
})
|
|
33
26
|
});
|
|
34
27
|
}
|
|
35
|
-
|
|
36
28
|
var _default = (0, _core.withMobileDialog)()(MobileDialogComponent);
|
|
37
|
-
|
|
38
29
|
exports.default = _default;
|
|
@@ -1,36 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
13
|
-
|
|
14
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
|
|
16
11
|
// FIXME checkout https://mui.com/components/use-media-query/#using-material-uis-breakpoint-helpers
|
|
17
12
|
const withMuiMobileDialog = () => WrappedComponent => props => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent, (0, _extends2.default)({}, props, {
|
|
18
13
|
width: "lg",
|
|
19
14
|
fullScreen: false
|
|
20
|
-
}));
|
|
21
|
-
|
|
15
|
+
}));
|
|
22
16
|
|
|
17
|
+
// FIXME checkout https://mui.com/components/use-media-query/#using-material-uis-breakpoint-helpers
|
|
23
18
|
const withMobileDialog = () => WrappedComponent => props => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent, (0, _extends2.default)({}, props, {
|
|
24
19
|
width: "lg",
|
|
25
20
|
fullScreen: false
|
|
26
21
|
}));
|
|
27
|
-
|
|
28
22
|
const A = withMobileDialog()(props => {
|
|
29
23
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
30
24
|
children: props.width
|
|
31
25
|
});
|
|
32
26
|
});
|
|
33
|
-
|
|
34
27
|
function MobileDialogComponent(props) {
|
|
35
28
|
const {
|
|
36
29
|
width
|
|
@@ -42,7 +35,5 @@ function MobileDialogComponent(props) {
|
|
|
42
35
|
})
|
|
43
36
|
});
|
|
44
37
|
}
|
|
45
|
-
|
|
46
38
|
var _default = withMuiMobileDialog()(MobileDialogComponent);
|
|
47
|
-
|
|
48
39
|
exports.default = _default;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = transformer;
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* @param {import('jscodeshift').FileInfo} file
|
|
10
9
|
* @param {import('jscodeshift').API} api
|
|
@@ -28,15 +27,12 @@ function transformer(file, api, options) {
|
|
|
28
27
|
lastImport.insertAfter('// FIXME checkout https://mui.com/components/use-media-query/#migrating-from-withwidth\nconst withWidth = () => (WrappedComponent) => (props) => <WrappedComponent {...props} width="xs" />;'.replace(/withWidth/g, s.local.name));
|
|
29
28
|
});
|
|
30
29
|
node.specifiers = node.specifiers.filter(s => s.imported.name !== 'withWidth');
|
|
31
|
-
|
|
32
30
|
if (!node.specifiers.length) {
|
|
33
31
|
shouldRemoveImport = true;
|
|
34
32
|
}
|
|
35
33
|
});
|
|
36
|
-
|
|
37
34
|
if (shouldRemoveImport) {
|
|
38
35
|
collection.remove();
|
|
39
36
|
}
|
|
40
|
-
|
|
41
37
|
return root.toSource(printOptions);
|
|
42
38
|
}
|
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _withWidth = _interopRequireDefault(require("@material-ui/core/withWidth"));
|
|
11
|
-
|
|
12
9
|
var _core = require("@material-ui/core");
|
|
13
|
-
|
|
14
10
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
15
|
-
|
|
16
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
|
|
18
12
|
const A = (0, _withWidth.default)()(props => {
|
|
19
13
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
20
14
|
children: props.width
|
|
21
15
|
});
|
|
22
16
|
});
|
|
23
|
-
|
|
24
17
|
function WithWidthComponent(props) {
|
|
25
18
|
const {
|
|
26
19
|
width
|
|
@@ -32,7 +25,5 @@ function WithWidthComponent(props) {
|
|
|
32
25
|
})
|
|
33
26
|
});
|
|
34
27
|
}
|
|
35
|
-
|
|
36
28
|
var _default = (0, _core.withWidth)()(WithWidth);
|
|
37
|
-
|
|
38
29
|
exports.default = _default;
|
|
@@ -1,34 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
13
|
-
|
|
14
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
|
|
16
11
|
// FIXME checkout https://mui.com/components/use-media-query/#migrating-from-withwidth
|
|
17
12
|
const withMuiWidth = () => WrappedComponent => props => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent, (0, _extends2.default)({}, props, {
|
|
18
13
|
width: "xs"
|
|
19
|
-
}));
|
|
20
|
-
|
|
14
|
+
}));
|
|
21
15
|
|
|
16
|
+
// FIXME checkout https://mui.com/components/use-media-query/#migrating-from-withwidth
|
|
22
17
|
const withWidth = () => WrappedComponent => props => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent, (0, _extends2.default)({}, props, {
|
|
23
18
|
width: "xs"
|
|
24
19
|
}));
|
|
25
|
-
|
|
26
20
|
const A = withWidth()(props => {
|
|
27
21
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
28
22
|
children: props.width
|
|
29
23
|
});
|
|
30
24
|
});
|
|
31
|
-
|
|
32
25
|
function WithWidthComponent(props) {
|
|
33
26
|
const {
|
|
34
27
|
width
|
|
@@ -40,7 +33,5 @@ function WithWidthComponent(props) {
|
|
|
40
33
|
})
|
|
41
34
|
});
|
|
42
35
|
}
|
|
43
|
-
|
|
44
36
|
var _default = withMuiWidth()(WithWidth);
|
|
45
|
-
|
|
46
37
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/codemod",
|
|
3
|
-
"version": "5.10.
|
|
3
|
+
"version": "5.10.16",
|
|
4
4
|
"bin": "./codemod.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "MUI Team",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/mui-codemod/**/*.test.js'",
|
|
17
17
|
"prebuild": "rimraf build",
|
|
18
|
-
"build": "node ../../scripts/build node --out-dir ./build && cpy README.md build && cpy package.json build && cpy codemod.js build",
|
|
18
|
+
"build": "node ../../scripts/build.mjs node --out-dir ./build && cpy README.md build && cpy package.json build && cpy codemod.js build",
|
|
19
19
|
"release": "yarn build && npm publish"
|
|
20
20
|
},
|
|
21
21
|
"repository": {
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"url": "https://opencollective.com/mui"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@babel/core": "^7.
|
|
34
|
-
"@babel/runtime": "^7.
|
|
35
|
-
"@babel/traverse": "^7.
|
|
33
|
+
"@babel/core": "^7.20.2",
|
|
34
|
+
"@babel/runtime": "^7.20.1",
|
|
35
|
+
"@babel/traverse": "^7.20.1",
|
|
36
36
|
"jscodeshift": "^0.13.1",
|
|
37
37
|
"jscodeshift-add-imports": "^1.0.10",
|
|
38
|
-
"yargs": "^17.6.
|
|
38
|
+
"yargs": "^17.6.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/jscodeshift": "0.11.5"
|