From 3003c61a74a6aaf5d67c9b586a0c975a631019c6 Mon Sep 17 00:00:00 2001 From: Kaishiyoku Date: Wed, 7 Feb 2018 14:01:19 +0100 Subject: [PATCH] temporarily added the /lib folder --- .gitignore | 1 - lib/webpack-react-md-import-transformer.js | 174 ++++++++++++++++++ ...webpack-react-md-import-transformer.min.js | 1 + 3 files changed, 175 insertions(+), 1 deletion(-) create mode 100644 lib/webpack-react-md-import-transformer.js create mode 100644 lib/webpack-react-md-import-transformer.min.js diff --git a/.gitignore b/.gitignore index 478e619..1ccac23 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ /.idea -/lib npm-debug.log* \ No newline at end of file diff --git a/lib/webpack-react-md-import-transformer.js b/lib/webpack-react-md-import-transformer.js new file mode 100644 index 0000000..a94dd50 --- /dev/null +++ b/lib/webpack-react-md-import-transformer.js @@ -0,0 +1,174 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("reactMdTransformer", [], factory); + else if(typeof exports === 'object') + exports["reactMdTransformer"] = factory(); + else + root["reactMdTransformer"] = factory(); +})(typeof self !== 'undefined' ? self : this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(1); + + +/***/ }), +/* 1 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reactMdTransformer__ = __webpack_require__(2); + + +/* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__reactMdTransformer__["a" /* default */]); + +/***/ }), +/* 2 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__rules__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__flatten__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__moduleFinder__ = __webpack_require__(5); + + + + +function reactMdTransformer(importName) { + var libPath = 'react-md/lib'; + + var modules = Object(__WEBPACK_IMPORTED_MODULE_1__flatten__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__rules__["a" /* default */].map(function (rule) { + return rule[1].map(function (component) { + if (Array.isArray(component)) { + return { + component: component[1], + module: rule[0], + originalComponent: component[0] + }; + } + + return { + component: component, + module: rule[0] + }; + }); + })); + + var foundModule = modules.find(Object(__WEBPACK_IMPORTED_MODULE_2__moduleFinder__["a" /* default */])(importName)); + + if (foundModule) { + return libPath + '/' + foundModule.module + '/' + foundModule.component; + } + + return libPath + '/' + importName + 's/' + importName; +} + +/* harmony default export */ __webpack_exports__["a"] = (reactMdTransformer); + +/***/ }), +/* 3 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var rules = [['Autocompletes', ['Autocomplete']], ['Avatars', ['Avatar']], ['Badges', ['Badge']], ['BottomNavigations', ['BottomNav', 'BottomNavigation']], ['Buttons', ['Button', 'FlatButton', 'FloatingButton', 'IconButton', 'RaisedButton']], ['Cards', ['Card', 'CardActionOverlay', 'CardActions', 'CardExpander', 'CardMedia', 'CardText', 'CardTitle', 'CardTitleBlock']], ['Chips', ['Chip']], ['DataTables', ['DataTable', 'DropdownMenuColumn', 'EditDialog', 'EditDialogColumn', 'MenuButtonColumn', 'SelectFieldColumn', 'TableBody', 'TableCardHeader', 'TableCheckbox', 'TableColumn', 'TableFooter', 'TableHeader', 'TablePagination', 'TableRow']], ['Dialogs', ['Dialog', 'DialogContainer', 'DialogFooter', 'DialogTitle']], ['Dividers', ['Divider']], ['Drawers', ['Drawer', 'DrawerTypes', 'Overlay']], ['ExpansionPanels', ['ExpansionList', 'ExpansionPanel', 'PanelContent']], ['FABTransitions', ['SpeedDial']], ['FileInputs', ['FileInput', 'FileUpload']], ['FontIcons', ['FontIcon']], ['Grids', ['Cell', 'Grid', 'GridList']], ['Helpers', ['AccessibleFakeButton', 'AccessibleFakeInkedButton', 'Collapse', 'FocusContainer', 'HorizontalAnchors', 'IconSeperator', 'Layover', 'Portal', 'Positions', 'ResizeObserver', 'VerticalAnchors', 'anchorShape', 'fixedToShape', 'positionShape']], ['Inks', ['Ink', 'InkContainer', 'injectInk']], ['Lists', ['List', 'ListItem', 'ListItemControl', 'ListItemText', 'TileAddon']], ['Media', ['Media', 'MediaOverlay']], ['Menus', ['DropdownMenu', 'Menu', 'MenuButton']], ['NavigationDrawers', ['CloseButton', 'JumpToContentLink', 'MiniListItem', 'NavigationDrawer']], ['Papers', ['Paper']], ['Pickers', ['CalendarDate', 'CalendarHeader', 'CalendarMonth', 'ClockFace', 'ClockHand', 'ClockTime', 'DatePicker', 'DatePickerCalendar', 'DatePickerContainer', 'DatePickerHeader', 'PickerControl', 'PickerFooter', 'TimePeriods', 'TimePicker', 'TimePickerContainer', 'TimePickerHeader', 'Year', 'YearPicker']], ['Progress', ['CircularProgress', 'LinearProgress']], ['SVGIcons', ['SVGIcon']], ['SelectFields', ['SelectField', 'SelectFieldInput', 'SelectFieldToggle']], ['SelectionControls', ['Checkbox', 'Radio', 'RadioGroup', 'SelectionControl', 'SelectionControlGroup', 'Switch', 'SwitchThumb', 'SwitchTrack']], ['Sidebars', ['Sidebar']], ['Sliders', ['DiscreteValue', 'Slider', 'SliderLabel', 'Thumb', 'ThumbMask', 'Track', 'TrackFill']], ['Snackbars', [['Snackbar', 'SnackbarContainer'], 'SnackbarContainer']], ['Subheaders', ['Subheader']], ['Tabs', ['MenuTab', 'Tab', 'TabIndicator', 'TabOverflowButton', 'TabPanel', 'Tabs', 'TabsContainer']], ['TextFields', ['FloatingLabel', 'InputField', 'Message', 'PasswordButton', 'TextArea', 'TextField', 'TextFieldDivider', 'TextFieldMessage']], ['Toolbars', ['Toolbar', 'ToolbarTitle']], ['Tooltips', ['Tooltip', 'TooltipContainer', 'Tooltipped', 'injectTooltip']], ['constants', ['CSSTransitionGroupTick', 'additionalInkTriggerKeys', 'keyCodes', 'media']]]; + +/* harmony default export */ __webpack_exports__["a"] = (rules); + +/***/ }), +/* 4 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var flatten = function flatten(list) { + return list.reduce(function (a, b) { + return a.concat(Array.isArray(b) ? flatten(b) : b); + }, []); +}; + +/* harmony default export */ __webpack_exports__["a"] = (flatten); + +/***/ }), +/* 5 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var moduleFinder = function moduleFinder(importName) { + return function (item) { + return item.originalComponent ? item.originalComponent === importName : item.component === importName; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (moduleFinder); + +/***/ }) +/******/ ])["default"]; +}); \ No newline at end of file diff --git a/lib/webpack-react-md-import-transformer.min.js b/lib/webpack-react-md-import-transformer.min.js new file mode 100644 index 0000000..075f23d --- /dev/null +++ b/lib/webpack-react-md-import-transformer.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("reactMdTransformer",[],t):"object"==typeof exports?exports.reactMdTransformer=t():e.reactMdTransformer=t()}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,o){e.exports=o(1)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(2);t.default=n.a},function(e,t,o){"use strict";var n=o(3),r=o(4),a=o(5);t.a=function(e){var t=Object(r.a)(n.a.map(function(e){return e[1].map(function(t){return Array.isArray(t)?{component:t[1],module:e[0],originalComponent:t[0]}:{component:t,module:e[0]}})})).find(Object(a.a)(e));return t?"react-md/lib/"+t.module+"/"+t.component:"react-md/lib/"+e+"s/"+e}},function(e,t,o){"use strict";t.a=[["Autocompletes",["Autocomplete"]],["Avatars",["Avatar"]],["Badges",["Badge"]],["BottomNavigations",["BottomNav","BottomNavigation"]],["Buttons",["Button","FlatButton","FloatingButton","IconButton","RaisedButton"]],["Cards",["Card","CardActionOverlay","CardActions","CardExpander","CardMedia","CardText","CardTitle","CardTitleBlock"]],["Chips",["Chip"]],["DataTables",["DataTable","DropdownMenuColumn","EditDialog","EditDialogColumn","MenuButtonColumn","SelectFieldColumn","TableBody","TableCardHeader","TableCheckbox","TableColumn","TableFooter","TableHeader","TablePagination","TableRow"]],["Dialogs",["Dialog","DialogContainer","DialogFooter","DialogTitle"]],["Dividers",["Divider"]],["Drawers",["Drawer","DrawerTypes","Overlay"]],["ExpansionPanels",["ExpansionList","ExpansionPanel","PanelContent"]],["FABTransitions",["SpeedDial"]],["FileInputs",["FileInput","FileUpload"]],["FontIcons",["FontIcon"]],["Grids",["Cell","Grid","GridList"]],["Helpers",["AccessibleFakeButton","AccessibleFakeInkedButton","Collapse","FocusContainer","HorizontalAnchors","IconSeperator","Layover","Portal","Positions","ResizeObserver","VerticalAnchors","anchorShape","fixedToShape","positionShape"]],["Inks",["Ink","InkContainer","injectInk"]],["Lists",["List","ListItem","ListItemControl","ListItemText","TileAddon"]],["Media",["Media","MediaOverlay"]],["Menus",["DropdownMenu","Menu","MenuButton"]],["NavigationDrawers",["CloseButton","JumpToContentLink","MiniListItem","NavigationDrawer"]],["Papers",["Paper"]],["Pickers",["CalendarDate","CalendarHeader","CalendarMonth","ClockFace","ClockHand","ClockTime","DatePicker","DatePickerCalendar","DatePickerContainer","DatePickerHeader","PickerControl","PickerFooter","TimePeriods","TimePicker","TimePickerContainer","TimePickerHeader","Year","YearPicker"]],["Progress",["CircularProgress","LinearProgress"]],["SVGIcons",["SVGIcon"]],["SelectFields",["SelectField","SelectFieldInput","SelectFieldToggle"]],["SelectionControls",["Checkbox","Radio","RadioGroup","SelectionControl","SelectionControlGroup","Switch","SwitchThumb","SwitchTrack"]],["Sidebars",["Sidebar"]],["Sliders",["DiscreteValue","Slider","SliderLabel","Thumb","ThumbMask","Track","TrackFill"]],["Snackbars",[["Snackbar","SnackbarContainer"],"SnackbarContainer"]],["Subheaders",["Subheader"]],["Tabs",["MenuTab","Tab","TabIndicator","TabOverflowButton","TabPanel","Tabs","TabsContainer"]],["TextFields",["FloatingLabel","InputField","Message","PasswordButton","TextArea","TextField","TextFieldDivider","TextFieldMessage"]],["Toolbars",["Toolbar","ToolbarTitle"]],["Tooltips",["Tooltip","TooltipContainer","Tooltipped","injectTooltip"]],["constants",["CSSTransitionGroupTick","additionalInkTriggerKeys","keyCodes","media"]]]},function(e,t,o){"use strict";t.a=function e(t){return t.reduce(function(t,o){return t.concat(Array.isArray(o)?e(o):o)},[])}},function(e,t,o){"use strict";t.a=function(e){return function(t){return t.originalComponent?t.originalComponent===e:t.component===e}}}]).default}); \ No newline at end of file